_id
stringlengths
64
64
repository
stringlengths
6
84
name
stringlengths
4
110
content
stringlengths
0
248k
license
null
download_url
stringlengths
89
454
language
stringclasses
7 values
comments
stringlengths
0
74.6k
code
stringlengths
0
248k
58a535a326d722bd1daa24079188c2d2ef886ca93523cc5d494bc0b4a600aab9
PacktWorkshops/The-Clojure-Workshop
repl.clj
(in-ns 'garden) (def vegetables ["cucumber" "carrot"]) (def fruits ["orange" "apple" "melon"]) (in-ns 'shops) (clojure.core/refer 'garden :rename '{fruits owoce}) (clojure.core/refer 'clojure.test :only '(are deftest is run-tests)) (clojure.core/refer 'clojure.core) (deftest vegetables-test (is (= veget...
null
https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter08/tests/Exercise8.06/repl.clj
clojure
(in-ns 'garden) (def vegetables ["cucumber" "carrot"]) (def fruits ["orange" "apple" "melon"]) (in-ns 'shops) (clojure.core/refer 'garden :rename '{fruits owoce}) (clojure.core/refer 'clojure.test :only '(are deftest is run-tests)) (clojure.core/refer 'clojure.core) (deftest vegetables-test (is (= veget...
faaca021c91da43bff951e9fad165bf865d8b71084aa4494280c79c061dab367
ruhler/smten
Name.hs
module Smten.Plugin.Name ( nameCG, qnameCG, tynameCG, qtynameCG, guardnmCG, qguardnmCG, fieldnmCG, qfieldnmCG, nullnmCG, qnullnmCG, connmCG, qconnmCG, denewtynmCG, qdenewtynmCG, qislitnmCG, ) where import Data.Char import Data.Functor import GhcPlugins import Smten.Plugin.CG impor...
null
https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten/Smten/Plugin/Name.hs
haskell
dename ty nm Extract the module name, occurence name, and unique name for the given name. ty - true if this is a type constructor name. nm - the name. For class instances, symbol names are generated with the type embedded. to auto-derive the class instances by auto-deriving for the unwired counterpart. b...
module Smten.Plugin.Name ( nameCG, qnameCG, tynameCG, qtynameCG, guardnmCG, qguardnmCG, fieldnmCG, qfieldnmCG, nullnmCG, qnullnmCG, connmCG, qconnmCG, denewtynmCG, qdenewtynmCG, qislitnmCG, ) where import Data.Char import Data.Functor import GhcPlugins import Smten.Plugin.CG impor...
bcf586ba77a51eeb55aca3ca57eee9f62ee6d4357ea8de1d42ba74859021f724
ruricolist/serapeum
vectors.lisp
(in-package #:serapeum) (defsubst ensure-vector (x) "If X is a vector, return it. Otherwise, return a vector with X as its sole element." (if (vectorp x) x (vector x))) (-> vect (&rest t) (vector t *)) (defun vect (&rest initial-contents) "Succinct constructor for adjustable vectors with fill pointers. ...
null
https://raw.githubusercontent.com/ruricolist/serapeum/712cc0fdf5cca9ae2bc82e086f3ee609f99e8d78/vectors.lisp
lisp
different file. that could result in junk in the vector; see issue see array-tran.lisp . This differs from the default Trivia `vector' pattern in that it works for adjustable vectors with fill pointers. We don't have to worry about evaluation order. Ensure LEN
(in-package #:serapeum) (defsubst ensure-vector (x) "If X is a vector, return it. Otherwise, return a vector with X as its sole element." (if (vectorp x) x (vector x))) (-> vect (&rest t) (vector t *)) (defun vect (&rest initial-contents) "Succinct constructor for adjustable vectors with fill pointers. ...
a34c268d3e7161d8110f8c4f3c0fe328b9638a95798b0a89ebc07f5dcf345a61
helium/gateway-config
gateway_config_cli_registry.erl
-module(gateway_config_cli_registry). -define(CLI_MODULES, [ gateway_config_cli_advertise, gateway_config_cli_lights, gateway_config_cli_wifi, gateway_config_cli_ble ]). -export([register_cli/0, command/1]). register_cli() -> clique:register(?CLI_MODULES). -spec command([string()]) -> rpc_ok | {...
null
https://raw.githubusercontent.com/helium/gateway-config/50a86f7a66e67a8fa175a2a44655920d975617f3/src/cli/gateway_config_cli_registry.erl
erlang
this is the contents of clique:run but we want to figure out if the command worked or not
-module(gateway_config_cli_registry). -define(CLI_MODULES, [ gateway_config_cli_advertise, gateway_config_cli_lights, gateway_config_cli_wifi, gateway_config_cli_ble ]). -export([register_cli/0, command/1]). register_cli() -> clique:register(?CLI_MODULES). -spec command([string()]) -> rpc_ok | {...
fc621f884343a1840fde6b708e97877fe6e3ab1d4fa4e1d37123b5e79e6f7bf4
atlas-engineer/nyxt
editor.lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (nyxt:define-package :nyxt/editor-mode (:documentation "Mode for editors.")) (in-package :nyxt/editor-mode) (define-mode editor-mode () "Mode for editor modes to extend. Importantly, it is required to implement the m...
null
https://raw.githubusercontent.com/atlas-engineer/nyxt/a90478daeec2e8843c971cd9a22255cab6bfaab7/source/mode/editor.lisp
lisp
IMPORTANT: Implement this method specializing on your class extending editor-mode. IMPORTANT: Implement this method specializing on your class extending editor-mode. IMPORTANT: Implement this method specializing on your class extending editor-mode. Questionable, but needed for `buffer-load'. REVIEW: Really remove ...
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (nyxt:define-package :nyxt/editor-mode (:documentation "Mode for editors.")) (in-package :nyxt/editor-mode) (define-mode editor-mode () "Mode for editor modes to extend. Importantly, it is required to implement the m...
5edcf03b477d4675583cdad76cf1e3a7789a3d1959128fe7bde126ad623e3826
xtdb/xtdb
psql.clj
(ns ^:no-doc xtdb.jdbc.psql (:require [clojure.tools.logging :as log] [xtdb.jdbc :as j] [xtdb.system :as sys] [juxt.clojars-mirrors.nextjdbc.v1v2v674.next.jdbc :as jdbc] [juxt.clojars-mirrors.nextjdbc.v1v2v674.next.jdbc.result-set :as jdbcr])) (defn- check-tx-time-col ...
null
https://raw.githubusercontent.com/xtdb/xtdb/c285d76d9f5d1b7e872a3ec6b9dd33be8e641867/modules/jdbc/src/xtdb/jdbc/psql.clj
clojure
`table-name` is trusted
(ns ^:no-doc xtdb.jdbc.psql (:require [clojure.tools.logging :as log] [xtdb.jdbc :as j] [xtdb.system :as sys] [juxt.clojars-mirrors.nextjdbc.v1v2v674.next.jdbc :as jdbc] [juxt.clojars-mirrors.nextjdbc.v1v2v674.next.jdbc.result-set :as jdbcr])) (defn- check-tx-time-col ...
24c0797e981947814ac64609f9efdf5c5143bf64035b180922ed3164390ca4b7
exercism/babashka
space_age_test.clj
(ns space-age-test (:require [clojure.test :refer [deftest is]] space-age)) (defn- rounds-to [expected actual] (is (= (Math/round (* 100.0 expected)) (Math/round (* 100.0 actual))))) (deftest age-in-earth-years (rounds-to 31.69 (space-age/on-earth 1000000000))) (deftest age-in-mercury-ye...
null
https://raw.githubusercontent.com/exercism/babashka/7375f1938ff95b242320313eaeedb8eca31a1b5b/exercises/practice/space-age/test/space_age_test.clj
clojure
(ns space-age-test (:require [clojure.test :refer [deftest is]] space-age)) (defn- rounds-to [expected actual] (is (= (Math/round (* 100.0 expected)) (Math/round (* 100.0 actual))))) (deftest age-in-earth-years (rounds-to 31.69 (space-age/on-earth 1000000000))) (deftest age-in-mercury-ye...
b2d6b7cc630d42645c00cd1e3eb1be2ee275bd08673b244a3c15a77e41712c89
philnguyen/soft-contract
fact.rkt
#lang racket (require soft-contract/fake-contract) (define (factorial x) (if (zero? x) 1 (* x (factorial (sub1 x))))) (provide (contract-out [factorial (-> (>=/c 0) (>=/c 0))]))
null
https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/sym-exe/fact.rkt
racket
#lang racket (require soft-contract/fake-contract) (define (factorial x) (if (zero? x) 1 (* x (factorial (sub1 x))))) (provide (contract-out [factorial (-> (>=/c 0) (>=/c 0))]))
13b8ebcdd1f7215d28361722d3fdc1655c9bf651bb6dc8b67f196ce2bf18cf16
blancas/kern
i18n.clj
Copyright ( c ) 2013 . All rights reserved . ;; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( -1.0.php ) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;; ...
null
https://raw.githubusercontent.com/blancas/kern/3ef65e559658c06a321a9ca7c85a541edc7b9ff2/src/main/clojure/blancas/kern/i18n.clj
clojure
The use and distribution terms for this software are covered by the which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.
Copyright ( c ) 2013 . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) (ns ^{:doc "Support for a simple i18n scheme." :author "Armando Blancas"} blancas.kern.i18n) (def ^:private default { :unexpected "unexpected %s" :expecting "expecting %s" :comma ", " ...
05e416a57d52b39cd2ba42b66e43f57e79a7ca0cda90393a051f04741fdc19f4
ocaml/ocaml
odoc_comments.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml/ocaml/1e52236624bad1c80b3c46857723a35c43974297/ocamldoc/odoc_comments.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 2001 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Odoc_types let simple_blank = "[ \013\009\012]" module type Texter = sig val text_of_strin...
4a6e88615cdeabd269f13ce397e8b58bef61b6deb37ac1ce3572a8f53d5b02fd
8c6794b6/guile-tjit
t-br-if-eq-01.scm
;; Simple loop with `br-if-eq'. (define (loop n acc) (if (eq? n 0) acc (loop (- n 1) (+ acc 1)))) (loop 1000 0)
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-br-if-eq-01.scm
scheme
Simple loop with `br-if-eq'.
(define (loop n acc) (if (eq? n 0) acc (loop (- n 1) (+ acc 1)))) (loop 1000 0)
f7c9946c9d4fb36beb2db4e23afa19c9321687aaccd524fcc430175832435f0c
arbor/antiope
MessagesSpec.hs
module Antiope.SQS.MessagesSpec ( spec ) where import HaskellWorks.Hspec.Hedgehog import Hedgehog import Test.Hspec # ANN module ( " HLint : ignore Redundant do " : : String ) # spec :: Spec spec = describe "Antiope.SQS.MessagesSpec" $ do it "Implement me" $ require $ property $ do True === True
null
https://raw.githubusercontent.com/arbor/antiope/86ad3df07b8d3fd5d2c8bef4111a73b85850e1ba/antiope-sqs/test/Antiope/SQS/MessagesSpec.hs
haskell
module Antiope.SQS.MessagesSpec ( spec ) where import HaskellWorks.Hspec.Hedgehog import Hedgehog import Test.Hspec # ANN module ( " HLint : ignore Redundant do " : : String ) # spec :: Spec spec = describe "Antiope.SQS.MessagesSpec" $ do it "Implement me" $ require $ property $ do True === True
0f310d0338a570ad3bebadbffa55382d81f38ec515a09da2b225268cd9504c3b
Simre1/haskell-game
Scene.hs
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # module Scene.Level.Scene where import Control.Applicative ((<|>)) import Control.Monad.IO.Class (liftIO) import Data.Bool (bool) import Polysemy (Embed, Sem, Members) import Polysemy.Input (Input) import ECS.Apecs (ApecsSystem, executeApecsSystem, runApecs) import Si...
null
https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/app/Scene/Level/Scene.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # module Scene.Level.Scene where import Control.Applicative ((<|>)) import Control.Monad.IO.Class (liftIO) import Data.Bool (bool) import Polysemy (Embed, Sem, Members) import Polysemy.Input (Input) import ECS.Apecs (ApecsSystem, executeApecsSystem, runApecs) import Si...
88ac3c24fe99c0218d2a76d166daa11c72f019d27db438ee41ec182e652194a7
yrashk/erlang
ex_grid.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public Lic...
null
https://raw.githubusercontent.com/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/wx/examples/demo/ex_grid.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(ex_grid). -behavoiur(wx_object). -expor...
77bf3c9cb25fb65810bedb86b9344c0cd02d02430345217650bf51490745ddf3
arttuka/reagent-material-ui
browse_gallery_two_tone.cljs
(ns reagent-mui.icons.browse-gallery-two-tone "Imports @mui/icons-material/BrowseGalleryTwoTone as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def browse-galle...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/c7cd0d7c661ab9df5b0aed0213a6653a9a3f28ea/src/icons/reagent_mui/icons/browse_gallery_two_tone.cljs
clojure
(ns reagent-mui.icons.browse-gallery-two-tone "Imports @mui/icons-material/BrowseGalleryTwoTone as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def browse-galle...
3d018e886cc219734f13f8d0f02a68001bf1b4db339fcea6d709742a12749b45
input-output-hk/offchain-metadata-tools
Transform.hs
module Test.Cardano.Metadata.Transform ( tests ) where import Data.Validation ( Validation (Failure, Success) ) import Data.Word import Hedgehog ( forAll, property, unOpaque, (===) ) import qualified Hedgehog as H ( Property ) import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range as Range import Tes...
null
https://raw.githubusercontent.com/input-output-hk/offchain-metadata-tools/794f08cedbf555e9d207bccc45c08abbcf98add9/metadata-lib/test/Test/Cardano/Metadata/Transform.hs
haskell
import Test.Cardano.Helpers (prop_functor_laws) Can make transforms Combine them using the applicative instance And get the expected result Additionally, we can do the same with Validation Identity Composition Identity Composition Interchange Left identity Right identity
module Test.Cardano.Metadata.Transform ( tests ) where import Data.Validation ( Validation (Failure, Success) ) import Data.Word import Hedgehog ( forAll, property, unOpaque, (===) ) import qualified Hedgehog as H ( Property ) import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range as Range import Tes...
5ca80e9e06e72706027951ac4e92edd4e3b00a08f6cd3419a49acf8f6751fb54
tonyfloatersu/solution-haskell-craft-of-FP
Chapter7.hs
------------------------------------------------------------------------- -- : The Craft of Functional Programming , 3e ( c ) Addison - Wesley , 1996 - 2011 . -- Chapter 7 -- ------------------------------------------------------------------------- module Chapter7 where -- Defining functions over lists...
null
https://raw.githubusercontent.com/tonyfloatersu/solution-haskell-craft-of-FP/0d4090ef28417c82a7b01e4a764f657641cb83f3/Chapter7.hs
haskell
----------------------------------------------------------------------- ----------------------------------------------------------------------- Defining functions over lists ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ For pedagogical reasons, this chapter repeats many of the definitions in the standard Prelude. They are repea...
: The Craft of Functional Programming , 3e ( c ) Addison - Wesley , 1996 - 2011 . Chapter 7 module Chapter7 where definitions have to be hidden when the Prelude is imported : import Prelude hiding (Word,id,head,tail,null,sum,concat,(++),zip,take,getLine) import qualified Prelude import Chapter5 (d...
e017eb462769377b95c6154a7fa53284a96ea44b22e2a11b58cbd1ac57deb6fe
jeapostrophe/remix
datalog.rkt
#lang racket/base (require datalog/runtime (prefix-in stx: datalog/stx) (for-syntax racket/base remix/stx/raw datalog/private/compiler datalog/parse syntax/parse)) (define-syntax (datalog stx) (syntax-parse stx ...
null
https://raw.githubusercontent.com/jeapostrophe/remix/982529019d12252b5f6ab49c17a1a8283ccfb9df/datalog.rkt
racket
#lang racket/base (require datalog/runtime (prefix-in stx: datalog/stx) (for-syntax racket/base remix/stx/raw datalog/private/compiler datalog/parse syntax/parse)) (define-syntax (datalog stx) (syntax-parse stx ...
5595ad6e55ecd32bbf5af64d6a2e0b4c07fd0e88877b97d7dbe17ced9c21a141
kcsongor/generic-lens
Collect.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeFamilies #-} # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # ----------------------------------------------------------------------------- -- | -- Module : Data.Generics.Internal.Families.Col...
null
https://raw.githubusercontent.com/kcsongor/generic-lens/8e1fc7dcf444332c474fca17110d4bc554db08c8/generic-lens-core/src/Data/Generics/Internal/Families/Collect.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE TypeFamilies # --------------------------------------------------------------------------- | Module : Data.Generics.Internal.Families.Collect License : BSD3 Stability : experimental Portability : non-portable ---...
# LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # Copyright : ( C ) 2020 Maintainer : < > module Data.Generics.Internal.Families.Collect ( CollectTotalType , CollectPartialType , CollectField , CollectFieldsOrdered , TypeStat (..) , type (\\) ) where import Data.Type...
5152a20ef71ae34e0cc5c3d44ae80aed185d81a12c73d51034201d81d616949f
andorp/bead
TestData.hs
{-# LANGUAGE OverloadedStrings #-} module Bead.Persistence.SQL.TestData where import Bead.Domain.Entities import Bead.Domain.Relationships import Bead.Domain.Shared.Evaluation course = Course "name" "desc" TestScriptSimple group = Group "name" "desc" time = read "2014-06-09 12:55:27 UTC" sbm = Submission...
null
https://raw.githubusercontent.com/andorp/bead/280dc9c3d5cfe1b9aac0f2f802c705ae65f02ac2/src/Bead/Persistence/SQL/TestData.hs
haskell
# LANGUAGE OverloadedStrings #
module Bead.Persistence.SQL.TestData where import Bead.Domain.Entities import Bead.Domain.Relationships import Bead.Domain.Shared.Evaluation course = Course "name" "desc" TestScriptSimple group = Group "name" "desc" time = read "2014-06-09 12:55:27 UTC" sbm = Submission (SimpleSubmission "submission") ti...
f310e0e3c880259f181b77a1dab875ea438016b20a6a40dc4458d9823cf17428
dyoo/whalesong
module-scoping.rkt
#lang whalesong (require "module-scoping-helper.rkt") 0 0 x+1 1 1 x++ x (get-x) x=0 x (get-x) x++ x (get-x) x++ x (get-x) x+1 x (get-x)
null
https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/tests/more-tests/module-scoping.rkt
racket
#lang whalesong (require "module-scoping-helper.rkt") 0 0 x+1 1 1 x++ x (get-x) x=0 x (get-x) x++ x (get-x) x++ x (get-x) x+1 x (get-x)
6f783bc86c7561c69133536657d9612982363a718b65141bde850aa137a974f5
ocaml/merlin
parenthesize.ml
module MyList = struct [@@@ocaml.warning "-65"] type 'a t = | (::) of 'a * 'a t | [] type u = () let (mod) = () let random = 1 end let _ = MyList.
null
https://raw.githubusercontent.com/ocaml/merlin/e576bc75f11323ec8489d2e58a701264f5a7fe0e/tests/test-dirs/completion/parenthesize.t/parenthesize.ml
ocaml
module MyList = struct [@@@ocaml.warning "-65"] type 'a t = | (::) of 'a * 'a t | [] type u = () let (mod) = () let random = 1 end let _ = MyList.
e197380894908dae46525f52ffee571f28a4bfb10b29c1e65afdf440499964c5
MyDataFlow/ttalk-server
toppage_handler.erl
%% Feel free to use, reuse and abuse the code in this file. %% @doc Pastebin handler. -module(toppage_handler). %% Standard callbacks. -export([init/3]). -export([allowed_methods/2]). -export([content_types_provided/2]). -export([content_types_accepted/2]). -export([resource_exists/2]). %% Custom callbacks. -export(...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/cowboy/examples/rest_pastebin/src/toppage_handler.erl
erlang
Feel free to use, reuse and abuse the code in this file. @doc Pastebin handler. Standard callbacks. Custom callbacks. For the random number generator: Private Escape some HTML characters that might make a fuss
-module(toppage_handler). -export([init/3]). -export([allowed_methods/2]). -export([content_types_provided/2]). -export([content_types_accepted/2]). -export([resource_exists/2]). -export([create_paste/2]). -export([paste_html/2]). -export([paste_text/2]). init(_Transport, _Req, []) -> {X, Y, Z} = now(), random:se...
5e140ed7f4df0b1f369ab6f4f1316001cdcecf4f7725ee0fdc89c31c1535ff7e
vikram/lisplibraries
swank-source-file-cache.lisp
;;;; Source-file cache ;;; To robustly find source locations in CMUCL and SBCL it 's useful to ;;; have the exact source code that the loaded code was compiled from. ;;; In this source we can accurately find the right location, and from ;;; that location we can extract a "snippet" of code to show what the definitio...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/slime/swank-source-file-cache.lisp
lisp
Source-file cache have the exact source code that the loaded code was compiled from. In this source we can accurately find the right location, and from that location we can extract a "snippet" of code to show what the search to locate the right definition, which works well even if the buffer has been modified. ...
To robustly find source locations in CMUCL and SBCL it 's useful to definition looks like . Emacs can use this snippet in a best - match (in-package :swank-backend) (defvar *cache-sourcecode* t "When true complete source files are cached. The cache is used to keep known good copies of the source text which corr...
bf3629a2127083cc9f78bd340a4636c6fa38d9526a014f2655695cff7953ed85
HealthSamurai/igpop
loader_test.clj
(ns igpop.loader-test (:require [igpop.loader :as sut] [clojure.test :refer :all] [clojure.java.io :as io] [matcho.core :as matcho])) (def project-path (.getPath (io/resource "test-project"))) (deftest read-yaml-test (let [result (sut/read-yaml (io/file project-path "ig.yaml"))...
null
https://raw.githubusercontent.com/HealthSamurai/igpop/d4e6f6100b78c20a1706add125e90ff7d912e3d4/test/igpop/loader_test.clj
clojure
(matcho/match {:to [:source :Patient :basic :example :pt1] :format :yaml})
(ns igpop.loader-test (:require [igpop.loader :as sut] [clojure.test :refer :all] [clojure.java.io :as io] [matcho.core :as matcho])) (def project-path (.getPath (io/resource "test-project"))) (deftest read-yaml-test (let [result (sut/read-yaml (io/file project-path "ig.yaml"))...
b4b38a4a7f96b76bafefab6de27667f33d976b54b4200b7c6f043c54a8826b49
larcenists/larceny
srfi-126-test.body.scm
;;; This doesn't test weakness, external representation, and quasiquote. (test-begin "SRFI-126") (test-group "constructors & inspection" (test-group "eq" (let ((tables (list (make-eq-hashtable) (make-eq-hashtable 10) (make-eq-hashtable #f #f) ...
null
https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/lib/SRFI/test/srfi-126-test.body.scm
scheme
This doesn't test weakness, external representation, and quasiquote. Local Variables: End:
(test-begin "SRFI-126") (test-group "constructors & inspection" (test-group "eq" (let ((tables (list (make-eq-hashtable) (make-eq-hashtable 10) (make-eq-hashtable #f #f) (make-hashtable #f eq?) (alist->eq-hashtable '...
6b4214e25657e4227ff7541fa29d061450ea8df41d8c71f2ebbdacb4bc3b22b6
argp/bap
fixpoint.ml
(**************************************************************************) (* *) : a generic graph library for OCaml Copyright ( C ) 2004 - 2010 , and (* ...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocamlgraph/src/fixpoint.ml
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
: a generic graph library for OCaml Copyright ( C ) 2004 - 2010 , and modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking Copyrig...
5627e673d746e5ee8d865306ef717652c17b783328dfb0cc9447ab5aca1dfd9f
edvorg/yet-another-craft
project.clj
(defproject yet-another-craft "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/clojurescript "1.8.51" :scope "provided"] [org.clojur...
null
https://raw.githubusercontent.com/edvorg/yet-another-craft/bab8484135233323f253946d1f076d4f792a6326/project.clj
clojure
(defproject yet-another-craft "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/clojurescript "1.8.51" :scope "provided"] [org.clojur...
fa5642aa3d8e2ca8beba4255d271677c25a57a7d85f242385b312513ec900061
input-output-hk/project-icarus-importer
Modifier.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # -- | Wallet info modifier module Pos.Wallet.Web.Tracking.Modifier ( CAccModifier (..) , CachedCAccModifier , VoidModifier , deleteAndInsertVM , deleteAndInsertMM , IndexedMap...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet/src/Pos/Wallet/Web/Tracking/Modifier.hs
haskell
| Wallet info modifier It's (set of added k, set of deleted k) essentially. | `txMempoolToModifier`, once evaluated, is passed around under this type in scope of single request. -------------------------------------------------------------------------- ---------------------------------------------------------------...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # module Pos.Wallet.Web.Tracking.Modifier ( CAccModifier (..) , CachedCAccModifier , VoidModifier , deleteAndInsertVM , deleteAndInsertMM , IndexedMapModifier (..) , sor...
21918e9d66f3836c676cce36dda2aaa0b4474481040835599f2fdf90f4232e87
p2pcollab/ocaml-p2p
test_vicinity_lwt.ml
Copyright ( C ) 2019 TG x 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 version 3 of the License . This program is distributed in the hope that it will be usef...
null
https://raw.githubusercontent.com/p2pcollab/ocaml-p2p/121e86efff0e6edd7c498d17bf4cab7787991888/test/p2p-vicinity-lwt/test_vicinity_lwt.ml
ocaml
* 1 / (a - b) * [initiate_gossip t node xchg] sends [xchg] entries to node [dst] and returns response * [respond_gossip t node xchg] sends [xchg] entries in response to node [dst] * [gossip_recvd t node view recvd] is called after entries are received during a gossip exchange; allows re...
Copyright ( C ) 2019 TG x 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 version 3 of the License . This program is distributed in the hope that it will be usef...
db9399e38ac478b4db523b195b6459b414c19742c61831cdf6d1c306ee7e80b5
inaka/elvis_core
pass_atom_naming_convention_elvis_attr.erl
-module(pass_atom_naming_convention_elvis_attr). -export([for_test/0]). -elvis([{elvis_style, atom_naming_convention, #{ regex => "^[a-zA-Z\_]+$", enclosed_atoms => "^[a-zA-Z\_0-9' \-\\\\]+$" }}, {elvis_text_style, line_length, #{limit => 100}}]). for_test() -...
null
https://raw.githubusercontent.com/inaka/elvis_core/468bd3498f1782fd74ef3d8eb1b36217b0b76c11/test/examples/pass_atom_naming_convention_elvis_attr.erl
erlang
-module(pass_atom_naming_convention_elvis_attr). -export([for_test/0]). -elvis([{elvis_style, atom_naming_convention, #{ regex => "^[a-zA-Z\_]+$", enclosed_atoms => "^[a-zA-Z\_0-9' \-\\\\]+$" }}, {elvis_text_style, line_length, #{limit => 100}}]). for_test() -...
ba17e23cf1f00618a35b974abdd12b7c8995ca435d15f8a0ee63847c2baa38d0
project-oak/hafnium-verification
CiOSVersionNumbers.ml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/al/CiOSVersionNumbers.ml
ocaml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
140adf8d3c0ddd996d5a4bd55abefc5edadd30dfed7043a4d349558d8db5dd1a
VERIMAG-Polyhedra/VPL
Misc.mli
(** This module defines several generic functions to handle lists or strings *) (** [sublist l i j] returns the sublist of [l] starting at index [i] and ending at index [j-1] *) val sublist : 'a list -> int -> int -> 'a list (** [index s c] returns the index of the character [c] in the string [s] if it exists, -1 oth...
null
https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/ocaml/misc/Misc.mli
ocaml
* This module defines several generic functions to handle lists or strings * [sublist l i j] returns the sublist of [l] starting at index [i] and ending at index [j-1] * [index s c] returns the index of the character [c] in the string [s] if it exists, -1 otherwise * [substring s i] returns the substring of [s] star...
val sublist : 'a list -> int -> int -> 'a list val index : string -> char -> int val substring : string -> int -> string * [ findi p l ] returns the index of the first element in [ l ] that satisfies predicate [ p ] . @raise Not_found if no such element exists @raise Not_found if no such element exists *) val fin...
a6cf9985f23f3cb97395552c3884f05d0a0c5ef7abf9b64cb07393cea4732f16
onedata/op-worker
trash_test_SUITE.erl
%%%------------------------------------------------------------------- @author ( C ) 2020 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%------------------------------------------------------------------- %%% @doc %%% Tests of trash. %%% @end %%%------...
null
https://raw.githubusercontent.com/onedata/op-worker/d6d6aeaaf95da7383f3988e4101e2bcc4fb59535/test_distributed/suites/trash/trash_test_SUITE.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- @doc Tests of trash. @end ------------------------------------------------------------------- exported for CT tests deletion_lasting_for_10_days_should_fail_if_session_is_n...
@author ( C ) 2020 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . -module(trash_test_SUITE). -author("Jakub Kudzia"). -include("permissions_test.hrl"). -include("modules/fslogic/fslogic_common.hrl"). -include("distribution_assert.hrl"). -include_lib("onenv_ct/inc...
e5c0c9252bd473eb38a4e00d68325a0698ebdd71e02231199106eba291e77e70
skanev/playground
30.scm
SICP exercise 3.30 ; Figure 3.27 shows a ripple - carry adder formed by stringing together n full - adders . This is the simplest form of parallel adder for adding two n - bit binary numbers . The inputs A₁ , A₂ , A₃ , ... , Aᵢ and B₁ , B₂ , B₃ , ... , are the two binary numbers to be added ( each Aᵣ and Bᵣ ...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/03/30.scm
scheme
carry from the addition. Write a procedure ripple-carry-adder that generates drawback of the ripple-carry adder is the need to wait for the signals to propagate. What is the delay needed to obtain the complete output from an i-bit ripple-carry adder, expressed in terms of the delays of and-gates, or-gates, and in...
SICP exercise 3.30 Figure 3.27 shows a ripple - carry adder formed by stringing together n full - adders . This is the simplest form of parallel adder for adding two n - bit binary numbers . The inputs A₁ , A₂ , A₃ , ... , Aᵢ and B₁ , B₂ , B₃ , ... , are the two binary numbers to be added ( each Aᵣ and Bᵣ is...
df97169a38d6731257c146e04c3cc4e75b8d9259ab8aab8579aea53c10f15d21
Jarzka/stylefy
project.clj
(defproject stylefy/rum "3.0.0" :description "RumDOM for stylefy" :dependencies [[org.clojure/clojure "1.10.1"] [org.clojure/clojurescript "1.10.520"] [prismatic/dommy "1.1.0"] [rum "0.12.3"] [org.clojure/core.async "0.3.443"]] :source-paths ["sr...
null
https://raw.githubusercontent.com/Jarzka/stylefy/c4c3a9b1d230605e2d08a769d83d632e696d84a0/modules/stylefy-rum/project.clj
clojure
(defproject stylefy/rum "3.0.0" :description "RumDOM for stylefy" :dependencies [[org.clojure/clojure "1.10.1"] [org.clojure/clojurescript "1.10.520"] [prismatic/dommy "1.1.0"] [rum "0.12.3"] [org.clojure/core.async "0.3.443"]] :source-paths ["sr...
655db515179d2b7292e5a007d51d9a7b79446f5c4a2743de49d1a2239fd68e67
cl-unix-cybernetics/cl-unix-cybernetics
include.lisp
;; cl-unix-cybernetics Copyright 2013 - 2022 < > ;; ;; Permission is hereby granted to use this software granted ;; the above copyright notice and this permission paragraph ;; are included in all copies and substantial portions of this ;; software. ;; ;; THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF ...
null
https://raw.githubusercontent.com/cl-unix-cybernetics/cl-unix-cybernetics/63e4862274e170bda7540b4caec6c94ed850a31c/core/include.lisp
lisp
cl-unix-cybernetics Permission is hereby granted to use this software granted the above copyright notice and this permission paragraph are included in all copies and substantial portions of this software. THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER...
Copyright 2013 - 2022 < > (in-package :cl-unix-cybernetics) (defun include/resolve-filename (spec) (flet ((try (&rest parts) (let ((path (str parts))) (when (probe-file path) (return-from include/resolve-filename path))))) (try spec ".lisp") (try spec))) (defun ...
fb1eed336134dc096c6463333e95cf6571ade7689ed69fcfe0eecf2cbef0fb3e
karlhof26/gimp-scheme
AutoColorize_FlavorD_4_02.scm
; Auto colorize image into random number of colors of random hues author : date : 2015 (define (script-fu-auto-colorize-d image layer hatches ) (let* ( (color-map 0) (colors 0) (image-width) (image-height) ( R 0....
null
https://raw.githubusercontent.com/karlhof26/gimp-scheme/799bb65845f8d282dd1ea971db7c27594b7c41c4/AutoColorize_FlavorD_4_02.scm
scheme
Auto colorize image into random number of colors of random hues constants for calculating luminance (B 0.0722) (0.299*R + 0.587*G + 0.114*B) (G 0.587) randomly generated r g b values luminance original (gimp-image-undo-disable image); DN = NO UNDO convert to indexed grabs color map converts it to rgb befor...
author : date : 2015 (define (script-fu-auto-colorize-d image layer hatches ) (let* ( (color-map 0) (colors 0) (image-width) (image-height) ( G 0.7152 ) ( R 0.299 ) ( B 0.114 ) sqrt ( 0.299*R^2 + 0.587*G^2 + 0.11...
f0eab4509e7c64ee16d84cf215b2b753da6847f136a20f54cb056e69421ca636
kapilreddy/clojure-north-2020-concurrency
core.clj
(ns concurrency-workshop.core) (defn foo "I don't do a whole lot." [x] (println x "Hello, World!"))
null
https://raw.githubusercontent.com/kapilreddy/clojure-north-2020-concurrency/17e0a25f63598bf45b805f64b21701f888268ec9/concurrency-workshop/src/concurrency_workshop/core.clj
clojure
(ns concurrency-workshop.core) (defn foo "I don't do a whole lot." [x] (println x "Hello, World!"))
4ce1af3a2ba5d9568a8d9a163fbe26924d71ede39be3109cb3555e9f3661a31e
spurious/sagittarius-scheme-mirror
%3a0.scm
-*- mode : scheme ; coding : utf-8 ; -*- (library (srfi :0) (export cond-expand) (import (srfi :0 cond-expand)) )
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/srfi/%253a0.scm
scheme
coding : utf-8 ; -*-
(library (srfi :0) (export cond-expand) (import (srfi :0 cond-expand)) )
ba5cfe304a14dd87c3a0cfd13b7b9dc226fc0c07196b3881dbaea767ea7ed392
nmaehlmann/mallRL
Renderer.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} module Renderer where import Control.Monad import Foreign.C.Types import SDL.Vect import SDL (($=)) import qualified SDL import Data.Array ((!)) import qualified Data.Array as Array import Position import Apecs hiding (($=)) import Control.Concurrent import T...
null
https://raw.githubusercontent.com/nmaehlmann/mallRL/1ae9add37ee390d645e380b77694d868a90fa70c/app/Renderer.hs
haskell
# LANGUAGE OverloadedStrings # ^ Drawing function ^ Event handling function ^ Stepping function, with a time delta argument. init and show window init and show renderer handle events step world render map to texture render texture to screen sleep repeat
# LANGUAGE LambdaCase # module Renderer where import Control.Monad import Foreign.C.Types import SDL.Vect import SDL (($=)) import qualified SDL import Data.Array ((!)) import qualified Data.Array as Array import Position import Apecs hiding (($=)) import Control.Concurrent import TileImage import TileMap import Colo...
feefd731c04af6498f0acaf6426cf018370101ac46a80fe6775c47cc601db69f
gigasquid/libpython-clj-examples
supervised_learning.clj
(ns gigasquid.sk-learn.supervised-learning (:require [libpython-clj.require :refer [require-python]] [libpython-clj.python :as py :refer [py. py.. py.-]] [gigasquid.plot :as plot])) ;;; From -learn.org/stable/tutorial/statistical_inference/supervised_learning.html ;; Clasifying irises (req...
null
https://raw.githubusercontent.com/gigasquid/libpython-clj-examples/f151c00415c82a144a13959ff7b56f58704ac6f2/src/gigasquid/sk_learn/supervised_learning.clj
clojure
From -learn.org/stable/tutorial/statistical_inference/supervised_learning.html Clasifying irises => (0 0) K-Nearest neighbors classifier The simplest possible classifier is the nearest neighbor: given a new observation X_test, find in the training set (i.e. the data used to train the estimator) the observation with...
(ns gigasquid.sk-learn.supervised-learning (:require [libpython-clj.require :refer [require-python]] [libpython-clj.python :as py :refer [py. py.. py.-]] [gigasquid.plot :as plot])) (require-python '[numpy :as np]) (require-python '[numpy.random :as np-random]) (require-python '[sklearn.da...
91cbf82070bf5f6478003e52f439f449fa0c1e1148bea7aa772d9881e321bdd0
swtwsk/vinci-lang
PrintVinci.hs
# LANGUAGE CPP # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # #if __GLASGOW_HASKELL__ <= 708 # LANGUAGE OverlappingInstances # #endif # OPTIONS_GHC -fno - warn - incomplete - patterns # | Pretty - printer for Parser . Generated by the BNF converter . module Parser.PrintVinci where import Prelude (...
null
https://raw.githubusercontent.com/swtwsk/vinci-lang/9c7e01953e0b1cf135af7188e0c71fe6195bdfa1/src/Parser/PrintVinci.hs
haskell
| The top-level printing method. remove trailing space remove trailing space add space if none | The printer class does the job. # OVERLAPPABLE #
# LANGUAGE CPP # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # #if __GLASGOW_HASKELL__ <= 708 # LANGUAGE OverlappingInstances # #endif # OPTIONS_GHC -fno - warn - incomplete - patterns # | Pretty - printer for Parser . Generated by the BNF converter . module Parser.PrintVinci where import Prelude (...
70ca8d859e494b5a1016e41b4686f8a4e79a76649cddfee70874b2953ac46a63
vimus/libmpd-haskell
ApplicativeSpec.hs
{-# LANGUAGE OverloadedStrings #-} module Network.MPD.ApplicativeSpec (main, spec) where import TestUtil import Data.List (intercalate) import Network.MPD.Applicative import Network.MPD.Commands.Types import Control.Applicative import qualified Data.Map as M main :...
null
https://raw.githubusercontent.com/vimus/libmpd-haskell/1ec02deba33ce2a16012d8f0954e648eb4b5c485/tests/Network/MPD/ApplicativeSpec.hs
haskell
# LANGUAGE OverloadedStrings #
module Network.MPD.ApplicativeSpec (main, spec) where import TestUtil import Data.List (intercalate) import Network.MPD.Applicative import Network.MPD.Commands.Types import Control.Applicative import qualified Data.Map as M main :: IO () main = hspec spec spec :: ...
8b230e7704932125a839fdb51eb6f3aa6f494f8d9cae97d0a97ca8ec44208741
Kappa-Dev/KappaTools
map_test.ml
module IntS = Mods.IntSetMap module LIntS = Map_wrapper.Make (IntS) module CharS = Mods.CharSetMap module LCharS = Map_wrapper.Make (CharS) let p i j = i=j let proj i = if i mod 2 = 0 then 'a' else 'b' let monaproj _ b i = b,proj i module P = SetMap.Proj(IntS)(CharS) module LP = Map_wrapper.Proj(LIntS)(LCharS) ...
null
https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/KaSa_rep/sanity_test/map_test.ml
ocaml
module IntS = Mods.IntSetMap module LIntS = Map_wrapper.Make (IntS) module CharS = Mods.CharSetMap module LCharS = Map_wrapper.Make (CharS) let p i j = i=j let proj i = if i mod 2 = 0 then 'a' else 'b' let monaproj _ b i = b,proj i module P = SetMap.Proj(IntS)(CharS) module LP = Map_wrapper.Proj(LIntS)(LCharS) ...
2112cd0a42e815eb5ab345e0c9d2fb0c28c99d37f7b8125d9002e900512b7a9c
ruricolist/serapeum
files.lisp
(in-package :serapeum.tests) (def-suite files :in serapeum) (in-suite files) (test resolve-executable (cond ((uiop:os-macosx-p) TODO Are there any universal Mac executables ? (skip "Mac.")) ((uiop:os-windows-p) (is-true (resolve-executable "clip")) (is-true (resolve-executable "...
null
https://raw.githubusercontent.com/ruricolist/serapeum/00a41b2cdca81a2eeb0e22ea977f4471ca44e98e/tests/files.lisp
lisp
the two file names have different versions.
(in-package :serapeum.tests) (def-suite files :in serapeum) (in-suite files) (test resolve-executable (cond ((uiop:os-macosx-p) TODO Are there any universal Mac executables ? (skip "Mac.")) ((uiop:os-windows-p) (is-true (resolve-executable "clip")) (is-true (resolve-executable "...
83c9bad5e6700423f54429be503be9dd89cfa5335c4e7f1e0a3da966bb6874b8
racket/typed-racket
no-check.rkt
#lang typed-racket/minimal (require racket/require typed/private/no-check-helper (subtract-in typed-scheme typed/private/no-check-helper)) (provide (all-from-out typed-scheme typed/private/no-check-helper))
null
https://raw.githubusercontent.com/racket/typed-racket/9974c9d07d4faf09617607f9e46bc6ec32934a17/typed-racket-compatibility/typed-scheme/no-check.rkt
racket
#lang typed-racket/minimal (require racket/require typed/private/no-check-helper (subtract-in typed-scheme typed/private/no-check-helper)) (provide (all-from-out typed-scheme typed/private/no-check-helper))
f8cbd9649786813e3b9028805f5992dc62e5b9114aaec3c294dd8261ace55935
cyverse-archive/DiscoveryEnvironmentBackend
coge.clj
(ns donkey.clients.coge (:use [clojure-commons.core :only [remove-nil-values]] [donkey.auth.user-attributes :only [current-user]] [slingshot.slingshot :only [throw+ try+]]) (:require [cemerick.url :as curl] [cheshire.core :as cheshire] [clj-http.client :as http] [...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/Donkey/src/donkey/clients/coge.clj
clojure
(ns donkey.clients.coge (:use [clojure-commons.core :only [remove-nil-values]] [donkey.auth.user-attributes :only [current-user]] [slingshot.slingshot :only [throw+ try+]]) (:require [cemerick.url :as curl] [cheshire.core :as cheshire] [clj-http.client :as http] [...
7b6293a2a1a4cac2236bc6973a815689c7cf22d04dceefe432333b8d47e87811
erlang-ls/erlang_ls
diagnostics_autoimport.erl
-module(diagnostics_autoimport). -export([main/1]). main(_Args) -> fun atom_to_list/1.
null
https://raw.githubusercontent.com/erlang-ls/erlang_ls/36bf0815e35db5d25a76e80f98f306f25fff7d8c/apps/els_lsp/priv/code_navigation/src/diagnostics_autoimport.erl
erlang
-module(diagnostics_autoimport). -export([main/1]). main(_Args) -> fun atom_to_list/1.
f521d3c02f3a6fbee7065ac1855ea3f717970c3d5724da7596f467c30d010b3e
karlhof26/gimp-scheme
FU_sharpness-sharper_smart_sharpen.scm
FU_sharpness-sharper_smart-sharpen.scm version 2.8 [ gimphelp.org ] last modified / tested by 02/15/2014 on GIMP-2.8.10 ; 12/2/2007 - Modified by ; deprecated cons-array updated to newer "make-vector" ; 1.01 - 10/31/2007 - upgrade for Gimp 2.4 by ; updated for GIMP-2.4.x by 10/...
null
https://raw.githubusercontent.com/karlhof26/gimp-scheme/8e00194f318281ef9e7808b96d44ecff7cffd413/FU_sharpness-sharper_smart_sharpen.scm
scheme
deprecated cons-array updated to newer "make-vector" 02/15/2014 - accommodate indexed images ============================================================== Installation: This script should be placed in the user or system-wide script folder. Windows Vista/7/8) or or C:\Documents and Settin...
FU_sharpness-sharper_smart-sharpen.scm version 2.8 [ gimphelp.org ] last modified / tested by 02/15/2014 on GIMP-2.8.10 12/2/2007 - Modified by 1.01 - 10/31/2007 - upgrade for Gimp 2.4 by updated for GIMP-2.4.x by 10/24/2007 , later moved menu location C:\Program Files\GIMP 2\s...
aa300cc754daf5015fb2a1e37c5a5b0062525fe41856c94b11893c8cca067b07
art-w/ocaml-webdriver
webdriver_cohttp_async.mli
include Webdriver.S with type 'a io = 'a Async.Deferred.t
null
https://raw.githubusercontent.com/art-w/ocaml-webdriver/449e56427b59e46a3684fa66bda143aed687c085/cohttp/webdriver_cohttp_async.mli
ocaml
include Webdriver.S with type 'a io = 'a Async.Deferred.t
3efa872de9c5a8738baa24a6cd453e4a341442fcbead7550eb647873ef8ace6d
boundedvariation/quantfin
Time.hs
module Quant.Time ( Time(..) , timeDiff , timeOffset , timeFromZero ) where data Time = Time {-# UNPACK #-} !Double deriving (Eq,Show,Ord) timeDiff :: Time -> Time -> Double timeDiff (Time x) (Time y) = y - x # INLINE timeDiff # timeOffset :: Time -> Double -> Time timeOffset (Time x) y = Time (x+y) {-#...
null
https://raw.githubusercontent.com/boundedvariation/quantfin/d077e00d234cbc6a88396ad5644ba76f18cc8ae7/src/Quant/Time.hs
haskell
# UNPACK # # INLINE timeOffset #
module Quant.Time ( Time(..) , timeDiff , timeOffset , timeFromZero ) where timeDiff :: Time -> Time -> Double timeDiff (Time x) (Time y) = y - x # INLINE timeDiff # timeOffset :: Time -> Double -> Time timeOffset (Time x) y = Time (x+y) timeFromZero :: Time -> Double timeFromZero (Time x) = x # INLINE...
315764c21ca1eeaf677e75aec6740606f2fc3fdb56ecfbdf8d43f9758ccf4cda
jeromesimeon/Galax
args.ml
(***********************************************************************) (* *) (* GALAX *) (* XQuery Engine *) (* ...
null
https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/base/args.ml
ocaml
********************************************************************* GALAX XQuery Engine ...
Copyright 2001 - 2007 . $ I d : args.ml , v 1.10 2007/02/01 22:08:45 simeon Exp $ open Error let get_param0 = function | [] -> () | _ -> raise (Query (Parameter_Mismatch("Expected zero arguments"))) let get_param1 = function | [x1] -> x1 | _ ...
fb2d75ed9d6a66342281cd97727a1e10319df12b90ad10632c9003c453f647d8
helpshift/hydrox
references_test.clj
(ns hydrox.doc.link.references-test (:use midje.sweet) (:require [hydrox.doc.link.references :refer :all] [rewrite-clj.zip :as z])) ^{:refer hydrox.doc.link.references/process-doc-nodes :added "0.1"} (fact "treat test nodes specially when rendering code" (->> (z/of-string "(+ 1 1) => (+ 2 2)") ...
null
https://raw.githubusercontent.com/helpshift/hydrox/2beb3c56fad43bbf16f07db7ee72c5862978350c/test/hydrox/doc/link/references_test.clj
clojure
(ns hydrox.doc.link.references-test (:use midje.sweet) (:require [hydrox.doc.link.references :refer :all] [rewrite-clj.zip :as z])) ^{:refer hydrox.doc.link.references/process-doc-nodes :added "0.1"} (fact "treat test nodes specially when rendering code" (->> (z/of-string "(+ 1 1) => (+ 2 2)") ...
6a7f948f889e29df66586fff1766172fedd6ac98aa10b72f3bbbb6282d4deb06
zehaochen19/vanilla-lang
Eval.hs
module Vanilla.Dynamic.Eval where import Vanilla.Dynamic.Step import Vanilla.Syntax.Expr import Vanilla.Syntax.Program eval :: Expr -> Expr eval e = let e' = step e in if e' == e then e else eval e' eval' :: Program -> Expr eval' = eval . mainExpr
null
https://raw.githubusercontent.com/zehaochen19/vanilla-lang/d1e2bbd3125151ce2c0ddc20f735d3a55aeb6bc8/src/Vanilla/Dynamic/Eval.hs
haskell
module Vanilla.Dynamic.Eval where import Vanilla.Dynamic.Step import Vanilla.Syntax.Expr import Vanilla.Syntax.Program eval :: Expr -> Expr eval e = let e' = step e in if e' == e then e else eval e' eval' :: Program -> Expr eval' = eval . mainExpr
fba83f3540f9bd754a867a6d4648d01b80b1b6848ad5d96a5547f714a39f39dc
alekcz/pcp
info.clj
(ns api.info (:require [cheshire.core :as json] [pcp :as pcp])) (def names ["pcp" "sci" "clojure"]) (def repo "") (pcp/response 200 (json/encode {:engine (first names) :interpreter (second names) :core (last names) :repo repo}) "application/json"...
null
https://raw.githubusercontent.com/alekcz/pcp/b9309929a15eafcee9265d7b9683f70ef0d7e726/resources/pcp-templates/api/info.clj
clojure
(ns api.info (:require [cheshire.core :as json] [pcp :as pcp])) (def names ["pcp" "sci" "clojure"]) (def repo "") (pcp/response 200 (json/encode {:engine (first names) :interpreter (second names) :core (last names) :repo repo}) "application/json"...
fddc5cef4408be3537693be3f09e823db7a8329183ba00097c51bd6d08e321f3
channable/alfred-margaret
Searcher.hs
-- Alfred-Margaret: Fast Aho-Corasick string searching Copyright 2019 Channable -- Licensed under the 3 - clause BSD license , see the LICENSE file in the -- repository root. {-# LANGUAGE BangPatterns #-} # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # module Data.Text.BoyerMooreCI.Searcher ( Search...
null
https://raw.githubusercontent.com/channable/alfred-margaret/be96f07bb74c5aa65ce01d664de5d98badbee307/src/Data/Text/BoyerMooreCI/Searcher.hs
haskell
Alfred-Margaret: Fast Aho-Corasick string searching repository root. # LANGUAGE BangPatterns # efficiently find those needles. To enforce this invariant, the fields are not exposed from this module. There is a separate constructor function. wasteful and tedious. Because the automaton is fully determined by the...
Copyright 2019 Channable Licensed under the 3 - clause BSD license , see the LICENSE file in the # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # module Data.Text.BoyerMooreCI.Searcher ( Searcher , automata , build , buildNeedleIdSearcher , buildWithValues , containsAll , cont...
16782fafc0e689f38b728a728729f51cfb4d87e16c332fd73f89f33f10a94bcd
robert-strandh/SICL
elt.lisp
(cl:in-package #:sicl-sequence) (declaim (notinline %invalid-sequence-index)) (defun %invalid-sequence-index (index sequence end) (error 'invalid-sequence-index :datum index :in-sequence sequence :expected-type `(integer 0 (,end)))) ;;; List ;;; Returns the cons cell at INDEX, or signals...
null
https://raw.githubusercontent.com/robert-strandh/SICL/837dc6b421174b6a307f26a1cea1caedfa1d5ebf/Code/Sequence/elt.lisp
lisp
List Returns the cons cell at INDEX, or signals an appropriate error. Vector
(cl:in-package #:sicl-sequence) (declaim (notinline %invalid-sequence-index)) (defun %invalid-sequence-index (index sequence end) (error 'invalid-sequence-index :datum index :in-sequence sequence :expected-type `(integer 0 (,end)))) (declaim (inline elt-aux)) (defun elt-aux (list index) ...
7723f41876cf032c5ccc748ebf4442cef7414843259e6d731f7741a561c17055
plexus/chestnut
styles.clj
(ns {{project-ns}}.styles (:require [garden-watcher.def :refer [defstyles]])) (defstyles style [:h1 {:text-decoration "underline"}])
null
https://raw.githubusercontent.com/plexus/chestnut/684b668141586ed5ef4389f94a4dc7f4fde13112/src/leiningen/new/chestnut/src/clj/chestnut/styles.clj
clojure
(ns {{project-ns}}.styles (:require [garden-watcher.def :refer [defstyles]])) (defstyles style [:h1 {:text-decoration "underline"}])
a32f1ec5a08119abfa90a2fa4a3d9fc1bf2136c36665b47e41b11b488edb4eed
softwarelanguageslab/maf
R5RS_rosetta_easter-1.scm
; Changes: * removed : 0 * added : 0 * swaps : 0 * negated predicates : 1 * swapped branches : 1 ; * calls to id fun: 0 (letrec ((easter (lambda (year) (let* ((a (remainder year 19)) (b (quotient year 100)) (c (remainder year 100)) ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_rosetta_easter-1.scm
scheme
Changes: * calls to id fun: 0
* removed : 0 * added : 0 * swaps : 0 * negated predicates : 1 * swapped branches : 1 (letrec ((easter (lambda (year) (let* ((a (remainder year 19)) (b (quotient year 100)) (c (remainder year 100)) (d (quotient b ...
731e3253bf39e3b80d65e5dc8d620154c5b5ff3859ac6918a72fbaed8c5042ec
marmelab/ocaml-invader
score.ml
let render score = GlDraw.color (0.5, 1., 1.); Utils.drawString 20. 550. (Printf.sprintf "Score: %d" score);
null
https://raw.githubusercontent.com/marmelab/ocaml-invader/037280642cdd1b7800df4b9199aa0cdb802efe1c/src/score.ml
ocaml
let render score = GlDraw.color (0.5, 1., 1.); Utils.drawString 20. 550. (Printf.sprintf "Score: %d" score);
1d4753d6fc9fe3d11a77b6a98260aeaf96bbf745f1f5a09040eeb376349e4c0b
asivitz/Hickory
ParseJson.hs
# LANGUAGE DeriveGeneric # { - # LANGUAGE DerivingStrategies # - } # LANGUAGE DerivingVia # # LANGUAGE DataKinds # # LANGUAGE TypeOperators # # LANGUAGE DuplicateRecordFields # module Hickory.Text.ParseJson where import Hickory.Math (Scalar) import Data.Text (Text) import GHC.Generics (Generic) import Data.Aeson.De...
null
https://raw.githubusercontent.com/asivitz/Hickory/359eeff77dd31bb7b12826eef521c871a656ca3e/core/Hickory/Text/ParseJson.hs
haskell
World coordinates relative to cursor Position within the texture atlas Metrics {..} = metrics
# LANGUAGE DeriveGeneric # { - # LANGUAGE DerivingStrategies # - } # LANGUAGE DerivingVia # # LANGUAGE DataKinds # # LANGUAGE TypeOperators # # LANGUAGE DuplicateRecordFields # module Hickory.Text.ParseJson where import Hickory.Math (Scalar) import Data.Text (Text) import GHC.Generics (Generic) import Data.Aeson.De...
201f52cec460be506c6e4634b69e17a3ea0a3e239e15f6b9e3604b007e6dfb54
edsko/ChinesePodAPI
V2.hs
module Servant.ChinesePod.Analysis.State.V2 ( -- * Types V1.Simpl , AnalysisStatic(..) , V1.AnalysisDynamic(..) , AnalysisState , V1.RelevantLesson(..) , V1.HSKLevel -- * Migration , migrate ) where import Prelude hiding (Word, words) import Data.Binary (Binary) import Data.Map (Map) import G...
null
https://raw.githubusercontent.com/edsko/ChinesePodAPI/f77ebfd55286316c4a54c42c195d5a51b4a0e4cd/src/Servant/ChinesePod/Analysis/State/V2.hs
haskell
* Types * Migration ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- -----------------------------------------------------------------------------} | The static part of the analysis (that doesn't change over tim...
module Servant.ChinesePod.Analysis.State.V2 ( V1.Simpl , AnalysisStatic(..) , V1.AnalysisDynamic(..) , AnalysisState , V1.RelevantLesson(..) , V1.HSKLevel , migrate ) where import Prelude hiding (Word, words) import Data.Binary (Binary) import Data.Map (Map) import GHC.Generics (Generic) import Text....
494520ba00e4fecf936f5c5a24f8cd9767377c7c8b8a6898146a15e237777b1e
mejgun/haskell-tdlib
JsonObjectMember.hs
{-# LANGUAGE OverloadedStrings #-} -- | module TD.Data.JsonObjectMember where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import {-# SOURCE #-} qualified TD.Data.JsonValue as JsonValue import qualified Utils as U -- | | Represents one member of a JSON object @key Member 's key @value Me...
null
https://raw.githubusercontent.com/mejgun/haskell-tdlib/beb6635177d7626b70fd909b1d89f2156a992cd2/src/TD/Data/JsonObjectMember.hs
haskell
# LANGUAGE OverloadedStrings # | # SOURCE # | | |
module TD.Data.JsonObjectMember where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U | Represents one member of a JSON object @key Member 's key @value Member 's value JsonObjectMember value :: Maybe JsonValue.JsonValue, key :: Maybe String } deriv...
bcda4466fd80a0efbd9f77612c503e4c11e60808dcaa1003efc30b4bb11c79d0
CDSoft/abp
Environment.hs
This file is part of ABP . ABP 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 . ABP is distributed...
null
https://raw.githubusercontent.com/CDSoft/abp/98e042066869aa5b898096c31b51d2b6dc316456/src/Environment.hs
haskell
# LANGUAGE OverloadedStrings #
This file is part of ABP . ABP 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 . ABP is distributed...
912b4b8af4d2b55ba55fbe0eae1dc7a85280a72687b5abd2474b5f4ca63409eb
kawasima/darzana
user.cljs
(ns cljs.user (:require [devtools.core :as devtools] [figwheel.client :as figwheel])) (js/console.info "Starting in development mode") (enable-console-print!) (devtools/install!) (figwheel/start {:websocket-url "ws:3449/figwheel-ws"}) (defn log [& args] (.apply js/console.log js/console (apply arra...
null
https://raw.githubusercontent.com/kawasima/darzana/4b37c8556f74219b707d23cb2d6dce70509a0c1b/dev/src/cljs/user.cljs
clojure
(ns cljs.user (:require [devtools.core :as devtools] [figwheel.client :as figwheel])) (js/console.info "Starting in development mode") (enable-console-print!) (devtools/install!) (figwheel/start {:websocket-url "ws:3449/figwheel-ws"}) (defn log [& args] (.apply js/console.log js/console (apply arra...
b80698636486775c5f784e3b63acd464b2aa0ae8667470c0b7ad63a417370d17
juspay/atlas
PerExtraKmRate.hs
| Copyright 2022 Juspay Technologies Pvt 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 -2.0 Unless required by applicable law or agreed to in writing , software dis...
null
https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/driver-offer-bpp/src/Storage/Queries/FarePolicy/PerExtraKmRate.hs
haskell
| Copyright 2022 Juspay Technologies Pvt 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 -2.0 Unless required by applicable law or agreed to in writing , software dis...
dc10c0f2e593240d84e81f4969367130c93023b35a6ec4b3b764b6d45a3c6830
technomancy/leiningen
core.clj
(ns sample2.core (:require sample2.alt) (:gen-class))
null
https://raw.githubusercontent.com/technomancy/leiningen/24fb93936133bd7fc30c393c127e9e69bb5f2392/test_projects/sample/checkouts/sample2/src/sample2/core.clj
clojure
(ns sample2.core (:require sample2.alt) (:gen-class))
78a2e36d780ce96ec031c697dbc1afef017da417cd00c721d5201385a13b3f0c
tfausak/rattletrap
Keyframe.hs
module Rattletrap.Type.Keyframe where import qualified Rattletrap.ByteGet as ByteGet import qualified Rattletrap.BytePut as BytePut import qualified Rattletrap.Schema as Schema import qualified Rattletrap.Type.F32 as F32 import qualified Rattletrap.Type.U32 as U32 import qualified Rattletrap.Utility.Json as Json data...
null
https://raw.githubusercontent.com/tfausak/rattletrap/cc6d6aba923d840f23de7673cab9a043096d3099/src/lib/Rattletrap/Type/Keyframe.hs
haskell
| The frame number of this key frame, starting from 0. | The bit position of this key frame in the stream.
module Rattletrap.Type.Keyframe where import qualified Rattletrap.ByteGet as ByteGet import qualified Rattletrap.BytePut as BytePut import qualified Rattletrap.Schema as Schema import qualified Rattletrap.Type.F32 as F32 import qualified Rattletrap.Type.U32 as U32 import qualified Rattletrap.Utility.Json as Json data...
24eba7a64ac249a99740d59da7edce5bbd1779457306003b4e426c98554097e0
panda-planner-dev/ipc2020-domains
d-10.lisp
(defdomain domain ( (:operator (!obtain_permit ?op_h) ;; preconditions ( (type_Hazardous ?op_h) (not (Have_Permit ?op_h)) ) ;; delete effects () ;; add effects ((Have_Permit ?op_h)) ) (:operator (!collect_fees ?cf_p) ;; preconditions ( (type_Package ?cf_p) ...
null
https://raw.githubusercontent.com/panda-planner-dev/ipc2020-domains/9adb54325d3df35907adc7115fcc65f0ce5953cc/partial-order/UM-Translog/other/SHOP2/d-10.lisp
lisp
preconditions delete effects add effects preconditions delete effects add effects preconditions delete effects add effects preconditions delete effects add effects preconditions delete effects add effects preconditions delete effects add effects preconditions delete effects add effects preconditio...
(defdomain domain ( (:operator (!obtain_permit ?op_h) ( (type_Hazardous ?op_h) (not (Have_Permit ?op_h)) ) () ((Have_Permit ?op_h)) ) (:operator (!collect_fees ?cf_p) ( (type_Package ?cf_p) (not (Fees_Collected ?cf_p)) ) () ((Fees_Collected ?cf_p)) ) (:o...
3513645a502ca2aed23b3066cf46663c5463d47b4073f8e758ac150faa9b2fba
pauek/arc-sbcl
cps.lisp
(in-package :arc/test) (deftest t-equal/cps (chk (%equal/cps '(a b) '(a b))) (chk (%equal/cps '(#\a 1) '(#\a 1))) (chk (%equal/cps '(#:k) '(#:z))) (chk (not (%equal/cps '(#:i #:i) '(#:a #:b)))) (chk (not (%equal/cps '(#:i #:j) '(#:a #:a)))) (chk (%equal/cps '(fn (#:k1) a b c) '(fn (#:k2) a b c))) (chk ...
null
https://raw.githubusercontent.com/pauek/arc-sbcl/c1a5be2a55b9b3e1327409f71d9bc985577198d6/test/cps.lisp
lisp
(in-package :arc/test) (deftest t-equal/cps (chk (%equal/cps '(a b) '(a b))) (chk (%equal/cps '(#\a 1) '(#\a 1))) (chk (%equal/cps '(#:k) '(#:z))) (chk (not (%equal/cps '(#:i #:i) '(#:a #:b)))) (chk (not (%equal/cps '(#:i #:j) '(#:a #:a)))) (chk (%equal/cps '(fn (#:k1) a b c) '(fn (#:k2) a b c))) (chk ...
ed035fedaf1c77a84ef63d292cb509a9c9c872f2b09eaafe0ba80b4727b068d0
atdixon/thurber
user_score_opt.clj
(ns game.user-score-opt (:require [thurber :as th] [clojure.tools.logging :as log] [deercreeklabs.lancaster :as lan]) (:import (org.apache.beam.sdk.io TextIO) (org.apache.beam.sdk.values KV) (org.apache.beam.sdk.transforms Sum) (thurber.java TCoder) ...
null
https://raw.githubusercontent.com/atdixon/thurber/38b86a683e446f2deed55fad157476ae05940d50/demo/game/user_score_opt.clj
clojure
Optimization #1: To minimize payload of message bytes (and therefore storage demands for the batch or each message payload will contain the full classname in each payload. Optimization #2: Use low-level primitive array operations on a type-hinted array to avoid Optimization #2/a: clojure.core/aget here nee...
(ns game.user-score-opt (:require [thurber :as th] [clojure.tools.logging :as log] [deercreeklabs.lancaster :as lan]) (:import (org.apache.beam.sdk.io TextIO) (org.apache.beam.sdk.values KV) (org.apache.beam.sdk.transforms Sum) (thurber.java TCoder) ...
c8f474af613ae3791124845ba3350a9cd9ee65eaabcd4ac705c573c401a61e0d
heraldry/heraldicon
charge_group.cljs
(ns heraldicon.frontend.component.charge-group (:require [heraldicon.context :as c] [heraldicon.frontend.component.core :as component] [heraldicon.frontend.component.element :as component.element] [heraldicon.frontend.component.tree :as tree] [heraldicon.frontend.element.charge-group-preset-select :as ...
null
https://raw.githubusercontent.com/heraldry/heraldicon/71126cfd7ba342dea0d1bb849be92cbe5290a6fd/src/heraldicon/frontend/component/charge_group.cljs
clojure
(ns heraldicon.frontend.component.charge-group (:require [heraldicon.context :as c] [heraldicon.frontend.component.core :as component] [heraldicon.frontend.component.element :as component.element] [heraldicon.frontend.component.tree :as tree] [heraldicon.frontend.element.charge-group-preset-select :as ...
5e2324a122f79c44d60953b3c9b8c95d579626e213e6e2dbb4188836679eb4c1
typedclojure/typedclojure
ignore.clj
Copyright ( c ) , contributors . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;...
null
https://raw.githubusercontent.com/typedclojure/typedclojure/e3bbf031b1b109e4b17daf96617fed0d025cdc74/typed/clj.checker/src/typed/cljc/checker/check/ignore.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) , contributors . (ns typed.cljc.checker.check.ignore (:require [typed.cljc.checker.check-below :as below] [typed.cljc.checker.type-rep :as r] [typed.cljc.checker.utils :as u])) (defn tc-ignore-expr [expr expected] (-> expr (assoc u/expr-type (below/maybe-ch...
bfa18ab717f17009537d3c5597fcc5a1347b42852a83648adde12230fa174f44
CorticalComputer/Book_NeuroevolutionThroughErlang
cortex.erl
This source code and work is provided and developed by DXNN Research Group WWW.DXNNResearch . COM %% Copyright ( C ) 2012 by , DXNN Research Group , %All rights reserved. % This code is licensed under the version 3 of the GNU General Public License . Please see the LICENSE file that accompanies this project for th...
null
https://raw.githubusercontent.com/CorticalComputer/Book_NeuroevolutionThroughErlang/81b96e3d7985624a6183cb313a7f9bff0a7e14c5/Ch_7/cortex.erl
erlang
All rights reserved.
This source code and work is provided and developed by DXNN Research Group WWW.DXNNResearch . COM Copyright ( C ) 2012 by , DXNN Research Group , This code is licensed under the version 3 of the GNU General Public License . Please see the LICENSE file that accompanies this project for the terms of use . -module(c...
6643ea6496f3ffbf52d3439160d1461d9ef93bccdc848779c37f4046d68f4def
digital-asset/ghc
T13506.hs
# LANGUAGE FlexibleInstances , FunctionalDependencies , MultiParamTypeClasses # module Bug where class FunDep lista a | lista -> a instance FunDep [a] a singleton :: FunDep lista a => a -> lista singleton _ = undefined -- this error is expected: Could n't match type ' ' with ' ( ) ' -- arising from a function...
null
https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/typecheck/should_fail/T13506.hs
haskell
this error is expected: arising from a functional dependency between but this one is not: arising from a functional dependency between constraints:
# LANGUAGE FlexibleInstances , FunctionalDependencies , MultiParamTypeClasses # module Bug where class FunDep lista a | lista -> a instance FunDep [a] a singleton :: FunDep lista a => a -> lista singleton _ = undefined Could n't match type ' ' with ' ( ) ' constraint ' FunDep [ ] ( ) ' arising from a use...
01842220a7bcb9657cc200d69d558a436b907b98421b7314227d33a8467d2a87
fabricate-site/fabricate
html_test.clj
(ns site.fabricate.prototype.html-test (:require [site.fabricate.prototype.html :as html :refer :all] [site.fabricate.prototype.schema :as schema] [malli.core :as m :refer [validate]] [malli.error :as me] [malli.generator :as mg] [clojure.set :as set] ...
null
https://raw.githubusercontent.com/fabricate-site/fabricate/d2999e6306b54c28ca67aa49bf74102889d4ec3c/test/site/fabricate/prototype/html_test.clj
clojure
(ns site.fabricate.prototype.html-test (:require [site.fabricate.prototype.html :as html :refer :all] [site.fabricate.prototype.schema :as schema] [malli.core :as m :refer [validate]] [malli.error :as me] [malli.generator :as mg] [clojure.set :as set] ...
8072e03d6aaf695a5f67abf18dff7e89e971d321b4ce4ef448a3cdc5d26ef13f
Clozure/ccl-tests
modules.lsp
;-*- Mode: Lisp -*- Author : Created : Sat Apr 30 19:51:06 2005 ;;;; Contains: Tests of *MODULES*, PROVIDE, and REQUIRE (in-package :cl-test) (deftest modules.1 (notnot (every #'stringp *modules*)) t) (deftest modules.2 (let ((*modules* *modules*)) (provide "FOO") (notnot (member "FOO" *...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/modules.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of *MODULES*, PROVIDE, and REQUIRE
Author : Created : Sat Apr 30 19:51:06 2005 (in-package :cl-test) (deftest modules.1 (notnot (every #'stringp *modules*)) t) (deftest modules.2 (let ((*modules* *modules*)) (provide "FOO") (notnot (member "FOO" *modules* :test #'string=))) t) (deftest modules.3 (let ((*modules* *modules...
036fee7311e686734f85dc5d992681af53909a68fa7a12c0fd1c839c334e587a
pascal-knodel/haskell-craft
E'5'18.hs
-- -- -- ----------------- Exercise 5.18 . ----------------- -- -- -- module E'5'18 where doubleAll :: [Integer] -> [Integer] doubleAll xs = [ 2 * x | x <- xs ] -- Other solution for "doubleAll": doubleAll' :: [Integer] -> [Integer] doubleAll' xs = map (2 *) xs
null
https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/Chapter%205/E'5'18.hs
haskell
--------------- --------------- Other solution for "doubleAll":
Exercise 5.18 . module E'5'18 where doubleAll :: [Integer] -> [Integer] doubleAll xs = [ 2 * x | x <- xs ] doubleAll' :: [Integer] -> [Integer] doubleAll' xs = map (2 *) xs
17891b9e7148c97a5e7497d9afcbc20271203321d95ff3b87a054e7a9dd6f770
pixlsus/registry.gimp.org_static
script-fu-make-anaglyph.scm
; ; make-anaglyph ; ; ( ) ; On-line portfolio: <>. ; 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 2 of the License , or ; (at your option) any later version. ; ; This prog...
null
https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/script-fu-make-anaglyph.scm
scheme
make-anaglyph On-line portfolio: <>. This program is free software; you can redistribute it and/or modify either version 2 of the License , or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of ME...
( ) it under the terms of the GNU General Public License as published by In order to make use of this program you will first need a pair of images both images as different layers in the same image window in Gimp with the leaving the two images as seperate layers so that final alignment adjust- Any colo...
5f3ebd0ccb8a2532830bc3dca2b6bf8e881e795e47f37c8d88b8c5025ce940e5
mbenelli/klio
buffmap-test.scm
; Test (##namespace ("buffmap-test#")) (##include "~~lib/gambit#.scm") (##include "../klio/test.scm") (load "../klio/ctypes") (load "../klio/buffmap") (##namespace ("buffmap#" make-var build-accessors)) (define buffer (u8vector ; type little-endian big-endian #x00 ; u8 ...
null
https://raw.githubusercontent.com/mbenelli/klio/33c11700d6080de44a22a27a5147f97899583f6e/tests/buffmap-test.scm
scheme
Test type little-endian big-endian u8 0 0
(##namespace ("buffmap-test#")) (##include "~~lib/gambit#.scm") (##include "../klio/test.scm") (load "../klio/ctypes") (load "../klio/buffmap") (##namespace ("buffmap#" make-var build-accessors)) (define buffer u8 255 255 bits 01111111 u8 1 1 f32...
12644c588c766e7c2e56f8edeaabd479a4cb73115d8665fa8f79bd23923b8546
exercism/erlang
raindrops_tests.erl
Generated with ' v0.2.0 ' %% Revision 1 of the exercises generator was used %% -specifications/raw/42dd0cea20498fd544b152c4e2c0a419bb7e266a/exercises/raindrops/canonical-data.json %% This file is automatically generated from the exercises canonical data. -module(raindrops_tests). -include_lib("erl_exercism/include...
null
https://raw.githubusercontent.com/exercism/erlang/57ac2707dae643682950715e74eb271f732e2100/exercises/practice/raindrops/test/raindrops_tests.erl
erlang
Revision 1 of the exercises generator was used -specifications/raw/42dd0cea20498fd544b152c4e2c0a419bb7e266a/exercises/raindrops/canonical-data.json This file is automatically generated from the exercises canonical data.
Generated with ' v0.2.0 ' -module(raindrops_tests). -include_lib("erl_exercism/include/exercism.hrl"). -include_lib("eunit/include/eunit.hrl"). '1_the_sound_for_1_is_1_test_'() -> {"the sound for 1 is 1", ?_assertEqual("1", raindrops:convert(1))}. '2_the_sound_for_3_is_pling_test_'() -> {"the sou...
e5f669dbd84522ba542537a6f86c2c49937096207f6416665e010fa58e4e364f
deadpendency/deadpendency
DependencyAssessmentViolation.hs
# OPTIONS_GHC -fno - warn - orphans # module Common.HtmlReport.Instances.Assessment.DependencyAssessmentViolation (parsePackageDeprecated, parseDeprecatedFor) where import Common.HtmlReport.HtmlReport import Common.HtmlReport.HtmlReportDecodeError import Common.HtmlReport.Instances.PackageLink import Common.Model.Ass...
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/HtmlReport/Instances/Assessment/DependencyAssessmentViolation.hs
haskell
# OPTIONS_GHC -fno - warn - orphans # module Common.HtmlReport.Instances.Assessment.DependencyAssessmentViolation (parsePackageDeprecated, parseDeprecatedFor) where import Common.HtmlReport.HtmlReport import Common.HtmlReport.HtmlReportDecodeError import Common.HtmlReport.Instances.PackageLink import Common.Model.Ass...
2e52513c61230146f946700ebb152a858bbba6612f9820e4fe8e5d3e1305bf5b
b0-system/b0
b0_cli.ml
--------------------------------------------------------------------------- Copyright ( c ) 2020 The b0 programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
null
https://raw.githubusercontent.com/b0-system/b0/cbe12b8a55da6b50ab01ed058b339dbed3cfe894/src/b0_cli.ml
ocaml
--------------------------------------------------------------------------- Copyright ( c ) 2020 The b0 programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
8d1569a6e5f16ae39313ea6894f092b943ab3a615e72915bed1d91fdfeb7c94e
Metaxal/quickscript-extra
regexp-replace.rkt
#lang racket/base (require framework/gui-utils racket/gui racket/help quickscript) (script-help-string "Replace patterns in the selected text using regular expressions.") (editor-set-x-selection-mode #t) (define str-out #f) (define str-in #f) (define f (new dialog% [label "Regexp Replace"...
null
https://raw.githubusercontent.com/Metaxal/quickscript-extra/526b2eccd9f73ea30bbc013741fdd77f4e2724cf/scripts/regexp-replace.rkt
racket
title from to protect-from protect-to "Templates:"] Hack: Setting the label afterwards ensures both fields have the same size. apply the regexes only per line (set! str-out (regexp-replace* t1-re str-in t2-re)) ; problems with that, e.g., with "\n" Performs a (extended) regexp-replace* on the selection. The "from"...
#lang racket/base (require framework/gui-utils racket/gui racket/help quickscript) (script-help-string "Replace patterns in the selected text using regular expressions.") (editor-set-x-selection-mode #t) (define str-out #f) (define str-in #f) (define f (new dialog% [label "Regexp Replace"...
c4ede86531fdd762b74813b63a12896ca1ef75e7135ab64bb6a69346b21a7be8
softwarelanguageslab/maf
R5RS_various_infinite-2-1.scm
; Changes: * removed : 0 * added : 1 * swaps : 0 ; * negated predicates: 0 ; * swapped branches: 0 ; * calls to id fun: 0 (letrec ((t (lambda (x) (t (+ x 1))))) (<change> () (t 0)) (t 0))
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_various_infinite-2-1.scm
scheme
Changes: * negated predicates: 0 * swapped branches: 0 * calls to id fun: 0
* removed : 0 * added : 1 * swaps : 0 (letrec ((t (lambda (x) (t (+ x 1))))) (<change> () (t 0)) (t 0))
91f94e2fa7f6d2ea3f3a1d2bb6b203a9da1cf859ec210b44791ec8295025beb8
pezipink/fairylog
expander.rkt
Copyright , 2019 #lang racket/base (require (for-syntax syntax/parse racket/string racket/base racket/list racket/syntax racket/string racket/function syntax/srcloc ...
null
https://raw.githubusercontent.com/pezipink/fairylog/f0c1d0d82e2ed9ff02486ddd91a0ede5c5483ef7/expander.rkt
racket
true when expanding inside an always block with a sensitivity list (printf "setting current module ~a\n" name) important note: these mutable structs do not work "globally", they are for local expansion purposes only. the modules and ports are also exposed via static bindings for other files to see. here we check ...
Copyright , 2019 #lang racket/base (require (for-syntax syntax/parse racket/string racket/base racket/list racket/syntax racket/string racket/function syntax/srcloc ...
e2d0c09d052a2f99ee2d9043713d86e69f03772f72450d1f21ff433102513099
mitchellwrosen/planet-mitchell
Dynamic.hs
module Dynamic ( -- * Dynamic Dynamic(..) , toDyn , fromDynamic , dynApply , dynTypeRep ) where import Data.Dynamic
null
https://raw.githubusercontent.com/mitchellwrosen/planet-mitchell/18dd83204e70fffcd23fe12dd3a80f70b7fa409b/planet-mitchell/src/Dynamic.hs
haskell
* Dynamic
module Dynamic Dynamic(..) , toDyn , fromDynamic , dynApply , dynTypeRep ) where import Data.Dynamic
d00955b15d704d06849affcad4906e1767935a9a9ec39a3aca8df6189fdde85b
braveclojure/training
ex11_read_eval_macros.clj
(ns training.exercises.ex11-read-eval-macros) ;; ======================================== ;; Read and Eval ;; ======================================== The reader reads text to produce a Clojure data structure . When you write Clojure , you 're writing text that represents data structures . (read-string "(+ 1 2)")...
null
https://raw.githubusercontent.com/braveclojure/training/5b7fb9059c17b2166c2e66850094f424319e55eb/exercises/src/training/exercises/ex11_read_eval_macros.clj
clojure
======================================== Read and Eval ======================================== The evaluator evaluates those data structures What's with the '? You can manipulate data structures before they get evald aside: you can use destructuring sending the result to the evaluator You try: * Write some c...
(ns training.exercises.ex11-read-eval-macros) The reader reads text to produce a Clojure data structure . When you write Clojure , you 're writing text that represents data structures . (read-string "(+ 1 2)") (= '(+ 1 2) (read-string "(+ 1 2)")) (= 3 (read-string "(+ 1 2)")) (eval (read-string "(+ 1 2)")) (eval...
f5fddcd2bd68cffeadbdeb312778cabdad4fd49e6ec63f880cc6e1cb2287a565
janestreet/async_smtp
envelope_selector.ml
open! Core.Core_stable module Stable = struct module Base = struct module V1 = struct type t = (* When adding to this type, don't forget to add to examples below. *) [ Email_message.Email_selector.Stable.Base.V1.t | `envelope_sender of Re2.Stable.V1_no_options.t | `exists_en...
null
https://raw.githubusercontent.com/janestreet/async_smtp/7b0633e75a84e1cca91441ebacfb8200c308b759/types/envelope_selector.ml
ocaml
When adding to this type, don't forget to add to examples below.
open! Core.Core_stable module Stable = struct module Base = struct module V1 = struct type t = [ Email_message.Email_selector.Stable.Base.V1.t | `envelope_sender of Re2.Stable.V1_no_options.t | `exists_envelope_recipient of Re2.Stable.V1_no_options.t | `all_envelope_recipien...
ef1560655d7b466bfb2d2af5dd351afb48568c08d48f78111f692d011fbd224e
pyr/riemann-extra
webhook.clj
(ns org.spootnik.riemann.webhook (:require [clj-http.client :as client]) (:require [cheshire.core :as json])) (defn post "POST to a webhook URL." [request url] (client/post url {:body (json/generate-string request) :socket-timeout 5000 :conn-timeout 5000 ...
null
https://raw.githubusercontent.com/pyr/riemann-extra/6a70763a4a86ed4fe82382486113de0f6b765e28/src/org/spootnik/riemann/webhook.clj
clojure
(ns org.spootnik.riemann.webhook (:require [clj-http.client :as client]) (:require [cheshire.core :as json])) (defn post "POST to a webhook URL." [request url] (client/post url {:body (json/generate-string request) :socket-timeout 5000 :conn-timeout 5000 ...
f82e83886ec5740559f224a7ec5bfa548ec424a06c87ed8ee33ddd0d34c97745
fugue/fregot
Test.hs
| Copyright : ( c ) 2020 Fugue , Inc. License : Apache License , version 2.0 Maintainer : Stability : experimental Portability : POSIX Copyright : (c) 2020 Fugue, Inc. License : Apache License, version 2.0 Maintainer : Stability : experimental Portability : POSIX -} {-# LANGUAGE Over...
null
https://raw.githubusercontent.com/fugue/fregot/c3d87f37c43558761d5f6ac758d2f1a4117adb3e/lib/Fregot/Main/Test.hs
haskell
# LANGUAGE OverloadedStrings #
| Copyright : ( c ) 2020 Fugue , Inc. License : Apache License , version 2.0 Maintainer : Stability : experimental Portability : POSIX Copyright : (c) 2020 Fugue, Inc. License : Apache License, version 2.0 Maintainer : Stability : experimental Portability : POSIX -} # LANGUAGE Templa...
a910f450fc4dcd3068a65ada9615873ca2b9a94b0b424e32fb5a70b1bdd6d47b
FundingCircle/fc4-framework
watch_test.clj
(ns fc4.io.watch-test (:require [clojure.java.io :refer [copy delete-file file writer]] [clojure.string :refer [split-lines]] [clojure.test :refer [deftest is testing use-fixtures]] [fc4.io.watch :as e] [fc4.io.util :as u] [fc4.test-utils.io :refer [tmp-copy...
null
https://raw.githubusercontent.com/FundingCircle/fc4-framework/674af39e7edb2cbfd3e1941e6abe80fd87d93bed/test/fc4/io/watch_test.clj
clojure
...should trigger a single invocation of the process fn, even though the process fn changes the file. failsafe change the file, which hopefully will not trigger the watch again watch needs to be started inside the with-out-str change the file, triggering the watch We had a bug wherein if an exception was thrown ...
(ns fc4.io.watch-test (:require [clojure.java.io :refer [copy delete-file file writer]] [clojure.string :refer [split-lines]] [clojure.test :refer [deftest is testing use-fixtures]] [fc4.io.watch :as e] [fc4.io.util :as u] [fc4.test-utils.io :refer [tmp-copy...
22fb9523fc12f910d505d2efe70fdc85d8ae9275235dc6f6fe81fae324142261
fujita-y/ypsilon
28.scm
#!nobacktrace (define-library (srfi 28) (import (core)) (export format))
null
https://raw.githubusercontent.com/fujita-y/ypsilon/44260d99e24000f9847e79c94826c3d9b76872c2/sitelib/srfi/28.scm
scheme
#!nobacktrace (define-library (srfi 28) (import (core)) (export format))
bfe72122f1d98fdba469555af1f9360bc10f2d418332960cf42eae92dd70349c
humorless/spark-movie-lens
profiles.clj
{:profiles/dev {:env {:database-url "jdbc:postgresql"}} :profiles/test {:env {:database-url "jdbc:postgresql"}}}
null
https://raw.githubusercontent.com/humorless/spark-movie-lens/3062227f0087f8437144cebc5f8cfbd2ee74e965/profiles.clj
clojure
{:profiles/dev {:env {:database-url "jdbc:postgresql"}} :profiles/test {:env {:database-url "jdbc:postgresql"}}}
1c76757b2f5e40e029ab5ea649768a8322eef29025760c39efa2bb4e72214127
martinsumner/kv_index_tictactree
mockvnode_SUITE.erl
-module(mockvnode_SUITE). -include_lib("common_test/include/ct.hrl"). -export([all/0]). -export([coveragefold_nativemedium/1, coveragefold_nativesmall/1, coveragefold_parallelmedium/1, coveragefold_parallelmediumko/1, coveragefold_parallelsmall/1, loadexchange...
null
https://raw.githubusercontent.com/martinsumner/kv_index_tictactree/7c825d5edd435b88f3474702d4651db90cbdafb9/test/end_to_end/mockvnode_SUITE.erl
erlang
and then once a difference is created, discover any difference key store) to be kept in parallel) Keep some rogue objects to cause failures, by not putting them correctly into both vnodes. These aren't loaded yet Between startup and shutdown the next_rebuild will be rescheduled to a different time, as the loo...
-module(mockvnode_SUITE). -include_lib("common_test/include/ct.hrl"). -export([all/0]). -export([coveragefold_nativemedium/1, coveragefold_nativesmall/1, coveragefold_parallelmedium/1, coveragefold_parallelmediumko/1, coveragefold_parallelsmall/1, loadexchange...
d7f70489096fdfc7adcad9cb887336a5b7dd41b297f21095ca02328411fb4ab0
MinaProtocol/mina
call_stack_digest_intf.ml
open Core_kernel module type Full = sig include Digest_intf.S val cons : Stack_frame.Digest.t -> t -> t val empty : t val gen : t Quickcheck.Generator.t module Checked : sig include Digest_intf.S_checked val cons : Stack_frame.Digest.Checked.t -> t -> t end include Digest_intf.S_aux with ty...
null
https://raw.githubusercontent.com/MinaProtocol/mina/7a380064e215dc6aa152b76a7c3254949e383b1f/src/lib/mina_base/call_stack_digest_intf.ml
ocaml
open Core_kernel module type Full = sig include Digest_intf.S val cons : Stack_frame.Digest.t -> t -> t val empty : t val gen : t Quickcheck.Generator.t module Checked : sig include Digest_intf.S_checked val cons : Stack_frame.Digest.Checked.t -> t -> t end include Digest_intf.S_aux with ty...
df6d9733b9e5aa32542931875875fc4e8ec7df1885d16a37d9728e78f1fb996c
xapi-project/xen-api
get_vhd_vsize.ml
module Impl = Vhd_format.F.From_file (Vhd_format_lwt.IO) open Vhd_format.F open Vhd_format_lwt.IO module In = From_input (Input) open In let get_vhd_vsize filename = Vhd_format_lwt.IO.openfile filename false >>= fun fd -> let rec loop = function | End -> return () | Cons (hd, tl) -> ( match...
null
https://raw.githubusercontent.com/xapi-project/xen-api/4bec5fac844f5b1e030dd0ec19f35395bef85f00/ocaml/vhd-tool/cli/get_vhd_vsize.ml
ocaml
module Impl = Vhd_format.F.From_file (Vhd_format_lwt.IO) open Vhd_format.F open Vhd_format_lwt.IO module In = From_input (Input) open In let get_vhd_vsize filename = Vhd_format_lwt.IO.openfile filename false >>= fun fd -> let rec loop = function | End -> return () | Cons (hd, tl) -> ( match...
253b887f8ce4152ae6be4bc44685e212e681909cd21468da85af147ad816cc57
PEZ/rich4clojure
problem_039.clj
(ns rich4clojure.easy.problem-039 (:require [hyperfiddle.rcf :refer [tests]])) = Interleave Two Seqs = By 4Clojure user : ;; Difficulty: Easy Tags : [ seqs core - functions ] ;; Write a function which takes two sequences and returns the first item from each , then the second item from each , then the t...
null
https://raw.githubusercontent.com/PEZ/rich4clojure/28ea575ede8677f3a97437a646cdb3376a28ebc9/src/rich4clojure/easy/problem_039.clj
clojure
Difficulty: Easy Share your solution, and/or check how others did it:
(ns rich4clojure.easy.problem-039 (:require [hyperfiddle.rcf :refer [tests]])) = Interleave Two Seqs = By 4Clojure user : Tags : [ seqs core - functions ] Write a function which takes two sequences and returns the first item from each , then the second item from each , then the third , etc . (def restr...
24e37d06723ddbd40a8f39d334a39e82c2b239de4612272c0ce61a459e59c594
mbenke/zpf2012
DotTime.hs
import System.CPUTime (getCPUTime) import System.Random (newStdGen) import Control.Exception (evaluate) import Data.Array.Parallel.PArray (PArray, randomRs, nf) import DotP (dotp_wrapper) -- import vectorised code main :: IO () main = do -- generate random input vectors gen1 <- newStdGen gen2 ...
null
https://raw.githubusercontent.com/mbenke/zpf2012/faad6468f9400059de1c0735e12a84a2fdf24bb4/Code/dph/DotTime.hs
haskell
import vectorised code generate random input vectors force the evaluation of the input vectors timed computations print the result vector length range of vector elements
import System.CPUTime (getCPUTime) import System.Random (newStdGen) import Control.Exception (evaluate) import Data.Array.Parallel.PArray (PArray, randomRs, nf) main :: IO () main = do gen1 <- newStdGen gen2 <- newStdGen let v = randomRs n range gen1 w = randomRs n range gen2 ...