_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
e87815b83b3ea9cd7a4bb64463a575bf068fd5310ee71d7246d8b7900af250c7
SquidDev/illuaminate
genTree.ml
open Ppxlib module A = Ast_builder.Default let loc = Location.none module Iter = struct let gen_basic_ty name ty = match ty.ptyp_desc with | Ptyp_constr ({ txt = Lident n; _ }, []) -> A.eapply ~loc (A.evar ~loc n) [ [%expr context]; A.evar ~loc name ] | _ -> A.eapply ~loc (A.evar ~loc "f...
null
https://raw.githubusercontent.com/SquidDev/illuaminate/06a499ba9ac51b605249add0ab2987d1868f8836/src/tools/genTree.ml
ocaml
open Ppxlib module A = Ast_builder.Default let loc = Location.none module Iter = struct let gen_basic_ty name ty = match ty.ptyp_desc with | Ptyp_constr ({ txt = Lident n; _ }, []) -> A.eapply ~loc (A.evar ~loc n) [ [%expr context]; A.evar ~loc name ] | _ -> A.eapply ~loc (A.evar ~loc "f...
86b0a051d475e5d84df488fed508758bb09bffb01dcad077d849be18e35fd1a5
caradoc-org/caradoc
predictor.mli
(*****************************************************************************) (* Caradoc: a PDF parser and validator *) Copyright ( C ) 2015 ANSSI Copyright ( C ) 2015 - 2017 (* ...
null
https://raw.githubusercontent.com/caradoc-org/caradoc/100f53bc55ef682049e10fabf24869bc019dc6ce/src/stream/predictor.mli
ocaml
*************************************************************************** Caradoc: a PDF parser and validator This program is free software; you can redistribute it and/or modify ...
Copyright ( C ) 2015 ANSSI Copyright ( C ) 2015 - 2017 it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation . You should have rece...
be278f8a9b37311570ed107ba5d408481c9a6b012d283090137725d2eb119b75
kronkltd/jiksnu
actions.clj
(ns jiksnu.modules.core.templates.actions (:require [ciste.event :as event] [jiksnu.modules.core.db :as db] [monger.collection :as mc] monger.json [slingshot.slingshot :refer [throw+]] [taoensso.timbre :as timbre])) (defn make-indexer* [{:keys [page-size ...
null
https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/src/jiksnu/modules/core/templates/actions.clj
clojure
(ns jiksnu.modules.core.templates.actions (:require [ciste.event :as event] [jiksnu.modules.core.db :as db] [monger.collection :as mc] monger.json [slingshot.slingshot :refer [throw+]] [taoensso.timbre :as timbre])) (defn make-indexer* [{:keys [page-size ...
1f1513c921d75b5667dd384f9bdef567dfa5d9d3d813eca5c1248c2f66706051
haroldcarr/learn-haskell-coq-ml-etc
FP03ObjSetsTweetSet.hs
Created : 2013 Oct 01 ( Tue ) 13:26:19 by . Last Modified : 2014 Mar 05 ( We d ) 13:20:56 by . Created : 2013 Oct 01 (Tue) 13:26:19 by carr. Last Modified : 2014 Mar 05 (Wed) 13:20:56 by Harold Carr. -} module FP03ObjSetsTweetSet where import Data.List (isInfixOf) -- represent tweets....
null
https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/course/2013-11-coursera-fp-odersky-but-in-haskell/FP03ObjSetsTweetSet.hs
haskell
represent tweets. sorted by tweet text End of file.
Created : 2013 Oct 01 ( Tue ) 13:26:19 by . Last Modified : 2014 Mar 05 ( We d ) 13:20:56 by . Created : 2013 Oct 01 (Tue) 13:26:19 by carr. Last Modified : 2014 Mar 05 (Wed) 13:20:56 by Harold Carr. -} module FP03ObjSetsTweetSet where import Data.List (isInfixOf) type User = String t...
776730544a2de58d1c315566469b40562a272d5b221f649d8d503872b4af21dc
aws-beam/aws-erlang
aws_device_farm.erl
%% WARNING: DO NOT EDIT, AUTO-GENERATED CODE! See -beam/aws-codegen for more details . @doc Welcome to the AWS Device Farm API documentation , which contains APIs %% for: %% %% <ul> <li> Testing on desktop browsers %% Device Farm makes it possible for you to test your web applications on %% desktop browsers usin...
null
https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_device_farm.erl
erlang
WARNING: DO NOT EDIT, AUTO-GENERATED CODE! for: <ul> <li> Testing on desktop browsers desktop browsers using Selenium. names. For more information, see Testing Web Applications on Selenium with </li> <li> Testing on real mobile devices tablets, and other devices in the cloud. For more information, see the ...
See -beam/aws-codegen for more details . @doc Welcome to the AWS Device Farm API documentation , which contains APIs Device Farm makes it possible for you to test your web applications on The APIs for desktop browser testing contain ` TestGrid ' in their Device Farm . Device Farm makes it possible for you ...
cb5525e61da7d7f7f1e7d56e1919edc0730573df29aeab9c8f9052c8caf5d080
appliedfm/vstyle-tools
style_vernac.ml
open Format open Style open CAst open Vernacexpr class vernac_node v_init = object inherit node { ty = NodeTy_Vernac; cls = []; id = None } as super val v : Vernacexpr.vernac_control_r CAst.t = v_init method! load_style ~style ~ctx = super#load_style ~style ~ctx method styled_pp ~...
null
https://raw.githubusercontent.com/appliedfm/vstyle-tools/c639e5acff3fd1dfae6af423d7ce9bce9433f140/src/style_vernac.ml
ocaml
open Format open Style open CAst open Vernacexpr class vernac_node v_init = object inherit node { ty = NodeTy_Vernac; cls = []; id = None } as super val v : Vernacexpr.vernac_control_r CAst.t = v_init method! load_style ~style ~ctx = super#load_style ~style ~ctx method styled_pp ~...
cf9d1f149c79dbe3e3a3f6525355ca8fc86fc56dd4fbdcf3765af8c0cf52579e
cjohansen/gadget-inspector
extensions.cljc
(ns gadget.extensions (:require [gadget.browsable :as browsable] [gadget.datafy :as datafy] [gadget.core :as gadget] [gadget.std :refer [pad]] [clojure.string :as str])) ;; JWTs (defmethod gadget/render [:inline :jwt] [_ {:keys [raw]}] [:span {} [:strong {} "JWT:...
null
https://raw.githubusercontent.com/cjohansen/gadget-inspector/c7b8ed79fbba7218bb214955342ed19d5cc57bfd/lib/src/gadget/extensions.cljc
clojure
JWTs The regex inference is pretty weak. If it can't be parsed, Dates
(ns gadget.extensions (:require [gadget.browsable :as browsable] [gadget.datafy :as datafy] [gadget.core :as gadget] [gadget.std :refer [pad]] [clojure.string :as str])) (defmethod gadget/render [:inline :jwt] [_ {:keys [raw]}] [:span {} [:strong {} "JWT: "] [...
5abab8f574817caa61b7ee146e78ca15b11d3a4cb081f682b490c872f1feacb8
janestreet/bonsai
bonsai_web_ui_partial_render_table_bench.ml
open! Core open! Bonsai_web open Incr_map_collate open Bonsai_web_ui_partial_render_table open Bonsai_bench open Bonsai.Let_syntax module Table = Expert module Action = struct type 'a t = | Unfocus | Focus_up | Focus_down | Page_up | Page_down | Focus of 'a [@@deriving sexp, equal] end mod...
null
https://raw.githubusercontent.com/janestreet/bonsai/4baeedc75bf73a0915e04dc02d8a49b78779e9b0/web_ui/partial_render_table/bench/src/bonsai_web_ui_partial_render_table_bench.ml
ocaml
open! Core open! Bonsai_web open Incr_map_collate open Bonsai_web_ui_partial_render_table open Bonsai_bench open Bonsai.Let_syntax module Table = Expert module Action = struct type 'a t = | Unfocus | Focus_up | Focus_down | Page_up | Page_down | Focus of 'a [@@deriving sexp, equal] end mod...
0d3bbc4a3706f22d0a7b3c72e31c91520fe29461a9f246e18767e8ae0fe9d37a
ocaml/ocaml
dll.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml/ocaml/bcffd84a9b0e38a3ca02a1ffd2de54541f3bcb9f/bytecomp/dll.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 2001 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the type dll_handle type dll_address type dll_mode = For_checking | For_execution external dll_open: string...
5793a04d1ea49ac3143d87768392e9850ffb86f04dc58d6df544dd8ab723ca02
couchbase/geocouch
vtree_modify.erl
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not % use this file except in compliance with the License. You may obtain a copy of % the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an " A...
null
https://raw.githubusercontent.com/couchbase/geocouch/3e8040787139e3c67766ce50398860c185737b8a/vtree/src/vtree_modify.erl
erlang
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 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT This module implements the modification of the for insertion and deletion . It follows the normal R - tree rules , but takes the " original MBB " fun...
5e8c131855e4e750c2f4a07807f35ce6ad5272f9312c57437bd8191a23cae6de
acieroid/scala-am
ringbuf.scm
;; Ring-buffer benchmark (define (build-vector n init f) (letrec ((v (make-vector n init)) (loop (lambda (i) (if (< i n) (begin (vector-set! v i (f i)) (loop (+ i 1))) v)))) (loop 0))) (d...
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/threads/ringbuf.scm
scheme
Ring-buffer benchmark The buffer The read pointer The write pointer Number of elements in the buffer Lock protecting the buffer Push a value in the buffer Pop a value from the buffer
(define (build-vector n init f) (letrec ((v (make-vector n init)) (loop (lambda (i) (if (< i n) (begin (vector-set! v i (f i)) (loop (+ i 1))) v)))) (loop 0))) (define (ring-buf size) (...
d10ccf86fffb5e636ceec4fc2bac8b80141a41001012a18e2c61d64252a50015
edgecase/dieter
path.clj
(ns dieter.test.path (:require [dieter.path :as path] [dieter.cache :as cache] [dieter.settings :as settings]) (:use clojure.test) (:require [clojure.java.io :as io])) (deftest test-cached-file-path (is (= "resources/asset-cache/assets/foo-d259b08a2dfaf8bf776cbadbe85442d3.js" (...
null
https://raw.githubusercontent.com/edgecase/dieter/f3c7cdd7703c6d1556e68bbe8fc94406b717f6f1/dieter-core/test/dieter/test/path.clj
clojure
(ns dieter.test.path (:require [dieter.path :as path] [dieter.cache :as cache] [dieter.settings :as settings]) (:use clojure.test) (:require [clojure.java.io :as io])) (deftest test-cached-file-path (is (= "resources/asset-cache/assets/foo-d259b08a2dfaf8bf776cbadbe85442d3.js" (...
1620b3ef5279d7953e7efcbb43e3356e10928777368c446a2ccd9362d65520c7
avsm/mirage-duniverse
space_nine.ml
Demonstate use of [ % expect ] to match a single line of text with 0|1|2 leading & trailing NLs . The text begins with a single space . Starting with .. { [ let%expect_test _ = print_string " hello " ; [ % expect{|| } ] ; print_string " hello\n " ; [...
null
https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/ppx_expect/example/space_nine.ml
ocaml
Demonstate use of [ % expect ] to match a single line of text with 0|1|2 leading & trailing NLs . The text begins with a single space . Starting with .. { [ let%expect_test _ = print_string " hello " ; [ % expect{|| } ] ; print_string " hello\n " ; [...
6c3278ac972b15ee03e4623610ad4abfa4fc800f79f8b25001e8a0d993a11eee
ninenines/cowboy
rfc7230_SUITE.erl
Copyright ( c ) 2015 - 2017 , < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC...
null
https://raw.githubusercontent.com/ninenines/cowboy/8795233c57f1f472781a22ffbf186ce38cc5b049/test/rfc7230_SUITE.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2015 - 2017 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(rfc7230_SUITE). -compile(export_all). -compil...
a996f2674bda0aeff440ce49d6cfe7c6f0dec42c061cb3a9b3daca5e093d7844
siers/zn
Main.hs
# LANGUAGE TupleSections # module Main where import Control.Concurrent import Control.Concurrent.Async import Control.Exception import Control.Lens import Control.Monad.Reader import qualified Data.ByteString.Char8 as BS import Data.Ini import Data.List import Data.Map as M import Data.Ratio as Ratio import Data.Text...
null
https://raw.githubusercontent.com/siers/zn/7720cff2d698b773653d8496c8de7d7ac2f785cc/src/Main.hs
haskell
logs locks silence debug saveState state -- json
# LANGUAGE TupleSections # module Main where import Control.Concurrent import Control.Concurrent.Async import Control.Exception import Control.Lens import Control.Monad.Reader import qualified Data.ByteString.Char8 as BS import Data.Ini import Data.List import Data.Map as M import Data.Ratio as Ratio import Data.Text...
bfae69930443c9a49a039615bc3dd0d05f9e562e541b85e97c657a546beb0936
CrossRef/cayenne
unixsd.clj
(ns cayenne.formats.unixsd (:require [cayenne.formats.unixref :as unixref] [cayenne.data.relations :as relations] [cayenne.ids.prefix :as prefix] [cayenne.ids.member :as member-id] [cayenne.item-tree :as itree] [cayenne.util :as util] [cayenne.xm...
null
https://raw.githubusercontent.com/CrossRef/cayenne/02321ad23dbb1edd3f203a415f4a4b11ebf810d7/src/cayenne/formats/unixsd.clj
clojure
todo citation-count should be attached to item with primary-id, not tree root.
(ns cayenne.formats.unixsd (:require [cayenne.formats.unixref :as unixref] [cayenne.data.relations :as relations] [cayenne.ids.prefix :as prefix] [cayenne.ids.member :as member-id] [cayenne.item-tree :as itree] [cayenne.util :as util] [cayenne.xm...
afa55953167d9487a6dce27fdd00e4a6892b53f71b2fd908fc7e3818a4f8ecd1
naveensundarg/prover
feature-vector-trie.lisp
;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*- ;;; File: feature-vector-trie.lisp The contents of this file are subject to the Mozilla Public License ;;; Version 1.1 (the "License"); you may not use this file except in ;;; compliance with the License. You may obtain a copy of the License at ;;; / ;;; S...
null
https://raw.githubusercontent.com/naveensundarg/prover/812baf098d8bf77e4d634cef4d12de94dcd1e113/snark-20120808r02/src/feature-vector-trie.lisp
lisp
-*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*- File: feature-vector-trie.lisp Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the s...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is SNARK . The Initial Developer of the Original Code is SRI International . Portions created by the Initial Developer are Copyright ( C ) 1981 - 2012 . ...
3b19564c43ceb16e20c40446a3f7d0b107e19d4645325e61ea9e16b144331902
bitblaze-fuzzball/fuzzball
asmir.ml
* High level interface to libasmir . The functions in this file should be used instead of calling functions directly . These functions should be easier to use , and , unlike the Libasmir ones , will handle garbage collection . @author The functions in this file should be used...
null
https://raw.githubusercontent.com/bitblaze-fuzzball/fuzzball/b9a617b45e68fa732f1357fedc08a2a10f87a62c/ocaml/asmir.ml
ocaml
more to come later when we support them * Translate a unop * Translate a type primitive exp translation cache. set exp_cache_enabled to use. let exp_cache_hits = ref 0;; let exp_cache_misses = ref 0;; let exp_cache = Hashtbl.create exp_cache_max_size;; It would be nice to pre-allocate this hash table to a...
* High level interface to libasmir . The functions in this file should be used instead of calling functions directly . These functions should be easier to use , and , unlike the Libasmir ones , will handle garbage collection . @author The functions in this file should be used...
73786cfac30333a2007c35d9f85876523a9f932ce1893a983317a9c03010125e
UCSD-PL/refscript
Parser.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE NoMonomorphismRestriction # {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TupleSections # {-# LANGUAGE TypeSynonymInstances ...
null
https://raw.githubusercontent.com/UCSD-PL/refscript/884306fef72248ac41ecdbb928bbd7b06ca71bd4/src/Language/Rsc/Parser.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeSynonymInstances # # LANGUAGE UndecidableInstances # import Language.Rsc.Pretty.Errors ------------------------------------------------------------------------------ | Parse File and Type Signatures ------...
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE NoMonomorphismRestriction # # LANGUAGE TupleSections # module Language.Rsc.Parser (parseRscFromFiles, parseScriptFromJSON, parseIdFromJSON) where import Control.Ar...
b885379b1273f138d15fe42de0c86998b0b64b3b7fba29252309c72f9033df91
TheLortex/protocaml
reporter.ml
let c = Mtime_clock.counter () let reporter ppf = let report _src level ~over k msgf = let k _ = over (); k () in let with_stamp h _tags k ppf fmt = Format.kfprintf k ppf ("%a[%a] @[" ^^ fmt ^^ "@]@.") Logs.pp_header (level, h) Mtime.Span.pp (Mtime_clock.count c) in ...
null
https://raw.githubusercontent.com/TheLortex/protocaml/2d1c38692aaf4ff007f2cd16fecf22bb5764842f/10/reporter.ml
ocaml
let c = Mtime_clock.counter () let reporter ppf = let report _src level ~over k msgf = let k _ = over (); k () in let with_stamp h _tags k ppf fmt = Format.kfprintf k ppf ("%a[%a] @[" ^^ fmt ^^ "@]@.") Logs.pp_header (level, h) Mtime.Span.pp (Mtime_clock.count c) in ...
44cd7a1e6b0a4619c4a3553e06af1df46b5e52a1ce2e9c278ef9c58dfac90b55
ocaml-community/yojson
util.mli
* This module provides combinators for extracting fields from JSON values . This approach is recommended for reading a few fields from data returned by public APIs . However for more complex applications we recommend { { : }Atdgen } . Here is some sample JSON data : { v { " i d " : " 3...
null
https://raw.githubusercontent.com/ocaml-community/yojson/a3fbc94d1d57bcacb00d3b1b9ec4aa602326a4d0/lib/util.mli
ocaml
* Raised when the JSON value is not of the correct type to support an operation, e.g. [member] on an [`Int]. The string message explains the mismatch. * Returns all the key names in the given JSON object. @raise Type_error if argument is not a JSON object. * Return all the value in the given JSON ob...
* This module provides combinators for extracting fields from JSON values . This approach is recommended for reading a few fields from data returned by public APIs . However for more complex applications we recommend { { : }Atdgen } . Here is some sample JSON data : { v { " i d " : " 3...
d04b5ac556096d3145ca5f3aa11f65d86d1361f27f01c8bf6cac708d0de8b87d
MLstate/opalang
pass_ServerJavascriptOptimization.ml
Copyright © 2011 , 2012 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be us...
null
https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/js_passes/pass_ServerJavascriptOptimization.ml
ocaml
required opx Exports idents to global node scope Adding require
Copyright © 2011 , 2012 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be us...
9db2b1098e68e8a8e5f6d8fd245d5a5df26706e2bedb65a3cefff3f471cbd7e2
reactiveml/rml
caml_misc.ml
(**********************************************************************) (* *) (* ReactiveML *) (* *) (* ...
null
https://raw.githubusercontent.com/reactiveml/rml/d3ac141bd9c6e3333b678716166d988ce04b5c80/compiler/caml/caml_misc.ml
ocaml
******************************************************************** ReactiveML ...
Copyright 2002 , 2007 . All rights reserved . version 1.0 . - theme SPI , Laboratoire d'Informatique de Paris 6 ( 2002 - 2005 ) - Verimag , CNRS Grenoble ( 2005 - 2006 ) - projet , ( 2006 - 2007 ) ...
c55361a924b5b630e67f069df0df214af758662e7c99ca6850a64fe99c089e33
Dexterminator/clj-templates
dev.cljs
(ns clj-templates.util.dev) (def debug? ^boolean js/goog.DEBUG) (defn dev-setup [] (when debug? (enable-console-print!) (set! js/log (.bind js/console.log js/console))))
null
https://raw.githubusercontent.com/Dexterminator/clj-templates/705e652fece2455257e5008c12c712bb9f7802d1/src/cljs/clj_templates/util/dev.cljs
clojure
(ns clj-templates.util.dev) (def debug? ^boolean js/goog.DEBUG) (defn dev-setup [] (when debug? (enable-console-print!) (set! js/log (.bind js/console.log js/console))))
56459f4d202def974247cc582cc76d0d364b780e2ba754dbff3a0da012e45cdf
thomasathorne/clj-stan
core.clj
Copyright ( c ) Metail and ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -2.0 ;; ;; Unless required by applicable law or agreed to in writing, software ...
null
https://raw.githubusercontent.com/thomasathorne/clj-stan/5edd7b6251bd5c96427b654f1248019f0b8f9850/src/clj_stan/core.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language g...
Copyright ( c ) Metail and distributed under the License is distributed on an " AS IS " BASIS , (ns clj-stan.core (:require [clj-stan.r-dump-format :as r-dump] [clj-stan.read-output :as output] [me.raynes.conch :as conch] [environ.core :refer [env]] [pandect....
718adab24d3de7ef68b208719b2bef078b02b54a91f83b93b753bf9a92404118
Tclv/HaskellBook
Monoid.hs
module Mon where import SG import Test.QuickCheck import Data.Monoid hiding ((<>)) import Data.Semigroup hiding (mappend) import Text.Show.Functions type LeftIdentity x = x -> Bool type RightIdentity x = x -> Bool type FunctionIdentity x a = x -> a -> Bool monoidLeftIdentity :: (Monoid m, Semigroup m, Eq m) => Left...
null
https://raw.githubusercontent.com/Tclv/HaskellBook/78eaa5c67579526b0f00f85a10be3156bc304c14/ch15/chapterExercises/Monoid.hs
haskell
module Mon where import SG import Test.QuickCheck import Data.Monoid hiding ((<>)) import Data.Semigroup hiding (mappend) import Text.Show.Functions type LeftIdentity x = x -> Bool type RightIdentity x = x -> Bool type FunctionIdentity x a = x -> a -> Bool monoidLeftIdentity :: (Monoid m, Semigroup m, Eq m) => Left...
a31f670ceba8206f31078f5466310b621631322d3f3467e3735b4b7f2e75581d
LexiFi/dead_code_analyzer
ifelse.ml
if false then () else if true then () else ()
null
https://raw.githubusercontent.com/LexiFi/dead_code_analyzer/c44dc2ea5ccb13df2145e9316e21c39f09dad506/examples/ifelse.ml
ocaml
if false then () else if true then () else ()
73a3d77747dba349911301296eec87c0e7e65147fc746f663d4c3f70d742698a
kadena-io/chainweb-node
RestAPI.hs
module Chainweb.Test.Mempool.RestAPI (tests) where import Control.Concurrent import Control.Concurrent.STM import Control.Exception import qualified Data.Pool as Pool import qualified Data.Vector as V import qualified Network.HTTP.Client as HTTP import Network.Wai (Application) import Servant.Client (BaseUrl(..), C...
null
https://raw.githubusercontent.com/kadena-io/chainweb-node/5620ca748249a0ab63bb5c1f85215e41ea1a5549/test/Chainweb/Test/Mempool/RestAPI.hs
haskell
internal modules ---------------------------------------------------------------------------- allow remoteMp to call the local mempool's getBlock (for testing) ttl seconds max entries ---------------------------------------------------------------------------- ununsed
module Chainweb.Test.Mempool.RestAPI (tests) where import Control.Concurrent import Control.Concurrent.STM import Control.Exception import qualified Data.Pool as Pool import qualified Data.Vector as V import qualified Network.HTTP.Client as HTTP import Network.Wai (Application) import Servant.Client (BaseUrl(..), C...
53b6e1c37df81a586ce9c3711f7fbef21507f3da21f520a279dc65459af61014
ahefner/mixalot
flac-stream.lisp
Mixalot FLAC streaming Copyright ( c ) 2010 , Sumant S.R. Oemrawsingh ;;;; Permission is hereby granted, free of charge, to any person obtaining ;;;; a copy of this software and associated documentation files (the " Software " ) , to deal in the Software without restriction , including ;;;; without limitation...
null
https://raw.githubusercontent.com/ahefner/mixalot/4b184c882ac8a96971a4756362bfee0a842a6191/flac-stream.lisp
lisp
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, to the following conditions: The above copyright notice and this permission notice shall be EXPRESS OR IMPLIED,...
Mixalot FLAC streaming Copyright ( c ) 2010 , Sumant S.R. Oemrawsingh " Software " ) , to deal in the Software without restriction , including distribute , sublicense , and/or sellcopies of the Software , and to permit persons to whom the Software is furnished to do so , subject included in all copies ...
621576816536efd8df814954806eff24e9cf793d5be4e301e99bb769befdd718
antono/guix-debian
gnuzilla.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2013 < > Copyright © 2013 < > ;;; ;;; 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 ; ei...
null
https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/gnu/packages/gnuzilla.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 © 2013 < > Copyright © 2013 < > 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 (gnu packages gnuzilla) #:use-module (gnu packages) #:use-module ((gu...
41162fdd935c6a7fa0f322ffcf7b905ff52e5cc68241b43b00a274e13d2c9079
JeffreyBenjaminBrown/hode
TSort.hs
-- | PITFALL: Some of these tests are manual. # LANGUAGE ScopedTypeVariables # module Hode.Test.Rslt.TSort where import Data.Either import qualified Data.Set as S import qualified Data.Map as M import Test.HUnit import Hode.Rslt.Types import Hode.Rslt.Index import Hode.Rslt.Lookup.Convert import...
null
https://raw.githubusercontent.com/JeffreyBenjaminBrown/hode/79a54a6796fa01570cde6903b398675c42954e62/hode-test/Hode/Test/Rslt/TSort.hs
haskell
| PITFALL: Some of these tests are manual. the same graph, built in another order | Can I sort a set of nodes when the `Tplt` being sorted by is among them? template string the prefix relationship | Without graph isomorphism, this test is too brittle to automate. manual test (as opposed to the tops) see `test_...
# LANGUAGE ScopedTypeVariables # module Hode.Test.Rslt.TSort where import Data.Either import qualified Data.Set as S import qualified Data.Map as M import Test.HUnit import Hode.Rslt.Types import Hode.Rslt.Index import Hode.Rslt.Lookup.Convert import Hode.Rslt.Binary import Hode.Rslt.Sort import...
d2175e9f6192c592eddc9473f278c56c00257af12d006a8f5f557b36b0ea5edf
grin-compiler/ghc-wpc-sample-programs
ImageSize.hs
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, CPP #-} {-# LANGUAGE ViewPatterns #-} # OPTIONS_GHC -fno - warn - type - defaults # | Module : Text . Pandoc . ImageSize Copyright : Copyright ( C ) 2011 - 2020 License : GNU GPL , version 2 or above Maintainer : < > Stability ...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/src/Text/Pandoc/ImageSize.hs
haskell
# LANGUAGE OverloadedStrings, ScopedTypeVariables, CPP # # LANGUAGE ViewPatterns # quick and dirty functions to get image sizes algorithms borrowed from wwwis.pl JFIF | Calculate (height, width) in points using the image file's dpi metadata, | Calculate (height, width) in points, considering the desired dimen...
# OPTIONS_GHC -fno - warn - type - defaults # | Module : Text . Pandoc . ImageSize Copyright : Copyright ( C ) 2011 - 2020 License : GNU GPL , version 2 or above Maintainer : < > Stability : alpha Portability : portable Functions for determining the size of a PNG , JPEG , or GI...
d0bbb04cf333760c1ff1edbf5e296a64162819ae57d3fa49248fba7dc7e42f18
stjahns/ripple
components.clj
(ns ripple.components (:require [brute.entity :refer :all] [ripple.assets :as a]) (:import [clojure.lang PersistentArrayMap PersistentHashMap] [com.badlogic.gdx.math Matrix3 Vector2])) (defn destroy-entity "Completely destroys an entity and all its components" [system entity] (let [com...
null
https://raw.githubusercontent.com/stjahns/ripple/fdb4a8a29141ad5b46ec0560c329033b893eb319/src/ripple/components.clj
clojure
Tell brute.entity to use value for :type in a component map to differentiate component types
(ns ripple.components (:require [brute.entity :refer :all] [ripple.assets :as a]) (:import [clojure.lang PersistentArrayMap PersistentHashMap] [com.badlogic.gdx.math Matrix3 Vector2])) (defn destroy-entity "Completely destroys an entity and all its components" [system entity] (let [com...
d7cfd39d25b185e37e94e8c358c668e89c3da7992c2a498ee36e15f7ef5afbc0
haskell/cabal
Get.hs
{-# LANGUAGE ScopedTypeVariables, FlexibleContexts #-} module UnitTests.Distribution.Client.Get (tests) where import Distribution.Client.Get import Distribution.Types.PackageId import Distribution.Types.PackageName import Distribution.Types.SourceRepo (SourceRepo (..), emptySourceRepo, RepoKind (..), RepoType (..), K...
null
https://raw.githubusercontent.com/haskell/cabal/c21dbcd2a9d54962eb39f598dfce2d012ff7fd1c/cabal-install/tests/UnitTests/Distribution/Client/Get.hs
haskell
# LANGUAGE ScopedTypeVariables, FlexibleContexts # for debugging try verbose ------------------------------------------------------------ * Unit tests ------------------------------------------------------------ isfile ------------------------------------------------------------ --------------------------------...
module UnitTests.Distribution.Client.Get (tests) where import Distribution.Client.Get import Distribution.Types.PackageId import Distribution.Types.PackageName import Distribution.Types.SourceRepo (SourceRepo (..), emptySourceRepo, RepoKind (..), RepoType (..), KnownRepoType (..)) import Distribution.Client.Types.Sou...
a4846c7d84cbd8ced57ef7bca1be44005ae7ceb8f00a04c5933d49409a648ff8
thomasvergne/love
Mapping.hs
module Core.Import.Mapping where import qualified Data.Map as M import Core.Parser.AST import Core.Parser.Parser import System.FilePath import Text.Parsec.Error import Data.Foldable type Path = String type ImportMap = M.Map String Statement insertImport :: (String, Statement) -> ImportMap -> ImportM...
null
https://raw.githubusercontent.com/thomasvergne/love/4c5bd28e67567d2f1d15ec1a10864ef47af1bbd8/app/Core/Import/Mapping.hs
haskell
module Core.Import.Mapping where import qualified Data.Map as M import Core.Parser.AST import Core.Parser.Parser import System.FilePath import Text.Parsec.Error import Data.Foldable type Path = String type ImportMap = M.Map String Statement insertImport :: (String, Statement) -> ImportMap -> ImportM...
bb3e0378281a357055215af34616bbb31529c74726e0731b677ff479fa859875
Clozure/ccl
new-cocoa-bindings.lisp
(in-package :easygui) ;;; Helper types: ;;; point: (defclass eg-point () ((x :initarg :x :reader point-x) (y :initarg :y :reader point-y))) (defun point (x y) (assert (>= x 0)) (assert (>= y 0)) (make-instance 'eg-point :x x :y y)) (defmethod print-object ((o eg-point) s) (print-unreadable-object...
null
https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/examples/cocoa/easygui/new-cocoa-bindings.lisp
lisp
Helper types: point: range: does n't work Memory management helpers: debug macro for #/ funcalls: Running things on the main thread: Getting views from objc objects:
(in-package :easygui) (defclass eg-point () ((x :initarg :x :reader point-x) (y :initarg :y :reader point-y))) (defun point (x y) (assert (>= x 0)) (assert (>= y 0)) (make-instance 'eg-point :x x :y y)) (defmethod print-object ((o eg-point) s) (print-unreadable-object (o s :identity nil :type t) ...
e3e28bb0e46ee0e9698dc677ceec615b2b0e5304f931566477c65bbf699512b9
c-cube/ocaml-containers
run_benchs.ml
(** Generic benchs *) [@@@warning "-5"] module B = Benchmark let ( @> ) = B.Tree.( @> ) let ( @>> ) = B.Tree.( @>> ) let ( @>>> ) = B.Tree.( @>>> ) let ( |> ) = CCFun.( |> ) module Int_map = Map.Make (CCInt) let app_int f n = string_of_int n @> lazy (f n) let app_ints f l = B.Tree.concat (List.map (app_int f) l) ...
null
https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/benchs/run_benchs.ml
ocaml
* Generic benchs for benchmark composition MAP FLAT MAP RANDOM ACCESS let v = CCFun_vec.of_list l in TODO let ral = ref CCRAL.empty in and bench_ral l () = (* Note: Better implementation probably possible ; "RAL.append", bench_ral ral, () too slow MAIN left pointer rig...
[@@@warning "-5"] module B = Benchmark let ( @> ) = B.Tree.( @> ) let ( @>> ) = B.Tree.( @>> ) let ( @>>> ) = B.Tree.( @>>> ) let ( |> ) = CCFun.( |> ) module Int_map = Map.Make (CCInt) let app_int f n = string_of_int n @> lazy (f n) let app_ints f l = B.Tree.concat (List.map (app_int f) l) let repeat = 3 let ( ...
5271820d784e74f6b1ca45c6143bf11cc86880ad465f29d4567a3a4acd980a40
TrustInSoft/tis-interpreter
widen.mli
Modified by TrustInSoft (**************************************************************************) (* *) This file is part of Frama - C. (* ...
null
https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/value/utils/widen.mli
ocaml
************************************************************************ alternatives) ...
Modified by TrustInSoft This file is part of Frama - C. Copyright ( C ) 2007 - 2015 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Softwa...
bf47f5edbe308b18531aebd9d0fdeff34e07d28f646778dd2b51cdcdc474d7e6
lambdaclass/holiday_pinger
password_reset_handler.erl
-module(password_reset_handler). -export([init/3, allowed_methods/2, content_types_provided/2, content_types_accepted/2, from_json/2]). init(_Transport, _Req, []) -> {upgrade, protocol, cowboy_rest}. allowed_methods(Req, State) -> {[<<"POST">>], Req, State}. content_types_...
null
https://raw.githubusercontent.com/lambdaclass/holiday_pinger/a8a6d1e28de57cf24d6205d275981a718305b351/src/handlers/password_reset_handler.erl
erlang
-module(password_reset_handler). -export([init/3, allowed_methods/2, content_types_provided/2, content_types_accepted/2, from_json/2]). init(_Transport, _Req, []) -> {upgrade, protocol, cowboy_rest}. allowed_methods(Req, State) -> {[<<"POST">>], Req, State}. content_types_...
fee58263d6533d3817f293a8a9c82cea6fe2576c0eefc46cd1ca1d5e9e14c844
avsm/mirage-duniverse
events_lwt_unix.mli
* Copyright ( c ) 2014 Citrix Systems Inc * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS ...
null
https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/vchan/lwt/events_lwt_unix.mli
ocaml
* Copyright ( c ) 2014 Citrix Systems Inc * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS ...
4f46b22280125d56e4b5970e0be964750b9db15d2c3bc12ee0234e0e62990ac2
diagrams/diagrams-solve
Test.hs
module Main where import Data.List (sort) import Diagrams.Solve.Polynomial import Test.Tasty (defaultMain, testGroup, TestTree) import Test.Tasty.QuickCheck tests :: TestTree tests = testGroup "Solve" [ testProperty "solutions found satisfy quadratic equation" $ \a b c -> let sat x = a *...
null
https://raw.githubusercontent.com/diagrams/diagrams-solve/c6fa6ab304cd155cb4e06ee607cb3f120ef22ee7/tests/Test.hs
haskell
could verify number of solutions, but we would just duplicate the function definition some specific examples and regression tests
module Main where import Data.List (sort) import Diagrams.Solve.Polynomial import Test.Tasty (defaultMain, testGroup, TestTree) import Test.Tasty.QuickCheck tests :: TestTree tests = testGroup "Solve" [ testProperty "solutions found satisfy quadratic equation" $ \a b c -> let sat x = a *...
85d46fb066e8bcb3945ac75649d4d78aa0c57f722bc56f06c3726c0491ef78eb
input-output-hk/cardano-base
Hash.hs
-- | Hashing functionality. module Cardano.Crypto.Hash ( module X ) where import Cardano.Crypto.Hash.Blake2b as X import Cardano.Crypto.Hash.Class as X import Cardano.Crypto.Hash.NeverUsed as X import Cardano.Crypto.Hash.SHA256 as X import Cardano.Crypto.Hash.SHA3_256 as X import Cardano.Crypto.Hash.Short as X imp...
null
https://raw.githubusercontent.com/input-output-hk/cardano-base/cb0f19c85e5bb5299839ad4ed66af6fa61322cc4/cardano-crypto-class/src/Cardano/Crypto/Hash.hs
haskell
| Hashing functionality.
module Cardano.Crypto.Hash ( module X ) where import Cardano.Crypto.Hash.Blake2b as X import Cardano.Crypto.Hash.Class as X import Cardano.Crypto.Hash.NeverUsed as X import Cardano.Crypto.Hash.SHA256 as X import Cardano.Crypto.Hash.SHA3_256 as X import Cardano.Crypto.Hash.Short as X import Cardano.Crypto.Hash.Kecc...
0ab2cf565cbc84e49622233aa41913e36c8a9a78e183669a0e04bd3db4b0ba2c
developandplay/material-components-web-miso
Internal.hs
{-# LANGUAGE OverloadedStrings #-} module Material.Tab.Internal ( Config (..), Content (..), Icon (..), Tab (..), ) where import Data.Void as Void import qualified Miso data Config msg = Config { active :: Bool, additionalAttributes :: [Miso.Attribute msg], onClick :: Maybe msg, content...
null
https://raw.githubusercontent.com/developandplay/material-components-web-miso/97a20097bf522b62743c884b66757eb895edd690/sample-app-jsaddle/Material/Tab/Internal.hs
haskell
# LANGUAGE OverloadedStrings #
module Material.Tab.Internal ( Config (..), Content (..), Icon (..), Tab (..), ) where import Data.Void as Void import qualified Miso data Config msg = Config { active :: Bool, additionalAttributes :: [Miso.Attribute msg], onClick :: Maybe msg, content :: Content } data Content = Con...
40129bf3c1b63a4db8295a7b242046e6345b12ad63712237140d2dd352644f2d
mirage/functoria
test_full.ml
* Copyright ( c ) 2015 * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR ...
null
https://raw.githubusercontent.com/mirage/functoria/c2ac15c8d12cf14ce958e56c39d5cfa992a21972/tests/test_full.ml
ocaml
cut a man page into sections check that configure generates the file in the right dir when --build-dir is passed. FIXME: add a .mirage-ignore file to avoid this check that configure is writting the correct .mirage.config file check that `test help configure` and `test configure --help` have the ...
* Copyright ( c ) 2015 * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR ...
55d28fd042175a33e5b0daab07d7d51a5c4d538e7179617b82d15b7385b581d7
Frama-C/Frama-C-snapshot
intra.ml
let () = Db.Main.extend (fun _ -> ignore (Sparecode.Register.get true true))
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/tests/journal/intra.ml
ocaml
let () = Db.Main.extend (fun _ -> ignore (Sparecode.Register.get true true))
cbe9756c9b79639d67412c2b0b1b9be53ab0c15510ebf3d23b3e5bba8e6bc4fd
steinuil/xobl
elaborate_output.ml
let modules = [ "bigreq"; "composite"; "damage"; "dpms"; "dri2"; "dri3"; "ge"; "glx"; "present"; "randr"; "record"; "render"; "res"; "screensaver"; "shape"; "shm"; "sync"; "xc_misc"; "xevie"; "xf86dri"; "xf86vidmode"; "xfixes"; ...
null
https://raw.githubusercontent.com/steinuil/xobl/a5480d9ed51c6b9a51b3a7aa41f246a47ce1ecda/test/elaborate_output.ml
ocaml
let modules = [ "bigreq"; "composite"; "damage"; "dpms"; "dri2"; "dri3"; "ge"; "glx"; "present"; "randr"; "record"; "render"; "res"; "screensaver"; "shape"; "shm"; "sync"; "xc_misc"; "xevie"; "xf86dri"; "xf86vidmode"; "xfixes"; ...
05283b69e7257bbded300afd010e9305fc6da9cc5cc58854e6ae2c19b3cb9fdc
modular-macros/ocaml-macros
is_static_flambda.ml
(* Data that should be statically allocated by the compiler (flambda only) *) external is_in_static_data : 'a -> bool = "caml_is_in_static_data" (* Also after inlining *) let g x = let block = (1,x) in assert(is_in_static_data block) let () = (g [@inlined always]) 2 Toplevel immutable blocks should be static ...
null
https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/asmcomp/is_static_flambda.ml
ocaml
Data that should be statically allocated by the compiler (flambda only) Also after inlining Not being bound shouldn't prevent it Also after inlining Recursive constant values should be static And a mix Also in functions Top-level modules should be static Not constant let rec to test extraction to initi...
external is_in_static_data : 'a -> bool = "caml_is_in_static_data" let g x = let block = (1,x) in assert(is_in_static_data block) let () = (g [@inlined always]) 2 Toplevel immutable blocks should be static let block3 = (Sys.opaque_identity 1, Sys.opaque_identity 2) let () = assert(is_in_static_data block3) l...
372b39aa2bd00ba6cc5b2dd3ea3eff71d3d9122803a94dea711dfa09cc8d8804
cosmos72/hyperluminal-mem
list.lisp
;; -*- lisp -*- ;; This file is part of Hyperluminal-mem. Copyright ( c ) 2013 - 2015 ;; ;; This library is free software: you can redistribute it and/or modify it under the terms of the Lisp Lesser General Public License ;; (), known as the LLGPL. ;; ;; This library is distributed in the hope that it will be us...
null
https://raw.githubusercontent.com/cosmos72/hyperluminal-mem/29c23361260e3a94fb1e09f3fdeab469b035504d/mem/box/list.lisp
lisp
-*- lisp -*- This file is part of Hyperluminal-mem. This library is free software: you can redistribute it and/or (), known as the LLGPL. This library 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 PU...
Copyright ( c ) 2013 - 2015 modify it under the terms of the Lisp Lesser General Public License (in-package :hyperluminal-mem) (defun msize-box/list (index list) "Return the number of words needed to store LIST in mmap memory, not including BOX header." (declare (type list list)) (incf-mem-size ind...
c932e168e8bd262fd564f888b05f42a3755d8f3bf2d06e4d569eaf55c9e1e5fc
ddmcdonald/sparser
single-quote.lisp
;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*- copyright ( c ) 1991 - 1995,2012 - 2021 -- all rights reserved ;;; ;;; File: "single quote" Module : " grammar;rules : FSAs : " Version : December 2021 initiated 4/23/91 v1.8.4 , tweeked 4/24,25 , Comment added 1/3/92 1.0 ( 1...
null
https://raw.githubusercontent.com/ddmcdonald/sparser/cc4e343092cb4a2a0008cdac43fa0756aebb68d6/Sparser/code/s/grammar/rules/fsas/single-quote.lisp
lisp
-*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*- File: "single quote" An apostrophe can indicate a contraction ('He can't go'), or it can function like a quotation mark (double quote) and delimit a portion of the text, either acting as 'scare quote' to provide emphasis, or over longer spans...
copyright ( c ) 1991 - 1995,2012 - 2021 -- all rights reserved Module : " grammar;rules : FSAs : " Version : December 2021 initiated 4/23/91 v1.8.4 , tweeked 4/24,25 , Comment added 1/3/92 1.0 ( 11/24/92 v2.3 ) Flushed the old use of fake names as referents 1.1 ( 7/25/94 ) added 're ' and 'll '...
f3ec36f87a8fe2cacc75f4f69434c7633694800297ab34437a67fb12fa14838d
binaryage/chromex
chromeos_info_private.cljs
(ns chromex.app.chromeos-info-private (:require-macros [chromex.app.chromeos-info-private :refer [gen-wrap]]) (:require [chromex.core])) -- functions -------------------------------------------------------------------------------------------------------------- (defn get* [config property-names] (gen-wrap :fun...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/apps_private/chromex/app/chromeos_info_private.cljs
clojure
(ns chromex.app.chromeos-info-private (:require-macros [chromex.app.chromeos-info-private :refer [gen-wrap]]) (:require [chromex.core])) -- functions -------------------------------------------------------------------------------------------------------------- (defn get* [config property-names] (gen-wrap :fun...
d3a1ad13327d9286e4a14f0d2ca43c6703eb8546fca1fb5ffbdc5a43dc8e9d84
karamellpelle/grid
EmptyWidget.hs
grid is a game written in Haskell Copyright ( C ) 2018 -- -- This file is part of grid. -- -- grid is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or -- (at your optio...
null
https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/source/Game/GUI/Widget/EmptyWidget.hs
haskell
This file is part of grid. grid is free software: you can redistribute it and/or modify (at your option) any later version. grid 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 GN...
grid is a game written in Haskell Copyright ( C ) 2018 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 Game.GUI.Widget.EmptyWidget ( EmptyWid...
2755a83e184f85d88278de798725da8165521fb0b740a94a82626e0ff9b2a6ab
hjcapple/reading-sicp
exercise_3_54.scm
#lang racket P230 - [ 练习 3.54 ] (require "stream.scm") (require "infinite_stream.scm") ;;;;;;;;;;;;;;;;;;;;;;;;;;; (define (mul-streams s1 s2) (stream-map * s1 s2)) (define factorials (cons-stream 1 (mul-streams factorials (stream-cdr integers)))) ; 1 2 6 24 120 720 ... = factorials * ...
null
https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_3/exercise_3_54.scm
scheme
----------------------------------------------
#lang racket P230 - [ 练习 3.54 ] (require "stream.scm") (require "infinite_stream.scm") (define (mul-streams s1 s2) (stream-map * s1 s2)) (define factorials (cons-stream 1 (mul-streams factorials (stream-cdr integers)))) 1 2 6 24 120 720 ... = factorials * 2 3 4 5 6 7 ...
8568ae09d8d10677cabd084853968e15b836e08ca61d020e0b84be456a464d41
brick-lang/kekka
infer.ml
open Core open Common open Common.ConcreteSyntax open Heart open InferKind Responsibilities of the kind checker : * - Kindcheck all types in the program * - Translate user types to internal types * - Collect lists of data types , synonyms and constructors * - Expand all synonyms ( i.e. , replace ` id(int...
null
https://raw.githubusercontent.com/brick-lang/kekka/7ede659ffb49959b140e6ab0a72d38ff6c63311b/kindEngine/infer.ml
ocaml
* * `resolve_type` takes: a map from locally quantified type name variables to types, * a boolean that is `true` if partially applied type synonyms are allowed (i.e. when * these are arguments to type synonyms themselves), a user type with inference kinds, * and it returns a fully resolved type. Kind/Infer.hs:944...
open Core open Common open Common.ConcreteSyntax open Heart open InferKind Responsibilities of the kind checker : * - Kindcheck all types in the program * - Translate user types to internal types * - Collect lists of data types , synonyms and constructors * - Expand all synonyms ( i.e. , replace ` id(int...
756eb7bbed3983a03b527384841625b54e3e2290b76e08051f1a480d95169151
craigfe/oskel
validate.ml
let project s = let s = String.trim s in if String.length s = 0 then Error (`Msg "Project name cannot be empty") else if String.contains s ' ' then Error (`Msg "Project name cannot contain spaces") else Ok s
null
https://raw.githubusercontent.com/craigfe/oskel/057129faaf8171ff4ed49022346e9179b04735b2/lib/validate.ml
ocaml
let project s = let s = String.trim s in if String.length s = 0 then Error (`Msg "Project name cannot be empty") else if String.contains s ' ' then Error (`Msg "Project name cannot contain spaces") else Ok s
cbf3c3fef64f13c0a73b34a96fb0df8fb862bda83cd07a763b198747beb92447
yoonka/charreada
charreada_handler.erl
Copyright ( c ) 2013 , %% 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 follo...
null
https://raw.githubusercontent.com/yoonka/charreada/34ea687754ce695104251bbaacfe4ce96bae6676/src/charreada_handler.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. Redistributions in bina...
Copyright ( c ) 2013 , 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 , O...
7fd1aa5bccf2211c6e21b9d09820f935467278b4609de05ec9ba5880a5e021e2
mirage/cowabloga
foundation.ml
* Copyright ( c ) 2013 Anil Madhavapeddy < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " A...
null
https://raw.githubusercontent.com/mirage/cowabloga/2c256a92258f012c095bb72edcb639ad2fe164b3/lib/foundation.ml
ocaml
Cannot be inlined below as the $ is interpreted as an antiquotation
* Copyright ( c ) 2013 Anil Madhavapeddy < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " A...
b8bb1e0867fe7fcc8ab578701c7ccbb106415cb80901da7d5ad2a6b4bb5c761f
incoherentsoftware/defect-process
InfoText.hs
module World.UI.InfoText ( InfoTextUI , mkInfoTextUI , updateInfoTextUI , drawInfoTextUI , resetInfoTextUIOnChangeWorldRoom ) where import Control.Monad.IO.Class (MonadIO) import Data.Maybe (fromMaybe) import Data.Foldable (for_) import Data.Functor ((<&>)) import...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/c39ce1f742d32a0ffcde82c03bf872adeb7d9162/src/World/UI/InfoText.hs
haskell
module World.UI.InfoText ( InfoTextUI , mkInfoTextUI , updateInfoTextUI , drawInfoTextUI , resetInfoTextUIOnChangeWorldRoom ) where import Control.Monad.IO.Class (MonadIO) import Data.Maybe (fromMaybe) import Data.Foldable (for_) import Data.Functor ((<&>)) import...
ef73da821745b274b6fcbe3c5eba004cba9b18e6bbe2dc4e95380dec3e449570
c-cube/gen
genM_intf.ml
(* This file is free software, part of gen. See file "license" for more details. *) type 'a gen = unit -> 'a option module type MONAD = sig type +'a t val return : 'a -> 'a t val (>>=) : 'a t -> ('a -> 'b t) -> 'b t val (>|=) : 'a t -> ('a -> 'b) -> 'b t end module type S = sig module M : MONAD type +...
null
https://raw.githubusercontent.com/c-cube/gen/aad7246045a86a9a5a4684359da89d27cf4069b3/src/genM_intf.ml
ocaml
This file is free software, part of gen. See file "license" for more details. * From a generator of actions, return an effectful generator
type 'a gen = unit -> 'a option module type MONAD = sig type +'a t val return : 'a -> 'a t val (>>=) : 'a t -> ('a -> 'b t) -> 'b t val (>|=) : 'a t -> ('a -> 'b) -> 'b t end module type S = sig module M : MONAD type +'a t = unit -> 'a option M.t * A value of type [ ' a t ] is an iterator over values ...
fd17681f64c3b2ee6a24efbd6b5e550ff0e3f0fac1ab1f715a15a1b50a183c20
SjVer/Som-Lang
print_ast.ml
open Ast open ANSITerminal let p i str span = print_string [] (String.make i '\t' ^ str); print_string [Foreground Black] (" @" ^ Span.show_span_debug span); print_newline () (** show functions *) let show_literal = function | LI_Int i -> "Int " ^ string_of_int i | LI_Float f -> "Float " ^ string_of_float ...
null
https://raw.githubusercontent.com/SjVer/Som-Lang/e69be8bad653b0ea3d6c003f3c2e69727b1d541e/somc/lib/parse/print_ast.ml
ocaml
* show functions print functions expose functions
open Ast open ANSITerminal let p i str span = print_string [] (String.make i '\t' ^ str); print_string [Foreground Black] (" @" ^ Span.show_span_debug span); print_newline () let show_literal = function | LI_Int i -> "Int " ^ string_of_int i | LI_Float f -> "Float " ^ string_of_float f | LI_Char c -> "Ch...
e6ee79b82d4781f00989e8e83ff8a953752162881ffc57a65061898ed2228353
anoma/juvix-circuits
dependencies.lisp
(in-package :alu.pass.dependencies) (-> track-circuit-deps* (ir:function-type &optional sycamore:tree-set) list) (defun track-circuit-deps* (circuit &optional (exclusion-set (sycamore:tree-set #'util:hash-compare))) "This ...
null
https://raw.githubusercontent.com/anoma/juvix-circuits/ec926179ef0d876b312e4c685c7b86a24ade020a/src/pass/dependencies.lisp
lisp
this technique doesn't work fully as we'd want a reference to it. we assume that `pass:linearize' has been run
(in-package :alu.pass.dependencies) (-> track-circuit-deps* (ir:function-type &optional sycamore:tree-set) list) (defun track-circuit-deps* (circuit &optional (exclusion-set (sycamore:tree-set #'util:hash-compare))) "This ...
82dc012d8ab65ed219e020b3ce46fc6cb5f9eab445630a575bfb15064d84482c
getsentry/sentry-clj
main.clj
(ns basic.main (:require [clojure.tools.logging :as log] [sentry-clj.core :as sentry])) (defn ^:private create-sentry-logger "Create a Sentry Logger using the supplied `dsn`. If no `dsn` is supplied, simply log the `event` to a `logger`." [{:keys [dsn] :as config}] (if dsn (do (log/infof "Ini...
null
https://raw.githubusercontent.com/getsentry/sentry-clj/78c307b47421ad939bf01edf5567c9f0d862331e/examples/basic/src/basic/main.clj
clojure
Initialise Sentry, returning a function that will later receive an event. "Fire" an event. This logger may be used as part of your normal application flow, perhaps if something interesting happens, you may want Sentry to log it out. Perhaps in a handler that handles (throw (ex-info ..... ))
(ns basic.main (:require [clojure.tools.logging :as log] [sentry-clj.core :as sentry])) (defn ^:private create-sentry-logger "Create a Sentry Logger using the supplied `dsn`. If no `dsn` is supplied, simply log the `event` to a `logger`." [{:keys [dsn] :as config}] (if dsn (do (log/infof "Ini...
ce6b7434dc8aeaa9301e4eefe13f63b46d7e167daef332cf32fdfa28ac836c7b
jackfirth/racket-mock
stub.rkt
#lang racket/base (provide stub (struct-out exn:fail:not-implemented)) (require syntax/parse/define "not-implemented.rkt" (for-syntax "stub-class.rkt")) (module+ test (require racket/function rackunit)) (define-simple-macro (stub stubs:stubs) stubs.definitions) (module+ tes...
null
https://raw.githubusercontent.com/jackfirth/racket-mock/5e8e2a1dd125e5e437510c87dabf903d0ec25749/mock/private/stub.rkt
racket
#lang racket/base (provide stub (struct-out exn:fail:not-implemented)) (require syntax/parse/define "not-implemented.rkt" (for-syntax "stub-class.rkt")) (module+ test (require racket/function rackunit)) (define-simple-macro (stub stubs:stubs) stubs.definitions) (module+ tes...
e6820e06732e28e16778b66040538af021d42add9bb75f7cb1c84d5849c11298
mzp/msgpack-ocaml
myocamlbuild.ml
OASIS_START DO NOT EDIT ( digest : 38d7d926071e65ec3224081254cb7fed ) module OASISGettext = struct # 21 " /home / mzp/.opam / system / build / oasis.0.3.0 / src / oasis / OASISGettext.ml " let ns_ str = str let s_ str = str let f_ (str : ('a, 'b, 'c, 'd) format4) = str let fn_ fmt1 fmt2 n ...
null
https://raw.githubusercontent.com/mzp/msgpack-ocaml/acfbfcbcc62a4f69f9fd024e28e42086048a9f16/myocamlbuild.ml
ocaml
these functions are not really officially exported this lists all supported packages this is supposed to list available syntaxes, but I don't know how to do it. ocamlfind command by using Before_options one let command line options have an higher priority on the contrary using After_options will guarantee to...
OASIS_START DO NOT EDIT ( digest : 38d7d926071e65ec3224081254cb7fed ) module OASISGettext = struct # 21 " /home / mzp/.opam / system / build / oasis.0.3.0 / src / oasis / OASISGettext.ml " let ns_ str = str let s_ str = str let f_ (str : ('a, 'b, 'c, 'd) format4) = str let fn_ fmt1 fmt2 n ...
6958f74d2eb940a01824e6191f6fea39f46dc066248d536ee1656e144e28f25b
gedge-platform/gedge-platform
rabbit_mgmt_wm_parameter.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . %% -module(rabbit_mgmt_wm_parameter). -export([init...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_management/src/rabbit_mgmt_wm_parameter.erl
erlang
-------------------------------------------------------------------- --------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit_mgmt_wm_parameter). -export([init/2, re...
9488bd9491ab5510e204071f0cf8114b6437909c1f6138d0ef06f42fea501d9c
serokell/importify
31-UnknownImplicit.hs
module UnknownImplicit where import UnknownModuleName
null
https://raw.githubusercontent.com/serokell/importify/09f31d851b2152ae6ce880b81abc3554ade29f37/test/test-data/base%40basic/31-UnknownImplicit.hs
haskell
module UnknownImplicit where import UnknownModuleName
58291d6edd4e77b929b77dfebc9fd3ca7549eb79bbaca4f683672588d3766aec
mu-chaco/ReWire
Unbound.hs
{-# LANGUAGE StandaloneDeriving, DeriveDataTypeable #-} # LANGUAGE Trustworthy # # OPTIONS_GHC -fno - warn - orphans # module ReWire.Unbound ( module Unbound.Generics.LocallyNameless.Internal.Fold , Alpha (..), Fresh (..), FreshMT (..), Embed (..) , TRec (..), Bind (..) , Subst (..), SubstName (...
null
https://raw.githubusercontent.com/mu-chaco/ReWire/b04686a4cd6cb36ca9976a4b6c42bc195ce69462/src/ReWire/Unbound.hs
haskell
# LANGUAGE StandaloneDeriving, DeriveDataTypeable #
# LANGUAGE Trustworthy # # OPTIONS_GHC -fno - warn - orphans # module ReWire.Unbound ( module Unbound.Generics.LocallyNameless.Internal.Fold , Alpha (..), Fresh (..), FreshMT (..), Embed (..) , TRec (..), Bind (..) , Subst (..), SubstName (..) , runFreshM, runFreshMT, fv, fvAny, aeq ...
783cfd8a1f5b3ec9de71cc6564569b1bcf27516508eca0f021a752c539c1099f
matsen/pplacer
gstar_support.ml
open Ppatteries module BA = Bigarray module BA1 = BA.Array1 module BA2 = BA.Array2 module BA3 = BA.Array3 module GA = BA.Genarray let log_of_2 = log 2. let safe_hashtbl_find h k = try Hashtbl.find h k with | Not_found -> failwith ("'"^k ^"' not found in the model!") (* integer big arrays *) let iba1_create = BA...
null
https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/pplacer_src/gstar_support.ml
ocaml
integer big arrays total all of the stored exponents. we use a float to avoid overflow. The sum of the unmasked entries of e. total all of the stored exponents in a specified range. multiply by a tensor iter over rates int and nativeint _should_ be the same size
open Ppatteries module BA = Bigarray module BA1 = BA.Array1 module BA2 = BA.Array2 module BA3 = BA.Array3 module GA = BA.Genarray let log_of_2 = log 2. let safe_hashtbl_find h k = try Hashtbl.find h k with | Not_found -> failwith ("'"^k ^"' not found in the model!") let iba1_create = BA1.create BA.int BA.c_layo...
6df789ecb5f4f5e9ce6e7a02cef5ac0bc22662bb103df03919f02436f822ca04
ertugrulcetin/herfi
nrepl.clj
(ns herfi.nrepl (:require [clojure.tools.logging :as log] [nrepl.server :as nrepl])) (defn start "Start a network repl for debugging on specified port followed by an optional parameters map. The :bind, :transport-fn, :handler, :ack-port and :greeting-fn will be forwarded to clojure.tools.nrepl.server...
null
https://raw.githubusercontent.com/ertugrulcetin/herfi/b5384d56c3e56c29ed82deafc4e56ad19ec12a60/src/clj/herfi/nrepl.clj
clojure
(ns herfi.nrepl (:require [clojure.tools.logging :as log] [nrepl.server :as nrepl])) (defn start "Start a network repl for debugging on specified port followed by an optional parameters map. The :bind, :transport-fn, :handler, :ack-port and :greeting-fn will be forwarded to clojure.tools.nrepl.server...
f00c943f6fa0f2deedc302a7741950dcaa769595ad0fff0560ea3bc8aeb0c66c
funcool/cuerdas
core.cljc
Copyright ( c ) < > ;; 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 fol...
null
https://raw.githubusercontent.com/funcool/cuerdas/8d517f726b1f5c4e5fe2cabe440d63208101ec1a/src/cuerdas/core.cljc
clojure
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. * Redistributions ...
Copyright ( c ) < > 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 , OR ...
dd73c90bfe3c57ee4584e61472bea0f93aa754ba4982f0168a21942f24a29883
NetworkVerification/nv
Integer.ml
type t = { size : Z.t ; value : Z.t } let modulo = Big_int_Z.mod_big_int let pow2 n = Z.pow (Z.of_int 2) (Z.to_int n) let mod_by_size (x : t) : t = { size = x.size; value = modulo x.value (pow2 x.size) } let of_string (s : string) : t = let lst = List.map Z.of_string @@ Str.split (Str.regexp "u") s in match...
null
https://raw.githubusercontent.com/NetworkVerification/nv/aa48abcd1bf9d4b7167cfe83a94b44e446a636e8/src/lib/datastructures/Integer.ml
ocaml
print_endline @@ "of_bv_string: given " ^ s;
type t = { size : Z.t ; value : Z.t } let modulo = Big_int_Z.mod_big_int let pow2 n = Z.pow (Z.of_int 2) (Z.to_int n) let mod_by_size (x : t) : t = { size = x.size; value = modulo x.value (pow2 x.size) } let of_string (s : string) : t = let lst = List.map Z.of_string @@ Str.split (Str.regexp "u") s in match...
af5bc0d70b4d8eacb98faa8e012f7d06a4feac9c15378fb9de2217290422b3fa
johnwhitington/ocamli
scanf.ml
open CamlinternalFormatBasics open CamlinternalFormat module Scanning = struct type file_name = string type in_channel_name = | From_channel of Pervasives.in_channel | From_file of file_name * Pervasives.in_channel | From_function | From_string type in_channel = { mutable ic_eof : bool; ...
null
https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/stdlib/scanf.ml
ocaml
open CamlinternalFormatBasics open CamlinternalFormat module Scanning = struct type file_name = string type in_channel_name = | From_channel of Pervasives.in_channel | From_file of file_name * Pervasives.in_channel | From_function | From_string type in_channel = { mutable ic_eof : bool; ...
d8d5de0a7fb9583df5b737c1a1fe262ccab1368054096ec7acbe2e64bc5c1789
aistrate/Okasaki
UnbalancedSet.hs
-- Source code from -- Purely Functional Data Structures Cambridge University Press , 1998 -- Copyright ( c ) 1998 Cambridge University Press module UnbalancedSet (module Set,UnbalancedSet) where import Set data UnbalancedSet a = E | T (UnbalancedSet a) a (UnbalancedSet a) instance Ord a => Set U...
null
https://raw.githubusercontent.com/aistrate/Okasaki/cc1473c81d053483bb5e327409346da7fda10fb4/Original/UnbalancedSet.hs
haskell
Source code from Purely Functional Data Structures
Cambridge University Press , 1998 Copyright ( c ) 1998 Cambridge University Press module UnbalancedSet (module Set,UnbalancedSet) where import Set data UnbalancedSet a = E | T (UnbalancedSet a) a (UnbalancedSet a) instance Ord a => Set UnbalancedSet a where emptySet = E memberSet x E = Fal...
a27119a2d134406103ee75a93f839f310dfc0dd72870b1f38085b9e75e59a5bd
TheLostLambda/astonish
pal-picker-test.lisp
;; Ensures that pal-picker.lisp and the testing library are always loaded (eval-when (:compile-toplevel :load-toplevel :execute) (load "pal-picker") (ql:quickload :fiveam)) ;; Defines the testing package with symbols from pal-picker and FiveAM in scope ;; The `run-tests` function is exported for use by both the us...
null
https://raw.githubusercontent.com/TheLostLambda/astonish/8d07e7324ebe987e3d1280b291b964d10d20992c/tests/data/pal-picker-test.lisp
lisp
Ensures that pal-picker.lisp and the testing library are always loaded Defines the testing package with symbols from pal-picker and FiveAM in scope The `run-tests` function is exported for use by both the user and test-runner Enter the testing package Define and enter a new FiveAM test-suite Either provides human...
(eval-when (:compile-toplevel :load-toplevel :execute) (load "pal-picker") (ql:quickload :fiveam)) (defpackage :pal-picker-test (:use :cl :fiveam :pal-picker) (:export :run-tests)) (in-package :pal-picker-test) (def-suite pal-picker-suite) (in-suite pal-picker-suite) (test pick-a-pal "Maps personality trait...
0b5542d9f2c289b53322f7ec17cc7123f8f5c68cb6da01926da26206571c9476
ocaml-community/yojson
testable.ml
let yojson = Alcotest.testable Yojson.Safe.pp Yojson.Safe.equal let variant_kind_pp fmt = function | `Edgy_bracket -> Format.fprintf fmt "`Edgy_bracket" | `Square_bracket -> Format.fprintf fmt "`Square_bracket" | `Double_quote -> Format.fprintf fmt "`Double_quote" let variant_kind_equal a b = match (a, b) wit...
null
https://raw.githubusercontent.com/ocaml-community/yojson/a3fbc94d1d57bcacb00d3b1b9ec4aa602326a4d0/test/testable.ml
ocaml
let yojson = Alcotest.testable Yojson.Safe.pp Yojson.Safe.equal let variant_kind_pp fmt = function | `Edgy_bracket -> Format.fprintf fmt "`Edgy_bracket" | `Square_bracket -> Format.fprintf fmt "`Square_bracket" | `Double_quote -> Format.fprintf fmt "`Double_quote" let variant_kind_equal a b = match (a, b) wit...
dad9fa901864e277faa3be36e2eac5fe0af5fedf4b0c995ab17b7b8c456adc57
openmusic-project/openmusic
cffi-openmcl.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; ;;; cffi-openmcl.lisp --- CFFI-SYS implementation for OpenMCL. ;;; Copyright ( C ) 2005 - 2006 , < > ;;; ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a copy of this software and associated documentation files ( the " Software "...
null
https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/api/foreign-interface/ffi/CFFI/src/cffi-openmcl.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- cffi-openmcl.lisp --- CFFI-SYS implementation for OpenMCL. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publi...
Copyright ( C ) 2005 - 2006 , < > files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , # Administri...
d4705051d1ce9e5158864a21755f46aaefda2c11bbf2337ddf87b799bfb260f5
cj1128/sicp-review
3.29.scm
Exercise 3.29 ;; Build or-gate using and-gate and inverter (define (or-gate a1 a2 output) (let ((c1 (make-wire)) (c2 (make-wire)) (c3 (make-wire))) (inverter a1 c1) (inverter a2 c2) (and-gate c1 c2 c3) (inverter c3 output))) ;; delay is the sum of and-gate-delay plus twice or-gate-dela...
null
https://raw.githubusercontent.com/cj1128/sicp-review/efaa2f863b7f03c51641c22d701bac97e398a050/chapter-3/3.3/3.29.scm
scheme
Build or-gate using and-gate and inverter delay is the sum of and-gate-delay plus twice or-gate-delay
Exercise 3.29 (define (or-gate a1 a2 output) (let ((c1 (make-wire)) (c2 (make-wire)) (c3 (make-wire))) (inverter a1 c1) (inverter a2 c2) (and-gate c1 c2 c3) (inverter c3 output)))
d0f40a95b1e3d525eac9893ad239dec1aaaeb2eb073265f37f7b25b883f06c3d
ocaml-ppx/ppx_tools_versioned
ast_mapper_class_404.mli
open Migrate_parsetree.Ast_404 (* This file is part of the ppx_tools package. It is released *) under the terms of the MIT license ( see LICENSE file ) . Copyright 2013 and LexiFi (** Class-based customizable mapper *) open Parsetree class mapper: object method attrib...
null
https://raw.githubusercontent.com/ocaml-ppx/ppx_tools_versioned/00a0150cdabfa7f0dad2c5e0e6b32230d22295ca/ast_mapper_class_404.mli
ocaml
This file is part of the ppx_tools package. It is released * Class-based customizable mapper
open Migrate_parsetree.Ast_404 under the terms of the MIT license ( see LICENSE file ) . Copyright 2013 and LexiFi open Parsetree class mapper: object method attribute: attribute -> attribute method attributes: attribute list -> attribute list method case: case -...
f6fea06c5206dc11d77ca08e6955103180d81417a6a2f283ff91672853ccc6c4
raimohanska/reactive-bacon
PushStream.hs
module Reactive.Bacon.PushStream(newPushStream, newDispatcher, wrap) where import Reactive.Bacon.Core import Data.IORef import Control.Monad data Subscription a = Subscription (EventSink a) Int instance Eq (Subscription q) where (==) (Subscription _ a) (Subscription _ b) = a == b data PushCollection a = PushColle...
null
https://raw.githubusercontent.com/raimohanska/reactive-bacon/1d8c301c7215f20e436e1465726fc98419abd43d/src/Reactive/Bacon/PushStream.hs
haskell
| Makes an observable with a single connection to the underlying EventSource.
module Reactive.Bacon.PushStream(newPushStream, newDispatcher, wrap) where import Reactive.Bacon.Core import Data.IORef import Control.Monad data Subscription a = Subscription (EventSink a) Int instance Eq (Subscription q) where (==) (Subscription _ a) (Subscription _ b) = a == b data PushCollection a = PushColle...
750f6f8dfe5c309409305e4d7e4fc94bf3d68f09398f956be562f1e8b2b302ac
clash-lang/clash-prelude
ClockGen.hs
| Copyright : ( C ) 2017 , Google Inc License : BSD2 ( see the file LICENSE ) Maintainer : < > PLL and other clock - related components for Xilinx FPGAs Copyright : (C) 2017, Google Inc License : BSD2 (see the file LICENSE) Maintainer : Christiaan Baaij <> PLL and other clock-related c...
null
https://raw.githubusercontent.com/clash-lang/clash-prelude/5645d8417ab495696cf4e0293796133c7fe2a9a7/src/Clash/Xilinx/ClockGen.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE ExplicitForAll # a single free-running input Only works when configured with: * a reset port * a locked port You must use type applications to specify the output clock domain, e.g.: @ outputs a clock running at 100 MHz @ ^ Name of the component, must correspond to th...
| Copyright : ( C ) 2017 , Google Inc License : BSD2 ( see the file LICENSE ) Maintainer : < > PLL and other clock - related components for Xilinx FPGAs Copyright : (C) 2017, Google Inc License : BSD2 (see the file LICENSE) Maintainer : Christiaan Baaij <> PLL and other clock-related c...
32ffdb7f2e349cdf9fcda7dab6a91dd5ed7ae3f1aaad54aef85c715c41aba9af
fulcro-legacy/semantic-ui-wrapper
ui_feed_summary.cljs
(ns fulcrologic.semantic-ui.views.feed.ui-feed-summary (:require [fulcrologic.semantic-ui.factory-helpers :as h] ["semantic-ui-react/dist/commonjs/views/Feed/FeedSummary" :default FeedSummary])) (def ui-feed-summary "A feed can contain a summary. Props: - as (custom): An element type to render as ...
null
https://raw.githubusercontent.com/fulcro-legacy/semantic-ui-wrapper/b0473480ddfff18496df086bf506099ac897f18f/semantic-ui-wrappers-shadow/src/main/fulcrologic/semantic_ui/views/feed/ui_feed_summary.cljs
clojure
(ns fulcrologic.semantic-ui.views.feed.ui-feed-summary (:require [fulcrologic.semantic-ui.factory-helpers :as h] ["semantic-ui-react/dist/commonjs/views/Feed/FeedSummary" :default FeedSummary])) (def ui-feed-summary "A feed can contain a summary. Props: - as (custom): An element type to render as ...
2a4f8522ceec1768ed91f4b2ee18be71544b362b080baf4c89c2e7fe06911af9
juspay/atlas
Common.hs
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
null
https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/mock-parking-bpp/src/MockData/OnSearch/Common.hs
haskell
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
7a9f928e2be7ed793dd709d07ea8c310949ff3faebbf841b273d5c21d91f7999
ml-in-barcelona/server-reason-react
test_renderToString.ml
let assert_string left right = (Alcotest.check Alcotest.string) "should be equal" right left let react_root_one_element () = let div = React.createElement "div" [||] [] in assert_string (ReactDOM.renderToString div) "<div data-reactroot=\"\"></div>" let react_root_two_elements () = let div = React.createE...
null
https://raw.githubusercontent.com/ml-in-barcelona/server-reason-react/e5615234980bbff690f5f342e3dddcf119594521/test/test_renderToString.ml
ocaml
let assert_string left right = (Alcotest.check Alcotest.string) "should be equal" right left let react_root_one_element () = let div = React.createElement "div" [||] [] in assert_string (ReactDOM.renderToString div) "<div data-reactroot=\"\"></div>" let react_root_two_elements () = let div = React.createE...
72609a2ae227bf8801f36b5008f196795ceab91972188302f815a32a1a5bf6c1
AllAlgorithms/haskell
Anagram.hs
import Data.List isAnagram :: String -> String -> Bool isAnagram str1 str2 = sort str1 == sort str2
null
https://raw.githubusercontent.com/AllAlgorithms/haskell/66611c3abad036db962d6d299dcb39c18b1b3cf8/algorithms/strings/Anagram.hs
haskell
import Data.List isAnagram :: String -> String -> Bool isAnagram str1 str2 = sort str1 == sort str2
3f211d983445a8d559f2802b0fb1a28a26f69f30b4ef27e0d39371a78331b00f
simoncourtenage/quanthas
WesternCalendarImpl.hs
Copyright ( C ) 2017 , ( ) This file is part of QuantHas , an open - source Haskell implementation of the QuantLib library for quantitative finance . is free software : you can redistribute it and/or modify it under the terms of the QuantHas license . You should have receiv...
null
https://raw.githubusercontent.com/simoncourtenage/quanthas/6e0b2cc9a60bb7d1709f98ed10d09aa6c071c8dd/src/QuantHas/Time/Calendar/WesternCalendarImpl.hs
haskell
2130-2139
Copyright ( C ) 2017 , ( ) This file is part of QuantHas , an open - source Haskell implementation of the QuantLib library for quantitative finance . is free software : you can redistribute it and/or modify it under the terms of the QuantHas license . You should have receiv...
802aee29dfb57530efd9f074cf9ec10e8df58d82f265c194b9ab5a1601189f88
slagyr/joodo
datetime_spec.clj
(ns chee.datetime-spec (:use [speclj.core :exclude (before after)] [chee.datetime]) (:import [java.util Date] [java.text SimpleDateFormat])) (describe "Dates" (it "easily creates new dates with current time" (let [now (now)] (should= Date (.getClass now)) (should (> 100 (- (Syste...
null
https://raw.githubusercontent.com/slagyr/joodo/e7edbc707a7901d1a1c5465382dd25db368f4596/chee/spec/chee/datetime_spec.clj
clojure
only works in certain CST zone
(ns chee.datetime-spec (:use [speclj.core :exclude (before after)] [chee.datetime]) (:import [java.util Date] [java.text SimpleDateFormat])) (describe "Dates" (it "easily creates new dates with current time" (let [now (now)] (should= Date (.getClass now)) (should (> 100 (- (Syste...
73da8f00562f14aca1c4ccaa405b052fdb5c27189bf1a5bc8579b444de5ec47e
metosin/testit
http_example.clj
(ns example.http-example (:require [clojure.test :refer :all] [testit.core :refer :all] [clojure.string :as str] [clj-http.client :as http])) (deftest ^:slow test-google-response (fact (http/get "") =in=> {:status 200 :headers {"Content-Type" #(str/starts-with? ...
null
https://raw.githubusercontent.com/metosin/testit/85c9cfc9629f44d13e9b16fe25175235ae1e39e1/examples/example/http_example.clj
clojure
(ns example.http-example (:require [clojure.test :refer :all] [testit.core :refer :all] [clojure.string :as str] [clj-http.client :as http])) (deftest ^:slow test-google-response (fact (http/get "") =in=> {:status 200 :headers {"Content-Type" #(str/starts-with? ...
3f00d258d9e673258d8d0441d08d21b9885edd8f48e857b5577ea36d22b75f00
joneshf/open-source
Bin.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # {-# LANGUAGE PackageImports #-} # LANGUAGE TypeApplications # module Shake.Go.Bin (rules) where import "base" Control.Monad.IO.Class (liftIO) import "mtl" Control.Monad.Reader (ReaderT, asks, lift) imp...
null
https://raw.githubusercontent.com/joneshf/open-source/e3412fc68c654d89a8d3af4e12ac19c70e3055ec/Shake/Go/Bin.hs
haskell
# LANGUAGE PackageImports #
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE TypeApplications # module Shake.Go.Bin (rules) where import "base" Control.Monad.IO.Class (liftIO) import "mtl" Control.Monad.Reader (ReaderT, asks, lift) import "shake" Development.Shake ...
689c5abba3d4df47e71834b58a20a18d628ab07997326a097e87a05ad60426eb
input-output-hk/cardano-wallet
Selection.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedLabels # # LANGUAGE OverloadedLists # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # -- | Copyright : © 2021 -- License: Apache-2.0 -- -- This module contains...
null
https://raw.githubusercontent.com/input-output-hk/cardano-wallet/80756f919d7811219e23632bbe59214e0f5e25f5/lib/wallet/src/Cardano/Wallet/Primitive/Migration/Selection.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE RankNTypes # | License: Apache-2.0 This module contains functions for incrementally constructing a selection to be included in a migration plan. A selection is the basis for a single transaction. Use 'extend' to extend a selection with an additional input. * Types * C...
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedLabels # # LANGUAGE OverloadedLists # # LANGUAGE ScopedTypeVariables # Copyright : © 2021 Use ' create ' to create a selection with one or more inputs . module Cardano.Wallet.Primitive.Migration.Selectio...
5f0f1e62bed128c878bb4fe9d793789c900259a50264f44d9a279b380cdbd1dd
swarmpit/swarmpit
info.cljs
(ns swarmpit.component.registry-ecr.info (:require [material.icon :as icon] [material.components :as comp] [material.component.form :as form] [material.component.label :as label] [swarmpit.component.message :as message] [swarmpit.component.state :as state] ...
null
https://raw.githubusercontent.com/swarmpit/swarmpit/38ffbe08e717d8620bf433c99f2e85a9e5984c32/src/cljs/swarmpit/component/registry_ecr/info.cljs
clojure
(ns swarmpit.component.registry-ecr.info (:require [material.icon :as icon] [material.components :as comp] [material.component.form :as form] [material.component.label :as label] [swarmpit.component.message :as message] [swarmpit.component.state :as state] ...
fb015229849da7e7a80b7e9a96ce6e43c1c8b832fa2cbdd6755b98f9ec2cdc5c
haskell-compat/base-compat
Compat.hs
# LANGUAGE CPP , NoImplicitPrelude # {-# LANGUAGE BangPatterns #-} #if __GLASGOW_HASKELL__ >= 702 # LANGUAGE Trustworthy # #endif module Data.List.Compat ( module Base #if !(MIN_VERSION_base(4,15,0)) , singleton #endif #if !(MIN_VERSION_base(4,11,0)) , iterate' #endif #if !(MIN_VERSION_base(4,8,0)) , all , and , an...
null
https://raw.githubusercontent.com/haskell-compat/base-compat/847aa35c4142f529525ffc645cd035ddb23ce8ee/base-compat/src/Data/List/Compat.hs
haskell
# LANGUAGE BangPatterns # | The 'dropWhileEnd' function drops the largest suffix of a list in which the given predicate holds for all elements. For example: > dropWhileEnd isSpace "foo\n" == "foo" > dropWhileEnd isSpace "foo bar" == "foo bar" > dropWhileEnd isSpace ("foo\n" ++ undefined) == "foo" ++ undefined ...
# LANGUAGE CPP , NoImplicitPrelude # #if __GLASGOW_HASKELL__ >= 702 # LANGUAGE Trustworthy # #endif module Data.List.Compat ( module Base #if !(MIN_VERSION_base(4,15,0)) , singleton #endif #if !(MIN_VERSION_base(4,11,0)) , iterate' #endif #if !(MIN_VERSION_base(4,8,0)) , all , and , any , concat , concatMap , elem ...
b11217abb5925db54fa68804e3b8067378dd94e05a1414700e430fadd617fc59
luminus-framework/examples
handler.clj
(ns multi-client-ws-http-kit.handler (:require [multi-client-ws-http-kit.middleware :as middleware] [multi-client-ws-http-kit.layout :refer [error-page]] [multi-client-ws-http-kit.routes.home :refer [home-routes]] [reitit.ring :as ring] [ring.middleware.content-type :refer [wrap-content-type]] ...
null
https://raw.githubusercontent.com/luminus-framework/examples/cbeee2fef8f457a6a6bac2cae0b640370ae2499b/multi-client-ws-http-kit/src/clj/multi_client_ws_http_kit/handler.clj
clojure
(ns multi-client-ws-http-kit.handler (:require [multi-client-ws-http-kit.middleware :as middleware] [multi-client-ws-http-kit.layout :refer [error-page]] [multi-client-ws-http-kit.routes.home :refer [home-routes]] [reitit.ring :as ring] [ring.middleware.content-type :refer [wrap-content-type]] ...
2285ce48fb7e9dd7474c44cf90658e46006195ef5b7faa1392cd14674d9a45b1
satos---jp/mincaml_self_hosting
fcomp.ml
print_int (let a = read_float () in let b = read_float () in a > b); print_int (let a = read_float () in let b = read_float () in a > b); print_int (let a = read_float () in let b = read_float () in a > b); print_int (let a = read_float () in let b = read_float () in a > b); print_char 10; print_int (let a = read_floa...
null
https://raw.githubusercontent.com/satos---jp/mincaml_self_hosting/5fdf8b5083437d7607a924142eea52d9b1de0439/test/fcomp.ml
ocaml
print_int (let a = read_float () in let b = read_float () in a > b); print_int (let a = read_float () in let b = read_float () in a > b); print_int (let a = read_float () in let b = read_float () in a > b); print_int (let a = read_float () in let b = read_float () in a > b); print_char 10; print_int (let a = read_floa...
ad5e0164e792e386293df05486b8a51867b1bee06b5176c9a5d56c1e608e92dc
nikomatsakis/a-mir-formality
query--basic.rkt
#lang racket (require redex/reduction-semantics "../../util.rkt" "../../logic/alpha-eq-util.rkt" "../query.rkt" ) (module+ test (traced '() (test-equal (term (rust:query ([(crate C {(struct Vec[(type T)] where [] { }) ...
null
https://raw.githubusercontent.com/nikomatsakis/a-mir-formality/14c6a6946e9d2bd83d5fe4df8272be10ba65531d/racket-src/rust/test/query--basic.rkt
racket
no new inference variables are introduced T => X no additional constraints
#lang racket (require redex/reduction-semantics "../../util.rkt" "../../logic/alpha-eq-util.rkt" "../query.rkt" ) (module+ test (traced '() (test-equal (term (rust:query ([(crate C {(struct Vec[(type T)] where [] { }) ...
3d84327b678f7532d1399a6a7f3d79da7285465c7d9abe8f2d10e5997a7a1f64
degree9/enterprise
core.cljs
(ns degree9.fullcalendar.core (:require [hoplon.core :as h] [goog.object :as obj] ["jquery" :as jq] ["fullcalendar" :as fullcal])) (defn mkcalendar [el & [opts]] (let [calendar (obj/get fullcal "Calendar")] (calendar. el (clj->js opts)))) ; (prn (js/jQuery "#calendar")) ; ;...
null
https://raw.githubusercontent.com/degree9/enterprise/36e4f242c18b1dde54d5a15c668b17dc800c01ff/src/degree9/fullcalendar/core.cljs
clojure
(prn (js/jQuery "#calendar")) (.addEventListener js/window "DOMContentLoaded" (doto (calendar. (js/jQuery "#calendar")) (.render) (.updateSize)))) (h/defelem calendar [attr kids] (let [cal (h/div) (.render fcal) cal))
(ns degree9.fullcalendar.core (:require [hoplon.core :as h] [goog.object :as obj] ["jquery" :as jq] ["fullcalendar" :as fullcal])) (defn mkcalendar [el & [opts]] (let [calendar (obj/get fullcal "Calendar")] (calendar. el (clj->js opts)))) # ( let [ calendar ( obj / get ...
3942ab971e0dfd975255edbd6d1c7143427c58527cbfa5765954ac8bc303aca6
VisionsGlobalEmpowerment/webchange
index.cljs
(ns webchange.ui-framework.components.dialog.index (:require [reagent.core :as r] [webchange.ui-framework.components.icon-button.index :as icon-button] [webchange.ui-framework.components.utils :refer [get-class-name]])) (defn component [{:keys [actions class-name close-button? content-align class-name-...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/3c138da340f7561efc4c4afe00551a466c400f3d/src/cljs/webchange/ui_framework/components/dialog/index.cljs
clojure
(ns webchange.ui-framework.components.dialog.index (:require [reagent.core :as r] [webchange.ui-framework.components.icon-button.index :as icon-button] [webchange.ui-framework.components.utils :refer [get-class-name]])) (defn component [{:keys [actions class-name close-button? content-align class-name-...
625213a99288a97dd189a1931daa25e89bac718b570647afffc78492a120e45c
cxphoe/SICP-solutions
fib-machine-for-tests.rkt
(define (fib-machine-with-regs) (make-machine (list 'val 'n 'continue) (list (list '= =) (list '- -) (list '+ +) (list '< <)) '(controller (assign continue (label fib-done)) fib-loop (test (op <) (reg n) (const 2)) (branch (label immediate-answer)) ;; set up to compute Fib(n-...
null
https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%205-Computing%20with%20Register%20Machines/1%7E4/fib-machine-for-tests.rkt
racket
set up to compute Fib(n-1) set up to compute Fib(n-1) (set-register-contents! fib-machine 'n 10) just test the trace mode (set-breakpoint fib-machine 'afterfib-n-2 2) (set-breakpoint fib-machine 'afterfib-n-2 20) check illegal breakpoints (proceed-machine fib-machine) check if the machine would report an error whe...
(define (fib-machine-with-regs) (make-machine (list 'val 'n 'continue) (list (list '= =) (list '- -) (list '+ +) (list '< <)) '(controller (assign continue (label fib-done)) fib-loop (test (op <) (reg n) (const 2)) (branch (label immediate-answer)) (save continue) (ass...
7cb449741060b742fc6aa7e5c4d5690accb78f1dc6df221e4ee0cba250857512
elsamuko/gimp-elsamuko
elsamuko-escape-lines.scm
; The GIMP -- an image manipulation program Copyright ( C ) 1995 and ; ; 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 Free Software Foundation ; either version 3 of the License , or ; (at your option) any later ve...
null
https://raw.githubusercontent.com/elsamuko/gimp-elsamuko/d64e60321553ee4a621841eda5a3353f68a94fc1/scripts/elsamuko-escape-lines.scm
scheme
The GIMP -- an image manipulation program This program is free software; you can redistribute it and/or modify either version 3 of the License , or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of ...
Copyright ( C ) 1995 and it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License Foundation , Inc. , 675 Mass Ave , Cambridge , , USA . Copyright ( C ) 2008 elsamuko < > (define (elsamuko-escape-lines aimg adraw x0 y0 phi1 ...
17d1537b03626e7a050a04ef26898237dd3fbc84061dfb04396af0066d2a2f90
Soostone/hadron
Controller.hs
# LANGUAGE BangPatterns # # LANGUAGE CPP # {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE EmptyDataDecls #-} # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInsta...
null
https://raw.githubusercontent.com/Soostone/hadron/d155ecbcdf0bb0dd442d6fc3e142bea75a312241/src/Hadron/Controller.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveFunctor # # LANGUAGE EmptyDataDecls # # LANGUAGE GADTs # # LANGUAGE NoMonomorphismRestriction # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # # LANGUAGE TemplateHaskell # ...
# LANGUAGE BangPatterns # # LANGUAGE CPP # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards ...
243169da4d6e674473003e3879da5e7efda2e9eb1d0f8d94c519964da03bfd73
realworldocaml/mdx
library.ml
* Copyright ( c ) 2019 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
null
https://raw.githubusercontent.com/realworldocaml/mdx/4d8e7e8321faeeabe7091fbe2e901e64ab19dc06/lib/library.ml
ocaml
String.cuts invariant
* Copyright ( c ) 2019 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
a9c044356b8512c05da5de0a3226d05f108c7cc79cc93254d0ea9f3030dc2a36
bennn/dissertation
data.rkt
#lang typed/racket/base (provide (struct-out label) (struct-out suffix-tree) (struct-out node)) (define-struct label ([datum : (Vectorof (U Char Symbol))] [i : Natural] [j : Natural]) #:mutable) ;; A suffix tree consists of a root node. (define-struct suffix-tree ([root : node])) ;; up-label: label ;; parent...
null
https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/suffixtree/typed/data.rkt
racket
A suffix tree consists of a root node. up-label: label parent: (union #f node) suffix-link: (union #f node)
#lang typed/racket/base (provide (struct-out label) (struct-out suffix-tree) (struct-out node)) (define-struct label ([datum : (Vectorof (U Char Symbol))] [i : Natural] [j : Natural]) #:mutable) (define-struct suffix-tree ([root : node])) children : ( listof node ) (define-struct node ([up-label : label] [...