_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
6e1d3b777ab9322276fc1983a3ce6c00102b65f15d9380230bb26bf42dc4d332
nuvla/api-server
hook_oidc_user.clj
(ns sixsq.nuvla.server.resources.hook-oidc-user " Stripe oidc user. " (:require [clojure.string :as str] [clojure.tools.logging :as log] [sixsq.nuvla.auth.external :as ex] [sixsq.nuvla.auth.oidc :as auth-oidc] [sixsq.nuvla.auth.utils.http :as uh] [sixsq.nuvla.auth.utils.sign :as sign] [s...
null
https://raw.githubusercontent.com/nuvla/api-server/561b423c186ef7972aadc349ec270c2201a75b06/code/src/sixsq/nuvla/server/resources/hook_oidc_user.clj
clojure
(ns sixsq.nuvla.server.resources.hook-oidc-user " Stripe oidc user. " (:require [clojure.string :as str] [clojure.tools.logging :as log] [sixsq.nuvla.auth.external :as ex] [sixsq.nuvla.auth.oidc :as auth-oidc] [sixsq.nuvla.auth.utils.http :as uh] [sixsq.nuvla.auth.utils.sign :as sign] [s...
1851b3b40fe6e492823fb4462b05e56e3f071c7ad80b78cad059a339d2c1539d
bmeurer/ocamljit2
random.mli
(***********************************************************************) (* *) (* Objective Caml *) (* *) , proje...
null
https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/stdlib/random.mli
ocaml
********************************************************************* Objective Caml ...
, projet Para , INRIA Rocquencourt Copyright 1996 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 $ Id$ * { 6 Basic functions } val in...
02d8f3895c348338a38ed0be7829c68e52abfcaacb1933b1251ff48967af00a0
ktakashi/sagittarius-scheme
encodings.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; ;;; sagittarius/crypto/ciphers/asymmeteric/encodings.scm - PKCS#1 encodings ;;; Copyright ( c ) 2022 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/ed1d5e34e3df5e6f1c1240b190ab959de5041455/ext/crypto/sagittarius/crypto/ciphers/asymmetric/encodings.scm
scheme
coding : utf-8 ; -*- sagittarius/crypto/ciphers/asymmeteric/encodings.scm - PKCS#1 encodings Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above co...
Copyright ( c ) 2022 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING #!nounbound (library (sagittarius crypto ciphers as...
a2c21acae7343c56ee26ee6cb293e6916cbe15a77bc3ed9ded2b258de01fbe71
ohpauleez/shoreleave
project.clj
(defproject shoreleave "0.1.0-SNAPSHOT" :description "A smarter client-side with ClojureScript" :url "" :license {:name "Eclipse Public License - v 1.0" :url "-v10.html" :distribution :repo :comments "See the notice in README.mkd or details in LICENSE.html"} :dependencies [[o...
null
https://raw.githubusercontent.com/ohpauleez/shoreleave/01d415432f88aff884b78b4e533be9f08cc808ac/project.clj
clojure
[cdt "1.2.6.2-SNAPSHOT"] use to attach :compiler {:output-dir "resources/public/cljs/" :output-to "resources/public/cljs/bootstrap.js" :optimizations :simple :pretty-print true}} :repl-init-script "script/repl_init.clj" :main shoreleave...
(defproject shoreleave "0.1.0-SNAPSHOT" :description "A smarter client-side with ClojureScript" :url "" :license {:name "Eclipse Public License - v 1.0" :url "-v10.html" :distribution :repo :comments "See the notice in README.mkd or details in LICENSE.html"} :dependencies [[o...
21cc791bca1707d20b13062a7de1a8eeef4dd5036b4c6bac5ba94040a7d33cde
MarcKaufmann/congame
app.rkt
#lang racket/base (require (for-syntax racket/base) congame-web/components/auth congame-web/components/prolific congame-web/components/replication congame-web/components/sentry (prefix-in tpl: congame-web/components/template) congame-web/components/upload ...
null
https://raw.githubusercontent.com/MarcKaufmann/congame/89dce1da98a5791983fbef72f8756d3c2a73e706/congame-web/components/app.rkt
racket
#lang racket/base (require (for-syntax racket/base) congame-web/components/auth congame-web/components/prolific congame-web/components/replication congame-web/components/sentry (prefix-in tpl: congame-web/components/template) congame-web/components/upload ...
391f4fbcb0257ce764e4953de350a7d909c3fae067149820ff41fee8f8d1d01f
dparis/gen-phzr
extend_all_file.clj
(ns gen-phzr.codegen.files.extend-all-file (:require [cljfmt.core :as cfmt] [cuerdas.core :as str] [gen-phzr.codegen.forms.constants :as fc] [gen-phzr.codegen.forms.extend :as fe] [gen-phzr.codegen.forms.properties :as fp] [gen-phzr.util :as u])) (def ^:pr...
null
https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/src/gen_phzr/codegen/files/extend_all_file.clj
clojure
(ns gen-phzr.codegen.files.extend-all-file (:require [cljfmt.core :as cfmt] [cuerdas.core :as str] [gen-phzr.codegen.forms.constants :as fc] [gen-phzr.codegen.forms.extend :as fe] [gen-phzr.codegen.forms.properties :as fp] [gen-phzr.util :as u])) (def ^:pr...
55a212a5c9bb5b747a1db701d41671ccc63bcb530ed9d9c4a317f7c087453095
telekons/one-more-re-nightmare
interface.lisp
(in-package :one-more-re-nightmare) (defun re-groups (regular-expression) (nth-value 1 (with-hash-consing-tables () (parse-regular-expression regular-expression)))) (defmacro collect ((function) &body body) (alexandria:with-gensyms (list tail) `(let* ((,list (list 'nil)) ...
null
https://raw.githubusercontent.com/telekons/one-more-re-nightmare/73b6b436c4f9f2183eacf021e76f3909d5748122/Code/Interface/interface.lisp
lisp
The code function will fill in values as needed. Grab code at load-time if possible. Grab code at load-time if possible.
(in-package :one-more-re-nightmare) (defun re-groups (regular-expression) (nth-value 1 (with-hash-consing-tables () (parse-regular-expression regular-expression)))) (defmacro collect ((function) &body body) (alexandria:with-gensyms (list tail) `(let* ((,list (list 'nil)) ...
b3ff31897fbec0644a1a8bf3ec1309a7ee924bf2003d0124cf1d07d72578339f
janestreet/email_message
octet_stream.mli
open! Core RFC 2045 MIME - encoded Bigstrings . module Encoding : sig (** Text or binary are the type of the plaintext. For Base64, if the mode is text, '\n' is turned into '\r\n' when encoding, and vice versa. *) type known = [ `Base64 | `Bit7 | `Bit8 | `Binary | `Quoted_printable ...
null
https://raw.githubusercontent.com/janestreet/email_message/c88d38b850fce23bb5eb4f772211a4368324b1f7/src/octet_stream.mli
ocaml
* Text or binary are the type of the plaintext. For Base64, if the mode is text, '\n' is turned into '\r\n' when encoding, and vice versa. * Determine an encoding based on email headers. [ignore_base64_for_multipart] is useful because some clients can't read RFCs and incorrectly indicate a transfer e...
open! Core RFC 2045 MIME - encoded Bigstrings . module Encoding : sig type known = [ `Base64 | `Bit7 | `Bit8 | `Binary | `Quoted_printable ] [@@deriving sexp_of, compare, hash] type t = [ known | `Unknown of string ] [@@deriving sexp_of, compare, hash] RFC 2045 says 7b...
727e1fa54da7d986d478af0b1646c4d288421017273db368d978d419903b1a9a
untangled-web/untangled-ui
ui.cljs
(ns guideui.ui (:require [om.next :as om :refer-macros [defui]] [styles.util :as util :refer [to-cljs] :refer-macros [source->react]] [untangled.client.core :as uc] [untangled.client.mutations :as m] [untangled.icons :as uic] [om.dom :as dom] goo...
null
https://raw.githubusercontent.com/untangled-web/untangled-ui/ae101f90cd9b7bf5d0c80e9453595fdfe784923c/src/css-guide/guideui/ui.cljs
clojure
"Usability" styles.usability/sections "Resources" styles.resources/sections
(ns guideui.ui (:require [om.next :as om :refer-macros [defui]] [styles.util :as util :refer [to-cljs] :refer-macros [source->react]] [untangled.client.core :as uc] [untangled.client.mutations :as m] [untangled.icons :as uic] [om.dom :as dom] goo...
2898bbb5edb80311d4b974651dd9266c68979c13af58d12dfa7a4149eca00ec8
blockfrost/blockfrost-haskell
Common.hs
-- | Types for common servics module Blockfrost.Types.Common ( URLVersion (..) , Healthy (..) , ServerTime (..) , Metric (..) ) where import Blockfrost.Types.Shared import Data.Aeson import Data.Text (Text) import Deriving.Aeson import Servant.Docs (ToSample (..), samples, singleSample) -- | Root endpoint ...
null
https://raw.githubusercontent.com/blockfrost/blockfrost-haskell/9bfcc21b225ecbc73bed8b2cd0ee8c6971a93c58/blockfrost-api/src/Blockfrost/Types/Common.hs
haskell
| Types for common servics | Root endpoint reply | Health endpoint reply | Health clock endpoint reply | Metrics response Re-use @Metric@ for response with endpoint field # OVERLAPS # # OVERLAPS # # OVERLAPS #
module Blockfrost.Types.Common ( URLVersion (..) , Healthy (..) , ServerTime (..) , Metric (..) ) where import Blockfrost.Types.Shared import Data.Aeson import Data.Text (Text) import Deriving.Aeson import Servant.Docs (ToSample (..), samples, singleSample) data URLVersion = URLVersion { _urlVersionUrl ...
f9bed1bea488f2325566414b208988f3bad7e6fb4ae3c7e1cc198d7522b59fcc
serefayar/ayatori
main_test.clj
(ns ayatori.rest-api.main-test)
null
https://raw.githubusercontent.com/serefayar/ayatori/dbe171681e7f3fe574e3026577b94ca18d4beaff/bases/rest_api/test/ayatori/rest_api/main_test.clj
clojure
(ns ayatori.rest-api.main-test)
2cc26d9e16ac5bd21dc3a32eaa9833a7d99a4768132659b6bb258be10f162d48
racket/typed-racket
control-test-6.rkt
#lang racket/load (module typed typed/racket/optional (provide f) (: f (-> Void)) (define (f) (abort-current-continuation (default-continuation-prompt-tag) (λ: ([x : Number]) (+ 1 x))))) (module untyped racket (require 'typed) (call-with-continuation-prompt (λ () (f)) (default-continua...
null
https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/optional/control-test-6.rkt
racket
behavioral values are not allowed to pass through the Any contract to here
#lang racket/load (module typed typed/racket/optional (provide f) (: f (-> Void)) (define (f) (abort-current-continuation (default-continuation-prompt-tag) (λ: ([x : Number]) (+ 1 x))))) (module untyped racket (require 'typed) (call-with-continuation-prompt (λ () (f)) (default-continua...
a8f19068d2386329e6dd61297048b3750a899599b298137b4c09d08871da592d
ivanperez-keera/Yampa
Delays.hs
# LANGUAGE CPP # -- | Description : Test cases for . Delays Copyright : ( c ) , 2014 - 2022 ( c ) and , Yale University , 2003 - 2004 Authors : , , module Test.FRP.Yampa.Delays ( tests ) where #if __GLASGOW_HASKELL__ < 710 import Control.Applicative ((<*>)) import D...
null
https://raw.githubusercontent.com/ivanperez-keera/Yampa/e00c94f39ceaa017d0c5f48c5f504da3ee0c15fa/yampa-test/tests/Test/FRP/Yampa/Delays.hs
haskell
| * Basic delays This is a (somewhat strange) way of doing a counter that stops after reaching a threshold. Note that the ingoing event is *control dependent* on the output of the counter, so output without looking at the current input at all. Version of the above that tests that thigs still work OK also if the...
# LANGUAGE CPP # Description : Test cases for . Delays Copyright : ( c ) , 2014 - 2022 ( c ) and , Yale University , 2003 - 2004 Authors : , , module Test.FRP.Yampa.Delays ( tests ) where #if __GLASGOW_HASKELL__ < 710 import Control.Applicative ((<*>)) import Data.F...
aa8e63451345fe0f1cb2efd6def6caa983e6c1a198283877f0737ac538ad2e0a
OpenBookStore/openbookstore
blocks-search.lisp
;; (defpackage bookshops-weblocks ;; (:use #:cl # : weblocks - ui / form # : weblocks / html ) (: import - from # : weblocks / widget ;; #:render ;; #:update ;; #:defwidget) (: import - from # : weblocks / actions ;; #:make-js...
null
https://raw.githubusercontent.com/OpenBookStore/openbookstore/13f16e5460ba7149c9f3108b7f3519e4614e4580/src/web/weblocks-test/blocks-search.lisp
lisp
(defpackage bookshops-weblocks (:use #:cl #:render #:update #:defwidget) #:make-js-action) #:defapp) #:defroutes)) TODO: doesn't save the result. function not called. not seen. TODO: function pas appellée
# : weblocks - ui / form # : weblocks / html ) (: import - from # : weblocks / widget (: import - from # : weblocks / actions (: import - from # : weblocks / app (: import - from # : weblocks - navigation - widget (in-package :bookshops-weblocks) (defwidget search-widget (weblocks-...
795e1e47d532378fdfd635747145323720ef451b8dc1aae896db9a6a907c56e2
mtesseract/nakadi-client
Events.hs
| Module : Network . . Subscriptions . Events Description : Implementation of Nakadi Subscription Events API Copyright : ( c ) 2017 , 2018 License : : Stability : experimental Portability : POSIX This module implements a high level interface for the @\/subscriptions\/SUBSCRIPT...
null
https://raw.githubusercontent.com/mtesseract/nakadi-client/f8eef3ac215459081b01b0b48f0b430ae7701f52/src/Network/Nakadi/Subscriptions/Events.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # For dispatching batches to workers, we maintain an integer-indexed (non-empty) list of workers. Thus, we need have a way for mapping a subscription batch, more precisely the cursors belonging to a subscription b...
| Module : Network . . Subscriptions . Events Description : Implementation of Nakadi Subscription Events API Copyright : ( c ) 2017 , 2018 License : : Stability : experimental Portability : POSIX This module implements a high level interface for the @\/subscriptions\/SUBSCRIPT...
f1c3f7e2e4a5624c0a68841ba87d7f9aa2e65a65d372581a98a7840f1552aa0f
3b/clws
server.lisp
(in-package #:ws) (defparameter *server-busy-message* (string-to-shareable-octets "HTTP/1.1 503 service unavailable " :encoding :utf-8)) (defclass server () ((event-base :initform nil :accessor server-event-base :initarg :event-base) (c...
null
https://raw.githubusercontent.com/3b/clws/b20799dd37d8385d312c371181d465bbee2f9e4f/server.lisp
lisp
fixme: probably shouldn't do this if we are dropping the connection due to too many connections? too many clients, send a server busy response and close connection otherwise handle normally used merely as a means of making the server thread execute a lambda from a different thread. hook for waking up the server ...
(in-package #:ws) (defparameter *server-busy-message* (string-to-shareable-octets "HTTP/1.1 503 service unavailable " :encoding :utf-8)) (defclass server () ((event-base :initform nil :accessor server-event-base :initarg :event-base) (c...
ab020c2aaaf99d33e06771b2dbd6a271f4fa6f085c06939ff78abcb0f7db15d1
geophf/1HaskellADay
Solution.hs
module Y2021.M03.D19.Solution where - @AnecdotesMaths has been publishing a formula for pi , or to approximate pi , every day this month . I 've been retweeting those formulae , because I like pi . I also like tau , and I also like cake , so there 's that . Take one of those formulae and compute pi to a ' re...
null
https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2021/M03/D19/Solution.hs
haskell
} or some other numerical representation that suits you. - BONUS ------------------------------------------------------- The above formula is either inaccurate or does not terminate ... or both. Have a formula that either stops after the nth iteration or stops within a certain degree of accuracy. -
module Y2021.M03.D19.Solution where - @AnecdotesMaths has been publishing a formula for pi , or to approximate pi , every day this month . I 've been retweeting those formulae , because I like pi . I also like tau , and I also like cake , so there 's that . Take one of those formulae and compute pi to a ' re...
0df5f56c30e810aacc3f44b97f5a873eded378835be68467722d3bff097d021c
tatut/re-html-template
spec.clj
(ns re-html-template.spec "Spec for transformations" (:require [clojure.spec.alpha :as s])) (s/def ::rule (s/or :tag-rule keyword? :attrs-rule (s/and map? #(every? keyword? (keys %))) :custom-rule :re-html-template.core/supported-custom-type)) (s/def ::rules (s/or :single-rule ::rule :...
null
https://raw.githubusercontent.com/tatut/re-html-template/ec765bed5399ae3895693bdc1bb9961b829209d6/src/re_html_template/spec.clj
clojure
(ns re-html-template.spec "Spec for transformations" (:require [clojure.spec.alpha :as s])) (s/def ::rule (s/or :tag-rule keyword? :attrs-rule (s/and map? #(every? keyword? (keys %))) :custom-rule :re-html-template.core/supported-custom-type)) (s/def ::rules (s/or :single-rule ::rule :...
f59e8c2f5fcb00f91129fc2619466a61e43b52f61b651899018a23adc3625087
racket/typed-racket
in-cycle.rkt
#lang typed/racket/shallow ;; Plot error: ;; /Users / / code / racket / fork / racket / share / pkgs / plot - lib / plot / private / plot3d / isosurface.rkt:130:23 : Type Checker : No function domains matched in function application : ;; Domains: Any (Sequenceof (Parameterof Plot-Pen-Style) Any) ;; ...
null
https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/shallow/in-cycle.rkt
racket
Plot error: Domains: Any (Sequenceof (Parameterof Plot-Pen-Style) Any) Any (Sequenceof (Parameterof Plot-Pen-Style)) Any Integer in: (in-cycle* line-styles) so the problem is related to the new exports for the "contract + type" hack, and maybe by improving that we'll get a bett...
#lang typed/racket/shallow /Users / / code / racket / fork / racket / share / pkgs / plot - lib / plot / private / plot3d / isosurface.rkt:130:23 : Type Checker : No function domains matched in function application : Arguments : Any ( Sequenceof Plot - Pen - Style ) Try to reproduce ... failure so far ( 2...
c90355be596f889f00c0674836bac035bd8b7a75cec9b7c3c11e319b958c9ea7
ocaml-sf/learn-ocaml-corpus
insert1.ml
let empty : heap = E let rank (h : heap) : rank = match h with | E -> 0 | T (r, _, _, _) -> r let makeT x h1 h2 = let r1 = rank h1 and r2 = rank h2 in if r1 >= r2 then T (r2 + 1, x, h1, h2) else T (r1 + 1, x, h2, h1) let singleton (x : element) : heap = makeT x empty empty (* ...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/leftist_heaps/wrong/insert1.ml
ocaml
T(1, x, E, E) inserts twice
let empty : heap = E let rank (h : heap) : rank = match h with | E -> 0 | T (r, _, _, _) -> r let makeT x h1 h2 = let r1 = rank h1 and r2 = rank h2 in if r1 >= r2 then T (r2 + 1, x, h1, h2) else T (r1 + 1, x, h2, h1) let singleton (x : element) : heap = makeT x empty empty let ...
0d81faae4e3a0d9cb46c7d9c2a1563feabb1d501d7cbcb28541fab5317bf919f
NixOS/cabal2nix
Platform.hs
# LANGUAGE LambdaCase # | Description : Parse platform strings used by nixpkgs into Cabal 's ' Platform ' This module defines conversions from the ( autoconf - derived ) platform strings nixpkgs uses into Cabal 's ' Platform ' type . This is intended to facilitate later evaluation of @.cabal@ files . For this ...
null
https://raw.githubusercontent.com/NixOS/cabal2nix/0d1a5a7d227683e9d099665f645a8618ec48ef94/cabal2nix/src/Distribution/Nixpkgs/Haskell/Platform.hs
haskell
For this, the following logic is utilized: - Otherwise @cpu-vendor-os@ is assumed where @os@ may have any number of __Note:__ This behavior is different from nixpkgs' @lib.systems.elaborate@: Because we have no knowledge of the legal contents of the different parts, we only decide how to parse it bas...
# LANGUAGE LambdaCase # | Description : Parse platform strings used by nixpkgs into Cabal 's ' Platform ' This module defines conversions from the ( autoconf - derived ) platform strings nixpkgs uses into Cabal 's ' Platform ' type . This is intended to facilitate later evaluation of @.cabal@ files . For this ...
72fa13415e4cd81c6933d95c393582ba8c3730836168701f16ca54e1bd9d01e3
haskus/haskus-system
String.hs
# LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE GeneralizedNewtypeDeriving # -- | Various String formats (C string, etc.) module Haskus.Format.String ( CChar , FS.CString , withCString , withCStringLen , castCCharToChar , castCharToCChar , peekCStringLen , peekCStringMaxLen , p...
null
https://raw.githubusercontent.com/haskus/haskus-system/38b3a363c26bc4d82e3493d8638d46bc35678616/haskus-system/src/lib/Haskus/Format/String.hs
haskell
| Various String formats (C string, etc.) | Peek a CString | Convert a \0-terminal vector into a string | Convert from a String into a \0-terminal vector | Empty string | Use a String a a null-terminated string | Use a String a a null-terminated string
# LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE GeneralizedNewtypeDeriving # module Haskus.Format.String ( CChar , FS.CString , withCString , withCStringLen , castCCharToChar , castCharToCChar , peekCStringLen , peekCStringMaxLen , peekCString * Fixed - size CString buffer ...
910d4342fd587b745cbd25c2c3ee926712a7e2e774ba5075abf60eebd075ce7c
janegca/htdp2e
Exercise-271-hole-in-scope.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-intermediate-lambda-reader.ss" "lang")((modname Exercise-263-hole-in-scope) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachp...
null
https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/03-Intermezzo-Scope/Exercise-271-hole-in-scope.rkt
racket
about the language level of this file in a form that our tools can easily process. Recall that each occurrence of a variable receives its value from the corresponding binding occurrence. Consider the following definition: Where is the shaded occurrence of x bound? Since the definition is a constant definition a...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-263-hole-in-scope) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t construct...
93bb822bc30330c264590257240fc9aac5709b06199c4d5f67935b37c931e0c4
phylogeography/spread
discrete_mcc_tree.cljs
(ns ui.analysis-results.discrete-mcc-tree (:require [shared.components :refer [labeled-field]] [ui.time :as time])) (defn discrete-mcc-tree [{:keys [readable-name locations-attribute-name most-recent-sampling-date timescale-multiplier]}] (let [most-recent-sampling-date ...
null
https://raw.githubusercontent.com/phylogeography/spread/56f3500e6d83e0ebd50041dc336ffa0697d7baf8/src/cljs/ui/analysis_results/discrete_mcc_tree.cljs
clojure
(ns ui.analysis-results.discrete-mcc-tree (:require [shared.components :refer [labeled-field]] [ui.time :as time])) (defn discrete-mcc-tree [{:keys [readable-name locations-attribute-name most-recent-sampling-date timescale-multiplier]}] (let [most-recent-sampling-date ...
6d4cc142c30be2a5ccab01a5feff67a276853294defcd8ff18536286481e62d5
MyDataFlow/ttalk-server
auth_http_SUITE.erl
%%============================================================================== Copyright 2014 Erlang Solutions Ltd. %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% ...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/test/auth_http_SUITE.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 ex...
Copyright 2014 Erlang Solutions Ltd. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(auth_http_SUITE). -compile(export_all). -author(''). -include_lib("common_test/include/ct.hrl"). -define(DOMAIN1, <<"localhost"...
58b7bdb3c13c54d2a649413e26d9c82eef21c81324d7054e03e65d40b11c61ce
awslabs/s2n-bignum
bignum_bigendian_4.ml
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) (* =================================================================...
null
https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/x86/proofs/bignum_bigendian_4.ml
ocaml
========================================================================= Big-endian transformation (just byte reversal as x86 is little-endian). ========================================================================= *** print_literal_from_elf "x86/p256/bignum_bigendian_4.o";; *** -------------------------...
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) There are three different correctness variants corresponding to th...
1bf4ec53994617b122a120ca8e3b50c9153be8a28d239053f70416304b3335b8
rd--/hsc3
playBufCF.help.hs
-- playBufCF ; wslib ; CF = cross-fade ; control-rate trigger and start-position inputs let b = control kr "buf" 0 r = bufRateScale kr b tr = impulse kr 2 0 wn = whiteNoiseId 'α' kr sp = linLin wn (-1) 1 0 (bufFrames kr b - (0.5 * 44100)) o = playBufCF 1 b r tr sp NoLoop 0.1 2 o' = playBuf 1 ar ...
null
https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Ugen/playBufCF.help.hs
haskell
playBufCF ; wslib ; CF = cross-fade ; control-rate trigger and start-position inputs playBufCF ; demand ugens inputs ; load sound file to buffer zero ( single channel file required for examples )
let b = control kr "buf" 0 r = bufRateScale kr b tr = impulse kr 2 0 wn = whiteNoiseId 'α' kr sp = linLin wn (-1) 1 0 (bufFrames kr b - (0.5 * 44100)) o = playBufCF 1 b r tr sp NoLoop 0.1 2 o' = playBuf 1 ar b r tr sp NoLoop DoNothing in mce2 o o' let b = control kr "buf" 0 r = drandId 'α' ...
125b844bec4d55ff3cad951d87b95e7c903b1647e6727efc1ea1c6f13fa3feb1
RT-Anderson/ant-colony-optimizer
tools.clj
(ns ant-colony-optimizer.tools [require [clojure.set :only rand-int] [clojure.math.numeric-tower :as math]]) (defn get-edge [n1 n2] Converts the i d of 2 nodes into a key ; ;; used to retrieve and set values in the edge-map (if (neg? (compare n1 n2)) (keyword (str n1 n2)) (keyword (str n2 n1...
null
https://raw.githubusercontent.com/RT-Anderson/ant-colony-optimizer/fb6cab97a1125987733532eb8961ef6455436722/src/ant_colony_optimizer/tools.clj
clojure
used to retrieve and set values in the edge-map Generates a random vector of [x y] points BUG: Sometimes the same number will be passed as pt1 and pt2 Until fixed, this function's workaround is to return an obscenely large number Compute distance of route that ends at its starting point Removes selected index fr...
(ns ant-colony-optimizer.tools [require [clojure.set :only rand-int] [clojure.math.numeric-tower :as math]]) (defn get-edge [n1 n2] (if (neg? (compare n1 n2)) (keyword (str n1 n2)) (keyword (str n2 n1)))) (defn set-waypoints Waypoint i d is their array position [node-count max-value] (tak...
96ccb4463e7d2197cc2e2177bd0136d8aed785bf688dd5c4f03bf58c39af5331
mirage/ocaml-dns
odnssec.ml
open Lwt.Infix open Dns let ( let* ) = Result.bind let pp_zone ppf (domain, query_type, query_value) = Fmt.string ppf (Rr_map.text_b domain (Rr_map.B (query_type, query_value))) let pp_nameserver ppf = function | `Plaintext (ip, port) -> Fmt.pf ppf "TCP %a:%d" Ipaddr.pp ip port | `Tls (tls_cfg, ip, port) ...
null
https://raw.githubusercontent.com/mirage/ocaml-dns/be6c384e9a6fc1de9b8fd3d055371e88a1465a87/app/odnssec.ml
ocaml
following 4509 - if there's a sha2 DS, drop sha1 ones
open Lwt.Infix open Dns let ( let* ) = Result.bind let pp_zone ppf (domain, query_type, query_value) = Fmt.string ppf (Rr_map.text_b domain (Rr_map.B (query_type, query_value))) let pp_nameserver ppf = function | `Plaintext (ip, port) -> Fmt.pf ppf "TCP %a:%d" Ipaddr.pp ip port | `Tls (tls_cfg, ip, port) ...
1141509a7d13f4468ce4f11a282d595316f3b7acf9a71bfb8635358771871194
sauercrowd/clojureworker
project.clj
(defproject com.github.sauercrowd/clojureworker "0.0.1" :description "Clojurescript library for Cloudflare Workers" :url "" :plugins [[lein-cljsbuild "1.1.8"] [lein-codox "0.10.7"]] :codox {:language :clojurescript} :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" ...
null
https://raw.githubusercontent.com/sauercrowd/clojureworker/b6303dad990a3afdcc79ac22c35a7002df5d0aac/project.clj
clojure
(defproject com.github.sauercrowd/clojureworker "0.0.1" :description "Clojurescript library for Cloudflare Workers" :url "" :plugins [[lein-cljsbuild "1.1.8"] [lein-codox "0.10.7"]] :codox {:language :clojurescript} :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" ...
e2d9ed0c7d0c55582afc9adc51941beffb2aa3f8d1c3745861ec886513b73ab6
tisnik/clojure-examples
core.clj
; ( C ) Copyright 2016 , 2020 ; ; All rights reserved. This program and the accompanying materials ; are made available under the terms of the Eclipse Public License v1.0 ; which accompanies this distribution, and is available at -v10.html ; ; Contributors: ; (ns async11.core (:gen-class)) ...
null
https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/async11/src/async11/core.clj
clojure
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at Contributors: chvili pockame
( C ) Copyright 2016 , 2020 -v10.html (ns async11.core (:gen-class)) nacteme vsechny potrebne funkce , makra a symboly z ( schvalne se funkce , protoze by takove , map apod . ) (require '[clojure.core.async :refer (go go-loop offer! poll! chan >! <! timeout close!)]) (defn wai...
a3975a83788b4f15616dabf4e7943ce4ecfe953a9c4954c479c110a9dc2ab384
S8A/htdp-exercises
ex391.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-intermediate-lambda-reader.ss" "lang")((modname ex391) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex391.rkt
racket
about the language level of this file in a form that our tools can easily process. .: Before simplification :. [List-of Number] [List-of Number] -> [List-of Number] replaces the final '() in front with end .: After simplification :. [List-of Number] [List-of Number] -> [List-of Number] replaces the final '() in ...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex391) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define (replace-eol-with_ front end) (cond [(an...
5f802974c2cfab7e7de975a021737ec21e4cb450ced68eb1eb6fee5f24ae3102
kidpollo/jackdaw-literate-examples
log.clj
(ns prod-app.log "Thin wrappers around cambium's logging fns." (:require [cambium.codec :as codec] [cambium.core :as cambium-core] [cambium.logback.json.flat-layout :as flat] [clojure.set :as set] [metrics.meters :as meters])) (flat/set-decoder! codec/destringify-va...
null
https://raw.githubusercontent.com/kidpollo/jackdaw-literate-examples/9f3eca7415c0c4d460ab114eca675901a6c32114/prod-app/src/prod_app/log.clj
clojure
(ns prod-app.log "Thin wrappers around cambium's logging fns." (:require [cambium.codec :as codec] [cambium.core :as cambium-core] [cambium.logback.json.flat-layout :as flat] [clojure.set :as set] [metrics.meters :as meters])) (flat/set-decoder! codec/destringify-va...
12f4698a1456c19390fb2393de446067a7c581c67b3fee9f60200a5fdb8ab11f
crystodev/cato
Baseutils.hs
module Baseutils (capitalized, formatNumber) where import qualified Data.Char as Char capitalized :: String -> String capitalized (head:tail) = Char.toUpper head : map Char.toLower tail capitalized [] = [] formatNumber :: Int -> String formatNumber = intersperseN ' ' 3 . show intersperseN :: a -> Int -> [a] -> [a...
null
https://raw.githubusercontent.com/crystodev/cato/ae93afe078ffb6d942a5725db07d27d3d896b8a5/src/Baseutils.hs
haskell
module Baseutils (capitalized, formatNumber) where import qualified Data.Char as Char capitalized :: String -> String capitalized (head:tail) = Char.toUpper head : map Char.toLower tail capitalized [] = [] formatNumber :: Int -> String formatNumber = intersperseN ' ' 3 . show intersperseN :: a -> Int -> [a] -> [a...
a340d0de2419fe58e3ba3844bb7d293a24a576e1246d3f0fb49954d715ddc63b
kowainik/summoner
DecisionSpec.hs
HLINT ignore " Monoid law , right identity " HLINT ignore " Monoid law , left identity " module Test.DecisionSpec ( decisionPropertySpec -- * Gen , genDecision ) where import Hedgehog (MonadGen, forAll, (===)) import Test.Hspec (Spec, describe, it) import Test.Hspec.Hedgehog (hedgeh...
null
https://raw.githubusercontent.com/kowainik/summoner/0e9343880171b81e515bc7bfebe8c6156330f9f2/summoner-cli/test/Test/DecisionSpec.hs
haskell
* Gen
HLINT ignore " Monoid law , right identity " HLINT ignore " Monoid law , left identity " module Test.DecisionSpec ( decisionPropertySpec , genDecision ) where import Hedgehog (MonadGen, forAll, (===)) import Test.Hspec (Spec, describe, it) import Test.Hspec.Hedgehog (hedgehog) import Summon...
ea234b298b4990b190215c18eae8cef496fc5f78bb89d9797dd1357cc0b5f25d
ekmett/ekmett.github.com
Histo.hs
{-# OPTIONS_GHC -fglasgow-exts #-} ----------------------------------------------------------------------------- -- | Module : Control . . Copyright : ( C ) 2008 -- License : BSD-style (see the file LICENSE) -- Maintainer : < > -- Stability : experimental -- Portability : non-port...
null
https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/category-extras-backup/_darcs/pristine/src/Control/Morphism/Histo.hs
haskell
# OPTIONS_GHC -fglasgow-exts # --------------------------------------------------------------------------- | License : BSD-style (see the file LICENSE) Stability : experimental Portability : non-portable (rank-2 polymorphism) Traditional operators, shown here to show how to roll your own --------------...
Module : Control . . Copyright : ( C ) 2008 Maintainer : < > module Control.Morphism.Histo where import Control.Functor.Algebra import Control.Functor.Extras import Control.Functor.Fix import Control.Comonad import Control.Comonad.Cofree import Control.Morphism.Cata histo :: Functor f =>...
88998bad71b6fe29a692d9e624616428afd46b5463e0ec832cf8327247afa0f0
smucclaw/dsl
Markdown.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # module LS.XPile.Markdown where import LS import LS.NLP.NLG import AnyAll as AA import qualified Data.Map as Map import qualified Data.Text as Text -- import Debug.Trace (trace) mark...
null
https://raw.githubusercontent.com/smucclaw/dsl/4d648c374d4e64b41a3686d047cdd9a60146e2c4/lib/haskell/natural4/src/LS/XPile/Markdown.hs
haskell
# LANGUAGE OverloadedStrings # import Debug.Trace (trace)
# LANGUAGE RecordWildCards # # LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # module LS.XPile.Markdown where import LS import LS.NLP.NLG import AnyAll as AA import qualified Data.Map as Map import qualified Data.Text as Text markdown :: NLGEnv -> [Rule] -> IO String markdown env rl = do nl <...
4871a3f73c4622dafb6632bfe264e6363ac78a22a69a2afd34f16cf2b1909fef
rowangithub/DOrder
listlib.ml
(** a set of useful list functions *) let rec length xs = match xs with | x :: xs' -> 1 + length xs' | [] -> 0 let rec rev_append l1 l2 = match l1 with [] -> l2 | a :: l -> rev_append l (a :: l2) let rev l = rev_append l [] let split list n = let rec split_aux i acc l = match l with | ...
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/reachability/listlib.ml
ocaml
* a set of useful list functions | [] -> raise Not_found | [] -> raise Not_found
let rec length xs = match xs with | x :: xs' -> 1 + length xs' | [] -> 0 let rec rev_append l1 l2 = match l1 with [] -> l2 | a :: l -> rev_append l (a :: l2) let rev l = rev_append l [] let split list n = let rec split_aux i acc l = match l with | [] -> rev acc, [] | h :: t -> ...
a6bfaef6bc0bb750f195feb607d5236649d3fdf11f2b950390c932815cfb107b
ghc/packages-Cabal
Configure.hs
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE PatternGuards # # LANGUAGE TypeFamilies # {-# LANGUAGE NoMonoLocalBinds #-} # LANGUAGE NondecreasingIndentation # -- | See <-proposals/blob/backpack/proposals/0000-backpack.rs...
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/Cabal/Distribution/Backpack/Configure.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE OverloadedStrings # # LANGUAGE NoMonoLocalBinds # | See <-proposals/blob/backpack/proposals/0000-backpack.rst> WARNING: The contents of this module are HIGHLY experimental. We may refactor it under you. ----------------------------------------------------------------------...
# LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE PatternGuards # # LANGUAGE TypeFamilies # # LANGUAGE NondecreasingIndentation # module Distribution.Backpack.Configure ( configureComponentLocalBuildInfos, ) where import Prelude () import Distribution.Compat.Prelude hiding ((<>)) import Di...
26d790f6992e4449eb03ce5aff4df2ba682fdacbae2ea0766f6a81215e4f71bc
alexandroid000/improv
Float32MultiArray.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # module Ros.Std_msgs.Float32MultiArray where import qualified Prelude as P import Prelude ((.), (+), (*)) import qualified Data.Typeable as T import Control.Applicative import Ros.Internal.RosBi...
null
https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/roshask/msgs/Std_msgs/Ros/Std_msgs/Float32MultiArray.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # module Ros.Std_msgs.Float32MultiArray where import qualified Prelude as P import Prelude ((.), (+), (*)) import qualified Data.Typeable as T import Control.Applicative import Ros.Internal.RosBinary import Ros.Internal.Msg.MsgInfo import qualified GHC.Generics as G...
3276c6a087bb38be4262bd224a66a0b8203fccebb2b5ad3662acc69ae6c4a3cd
pirapira/coq2rust
coq_omega.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/plugins/omega/coq_omega.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** ************************************...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Omega : a solver of quantifi...
12e9f74ce7d1a55c197a0d86359b1e26cc8af6c7b7f53611a3e3bd966d19cdce
inhabitedtype/ocaml-aws
createDBClusterParameterGroup.ml
open Types open Aws type input = CreateDBClusterParameterGroupMessage.t type output = CreateDBClusterParameterGroupResult.t type error = Errors_internal.t let service = "rds" let signature_version = Request.V4 let to_http service region req = let uri = Uri.add_query_params (Uri.of_string (Aws.Util.of_...
null
https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/rds/lib/createDBClusterParameterGroup.ml
ocaml
open Types open Aws type input = CreateDBClusterParameterGroupMessage.t type output = CreateDBClusterParameterGroupResult.t type error = Errors_internal.t let service = "rds" let signature_version = Request.V4 let to_http service region req = let uri = Uri.add_query_params (Uri.of_string (Aws.Util.of_...
0c13f31c9807ed2d4ecde5f2574a8230a9ceb8fb69c15aa3a43b2fad4611c83e
freckle/faktory_worker_haskell
Status.hs
module Faktory.Ent.Batch.Status ( jobBatchId , BatchStatus(..) , batchStatus ) where import Faktory.Prelude import Control.Applicative ((<|>)) import Control.Error.Util (hush) import Data.Aeson import Data.ByteString.Lazy as BSL import Data.Text.Encoding (encodeUtf8) import Data.Time (UTCTime) import Faktory....
null
https://raw.githubusercontent.com/freckle/faktory_worker_haskell/2bf2d996bbf93a4da5e65902f17046a9aa021fee/library/Faktory/Ent/Batch/Status.hs
haskell
Faktory seems to use the key '_bid' when enqueuing callback jobs and 'bid' for normal jobs...
module Faktory.Ent.Batch.Status ( jobBatchId , BatchStatus(..) , batchStatus ) where import Faktory.Prelude import Control.Applicative ((<|>)) import Control.Error.Util (hush) import Data.Aeson import Data.ByteString.Lazy as BSL import Data.Text.Encoding (encodeUtf8) import Data.Time (UTCTime) import Faktory....
d6d65593d0d0499eca7f0909cf921a4030dc440ce3a12d56b584da8b4aa07005
heyoka/faxe
esp_elapsed.erl
Date : 09.12.16 - 18:02 Ⓒ 2016 heyoka -module(esp_elapsed). -author("Alexander Minichmair"). -behavior(esp_stats). %% API -export([execute/2, options/0]). options() -> esp_stats:get_options() ++ [{module, atom, ?MODULE}]. execute({Tss, _Values}, _Opts) -> calc(Tss, []). calc([], Acc) -> Acc; calc([_Ts...
null
https://raw.githubusercontent.com/heyoka/faxe/e539afe8b62790a6037914751deef7d815be11a2/apps/faxe/src/components/stats/esp_elapsed.erl
erlang
API basic_test() -> ?assertEqual([2,5,8,39], execute({[1,3,8,16,55], []}, #{})).
Date : 09.12.16 - 18:02 Ⓒ 2016 heyoka -module(esp_elapsed). -author("Alexander Minichmair"). -behavior(esp_stats). -export([execute/2, options/0]). options() -> esp_stats:get_options() ++ [{module, atom, ?MODULE}]. execute({Tss, _Values}, _Opts) -> calc(Tss, []). calc([], Acc) -> Acc; calc([_Ts], Acc)...
de0d9732ed318bc89eaf09d23d605024a455900f19e8fa8af89f54247b14b0b8
hirokai/PaperServer
Paper.hs
# LANGUAGE TemplateHaskell , ImplicitPrelude , DeriveDataTypeable # -- -- Paper -- -- Definition of Paper and related data types, as well as JSON import and export of them. -- module Parser.Paper where import Data.Maybe import Data.Text (Text) import qualified Data.Text as T import Data.ByteString (ByteString) import...
null
https://raw.githubusercontent.com/hirokai/PaperServer/b577955af08660253d0cd11282cf141d1c174bc0/Parser/Paper.hs
haskell
Paper Definition of Paper and related data types, as well as JSON import and export of them. Don't change field names of data types. deriveJSON and makeLenses rely on current names. Stub Not used now. _paperUserEmail :: Maybe Text MIME type. section title (i.e. URL for the current implementation) supporte...
# LANGUAGE TemplateHaskell , ImplicitPrelude , DeriveDataTypeable # module Parser.Paper where import Data.Maybe import Data.Text (Text) import qualified Data.Text as T import Data.ByteString (ByteString) import Data.Char (toLower) import Control.Lens hiding ((.=)) import Data.Tree import Data.Aeson import Data.Aeso...
47a5da58b437a61f001caa32c24ca9b3a24c024dcb6d15a3fd19183ba25b22dc
teknql/crux-geo
jts.clj
(ns teknql.crux-geo.jts "Java Topology Suite Backend for crux-geo" (:require [crux.system :as sys] [crux.db :as db] [teknql.crux-geo :refer [GeoBackend]] [teknql.crux-geo.encode :as encode]) (:import [org.locationtech.jts.index.strtree STRtree GeometryItemDistance] [...
null
https://raw.githubusercontent.com/teknql/crux-geo/734ff2145acf150d83b68a866ff89e6fbadea974/src/teknql/crux_geo/jts.clj
clojure
(ns teknql.crux-geo.jts "Java Topology Suite Backend for crux-geo" (:require [crux.system :as sys] [crux.db :as db] [teknql.crux-geo :refer [GeoBackend]] [teknql.crux-geo.encode :as encode]) (:import [org.locationtech.jts.index.strtree STRtree GeometryItemDistance] [...
0355c0aa35f64d540378ff82788790a58875754f770ed302375c5348e9437e3d
racket/racket-lang-org
util.rkt
#lang racket/base (provide get-human-size) (define (get-human-size size) (define mb (/ size (* 1024 1024))) (if (< mb 10) (let-values ([(q r) (quotient/remainder (round (* mb 10)) 10)]) (format "~a.~aM" q r)) (format "~aM" (round mb))))
null
https://raw.githubusercontent.com/racket/racket-lang-org/88dada2ee769ada9afaf1e3ec1fb28b8ddf216db/download/util.rkt
racket
#lang racket/base (provide get-human-size) (define (get-human-size size) (define mb (/ size (* 1024 1024))) (if (< mb 10) (let-values ([(q r) (quotient/remainder (round (* mb 10)) 10)]) (format "~a.~aM" q r)) (format "~aM" (round mb))))
58f03a62f1fa4b36565dd64b16d9c87bcf222c21dd844205430a9e723fe69894
gelisam/frp-zoo
Main.hs
{-# LANGUAGE Arrows #-} # LANGUAGE LambdaCase # # LANGUAGE FlexibleContexts # module Main where import Prelude hiding (id, (.)) import Control.Applicative import Control.Category import Control.Arrow import Data.Maybe import Graphics.Gloss import qualified Graphics.Gloss.Interface.IO.Game as G import Control.Ar...
null
https://raw.githubusercontent.com/gelisam/frp-zoo/1a1704e4294b17a1c6e4b417a73e61216bad2321/artery-example/Main.hs
haskell
# LANGUAGE Arrows # Main body Part 1: static version Every toggle event causes switch of counters, with every counter is newly created. Every toggle event causes switch of a counter,
# LANGUAGE LambdaCase # # LANGUAGE FlexibleContexts # module Main where import Prelude hiding (id, (.)) import Control.Applicative import Control.Category import Control.Arrow import Data.Maybe import Graphics.Gloss import qualified Graphics.Gloss.Interface.IO.Game as G import Control.Artery import Butt...
0c92ba5a5dbcc6040f867a62945d16f2507a2c0d00116cf6960f50709e967886
gretay-js/ocamlfdo
block_info.mli
(* Successor info *) type b = { target : Loc.t option; target_label : Cfg_label.t option; target_id : int option; (* is the target intraprocedural? *) intra : bool; fallthrough : bool; true for fallthrough targets where counts are inferred from LBR ; false for branches that appeared exp...
null
https://raw.githubusercontent.com/gretay-js/ocamlfdo/5866fe9c2bfea03bc7efb033cc7b91a3a25cf520/src/block_info.mli
ocaml
Successor info is the target intraprocedural? call site info Execution counts for a basic block [first_id] can be the same as terminator_id if body is empty Number of times this block was executed. Info about branch targets Info about call targets in-place update of mutable fields Maintain unique tar...
type b = { target : Loc.t option; target_label : Cfg_label.t option; target_id : int option; intra : bool; fallthrough : bool; true for fallthrough targets where counts are inferred from LBR ; false for branches that appeared explicitly in LBR for branches that appeared explicitly in...
6f6aa50273a357d04b27805f4a650d650952b8f646602d43f7f4c1792177e809
puppetlabs/trapperkeeper-webserver-jetty9
webrouting_service_core.clj
(ns puppetlabs.trapperkeeper.services.webrouting.webrouting-service-core (:require [schema.core :as schema] [puppetlabs.trapperkeeper.services.webserver.jetty9-core :as jetty9-core] [puppetlabs.trapperkeeper.services :as tk-services] [puppetlabs.i18n.core :as i18n])) ;;;;;;;;;;;;;...
null
https://raw.githubusercontent.com/puppetlabs/trapperkeeper-webserver-jetty9/98fd16ef3df2b0b753fce743848bc078d9527cb7/src/puppetlabs/trapperkeeper/services/webrouting/webrouting_service_core.clj
clojure
Private Utility Functions Lifecycle implementations Service function implementations
(ns puppetlabs.trapperkeeper.services.webrouting.webrouting-service-core (:require [schema.core :as schema] [puppetlabs.trapperkeeper.services.webserver.jetty9-core :as jetty9-core] [puppetlabs.trapperkeeper.services :as tk-services] [puppetlabs.i18n.core :as i18n])) Schemas (d...
c195de742c8cf430659e09a41ff9cc354005964fc6103b1fcea53f2e1fba8bf3
keera-studios/keera-posture
PreferencesDetectionCorrection.hs
-- | Keeps the correction factor in sync between model and view module Controller.Conditions.PreferencesDetectionCorrection where import Control.Applicative import Data.ReactiveValue import Graphics.UI.Gtk.Reactive import Hails.MVC.Model.ProtectedModel.Reactive -- Local imports import CombinedEnvironment installHand...
null
https://raw.githubusercontent.com/keera-studios/keera-posture/9de5095a4a10c0cb54f6191f1a448e96645193ae/src/Controller/Conditions/PreferencesDetectionCorrection.hs
haskell
| Keeps the correction factor in sync between model and view Local imports View Condition
module Controller.Conditions.PreferencesDetectionCorrection where import Control.Applicative import Data.ReactiveValue import Graphics.UI.Gtk.Reactive import Hails.MVC.Model.ProtectedModel.Reactive import CombinedEnvironment installHandlers :: CEnv -> IO() installHandlers cenv = do correctionEntry <- spinButtonVal...
70cc55035e34b7d667ca474b021fa4236c5a67d46eadd125d7d167a315a2214c
dalaing/little-languages
Pretty.hs
module Term.Pretty where import Control.Lens (preview) import Data.Foldable (asum) import Data.Maybe (fromMaybe) import Text.PrettyPrint.ANSI.Leijen hiding ((<$>)) import Term printZero :: Term -> Maybe Doc printZero = fmap (const . text $ "O") . preview _TmZero printSucc :: (Term -> Doc) -> ...
null
https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/multityped/nb/src/Term/Pretty.hs
haskell
TODO some kind of indentation?
module Term.Pretty where import Control.Lens (preview) import Data.Foldable (asum) import Data.Maybe (fromMaybe) import Text.PrettyPrint.ANSI.Leijen hiding ((<$>)) import Term printZero :: Term -> Maybe Doc printZero = fmap (const . text $ "O") . preview _TmZero printSucc :: (Term -> Doc) -> ...
b4046170baa47dc307e7d18dc8a9576ee8abbcddb3d6d051382c21abc37da1ad
arenadotio/pgx
error_response.mli
type t = { code : string ; severity : string ; message : string ; custom : (char * string) list } [@@deriving sexp] val should_print : t -> verbose:int -> bool val to_string : ?verbose:bool -> t -> string
null
https://raw.githubusercontent.com/arenadotio/pgx/8d5ca02213faa69e692c5d0dc3e81408db3774a1/pgx/src/error_response.mli
ocaml
type t = { code : string ; severity : string ; message : string ; custom : (char * string) list } [@@deriving sexp] val should_print : t -> verbose:int -> bool val to_string : ?verbose:bool -> t -> string
1585929578ac4b197be1007555ad258d7205baf278539bc1e40932f2126c15fd
ssor/erlangDemos
ws_timeout_hibernate_handler.erl
%% Feel free to use, reuse and abuse the code in this file. -module(ws_timeout_hibernate_handler). -behaviour(cowboy_http_handler). -behaviour(cowboy_websocket_handler). -export([init/3, handle/2, terminate/2]). -export([websocket_init/3, websocket_handle/3, websocket_info/3, websocket_terminate/3]). init(_Any, _Req...
null
https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/cowboy/test/ws_timeout_hibernate_handler.erl
erlang
Feel free to use, reuse and abuse the code in this file.
-module(ws_timeout_hibernate_handler). -behaviour(cowboy_http_handler). -behaviour(cowboy_websocket_handler). -export([init/3, handle/2, terminate/2]). -export([websocket_init/3, websocket_handle/3, websocket_info/3, websocket_terminate/3]). init(_Any, _Req, _Opts) -> {upgrade, protocol, cowboy_websocket}. handle(...
dfec8295e2fc76cf95e76c04a8ee96a8696e090b9b7a9ff52e5a88eff3c449ec
RefactoringTools/wrangler
wrangler_error_logger.erl
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 of conditions...
null
https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/src/wrangler_error_logger.erl
erlang
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 of conditions and the following disclaimer. %% Redi...
Copyright ( c ) 2010 , , IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR Author : < > Created : 31 Aug 2008 by < > -module(wrangler_error_logger). -behaviour(gen_server). -export([start_wrang...
dc4e81cf78ff568b3c4f702b1dc97154df05cde579ee6109120861f3330f77a8
aryx/ocamltarzan
pa_bin_prot.ml
pp camlp4orf File : pa_bin_prot.ml Copyright ( C ) 2007- Jane Street Holding , LLC Author : email : mmottl\@janestcapital.com WWW : This file is derived from file " pa_tywith.ml " of version 0.45 of the library " " . is Copyright ( C ) 2004 , 2005 by ...
null
https://raw.githubusercontent.com/aryx/ocamltarzan/4140f5102cee83a2ca7be996ca2d92e9cb035f9c/pa/pa_bin_prot.ml
ocaml
* Pa_bin_prot: Preprocessing Module for a Type Safe Binary Protocol Utility functions impossible Generators for the binary protocol Generates the signature for binary writers Generates the signature for type conversion from S-expressions Generates the signature for type conversion to S-expressions Generat...
pp camlp4orf File : pa_bin_prot.ml Copyright ( C ) 2007- Jane Street Holding , LLC Author : email : mmottl\@janestcapital.com WWW : This file is derived from file " pa_tywith.ml " of version 0.45 of the library " " . is Copyright ( C ) 2004 , 2005 by ...
b38ad7a2dd535c53c8f44e812e188b68a59ba444f1bb08c5d7ba332c8ea42aa2
oral-health-and-disease-ontologies/ohd-ontology
data-resultset-methods.lisp
;;; generic methods for data-resultset (defgeneric initialize-instance ((rs data-resultset) &key &allow-other-keys) (:documentation "Initializes the data-resultset.")) (defgeneric get-jdbc-resultset (&key &allow-other-keys) (:documentation "Returns a jdbc data-resultset.")) (defgeneric get-file-resultset (&key &...
null
https://raw.githubusercontent.com/oral-health-and-disease-ontologies/ohd-ontology/ba3f502b86487c8ba5fa04ff8ba33312a1679570/src/vdw-translation/development-library/classes/data-resultset-methods.lisp
lisp
generic methods for data-resultset methods for file resultset create records to hold data check for headers check if line is give at which data starts populate the contents of the next line of the file this is used to enable the has-next() method of the iterator return resultset check that header line is vali...
(defgeneric initialize-instance ((rs data-resultset) &key &allow-other-keys) (:documentation "Initializes the data-resultset.")) (defgeneric get-jdbc-resultset (&key &allow-other-keys) (:documentation "Returns a jdbc data-resultset.")) (defgeneric get-file-resultset (&key &allow-other-keys) (:documentation "Re...
10fe2bc40fe9cfca490d6173ca99ed15171b661277148bd688c3b8966f83840a
avsm/platform
p2.ml
let g () = P1.x ()
null
https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/opam-client.2.0.5%2Bdune/tests/packages/P2/p2.ml
ocaml
let g () = P1.x ()
f60672d3fc7ade9a8e0889c485ce68afb883d346b70f6e8d6363d3e36a87f83f
borkdude/respeced
project.clj
(defproject respeced "0.1.3-SNAPSHOT" :description "You wrote fdefs. But how are you going to test them?" :url "" :scm {:name "git" :url ""} :license {:name "Eclipse Public License 1.0" :url "-1.0.php"} :dependencies [[org.clojure/clojure "1.10.0"]] :profiles {:dev {:dependencies ...
null
https://raw.githubusercontent.com/borkdude/respeced/527e4574c0a49c1f9787b491cccf303f6d4f158f/project.clj
clojure
(defproject respeced "0.1.3-SNAPSHOT" :description "You wrote fdefs. But how are you going to test them?" :url "" :scm {:name "git" :url ""} :license {:name "Eclipse Public License 1.0" :url "-1.0.php"} :dependencies [[org.clojure/clojure "1.10.0"]] :profiles {:dev {:dependencies ...
6d5b61e9d1b24a4e960e5e0ef33550a9df39598a9fb99d607485fbea9540e873
duckyuck/flare
string_test.cljc
(ns flare.string-test (:require [clojure.test :refer [deftest is testing]] [flare.string :refer [diff-string report-string-diff]])) (def diff-recursive (constantly [:recursive-diff])) (deftest string-diff-test (is (= (diff-string "foo" "fjoo" diff-recursive) [{:type :string :a->b ...
null
https://raw.githubusercontent.com/duckyuck/flare/4d983fda75fab718b5ec0bf4e3f8ab4bfa1a2080/test/flare/string_test.cljc
clojure
(ns flare.string-test (:require [clojure.test :refer [deftest is testing]] [flare.string :refer [diff-string report-string-diff]])) (def diff-recursive (constantly [:recursive-diff])) (deftest string-diff-test (is (= (diff-string "foo" "fjoo" diff-recursive) [{:type :string :a->b ...
8d0a5f455926318838464104414e824d0d7cf8de75d525a82e923d1d661b5223
athensresearch/athens
inline_refs.cljs
(ns athens.events.inline-refs (:require [re-frame.core :as rf])) (rf/reg-event-db ::cleanup! (fn [db [_ uid]] (update db :inline-refs dissoc uid))) (rf/reg-event-db ::set-open! (fn [db [_ uid open?]] (assoc-in db [:inline-refs uid :open?] open?))) (rf/reg-event-db ::toggle-open! (fn [db ...
null
https://raw.githubusercontent.com/athensresearch/athens/9ea22566fc10cfd478320b0aaeeee2f32a506cc6/src/cljs/athens/events/inline_refs.cljs
clojure
(ns athens.events.inline-refs (:require [re-frame.core :as rf])) (rf/reg-event-db ::cleanup! (fn [db [_ uid]] (update db :inline-refs dissoc uid))) (rf/reg-event-db ::set-open! (fn [db [_ uid open?]] (assoc-in db [:inline-refs uid :open?] open?))) (rf/reg-event-db ::toggle-open! (fn [db ...
558e6d355d21011cf6302b92c08e63d8839a45c6bab4d768cdfdfa4d381fb0ac
workframers/artemis
ui_state.cljs
(ns example.ui-state (:require [re-frame.core :as rf])) ;; UI state subscriptions (rf/reg-sub ::ui-state (fn [db _] (:ui-state db))) (rf/reg-sub ::selected-repo :<- [::ui-state] (fn [ui-state _] (:selected-repo ui-state))) ;; UI state events (rf/reg-event-db :select-repo (fn [db [_ repo]] ...
null
https://raw.githubusercontent.com/workframers/artemis/c67a7891b51b299e974cce6f01f7db9e45dee754/examples/re_frame/example/ui_state.cljs
clojure
UI state subscriptions UI state events
(ns example.ui-state (:require [re-frame.core :as rf])) (rf/reg-sub ::ui-state (fn [db _] (:ui-state db))) (rf/reg-sub ::selected-repo :<- [::ui-state] (fn [ui-state _] (:selected-repo ui-state))) (rf/reg-event-db :select-repo (fn [db [_ repo]] (assoc-in db [:ui-state :selected-repo] re...
9973d5c7b7049fe9edf5668aaff7da7d207976cf68aa3105c2b525472f041a2c
facebook/infer
NS.ml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/facebook/infer/59cf5eab3b881acdd00707b4c15adcc7e97564b9/sledge/nonstdlib/NS.ml
ocaml
* Global namespace intended to be opened in each source file * Map-and-construct operations that preserve physical equality
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
fcb0f9a8cff506d03de6aa525a4be207f6e224df368bebf115dba7423796edc7
hopv/MoCHi
set_.mli
open Util open Combinator (** Sets (aka lists modulo permutation and contraction) *) type 'a t = 'a list * { 6 Inspectors } val subset : ?cmp:('a -> 'a -> bool) -> 'a t -> 'a t -> bool val equiv : ?cmp:('a -> 'a -> bool) -> 'a t -> 'a t -> bool val intersects : ?cmp:('a -> 'a -> bool) -> 'a t -> 'a t -> bool val di...
null
https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/fpat/set_.mli
ocaml
* Sets (aka lists modulo permutation and contraction) * [subsets_of_size n s] returns all the subsets of [s] with the size [n] * [equiv_classes rel s] divides [s] by the transitive closure of [rel] * [minimal p s] returns a minimal subset of [s] that satisfy [p] @require [p s] * @todo rename
open Util open Combinator type 'a t = 'a list * { 6 Inspectors } val subset : ?cmp:('a -> 'a -> bool) -> 'a t -> 'a t -> bool val equiv : ?cmp:('a -> 'a -> bool) -> 'a t -> 'a t -> bool val intersects : ?cmp:('a -> 'a -> bool) -> 'a t -> 'a t -> bool val disjoint : ?cmp:('a -> 'a -> bool) -> 'a t -> 'a t -> bool *...
4dcd4456822bd0091ef711141096b404449b81351ea0bf867a80407cba13328b
craigfe/sink
loc.ml
type t = { start : Lexing.position; stop : Lexing.position } let equal_position (a : Lexing.position) (b : Lexing.position) = a.pos_fname = b.pos_fname && a.pos_lnum = b.pos_lnum && a.pos_bol = b.pos_bol && a.pos_cnum = b.pos_cnum let equal a b = equal_position a.start b.start && equal_position a.stop b.stop ...
null
https://raw.githubusercontent.com/craigfe/sink/c5431edfa1b06f1a09845a481c4afcb3e92f0667/src/sink/loc.ml
ocaml
type t = { start : Lexing.position; stop : Lexing.position } let equal_position (a : Lexing.position) (b : Lexing.position) = a.pos_fname = b.pos_fname && a.pos_lnum = b.pos_lnum && a.pos_bol = b.pos_bol && a.pos_cnum = b.pos_cnum let equal a b = equal_position a.start b.start && equal_position a.stop b.stop ...
85c76eeb4cd6ccf337a15962d20a935f60d73e0f560e6be622901f48e87d50b7
rfindler/lindenmayer
normal-trees.rkt
#lang lindenmayer racket ## axiom ## !(r) F(l) A(r) ## rules ## A(r) -> ^F(l) B(r+s) >(δ*3) B(r+s) >(δ*5) B(r+s) B(w) -> [!(w) ^^F(l) >(δ*6) A(w)] ## variables ## n=13 δ=18 r=0.5 s=-0.079 l=1.8 w=800 h=800 --------------------------- ## axiom ## !(r) F(l) A(r,l) ## rules ## A(r,l) -> ^F(l) B(r...
null
https://raw.githubusercontent.com/rfindler/lindenmayer/2ef7b4535d8ae1eb7cc2e16e2b630c30a4b9a34d/examples/normal-trees.rkt
racket
#lang lindenmayer racket ## axiom ## !(r) F(l) A(r) ## rules ## A(r) -> ^F(l) B(r+s) >(δ*3) B(r+s) >(δ*5) B(r+s) B(w) -> [!(w) ^^F(l) >(δ*6) A(w)] ## variables ## n=13 δ=18 r=0.5 s=-0.079 l=1.8 w=800 h=800 --------------------------- ## axiom ## !(r) F(l) A(r,l) ## rules ## A(r,l) -> ^F(l) B(r...
03cbc5317d4c1a0e6b986710d3ca30ff9ec8694d8d4ab2f3a94dc27e908afaff
ageneau/blossom
test_runner.cljs
(ns blossom.test-runner (:require [doo.runner :refer-macros [doo-tests]] [blossom.blossom-test] [blossom.test-networkx])) (enable-console-print!) (doo-tests 'blossom.test-networkx 'blossom.blossom-test)
null
https://raw.githubusercontent.com/ageneau/blossom/67a6a2bcc30776867fe16b4e79122e7f43e4928a/test/blossom/test_runner.cljs
clojure
(ns blossom.test-runner (:require [doo.runner :refer-macros [doo-tests]] [blossom.blossom-test] [blossom.test-networkx])) (enable-console-print!) (doo-tests 'blossom.test-networkx 'blossom.blossom-test)
bc3f73b82b2c954d58d100c5ce9ca9335b218baf7b9eceeb7f3f68dd0fa204fd
tek/polysemy-hasql
ResultShape.hs
module Polysemy.Hasql.Table.ResultShape where import Data.Vector (Vector) import Hasql.Decoders (Result, Row, noResult, rowList, rowMaybe, rowVector) class ResultShape d r | r -> d where resultShape :: Row d -> Result r instance ResultShape d (Vector d) where resultShape = rowVector instance ResultShape d [...
null
https://raw.githubusercontent.com/tek/polysemy-hasql/254c0f53b74bc6d0e9f7dc6a1641153d47a416d7/packages/hasql/lib/Polysemy/Hasql/Table/ResultShape.hs
haskell
module Polysemy.Hasql.Table.ResultShape where import Data.Vector (Vector) import Hasql.Decoders (Result, Row, noResult, rowList, rowMaybe, rowVector) class ResultShape d r | r -> d where resultShape :: Row d -> Result r instance ResultShape d (Vector d) where resultShape = rowVector instance ResultShape d [...
74314e393bb64ef575181ec19204693513c260a4f1042a768d6e592fbc763f07
serokell/universum
IORef.hs
{-# LANGUAGE Safe #-} -- | Lifted reexports from 'Data.IORef' module. module Universum.Lifted.IORef ( IORef , atomicModifyIORef , atomicModifyIORef' , atomicWriteIORef , modifyIORef , modifyIORef' , newIORef , readIORef , writeIORef ) where import...
null
https://raw.githubusercontent.com/serokell/universum/7fc5dd3951d1177d1873e36b0678c759aeb5dc08/src/Universum/Lifted/IORef.hs
haskell
# LANGUAGE Safe # | Lifted reexports from 'Data.IORef' module. | Lifted version of 'Ref.newIORef'. | Lifted version of 'Ref.readIORef'. | Lifted version of 'Ref.writeIORef'. | Lifted version of 'Ref.modifyIORef'. | Lifted version of 'Ref.modifyIORef''. | Lifted version of 'Ref.atomicModifyIORef'. | Lifted versi...
module Universum.Lifted.IORef ( IORef , atomicModifyIORef , atomicModifyIORef' , atomicWriteIORef , modifyIORef , modifyIORef' , newIORef , readIORef , writeIORef ) where import Control.Monad.Trans (MonadIO, liftIO) import Data.Function (($), (.))...
303245c240b46c3fa9710bfdf5f59ac94b8e02b8f2c24b0ad25120f32cf942c8
chenyukang/eopl
17.scm
Trampoline the interpreter of figure 6.6 TODO (load-relative "../libs/init.scm") (load-relative "./base/test.scm") (load-relative "./base/cps.scm") (load-relative "./base/data-structures.scm") (load-relative "./base/cps-cases.scm") (load-relative "./base/cps-lang.scm") ;; New stuff (define value-of-simple-exp (l...
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch6/17.scm
scheme
New stuff value-of/k : TfExp * Env * Cont -> FinalAnswer apply-cont : Cont * ExpVal -> Final-ExpVal the end of the computation.
Trampoline the interpreter of figure 6.6 TODO (load-relative "../libs/init.scm") (load-relative "./base/test.scm") (load-relative "./base/cps.scm") (load-relative "./base/data-structures.scm") (load-relative "./base/cps-cases.scm") (load-relative "./base/cps-lang.scm") (define value-of-simple-exp (lambda (exp en...
d3e1330da0072344f658f8307f0997d5622dacc56aa97988f94db7a9dc6063f0
strint/sicpAns
2057_symbolic_differentiation_driv_more_terms.scm
(define (variable? x) (symbol? x)) (define (same-variable? v1 v2) (and (variable? v1) (variable? v2) (eq? v1 v2))) (define (=number? exp num) (and (number? exp) (= exp num))) (define (make-sum a1 a2) (cond ((=number? a1 0) a2) ((=number? a2 0) a1) ((and (number? a1) (number? a2)) (+ a1 a2)) ...
null
https://raw.githubusercontent.com/strint/sicpAns/efc4bdfaab7583117d42f2141d4b3b9e12792b79/2.3.2-2_SymbolicDifferentiation/2057_symbolic_differentiation_driv_more_terms.scm
scheme
当超过两个数相加时,把被加数当成一个新的sum,同sum?判断结合,就形成的递归的selector,可以处理多于两个terms的加法式子 当指数是0时 当指数是1时
(define (variable? x) (symbol? x)) (define (same-variable? v1 v2) (and (variable? v1) (variable? v2) (eq? v1 v2))) (define (=number? exp num) (and (number? exp) (= exp num))) (define (make-sum a1 a2) (cond ((=number? a1 0) a2) ((=number? a2 0) a1) ((and (number? a1) (number? a2)) (+ a1 a2)) ...
903884cdb8b73dadf3394cbe6dc32362aa3b487383d3383474086eab79eb25c0
cubicle-model-checker/cubicle
main.ml
(**************************************************************************) (* *) Cubicle (* *) ...
null
https://raw.githubusercontent.com/cubicle-model-checker/cubicle/00f09bb2d4bb496549775e770d7ada08bc1e4866/main.ml
ocaml
************************************************************************ ...
Cubicle Copyright ( C ) 2011 - 2014 and Universite Paris - Sud 11 This file is distributed under the terms ...
ca31740bab573f9e4d49683cd7cb8fd844aee4188c21b554d01f4953eaeb5f96
DrearyLisper/aoc-2021
Day21.hs
# OPTIONS_GHC -Wno - incomplete - patterns # module Day21 where import qualified Data.Map as Map import Data.Maybe (fromMaybe) import Data.List (group, sort) data Dice = Dice Int Int deriving Show newDice :: Dice newDice = Dice 0 1 throwDice :: Dice -> (Int, Dice) throwDice (Dice n 100) = (100, Dice (n+1) 1) throw...
null
https://raw.githubusercontent.com/DrearyLisper/aoc-2021/dbed532ba33dba06df8efecb8f68c8f2f2a42d69/21/Day21.hs
haskell
# OPTIONS_GHC -Wno - incomplete - patterns # module Day21 where import qualified Data.Map as Map import Data.Maybe (fromMaybe) import Data.List (group, sort) data Dice = Dice Int Int deriving Show newDice :: Dice newDice = Dice 0 1 throwDice :: Dice -> (Int, Dice) throwDice (Dice n 100) = (100, Dice (n+1) 1) throw...
dd9b672544343dd01ee1748266b3113a0f54793615ed1ebb16a36d50a91a315f
hercules-ci/hercules-ci-agent
Extras.hs
# LANGUAGE ScopedTypeVariables # module Data.Time.Extras where import Control.Concurrent.Thread.Delay import Data.Fixed import Data.Fixed.Extras import Data.Time import Prelude delayMicro :: Micro -> IO () delayMicro (MkFixed mus) = delay mus delayNominalDiffTime :: NominalDiffTime -> IO () delayNominalDiffTime = d...
null
https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/216a1d178d57471b05f60bf3e21ce46d3fdc5f94/hercules-ci-agent/src/Data/Time/Extras.hs
haskell
# LANGUAGE ScopedTypeVariables # module Data.Time.Extras where import Control.Concurrent.Thread.Delay import Data.Fixed import Data.Fixed.Extras import Data.Time import Prelude delayMicro :: Micro -> IO () delayMicro (MkFixed mus) = delay mus delayNominalDiffTime :: NominalDiffTime -> IO () delayNominalDiffTime = d...
4bc5ebb16ee9672b5d63164958fe9f8cc4f2d41ee2836fb277b4b6dbf004a77e
yziquel/OCaml-R
reduction.ml
(*********************************************************************************) (* OCaml-R *) (* *) Copyright ( C ) 2008 - 2010 Institut National de Recherche en ...
null
https://raw.githubusercontent.com/yziquel/OCaml-R/4690dd0ede4858d7048f573d75519e4643a40532/src/reduction.ml
ocaml
******************************************************************************* OCaml-R ...
Copyright ( C ) 2008 - 2010 Institut National de Recherche en Informatique et en Automatique . All rights reserved . Copyright ( C ) 2009 - 2010 . All rights reserved . it under the terms of the GNU General Public License as ...
67940a2cf15d405c7cb60da09309315a88bc01c59136e5ca077e3f797c1f4251
ralphrecto/xic
typecheck.mli
open Core.Std open Async.Std module Error: sig type t = Pos.pos * string type 'a result = ('a, t) Result.t end module Expr: sig type t = | IntT | BoolT | UnitT | ArrayT of t len > = 2 | EmptyArray [@@deriving sexp, compare] val to_string: t -> string val of_typ: Pos.typ -> t (*...
null
https://raw.githubusercontent.com/ralphrecto/xic/7dddfc855775467244a7949ee6d311dd8150f748/src/ocaml/typecheck.mli
ocaml
subtype and supertype relation aka unit aka void least upper bound `var p c x` tries to find a binding for `x` of the form `Var e`. If no * such binding is found, an error at position `p` is returned instead. `func p c x` tries to find a binding for `x` of the form `Function (a, * b)`. If no such bindi...
open Core.Std open Async.Std module Error: sig type t = Pos.pos * string type 'a result = ('a, t) Result.t end module Expr: sig type t = | IntT | BoolT | UnitT | ArrayT of t len > = 2 | EmptyArray [@@deriving sexp, compare] val to_string: t -> string val of_typ: Pos.typ -> t va...
3673d53bd69d3876e978a5f49228d3f77236426cecca18aa8a38dd7ec975714f
hopbit/sonic-pi-snippets
dp_str_trk_a.sps
# key: dp str trk a # point_line: 0 # point_index: 0 # -- class TrackA < Track def initialize(samples_path) @tempo = TempoDnb.new(samples_path) @vocal = VocalDNB.new(samples_path) @bg = BackgroundDNB.new(samples_path) @melody = MelodyDNB.new(samples_path) @beat = BeatDNB.new(samples_path) end en...
null
https://raw.githubusercontent.com/hopbit/sonic-pi-snippets/2232854ac9587fc2f9f684ba04d7476e2dbaa288/dp/dp_str_trk_a.sps
scheme
# key: dp str trk a # point_line: 0 # point_index: 0 # -- class TrackA < Track def initialize(samples_path) @tempo = TempoDnb.new(samples_path) @vocal = VocalDNB.new(samples_path) @bg = BackgroundDNB.new(samples_path) @melody = MelodyDNB.new(samples_path) @beat = BeatDNB.new(samples_path) end en...
75a98558dee3176d13932f664db21f8aaac25811365683aea67ec83b51e5fac5
raehik/binrep
BLen.hs
# LANGUAGE AllowAmbiguousTypes # for module Binrep.BLen ( module Binrep.BLen , module Binrep.BLen.Internal.AsBLen ) where import Binrep.BLen.Internal.AsBLen import Binrep.Util ( natVal'' ) import GHC.TypeLits import Data.ByteString qualified as B import Data.Word import Data.Int import Data.Void ( Void, ...
null
https://raw.githubusercontent.com/raehik/binrep/64412cc94c00d79d485252c8029e2644ef707805/src/Binrep/BLen.hs
haskell
| The length in bytes of the serialized value. The default implementation reifies the constant length for the type. If a type-wide constant length is not defined, it will fail at compile time. | The length in bytes of any value of the given type is constant. Many binary representation primitives are constant, or...
# LANGUAGE AllowAmbiguousTypes # for module Binrep.BLen ( module Binrep.BLen , module Binrep.BLen.Internal.AsBLen ) where import Binrep.BLen.Internal.AsBLen import Binrep.Util ( natVal'' ) import GHC.TypeLits import Data.ByteString qualified as B import Data.Word import Data.Int import Data.Void ( Void, ...
518dab4d1a53d240b40e0f68bc3a41943265bb378671c7b9a30803cc1808965c
minoki/haskell-floating-point
IntegerInternals.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE CPP # # LANGUAGE MagicHash # # LANGUAGE NoImplicitPrelude # # LANGUAGE UnboxedSums # # LANGUAGE UnboxedTuples # {-# OPTIONS_GHC -Wno-unused-imports -fobject-code #-} #include "MachDeps.h" module Numeric.Floating.IEEE.Internal.IntegerInternals ( integerToIntMaybe , naturalT...
null
https://raw.githubusercontent.com/minoki/haskell-floating-point/ac64ddd5012bfbec4dd0ed3170cefd8fcd166a8c/fp-ieee/src/Numeric/Floating/IEEE/Internal/IntegerInternals.hs
haskell
# LANGUAGE BangPatterns # # OPTIONS_GHC -Wno-unused-imports -fobject-code # $setup >>> :{ -- Workaround for : import Numeric.Floating.IEEE.Internal.IntegerInternals :} | Assumption: @n > 0@, @e >= 0@, and @integerLog2 n >= e@ ^ @n@ ^ @e@ | | The argument @x@ must be strictly positive. | The argument...
# LANGUAGE CPP # # LANGUAGE MagicHash # # LANGUAGE NoImplicitPrelude # # LANGUAGE UnboxedSums # # LANGUAGE UnboxedTuples # #include "MachDeps.h" module Numeric.Floating.IEEE.Internal.IntegerInternals ( integerToIntMaybe , naturalToWordMaybe , unsafeShiftLInteger , unsafeShiftRInteger , roundingMode , coun...
3e57f6b0d5cf75e305676b0d186ed23a8a4378c5bfcf3209a5d4d6e0c2f037cd
nasser/magic
core_print.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) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; ...
null
https://raw.githubusercontent.com/nasser/magic/7a46f773bc7785c82d9527d52c1a8c28ac16e195/src/stdlib/clojure/core_print.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (in-ns 'clojure.core) (set! *warn-on-reflection* true) (def ^:dynamic ^{:doc "*print-length* controls how many items of each collection the printer will print. If it is bound to logical false, there is no limit. Otherwise, it must be bound to an integer indicating ...
588be445a885a38bb42e818c43220ab4a7aea2704ed9cb6431ecb496e2a9df60
helsinki-frp/yampy-cube
Graphics.hs
module Graphics ( animate ) where import Control.Applicative import Control.Concurrent import Control.Monad import Data.Colour.SRGB (toSRGB24, RGB(..)) import Data.Text (Text) import qualified Data.Vector.Storable as Vector import Data.StateVar (($=))...
null
https://raw.githubusercontent.com/helsinki-frp/yampy-cube/95da2a7d9cd06f3716bf2162e24c6275821a40dc/src/Graphics.hs
haskell
| (Object to render, should the app exit) ^ window title ^ window width in pixels ^ window height in pixels ^ signal function to animate | Get octant points for a circle of given radius. check if we are still in octant go to the next point in the circle | Get quadrant points for a circle of given radius. To d...
module Graphics ( animate ) where import Control.Applicative import Control.Concurrent import Control.Monad import Data.Colour.SRGB (toSRGB24, RGB(..)) import Data.Text (Text) import qualified Data.Vector.Storable as Vector import Data.StateVar (($=))...
2bbfa01c3e2fd3181dda80b183e51ba08729217eeb74e10b241f0c276f64a7fd
karimarttila/clojure
user_test.clj
(ns simpleserver.service.user.user-test (:require [clojure.test :refer [deftest use-fixtures is testing]] [clojure.tools.logging :as log] [simpleserver.test-config :as ss-tc] [simpleserver.test-utils.test-service :as ss-test-service] [simpleserver.service.user.user-serv...
null
https://raw.githubusercontent.com/karimarttila/clojure/ee1261b9a8e6be92cb47aeb325f82a278f2c1ed3/webstore-demo/re-frame-demo/test/clj/simpleserver/service/user/user_test.clj
clojure
Rich comment.
(ns simpleserver.service.user.user-test (:require [clojure.test :refer [deftest use-fixtures is testing]] [clojure.tools.logging :as log] [simpleserver.test-config :as ss-tc] [simpleserver.test-utils.test-service :as ss-test-service] [simpleserver.service.user.user-serv...
2a1d615fa1cd2c148faf12df167ee9509d1765cb6649882417189653931a88e9
marick/Midje
t_api.clj
(ns midje.emission.t-api (:require [midje.sweet :refer :all] [midje.test-util :refer :all] [midje.emission.api :as emit] [midje.emission.levels :as levels] [midje.emission.state :as state] [midje.emission.plugins.test-support :as plugin] [midje.c...
null
https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/test/midje/emission/t_api.clj
clojure
No output Has fact-stream summary No clojure.test run, so fact results.
(ns midje.emission.t-api (:require [midje.sweet :refer :all] [midje.test-util :refer :all] [midje.emission.api :as emit] [midje.emission.levels :as levels] [midje.emission.state :as state] [midje.emission.plugins.test-support :as plugin] [midje.c...
92118d66d420330f8a4becca9a10f565ff953585358dbb562ce04bde916ecb71
ocaml/odoc
test_2.ml
* { { ! Test.example } Should resolve to the first label } let x = 1
null
https://raw.githubusercontent.com/ocaml/odoc/59589e11c45c072df1e9c122aba2714d552970f4/test/xref2/labels/ambiguous_label.t/test_2.ml
ocaml
* { { ! Test.example } Should resolve to the first label } let x = 1
caeb39c46a7996f1a47d4ec98fd8f2ec3e63325d5bacd7b43ab653cd425caaea
diku-dk/futhark
GenericC.hs
# LANGUAGE QuasiQuotes # -- | C code generation for whole programs, built on " . CodeGen . Backends . GenericC.Monad " . Most of this module is -- concerned with constructing the C API. module Futhark.CodeGen.Backends.GenericC ( compileProg, compileProg', defaultOperations, CParts (..), asLibrar...
null
https://raw.githubusercontent.com/diku-dk/futhark/1fe93634d63df6005116f55f18e8a35b1a11987a/src/Futhark/CodeGen/Backends/GenericC.hs
haskell
| C code generation for whole programs, built on concerned with constructing the C API. | A set of operations that fail for every operation involving non-default memory spaces. Uses plain pointers and @malloc@ for memory management. Unreferencing a memory block consists of decreasing its reference count and fre...
# LANGUAGE QuasiQuotes # " . CodeGen . Backends . GenericC.Monad " . Most of this module is module Futhark.CodeGen.Backends.GenericC ( compileProg, compileProg', defaultOperations, CParts (..), asLibrary, asExecutable, asServer, module Futhark.CodeGen.Backends.GenericC.Monad, mod...
19ad9d903aece715dcb1d7fa6bf504e4d32aa345d67a51eefac411e9b4f62d8c
jeromesimeon/Galax
xquery_core_ast_annotation.mli
(***********************************************************************) (* *) (* GALAX *) (* XQuery Engine *) (* ...
null
https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/ast/xquery_core_ast_annotation.mli
ocaml
********************************************************************* GALAX XQuery Engine ...
Copyright 2001 - 2007 . Module : Xquery_core_ast_annotation Description : This module contains support for XQuery Core AST annotations . Description: This module contains support for XQuery Core AST annotations. *) Semantics notes : ...
ec73fb1af5313f7167eb5e6af1af9ee40ead0e932c412c64249126ca92764745
glguy/generic-traverse
Shape.hs
# LANGUAGE KindSignatures # {-# LANGUAGE GADTs #-} module Boggle.Shape where data Shape :: (* -> *) -> * -> * where Map :: (a -> b) -> Shape f a -> Shape f b Ap :: Shape f (a -> b) -> Shape f a -> Shape f b Pure :: a -> Shape f a Lift :: f a -> Shape f a instance Functor (Shape f) where fmap = Map instanc...
null
https://raw.githubusercontent.com/glguy/generic-traverse/1a878ec22e6a0c8626e03b4c29999779f6bc5ea1/src/Boggle/Shape.hs
haskell
# LANGUAGE GADTs #
# LANGUAGE KindSignatures # module Boggle.Shape where data Shape :: (* -> *) -> * -> * where Map :: (a -> b) -> Shape f a -> Shape f b Ap :: Shape f (a -> b) -> Shape f a -> Shape f b Pure :: a -> Shape f a Lift :: f a -> Shape f a instance Functor (Shape f) where fmap = Map instance Applicative (Shape f)...
acdd26cd08f95ffc8d7273f35fa1d6baec26c758f2a8a03023c50b2ec6d59e31
geophf/1HaskellADay
Solution.hs
module Y2021.M04.D26.Solution where - Remember when everybody was fighting ? HUWAAA ! Well , since today is my BIRTHDAY ! YAAAAAAA ! Let 's convert typed values to TLAs and TLAs back to typed values . " What 's a TLA ? " you ask . " Ah ! " I reply : " You do n't work in the Gubmint , I see ... an...
null
https://raw.githubusercontent.com/geophf/1HaskellADay/4d9d46d3952554165c3273841bc452a895b46a9f/exercises/HAD/Y2021/M04/D26/Solution.hs
haskell
} } ----------------------------------------------------- } }
module Y2021.M04.D26.Solution where - Remember when everybody was fighting ? HUWAAA ! Well , since today is my BIRTHDAY ! YAAAAAAA ! Let 's convert typed values to TLAs and TLAs back to typed values . " What 's a TLA ? " you ask . " Ah ! " I reply : " You do n't work in the Gubmint , I see ... an...
b4828d9c3c65902eb716d47aa02654c65de2236338f6005a70b45819351c85e0
nklein/draw
style.lisp
(in-package #:draw-pdf) (defmethod %set-line-width ((renderer pdf-renderer) width) (pdf:set-line-width width)) (defmethod %set-rgb-stroke ((renderer pdf-renderer) r g b) (pdf:set-rgb-stroke r g b)) (defmethod %set-rgb-fill ((renderer pdf-renderer) r g b) (pdf:set-rgb-fill r g b))
null
https://raw.githubusercontent.com/nklein/draw/2b7a51fa06c81a46dffc439a35b3b0ac18c94893/src/pdf/style.lisp
lisp
(in-package #:draw-pdf) (defmethod %set-line-width ((renderer pdf-renderer) width) (pdf:set-line-width width)) (defmethod %set-rgb-stroke ((renderer pdf-renderer) r g b) (pdf:set-rgb-stroke r g b)) (defmethod %set-rgb-fill ((renderer pdf-renderer) r g b) (pdf:set-rgb-fill r g b))
3330272c572ead096d5aba3f9c04544635b422de63b73af0c9ad780968f11622
eugeneia/athens
function-definition.lisp
(in-package #:parenscript) (in-readtable :parenscript) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; lambda lists (defun parse-key-spec (key-spec) "parses an &key parameter. Returns 5 values: var, init-form, keyword-name, supplied-p-var, init-form-supplied-p. Syntax of key spec: [&key {var | ({var | (ke...
null
https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/Parenscript-2.6/src/function-definition.lisp
lisp
lambda lists optionals are of form (var default-value) common no need for a block at the end of a function body this might be broken when it comes to let-renaming lambda named functions the function definitions need to be compiled with previous lexical bindings the flet body needs to be compiled with the ...
(in-package #:parenscript) (in-readtable :parenscript) (defun parse-key-spec (key-spec) "parses an &key parameter. Returns 5 values: var, init-form, keyword-name, supplied-p-var, init-form-supplied-p. Syntax of key spec: [&key {var | ({var | (keyword-name var)} [init-form [supplied-p-parameter]])}* " (let* ((v...
a172e38567285890225b97bc717da772944b052b223b521dc4542ba9974c8b1d
chr15m/c64core
common.cljs
(ns common (:require ["keyv$default" :as Keyv] ["path" :refer [basename]])) (defn env [k & [default]] (or (aget js/process.env k) default)) (def database-url (env "DATABASE" "sqlite")) (defn kv [kv-ns] (Keyv. database-url (clj->js {:namespace kv-ns}))) (defn client [] (-> (Keyv. database-url...
null
https://raw.githubusercontent.com/chr15m/c64core/f2763edb040ca59e3a388e47405e240273142099/common.cljs
clojure
(ns common (:require ["keyv$default" :as Keyv] ["path" :refer [basename]])) (defn env [k & [default]] (or (aget js/process.env k) default)) (def database-url (env "DATABASE" "sqlite")) (defn kv [kv-ns] (Keyv. database-url (clj->js {:namespace kv-ns}))) (defn client [] (-> (Keyv. database-url...
b9f69b4be589d594751c9212f0bfdf7014e4e1cdf0c99fa4e58cc3c37b7c1a08
Frama-C/Frama-C-snapshot
expr_to_term.ml
open Cil_types let emitter = Emitter.(create "Test" [Funspec] ~correctness:[] ~tuning:[]) let check_expr_term check fct s e = let exp = match s.skind with | Instr (Set (lv,_,loc)) -> Cil.new_exp ~loc (Lval lv) | _ -> Kernel.fatal "Unexpected statement %a" Printer.pp_stmt s in let term = matc...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/tests/spec/expr_to_term.ml
ocaml
A bit fragile, but should do the trick as long as the test itself does not get too complicated (regarding the C code at least).
open Cil_types let emitter = Emitter.(create "Test" [Funspec] ~correctness:[] ~tuning:[]) let check_expr_term check fct s e = let exp = match s.skind with | Instr (Set (lv,_,loc)) -> Cil.new_exp ~loc (Lval lv) | _ -> Kernel.fatal "Unexpected statement %a" Printer.pp_stmt s in let term = matc...
be9aacfdca0c7d57b150c3eca997e398f6881d0d11a01b0897f8d4722dc54642
subttle/regular
NEF.hs
# LANGUAGE FlexibleInstances # # LANGUAGE TypeOperators # module NEF where import Data.Functor.Contravariant (Contravariant (..), Op (..)) import Data.List (genericDrop) import Data.List.NonEmpty as NE (NonEmpty (..)) import Numeric.Natural.Unicode (ℕ) import ...
null
https://raw.githubusercontent.com/subttle/regular/1a9e71cb1c43cb3215b9331efa98d4dcf21fbf9c/src/NEF.hs
haskell
FIMXE `asNE = wit :| genericDrop (1 ∷ ℕ) asList` asNE = 0 :| [] >>> asNE @ (Maybe Void) Nothing :| [] FIXME FIXME
# LANGUAGE FlexibleInstances # # LANGUAGE TypeOperators # module NEF where import Data.Functor.Contravariant (Contravariant (..), Op (..)) import Data.List (genericDrop) import Data.List.NonEmpty as NE (NonEmpty (..)) import Numeric.Natural.Unicode (ℕ) import ...
bedd3b9f430d51488f9790bfcc5f779e8c29bb8d6e5ac670839845ed75867c3d
manifest/pal
pal_authentication.erl
%% ---------------------------------------------------------------------------- %% The MIT License %% Copyright ( c ) 2014 - 2015 < > %% %% Permission is hereby granted, free of charge, to any person obtaining a copy %% of this software and associated documentation files (the "Software"), to deal in the Software...
null
https://raw.githubusercontent.com/manifest/pal/07711ca02635895af78be5105c7fa7c9bbd4e896/src/pal_authentication.erl
erlang
---------------------------------------------------------------------------- The MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to rights to use, copy, modify, merge, publish, distribute, sublicense, a...
Copyright ( c ) 2014 - 2015 < > deal in the Software without restriction , including without limitation the sell copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EX...
641c951a06918b74a859a7d493e60f6548c8d87c60bb3096ef58ea194a068322
palletops/leaven
profiles.clj
{:provided {:dependencies [[org.clojure/clojure "1.6.0"] [org.clojure/clojurescript "0.0-3211"] [com.stuartsierra/component "0.2.2"]]} :cljs-test {:cljx {:builds ;; Using :replace and repeating the src paths, as ;; otherwis...
null
https://raw.githubusercontent.com/palletops/leaven/532ea843664b2a0e91c913b2bd144f3e552a7231/profiles.clj
clojure
Using :replace and repeating the src paths, as otherwise test paths get generated multiple times. "node-tests" ["node" "runners/runner-none-node.js" "target/unit-test-node" "target/unit-test-node.js"] {:id "test-node" :source-paths ["target/generated/src/clj" "targ...
{:provided {:dependencies [[org.clojure/clojure "1.6.0"] [org.clojure/clojurescript "0.0-3211"] [com.stuartsierra/component "0.2.2"]]} :cljs-test {:cljx {:builds ^:replace [{:source-paths ["src/cljx"] :output-pa...
8dae2e046303cdc1a80c7af04c870b3e55a4d87c7318093b60b7d0793e1a47aa
akabe/ocaml-numerical-analysis
wav.ml
* wav.mli , wav.ml --- A lightweight WAV reader / writer [ MIT License ] Copyright ( C ) 2015 [MIT License] Copyright (C) 2015 Akinori ABE *) open Format WAVE ( linear PCM ) data format + -----+-------+---------------------------------------------+ | pos | bytes | Meaning ...
null
https://raw.githubusercontent.com/akabe/ocaml-numerical-analysis/7dfe3b17d675fb73406a8e11ec0000b3489c5df5/wav/wav.ml
ocaml
#bytes of DATA chunk #bytes of FMT chunk format ID (linear PCM) #channels sampling rate data speed block size DATA chunk #bytes of DATA chunk
* wav.mli , wav.ml --- A lightweight WAV reader / writer [ MIT License ] Copyright ( C ) 2015 [MIT License] Copyright (C) 2015 Akinori ABE *) open Format WAVE ( linear PCM ) data format + -----+-------+---------------------------------------------+ | pos | bytes | Meaning ...
6f1705a4d3d32dfa49342d661191f787293091689dade359dbefa302354c104e
mitchellwrosen/planet-mitchell
Base.hs
module Alg.Monad.Base ( MonadBase(..) ) where import Control.Monad.Base (MonadBase(..))
null
https://raw.githubusercontent.com/mitchellwrosen/planet-mitchell/18dd83204e70fffcd23fe12dd3a80f70b7fa409b/planet-mitchell/src/Alg/Monad/Base.hs
haskell
module Alg.Monad.Base ( MonadBase(..) ) where import Control.Monad.Base (MonadBase(..))
7be79f654c162be561df9129c8734d3a991e70c3c74ac47a0c3027724dc75d79
ocsigen/eliom
eliom_common.client.ml
Ocsigen * * Copyright ( C ) 2010 * * 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 exception ; * either version 2.1 of the License , or ( at your ...
null
https://raw.githubusercontent.com/ocsigen/eliom/c3e0eea5bef02e0af3942b6d27585add95d01d6c/src/lib/eliom_common.client.ml
ocaml
Ocsigen * * Copyright ( C ) 2010 * * 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 exception ; * either version 2.1 of the License , or ( at your ...
5477eaf5920c3e989476cd1ead69603a4c2e1514eae8424f0e4a47b8a05ba3d6
gfngfn/otfed
decodeKern.ml
open Basic open Value open DecodeBasic include GeneralTable(struct type t = unit end) let get (src : source) : (t option) ok = let open ResultMonad in let common = get_common_source src in match DecodeOperation.seek_table common.table_directory Tag.table_kern with | None -> return None | Some((off...
null
https://raw.githubusercontent.com/gfngfn/otfed/aa2624d29f2fea934c65308816fb6788f3bd818a/src/decodeKern.ml
ocaml
open Basic open Value open DecodeBasic include GeneralTable(struct type t = unit end) let get (src : source) : (t option) ok = let open ResultMonad in let common = get_common_source src in match DecodeOperation.seek_table common.table_directory Tag.table_kern with | None -> return None | Some((off...
27a1feb141060827b0853a86a3acec5b02ce508a05b1a2818cb7dc4fd35c0a59
kazu-yamamoto/SKI
Exp.hs
module Exp where data Exp = S | K | Var Char | Exp :. Exp deriving Eq infixl 6 :. instance Show Exp where show S = "S" show K = "K" show (Var c) = [c] show (x :. y) = "(" ++ show x ++ show y ++ ")"
null
https://raw.githubusercontent.com/kazu-yamamoto/SKI/a4dabc81d7f24dd490903cf8d195d14a4e8efbd7/Exp.hs
haskell
module Exp where data Exp = S | K | Var Char | Exp :. Exp deriving Eq infixl 6 :. instance Show Exp where show S = "S" show K = "K" show (Var c) = [c] show (x :. y) = "(" ++ show x ++ show y ++ ")"