_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
0da0d952401f9d6a77743a8e295d7636344bd83be3ea06437c429c6f833d35c1
donaldsonjw/bigloo
ident.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / comptime / Ast / ident.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Ast/ident.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * The identifier managment */ *===========================...
* serrano / prgm / project / bigloo / comptime / Ast / ident.scm * / * Author : * / * Creation : Mon Jun 3 09:33:09 1996 * / * Last change : Thu Nov 3 16:47:56 2011 ( serrano ) * / (module...
a43addd0beedefc2417747545fd128d94ff3e9a651713da064c72d9a1ae2c604
nuprl/gradual-typing-performance
render.rkt
#lang racket/base (require "core.rkt" "base-render.rkt" "xref.rkt" racket/file racket/class racket/contract/base (prefix-in html: "html-render.rkt")) (provide/contract [render (((listof part?) (listof path-string?)) (#:render-mixin ...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/scribble-lib/scribble/render.rkt
racket
#lang racket/base (require "core.rkt" "base-render.rkt" "xref.rkt" racket/file racket/class racket/contract/base (prefix-in html: "html-render.rkt")) (provide/contract [render (((listof part?) (listof path-string?)) (#:render-mixin ...
d98564b5c754eebb7225625cd784c3014163b90ad0fc04df4bd6d2d338c782cb
FlowForwarding/lincx
linc_us4_groups.erl
%%------------------------------------------------------------------------------ Copyright 2012 FlowForwarding.org %% 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/FlowForwarding/lincx/7795923b51fa1e680511669f4a27404b2ed1f1dc/apps/linc_us4/src/linc_us4_groups.erl
erlang
------------------------------------------------------------------------------ you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, eithe...
Copyright 2012 FlowForwarding.org Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author Erlang Solutions Ltd. < > 2012 FlowForwarding.org -module(linc_us4_groups). -export([initialize/1, terminate/1, ...
825b766c48f6ded5cc4fe6d976b97d7f8c66c5f58815308917ddbc4856238cde
Twinside/Juicy.Pixels
Saving.hs
# LANGUAGE TypeFamilies # # LANGUAGE CPP # -- | Helper functions to save dynamic images to other file format -- with automatic color space/sample format conversion done automatically. module Codec.Picture.Saving( imageToJpg , imageToPng , imageToGif ...
null
https://raw.githubusercontent.com/Twinside/Juicy.Pixels/ab41b84403699a7f4d290685e690fbaff42ed95f/src/Codec/Picture/Saving.hs
haskell
| Helper functions to save dynamic images to other file format with automatic color space/sample format conversion done automatically. | This function will try to do anything to encode an image of 'decodeImage' for radiance encoding | This function will try to do anything to encode an image of 'decodeImage' for j...
# LANGUAGE TypeFamilies # # LANGUAGE CPP # module Codec.Picture.Saving( imageToJpg , imageToPng , imageToGif , imageToBitmap , imageToTiff , imageToRadiance ,...
60a232f85b0b7d9c292eee05c9caec39ae6737273d6cf4b769959bbd1571065c
Decentralized-Pictures/T4L3NT
seed_repr.mli
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > (* ...
null
https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_alpha/lib_protocol/seed_repr.mli
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETH...
3bc50407f989e0175175733a378550f84634bdc116d61cbfb4696a99cf779a60
kowainik/tomland
List.hs
| Module : Toml . Codec . Combinator . List Copyright : ( c ) 2018 - 2022 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > Stability : Stable Portability : Portable TOML - specific combinators for converting bet...
null
https://raw.githubusercontent.com/kowainik/tomland/561aefdbcf177498c06e6c6fcee2b3fe299b3af6/src/Toml/Codec/Combinator/List.hs
haskell
-----------------------+----------------------------------+-------------------------------------+ -----------------------+----------------------------------+-------------------------------------+ -----------------------+----------------------------------+-------------------------------------+ -----------------------...
| Module : Toml . Codec . Combinator . List Copyright : ( c ) 2018 - 2022 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > Stability : Stable Portability : Portable TOML - specific combinators for converting bet...
770b917e5824088bbd9a0210e0523f6dd9ea8da78c361e2af505cf5cea255cb1
protz/mezzo
testsuite.ml
(*****************************************************************************) (* Mezzo, a programming language based on permissions *) Copyright ( C ) 2011 , 2012 and (* *) (* This program is free softwar...
null
https://raw.githubusercontent.com/protz/mezzo/4e9d917558bd96067437116341b7a6ea02ab9c39/testsuite.ml
ocaml
*************************************************************************** Mezzo, a programming language based on permissions This program is free software: you can redistribute it and/or modify (at your optio...
Copyright ( C ) 2011 , 2012 and it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License module K = KindCheck open Kind open E...
7b47f04135707fd13e1fc208dc8b1a86a51b90582e7ac802540faa89f3bfe6ab
ghcjs/ghcjs-dom
ProgressEvent.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.ProgressEvent (js_newProgressEvent, newProgressEvent, js_getLengthComputable, g...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/ProgressEvent.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.ProgressEvent (js_newProgressEvent, newProgressEvent, js_getLengthComputable, getLengthComputable, js_getLoaded, getLoaded, js_getTotal, getTotal, ProgressEvent(..), gTyp...
195772dfeee29db08a42e09c12dbbf5a20d1e21cf461f76207311d742afc92ac
RutledgePaulV/datalogger
utils_test.clj
(ns datalogger.impl.utils-test (:require [clojure.test :refer :all] [datalogger.impl.utils :refer :all])) (deftest logger->hierarchy-test (is (= ["*"] (logger->hierarchy "*"))) (is (= ["core" "*"] (logger->hierarchy "core"))) (is (= ["core.*" "*"] (logger->hierarchy "core.*"))) (is (= ["a.b.c" "...
null
https://raw.githubusercontent.com/RutledgePaulV/datalogger/200c14fc230b9bc64d6dc0150ad2262d22c154af/test/datalogger/impl/utils_test.clj
clojure
(ns datalogger.impl.utils-test (:require [clojure.test :refer :all] [datalogger.impl.utils :refer :all])) (deftest logger->hierarchy-test (is (= ["*"] (logger->hierarchy "*"))) (is (= ["core" "*"] (logger->hierarchy "core"))) (is (= ["core.*" "*"] (logger->hierarchy "core.*"))) (is (= ["a.b.c" "...
478793dd969765df3ca078c2e758811e0ac87c53c190152304b24d6993009f8c
kuis-isle3sw/IoPLMaterials
pretty.ml
type layout = string type doc = Nil | Line | Text of string | Nest of int * doc | Group of doc | Append of doc * doc let nil = Nil let line = Line let text s = Text s let nest i d = Nest (i, d) let group d = Group d let (<*>) d d' = Append (d, d') (* flatten : doc -> doc *) let rec flatten = funct...
null
https://raw.githubusercontent.com/kuis-isle3sw/IoPLMaterials/fa328e92fdaaf6986394f832ef689689930647cd/misc/miniml-compiler/pretty.ml
ocaml
flatten : doc -> doc layr : (int * doc) list -> doc list layout: layout -> string
type layout = string type doc = Nil | Line | Text of string | Nest of int * doc | Group of doc | Append of doc * doc let nil = Nil let line = Line let text s = Text s let nest i d = Nest (i, d) let group d = Group d let (<*>) d d' = Append (d, d') let rec flatten = function Nil -> Nil | Line...
2fd164a7818c8374fdadcaa8887feb4772919f4503b6873424d61a54a7a9ff16
elaforge/karya
Resample_test.hs
Copyright 2018 -- This program is distributed under the terms of the GNU General Public -- License 3.0, see COPYING or -3.0.txt {-# LANGUAGE DataKinds, KindSignatures #-} module Util.Audio.Resample_test where import qualified Control.Monad.Trans.Resource as Resource import qualified Util.Audio.Audio as Audio impo...
null
https://raw.githubusercontent.com/elaforge/karya/8ea15e6a5fb57e2f15f8c19836751e315f9c09f2/Util/Audio/Resample_test.hs
haskell
This program is distributed under the terms of the GNU General Public License 3.0, see COPYING or -3.0.txt # LANGUAGE DataKinds, KindSignatures # because I don't have a proper package system, to run these from ghci you must pass -lsamplerate sine for pitch accuracy , file for continuity sine for pitch accuracy, ...
Copyright 2018 module Util.Audio.Resample_test where import qualified Control.Monad.Trans.Resource as Resource import qualified Util.Audio.Audio as Audio import qualified Util.Audio.File as File import qualified Util.Audio.Resample as Resample import qualified Util.Segment as Segment import qualified Perform.Rea...
cb977b70f50deb6d0afc0a52e8c4faba0a029044d573ae6e8deef789730902cd
samply/blaze
date_time_spec.clj
(ns blaze.elm.date-time-spec (:require [blaze.anomaly-spec] [blaze.elm.date-time :as date-time] [blaze.fhir.spec.type.system-spec] [clojure.spec.alpha :as s])) (s/fdef date-time/period :args (s/cat :years number? :months number? :millis number?))
null
https://raw.githubusercontent.com/samply/blaze/cbf6431a254f347a704f1abe1de4f4fe8a249ac9/modules/cql/test/blaze/elm/date_time_spec.clj
clojure
(ns blaze.elm.date-time-spec (:require [blaze.anomaly-spec] [blaze.elm.date-time :as date-time] [blaze.fhir.spec.type.system-spec] [clojure.spec.alpha :as s])) (s/fdef date-time/period :args (s/cat :years number? :months number? :millis number?))
3147d8db7f295c838a21928b5e6516b52e3f0edadf7212b657819febf800f336
penpot/penpot
perf.cljs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.util.perf "Performance profiling for react components." (:require-macros [app.util.perf]) (:requ...
null
https://raw.githubusercontent.com/penpot/penpot/7303d311d5f23d515fa3fcdc6cd13cf7f429d1fe/frontend/src/app/util/perf.cljs
clojure
Copyright (c) KALEIDOS INC For use it, just wrap the component you want to profile with `perf/profiler` component and pass a label for debug purpose. Example: [:& perf/profiler {:label "viewport"} [:section [:& some-component]]] This will catch all renders and print to the console the percentiles of ren...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.util.perf "Performance profiling for react components." (:require-macros [app.util.perf]) (:require [app.common.math :as mth] ...
115694bb8183a580561a6852bdaead7f45c27234f2289eb1ac2d31bcd535bda5
bradparker/servant-beam-realworld-example-app
Extended.hs
module Test.Hspec.Wai.Extended ( module Test.Hspec.Wai , post' , put' , get' , delete' ) where import Data.ByteString (ByteString) import qualified Data.ByteString.Lazy as Lazy import Network.HTTP.Types ( Header , hContentType , methodDelete , methodGet , methodPost , methodPut ) import Netwo...
null
https://raw.githubusercontent.com/bradparker/servant-beam-realworld-example-app/d4a0d79d9dbc7e5b8987b367ac32f99ac3cc20e7/spec/Test/Hspec/Wai/Extended.hs
haskell
module Test.Hspec.Wai.Extended ( module Test.Hspec.Wai , post' , put' , get' , delete' ) where import Data.ByteString (ByteString) import qualified Data.ByteString.Lazy as Lazy import Network.HTTP.Types ( Header , hContentType , methodDelete , methodGet , methodPost , methodPut ) import Netwo...
46d14c9237cec769f499c1a24e13faec738739a791d85184d1297547737644ab
ocaml/ocaml
arch.ml
# 2 "asmcomp/power/arch.ml" (**************************************************************************) (* *) (* OCaml *) (* ...
null
https://raw.githubusercontent.com/ocaml/ocaml/608494f802c836576003f3a6f501db87485fa3cc/asmcomp/power/arch.ml
ocaml
************************************************************************ OCaml ...
# 2 "asmcomp/power/arch.ml" , projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Format let ppc64 = match Config.model with | "ppc" -> false | "p...
a4adbbf36ab3a8e017ad02a988646cc2826faf22a2a2057585eb492973fa55a7
ghc/testsuite
mc18.hs
-- Checks that the types of the old binder and the binder implicitly introduced by grouping are linked # OPTIONS_GHC -XMonadComprehensions -XTransformListComp # module ShouldCompile where import Data.List(inits) foo :: [[[Int]]] foo = [ x | x <- [1..10] , then group using inits , then group using ...
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_compile/mc18.hs
haskell
Checks that the types of the old binder and the binder implicitly introduced by grouping are linked
# OPTIONS_GHC -XMonadComprehensions -XTransformListComp # module ShouldCompile where import Data.List(inits) foo :: [[[Int]]] foo = [ x | x <- [1..10] , then group using inits , then group using inits ]
92fd08614567063631fcc8e30bf7113b8d3122d31ef9698ecf08aec0be4cb3a5
michaelmelanson/cminus-compiler
Semantics.hs
{-# OPTIONS -fglasgow-exts #-} module Compiler.Semantics where import Text.ParserCombinators.Parsec import Data.Either import Compiler.Syntax import Compiler.CompileError import Compiler.SymbolTable import Compiler.TypeChecking.Nameable import Compiler.TypeChecking.Typeable dupeToErro...
null
https://raw.githubusercontent.com/michaelmelanson/cminus-compiler/667d760d74fbb239335f1a5266006cf3baca4959/Compiler/Semantics.hs
haskell
# OPTIONS -fglasgow-exts # |Return statements can't make type errors
module Compiler.Semantics where import Text.ParserCombinators.Parsec import Data.Either import Compiler.Syntax import Compiler.CompileError import Compiler.SymbolTable import Compiler.TypeChecking.Nameable import Compiler.TypeChecking.Typeable dupeToError (old, new) = DupeError old ne...
32f0982fe717356c3dc5a5fd669b1fe5ad74daff1d128dd3ccd0190724420607
samply/blaze
token_spec.clj
(ns blaze.db.impl.search-param.token-spec (:require [blaze.byte-string :refer [byte-string?]] [blaze.byte-string-spec] [blaze.db.impl.index.compartment.search-param-value-resource-spec] [blaze.db.impl.index.search-param-value-resource-spec] [blaze.db.impl.search-param.token :as spt] [clojure.s...
null
https://raw.githubusercontent.com/samply/blaze/e84c106b5ca235600c20ba74fe8a2295eb18f350/modules/db/test/blaze/db/impl/search_param/token_spec.clj
clojure
(ns blaze.db.impl.search-param.token-spec (:require [blaze.byte-string :refer [byte-string?]] [blaze.byte-string-spec] [blaze.db.impl.index.compartment.search-param-value-resource-spec] [blaze.db.impl.index.search-param-value-resource-spec] [blaze.db.impl.search-param.token :as spt] [clojure.s...
0e5eac41d7250296b43911561af16342161dbf623be8cf8c8a95cd2a18058154
racket/compatibility
contract-label.rkt
#lang racket/base (require (for-label racket/contract) scribble/manual) (provide (all-defined-out)) ;; this file establishes the right for-label ;; bindings so that I can link to racket/contract combinators in the mzlib / contract docs (define r:-> (racket ->)) (define r:->* (racket ->*)) (define r:->i (ra...
null
https://raw.githubusercontent.com/racket/compatibility/492030dac6f095045ce8a13dca75204dd5f34e32/compatibility-doc/mzlib/scribblings/contract-label.rkt
racket
this file establishes the right for-label bindings so that I can link to racket/contract
#lang racket/base (require (for-label racket/contract) scribble/manual) (provide (all-defined-out)) combinators in the mzlib / contract docs (define r:-> (racket ->)) (define r:->* (racket ->*)) (define r:->i (racket ->i)) (define r:->d (racket ->d))
40023f4843d00793493ce2571714b33a1adb3991e526ffa9d307487c0b959bd4
ermine/sulci
plugin_admin.ml
* ( c ) 2004 - 2012 * (c) 2004-2012 Anastasia Gornostaeva *) open JID open Common open Hooks open Plugin_command open XMPPClient let msg xmpp env kind jid_from text = try let s = String.index text ' ' in let jid_to = JID.of_string (String.sub text 0 s) in let body = string_after text (s+1) in ...
null
https://raw.githubusercontent.com/ermine/sulci/3ee4bd609b01e2093a6d37bf74579728d0a93b70/src/plugin_admin.ml
ocaml
* ( c ) 2004 - 2012 * (c) 2004-2012 Anastasia Gornostaeva *) open JID open Common open Hooks open Plugin_command open XMPPClient let msg xmpp env kind jid_from text = try let s = String.index text ' ' in let jid_to = JID.of_string (String.sub text 0 s) in let body = string_after text (s+1) in ...
a5df7394e3fd7e8f3c0a2ab5edc8387537ea433751ccb18ba5c053cf8e889c0d
well-typed/cborg
PkgBinary.hs
# OPTIONS_GHC -fno - warn - orphans -fsimpl - tick - factor=500 # module Micro.PkgBinary (serialise, deserialise) where import Micro.Types import Data.Binary as Binary import Data.ByteString.Lazy as BS serialise :: Tree -> BS.ByteString serialise = Binary.encode deserialise :: BS.ByteString -> Tree deserialise = Bin...
null
https://raw.githubusercontent.com/well-typed/cborg/9be3fd5437f9d2ec1df784d5d939efb9a85fd1fb/serialise/bench/micro/Micro/PkgBinary.hs
haskell
# OPTIONS_GHC -fno - warn - orphans -fsimpl - tick - factor=500 # module Micro.PkgBinary (serialise, deserialise) where import Micro.Types import Data.Binary as Binary import Data.ByteString.Lazy as BS serialise :: Tree -> BS.ByteString serialise = Binary.encode deserialise :: BS.ByteString -> Tree deserialise = Bin...
1e71f0e33772d82c98b214f9d1b67531198505fd7d124504a155c858b38f7d74
ocsigen/obrowser
hashtbl.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/ocsigen/obrowser/977c09029ea1e4fde4fb0bf92b4d893835bd9504/rt/caml/hashtbl.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , 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 $ I d : hashtbl.ml 7164 2005 - 10 - 2...
79455a0b7758816702852860470d25541ba8b73f4e627dff4f0d067a49bee1c1
danlentz/dstm-collections
tree-node-mmap.lisp
-*- mode : common - lisp ; common - lisp - style : modern ; coding : utf-8 ; -*- ;;;;; (in-package :mmap) (defcstruct* mmap-tuple (mmap-tuple-x :uint) (mmap-tuple-l :uint) (mmap-tuple-r :uint) (mmap-tuple-k :uint) (mmap-tuple-v :uint)) (defun allocate-mmap-tuple (place &key (k nil) (v nil) (l nil...
null
https://raw.githubusercontent.com/danlentz/dstm-collections/02a67b82b70d3e9393a39c28692efe80bfbe4c2c/tree-node-mmap.lisp
lisp
common - lisp - style : modern ; coding : utf-8 ; -*-
(in-package :mmap) (defcstruct* mmap-tuple (mmap-tuple-x :uint) (mmap-tuple-l :uint) (mmap-tuple-r :uint) (mmap-tuple-k :uint) (mmap-tuple-v :uint)) (defun allocate-mmap-tuple (place &key (k nil) (v nil) (l nil) (r nil) (x 0) &aux tuple-mmptr) (flet ((node-ref (thing) (typecase thing ...
5c930c1ad2cf467058f781546cb50a356c844e8ce7f66504a18395f86426b91d
binsec/haunted
relse_path.ml
open Relse_options module Path = Relse_utils.AddressList module Sym_state = Relse_symbolic.State type 'a status_t = Continue of 'a | Halt let decode vaddress = Disasm_core.decode vaddress |> fst module Spectre = struct type mode = TransientMode | RegularMode (* Non transient execution *) ...
null
https://raw.githubusercontent.com/binsec/haunted/f670f9a02fabc64e08c9f7b091b4a71d205d89a9/src/relse/relse_path.ml
ocaml
Non transient execution Models transient and non transient paths at the same time A speculative path constraint depth at which the pc must be retired path constraint to retire Queue of transient path constraints to retire later. Nothing to retire Maybe retire other conditions Nothing to retire Put re...
open Relse_options module Path = Relse_utils.AddressList module Sym_state = Relse_symbolic.State type 'a status_t = Continue of 'a | Halt let decode vaddress = Disasm_core.decode vaddress |> fst module Spectre = struct type mode = TransientMode | HauntedMode module HauntedSE = struct type...
95e8053568aaf9ffe30412d8bd60f924115e887d279d7231efc85f8f6aa8e61c
mransan/ocaml-protoc
test_util.ml
let time_f f = let t1 = Unix.gettimeofday () in let x = f () in let t2 = Unix.gettimeofday () in t2 -. t1, x let get_binary_file_content file_name = let t, (ic, s) = time_f (fun () -> let ic = open_in_bin file_name in let s = in_channel_length ic in ic, s) in let t', b = time...
null
https://raw.githubusercontent.com/mransan/ocaml-protoc/e43b509b9c4a06e419edba92a0d3f8e26b0a89ba/src/tests/integration-tests/test_util.ml
ocaml
let time_f f = let t1 = Unix.gettimeofday () in let x = f () in let t2 = Unix.gettimeofday () in t2 -. t1, x let get_binary_file_content file_name = let t, (ic, s) = time_f (fun () -> let ic = open_in_bin file_name in let s = in_channel_length ic in ic, s) in let t', b = time...
a12e6d04d716dc2cc1f66fe9575729afef8fd5cc1063b8a4ea5d1b39f5d89dc9
nibbula/yew
errors.lisp
;; ;; ms/errors.lisp - Error handling for Windows ;; (in-package :opsys-ms) (defcfun ("GetLastError" get-last-error) DWORD) (defconstant +FORMAT-MESSAGE-ALLOCATE-BUFFER+ #x00000100) (defconstant +FORMAT-MESSAGE-ARGUMENT-ARRAY+ #x00002000) (defconstant +FORMAT-MESSAGE-FROM-HMODULE+ #x00000800) (defconstant +FORMA...
null
https://raw.githubusercontent.com/nibbula/yew/e4172647e7f8df116f12009de6f6b5cf53ba7cf8/opsys/ms/errors.lisp
lisp
ms/errors.lisp - Error handling for Windows End
(in-package :opsys-ms) (defcfun ("GetLastError" get-last-error) DWORD) (defconstant +FORMAT-MESSAGE-ALLOCATE-BUFFER+ #x00000100) (defconstant +FORMAT-MESSAGE-ARGUMENT-ARRAY+ #x00002000) (defconstant +FORMAT-MESSAGE-FROM-HMODULE+ #x00000800) (defconstant +FORMAT-MESSAGE-FROM-STRING+ #x00000400) (defconstant +...
560725efdaec886b2cc97d4bc630eaf1c87aa8fc3154e1f3ffb99cfd3d9dcd32
B-Lang-org/bsc
CParser.hs
# LANGUAGE CPP # #if defined(__GLASGOW_HASKELL__) && (__GLASGOW_HASKELL__ > 800) {-# OPTIONS_GHC -O0 #-} #endif module Parser.Classic.CParser(pPackage, pDefnsAndEOF, errSyntax) where import Data.List(nub) import Parse import IntLit import FStringCompat import PreStrings(fsBar, fsStar, fsHash, fsDollar, fsLT, fsLTGT, ...
null
https://raw.githubusercontent.com/B-Lang-org/bsc/93be312c41ad82edb0a004dadb7fbf231bb4de4d/src/comp/Parser/Classic/CParser.hs
haskell
# OPTIONS_GHC -O0 # import Debug.Trace XXX >>>>>>>> , XXX cannot exclude packages or constructor fields The following could be atomic blocks that can be regarded as atomic XXX the user does not specify the ruleBetweenMethods info, etc. ME (not supported) P (not supported) XXX maybe it should be expX propag...
# LANGUAGE CPP # #if defined(__GLASGOW_HASKELL__) && (__GLASGOW_HASKELL__ > 800) #endif module Parser.Classic.CParser(pPackage, pDefnsAndEOF, errSyntax) where import Data.List(nub) import Parse import IntLit import FStringCompat import PreStrings(fsBar, fsStar, fsHash, fsDollar, fsLT, fsLTGT, fsLsh, fsNoinline, ...
1b7b5a1fbe6704ce584df771446c999d051d013eb62a54c307e2f5ca0062a3a6
ekmett/semigroupoids
Bifoldable.hs
{-# LANGUAGE Safe #-} ----------------------------------------------------------------------------- -- | Copyright : ( C ) 2011 - 2015 -- License : BSD-style (see the file LICENSE) -- Maintainer : < > -- Stability : provisional -- Portability : portable -- ------------------------------------...
null
https://raw.githubusercontent.com/ekmett/semigroupoids/f63f7a2d696fdd6ed72eea90798fca1f86d6d040/src/Data/Semigroup/Bifoldable.hs
haskell
# LANGUAGE Safe # --------------------------------------------------------------------------- | License : BSD-style (see the file LICENSE) Stability : provisional Portability : portable -------------------------------------------------------------------------- # INLINE (<>) # # INLINE (<$) # # INLINE bit...
Copyright : ( C ) 2011 - 2015 Maintainer : < > module Data.Semigroup.Bifoldable ( Bifoldable1(..) , bitraverse1_ , bifor1_ , bisequenceA1_ , bifoldMapDefault1 ) where import Control.Applicative import Data.Bifoldable import Data.Functor.Apply import Data.Semigroup import Data.Semigroup.Fo...
15ee6b4d95c01cbf9a607bbb355fae88355c3e168d1d83db1e552ea810ec7b8d
fbeline/fsm-clj
parser.clj
(ns fsm-clj.parser (:require [clojure.spec.alpha :as s])) (s/def ::action (s/cat :_ #{'action} :handler any?)) (s/def ::guard (s/cat :_ #{'guard} :handler any?)) (s/def ::transition (s/cat :state keyword? :_-> #{'->} :target keyword? :_when #{'when} :event keyword? ...
null
https://raw.githubusercontent.com/fbeline/fsm-clj/910af75972320fd20f57c8310140138eec5605e7/src/fsm_clj/parser.clj
clojure
(ns fsm-clj.parser (:require [clojure.spec.alpha :as s])) (s/def ::action (s/cat :_ #{'action} :handler any?)) (s/def ::guard (s/cat :_ #{'guard} :handler any?)) (s/def ::transition (s/cat :state keyword? :_-> #{'->} :target keyword? :_when #{'when} :event keyword? ...
32f386cbb59520fca92118faaa6d5ce93e42543034ddc1df693bdf68d562ee4a
thoughtbot/FOMObot
Main.hs
import System.IO (hSetBuffering, stdout, BufferMode(..)) import FOMObot.App (initApp) main :: IO () main = do hSetBuffering stdout LineBuffering initApp
null
https://raw.githubusercontent.com/thoughtbot/FOMObot/ee90c582e30fcc485de1033f2fbbfa6465ed2ab9/src/Main.hs
haskell
import System.IO (hSetBuffering, stdout, BufferMode(..)) import FOMObot.App (initApp) main :: IO () main = do hSetBuffering stdout LineBuffering initApp
cbcea36c8def707d99dabb532b80ca4bb83b2a904638569462f7a7f535531717
scotty-web/scotty-starter
CSS.hs
{-# LANGUAGE OverloadedStrings #-} module Client.CSS ( layoutCss ) where import Clay import Data.Text.Lazy (Text) layoutCss :: Text layoutCss = render $ do body ? minHeight (px 2000) element ".jumbotron" ? (textAlign $ alignSide sideCenter) element "#gmail" ? (marginLeft $ px 10) ...
null
https://raw.githubusercontent.com/scotty-web/scotty-starter/c51c72f5e69e13942faef6f223fad1a38cf25710/Client/CSS.hs
haskell
# LANGUAGE OverloadedStrings #
module Client.CSS ( layoutCss ) where import Clay import Data.Text.Lazy (Text) layoutCss :: Text layoutCss = render $ do body ? minHeight (px 2000) element ".jumbotron" ? (textAlign $ alignSide sideCenter) element "#gmail" ? (marginLeft $ px 10)
aad8795133c65bfe4677cc5a0aa51847ada91409251e19221a3c3d3f1aa565c8
jakemcc/sicp-study
ex3_59.clj
Exercise 3.59 (ns ex3-59) ; Part A (defn integrate-series [s] ((fn iter [strm n] (lazy-seq (when-let [s (seq strm)] (cons (/ (first s) n) (iter (rest s) (inc n)))))) s 1)) ; Part b (def exp-series (lazy-seq (cons 1 (integrate-series exp-series))...
null
https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section3.5/src/ex3_59.clj
clojure
Part A Part b
Exercise 3.59 (ns ex3-59) (defn integrate-series [s] ((fn iter [strm n] (lazy-seq (when-let [s (seq strm)] (cons (/ (first s) n) (iter (rest s) (inc n)))))) s 1)) (def exp-series (lazy-seq (cons 1 (integrate-series exp-series)))) (declare sine-...
444c0266581b79ef5dce924e9ade18fae4aa6276a5f6cda19dff172bf9ad2a36
psg-mit/twist-popl22
sim_dmat.mli
type state type qubit = int val with_state : (state -> unit) -> float val qinit : state -> qubit val unitary1 : state -> Qpp.Gate.t -> qubit -> unit val unitary2 : state -> Qpp.Gate.t -> qubit * qubit -> unit val unitary3 : state -> Qpp.Gate.t -> qubit * qubit * qubit -> unit val measure : state -> qubit -> (state -> ...
null
https://raw.githubusercontent.com/psg-mit/twist-popl22/fa495479ff021fb8793ae20d8cf786ed048f503d/src/sim_dmat.mli
ocaml
type state type qubit = int val with_state : (state -> unit) -> float val qinit : state -> qubit val unitary1 : state -> Qpp.Gate.t -> qubit -> unit val unitary2 : state -> Qpp.Gate.t -> qubit * qubit -> unit val unitary3 : state -> Qpp.Gate.t -> qubit * qubit * qubit -> unit val measure : state -> qubit -> (state -> ...
38f4db891c49c6bbea971b6167222e4158879f10e13da6f35f2eb0ecc4d57e91
c-cube/trustee
trustee_lsp.ml
module Log = (val Logs.src_log @@ Logs.Src.create "lsp") module TC = Trustee_core module TS = Trustee_syntax module ITP = Trustee_itp module K = TC.Kernel module PA = Trustee_syntax.Parse_ast module TA = Trustee_syntax.Type_ast module Linol = Linol.Make(Linol.Blocking_IO) module Position = Linol.Position module Ran...
null
https://raw.githubusercontent.com/c-cube/trustee/8ae3d777f55ef2b499b43c0b26e5fde1f2ea7761/src/lsp/trustee_lsp.ml
ocaml
gone far enough TODO: use penv/env from dependencies, if any, once we have import TODO: collect show/eval results save results of analysing buffer ## requests ## find token under the cursor, if any TODO: handle meta variables let lbl, kind = match c with | TA.Ty_env.N_...
module Log = (val Logs.src_log @@ Logs.Src.create "lsp") module TC = Trustee_core module TS = Trustee_syntax module ITP = Trustee_itp module K = TC.Kernel module PA = Trustee_syntax.Parse_ast module TA = Trustee_syntax.Type_ast module Linol = Linol.Make(Linol.Blocking_IO) module Position = Linol.Position module Ran...
5cdf9fd6a0697d6067c6a9b4378ed7127a5aa0014e18b49c73d41a14b538239c
susam/susam.net
meets.lisp
((:date "2021-03-05 15:30" :slug "iant" :topic "Sections 1.1-1.3; Pages 13-16; Principle of Induction; Divisibility" :duration 40 :members 4) (:date "2021-03-06 10:00" :slug "iant" :topic "Section 1.1; Page 13; Principle of induction (Recap)" :duration 40 :members 5) (:date "2021-03-07 10:00" :slug ...
null
https://raw.githubusercontent.com/susam/susam.net/637bd3cd25460e668380a7743a4f54605b0c8fc3/content/maze/meets.lisp
lisp
((:date "2021-03-05 15:30" :slug "iant" :topic "Sections 1.1-1.3; Pages 13-16; Principle of Induction; Divisibility" :duration 40 :members 4) (:date "2021-03-06 10:00" :slug "iant" :topic "Section 1.1; Page 13; Principle of induction (Recap)" :duration 40 :members 5) (:date "2021-03-07 10:00" :slug ...
b329184f25623130c5b42b7decc5bdbfb81114f9687ea21fc8325fa56aaa1e86
aantron/dream
sql.eml.ml
module type DB = Caqti_lwt.CONNECTION module T = Caqti_type let list_comments = let query = let open Caqti_request.Infix in (T.unit ->* T.(tup2 int string)) "SELECT id, text FROM comment" in fun (module Db : DB) -> let%lwt comments_or_error = Db.collect_list query () in Caqti_lwt.or_fail commen...
null
https://raw.githubusercontent.com/aantron/dream/3c73508c5553b9bc470e563822e53494925b42e1/example/h-sql/sql.eml.ml
ocaml
module type DB = Caqti_lwt.CONNECTION module T = Caqti_type let list_comments = let query = let open Caqti_request.Infix in (T.unit ->* T.(tup2 int string)) "SELECT id, text FROM comment" in fun (module Db : DB) -> let%lwt comments_or_error = Db.collect_list query () in Caqti_lwt.or_fail commen...
069109d682ccf4a6524f3ed8812ca82db544b6a92e7b57f61782e2217ad1c60b
HunterYIboHu/htdp2-solution
ex11-in-number.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-beginner-reader.ss" "lang")((modname in-number) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe...
null
https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter1/Section1/ex11-in-number.rkt
racket
about the language level of this file in a form that our tools can easily process. 常量 函数 测试
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname in-number) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t write mixed-fraction #f #t none #f ((...
17e3d72be7c22afa6d2fa6b5808085e7ad8c08cea65fdb4da4c05c1bfeb352d2
ktakashi/sagittarius-scheme
ciphers.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; ;;; sagittarius/crypto/ciphers.scm - Ciphers ;;; Copyright ( c ) 2022 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1. Re...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/629ced3dc08fd1f8d97e58321d1f4130b8b5dc81/ext/crypto/sagittarius/crypto/ciphers.scm
scheme
coding : utf-8 ; -*- sagittarius/crypto/ciphers.scm - Ciphers Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list...
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) ...
85b4b17ee99575941e4a099375587672a3442b0b773d117894b07e5b2e158008
bos/rwh
Style.hs
{-- snippet goodLet --} tidyLet = let foo = undefined bar = foo * 2 in undefined {-- /snippet goodLet --} {-- snippet badLet --} weirdLet = let foo = undefined bar = foo * 2 in undefined strangeLet = let foo = undefined bar = foo * 2 in undefined {-- /sn...
null
https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch10/Style.hs
haskell
- snippet goodLet - - /snippet goodLet - - snippet badLet - - /snippet badLet - - snippet punctuation - - /snippet punctuation - - snippet do - not seen very often - /snippet do - - snippet indent - - /snippet indent - - snippet where - legal, but ugly and hard to read - /snippet where -
tidyLet = let foo = undefined bar = foo * 2 in undefined weirdLet = let foo = undefined bar = foo * 2 in undefined strangeLet = let foo = undefined bar = foo * 2 in undefined unusualPunctuation = [ (x,y) | x <- [1..a], y <- [1..b] ] where { ...
4b53623b5d3a628be87461fe8b9ef7abd3f896494b7115c68c687cc93a8aad0d
ucsd-progsys/nate
ocaml299to3.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , Kyoto...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/tools/ocaml299to3.ml
ocaml
********************************************************************* Objective Caml ...
, Kyoto University RIMS Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ I d : , v 1.6 2001/10/03 01:34:05 garri...
2853f5cc43de0361088d885697e5993a3cdf98e306c918a0538506b9c1274ae5
cram2/cram
matrix-add.lisp
Regression test MATRIX - ADD for GSLL , automatically generated ;; Copyright 2009 , 2011 , 2014 Distributed under the terms of the GNU General Public License ;; ;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the F...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/tests/matrix-add.lisp
lisp
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Publi...
Regression test MATRIX - ADD for GSLL , automatically generated Copyright 2009 , 2011 , 2014 Distributed under the terms of the GNU General Public License it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should ha...
1c14a14e51da1d7631d0802406c9cf986e41a9ed8af28bd2f934c304e4338de8
ulisses/Static-Code-Analyzer
ParserMonad.hs
----------------------------------------------------------------------------- -- | -- Module : Language.C.Syntax.ParserMonad Copyright : ( c ) [ 1999 .. 2004 ] ( c ) 2005 - 2007 -- License : BSD-style -- Maintainer : -- Portability : portable -- Monad for the C lexer and p...
null
https://raw.githubusercontent.com/ulisses/Static-Code-Analyzer/4c3f6423d43e1bccb9d1cf04e74ae60d9170186f/Analyzer/language-c-0.3.2.1/src/Language/C/Parser/ParserMonad.hs
haskell
--------------------------------------------------------------------------- | Module : Language.C.Syntax.ParserMonad License : BSD-style Maintainer : Portability : portable dictated by that, eg having to be able to remember the last token. The monad also provides a unique name supply (via the...
Copyright : ( c ) [ 1999 .. 2004 ] ( c ) 2005 - 2007 Monad for the C lexer and parser This monad has to be usable with and Happy . Some things in it are module Language.C.Parser.ParserMonad ( P, execParser, failP, : : P : : - > P ( ) ParseError(..), ) where import Lan...
f89b8e62d6d4ef70490916b648bcf0e1985271e4e936083af5e39c806d074b2d
CloudI/CloudI
proper_target.erl
-*- coding : utf-8 -*- -*- erlang - indent - level : 2 -*- %%% ------------------------------------------------------------------- Copyright ( c ) 2017 - 2021 < > and < > %%% This file is part of PropEr . %%% %%% PropEr is free software: you can redistribute it and/or modify it und...
null
https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/proper/src/proper_target.erl
erlang
------------------------------------------------------------------- PropEr is free software: you can redistribute it and/or modify (at your option) any later version. PropEr is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITN...
-*- coding : utf-8 -*- -*- erlang - indent - level : 2 -*- Copyright ( c ) 2017 - 2021 < > and < > This file is part of PropEr . it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should h...
6f043a5d739c2deaf819327fb9eadf0a4191d26456d92a5e6c047e32a0e7cb19
cl-axon/cl-aima
infix.lisp
;;;-*- Mode: Lisp; -*- ;;;; Prefix to Infix Conversion (defparameter *infix-ops* '((([ list match ]) ({ elts match }) (|(| nil match |)|)) ((*) (/)) ((+) (-)) ((<) (>) (<=) (>=) (=) (/=)) ((not not unary) (~ not unary)) ((and) (& and) (^ and)) ((or) (\| or)) ((=>)) ((<=>)) ((|,...
null
https://raw.githubusercontent.com/cl-axon/cl-aima/1e6915fa9f3e5f2c6fd75952d674ebec53558d04/logic/algorithms/infix.lisp
lisp
-*- Mode: Lisp; -*- Prefix to Infix Conversion each one is in prefix notation . (a + b * c) => (a + (* b c)) => ((+ a (* b c))) Note we don't worry about nested parens because we search :from-end handle {a,b} or [a,b] {set} handle f(a,b) handle (a + b) Tokenization: convert a string to a sequence of tokens
(defparameter *infix-ops* '((([ list match ]) ({ elts match }) (|(| nil match |)|)) ((*) (/)) ((+) (-)) ((<) (>) (<=) (>=) (=) (/=)) ((not not unary) (~ not unary)) ((and) (& and) (^ and)) ((or) (\| or)) ((=>)) ((<=>)) ((|,|))) "A list of lists of operators, highest precedence...
77dd03f78bcce0b0f49430a2f56ea2d8231301962ef42dc560226450511c684c
Kappa-Dev/KappaTools
dynamicArray.ml
(******************************************************************************) (* _ __ * The Kappa Language *) | |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF (* | ' / ********************************************************************...
null
https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/dataStructures/dynamicArray.ml
ocaml
**************************************************************************** _ __ * The Kappa Language | ' / ******************************************************************** | . \ * This file is distributed under the terms of the |_|\_\ * GN...
| |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF module DynArray = (functor (G:GenArray.GenArray) -> (struct type 'a t = { mutable array: 'a G.t; mutable current_size: int; default: int -> 'a } let create n a = ...
e46d86df0ce4a7517a9f292e4fe7443d6ec4e986c8508e8ee8eea612281f5356
baskeboler/cljs-karaoke-client
mobile.cljs
(ns cljs-karaoke.mobile (:require [mount.core :refer [defstate]] [reagent.core] [re-frame.core :as rf] ["shake.js" :as Shake] [clojure.string :as str] [cljs-karaoke.views.toasty :refer [trigger-toasty]] [cljs-karaoke.events.audio :as audio-events...
null
https://raw.githubusercontent.com/baskeboler/cljs-karaoke-client/bb6512435eaa436d35034886be99213625847ee0/src/main/cljs_karaoke/mobile.cljs
clojure
(init-keybindings!)))
(ns cljs-karaoke.mobile (:require [mount.core :refer [defstate]] [reagent.core] [re-frame.core :as rf] ["shake.js" :as Shake] [clojure.string :as str] [cljs-karaoke.views.toasty :refer [trigger-toasty]] [cljs-karaoke.events.audio :as audio-events...
58d24a1343b44f9870a16f8e11e35c30671d560428bc6d3abe266e0cf887022e
cyverse-archive/DiscoveryEnvironmentBackend
query_params.clj
(ns clojure-commons.query-params (:require [clj-http.util :as http-util] [clojure.string :as string])) (defn assoc-param "Taken from ring.middleware.params. Needed because we need to write a function that uses hidden functions. Associate a key with a value. If the key already exists in the map, ...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/libs/iplant-clojure-commons/src/clojure_commons/query_params.clj
clojure
(ns clojure-commons.query-params (:require [clj-http.util :as http-util] [clojure.string :as string])) (defn assoc-param "Taken from ring.middleware.params. Needed because we need to write a function that uses hidden functions. Associate a key with a value. If the key already exists in the map, ...
18b11c9d39c74fa3a456baaf464a68d8347137b9808383e959937c0fcbe57895
ar-nelson/schemepunk
json.test.scm
(import (scheme base) (schemepunk syntax) (schemepunk json) (schemepunk test)) (test-group "JSON Reader" (test "reads keywords" (assert-equal (string->json "null") 'null) (assert-equal (string->json "true") 'true) (assert-equal (string->json "false") 'false)) (test "reads numbe...
null
https://raw.githubusercontent.com/ar-nelson/schemepunk/e2840d3c445933528aaf0a36ec72b053ec5016ce/tests/json.test.scm
scheme
(import (scheme base) (schemepunk syntax) (schemepunk json) (schemepunk test)) (test-group "JSON Reader" (test "reads keywords" (assert-equal (string->json "null") 'null) (assert-equal (string->json "true") 'true) (assert-equal (string->json "false") 'false)) (test "reads numbe...
9dd8ca08970035bc6a24bcc722c104a52f882a0e90ef88111feeff3e563b4685
blancas/tinypost
test_operator.clj
Copyright ( c ) 2013 . All rights reserved . ;; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( -1.0.php ) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;; ...
null
https://raw.githubusercontent.com/blancas/tinypost/1afc54017e68a488a428cae0c417130b1721610d/src/test/clojure/blancas/tinypost/test_operator.clj
clojure
The use and distribution terms for this software are covered by the which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.
Copyright ( c ) 2013 . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) (ns blancas.tinypost.test-operator (:use [clojure.test] [blancas.tinypost main operator] [midje.sweet :exclude (expect one-of)])) (deftest test-0000 (fact "abs -- absolute value" (run "99 abs") => [99] (run "-99 abs") =...
ef598bce6ad66a00b4799c1fe1e763b6a3f6fce4c965870cb05d5b32ce17d57a
postgres-haskell/postgres-wire
Decoders.hs
module Database.PostgreSQL.Protocol.Codecs.Decoders ( dataRowHeader , getNonNullable , getNullable , FieldDecoder , bool , bytea , char , date , float4 , float8 , int2 , int4 , int8 , interval , bsJsonText , bsJsonBytes , numeric , bsText , ti...
null
https://raw.githubusercontent.com/postgres-haskell/postgres-wire/fda5e3b70c3cc0bab8365b4b872991d50da0348c/src/Database/PostgreSQL/Protocol/Codecs/Decoders.hs
haskell
| Skips length of elements in composite | Skips array header. | Decodes size of each dimension. Primitives | Decodes only a content of the field. # INLINE bsJsonBytes #
module Database.PostgreSQL.Protocol.Codecs.Decoders ( dataRowHeader , getNonNullable , getNullable , FieldDecoder , bool , bytea , char , date , float4 , float8 , int2 , int4 , int8 , interval , bsJsonText , bsJsonBytes , numeric , bsText , ti...
fb75b93821e9cea2e48625ed0791a88f7bf7faf1712af4ff89a7031c4f5fed0b
jasonkuhrt-archive/hpfp-answers
Main.hs
module Main where import Data.Semigroup import Data.Monoid hiding ((<>)) import qualified Monoids import qualified Semigroups
null
https://raw.githubusercontent.com/jasonkuhrt-archive/hpfp-answers/c03ae936f208cfa3ca1eb0e720a5527cebe4c034/chapter-15-monoid-semigroup/Instances/Main.hs
haskell
module Main where import Data.Semigroup import Data.Monoid hiding ((<>)) import qualified Monoids import qualified Semigroups
d8e8df38a888ef6eca51e430371cb9d83feda06aa2fa1c0dec11cab7cee06da1
jixiuf/helloerlang
hello.erl
Use : erlc hello.erl & & erl -pa ./ebin -s hello run -s init stop -noshell -module(hello). -export([bin_to_hex/1]). bin_to_hex(Bin)-> bin_to_hex(Bin,[]). %% erlang:integer_to_list bin_to_hex(<<>>,Value)-> lists:reverse(Value); bin_to_hex(<<I:8,Bin/binary>>,Value)-> Hex=integer_to_list(I,16), NewHex=...
null
https://raw.githubusercontent.com/jixiuf/helloerlang/3960eb4237b026f98edf35d6064539259a816d58/bin_to_hex/src/hello.erl
erlang
erlang:integer_to_list
Use : erlc hello.erl & & erl -pa ./ebin -s hello run -s init stop -noshell -module(hello). -export([bin_to_hex/1]). bin_to_hex(Bin)-> bin_to_hex(Bin,[]). bin_to_hex(<<>>,Value)-> lists:reverse(Value); bin_to_hex(<<I:8,Bin/binary>>,Value)-> Hex=integer_to_list(I,16), NewHex=case length(Hex) of ...
9fb7d170ff1c9320fecb19f97b3fc810e4a68f230b7dc36c553db85cb942373a
jgrodziski/keycloak-clojure
frontend.cljs
(ns keycloak.frontend (:require [taoensso.timbre :as timbre :refer-macros [log debug info error]] ["keycloak-js" :as keycloakjs])) (defn init-and-authenticate "Init keycloak, if authentication succeed callback with 2 args keycloak object and user-info" [keycloak-config callback-success] (info "load...
null
https://raw.githubusercontent.com/jgrodziski/keycloak-clojure/2b71a1d1bf8d053f2e193af699daba3370ab6b2f/src/keycloak/frontend.cljs
clojure
if we succeed to load the user info we dispatch a re-frame event to store the user info in DB and store the token in a "X-Authorization-Token" cookie (debug "token refreshed?" refreshed) update the token in cookies and local storage
(ns keycloak.frontend (:require [taoensso.timbre :as timbre :refer-macros [log debug info error]] ["keycloak-js" :as keycloakjs])) (defn init-and-authenticate "Init keycloak, if authentication succeed callback with 2 args keycloak object and user-info" [keycloak-config callback-success] (info "load...
5d484e78137014cbe85d6b548842606013350f41ff1e9ec1fe83627f32844f1a
mejgun/haskell-tdlib
Audio.hs
{-# LANGUAGE OverloadedStrings #-} -- | module TD.Data.Audio where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified TD.Data.File as File import qualified TD.Data.Minithumbnail as Minithumbnail import qualified TD.Data.Thumbnail as Thumbnail import qualified Utils as U -- | dat...
null
https://raw.githubusercontent.com/mejgun/haskell-tdlib/dc380d18d49eaadc386a81dc98af2ce00f8797c2/src/TD/Data/Audio.hs
haskell
# LANGUAGE OverloadedStrings # | | | Describes an audio file. Audio is usually in MP3 or M4A format | File containing the audio | Album cover variants to use if the downloaded audio file contains no album cover. Provided thumbnail dimensions are approximate | The thumbnail of the album cover in JPEG format; as de...
module TD.Data.Audio where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified TD.Data.File as File import qualified TD.Data.Minithumbnail as Minithumbnail import qualified TD.Data.Thumbnail as Thumbnail import qualified Utils as U Audio audio :: Maybe File.File, extern...
f4ab0f7e53dc793c369de7b285137b6662093f70110fc4a6147001e6e2eb47db
rixed/ramen
RamenConfClient.ml
open Batteries open Stdint open RamenHelpersNoLog open RamenLog open RamenSync open RamenSyncHelpers module CltCmd = Sync_client_cmd.DessserGen module Processes = RamenProcesses Parse a value from a string according to the key it 's intended for let value_of_string key str = let open Key in match key with | D...
null
https://raw.githubusercontent.com/rixed/ramen/41646a42f63fa96304b1e950bb799893f9e71c07/src/RamenConfClient.ml
ocaml
whatever whatever
open Batteries open Stdint open RamenHelpersNoLog open RamenLog open RamenSync open RamenSyncHelpers module CltCmd = Sync_client_cmd.DessserGen module Processes = RamenProcesses Parse a value from a string according to the key it 's intended for let value_of_string key str = let open Key in match key with | V...
c2fdabe95dea1da080635f3f1702d79128621625a04fd9cca9504cb94bafb96d
bennn/dissertation
main.rkt
#lang typed/racket/base ;; ----------------------------------------------------------------------------- (require require-typed-check "../base/quad-types.rkt" (only-in typed/racket/class new send)) (require/typed/check "world.rkt" (world:allow-hyphenated-last-word-in-paragraph Boolean) (world:quality-default ...
null
https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/quadU/typed/main.rkt
racket
----------------------------------------------------------------------------- =============================================================================
#lang typed/racket/base (require require-typed-check "../base/quad-types.rkt" (only-in typed/racket/class new send)) (require/typed/check "world.rkt" (world:allow-hyphenated-last-word-in-paragraph Boolean) (world:quality-default (Parameterof Integer)) (world:draft-quality Index) ) (require/typed/check "quad...
edbea524ec5a8d9f635ba497e30b980e2a0a6b73815e91d27a8da84eb11770c7
kupl/LearnML
original.ml
type lambda = V of var | P of (var * lambda) | C of (lambda * lambda) and var = string let rec check (lam : lambda) : bool = true
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/lambda/sub122/original.ml
ocaml
type lambda = V of var | P of (var * lambda) | C of (lambda * lambda) and var = string let rec check (lam : lambda) : bool = true
1d1e825c3b387b2d74202cef526ab06df5949cd8d99357f40d4af992f4bfb31b
nada-attia/dama
move.ml
type direction = | Up | Down | Left | Right exception SquareNotFound let get_square labl (brd : Board.t) = let squares = List.flatten (Board.get_board brd) in let rec find_square = function | [] -> raise SquareNotFound | h :: t -> if Board.get_label h = labl then h else find_square t in find_s...
null
https://raw.githubusercontent.com/nada-attia/dama/df4a792dee2468b65192ff0d0852b579f48c583f/src/move.ml
ocaml
* Helper function to get list of square left of [square] if exists, else []. Behavior varies dependent on color since orientation of board changes. Uses list c_val determined by color [color] to perform operations. * Helper function to get list of square right of [square] if exists, else []. Behavior v...
type direction = | Up | Down | Left | Right exception SquareNotFound let get_square labl (brd : Board.t) = let squares = List.flatten (Board.get_board brd) in let rec find_square = function | [] -> raise SquareNotFound | h :: t -> if Board.get_label h = labl then h else find_square t in find_s...
ecee01a2a5b1684a5776a3582c687267eb6760e0ec345687ab5b3715cac40c50
lilactown/dom
parse.cljs
(ns town.lilac.dom.parse "Runtime parsing of data into incremental-dom patches. Supports both EDN and JSON formats. " (:require ["incremental-dom" :as dom] [goog.object :as gobj])) (defn edn "Accepts a tree of EDN data, parses and executes each element as incremental-dom commands. Example: ($ \"di...
null
https://raw.githubusercontent.com/lilactown/dom/06e601bea335b1713400929fea289d0e40d82265/src/town/lilac/dom/parse.cljs
clojure
(ns town.lilac.dom.parse "Runtime parsing of data into incremental-dom patches. Supports both EDN and JSON formats. " (:require ["incremental-dom" :as dom] [goog.object :as gobj])) (defn edn "Accepts a tree of EDN data, parses and executes each element as incremental-dom commands. Example: ($ \"di...
e43e9a8cb233c9adfd602c253140ea9353fd8d39bbc063445139e873210d1912
dongcarl/guix
clojure-utils.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2018 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the Lice...
null
https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/guix/build/clojure-utils.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2018 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (guix build clojure-utils) #:use-module (guix build utils) #:use-module (ice-9 ftw) #:use-mod...
b7fd6619693231530944c2dd41d40ee2df5113f82777e03e3a5c8e04b1ee46c3
zcassini/htc1x-problem-bank
parameterization-starter.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-reader.ss" "lang")((modname parameterization-starter) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructo...
null
https://raw.githubusercontent.com/zcassini/htc1x-problem-bank/0a2e85348df9ad629dd091df55b1ddfa2371ae35/Abstraction/Abstraction%20L1/parameterization-starter.rkt
racket
about the language level of this file in a form that our tools can easily process. parameterization-starter.rkt ==================== ListOfString -> Boolean (define (contains-ubc? los) false) ;stub <template from ListOfString> ListOfString -> Boolean (define (contains-mcgill? los) false) ;stub <template from ListO...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-reader.ss" "lang")((modname parameterization-starter) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ()))) area of circle radius 4 area of circle radius...
ae4c9b5a046464cf4e97c59dce2dde3476c59ae47642ff362a04cdf1006829a1
Licenser/clj-sandbox
safe_fns.clj
(ns net.licenser.sandbox.safe-fns (:use net.licenser.sandbox.matcher)) (def not-really-safe-functions {:java-fns (function-matcher '.)}) (def output-functions {:print-fns (function-matcher 'pr 'prn 'print 'println)}) (def safe-functions {:internal-fns (function-matcher 'dot) :general-fns (funct...
null
https://raw.githubusercontent.com/Licenser/clj-sandbox/e73433e955c5f1b11efc25151a925ad752b78f5a/src/net/licenser/sandbox/safe_fns.clj
clojure
(ns net.licenser.sandbox.safe-fns (:use net.licenser.sandbox.matcher)) (def not-really-safe-functions {:java-fns (function-matcher '.)}) (def output-functions {:print-fns (function-matcher 'pr 'prn 'print 'println)}) (def safe-functions {:internal-fns (function-matcher 'dot) :general-fns (funct...
31812c22a441b3df92c9c25662f799b4a9331055bf2103950732122c9657c092
SleepyBag/leetcode-racket
1269.rkt
(define/contract (num-ways steps arrLen) (-> exact-integer? exact-integer? exact-integer?) (define mem (make-hash)) (define (f step loc) (hash-ref mem (+ (* step 1000) loc) (let ((ans (if (= step 0) (if (= loc 0) 1 0) (if (or (>= loc arrLen) (< loc 0)) 0 (+ (f (- step 1) (...
null
https://raw.githubusercontent.com/SleepyBag/leetcode-racket/7bf77dbff0608ae0b101daf020f839df9cf5208f/1269.rkt
racket
(define/contract (num-ways steps arrLen) (-> exact-integer? exact-integer? exact-integer?) (define mem (make-hash)) (define (f step loc) (hash-ref mem (+ (* step 1000) loc) (let ((ans (if (= step 0) (if (= loc 0) 1 0) (if (or (>= loc arrLen) (< loc 0)) 0 (+ (f (- step 1) (...
0a7fe00ec27621f7dfbe2b0899da77b76bd13e9f714423c47c5f931468d5648b
petertseng/adventofcode-hs-2022
05_supply_stacks.hs
import AdventOfCode (readInputFile) import AdventOfCode.Split (splitOnOne) import Control.Arrow ((***)) import Data.Char (isLetter) import Data.Foldable (for_) import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.List (foldl', transpose) import Data.Maybe (fromJust, isNothing) type Crates a ...
null
https://raw.githubusercontent.com/petertseng/adventofcode-hs-2022/fbd5f2df3ce699df629acebc7c78eec5ed5ea40a/bin/05_supply_stacks.hs
haskell
import AdventOfCode (readInputFile) import AdventOfCode.Split (splitOnOne) import Control.Arrow ((***)) import Data.Char (isLetter) import Data.Foldable (for_) import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.List (foldl', transpose) import Data.Maybe (fromJust, isNothing) type Crates a ...
3142b751c641b392dbfd61f679b0f0c62f826479324469ebdbc0ac53f82d427b
simmone/racket-simple-xlsx
basic-read-and-write-test.rkt
#lang racket (require rackunit/text-ui rackunit) (require "../../../main.rkt") (require racket/runtime-path) (define-runtime-path basic_write_file "basic_write.xlsx") (define-runtime-path basic_read_and_write_file "basic_read_and_write.xlsx") (define test-basic (test-suite "test-basic" (test-case "test...
null
https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/tests/write-and-read/basic/basic-read-and-write-test.rkt
racket
(void)
#lang racket (require rackunit/text-ui rackunit) (require "../../../main.rkt") (require racket/runtime-path) (define-runtime-path basic_write_file "basic_write.xlsx") (define-runtime-path basic_read_and_write_file "basic_read_and_write.xlsx") (define test-basic (test-suite "test-basic" (test-case "test...
adb877f7f585e258e4ecfeeb5b3536029ad6ed6681fcb73cae98c931aba693e2
facebook/pyre-check
projectSpecificPreprocessing.mli
* Copyright ( c ) Meta Platforms , Inc. and 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) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/pyre-check/10c375bea52db5d10b71cb5206fac7da9549eb0c/source/external/projectSpecificPreprocessing.mli
ocaml
* Copyright ( c ) Meta Platforms , Inc. and 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) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
350c2db88bcdd625e020ed9a99650b4c3ad6f3f4458c080c29c841045a34a28e
appleshan/cl-http
tcp-stream-lw.lisp
(in-package :www-utils) (eval-when (:load-toplevel :compile-toplevel :execute) (require "comm")) (defmacro with-stream-timeout ((stream timeout &key error-p) &body body) "Executes BODY and returns the values of the last form in BODY. However, if the stream goes idle for longer than TIMEOUT seconds, the opera...
null
https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/contrib/kpoeck/port-template/allegro/tcp-stream-lw.lisp
lisp
how can these be implemented?
(in-package :www-utils) (eval-when (:load-toplevel :compile-toplevel :execute) (require "comm")) (defmacro with-stream-timeout ((stream timeout &key error-p) &body body) "Executes BODY and returns the values of the last form in BODY. However, if the stream goes idle for longer than TIMEOUT seconds, the opera...
b4b87476f4ff2c8bd8b25943ac0cb98d6b813bb90c4e5abf83a905f4485ff951
evertedsphere/how-to-implement-dependent-type-theory
Main.hs
-- Tasty makes it easy to test your code. It is a test framework that can combine many different types of tests into one suite . See its website for -- help: <>. import qualified Test.Tasty Hspec is one of the providers for Tasty . It provides a nice syntax for -- writing tests. Its website has more info: <>. impor...
null
https://raw.githubusercontent.com/evertedsphere/how-to-implement-dependent-type-theory/40040c39f3008b27a8e123b169821bc545ac050c/test-suite/Main.hs
haskell
Tasty makes it easy to test your code. It is a test framework that can help: <>. writing tests. Its website has more info: <>.
combine many different types of tests into one suite . See its website for import qualified Test.Tasty Hspec is one of the providers for Tasty . It provides a nice syntax for import Test.Tasty.Hspec main :: IO () main = do test <- testSpec "perhaps" spec Test.Tasty.defaultMain test spec :: Spec spec = par...
605050db751ab3d8e7eedc4718ff099c7c5f970bae89fc4f4a0ef0b7e95f19b3
tokenmill/timewords
formats.clj
(ns timewords.standard.formats (:require [clojure.string :as str]) (:import (java.util Locale TimeZone Date) (org.joda.time.format ISODateTimeFormat DateTimeFormat DateTimeFormatter) (org.joda.time DateTime LocalDateTime) (org.joda.time.chrono LenientChronology ISOChronology))) (de...
null
https://raw.githubusercontent.com/tokenmill/timewords/431ef3aa9eb899f2abd47cebc20a232f8c226b4a/src/timewords/standard/formats.clj
clojure
(ns timewords.standard.formats (:require [clojure.string :as str]) (:import (java.util Locale TimeZone Date) (org.joda.time.format ISODateTimeFormat DateTimeFormat DateTimeFormatter) (org.joda.time DateTime LocalDateTime) (org.joda.time.chrono LenientChronology ISOChronology))) (de...
58b083856a4a976a441f61db3bbb3342b79a3b5511666862b98a7b3f7f8bb522
tlaplus/tlapm
backend.ml
Communication to external solvers . Copyright ( C ) 2011 INRIA and Microsoft Corporation Copyright (C) 2011 INRIA and Microsoft Corporation *) module Types = Types module Toolbox = Toolbox module Zenon = Zenon module Fingerprints = Fingerprints module Fpfile = Fpfile module module Prep = Prep
null
https://raw.githubusercontent.com/tlaplus/tlapm/158386319f5b6cd299f95385a216ade2b85c9f72/src/backend.ml
ocaml
Communication to external solvers . Copyright ( C ) 2011 INRIA and Microsoft Corporation Copyright (C) 2011 INRIA and Microsoft Corporation *) module Types = Types module Toolbox = Toolbox module Zenon = Zenon module Fingerprints = Fingerprints module Fpfile = Fpfile module module Prep = Prep
92f49d1e93fe972586ba5d67818e40d9041b86d6b800572ef435f0757e72d84c
wangsix/VMO_repeated_themes_discovery
occurrences.lisp
;(in-package :common-lisp-user) (load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "csv-files" :type "lisp") *lisp-code-root*)) (load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "director-musices" :type "lisp") *lisp-co...
null
https://raw.githubusercontent.com/wangsix/VMO_repeated_themes_discovery/0082b3c55e64ed447c8b68bcb705fd6da8e3541f/JKUPDD-Aug2013/groundTruth/gibbonsSilverSwan1612/monophonic/repeatedPatterns/tomCollins/A/occurrences/script/occurrences.lisp
lisp
(in-package :common-lisp-user) Load the piece and the pattern. Define all occurrences. occi. Save as csv, lisp, and midi. Definition of ontime-pitch pairs. Definition for MIDI file. Save MIDI file (have to alter any anacrusis). Save lisp-format text file. Save CSV.
(load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "csv-files" :type "lisp") *lisp-code-root*)) (load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "director-musices" :type "lisp") *lisp-code-root*)) (load (merge-pathnam...
d6ebb894b885cc8c70ca4c9760dafae41374def6c31f9c80cf37116a60f39c20
rems-project/cerberus
smt_wrapper.ml
TODO : for now use Z3 via the command line ... open Cerb_frontend open Symbol open Symbolic open Z3 let ctx : context ref = ref ( assert false ) let mk_unit = type assertions = Assertions of string list * string list let is_empty_assertions = assert false let empty_assertion...
null
https://raw.githubusercontent.com/rems-project/cerberus/124c93f10cb4c235f6396adec82ebf9563daeb7e/backend/common/smt_wrapper.ml
ocaml
type assertion = | Assert_eq of symbolic * symbolic | Assert_neq of symbolic * symbolic | Assert_lt of symbolic * symbolic | Assert_ge of symbolic * symbolic | Exp the list of string on the "left" are the declarations for symbols
TODO : for now use Z3 via the command line ... open Cerb_frontend open Symbol open Symbolic open Z3 let ctx : context ref = ref ( assert false ) let mk_unit = type assertions = Assertions of string list * string list let is_empty_assertions = assert false let empty_assertion...
4c7ef56c4d08e1e74a51b8cd8b7eb1ccae45aed316a7f4f22685ec479c5f0b03
ocaml-omake/omake
omake_node_type.ml
(* * Types of internal representations of nodes. *) * Internally , we represent pathnames as absolute paths . * We keep a hashed integer for quick equality testing . * dir_hash : the quick hash * dir_root : the root of this name * : the path in canonical form ( lowercase on Windows ) ...
null
https://raw.githubusercontent.com/ocaml-omake/omake/08b2a83fb558f6eb6847566cbe1a562230da2b14/src/ir/omake_node_type.ml
ocaml
* Types of internal representations of nodes. * Possible node flags. * A node is a phony, or it is a filename.
* Internally , we represent pathnames as absolute paths . * We keep a hashed integer for quick equality testing . * dir_hash : the quick hash * dir_root : the root of this name * : the path in canonical form ( lowercase on Windows ) * dir_name : the actual path will full capitaliz...
ae9b6149a00475e12d2f53cba24d7fc877eb2e06eebadd5e2cf232192635bd89
cblp/crdt
HLint.hs
{-# LANGUAGE PackageImports #-} import "hint" HLint.Dollar import "hint" HLint.HLint
null
https://raw.githubusercontent.com/cblp/crdt/175d7ee7df66de1f013ee167ac31719752e0c20b/HLint.hs
haskell
# LANGUAGE PackageImports #
import "hint" HLint.Dollar import "hint" HLint.HLint
f85ee38fe9fe321f08419eb993d740b05ad564a8c95a572de165e5e12ffd8e12
Rainist/kubeletter
slack.clj
(ns kubeletter.deliver.slack (:require [clj-http.client :as req])) (def ^:private ENV_KEY "DELIVER_SLACK_WEBHOOK_URL") (def ^:private SLACK_WEBHOOK_URL nil) (defn- read-url-once [] (if-not SLACK_WEBHOOK_URL (def SLACK_WEBHOOK_URL (System/getenv ENV_KEY)))) (defn registerable? [] (read-url-once) (if (Syst...
null
https://raw.githubusercontent.com/Rainist/kubeletter/da326a067147f45b069a49d22730ea07675f9e16/kubeletter/src/kubeletter/deliver/slack.clj
clojure
(ns kubeletter.deliver.slack (:require [clj-http.client :as req])) (def ^:private ENV_KEY "DELIVER_SLACK_WEBHOOK_URL") (def ^:private SLACK_WEBHOOK_URL nil) (defn- read-url-once [] (if-not SLACK_WEBHOOK_URL (def SLACK_WEBHOOK_URL (System/getenv ENV_KEY)))) (defn registerable? [] (read-url-once) (if (Syst...
233c21fa596369d95f76184c06e18c3f5c9f270d5e21fc24534f9c34292a1376
froggey/Mezzano
gchackery.lisp
(in-package :cl-user) (eval-when (:compile-toplevel :load-toplevel :execute) (use-package :iter)) (defun indent-log (file) (with-open-file (output (make-pathname :type "logout" :defaults file) :direction :output) (iter (for c in-file file using #'read-char) (with indentatio...
null
https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/tools/gchackery.lisp
lisp
ignore fixnums cons unbound-value #b0111 objects ignore numeric arrays. character single-float gc forwarding pointer Make sure negative numbers are negative. package groveling...
(in-package :cl-user) (eval-when (:compile-toplevel :load-toplevel :execute) (use-package :iter)) (defun indent-log (file) (with-open-file (output (make-pathname :type "logout" :defaults file) :direction :output) (iter (for c in-file file using #'read-char) (with indentatio...
4596b26c754def9d267bd30f819ae888f9259dad9661fab8b388480782e3d749
gelisam/hyzzy
B1.hs
{-# LANGUAGE OverloadedStrings #-} module Rooms.B1 where import Hyzzy.Command look :: Command look = "More foliage walls. This place is a maze..." north :: Command north = Command $ goToRoom "A1" south :: Command south = Command $ goToRoom "C1" -- 1 2 3 4 5 6 7 -- +-+-+ +-+-+-+-+ -- A| | | -- ...
null
https://raw.githubusercontent.com/gelisam/hyzzy/c5c861d5556ed3ca82fbb583d6928fac40d0d8df/games/maze/Rooms/B1.hs
haskell
# LANGUAGE OverloadedStrings # 1 2 3 4 5 6 7 +-+-+ +-+-+-+-+ A| | | + +-+-+-+-+-+ + + + +-+-+ + +-+ + + +-+ +-+ + + D| | | | | + + + + + + + + E| | | | | | + + +-+ + +-+ + F| | | | + +-+-+ +-+-+ + +-+-+-+-+-+-+-+
module Rooms.B1 where import Hyzzy.Command look :: Command look = "More foliage walls. This place is a maze..." north :: Command north = Command $ goToRoom "A1" south :: Command south = Command $ goToRoom "C1" B|*| | | C| | | | | |
1ae5fc781ecbb52d405fd79525b876f6b135c5a4afa8065dbf03a4c444d89e41
avsm/ocaml-regexp
regular_expr.ml
\subsection{regexp datatype and simplifying constructors } \subsection{regexp datatype and simplifying constructors} *) open Hashcons;; type regexp = regexp_struct Hashcons.hash_consed and regexp_struct = | Empty | Epsilon | Char_interv of int * int r length at least 2 | Star of regexp | Alt of ...
null
https://raw.githubusercontent.com/avsm/ocaml-regexp/90298a535e2570b35eede9cafb698cb7f7329367/lib/regular_expr.ml
ocaml
\subsection{extended regexp} \subsection{Regexp match by run-time interpretation of regexp} r cannot be [""] r [s] cannot be [""] [firstchars r] returns the set of characters that may start a word in the language of [r] a <= b < a1 <= b1 a <= a1 <= b <= b1 a1 < a <= b <= b1 a <= a1 <= b1 < b ...
\subsection{regexp datatype and simplifying constructors } \subsection{regexp datatype and simplifying constructors} *) open Hashcons;; type regexp = regexp_struct Hashcons.hash_consed and regexp_struct = | Empty | Epsilon | Char_interv of int * int r length at least 2 | Star of regexp | Alt of ...
7e102e664b61828da00ae7e89b88246d0a6f42ff9c396e73dd9534a0df64bd6e
aaronallen8455/pinned-warnings
PinnedWarnings.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE CPP # module PinnedWarnings ( plugin ) where import Control.Concurrent.MVar import Control.Monad import Control.Monad.IO.Class import Data.IORef import Data.List import qualified Data.Map.Strict as M import Da...
null
https://raw.githubusercontent.com/aaronallen8455/pinned-warnings/63bdbc32a0c058751e5b54a105b59932b9bbe4ff/src/PinnedWarnings.hs
haskell
# LANGUAGE OverloadedStrings # | A mutable global variable used to track warnings during and after compilations. ------------------------------------------------------------------------------ Plugin ------------------------------------------------------------------------------ for hooking into messages. | Get a re...
# LANGUAGE CPP # module PinnedWarnings ( plugin ) where import Control.Concurrent.MVar import Control.Monad import Control.Monad.IO.Class import Data.IORef import Data.List import qualified Data.Map.Strict as M import Data.Maybe import qualified Data.Set ...
cda82e0f320b6cf17bce6e0651c39408609315b2a0cec7ed807725656d3d9474
extend/ex_uri
ex_uri.erl
Copyright ( c ) 2010 , : Extend %% 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/extend/ex_uri/7c3b320a0e5449fa1225a6ec18e628f9a3a88053/src/ex_uri.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. * Redistribution...
Copyright ( c ) 2010 , : Extend * Neither the name of : Extend nor the names of its contributors may be THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT H...
bf8817d94b4068a36f46707b2030543839a218280a708550c2cc6a5c132e1dc0
Bogdanp/marionette
browser.rkt
#lang racket/base (require racket/contract racket/match racket/string "capabilities.rkt" "page.rkt" "private/browser.rkt" "private/marionette.rkt" "timeouts.rkt") (provide (contract-out [browser? (-> any/c boolean?)] [browser-connect! (->* () ...
null
https://raw.githubusercontent.com/Bogdanp/marionette/9adbfecce47be06e25ced811af5dee36e5fda96e/marionette-lib/browser.rkt
racket
#lang racket/base (require racket/contract racket/match racket/string "capabilities.rkt" "page.rkt" "private/browser.rkt" "private/marionette.rkt" "timeouts.rkt") (provide (contract-out [browser? (-> any/c boolean?)] [browser-connect! (->* () ...
7550e01e4248aa6e306f0e1c0444adf137013000fae0cd866922545e5291140e
Clozure/ccl-tests
list-length.lsp
;-*- Mode: Lisp -*- Author : Created : Sat Apr 19 22:03:01 2003 ;;;; Contains: Tests of LIST-LENGTH (in-package :cl-test) (compile-and-load "cons-aux.lsp") (deftest list-length-nil (list-length nil) 0) (deftest list-length-list (list-length '(a b c d e f)) 6) ;; check that list-length return...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/list-length.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of LIST-LENGTH check that list-length returns nil on a circular list Check that list-length produces a type-error on arguments that are not proper lists or circular lists
Author : Created : Sat Apr 19 22:03:01 2003 (in-package :cl-test) (compile-and-load "cons-aux.lsp") (deftest list-length-nil (list-length nil) 0) (deftest list-length-list (list-length '(a b c d e f)) 6) (deftest list-length-circular-list (let ((x (cons nil nil))) (let ((y (list* 1 2 3 4 ...
12d0f2b8d369acef8f4c45d938dd85504a3ba877d5b3c38d9abc46e42b188189
logicmoo/wam_common_lisp
pcl-env.lisp
-*-Mode : LISP ; Package:(PCL ( LISP WALKER ) ) ; ; Syntax : Common - lisp -*- ;;; ;;; ************************************************************************* Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 Xerox Corporation . ;;; All rights reserved. ;;; ;;; Use and copying of this software and preparation of de...
null
https://raw.githubusercontent.com/logicmoo/wam_common_lisp/4396d9e26b050f68182d65c9a2d5a939557616dd/prolog/wam_cl/src/pcl/pcl-env.lisp
lisp
Package:(PCL ( LISP WALKER ) ) ; ; Syntax : Common - lisp -*- ************************************************************************* All rights reserved. Use and copying of this software and preparation of derivative works based upon this software are permitted. Any distribution of this States export contr...
Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 Xerox Corporation . software or derivative works must comply with all applicable United This software is made available AS IS , and Xerox Corporation makes no CommonLoops Coordinator Xerox PARC 3333 Coyote Hill Rd . Palo Alto , CA 94304 ( or send ...
41901415237d5c438c3406af8516ac62a9749534746e0e10ab8227b6db26839d
nuprl/gradual-typing-performance
with-boundary.rkt
#lang racket/base ;; Quick script: just print the runtime with/without a given ;; set of modules being part of ANY typed/untyped boundary. (require racket/set racket/stream math/statistics racket/format "modulegraph.rkt" "summary.rkt" ) ;; Get the index matching the module name ;; (: name->index (-> ModuleGr...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/paper/popl-2016/talk/scripts/with-boundary.rkt
racket
Quick script: just print the runtime with/without a given set of modules being part of ANY typed/untyped boundary. Get the index matching the module name (: name->index (-> ModuleGraph String Index)) Get the name of the module with index `i` Get the names of modules required by `name`. yuck ===================...
#lang racket/base (require racket/set racket/stream math/statistics racket/format "modulegraph.rkt" "summary.rkt" ) (define (name->index mg name) (define maybe-i (for/first ([node+neighbors (in-list (modulegraph-adjlist mg))] [i (in-range 0 (length (modulegraph-adjlist mg)...
b4bdeb422e4b47e3c4001d5b31a6d9b33481beb9be6c475e4a3b2f01894e9d10
clojure-interop/java-jdk
BasicBorders$RolloverButtonBorder.clj
(ns javax.swing.plaf.basic.BasicBorders$RolloverButtonBorder "Special thin border for rollover toolbar buttons." (:refer-clojure :only [require comment defn ->]) (:import [javax.swing.plaf.basic BasicBorders$RolloverButtonBorder])) (defn ->rollover-button-border "Constructor. shadow - `java.awt.Color` dar...
null
https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/plaf/basic/BasicBorders%24RolloverButtonBorder.clj
clojure
(ns javax.swing.plaf.basic.BasicBorders$RolloverButtonBorder "Special thin border for rollover toolbar buttons." (:refer-clojure :only [require comment defn ->]) (:import [javax.swing.plaf.basic BasicBorders$RolloverButtonBorder])) (defn ->rollover-button-border "Constructor. shadow - `java.awt.Color` dar...
a1689a901fca5cb812d1377f78192b686dc4ed95443231e76ab68147bbbec676
helium/blockchain-etl
be_txn.erl
-module(be_txn). -export([to_json/1, to_json/2, to_json/3]). -include("be_db_follower.hrl"). to_json(T) -> to_json(T, []). to_json(T, Opts) -> Type = blockchain_txn:json_type(T), to_json(Type, T, Opts). to_json(<<"poc_request_v1">>, T, Opts) -> {ledger, Ledger} = lists:keyfind(ledger, 1, Opts), ...
null
https://raw.githubusercontent.com/helium/blockchain-etl/820b3d4e2dbe1d03294279f9ba49ee8d3af27951/src/be_txn.erl
erlang
off-chain pocs don't have an on-chain challenger identity
-module(be_txn). -export([to_json/1, to_json/2, to_json/3]). -include("be_db_follower.hrl"). to_json(T) -> to_json(T, []). to_json(T, Opts) -> Type = blockchain_txn:json_type(T), to_json(Type, T, Opts). to_json(<<"poc_request_v1">>, T, Opts) -> {ledger, Ledger} = lists:keyfind(ledger, 1, Opts), ...
037a842f06ea94477337688315f2719dd899cac6ece84dd696dd59c40b5f0d68
jinwoo/cl-ui
cl-ui.lisp
(in-package #:cl-ui) (cffi:define-foreign-library libui (:darwin "libui/build/out/libui.dylib") (:unix "libui/build/out/libui.so") (t (:default "libui"))) (cffi:use-foreign-library libui) (defun main-step (&key wait) (cl-ui.raw:main-step wait)) (defvar *queue-main-callbacks* nil) (cffi:defcallback %queue-m...
null
https://raw.githubusercontent.com/jinwoo/cl-ui/0fe3247554b3eae59ef5ec9a157d6cdce0df83ef/cl-ui.lisp
lisp
object control window button box entry checkbox label tab group spinbox progress-bar slider separator combobox editable-combobox radio-buttons date-time-picker multiline-entry menu-item menu dialog boxes font-button color-button
(in-package #:cl-ui) (cffi:define-foreign-library libui (:darwin "libui/build/out/libui.dylib") (:unix "libui/build/out/libui.so") (t (:default "libui"))) (cffi:use-foreign-library libui) (defun main-step (&key wait) (cl-ui.raw:main-step wait)) (defvar *queue-main-callbacks* nil) (cffi:defcallback %queue-m...
4eb7877dacec1acc14ee58c770e26009937d95f7df113b00f8cd38c463fc8772
kadena-io/chainweb-data
Transaction.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE ImpredicativeTypes #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE NoImplicitPrelude # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # OPT...
null
https://raw.githubusercontent.com/kadena-io/chainweb-data/b134046e2fc50b9aef78a028d032166aa2297783/haskell-src/lib/ChainwebDb/Types/Transaction.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE ImpredicativeTypes # ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- -----------------------------...
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NoImplicitPrelude # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - missing - signatures # # OPTIONS_GHC -fno - w...
3cf1ce2c067f70f42763714bf47168651b69b6e0df14e4b02d8638671a61e05c
racket/gui
locked-pasteboard.rkt
;; This module provides a mixin that locks a pasteboard to all mouse interaction. This ;; means that there is no interactive dragging, no keyboard deletion, no handles drawn ;; at the corners of the snips for dragging, and anything else that must be added. (module locked-pasteboard mzscheme (require mzlib/clas...
null
https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mrlib/private/aligned-pasteboard/locked-pasteboard.rkt
racket
This module provides a mixin that locks a pasteboard to all mouse interaction. This means that there is no interactive dragging, no keyboard deletion, no handles drawn at the corners of the snips for dragging, and anything else that must be added. mixin to remove interactive movement of snips from pasteboards STAT...
(module locked-pasteboard mzscheme (require mzlib/class mred mzlib/etc mzlib/contract) (provide/contract (locked-pasteboard-mixin mixin-contract)) (define locked-pasteboard-mixin (mixin ((class->interface pasteboard%)) () (define/override (on-default-event event) (void)) (...
7a17d4db289b461bb2eaa98c72b67484dc057bb910473bbdd93a9394ad14e9d6
manavpatnaik/haskell
2_check_mult_9.hs
Write a program to ensure that the subtraction of any two - digit number and its reverse is always the multiple of nine . For example , entered number is 54 and its reverse is 45 . The difference between them is 9 revNum 0 rev = rev revNum a rev = revNum (a `div` 10) (rev*10 + (a `rem` 10)) check a = (a - revN...
null
https://raw.githubusercontent.com/manavpatnaik/haskell/85be0b7130619c6e5e815a69e66cd366c3e6cb21/practice-set-3-miscellaneous/1_sequential/2_check_mult_9.hs
haskell
All must return true
Write a program to ensure that the subtraction of any two - digit number and its reverse is always the multiple of nine . For example , entered number is 54 and its reverse is 45 . The difference between them is 9 revNum 0 rev = rev revNum a rev = revNum (a `div` 10) (rev*10 + (a `rem` 10)) check a = (a - revN...
64ae0d7741d72b5ef57ab43af113b9b23dc7c324b7bedb862784da3ae928b910
ranjitjhala/haddock-annot
Utils.hs
# LANGUAGE CPP , ForeignFunctionInterface # # OPTIONS_NHC98 -cpp # # OPTIONS_JHC -fcpp -fffi # ----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Utils Copyright : , 2003 - 2004 portions Copyright ( c ) 2007 , Galois Inc. ...
null
https://raw.githubusercontent.com/ranjitjhala/haddock-annot/ffaa182b17c3047887ff43dbe358c246011903f6/Cabal-1.10.1.1/Distribution/Simple/Utils.hs
haskell
--------------------------------------------------------------------------- | Module : Distribution.Simple.Utils Maintainer : Portability : portable A large and somewhat miscellaneous collection of utility functions used has low level functions for running programs, a bunch of wrappers for various di...
# LANGUAGE CPP , ForeignFunctionInterface # # OPTIONS_NHC98 -cpp # # OPTIONS_JHC -fcpp -fffi # Copyright : , 2003 - 2004 portions Copyright ( c ) 2007 , Galois Inc. throughout the rest of the lib and in other tools that use the lib like - install@. It has a very simple set of logging ...
934acbd6e434642a055df4092520b1d52c1af815e358ff012d106448ae68cecd
ucsd-progsys/dsolve
abs2.ml
(* qualif NNEG(x): 0 <= x *) let abs x = if x < 0 then (0 - x) else x let k = let s = abs 1 in let t = abs (-1) in s
null
https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/abs2.ml
ocaml
qualif NNEG(x): 0 <= x
let abs x = if x < 0 then (0 - x) else x let k = let s = abs 1 in let t = abs (-1) in s
21aa773e0477cfceda8f786724dacc4f304cd99778433deab9d0751ff5225a0b
tommaisey/aeon
lin-pan2.help.scm
(audition (out 0 (lin-pan2 (pink-noise ar) (f-sin-osc kr 2 0) 0.1))) (audition (out 0 (lin-pan2 (f-sin-osc ar 800 0.1) (f-sin-osc kr 3 0) 0.1)))
null
https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/panners/lin-pan2.help.scm
scheme
(audition (out 0 (lin-pan2 (pink-noise ar) (f-sin-osc kr 2 0) 0.1))) (audition (out 0 (lin-pan2 (f-sin-osc ar 800 0.1) (f-sin-osc kr 3 0) 0.1)))
ef015057411a7a4b8fb7f024540f4aaff1ba827c11fb441d181eaebf0fd6362f
metaocaml/ber-metaocaml
pr7711_ok.ml
(* TEST * expect *) type 'a r = <w: int -> int; .. > as 'a;; [%%expect{| type 'a r = 'a constraint 'a = < w : int -> int; .. > |}];; class type virtual ct = object('self) constraint 'self = 'not_self r end;; [%%expect{| class type virtual ct = object method virtual w : int -> int end |}];;
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-objects/pr7711_ok.ml
ocaml
TEST * expect
type 'a r = <w: int -> int; .. > as 'a;; [%%expect{| type 'a r = 'a constraint 'a = < w : int -> int; .. > |}];; class type virtual ct = object('self) constraint 'self = 'not_self r end;; [%%expect{| class type virtual ct = object method virtual w : int -> int end |}];;
2f869e46998825596afbcbf4b22afea335d5eb2228dd0d9f692bfba99e323d1f
mpickering/apply-refact
Default123.hs
import Control.Monad as CM(forM,filterM) yes = flip mapM
null
https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Default123.hs
haskell
import Control.Monad as CM(forM,filterM) yes = flip mapM
1e6e0c68992e2dc26256202dc4ff2ff941054d8a7d574383eb33c1e493f88cb8
jawline/c8hardcaml
execute_core.mli
open! Core open! Hardcaml open! Signal type t = { registers : Registers.t The first nibble of the executing opcode primary_op : Signal.t ; register_zero : Always.Variable.t ; flag_register : Always.Variable.t * If this opcode has a 12 - bit pointer this signal will be equal to it ; opcode_address : Signa...
null
https://raw.githubusercontent.com/jawline/c8hardcaml/fc82279a0ce7dd1dc8ed260175544e7584fefe85/src/execute_core.mli
ocaml
open! Core open! Hardcaml open! Signal type t = { registers : Registers.t The first nibble of the executing opcode primary_op : Signal.t ; register_zero : Always.Variable.t ; flag_register : Always.Variable.t * If this opcode has a 12 - bit pointer this signal will be equal to it ; opcode_address : Signa...
334cdc305fd2aa42fe446e91167c51cd9a5d56419b3e57c2d4f7293108a2d3ac
ocaml-multicore/multicoretests
stm_tests.ml
open QCheck open STM * parallel STM tests of module HashtblModel = struct type sut = (char, int) Hashtbl.t type state = (char * int) list type cmd = | Clear | Add of char * int | Remove of char | Find of char | Replace of char * int | Mem of char | Length [@@deriving show { with_pat...
null
https://raw.githubusercontent.com/ocaml-multicore/multicoretests/3e0f2ceb72eaf334e97252140ae5d40bf6461b96/doc/paper-examples/stm_tests.ml
ocaml
open QCheck open STM * parallel STM tests of module HashtblModel = struct type sut = (char, int) Hashtbl.t type state = (char * int) list type cmd = | Clear | Add of char * int | Remove of char | Find of char | Replace of char * int | Mem of char | Length [@@deriving show { with_pat...
e81d8e1382e6fe34286bca6ac576717a83285b57fd28312765b4b462a46c96f0
qiao/sicp-solutions
1.09.scm
; (+ 4 5) ; (inc (+ 3 5)) ; (inc (inc (+ 2 5))) ; (inc (inc (inc (+ 1 5)))) ; (inc (inc (inc (inc (+ 0 5))))) ; (inc (inc (inc (inc 5)))) ; (inc (inc (inc 6))) ; (inc (inc 7)) ; (inc 8) 9 ; The first process is recursive ; ; (+ 4 5) ; (+ 3 6) ; (+ 2 7) ; (+ 1 8) ; (+ 0 9) 9 ; The second process is iterative
null
https://raw.githubusercontent.com/qiao/sicp-solutions/a2fe069ba6909710a0867bdb705b2e58b2a281af/chapter1/1.09.scm
scheme
(+ 4 5) (inc (+ 3 5)) (inc (inc (+ 2 5))) (inc (inc (inc (+ 1 5)))) (inc (inc (inc (inc (+ 0 5))))) (inc (inc (inc (inc 5)))) (inc (inc (inc 6))) (inc (inc 7)) (inc 8) (+ 4 5) (+ 3 6) (+ 2 7) (+ 1 8) (+ 0 9)
9 The first process is recursive 9 The second process is iterative
9556e59caa48c5d199ffbe78392a1fdb87f68d7cff05a2795f543a026729d83e
pascal-knodel/haskell-craft
E'4'17.hs
-- -- -- ----------------- Exercise 4.17 . ----------------- -- -- -- module E'4'17 where Range product example : " range product from 3 to 5 " = 3 * 4 * 5 = 60 . -- Recursive: ------------- rangeProduct :: Integer -> Integer -> Integer rangeProduct m n | m > n = 0 | m == n = m | m + ...
null
https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/_/links/E'4'17.hs
haskell
--------------- --------------- Recursive: ----------- Using a list function and list comprehension - the recursion is hidden by a higher order function in the definition of product. (ignore this, Other solution:
Exercise 4.17 . module E'4'17 where Range product example : " range product from 3 to 5 " = 3 * 4 * 5 = 60 . rangeProduct :: Integer -> Integer -> Integer rangeProduct m n | m > n = 0 | m == n = m | m + 1 == n = m * n | otherwise = m * ( rangeProduct ( m + 1 ) ( n - 1 ) ) * n ...
bc278551ec2f33abe6921c170e20f68efda4638203dcd98db02e617e26c9d315
lotz84/bitcoin-spv-wallet
Script.hs
module Bitcoin.Script where import Data.ByteString (ByteString) import qualified Data.ByteString as BS op_pushdata :: ByteString -> ByteString op_pushdata bs = let size = BS.singleton . fromIntegral $ BS.length bs in size `BS.append` bs op_dup, op_equal, op_equalverify, op_hash160, op_checksig :: ByteString op_...
null
https://raw.githubusercontent.com/lotz84/bitcoin-spv-wallet/3e52d76b201a3f46d825be0a612d51f70dfda131/src/Bitcoin/Script.hs
haskell
module Bitcoin.Script where import Data.ByteString (ByteString) import qualified Data.ByteString as BS op_pushdata :: ByteString -> ByteString op_pushdata bs = let size = BS.singleton . fromIntegral $ BS.length bs in size `BS.append` bs op_dup, op_equal, op_equalverify, op_hash160, op_checksig :: ByteString op_...