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 org.mybatis.scala.mapping import org.mybatis.scala.{Database, DatabaseSupport} import org.mybatis.scala.domain.User import org.mybatis.scala.infrastructure.UserRepository import org.scalatest._ /** * The specification for [[Insert]]. */ class InsertSpec extends FunSpec with Matchers with DatabaseSupport { ...
tempbottle/scala-1
mybatis-scala-core/src/test/scala/org/mybatis/scala/mapping/InsertSpec.scala
Scala
apache-2.0
1,209
package com.modelfabric.akka.cluster import akka.actor.ActorSystem import akka.event.Logging import com.modelfabric.main.BooterProperties import com.typesafe.config.Config import scala.concurrent.Await import scala.concurrent.duration.Duration import scala.util.{Failure, Success, Try} /** * AkkaSystemWrapper is a w...
modelfabric/scala-utils
src/main/scala/com/modelfabric/akka/cluster/SystemWrapper.scala
Scala
mit
2,329
package net.fehmicansaglam.bson.util import java.util.Base64 trait Codec { def decodeUtf8(value: String): Array[Byte] = { value.getBytes("UTF-8") } def encodeUtf8(value: Array[Byte]): String = { new String(value, "UTF-8") } def encodeBase64(value: Array[Byte]): String = { encodeUtf8(Base64.ge...
cancobanoglu/tepkin
bson/src/main/scala/net/fehmicansaglam/bson/util/Codec.scala
Scala
apache-2.0
558
/** * Copyright 2015 Thomson Reuters * * 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...
hochgi/CM-Well
server/cmwell-dc/src/main/scala/cmwell/dc/stream/InfotonAggregator.scala
Scala
apache-2.0
6,016
package com.twitter.finagle.netty3 import com.twitter.io.Buf import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import org.jboss.netty.buffer.ChannelBuffers import org.scalatest.prop.GeneratorDrivenPropertyChecks @RunWith(classOf[JUnitRunner]) class ChannelBufferBufTe...
spockz/finagle
finagle-core/src/test/scala/com/twitter/finagle/netty3/ChannelBufferBufTest.scala
Scala
apache-2.0
5,979
package com.goticks import akka.actor.{ Actor, Props, PoisonPill } object TicketSeller { def props(event: String) = Props(new TicketSeller(event)) case class Add(tickets: Vector[Ticket]) case class Buy(tickets: Int) case class Ticket(id: Int) case class Tickets(event: String, entries: V...
RayRoestenburg/akka-in-action
chapter-remoting/src/main/scala/com/goticks/TicketSeller.scala
Scala
mit
1,033
/* * 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 ...
Dax1n/spark-core
core/src/test/scala/org/apache/spark/rdd/PipedRDDSuite.scala
Scala
apache-2.0
6,024
package notebook.client import java.io.File import akka.actor.{Actor, ActorRef, Props} import notebook.OutputTypes._ import notebook.kernel._ import notebook.util.{CustomResolvers, Deps} import sbt._ import scala.collection.immutable.Queue import scala.concurrent.duration._ import scala.util.{Failure => TFailure, Su...
fnouama/spark-notebook
modules/kernel/src/main/scala-2.10/notebook/ReplCalculator.scala
Scala
apache-2.0
16,931
package org.hello import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class TestNothingSuite extends FunSuite { test("nothing") { } }
scoverage/gradle-scoverage
src/functionalTest/resources/projects/scala-multi-module-multiple-test-tasks/src/test/scala/org/hello/TestNothingSuite.scala
Scala
apache-2.0
221
import math._ import scala.util._ import scala.Console._ import scala.io._ import scala.collection.mutable.{HashMap, ListBuffer} object Evaluator { def mayanNumerals2Long(numbers: Array[String], mayanNumeralsToDecimal: HashMap[String, Long]): Long = numbers.zipWithIndex.foldLeft(0.toLong) { (accumulator, number)...
TGITS/programming-workouts
scala/codingame/practice/medium/mayan_calculation/src/main/scala/Solution.scala
Scala
mit
5,174
package argonaut import Json._ import scalaz._ import std.anyVal._, std.list._, std.string._ import syntax.show._, syntax.equal._ import syntax.std.list._ import JsonScalaz._ import ContextElementScalaz._ object ContextScalaz extends ContextScalazs trait ContextScalazs { implicit val ContextInstances: Equal[Contex...
jedws/argonaut
argonaut-scalaz/src/main/scala/argonaut/ContextScalaz.scala
Scala
bsd-3-clause
1,507
/* * Copyright 2008-present MongoDB, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
rozza/mongo-scala-driver
driver/src/test/scala/org/mongodb/scala/ListDatabasesObservableSpec.scala
Scala
apache-2.0
2,820
package uk.co.turingatemyhamster.shoppinglist.webClient import diode.Circuit import diode.react.ReactConnector /** * * * @author Matthew Pocock */ object SLRCircuit extends Circuit[UserStatus[Unit, Unit]] with ReactConnector[UserStatus[Unit, Unit]] { override protected def initialModel = UserIsLoggedOut(()...
drdozer/shoppinglist
web-react/src/main/scala/uk/co/turingatemyhamster/shoppinglist/webClient/SLRCircuit.scala
Scala
apache-2.0
385
package pl.touk.nussknacker.engine.lite.api.utils import cats.Monad import cats.implicits._ import cats.kernel.Monoid import pl.touk.nussknacker.engine.api.Context import pl.touk.nussknacker.engine.lite.api.commonTypes.{DataBatch, ResultType} import pl.touk.nussknacker.engine.lite.api.customComponentTypes._ import pl....
TouK/nussknacker
engine/lite/components-api/src/main/scala/pl/touk/nussknacker/engine/lite/api/utils/transformers.scala
Scala
apache-2.0
1,780
package com.twitter.querulous.query import java.sql.{Connection, PreparedStatement, ResultSet, SQLException, Timestamp, Types} import java.lang.reflect.{Field, Modifier} import java.util.regex.Pattern import scala.collection.mutable class SqlQueryFactory extends QueryFactory { def apply(connection: Connection, quer...
nkallen/querulous
src/main/scala/com/twitter/querulous/query/SqlQuery.scala
Scala
apache-2.0
4,340
/* * Copyright 2012 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...
eirslett/zipkin
zipkin-cassandra/src/main/scala/com/twitter/zipkin/storage/cassandra/CassandraAggregates.scala
Scala
apache-2.0
4,879
/** * scala-xml-diff * Copyright (c) 2014, Andrey Onistchuk, All rights reserved. * * 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 3.0 of the License, or (...
andyglow/scala-xml-diff
src/main/scala/com/github/andyglow/xml/diff/Lookup.scala
Scala
lgpl-3.0
1,302
package creg package compiler import scala.reflect.macros.blackbox.Context import DatatypeRepresentation._ private[creg] trait SynonymGenerator extends UniverseConstruction { def generateSynonyms(c: Context)(data: DataConstructor): Many[c.Tree] = { Many(generateTopLevelSynonym(c)(data)) ++ generatePatternF...
yfcai/CREG
creg/compiler.SynonymGenerator.scala
Scala
mit
3,592
package emulator import MachineWord._ sealed trait MachineCycleState { def next: MachineCycleState def enter(st: MachineState): MachineState = st } case object Initial extends MachineCycleState { override def next = Fetch } case object Fetch extends MachineCycleState { override def enter(st: MachineState) = ...
joeledstrom/brookshear-emu
src/main/scala/emulator/MachineState.scala
Scala
mit
2,142
/* * 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 ...
michalsenkyr/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/RowBasedHashMapGenerator.scala
Scala
apache-2.0
7,882
package com.seanshubin.todo.persistence.contract import java.io.{BufferedReader, BufferedWriter, InputStream, OutputStream} import java.lang.Iterable import java.nio.channels.SeekableByteChannel import java.nio.charset.Charset import java.nio.file.DirectoryStream.Filter import java.nio.file._ import java.nio.file.attr...
SeanShubin/todo-persistence
contract-test/src/main/scala/com/seanshubin/todo/persistence/contract/FilesNotImplemented.scala
Scala
unlicense
5,889
package edu.gemini.gsa.query import argonaut.Argonaut._ import argonaut._ import edu.gemini.gsa.query.JsonCodecs._ import org.specs2.mutable.Specification import java.time.Instant import scalaz._ object TimeInstanceCodecSpec extends Specification { val ExampleInstant = Instant.parse("2011-12-03T10:15:30Z") "T...
arturog8m/ocs
bundle/edu.gemini.gsa.query/src/test/scala/edu/gemini/gsa/query/TimeInstanceCodecSpec.scala
Scala
bsd-3-clause
1,108
/* * Copyright 2012-2015 Broad Institute, Inc. * * This file is part of Pilon. * * Pilon is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation. * * Pilon is distributed in the hope that it will be ...
INNUENDOWEB/INNUca
src/pilon_v1.18/pilon/src/main/scala/org/broadinstitute/pilon/GapFiller.scala
Scala
gpl-3.0
12,773
/* * 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/integration/torch/TanhSpec.scala
Scala
apache-2.0
2,722
package com.github.tminglei.slickpg import java.sql.{Date, Time, Timestamp} import java.util.Calendar import slick.jdbc.{JdbcType, PostgresProfile} trait PgDateSupport extends date.PgDateExtensions with utils.PgCommonJdbcTypes with date.PgDateJdbcTypes { driver: PostgresProfile => import driver.api._ /// alias ...
tminglei/slick-pg
src/main/scala/com/github/tminglei/slickpg/PgDateSupport.scala
Scala
bsd-2-clause
4,753
/* Copyright 2009-2016 EPFL, Lausanne */ import leon.annotation._ import leon.lang._ object MutualWrong { // unsupported by Isabelle // should report a 'fatal error' (not an 'internal error') sealed abstract class List1[A] case class Cons1[A](head: A, tail: List2[A, A]) extends List1[A] sealed abstract c...
epfl-lara/leon
src/test/resources/regression/verification/isabelle/error/MutualWrong.scala
Scala
gpl-3.0
482
package uk.gov.bis.levyApiMock.mongo import javax.inject.Inject import play.modules.reactivemongo.ReactiveMongoApi import uk.gov.bis.levyApiMock.auth.OAuthTrace import uk.gov.bis.levyApiMock.data.oauth2.{AuthRecord, AuthRecordOps} import play.api.libs.json._ import reactivemongo.play.json.compat._ import json2bson._ ...
SkillsFundingAgency/das-alpha-hmrc-api-mock
src/main/scala/uk/gov/bis/levyApiMock/mongo/AuthRecordMongo.scala
Scala
mit
1,734
/* * -╥⌐⌐⌐⌐ -⌐⌐⌐⌐- * ≡╢░░░░⌐\\░░░φ ╓╝░░░░⌐░░░░╪╕ * ╣╬░░` `░░░╢┘ φ▒╣╬╝╜ ░░╢╣Q * ║╣╬░⌐ ` ╤▒▒▒Å` ║╢╬╣ * ╚╣╬░⌐ ╔▒▒▒▒`«╕ ╢╢╣▒ * ╫╬░░╖ .░ ╙╨╨ ╣╣╬░φ ╓φ░╢╢Å * ╙╢░░░░⌐"░░░╜ ╙Å░░░░⌐░░░░╝` * ``˚¬ ⌐ ˚˚⌐´ * * ...
Flipkart/connekt
busybees/src/main/scala/com/flipkart/connekt/busybees/models/SmsRequestTracker.scala
Scala
mit
1,236
/* * 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 ...
chenc10/Spark-PAF
streaming/src/main/scala/org/apache/spark/streaming/Checkpoint.scala
Scala
apache-2.0
14,462
/* * Copyright (c) 2014-2015 by its authors. Some rights reserved. * See the project homepage at: http://www.monifu.org * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://...
virtualirfan/monifu
monifu/shared/src/main/scala/monifu/reactive/internals/operators/zip.scala
Scala
apache-2.0
3,754
/* * 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 ...
duynguyen/incubator-openwhisk
tests/src/test/scala/whisk/core/database/test/RemoveLogsTests.scala
Scala
apache-2.0
4,509
package glaux.neuralnetwork.layers import glaux.linearalgebra.Dimension.ThreeD import glaux.linearalgebra.{Vol, Tensor4} import glaux.neuralnetwork._ trait MovingFilter { def inputSize: Rectangle def stride: Int def pad: Rectangle def filterSize: Rectangle def inputPlaneRanges = RectangleRange( Range....
A-Noctua/glaux
neural-network/src/main/scala/glaux/neuralnetwork/layers/MovingFilter.scala
Scala
mit
984
package io.mehitabel.morphism package explicit sealed trait Exp final case class IntValue(v: Int) extends Exp final case class DecValue(v: Double) extends Exp final case class Sum(exp1: Exp, exp2: Exp) extends Exp final case class Multiply(exp1: Exp, exp2: Exp) extends Exp final case class Divide(exp1: Exp, exp2: Exp)...
nmehitabel/morphism
src/main/scala/io/mehitabel/morphism/explicit/Exp.scala
Scala
apache-2.0
1,863
/* * Copyright (C) 2005, The Beangle Software. * * 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 3 of the License, or * (at your option) any later version. * * This...
beangle/commons
core/src/test/scala/org/beangle/commons/codec/binary/Base64Test.scala
Scala
lgpl-3.0
1,247
package snare.ui import crochet.Crochet import snare.logger.LoggerFactory import org.joda.time.{Period, DateTime} import snare.Snare import snare.storage.QueryTools import org.joda.time.format.DateTimeFormat import com.mongodb.{BasicDBList, BasicDBObject, Mongo} /** * A basic web monitor class of a pool of Snare mon...
xllora/Snare
src/main/scala/ui/WebMonitor.scala
Scala
bsd-3-clause
8,907
package by.pavelverk.hardwrite.core.feature import by.pavelverk.hardwrite.core.{Features, FeaturesId, SampleId} import by.pavelverk.hardwrite.utils.db.DatabaseConnector import slick.ast.BaseTypedType import slick.jdbc.JdbcType private[feature] trait FeaturesTable { protected val databaseConnector: DatabaseConnecto...
VerkhovtsovPavel/BSUIR_Labs
Master/back/akka-http-rest-master/src/main/scala/by/pavelverk/hardwrite/core/feature/FeaturesTable.scala
Scala
mit
1,909
/* * 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 ...
hhbyyh/spark
resource-managers/mesos/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackendSuite.scala
Scala
apache-2.0
27,695
package me.apidoc.avro import lib.{ServiceConfiguration, ServiceValidator} import scala.util.{Failure, Success, Try} import io.apibuilder.spec.v0.models.Service case class AvroIdlServiceValidator( config: ServiceConfiguration, definition: String ) extends ServiceValidator[Service] { override def validate(): Ei...
gheine/apidoc
avro/src/main/scala/me/apidoc/avro/AvroIdlServiceValidator.scala
Scala
mit
515
package microtools.ws import akka.stream.scaladsl.Source import akka.util.ByteString import microtools.logging.{ContextAwareLogger, LoggingContext, WithContextAwareLogger} import microtools.models.{Problem, Problems} import microtools.{BusinessFailure, BusinessTry} import play.api.http.Status import play.api.libs.json...
21re/play-error-handling
src/main/scala/microtools/ws/WSTry.scala
Scala
mit
3,378
package com.avsystem.commons package mongo.core.ops import com.avsystem.commons.mongo.BsonRef import com.avsystem.commons.serialization.GenCodec final class BsonRefIterableUpdating[E, C[T] <: Iterable[T]](protected val bsonRef: BsonRef[_, C[E]])( implicit protected val elementCodec: GenCodec[E]) extends BaseIterabl...
AVSystem/scala-commons
commons-mongo/jvm/src/main/scala/com/avsystem/commons/mongo/core/ops/BsonRefIterableUpdating.scala
Scala
mit
416
package com.twitter.util import com.twitter.io.StreamIO import java.io.{ByteArrayInputStream, ByteArrayOutputStream} import java.nio.charset.{StandardCharsets => Charsets} import java.util.Base64 import java.util.zip.{GZIPInputStream, GZIPOutputStream} trait StringEncoder { def encode(bytes: Array[Byte]): String = ...
twitter/util
util-codec/src/main/scala/com/twitter/util/StringEncoder.scala
Scala
apache-2.0
2,958
case class Repo(name:String, id:Long, language:String)
pbugnion/s4ds
chap08/Repo.scala
Scala
apache-2.0
56
package at.ac.tuwien.math import java.io.File import at.ac.tuwien.utility.{Output, Profile} import org.apache.lucene.analysis.core.{KeywordAnalyzer, WhitespaceAnalyzer} import org.apache.lucene.index._ import org.apache.lucene.queryparser.classic.QueryParser import org.apache.lucene.queryparser.flexible.standard.Quer...
aldolipani/TUW-IMP_at_the_NTCIR-11_Math2
src/main/scala/at/ac/tuwien/math/Search.scala
Scala
apache-2.0
23,633
package com.github.shadowsocks import java.util.Locale import android.content.{DialogInterface, Intent} import android.net.Uri import android.os.{Build, Bundle} import android.preference.{SwitchPreference, Preference, PreferenceFragment} import android.support.v7.app.AlertDialog import android.webkit.{WebViewClient, ...
tenwx/shadowsocks-android
src/main/scala/com/github/shadowsocks/ShadowsocksSettings.scala
Scala
gpl-3.0
2,959
package com.lookout.borderpatrol.sessionx import java.nio.charset.Charset import com.twitter.bijection.twitter_util.UtilBijections import com.twitter.io.Buf import com.twitter.util.{Bijection, Future} import com.twitter.finagle.memcachedx import com.twitter.finagle.redis import org.jboss.netty.buffer.{ChannelBuffer, ...
wkimeria/borderpatrol
core/src/main/scala/com/lookout/borderpatrol/sessionx/SessionStore.scala
Scala
mit
7,322
package giter8 import org.eclipse.jgit.transport.sshd.SshdSessionFactory import java.{util => ju} import java.io.File import java.nio.file.{Path, Files, Paths} import scala.collection.JavaConverters._ class SshAgentSessionFactory(knownHosts: Option[String]) extends SshdSessionFactory() { private val home = ...
foundweekends/giter8
cli-git/src/main/scala/SshAgentSessionFactory.scala
Scala
apache-2.0
871
package com.yetu.youtubeapp.services import com.mohiva.play.silhouette.api.Logger import com.yetu.youtubeapp.models.{InboxMessage, Payload} import com.yetu.youtubeapp.utils.ConfigLoader.Inbox._ import play.api.Play.current import play.api.libs.json.{JsValue, Json} import play.api.libs.ws.{WS, WSResponse} import scala...
yetu/youtube-app
app/com/yetu/youtubeapp/services/InboxService.scala
Scala
mit
789
/** * Copyright 2013-2014 Jorge Aliss (jaliss at gmail dot com) - twitter: @jaliss * * 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 *...
jaliss/securesocial
module-code/app/securesocial/core/services/HttpService.scala
Scala
apache-2.0
1,224
package com.shocktrade.webapp.routes import com.shocktrade.common.forms.{ContestCreateForm, ContestSearchForm} import com.shocktrade.common.models.contest.{CashAccount, MarginAccount, PerformanceLike} import com.shocktrade.server.dao.contest.ContestDAO._ import com.shocktrade.server.dao.contest.ContestData._ import co...
ldaniels528/shocktrade.js
app/server/webapp/src/main/scala/com/shocktrade/webapp/routes/ContestRoutes.scala
Scala
apache-2.0
7,908
package masked.scalaxb import masked.scalaxb import scala.xml.{Node, NodeSeq, NamespaceBinding, Elem, UnprefixedAttribute, PrefixedAttribute} import javax.xml.datatype.{XMLGregorianCalendar} import javax.xml.namespace.QName import javax.xml.bind.DatatypeConverter import scala.language.postfixOps import scala.languag...
Fayho/scalaxb
cli/src_managed/scalaxb/scalaxb.scala
Scala
mit
48,239
/* * Copyright (C) 2010-2014 GRNET S.A. * * 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 di...
grnet/cdmi-spec
src/main/scala/gr/grnet/cdmi/model/CapabilityModel.scala
Scala
gpl-3.0
1,788
package client import rest._ import container._ import http._ import json.LiftHttpResponse import com.typesafe.config.ConfigFactory import rest.TsConnection import scala.concurrent.Future object TsBootstrapper extends App { def cast[A <: AnyRef : Manifest](a: Any): A = manifest[A].runtimeClass.cast(a).asInstanceO...
anderssonfilip/tradeshift-external-api-scala
src/main/scala/client/TsBootstrapper.scala
Scala
mit
3,943
/* * Copyright 2012 Comcast Cable Communications Management, 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 require...
Comcast/money
money-core/src/main/scala/com/comcast/money/core/context/ContextStorageFilterFactory.scala
Scala
apache-2.0
1,236
import scala.language.experimental.macros import scala.reflect.macros.blackbox.Context object Macros { def impl(c:Context): c.Expr[Any] = { import c.universe._ val selfTree = This(c.enclosingImpl.symbol.asModule.moduleClass) c.Expr[AnyRef](selfTree) } def foo: Any = macro impl }
scala/scala
test/files/run/t6394a/Macros_1.scala
Scala
apache-2.0
301
import akka.actor.ActorSystem import akka.http.scaladsl.Http import korolev._ import korolev.akka._ import korolev.server._ import korolev.state.javaSerialization._ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future object AkkaHttpExample extends App { private implicit val act...
fomkin/korolev
examples/akka-http/src/main/scala/AkkaHttpExample.scala
Scala
apache-2.0
958
/* * 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 ...
ueshin/apache-spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/TryCast.scala
Scala
apache-2.0
4,893
def test = { val end = 0 assert(~end == -1) //Not found: ~ } { val end = false assert(!end) // postfix operator `end` needs to be enabled } // by making the implicit value scala.language.postfixOps visible.
dotty-staging/dotty
tests/pos/i13134.scala
Scala
apache-2.0
244
import sbt.Keys._ import sbt._ object HmrcBuild extends Build { import uk.gov.hmrc.DefaultBuildSettings._ import uk.gov.hmrc.SbtAutoBuildPlugin import uk.gov.hmrc.versioning.SbtGitVersioning val appName = "microservice-bootstrap" val appDependencies = Dependencies.compile ++ Dependencies.test lazy val...
xnejp03/microservice-bootstrap
project/HmrcBuild.scala
Scala
apache-2.0
1,398
package org.sisioh.aws4s.sns.model import com.amazonaws.services.sns.model.GetTopicAttributesRequest import org.sisioh.aws4s.PimpedType object GetTopicAttributesRequestFactory { def create(): GetTopicAttributesRequest = new GetTopicAttributesRequest() def create(topicArn: String): GetTopicAttributesRequest ...
sisioh/aws4s
aws4s-sns/src/main/scala/org/sisioh/aws4s/sns/model/RichGetTopicAttributesRequest.scala
Scala
mit
799
/** * Copyright 2011-2016 GatlingCorp (http://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
GabrielPlassard/gatling
gatling-core/src/main/scala/io/gatling/core/check/extractor/xpath/JDKXPathExtractorFactory.scala
Scala
apache-2.0
2,199
package com.nidkil.downloader.io import java.io.File import java.net.URL import org.scalatest.FunSpec import org.scalatest.Matchers import com.nidkil.downloader.datatypes.Chunk import com.nidkil.downloader.utils.Checksum import com.nidkil.downloader.utils.Timer import com.nidkil.downloader.utils.UrlUtils import org.sc...
nidkil/scala-downloader
src/test/scala/com/nidkil/downloader/io/DownloadProviderTest.scala
Scala
apache-2.0
3,931
package spa.client.components import diode.react.ReactPot._ import diode.react._ import diode.data.Pot import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.prefix_<^._ import org.scalajs.dom.raw.HTMLUListElement import spa.client.components.Bootstrap._ /** * This is a simple component demonstrating ho...
IceGiant/internet-abridged
client/src/main/scala/spa/client/components/Motd.scala
Scala
apache-2.0
996
package com.sdge.ela.prop39 import org.apache.pdfbox.pdmodel.{PDDocumentCatalog, PDDocument} import org.apache.pdfbox.pdmodel.interactive.form.{PDAcroForm, PDField} import scala.collection.mutable import scala.collection.mutable.ArrayBuffer object CECForm { def getFields(doc: PDDocument): IndexedSeq[PDField] = { ...
sdge-ela/prop39-formreader
src/main/scala/com/sdge/ela/prop39/CECForm.scala
Scala
apache-2.0
3,545
package org.jetbrains.plugins.scala.lang.completion.filters.expression import com.intellij.psi.filters.ElementFilter import org.jetbrains.plugins.scala.lang.completion.ScalaCompletionUtil._ import com.intellij.psi.{PsiWhiteSpace, PsiComment, PsiElement} import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes imp...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/completion/filters/expression/WhileFilter.scala
Scala
apache-2.0
2,031
/* __ *\ ** ________ ___ / / ___ __ ____ Scala.js IR ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2014, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ |/_// /_\ \ http://scala-js.org/ ** ** /____/\___/_/ |_/...
swhgoon/scala-js
ir/src/main/scala/scala/scalajs/ir/Position.scala
Scala
bsd-3-clause
1,258
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package java.util import scala.math.Ordering ...
SebsLittleHelpers/scala-js
javalib/src/main/scala/java/util/NavigableView.scala
Scala
apache-2.0
5,207
// TxBits - An open source Bitcoin and crypto currency exchange // Copyright (C) 2014-2015 Viktor Stanchev & Kirk Zathey // // 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 vers...
CryptArc/txbits
txbits/app/usertrust/UserTrustService.scala
Scala
agpl-3.0
4,112
package org.hqjpa import scala.collection.JavaConverters._ import javax.persistence.EntityManager import javax.persistence.criteria.CriteriaBuilder import javax.persistence.criteria.CriteriaQuery import javax.persistence.metamodel.Attribute import javax.persistence.criteria.Selection import javax.persistence.TypedQue...
vejobrolis/hqjpa
hqjpa/src/org/hqjpa/SelectQueryBuilder.scala
Scala
lgpl-3.0
25,528
package com.tresata.spark.skewjoin import java.util.{ Random => JRandom } import scala.reflect.ClassTag import org.apache.spark.rdd.RDD import org.apache.spark.Partitioner import org.apache.spark.Partitioner.defaultPartitioner class BlockJoinOperations[K: ClassTag, V: ClassTag](rdd: RDD[(K, V)]) extends Serializable...
tresata/spark-skewjoin
src/main/scala/com/tresata/spark/skewjoin/BlockJoinOperations.scala
Scala
apache-2.0
4,735
var a = 0 def direct(f: Int => Unit) = () direct(/*start*/a = _/*end*/) // (Int) => Unit
ilinum/intellij-scala
testdata/typeInference/bugs4/SCL3512A.scala
Scala
apache-2.0
88
package root import com.typesafe.sbt.osgi.OsgiKeys._ import org.openmole.buildsystem.OMKeys._ import root._ import sbt.Keys._ import sbt._ abstract class PluginDefaults(subBuilds: Defaults*) extends Defaults(subBuilds: _*) { override val dir = file("plugins") override def osgiSettings = super.osgiSettings ++ ...
ISCPIF/PSEExperiments
openmole-src/openmole/project/src/main/scala/root/Plugin.scala
Scala
agpl-3.0
669
/* * 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/reactive-activemq
src/test/scala/akka/stream/integration/TestSpec.scala
Scala
apache-2.0
4,529
/* * Copyright 2014–2018 SlamData 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...
jedesah/Quasar
frontend/src/main/scala/quasar/frontend/package.scala
Scala
apache-2.0
780
package ai.verta.repository import ai.verta.swagger.client.ClientSet import ai.verta.swagger._public.modeldb.versioning.model._ import ai.verta.blobs._ import ai.verta.blobs.dataset._ import scala.concurrent.ExecutionContext import scala.util.{Failure, Success, Try} import scala.collection.immutable.Map import scala....
mitdbg/modeldb
client/scala/src/main/scala/ai/verta/repository/Commit.scala
Scala
mit
29,449
package specs import testy._ import io.youi.Template import org.scalajs.dom.html class TemplateSpec extends Spec { "Template" should { "load from id" in { val div = Template.byId[html.Div]("template.html", "hello", "youi") div.innerHTML should be("Hello, World!") } } }
outr/youi
dom/src/test/scala/specs/TemplateSpec.scala
Scala
mit
295
/** * Created by akorovin on 23.12.2016. */ object TestAbstract { def main(args: Array[String]): Unit = { val fang = new Wolf("Fang") fang.moveSpeed = 36.0 println(fang.move) } /** * Cannot be instantiated * @param name */ abstract class Mammal(val name: String) { // field that ...
aw3s0me/scala-tuts
scala_tuts/src/TestAbstract.scala
Scala
apache-2.0
664
/* * 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/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/RefreshTableExec.scala
Scala
apache-2.0
1,406
package pl.touk.nussknacker.engine.avro.schema import org.apache.avro.Schema import org.apache.avro.specific.SpecificRecordBase import java.util object GeneratedAvroClassSampleSchema extends TestSchemaWithSpecificRecord { override lazy val schema: Schema = GeneratedAvroClassSample.getClassSchema override def sp...
TouK/nussknacker
engine/flink/avro-components-utils/src/test/scala/pl/touk/nussknacker/engine/avro/schema/GeneratedAvroClassSampleSchema.scala
Scala
apache-2.0
1,438
package com.github.wakfudecrypt.types.data import com.github.wakfudecrypt._ @BinaryDecoder case class MagicraftLootList( _0_int32: Int, _1_int8: Byte, _2_array_composite: Array[MagicraftLootList_2_array_composite] ) object MagicraftLootList extends BinaryDataCompanion[MagicraftLootList] { override val dataId...
jac3km4/wakfudecrypt
types/src/main/scala/com/github/wakfudecrypt/types/data/MagicraftLootList.scala
Scala
mit
433
package coursier.cli.publish.sonatype import caseapp._ final case class SonatypeOptions( raw: Boolean = false, profile: Option[String] = None, profileId: Option[String] = None, @Name("repo") repository: Option[String] = None, description: String = "", listProfiles: Boolean = false, list: Option[Boolea...
alexarchambault/coursier
modules/cli/src/main/scala/coursier/cli/publish/sonatype/SonatypeOptions.scala
Scala
apache-2.0
764
/* * 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/src/test/scala/org/apache/flink/table/api/stream/StreamTableEnvironmentValidationTest.scala
Scala
apache-2.0
7,470
/* * 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/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableDropPartitionParserSuite.scala
Scala
apache-2.0
3,784
/* * Copyright 2019 Spotify AB. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
spotify/scio
scio-test/src/test/scala/com/spotify/scio/schemas/SchemaMaterializerTest.scala
Scala
apache-2.0
6,882
/* __ *\ ** ________ ___ / / ___ __ ____ Scala.js Test Suite ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ |/_// /_\ \ http://scala-js.org/ ** ** /____/\___/_/ |_/...
CapeSepias/scala-js
test-suite/src/test/scala/org/scalajs/testsuite/javalib/lang/ref/ReferenceTest.scala
Scala
bsd-3-clause
1,136
/* * 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/BaseHaxePlugin.scala
Scala
apache-2.0
8,628
/* Copyright 2013 Stephen K Samuel Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to i...
carlosFattor/scrimage
scrimage-filters/src/main/scala/com/sksamuel/scrimage/filter/MinimumFilter.scala
Scala
apache-2.0
813
/* * 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 ...
ron8hu/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/EliminateCrossJoinSuite.scala
Scala
apache-2.0
9,333
package no.uio.musit.time import java.sql.{Date => JSqlDate, Timestamp => JSqlTimestamp} import org.joda.time.DateTime trait DateTimeImplicits { implicit def dateTimeToJSqlDate(dt: DateTime): JSqlDate = new JSqlDate(dt.getMillis) implicit def dateTimeToJTimestamp(dt: DateTime): JSqlTimestamp = new JSql...
MUSIT-Norway/musit
musit-models/src/main/scala/no/uio/musit/time/Implicits.scala
Scala
gpl-2.0
1,110
package controllers import akka.actor.{Actor, ActorLogging} import com.amazonaws.ClientConfiguration import com.amazonaws.regions.Region import com.amazonaws.services.cloudformation.AmazonCloudFormationClient import com.amazonaws.services.cloudformation.model.{CreateStackRequest, DescribeStacksResult} import controlle...
paulseddon/watchman
app/controllers/Stacks.scala
Scala
mit
1,941
/* * 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 ...
michalsenkyr/spark
mllib/src/test/scala/org/apache/spark/mllib/recommendation/MatrixFactorizationModelSuite.scala
Scala
apache-2.0
4,137
/* * Copyright 2014-2022 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...
Netflix-Skunkworks/iep-apps
iep-archaius/src/main/scala/com/netflix/iep/archaius/DynamoService.scala
Scala
apache-2.0
1,809
/* * Copyright 2017-2022 John Snow Labs * * 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...
JohnSnowLabs/spark-nlp
src/test/scala/com/johnsnowlabs/nlp/annotators/spell/symmetric/SymmetricDeleteModelTestSpec.scala
Scala
apache-2.0
2,846
package org.jetbrains.plugins.scala package lang package psi package impl package base import com.intellij.lang.ASTNode import com.intellij.psi._ import org.jetbrains.plugins.scala.extensions._ import org.jetbrains.plugins.scala.lang.psi.api.InferUtil.SafeCheckException import org.jetbrains.plugins.scala.lang.psi.api....
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/base/ScConstructorImpl.scala
Scala
apache-2.0
9,615
package scribe.message import scribe.Loggable import scribe.output.LogOutput class LazyMessage[M](function: () => M) (implicit loggable: Loggable[M]) extends Message[M] { override lazy val value: M = function() override lazy val logOutput: LogOutput = loggable(value) }
outr/scribe
core/shared/src/main/scala/scribe/message/LazyMessage.scala
Scala
mit
295
package controllers import play.api.mvc.{SimpleResult, Action} import models.AssetSupport.IdType import play.api.mvc.BodyParsers.parse import models.order.{OrderIn, OrderUpdate, OrderCreate} import controllers.utils.CrudController import play.api.libs.json._ import services.{DbQuery, runtime, JsonErrors} import play....
tsechov/shoehorn
app/controllers/Orders.scala
Scala
apache-2.0
2,491
package com.mesosphere.cosmos.http import com.mesosphere.cosmos.http.MediaTypeOps._ class CompoundMediaTypeOps(val cmt: CompoundMediaType) extends AnyVal { def getMostAppropriateMediaType(mts: Set[MediaType]): Option[MediaType] = { CompoundMediaTypeOps.calculateIntersectionAndOrder(cmt, mts).headOption } } ...
takirala/cosmos
cosmos-common/src/main/scala/com/mesosphere/cosmos/http/CompoundMediaTypeOps.scala
Scala
apache-2.0
1,435
/* * Copyright 2015 IBM 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 by applicable law or agreed to ...
beloglazov/couchdb-scala
src/test/scala/com/ibm/couchdb/implicits/TaskImplicitsSpec.scala
Scala
apache-2.0
1,135
package edu.arizona.sista.processors import scala.collection.immutable.ListMap import edu.arizona.sista.processors.bionlp.BioNLPProcessor import edu.arizona.sista.processors.corenlp.CoreNLPProcessor import edu.arizona.sista.processors.fastnlp.FastNLPProcessor import java.io.File import jline.console.ConsoleReader impo...
VivianLuwenHuangfu/processors
src/main/scala/edu/arizona/sista/processors/ProcessorShell.scala
Scala
apache-2.0
2,516
package com.datastax.spark.connector.mapper import com.datastax.spark.connector.cql._ import com.datastax.spark.connector.types.{IntType, UDTFieldDef, UserDefinedType} import com.datastax.spark.connector.{ColumnName, _} import org.apache.commons.lang3.SerializationUtils import org.junit.Assert._ import org.junit.Test ...
shashwat7/spark-cassandra-connector
spark-cassandra-connector/src/test/scala/com/datastax/spark/connector/mapper/JavaBeanColumnMapperTest.scala
Scala
apache-2.0
5,639
/** * This file is part of SensApp [ http://sensapp.modelbased.net ] * * Copyright (C) 2011- SINTEF ICT * Contact: SINTEF ICT <nicolas.ferry@sintef.no> * * Module: net.modelbased.sensapp * * SensApp is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public L...
SINTEF-9012/sensapp
_attic/net.modelbased.sensapp.registry/src/main/scala/net/modelbased/sensapp/registry/datamodel/Unit.scala
Scala
lgpl-3.0
4,375