_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
c5f02f971404e557154b8aa771c2229e9071ece2cd6dba45d93a8b6d2fdf4e5c
footprintanalytics/footprint-web
classify_test.clj
(ns metabase.sync.analyze.classify-test (:require [clojure.test :refer :all] [metabase.models.database :refer [Database]] [metabase.models.field :as field :refer [Field]] [metabase.models.field-values :as field-values] [metabase.models.interface :as mi] [met...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/sync/analyze/classify_test.clj
clojure
this will be marked as :type/Category based on name, but fingerprinters should override
(ns metabase.sync.analyze.classify-test (:require [clojure.test :refer :all] [metabase.models.database :refer [Database]] [metabase.models.field :as field :refer [Field]] [metabase.models.field-values :as field-values] [metabase.models.interface :as mi] [met...
e6e7ff34d27dd5b799df9288a33de1baf1ef7f4b38507e478259cffe253ddfea
ertugrulcetin/konva-cljs
canvas_scrolling.cljs
(ns examples.canvas-scrolling (:require [konva-cljs.components :as c] [reagent.core :as r] [goog.dom :as dom] [goog.object :as ob])) (def padding 500) (def height 3000) (def width 3000) (def state (atom {})) (defn- reposition-stage [] (let [scroll-container (dom/getElement "...
null
https://raw.githubusercontent.com/ertugrulcetin/konva-cljs/338e3e76a10857e12880ddf10ca05b0b4a2a653e/examples/src/cljs/examples/canvas_scrolling.cljs
clojure
(ns examples.canvas-scrolling (:require [konva-cljs.components :as c] [reagent.core :as r] [goog.dom :as dom] [goog.object :as ob])) (def padding 500) (def height 3000) (def width 3000) (def state (atom {})) (defn- reposition-stage [] (let [scroll-container (dom/getElement "...
2ddd874706bdc4a886d87f8038c69e0114d6c742b440d14e76deeedefe2ae0bd
psholtz/MIT-SICP
exercise2-30.scm
;; ;; Exercise 2.30 ;; ;; Define a procedure "square-tree" analogous to the "square-list" procedure of Exercise 2.21 . That is , " square - tree " should behave as follows : ;; ( square - tree ( list 1 ( list 2 ( list 3 4 ) 5 ) ( list 6 7 ) ) ) = = > ( 1 ( 4 ( 9 16 ) 25 ) ( 36 49 ) ) ;; ;; ;; Define supporting p...
null
https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Section-2.2/mit-scheme/exercise2-30.scm
scheme
Exercise 2.30 Define a procedure "square-tree" analogous to the "square-list" procedure of Exercise Define supporting procedures: Define "square-tree" directly: Run some unit tests: Define "square-tree" using map and lambda: Run some unit tests:
2.21 . That is , " square - tree " should behave as follows : ( square - tree ( list 1 ( list 2 ( list 3 4 ) 5 ) ( list 6 7 ) ) ) = = > ( 1 ( 4 ( 9 16 ) 25 ) ( 36 49 ) ) (define (square n) (* n n)) (define (square-tree tree) (cond ((null? tree) '()) ((not (pair? tree)) (square tree)) (else (cons (square-...
801b91ba2dbb15385ad780632020efdfcd219718f04f2f0a9297ebcb26c101fb
glutamate/bugpan
Compiler.hs
module Compiler where import Expr import EvalM import System.Random import Data.HashTable as H import Daq import Numbers import Control.Concurrent import Statement import BuiltIn import PrettyPrint import RandomSources import OpenGL (setTexture) compile :: [Declare] -> [Stmt] compile ds = let c = concatMap compileDec...
null
https://raw.githubusercontent.com/glutamate/bugpan/d0983152f5afce306049262cba296df00e52264b/Compiler.hs
haskell
inMainLoop (ReadSrcAction _ _) = True note: Now, Event :: [(T,a)] -> Event a what if Event :: ([(T,a)] -> [(T,a)]) -> Event a or something like that
module Compiler where import Expr import EvalM import System.Random import Data.HashTable as H import Daq import Numbers import Control.Concurrent import Statement import BuiltIn import PrettyPrint import RandomSources import OpenGL (setTexture) compile :: [Declare] -> [Stmt] compile ds = let c = concatMap compileDec...
21df5566858ddc6ae5a25b95a3c32684a680a3b4f41c98f0d27dd91cd9bce5f8
Liqwid-Labs/plutus-extra
Natural.hs
# LANGUAGE QuasiQuotes # module Suites.Natural (tests) where import PlutusTx.Natural ( Natural, Parity (Even, Odd), nat, parity, ) import PlutusTx.Numeric.Extra (powNat, rem, (^-)) import PlutusTx.Prelude qualified as Plutus import Test.QuickCheck ( Property, forAllShrink, (===), ) import Test.QuickCh...
null
https://raw.githubusercontent.com/Liqwid-Labs/plutus-extra/592b4fbc6d0a66e6ca8f105224839783bbb0a387/plutus-numeric/test/property/Suites/Natural.hs
haskell
# LANGUAGE QuasiQuotes # module Suites.Natural (tests) where import PlutusTx.Natural ( Natural, Parity (Even, Odd), nat, parity, ) import PlutusTx.Numeric.Extra (powNat, rem, (^-)) import PlutusTx.Prelude qualified as Plutus import Test.QuickCheck ( Property, forAllShrink, (===), ) import Test.QuickCh...
19629f1adc5b74b078719023b14e51feb83f6ae77914f96b297392862fa4c6e3
robert-strandh/SICL
packages.lisp
(cl:in-package #:common-lisp-user) (defpackage #:sicl-compiler (:use #:common-lisp) (:local-nicknames (#:env #:sicl-environment)) (:shadow #:undefined-function) (:export #:debug-information #:code-object #:instructions #:literals #:call-sites #:ensure-lite...
null
https://raw.githubusercontent.com/robert-strandh/SICL/a99a73f6285279c04859a2b4cedb059b1bb0f268/Code/Compiler/packages.lisp
lisp
(cl:in-package #:common-lisp-user) (defpackage #:sicl-compiler (:use #:common-lisp) (:local-nicknames (#:env #:sicl-environment)) (:shadow #:undefined-function) (:export #:debug-information #:code-object #:instructions #:literals #:call-sites #:ensure-lite...
5652859d21a05eb647a19c329fc330008db738c30b06f312c8463ecc1fb32f06
randomseed-io/bankster
fs.clj
(ns io.randomseed.bankster.util.fs ^{:doc "Support functions and macros, filesystem operations." :author "Paweł Wilk" :added "1.0.0"} (:require [clojure.string :as str] [clojure.java.io :as io] [clojure.java.classpath :as cp] ...
null
https://raw.githubusercontent.com/randomseed-io/bankster/a4e1c475e87b5d1824e6831771dfbb85da537d59/src/io/randomseed/bankster/util/fs.clj
clojure
(ns io.randomseed.bankster.util.fs ^{:doc "Support functions and macros, filesystem operations." :author "Paweł Wilk" :added "1.0.0"} (:require [clojure.string :as str] [clojure.java.io :as io] [clojure.java.classpath :as cp] ...
17d96c0eb6d477c3ba9cd46eea8977ddf70f814dc490309a6a0ae8b879805fc4
windymelt/cl-string-random
main.lisp
(defpackage cl-string-random/tests/main (:use :cl :cl-string-random :rove :iterate)) (in-package :cl-string-random/tests/main) ;; NOTE: To run this test file, execute `(asdf:test-system :cl-string-random)' in your Lisp. (defparameter *regexes* '("" "a" "ab" "[ab]" "a|b" "(ab)" "a*" "a+" "(...
null
https://raw.githubusercontent.com/windymelt/cl-string-random/c13bca32e8e7b04573e08f27581210f8b596966e/tests/main.lisp
lisp
NOTE: To run this test file, execute `(asdf:test-system :cl-string-random)' in your Lisp.
(defpackage cl-string-random/tests/main (:use :cl :cl-string-random :rove :iterate)) (in-package :cl-string-random/tests/main) (defparameter *regexes* '("" "a" "ab" "[ab]" "a|b" "(ab)" "a*" "a+" "(ab)*" "(ab)+" "(ab){4,10}" "(日|本|語)*" "\\d" "\\d{3}-\\d{4}" "\\s\\s\\s\\s")) (deftest test-t...
ac0f15b1a3167b66bd0112d68f6b3179c87730c7830223513c309a0c541d71ea
softwarelanguageslab/maf
R5RS_ad_qstand-2.scm
; Changes: * removed : 1 * added : 1 * swaps : 1 ; * negated predicates: 0 * swapped branches : 1 ; * calls to id fun: 0 (letrec ((quick-sort (lambda (vector) (letrec ((swap (lambda (vector index1 index2) (let ((temp (vector-ref vector index1))) ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_ad_qstand-2.scm
scheme
Changes: * negated predicates: 0 * calls to id fun: 0
* removed : 1 * added : 1 * swaps : 1 * swapped branches : 1 (letrec ((quick-sort (lambda (vector) (letrec ((swap (lambda (vector index1 index2) (let ((temp (vector-ref vector index1))) (<change> ...
8fabf0602260c833a814dc683ccc542be85540e5cafe20efe86d7c6064418d1a
xclerc/ocamljava
javalink_startup.ml
* This file is part of compiler . * Copyright ( C ) 2007 - 2015 . * * compiler is free software ; you can redistribute it and/or modify * it under the terms of the Q Public License as published by * ( with a change to choice of law ) . * * compiler is distributed in the hope that it ...
null
https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/compiler/javacomp/javalink_startup.ml
ocaml
calls moduleMain calls moduleMain
* This file is part of compiler . * Copyright ( C ) 2007 - 2015 . * * compiler is free software ; you can redistribute it and/or modify * it under the terms of the Q Public License as published by * ( with a change to choice of law ) . * * compiler is distributed in the hope that it ...
83813cc1bdb43fe222a14361ab2f18cdd73a255a033aa523262c595c27f13c12
racket/redex
threads.rkt
#lang racket (require redex) (reduction-steps-cutoff 100) (define-language threads (p ((store (x v) ...) (threads e ...))) (e (set! x e) (let ((x e)) e) (e e) x v (+ e e)) (v (lambda (x) e) number) (x variable) (pc ((store (x v) ...) tc)) (tc (threads e ... ec e ...)) (ec (...
null
https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-examples/redex/examples/threads.rkt
racket
use a pretty-printer that just summaizes the terms, showing the depth of each thread.
#lang racket (require redex) (reduction-steps-cutoff 100) (define-language threads (p ((store (x v) ...) (threads e ...))) (e (set! x e) (let ((x e)) e) (e e) x v (+ e e)) (v (lambda (x) e) number) (x variable) (pc ((store (x v) ...) tc)) (tc (threads e ... ec e ...)) (ec (...
d0a8220f5a2d7dbec53c8c42baa3924dea8814a49a158ef6c36539f0e11c5451
finnishtransportagency/harja
integraatioloki.cljs
(ns harja.tiedot.hallinta.integraatioloki "Hallinnoi integraatiolokin tietoja" (:require [reagent.core :refer [atom]] [cljs.core.async :refer [<!] :as async] [harja.asiakas.kommunikaatio :as k] [harja.loki :refer [log tarkkaile!]] [harja.pvm :as pvm] [cljs...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/e480f656f98182760f02fde199278fac0b7162c3/src/cljs/harja/tiedot/hallinta/integraatioloki.cljs
clojure
(ns harja.tiedot.hallinta.integraatioloki "Hallinnoi integraatiolokin tietoja" (:require [reagent.core :refer [atom]] [cljs.core.async :refer [<!] :as async] [harja.asiakas.kommunikaatio :as k] [harja.loki :refer [log tarkkaile!]] [harja.pvm :as pvm] [cljs...
4d668a4d663c34faaee2f4c5706585176cce746319d6c94a0d25418d269b1cba
elastic/eui-cljs
deps.cljs
{:npm-deps {"@elastic/eui" "64.0.0", "@elastic/datemath" "^5.0.3", "classnames" "^2.2.6", "moment" "^2.27.0", "prop-types" "^15.6.0", "typescript" "4.0.5"}}
null
https://raw.githubusercontent.com/elastic/eui-cljs/88737a49699cdd2fd578acff3ad32e97b2b2e798/src/deps.cljs
clojure
{:npm-deps {"@elastic/eui" "64.0.0", "@elastic/datemath" "^5.0.3", "classnames" "^2.2.6", "moment" "^2.27.0", "prop-types" "^15.6.0", "typescript" "4.0.5"}}
ba5dff66bc9989deab8b51bf52151c7f68050a9a69b3c141de9bf433e1db661b
mzp/coq-ide-for-ios
libnames.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/library/libnames.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** i i s Global reference is a kernel s...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * i $ I d : libnames.mli 13323 ...
1ccd04d8de38a6c1adbd744dc171051f0c713096f417d028b27b2c263e2f44f1
gsakkas/rite
2949.ml
let pipe fs = let f a x y = a (y x) in let base b = b in List.fold_left f base fs;; fix let pipe fs = let f a x y = a ( x y ) in let base b = b in List.fold_left f base fs ; ; let pipe fs = let f a x y = a (x y) in let base b = b in List.fold_left f base fs;; *) changed spans ( 3,19)-(3,24 ) ...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/2949.ml
ocaml
let pipe fs = let f a x y = a (y x) in let base b = b in List.fold_left f base fs;; fix let pipe fs = let f a x y = a ( x y ) in let base b = b in List.fold_left f base fs ; ; let pipe fs = let f a x y = a (x y) in let base b = b in List.fold_left f base fs;; *) changed spans ( 3,19)-(3,24 ) ...
8bda91ff7796e0d2f829505ec4d7cb768202d49cbfc279f0e55af7931e9280ab
ocaml/ocaml
main.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml/ocaml/04ddddd0e1d2bf2acb5091f434b93387243d4624/lex/main.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Syntax let ml_automata = ref false let source_name = ref None let output_name = ref None let usag...
78e21c79ba49e6222640ac886c15c15ccd34f0c34f34bf0b6cf6527fa406bd54
fgalassi/cs61a-sp11
test-reckless.scm
(load "load-simply") (load "reckless") (load "assert") (define (always-hit hand dealer-card) #t) (define (always-stand hand dealer-card) #f) (define (hit-on-empty-hand hand dealer-card) (empty? hand)) (assert equal? ((reckless always-hit) '() 'as) #t "hit if the original strategy hits (empty hand)") (assert equal? ((...
null
https://raw.githubusercontent.com/fgalassi/cs61a-sp11/66df3b54b03ee27f368c716ae314fd7ed85c4dba/projects/blackjack/normal/test-reckless.scm
scheme
(load "load-simply") (load "reckless") (load "assert") (define (always-hit hand dealer-card) #t) (define (always-stand hand dealer-card) #f) (define (hit-on-empty-hand hand dealer-card) (empty? hand)) (assert equal? ((reckless always-hit) '() 'as) #t "hit if the original strategy hits (empty hand)") (assert equal? ((...
60d31fbdda4be75d4e357a6571159b5896d53c25b00c00215686f91bdb4f8d15
joonazan/regex-equivalence
RegexEquality.hs
module RegexEquality where import Data.Text import DFA import qualified NFA import qualified Regex counterexample :: Text -> Text -> Either String (Maybe (String, Bool)) counterexample a b = do a' <- Regex.parse a b' <- Regex.parse b return $ recognizedByOne (toDfa a') (toDfa b') toDfa = NFA....
null
https://raw.githubusercontent.com/joonazan/regex-equivalence/d050c942734883c702400a1fd3abb5e45f6b6874/src/RegexEquality.hs
haskell
module RegexEquality where import Data.Text import DFA import qualified NFA import qualified Regex counterexample :: Text -> Text -> Either String (Maybe (String, Bool)) counterexample a b = do a' <- Regex.parse a b' <- Regex.parse b return $ recognizedByOne (toDfa a') (toDfa b') toDfa = NFA....
ede59cef25fd53d8c0f94a9fadb1b6953764cd7f3586116ac97455a0adfa4213
input-output-hk/cardano-base
Class.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE ...
null
https://raw.githubusercontent.com/input-output-hk/cardano-base/1ea947d123981193a6055a193bc2b0e5fd5001ba/cardano-crypto-class/src/Cardano/Crypto/VRF/Class.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # | Abstract Verifiable Random Functions. * VRF algorithm class ** VRF output * 'CertifiedVRF' wrapper * CBOR encoding and decoding * Encoded 'Size' expressions Key and signature types Unit by default (no context required) Key generation | The uppe...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Cardan...
b36e5eb6dd5c6328bcc7d3346f5d761a3b751124e2e2cd88d3a9d950d272b36d
exercism/common-lisp
grade-school-test.lisp
;; Ensures that grade-school.lisp and the testing library are always loaded (eval-when (:compile-toplevel :load-toplevel :execute) (load "grade-school") (quicklisp-client:quickload :fiveam)) ;; Defines the testing package with symbols from grade-school and FiveAM in scope ;; The `run-tests` function is exported fo...
null
https://raw.githubusercontent.com/exercism/common-lisp/b5d1a3d7bbf755c789d42e692a7ea795a5ce0938/exercises/practice/grade-school/grade-school-test.lisp
lisp
Ensures that grade-school.lisp and the testing library are always loaded Defines the testing package with symbols from grade-school and FiveAM in scope The `run-tests` function is exported for use by both the user and test-runner Enter the testing package Define and enter a new FiveAM test-suite
(eval-when (:compile-toplevel :load-toplevel :execute) (load "grade-school") (quicklisp-client:quickload :fiveam)) (defpackage :grade-school-test (:use :cl :fiveam) (:export :run-tests)) (in-package :grade-school-test) (def-suite* grade-school-suite) (test roster-is-empty-when-no-students-added (let ((sch...
071ed812dbf5b6372181ea3e8b3c6ff32df62d74db3face491e2137e3fef0168
expipiplus1/vulkan
VK_EXT_pipeline_robustness.hs
{-# language CPP #-} -- | = Name -- -- VK_EXT_pipeline_robustness - device extension -- -- == VK_EXT_pipeline_robustness -- -- [__Name String__] @VK_EXT_pipeline_robustness@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] 69 -- -- [__Revision__] 1 -- -- [__Ex...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/d765efafb2ea2965ceba268e9e4e54cbd415aa33/src/Vulkan/Extensions/VK_EXT_pipeline_robustness.hs
haskell
# language CPP # | = Name VK_EXT_pipeline_robustness - device extension == VK_EXT_pipeline_robustness [__Name String__] [__Extension Type__] Device extension [__Registered Extension Number__] [__Revision__] [__Extension and Version Dependencies__] - Requires @VK_KHR_get_physical_device_prop...
@VK_EXT_pipeline_robustness@ 69 1 - Requires support for Vulkan 1.0 2022 - 07 - 12 - Interacts with @VK_EXT_image_robustness@ - Jarred Davies , Imagination Technologies - , Imagination Technologies - , NVIDIA - , Broadcom Corporation ...
afb552a38b7b9f467eddbb5943cad29e8f87f286d5b389dd74367ae488f43026
exercism/ocaml
test.ml
(* binary-search-tree - 1.0.0 *) open Base open OUnit2 open Binary_search_tree let result_to_string f = function | Error m -> Printf.sprintf "Error \"%s\"" m | Ok x -> f x |> Printf.sprintf "Some %s" let ae exp got _test_ctxt = assert_equal ~printer:(result_to_string Int.to_string) exp got let intlist_to_strin...
null
https://raw.githubusercontent.com/exercism/ocaml/bfd6121f757817865a34db06c3188b5e0ccab518/exercises/practice/binary-search-tree/test.ml
ocaml
binary-search-tree - 1.0.0
open Base open OUnit2 open Binary_search_tree let result_to_string f = function | Error m -> Printf.sprintf "Error \"%s\"" m | Ok x -> f x |> Printf.sprintf "Some %s" let ae exp got _test_ctxt = assert_equal ~printer:(result_to_string Int.to_string) exp got let intlist_to_string l = List.map l ~f:Int.to_str...
bd5df9de48f16c63efc2bfb59c807a2c5bdef0e2d1974a2932c663dba9a9d35e
softwarelanguageslab/maf
R5RS_scp1_lightbulb-4.scm
; Changes: * removed : 1 * added : 1 * swaps : 0 * negated predicates : 1 ; * swapped branches: 0 * calls to i d fun : 3 (letrec ((MaakLampje (lambda (aantal) (<change> (letrec ((state 'off) (on! (lambda () ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_lightbulb-4.scm
scheme
Changes: * swapped branches: 0
* removed : 1 * added : 1 * swaps : 0 * negated predicates : 1 * calls to i d fun : 3 (letrec ((MaakLampje (lambda (aantal) (<change> (letrec ((state 'off) (on! (lambda () (set! state ...
f20731cc451f5fe3aa11c6f6e98319423d967bbfc85a39303dfdb3a8ead9306c
cojna/iota
SCC.hs
# LANGUAGE LambdaCase # module Data.Graph.Sparse.SCC where import Control.Monad import Control.Monad.ST import Data.Function import qualified Data.Vector.Unboxed as U import qualified Data.Vector.Unboxed.Mutable as UM import Data.Buffer import Data.Graph.Sparse import My.Prelude (rep) type ComponentId = Int strong...
null
https://raw.githubusercontent.com/cojna/iota/9acaa765ad685d466d889229d97b5a1c852a00dd/src/Data/Graph/Sparse/SCC.hs
haskell
# LANGUAGE LambdaCase # module Data.Graph.Sparse.SCC where import Control.Monad import Control.Monad.ST import Data.Function import qualified Data.Vector.Unboxed as U import qualified Data.Vector.Unboxed.Mutable as UM import Data.Buffer import Data.Graph.Sparse import My.Prelude (rep) type ComponentId = Int strong...
55340f91d55006f2a409b09f0f4d20eb33d2a41a0e235070cc3330f9e26837d1
tarides/current-albatross-deployer
main.ml
open Lwt.Syntax let socket_path = "/var/run/current-iptables-daemon/current-iptables-daemon.sock" let db_path = "/var/lib/current-iptables-daemon/db" module Config = struct type t = { network : Ipaddr.V4.Prefix.t } end module Types = Iptables_daemon_api.Types module Ipmap = struct module Map = Map.Make (Ipad...
null
https://raw.githubusercontent.com/tarides/current-albatross-deployer/f4e7b88edf2c2d71a571178466d34048dad57bf7/lib/iptables-daemon/main.ml
ocaml
assumption: name don't exist IPs Port publishing
open Lwt.Syntax let socket_path = "/var/run/current-iptables-daemon/current-iptables-daemon.sock" let db_path = "/var/lib/current-iptables-daemon/db" module Config = struct type t = { network : Ipaddr.V4.Prefix.t } end module Types = Iptables_daemon_api.Types module Ipmap = struct module Map = Map.Make (Ipad...
19e0ddbecf86b5c912393e30a833d1be4d7dea40b4021546c75116cda5d93913
Frama-C/Frama-C-snapshot
region_analysis.mli
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/loop_analysis/region_analysis.mli
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
b3053ffb74878903a60de853d695385d3b4b000c41e273faa7a542d3d7dc4205
Kakadu/fp2022
parser.ml
* Copyright 2022 - 2023 , and contributors * SPDX - License - Identifier : LGPL-3.0 - or - later open Angstrom open Parsetree (* -------------------- Basic syntax -------------------- *) (** A subset of OCaml keywords, that are used in our mini language *) let keywords = [ "else"; "false"; "fun"; "if"; "in"; "let"...
null
https://raw.githubusercontent.com/Kakadu/fp2022/5365f2f52e3e173cdb052abcfdbfb66fc70fe799/OCamlLabeledArgs/lib/parser.ml
ocaml
-------------------- Basic syntax -------------------- * A subset of OCaml keywords, that are used in our mini language Plain combinators for convenient spaces removal Combinator used for parsing binary operations Plain combinators for parentheses parsing Primitive syntax recognition ----------------- Varia...
* Copyright 2022 - 2023 , and contributors * SPDX - License - Identifier : LGPL-3.0 - or - later open Angstrom open Parsetree let keywords = [ "else"; "false"; "fun"; "if"; "in"; "let"; "mod"; "rec"; "then"; "true" ] let is_keyword s = List.mem s keywords let is_ignored = function | '\x20' | '\x09' | '\x0d' | ...
5aa0e6b503522acd5c4ca5456fd914eab989a9d80e84065fd470406e45cae823
dmvianna/haskellbook
Ch24-ipv6.hs
module IPv6 where import Data.List (elemIndex) import Data.Maybe import Data.Word import Numeric import Test.Hspec import Text.Trifecta import IPv4 hiding (main) data IPAddress6 = IPAddress6 Word64 Word64 deriving (Eq, Ord) instance Show IPAddress6 where show = show <$> ip6ToInteger ip6ToInteger :: IPAddress...
null
https://raw.githubusercontent.com/dmvianna/haskellbook/b1fdce66283ccf3e740db0bb1ad9730a7669d1fc/src/Ch24-ipv6.hs
haskell
I'm sure this can be shortened
module IPv6 where import Data.List (elemIndex) import Data.Maybe import Data.Word import Numeric import Test.Hspec import Text.Trifecta import IPv4 hiding (main) data IPAddress6 = IPAddress6 Word64 Word64 deriving (Eq, Ord) instance Show IPAddress6 where show = show <$> ip6ToInteger ip6ToInteger :: IPAddress...
6396210e6de19b48771ae44b3697277ea684ea34f83d1b1b8ec22c7b43798a5d
dlesl/erqwest
erqwest_async.erl
-module(erqwest_async). -export([ req/4 , send/2 , finish_send/1 , read/2 , cancel/1 ]). -export_type([handle/0]). -opaque handle() :: erlang:nif_resource(). %% @doc Make an asynchronous request. %% A Response will be sent to ` Pid ' as follows : %% %% * If `body' is `strea...
null
https://raw.githubusercontent.com/dlesl/erqwest/58b5166c039f8276e5cab629421d0b4609e6caba/src/erqwest_async.erl
erlang
@doc Make an asynchronous request. * If `body' is `stream', and the request was successfully initated, erqwest:err()}'. * If `response_body' is `stream', `erqwest:resp()' will contain a handle which should be passed to {@link read/2}. Alternatively, call {@link cancel/1} if you do not intend to consume the bo...
-module(erqwest_async). -export([ req/4 , send/2 , finish_send/1 , read/2 , cancel/1 ]). -export_type([handle/0]). -opaque handle() :: erlang:nif_resource(). A Response will be sent to ` Pid ' as follows : ` { erqwest_response , Ref , next } ' . See { @link send/2 } and {...
0ecca9c26acb712798f26768059b23c5658ba1e046d75049ea0645b5dd08fa62
charlieg/Sparser
denominations-of-money.lisp
;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- copyright ( c ) 1993 - 1996 -- all rights reserved ;;; ;;; File: "denominations of money" ;;; Module: "grammar;model:dossiers:" version : 0.1 January 1996 initiated 10/22/93 v2.3 from treatment of 11/91 . 0.1 ( 1/16/96 ) redid " cents...
null
https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/grammar/model/dossiers/denominations-of-money.lisp
lisp
-*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- File: "denominations of money" Module: "grammar;model:dossiers:"
copyright ( c ) 1993 - 1996 -- all rights reserved version : 0.1 January 1996 initiated 10/22/93 v2.3 from treatment of 11/91 . 0.1 ( 1/16/96 ) redid " cents " and " pence " (in-package :sparser) (define-individual 'denomination/money :name "$") (define-individual 'denomination/money :name "doll...
4eccb22fb10801d25653a97cd96e6ce9dbc698a2b16df3198455e2c21c9ef784
ghcjs/ghcjs
MonadTrans.hs
-- This file is understood to be in the public domain. module MonadTrans where {- - This provides a way of accessing a monad that is inside - another monad. -} class MonadTrans t where lift :: Monad m => m a -> t m a liftTrans : : ( MonadTrans t ) = > ( a - > t m b ) - > ( t m a - > t m b ) liftTrans f m = d...
null
https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/nofib/spectral/cryptarithm2/MonadTrans.hs
haskell
This file is understood to be in the public domain. - This provides a way of accessing a monad that is inside - another monad.
module MonadTrans where class MonadTrans t where lift :: Monad m => m a -> t m a liftTrans : : ( MonadTrans t ) = > ( a - > t m b ) - > ( t m a - > t m b ) liftTrans f m = do { a < - m ; f a }
911ec0182f09b6802e385fcbe37ad8f0444fefcf4e071c04e97d2c6f5830fcbc
davidarkemp/swiftp
server.erl
-module(swiftp_proxy.server). -export([start/0, start/1, ping/0, listener/4]). -import(swiftp_proxy.log, [log/3]). -import(swiftp_proxy.db, [create_master_schema/0, join_db/1]). -define(DEVICE_PORT, 2222). -define(CLIENT_PORT, 2221). Called when we are the first node of a cluster ( create a new db schema ) start() ...
null
https://raw.githubusercontent.com/davidarkemp/swiftp/1e02e19606daa11c4b41763b7d95c202f60410e2/cloud_server/swiftp_proxy_packaged/server.erl
erlang
Called when we are to join an existing cluster. The argument comes from the command line (e.g. erl -s server start 'name@host' -detached) Loop until we receive a quit request or exception/error occurs Called via RPC from remote nodes to test communication.
-module(swiftp_proxy.server). -export([start/0, start/1, ping/0, listener/4]). -import(swiftp_proxy.log, [log/3]). -import(swiftp_proxy.db, [create_master_schema/0, join_db/1]). -define(DEVICE_PORT, 2222). -define(CLIENT_PORT, 2221). Called when we are the first node of a cluster ( create a new db schema ) start() ...
727773257380a3bc8829cadcf699022a8d2b868c8151fa09125fdc27a32020df
snoyberg/http-client
Lookup.hs
{-# LANGUAGE OverloadedStrings #-} module Network.PublicSuffixList.Lookup (effectiveTLDPlusOne, effectiveTLDPlusOne', isSuffix, isSuffix') where import qualified Data.Map as M import Data.Maybe (isNothing) import qualified Data.Text as T import qualified Network.PublicSuffixList.DataStructu...
null
https://raw.githubusercontent.com/snoyberg/http-client/106951809b3e1c796ffd6cccefc4c1fad16df7c9/http-client/publicsuffixlist/Network/PublicSuffixList/Lookup.hs
haskell
# LANGUAGE OverloadedStrings # If we fell off, did we do it at a leaf? Otherwise, what's the subtree that we're at Look up the component we're looking for... and if that fails, look up "*" Only match against the exception rules if we have a full match If we have a subdomain on an existing rule, we're not a suffix...
module Network.PublicSuffixList.Lookup (effectiveTLDPlusOne, effectiveTLDPlusOne', isSuffix, isSuffix') where import qualified Data.Map as M import Data.Maybe (isNothing) import qualified Data.Text as T import qualified Network.PublicSuffixList.DataStructure as DS import Network.P...
4b05314c94d9a77e9bc4161ad2ff51051adde591888309e39ebc3753655744e0
aprolog-lang/aprolog
printer.ml
Alpha Prolog (* Device-independent printers *) type out_interface = {out : string -> unit; in_space : bool; indent_level : int};; type doc = out_interface -> out_interface;; type 'a printer = 'a -> doc;; let set_in_space b oi = {out=oi.out; in_space=b; indent_level=oi.indent_level} ;...
null
https://raw.githubusercontent.com/aprolog-lang/aprolog/410327a615919eb6827d71661e69de14279b8c50/src/printer.ml
ocaml
Device-independent printers Common symbols
Alpha Prolog type out_interface = {out : string -> unit; in_space : bool; indent_level : int};; type doc = out_interface -> out_interface;; type 'a printer = 'a -> doc;; let set_in_space b oi = {out=oi.out; in_space=b; indent_level=oi.indent_level} ;; let set_indent_level i oi = ...
920d6eef7b118ef07ada509233680b2738117e8c807cac105c7d99acff3b6f3e
cracauer/sbcl-ita
cell.lisp
;;;; the VM definition of various primitive memory access VOPs for MIPS This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. The ...
null
https://raw.githubusercontent.com/cracauer/sbcl-ita/f85a8cf0d1fb6e8c7b258e898b7af3233713e0b9/src/compiler/mips/cell.lisp
lisp
the VM definition of various primitive memory access VOPs for more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. Data object ref/set stuff. Symbol hacking VOPs: The compiler likes to be able ...
MIPS This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB!VM") (define-vop (slot) (:args (object :scs (descriptor-reg))) (:info name offset lowtag) (:i...
8a7a41f1511cbbb225f2a50cd882ff2aaeb3b7abea0336cd06588aed788a26b3
WormBase/wormbase_rest
molecular_details.clj
(ns rest-api.classes.variation.widgets.molecular-details (:require [datomic.api :as d] [clojure.string :as str] [rest-api.db.sequence :as seqdb] [rest-api.classes.sequence.core :as sequence-fns] [rest-api.classes.generic-fields :as generic] [rest-api.classes.generic-functions :as generic-funct...
null
https://raw.githubusercontent.com/WormBase/wormbase_rest/32120f597b9493ddd9786d7c89b442478e98b07e/src/rest_api/classes/variation/widgets/molecular_details.clj
clojure
WBVar00145789 eg. WBVar00466445 eg. WBVar00466445 eg. WBVar01684110 e.g. WBVar00271007 WBVar00601206 tested with: WBVar00750883, tested with WBVar00145789 WBVar00145789 eg. WBVar01684110 eg. WBVar00466445 eg. WBVar00215920 tested with WBVar00271172 tested with WBVar00601206 tested with WBVar00601206 WBVar0060...
(ns rest-api.classes.variation.widgets.molecular-details (:require [datomic.api :as d] [clojure.string :as str] [rest-api.db.sequence :as seqdb] [rest-api.classes.sequence.core :as sequence-fns] [rest-api.classes.generic-fields :as generic] [rest-api.classes.generic-functions :as generic-funct...
c580af7df2db5dd2e3ce799a12fe034414b90736bf41378d973785f97e57e176
vseloved/cl-nlp
misc.lisp
( c ) 2013 - 2017 Vsevolod Dyomkin (in-package #:nlp.util) (named-readtables:in-readtable rutilsx-readtable) (declaim (inline filler)) ;;; Some aliasing (rename-package "CL-PPCRE" "CL-PPCRE" '("PPCRE" "RE")) (define-condition nlp-error (simple-error) ()) (define-condition not-implemented-error (simple-error) ()...
null
https://raw.githubusercontent.com/vseloved/cl-nlp/f180b6c3c0b9a3614ae43f53a11bc500767307d0/src/util/misc.lisp
lisp
Some aliasing
( c ) 2013 - 2017 Vsevolod Dyomkin (in-package #:nlp.util) (named-readtables:in-readtable rutilsx-readtable) (declaim (inline filler)) (rename-package "CL-PPCRE" "CL-PPCRE" '("PPCRE" "RE")) (define-condition nlp-error (simple-error) ()) (define-condition not-implemented-error (simple-error) ()) (defun ending-...
87dd290fdd90c43742ce36ca6997180e5a88a5a93ce1f3bc346627335672a3b7
art-w/mcavl
tests.ml
let () = Alcotest.run "Mcavl" [ "Sequential", Test_seq.tests ; "View", Test_view.tests ; "Domains", Test_mc.tests ]
null
https://raw.githubusercontent.com/art-w/mcavl/bf7d3414dbb805a61ebbe809cbb3f2a7ec599c42/tests/tests.ml
ocaml
let () = Alcotest.run "Mcavl" [ "Sequential", Test_seq.tests ; "View", Test_view.tests ; "Domains", Test_mc.tests ]
e5264b2564dd66c126936ad1df44bc2d4af1b5fe0f2d9729401fd1db812790f4
input-output-hk/qeditas
ripemd160.ml
Copyright ( c ) 2015 The Qeditas developers Distributed under the MIT software license , see the accompanying file COPYING or -license.php . file COPYING or -license.php. *) open Hashaux * * Following Dobbertin , , . 1996 RIPEMD-160 : A Strengthened Version of RIPEMD . With some constants taken...
null
https://raw.githubusercontent.com/input-output-hk/qeditas/f4871bd20833cd08a215f9d5fc9df2d362cba410/src/ripemd160.ml
ocaml
Copyright ( c ) 2015 The Qeditas developers Distributed under the MIT software license , see the accompanying file COPYING or -license.php . file COPYING or -license.php. *) open Hashaux * * Following Dobbertin , , . 1996 RIPEMD-160 : A Strengthened Version of RIPEMD . With some constants taken...
eda48a605aeb7eaf063fc2ccbd76f8f1cbf3a900cae54e35e102f481e72da8ec
softwarelanguageslab/maf
R5RS_scp1_flip2-4.scm
; Changes: * removed : 0 * added : 0 * swaps : 0 * negated predicates : 1 ; * swapped branches: 0 * calls to i d fun : 1 (letrec ((make-flip (lambda () (let ((state 0)) (lambda () (if (= state 0) (set! state 1) (set! state 0)) ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_flip2-4.scm
scheme
Changes: * swapped branches: 0
* removed : 0 * added : 0 * swaps : 0 * negated predicates : 1 * calls to i d fun : 1 (letrec ((make-flip (lambda () (let ((state 0)) (lambda () (if (= state 0) (set! state 1) (set! state 0)) state)))) ...
8736aac5ab32c9fec99efa325c73c29d2395e7ea61a6ea305db37cceebe2ad6a
sjl/chancery
package.test.lisp
(defpackage :chancery.test (:use :cl :1am :chancery :chancery.quickutils) (:export :run-tests))
null
https://raw.githubusercontent.com/sjl/chancery/87cb53cd791d4d60a6c41bc0b02345739b82abb0/package.test.lisp
lisp
(defpackage :chancery.test (:use :cl :1am :chancery :chancery.quickutils) (:export :run-tests))
3c2a70915f158aa12f767ea8581011e43096ab62a293a6f3c7922d68458232fb
lrascao/rebar3_scuttler
rebar3_scuttler_release.erl
%%-*- mode: erlang -*- -module(rebar3_scuttler_release). -behaviour(provider). -export([init/1, do/1, format_error/1]). -define(PROVIDER, release). -define(NAMESPACE, default). -define(DEPS, [{?NAMESPACE, compile}]). -define(PRE_START_HOOK_TEMPLATE, "pre_start_cuttlefish.tpl"). -define(ERLANG_VM_AR...
null
https://raw.githubusercontent.com/lrascao/rebar3_scuttler/98b3be5fe649192e18ed65cc09f2f8d92bbab195/src/rebar3_scuttler_release.erl
erlang
-*- mode: erlang -*- =================================================================== Public API =================================================================== The 'user friendly' name of the task The module implementation of the task The task can be run by the user, always true The list of dependencies ...
-module(rebar3_scuttler_release). -behaviour(provider). -export([init/1, do/1, format_error/1]). -define(PROVIDER, release). -define(NAMESPACE, default). -define(DEPS, [{?NAMESPACE, compile}]). -define(PRE_START_HOOK_TEMPLATE, "pre_start_cuttlefish.tpl"). -define(ERLANG_VM_ARGS_SCHEMA, "erlang.vm.a...
7bc2ea49b049ea520354c19ee4e19450bec94b5e26a696c3730c2400a38e5081
phantomics/seed
package.lisp
package.lisp (defpackage #:seed.sublimate (:export #:meta #:fetch-meta #:instantiate-priority-macro-reader) (:use #:cl #:prove))
null
https://raw.githubusercontent.com/phantomics/seed/f128969c671c078543574395d6b23a1a5f2723f8/seed.sublimate/package.lisp
lisp
package.lisp (defpackage #:seed.sublimate (:export #:meta #:fetch-meta #:instantiate-priority-macro-reader) (:use #:cl #:prove))
ccf082c6c7614f41b20015382a75078fcf79d3e3b98c5771335a51f0fe7bbfbc
iu-parfunc/lvars
DeepFrz.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # {-# LANGUAGE MagicHash #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE TypeFamilies #-} | The ` DeepFrz ` module provides a way to return arbitrarily complex data s...
null
https://raw.githubusercontent.com/iu-parfunc/lvars/78e73c96a929aa75aa4f991d42b2f677849e433a/src/lvish/Control/LVish/DeepFrz.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE MagicHash # # LANGUAGE RankNTypes # # LANGUAGE Trustworthy # # LANGUAGE TypeFamilies # # LANGUAGE TypeFamilies # TODO: a more detailed (recursive?) DeepFrz instance example might be really helpful here for people who want to implement their own LK ...
# LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # | The ` DeepFrz ` module provides a way to return arbitrarily complex data structures containing LVars from ` Par ` computations . The important thing to know is that to use ` runParThenFreeze ` to run a ` Par ` computation , you must make sure t...
b17bfd33c43234aedd5f9b17a3c38d22a52e061efde89afa11a56942843df68b
killme2008/cscheme
core.clj
(ns scheme.test.core (:use [scheme.core] :reload) (:use [clojure.test])) (deftest replace-me ;; FIXME: write (is false "No tests have been written."))
null
https://raw.githubusercontent.com/killme2008/cscheme/b18b941e21f0779c247b166de1b1a1cfef7724d2/test/scheme/test/core.clj
clojure
FIXME: write
(ns scheme.test.core (:use [scheme.core] :reload) (:use [clojure.test])) (is false "No tests have been written."))
f768265e2802e81a806b171be9b17636c82b3eae82c883afd9d93aa993a82be0
spechub/Hets
WACocone.hs
| Module : ./Static / WACocone.hs Description : heterogeneous signatures colimits approximations Copyright : ( c ) , and Uni Bremen 2002 - 2006 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : non - portable Heterogeneo...
null
https://raw.githubusercontent.com/spechub/Hets/f582640a174df08d4c965d7c0a1ab24d1a31000d/Static/WACocone.hs
haskell
until amalgamability check is fixed, just return a colimit get (commented out) code from rev:11881 | checks whether a graph is connected | checks whether the graph is thin | checks whether a graph is acyclic | auxiliary for removing the identity edges from a graph assigns to a node all proper descendents if no ...
| Module : ./Static / WACocone.hs Description : heterogeneous signatures colimits approximations Copyright : ( c ) , and Uni Bremen 2002 - 2006 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : non - portable Heterogeneo...
ab285556c033024b8b9d97e536bba1260ccf89d8b8e7c410de6fe347384d7d81
facebookincubator/hsthrift
OptParse.hs
Copyright ( c ) Facebook , Inc. and its affiliates . module Util.OptParse ( -- * Options intOption , doubleOption , textOption , maybeStrOption , maybeTextOption , maybeIntOption , textCommaSplit , testCommaSplitAndStrip , stringCommaSplit , readCommaSplit , absFilePathOption , relativeFi...
null
https://raw.githubusercontent.com/facebookincubator/hsthrift/d3ff75d487e9d0c2904d18327373b603456e7a01/common/util/Util/OptParse.hs
haskell
* Options * Commands * Pure Parser * Dragons and stuff | Returns an absolute file path, while handling relative paths and ~ | Returns a relative file path | Returns an absolute file path, while handling relative paths and ~ | Returns a relative file path | Build a command subparser from a name, description, an...
Copyright ( c ) Facebook , Inc. and its affiliates . module Util.OptParse intOption , doubleOption , textOption , maybeStrOption , maybeTextOption , maybeIntOption , textCommaSplit , testCommaSplitAndStrip , stringCommaSplit , readCommaSplit , absFilePathOption , relativeFilePathOption , ...
12eaf88594847d71c78f47ae14fda18caddad5b36ae6650c358c756a54eab936
input-output-hk/cardano-ledger
Api.hs
-- | This module provides a library interface for working with types that will allow a user to -- interact with Cardano ledger. -- -- It is intended to be the complete API covering everything but without exposing constructors that -- reveal any lower level types. -- -- In the interest of simplicity it glosses over some...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/libs/cardano-ledger-api/src/Cardano/Ledger/Api.hs
haskell
| This module provides a library interface for working with types that will allow a user to interact with Cardano ledger. It is intended to be the complete API covering everything but without exposing constructors that reveal any lower level types. In the interest of simplicity it glosses over some details of th...
" Cardano . . " , " Cardano . . Babbage " , etc . module Cardano.Ledger.Api ( | Definition of era types . module Cardano.Ledger.Api.Era, module Cardano.Ledger.Api.Tx, module Cardano.Ledger.Api.PParams, module Cardano.Ledger.Api.Scripts, ) where import Cardano.Ledger.Api.Era import Cardano.Ledger.Api.P...
b45c7543967ecc95b313f902a96fcf44ba4db1f6873ac0d6bd68ee7b8d412445
hasktorch/hasktorch
Typed.hs
module Torch.Typed ( module Torch.HList, module Torch.Typed, module Torch.Data, module Torch.Typed.Auxiliary, module Torch.Typed.Autograd, module Torch.Typed.Device, module Torch.Typed.DType, module Torch.Typed.Factories, module Torch.Typed.Functional, module Torch.Typed.NN, mo...
null
https://raw.githubusercontent.com/hasktorch/hasktorch/9560d149b06af17e2d4e73d1e116afd2b0baff86/hasktorch/src/Torch/Typed.hs
haskell
module Torch.Typed ( module Torch.HList, module Torch.Typed, module Torch.Data, module Torch.Typed.Auxiliary, module Torch.Typed.Autograd, module Torch.Typed.Device, module Torch.Typed.DType, module Torch.Typed.Factories, module Torch.Typed.Functional, module Torch.Typed.NN, mo...
8cb933bc4b3fc64dcc259f5ba1fa3c33afcc79a311c343c869cf0da2d41c94ab
simmone/racket-simple-xlsx
write-and-read-content-type-test.rkt
#lang racket (require simple-xml) (require "../../xlsx/xlsx.rkt") (require "../../sheet/sheet.rkt") (require "../../lib/lib.rkt") (require rackunit/text-ui rackunit) (require"../../content-type.rkt") (require racket/runtime-path) (define-runtime-path content_type_file "[Content_Types].xml") (define test-content-t...
null
https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/tests/content-type/write-and-read-content-type-test.rkt
racket
#lang racket (require simple-xml) (require "../../xlsx/xlsx.rkt") (require "../../sheet/sheet.rkt") (require "../../lib/lib.rkt") (require rackunit/text-ui rackunit) (require"../../content-type.rkt") (require racket/runtime-path) (define-runtime-path content_type_file "[Content_Types].xml") (define test-content-t...
b6b107096d035a5cb9bb4ff82e289fe6df14a3681b9b051dbd68fe1174917338
manuel-serrano/hop
transform_util.scm
;*=====================================================================*/ * Author : * / * Copyright : 2007 - 11 , see LICENSE file * / ;* ------------------------------------------------------------- */ * This file is part of Scheme2Js . ...
null
https://raw.githubusercontent.com/manuel-serrano/hop/481cb10478286796addd2ec9ee29c95db27aa390/scheme2js/transform_util.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * */ * but WITHOUT ANY WARRANTY; without even the implied warranty of */ * MERCHANTABILITY or FITNE...
* Author : * / * Copyright : 2007 - 11 , see LICENSE file * / * This file is part of Scheme2Js . * / * Scheme2Js is distributed in the hope that it will be useful , * / (module transform-util (import ...
189d9b50fd1fd8c7fcc9d5d810e74f074321b0aff7971d490ee2aac46223f7bb
FlowForwarding/loom
tap_ne.erl
%%------------------------------------------------------------------------------ %% 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 la...
null
https://raw.githubusercontent.com/FlowForwarding/loom/86a9c5aa8b7d4776062365716c9a3dbbf3330bc5/simple_ne/apps/simple_ne/src/tap_ne.erl
erlang
------------------------------------------------------------------------------ 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 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, eithe...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author Infoblox Inc < > 2013 Infoblox Inc -module(tap_ne). -copyright("2013, Infoblox Inc."). -include_lib("ofs_handler/include/ofs_handler.hrl"). -include_lib("of_prot...
f3aec6d315ca3924af85aeba8c4c6a5061378026a73ccbea4b5056624ac44ce5
keigoi/ocaml-mpst
linState.ml
type 'a t = 'a Lin.gen PowState.t let lin_op (type b) (module D : State.Op with type a = b) : b Lin.lin State.op = let module M = struct type nonrec a = b Lin.lin let determinise ctx s = Lin.map_lin (D.determinise ctx) s let merge ctx (s1 : b Lin.lin) (s2 : b Lin.lin) = Lin.merge_lin (D.merge ctx...
null
https://raw.githubusercontent.com/keigoi/ocaml-mpst/96f7896cc119a754b453b59054723f505642210d/lib/lin_dyn/linState.ml
ocaml
type 'a t = 'a Lin.gen PowState.t let lin_op (type b) (module D : State.Op with type a = b) : b Lin.lin State.op = let module M = struct type nonrec a = b Lin.lin let determinise ctx s = Lin.map_lin (D.determinise ctx) s let merge ctx (s1 : b Lin.lin) (s2 : b Lin.lin) = Lin.merge_lin (D.merge ctx...
9791a74754eb96b6f71eb526db007c1998a31f1dde95c7783c931ad5e4dca70f
TomMD/network-data
IP.hs
# LANGUAGE DisambiguateRecordFields , FlexibleInstances , MultiParamTypeClasses , DeriveDataTypeable # |The Data . IP library exports IPv4 address and header structures . FIXME : There is currently no support for options fields of the IP header . FIXME: There is currently no support for options f...
null
https://raw.githubusercontent.com/TomMD/network-data/90da1a30ef8f6a0c6cad246c23acd2a46b5d8d19/Data/IP.hs
haskell
|For IPv4 addresses. |Don't fragment, more fragment and reserved flags for most integral data types and the binary instance hands the bit packing. No warning is provided if a value is trunkated when packed! L3Header and L3Address instances (see Data.Header) Pretty Printing and parsing instances
# LANGUAGE DisambiguateRecordFields , FlexibleInstances , MultiParamTypeClasses , DeriveDataTypeable # |The Data . IP library exports IPv4 address and header structures . FIXME : There is currently no support for options fields of the IP header . FIXME: There is currently no support for options f...
39ebe9faba621a611d7a3535ac3529f3b5acf7aeb3d1378f7748870fa7994968
KestrelInstitute/Specware
BuildDistribution.lisp
;; This file builds a distribution directory for Window/Allegro Runtime Specware. (defpackage :Specware) (defvar Specware4-dir (Specware::getenv "SPECWARE4")) (defun in-specware-dir (file) (concatenate 'string Specware4-dir "/" file)) ;;; Get version information from canonical source... (let ((version-file (in-specw...
null
https://raw.githubusercontent.com/KestrelInstitute/Specware/2be6411c55f26432bf5c9e2f7778128898220c24/Applications/Specware/Handwritten/Lisp/BuildDistribution.lisp
lisp
This file builds a distribution directory for Window/Allegro Runtime Specware. Get version information from canonical source... dist-dir-name is the sub-directory to receive this particular distribution. In particular, this is where generate-application puts all its stuff. in-lisp-dir is used to get some emacs fil...
(defpackage :Specware) (defvar Specware4-dir (Specware::getenv "SPECWARE4")) (defun in-specware-dir (file) (concatenate 'string Specware4-dir "/" file)) (let ((version-file (in-specware-dir "Applications/Specware/Handwritten/Lisp/SpecwareVersion.lisp"))) (if (probe-file version-file) (load version-file) ...
cd2f95f525d40871e8a84586d5c08f941516e69d7a835b3d880913f86a348530
kupl/LearnML
original.ml
type formula = | True | False | Not of formula | AndAlso of (formula * formula) | OrElse of (formula * formula) | Imply of (formula * formula) | Equal of (exp * exp) and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp) let rec eval (f : formula) : bool = let rec calculate (f2 : exp) : int...
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/formula/sub52/original.ml
ocaml
type formula = | True | False | Not of formula | AndAlso of (formula * formula) | OrElse of (formula * formula) | Imply of (formula * formula) | Equal of (exp * exp) and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp) let rec eval (f : formula) : bool = let rec calculate (f2 : exp) : int...
ceb98e2ee6cd75db78e93a5dea9fca3b57868115938d3bf836be1c35e5168a27
janestreet/learn-ocaml-workshop
game_tests.ml
open! Base open! Snake_lib open Game open For_testing type nonrec t = Game.t [@@deriving sexp_of] let%expect_test "Testing [Game.set_direction]..." = let t = create_game_with_apple_exn ~height:10 ~width:10 ~initial_snake_length:3 ~amount_to_grow:3 ~apple_location:{ Position.row = 8...
null
https://raw.githubusercontent.com/janestreet/learn-ocaml-workshop/1ba9576b48b48a892644eb20c201c2c4aa643c32/03-snake/tests/phase2/game_tests.ml
ocaml
open! Base open! Snake_lib open Game open For_testing type nonrec t = Game.t [@@deriving sexp_of] let%expect_test "Testing [Game.set_direction]..." = let t = create_game_with_apple_exn ~height:10 ~width:10 ~initial_snake_length:3 ~amount_to_grow:3 ~apple_location:{ Position.row = 8...
07085703cd76a96a3d75ce9c153a569426829f97641be4ed8c51bb40322eef65
emqx/emqx
emqx_dashboard_bad_api.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_dashboard/src/emqx_dashboard_bad_api.erl
erlang
-------------------------------------------------------------------- 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 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_dashboard_bad_api). -include_lib("emqx/include/logger.hrl"). -export([init/2]). ...
bc24dd414369c296601b3e7f4302c98f91c04e5a78d35c368c24ccc93e9b981c
nikodemus/SBCL
misc.lisp
(in-package :sb-bsd-sockets) ;;; Miscellaneous things, placed here until I can find a logically more ;;; coherent place to put them ;;; I don't want to provide a complete interface to unix file ;;; operations, for example, but being about to set O_NONBLOCK on a ;;; socket is a necessary operation. XXX bad ( sizeof...
null
https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/contrib/sb-bsd-sockets/misc.lisp
lisp
Miscellaneous things, placed here until I can find a logically more coherent place to put them I don't want to provide a complete interface to unix file operations, for example, but being about to set O_NONBLOCK on a socket is a necessary operation.
(in-package :sb-bsd-sockets) XXX bad ( sizeof ( int ) = = 4 ) assumptions (defgeneric non-blocking-mode (socket) (:documentation "Is SOCKET in non-blocking mode?")) #-win32 (defmethod non-blocking-mode ((socket socket)) (let ((fd (socket-file-descriptor socket))) (sb-alien:with-alien ((arg integer)) ...
bf82db8277b065794541e7108f536548e872a0eaa7fa8b246ea02f3f7f93fc5f
wedesoft/aiscm
roberts_cross.scm
(use-modules (aiscm magick) (aiscm image) (aiscm core)) (define (to-gray img) (from-image (convert-image (to-image img) 'GRAY))) (define (norm x y) (/ (+ (abs x) (abs y)) 2)) (define (roberts-cross img) (/ (norm (convolve img (arr (+1 0) ( 0 -1))) (convolve img (arr ( 0 +1) (-1 0)))) 2)) (write-image (to-type <ubyte> (...
null
https://raw.githubusercontent.com/wedesoft/aiscm/2c3db8d00cad6e042150714ada85da19cf4338ad/tests/integration/roberts_cross.scm
scheme
(use-modules (aiscm magick) (aiscm image) (aiscm core)) (define (to-gray img) (from-image (convert-image (to-image img) 'GRAY))) (define (norm x y) (/ (+ (abs x) (abs y)) 2)) (define (roberts-cross img) (/ (norm (convolve img (arr (+1 0) ( 0 -1))) (convolve img (arr ( 0 +1) (-1 0)))) 2)) (write-image (to-type <ubyte> (...
3714df1a68c6c65b9875db356a4d53e958f4e219ac58666dfba1ad694992b6c0
tonatona-project/tonatona
Logger.hs
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE UndecidableInstances # module Tonatona.Logger ( Config(..) , DeployMode(..) , Verbose(..) , defaultVerbosity -- * Standard logging functions , Tonatona.Logger.logDebug , Tonatona.Logger.logInfo , Tonatona.Logger.logWarn , Tonatona.Logger.logError ,...
null
https://raw.githubusercontent.com/tonatona-project/tonatona/b6b67bf0f14d345c01dcf9ea7870b657891f032c/tonatona-logger/src/Tonatona/Logger.hs
haskell
* Standard logging functions * Advanced logging functions ** Sticky logging ** With source ** Generic log function * Data types Standard logging functions | Log a debug level message with no source. | Log an info level message with no source. | Log a warn level message with no source. | Log an error level...
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE UndecidableInstances # module Tonatona.Logger ( Config(..) , DeployMode(..) , Verbose(..) , defaultVerbosity , Tonatona.Logger.logDebug , Tonatona.Logger.logInfo , Tonatona.Logger.logWarn , Tonatona.Logger.logError , Tonatona.Logger.logOther , Tonato...
657cea7397317f53038f2a7ce6be30399dfbae02ec5962d25bec0bf4dc21ba0c
russell/cl-git
object.lisp
-*- Mode : Lisp ; Syntax : COMMON - LISP ; Base : 10 -*- ;; cl-git is a Common Lisp interface to git repositories. Copyright ( C ) 2011 - 2022 < > ;; ;; This program is free software: you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public License as published by the Free ...
null
https://raw.githubusercontent.com/russell/cl-git/ab58b1dcf34649899085e9df95962ef1c9d902c3/src/object.lisp
lisp
Syntax : COMMON - LISP ; Base : 10 -*- cl-git is a Common Lisp interface to git repositories. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;...
Copyright ( C ) 2011 - 2022 < > as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public (in-package #:cl-git) (defvar object-type-mapping (list 'commit :commit '...
8b37086393c94c18d71b0251f4f63bf3dbbcdad1a783b7179dc7325e8eb94c99
ghcjs/ghcjs-boot
Conc.hs
# LANGUAGE Unsafe # # LANGUAGE CPP , NoImplicitPrelude # # OPTIONS_GHC -fno - warn - missing - signatures # # OPTIONS_HADDOCK not - home # ----------------------------------------------------------------------------- -- | -- Module : GHC.Conc Copyright : ( c ) The University of Glasgow , 1994 - 2002 -- Li...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-boot/8c549931da27ba9e607f77195208ec156c840c8a/boot/base/GHC/Conc.hs
haskell
--------------------------------------------------------------------------- | Module : GHC.Conc License : see libraries/base/LICENSE Maintainer : Stability : internal Basic concurrency stuff. --------------------------------------------------------------------------- No: #hide, because bits o...
# LANGUAGE Unsafe # # LANGUAGE CPP , NoImplicitPrelude # # OPTIONS_GHC -fno - warn - missing - signatures # # OPTIONS_HADDOCK not - home # Copyright : ( c ) The University of Glasgow , 1994 - 2002 Portability : non - portable ( GHC extensions ) module GHC.Conc ( ThreadId(..) , forkIO ...
42c55c86c8e6007d1bcde474ea3da61f4a3c7c2810fc118459677c18ccf770bd
fukamachi/webapi
response.lisp
(defpackage #:webapi/response (:use #:cl) (:export #:response #:response-status #:response-headers #:response-body #:response-uri)) (in-package #:webapi/response) (defclass response () ((status :initarg :status :reader response-status) (headers :initarg :...
null
https://raw.githubusercontent.com/fukamachi/webapi/99e64a22566946a937973b3994a28ae9535c9a63/response.lisp
lisp
(defpackage #:webapi/response (:use #:cl) (:export #:response #:response-status #:response-headers #:response-body #:response-uri)) (in-package #:webapi/response) (defclass response () ((status :initarg :status :reader response-status) (headers :initarg :...
666599dcc42fdf9267cddf4068ad58e006e6eece8afde8eb212ee9633e597ab0
clojerl/clojerl
clj_reader_SUITE.erl
-module(clj_reader_SUITE). -include("clojerl.hrl"). -include("clojerl_int.hrl"). -include("clj_test_utils.hrl"). -include_lib("common_test/include/ct.hrl"). -export([ all/0 , groups/0 , init_per_group/2 , end_per_group/2 , init_per_suite/1 , end_per_suite/1 ]). -export...
null
https://raw.githubusercontent.com/clojerl/clojerl/2eae5c57ad3339336f7e90b4d822ec07388e166a/test/clj_reader_SUITE.erl
erlang
------------------------------------------------------------------------------ Test Cases ------------------------------------------------------------------------------ Compare metadata after removing the location information. Tuple List Map String Without resolver With resolver --------------------------------...
-module(clj_reader_SUITE). -include("clojerl.hrl"). -include("clojerl_int.hrl"). -include("clj_test_utils.hrl"). -include_lib("common_test/include/ct.hrl"). -export([ all/0 , groups/0 , init_per_group/2 , end_per_group/2 , init_per_suite/1 , end_per_suite/1 ]). -export...
ba8bf635d9d5c12cb1245a4bdeae0c5d6f80a565a254dba07d093fe284cac271
typelead/eta
ExtsCompat46.hs
# LANGUAGE BangPatterns , CPP , MagicHash # ----------------------------------------------------------------------------- -- | Module : ExtsCompat46 Copyright : ( c ) Lodz University of Technology 2013 -- License : see LICENSE -- Maintainer : -- Stability : internal Portability : no...
null
https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/compiler/Eta/Utils/ExtsCompat46.hs
haskell
--------------------------------------------------------------------------- | License : see LICENSE Stability : internal required for bootstrapping, we should remove this module. ---------------------------------------------------------------------------
# LANGUAGE BangPatterns , CPP , MagicHash # Module : ExtsCompat46 Copyright : ( c ) Lodz University of Technology 2013 Maintainer : Portability : non - portable ( GHC internal ) Compatibility module to encapsulate primops API change between GHC 7.6 GHC 7.8 . In GHC we use comparison p...
2e909a3b63525096d5e6c43bc739675322008d70ab3a3ab03447577df0c4e1f9
xach/buildapp
utils.lisp
;;;; Copyright ( c ) 2010 , All Rights Reserved ;;;; ;;;; Redistribution and use in source and binary forms, with or without ;;;; modification, are permitted provided that the following conditions ;;;; are met: ;;;; ;;;; * Redistributions of source code must retain the above copyright ;;;; notice, this list o...
null
https://raw.githubusercontent.com/xach/buildapp/dd00f18938ccae0a9b406bfcfd882ad32abeb757/utils.lisp
lisp
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form...
Copyright ( c ) 2010 , All Rights Reserved DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , (in-package #:buildapp) (defun get-args () #+sbcl 'sb-ext:*posix-argv* #+ccl '(ccl::command-line-arguments)) (defmacro backtr...
9a1fc5945c41af0f582d677e964303f7f167df37a8449a3584863c70cbb5a391
mrphlip/aoc
11.hs
# OPTIONS_GHC -Wno - tabs # import Data.Array import Data.Ix import Data.List import Control.Exception import Utils data Cell = Floor | Empty | Filled deriving (Eq, Show, Read) type Point = (Integer, Integer) type FloorPlan = Array Point Cell getInput :: IO FloorPlan getInput = do dat <- readFile "11.txt" return $ ...
null
https://raw.githubusercontent.com/mrphlip/aoc/06395681eb6b50b838cd4561b2e0aa772aca570a/2020/11.hs
haskell
# OPTIONS_GHC -Wno - tabs # import Data.Array import Data.Ix import Data.List import Control.Exception import Utils data Cell = Floor | Empty | Filled deriving (Eq, Show, Read) type Point = (Integer, Integer) type FloorPlan = Array Point Cell getInput :: IO FloorPlan getInput = do dat <- readFile "11.txt" return $ ...
530617a9a77116d1a35fe96e3ccc986a3b7fa606b456b011bad06264df58be96
MastodonC/kixi.hecuba
download.clj
(ns kixi.hecuba.data.measurements.download (:require [clj-time.coerce :as tc] [clojure.data.csv :as csv] [clojure.java.io :as io] [clojure.tools.logging :as log] [kixi.hecuba.data.calculate :as calculate] [...
null
https://raw.githubusercontent.com/MastodonC/kixi.hecuba/467400bbe670e74420a2711f7d49e869ab2b3e21/src/clj/kixi/hecuba/data/measurements/download.clj
clojure
(ns kixi.hecuba.data.measurements.download (:require [clj-time.coerce :as tc] [clojure.data.csv :as csv] [clojure.java.io :as io] [clojure.tools.logging :as log] [kixi.hecuba.data.calculate :as calculate] [...
fd4b42d373335e9c79432b2941217002bedb4f579ea804aeb3689c5df44684cd
patricoferris/ocaml-multicore-monorepo
caqti_driver_mariadb.mli
Copyright ( C ) 2017 < > * * This library is free software ; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or ( at your * option ) any later version , with the ...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/ocaml-caqti/lib-driver/caqti_driver_mariadb.mli
ocaml
Copyright ( C ) 2017 < > * * This library is free software ; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or ( at your * option ) any later version , with the ...
4108efd52874b8f41ab61f0163aca1c2f07f9d81d30dcb22c70fecd73150ebce
coq/coq
tac2quote.mli
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * *...
null
https://raw.githubusercontent.com/coq/coq/e2952d535b9391fd37340aad5188b28cf83308d8/plugins/ltac2/tac2quote.mli
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team // * This file is distributed under the terms of the * (see LICENSE file for the text of the license) ************************************...
v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser Gener...
0fc70aca6a0b8cd42007f14482f05d08f17e64083ca74634853918cd16771147
vernemq/vernemq_dev
on_subscribe_m5_hook.erl
%% @hidden -module(on_subscribe_m5_hook). -include("vernemq_dev.hrl"). %% called as an 'all'-hook, return value is ignored -callback on_subscribe_m5(UserName :: username(), SubscriberId :: subscriber_id(), Topics :: [{Topic :: topic(), SubInfo :: subinfo...
null
https://raw.githubusercontent.com/vernemq/vernemq_dev/6d622aa8c901ae7777433aef2bd049e380c474a6/src/on_subscribe_m5_hook.erl
erlang
@hidden called as an 'all'-hook, return value is ignored
-module(on_subscribe_m5_hook). -include("vernemq_dev.hrl"). -callback on_subscribe_m5(UserName :: username(), SubscriberId :: subscriber_id(), Topics :: [{Topic :: topic(), SubInfo :: subinfo()}], Props :: properties()) ...
bd507cab98ea62b028e712981edc3732e2b87c80284a852bfaa5303d9085703a
incoherentsoftware/defect-process
Id.hs
module Id ( HashedId(..) , Id(NullId) , newId , hashId ) where import Control.Monad.IO.Class (MonadIO, liftIO) import Data.Unique (Unique, hashUnique, newUnique) newtype HashedId = HashedId {_int :: Int} deriving (Eq, Ord, Show) data Id a = Id Unique | NullId deriving (...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/15f2569e7d0e481c2e28c0ca3a5e72d2c049b667/src/Id.hs
haskell
module Id ( HashedId(..) , Id(NullId) , newId , hashId ) where import Control.Monad.IO.Class (MonadIO, liftIO) import Data.Unique (Unique, hashUnique, newUnique) newtype HashedId = HashedId {_int :: Int} deriving (Eq, Ord, Show) data Id a = Id Unique | NullId deriving (...
e8205dbab8354cf73eaa7f954d3fd91e72b0c2c45b89f820be6177612bd651cf
OCamlPro/ocamlexc
printmod.mli
(***********************************************************************) (* *) (* Ocamlexc *) (* *) , projet Cris...
null
https://raw.githubusercontent.com/OCamlPro/ocamlexc/a9ddcfff6f376f5dd6c5fcc3211b8f89e36f79fe/typing/printmod.mli
ocaml
********************************************************************* Ocamlexc ...
, projet Cristal , INRIA Rocquencourt Copyright 1998 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . val pp_module_type: Format.formatter -> Typedtree.module_type -> unit val pp_signature: Format.formatter -> Typed...
72b131275b9231f3387d358b3059d1d164aa1d4e8faef19a45ba1f78b50049c8
gadfly361/rid3
b03_add_element_on_top.cljs
(ns rid3.b03-add-element-on-top (:require [reagent.core :as reagent] [rid3.core :as rid3 :refer [rid3->]] [rid3.basics-util :as util] )) (def cursor-key :b03-add-element-on-top) (def height 100) (def width 100) (defn example [app-state] (let [viz-ratom (reagent/cursor app-state [cursor-key])] (fn...
null
https://raw.githubusercontent.com/gadfly361/rid3/cae79fdbee3b5aba45e29b589425f9a17ef8613b/src/basics/rid3/b03_add_element_on_top.cljs
clojure
You can add any number of elements. They are added in order, which means this circle overlaid on top of the rect above."
(ns rid3.b03-add-element-on-top (:require [reagent.core :as reagent] [rid3.core :as rid3 :refer [rid3->]] [rid3.basics-util :as util] )) (def cursor-key :b03-add-element-on-top) (def height 100) (def width 100) (defn example [app-state] (let [viz-ratom (reagent/cursor app-state [cursor-key])] (fn...
fc8987aad4e57ae664412b519ef750c1dd6a6d08caead8d2b9192fea9f3155f3
modular-macros/ocaml-macros
t101-poptrap.ml
open Lib;; try () with _ -> () ;; * 0 CONSTINT 42 2 PUSHACC0 3 MAKEBLOCK1 0 5 POP 1 7 9 PUSHTRAP 15 11 CONST0 12 POPTRAP 13 BRANCH 18 15 PUSHCONST0 16 POP 1 18 ATOM0 19 SETGLOBAL T101 - poptrap 21 ST...
null
https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/tool-ocaml/t101-poptrap.ml
ocaml
open Lib;; try () with _ -> () ;; * 0 CONSTINT 42 2 PUSHACC0 3 MAKEBLOCK1 0 5 POP 1 7 9 PUSHTRAP 15 11 CONST0 12 POPTRAP 13 BRANCH 18 15 PUSHCONST0 16 POP 1 18 ATOM0 19 SETGLOBAL T101 - poptrap 21 ST...
56c77030b016ed47972f25794e8498f14cecf1b25544bce92eb44ad82a58bc22
threatgrid/ctia
data_table_test.clj
(ns ctia.entity.data-table-test (:require [clj-momo.test-helpers.core :as mth] [ctia.entity.data-table :as sut] [clojure.test :refer [deftest join-fixtures use-fixtures]] [ctia.test-helpers [auth :refer [all-capabilities]] [core :as helpers] [...
null
https://raw.githubusercontent.com/threatgrid/ctia/32857663cdd7ac385161103dbafa8dc4f98febf0/test/ctia/entity/data_table_test.clj
clojure
(ns ctia.entity.data-table-test (:require [clj-momo.test-helpers.core :as mth] [ctia.entity.data-table :as sut] [clojure.test :refer [deftest join-fixtures use-fixtures]] [ctia.test-helpers [auth :refer [all-capabilities]] [core :as helpers] [...
1c54d497a478821920366cc0764b88c507db76fef1f464ec4d61d6ff21ede841
RefactoringTools/HaRe
Constructor.hs
module Constructor where Should be able to rename AType to MyType , as they are in different name -- spaces data MyType = AType Int | YourType Bool foo :: MyType -> Bool foo (AType i) = i > 0 foo (YourType b) = b
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/Renaming/Constructor.hs
haskell
spaces
module Constructor where Should be able to rename AType to MyType , as they are in different name data MyType = AType Int | YourType Bool foo :: MyType -> Bool foo (AType i) = i > 0 foo (YourType b) = b
ea23b917c92642a2b0e085bdcf55db3eb5d5b992070df4960c4598420d9ecf4f
blacktaxi/inversion
Print.hs
{-# LANGUAGE GADTs #-} {-# LANGUAGE ConstraintKinds #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # module Print (ShowFingering (..)) where import Data.List (delete, genericReplicate, sortBy) import qualified Data.Map as M import Text.Printf (printf, PrintfArg) import Instrument import Fi...
null
https://raw.githubusercontent.com/blacktaxi/inversion/f11aa90d6fe6ab7a1f7fa3c3b19bfcf5c1fca451/src/Print.hs
haskell
# LANGUAGE GADTs # # LANGUAGE ConstraintKinds #
# LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # module Print (ShowFingering (..)) where import Data.List (delete, genericReplicate, sortBy) import qualified Data.Map as M import Text.Printf (printf, PrintfArg) import Instrument import Fingering class ShowFingering b a where showFingering...
e2821fd1c08784c439ad6c3fd8acbcd0505cc6c3350549c6fabe7c7464f11b09
Deep-Symmetry/afterglow
chauvet.clj
(ns afterglow.fixtures.chauvet "Models for fixtures provided by [Chauvet Lighting]()." {:author "James Elliott"} (:require [afterglow.channels :as chan] [afterglow.effects.channel :as chan-fx] [afterglow.fixtures.qxf :refer [sanitize-name]])) (defn- build-gobo-entries "Build a list of g...
null
https://raw.githubusercontent.com/Deep-Symmetry/afterglow/cee930dab27274b350a6123a93590f05edca00c3/src/afterglow/fixtures/chauvet.clj
clojure
TODO: Measure and fine-tune location TODO: add scale-fn? TODO: Measure and fine-tune location TODO: Measure and fine-tune location TODO: Measure and fine-tune location TODO: Measure and fine-tune location TODO: Measure and fine-tune height? TODO: Measure and fine-tune height? TODO: Measure speed, add scale-fn...
(ns afterglow.fixtures.chauvet "Models for fixtures provided by [Chauvet Lighting]()." {:author "James Elliott"} (:require [afterglow.channels :as chan] [afterglow.effects.channel :as chan-fx] [afterglow.fixtures.qxf :refer [sanitize-name]])) (defn- build-gobo-entries "Build a list of g...
1022855315f7b9d3c1ac220b12e7176be89ddc707315325cd0bf9d50fcbba1d4
tokenmill/docx-utils
core.clj
(ns docx-utils.core (:require [clojure.java.io :as io] [clojure.tools.logging :as log] [docx-utils.io :as docx-io] [docx-utils.append :as append] [docx-utils.replace :as replace]) (:import (org.apache.poi.xwpf.usermodel XWPFDocument))) (defn decorate-placeholder [und...
null
https://raw.githubusercontent.com/tokenmill/docx-utils/f9cb077df2360c11376e0f2d9c8daf8b5062179a/src/docx_utils/core.clj
clojure
(ns docx-utils.core (:require [clojure.java.io :as io] [clojure.tools.logging :as log] [docx-utils.io :as docx-io] [docx-utils.append :as append] [docx-utils.replace :as replace]) (:import (org.apache.poi.xwpf.usermodel XWPFDocument))) (defn decorate-placeholder [und...
14da76487d3706219d38f986f3d11967b49fa68f652d64fde5070fb76eee1ea2
ghc/packages-Cabal
setup.test.hs
import Test.Cabal.Prelude main = setupAndCabalTest $ do skipUnless =<< ghcVersionIs (>= mkVersion [8,1]) r <- fails $ setup' "configure" [] assertOutputContains "non-existent" r return ()
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/Backpack/Fail2/setup.test.hs
haskell
import Test.Cabal.Prelude main = setupAndCabalTest $ do skipUnless =<< ghcVersionIs (>= mkVersion [8,1]) r <- fails $ setup' "configure" [] assertOutputContains "non-existent" r return ()
2e528278c510d127bd09632dd82471011f99b7256c32dcfd03531609c993b218
qfpl/reflex-tutorial
Solution.hs
# LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} module Ex05.Solution ( attachEx05 ) where import Language.Javascript.JSaddle (JSM) import qualified Data.Map as Map import Reflex import Util.Attach #ifndef ghcjs_HOST_OS import Util.Run #endif import Ex05.Common import Ex05.Run ex05 :: Reflex t => In...
null
https://raw.githubusercontent.com/qfpl/reflex-tutorial/07c1e6fab387cbeedd031630ba6a5cd946cc612e/code/exercises/src/Ex05/Solution.hs
haskell
# LANGUAGE OverloadedStrings # The typeclass instances that we are using here are available of variable names We use `current` to get hold of the `Behavior` here We use `current` to get hold of the `Behavior` here
# LANGUAGE CPP # module Ex05.Solution ( attachEx05 ) where import Language.Javascript.JSaddle (JSM) import qualified Data.Map as Map import Reflex import Util.Attach #ifndef ghcjs_HOST_OS import Util.Run #endif import Ex05.Common import Ex05.Run ex05 :: Reflex t => Inputs t -> Outputs t ex05 (Inputs ...
e33a1e92ad2feed61b8e2959ea319caf867dab4cec311baf220a7258052d94a6
pveber/bistro
FastQC.ml
open Bistro open Bistro.Shell_dsl type report = [`fastQC] directory let img = [ docker_image ~account:"pveber" ~name:"fastqc" ~tag:"0.11.8" () ] module Cmd = struct let fastqc x = [ mkdir_p dest ; cmd "fastqc" [ seq ~sep:"" [ string "--outdir=" ; dest ] ; ( match x with | `fq fq...
null
https://raw.githubusercontent.com/pveber/bistro/da0ebc969c8c5ca091905366875cbf8366622280/lib/bio/FastQC.ml
ocaml
open Bistro open Bistro.Shell_dsl type report = [`fastQC] directory let img = [ docker_image ~account:"pveber" ~name:"fastqc" ~tag:"0.11.8" () ] module Cmd = struct let fastqc x = [ mkdir_p dest ; cmd "fastqc" [ seq ~sep:"" [ string "--outdir=" ; dest ] ; ( match x with | `fq fq...
060595dd5671eb775610c4d42322f3d946b87837c1b637c4199f20acc2500402
nick8325/jukebox
AnalyseMonotonicity.hs
# LANGUAGE TypeOperators , CPP # module Jukebox.Tools.AnalyseMonotonicity where import Prelude hiding (lookup) import Jukebox.Name import Jukebox.Form hiding (Form, clause, true, false, And, Or) import Control.Monad import qualified Data.Map.Strict as Map import Data.Map(Map) #ifndef NO_MINISAT import Jukebox.Sat.Easy...
null
https://raw.githubusercontent.com/nick8325/jukebox/52c3206d7def50c8ebcc0128c442fa6c2bd4e074/src/Jukebox/Tools/AnalyseMonotonicity.hs
haskell
# LANGUAGE TypeOperators , CPP # module Jukebox.Tools.AnalyseMonotonicity where import Prelude hiding (lookup) import Jukebox.Name import Jukebox.Form hiding (Form, clause, true, false, And, Or) import Control.Monad import qualified Data.Map.Strict as Map import Data.Map(Map) #ifndef NO_MINISAT import Jukebox.Sat.Easy...
56f203e497a19d3020aa3d4478a466979b20d766deddb1d9576b97c6fb11e9e5
AlacrisIO/legicash-facts
side_chain_server.ml
(* side_chain_server -- TCP/IP server to receive client requests *) open Legilogic_lib open Action open Lwt_exn open Marshaling open Types open Alacris_lib open Side_chain open Side_chain_operator open Side_chain_server_config let _ = Config.set_application_name "alacris" let _init_random = Random.self_init le...
null
https://raw.githubusercontent.com/AlacrisIO/legicash-facts/5d3663bade68c09bed47b3f58fa12580f38fdb46/src/alacris_lib/side_chain_server.ml
ocaml
side_chain_server -- TCP/IP server to receive client requests TODO: pass request id, so we can send a JSON RPC style reply? TODO: have some try ... finally construct handle the closing of the channels TODO: We need to always close, and thus exit the Lwt_exn monad and properly handle the Result (e.g. by turn...
open Legilogic_lib open Action open Lwt_exn open Marshaling open Types open Alacris_lib open Side_chain open Side_chain_operator open Side_chain_server_config let _ = Config.set_application_name "alacris" let _init_random = Random.self_init let side_chain_server_log = true let process_request_exn _client_add...
129c3ef56070eae8317dbe19745de47dd6fe22d903b97b742d5437d90ac986d6
ekmett/graphs
AdjacencyList.hs
# LANGUAGE CPP , TypeFamilies , FlexibleContexts # ----------------------------------------------------------------------------- -- | -- Module : Data.Graph.Adjacency.List Copyright : ( C ) 2011 -- License : BSD-style (see the file LICENSE) -- Maintainer : < > -- Stability : experimental...
null
https://raw.githubusercontent.com/ekmett/graphs/dd26e6c3c49ace64fc05f53ef4e389910f852ef1/src/Data/Graph/AdjacencyList.hs
haskell
--------------------------------------------------------------------------- | Module : Data.Graph.Adjacency.List License : BSD-style (see the file LICENSE) Stability : experimental Portability : type families --------------------------------------------------------------------------
# LANGUAGE CPP , TypeFamilies , FlexibleContexts # Copyright : ( C ) 2011 Maintainer : < > module Data.Graph.AdjacencyList ( AdjacencyList(..) , AdjacencyListGraph , ask ) where #if __GLASGOW_HASKELL__ < 710 import Control.Applicative #endif import Data.Ix import Data.Array import Data.Graph...
f17c39340312c549823d61e77639c44454e1f772af6f01e8b03e23d48e8fb47d
klange/cs421
mp6-skeleton.ml
(* * File: mp6-skeleton.ml *) open Mp6common Problem 1 let asMonoTy1 () = failwith "Not implemented" let asMonoTy2 () = failwith "Not implemented" let asMonoTy3 () = failwith "Not implemented" let asMonoTy4 () = failwith "Not implemented" Problem 2 let rec subst_fun subst m = failwith "Not implemented" Prob...
null
https://raw.githubusercontent.com/klange/cs421/8db4619db63169bbc2ca7e1998fa4e95f002a5c4/mp6grader/mp6-skeleton.ml
ocaml
* File: mp6-skeleton.ml
open Mp6common Problem 1 let asMonoTy1 () = failwith "Not implemented" let asMonoTy2 () = failwith "Not implemented" let asMonoTy3 () = failwith "Not implemented" let asMonoTy4 () = failwith "Not implemented" Problem 2 let rec subst_fun subst m = failwith "Not implemented" Problem 3 let rec monoTy_lift_subst ...
fbb23055bd466cb34e52ab04af0b90567c5b0fc9ef2fc24dc13aee376740d721
liquidz/cuma
core.clj
(ns cuma.core (:require [cuma.util.string :refer [index-of dotted-get get-paired-section-index]] [cuma.extension :refer [collect-extension-functions-memo]] [clojure.string :as str])) (def read-string* (memoize read-string)) ; =escape (defn escape "Escape string." [s] {:pre [(string? s)]} ...
null
https://raw.githubusercontent.com/liquidz/cuma/120ff58a8601e0911591696622ad385e0616f1ff/src/cuma/core.clj
clojure
=escape ") =render-variable =parse-section =render-section =render
(ns cuma.core (:require [cuma.util.string :refer [index-of dotted-get get-paired-section-index]] [cuma.extension :refer [collect-extension-functions-memo]] [clojure.string :as str])) (def read-string* (memoize read-string)) (defn escape "Escape string." [s] {:pre [(string? s)]} (-> s (str...
6a4ee02bbfdde3f10c318bcde190b60a74b9cc2e528bbdac7bca5b473a540a58
openmusic-project/openmusic
tests.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; ;;; tests.lisp --- Unit and regression tests for Babel. ;;; Copyright ( C ) 2007 - 2009 , ;;; ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to de...
null
https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/api/foreign-interface/ffi/babel/tests/tests.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- tests.lisp --- Unit and regression tests for Babel. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, dis...
Copyright ( C ) 2007 - 2009 , files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , (in-package #:c...
95981ef5daf62a123cbf0f09417f184c67991cf9296bed6fe4a0c4883f381f88
witan-org/witan
context.mli
(*************************************************************************) This file is part of Witan . (* *) Copyright ( C ) 2017 CEA ( Commi...
null
https://raw.githubusercontent.com/witan-org/witan/d26f9f810fc34bf44daccb91f71ad3258eb62037/src/stdlib/context.mli
ocaml
*********************************************************************** alternatives) Automatique) ...
This file is part of Witan . Copyright ( C ) 2017 CEA ( Commissariat à l'énergie atomique et aux énergies ( Institut National de Recherche en Informatique et en CNRS ( Centre nation...
c91dd944df26626e02aac0d9dd5b027c6e0af075bfbd6c8f2670f64f8badbf7f
tlaplus/tlapm
fotypes.mli
(* This code derives from a GPL'ed code and so is GPL'ed *) type variable = string type constant = string type skolem = string type varlist = variable list type arg = Variable of variable | Constant of constant | Skolem of skolem * varlist type arglist = arg list type atom = string type literal = Atom...
null
https://raw.githubusercontent.com/tlaplus/tlapm/158386319f5b6cd299f95385a216ade2b85c9f72/translate/fotypes.mli
ocaml
This code derives from a GPL'ed code and so is GPL'ed constants a literal Quantification Temporal operators type disjunct = True | False | Or of literal list type cnf = True | False | And of disjunct list type formulaList = True | False | Literal of literal | And of f...
type variable = string type constant = string type skolem = string type varlist = variable list type arg = Variable of variable | Constant of constant | Skolem of skolem * varlist type arglist = arg list type atom = string type literal = Atom of atom * arglist | NotAtom of atom * arglist ;; ...
1e0cbe4492c6575ef53577ee355d277b17b7b131c5a700ff0e3a7e51184078db
grin-compiler/grin
Pure.hs
# LANGUAGE LambdaCase , TupleSections , BangPatterns , OverloadedStrings , ConstraintKinds # module Reducer.Pure ( EvalPlugin(..) , reduceFun ) where import Text.Printf import Text.PrettyPrint.ANSI.Leijen import Data.Foldable import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import Data.Maybe...
null
https://raw.githubusercontent.com/grin-compiler/grin/4b68b848838d289573b59fae2272e6971fddb99f/grin/src/Reducer/Pure.hs
haskell
models computer memory | FetchI Name Int -- fetch node component FIXME: this should not be here!!! please investigate. TODO: Better error check: If not default then parameters must match
# LANGUAGE LambdaCase , TupleSections , BangPatterns , OverloadedStrings , ConstraintKinds # module Reducer.Pure ( EvalPlugin(..) , reduceFun ) where import Text.Printf import Text.PrettyPrint.ANSI.Leijen import Data.Foldable import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import Data.Maybe...
29291d631507b9ed4bcb36b6debb3b5a480baf5c135b0a1fb601d907dc723e21
goodell/cppmem
main.ml
Js_of_ocaml compiler * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking...
null
https://raw.githubusercontent.com/goodell/cppmem/eb3ce19b607a5d6ec81138cd8cacd236f9388e87/js_of_ocaml-1.2/compiler/main.ml
ocaml
Js_of_ocaml compiler * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking...
25b70ab42534109bbccd130622e828b2dc918ff09d44a469b154f9dc8e544cf2
dgiot/dgiot
emqx_telemetry_api.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/dgiot/dgiot/c9f2f78af71692ba532e4806621b611db2afe0c9/lib-ce/emqx_telemetry/src/emqx_telemetry_api.erl
erlang
-------------------------------------------------------------------- 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 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_telemetry_api). -rest_api(#{name => enable_telemetry, method => 'PUT...
005ab51ceccb0ab279cb2bac3871fa966180fb965d393d4fab5d76c768eb008f
ghc/nofib
Delay.hs
module Delay (delay,delaya) where delay_time :: Int #ifdef mc68020 delay_time = 18 #else #ifdef sparc delay_time = 48 #else /* Alpha */ delay_time = 200 delay_time = 1 #endif #endif ddelay :: Int -> Int -> Int ddelay 0 0 = 0 ddelay m 0 = ddelay (m-1) delay_time ddelay m n = ddelay m (n-1) delay d = ddelay d 0 dela...
null
https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/parallel/dcbm/Delay.hs
haskell
module Delay (delay,delaya) where delay_time :: Int #ifdef mc68020 delay_time = 18 #else #ifdef sparc delay_time = 48 #else /* Alpha */ delay_time = 200 delay_time = 1 #endif #endif ddelay :: Int -> Int -> Int ddelay 0 0 = 0 ddelay m 0 = ddelay (m-1) delay_time ddelay m n = ddelay m (n-1) delay d = ddelay d 0 dela...
94a7dd455afa843681977f302521a1eed5e553aadba0654c9220626dd923888e
input-output-hk/cardano-sl
Api.hs
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # -- | Web API exposed by node. module Pos.Web.Api ( NodeApi , nodeApi , HealthCheckApi , healthCheckApi ) where import Universum import Servant.API ((:<|>), (:>), Get, JSON, PlainText) import Pos...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/lib/src/Pos/Web/Api.hs
haskell
| Web API exposed by node. -------------------------------------------------------------------------- Base -------------------------------------------------------------------------- | Servant API which provides access to full node internals. Implementations of these methods are in 'Pos.Web.Server.nodeServantHandl...
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # module Pos.Web.Api ( NodeApi , nodeApi , HealthCheckApi , healthCheckApi ) where import Universum import Servant.API ((:<|>), (:>), Get, JSON, PlainText) import Pos.Chain.Txp (Utxo) import ...
832bdc917a1eb7bb70a7dfba1c6d9dc0cd901c30bf0fdda5863af1b75cec8414
frasertweedale/notes-redhat
ACL.hs
{-# LANGUAGE OverloadedStrings #-} module ACL where import Data.Maybe (fromMaybe) import Data.Monoid (First(First, getFirst)) import Data.Semigroup ((<>)) import Data.Text (Text, unpack) | An authentication token ( simple placeholder for this POC ) . -- data AuthenticationToken = AuthenticationToken { tokenUser...
null
https://raw.githubusercontent.com/frasertweedale/notes-redhat/48ed96ed0aa8efd4e486b9daf9a4e1516498b60f/fp-examples/acl/ACL.hs
haskell
# LANGUAGE OverloadedStrings # FIXME better type | An AccessEvaluator ^ string representation | An ACL expression is left-associative with no operator precedence. In other words: @ @ This can give different results from the "usual" precedence Note that the construction is right-associative to make parsing...
module ACL where import Data.Maybe (fromMaybe) import Data.Monoid (First(First, getFirst)) import Data.Semigroup ((<>)) import Data.Text (Text, unpack) | An authentication token ( simple placeholder for this POC ) . data AuthenticationToken = AuthenticationToken { tokenUsername :: Username , tokenGroups :: [G...
037cc4b6dd303c1aecae2872375c276070c3a7c661bb8be4dddcd7475585d306
leepike/Copilot
VotingExamples.hs
-------------------------------------------------------------------------------- Copyright © 2011 National Institute of Aerospace / Galois , Inc. -------------------------------------------------------------------------------- -- | Fault-tolerant voting examples. # LANGUAGE RebindableSyntax # module VotingExamples...
null
https://raw.githubusercontent.com/leepike/Copilot/18a71502c5c9e7262f14bb8167f3b4a09c9c6a8b/Examples/VotingExamples.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ | Fault-tolerant voting examples. ------------------------------------------------------------------------------ ------------------------------------------------...
Copyright © 2011 National Institute of Aerospace / Galois , Inc. # LANGUAGE RebindableSyntax # module VotingExamples ( votingExamples ) where import Language.Copilot vote :: Spec vote = do trigger "maj" true [ arg maj ] trigger "aMaj" true [ arg $ aMajority xs maj ] where maj = majority xs xs...
3c90cd97c58881e6cf0346b37324db45ec409c1e8c6eb8cd931fa58a44bc3efa
caisah/sicp-exercises-and-examples
ex_2.20.scm
Write a procedure same - parity that takes one or more integers and returns a list of all the arguments that have the same even - odd parity as the first argument . For ;; example: ( same - parity 1 2 3 4 5 6 7 ) ;; (1 3 5 7) ( same - parity 2 3 4 5 6 7 ) ( 2 4 6 ) (define (same-parity . w) (define...
null
https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/2.2.1-representing_sequences/ex_2.20.scm
scheme
example: (1 3 5 7)
Write a procedure same - parity that takes one or more integers and returns a list of all the arguments that have the same even - odd parity as the first argument . For ( same - parity 1 2 3 4 5 6 7 ) ( same - parity 2 3 4 5 6 7 ) ( 2 4 6 ) (define (same-parity . w) (define rem (remainder (car w) 2))...