_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
48a9ae8245ce90a5e822d255fb775ef649aa7a108bdf033dca99f0337081e9f8
libre-man/unix-opts
unix-opts.lisp
;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp -*- ;;; ;;; Unix-opts—a minimalistic parser of command line options. ;;; Copyright © 2015–2018 Copyright © 2018–2020 ;;; ;;; Permission is hereby granted, free of charge, to any person obtaining a ;;; copy of this software and associated documentation files (the " ...
null
https://raw.githubusercontent.com/libre-man/unix-opts/0e61f34b2ecf62288437810d4abb31e572048b04/unix-opts.lisp
lisp
-*- Mode: Lisp; Syntax: ANSI-Common-Lisp -*- Unix-opts—a minimalistic parser of command line options. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the without limitation the rights to use, copy, modify, merge, publish, the fol...
Copyright © 2015–2018 Copyright © 2018–2020 " Software " ) , to deal in the Software without restriction , including distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is furnished to do so , subject to in all copies or substantial portions of the S...
42f3958c0bc089d6ac198b9f0d8050e3bc521bcb17cb38acf74903e66c02be51
racket/deinprogramm
match.rkt
#lang racket/base (provide all-match-tests) (require rackunit deinprogramm/sdp/record deinprogramm/sdp/singleton deinprogramm/signature/signature-syntax (only-in deinprogramm/sdp/private/primitives match empty cons)) (define any (signature any %any)) (define-record pare kons pare? (kar any) (kd...
null
https://raw.githubusercontent.com/racket/deinprogramm/0e08f71fb1ceb3cef36e547f9f9fddbf6e58e5d6/deinprogramm/deinprogramm/sdp/tests/match.rkt
racket
#lang racket/base (provide all-match-tests) (require rackunit deinprogramm/sdp/record deinprogramm/sdp/singleton deinprogramm/signature/signature-syntax (only-in deinprogramm/sdp/private/primitives match empty cons)) (define any (signature any %any)) (define-record pare kons pare? (kar any) (kd...
daa6a36b6ca89bf2a53464406b7c1533f89f6e1e5018efe92d66a88afbe5d1ca
Ericson2314/lighthouse
Multipart.hs
-- #hide ----------------------------------------------------------------------------- -- | -- Module : Network.CGI.Multipart Copyright : ( c ) 2001,2002 ( c ) 2005 - 2006 -- License : BSD-style -- -- Maintainer : -- Stability : experimental -- Portability : non-portable -...
null
https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/cgi/Network/CGI/Multipart.hs
haskell
#hide --------------------------------------------------------------------------- | Module : Network.CGI.Multipart License : BSD-style Maintainer : Stability : experimental Portability : non-portable Parsing of the multipart format from RFC2046. Partly based on code from WASHMail. --------...
Copyright : ( c ) 2001,2002 ( c ) 2005 - 2006 module Network.CGI.Multipart ( MultiPart(..), BodyPart(..), Header , parseMultipartBody, hGetMultipartBody , showMultipartBody , ContentType(..), ContentTransferEncoding(..) , ContentDisposition(..) , parseContentTy...
b095d9eb9b7e61b3952fb1aa9ed2586ea68b230a5315ac5071e1f81e31b8c904
GaloisInc/daedalus
ParamLL.hs
module Daedalus.ParserGen.LL.ParamLL ( cst_CLOSURE_MAX_DEPTH , cst_MAX_LOOKAHEAD_DEPTH , cst_MAX_DFA_NB_STATES , cst_OVERFLOW_CFG , cst_DEMO_MODE , cst_MAX_LLA_SIZE , flag_ONLY_STRICT_LLA ) where -- Closure params cst_CLOSURE_MAX_DEPTH :: Int cst_CLOSURE_MAX_DEPTH = 200 DFA params cst_MAX_LOOKAHEA...
null
https://raw.githubusercontent.com/GaloisInc/daedalus/09cd9f08a7bcab7062714b77362bcbfd6212ea59/src/Daedalus/ParserGen/LL/ParamLL.hs
haskell
Closure params
module Daedalus.ParserGen.LL.ParamLL ( cst_CLOSURE_MAX_DEPTH , cst_MAX_LOOKAHEAD_DEPTH , cst_MAX_DFA_NB_STATES , cst_OVERFLOW_CFG , cst_DEMO_MODE , cst_MAX_LLA_SIZE , flag_ONLY_STRICT_LLA ) where cst_CLOSURE_MAX_DEPTH :: Int cst_CLOSURE_MAX_DEPTH = 200 DFA params cst_MAX_LOOKAHEAD_DEPTH :: Int cst...
614d8ad6155a78718cf8b3a42f7713f4a11b2393527c6da750d8d51fedb8180f
jonsterling/dreamtt
Refiner.ml
open Basis open Syntax open Effect exception TypeError open Monad.Notation (L) type tp_rule = ltp L.m type chk_rule = gtp -> ltm L.m type syn_rule = gtm L.m let with_tp kont tp = kont tp tp let inst_tp_fam : ltp -> env -> gtm -> gtp G.m = fun lfam env gtm -> let envx = Env.append env @@ `Tm gtm in G.local ...
null
https://raw.githubusercontent.com/jonsterling/dreamtt/aa30a57ca869e91a295e586773a892c6601b5ddb/core/Refiner.ml
ocaml
invariant: does not return unless the list of labels has no shadowing
open Basis open Syntax open Effect exception TypeError open Monad.Notation (L) type tp_rule = ltp L.m type chk_rule = gtp -> ltm L.m type syn_rule = gtm L.m let with_tp kont tp = kont tp tp let inst_tp_fam : ltp -> env -> gtm -> gtp G.m = fun lfam env gtm -> let envx = Env.append env @@ `Tm gtm in G.local ...
fe4bba2122c400875e77d0177bd6011de60ebfebadbb8b09456b5f9cc44a368d
acl2/acl2
executable.lisp
ABNF ( Augmented Backus - Naur Form ) Library ; Copyright ( C ) 2023 Kestrel Institute ( ) ; License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 . ; Author : ( ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-package "ABNF") (include-book ...
null
https://raw.githubusercontent.com/acl2/acl2/221a194719d8e25fee2f9cc5ed8aabf872860254/books/kestrel/abnf/grammar-parser/executable.lisp
lisp
and input)) done below
ABNF ( Augmented Backus - Naur Form ) Library Copyright ( C ) 2023 Kestrel Institute ( ) License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 . Author : ( ) (in-package "ABNF") (include-book "../notation/concrete-syntax") (include-book "../parsing-tools/primitives-seq") (inclu...
32dc0b3e89591e3dca5344df8f85898b378c2eb5a8a7aa8aea167590671a1b27
unclebob/AdventOfCode2022
core.clj
(ns day7-no-space-left-on-device.core (:require [clojure.string :as string])) (defn add-directory [path directory dir-name] (let [new-path (conj path dir-name)] (assoc-in directory new-path {}))) (defn add-file [path directory size name] (let [new-path (conj path name)] (assoc-in directory new-path size...
null
https://raw.githubusercontent.com/unclebob/AdventOfCode2022/f1d7bd75822606317ba60813bb7956cba0fcc36c/day7-no-space-left-on-device/src/day7_no_space_left_on_device/core.clj
clojure
(ns day7-no-space-left-on-device.core (:require [clojure.string :as string])) (defn add-directory [path directory dir-name] (let [new-path (conj path dir-name)] (assoc-in directory new-path {}))) (defn add-file [path directory size name] (let [new-path (conj path name)] (assoc-in directory new-path size...
533d3fdf1b5ee553dade3a2f256d00cc25ebdeabeadca32fdd99f4f1ba9dfe5c
urs-of-the-backwoods/fresco
HaskellSpec.hs
-- Fresco Framework for Multi - Language Programming Copyright 2015 - 2017 -- Distributed under the Apache License , Version 2.0 -- (See attached file LICENSE or copy at -- http:--www.apache.org/licenses/LICENSE-2.0) -- -- file: test/HaskellSpec.hs -- {-# LANGUAGE OverloadedStrings #-} module Hask...
null
https://raw.githubusercontent.com/urs-of-the-backwoods/fresco/9914df6d534f591448ed1501965f1bd03f3724de/sinopia/test/HaskellSpec.hs
haskell
(See attached file LICENSE or copy at http:--www.apache.org/licenses/LICENSE-2.0) file: test/HaskellSpec.hs # LANGUAGE OverloadedStrings #
Fresco Framework for Multi - Language Programming Copyright 2015 - 2017 Distributed under the Apache License , Version 2.0 module HaskellSpec(main, spec) where import Test.Hspec import Sinopia.Data import Sinopia.Parser import Sinopia.Haskell import Data.Either.Unwrap import Numeric (showHex) import Dat...
f13f666209f2fbf541bf756844572d54e5735bb4b63808c202fcc623315f1139
racket/math
gamma-normal.rkt
#lang typed/racket/base (require "../../../flonum.rkt" "../../distributions/impl/normal-cdf.rkt") (provide flgamma-normal) Temme 's normal approximation for regularized incomplete gamma functions This is much better than moment - matching or Wilson - Hilferty (: flgamma-normal (Float Float Any Any -> F...
null
https://raw.githubusercontent.com/racket/math/dcd2ea1893dc5b45b26c8312997917a15fcd1c4a/math-lib/math/private/functions/incomplete-gamma/gamma-normal.rkt
racket
Avoid under-/overflow in calculating norm-x by doing it in log space
#lang typed/racket/base (require "../../../flonum.rkt" "../../distributions/impl/normal-cdf.rkt") (provide flgamma-normal) Temme 's normal approximation for regularized incomplete gamma functions This is much better than moment - matching or Wilson - Hilferty (: flgamma-normal (Float Float Any Any -> F...
164e6e2423c1eaaeadda344f0b0c834117ef895ead32ffb6f573c0c6286af13a
janestreet/memtrace_viewer_with_deps
range_input.mli
open! Core_kernel open Bonsai_web open Memtrace_viewer_common module Size : sig type t = | Small | Large end type t val range : t -> Time_range.t val changing : t -> bool val lower_input : t -> Vdom.Node.t val upper_input : t -> Vdom.Node.t val reset_changing : t -> Vdom.Event.t val size : t -> Size.t val...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/client/range_input.mli
ocaml
open! Core_kernel open Bonsai_web open Memtrace_viewer_common module Size : sig type t = | Small | Large end type t val range : t -> Time_range.t val changing : t -> bool val lower_input : t -> Vdom.Node.t val upper_input : t -> Vdom.Node.t val reset_changing : t -> Vdom.Event.t val size : t -> Size.t val...
639fd5a15b290798d8573e382173f9b4d13a534d11e2d5dfab7a6e4674aebc7d
vikram/lisplibraries
employee.lisp
(in-package :weblocks-elephant-demo) Model (defpclass employee () ((first-name :initarg :first-name :accessor first-name :type string) (last-name :initarg :last-name :accessor last-name :type string) (age :initarg :age :accessor age :type integer) (address :accessor employ...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/weblocks-stable/examples/weblocks-elephant-demo/src/model/employee.lisp
lisp
Table View Data view Form View
(in-package :weblocks-elephant-demo) Model (defpclass employee () ((first-name :initarg :first-name :accessor first-name :type string) (last-name :initarg :last-name :accessor last-name :type string) (age :initarg :age :accessor age :type integer) (address :accessor employ...
16ed478a00b1553ab46d9856e106e3863ada4edec89d12df93bfed80a551d622
janestreet/hardcaml
test_multiport_memory.ml
open! Import open Hardcaml_waveterm_kernel let write_port address_width data_width = { Signal.write_clock = Signal.gnd ; write_address = Signal.of_int ~width:address_width 0 ; write_data = Signal.of_int ~width:data_width 0 ; write_enable = Signal.gnd } ;; let%expect_test "exceptions" = require_does_raise ...
null
https://raw.githubusercontent.com/janestreet/hardcaml/15727795c2bf922dd852cc0cd895a4ed1d9527e5/test/lib/test_multiport_memory.ml
ocaml
open! Import open Hardcaml_waveterm_kernel let write_port address_width data_width = { Signal.write_clock = Signal.gnd ; write_address = Signal.of_int ~width:address_width 0 ; write_data = Signal.of_int ~width:data_width 0 ; write_enable = Signal.gnd } ;; let%expect_test "exceptions" = require_does_raise ...
a52467b9f95fad8a58642e78debfb50ae23e8232c13edf044f575fbe00fd2d61
naoto-ogawa/h-xproto-mysql
CapabilitiesGet.hs
# LANGUAGE BangPatterns , DeriveDataTypeable , DeriveGeneric , FlexibleInstances , MultiParamTypeClasses # # OPTIONS_GHC -fno - warn - unused - imports # module Com.Mysql.Cj.Mysqlx.Protobuf.CapabilitiesGet (CapabilitiesGet(..)) where import Prelude ((+), (/)) import qualified Prelude as Prelude' import qualified Data...
null
https://raw.githubusercontent.com/naoto-ogawa/h-xproto-mysql/1eacd6486c99b849016bf088788cb8d8b166f964/src/Com/Mysql/Cj/Mysqlx/Protobuf/CapabilitiesGet.hs
haskell
# LANGUAGE BangPatterns , DeriveDataTypeable , DeriveGeneric , FlexibleInstances , MultiParamTypeClasses # # OPTIONS_GHC -fno - warn - unused - imports # module Com.Mysql.Cj.Mysqlx.Protobuf.CapabilitiesGet (CapabilitiesGet(..)) where import Prelude ((+), (/)) import qualified Prelude as Prelude' import qualified Data...
72014c796cb15e4452fb34100e80f073505e3232f1ed9ceef55c26994c07cff0
sydow/ireal
Integrals.hs
module Integrals where import Data.Number.IReal import Taylor integral k d f i = try eps i where eps = 10 ^^ (-d) evens (x:_:xs) = x : evens xs try eps i | w < eps = approx + ((-w) -+- w) | otherwise = try eps2 (lower i -+- m) + try eps2 (m -+- upper i) where eps2 = scale eps (-1) ...
null
https://raw.githubusercontent.com/sydow/ireal/c06438544c711169baac7960540202379f9294b1/applications/Integrals.hs
haskell
module Integrals where import Data.Number.IReal import Taylor integral k d f i = try eps i where eps = 10 ^^ (-d) evens (x:_:xs) = x : evens xs try eps i | w < eps = approx + ((-w) -+- w) | otherwise = try eps2 (lower i -+- m) + try eps2 (m -+- upper i) where eps2 = scale eps (-1) ...
8d0835341d546d007ebc248bff1cb9055fc12a849920ccb638c453a68e57acca
esl/MongooseIM
mongoose_graphql_admin_query.erl
-module(mongoose_graphql_admin_query). -behaviour(mongoose_graphql). -export([execute/4]). -ignore_xref([execute/4]). -include("../mongoose_graphql_types.hrl"). execute(_Ctx, _Obj, <<"account">>, _Args) -> {ok, account}; execute(_Ctx, _Obj, <<"checkAuth">>, _Args) -> {ok, admin}; execute(_Ctx, _Obj, <<"doma...
null
https://raw.githubusercontent.com/esl/MongooseIM/584fb592d0b6af53767c90d614542925920bf906/src/graphql/admin/mongoose_graphql_admin_query.erl
erlang
-module(mongoose_graphql_admin_query). -behaviour(mongoose_graphql). -export([execute/4]). -ignore_xref([execute/4]). -include("../mongoose_graphql_types.hrl"). execute(_Ctx, _Obj, <<"account">>, _Args) -> {ok, account}; execute(_Ctx, _Obj, <<"checkAuth">>, _Args) -> {ok, admin}; execute(_Ctx, _Obj, <<"doma...
3ad15ad527841ec13e7034cb867fc3109f8c033024805c1d812cc304efe20012
AmpersandTarski/Ampersand
Input.hs
module Ampersand.Input ( module Ampersand.Input.ADL1.CtxError, module Ampersand.Input.Parsing, ) where import Ampersand.Input.ADL1.CtxError import Ampersand.Input.Parsing
null
https://raw.githubusercontent.com/AmpersandTarski/Ampersand/cb2306a09ce79d5609ccf8d3e28c0a1eb45feafe/src/Ampersand/Input.hs
haskell
module Ampersand.Input ( module Ampersand.Input.ADL1.CtxError, module Ampersand.Input.Parsing, ) where import Ampersand.Input.ADL1.CtxError import Ampersand.Input.Parsing
9819c5aafda7b17f469ffb7b8fd0eb6165ae78f441a028f4a76c4d9821fb5cb5
karlhof26/gimp-scheme
FU_sketch_pastel-image.scm
; FU_sketch_pastel-image.scm version 2.9 [ gimphelp.org ] last modified / tested by 02/15/2014 on GIMP-2.8.10 ; ; 02/15/2014 - accommodated indexed images ;============================================================== ; ; Installation: ; This script should be placed in the user or system-wide script folder....
null
https://raw.githubusercontent.com/karlhof26/gimp-scheme/ed9c875dc25ab1d9712e70b84d86151663e0a097/FU_sketch_pastel-image.scm
scheme
FU_sketch_pastel-image.scm 02/15/2014 - accommodated indexed images ============================================================== Installation: This script should be placed in the user or system-wide script folder. Windows Vista/7/8) or or C:\Documents and Settings\yourname\.gimp-2.8\scripts ...
version 2.9 [ gimphelp.org ] last modified / tested by 02/15/2014 on GIMP-2.8.10 C:\Program Files\GIMP 2\share\gimp\2.0\scripts C:\Users\YOUR - NAME\.gimp-2.8\scripts Windows XP C:\Program Files\GIMP 2\share\gimp\2.0\scripts /home / yourname/.gimp-2.8 / scripts it under the terms of the...
f9b95fcb062a000eb903a58990d2cdde2f36ef32b3e2a21ca540f17471eac70e
acl2/acl2
lg.lisp
Base-2 integer logarithm ; Copyright ( C ) 2008 - 2011 and Stanford University Copyright ( C ) 2013 - 2023 Kestrel Institute ; License : A 3 - clause BSD license . See the file books/3BSD - mod.txt . ; Author : ( ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-pac...
null
https://raw.githubusercontent.com/acl2/acl2/4a7cd3dee752dfbf8e390f67de6a1d2e6f604f7e/books/kestrel/arithmetic-light/lg.lisp
lisp
TODO: Which do we prefer, lg or log2, or integer-length? Some rules about integer-length could be adapted to target lg or log2. Returns the floor of the base-2 logarithm of x, which must be a positive integer. TODO: Rename lg to floor-of-lg ? TODO: what should lg of 0 be? (implies (equal x y) (eq...
Base-2 integer logarithm Copyright ( C ) 2008 - 2011 and Stanford University Copyright ( C ) 2013 - 2023 Kestrel Institute License : A 3 - clause BSD license . See the file books/3BSD - mod.txt . Author : ( ) (in-package "ACL2") See also and ceiling-of-lg.lisp . TODO : Deprecate this book in fav...
5faef94516da669adaf889e82c1227d63bb2d597f18c0cfcdc05c59917b18280
ocaml-sf/learn-ocaml-corpus
template.ml
module CharHashedType = struct (* replace this structure with your implementation *) end module CharHashtbl = struct (* replace this structure with your implementation *) end module Trie : GenericTrie with type 'a char_table = 'a CharHashtbl.t = struct type 'a char_table = 'a CharHashtbl.t type 'a trie = Trie o...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/mooc/week6/seq3/ex1/template.ml
ocaml
replace this structure with your implementation replace this structure with your implementation
module CharHashedType = module CharHashtbl = module Trie : GenericTrie with type 'a char_table = 'a CharHashtbl.t = struct type 'a char_table = 'a CharHashtbl.t type 'a trie = Trie of 'a option * 'a trie char_table let empty () = "Replace this string with your implementation." ;; let lookup trie w = ...
6896ce3befc7f7b1815433c99a2772455d43c1668abcf3b11254f4d977653900
mattmundell/nightshade
pick-new-file.lisp
;;; Tests of `lisp:pick-new-file'. (in-package "LISP") (import '(deftest:deftest deftest:with-test-dir deftest:with-test-search-list)) ;;;; Auto argument. (deftest pick-new-file (t pick-new-file-1) "Test `pick-new-file', picking a single name." (let ((file (pick-new-file))) (prog1 (if (probe-file fil...
null
https://raw.githubusercontent.com/mattmundell/nightshade/7a67f9eac96414355de1463ec251b98237cb4009/src/tests/code/filesys.lisp/pick-new-file.lisp
lisp
Tests of `lisp:pick-new-file'. Auto argument. File argument. Hidden file argument. Backup file argument. Search list argument. Symlink argument. Relative pathname argument. Errors.
(in-package "LISP") (import '(deftest:deftest deftest:with-test-dir deftest:with-test-search-list)) (deftest pick-new-file (t pick-new-file-1) "Test `pick-new-file', picking a single name." (let ((file (pick-new-file))) (prog1 (if (probe-file file) t) (delete-file file)))) (deftest pick-new-fi...
110990dbae7d80b4ce29fca5c8b806b29b41e1cc4a9e870993e78cc59e49e384
nd/bird
Section_5_3.hs
newtype ArbInt = Norm [Digit] type Digit = Int digits :: ArbInt -> [Digit] digits (Norm xs) = xs base, baseSize :: Int base = 10000 baseSize = 4 type Carry = Int carry :: Digit -> (Carry, [Digit]) -> (Carry, [Digit]) carry x (c, xs) = ((x + c) `div` base, (x + c) `mod` base : xs) norm :: [Int] -> ArbInt nor...
null
https://raw.githubusercontent.com/nd/bird/06dba97af7cfb11f558eaeb31a75bd04cacf7201/ch05/Section_5_3.hs
haskell
newtype ArbInt = Norm [Digit] type Digit = Int digits :: ArbInt -> [Digit] digits (Norm xs) = xs base, baseSize :: Int base = 10000 baseSize = 4 type Carry = Int carry :: Digit -> (Carry, [Digit]) -> (Carry, [Digit]) carry x (c, xs) = ((x + c) `div` base, (x + c) `mod` base : xs) norm :: [Int] -> ArbInt nor...
685bd1f2359a90401329b8bb9de8836d46d0fc75f2dcc45b5598bd0eeaf97716
BillHallahan/G2
Located.hs
module G2.Language.Located ( Located (..) , Spanning (..) , Locatable (..) , Spannable (..) , topLeft , bottomRight , combineSpans , spanLookup , locLookup , SpannedName(..) ) where import G2.Language.Naming import G2.Language.Syntax import G2.Language.ExprEnv (ExprEnv) import Data.Hashable impo...
null
https://raw.githubusercontent.com/BillHallahan/G2/12efc2ff54fe34615bc782a426b9962fa4408832/src/G2/Language/Located.hs
haskell
Allows equality checking and sorting by Location Allows equality checking and sorting by Span | Returns the span that begins the closest to the top, or, if both columns are the same, that is leftmost | Returns the span that ends the closest to the bottom, or, if both columns are the same, that is rightmost Assum...
module G2.Language.Located ( Located (..) , Spanning (..) , Locatable (..) , Spannable (..) , topLeft , bottomRight , combineSpans , spanLookup , locLookup , SpannedName(..) ) where import G2.Language.Naming import G2.Language.Syntax import G2.Language.ExprEnv (ExprEnv) import Data.Hashable impo...
eac0be5a5b49147edf935d6b6aa8303762a4bc76ba265f91773931225dce70ce
haskell-checkers/checkers
Eq.hs
module Test.QuickCheck.Instances.Eq (notEqualTo, notOneof) where import Test.QuickCheck import Test.QuickCheck.Checkers import Control.Monad.Extensions notEqualTo :: (Eq a) => a -> Gen a -> Gen a notEqualTo v = satisfiesM (/= v) notOneof :: (Eq a,Arbitrary a) => [a] -> Gen a notOneof es = arbitrarySatisfying (not . ...
null
https://raw.githubusercontent.com/haskell-checkers/checkers/6cdc62e3fa50db3458f88f268682e5f1cfd9ab2c/src/Test/QuickCheck/Instances/Eq.hs
haskell
module Test.QuickCheck.Instances.Eq (notEqualTo, notOneof) where import Test.QuickCheck import Test.QuickCheck.Checkers import Control.Monad.Extensions notEqualTo :: (Eq a) => a -> Gen a -> Gen a notEqualTo v = satisfiesM (/= v) notOneof :: (Eq a,Arbitrary a) => [a] -> Gen a notOneof es = arbitrarySatisfying (not . ...
171ba88b99ad193ad62042a885df536c634f9166563c1a1f35ce0a1f463b576d
atzedijkstra/chr
Parse.hs
# LANGUAGE RankNTypes , FlexibleContexts , CPP # module CHR.Parse ( module UU.Parsing -- * Specific parser types , PlainParser , LayoutParser, LayoutParser2 -- * Top level wrappers/invocations , parsePlain , parseOffsideToResMsgs , parseToResMsgs , parseToResWith , parseOffsideToResMsgsSto...
null
https://raw.githubusercontent.com/atzedijkstra/chr/ad465828b1560831e90c4056e12338231872e8db/chr-parse/src/CHR/Parse.hs
haskell
* Specific parser types * Top level wrappers/invocations * Additional parser combinators * Re-exports * Dealing with Message ----------------------------------------------------------------------- Type(s) of parsers ----------------------------------------------------------------------- --------------------------...
# LANGUAGE RankNTypes , FlexibleContexts , CPP # module CHR.Parse ( module UU.Parsing , PlainParser , LayoutParser, LayoutParser2 , parsePlain , parseOffsideToResMsgs , parseToResMsgs , parseToResWith , parseOffsideToResMsgsStopAtErr , pAnyFromMap, pAnyKey , pMaybe, pMb , pDo , ...
579b471f225a5e38198d37d52a66ae048d3bd2af087df83f38c94a8e7056d1ab
nikita-volkov/rerebase
Rep.hs
module Data.Profunctor.Rep ( module Rebase.Data.Profunctor.Rep ) where import Rebase.Data.Profunctor.Rep
null
https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Data/Profunctor/Rep.hs
haskell
module Data.Profunctor.Rep ( module Rebase.Data.Profunctor.Rep ) where import Rebase.Data.Profunctor.Rep
ae4f503bcda2ed51d77bf6e0b268463e5e30331832a051ade448a1bf7c7fda07
re-xyr/hina
Unify.hs
module Hina.Tyck.Unify where import Control.Monad (when) import Control.Monad.Freer (Eff, Member, Members) import Control.Monad.Freer.Error (Error, runError, throwError) import Control.Monad.Freer.State (State, evalState, get, modify) import qualified Data.IntM...
null
https://raw.githubusercontent.com/re-xyr/hina/5224b98fb4405d8aa54e1ee1668072844aa80dac/src/Hina/Tyck/Unify.hs
haskell
module Hina.Tyck.Unify where import Control.Monad (when) import Control.Monad.Freer (Eff, Member, Members) import Control.Monad.Freer.Error (Error, runError, throwError) import Control.Monad.Freer.State (State, evalState, get, modify) import qualified Data.IntM...
43779f366bfe78b0562af1073604027470fc4b75432d61bca52efeacd7882424
bmeurer/ocamljit2
set.mli
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/stdlib/set.mli
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 $ Id$ module type OrderedType = s...
177594fb5deedf488a820f376a7e1c2175aecb859512aa1a95a8979f2fc1e483
janestreet/incr_dom
app.mli
open! Core open! Incr_dom module Model : sig type t val cutoff : t -> t -> bool val create : int -> t end include App_intf.S with module Model := Model
null
https://raw.githubusercontent.com/janestreet/incr_dom/56c04e44d6a8f1cc9b2b841495ec448de4bf61a1/example/partial_rendering_table/app.mli
ocaml
open! Core open! Incr_dom module Model : sig type t val cutoff : t -> t -> bool val create : int -> t end include App_intf.S with module Model := Model
2e0a8c57bf06e7e32196b603a1ccdac428448707b794e090723bbafebadac92c
pistacchio/deviantchecker
core.clj
(ns org.github.pistacchio.deviantchecker.core (:use compojure.core ring.adapter.jetty org.github.pistacchio.deviantchecker.scraper [clojure.contrib.json :only (json-str)] net.cgrand.enlive-html) (:require [compojure.route :as route] [compojure.handler :as handler] ...
null
https://raw.githubusercontent.com/pistacchio/deviantchecker/8b6c59e7f196b0051abba53b6a616fe4618fa080/src/org/github/pistacchio/deviantchecker/core.clj
clojure
** utilities ** ;; ** data management ** ;; ** views ** ;; gallery hasn't been added yet can retrieve data about gallery gallery found gallery unchanged ** route dispatcher ** ;; ** server starter ** ;;
(ns org.github.pistacchio.deviantchecker.core (:use compojure.core ring.adapter.jetty org.github.pistacchio.deviantchecker.scraper [clojure.contrib.json :only (json-str)] net.cgrand.enlive-html) (:require [compojure.route :as route] [compojure.handler :as handler] ...
7e32c296350a075a0f2a5270c36b76ae5d63a9bb32597b9bf89bcc3f412b22ae
squint-cljs/squint
http.cljs
(ns bun.http) (def default {:port 3000 :fetch (fn [_req] (js/Response. "Welcome to Bun!"))})
null
https://raw.githubusercontent.com/squint-cljs/squint/a77ace9d29ccb78ff6d0ab94d6502adc76db2134/examples/bun/http.cljs
clojure
(ns bun.http) (def default {:port 3000 :fetch (fn [_req] (js/Response. "Welcome to Bun!"))})
b1c24a2490563afcec99e2f788e7452a5259fd4d1300951afa171e3ff3db38b9
unnohideyuki/bunny
Desugar.hs
module Desugar where import Core import PreDefined import Symbol import TrCore import qualified Typing as Ty dsgModule :: Id -> Ty.Program -> Ty.Assumps -> ConstructorInfo -> Module dsgModule modident bgs as ci = let [(es, iss)] = bgs is = concat iss es' = map...
null
https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/src/Desugar.hs
haskell
module Desugar where import Core import PreDefined import Symbol import TrCore import qualified Typing as Ty dsgModule :: Id -> Ty.Program -> Ty.Assumps -> ConstructorInfo -> Module dsgModule modident bgs as ci = let [(es, iss)] = bgs is = concat iss es' = map...
7caf090ca553f61c0ed8cf87437e3ac423b658f935e3e236bbe1f231fbf04321
dennismckinnon/Ethereum-Contracts
Database.lsp
{ [[0x0]] (Caller) ; Initial admin [[0x1]] 0 ;Permissions address (can be hardcoded of admin can set it) [[0x2]] 0x100 ;Database start location [[0x3]] 32 ;Block Size Set at database creation [[0x4]] 0; Number of entries } { (if (= @@0x0 (CALLER)) { [0x0]1 ;Admin } { [0x200] (CALLER) (when @@0x1 ...
null
https://raw.githubusercontent.com/dennismckinnon/Ethereum-Contracts/25b5e7037da382dd95a1376fad81f936f6610b36/Magnet%20DB/Database.lsp
lisp
Initial admin Permissions address (can be hardcoded of admin can set it) Database start location Block Size Set at database creation Number of entries Admin When a permissions address has been given call it and return permission level of caller If not admin then don't allow them to do anything to the database (the d...
{ } { (if (= @@0x0 (CALLER)) { } { [0x200] (CALLER) } ) [0x0](calldataload 0) Add Permissions contract ( Format : " setperm " 0xPERMISSIONSADDR ) (when (= @0x0 "setperm") [[0x1]] (calldataload 32) ) (when (= @0x0 "kill") (suicide (CALLER)) ) Add / edit Database entry link ( Format : " moddb...
5a3d993e2c68b30debb38a2dd5cd408fbd616fa63a9f5255b1efc814f23a6be1
FPBench/FPBench
test-core2smtlib2.rkt
#lang racket (require generic-flonum) (require "test-common.rkt" "../src/core2smtlib2.rkt") (define (translate->smt prog ctx type test-file) (*prog* (core->smtlib2 prog "f")) test-file) (define (run<-smt exec-name ctx type number) (call-with-output-file exec-name #:exists 'replace (lambda (port) ...
null
https://raw.githubusercontent.com/FPBench/FPBench/43a8f4854baebce88614059e4b48bcfc08d97f61/infra/test-core2smtlib2.rkt
racket
Command line
#lang racket (require generic-flonum) (require "test-common.rkt" "../src/core2smtlib2.rkt") (define (translate->smt prog ctx type test-file) (*prog* (core->smtlib2 prog "f")) test-file) (define (run<-smt exec-name ctx type number) (call-with-output-file exec-name #:exists 'replace (lambda (port) ...
c570d6c8112bf2b28c2bde8b8895e03b1188a9f1c61c6737bc14a3b69fcb0518
examachine/parallpairs
allPairsVertical.ml
* * * * Author : < > * * * * Copyright ( C ) 2011 - 2017 Gok Us Sibernetik Ar&Ge Ltd. * * * * This program is free software ; you can redistribute it and/or modify it under * * the terms of the Affero GNU General Public License as published by the Free * * Software Foundation ; either version 3 of the...
null
https://raw.githubusercontent.com/examachine/parallpairs/6fafe8d6de3a55490cb8ed5ffd3493a28a914e0a/src/allPairsVertical.ml
ocaml
maximum dimension in data set inverted lists return output set
* * * * Author : < > * * * * Copyright ( C ) 2011 - 2017 Gok Us Sibernetik Ar&Ge Ltd. * * * * This program is free software ; you can redistribute it and/or modify it under * * the terms of the Affero GNU General Public License as published by the Free * * Software Foundation ; either version 3 of the...
f9a39d4064da9eddbdfd3079954e157887d2dd4caa42210aa0b9d296dee03140
somnusand/Poker
hackney_url.erl
%% -*- erlang -*- %%% This file is part of released under the Apache 2 license . %%% See the NOTICE for more information. %%% Copyright ( c ) 2012 - 2015 < > Copyright ( c ) 2011 , < > %%% %% @doc module to manage urls. -module(hackney_url). -export([parse_url/1, transport_scheme/1, un...
null
https://raw.githubusercontent.com/somnusand/Poker/4934582a4a37f28c53108a6f6e09b55d21925ffa/server/deps/hackney/src/hackney_url.erl
erlang
-*- erlang -*- See the NOTICE for more information. @doc module to manage urls. use the hackney_url:pathencode/1 to encode an url encode domain if needed @doc Decode a URL encoded binary. @doc Decode a URL encoded binary. if `crash' is used the function will fail with the reason `badarg'. @doc URL encode a ...
This file is part of released under the Apache 2 license . Copyright ( c ) 2012 - 2015 < > Copyright ( c ) 2011 , < > -module(hackney_url). -export([parse_url/1, transport_scheme/1, unparse_url/1, urldecode/1, urldecode/2, urlencode/1, urlencode/2, parse_qs/1...
572c162d37fd96266485fb0c5e05a7a26ba75972579cac6fa916044576b2157d
janestreet/ecaml
terminal.ml
open! Core open! Import0 module Q = struct let ns = "ns" |> Symbol.intern let pc = "pc" |> Symbol.intern let w32 = "w32" |> Symbol.intern let x = "x" |> Symbol.intern end let is_terminal = Funcall.Wrap.("terminal-live-p" <: value @-> return bool) include Value.Make_subtype (struct let name = "terminal" ...
null
https://raw.githubusercontent.com/janestreet/ecaml/7c16e5720ee1da04e0757cf185a074debf9088df/src/terminal.ml
ocaml
open! Core open! Import0 module Q = struct let ns = "ns" |> Symbol.intern let pc = "pc" |> Symbol.intern let w32 = "w32" |> Symbol.intern let x = "x" |> Symbol.intern end let is_terminal = Funcall.Wrap.("terminal-live-p" <: value @-> return bool) include Value.Make_subtype (struct let name = "terminal" ...
c37508d81f33a2c803d75665ef9d67f3f5a9bd44b9f6330f22e6a5b95df24498
8c6794b6/haskell-sc-scratch
Interpreter.hs
# LANGUAGE NoMonomorphismRestriction # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE RankNTypes #-} # LANGUAGE FlexibleContexts # # LANGUAGE UndecidableInstances # {-# LANGUAGE GADTs #-} # LANGUAGE TemplateHaskell # | Module : $ Header$ CopyRight : ( c ) 8c6794b6 License : : Stability : ...
null
https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/hsc3-lepton/src/test/Test/Sound/SC3/Lepton/Pattern/Interpreter.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE GADTs # tests :: TestTree tests = [ label "s_is_s" prop_s_is_s ] tests = [] tests = [ label "prop_prim_num" prop_prim_num , label "prop_fractional" prop_fractional , label "prop_floating" prop_floating , label "prop_unary" prop_unary , label "prop_fromnum" pro...
# LANGUAGE NoMonomorphismRestriction # # LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleContexts # # LANGUAGE UndecidableInstances # # LANGUAGE TemplateHaskell # | Module : $ Header$ CopyRight : ( c ) 8c6794b6 License : : Stability : unstable Portability : portable Module :...
7ac8231ad2f9b8f62751c74077c850d62cbed87cfd08063cc2906dd17f18673d
REPROSEC/dolev-yao-star
Spec_Frodo_KEM_Encaps.ml
open Prims let (frodo_mul_add_sa_plus_e : Spec_Frodo_Params.frodo_alg -> Spec_Frodo_Params.frodo_gen_a -> (FStar_UInt8.t, unit) Lib_Sequence.lseq -> (FStar_UInt16.t, unit) Lib_Sequence.lseq -> (FStar_UInt16.t, unit) Lib_Sequence.lseq -> (FStar_UInt16.t, unit) Lib_Sequence.lseq)...
null
https://raw.githubusercontent.com/REPROSEC/dolev-yao-star/d97a8dd4d07f2322437f186e4db6a1f4d5ee9230/concrete/hacl-star-snapshot/ml/Spec_Frodo_KEM_Encaps.ml
ocaml
open Prims let (frodo_mul_add_sa_plus_e : Spec_Frodo_Params.frodo_alg -> Spec_Frodo_Params.frodo_gen_a -> (FStar_UInt8.t, unit) Lib_Sequence.lseq -> (FStar_UInt16.t, unit) Lib_Sequence.lseq -> (FStar_UInt16.t, unit) Lib_Sequence.lseq -> (FStar_UInt16.t, unit) Lib_Sequence.lseq)...
865b6ce9f7d0ed38614b02bb44495c0a630169299294a009e1ca0ec8c1bba10c
ocaml-multicore/tezos
node_config_command.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > Copyright ( c...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/bin_node/node_config_command.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > Copyright ( c ) 2020 Nomadic Labs , < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WIT...
35f610e90c4ba507e96a5622ed29547d9306f94ef2dbef84c427a3d99c20d346
xtdb/xtdb
jdbc.clj
(ns xtdb.fixtures.jdbc (:require [clojure.java.io :as io] [clojure.test :as t] [xtdb.fixtures :as fix] [xtdb.jdbc :as j] [juxt.clojars-mirrors.nextjdbc.v1v2v674.next.jdbc :as jdbc]) (:import com.opentable.db.postgres.embedded.EmbeddedPostgres)) (def ^:dynamic *jdbc-o...
null
https://raw.githubusercontent.com/xtdb/xtdb/d29ff33d2433b5b72a75bffa2d3ac7ffad5bb6ea/test/src/xtdb/fixtures/jdbc.clj
clojure
current :embedded-postgres dep does not support m1 (amd64) we can upgrade to get support via docker, but it changes the lib significantly (native tarball vs docker) so skipping tests for now Optional: in `xtdb-jdbc`: `docker-compose up` (`docker-compose up -d` for background) - `git clone -images.git /tmp/oracle-...
(ns xtdb.fixtures.jdbc (:require [clojure.java.io :as io] [clojure.test :as t] [xtdb.fixtures :as fix] [xtdb.jdbc :as j] [juxt.clojars-mirrors.nextjdbc.v1v2v674.next.jdbc :as jdbc]) (:import com.opentable.db.postgres.embedded.EmbeddedPostgres)) (def ^:dynamic *jdbc-o...
f40c000270036de0fc9958783881fb59e836bc3ca6ef3b29f32d8dd3d22431a9
kapilreddy/in-clojure-2018
core.clj
(ns in-clojure-2018.core (:require [in-clojure-2018.helper :as h] [clojure.core.async :refer [chan go <! >! <!! >!! alt! go-loop]])) ;; Problem - > ? ? ? - > ES ;; +1 (comment (let [e (h/init-es-bulk-updater (fn [success] ) ...
null
https://raw.githubusercontent.com/kapilreddy/in-clojure-2018/57e633bf40e3e55f233cf2d819ebb7a285f2b4d5/src/in_clojure_2018/core.clj
clojure
Problem +1 on error +1 on error +1 We introduce with-stubbed-events that emulates IO Intro / Happy path on error Condition #1 !!! on error +1 Condition #1 / Solution !!! on error +2 !!! on error +2 Condition #2 / Solution !!! on error +2 Condition #3 !!! !!! on error +2 Condition #3 / Solutio...
(ns in-clojure-2018.core (:require [in-clojure-2018.helper :as h] [clojure.core.async :refer [chan go <! >! <!! >!! alt! go-loop]])) - > ? ? ? - > ES (comment (let [e (h/init-es-bulk-updater (fn [success] ) (fn [error] ...
589960310432ecdb7d2822bd7f905518298fc8bbf084f01699b349b9cf4d95d3
fmi-lab/fp-elective-2017
sum-digits.scm
(require rackunit rackunit/text-ui) ; Единствената разлика с count-digits е в изчисляването на новия result. (define (sum-digits n) (define (helper counter result) (if (= counter 0) result (helper (quotient counter 10) (+ result (remainder counter 10))))) (he...
null
https://raw.githubusercontent.com/fmi-lab/fp-elective-2017/e88d5c0319b6d03c0ecd8a12a2856fb1bf5dcbf3/exercises/02/sum-digits.scm
scheme
Единствената разлика с count-digits е в изчисляването на новия result.
(require rackunit rackunit/text-ui) (define (sum-digits n) (define (helper counter result) (if (= counter 0) result (helper (quotient counter 10) (+ result (remainder counter 10))))) (helper n 0)) (define sum-digits-tests (test-suite "Tests for sum-digi...
a5ddab4fa1679db197d0584ccd3c8ea3a034fb9aeed6a15cfaa4fbda3326cc94
CloudI/CloudI
b64.erl
-*- coding : utf-8 ; erlang - indent - level : 2 -*- %%% ------------------------------------------------------------------- Copyright 2010 - 2021 < > , < > , and < > %%% This file is part of PropEr . %%% %%% PropEr is free software: you can redistribute it and/or ...
null
https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/proper/examples/b64.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 2010 - 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...
f2a788fdddacc0cfbd478c470c5cc3a4e2e302fa39b3f214a1ba23ceb5fdd81d
qfpl/reflex-tutorial
Dynamic.hs
module Posts.Component.Dynamic ( ) where
null
https://raw.githubusercontent.com/qfpl/reflex-tutorial/07c1e6fab387cbeedd031630ba6a5cd946cc612e/code/basics/src/Posts/Component/Dynamic.hs
haskell
module Posts.Component.Dynamic ( ) where
34f7472e9d3bef337df6b7cd8998ee082b30aa0de52cfb85e5e46152ad23fde1
static-analysis-engineering/codehawk
tCHTestSuite.ml
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Unit Testing Framework Author : Adapted from : ( ) ------------------------------------------------------------------------------ ...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/c1b3158e0d73cda7cfc10d75f6173f4297991a82/CodeHawk/CHT/tchlib/tCHTestSuite.ml
ocaml
chutil tchlib
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Unit Testing Framework Author : Adapted from : ( ) ------------------------------------------------------------------------------ ...
adf2a23be50c3267428a5ba705d205f7de42e5fe5df0d51e902ef6d2e2163c45
chicken-mobile/chicken-sdl2-android-builder
pixel-format.scm
;; chicken - sdl2 : CHICKEN Scheme bindings to Simple DirectMedia Layer 2 ;; Copyright © 2013 , 2015 - 2016 . ;; 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...
null
https://raw.githubusercontent.com/chicken-mobile/chicken-sdl2-android-builder/90ef1f0ff667737736f1932e204d29ae615a00c4/eggs/sdl2/lib/sdl2-internals/functions/pixel-format.scm
scheme
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. - Redistributio...
chicken - sdl2 : CHICKEN Scheme bindings to Simple DirectMedia Layer 2 Copyright © 2013 , 2015 - 2016 . " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT COPYRIGHT HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT N...
ce217a170b90fb1244b9e7972d95d69b15165cb1ddc3087fa1267f7a9ff38f9f
fredrikt/yxa
autotest_util.erl
%%%------------------------------------------------------------------- %%% File : autotest_util.erl @author < > @doc Utility functions to use with YXA 's autotest unit %%% testing framework. %%% @since 30 Apr 2008 by < > %%% @end %%%-------------------------------------------------...
null
https://raw.githubusercontent.com/fredrikt/yxa/85da46a999d083e6f00b5f156a634ca9be65645b/src/autotest_util.erl
erlang
------------------------------------------------------------------- File : autotest_util.erl testing framework. @end ------------------------------------------------------------------- -compile(export_all). -------------------------------------------------------------------- External exports ---------...
@author < > @doc Utility functions to use with YXA 's autotest unit @since 30 Apr 2008 by < > -module(autotest_util). -export([fail/1, is_unit_testing/2, store_unit_test_result/3, clear_unit_test_result/2, compare_records/3, compare_records/4, add_valid_credentials/3, add_vali...
c9bdacc651addc876b476553c1a439b401994f6e2225b85c1a99e5278f6fe2f0
johnlawrenceaspden/hobby-code
k-armed-bandit.clj
Reinforcement Learning : Exploration vs Exploitation : Multi - Armed Bandits ( Part Two ) ;; I'm reading the excellent: ;; Reinforcement Learning: An Introduction by and ;; The book's website, on which is available a complete pdf, is here: ;; -book.html In Chapter 2 , they introduce multi - armed bandit...
null
https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/reinforcement-learning/k-armed-bandit.clj
clojure
I'm reading the excellent: Reinforcement Learning: An Introduction The book's website, on which is available a complete pdf, is here: -book.html On the basis that you don't understand anything you can't explain to a computer, I thought I'd code it up: From the previous post, we'll keep: We can ask it how many ar...
Reinforcement Learning : Exploration vs Exploitation : Multi - Armed Bandits ( Part Two ) by and In Chapter 2 , they introduce multi - armed bandits as a simplified model problem A 2 armed bandit (defn bandit [action] (case action :arms? [:right :left] :right (if (< (rand) 0.5) 4 0) :...
c28eb2a0417e7297fbeedc9643c031d9e14549b47a496390c9dcd70292aeae9a
nervous-systems/sputter
rlp.clj
(ns sputter.util.rlp (:require [sputter.util :refer [byte-count long->bytes bytes->long]]) (:import [java.io ByteArrayOutputStream] [java.util Arrays]) (:refer-clojure :exclude [vector?])) (def ^:private cutoff 55) (def ^:private str-short 0x80) (def ^:private str-long (+ str-short cutoff)) (def ^...
null
https://raw.githubusercontent.com/nervous-systems/sputter/e96357cff7ea13384ed94c7b0d6028d125b92e00/src/sputter/util/rlp.clj
clojure
(ns sputter.util.rlp (:require [sputter.util :refer [byte-count long->bytes bytes->long]]) (:import [java.io ByteArrayOutputStream] [java.util Arrays]) (:refer-clojure :exclude [vector?])) (def ^:private cutoff 55) (def ^:private str-short 0x80) (def ^:private str-long (+ str-short cutoff)) (def ^...
598374bfa9feba47a7f81d812d371747b9b590f6dbc0cc631da58384e9b0908f
timbertson/opam2nix
hex.mli
val of_char : char -> char * char val to_char : char -> char -> char
null
https://raw.githubusercontent.com/timbertson/opam2nix/6f2fbdf3730d49bf8fadc22374a2e270bee9400d/src/hex.mli
ocaml
val of_char : char -> char * char val to_char : char -> char -> char
48a9aa9d2872849b4c56a0673a083c47203d2c3ffa869b7bc7152fe178469616
tsloughter/kuberl
kuberl_policy_v1beta1_allowed_host_path.erl
-module(kuberl_policy_v1beta1_allowed_host_path). -export([encode/1]). -export_type([kuberl_policy_v1beta1_allowed_host_path/0]). -type kuberl_policy_v1beta1_allowed_host_path() :: #{ 'pathPrefix' => binary(), 'readOnly' => boolean() }. encode(#{ 'pathPrefix' := PathPrefix, 'readOnly' := R...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_policy_v1beta1_allowed_host_path.erl
erlang
-module(kuberl_policy_v1beta1_allowed_host_path). -export([encode/1]). -export_type([kuberl_policy_v1beta1_allowed_host_path/0]). -type kuberl_policy_v1beta1_allowed_host_path() :: #{ 'pathPrefix' => binary(), 'readOnly' => boolean() }. encode(#{ 'pathPrefix' := PathPrefix, 'readOnly' := R...
6727ac8b389a89c441317a4bdee60ebc603e2e8c1be43d8dc5a0b6444617a0b6
ftovagliari/ocamleditor
comments.ml
OCamlEditor Copyright ( C ) 2010 - 2014 This file is part of OCamlEditor . OCamlEditor is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at y...
null
https://raw.githubusercontent.com/ftovagliari/ocamleditor/53284253cf7603b96051e7425e85a731f09abcd1/src/comments.ml
ocaml
begin * end * extra bytes * ocamldoc begin * end * ocamldoc Non vengono considerate le stringhe start - stop start - start start - lineend | textend stop - ?
OCamlEditor Copyright ( C ) 2010 - 2014 This file is part of OCamlEditor . OCamlEditor is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at y...
bcde94ac7a1e0ed55a43ed3d21869c4425c0e381db85d97c373d649ce3e56864
yetanalytics/dl4clj
java_rdd.clj
(ns ^{:doc "name space for creating JavaRDDs, Not sure if this is the best way of doing it, need to do more research"} dl4clj.spark.data.java-rdd (:import [org.apache.spark.api.java JavaRDD JavaSparkContext] [org.apache.spark SparkConf]) (:require [dl4clj.helpers :refer [data-from-iter reset-iterator...
null
https://raw.githubusercontent.com/yetanalytics/dl4clj/9ef055b2a460f1a6246733713136b981fd322510/src/dl4clj/spark/data/java_rdd.clj
clojure
(ns ^{:doc "name space for creating JavaRDDs, Not sure if this is the best way of doing it, need to do more research"} dl4clj.spark.data.java-rdd (:import [org.apache.spark.api.java JavaRDD JavaSparkContext] [org.apache.spark SparkConf]) (:require [dl4clj.helpers :refer [data-from-iter reset-iterator...
439b7c1e1c920febfa4c68733f3a2d37fd5f0cb843fa626b88ed567c0c5547d3
soulomoon/SICP
Exercise 2.04.scm
Exercise 2.4 : Here is an alternative procedural representation of pairs . For this representation , verify that ( car ( cons x y ) ) yields x for any objects x and y. ; (define (cons x y) ; (lambda (m) (m x y))) ; (define (car z) ; (z (lambda (p q) p))) What is the corresponding definition of cdr ? ( Hint ...
null
https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter2/Exercise%202.04.scm
scheme
(define (cons x y) (lambda (m) (m x y))) (define (car z) (z (lambda (p q) p)))
Exercise 2.4 : Here is an alternative procedural representation of pairs . For this representation , verify that ( car ( cons x y ) ) yields x for any objects x and y. What is the corresponding definition of cdr ? ( Hint : To verify that this works , make use of the substitution model of 1.1.5 . ) #lang planet ne...
5ef096ad5d4ccdf95d45ab5ebf96096a2b3ec30cc2574ede5d5df96fc28b93c1
bos/rwh
eqclasses.hs
{-- snippet color --} data Color = Red | Green | Blue colorEq :: Color -> Color -> Bool colorEq Red Red = True colorEq Green Green = True colorEq Blue Blue = True colorEq _ _ = False {-- /snippet color --} stringEq :: [Char] -> [Char] -> Bool -- Match if both are empty stringEq [] [] = True Evaluate when we have on...
null
https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch07/eqclasses.hs
haskell
- snippet color - - /snippet color - Match if both are empty If both start with the same char, check the rest Everything else doesn't match - snippet basiceq - - /snippet basiceq - - snippet basicinstance - - /snippet basicinstance- - snippet basiceq2 - - /snippet basiceq2 - - /snippet basiceq3 - - snippet basiceq3i...
data Color = Red | Green | Blue colorEq :: Color -> Color -> Bool colorEq Red Red = True colorEq Green Green = True colorEq Blue Blue = True colorEq _ _ = False stringEq :: [Char] -> [Char] -> Bool stringEq [] [] = True Evaluate when we have only one character in both stringEq [x] [y] = x == y stringEq (x:xs) (y:ys...
7301118f14a390218502107d8b2ded76e4afc8852ea0938753d7bf750702a182
argp/bap
pack.ml
(**************************************************************************) (* *) : a generic graph library for OCaml Copyright ( C ) 2004 - 2010 , and (* ...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocamlgraph/src/pack.ml
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
: a generic graph library for OCaml Copyright ( C ) 2004 - 2010 , and modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking $ I d :...
db8ee0034fc456eb510d908eb409594f511c869021c9b9118f1d7b2dab1bd556
dwayne/eopl3
parser.rkt
#lang eopl ;; Program ::= Expression ;; ;; Expression ::= Number ;; ;; ::= Identifier ;; ;; ::= -(Expression, Expression) ;; ;; ::= *(Expression, Expression) ;; ;; ::= zero?(Expression) ;; ;; ::= if Expression then Expression else Expression ;; ;; ::...
null
https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/03-ch3/interpreters/racket/PROC-3.28/parser.rkt
racket
Program ::= Expression Expression ::= Number ::= Identifier ::= -(Expression, Expression) ::= *(Expression, Expression) ::= zero?(Expression) ::= if Expression then Expression else Expression ::= let Identifier = Expression in Expressio...
#lang eopl (provide AST program a-program expression expression? const-exp var-exp diff-exp mult-exp zero?-exp if-exp let-exp proc-exp call-exp Parser parse) (define scanner-spec '((number (digit (arbno digit)) number) (identifier (letter (arbno letter)) symbol) (ws ((arbno whitespace))...
5d1d2643bd999d0fbbd18a0244462a4bd4e474a84033cbe73233156a8c80189a
threatgrid/asami
decoder.cljs
(ns ^{:doc "Encodes and decodes data for storage. Clojure implementation" :author "Joel Holdbrooks"} asami.durable.decoder (:require [clojure.string :as s] [asami.durable.common :refer [read-byte read-bytes read-short]]) (:import [goog.math Long Integer] [goog Uri])) (def ^{:privat...
null
https://raw.githubusercontent.com/threatgrid/asami/870b334c5ad28a56de483770329d0f75a2489932/src/asami/durable/decoder.cljs
clojure
temporary stub Readers are given the length and a position. They then read data into a type decoders operate on the bytes following the initial type byte information `bytes` is assumed to be a `js/Array` like object. `bytes` is assumed to be an `js/Array` like object. ; Ignored for now . TODO: error handling
(ns ^{:doc "Encodes and decodes data for storage. Clojure implementation" :author "Joel Holdbrooks"} asami.durable.decoder (:require [clojure.string :as s] [asami.durable.common :refer [read-byte read-bytes read-short]]) (:import [goog.math Long Integer] [goog Uri])) (def ^{:privat...
4e2f58cd5c686152455110f432452dd8549ac7c321e5b2cc34f283bc22360231
fakedata-haskell/fakedata
Drone.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module Faker.Provider.Drone where import Config import Control.Monad.Catch import Control.Monad.IO.Class import Data.Text (Text) import Data.Vector (Vector) import Data.Monoid ((<>)) import Data.Yaml import Faker import Faker.Internal import Faker.Provid...
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/7b0875067386e9bb844c8b985c901c91a58842ff/src/Faker/Provider/Drone.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # module Faker.Provider.Drone where import Config import Control.Monad.Catch import Control.Monad.IO.Class import Data.Text (Text) import Data.Vector (Vector) import Data.Monoid ((<>)) import Data.Yaml import Faker import Faker.Internal import Faker.Provider.TH import Language.Haskell.TH ...
294f15e14dc05b15a6fb6030d89943ee4576ab83fb31b3a01301283c154fb7d6
ta0kira/zeolite
Mergeable.hs
----------------------------------------------------------------------------- Copyright 2019 - 2020 under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applic...
null
https://raw.githubusercontent.com/ta0kira/zeolite/6741e1fa38bdb7feaad10780290275cd5282fcbc/src/Base/Mergeable.hs
haskell
--------------------------------------------------------------------------- --------------------------------------------------------------------------- --------------------------------------------------------------------------- -} # LANGUAGE Safe #
Copyright 2019 - 2020 under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software distributed under the License is di...
d50c9d13315de3115ad1a1c864068c64739458de680a58551ab209dac6a82edf
shiguredo/swidden
swidden_client.erl
-module(swidden_client). -export([request/5, request/6]). -export([request_with_headers/6, request_with_headers/7]). Host は 127.0.0.1 固定にする request(Port, Target, Service, Version, Operation) -> request0(Port, [], Target, Service, Version, Operation, []). request(Port, Target, Service, Version, Operation, Js...
null
https://raw.githubusercontent.com/shiguredo/swidden/faec93ae6b6c9e59840f0df22c5f72e381b54c02/src/swidden_client.erl
erlang
-module(swidden_client). -export([request/5, request/6]). -export([request_with_headers/6, request_with_headers/7]). Host は 127.0.0.1 固定にする request(Port, Target, Service, Version, Operation) -> request0(Port, [], Target, Service, Version, Operation, []). request(Port, Target, Service, Version, Operation, Js...
88678d63cf17d02df82c9b1e440aaa88bbc39e3ee0f8d9c6e2d2962091af3305
orx/ocaml-orx
body.ml
include Orx_gen.Body let get_parts (body : t) : Body_part.t Seq.t = let rec iter prev_part () = match get_next_part body prev_part with | None -> Seq.Nil | Some next as part -> Seq.Cons (next, iter part) in iter None
null
https://raw.githubusercontent.com/orx/ocaml-orx/ce3be01870b04a1498dbb24bbe4ad0f13d36615c/src/lib/body.ml
ocaml
include Orx_gen.Body let get_parts (body : t) : Body_part.t Seq.t = let rec iter prev_part () = match get_next_part body prev_part with | None -> Seq.Nil | Some next as part -> Seq.Cons (next, iter part) in iter None
1c038b7f3ecd8c201e970cba3e767fe9071044611b884bbcf3746ff7f5d18fcd
input-output-hk/marlowe-cardano
revenue-based-loan.hs
{-# LANGUAGE OverloadedStrings #-} module RevenueBasedLoan where import Language.Marlowe.Extended.V1 main :: IO () main = printJSON $ contract djed :: Token djed = Token "f4cf384ddd1b1377b08302b17990e9618b62924f5705458c17ee4f7d" "DjedUSD" lender :: Party lender = Role "Lender" borrower :: Party borrower = Role ...
null
https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/78a3dbb1cd692146b7d1a32e1e66faed884f2432/marlowe-cli/cookbook/revenue-based-loan.hs
haskell
# LANGUAGE OverloadedStrings #
module RevenueBasedLoan where import Language.Marlowe.Extended.V1 main :: IO () main = printJSON $ contract djed :: Token djed = Token "f4cf384ddd1b1377b08302b17990e9618b62924f5705458c17ee4f7d" "DjedUSD" lender :: Party lender = Role "Lender" borrower :: Party borrower = Role "Borrower" oracle :: Party oracle ...
c4da2b7d51d8b1e40c75961d746a42d858bb36b4f51a4de476f958fc714d651d
czan/stateful-check
java_queue_test.clj
(ns stateful-check.java-queue-test (:refer-clojure :exclude [peek pop count]) (:require [clojure.test :refer :all] [clojure.test.check.generators :as gen] [stateful-check.core :refer :all]) (:import [java.util.concurrent ArrayBlockingQueue])) (defprotocol Queue (push [this val]) (peek...
null
https://raw.githubusercontent.com/czan/stateful-check/f7a369c9306d17849981283ac04f5a524db5745f/test/stateful_check/java_queue_test.clj
clojure
Generative testing commands Generative testing specification
(ns stateful-check.java-queue-test (:refer-clojure :exclude [peek pop count]) (:require [clojure.test :refer :all] [clojure.test.check.generators :as gen] [stateful-check.core :refer :all]) (:import [java.util.concurrent ArrayBlockingQueue])) (defprotocol Queue (push [this val]) (peek...
acbf73089cc4a23c716f813e508a82f97cece579a8f06a6074708907234a22e8
maximedenes/native-coq
obligations.ml
open Printf open Pp open Environ open Term open Names open Libnames open Summary open Libobject open Entries open Decl_kinds open Errors open Util open Evd open Declare open Proof_type open Compat * - Get types of existentials ; - Flatten dependency tree ( prefix order ) ; - Replace existentials by in...
null
https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/toplevel/obligations.ml
ocaml
spiwack: Store field for internalizing ev_tac in evar_infos' evar_extra. Remove existential variables in types and build the corresponding products Substitute evar refs in the term by variables true = All transparent, false = Opaque if possible true = hide obligations prod_appvect T [| a1 ; ... ; an |] -> (T...
open Printf open Pp open Environ open Term open Names open Libnames open Summary open Libobject open Entries open Decl_kinds open Errors open Util open Evd open Declare open Proof_type open Compat * - Get types of existentials ; - Flatten dependency tree ( prefix order ) ; - Replace existentials by in...
cf0b098e8bc49f0ff119663b45f4e45c9466e6a8a110359b05806a3020766767
clojure-lsp/clojure-lsp
signature_help.clj
(ns clojure-lsp.feature.signature-help (:require [clojure-lsp.feature.file-management :as f.file-management] [clojure-lsp.parser :as parser] [clojure-lsp.queries :as q] [clojure-lsp.refactor.edit :as edit] [clojure-lsp.shared :as shared :refer [assoc-some]] [edamame.core :as edamame] [rewrite-clj...
null
https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/d6ca21a6d2235d7438fd8901db93930b80ae257b/lib/src/clojure_lsp/feature/signature_help.clj
clojure
(ns clojure-lsp.feature.signature-help (:require [clojure-lsp.feature.file-management :as f.file-management] [clojure-lsp.parser :as parser] [clojure-lsp.queries :as q] [clojure-lsp.refactor.edit :as edit] [clojure-lsp.shared :as shared :refer [assoc-some]] [edamame.core :as edamame] [rewrite-clj...
2b323028d2d7474a146e10a3ec0ea05d394947b64b4f7a2bb39489397d47ad45
dalaing/little-languages
Check.hs
module Type.Check where
null
https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/prototypes/classy/src/Type/Check.hs
haskell
module Type.Check where
3cd9d4a418dac2d96895d3783a58b47ac5c09a55ea5b310808f052d9d7222d6b
zcaudate/hara
result_test.clj
(ns hara.core.base.result-test (:use hara.test) (:require [hara.core.base.result :refer :all])) ^{:refer hara.core.base.result/result :added "3.0"} (fact "creates a result used for printing" (result {:status :warn :data [1 2 3 4]}) # result{:status : warn , : data [ 1 2 3 4 ] } => hara.core.base.result.Resu...
null
https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/test/hara/core/base/result_test.clj
clojure
(ns hara.core.base.result-test (:use hara.test) (:require [hara.core.base.result :refer :all])) ^{:refer hara.core.base.result/result :added "3.0"} (fact "creates a result used for printing" (result {:status :warn :data [1 2 3 4]}) # result{:status : warn , : data [ 1 2 3 4 ] } => hara.core.base.result.Resu...
16be560a18dc03adb7331197abb3eb4ed718856d56a8d74e36ad4535eea47f37
janestreet/bonsai
cleanup.ml
open! Core open! Bonsai_test.Arrow type packed = T : _ Driver.t -> packed let (most_recent_driver : packed option ref) = ref None let register_driver driver = most_recent_driver := Some (T driver) let invalidate_observers = Core_bench_js.Test.create_with_initialization ~name:"cleaning up observers..." (fun...
null
https://raw.githubusercontent.com/janestreet/bonsai/2619a3a5cafb94a57a80cdefc83da1b5c0e182c7/bench/src/cleanup.ml
ocaml
open! Core open! Bonsai_test.Arrow type packed = T : _ Driver.t -> packed let (most_recent_driver : packed option ref) = ref None let register_driver driver = most_recent_driver := Some (T driver) let invalidate_observers = Core_bench_js.Test.create_with_initialization ~name:"cleaning up observers..." (fun...
f7f1df386f5933408a3aa7dbe18edf669454f3004d3b1f2766b488c2d190eaa1
hexlet-codebattle/battle_asserts
maximum_triangle_edge.clj
(ns battle-asserts.issues.maximum-triangle-edge (:require [clojure.test.check.generators :as gen])) (def level :elementary) (def tags ["math"]) (def description {:en "Create a function that finds the maximum range of a triangle's third edge, where the side lengths are all integers." :ru "Создайте функцию, кот...
null
https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/87bcd69bbacd12bdedfe56bad2ff9ba4d56f729a/src/battle_asserts/issues/maximum_triangle_edge.clj
clojure
(ns battle-asserts.issues.maximum-triangle-edge (:require [clojure.test.check.generators :as gen])) (def level :elementary) (def tags ["math"]) (def description {:en "Create a function that finds the maximum range of a triangle's third edge, where the side lengths are all integers." :ru "Создайте функцию, кот...
4d8410f33e56c5ab588d8eb1c79a5ff0a84ae83bc020892ffa51c8e4c07d61b6
incoherentsoftware/defect-process
Types.hs
module World.Surface.Types ( WallSurfaceType(..) , SurfaceType(..) , Surface(..) ) where import Collision.Hitbox.Types import Util data WallSurfaceType = LeftWallSurface | RightWallSurface deriving Eq data SurfaceType = GeneralSurface | PlatformSurface | SpeedRailSurface Direc...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/15f2569e7d0e481c2e28c0ca3a5e72d2c049b667/src/World/Surface/Types.hs
haskell
module World.Surface.Types ( WallSurfaceType(..) , SurfaceType(..) , Surface(..) ) where import Collision.Hitbox.Types import Util data WallSurfaceType = LeftWallSurface | RightWallSurface deriving Eq data SurfaceType = GeneralSurface | PlatformSurface | SpeedRailSurface Direc...
2561b8e78d7827afc69187c677bedb7fa87fe142d29ae2d709166c6d3cb905ad
Zoetermeer/latro
Display.hs
{-# LANGUAGE NamedFieldPuns, FlexibleInstances #-} module Latro.Semant.Display where import Data.List (intercalate, intersperse) import qualified Data.Map as Map import Latro.Ast import Latro.Output import Latro.Semant import Latro.Sexpable import Text.Printf (printf) instance Sexpable v => Sexpable (Maybe v) where ...
null
https://raw.githubusercontent.com/Zoetermeer/latro/afff03377e65e93a8a1faaa836b21f012758de0c/src/Latro/Semant/Display.hs
haskell
# LANGUAGE NamedFieldPuns, FlexibleInstances # To satisfy (Sexpable RawId)
module Latro.Semant.Display where import Data.List (intercalate, intersperse) import qualified Data.Map as Map import Latro.Ast import Latro.Output import Latro.Semant import Latro.Sexpable import Text.Printf (printf) instance Sexpable v => Sexpable (Maybe v) where sexp (Just v) = sexp v sexp Nothing = List [] ...
f9b379d071003da887bbddaa6cbe9bc4f20d546c7ba61fe93c97d10d76d3ebd4
pomanu/waxeye
transform.rkt
#lang racket/base (require waxeye/ast "action.rkt" "expand.rkt" "gen.rkt" "util.rkt") (provide (all-defined-out)) ;; The hash table for the names of the non-terminals (define nt-names (make-hash)) ;; Transforms the grammar and performs sanity checks (define (transform-grammar g...
null
https://raw.githubusercontent.com/pomanu/waxeye/8c2fdc7d85d7c4f87adfc8f482a311b55bfda1e2/src/waxeye/transform.rkt
racket
The hash table for the names of the non-terminals Transforms the grammar and performs sanity checks Checks that referenced non-terminals have been defined
#lang racket/base (require waxeye/ast "action.rkt" "expand.rkt" "gen.rkt" "util.rkt") (provide (all-defined-out)) (define nt-names (make-hash)) (define (transform-grammar g) (and (check-not-empty g) (collect-actions g) (collect-nt-names g) (check-refs g) ...
d3e98dca8cfd1b27de18cdc8197d94ba82609beedb99753ac5917f45c2aca08e
upenn-cis1xx/camelot
verbose.ml
(* Prepending with list construction and append, where cons should be used *) let f t = [1] @ t (* Likewise, but even more verbose *) let f t = 1 :: [] @ t (* Tuple projection bad! *) let f (t: int * int) = fst t + snd t (* Nested ifs :( - we skip local lets and sequencing to get the actual return type for now *)...
null
https://raw.githubusercontent.com/upenn-cis1xx/camelot/87d9a0bcace974fe5fbe4dc3da2202ee01c17ad4/test/examples/verbose.ml
ocaml
Prepending with list construction and append, where cons should be used Likewise, but even more verbose Tuple projection bad! Nested ifs :( - we skip local lets and sequencing to get the actual return type for now Nested matched bad as well shouldn't trigger TODO: perhaps this one should trigger and say ju...
let f t = [1] @ t let f t = 1 :: [] @ t let f (t: int * int) = fst t + snd t let x = true let y = false let dounit () = () No Flagging here - only two levels deep let f () = if x then (if x then x else y) else y let f () = if x then (if x then x else let z = 3 in dounit(); (if z = 2 then...
c6957460a7832b1d314e934bf9a2e8c733ea72c9762f462243e936905af1b37a
patrikja/autosar
NewABS.hs
Copyright ( c ) 2014 - 2015 , , , , and 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 copyr...
null
https://raw.githubusercontent.com/patrikja/autosar/2b8d3a22eb99812dca645a1c3c18ce18fbf6d539/oldARSim/NewABS.hs
haskell
------------------------------------------------------------ A generic skeleton for creating sequencer components; i.e., components that produce sequences of observable effects at programmable points in time. The skeleton is parametric in the actual step function (which takes takes a step index as a parameter, p...
Copyright ( c ) 2014 - 2015 , , , , and 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 copyr...
5b861c8acbd696bab9914469c5459df5de136adfc231c3a67b82ae78d85a4736
csabahruska/jhc-components
Seq.hs
module Util.Seq( Seq() , singleton , cons , snoc , toList , appendToList , fromList , Util.Seq.concat ) where import Control.Applicative import Control.Monad import Data.Foldable(Foldable(..)) import Data.Monoid(Monoid(..)) i...
null
https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-common/src/Util/Seq.hs
haskell
a >>= b = mconcat ( fmap b (Seq.toList a))
module Util.Seq( Seq() , singleton , cons , snoc , toList , appendToList , fromList , Util.Seq.concat ) where import Control.Applicative import Control.Monad import Data.Foldable(Foldable(..)) import Data.Monoid(Monoid(..)) i...
6da10a4fe784c78976187bc3774e5b432faf193f8530e113c487e37b6b7e3834
bhauman/rebel-readline
line_reader.clj
(ns rebel-readline.clojure.line-reader (:require [rebel-readline.commands :as commands] [rebel-readline.jline-api :as api :refer :all] [rebel-readline.jline-api.attributed-string :as astring] [rebel-readline.clojure.tokenizer :as tokenize] [rebel-readline.clojure.sexp :as sexp] [rebel-readline.tools...
null
https://raw.githubusercontent.com/bhauman/rebel-readline/6c314f8fe1cb44bde3a0511bf14d48157f89f6d7/rebel-readline/src/rebel_readline/clojure/line_reader.clj
clojure
lazy-load ---------------------------------------------- Default Configuration ---------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- Service Abstraction This readline has pluggab...
(ns rebel-readline.clojure.line-reader (:require [rebel-readline.commands :as commands] [rebel-readline.jline-api :as api :refer :all] [rebel-readline.jline-api.attributed-string :as astring] [rebel-readline.clojure.tokenizer :as tokenize] [rebel-readline.clojure.sexp :as sexp] [rebel-readline.tools...
9845ca4870691eb3ba8b63a79b0d308eec795924f3aca813809e6ae2538e8077
Gabriella439/Haskell-Morte-Library
Core.hs
# LANGUAGE CPP # {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveFoldable # {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveTraversable #-} # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNType...
null
https://raw.githubusercontent.com/Gabriella439/Haskell-Morte-Library/f7a459c7ec1d69f71c389f5693a26a94c1854636/src/Morte/Core.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveTraversable # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # * Syntax * Core functions * Utilities * Errors -----------refers to-------------+ -----------refers to-------------...
# LANGUAGE CPP # # LANGUAGE DeriveFoldable # # LANGUAGE GeneralizedNewtypeDeriving # # OPTIONS_GHC -Wall # | This module contains the core calculus for the Morte language . This language is a minimalist implementation of the calculus of constructions , which is in tur...
307ccb1f55f55ef8c4dfa0551775384e6baad0b4c949f996643080e950477784
basho/riak_cs
riak_cs_bucket.erl
%% --------------------------------------------------------------------- %% Copyright ( c ) 2007 - 2014 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . Y...
null
https://raw.githubusercontent.com/basho/riak_cs/c0c1012d1c9c691c74c8c5d9f69d388f5047bcd2/src/riak_cs_bucket.erl
erlang
--------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permiss...
Copyright ( c ) 2007 - 2014 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY ...
d830de79db76d515e1826764744fbf0c3e4d313d9406dbafa34800ba76e55812
chenyukang/eopl
02.scm
;; Prove by induction on n that for any g, (fib/k n g) = (g (fib n)). ;; initial step: ;; (fib/k 1 g) = (g 1) = (g (fib 1)) stands true ;; assume (fib/k n g) = (g fib(n)) ( fib / k n+1 g ) = > ( ) ) ;; => ( fib / k n ( lambda ( v1 ) ;; (fib/k (n-1) ;; (lambda (v2) ;; (g (v1 + v2)))))) ...
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch6/02.scm
scheme
Prove by induction on n that for any g, (fib/k n g) = (g (fib n)). initial step: (fib/k 1 g) = (g 1) = (g (fib 1)) stands true assume (fib/k n g) = (g fib(n)) => (fib/k (n-1) (lambda (v2) (g (v1 + v2)))))) (lambda (v1) (fib/k (n-1) (lambda (v2) (g (v1 + v2)))) (fib/k n)) (fi...
( fib / k n+1 g ) = > ( ) ) ( fib / k n ( lambda ( v1 ) ( g ( / k ( n + 1 ) ) )
d3f0f1787533b3e42b094114ddcac71526c89243f42caa73ff85e717158acd0c
AntidoteDB/antidote_aql
where.erl
%%%------------------------------------------------------------------- @author , %%% @doc A module to handle AQL where clauses. %%% @end %%%------------------------------------------------------------------- -module(where). -include("parser.hrl"). -include("aql.hrl"). -export([scan/3]). scan(Table, ?PARSER_WI...
null
https://raw.githubusercontent.com/AntidoteDB/antidote_aql/e7ef4913d233c2fee8ebff582d91fe3e2e95786c/src/where.erl
erlang
------------------------------------------------------------------- @doc A module to handle AQL where clauses. @end ------------------------------------------------------------------- ==================================================================== ===============================================================...
@author , -module(where). -include("parser.hrl"). -include("aql.hrl"). -export([scan/3]). scan(Table, ?PARSER_WILDCARD, TxId) -> TName = table:name(Table), Index = index:p_keys(TName, TxId), lists:map(fun({_Key, BObj}) -> BObj end, Index); scan(Table, Conditions, TxId) -> evaluate(Table, Conditions, T...
c21bf4350e095aa12b03e8fd6926a9a360cbdd51237e74ddd8c772f794931f07
Viasat/halite
run.clj
Copyright ( c ) 2022 Viasat , Inc. Licensed under the MIT license (ns com.viasat.halite.doc.run (:require [com.viasat.halite :as halite] [com.viasat.halite.base :as base] [com.viasat.halite.lib.format-errors :as format-errors] [com.viasat.halite.lint :as lint] [com...
null
https://raw.githubusercontent.com/Viasat/halite/0960db0950835d6e699e4b871f326361eede29f9/src/com/viasat/halite/doc/run.clj
clojure
helper for debugging helper for debugging helper for debugging
Copyright ( c ) 2022 Viasat , Inc. Licensed under the MIT license (ns com.viasat.halite.doc.run (:require [com.viasat.halite :as halite] [com.viasat.halite.base :as base] [com.viasat.halite.lib.format-errors :as format-errors] [com.viasat.halite.lint :as lint] [com...
bb3a33c06043a2af3ad6c322f4467d94c277884b1d05245941254deaccd0b073
ephemient/aoc2018
Day9Spec.hs
module Day9Spec (spec) where import Day9 (play) import Test.Hspec (Spec, it, shouldBe) spec :: Spec spec = it "examples" $ do play 9 25 `shouldBe` 32 play 10 1618 `shouldBe` 8317 play 13 7999 `shouldBe` 146373 play 17 1104 `shouldBe` 2764 play 21 6111 `shouldBe` 54718 play 30 5807 `shouldBe` 3...
null
https://raw.githubusercontent.com/ephemient/aoc2018/eb0d04193ccb6ad98ed8ad2253faeb3d503a5938/test/Day9Spec.hs
haskell
module Day9Spec (spec) where import Day9 (play) import Test.Hspec (Spec, it, shouldBe) spec :: Spec spec = it "examples" $ do play 9 25 `shouldBe` 32 play 10 1618 `shouldBe` 8317 play 13 7999 `shouldBe` 146373 play 17 1104 `shouldBe` 2764 play 21 6111 `shouldBe` 54718 play 30 5807 `shouldBe` 3...
61cfc502e1cf5c2716e16b3451075bb034659d58498a341882e957c8da54a5f5
bzg/covid19-faq
core.cljs
Copyright ( c ) 2020 DINUM , < > SPDX - License - Identifier : EPL-2.0 ;; License-Filename: LICENSES/EPL-2.0.txt (ns covid19faq.core (:require [cljs.core.async :as async] [clojure.string :as s] [ajax.core :refer [GET POST]] [re-frame.core :as re-frame] [reagent....
null
https://raw.githubusercontent.com/bzg/covid19-faq/89a3a74c000cbb14624d5e1bdc0569fccd0b9e67/src/cljs/covid19faq/core.cljs
clojure
License-Filename: LICENSES/EPL-2.0.txt Create a copy-to-clipboard component :hits :note :mean
Copyright ( c ) 2020 DINUM , < > SPDX - License - Identifier : EPL-2.0 (ns covid19faq.core (:require [cljs.core.async :as async] [clojure.string :as s] [ajax.core :refer [GET POST]] [re-frame.core :as re-frame] [reagent.core :as reagent] [reagent.dom...
21fbf4244415222b45cda052f2e6678dedc2442d5a7eacc18e70923a79303efc
iamaleksey/oserl
smpp_base.erl
Copyright ( C ) 2009 , %%% All rights reserved. %%% %%% Redistribution and use in source and binary forms, with or without %%% modification, are permitted provided that the following conditions are met: %%% %%% o Redistributions of source code must retain the above copyright notice, %%% this list of conditions ...
null
https://raw.githubusercontent.com/iamaleksey/oserl/b254c68225b98384738c7a7ff9ddb53caa35c075/src/smpp_base.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: o Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. o Redistributions ...
Copyright ( C ) 2009 , 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 HOLDER OR LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY ,...
c4860e5fe631f6f61c297d0cfc367ec5b4940f768126b2b0529cb58efdcd8e55
RyanGlScott/text-show-instances
Scientific.hs
{-# OPTIONS -Wno-orphans #-} module TextShow.Data.Scientific () where import Data.Scientific import Data.Text.Lazy.Builder.Scientific ( scientificBuilder ) import TextShow instance TextShow Scientific where showbPrec d s | coefficient s < 0 = showbParen (d > prefixMinusPrec) (scientificBuilder ...
null
https://raw.githubusercontent.com/RyanGlScott/text-show-instances/b08f4b46466cdc3c3f3c979b7a0abf5590fa2916/src/TextShow/Data/Scientific.hs
haskell
# OPTIONS -Wno-orphans #
module TextShow.Data.Scientific () where import Data.Scientific import Data.Text.Lazy.Builder.Scientific ( scientificBuilder ) import TextShow instance TextShow Scientific where showbPrec d s | coefficient s < 0 = showbParen (d > prefixMinusPrec) (scientificBuilder s) | otherwis...
b17121d4ea766f90d44544f5440c3ad364a6fbc1368ac38b31301af94f7fb53e
valerauko/gitegylet-electron
db.cljs
(ns gitegylet.commits.db) (defn commit->map [commit] (let [parents (js->clj (.-parents commit)) commit-id (.-id commit)] {:id commit-id :author (let [author (.-author commit)] {:name (.-name author) :email (.-email author) :md5 (.-md5 author)}) :time (.-timestamp c...
null
https://raw.githubusercontent.com/valerauko/gitegylet-electron/bee01d4e70f3f1e8636bf82c0d1a78c3d640c1b7/src/cljs/gitegylet/commits/db.cljs
clojure
(ns gitegylet.commits.db) (defn commit->map [commit] (let [parents (js->clj (.-parents commit)) commit-id (.-id commit)] {:id commit-id :author (let [author (.-author commit)] {:name (.-name author) :email (.-email author) :md5 (.-md5 author)}) :time (.-timestamp c...
d3401c8f8d30adb7ee2485697d3bff3ffc729415df7633b66a41744e59385c43
pyr/net
engine.clj
(ns webfile.engine (:require [com.stuartsierra.component :as component] [clojure.core.async :as a] [net.ty.buffer :as buf] [clojure.string :refer [join]] [clojure.tools.logging :refer [info]]) (:import java.nio.file.StandardOpenOp...
null
https://raw.githubusercontent.com/pyr/net/a2120bf61b6fd480707ea6b217545b3d640288d0/examples/webfile/engine.clj
clojure
(ns webfile.engine (:require [com.stuartsierra.component :as component] [clojure.core.async :as a] [net.ty.buffer :as buf] [clojure.string :refer [join]] [clojure.tools.logging :refer [info]]) (:import java.nio.file.StandardOpenOp...
f72287f667f495a6679ff4483616c0385f1e7ab6c45a5dd121c0f33f19bd1d16
spurious/chibi-scheme-mirror
server-util.scm
(define (get-host uri headers) (cond ((assq 'host headers) => (lambda (x) (let ((s (string-trim (cdr x)))) (substring-cursor s 0 (string-find s #\:))))) ((uri-host uri)) (else "localhost"))) (define (line-handler handler) (lambda (in out sock addr) (let ((line (read-line in)))...
null
https://raw.githubusercontent.com/spurious/chibi-scheme-mirror/49168ab073f64a95c834b5f584a9aaea3469594d/lib/chibi/net/server-util.scm
scheme
TODO: auto-detect charset give up after too many tries regardless created between test and open
(define (get-host uri headers) (cond ((assq 'host headers) => (lambda (x) (let ((s (string-trim (cdr x)))) (substring-cursor s 0 (string-find s #\:))))) ((uri-host uri)) (else "localhost"))) (define (line-handler handler) (lambda (in out sock addr) (let ((line (read-line in)))...
b8b4bee6d2df64925e2dad1f91ecd7554e5541dc97b393ae5dd3f2aa7de1c80d
AdaCore/why3
opt.mli
(********************************************************************) (* *) The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University (* ...
null
https://raw.githubusercontent.com/AdaCore/why3/be1023970d48869285e68f12d32858c3383958e0/src/util/opt.mli
ocaml
****************************************************************** This software is distributed under the terms of the GNU Lesser on linking described in file LICENSE. ...
The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University General Public License version 2.1 , with the special exception val inhabited : 'a option -> bool val get : 'a option -> 'a val get_exn : exn -> 'a option -> 'a val ge...
faa6af051e4ecdda577981691ff72ffd22a171c7dd6d51fc3e9e4ac7d1d095bb
reagent-project/reagent
project.clj
(defproject simple-reagent "0.6.0" :dependencies [[org.clojure/clojure "1.10.1"] [org.clojure/clojurescript "1.10.597"] [reagent "0.10.0"] [figwheel "0.5.19"]] :plugins [[lein-cljsbuild "1.1.7"] [lein-figwheel "0.5.19"]] :resource-paths ["resources"...
null
https://raw.githubusercontent.com/reagent-project/reagent/c214466bbcf099eafdfe28ff7cb91f99670a8433/examples/simple/project.clj
clojure
(defproject simple-reagent "0.6.0" :dependencies [[org.clojure/clojure "1.10.1"] [org.clojure/clojurescript "1.10.597"] [reagent "0.10.0"] [figwheel "0.5.19"]] :plugins [[lein-cljsbuild "1.1.7"] [lein-figwheel "0.5.19"]] :resource-paths ["resources"...
9c616952d1e8b121a4c698a9a9d397a9c6355f1c7062fc06f2d2acf9d53b88f5
justone/bb-scripts
ftime.clj
(ns ftime (:require [clojure.tools.cli :refer [parse-opts]] [lib.opts :as opts] [lib.time :as time]) (:gen-class)) (def progname "ftime") (def cli-options [["-f" "--format FORMAT" "Format to use to print the time" :default "datetime"] ["-z" "--timezone ZONE" "Timezone to use" :default "A...
null
https://raw.githubusercontent.com/justone/bb-scripts/9720711e0bc82874e534e49b98b5c16262528d45/src/ftime.clj
clojure
(ns ftime (:require [clojure.tools.cli :refer [parse-opts]] [lib.opts :as opts] [lib.time :as time]) (:gen-class)) (def progname "ftime") (def cli-options [["-f" "--format FORMAT" "Format to use to print the time" :default "datetime"] ["-z" "--timezone ZONE" "Timezone to use" :default "A...
8368f6bc6ab9d7c98cb8dec10be356f08213d08b19d75188c1fedc10750442df
tfausak/argo
Decoder.hs
module Argo.Internal.Type.Decoder where import qualified Argo.Internal.Literal as Literal import qualified Argo.Vendor.ByteString as ByteString import qualified Argo.Vendor.Transformers as Trans import qualified Control.Applicative as Applicative import qualified Control.Monad as Monad import qualified Data.Functor.Id...
null
https://raw.githubusercontent.com/tfausak/argo/2e225c671dec9d4991864de8faed48acf4789192/source/library/Argo/Internal/Type/Decoder.hs
haskell
module Argo.Internal.Type.Decoder where import qualified Argo.Internal.Literal as Literal import qualified Argo.Vendor.ByteString as ByteString import qualified Argo.Vendor.Transformers as Trans import qualified Control.Applicative as Applicative import qualified Control.Monad as Monad import qualified Data.Functor.Id...
2879ffef0a1cab6b7ef9c4a7dd99a36b64f62c83c8b480a02396aed174423205
mwunsch/overscan
clock.rkt
#lang racket/base (require ffi/unsafe/introspection racket/class racket/contract gstreamer/gst) (provide (contract-out [clock% (class/c [get-time (->m clock-time?)])] [clock-time? ...
null
https://raw.githubusercontent.com/mwunsch/overscan/f198e6b4c1f64cf5720e66ab5ad27fdc4b9e67e9/gstreamer/clock.rkt
racket
#lang racket/base (require ffi/unsafe/introspection racket/class racket/contract gstreamer/gst) (provide (contract-out [clock% (class/c [get-time (->m clock-time?)])] [clock-time? ...
f14a01aedae0307544e2c45455df92edf433290535695e5b87b4ece6c9aa4a6b
ocaml-sf/learn-ocaml-corpus
product_bizarre.ml
(* Basic constructor functions. *) let empty : 'a enum = fun _s -> Seq.empty let just (x : 'a) : 'a enum = fun s -> if s = 0 then Seq.singleton x else Seq.empty let pay (enum : 'a enum) : 'a enum = fun s -> (* Treating [s = 0] as a special case is required, because we have asked the student ...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/enumerating_trees/wrong/product_bizarre.ml
ocaml
Basic constructor functions. Treating [s = 0] as a special case is required, because we have asked the student to guarantee that every size argument [s] ever passed to an enumeration is nonnegative. wrong
let empty : 'a enum = fun _s -> Seq.empty let just (x : 'a) : 'a enum = fun s -> if s = 0 then Seq.singleton x else Seq.empty let pay (enum : 'a enum) : 'a enum = fun s -> if s = 0 then Seq.empty else enum (s-1) let sum (enum1 : 'a enum) (enum2 : 'a enum) : 'a enum = fun s -> Seq.sum (enum1 ...
6dcbc0d89126bef0aa22c7ad9f07e0518495a2ba58f8854fac95de8e7ab49812
cartazio/language-c
ConstEval.hs
# LANGUAGE RelaxedPolyRec # module Language.C.Analysis.ConstEval where import Control.Monad import Data.Bits import Data.Maybe import qualified Data.Map as Map import Language.C.Syntax.AST import Language.C.Syntax.Constants import {-# SOURCE #-} Language.C.Analysis.AstAnalysis (tExpr, ExprSide(..)) import Language.C.A...
null
https://raw.githubusercontent.com/cartazio/language-c/d003206a45baec4e2a2a85026d88bd225162d951/src/Language/C/Analysis/ConstEval.hs
haskell
# SOURCE # astError (nodeInfo sz) $ "array size is not a constant: " ++ (render . pretty) sz XXX: handle padding Expression evaluation Use the withWordBytes function to wrap the results around to the correct word size Use the withWordBytes function to wrap the results around ...
# LANGUAGE RelaxedPolyRec # module Language.C.Analysis.ConstEval where import Control.Monad import Data.Bits import Data.Maybe import qualified Data.Map as Map import Language.C.Syntax.AST import Language.C.Syntax.Constants import Language.C.Analysis.Debug import Language.C.Analysis.DeclAnalysis import Language.C.Anal...
3e093d19171d289efa3d38752e348c3aed0a9a8a3df80bb8c746c4df0454443b
dgtized/shimmers
voronoi_after_effect.cljs
(ns shimmers.sketches.voronoi-after-effect (:require [quil.core :as q :include-macros true] [quil.middleware :as m] [shimmers.algorithm.delaunay :as delvor] [shimmers.algorithm.random-points :as rp] [shimmers.common.framerate :as framerate] [shimmers.common.quil :as cq] [shimmers.math.determinist...
null
https://raw.githubusercontent.com/dgtized/shimmers/f096c20d7ebcb9796c7830efcd7e3f24767a46db/src/shimmers/sketches/voronoi_after_effect.cljs
clojure
Experimenting with moving points but drawing the delayed voronoi diagram around those points. FIXME: it drifts to the right for some reason TODO: experiment with particle physics for the underlying points?
(ns shimmers.sketches.voronoi-after-effect (:require [quil.core :as q :include-macros true] [quil.middleware :as m] [shimmers.algorithm.delaunay :as delvor] [shimmers.algorithm.random-points :as rp] [shimmers.common.framerate :as framerate] [shimmers.common.quil :as cq] [shimmers.math.determinist...
a1ddf343678aa2d8f940cb5d4c68e0b4480c3334cee44e30ebd0e1d8cd4c2b60
flatironinstitute/flathub
Compression.hs
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeSynonymInstances #-} module Compression ( CompressionFormat(..) , encodingCompressions , compressionEncoding , compressionEncodingHeader , acceptCompressionEncod...
null
https://raw.githubusercontent.com/flatironinstitute/flathub/f3f4dcb3d4808ee36632e48dd3911860fa25250a/src/Compression.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE TypeSynonymInstances #
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # module Compression ( CompressionFormat(..) , encodingCompressions , compressionEncoding , compressionEncodingHeader , acceptCompressionEncoding , compressionExtension , compressionFilename , compressionMimeT...
08847dd4d53deb88686e6a8bf29317c1ff1e322d9c2e723518b530f07dd3d0de
BranchTaken/Hemlock
test_neg_abs.ml
open! Basis.Rudiments open! Basis open Zint let test () = let rec test = function | [] -> () | u :: us' -> begin let fn u = begin File.Fmt.stdout |> Fmt.fmt "neg,abs " |> fmt ~alt:true ~radix:Radix.Hex u |> Fmt.fmt " -> " |> fmt ~alt:true ~radix:Radix...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/zint/test_neg_abs.ml
ocaml
open! Basis.Rudiments open! Basis open Zint let test () = let rec test = function | [] -> () | u :: us' -> begin let fn u = begin File.Fmt.stdout |> Fmt.fmt "neg,abs " |> fmt ~alt:true ~radix:Radix.Hex u |> Fmt.fmt " -> " |> fmt ~alt:true ~radix:Radix...
23e4eadb979f91654fef88a3bf29e3766e514ed9b1128933a8145d2d4e496771
S8A/htdp-exercises
ex503.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex503) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex503.rkt
racket
about the language level of this file in a form that our tools can easily process. Matrix -> Matrix finds a row that doesn't start with 0 and no termination if all rows start with 0 Matrix -> Matrix Matrix [List-of Row] -> Matrix tries to find a row that doesn't start with 0 and use it as generative if such a ...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex503) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) uses it as the first one generative moves the first...