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 |
|---|---|---|---|---|---|
/* __ *\\
** ________ ___ / / ___ __ ____ Scala.js Benchmarks **
** / __/ __// _ | / / / _ | __ / // __/ Adam Burmister **
** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ 2012, Google, Inc **
** /____/\\___/... | jonas/scala-js-benchmarks | tracer/src/main/scala/org/scalajs/benchmark/tracer/Shapes.scala | Scala | bsd-3-clause | 3,060 |
package blended.updater.remote
import java.io.File
import scala.util.Try
import blended.updater.config.{ ConfigWriter, OverlayConfig, OverlayConfigCompanion }
import blended.util.logging.Logger
import com.typesafe.config.ConfigFactory
class FileSystemOverlayConfigPersistor(storageDir: File) extends OverlayConfigPer... | lefou/blended | blended.updater.remote/src/main/scala/blended/updater/remote/FileSystemOverlayConfigPersistor.scala | Scala | apache-2.0 | 2,274 |
package vu.elements.of.style
/**
* @author v.uspenskiy
* @since 25/06/15
*/
object b$expression {
// It is easy to mistake a sequence of overly-simple expressions for profundity:
def aSophisticatedLargest(a: Int, b: Int, c: Int) = {
var large: Int = 0
if(a > b) {
large = a
} else {
... | vuspenskiy/programming-style | src/vu/elements/of/style/b$expression.scala | Scala | mit | 16,270 |
package es.codemotion.akkaships.client
import java.io.File
import javax.sound.midi.{Sequencer, MidiSystem}
import akka.actor._
import akka.cluster.Cluster
import akka.cluster.ClusterEvent._
import es.codemotion.akkaships.client.SceneRenderer.{Fire, HideCursor, MoveCursor}
import es.codemotion.akkaships.common.domain.... | jjlopezm/Akkaships-Exercise | Client/src/main/scala/es/codemotion/akkaships/client/PlayerActor.scala | Scala | apache-2.0 | 2,953 |
/*
* Copyright 2012 Sanjin Sehic
*
* 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... | tuwiendsg/CAPA | core/src/scala/util/SLF4JLogging.scala | Scala | apache-2.0 | 2,036 |
package org.akoshterek.backgammon.agent
import org.akoshterek.backgammon.agent.gnubg.GnubgAgent
import org.akoshterek.backgammon.agent.pubeval.PubEvalAgent
import org.akoshterek.backgammon.agent.raw.{RawBatch, RawRl40, RawTd40}
import org.akoshterek.backgammon.eval.Evaluator
object AgentFactory {
def createAgent(fu... | akoshterek/MultiGammonJava | multi-gammon-core/src/main/java/org/akoshterek/backgammon/agent/AgentFactory.scala | Scala | gpl-3.0 | 1,086 |
/*
* Licensed to Intel Corporation under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* Intel Corporation licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use t... | SeaOfOcean/BigDL | dl/src/main/scala/com/intel/analytics/bigdl/optim/Optimizer.scala | Scala | apache-2.0 | 6,466 |
package models
import play.api.db.slick.Config.driver.simple._
import scala.slick.lifted.Tag
case class Assesment(id: Option[Long], studentId: Long, startDate: Long, endDate: Option[Long])
case class AssesmentWithQuestionsAndScores(id: Long, startDate: Long, endDate: Option[Long])
class Assesments(tag: Tag) extends... | silbermm/proximal | app/models/Assessment.scala | Scala | apache-2.0 | 1,173 |
/*
* Copyright 2014 Treode, 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... | Treode/store | cluster/src/com/treode/cluster/package.scala | Scala | apache-2.0 | 2,631 |
// Copyright (c) 2013-2020 Rob Norris and Contributors
// This software is licensed under the MIT License (MIT).
// For more information see LICENSE or https://opensource.org/licenses/MIT
package doobie.util.meta
import doobie.enumerated.JdbcType._
import Predef._
trait TimeMeta {
@deprecated("Use doobie.implicit... | tpolecat/doobie | modules/core/src/main/scala/doobie/util/meta/timemeta.scala | Scala | mit | 3,242 |
package com.wuyuntao.aeneas
import java.util.UUID
abstract trait Snapshot {
val owner: UUID
val revision: Int
} | wuyuntao/Aeneas | aeneas-core/src/main/scala/com/wuyuntao/aeneas/Snapshot.scala | Scala | apache-2.0 | 117 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | gioenn/xSpark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/misc.scala | Scala | apache-2.0 | 21,433 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | apache/samza | samza-core/src/test/scala/org/apache/samza/system/TestSystemConsumers.scala | Scala | apache-2.0 | 21,444 |
/*
package dao
import java.util.UUID
import database._
import models.{ReportCardRescheduledAtom, ReportCardRescheduledLike}
import org.joda.time.{LocalDate, LocalTime}
import play.api.inject.guice.GuiceableModule
import slick.dbio.DBIO
import slick.jdbc.PostgresProfile.api._
import slick.lifted.TableQuery
import util... | THK-ADV/lwm-reloaded | test/dao/ReportCardRescheduledDaoSpec.scala | Scala | mit | 2,811 |
import sbt._
import sbt.{Project, Build}
import sbt.Keys._
object OurBuild extends Build {
override lazy val settings = super.settings ++ Seq(
scalaVersion := "2.10.4",
organization := "org.wennergr",
version := "1-SNAPSHOT"
)
lazy val stensionLibrary: Project = Project(
id = "stensions... | wennergr/stensions | project/OurBuild.scala | Scala | apache-2.0 | 464 |
/**
* The MIT License (MIT)
* <p/>
* Copyright (c) 2016 ScalateKids
* <p/>
* 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 ... | ScalateKids/Actorbase-Client | src/main/scala/com/actorbase/driver/exceptions/Exceptions.scala | Scala | mit | 2,106 |
package de.tudarmstadt.lt.flinkdt.pipes
import de.tudarmstadt.lt.flinkdt.tasks.DSTaskConfig
import java.text.SimpleDateFormat
import java.util.Date
import org.apache.flink.api.scala._
import java.time.Duration
import de.tudarmstadt.lt.flinkdt.types.CT2
import scala.reflect.ClassTag
import org.apache.flink.api.common.t... | remstef/flinkfun | src/main/scala/de/tudarmstadt/lt/flinkdt/pipes/MCL.scala | Scala | apache-2.0 | 9,399 |
/* __ *\\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ | http://www.scala-lang.org/ **
** /____/\\___/_/... | felixmulder/scala | src/library/scala/collection/mutable/HashTable.scala | Scala | bsd-3-clause | 15,799 |
package src.main.scala.db
/*
* object: DbSchemaStop
*
* The record schema of a single bus "stop" in the "stops.txt" CSV file in
* the General Transit Feed Specification (GTFS)
*/
case class DbSchemaStop(stopId: String, stopName: String,
stopLatitude: Double, stopLongitude: Double)
/*
* ... | je-nunez/urban_planning_on_gtfs_traffic_congestion | src/main/scala/db/DbSchemaStop.scala | Scala | gpl-2.0 | 536 |
/**
* 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... | nruppin/CM-Well | server/cmwell-data-tools/src/main/scala/cmwell/tools/data/downloader/streams/Downloader.scala | Scala | apache-2.0 | 18,375 |
package incognito.anonymization.buckets
import org.apache.spark.broadcast.Broadcast
import org.apache.spark.rdd.RDD
import org.apache.spark.Accumulable
import incognito.rdd.SATuple
import scala.collection.Map
import incognito.rdd.Data
/**
* @author Antorweep Chakravorty
* @constructor a constructor to create bucket... | achak1987/SparkAnonymizationToolkit | src/main/scala/incognito/anonymization/buckets/Buckets.scala | Scala | apache-2.0 | 1,138 |
package com.shorrockin.cascal.serialization
import scala.language.existentials
import java.nio.ByteBuffer
import reflect.Manifest
import java.lang.annotation.Annotation
import java.lang.reflect.{Field, Method}
import java.util.{Date, UUID}
import annotations.{Columns, Optional}
import annotations.{Key => AKey... | Shimi/cascal | src/main/scala/com/shorrockin/cascal/serialization/Converter.scala | Scala | apache-2.0 | 15,049 |
package vggames.scala.specs.valvar
import vggames.scala.specs.GameSpecification
import vggames.scala.code.RestrictedFunction0
import vggames.scala.specs.TestRun
class DefineVarString extends GameSpecification[RestrictedFunction0[String]] {
def runSignature = ":String"
def extendsType = "RestrictedFunction0[Stri... | vidageek/games | games/scala/src/main/scala/vggames/scala/specs/valvar/DefineVarString.scala | Scala | gpl-3.0 | 688 |
package net.sansa_stack.query.spark.graph.jena.serialization
/**
* Serializers for the sansa query layer
*
*/
object JenaKryoSerializers {
// No common query layer specific serializers so far
// This is the place to add them in when the need arises
}
| SANSA-Stack/SANSA-RDF | sansa-query/sansa-query-spark/src/main/scala/net/sansa_stack/query/spark/graph/jena/serialization/JenaKryoSerializers.scala | Scala | apache-2.0 | 261 |
/*
* This file is part of Kiama.
*
* Copyright (C) 2008-2013 Anthony M Sloane, Macquarie University.
*
* Kiama 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 ... | matachi/rangeFix | lib/kiama_2.9.2-1.4.0-sources/org/kiama/rewriting/Rewriter.scala | Scala | mit | 58,825 |
/*
* ReverseWindow.scala
* (FScape)
*
* Copyright (c) 2001-2022 Hanns Holger Rutz. All rights reserved.
*
* This software is published under the GNU Affero General Public License v3+
*
*
* For further information, please contact Hanns Holger Rutz at
* contact@sciss.de
*/
package de.sciss.fscape
packag... | Sciss/FScape-next | core/shared/src/main/scala/de/sciss/fscape/stream/ReverseWindow.scala | Scala | agpl-3.0 | 3,732 |
package org.jetbrains.plugins.scala.testingSupport.scalatest.scala2_11.scalatest3_0_1
import org.jetbrains.plugins.scala.SlowTests
import org.jetbrains.plugins.scala.testingSupport.scalatest.ScalaTestWholeSuiteTest
import org.junit.experimental.categories.Category
/**
* @author Roman.Shein
* @since 10.03.2017
*/
@... | triplequote/intellij-scala | scala/scala-impl/test/org/jetbrains/plugins/scala/testingSupport/scalatest/scala2_11/scalatest3_0_1/Scalatest2_11_3_0_1_WholeSuiteTest.scala | Scala | apache-2.0 | 459 |
package com.twitter.finagle.http.filter
import com.twitter.finagle.Service
import com.twitter.finagle.http.{Request, Response, Status}
import com.twitter.util.{Await, Future, Duration}
import org.jboss.netty.handler.codec.http.HttpMethod
import org.junit.runner.RunWith
import org.scalatest.FlatSpec
import org.scalates... | travisbrown/finagle | finagle-http/src/test/scala/com/twitter/finagle/http/filter/CorsTest.scala | Scala | apache-2.0 | 4,302 |
package com.dretta
import com.datastax.spark.connector._
import _root_.kafka.serializer.StringDecoder
import java.util.Properties
import com.dretta.kafka.StockProducer
import org.apache.spark.streaming.dstream.DStream
import org.apache.spark.streaming.kafka._
import org.apache.spark.streaming.{Seconds, StreamingContex... | dretta/StockStats | src/main/scala/com/dretta/StockStats.scala | Scala | agpl-3.0 | 2,510 |
package com.github.tanacasino.nnp
import java.util
import collection.JavaConverters._
trait NNP10 {
// P01 (*) Find the last element of a list.
def last(list: List[Int]): Int = {
list.last
}
@scala.annotation.tailrec
final def last1(list: List[Int]): Int = {
list match {
case Nil => throw ne... | tanacasino/learning-scala | src/main/scala/com/github/tanacasino/nnp/NNP10.scala | Scala | mit | 6,474 |
/*
* 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 ... | GJL/flink | flink-examples/flink-examples-batch/src/main/scala/org/apache/flink/examples/scala/relational/TPCHQuery10.scala | Scala | apache-2.0 | 6,654 |
package com.typesafe.sbt.packager.windows
// TODO find a better name and add documentation
object NameHelper {
def makeEnvFriendlyName(name: String): String = name.toUpperCase.replaceAll("\\\\W", "_")
}
| fsat/sbt-native-packager | src/main/scala/com/typesafe/sbt/packager/windows/NameHelper.scala | Scala | bsd-2-clause | 205 |
import org.apache.spark.sql._
import org.apache.spark.sql.types._
import org.apache.spark.sql.functions.udf
import org.apache.spark.sql.functions.{array, lit, map, struct}
import org.apache.spark.sql.expressions.Window
import org.apache.spark.storage.StorageLevel._
// Constants
val dataFilePath = "/home/vagrant/data/l... | decates/spark-sandbox | scripts/loadData.scala | Scala | apache-2.0 | 5,514 |
//
// Copyright (c) 2014 Mirko Nasato
//
// 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... | mirkonasato/jersik | java/jersik-java-codegen/src/main/scala/io/encoded/jersik/java/codegen/JavaService.scala | Scala | apache-2.0 | 1,230 |
package net.revenj
import java.time.OffsetDateTime
import net.revenj.patterns.DomainEvent
class TestMe extends DomainEvent {
override def queuedAt: OffsetDateTime = ???
override def URI: String = ???
}
| ngs-doo/revenj | scala/revenj-core/src/test/scala/net/revenj/TestMe.scala | Scala | bsd-3-clause | 210 |
/*
* 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 ... | shaoxuan-wang/flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/descriptors/LiteralValueValidator.scala | Scala | apache-2.0 | 5,159 |
/**
* ____ __ ____ ____ ____,,___ ____ __ __ ____
* ( _ \\ /__\\ (_ )(_ _)( ___)/ __) ( _ \\( )( )( _ \\ Read
* ) / /(__)\\ / /_ _)(_ )__) \\__ \\ )___/ )(__)( ) _ < README.txt
* (_)\\_)(__)(__)(____)(____)(____)(___/ (__) (______)(____/ LICENSE.txt
**/
... | razie/diesel-rx | diesel/src/main/scala/razie/wiki/parser/WikiInlineScriptParser.scala | Scala | apache-2.0 | 1,939 |
/*
* 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
* distribute... | wvlet/airframe | airframe-http-grpc/src/test/scala/wvlet/airframe/http/grpc/GrpcTest.scala | Scala | apache-2.0 | 3,634 |
/*
* 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 | scalatest-test/src/test/scala/org/scalatest/TypeCheckedAssertionsSpec.scala | Scala | apache-2.0 | 9,609 |
object MontyHall {
import probability.Probability._
sealed abstract class Door
object A extends Door { override def toString = "A" }
object B extends Door { override def toString = "B" }
object C extends Door { override def toString = "C" }
sealed abstract class Winning
object Looser exte... | urso/scala_mprob | examples/MontyHall.scala | Scala | bsd-3-clause | 1,551 |
package latis.util
import org.junit.After
import org.junit.Assert._
import org.junit.Test
import latis.dm.Dataset
import latis.dm.Function
import latis.dm.Index
import latis.dm.Sample
import latis.dm.Text
import latis.dm.TupleMatch
class TestCapabilities {
/**
* Cause the reload of properties before each test... | dlindhol/LaTiS | src/test/scala/latis/util/TestCapabilities.scala | Scala | epl-1.0 | 1,682 |
package com.softwaremill.play24
import _root_.controllers.Assets
import akka.actor.ActorSystem
import com.softwaremill.play24.dao.{SupplierDao, CoffeeDao}
import com.softwaremill.play24.modules.{DatabaseModule, ControllerModule, DaoModule}
import play.api.ApplicationLoader.Context
import play.api._
import play.api.lib... | numesmat/macwire | examples/play24/app/com/softwaremill/play24/AppApplicationLoader.scala | Scala | apache-2.0 | 1,367 |
/*
* 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-java-driver | bson-scala/src/main/scala-2.13-/org/mongodb/scala/bson/collection/immutable/Document.scala | Scala | apache-2.0 | 5,133 |
package is.hail.types.physical
import is.hail.annotations._
import is.hail.asm4s.{Code, _}
import is.hail.expr.ir.EmitCodeBuilder
import is.hail.types.physical.stypes.primitives.{SFloat64, SFloat64Value}
import is.hail.types.physical.stypes.{SType, SValue}
import is.hail.types.virtual.TFloat64
case object PFloat64Opt... | hail-is/hail | hail/src/main/scala/is/hail/types/physical/PFloat64.scala | Scala | mit | 1,964 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | shenbaise/mltoy | src/main/scala/org/apache/spark/examples/sql/RDDRelation.scala | Scala | apache-2.0 | 3,410 |
/*
* Copyright 2009-2010 LinkedIn, 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 ... | linkedin/norbert | network/src/test/scala/com/linkedin/norbert/network/common/LocalMessageExecutionSpec.scala | Scala | apache-2.0 | 3,749 |
/*
* 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 ... | rezasafi/spark | core/src/test/scala/org/apache/spark/rdd/AsyncRDDActionsSuite.scala | Scala | apache-2.0 | 7,356 |
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
/** @author John Miller
* @version 1.2
* @date Mon May 25 17:57:02 EDT 2015
* @see LICENSE (MIT style license file).
*/
package scalation.linalgebra.bld
import java.io.{File, PrintWriter}
//::::::::::::::::::::::::::::::... | mvnural/scalation | src/main/scala/scalation/linalgebra/bld/BldMatrix.scala | Scala | mit | 66,249 |
/*
* Copyright 2015 Stephan Rehfeld
*
* 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 ... | stephan-rehfeld/scaladelray | src/test/scala/test/scaladelray/light/DirectionalLightSpec.scala | Scala | apache-2.0 | 3,159 |
package nest.sparkle.store.cassandra
import scala.collection.JavaConverters.asScalaBufferConverter
import scala.reflect.runtime.universe._
import scala.util.Try
import java.nio.ByteBuffer
import com.typesafe.config.Config
import spray.json.JsValue
import nest.sparkle.store.cassandra.serializers._
import nest.sparkle... | mighdoll/sparkle | store/src/main/scala/nest/sparkle/store/cassandra/RecoverCanSerialize.scala | Scala | apache-2.0 | 3,112 |
/*
* 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/main/scala/com/intel/analytics/bigdl/dllib/models/resnet/Utils.scala | Scala | apache-2.0 | 6,839 |
package vn.myfeed.parser.h2
import scala.slick.driver.H2Driver.simple._
/**
* The Class Db.
*
* @author Nguyen Duc Dung
* @since 7/1/13 7:15 AM
*
*/
object Db {
def database = Database.forURL("jdbc:h2:parser/test/resources/article", driver = "org.h2.Driver")
}
| SunriseSoftVN/hayhayblog | parser/app/vn/myfeed/parser/h2/Db.scala | Scala | gpl-2.0 | 272 |
/*
* A real-time collaborative tool to develop files over the network.
* Copyright (C) 2010 Mauro Ciancio and Leandro Gilioli
* {maurociancio,legilioli} at gmail dot com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Publi... | maurociancio/parallel-editor | src/parallel-editor-gui/src/main/scala/ar/noxit/paralleleditor/gui/NotificationEditPane.scala | Scala | gpl-3.0 | 2,085 |
package com.alexitc.coinalerts.services.external
import javax.inject.Inject
import com.alexitc.coinalerts.models.{Book, Currency, CurrencyName, Market}
import com.alexitc.coinalerts.tasks.models.Ticker
import org.slf4j.LoggerFactory
import play.api.libs.json.JsValue
import play.api.libs.ws.{WSClient, WSResponse}
imp... | AlexITC/crypto-coin-alerts | alerts-server/app/com/alexitc/coinalerts/services/external/CoinmarketcapService.scala | Scala | gpl-3.0 | 2,631 |
package models
/**
* Created by ismet on 06/12/15.
*/
case class Session(
_id: String,
userId: String,
ip: String,
userAgent: String,
timestamp: Long,
lastActivity: Long
)
obje... | TVilaboa/Egresados | app/models/Session.scala | Scala | gpl-3.0 | 418 |
/*
* Copyright (c) 2016, Team Mion
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIM... | teammion/tm-morefood | src/main/scala/io/teammion/morefood/proxy/CommonProxy.scala | Scala | isc | 3,144 |
package controllers
import play.api.mvc.Controller
import play.api.libs.json.Json
import play.api.mvc.Action
class Aggregate extends Controller {
def index = Action {
NotImplemented(Json.obj())
}
}
| DFID/aid-platform-beta | src/platform/app/controllers/Aggregate.scala | Scala | mit | 208 |
/*
* 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 | foundation/src/main/scala/quasar/fp/numeric/package.scala | Scala | apache-2.0 | 2,219 |
/*
* Copyright (c) 2013 Typelevel
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, ... | typelevel/discipline | core/src/test/scala/org/typelevel/discipline/LawSpec.scala | Scala | mit | 2,356 |
def f(a: Int, b: Int) = {}
println(/* offset: 4 */ f _) | ilinum/intellij-scala | testdata/resolve2/function/partial/AllToTwo.scala | Scala | apache-2.0 | 56 |
package admin.controllers
import play.api.mvc._
import jp.t2v.lab.play2.auth.AuthElement
import auth.AuthConfigImpl
import model.Administrator
/**
* The Class Home.
*
* @author Nguyen Duc Dung
* @since 1/7/14 12:34 PM
*
*/
object HomeCtr extends Controller with AuthElement with AuthConfigImpl with AdminTemplate... | dungvn3000/playstrap | admin/app/admin/controllers/HomeCtr.scala | Scala | apache-2.0 | 475 |
/* Copyright 2009-2021 EPFL, Lausanne */
package stainless
package genc
package ir
import PrimitiveTypes.{ PrimitiveType => PT, _ } // For desambiguation
import Literals._
import Operators._
import IRs._
final class StructInliner(val ctx: inox.Context) extends Transformer(RIR, SIR) with NoEnv {
import from._
pr... | epfl-lara/stainless | core/src/main/scala/stainless/genc/ir/StructInliner.scala | Scala | apache-2.0 | 1,390 |
/*******************************************************************************
Copyright (c) 2012-2014, S-Core, KAIST.
All rights reserved.
Use is subject to license terms.
This distribution may include materials developed by third parties.
***************************************************... | darkrsw/safe | src/main/scala/kr/ac/kaist/jsaf/analysis/typing/domain/ObjectValue.scala | Scala | bsd-3-clause | 2,860 |
package org.jetbrains.plugins.scala.annotator.createFromUsage
import com.intellij.codeInsight.template.{TemplateBuilderImpl, TemplateManager}
import com.intellij.codeInsight.{CodeInsightUtilCore, FileModificationService}
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.project.Project
import com.i... | katejim/intellij-scala | src/org/jetbrains/plugins/scala/annotator/createFromUsage/CreateEntityQuickFix.scala | Scala | apache-2.0 | 9,924 |
package org.vlinderlang.vlinderc
sealed abstract class DiagnosticKind
case object Warning extends DiagnosticKind
case object Error extends DiagnosticKind
trait Diagnostic {
def kind: DiagnosticKind
def message: String
final def format: String = {
val kindString = kind match {
case Warning... | mill-lang/millc | src/main/scala/org/vlinderlang/vlinderc/diagnostic.scala | Scala | bsd-3-clause | 411 |
package com.socrata.http.server.util.filters
import javax.servlet.http.{HttpServletRequestWrapper, HttpServletRequest}
import InputByteCountingFilter._
import com.socrata.http.server.HttpRequest.AugmentedHttpServletRequest
import io.Codec
import javax.servlet.ServletInputStream
import java.io._
import com.socrata.htt... | socrata-platform/socrata-http | socrata-http-server/src/main/scala/com/socrata/http/server/util/filters/InputByteCountingFilter.scala | Scala | apache-2.0 | 2,871 |
package domain.user
import domain.ValueObject
/**
* ユーザID.
* @param id ID値
*/
case class UserId(
id: Long
) extends ValueObject[UserId] {
override def sameValueAs(other: UserId): Boolean = this.id == other.id
}
| nemuzuka/vss-kanban | src/main/scala/domain/user/UserId.scala | Scala | mit | 230 |
/* __ *\\
** ________ ___ / / ___ __ ____ Scala.js Test Suite **
** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ **
** /____/\\___/... | japgolly/scala-js | test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/util/ArraysTest.scala | Scala | bsd-3-clause | 38,585 |
import scala.tools.partest.SessionTest
object Test extends SessionTest {
def session =
s"""|
|scala> :paste -raw $pastie
|Pasting file $pastie...
|$pastie:3: error: expected class or object definition
|val nope = 42
|^
|There were compilation errors!
|
|scala> :quit"""
def pastie =... | felixmulder/scala | test/files/run/repl-paste-raw-c.scala | Scala | bsd-3-clause | 357 |
package delta.util
import delta._
import delta.write._
import scala.concurrent.{ ExecutionContext, Future }
import scala.util.control.NonFatal
import scuff.concurrent.Threads.PiggyBack
/**
* [[delta.write.Repository]] wrapper for non-Event-source
* repositories, while still publishing events.
*/
abstract class... | nilskp/delta | src/main/scala/delta/util/PublishingRepository.scala | Scala | mit | 1,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 ... | bwsw/sj-platform | core/sj-common/src/main/scala/com/bwsw/common/jdbc/JdbcClientBuilder.scala | Scala | apache-2.0 | 3,804 |
/**
* Copyright 2013 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 agreed ... | jbripley/RxScala | src/main/scala/rx/lang/scala/schedulers/TestScheduler.scala | Scala | apache-2.0 | 2,529 |
package colossus.extensions.util.bson.reader
import java.nio.ByteBuffer
import scala.collection.mutable.ArrayBuffer
trait Reader[T] {
def buffer: ByteBuffer
def readCString(): String = readCString(new ArrayBuffer[Byte](16))
@scala.annotation.tailrec
private def readCString(array: ArrayBuffer[Byte]): Strin... | fehmicansaglam/colossus-extensions | mongo/src/main/scala/colossus/extensions/util/bson/reader/Reader.scala | Scala | apache-2.0 | 769 |
package com.twitter.server.lint
import com.twitter.finagle.Stack
import com.twitter.finagle.client.StackClient
import com.twitter.finagle.param.{Label, ProtocolLibrary}
import com.twitter.finagle.util.StackRegistry
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
@R... | BuoyantIO/twitter-server | src/test/scala/com/twitter/server/lint/StackRegistryDuplicatesRuleTest.scala | Scala | apache-2.0 | 2,647 |
/*
* 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 ... | oscarceballos/flink-1.3.2 | flink-tests/src/test/scala/org/apache/flink/api/scala/hadoop/mapreduce/WordCountMapreduceITCase.scala | Scala | apache-2.0 | 3,401 |
/**
* 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-recorder/src/main/scala/io/gatling/recorder/ui/swing/frame/ValidationHelper.scala | Scala | apache-2.0 | 2,982 |
/*
* 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 | core/src/main/scala/org/apache/spark/input/PortableDataStream.scala | Scala | apache-2.0 | 6,446 |
/*
* Copyright 2020 Precog Data
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | djspiewak/quasar | api/src/main/scala/quasar/api/push/ResultPushError.scala | Scala | apache-2.0 | 1,896 |
package com.evalonlabs.myinbox.model
import org.subethamail.smtp.MessageContext
import javax.mail.internet.MimeMessage
case class PersistMsgReq(ctx: MessageContext,
msg: Message[MimeMessage])
| epappas/myinbox | common/src/main/scala/com/evalonlabs/myinbox/model/PersistMsgReq.scala | Scala | mit | 218 |
package org.biancama.algorithms.sort
/**
* Created by massimo on 30/04/16.
*/
object QuickSort {
/**
* quicksort :: (Ord a) => [a] -> [a]
* quicksort [] = []
* quicksort (x:xs) =
* let smallerSorted = quicksort [a | a <- xs, a <= x]
* biggerSorted = quicksort [a | a <- xs, a > x]... | biancama/data-structures-scala | src/main/scala/org/biancama/algorithms/sort/QuickSort.scala | Scala | gpl-3.0 | 1,398 |
/*
* 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 ... | bdrillard/spark | sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/MiscBenchmark.scala | Scala | apache-2.0 | 6,231 |
/*
* 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 ... | bravo-zhang/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/types/NullType.scala | Scala | apache-2.0 | 1,556 |
/*
Copyright (c) 2016, Rice University
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2.... | agrippa/spark-swat | swat/src/main/scala/org/apache/spark/rdd/cl/DenseVectorNativeInputBuffers.scala | Scala | bsd-3-clause | 4,401 |
package org.jetbrains.plugins.scala
package lang
package completion3
import com.intellij.codeInsight.completion.CompletionType
import org.junit.Assert
class ScalaEndMarkerCompletionTest extends ScalaCodeInsightTestBase {
import ScalaCodeInsightTestBase._
override protected def supportedIn(version: ScalaVersion)... | JetBrains/intellij-scala | scala/scala-impl/test/org/jetbrains/plugins/scala/lang/completion3/ScalaEndMarkerCompletionTest.scala | Scala | apache-2.0 | 67,763 |
package cache
import models.BaseModel
import play.api.cache.CacheApi
import util.FutureOption
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
import scala.concurrent.duration.Duration
import scala.util.Success
/**
* Cache for all entities of a specific [[models.... | metaxmx/FridayNightBeer | modules/datamodel/src/main/scala/cache/BaseModelMapCache.scala | Scala | apache-2.0 | 3,688 |
package functionalProgramming.memoization
import org.scalatest.{FunSuite, WordSpecLike}
/**
* Created by yujieshui on 2017/2/2.
*/
class FibonacciTest extends WordSpecLike {
import Fibonacci._
"aa" in {
println(
solution(Seq(0,1,5,10,100))
)
}
}
| 1178615156/hackerrank | src/test/scala/functionalProgramming/memoization/FibonacciTest.scala | Scala | apache-2.0 | 274 |
package com.thoughtworks.deeplearning.plugins
/** A plugin that enables all other DeepLearning.scala built-in plugins.
*
* @example When creating a [[Builtins]] from [[com.thoughtworks.feature.Factory]],
*
* {{{
* import com.thoughtworks.feature.Factory
* val hyperparameters = Fa... | izhangzhihao/DeepLearning.scala | plugins-Builtins/src/main/scala-2.11/com/thoughtworks/deeplearning/plugins/Builtins.scala | Scala | apache-2.0 | 4,097 |
// EvaluationOrder.scala
val sunny = true
val hoursSleep = 6
val exercise = false
val temp = 55
val happy1 = sunny && temp > 50 ||
exercise && hoursSleep > 7
println(happy1) // true
val sameHappy1 = (sunny && temp > 50) || (exercise && hoursSleep > 7)
println(sameHappy1) // true
val notSame =
(sunny && temp > ... | 5x5x5x5/Back2Basics | atomicScala/EvaluationOrder.scala | Scala | unlicense | 381 |
package es.weso.rdf.turtle.parser
import org.scalatest.FunSpec
import com.typesafe.config._
import com.hp.hpl.jena.rdf.model.ModelFactory
import java.io.FileOutputStream
import java.io.FileInputStream
import scala.collection.JavaConverters._
import org.scalatest.Matchers
class RunTurtleW3cTestsSuite extends FunSpec w... | labra/turtleparser-with-combinators | turtleparser/jvm/src/test/scala/es/weso/rdf/turtle/parser/RunTurtleW3cTestsSuite.scala | Scala | lgpl-3.0 | 1,578 |
package postgresweb.components.items
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.prefix_<^._
import japgolly.scalajs.react.{ReactComponentB, _}
import postgresweb.css.CommonStyles
import postgresweb.models.{JSONQueryFilter, Table, JSONSchema, JSONQuery}
import postgresweb.services.{GlobalState,... | minettiandrea/postgres-web | src/main/scala/postgresweb/components/items/Tables.scala | Scala | apache-2.0 | 5,802 |
/*
* Copyright (C) 2013 Alcatel-Lucent.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* Licensed to you 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 cop... | molecule-labs/molecule | molecule-io/src/main/scala/molecule/io/IO.scala | Scala | apache-2.0 | 12,294 |
package argonaut
import scalaz._, Isomorphism._
import syntax.either._, std.string._, std.tuple._
case class DecodeResult[A](result: (String, CursorHistory) \\/ A) {
def fold[X](
failure: (String, CursorHistory) => X,
value: A => X
): X = result.fold({ case (m, h) => failure(m, h) }, value)
final def ... | etorreborre/argonaut | src/main/scala/argonaut/DecodeResult.scala | Scala | bsd-3-clause | 4,078 |
/**
* Copyright 2015 www.alaraph.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | maumorelli/alaraph | hackerrank/src/com/alaraph/hackerrank/jpbunnies/Solution.scala | Scala | apache-2.0 | 1,723 |
/*
* Copyright 2017 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... | pncampbell/ct-calculations | src/main/scala/uk/gov/hmrc/ct/computations/formats/package.scala | Scala | apache-2.0 | 17,112 |
package edu.umd.mith.hathi.api
import edu.umd.mith.util.DispatchUtils
import org.jboss.netty.util.Timer
import scala.concurrent.ExecutionContext
import scala.concurrent.duration._
/** Default basic configuration and properties for any API client.
*/
trait BasicClient extends DispatchUtils {
def backoffMaxRetries ... | umd-mith/hathi | core/src/main/scala/hathi/api/client.scala | Scala | apache-2.0 | 496 |
/*
* Copyright (c) 2013, Scodec
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions a... | scodec/scodec-bits | core/shared/src/main/scala/scodec/bits/Bases.scala | Scala | bsd-3-clause | 10,311 |
package org.jetbrains.plugins.scala.lang.completion3
import com.intellij.codeInsight.completion.CompletionType
import org.jetbrains.plugins.scala.codeInsight.ScalaCodeInsightTestBase
import org.jetbrains.plugins.scala.lang.completion.lookups.ScalaLookupItem
import org.jetbrains.plugins.scala.lang.formatting.settings.S... | double-y/translation-idea-plugin | test/org/jetbrains/plugins/scala/lang/completion3/ScalaClassNameCompletionTest.scala | Scala | apache-2.0 | 8,082 |
package metabrowse
import scala.concurrent.ExecutionContext.Implicits.global
import scala.scalajs.js
import monaco.CancellationToken
import monaco.editor.ITextModel
import monaco.languages.DocumentSymbolProvider
import monaco.languages.SymbolInformation
import monaco.languages.SymbolKind
import scala.meta.internal.{se... | scalameta/metadoc | metabrowse-js/src/main/scala/metabrowse/ScalaDocumentSymbolProvider.scala | Scala | apache-2.0 | 2,616 |
/**
* Swaggy Jenkins
* Jenkins API clients generated from Swagger / Open API specification
*
* The version of the OpenAPI document: 1.1.2-pre.0
* Contact: blah@cliffano.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not ed... | cliffano/swaggy-jenkins | clients/scala-sttp/generated/src/main/scala/org/openapitools/client/api/BlueOceanApi.scala | Scala | mit | 36,503 |
package spire.math
import spire.algebra.{IsIntegral, Order, Rig, Signed}
object UByte extends UByteInstances {
@inline final def apply(n: Byte) = new UByte(n)
@inline final def apply(n: Int) = new UByte(n.toByte)
@inline final def MinValue = UByte(0)
@inline final def MaxValue = UByte(-1)
}
class UByte(val ... | lrytz/spire | core/src/main/scala/spire/math/UByte.scala | Scala | mit | 4,968 |
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.