_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
2da93fe0b72c165602b61a4c6e8c5bdf0ae6d8fb237474fdcf70c6689297d40c
plow-technologies/servant-aeson-specs
GenericSpecs.hs
| Module : Servant . Aeson . GenericSpecs Description : Expose some internal data and re - export useful dependencies Copyright : ( c ) Plow Technologies , 2016 License : MIT Maintainer : , Stability : Alpha If you 're using [ servant]( - servant.readthedocs.org/ ) with either [ ...
null
https://raw.githubusercontent.com/plow-technologies/servant-aeson-specs/b4b24054173384b70fdcfc12a15d06ae9ce4c198/src/Servant/Aeson/GenericSpecs.hs
haskell
* re-exports
| Module : Servant . Aeson . GenericSpecs Description : Expose some internal data and re - export useful dependencies Copyright : ( c ) Plow Technologies , 2016 License : MIT Maintainer : , Stability : Alpha If you 're using [ servant]( - servant.readthedocs.org/ ) with either [ ...
92bef66df2c5500157eb9a2390bf2c2fac86c09e499bd5a8b1577f405526cbd0
keigoi/kmclib
chvecexp.mli
(* generate channel vectors from session types *) val make_chvecs : loc:Warnings.loc -> (string * Sess.t) list -> Parsetree.expression
null
https://raw.githubusercontent.com/keigoi/kmclib/8b2a55fe9a3d3f824faebbe59f65eaeb9510dab4/ppx/chvecexp.mli
ocaml
generate channel vectors from session types
val make_chvecs : loc:Warnings.loc -> (string * Sess.t) list -> Parsetree.expression
4014576dfc3c46cacc608ff433b59d8aa31d9b55fd3efa7295ef276a873ff7c4
nyu-acsys/drift
toChurch00.ml
let rec bot _ = bot () let fail _ = assert false let rec c10_COEFFICIENT_1129 = 0 let rec c9_COEFFICIENT_1128 = 0 let rec c8_COEFFICIENT_1127 = 0 let rec c7_COEFFICIENT_1125 = 0 let rec c6_COEFFICIENT_1124 = 0 let rec c5_COEFFICIENT_1123 = 0 let rec c4_COEFFICIENT_1122 = 0 let rec c3_COEFFICIE...
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/r_type/termination/toChurch00.ml
ocaml
-:{v:Int | true}
let rec bot _ = bot () let fail _ = assert false let rec c10_COEFFICIENT_1129 = 0 let rec c9_COEFFICIENT_1128 = 0 let rec c8_COEFFICIENT_1127 = 0 let rec c7_COEFFICIENT_1125 = 0 let rec c6_COEFFICIENT_1124 = 0 let rec c5_COEFFICIENT_1123 = 0 let rec c4_COEFFICIENT_1122 = 0 let rec c3_COEFFICIE...
a9e88a74ac42e6c51f6e9fd594cbf12380b7ff0274318d5e5139a2694fb696bd
kmi/ocml
io.lisp
(in-package #:ocml) (defun ocml-warn (string &rest format-args) (apply #'warn string format-args)) (defun ocml-output (string &rest format-args) (apply #'format t string format-args)) (defun get-source-pathname (dspec) #+:lispworks-dspec (cadar (dspec:find-dspec-locations dspec))) (defparameter *definition...
null
https://raw.githubusercontent.com/kmi/ocml/90b0b173f588c580c26393c94f9970282c640f4d/src/io.lisp
lisp
(editor::setup-indent 'def-role 1 4 4) {{{ Ontology file search and loading Idea here is to grab the load file, figure out the ontology name and files, and then create a local copy of the load.lisp and those files. We have to return the true pathname here, because it contains case information that would be lost ...
(in-package #:ocml) (defun ocml-warn (string &rest format-args) (apply #'warn string format-args)) (defun ocml-output (string &rest format-args) (apply #'format t string format-args)) (defun get-source-pathname (dspec) #+:lispworks-dspec (cadar (dspec:find-dspec-locations dspec))) (defparameter *definition...
229b0758d60e739fa0fe486ddf5c47dea7ebd05ea6347d3e5609728aa2fa340c
yuriy-chumak/ol
version-4-6.scm
OpenGL 4.6 ( 31 Jul 2017 ) GLSL 4.60 (define-library (OpenGL version-4-6) (export GL_VERSION_4_6 (exports (OpenGL version-4-5))) (import (scheme core) (OpenGL version-4-5)) (begin (define GL_VERSION_4_6 1) ))
null
https://raw.githubusercontent.com/yuriy-chumak/ol/dccf6deef72dba7cbb07dd2fda65950de017088b/libraries/OpenGL/version-4-6.scm
scheme
OpenGL 4.6 ( 31 Jul 2017 ) GLSL 4.60 (define-library (OpenGL version-4-6) (export GL_VERSION_4_6 (exports (OpenGL version-4-5))) (import (scheme core) (OpenGL version-4-5)) (begin (define GL_VERSION_4_6 1) ))
199ade981d6caef081633b010e74d3cafe6ca5a87254e1cf1b56938b605cf112
LaurentMazare/tensorflow-ocaml
registered_gradients.mli
open Base type t = { f : 'a. self:([< `float | `double ] as 'a) Node.t -> gradient:'a Node.t -> Node.p option list } val add : Node.Op_name.t -> t -> unit val find : Node.Op_name.t -> (self:Node.p -> gradient:Node.p -> Node.p option list) option type multi = { g : 'a. self:([< `float | ...
null
https://raw.githubusercontent.com/LaurentMazare/tensorflow-ocaml/52c5f1dec1a8b7dc9bc6ef06abbc07da6cd90d39/src/graph/registered_gradients.mli
ocaml
open Base type t = { f : 'a. self:([< `float | `double ] as 'a) Node.t -> gradient:'a Node.t -> Node.p option list } val add : Node.Op_name.t -> t -> unit val find : Node.Op_name.t -> (self:Node.p -> gradient:Node.p -> Node.p option list) option type multi = { g : 'a. self:([< `float | ...
57e6f8361793c3a5c1acae5e8c4f44a9280d59f8c378f3c7199da244326a36fc
metosin/fnhouse-swagger
project.clj
(defproject metosin/fnhouse-swagger "0.5.2" :description "Swagger-support for fnhouse" :url "-swagger" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.6.0"] [prismatic/plumbing "0.4.2"] [prismatic/fnhouse "0.1.1"] ...
null
https://raw.githubusercontent.com/metosin/fnhouse-swagger/69cdd92a5bb6466dce0c35e369147d7a2b598533/project.clj
clojure
(defproject metosin/fnhouse-swagger "0.5.2" :description "Swagger-support for fnhouse" :url "-swagger" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.6.0"] [prismatic/plumbing "0.4.2"] [prismatic/fnhouse "0.1.1"] ...
1b2c9782d4d225140ae51d187a13fe7ecbd023680bc6d4c83bdf4884d1702964
janestreet/universe
keymap.ml
open Core type t = { silent : bool ; noremap : bool ; mode : string ; nowait : bool ; expr : bool ; sid : int ; lhs : string ; rhs : string ; buffer : Types.Buf.t option } let bool_of_int = function | 0 -> false | _ -> true ;; module Untested = struct We do n't currently expose [ to_msgpack...
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/vcaml/src/keymap.ml
ocaml
open Core type t = { silent : bool ; noremap : bool ; mode : string ; nowait : bool ; expr : bool ; sid : int ; lhs : string ; rhs : string ; buffer : Types.Buf.t option } let bool_of_int = function | 0 -> false | _ -> true ;; module Untested = struct We do n't currently expose [ to_msgpack...
566d65a768d61b9e8f05e320b3b6cbbf0f6ca86e3f4dc90beac607edb8eeff58
blueberry/doing-bayesian-data-analysis-gpu-opencl
complete_example.clj
Copyright ( c ) . All rights reserved . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) or later ;; which can be found in the file LICENSE at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be boun...
null
https://raw.githubusercontent.com/blueberry/doing-bayesian-data-analysis-gpu-opencl/1b914aa6839a3517c5850ad53c7c972c304de0a9/src/dbda/ch08/complete_example.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) or later which can be found in the file LICENSE at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not rem...
Copyright ( c ) . All rights reserved . (ns ^{:author "Dragan Djuric"} dbda.ch08.complete-example (:require [quil.core :as q] [quil.applet :as qa] [quil.middlewares.pause-on-error :refer [pause-on-error]] [uncomplicate.commons.core :refer [with-release]] [unc...
c5b5a3b274b68d672093276db0691865010a67971fc5b5ee9f4b255ba3b62c39
avsm/eeww
typedecl.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/avsm/eeww/4d65720b5dd51376842ffe5c8c220d5329c1dc10/boot/ocaml/typing/typedecl.mli
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 Types open Format val transl_type_decl: Env.t -> Asttypes.rec_flag -> Parsetree.type_declarati...
1a25c782e632684435712930ad5b996a00bceef527d7db6cff94cab4d99a995c
well-typed-lightbulbs/ocaml-esp32
odoc_comments.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/ocamldoc/odoc_comments.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 2001 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Odoc_types let print_DEBUG s = print_string s ; print_newline ();; let simple_blank = "[ \013\009\01...
78762b697214d5078b54642a0574aed400b624ed262c5b249eb691ec32fc78bd
yangyang5214/asciicast2mp4
project.clj
(defproject player "2.6.0" :description "asciinema player" :url "-player" :license {:name "Apache 2.0" :url "-2.0"} :dependencies [[org.clojure/clojure "1.9.0"] [org.clojure/clojurescript "1.9.946"] [org.clojure/core.async "0.4.474"] [reagent "0.7....
null
https://raw.githubusercontent.com/yangyang5214/asciicast2mp4/5404a53ae331d44abfada6002b9affac76073418/asciinema-player/project.clj
clojure
(defproject player "2.6.0" :description "asciinema player" :url "-player" :license {:name "Apache 2.0" :url "-2.0"} :dependencies [[org.clojure/clojure "1.9.0"] [org.clojure/clojurescript "1.9.946"] [org.clojure/core.async "0.4.474"] [reagent "0.7....
7ad4a192070287158b0f1c28290b60eeeb47eeab1f7c98db14214c123a7beff5
astrada/google-drive-ocamlfuse
LoopbackServer.ml
open GapiLens.Infix module S = Tiny_httpd let build_page title h3 body = Printf.sprintf "<!DOCTYPE html>\n\ <html lang=\"en\">\n\ <head>\n\ <title>%s</title>\n\ </head>\n\ <body>\n\ <h3>%s</h3>\n\ %s\n\ </body>\n\ </html>" title h3 body let start port = let ser...
null
https://raw.githubusercontent.com/astrada/google-drive-ocamlfuse/9027602dbbaf7473cfacc8bd44865d2bef7c41c7/src/LoopbackServer.ml
ocaml
open GapiLens.Infix module S = Tiny_httpd let build_page title h3 body = Printf.sprintf "<!DOCTYPE html>\n\ <html lang=\"en\">\n\ <head>\n\ <title>%s</title>\n\ </head>\n\ <body>\n\ <h3>%s</h3>\n\ %s\n\ </body>\n\ </html>" title h3 body let start port = let ser...
552a29746e68be2a6a7d5d8b0e73479c58923390e1c43b5dc5163205f01e92a1
nvim-treesitter/nvim-treesitter
highlights.scm
;; Punctuation [ "%[" "@[" "~[" "*[" "]" "(" ")" ] @punctuation.bracket [":" ","] @punctuation.delimiter (["\"" "'"] @punctuation.special @conceal (#set! conceal "")) ["%" "?" "#"] @character.special ;; Entities (intent) @namespace (slot) @type (variation) @type.qualifier (alias) @property ...
null
https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/bd7b4b6eff2dcb4a8a65f55d51398e79fa3d4ec6/queries/chatito/highlights.scm
scheme
Punctuation Entities Import Text Comment Error
[ "%[" "@[" "~[" "*[" "]" "(" ")" ] @punctuation.bracket [":" ","] @punctuation.delimiter (["\"" "'"] @punctuation.special @conceal (#set! conceal "")) ["%" "?" "#"] @character.special (intent) @namespace (slot) @type (variation) @type.qualifier (alias) @property (number) @number (argument...
fefc5ab62ab6b612d5956c0dd1153184c91e238d0007c5d931d94714c03d7129
transient-haskell/transient
teststream.hs
{-# LANGUAGE RecordWildCards, ScopedTypeVariables #-} module Main where import Network import qualified Network.Socket as NS import qualified Network.BSD as BSD import System.IO hiding (hPutBufNonBlocking) import Control.Concurrent import Control.Monad import Control.Exception import Control.Monad.IO.Class import ...
null
https://raw.githubusercontent.com/transient-haskell/transient/301831888887fb199e9f9bfaba2502389e73bc93/tests/teststream.hs
haskell
# LANGUAGE RecordWildCards, ScopedTypeVariables # only done if there's an error strictness hack print (size,w, count) print s
module Main where import Network import qualified Network.Socket as NS import qualified Network.BSD as BSD import System.IO hiding (hPutBufNonBlocking) import Control.Concurrent import Control.Monad import Control.Exception import Control.Monad.IO.Class import qualified Data.ByteString.Char8 as BS import Foreign.P...
539f26989a5aebbea0f39076130f349d80b017becd856e8aee7ff933194e4d9a
kuberlog/daemon-clj
repl.clj
(ns daemon.face.repl (:require [daemon.settings :as settings] [quil.core :as q])) (def key-delay-in-ms 30) (def double-tap-delay-in-ms 120) (defn cursor-handler [state] (if (> (state :cur-frame-no) (/ @(settings/data :frame-rate) 2)) "|" "")) (defn display [state] (q/text ;;text to display (s...
null
https://raw.githubusercontent.com/kuberlog/daemon-clj/904699d005ea2df3d86426d8aa1d3b030178e683/src/daemon/face/repl.clj
clojure
text to display position extract goodies out of state debounce -should write this as a macro for an excersize accept key insert key if it is a standard char update state required for handling keys no-keypress or decline
(ns daemon.face.repl (:require [daemon.settings :as settings] [quil.core :as q])) (def key-delay-in-ms 30) (def double-tap-delay-in-ms 120) (defn cursor-handler [state] (if (> (state :cur-frame-no) (/ @(settings/data :frame-rate) 2)) "|" "")) (defn display [state] (q/text (str (if (not (nil? (st...
baa8304b09cd6c795f077ac8000b31837cb76519908665fa67b34dafd6349023
nextjournal/clojure-mode
clojure_mode.cljs
(ns nextjournal.clojure-mode (:require ["@lezer/highlight" :as highlight :refer [tags]] ["@codemirror/language" :as language :refer [LRLanguage LanguageSupport]] ["@nextjournal/lezer-clojure" :as lezer-clj] [applied-science.js-interop :as j] [nextjournal.clojure-mode.ex...
null
https://raw.githubusercontent.com/nextjournal/clojure-mode/ac038ebf6e5da09dd2b8a31609e9ff4a65e36852/src/nextjournal/clojure_mode.cljs
clojure
need to pass something, that returns " when being parsed as JSON also #js doesn't treat this correctly, hence clj->js above to build a parser \""live" from a .grammar file, rather than using a precompiled parser: Symbol "a"
(ns nextjournal.clojure-mode (:require ["@lezer/highlight" :as highlight :refer [tags]] ["@codemirror/language" :as language :refer [LRLanguage LanguageSupport]] ["@nextjournal/lezer-clojure" :as lezer-clj] [applied-science.js-interop :as j] [nextjournal.clojure-mode.ex...
a28817877f6d453396717b2c0c23c43cfacda0f65513f96174f68300238e56cf
racket/plai
repeat-test.rkt
#lang plai/mutator (allocator-setup "../good-collectors/good-collector.rkt" 30) (test/value=? (cons 1 empty) '(1)) (test/value=? (cons 1 empty) '(1)) (test/value=? (cons 1 empty) '(1)) (test/value=? (cons 1 empty) '(1)) (test/value=? (cons 1 empty) '(1)) (test/value=? (cons 1 empty) '(1)) (test/value=? (cons 1 empty)...
null
https://raw.githubusercontent.com/racket/plai/164f3b763116fcfa7bd827be511650e71fa04319/plai-lib/tests/gc/good-mutators/repeat-test.rkt
racket
#lang plai/mutator (allocator-setup "../good-collectors/good-collector.rkt" 30) (test/value=? (cons 1 empty) '(1)) (test/value=? (cons 1 empty) '(1)) (test/value=? (cons 1 empty) '(1)) (test/value=? (cons 1 empty) '(1)) (test/value=? (cons 1 empty) '(1)) (test/value=? (cons 1 empty) '(1)) (test/value=? (cons 1 empty)...
ad111001c419850ce5da13930a58eccd483a5e299d7db0e6afc4409d90bde6b1
Plutonomicon/Shrinker
PlutusTXTH.hs
# LANGUAGE TemplateHaskell # module Shrink.PlutusTXTH (shrinkCompiledTH) where import Language.Haskell.TH (Q, TExp) import PlutusTx.Code (CompiledCode) import Shrink.PlutusTX (shrinkCompiled) shrinkCompiledTH :: Q (TExp (CompiledCode a)) -> Q (TExp (CompiledCode a)) shrinkCompiledTH q = [||shrinkCompiled $$(q)||]
null
https://raw.githubusercontent.com/Plutonomicon/Shrinker/2b6564b3e49b5dfe71bce843848151b12d3d3ae0/shrinker-tx/src/Shrink/PlutusTXTH.hs
haskell
# LANGUAGE TemplateHaskell # module Shrink.PlutusTXTH (shrinkCompiledTH) where import Language.Haskell.TH (Q, TExp) import PlutusTx.Code (CompiledCode) import Shrink.PlutusTX (shrinkCompiled) shrinkCompiledTH :: Q (TExp (CompiledCode a)) -> Q (TExp (CompiledCode a)) shrinkCompiledTH q = [||shrinkCompiled $$(q)||]
2241bd8ded38a561c9aa9c6b937a1a80a7da8c9f1b9395353c5b485b2cae9a41
synsem/texhs
BibSpec.hs
{-# LANGUAGE OverloadedStrings #-} ---------------------------------------------------------------------- -- Module : Text . BibSpec Copyright : 2015 - 2017 , 2015 - 2016 Language Science Press . -- License : GPL-3 -- Maintainer : -- -- Tests for the "Text.Bib" module. ------...
null
https://raw.githubusercontent.com/synsem/texhs/9e2dce4ec8ae0b2c024e1883d9a93bab15f9a86f/test/Text/BibSpec.hs
haskell
# LANGUAGE OverloadedStrings # -------------------------------------------------------------------- License : GPL-3 Maintainer : Tests for the "Text.Bib" module. -------------------------------------------------------------------- ------------------ tests BibTeX warning: lower-case last name BibTeX warni...
Module : Text . BibSpec Copyright : 2015 - 2017 , 2015 - 2016 Language Science Press . module Text.BibSpec ( tests ) where import Data.List (intersperse) import qualified Data.Map.Strict as M import Data.Text (Text) import qualified Data.Text as T import Test.Framework (Test, t...
95f35a1c82b792e6880587892fcd1a7d79bdcbe18a36de97be64fcf3edf8b6b7
Decentralized-Pictures/T4L3NT
constants_repr.mli
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > Copyright ( c...
null
https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_alpha/lib_protocol/constants_repr.mli
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > Copyright ( c ) 2020 - 2021 Nomadic Labs < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WI...
df27b3699333b9ef2553ebe30e4a7e0f7b850b0a3de4bcb5a98d12377f59a588
mhkoji/Senn
dictionary.lisp
(defpackage :hachee.kkc.impl.lm.dictionary (:use :cl) (:export :dictionary :list-all :size :make-dictionary :save-dictionary :load-dictionary :entry-unit :entry-origin :entry :add-entry :lookup :...
null
https://raw.githubusercontent.com/mhkoji/Senn/6508e7d2e61a4dd895465de6feb7ede9d1dde82d/hachee/src/kkc/impl/lm/dictionary.lisp
lisp
(defpackage :hachee.kkc.impl.lm.dictionary (:use :cl) (:export :dictionary :list-all :size :make-dictionary :save-dictionary :load-dictionary :entry-unit :entry-origin :entry :add-entry :lookup :...
efc5a8ff1f33be73ebc09e8c6b541977cfceb0a2ab8967923b91a7e7f10ea71a
OCamlPro/liquidity
liquidClean.mli
(****************************************************************************) (* Liquidity *) (* *) Copyright ( C ) 2017 - 2020 OCamlPro SAS (* ...
null
https://raw.githubusercontent.com/OCamlPro/liquidity/3578de34cf751f54b9e4c001a95625d2041b2962/tools/liquidity/liquidClean.mli
ocaml
************************************************************************** Liquidity ...
Copyright ( C ) 2017 - 2020 OCamlPro SAS it under the terms of the GNU General Public License as published by ...
e6e3024266ccc1b883c0d63b20b9d26698367351542f699df6980a4648268202
JunSuzukiJapan/cl-reex
ignore-elements.lisp
(in-package :cl-user) (defpackage cl-reex.operator.ignore-elements (:use :cl) (:import-from :cl-reex.observer :observer :on-next :on-error :on-completed) (:import-from :cl-reex.observable :observable :is-active :set-error :set-completed :set-...
null
https://raw.githubusercontent.com/JunSuzukiJapan/cl-reex/94928c7949c235b41902138d9e4a5654b92d67eb/src/operator/ignore-elements.lisp
lisp
do nothing
(in-package :cl-user) (defpackage cl-reex.operator.ignore-elements (:use :cl) (:import-from :cl-reex.observer :observer :on-next :on-error :on-completed) (:import-from :cl-reex.observable :observable :is-active :set-error :set-completed :set-...
b0e2c0e958e6ae189ade34b45571840ebe1f44c8c653fe7e3be6867c06a0e4b9
jpaykin/LNLHaskell
Prelim.hs
{ - # OPTIONS_GHC -Wall -Wcompat -fno - warn - unticked - promoted - constructors # - } module Prelim where --import Data.Kind import Data.Constraint import ( TypeError , ErrorMessage ( .. ) ) import GHC.TypeLits import Data.Type.Equality import Data . Singletons import Data . Singletons . Prelude . Eq import ...
null
https://raw.githubusercontent.com/jpaykin/LNLHaskell/7c3e3880d2702b5456326870ba4863f27a8606b4/src/Prelim.hs
haskell
import Data.Kind ------------------------------------------ Nats ------------------------------------ ------------------------------------------ ------------------------------------------ Comparisons ----------------------------- ------------------------------------------ ------------------------------------------ P...
{ - # OPTIONS_GHC -Wall -Wcompat -fno - warn - unticked - promoted - constructors # - } module Prelim where import Data.Constraint import ( TypeError , ErrorMessage ( .. ) ) import GHC.TypeLits import Data.Type.Equality import Data . Singletons import Data . Singletons . Prelude . Eq import Unsafe.Coerce impor...
946b82f970174ee37620b24e3681103aed3c61d10cc5d1b8fc805a2c69ff59c6
slyrus/clem
bench-hprod.lisp
(in-package :clem-benchmark) (let ((m (make-instance 'double-float-matrix :dimensions '(1024 1024) :initial-element 1d0)) (n (make-instance 'double-float-matrix :dimensions '(1024 1024) :initial-element 2d0))) (with-matrix-benchmark (:hprod-1024-1024/double-float) (m.* m n))) (let ((m (make-instance 'sin...
null
https://raw.githubusercontent.com/slyrus/clem/5eb055bb3f45840b24fd44825b975aa36bd6d97c/benchmark/bench-hprod.lisp
lisp
(in-package :clem-benchmark) (let ((m (make-instance 'double-float-matrix :dimensions '(1024 1024) :initial-element 1d0)) (n (make-instance 'double-float-matrix :dimensions '(1024 1024) :initial-element 2d0))) (with-matrix-benchmark (:hprod-1024-1024/double-float) (m.* m n))) (let ((m (make-instance 'sin...
b9ea3b54bb6c43c0bc2c99b99bce9220c163e9c2518590be8343b218bcc07771
webyrd/n-grams-for-synthesis
construct-ordering-ml-curried.scm
(define expert-ordering-alist-ml `((nil . ,nil-evalo) (num . ,num-evalo) (bool . ,bool-evalo) (var . ,var-evalo) (lambda . ,lambda-evalo) (app . ,app-evalo) (car . ,car-evalo) (cdr . ,cdr-evalo) (null? . ,null?-evalo) (cons . ,cons-evalo) (pair . ,pair-evalo) (if . ,if-eva...
null
https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/construct-ordering-ml-curried.scm
scheme
(define expert-ordering-alist-ml `((nil . ,nil-evalo) (num . ,num-evalo) (bool . ,bool-evalo) (var . ,var-evalo) (lambda . ,lambda-evalo) (app . ,app-evalo) (car . ,car-evalo) (cdr . ,cdr-evalo) (null? . ,null?-evalo) (cons . ,cons-evalo) (pair . ,pair-evalo) (if . ,if-eva...
5cae75bf8dbba5889d82e7cd828f73b5e1498273c377f549ad85e2ed6f6005fd
noinia/hgeometry
Bare.hs
-------------------------------------------------------------------------------- -- | -- Module : Data.IndexedDoublyLinkedList.Bare Copyright : ( C ) -- License : see the LICENSE file Maintainer : -------------------------------------------------------------------------------- module Data.In...
null
https://raw.githubusercontent.com/noinia/hgeometry/a6abecb1ce4a7fd96b25cc1a5c65cd4257ecde7a/hgeometry-combinatorial/src/Data/IndexedDoublyLinkedList/Bare.hs
haskell
------------------------------------------------------------------------------ | Module : Data.IndexedDoublyLinkedList.Bare License : see the LICENSE file ------------------------------------------------------------------------------ ------------------------------------------------------------------------...
Copyright : ( C ) Maintainer : module Data.IndexedDoublyLinkedList.Bare( IDLList(..) , Cell(..), emptyCell , IDLListMonad, runIDLListMonad , Index , singletons , writeList , getNext, getPrev , toListFrom, toListFromR, toListContains , toListFromK, toListFromRK , insertAfter, inse...
709706a4ca45fadadeaddc30a7b4e55bdb23b062862b0d559a8e573233f60352
soegaard/metapict
system.rkt
#lang racket/base ;;; ;;; Coordinate System and Points ;;; ; This module implements a coordinate system that is to be used as part of a drawing. ; Use a coordinate system, if you want to draw a mathematical coordinate system. ; In other words this module is not needed for other types of metapict drawings. A coordi...
null
https://raw.githubusercontent.com/soegaard/metapict/207ae77e647ac4d546397fb43576fa185de25522/metapict/system.rkt
racket
Coordinate System and Points This module implements a coordinate system that is to be used as part of a drawing. Use a coordinate system, if you want to draw a mathematical coordinate system. In other words this module is not needed for other types of metapict drawings. A point in the coordinate system is repres...
#lang racket/base A coordinate system consistes of two ( mathematical ) coordinate axes . ( struct system : ( ) # : transparent ) (provide first-axis second-axis axes given origin and two basis vectors construct a coordinate system point point->pt format-point system-grid unit-labels system-ti...
ec0443c5ed3af7a2e634fe22df2a323b77fd37c7b2eea0cdbd092cb1f0048612
FranklinChen/hugs98-plus-Sep2006
BufferInternal.hs
-- #hide -------------------------------------------------------------------------------- -- | -- Module : Sound.OpenAL.AL.BufferInternal Copyright : ( c ) 2003 - 2005 -- License : BSD-style (see the file libraries/OpenAL/LICENSE) -- -- Maintainer : -- Stability : provisional -- Portability :...
null
https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/OpenAL/Sound/OpenAL/AL/BufferInternal.hs
haskell
#hide ------------------------------------------------------------------------------ | Module : Sound.OpenAL.AL.BufferInternal License : BSD-style (see the file libraries/OpenAL/LICENSE) Maintainer : Stability : provisional Portability : portable This is a purely internal module for (un-)ma...
Copyright : ( c ) 2003 - 2005 module Sound.OpenAL.AL.BufferInternal ( Buffer, marshalBuffer, unmarshalBuffer ) where import Foreign.Marshal.Array ( withArrayLen, peekArray, allocaArray ) import Foreign.Ptr ( Ptr, castPtr ) import Foreign.Storable ( Storable(..) ) import Graphics.Rendering.OpenGL.GL.Buffer...
797e333aef0621196b4bb56ca7c9c3172434df1280e8637065e28b05d3a6d36e
cocreature/reactand
Main.hs
{-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE LambdaCase # # LANGUAGE StandaloneDeriving # # LANGUAGE ScopedTypeVariables # module Main where import Control.Concurrent.Async import Control.Concurrent.Chan import Control.Concurrent.MVar import Host import Reactand import WLCHandlers main :: IO () mai...
null
https://raw.githubusercontent.com/cocreature/reactand/0da87c0ed8e01882b4d59f93b86726c34e4d8fa0/src/Main.hs
haskell
# LANGUAGE GADTs # # LANGUAGE RankNTypes #
# LANGUAGE LambdaCase # # LANGUAGE StandaloneDeriving # # LANGUAGE ScopedTypeVariables # module Main where import Control.Concurrent.Async import Control.Concurrent.Chan import Control.Concurrent.MVar import Host import Reactand import WLCHandlers main :: IO () main = do messages <- newChan action <- newEmpt...
416a1c1c171b545691eee47874af296927f9492673ad39ee19794610086b6e6d
stevana/coroutine-state-machines
HttpServer.hs
# LANGUAGE NumericUnderscores # {-# LANGUAGE OverloadedStrings #-} module HttpServer where import Control.Concurrent.MVar import Control.Concurrent.STM (atomically) import Control.Concurrent.STM.TBQueue import Network.HTTP.Types import Network.Wai import Network.Wai.Handler.Warp import System.Timeout (timeout) impor...
null
https://raw.githubusercontent.com/stevana/coroutine-state-machines/b259f114346fdcff1ed785c7b26e835abb9fb56f/src/HttpServer.hs
haskell
# LANGUAGE OverloadedStrings # ----------------------------------------------------------------------
# LANGUAGE NumericUnderscores # module HttpServer where import Control.Concurrent.MVar import Control.Concurrent.STM (atomically) import Control.Concurrent.STM.TBQueue import Network.HTTP.Types import Network.Wai import Network.Wai.Handler.Warp import System.Timeout (timeout) import AwaitingClients import Event impo...
e8b486b668345281bf5a3d93029db8ef86336815cbf76ab709db264da352e5ea
vbmithr/ocaml-bitstamp-api
bitstamp.ml
module Credentials = struct type t = { id: string; key: string; secret: string; } let make ~id ~key ~secret = { id; key; secret; } module Signature = struct let make c = let nonce = Printf.sprintf "%.0f" (Unix.time ()) in let msg = Cstruct.of_string (nonce ^ c.id ^ c.key) in let key ...
null
https://raw.githubusercontent.com/vbmithr/ocaml-bitstamp-api/22d503236e7ec725dbdd0e0fdd0116970882b567/lib/bitstamp.ml
ocaml
TODO: encapsulate address and Base58Check it.
module Credentials = struct type t = { id: string; key: string; secret: string; } let make ~id ~key ~secret = { id; key; secret; } module Signature = struct let make c = let nonce = Printf.sprintf "%.0f" (Unix.time ()) in let msg = Cstruct.of_string (nonce ^ c.id ^ c.key) in let key ...
28c4b902fc0477d997923b4c028c77ce12b864168d02426f8f7c6005f281e63f
Gandalf-/coreutils
NlSpec.hs
{-# LANGUAGE OverloadedStrings #-} module NlSpec where import Coreutils.Nl import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.Char8 as B import Data.Either import qualified Streaming.ByteString as Q import Test.Hspec spec :: Spec spec = parallel $ do ...
null
https://raw.githubusercontent.com/Gandalf-/coreutils/e464bde838e9af33a27d56a01836464b8d89b7f1/test/NlSpec.hs
haskell
# LANGUAGE OverloadedStrings #
module NlSpec where import Coreutils.Nl import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.Char8 as B import Data.Either import qualified Streaming.ByteString as Q import Test.Hspec spec :: Spec spec = parallel $ do describe "parsing" $ do ...
8e7ddb54087c54478e7584a01edabe957efe0da12192231f1dfaa1cbb0f1930a
chessai/ring-buffers
Prelude.hs
module Prelude ( module P ) where import Control.Applicative as P (pure) import Control.Concurrent.MVar as P import Control.Monad as P ((=<<), when, forM, mapM) import Control.Monad.Primitive as P (PrimMonad(..)) import Data.Bool as P (Bool(..), (&&), (||)) import Data.Coerce as P (coerce) import Data.Function as ...
null
https://raw.githubusercontent.com/chessai/ring-buffers/d31bfadeaf4f7757b6be3b2ab479a484e3e6db68/src/Prelude.hs
haskell
module Prelude ( module P ) where import Control.Applicative as P (pure) import Control.Concurrent.MVar as P import Control.Monad as P ((=<<), when, forM, mapM) import Control.Monad.Primitive as P (PrimMonad(..)) import Data.Bool as P (Bool(..), (&&), (||)) import Data.Coerce as P (coerce) import Data.Function as ...
4f41263a0c3a1dbfdb1284c0576b1b2d8ee61c02185308779931c8cbaacbc714
NethermindEth/horus-checker
Storage.hs
module Horus.SW.Storage (Storage, read, getWrites, parse, equivalenceExpr) where import Prelude hiding (read) import Data.Aeson (FromJSON (..), Value, withObject, (.:)) import Data.Aeson.Types (Parser) import Data.Coerce (coerce) import Data.Map (Map) import Data.Map qualified as Map (findWithDefault, toList) import...
null
https://raw.githubusercontent.com/NethermindEth/horus-checker/b4ce60c7739a0d12dab6c9b2ff87719b321f6200/src/Horus/SW/Storage.hs
haskell
module Horus.SW.Storage (Storage, read, getWrites, parse, equivalenceExpr) where import Prelude hiding (read) import Data.Aeson (FromJSON (..), Value, withObject, (.:)) import Data.Aeson.Types (Parser) import Data.Coerce (coerce) import Data.Map (Map) import Data.Map qualified as Map (findWithDefault, toList) import...
f65cb46b77c3f1910ba0d86ffc27c6afb2ead4dec5caf16cdaa2bef9cd4d8254
tommaisey/aeon
pulse.help.scm
;; Modulate frequency (hear (let ((f (x-line kr 40 4000 6 remove-synth))) (mul (pulse ar f 0.1) 0.2))) ;; modulate pulse width (hear (let ((w (line kr 0.01 0.99 8 remove-synth))) (mul (pulse ar 200 w) 0.2))) two band limited square waves thru a resonant low pass filter (hear (rlpf (mul (pulse ar (mce2 1...
null
https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/oscillators/pulse.help.scm
scheme
Modulate frequency modulate pulse width
(hear (let ((f (x-line kr 40 4000 6 remove-synth))) (mul (pulse ar f 0.1) 0.2))) (hear (let ((w (line kr 0.01 0.99 8 remove-synth))) (mul (pulse ar 200 w) 0.2))) two band limited square waves thru a resonant low pass filter (hear (rlpf (mul (pulse ar (mce2 100 250) 0.5) 0.1) (x-line kr 8000 40 5 ...
13eb41ff2bde36825c77808854ccf140de4323331a323c72d449a805f4a78b93
gedge-platform/gedge-platform
rabbit_federation_parameters.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . %% -module(rabbit_federation_parameters). -behaviour...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_federation/src/rabbit_federation_parameters.erl
erlang
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit_federation_parameters). -behaviour(rabbi...
309198e5433e9d5f610adef73f321e7b94fa95d36b222f3cd2cfc32510019706
dhess/sicp-solutions
ex2.23.scm
(define (for-each f items) (if (null? items) #t (let () (f (car items)) (for-each f (cdr items)))))
null
https://raw.githubusercontent.com/dhess/sicp-solutions/2cf78db98917e9cb1252efda76fddc8e45fe4140/chap2/ex2.23.scm
scheme
(define (for-each f items) (if (null? items) #t (let () (f (car items)) (for-each f (cdr items)))))
4c01ee0237dcc9585f3bc915b2a2fea28d4bcfee1824fb67bba860b9437ddcab
ajnsit/wai-routes
Class.hs
# LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # module Routes.Class ( RenderRoute (..) , ParseRoute (..) , RouteAttrs (..) ) where import Data.Text (Text) import Data.Set (Set) class Eq (Route a) => RenderRoute a where -- | The <-and-handlers type-safe URLs> associated with a site argument...
null
https://raw.githubusercontent.com/ajnsit/wai-routes/4d6b240af57a95353373ddba81c4905db0234459/src/Routes/Class.hs
haskell
| The <-and-handlers type-safe URLs> associated with a site argument. ^ The path of the URL split on forward slashes, and a list of query parameters with their associated value. ^ The path of the URL split on forward slashes, and a list of query parameters with their associated value. ^ A set of <-attributes attrib...
# LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # module Routes.Class ( RenderRoute (..) , ParseRoute (..) , RouteAttrs (..) ) where import Data.Text (Text) import Data.Set (Set) class Eq (Route a) => RenderRoute a where data Route a renderRoute :: Route a class RenderRoute a => ParseRo...
9f44ce295cf6c0682c56292d3c4bead0844faeafe926fe7be06b67322cc24303
Frama-C/Frama-C-snapshot
wtable.ml
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/gui/wtable.ml
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...
33c2020752ab3a9d1da2a0900034c24f7fe4ee7126a718c11f0be9c8c7fbb81a
hsyl20/haskus-system
Graphics.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DataKinds # -- | DRM/KMS Internals -- Bindings with C structures and IOCTLs module Haskus.System.Linux.Internals.Graphics ( -- * Mode ModeType (..) , ModeTypes , ModeFlag (..) , ModeFlags , Stereo3D (..) , ModeFlagsStereo...
null
https://raw.githubusercontent.com/hsyl20/haskus-system/2f389c6ecae5b0180b464ddef51e36f6e567d690/haskus-system/src/lib/Haskus/System/Linux/Internals/Graphics.hs
haskell
# LANGUAGE DeriveAnyClass # | DRM/KMS Internals * Mode * Resources * Controller * Plane * Encoder * Connector * Properties * Framebuffer move * Cursor * Gamma look-up table * Page flipping * Generic (dumb) buffer * Atomic * Generic * Capabilities * Prime * IOCTLs * Events * Rotation/reflection ==...
# LANGUAGE DeriveGeneric # # LANGUAGE DataKinds # Bindings with C structures and IOCTLs module Haskus.System.Linux.Internals.Graphics ( ModeType (..) , ModeTypes , ModeFlag (..) , ModeFlags , Stereo3D (..) , ModeFlagsStereo3D , PowerState(..) , ScalingMode(..) , AspectMode(..) , Di...
f49061f8a0fa677685487248d4fc3a5beaa2697726a0871c7b6e8989997cd4ad
data61/Mirza
Beam.hs
{-# LANGUAGE FlexibleContexts #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # module Mirza.Common.Beam where import qualified Database.Beam as B import qualified Database.Beam.Backend.SQL as BSQL import qualified Database.Beam.Migrate a...
null
https://raw.githubusercontent.com/data61/Mirza/24e5ccddfc307cceebcc5ce26d35e91020b8ee10/projects/mirza-common-haskell/src/Mirza/Common/Beam.hs
haskell
# LANGUAGE FlexibleContexts # If it's a fromField used for ``SomeCustomType``, sample usage would be | Field definition to use for last updated columns | Helper function to manage the returnValue of ``readMaybe`` or gracefully fail defaultFromBackendRow :: String -> F (FromBackendRowF b...
# LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # module Mirza.Common.Beam where import qualified Database.Beam as B import qualified Database.Beam.Backend.SQL as BSQL import qualified Database.Beam.Migrate as BMigrate import Database.P...
a162d6e039b395eadf960d0be429f1ed66e466b3f9c8d20b514b41cbc6894feb
kelamg/HtDP2e-workthrough
ex3&4.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-advanced-reader.ss" "lang")((modname ex3&4) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #t ...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Fixed-size-Data/ex3%264.rkt
racket
about the language level of this file in a form that our tools can easily process.
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-advanced-reader.ss" "lang")((modname ex3&4) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #t #t none #f () #f))) (define str "helloworld") (define i 5) (string-append (substring ...
fe92c47a86b7cbe9eb5e57c8090b6c4ef5d3cd78d602e2051029255abfcb30f0
haskellari/postgresql-simple
Errors.hs
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # ------------------------------------------------------------------------------ -- | -- Module: Database.PostgreSQL.Simple.Errors Copyright : ( c ) 2012 - 2013 , License : BSD3 Maintainer : ...
null
https://raw.githubusercontent.com/haskellari/postgresql-simple/f74cf19a8e3880be950676d7a1a4509b4e594fa7/src/Database/PostgreSQL/Simple/Errors.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE OverloadedStrings # ---------------------------------------------------------------------------- | Module: Database.PostgreSQL.Simple.Errors Stability: experimental | Module for parsing errors from postgresql error messages. /Note: Success of parsing may depend ...
# LANGUAGE RecordWildCards # Copyright : ( c ) 2012 - 2013 , License : BSD3 Maintainer : < > Currently only parses integrity violation errors ( class 23 ) . module Database.PostgreSQL.Simple.Errors ( ConstraintViolation(..) , constraintViolation , constraintViolationE...
d2aa9ca4d7d04538587a08ae3ed0ba9761440dd7e464c5940680a9d05a809078
gethop-dev/hop-cli
routing.cljc
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this ;; file, You can obtain one at / {{=<< >>=}} (ns <<project.name>>.shared.util.routing (:require [malli.transform :as mt] [reitit.coercion.malli :as rcm])) (defn s...
null
https://raw.githubusercontent.com/gethop-dev/hop-cli/c7b848915ff268aa41ff9a61a62c614f58ecbeb9/resources/bootstrap/profiles/frontend/app/src/%7B%7Bproject.files-name%7D%7D/shared/util/routing.cljc
clojure
file, You can obtain one at /
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this {{=<< >>=}} (ns <<project.name>>.shared.util.routing (:require [malli.transform :as mt] [reitit.coercion.malli :as rcm])) (defn singleton->vector [x] (if (str...
7a0e233cb04599a4e16834bdf56b0b727bd50b94efe6d4ee41dbfc6b0d4eac3e
deadpendency/deadpendency
DependenciesDetermined.hs
module Common.Model.InterchangeEvent.DependenciesDetermined ( DependenciesDetermined (..), ) where import Common.Aeson.Aeson import Common.Model.Dependency.Basic.BasicRepoDependencies import Common.Model.Dependency.Ignored.IgnoredRepoDependencies import Data.Aeson data DependenciesDetermined = DependenciesDetermi...
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/Model/InterchangeEvent/DependenciesDetermined.hs
haskell
module Common.Model.InterchangeEvent.DependenciesDetermined ( DependenciesDetermined (..), ) where import Common.Aeson.Aeson import Common.Model.Dependency.Basic.BasicRepoDependencies import Common.Model.Dependency.Ignored.IgnoredRepoDependencies import Data.Aeson data DependenciesDetermined = DependenciesDetermi...
8d178a9293ded42d5312169c2357ac21699aac86f9ed93d342996636d774e18c
theHamsta/petalisp-cuda
test-custom-op.lisp
(in-package :petalisp-cuda/tests) (deftest test-lazy-convolution-compute (let ((a (lazy #'+ #4A((((2 2) (2 2)))) #4A((((2 2) (2 2)))))) (b #4A((((2)))))) (with-cuda-backend (compute (lazy #'+ a (lazy-reduce #'max (lazy-convolution a b ...
null
https://raw.githubusercontent.com/theHamsta/petalisp-cuda/12b9ee426e14edf492d862d5bd2dbec18ec427c6/tests/test-custom-op.lisp
lisp
(petalisp.graphviz:view (network-outputs inference)) (petalisp.graphviz:view (network-outputs gradient))
(in-package :petalisp-cuda/tests) (deftest test-lazy-convolution-compute (let ((a (lazy #'+ #4A((((2 2) (2 2)))) #4A((((2 2) (2 2)))))) (b #4A((((2)))))) (with-cuda-backend (compute (lazy #'+ a (lazy-reduce #'max (lazy-convolution a b ...
3074ca30e48b2c16d33ce7f5be12c292f0e2fb85037c4d2a3012d8321811d30d
cjsauer/joinery
build.clj
(ns build (:refer-clojure :exclude [test]) (:require [clojure.tools.build.api :as b] ; for b/git-count-revs [org.corfield.build :as bb])) (def lib 'net.clojars.cjsauer/joinery) (def version (format "0.1.%s" (b/git-count-revs nil))) (defn test "Run the tests." [opts] (bb/run-tests opts)) (defn ci "R...
null
https://raw.githubusercontent.com/cjsauer/joinery/e0735dc83e2cf184be281769897162ac00de27ef/build.clj
clojure
for b/git-count-revs
(ns build (:refer-clojure :exclude [test]) [org.corfield.build :as bb])) (def lib 'net.clojars.cjsauer/joinery) (def version (format "0.1.%s" (b/git-count-revs nil))) (defn test "Run the tests." [opts] (bb/run-tests opts)) (defn ci "Run the CI pipeline of tests (and build the JAR)." [opts] (-> opts...
dffd560a5ebe6e8f35a3a5a9dfef799e3b0dfae5ca10cb78736f4454a66a2cc0
haskell-servant/servant
Request.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveTraversable #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTy...
null
https://raw.githubusercontent.com/haskell-servant/servant/276ca2ed01f0ca352b21bbc544a39a3d31c4fb3c/servant-client-core/src/Servant/Client/Core/Request.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveGeneric # # LANGUAGE DeriveTraversable # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # ** Modifiers A GET request to the top-level path | Append extra path to the request being constructed. Warning: This function assumes that t...
# LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # # LANGUAGE TypeFamilies # module Servant.Client.Core.Request ( Request, RequestF (..), RequestBody (..), defaultRequest, addHeader, appendToPat...
8c9d3525c63c41cba81d44c8168d0a0c98ceb0165a813b777a1b1b9d6cec24b4
marick/fp-oo
ts_lazy.clj
(ns solutions.ts-lazy (:use midje.sweet)) (load-file "sources/lazy.clj") (load-file "solutions/lazy.clj") (fact (mmap inc (rrange 0 10)) => [1 2 3 4 5 6 7 8 9 10]) (fact (ffilter even? (rrange 0 10)) => [0 2 4 6 8]) (fact (eager-filter even? (rrange 0 10)) => [0 2 4 6 8]) (fact ffilter =not=> eager? ea...
null
https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/test/solutions/ts_lazy.clj
clojure
(ns solutions.ts-lazy (:use midje.sweet)) (load-file "sources/lazy.clj") (load-file "solutions/lazy.clj") (fact (mmap inc (rrange 0 10)) => [1 2 3 4 5 6 7 8 9 10]) (fact (ffilter even? (rrange 0 10)) => [0 2 4 6 8]) (fact (eager-filter even? (rrange 0 10)) => [0 2 4 6 8]) (fact ffilter =not=> eager? ea...
936c050c8b756e6d3f611260ed6dfc10476c1942b7dfc52ad2c3d6e56b175204
rurban/clisp
postgresql.lisp
CLISP interface to PostgreSQL < / > Copyright ( C ) 1999 - 2010 This is free software , distributed under the GNU GPL v2 + this file is in sync with 1.147 CVS tags : REL8_5_ALPHA3_BRANCH , REL8_5_ALPHA3 , REL8_5_ALPHA2_BRANCH , REL8_5_ALPHA2 , REL8_5_ALPHA1_BRANCH , REL8_5_ALPHA1 , REL8_4_STABLE , REL8_...
null
https://raw.githubusercontent.com/rurban/clisp/75ed2995ff8f5364bcc18727cde9438cca4e7c2c/modules/postgresql/postgresql.lisp
lisp
-fe.h local PostgreSQL config Identifiers of error message fields. 'S' 'C' 'M' 'D' 'H' 'P' 'p' 'q' 'W' 'F' 'L' 'R' 0x01 0x02 Implies PG_COPYRES_ATTRS 0x04 0x08 Waiting for connection to be made. waiting to send . Waiting for a response from the postmaster. Received authentication; waiting for bac...
CLISP interface to PostgreSQL < / > Copyright ( C ) 1999 - 2010 This is free software , distributed under the GNU GPL v2 + this file is in sync with 1.147 CVS tags : REL8_5_ALPHA3_BRANCH , REL8_5_ALPHA3 , REL8_5_ALPHA2_BRANCH , REL8_5_ALPHA2 , REL8_5_ALPHA1_BRANCH , REL8_5_ALPHA1 , REL8_4_STABLE , REL8_...
f58c4319c59131d3c5de756936b4c79634edb3734d282822cae7c466a9bef5d4
quil-lang/quilc
mat2.lisp
;;;; src/discrete/operators/mat2.lisp ;;;; Author : (cl:in-package #:cl-quil.discrete/operators) Defines 2x2 matrices and its operations (coalton-toplevel (define-type (Mat2 :a) "Square 2 by 2 matrix." (Mat2 :a :a :a :a)) (define-instance (Degreed (Mat2 :a)) (define (degree _) 2)) (define-...
null
https://raw.githubusercontent.com/quil-lang/quilc/e04c4d3fb9b7b1028ab7faaff1a3bf692dcb3d44/src/discrete/operators/mat2.lisp
lisp
src/discrete/operators/mat2.lisp a * identity
Author : (cl:in-package #:cl-quil.discrete/operators) Defines 2x2 matrices and its operations (coalton-toplevel (define-type (Mat2 :a) "Square 2 by 2 matrix." (Mat2 :a :a :a :a)) (define-instance (Degreed (Mat2 :a)) (define (degree _) 2)) (define-instance (Functor Mat2) (define (map f ...
8d40217efd3a20cee2291a696678efebf9c43b9c16511fedd3dcaceda9171499
markus-git/hardware-edsl
Monad.hs
# LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleContexts # used for the / Eq inst . of XDeclaration etc . # LANGUAGE StandaloneDeriving # module Language.Embedded.VHDL.Monad ( VHDL , VHDLT , VHDLEnv(..) , MonadV , emptyVHDLEnv -...
null
https://raw.githubusercontent.com/markus-git/hardware-edsl/d0fde93ff57a8f5c2c37e273ff3a1d2a761fc5eb/src/Language/Embedded/VHDL/Monad.hs
haskell
# LANGUAGE ConstraintKinds # ^ run ^ pretty printing ^ entity container ^ name generation ^ imports ^ ... ^ ... ^ ... ^ statements ^ specialized statements ^ structures ^ common things ------------------------------------------------------------------------------ * VHDL monad and environment. --...
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE FlexibleContexts # used for the / Eq inst . of XDeclaration etc . # LANGUAGE StandaloneDeriving # module Language.Embedded.VHDL.Monad ( VHDL , VHDLT , VHDLEnv(..) , MonadV , emptyVHDLEnv , runVHDLT, runVHDL, execVHDLT, execVHDL , p...
71f84e758165c1a73045427a0b29a1aa4d1175bf44c9c3ec569d7289a5d751bb
ocsigen/ocaml-eliom
class_2.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/letrec/class_2.ml
ocaml
************************************************************************ OCaml ...
, projet Gallium , INRIA Rocquencourt Copyright 2012 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the class test = let rec f = print_endline "f"; fun x -> g x and g = print_endline "g"; fun x -> f x in ...
1fbf6801822c45b0a4beaaebad1cc1e5a2bb2ad892c460bbaa3be33dc421a02a
racket/racket7
info.rkt
#lang info (define collection "pkg-test3")
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/pkgs/racket-test/tests/pkg/test-pkgs/pkg-test3-v3/info.rkt
racket
#lang info (define collection "pkg-test3")
9d501ef375a012a80966989dece4c6e3512549282e5b9c5208eac8a50133327d
osfameron/words
compass.hs
data Compass = North | East | South | West deriving (Eq, Ord, Enum, Show)
null
https://raw.githubusercontent.com/osfameron/words/2afc9513b75ef713083627d8e7102650f028a99f/s2/compass.hs
haskell
data Compass = North | East | South | West deriving (Eq, Ord, Enum, Show)
defb8603f5bf54a1b6a9f890699fe5776faa263be9cf902d096ad1d6e4dc36d8
racket/racket7
lambda.rkt
#lang racket/base (require "match.rkt" "vehicle.rkt" "id.rkt") ;; See also "vehicle.rkt" for the `lam` structure type. (provide extract-lambdas!) (define (extract-lambdas! lambdas e) (match e [`(define ,id ,rhs) (extract-lambdas! lambdas rhs)] [`(define-values ,_ ,rhs) (extract-...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/cify/lambda.rkt
racket
See also "vehicle.rkt" for the `lam` structure type.
#lang racket/base (require "match.rkt" "vehicle.rkt" "id.rkt") (provide extract-lambdas!) (define (extract-lambdas! lambdas e) (match e [`(define ,id ,rhs) (extract-lambdas! lambdas rhs)] [`(define-values ,_ ,rhs) (extract-lambdas! lambdas rhs)] [`(begin ,es ...) (for (...
c4579aecbc4681ff1c9a35b0ce08f0b23be2aa7fbc8e0a2a5ead99ea45dd948a
mokus0/junkbox
Curry2.hs
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances , FlexibleContexts , UndecidableInstances , EmptyDataDecls , TypeOperators , TemplateHaskell , GADTs # MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, FlexibleContexts, Undec...
null
https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/TypeExperiments/Curry2.hs
haskell
- It's quite ugly, but I finally managed to make my "varargs" curry - and uncurry operations... - - usage: - curry d2 :: ((a, b) -> c) -> a -> b -> c - curry d5 :: ((a, a1, a2, a3, b) -> c) -> a -> a1 -> a2 -> a3 -> b -> c - - etc. The implementation is indexed by peano numbers because we need a recu...
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances , FlexibleContexts , UndecidableInstances , EmptyDataDecls , TypeOperators , TemplateHaskell , GADTs # MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, FlexibleContexts, Undec...
cda9bcb513607f70ace2dbbfd63d851befd86ec65c32287b3712ecb9caba96fb
donaldsonjw/bigloo
module.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / comptime / Module / module.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Module/module.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * The compilation of a Module clause */ *===========================...
* serrano / prgm / project / bigloo / comptime / Module / module.scm * / * Author : * / * Creation : Fri May 31 10:29:03 1996 * / * Last change : Thu May 15 18:43:05 2014 ( serrano ) * / * Copy...
73d6c59a2d864e88d65a0765f5ab5f7d173ea979912b87e6eb45d86f613e3695
nibbula/yew
where-cmds.lisp
;;; ;;; where-cmds.lisp - Commands for where. ;;; (in-package :where) (lish:defcommand where ((predicate object :required t :help "A function designator which returns true for items to keep from sequence.") (print boolean :short-arg #\p :help "Print the result.") (sequence object :rest t :help...
null
https://raw.githubusercontent.com/nibbula/yew/a62473dae637fb33a92aa75f260bf77b34cdbcfd/los/where-cmds.lisp
lisp
where-cmds.lisp - Commands for where. End
(in-package :where) (lish:defcommand where ((predicate object :required t :help "A function designator which returns true for items to keep from sequence.") (print boolean :short-arg #\p :help "Print the result.") (sequence object :rest t :help "A sequence to use instead of *input*.")) "A wo...
f06e6f2682def5b15dd20bd2ef1ab8d4232f71b74846f1a40393f5d21422ab0b
BramvanVeenschoten1/qtt
Utils.hs
module Utils where import Core import Data.List import Data.Maybe import Data.Map hiding (foldr) based on the matita kernel {- here we have utilities for iterating over core terms -} nth :: Int -> [a] -> Maybe a nth 0 (x : _) = Just x nth n (_ : xs) = nth (n-1) xs nth _ _ = Nothing {- get the larg...
null
https://raw.githubusercontent.com/BramvanVeenschoten1/qtt/ece216ac2e6126b25e0894e93bd146a838b084b3/lamcvii/Utils.hs
haskell
here we have utilities for iterating over core terms get the largest number of parameters that are uniformly applied to all recursive occurences may be useable for fixpoints as well? use fold fold visits the term t accumulating in acc the result of the applications of f to subterms; ctx is an input p...
module Utils where import Core import Data.List import Data.Maybe import Data.Map hiding (foldr) based on the matita kernel nth :: Int -> [a] -> Maybe a nth 0 (x : _) = Just x nth n (_ : xs) = nth (n-1) xs nth _ _ = Nothing getUniparamno :: Term -> Int -> Int getUniparamno = f 0 where eatArgs n...
416eb03e91cb84d4e94e849db020ebb89f2adc6c63b885caf64d4cf55f6c7d31
tweag/asterius
Endianness.hs
{-# LANGUAGE OverloadedStrings #-} -- | -- Module : Asterius.Builtins.Endianness Copyright : ( c ) 2018 EURL Tweag -- License : All rights reserved (see LICENCE file in the distribution). -- -- Wasm implementations of byte-swapping functions (@hs_bswap16@, @hs_bswap32@, -- and @hs_bswap64@), and conv...
null
https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/src/Asterius/Builtins/Endianness.hs
haskell
# LANGUAGE OverloadedStrings # | Module : Asterius.Builtins.Endianness License : All rights reserved (see LICENCE file in the distribution). Wasm implementations of byte-swapping functions (@hs_bswap16@, @hs_bswap32@, and @hs_bswap64@), and conversions between host (little-endian) and network --------...
Copyright : ( c ) 2018 EURL Tweag ( big - endian ) byte order ( @htonl@ , @htons@ , @ntohl@ , and @ntohs@ ) . module Asterius.Builtins.Endianness ( endiannessCBits, ) where import Asterius.EDSL import Asterius.Types endiannessCBits :: AsteriusModule endiannessCBits = hs_bswap16 <> hs_bswap32 <> hs_bsw...
8bd5abbc8d5a544bffd9e518656597500a31c118d67e1a877abbc899607883f2
nd/bird
9.4.3.hs
hamming' a b c = 1:merge (map (a*) (hamming' a b c)) (merge (map (b*) (hamming' a b c)) (map (c*) (hamming' a b c))) merge :: [Integer] -> [Integer] -> [Integer] merge (x:xs) (y:ys) | x < y = x:merge xs (y:ys) | x == y = x:merge xs ys | x > y = y:merge (x:xs) ys h...
null
https://raw.githubusercontent.com/nd/bird/06dba97af7cfb11f558eaeb31a75bd04cacf7201/ch09/9.4.3.hs
haskell
hamming' a b c = 1:merge (map (a*) (hamming' a b c)) (merge (map (b*) (hamming' a b c)) (map (c*) (hamming' a b c))) merge :: [Integer] -> [Integer] -> [Integer] merge (x:xs) (y:ys) | x < y = x:merge xs (y:ys) | x == y = x:merge xs ys | x > y = y:merge (x:xs) ys h...
5953a18b9004cac95965a4b0c3c8a89d77db726a8f02da8e45f9bc02ec3d6ef6
tsloughter/rebar3_tests
relup2_test_sup.erl
%%%------------------------------------------------------------------- %% @doc relup_test top level supervisor. %% @end %%%------------------------------------------------------------------- -module(relup2_test_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(SERVER, ?MODULE). sta...
null
https://raw.githubusercontent.com/tsloughter/rebar3_tests/090bfef7d3a4790bb6b16e4c38df6e4c0460b4b2/relup_test/apps/relup2_test/src/relup2_test_sup.erl
erlang
------------------------------------------------------------------- @doc relup_test top level supervisor. @end ------------------------------------------------------------------- sup_flags() = #{strategy => strategy(), % optional intensity => non_neg_integer(), % optional optional child_sp...
-module(relup2_test_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(SERVER, ?MODULE). start_link() -> supervisor:start_link({local, ?SERVER}, ?MODULE, []). init([]) -> SupFlags = #{strategy => one_for_all, intensity => 0, period => 1}, ...
1b428267705a152f3f7f8bc026b161dc97713ba6a2e196be4a8a09d97a0b61e6
may-liu/qtalk
mod_caps.erl
%%%---------------------------------------------------------------------- File : mod_caps.erl Author : < > Purpose : Request and cache Entity Capabilities ( XEP-0115 ) Created : 7 Oct 2006 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2014 ProcessOne %%% %%% This program is free software; yo...
null
https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/mod_caps.erl
erlang
---------------------------------------------------------------------- This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER...
File : mod_caps.erl Author : < > Purpose : Request and cache Entity Capabilities ( XEP-0115 ) Created : 7 Oct 2006 by < > ejabberd , Copyright ( C ) 2002 - 2014 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either versi...
d5371b2f20494558462157256108c22f256d65bea92723d164e6c730c5c81e51
auser/beehive
beehive_strategiest_test.erl
-module (beehive_strategiest_test). -include_lib("eunit/include/eunit.hrl"). -include ("beehive.hrl"). setup() -> ok. teardown(_X) -> ok. starting_test_() -> {inorder, {setup, fun setup/0, fun teardown/1, [ fun random/0, fun least_loaded/0 ] } }. random() ->...
null
https://raw.githubusercontent.com/auser/beehive/dfe257701b21c56a50af73c8203ecac60ed21991/lib/erlang/apps/beehive/test/beehive/beehive_strategiest_test.erl
erlang
-module (beehive_strategiest_test). -include_lib("eunit/include/eunit.hrl"). -include ("beehive.hrl"). setup() -> ok. teardown(_X) -> ok. starting_test_() -> {inorder, {setup, fun setup/0, fun teardown/1, [ fun random/0, fun least_loaded/0 ] } }. random() ->...
0f6ed47c1f40abd496e9d4e69f7a488eed600d5811fbf9e2f38d37867604d170
ocaml/ocaml
test_caml.ml
(* TEST include runtime_events *) open Runtime_events let major = ref 0 let minor = ref 0 let compact = ref 0 let majors = ref 0 let minors = ref 0 let compacts = ref 0 let got_start = ref false let lifecycle domain_id ts lifecycle_event data = match lifecycle_event with | EV_RING_START -> begin ...
null
https://raw.githubusercontent.com/ocaml/ocaml/9e2a126f7d02e2116616a0bd8c6465308f75cafc/testsuite/tests/lib-runtime-events/test_caml.ml
ocaml
TEST include runtime_events
open Runtime_events let major = ref 0 let minor = ref 0 let compact = ref 0 let majors = ref 0 let minors = ref 0 let compacts = ref 0 let got_start = ref false let lifecycle domain_id ts lifecycle_event data = match lifecycle_event with | EV_RING_START -> begin assert(match data with ...
34b5344b35df9c11e81962f1a70bdcb37d11dae24f4847c89bb1b3fe3d2925c2
mbutterick/brag
add-mult.rkt
#lang brag expr : term (/'+' term)* @term : factor (/'*' @factor)* factor : ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9")+
null
https://raw.githubusercontent.com/mbutterick/brag/6c161ae31df9b4ae7f55a14f754c0b216b60c9a6/brag-lib/brag/examples/add-mult.rkt
racket
#lang brag expr : term (/'+' term)* @term : factor (/'*' @factor)* factor : ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9")+
93800390a016e7a379cef5a83a37571610892315ac304c6b2acc453160d73c64
juhp/fbrnch
Bugs.hs
{-# LANGUAGE OverloadedStrings, RecordWildCards #-} module Cmd.Bugs (bugsCmd, bzusersCmd) where import Bugzilla import Common import Common.System (error') import qualified Common.Text as T import Package bugsCmd :: Maybe String -> [String] -> IO () bugsCmd keyword pkgs = do if null pkgs FIXME check for dis...
null
https://raw.githubusercontent.com/juhp/fbrnch/521d268e90801366f1fefba995257f18e125a10c/src/Cmd/Bugs.hs
haskell
# LANGUAGE OverloadedStrings, RecordWildCards #
module Cmd.Bugs (bugsCmd, bzusersCmd) where import Bugzilla import Common import Common.System (error') import qualified Common.Text as T import Package bugsCmd :: Maybe String -> [String] -> IO () bugsCmd keyword pkgs = do if null pkgs FIXME check for distgit then bugsPkg "." else mapM_ bugsPkg pkg...
2376b77138499347efa04051b27828698dab00ed249d9adcb9eb9e983afa19aa
clojurewerkz/archimedes
element.clj
(ns clojurewerkz.archimedes.element (:refer-clojure :exclude [keys vals assoc! dissoc! get]) (:import com.tinkerpop.blueprints.Element)) (defn get ([^Element elem key] (get elem key nil)) ([^Element elem key not-found] (let [value (.getProperty elem (name key))] (if (nil? value) not-found valu...
null
https://raw.githubusercontent.com/clojurewerkz/archimedes/f3300d3d71d35534acf7cc6f010e3fa503be0fba/src/clojure/clojurewerkz/archimedes/element.clj
clojure
Avoids changing keys that shouldn't be changed. Important when using types. You aren't ever going to change a user's id for example.
(ns clojurewerkz.archimedes.element (:refer-clojure :exclude [keys vals assoc! dissoc! get]) (:import com.tinkerpop.blueprints.Element)) (defn get ([^Element elem key] (get elem key nil)) ([^Element elem key not-found] (let [value (.getProperty elem (name key))] (if (nil? value) not-found valu...
d20fa1bbeff54f0ced2d6e30e190223d1eabfb86a5a74dd4de0173ddd98e9786
ocaml/ocamlbuild
discard_printf.ml
(***********************************************************************) (* *) (* ocamlbuild *) (* *) , , projet Galliu...
null
https://raw.githubusercontent.com/ocaml/ocamlbuild/792b7c8abdbc712c98ed7e69469ed354b87e125b/src/discard_printf.ml
ocaml
********************************************************************* ocamlbuild ...
, , projet Gallium , INRIA Rocquencourt Copyright 2007 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with Original author : let discard_printf fmt = Forma...
615f63477f89591ce431ee5a825903d817bda2b8aeb5cfc75057ba16c09017db
EveryTian/Haskell-Codewars
Tests.hs
# LANGUAGE RecordWildCards # import Data.Foldable (for_) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import DNA (toRNA) main :: IO () main = hspecWith defaultConfig {configFastFail = True} specs specs :: Spec specs = describe "toRNA...
null
https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/exercism/rna-transcription/test/Tests.hs
haskell
# LANGUAGE RecordWildCards # import Data.Foldable (for_) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import DNA (toRNA) main :: IO () main = hspecWith defaultConfig {configFastFail = True} specs specs :: Spec specs = describe "toRNA...
9fd98f66c2586763615c5f913a7e610e5af0df54ae18a7b037ed760af8b9f26b
jwiegley/logging
Logging.hs
# OPTIONS_GHC -Wall -fno - warn - orphans # {-# LANGUAGE OverloadedStrings #-} -- | Quick example of how to use this module: -- -- @ import Control . Logging -- -- main = withStdoutLogging $ do -- log "This is a log message!" timedLog " This is a timed log message ! " $ threadDelay 100000 -- @ module Cont...
null
https://raw.githubusercontent.com/jwiegley/logging/27e4f2d40a0d9206211f9e06c5c1727f810337b6/Control/Logging.hs
haskell
# LANGUAGE OverloadedStrings # | Quick example of how to use this module: @ main = withStdoutLogging $ do log "This is a log message!" @ | Set the verbosity level. Messages at our higher than this level are displayed. It defaults to 'LevelDebug'. | Set the format used for log timestamps. | When print...
# OPTIONS_GHC -Wall -fno - warn - orphans # import Control . Logging timedLog " This is a timed log message ! " $ threadDelay 100000 module Control.Logging ( log , log' , logS , logS' , warn , warn' , warnS , warnS' , debug , debug' , debugS , debugS' , erro...
561fc835d6a296f5288e498d165da1c80949be671f08263793339b4dd478aacf
HealthSamurai/stresty
util.cljc
(ns stylo.util (:refer-clojure :exclude [format]) (:require [garden.color :refer [hex->rgb]] [garden.units :as units] #?(:cljs [goog.string :as gstring]) #?(:cljs [goog.string.format]) #?(:clj [garden.def])) #?(:cljs (:require-macros [garden.def]))) (defn format [fmt & args] #?(:clj (app...
null
https://raw.githubusercontent.com/HealthSamurai/stresty/130cedde6bf53e07fe25a6b0b13b8bf70846f15a/src-ui/stylo/util.cljc
clojure
(ns stylo.util (:refer-clojure :exclude [format]) (:require [garden.color :refer [hex->rgb]] [garden.units :as units] #?(:cljs [goog.string :as gstring]) #?(:cljs [goog.string.format]) #?(:clj [garden.def])) #?(:cljs (:require-macros [garden.def]))) (defn format [fmt & args] #?(:clj (app...
b9219a73132c906f748d761e881ca1af8812b9e2907b8ad5ae20a0d1fc8de84e
myuon/Chimera
Menu.hs
# LANGUAGE TemplateHaskell # module Chimera.Engine.Core.Menu where import FreeGame import Control.Lens import Data.Default import qualified Data.Vector as V import qualified Data.Map as M import qualified Data.Foldable as F import Chimera.State data Item m = Item { _caption :: String, _exec :: m () } makeLens...
null
https://raw.githubusercontent.com/myuon/Chimera/e4e9db7edc15ef56e54f4629133b615dcbe3e90a/Chimera/Engine/Core/Menu.hs
haskell
# LANGUAGE TemplateHaskell # module Chimera.Engine.Core.Menu where import FreeGame import Control.Lens import Data.Default import qualified Data.Vector as V import qualified Data.Map as M import qualified Data.Foldable as F import Chimera.State data Item m = Item { _caption :: String, _exec :: m () } makeLens...
5f0def0f9ce9463ba8392dfa272221751a6c008b9d09d0b7c9708ff97fe56abb
xguerin/netml
NetML_Layer_III.ml
module IPv4 = NetML_Layer_III_IPv4 module Protocol = struct type t = | IPv4 | Unsupported [@@deriving yojson] end type t = (Protocol.t * Bitstring.t) type header = | IPv4 of IPv4.t | Unsupported [@@deriving yojson] let decode (proto, data) = let open Core_kernel.Option.Monad_infix in match...
null
https://raw.githubusercontent.com/xguerin/netml/de9d277d2f1ac055aea391b89391df6830f80eff/src/NetML_Layer_III.ml
ocaml
module IPv4 = NetML_Layer_III_IPv4 module Protocol = struct type t = | IPv4 | Unsupported [@@deriving yojson] end type t = (Protocol.t * Bitstring.t) type header = | IPv4 of IPv4.t | Unsupported [@@deriving yojson] let decode (proto, data) = let open Core_kernel.Option.Monad_infix in match...
b60057be6d284a46b26410ebba5324a40c6ff1d118c1e54831a87ddcd520a172
cbaggers/cepl
stages.lisp
(in-package :cepl) (defun cpu-side () (p-> #'specify-vertices #'render-vertices)) (defpipeline-g full-gl-pipeline ;; vertex-processing vertex-shader ;; user defined #'limited-primitive-assembly tessellation-shader ;; user defined geometry-shader ;; user define...
null
https://raw.githubusercontent.com/cbaggers/cepl/d1a10b6c8f4cedc07493bf06aef3a56c7b6f8d5b/core/protocode/stages.lisp
lisp
vertex-processing user defined user defined user defined vertex-post-processing rasterize fragment processing user defined per sample operations culling tests; if a test is active and the fragment fails the test, the underlying pixels/samples are not updated (usually) blending output it allows the user a...
(in-package :cepl) (defun cpu-side () (p-> #'specify-vertices #'render-vertices)) (defpipeline-g full-gl-pipeline #'limited-primitive-assembly #'transform-feedback #'clip-primitives #'perspective-divide #'viewport-transform #'primitive-assembly #'cull-faces #'rasterize #'pixel-ownership-test ...
65da4eeb12be0df3b584c56bcdb6e55564bb2f728f736dc1f2a88e8dfb7760a9
ocaml/num
arith_flags.mli
(**************************************************************************) (* *) (* OCaml *) (* *) , ...
null
https://raw.githubusercontent.com/ocaml/num/a635233b5c3da673e617de2cfe210fc869050e12/src/arith_flags.mli
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 val error_when_null_denominator_flag : bool ref val normalize_ratio_flag : bool ref val normalize_ratio_when_printi...
504d19a66fa7258f997ec6e93d413b1eab968e0ee7d70f1e7374c5647fb66296
thierry-martinez/metapp
metapp_ppx.ml
module Counter = struct type t = int ref let make () = ref 0 let count counter = let result = !counter in counter := succ result; result end let extension_of_index (i : int) : Ppxlib.extension = (Metapp_preutils.mkloc "meta", Metapp_preutils.payload_of_int i) let deref (e : Ppxlib.expression...
null
https://raw.githubusercontent.com/thierry-martinez/metapp/22dd944adb1f82c75035b68edb9a0439a458ef06/ppx/metapp_ppx.ml
ocaml
module Counter = struct type t = int ref let make () = ref 0 let count counter = let result = !counter in counter := succ result; result end let extension_of_index (i : int) : Ppxlib.extension = (Metapp_preutils.mkloc "meta", Metapp_preutils.payload_of_int i) let deref (e : Ppxlib.expression...
f0e9439235b6da81f59f6da49ddb64d6bc2ba1ec88d2399edd7f5b4d289ae7da
ocaml/dune
fs_memo.ml
open Import open Memo.O (* Watching and invalidating paths. *) module Watcher : sig val init : dune_file_watcher:Dune_file_watcher.t option -> Memo.Invalidation.t Watch a path . You should call this function * before * accessing the file system to prevent possible races . If [ = true ] , the watch...
null
https://raw.githubusercontent.com/ocaml/dune/4e83d1b80bd9a37de7e0d39d6f22873850314557/src/dune_engine/fs_memo.ml
ocaml
Watching and invalidating paths. A record of a call to [watch] made while the file watcher was missing. CR-someday amokhov: We should try to simplify the initialisation of the file watcher. We probably no longer need this complexity because we no longer use an external process for file-watching. CR-som...
open Import open Memo.O module Watcher : sig val init : dune_file_watcher:Dune_file_watcher.t option -> Memo.Invalidation.t Watch a path . You should call this function * before * accessing the file system to prevent possible races . If [ = true ] , the watcher will attempt to watch the pat...
bec686094cc26b6ff9ca680a4f402d0f3d7f9e14b07a2e20850ba351119f3e58
racket/rhombus-prototype
hashing.rkt
#lang racket (provide run) (require "data/objects.rkt" "util.rkt" "data/util.rkt" (prefix-in b: "base/api.rkt") (prefix-in k: "key/api.rkt") data/collection) (define (exerciser hf v n) (for ([i n]) (hf v))) (define (measure hf [n 100000]) (for/list ([v all-values...
null
https://raw.githubusercontent.com/racket/rhombus-prototype/4efba21c5ebd2205c8f32c36f27d9619c0fb39e6/design/equality/poc/equality/hashing.rkt
racket
#lang racket (provide run) (require "data/objects.rkt" "util.rkt" "data/util.rkt" (prefix-in b: "base/api.rkt") (prefix-in k: "key/api.rkt") data/collection) (define (exerciser hf v n) (for ([i n]) (hf v))) (define (measure hf [n 100000]) (for/list ([v all-values...
982d5890ce5a4e5839dd4b8bde8d7037b822eb271ea103614c1713068568b33e
avras/nsime
nsime_ptp_helper.erl
%% Copyright ( C ) 2012 < > %% %% This file is part of nsime. %% nsime is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or %% (at your option) any later version....
null
https://raw.githubusercontent.com/avras/nsime/fc5c164272aa649541bb3895d9f4bea34f45beec/src/nsime_ptp_helper.erl
erlang
This file is part of nsime. (at your option) any later version. nsime is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. along with...
Copyright ( C ) 2012 < > nsime is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License Author :...
22b9b00354dd9afc4cd5ece8ee40487def35d7598f48818bfe615ca3b784478d
ghc/packages-base
FD.hs
# LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude , BangPatterns , DeriveDataTypeable # , NoImplicitPrelude , BangPatterns , DeriveDataTypeable #-} # OPTIONS_GHC -fno - warn - identities # -- Whether there are identities depends on ...
null
https://raw.githubusercontent.com/ghc/packages-base/52c0b09036c36f1ed928663abb2f295fd36a88bb/GHC/IO/FD.hs
haskell
Whether there are identities depends on the platform # OPTIONS_HADDOCK hide # --------------------------------------------------------------------------- | Module : GHC.IO.FD License : see libraries/base/LICENSE Maintainer : Stability : internal Portability : non-portable Raw read/write oper...
# LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude , BangPatterns , DeriveDataTypeable # , NoImplicitPrelude , BangPatterns , DeriveDataTypeable #-} # OPTIONS_GHC -fno - warn - identities # Copyright : ( c ) The University of...
468efa670336d32e46a94a9172b901ca4638a3949ecdf80f9572cf213bf6ee78
c-cube/ocaml-containers
CCBitField.mli
(* This file is free software, part of containers. See file "license" for more details. *) * Efficient Bit Field for up to 31 or 61 fiels This module defines efficient bitfields up to 31 or 61 bits ( depending on the architecture ) in a relatively type - safe way . { [ module B = CCBi...
null
https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/src/data/CCBitField.mli
ocaml
This file is free software, part of containers. See file "license" for more details. * Raised when a frozen bitfield is modified. * Get the value of this field. * Set the value of this field. * Make a new field. * Create a new bitfield type */* */*
* Efficient Bit Field for up to 31 or 61 fiels This module defines efficient bitfields up to 31 or 61 bits ( depending on the architecture ) in a relatively type - safe way . { [ module B = CCBitField . Make(struct end ) ; ; let x = B.mk_field ( ) let y = B.mk_field (...
aad78bfca258fcd0d0e6b100d18b75b5100cc7c0f500ee3be20d5c9401083e86
syed/erlcscope
erlcscope_sup.erl
-module(erlcscope_sup). -behaviour(supervisor). %% API -export([start_link/0]). %% Supervisor callbacks -export([init/1]). %% Helper macro for declaring children of supervisor -define(CHILD(I, Type), {I, {I, start_link, []}, temperoary, brutal_kill, Type, [I]}). %% ================================================...
null
https://raw.githubusercontent.com/syed/erlcscope/9797694bf6e088d859ecfaf50f4fa8e59b7d6ae5/src/erlcscope_sup.erl
erlang
API Supervisor callbacks Helper macro for declaring children of supervisor =================================================================== API functions =================================================================== =================================================================== Supervisor callback...
-module(erlcscope_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(CHILD(I, Type), {I, {I, start_link, []}, temperoary, brutal_kill, Type, [I]}). start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). init([]) -> {ok, { {one_for_one, 1, 1}, [?CHILD(erlcsc...
e3b511da4313758e9d33abb79f2182d5cbf13f8e0ee1a48019e1590acaa54c5a
janestreet/ecaml
test_frame.ml
open! Core open! Async_kernel open! Import open! Frame let redact_hex_number_in_string = let pattern = let open Re in compile (seq [ str "0x"; rep1 xdigit ]) in Re.replace_string pattern ~by:"REDACTED" ;; let redact_hex_number_in_sexp = smash_sexp ~f:(function | List _ as sexp -> sexp | Atom a...
null
https://raw.githubusercontent.com/janestreet/ecaml/25a5a2972b3a94f5529a46363b37670a6c1de195/test/test_frame.ml
ocaml
open! Core open! Async_kernel open! Import open! Frame let redact_hex_number_in_string = let pattern = let open Re in compile (seq [ str "0x"; rep1 xdigit ]) in Re.replace_string pattern ~by:"REDACTED" ;; let redact_hex_number_in_sexp = smash_sexp ~f:(function | List _ as sexp -> sexp | Atom a...
335e704256df7e12bd34118322e4d9345f32e2728974c8096d75ce74dc73a65b
evturn/haskellbook
24.06-try-try.hs
{-# LANGUAGE OverloadedStrings #-} module TryTry where import Control.Applicative import Data.Ratio ((%)) import Text.Trifecta type DecimalOrFraction = Either Rational Integer parseFraction :: Parser Rational parseFraction = do numerator <- decimal char '/' denominator <...
null
https://raw.githubusercontent.com/evturn/haskellbook/3d310d0ddd4221ffc5b9fd7ec6476b2a0731274a/24/24.06-try-try.hs
haskell
# LANGUAGE OverloadedStrings #
module TryTry where import Control.Applicative import Data.Ratio ((%)) import Text.Trifecta type DecimalOrFraction = Either Rational Integer parseFraction :: Parser Rational parseFraction = do numerator <- decimal char '/' denominator <- decimal return (numerator % den...
f4bad5188c3af86c7185a9d03e554f90450334fcba59b4d5e3f4179aad63f941
flosell/lambdacd
manualtrigger.clj
(ns lambdacd.steps.manualtrigger "Build step that waits for manual user interaction. Example: ```clojure Blocks , but setting ` : trigger - id ` in step - result to a random UUID > (post-id ctx trigger-id trigger-parameters) ; Returns immediately, unblocks the waiting manual trigger ``` " (:require [cl...
null
https://raw.githubusercontent.com/flosell/lambdacd/e9ba3cebb2d5f0070a2e0e1e08fc85fc99ee7135/src/clj/lambdacd/steps/manualtrigger.clj
clojure
Returns immediately, unblocks the waiting manual trigger blocks until post-id is called
(ns lambdacd.steps.manualtrigger "Build step that waits for manual user interaction. Example: ```clojure Blocks , but setting ` : trigger - id ` in step - result to a random UUID ``` " (:require [clojure.core.async :as async] [clojure.tools.logging :as log] [lambdacd.event-bus :as...
be2f00fe0a0590dd2383de086e818837140b0e9acefecb924d190cdd4bc027d8
ivanjovanovic/sicp
e-2.60.scm
Exercise 2.60 . ; ; We specified that a set would be represented as a list ; with no duplicates. Now suppose we allow duplicates. For instance, the set { 1,2,3 } could be represented as the list ( 2 3 2 1 3 2 2 ) . Design ; procedures element-of-set?, adjoin-set, union-set, and ; intersection-set that operate on th...
null
https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/2.3/e-2.60.scm
scheme
We specified that a set would be represented as a list with no duplicates. Now suppose we allow duplicates. For instance, the procedures element-of-set?, adjoin-set, union-set, and intersection-set that operate on this representation. How does the efficiency of each compare with the corresponding procedure for th...
Exercise 2.60 . set { 1,2,3 } could be represented as the list ( 2 3 2 1 3 2 2 ) . Design (load "../common.scm") (load "../helpers.scm") (load "2.3.scm") (define (element-of-set? x set) (cond ((equal? set '()) false) ((equal? x (car set)) true) (else (element-of-set? x (cdr set))))) ( output...
68cf158c2dc110f626132130d8b0191833f4d407bbad3723701f1a1034c25a28
stevenvar/OMicroB
string.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/stevenvar/OMicroB/e4324d0736ac677b3086741dfdefb0e46775642b/src/stdlib/string.mli
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 * String operations . A string is an immutable data structure that contains a fixed - length sequ...
0c231479f4580e40e6579c80bc103738364719d718c2d850ccf9e6e27c80a8eb
Zulu-Inuoe/raw-bindings-sdl2
joystick.lisp
raw - bindings - sdl2 - FFI bindings to Written in 2017 by < > ;;; ;;;To the extent possible under law, the author(s) have dedicated all copyright ;;;and related and neighboring rights to this software to the public domain ;;;worldwide. This software is distributed without any warranty. You should have rec...
null
https://raw.githubusercontent.com/Zulu-Inuoe/raw-bindings-sdl2/fd219b896f3a0a9daef83cd1b303d806eeffa75a/src/ffi/joystick.lisp
lisp
To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. with this software. If not, see </>.
raw - bindings - sdl2 - FFI bindings to Written in 2017 by < > You should have received a copy of the CC0 Public Domain Dedication along (in-package #:raw-bindings-sdl2) (defsdl2struct sdl-joystick) (defsdl2struct sdl-joystick-guid (data :uint8 :count 16)) (defsdl2type sdl-joystick-id :int32) ...
7558e0832b3a8a64794c74bb0397aea2767b2f5f18d4ff5cc276773a3f5185e8
SuYi1995/game_server
svr_log.erl
%%%------------------------------------------------------------------- %%% @author sy ( C ) 2019 , < COMPANY > %%% @doc %%% 后台统计进程 %%% @end Created : 28 . 9月 2019 10:56 %%%------------------------------------------------------------------- -module(svr_log). -author("sy"). -include("common.hrl"). -behaviour(gen_s...
null
https://raw.githubusercontent.com/SuYi1995/game_server/b9a8574589075a1264c3d1f9a564d6d2ea8ae574/src/server/log/svr_log.erl
erlang
------------------------------------------------------------------- @author sy @doc 后台统计进程 @end ------------------------------------------------------------------- API gen_server callbacks =================================================================== API ====================================================...
( C ) 2019 , < COMPANY > Created : 28 . 9月 2019 10:56 -module(svr_log). -author("sy"). -include("common.hrl"). -behaviour(gen_server). -export([ start_link/0, i/0, p/0, cast/1, call/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -define(SERVER, ?MO...
33efcc77f56e566c6cd9dadc6ac3b31c54ce1b0725c9d6475e84c4e8b118b34f
spechub/Hets
Lexer_KIF.hs
| Module : ./CommonLogic / Lexer_KIF.hs Description : Parser of the Knowledge Interchange Format Copyright : ( c ) , DFKI Bremen 2010 , 2012 License : GPLv2 or higher Maintainer : Stability : experimental Portability : portable Module : ./CommonLogic/Lexer_...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/CommonLogic/Lexer_KIF.hs
haskell
literally from Lexer_CLIF.hs -- abstract?
| Module : ./CommonLogic / Lexer_KIF.hs Description : Parser of the Knowledge Interchange Format Copyright : ( c ) , DFKI Bremen 2010 , 2012 License : GPLv2 or higher Maintainer : Stability : experimental Portability : portable Module : ./CommonLogic/Lexer_...
5660e6678b180ca94185a277a3cca1467bfc77e49402f57d20e297837eb001a9
tweag/ormolu
pragma-comments-out.hs
{-# LANGUAGE OverloadedStrings #-} TODO This extension is probably too dangerous , remove it . # LANGUAGE RecordWildCards # Avoid warning produced by TH . # OPTIONS_GHC -fno - warn - overlapping - patterns # -- | Header comment. module Foo () where
null
https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/other/pragma-comments-out.hs
haskell
# LANGUAGE OverloadedStrings # | Header comment.
TODO This extension is probably too dangerous , remove it . # LANGUAGE RecordWildCards # Avoid warning produced by TH . # OPTIONS_GHC -fno - warn - overlapping - patterns # module Foo () where
a28d034f98a599ff881d3a3e09b7cce6bd8e7fbaacbcfa75e49695e9bb562cd8
uw-unsat/leanette-popl22-artifact
announcement.rkt
#lang s-exp rosette (require "../util/util.rkt") (require "ip.rkt") (require "prefix.rkt") (provide default-announcement announcement? announcement-prefix announcement-prefix-set announcement-community-test announcement-community-set announcement-aspath-test announcement-aspath-set ...
null
https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-3/bagpipe/src/bagpipe/racket/main/network/announcement.rkt
racket
#lang s-exp rosette (require "../util/util.rkt") (require "ip.rkt") (require "prefix.rkt") (provide default-announcement announcement? announcement-prefix announcement-prefix-set announcement-community-test announcement-community-set announcement-aspath-test announcement-aspath-set ...
29e80eb6042d5ff0b6f4c0510a5311e14b43955c8f9273f6b27b196657ae05ac
copyleft/cl-odata-client
odata-client-tests.lisp
(defpackage :odata-client-tests (:use :cl :stefil :odata-client :odata/lang :arrows :access) (:export :odata-client-tests)) (in-package :odata-client-tests) (defparameter +trip-pin-base+ "") (defparameter +trip-pin-modify+ (multiple-value-bind (response status headers modify-url) (drakma:http-request +tr...
null
https://raw.githubusercontent.com/copyleft/cl-odata-client/967a4ed28f1f589e3a7c68f6bca202444de08439/odata-client-tests.lisp
lisp
Check that the list is ordered Check that the list is ordered
(defpackage :odata-client-tests (:use :cl :stefil :odata-client :odata/lang :arrows :access) (:export :odata-client-tests)) (in-package :odata-client-tests) (defparameter +trip-pin-base+ "") (defparameter +trip-pin-modify+ (multiple-value-bind (response status headers modify-url) (drakma:http-request +tr...
4c471e36d7293c8075357d24e4c8f18d9af38493f53456a1e2d7bf78195e8fb5
sky-big/RabbitMQ
rabbit_mgmt_wm_binding.erl
The contents of this file are subject to the Mozilla Public License Version 1.1 ( the " License " ) ; you may not use this file except in %% compliance with the License. You may obtain a copy of the License at %% / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITH...
null
https://raw.githubusercontent.com/sky-big/RabbitMQ/d7a773e11f93fcde4497c764c9fa185aad049ce2/plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_binding.erl
erlang
compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -------------------------------------------------------------------- ---...
The contents of this file are subject to the Mozilla Public License Version 1.1 ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ Management Plugin . The Initial Developer of the Original Code...
243d53e3aa3bad5bc7ac2b6e4a67506252052190bf62656808113af031e7b98f
BartoszMilewski/AoC2021
Day6.hs
module Day6 where import Data.List import Data.List.Split import qualified Data.Map.Strict as M type Tally = M.Map Int Int tally :: [Int] -> Tally tally ns = foldr (\n t -> M.insertWith (+) n 1 t) t0 ns where t0 = M.fromList $ zip [0..8] (replicate 9 0) step :: Tally -> Tally step t = let (zs : lst) = M.elems t...
null
https://raw.githubusercontent.com/BartoszMilewski/AoC2021/d62817903820b016d1ccc00a66c969484125af0f/Day6.hs
haskell
shift tally to left add new sixes
module Day6 where import Data.List import Data.List.Split import qualified Data.Map.Strict as M type Tally = M.Map Int Int tally :: [Int] -> Tally tally ns = foldr (\n t -> M.insertWith (+) n 1 t) t0 ns where t0 = M.fromList $ zip [0..8] (replicate 9 0) step :: Tally -> Tally step t = let (zs : lst) = M.elems t...
3dca2453dcad9a2a259e30ec968776fc22d685fc37a7a380b17b74d8b8f9f04f
quil-lang/quilc
1q-queues.lisp
(in-package #:cl-quil) ;;; 1Q Queue Management ;;; The addresser optionally ( cf . * ADDRESSER - USE-1Q - QUEUES * ) prevents 1Q operations from influencing anything ( qubit allocation , SWAP placement , and so on ) since 1Q operations can be easily moved around and are often not very ;;; costly. ;;; This is d...
null
https://raw.githubusercontent.com/quil-lang/quilc/5c1142609691a817ec70442c103df3693b29d51a/src/addresser/1q-queues.lisp
lisp
1Q Queue Management costly. during addressing and then are flushed at appropriate times. Routines for managing these queues are found here, but are mostly called by the the instruction is non-native, so compile it NOTE: This might produce a sequence of instructions that is not actually all executable on this l...
(in-package #:cl-quil) The addresser optionally ( cf . * ADDRESSER - USE-1Q - QUEUES * ) prevents 1Q operations from influencing anything ( qubit allocation , SWAP placement , and so on ) since 1Q operations can be easily moved around and are often not very This is done via a system of " 1Q Queues " , which st...