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.jetbrains.plugins.scala package lang package completion import psi._ import api.base.ScReferenceElement import psi.api.base.patterns.ScCaseClause import psi.api.ScalaFile import psi.api.toplevel.typedef.ScTypeDefinition import psi.api.base.types.ScTypeElement import com.intellij.psi._ import org.jetbr...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/completion/ScalaCompletionUtil.scala
Scala
apache-2.0
10,581
package com.peterpotts.gene sealed abstract class AminoAcid(val code: String, val symbol: Char) extends Serializable case object Alanine extends AminoAcid("Ala", 'A') with AminoAcid.Nonpolar case object Arginine extends AminoAcid("Arg", 'R') with AminoAcid.Basic case object Asparagine extends AminoAcid("Asn", 'N') ...
peterpotts/gene
src/main/scala/com/peterpotts/gene/AminoAcid.scala
Scala
mit
3,220
package ar.com.crypticmind.basewebapp.misc import scala.util.Random import org.apache.commons.lang3.RandomStringUtils import java.util.UUID object IdGenerator { val random = new Random() def shortId: String = RandomStringUtils.randomAlphanumeric(8) def uuid: String = new UUID(random.nextLong(), random.nextLo...
crypticmind/base-webapp
backend/src/main/scala/ar/com/crypticmind/basewebapp/misc/IdGenerator.scala
Scala
mit
337
package org.littlewings.infinispan.jta.service import scala.collection.JavaConverters._ import javax.ejb.{LocalBean, Stateless} import javax.persistence.{EntityManager, PersistenceContext} import org.littlewings.infinispan.jta.entity.User @Stateless @LocalBean class UserService { @PersistenceContext private var...
kazuhira-r/infinispan-examples
infinispan-jta/src/main/scala/org/littlewings/infinispan/jta/service/UserService.scala
Scala
mit
1,031
/* *\\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2015, G...
derekmorr/squants
shared/src/test/scala/squants/mass/AreaDensitySpec.scala
Scala
apache-2.0
3,337
import quoted._ def foo()(using QuoteContext) = { type C '[C] // error }
som-snytt/dotty
tests/neg/i7013c.scala
Scala
apache-2.0
78
/* * 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 ...
pgandhi999/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/v2/V2SessionCatalogSuite.scala
Scala
apache-2.0
32,712
package util import org.scalatest._ /** * PasswordDigestUtilのテスト. */ class PasswordDigestUtilSpec extends FunSpec with Matchers { describe("createHashPassword") { it("same value") { val baseDate = CurrentDateUtil.nowDateTime val beforeStr = PasswordDigestUtil.createHashPassword("hoge", baseDate)...
nemuzuka/vss-kanban
src/test/scala/util/PasswordDigestUtilSpec.scala
Scala
mit
455
package de.dfki.cps.specific.sysml trait TypedElement extends Element { val typeAnnotation: TypeAnnotation } object Types { abstract class Classifier(val name: String) extends Type with Namespace abstract class DataType(name: String) extends Classifier(name) case object Null extends DataType("nullType") { ...
DFKI-CPS/specific-sysml
src/main/scala/de/dfki/cps/specific/sysml/Types.scala
Scala
mit
2,072
package org.jetbrains.plugins.scala package codeInspection package typeLambdaSimplify import com.intellij.codeInspection._ import com.intellij.openapi.project.Project import com.intellij.psi.PsiElementVisitor import org.jetbrains.plugins.scala.lang.psi.api.base.types._ import org.jetbrains.plugins.scala.lang.psi.api.s...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/codeInspection/typeLambdaSimplify/AppliedTypeLambdaCanBeSimplifiedInspection.scala
Scala
apache-2.0
4,870
package dao import model.{Count, Record, RegistrationInfo} import org.scalatest.{FlatSpecLike, ShouldMatchers} /** * Created by Scott on 9/6/16. */ class DAOmock extends DAO with FlatSpecLike with ShouldMatchers { def insert(r:Record):Unit = { r.density shouldBe > (0) r.latitude shouldBe > (-180.0) ...
GreenHunan/aircheck-server
test/dao/DAOmock.scala
Scala
gpl-2.0
844
package rpm4s.data import rpm4s.codecs.ConvertingError import cats.implicits._ case class EVR( version: Version, release: Option[Release] = None, epoch: Epoch = Epoch.ZERO) { def string: String = { val e = if (epoch == Epoch.ZERO) "" else s"${epoch.value}:" val r = release.map(r => s"-${r.value}...
lucidd/rpm4s
shared/src/main/scala/rpm4s/data/EVR.scala
Scala
mit
1,793
/** * Copyright (C) 2011 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...
brunobuzzi/orbeon-forms
xforms/jvm/src/main/scala/org/orbeon/oxf/xforms/Caches.scala
Scala
lgpl-2.1
912
package com.socrata.spandex.common.client import scala.language.implicitConversions import org.elasticsearch.action.support.WriteRequest sealed trait RefreshPolicy object RefreshPolicy { implicit def toWriteRequestRefreshPolicy(policy: RefreshPolicy): WriteRequest.RefreshPolicy = policy match { case Bef...
socrata-platform/spandex
spandex-common/src/main/scala/com/socrata/spandex/common/client/RefreshPolicy.scala
Scala
apache-2.0
845
package org.openurp.edu.base.ws.code import org.openurp.edu.base.code.model.{ CourseCategory, CourseType, ExamMode, ExamStatus, StdLabel, StdLabelType, StdType } import org.openurp.code.edu.model.StudentStatus class StdLabelWS extends AbstractWS[StdLabel] class StdLabelTypeWS extends AbstractWS[StdLabelType] class ...
openurp/edu-core
base/ws/src/main/scala/org/openurp/edu/base/ws/code/school.scala
Scala
gpl-3.0
618
package ildl package benchmark package gcd import org.scalameter.api._ import org.scalameter.DSL._ // // You can read about this benchmark on the following wiki page: // https://github.com/miniboxing/ildl-plugin/wiki/Sample-%7E-Data-Encoding // /** The benchmark object */ object BenchmarkRunner extends PerformanceTe...
miniboxing/ildl-plugin
tests/benchmarks/src/ildl/benchmark/gcd/Benchmark.scala
Scala
bsd-3-clause
4,421
package models import play.api.db._ import play.api.Play.current case class Task(id: Long, label: String) object Task { import anorm._ import anorm.SqlParser._ val parser: RowParser[Task] ={ long("id") ~ str("label") map { case id ~ label => Task(id, label) } } def all(todo: Todo): List[Tas...
altos-research/todo
app/models/Task.scala
Scala
mit
924
package com.tuvistavie.xserver.backend.model import com.tuvistavie.xserver.protocol.request.QueryExtensionRequest import com.tuvistavie.xserver.protocol.reply.QueryExtensionReply class Extension ( val majorOpcode: Int, val firstEvent: Int, val firstError: Int ) object Extension { private var availableExtensi...
tuvistavie/scala-x-server
backend/src/main/scala/com/tuvistavie/xserver/model/Extensions.scala
Scala
mit
934
package me.dribba.actors import java.util.Date import akka.actor._ import me.dribba.components.{DigitalSensorComponent, GrowBedComponent} import me.dribba.models.{Status, DigitalSensorStatus} import me.dribba.providers.{FlushingTookTooLong, SensorTookTooLong, GrowBedTimeoutMessage, GrowBedTimeoutProvider} class Grow...
dribba/akkaponics
src/main/scala/me/dribba/actors/GrowBedActor.scala
Scala
mit
3,489
/** * Copyright 2012-2013 greencheek.org (www.greencheek.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
tootedom/yankeedo
yankeedo-core/src/main/scala/org/greencheek/jms/yankeedo/scenarioexecution/producer/message/CamelMessageSource.scala
Scala
apache-2.0
855
/** * Copyright 2013, 2014, 2016 Gianluca Amato <[email protected]> * * This file is part of JANDOM: JVM-based Analyzer for Numerical DOMains * JANDOM 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...
amato-gianluca/Jandom
core/src/main/scala/it/unich/jandom/parsers/LinearFormParser.scala
Scala
lgpl-3.0
2,232
package com.github.gdefacci.di.sample import com.github.gdefacci.di.IOC object Example8 extends App { assert(IOC.get[String](Module8, Module8A) == "Foo Bar") }
gdefacci/di
docs/slides/src/main/scala/com/github/gdefacci/di/sample/Example8.scala
Scala
mit
169
package frameless import org.apache.spark.sql.catalyst.expressions._ import org.apache.spark.sql.{Column, FramelessInternals} import shapeless.ops.record.Selector import shapeless._ import scala.annotation.implicitNotFound sealed trait UntypedExpression[T] { def expr: Expression } /** Documentation marked "apache...
bamine/frameless
dataset/src/main/scala/frameless/TypedColumn.scala
Scala
apache-2.0
8,172
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
andrewor14/iolap
sql/core/src/main/scala/org/apache/spark/sql/columnar/ColumnStats.scala
Scala
apache-2.0
9,349
package com.coiney.akka.rabbit.actors import akka.actor.{Props, Actor} import akka.testkit.{TestActorRef, TestKit} import com.coiney.akka.rabbit.RabbitSystem import com.typesafe.config.ConfigFactory import org.scalatest.BeforeAndAfterAll trait RabbitSpec { this: TestKit with BeforeAndAfterAll => override def aft...
Coiney/akka-rabbit
akka-rabbit-core/src/test/scala/com/coiney/akka/rabbit/actors/RabbitSpec.scala
Scala
bsd-3-clause
712
/* Copyright 2014 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 to in writing, software...
aposwolsky/scalding
scalding-serialization-macros/src/main/scala/com/twitter/scalding/serialization/macros/impl/OrderedBufferableProviderImpl.scala
Scala
apache-2.0
3,336
package io.github.mandar2812.dynaml.models.neuralnets import breeze.numerics.sigmoid /** * @author mandar2812 * * Object implementing the various transfer functions. */ object TransferFunctions { /** * Hyperbolic tangent function * */ val tansig = math.tanh _ /** * Sigmoid/Logistic function *...
Koldh/DynaML
src/main/scala/io/github/mandar2812/dynaml/models/neuralnets/TransferFunctions.scala
Scala
apache-2.0
712
package org.scalaide.util.internal.eclipse import scala.reflect.io.AbstractFile import scala.tools.refactoring.common.TextChange import org.eclipse.core.resources.IFile import org.eclipse.jface.text.IDocument import org.eclipse.jface.text.IRegion import org.eclipse.jface.text.ITextSelection import org.eclipse.jface.t...
Kwestor/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/util/internal/eclipse/TextEditUtils.scala
Scala
bsd-3-clause
7,847
package com.asto.dmp.shu.util import com.asto.dmp.shu.base.Constants import org.apache.hadoop.conf.Configuration import org.apache.hadoop.fs.{FileSystem, Path} import org.apache.spark.Logging import org.apache.spark.rdd.RDD /** * 文件相关的工具类 */ object FileUtils extends Logging { private val conf = new Configuration(...
zj-lingxin/Dmp_shu
src/main/scala/com/asto/dmp/shu/util/FileUtils.scala
Scala
mit
1,392
/* * Copyright (c) 2014 Contributor. All rights reserved. */ package org.scalaide.debug.internal.expression.proxies import org.scalaide.debug.internal.expression.context.JdiContext import com.sun.jdi.StringReference /** * JdiProxy implementation for `java.lang.String`. */ case class StringJdiProxy(override val _...
andrey-ilinykh/scala-ide
org.scala-ide.sdt.debug.expression/src/org/scalaide/debug/internal/expression/proxies/StringJdiProxy.scala
Scala
bsd-3-clause
860
/* * Sonar Scoverage Plugin * Copyright (C) 2013 Rado Buransky * [email protected] * * 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 op...
zenderol/sonar-scoverage-plugin
plugin/src/test/scala/com/buransky/plugins/scoverage/sensor/ScoverageSensorSpec.scala
Scala
lgpl-3.0
4,642
package cpup.mc.computers.content.network.impl.component import java.util.UUID import scala.reflect.ClassTag import scala.reflect.runtime.{universe => ru} import cpup.lib.reflect.ReflectUtil import cpup.mc.computers.content.network.impl.Node import cpup.mc.lib.inspecting.Registry.IDed import net.minecraft.nbt.NBTTag...
CoderPuppy/cpup-computers-mc
src/main/scala/cpup/mc/computers/content/network/impl/component/Component.scala
Scala
mit
2,390
/* * Copyright © 2015-2019 the contributors (see Contributors.md). * * This file is part of Knora. * * Knora is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, or *...
musicEnfanthen/Knora
webapi/src/main/scala/org/knora/webapi/LiveActorMaker.scala
Scala
agpl-3.0
1,146
/* *\\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2015, G...
underscorenico/squants
shared/src/main/scala/squants/electro/ElectricCurrent.scala
Scala
apache-2.0
3,214
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
tophua/spark1.52
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ScalaUDF.scala
Scala
apache-2.0
48,460
package com.twitter.inject.module import com.google.inject.AbstractModule import com.google.inject.name.Names import com.twitter.inject.TestBindingAnnotation import com.twitter.inject.{MyServiceImpl, MyServiceInterface} import java.util.Properties import javax.inject.Singleton import net.codingwell.scalaguice.ScalaMod...
twitter/util
util-inject/src/test/scala/com/twitter/util/inject/module/TestModule.scala
Scala
apache-2.0
950
/* * Copyright 2017 Nicolas Rinaudo * * 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...
nrinaudo/kantan.mongodb
core/src/main/scala/kantan/mongodb/ops/BsonValueEncoderOps.scala
Scala
apache-2.0
972
/* * 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/test/scala/io/snappydata/QueryTest.scala
Scala
apache-2.0
4,268
package org.denigma.graphs.simple import org.denigma.graphs.core.VisualEdge import org.denigma.graphs.visual.EdgeView import org.scalajs.dom import rx.core.Var class SimpleEdge(from:SimpleNode,to:SimpleNode,data:Var[String],view:EdgeView[Var[String]]) extends VisualEdge[SimpleNode,Var[String],EdgeView[Var[String]]](...
antonkulaga/semantic-graph
graphs/src/main/scala/org/denigma/graphs/simple/SimpleEdge.scala
Scala
mpl-2.0
847
package mimir; import java.io._ import java.sql.SQLException import java.net.URL import org.jline.terminal.{Terminal,TerminalBuilder} import org.slf4j.{LoggerFactory} import org.rogach.scallop._ import com.typesafe.scalalogging.LazyLogging import scala.collection.JavaConverters._ import sparsity._ import fastparse.P...
UBOdin/mimir
src/main/scala/mimir/Mimir.scala
Scala
apache-2.0
18,473
package com.guidewire.tools.marathon.client.api.version1 import play.api.libs.json._ import com.guidewire.tools.marathon.client case class Endpoint( id : String , ports : Seq[Int] , instances: Seq[Task] ) extends client.Endpoint object Endpoint { implicit val fmt = Json.format[Endpoint] }
Guidewire/marathon-client
src/main/scala/com/guidewire/tools/marathon/client/api/version1/Endpoints.scala
Scala
apache-2.0
313
/* * 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 ...
spacewalkman/incubator-zeppelin
zeppelin-display/src/main/scala/org/apache/zeppelin/display/angular/AbstractAngularElem.scala
Scala
apache-2.0
5,729
package models import akka.actor.ActorRef import akka.stream.scaladsl.Flow import play.api.http.websocket._ import play.api.libs.streams.AkkaStreams import play.api.mvc.WebSocket.MessageFlowTransformer case class MessageWithSender(contents : String, sender : ActorRef) object MessageWithSender{ implicit val message...
tgodzik/akkajs
app/models/MessageWithSender.scala
Scala
mit
868
package actors import actors.FileActor.SaveFileMetadata import akka.actor.{Actor, ActorLogging, ActorRef} import akka.pattern._ import com.byteslounge.slickrepo.repository.Repository import com.google.inject.Inject import common.ActorNamed import common.implicits.RichDBIO._ import models.FileMetadata import scala.con...
sysgears/apollo-universal-starter-kit
modules/upload/server-scala/src/main/scala/actors/FileActor.scala
Scala
mit
904
/** * This file is part of the TA Buddy project. * Copyright (c) 2014-2015 Alexey Aksenov [email protected] * * 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-view-modification/src/main/scala/org/digimead/tabuddy/desktop/view/modification/ui/action/ActionToggleSystem.scala
Scala
agpl-3.0
5,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 ...
tophua/spark1.52
core/src/test/scala/org/apache/spark/serializer/TestSerializer.scala
Scala
apache-2.0
2,174
trait Higher[F[_]] trait Box[A] object Box { implicit def HigherBox: Higher[Box] = new Higher[Box] {} } object Foo { val box = implicitly[Higher[Box]] // compiles fine !!! type Bar[A] = Box[A] val bar = implicitly[Higher[Bar]] // <-- this doesn't compile in 2.10.1-RC1, but does in 2.10.0 !!! }
yusuke2255/dotty
tests/untried/pos/t7180.scala
Scala
bsd-3-clause
306
/* * Copyright 2014–2017 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...
drostron/quasar
core/src/test/scala/quasar/fs/mount/MountingErrorSpec.scala
Scala
apache-2.0
834
/* * Copyright © 2014 TU Berlin ([email protected]) * * 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 app...
emmalanguage/emma
emma-examples/src/test/scala/org/emmalanguage/compiler/integration/graphs/TransitiveClosureIntegrationSpec.scala
Scala
apache-2.0
3,169
package lore.compiler.poem import lore.compiler.core.CompilationException object Poem { case class Register(id: Int) extends AnyVal { override def toString: String = s"reg$id" } object Register { /** * Returns the maximum ID of the given registers. */ def max(registers: Vector[Register]...
marcopennekamp/lore
compiler/src/lore/compiler/poem/Poem.scala
Scala
mit
2,428
/* * Copyright ixias.net All Rights Reserved. * * Use of this source code is governed by an MIT-style license * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. */ package ixias.persistence import slick.jdbc.JdbcProfile import ixias.model...
sp1rytus/ixias
framework/ixias-core/src/main/scala/ixias/persistence/SlickRepository.scala
Scala
mit
1,987
package com.joshcough.minecraft import org.bukkit.block.Block import org.bukkit.Material import com.joshcough.minecraft.BukkitEnrichment._ import Cube._ // GIANT TODO // GIANT TODO: force some of the streams in mirroring! // GIANT TODO object CubeModifier { object PotentialChange { def apply(c: Change) = new P...
JunctionAt/JunctionAPI
src/main/scala/com/joshcough/minecraft/CubeModifier.scala
Scala
agpl-3.0
4,411
package io.koff.hll.facade /** * Utility class for intersection * @author [email protected] */ object HLLUtils { /** * Calculate count of common elements in hlls in the seq.<br/> * Adaptation of com.twitter.algebird.HyperLogLogMonoid#intersectionSize. * * @param hlls hlls for calcs * @return count ...
coffius/koffio-hll
src/main/scala/io/koff/hll/facade/HLLUtils.scala
Scala
mit
552
package mesosphere.marathon package state import com.wix.accord._ import com.wix.accord.dsl._ import mesosphere.marathon.api.v2.Validation.isTrue import mesosphere.marathon.plugin import scala.annotation.tailrec import scala.collection.immutable.Seq case class PathId(path: Seq[String], absolute: Boolean = true) exte...
natemurthy/marathon
src/main/scala/mesosphere/marathon/state/PathId.scala
Scala
apache-2.0
5,371
package is.hail.expr.ir import is.hail.HailContext import is.hail.expr.JSONAnnotationImpex import is.hail.expr.ir.agg._ import is.hail.expr.ir.functions.RelationalFunctions import is.hail.types.TableType import is.hail.types.virtual.{TArray, TInterval, TStream, Type} import is.hail.utils.prettyPrint._ import is.hail.u...
hail-is/hail
hail/src/main/scala/is/hail/expr/ir/Pretty.scala
Scala
mit
37,353
package sms import com.typesafe.config.{ConfigValue, Config} import scala.reflect.runtime.{universe => u} import scala.reflect._ import sms.core.io.ConfigLoader import scala.util.Try import scala.collection.convert.wrapAsScala._ import dispatch._ import scala.xml.XML import scala.concurrent.{ExecutionContext, Promise,...
kjanosz/stock-market-sherlock
core/src/main/scala/sms/core/package.scala
Scala
apache-2.0
2,087
package com.github.ldaniels528.trifecta.io.kafka import com.github.ldaniels528.trifecta.io.zookeeper.ZKProxy import com.github.ldaniels528.trifecta.messages.query.KQLSource import com.github.ldaniels528.trifecta.messages.{KeyAndMessage, MessageInputSource} import kafka.common.TopicAndPartition /** * Kafka Topic Inpu...
ldaniels528/trifecta
src/main/scala/com/github/ldaniels528/trifecta/io/kafka/KafkaTopicMessageInputSource.scala
Scala
apache-2.0
1,389
package ru.freefry.furniture_factory.rest import akka.pattern.ask import ru.freefry.furniture_factory.core.Factory.{Chair, Product, Table} import ru.freefry.furniture_factory.core.{Core, Factory} import spray.http.StatusCodes import spray.http.StatusCodes.InternalServerError import spray.httpx.SprayJsonSupport ...
freefry/furniture-factory
src/main/scala/ru/freefry/furniture_factory/rest/routes.scala
Scala
apache-2.0
2,009
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
witgo/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/joinReorder/StarJoinCostBasedReorderSuite.scala
Scala
apache-2.0
16,053
package chat.tox.antox.activities import java.io.{File, FileNotFoundException, FileOutputStream, IOException} import java.util.Random import android.content.DialogInterface.OnClickListener import android.content.{Context, DialogInterface, Intent, SharedPreferences} import android.graphics.drawable.ColorDrawable impor...
gale320/Antox
app/src/main/scala/chat/tox/antox/activities/ProfileSettingsActivity.scala
Scala
gpl-3.0
13,768
package jp.kenkov.smt.japanese.sen import net.java.sen.{SenFactory} import java.util.Locale import scala.collection.JavaConverters._ class Keitaiso(val hyousoukei: String, val genkei: String, val pos: String, val conjugationalForm: String, val conjugationalT...
kenkov/smtscala
src/main/scala/jp/kenkov/smt/japanese/sen/Sen.scala
Scala
mit
2,179
package xyz.discretezoo.web.db.v1 import xyz.discretezoo.web.db.ZooPostgresProfile.api._ case class GraphSPX(zooid: Int, rSPX: Int, sSPX: Int) class GraphsSPX(tag: Tag) extends Table[GraphSPX](tag, "graph_cvt") { def zooid: Rep[Int] = column[Int]("zooid", O.PrimaryKey) def rSPX = column[Int]("spx_r") def sSPX...
DiscreteZOO/DiscreteZOO-web
src/main/scala/xyz/discretezoo/web/db/v1/GraphSPX.scala
Scala
mit
443
/* * @author Bharath Kumar * @author Philip Stutz * * Copyright 2015 iHealth Technologies * * 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/lic...
hicolour/signal-collect
src/multi-jvm/scala/com.signalcollect/ClusterPageRankSpec.scala
Scala
apache-2.0
9,590
package org.ergoplatform.settings import org.ergoplatform.ErgoScriptPredef import org.ergoplatform.mining.emission.EmissionRules import sigmastate.Values.ErgoTree /** * Configuration file for monetary settings of Ergo chain * * @see src/main/resources/application.conf for parameters description */ case class ...
ScorexFoundation/sigmastate-interpreter
sigmastate/src/main/scala/org/ergoplatform/settings/MonetarySettings.scala
Scala
mit
1,079
package com.evojam.mongodb.evolutions.model.evolution import scala.util.control.Exception.catching import play.api.libs.json._ object State extends Enumeration { type State = Value val Applied, ApplyingUp, ApplyingDown = Value def unapply(in: String) = catching(classOf[NoSuchElementException]) .opt...
evojam/mongodb-evolutions-scala
src/main/scala/com/evojam/mongodb/evolutions/model/evolution/State.scala
Scala
apache-2.0
714
package org.jetbrains.plugins.scala.debugger.evaluateExpression import org.jetbrains.plugins.scala.debugger.{ScalaDebuggerTestCase, ScalaVersion_2_11, ScalaVersion_2_12_M2} /** * User: Alexander Podkhalyuzin * Date: 14.11.11 */ class NewTemplateEvaluationTest extends NewTemplateEvaluationTestBase with ScalaVersio...
LPTK/intellij-scala
test/org/jetbrains/plugins/scala/debugger/evaluateExpression/NewTemplateEvaluationTest.scala
Scala
apache-2.0
1,866
/*********************************************************************** * Copyright (c) 2013-2017 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...
ronq/geomesa
geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geohash/BoundingBoxSampler.scala
Scala
apache-2.0
2,160
package antonkulaga.projects.expressions import org.denigma.binding.binders.Events import org.denigma.binding.extensions._ import org.denigma.binding.views.BindableView import org.scalajs.dom import org.scalajs.dom._ import org.scalajs.dom.html.Input import org.scalajs.dom.raw.{FileList, FileReader} import rx.core.Var...
antonkulaga/personal
app/js/src/main/scala/antonkulaga/projects/expressions/ExpressionsView.scala
Scala
mpl-2.0
2,028
/* * 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 ...
manuzhang/incubator-gearpump
streaming/src/test/scala/org/apache/gearpump/streaming/state/impl/InMemoryCheckpointStoreSpec.scala
Scala
apache-2.0
1,540
package tu.host.console import tu.coreservice.annotator.KBAnnotatorImpl import tu.model.knowledge.communication.{TrainingRequest, Request} import tu.model.knowledge.primitive.KnowledgeString import tu.model.knowledge.{Constant, KnowledgeURI} import tu.coreservice.thinkinglifecycle.ThinkingLifeCycleMinimal import tu.da...
keskival/2
host.console/src/main/scala/tu/App.scala
Scala
gpl-3.0
3,024
package com.dys.chatwork4s import com.dys.chatwork4s.beans.rooms.RoomInfoWithoutDescription import com.dys.chatwork4s.beans.users.{Contact, IncomingRequest, Me} import com.dys.chatwork4s.beans.{MyStatus, RoomId, Task} import com.dys.chatwork4s.http.HttpMethod import com.dys.chatwork4s.http.parameters.{CreateRoom, GetT...
kado-yasuyuki/chatwork4s
src/main/scala/com/dys/chatwork4s/ChatWork.scala
Scala
apache-2.0
2,976
/************************************************************************\\ ** Project ____ __ __ __ ____ ______ ** ** / __/ / / / / / / / __/ / __ / (c) 2013 ** ** / /_ / / / / / / / /_ / /_/ / ** ** / __/ / / ...
dusank/euler
src/main/scala/Euler038.scala
Scala
bsd-2-clause
1,535
package xitrum.routing private object IgnoredPackages { /** * @param relPath "/" separated path to the .class file that may contain * Xitrum routes * * @return true for those (java/..., javax/... etc.) that should be ignored * because they obviously don't contain Xitrum routes, to speed up the * sc...
caiiiycuk/xitrum
src/main/scala/xitrum/routing/IgnoredPackages.scala
Scala
mit
2,347
package com.twitter.benchmark import com.twitter.finagle.httpx.Request import com.twitter.finatra.http.routing.HttpRouter import com.twitter.finatra.http.{Controller, HttpServer} object FinatraBenchmarkServerMain extends FinatraBenchmarkServer class FinatraBenchmarkServer extends HttpServer { override def configur...
deanh/finatra
examples/benchmark-server/src/main/scala/com/twitter/benchmark/FinatraBenchmarkServer.scala
Scala
apache-2.0
765
package com.larroy.milight object CommandCode extends Enumeration { type Enum = Value /** * The command code for "RGBW COLOR LED ALL OFF". */ var ALL_OFF = Value(0x41) /** * The command code for "GROUP 1 ALL OFF". */ val GROUP_1_OFF = Value(0x46) /** * The command code for "GROUP 2 ALL OFF". */...
larroy/milight
src/main/scala/com/larroy/milight/CommandCode.scala
Scala
apache-2.0
2,566
/** * Copyright (C) 2015 Matt Christiansen ([email protected]) * * 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...
nikore/gozer
config/src/main/scala/net/nikore/gozer/config/ConfigFileModule.scala
Scala
apache-2.0
999
package com.datayumyum.helloPOS import java.net.URL import org.json._ import scala.io.Source case class Store(uuid: String, name: String, address: Address, phone: String, url: String, catalog: Map[String, List[Product]]) { override def toString(): String = { name + "\\n" + address.toString() + "\\n" + phone +...
sonwh98/helloPOS
src/main/scala/com/datayumyum/helloPOS/Store.scala
Scala
gpl-2.0
3,035
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-kudu/geomesa-kudu-tools/src/main/scala/org/locationtech/geomesa/kudu/tools/stats/KuduStatsCountCommand.scala
Scala
apache-2.0
1,424
package org.ensime.indexer import org.scalatest._ class MemberNameSpec extends WordSpec with Matchers { "MemberName" should { "remove \\"package\\" from FQNs" in { MemberName(ClassName(PackageName(List("org", "example")), "package"), "member").fqnString shouldBe "org.example.member" MemberName(Class...
jacobono/ensime-server
core/src/test/scala/org/ensime/indexer/MethodNameSpec.scala
Scala
gpl-3.0
435
/* * 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 ...
SHASHANKB/spark
mllib/src/main/scala/org/apache/spark/ml/feature/Word2Vec.scala
Scala
apache-2.0
14,779
def cleanPath(s:String) = { var r = s while(r.exists(_=='/')) { r = r.dropWhile(_!='/').drop(1) } r } def lineSplit(s:String) = { s.map(x => if (x.isLetterOrDigit) x else ' ') .split(" ").filter(!_.isEmpty) } def indexExample(inputPath:String, outputPath:String) = { var r = sc.wholeTextFiles(in...
gorkinovich/SGDI
Spark/ejemplos/Index2.scala
Scala
mit
867
/* * 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/storage/StorageStatusListenerSuite.scala
Scala
apache-2.0
8,709
package infra.piece.image import infra.piece.core.Piece /** * @author alari ([email protected]) * @since 08.05.14 13:40 */ case class ImagePiece(title: Option[String], filename: String, sizes: Map[String, ImageSize], fileIds: Seq[String], ...
alari/play-content
module-code/app/infra/piece/image/ImagePiece.scala
Scala
mit
435
package com.twitter.finagle.redis.integration import com.twitter.finagle.redis.ClientError import com.twitter.finagle.redis.RedisClientTest import com.twitter.finagle.redis.tags.{ClientTest, RedisTest} import com.twitter.io.Buf import com.twitter.util.Await import org.junit.Ignore import org.junit.runner.RunWith impor...
adriancole/finagle
finagle-redis/src/test/scala/com/twitter/finagle/redis/commands/set/SetClientIntegrationSuite.scala
Scala
apache-2.0
6,984
/** * Copyright (C) 2009-2011 the original author or authors. * See the notice.md 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. * Yo...
maslovalex/scalate
scalate-core/src/main/scala/org/fusesource/scalate/RenderContext.scala
Scala
apache-2.0
16,913
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/amls-frontend
app/controllers/supervision/SupervisionStartController.scala
Scala
apache-2.0
4,576
package com.owlandrews.nescala trait Filter { def Step(x:Int):Int } // First order filters are defined by the following parameters. // y[n] = B0*x[n] + B1*x[n-1] - A1*y[n-1] case class FirstOrderFilter(B0:Float, B1:Float, A1:Float) extends Filter { private var prevX = 0F private var prevY = 0F def Step(x:Int)...
hywelandrews/nescala
src/main/scala/com/owlandrews/nescala/Filter.scala
Scala
gpl-2.0
1,534
package dbx.api import java.sql.Connection import javax.inject.{Inject, Singleton} import com.google.inject.{AbstractModule, Provider, TypeLiteral} import dbx.api.Transactional.{TransactionSettings, TransactionSettingsBuilder} import dbx.jdbc.{DataSourceTransactionManager, DataSourceUtils} import dbx.transaction.Plat...
lingcreative/play-dbx
src/main/scala/dbx/api/SimpleModule.scala
Scala
apache-2.0
4,308
package ch08 /* * 1. Extend the following BankAccount class to a CheckingAccount * class that charges $1 for every deposit and withdrawal. * * class BankAccount(initialBalance: Double) { * private var balance = initialBalance * def deposit(amount: Double) = { balance += amount; balance } * def withdraw(am...
tuxdna/scala-for-the-impatient-exercises
src/main/scala/ch08/ex01.scala
Scala
apache-2.0
953
package net.sansa_stack.rdf.common.partition.layout import scala.reflect.runtime.universe.{Type, typeOf} import org.apache.jena.graph.Triple import net.sansa_stack.rdf.common.partition.core.RdfPartitionerDefault import net.sansa_stack.rdf.common.partition.schema.SchemaStringDecimal object TripleLayoutDecimal ext...
SANSA-Stack/SANSA-RDF
sansa-rdf/sansa-rdf-common/src/main/scala/net/sansa_stack/rdf/common/partition/layout/TripleLayoutDecimal.scala
Scala
apache-2.0
1,183
package figures.oop abstract class Figure { def area: Double // Adding a new operation is hard: def circumference: Double }
zstoychev/fp-in-scala-presentation
examples/figures/oop/Figure.scala
Scala
mit
132
/* * Copyright 2010-2011 Vilius Normantas <[email protected]> * * This file is part of Crossbow library. * * Crossbow 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 ...
ViliusN/Crossbow
crossbow-ib/src/lt/norma/crossbow/ib/IbListener.scala
Scala
gpl-3.0
4,180
package es.uvigo.ei.sing.biomsef.entity import play.api.libs.json._ import org.scalacheck.Gen import es.uvigo.ei.sing.biomsef.BaseSpec import es.uvigo.ei.sing.biomsef.entity.Generators._ class SearchResultSpec extends BaseSpec { private[this] lazy val searchResultGenerator = searchResultTupleGenerator map Searc...
agjacome/biomsef
src/test/scala/entity/SearchResultSpec.scala
Scala
mit
1,317
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
jooooooon/rudder
rudder-core/src/main/scala/com/normation/rudder/repository/xml/GitParseConfigurationRules.scala
Scala
agpl-3.0
4,047
package config import play.api.Play.current import play.api.libs.concurrent.Akka import scala.concurrent.ExecutionContext trait ControllerDefaults { implicit val executionContext: ExecutionContext = Akka.system.dispatchers.defaultGlobalDispatcher }
betygen/api
app/config/ControllerDefaults.scala
Scala
mit
257
package lila.evalCache import chess.variant.Variant import play.api.libs.json._ import chess.format.FEN import lila.socket._ import lila.user.User final private class EvalCacheSocketHandler( api: EvalCacheApi, truster: EvalCacheTruster, upgrade: EvalCacheUpgrade )(implicit ec: scala.concurrent.ExecutionC...
luanlv/lila
modules/evalCache/src/main/EvalCacheSocketHandler.scala
Scala
mit
1,191
/* * 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...
dotty-staging/scalatest
examples/src/test/scala/org/scalatest/examples/wordspec/oneargtest/ExampleSpec.scala
Scala
apache-2.0
1,487
/* * 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 agree...
travisbrown/scalatest
src/main/scala/org/scalatest/matchers/HavePropertyMatcher.scala
Scala
apache-2.0
8,384
/* * Copyright (C) 2017 HAT Data Exchange Ltd * SPDX-License-Identifier: AGPL-3.0 * * This file is part of the Hub of All Things project (HAT). * * HAT 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 Founda...
Hub-of-all-Things/HAT2.0
hat/app/org/hatdex/hat/she/service/FunctionService.scala
Scala
agpl-3.0
11,556
package com.cloudray.scalapress.plugin.url.friendlyurl import org.scalatest.{OneInstancePerTest, FunSuite} import org.scalatest.mock.MockitoSugar import com.cloudray.scalapress.item.Item import com.cloudray.scalapress.folder.Folder import com.cloudray.scalapress.util.UrlGenerator /** @author Stephen Samuel */ class F...
vidyacraghav/scalapress
src/test/scala/com/cloudray/scalapress/plugin/url/friendlyurl/FriendlyUrlGeneratorTest.scala
Scala
apache-2.0
791