_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
93dd2fda224cd226a790a627c5b29a914e70e2ec22eda04a40eb37ecb1d0ad19
kmi/irs
execution.lisp
File created in head and recorded in Emacs . ;;; The stuff in here is about the LHDL execution web services at Bedfordshire . (in-package #:ocml) (in-ontology lhdl-goals) (def-class import-goal (execution-goal)) (def-class export-goal (execution-goal)) (def-class modify-goal (execution-goal)) (def-class d...
null
https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/apps/lhdl/ontologies/lhdl-goals/execution.lisp
lisp
The stuff in here is about the LHDL execution web services at {{{ import-vtk-goal }}} }}} {{{ import-dicom-goal }}} {{{ import-vrml-goal }}} {{{ import-image-sequence-goal }}} {{{ import-landmark-cloud-goal }}} {{{ import-raw-volume-goal }}} }}} {{{ export-vtk-goal }}} {{{ export-bmp-goal }}} {{{ ex...
File created in head and recorded in Emacs . Bedfordshire . (in-package #:ocml) (in-ontology lhdl-goals) (def-class import-goal (execution-goal)) (def-class export-goal (execution-goal)) (def-class modify-goal (execution-goal)) (def-class display-goal (execution-goal)) (def-class measure-goal (execution-...
c28bd46f10f186fc061565bcf51142d817e8106b2d6a6a5cb9c9f52bc0fc2890
verement/etamoo
Verb.hs
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-} module MOO.Verb ( Verb(..) , ObjSpec(..) , PrepSpec(..) , newVerb , obj2string , string2obj , objMatch , prep2string , string2prep ...
null
https://raw.githubusercontent.com/verement/etamoo/af65e2581ab5d093c9490f43692ef89bafc2efc1/src/MOO/Verb.hs
haskell
# LANGUAGE OverloadedStrings, DeriveDataTypeable # # SOURCE # | Argument (direct/indirect object) specifier ^ none ^ any ^ this | Preposition specifier ^ any ^ none ^ with\/using ^ at\/to ^ in front of ^ in\/inside\/into ^ on top of\/on\/onto\/upon ^ out of\/from inside\/from ^ over ^ through ^ under\/u...
module MOO.Verb ( Verb(..) , ObjSpec(..) , PrepSpec(..) , newVerb , obj2string , string2obj , objMatch , prep2string , string2prep , prepMatch , prepPhrases ...
e8636bfc0e050da69598665b5bd0788b7700dd2a311c1dd3a6e994c41e85a459
uber/queryparser
Type.hs
Copyright ( c ) 2017 Uber Technologies , Inc. -- -- 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 the rights -- to use, copy, modify, mer...
null
https://raw.githubusercontent.com/uber/queryparser/6015e8f273f4498326fec0315ac5580d7036f8a4/dialects/hive/src/Database/Sql/Hive/Type.hs
haskell
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnished to do so, subject to the following conditions: The above copyright notice ...
Copyright ( c ) 2017 Uber Technologies , Inc. in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY K...
90aa928981fb1bd5a368a8ac59ebc4168214b2eed76130ef6be781066cb450c6
creichert/hsqmlstocqt
Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Graphics.QML import GUI.StocQt main :: IO () main = do sm <- newObjectDC =<< defaultStockModel ss <- newObjectDC =<< defaultStockSettings sis <- mapM newObjectDC $ genStockList stocks sc <- newObjectDC $ StocQt sm sis ss runEngineLo...
null
https://raw.githubusercontent.com/creichert/hsqmlstocqt/1400a94401c521a997b44a67362aee87cc37307e/src/Main.hs
haskell
# LANGUAGE OverloadedStrings #
module Main where import Graphics.QML import GUI.StocQt main :: IO () main = do sm <- newObjectDC =<< defaultStockModel ss <- newObjectDC =<< defaultStockSettings sis <- mapM newObjectDC $ genStockList stocks sc <- newObjectDC $ StocQt sm sis ss runEngineLoop defaultEngineConfig { init...
c95352f528614ddd59ef15db1790d2e8cd360eadd9f2318b1bf1e90b48095cdc
AbstractMachinesLab/caramel
jsonrpc.mli
* implementation open Import module Id : sig type t = [ `String of string | `Int of int ] include Json.Jsonable.S with type t := t val hash : t -> int val equal : t -> t -> bool end module Message : sig module Structured : sig type t = [ `Assoc of (string * Json.t) list | `Li...
null
https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/jsonrpc/src/jsonrpc.mli
ocaml
* implementation open Import module Id : sig type t = [ `String of string | `Int of int ] include Json.Jsonable.S with type t := t val hash : t -> int val equal : t -> t -> bool end module Message : sig module Structured : sig type t = [ `Assoc of (string * Json.t) list | `Li...
218b7eaea79abc6ff1a8caa24d8283906465859a9eeaabfc6d39073475905d14
haskell-suite/haskell-src-exts
ScopedTypeVariables.hs
# LANGUAGE ScopedTypeVariables # test :: IO Char test = do x :: Char <- getChar return x value :: String = "Hello" forallTest :: forall x . Eq x => x -> x forallTest x = if x == x then (undefined :: x) else x
null
https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/ScopedTypeVariables.hs
haskell
# LANGUAGE ScopedTypeVariables # test :: IO Char test = do x :: Char <- getChar return x value :: String = "Hello" forallTest :: forall x . Eq x => x -> x forallTest x = if x == x then (undefined :: x) else x
c2d4a4a88086d131ebe2541ab9537a912c9c82b19c96882ca062aae898ff2861
adlai/cjhunt
view.lisp
(in-package :cl-user) (defpackage cjhunt.view (:use :cl) (:import-from :cjhunt.config :*template-directory*) (:import-from :caveman2 :*response* :response-headers) (:import-from :djula :add-template-directory :compile-template* ...
null
https://raw.githubusercontent.com/adlai/cjhunt/fb89d8600e6b42c9d6b67dd3fded59907e91a3be/src/view.lisp
lisp
Execute package definition
(in-package :cl-user) (defpackage cjhunt.view (:use :cl) (:import-from :cjhunt.config :*template-directory*) (:import-from :caveman2 :*response* :response-headers) (:import-from :djula :add-template-directory :compile-template* ...
2c327e445f0973dea20020a7418428606dd7a2e69d1c31ae54d0593fedfa4740
paurkedal/ocaml-cothrift
testsuite.ml
Copyright ( C ) 2016 < > * * This library is free software ; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or ( at your * option ) any later version , with the ...
null
https://raw.githubusercontent.com/paurkedal/ocaml-cothrift/4410e5123ec6b3769c0d046f1abf4a73e9b56a0f/tests/testsuite.ml
ocaml
Copyright ( C ) 2016 < > * * This library is free software ; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or ( at your * option ) any later version , with the ...
af6fd00a1b06723b057da407be6f66b130b4fef68f033d0f08bbf77404494c4e
substance/letterpress
ParseHtml.hs
module Pandoc.Filters.ParseHtml ( parseHtml ) where import Text.Pandoc import Text.ParserCombinators.Parsec import Text.HTML.TagSoup import Data.List (concat) import Control.Monad (liftM) | local Pandoc that exports ` inline ` import Pandoc.Readers.HTML (block, inline) repeatParser p = liftM concat (manyTill p...
null
https://raw.githubusercontent.com/substance/letterpress/50bfc4a9a0b9c94ffe9a845f68e8525661b289ad/Pandoc/Filters/ParseHtml.hs
haskell
module Pandoc.Filters.ParseHtml ( parseHtml ) where import Text.Pandoc import Text.ParserCombinators.Parsec import Text.HTML.TagSoup import Data.List (concat) import Control.Monad (liftM) | local Pandoc that exports ` inline ` import Pandoc.Readers.HTML (block, inline) repeatParser p = liftM concat (manyTill p...
b2b01d887e691b2033751f07793a30774521488fdd4d8164813484f70018c8a6
pokepay/aws-sdk-lisp
runtime.lex.lisp
;; DO NOT EDIT: File is generated by AWS-SDK/GENERATOR. (uiop:define-package #:aws-sdk/services/runtime.lex (:use) (:use-reexport #:aws-sdk/services/runtime.lex/api))
null
https://raw.githubusercontent.com/pokepay/aws-sdk-lisp/836b87df520391478a19462443342dc56f4b3f2c/services/runtime.lex.lisp
lisp
DO NOT EDIT: File is generated by AWS-SDK/GENERATOR.
(uiop:define-package #:aws-sdk/services/runtime.lex (:use) (:use-reexport #:aws-sdk/services/runtime.lex/api))
f5ca4267bb3bdb289cdb65f6d98f8a0d90341d4e37701580373cca9ccc8a74ad
OCamlPro/typerex-lint
plugin_typedtree.ml
(**************************************************************************) (* *) (* OCamlPro Typerex *) (* *) Copyrigh...
null
https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/plugins/ocp-lint-plugin-typedtree/plugin_typedtree.ml
ocaml
************************************************************************ OCamlPro Typerex This file is distributed ...
Copyright OCamlPro 2011 - 2016 . All rights reserved . ( GNU General Public Licence version 3.0 ) . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE...
c45751fa4da1eed77096d8bea0ae976226b05bdccb760490b7bd7364d1b84bcb
lindenbaum/hinterface
TermSpec.hs
# LANGUAGE OverloadedLists # # LANGUAGE ScopedTypeVariables # # OPTIONS_GHC -fno - warn - orphans # # OPTIONS_GHC -fno - warn - type - defaults # module Foreign.Erlang.TermSpec ( spec, ) where import Data.Binary ( decode, encode, ) import qualified Data.ByteString.Lazy as B import Data.List.NonEmpty (NonE...
null
https://raw.githubusercontent.com/lindenbaum/hinterface/e49810b5984486cebad6fa06dba0f2c7f2bfd2fa/test/Foreign/Erlang/TermSpec.hs
haskell
import Debug.Trace traceShowIdBS bs = traceShow (B.unpack bs) bs
# LANGUAGE OverloadedLists # # LANGUAGE ScopedTypeVariables # # OPTIONS_GHC -fno - warn - orphans # # OPTIONS_GHC -fno - warn - type - defaults # module Foreign.Erlang.TermSpec ( spec, ) where import Data.Binary ( decode, encode, ) import qualified Data.ByteString.Lazy as B import Data.List.NonEmpty (NonE...
d58d435a4a87d0074efcbbe419f5f98d4fd5854fba2b085b788d928fd829afdc
gchrupala/morfette
FeatureSet.hs
# LANGUAGE NoMonomorphismRestriction , MultiParamTypeClasses , FunctionalDependencies , FlexibleContexts , FlexibleInstances # , MultiParamTypeClasses , FunctionalDependencies , FlexibleContexts , FlexibleInstances #...
null
https://raw.githubusercontent.com/gchrupala/morfette/be40676c975d660bbb893953d354168506069862/src/GramLab/FeatureSet.hs
haskell
# LANGUAGE NoMonomorphismRestriction , MultiParamTypeClasses , FunctionalDependencies , FlexibleContexts , FlexibleInstances # , MultiParamTypeClasses , FunctionalDependencies , FlexibleContexts , FlexibleInstances #...
1ee48ffc115f2453964e945df763f06dbf7ec6847de120ba1ee7edbb39375d6f
darrenldl/ocaml-SeqBox
osbx_decode.ml
open Cmdliner open Decode exception Packaged_exn of string let decode (silent:Progress_report.silence_level) (force_out:bool) (no_meta:bool) (show_max:int64 option) (in_filename:string) (provided_out_filename:string option) : unit = Dynamic_param.Decode.set_failure_list_max_length_possibly show_max; Dynamic_param...
null
https://raw.githubusercontent.com/darrenldl/ocaml-SeqBox/658c623db8745ae1d804c75880b29fb53435860f/src/osbx_decode.ml
ocaml
open Cmdliner open Decode exception Packaged_exn of string let decode (silent:Progress_report.silence_level) (force_out:bool) (no_meta:bool) (show_max:int64 option) (in_filename:string) (provided_out_filename:string option) : unit = Dynamic_param.Decode.set_failure_list_max_length_possibly show_max; Dynamic_param...
6ab29a77e2c4ac11cf6cc2c8b98ab649204144a2f450236ceb24c58174743371
QuentinDuval/triboard
user.clj
(ns user (:require [triboard.server] [ring.middleware.reload :refer [wrap-reload]] [figwheel-sidecar.repl-api :as figwheel])) ;; Let Clojure warn you when it needs to reflect on types, or when it does math ;; on unboxed numbers. In both cases you should add type annotations to prevent ;; degr...
null
https://raw.githubusercontent.com/QuentinDuval/triboard/2641d4c033fa0c64a02ef4564005b616d81b1a13/dev/user.clj
clojure
Let Clojure warn you when it needs to reflect on types, or when it does math on unboxed numbers. In both cases you should add type annotations to prevent degraded performance.
(ns user (:require [triboard.server] [ring.middleware.reload :refer [wrap-reload]] [figwheel-sidecar.repl-api :as figwheel])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (def http-handler (wrap-reload #'triboard.server/http-handler)) (defn run [] (figwheel/sta...
491f9db914038b957d0beaac4e765a3acc7f749128e0e939f59bba8eb7ff8942
abeaumont/ocaml-chacha
chacha.mli
* { { : -20080120.pdf } ChaCha , a variant of Salsa20 } specifies a ChaCha20 encryption function as well as a set of reduced Chacha8 and Chacha12 encryption functions . specifies a ChaCha20 encryption function as well as a set of reduced Chacha8 and Chacha12 encryption functions. *) type t (** Type...
null
https://raw.githubusercontent.com/abeaumont/ocaml-chacha/0fd6120b2984583a3775c1079ef870b223f02c1e/src/chacha.mli
ocaml
* Type of ChaCha state. * [encrypt input state] is [output], the ChaCha encryption function.
* { { : -20080120.pdf } ChaCha , a variant of Salsa20 } specifies a ChaCha20 encryption function as well as a set of reduced Chacha8 and Chacha12 encryption functions . specifies a ChaCha20 encryption function as well as a set of reduced Chacha8 and Chacha12 encryption functions. *) type t val cre...
2ff7bf7ae1a418f629cdc0cadfbca0d4295472e50657d982da3302709923c006
alaricsp/chicken-scheme
unsafe-declarations.scm
;;;; unsafe-declarations.scm - various settings for libraries compiled in unsafe mode ; Copyright ( c ) 2008 , The Chicken Team ; All rights reserved. ; ; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following ; conditions are met: ; ; Redistributi...
null
https://raw.githubusercontent.com/alaricsp/chicken-scheme/1eb14684c26b7c2250ca9b944c6b671cb62cafbc/unsafe-declarations.scm
scheme
unsafe-declarations.scm - various settings for libraries compiled in unsafe mode 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 no...
Copyright ( c ) 2008 , The Chicken Team THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS ...
9b3e0b534664ad09f56da5fd08b8958d68748276250067bc095717d070bf8d1e
BranchTaken/Hemlock
test_choose_hlt.ml
open! Basis.Rudiments open! Basis open MapTest open Map let test () = (* test is n^2 time complexity, so keep n small. *) let rec test n i map = begin match i < n with | false -> map | true -> begin validate map; let map' = test n (succ i) (insert_hlt ~k:i ~v:(i * 100L) map) in ...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/f3604ceda4f75cf18b6ee2b1c2f3c5759ad495a5/bootstrap/test/basis/map/test_choose_hlt.ml
ocaml
test is n^2 time complexity, so keep n small.
open! Basis.Rudiments open! Basis open MapTest open Map let test () = let rec test n i map = begin match i < n with | false -> map | true -> begin validate map; let map' = test n (succ i) (insert_hlt ~k:i ~v:(i * 100L) map) in let k, v = choose_hlt map' in assert (k * 100L...
698774bf7a5b0cd64952e1b4fadd93e007670252b1a880363dbb201b7b1804fc
schemedoc/implementation-metadata
stklos.scm
(title "STklos") (long-title "STklos Scheme") (tagline "R7RS interpreter with GTK GUI and CLOS-like object system") (based-on "stk") (homepage-url "/") (github "egallesio/STklos") (repology "stklos") (issue-tracker github) (person "Erick Gallesio") (academy "Université Nice-Sophia-Antipolis") (pseudorelease (featur...
null
https://raw.githubusercontent.com/schemedoc/implementation-metadata/6280d9c4c73833dc5bd1c9bef9b45be6ea5beb68/schemes/stklos.scm
scheme
(title "STklos") (long-title "STklos Scheme") (tagline "R7RS interpreter with GTK GUI and CLOS-like object system") (based-on "stk") (homepage-url "/") (github "egallesio/STklos") (repology "stklos") (issue-tracker github) (person "Erick Gallesio") (academy "Université Nice-Sophia-Antipolis") (pseudorelease (featur...
ef83c4326caf3b5128d657794c2af27cd4a40804fa422e13eeb638f9cb1367f5
astrada/ocaml-extjs
ext_chart_theme_Theme.ml
class type t = object('self) end class type configs = object('self) end class type events = object end class type statics = object end let get_static () = Js.Unsafe.variable "Ext.chart.theme.Theme" let static = get_static () let of_configs c = Js.Unsafe.coerce c let to_configs o = Js.Unsa...
null
https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/ext_chart_theme_Theme.ml
ocaml
class type t = object('self) end class type configs = object('self) end class type events = object end class type statics = object end let get_static () = Js.Unsafe.variable "Ext.chart.theme.Theme" let static = get_static () let of_configs c = Js.Unsafe.coerce c let to_configs o = Js.Unsa...
7e1d906f577e8ffdd9b8f54979b53071078c532ad246faa1b636eb2b300c6fab
VisionsGlobalEmpowerment/webchange
option_item.cljc
(ns webchange.question.common.option-item (:require [webchange.question.common.params :as common-params] [webchange.question.utils :refer [merge-data round] :as utils])) (defn- create-substrate [{:keys [object-name x y width height actions border-radius use-state] :or {x 0 y ...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/fe9738f5c1d32036e7cd8a3744ee3774bc8a5748/src/cljc/webchange/question/common/option_item.cljc
clojure
(ns webchange.question.common.option-item (:require [webchange.question.common.params :as common-params] [webchange.question.utils :refer [merge-data round] :as utils])) (defn- create-substrate [{:keys [object-name x y width height actions border-radius use-state] :or {x 0 y ...
08b6057f20bdf9c654275c7a7c7d35e8a840116211fbe6183c9f5beb5c02d924
AdRoll/rebar3_hank
unused_record_field_sample.erl
-module(unused_record_field_sample). -compile(export_all). -record(a_record, {used_field, used_typed_field :: used_typed_field, used_field_with_default = used_field_with_default, used_typed_field_with_default = used_typed_field_with_default :: used_typed_field_with_defa...
null
https://raw.githubusercontent.com/AdRoll/rebar3_hank/9666a9ffd7a657a34c87a3da5e38a720ad41cdf1/test/files/unused_record_fields/unused_record_field_sample.erl
erlang
Unicode should be supported and not break! This doesn't count as usage This doesn't count as usage This doesn't count as usage either This counts as usage This counts as usage This counts as usage, too
-module(unused_record_field_sample). -compile(export_all). -record(a_record, {used_field, used_typed_field :: used_typed_field, used_field_with_default = used_field_with_default, used_typed_field_with_default = used_typed_field_with_default :: used_typed_field_with_defa...
5481f1c82991d721f1735b0aef02e1309c8a836ab1241ca1c4578ab604b4dd38
kadena-io/pact
Info.hs
# LANGUAGE RecordWildCards # # LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE DeriveGeneric # # LANGUAGE GeneralizedNewtypeDeriving # -- | -- Module : Pact.Types.Info Copyright : ( C ) 2016 -- License : BSD-style (see the file LICENSE) Maintainer : < > -- -- Code-related meta...
null
https://raw.githubusercontent.com/kadena-io/pact/564cf5f3440337f806c249032fb40a2be8aad734/src/Pact/Types/Info.hs
haskell
# LANGUAGE OverloadedStrings # | Module : Pact.Types.Info License : BSD-style (see the file LICENSE) Code-related metadata. import Pact.Types.Crypto (Hash(..)) | Code location, length from parsing. | For parsed items, original code and parse info; for runtime items, nothing | Charge zero for Info t...
# LANGUAGE RecordWildCards # # LANGUAGE CPP # # LANGUAGE DeriveGeneric # # LANGUAGE GeneralizedNewtypeDeriving # Copyright : ( C ) 2016 Maintainer : < > module Pact.Types.Info ( Parsed(..), Code(..), Info(..), mkInfo, renderInfo, renderParsed, parseRenderedInfo, HasInfo(..) ...
30a9e465acb1b4ef790d3102bf288ef0f7f4254755b65963646e896e142120ef
sellout/haskerwaul
Congruence.hs
# language UndecidableSuperClasses # module Haskerwaul.Congruence ( module Haskerwaul.Congruence -- * extended modules , module Haskerwaul.Relation.Equivalence ) where import Haskerwaul.Category.Complete.Finitely import Haskerwaul.Relation.Equivalence -- | -- -- = references -- -- - [nLab]() class (FinitelyC...
null
https://raw.githubusercontent.com/sellout/haskerwaul/b32ecdb141a5f9cca04ed85dc952028242c160a8/src/Haskerwaul/Congruence.hs
haskell
* extended modules | = references - [nLab]()
# language UndecidableSuperClasses # module Haskerwaul.Congruence ( module Haskerwaul.Congruence , module Haskerwaul.Relation.Equivalence ) where import Haskerwaul.Category.Complete.Finitely import Haskerwaul.Relation.Equivalence class (FinitelyCompleteCategory c, EquivalenceRelation c a) => Congruence c a
3a6bb6cb0a689963e6d015c0bb922e187b1042335157cd3615137b62f8213e6b
psholtz/MIT-SICP
exercise3-29.scm
;; Exercise 3.29 ;; ;; Another way to construct an or-gate is as a compound digital logic device, ;; built from and-gates and inverters. Define a procedure "or-gate" that ;; accomplishes this. What is the delay time of the or-gate in terms of ;; and-gate-delay and inverter-delay? ;; ;; ;; We can invert both input...
null
https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Section-3.3/mit-scheme/exercise3-29.scm
scheme
Another way to construct an or-gate is as a compound digital logic device, built from and-gates and inverters. Define a procedure "or-gate" that accomplishes this. What is the delay time of the or-gate in terms of and-gate-delay and inverter-delay? We can invert both inputs, attach them to an and-gate, and ...
Exercise 3.29 1 | ) OUTPUT _ ) |_/ 2 ---| o---+ | I1 | ~I1 | I2 | ~I2 | ( ~I1 & & ~I2 ) | ~(~I1 & & ~I2 ) | | 1 | 0 | 1 | 0 | 0 | 1 | | 1 | 0 | 0 | 1 | 0 | 1 ...
8f38391eba0a6e30b1762d438bab7e367909302889c60b3e5f371c9059d44e2e
slime/slime
swank-loader.lisp
;;;; -*- indent-tabs-mode: nil -*- ;;; ;;; swank-loader.lisp --- Compile and load the Slime backend. ;;; Created 2003 , < > ;;; ;;; This code has been placed in the Public Domain. All warranties ;;; are disclaimed. ;;; ;; If you want customize the source- or fasl-directory you can set ;; swank-loader:*source-dir...
null
https://raw.githubusercontent.com/slime/slime/5b26718084e912a732ffabcc0921c9c0bdafcd3a/swank-loader.lisp
lisp
-*- indent-tabs-mode: nil -*- swank-loader.lisp --- Compile and load the Slime backend. This code has been placed in the Public Domain. All warranties are disclaimed. If you want customize the source- or fasl-directory you can set swank-loader:*source-directory* resp. swank-loader:*fasl-directory* before lo...
Created 2003 , < > ( setq swank - loader::*fasl - directory * " /tmp / fasl/ " ) (cl:defpackage :swank-loader (:use :cl) (:export :init :dump-image :list-fasls :*source-directory* :*fasl-directory* :*started-from-emacs*)) (cl:in-package :swank-loade...
9186159afbab73f74a1aa8088fa65497e9744e43bf890c6bafc1271f9844cb3d
keechma/entitydb
core.cljs
(ns entitydb.test.core (:require [cljs.test :refer-macros [deftest is]] [entitydb.core :as edb] [entitydb.util :as util] [entitydb.relations :as relations] [clojure.string :refer [upper-case]])) (def schema {:notes {:id :id :middleware {:set [(fn [...
null
https://raw.githubusercontent.com/keechma/entitydb/3fe9c48c40da7b9c7a617ec362ebe4b0caa3a823/test/entitydb/core.cljs
clojure
(ns entitydb.test.core (:require [cljs.test :refer-macros [deftest is]] [entitydb.core :as edb] [entitydb.util :as util] [entitydb.relations :as relations] [clojure.string :refer [upper-case]])) (def schema {:notes {:id :id :middleware {:set [(fn [...
7c04dee9e122ae4eef69b1be2ed3b304884ed24c0e263ae86554692964efbcde
stevebleazard/ocaml-jsonxt
json_float.mli
val string_of_float_json : float -> string
null
https://raw.githubusercontent.com/stevebleazard/ocaml-jsonxt/fe982b6087dd76ca003d8fbc19ae9a519f54b828/lib/json_float.mli
ocaml
val string_of_float_json : float -> string
670a5a98fd5639e329dc63a37f441b7b043c16c28b97464c08f29b15f903da77
vivid-inc/ash-ra-template
leiningen_plugin_test.clj
; Copyright 2021 Vivid Inc. ; 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 L...
null
https://raw.githubusercontent.com/vivid-inc/ash-ra-template/f64be7efd6f52ccd451cddb851f02511d1665b11/lein-art/test/vivid/art/leiningen_plugin_test.clj
clojure
Copyright 2021 Vivid Inc. 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 speci...
distributed under the License is distributed on an " AS IS " BASIS , (ns vivid.art.leiningen-plugin-test (:require [clojure.java.io :as io] [clojure.test :as t] [leiningen.art :as lein-art]) (:import (java.io File))) (defn delete-file-tree [path & [silently]] ((fn del [^File file] (when...
71abf6cb1a9915514d5587d5b7cc04d351f4b8f2395bf166cdf64de39033b2a4
synduce/Synduce
proper_indexation_sum_lt_pos.ml
let f a b c = a > b ? a + c : c let s0 = 0 let rec target = function CNil -> s0 | CCons(hdv, hdi, tl) -> f hdv hdi (target tl)
null
https://raw.githubusercontent.com/synduce/Synduce/289888afb1c312adfd631ce8d90df2134de827b8/extras/solutions/constraints/memo/proper_indexation_sum_lt_pos.ml
ocaml
let f a b c = a > b ? a + c : c let s0 = 0 let rec target = function CNil -> s0 | CCons(hdv, hdi, tl) -> f hdv hdi (target tl)
becf7518f1652811bcc3968d19ac12d6270e3552b0c934058f503c420c3129b7
aelve/guide
Hue.hs
| Deprecated as of 2019 - 07 - 25 . -- TODO : remove after we have migrated from acid - state . -- -- Items could have different colors; this module provides type 'Hue' and -- used to provide a palette for turning hues into actual colors. module Guide.Types.Hue ( Hue(..), ) where import Imports import Data.Saf...
null
https://raw.githubusercontent.com/aelve/guide/96a338d61976344d2405a16b11567e5464820a9e/back/src/Guide/Types/Hue.hs
haskell
Items could have different colors; this module provides type 'Hue' and used to provide a palette for turning hues into actual colors.
| Deprecated as of 2019 - 07 - 25 . TODO : remove after we have migrated from acid - state . module Guide.Types.Hue ( Hue(..), ) where import Imports import Data.SafeCopy hiding (kind) import qualified Data.Aeson as Aeson data Hue = NoHue | Hue Int deriving (Eq, Ord, Generic, Data) deriveSafeCopySimple 1...
0e0e15185d4c40934b36cd63b76459c530cc1e1fc0561a03928abedae73dde8b
dtgoitia/civil-autolisp
GridLabels.lsp
; (defun c:xx () ; ; Trigger ( defun * error * ( errorMessage ) ( princ ( strcat " n-------- ERROR : " errorMessage " --------n " ) ) ( vl - bt ) ( DT : ReportError ) ) ( DT : AutoLoadFileFromCivilTemp " ErrorTracing.lsp " ) ( DT : AutoLoadFileFromCivilTemp " " ) ; (c:entryFunction) ; ; v0.0 - 2017...
null
https://raw.githubusercontent.com/dtgoitia/civil-autolisp/72d68139d372c84014d160f8e4918f062356349f/Dump%20folder/GridLabels.lsp
lisp
(defun c:xx () ; Trigger (c:entryFunction) v0.0 - 2017.09.18 - First issue Author : Last revision : 2017.09.18 ) END progn END if
( defun * error * ( errorMessage ) ( princ ( strcat " n-------- ERROR : " errorMessage " --------n " ) ) ( vl - bt ) ( DT : ReportError ) ) ( DT : AutoLoadFileFromCivilTemp " ErrorTracing.lsp " ) ( DT : AutoLoadFileFromCivilTemp " " ) (defun c:entryFunction ( / coordType coordValue newValue ename ) (if (...
7b625c69b6b173409f6337288dc2bb6a841da5fdec44b31acc5a1048dbf00776
vasilisp/inez
db_logic.ml
open Core.Std open Db_logic_intf module S : Schema = struct type _ t = | S_Int : int t | S_Bool : bool t | S_Pair : 'a t * 'b t -> ('a * 'b) t end module rec M : (Logic_intf.Term_with_ops with type 'i atom = 'i A.t) = Logic.Make_term(A) and R : (Row_with_ops with type ('i, 's) ...
null
https://raw.githubusercontent.com/vasilisp/inez/3bbbbb82a12918c1557f5fb0b49a8c73ab8d6da1/frontend/db_logic.ml
ocaml
TODO : tail recursive
open Core.Std open Db_logic_intf module S : Schema = struct type _ t = | S_Int : int t | S_Bool : bool t | S_Pair : 'a t * 'b t -> ('a * 'b) t end module rec M : (Logic_intf.Term_with_ops with type 'i atom = 'i A.t) = Logic.Make_term(A) and R : (Row_with_ops with type ('i, 's) ...
121c5d283dd3368faf155a85976588b162c8cdd360258e9d3968d0c7b6ca3888
NoRedInk/haskell-libraries
Stdout.hs
-- | Module for presenting test results on the console. -- -- Lifted in large part from: -test-reporter module Test.Reporter.Stdout ( report, ) where import qualified Control.Exception as Exception import qualified Data.ByteString as BS import qualified GHC.Stack as Stack import qualified List import NriPrelude im...
null
https://raw.githubusercontent.com/NoRedInk/haskell-libraries/8c79cefd5757cf5ba8ec2a16a7100bde4d75e1e2/nri-prelude/src/Test/Reporter/Stdout.hs
haskell
| Module for presenting test results on the console. Lifted in large part from: -test-reporter
module Test.Reporter.Stdout ( report, ) where import qualified Control.Exception as Exception import qualified Data.ByteString as BS import qualified GHC.Stack as Stack import qualified List import NriPrelude import qualified System.IO import qualified Test.Internal as Internal import Test.Reporter.Internal (black...
2fad811964b4931920c1f6d2bb90b68d068457d2c697ebff46cf133d6b0c1809
jakemcc/sicp-study
1.10.clj
Exercise 1.10 from SICP ; Ackermann's function (defn A [x y] (cond (= y 0) 0 (= x 0) (* 2 y) (= y 1) 2 :else (A (- x 1) (A x (- y 1))))) ; What are values of the following? (A 1 10) = > 1024 (A 2 4) = > 65536 (A 3 3) = > 65536 ; What are the following functions in mathem...
null
https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section1.2/1.10.clj
clojure
Ackermann's function What are values of the following? What are the following functions in mathematical terms?
Exercise 1.10 from SICP (defn A [x y] (cond (= y 0) 0 (= x 0) (* 2 y) (= y 1) 2 :else (A (- x 1) (A x (- y 1))))) (A 1 10) = > 1024 (A 2 4) = > 65536 (A 3 3) = > 65536 (defn f [n] (A 0 n)) f[n ] = 2*n (defn g [n] (A 1 n)) g[n ] = 2^n (defn h [n] (A 2 n)) h[n ] = ...
9879cb6b9d4d7489f652be239919982297a76244be09fb96c81dadd029520cd1
audreyt/openafp
IMM.hs
module OpenAFP.Records.AFP.IMM where import OpenAFP.Types import OpenAFP.Internals data IMM = IMM { imm_Type :: !N3 ,imm_ :: !N3 ,imm :: !NStr } deriving (Show, Typeable)
null
https://raw.githubusercontent.com/audreyt/openafp/178e0dd427479ac7b8b461e05c263e52dd614b73/src/OpenAFP/Records/AFP/IMM.hs
haskell
module OpenAFP.Records.AFP.IMM where import OpenAFP.Types import OpenAFP.Internals data IMM = IMM { imm_Type :: !N3 ,imm_ :: !N3 ,imm :: !NStr } deriving (Show, Typeable)
e004525ee5aa14736e02cd052ffe88014681ea1dee39fa9597ea99e4cbf9fb78
poscat0x04/telegram-types
GetGameHighScores.hs
module Web.Telegram.Types.Internal.API.GetGameHighScores where import Common data GetGameHighScores = GetGameHighScores { userId :: Int, chatId :: Maybe Int, messageId :: Maybe Int, inlineMessageId :: Maybe Text } deriving stock (Show, Eq) mkLabel ''GetGameHighScores deriveToJSON snake ''GetGameHig...
null
https://raw.githubusercontent.com/poscat0x04/telegram-types/3de0710640f5303638a83e409001b0342299aeb8/src/Web/Telegram/Types/Internal/API/GetGameHighScores.hs
haskell
module Web.Telegram.Types.Internal.API.GetGameHighScores where import Common data GetGameHighScores = GetGameHighScores { userId :: Int, chatId :: Maybe Int, messageId :: Maybe Int, inlineMessageId :: Maybe Text } deriving stock (Show, Eq) mkLabel ''GetGameHighScores deriveToJSON snake ''GetGameHig...
bc5f8946d286ed22cc1ca0889a050ccbfb898bc2746a93fa4d83ae4c1adf9ebd
pepeiborra/arrowp
Lift.hs
LANGUAGE Arrows {-# OPTIONS -F -pgmF arrowp-ext #-} module Lift where import Control.Arrow lifting a binary operation to arrows ( Hughes 's paper , s4.1 ) liftA2' :: Arrow a => (b -> c -> d) -> a e b -> a e c -> a e d liftA2' op f g = proc x -> do y <- f -< x z <- g -< x returnA -< y `op` z
null
https://raw.githubusercontent.com/pepeiborra/arrowp/34ce776d4116468c250f20b85f7967f1856384e5/examples/small/Lift.hs
haskell
# OPTIONS -F -pgmF arrowp-ext #
LANGUAGE Arrows module Lift where import Control.Arrow lifting a binary operation to arrows ( Hughes 's paper , s4.1 ) liftA2' :: Arrow a => (b -> c -> d) -> a e b -> a e c -> a e d liftA2' op f g = proc x -> do y <- f -< x z <- g -< x returnA -< y `op` z
1e1a1d462de6c59d1c715b1fb8d0e89fb64cb60fe4152fb037fb79704da5e9c4
clj-commons/seesaw
chooser.clj
Copyright ( c ) , 2011 . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this ; distribution. ; By using this software in any fashion, you are agreeing to be ...
null
https://raw.githubusercontent.com/clj-commons/seesaw/4ca89d0dcdf0557d99d5fa84202b7cc6e2e92263/src/seesaw/chooser.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not rem...
Copyright ( c ) , 2011 . All rights reserved . (ns ^{:doc "File chooser and other common dialogs." :author "Dave Ray"} seesaw.chooser (:use [seesaw.color :only [to-color]] [seesaw.options :only [default-option bean-option apply-options option-map option-provider]...
1428b9635912b9cacaa98470586405d908899093f4a66323d0d58ba822a80848
squaresLab/genprog-code
llvm_mut_test.ml
Load mutate and compile an ASM .s file , return 0 on success let main () = begin let rep = new Llvmrep.llvmRep in (* load *) rep#from_source "gcd.ll"; (* mutate *) rep#replace 29 51; (* write to disk *) rep#output_source "temp.ll" ; (* compile *) let compile_success = rep#compile "te...
null
https://raw.githubusercontent.com/squaresLab/genprog-code/7982415b347529efee02190ab9ba6bd7eda6195e/test/llvm_mut_test.ml
ocaml
load mutate write to disk compile
Load mutate and compile an ASM .s file , return 0 on success let main () = begin let rep = new Llvmrep.llvmRep in rep#from_source "gcd.ll"; rep#replace 29 51; rep#output_source "temp.ll" ; let compile_success = rep#compile "temp.ll" "gcd" in if compile_success then exit 0 else exit 1; end ;; ...
e4e139259efaa158f02b56e3893b2f670177ae2ecf5b202b83206432d748a05e
greglook/clj-pgp
encryption.clj
(ns clj-pgp.test.encryption (:require [byte-streams :refer [bytes=] :as bytes] [clj-pgp.core :as pgp] [clj-pgp.error :as error] [clj-pgp.generate :as pgp-gen] [clj-pgp.message :as pgp-msg] [clj-pgp.test.keys :refer [gen-ec-keyspec gen-rsa-keyspec spec->keypair memospec->...
null
https://raw.githubusercontent.com/greglook/clj-pgp/fe2b5cc6e49446bed59712e670c487c5ead57841/test/clj_pgp/test/encryption.clj
clojure
(ns clj-pgp.test.encryption (:require [byte-streams :refer [bytes=] :as bytes] [clj-pgp.core :as pgp] [clj-pgp.error :as error] [clj-pgp.generate :as pgp-gen] [clj-pgp.message :as pgp-msg] [clj-pgp.test.keys :refer [gen-ec-keyspec gen-rsa-keyspec spec->keypair memospec->...
daa4f18bad6255af1194d985a99e463b03a2187bf1de5c2270be5ba489ca016c
coq/coq
persistent_counter.ml
(* * This file defines our persistent counter, which we use in the * CountPersistent command. *) (* * At its core, our persistent counter looks exactly the same as * our non-persistent counter (with a different name to prevent collisions): *) let counter = Summary.ref ~name:"persistent_counter" 0 * The diffe...
null
https://raw.githubusercontent.com/coq/coq/ce331e72c06e8d4467894a1fda8bbba50bf40fd6/doc/plugin_tutorial/tuto2/src/persistent_counter.ml
ocaml
* This file defines our persistent counter, which we use in the * CountPersistent command. * At its core, our persistent counter looks exactly the same as * our non-persistent counter (with a different name to prevent collisions): * We then use declare_object to create a function that takes an integer value...
let counter = Summary.ref ~name:"persistent_counter" 0 * The difference is that we need to declare it as a persistent object * using Libobject.declare_object . To do that , we define a function that * saves the value that is passed to it into the reference we have just defined : * The difference is that ...
bf6755541ab14ee02eaf4e5476a490f261229f88a57713d04a9970410cf5af08
luc-tielen/souffle-dsl
DSLSpec.hs
# LANGUAGE DeriveGeneric , , TypeApplications , QuasiQuotes , TypeOperators # # LANGUAGE DataKinds , TypeFamilies # module Test.Language.Souffle.DSLSpec ( module Test.Language.Souffle.DSLSpec ) where import qualified Test.Language.Souffle.DSL.Fixtures as F import Test.Hspec import GHC.Generics import Data.Int i...
null
https://raw.githubusercontent.com/luc-tielen/souffle-dsl/b85de30719de2755ea39e9b6c9b96d74db0cf140/tests/Test/Language/Souffle/DSLSpec.hs
haskell
NOTE: type signature not required, but it results in more clear type errors and can serve as documentation. TODO: check for number, unsigned, float; check underscore is not allowed NOTE: the following generated programs are not correct since vars are not grounded (but is done to keep tests succinct)
# LANGUAGE DeriveGeneric , , TypeApplications , QuasiQuotes , TypeOperators # # LANGUAGE DataKinds , TypeFamilies # module Test.Language.Souffle.DSLSpec ( module Test.Language.Souffle.DSLSpec ) where import qualified Test.Language.Souffle.DSL.Fixtures as F import Test.Hspec import GHC.Generics import Data.Int i...
6756ad8a31fd260ee059726df8b4b28413f7a5a48c508dd5a063bf6f109fd066
redstarssystems/apptemplate
build.clj
(ns build (:refer-clojure :exclude [test]) (:require [org.corfield.build :as bb] [clojure.tools.build.api :as b] [clojure.edn] [clojure.pprint :as pprint])) (def project-env {:group-id (System/getenv "group-id") :artifact-id (System/gete...
null
https://raw.githubusercontent.com/redstarssystems/apptemplate/03bafa7c859ef26ea61b35ed290eb38233a2ae6d/resources/org/rssys/apptemplate/root/build.clj
clojure
(ns build (:refer-clojure :exclude [test]) (:require [org.corfield.build :as bb] [clojure.tools.build.api :as b] [clojure.edn] [clojure.pprint :as pprint])) (def project-env {:group-id (System/getenv "group-id") :artifact-id (System/gete...
e310b6d74cd5790a410b608fb843eaa49070e28812c516c8d5a0a38f34026d58
zhugecaomao/AutoLISP
ch3-加减前后缀.lsp
;一个加减前、后缀的程序 (DEFUN C:ch3 () (setq qh (getint "\n1--加前缀,2--加后缀,<1>")) (if (= qh nil)(setq qh 1)) (princ "\nselect object:") (setq s (ssget)) (setq str (getstring "\n输入要加的字:")) (setq n (sslength s)) (setq k 0 ) (while (< k n) (setq name (ssname s k)) (setq a (entget name)) (setq t1 (assoc '0 a...
null
https://raw.githubusercontent.com/zhugecaomao/AutoLISP/3e97f911068124f3ea8a1cf6f1d8be9f8227c64b/ch3-%E5%8A%A0%E5%87%8F%E5%89%8D%E5%90%8E%E7%BC%80.lsp
lisp
一个加减前、后缀的程序
(DEFUN C:ch3 () (setq qh (getint "\n1--加前缀,2--加后缀,<1>")) (if (= qh nil)(setq qh 1)) (princ "\nselect object:") (setq s (ssget)) (setq str (getstring "\n输入要加的字:")) (setq n (sslength s)) (setq k 0 ) (while (< k n) (setq name (ssname s k)) (setq a (entget name)) (setq t1 (assoc '0 a)) (set...
4f21f5e1f6fb25e33e034e6e532aa33728fe1e7dd72d0d580035452bcd63cd0d
rollacaster/sketches
circular_shapes.cljs
(ns sketches.nature-of-code.physics-library.circular-shapes (:require matter-js [quil.core :as q :include-macros true] [quil.middleware :as md] [sketches.nature-of-code.physics-library.matter :as m]))- (defn setup [] (q/frame-rate 30) (let [engine (.create (.-Engine matter-js)...
null
https://raw.githubusercontent.com/rollacaster/sketches/f0c491e4cfdb522be6a2d7fd0cffb3c36dec46b5/src/sketches/nature_of_code/physics_library/circular_shapes.cljs
clojure
(ns sketches.nature-of-code.physics-library.circular-shapes (:require matter-js [quil.core :as q :include-macros true] [quil.middleware :as md] [sketches.nature-of-code.physics-library.matter :as m]))- (defn setup [] (q/frame-rate 30) (let [engine (.create (.-Engine matter-js)...
f57186815a30fbda5e7fb2720691929978cd088deb62f543d94c348697ea9766
ghc/ghc
Prim.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE BlockArguments # {-# LANGUAGE MultiWayIf #-} disable this warning because of all the lambdas matching on ' -- arguments. # OPTIONS_GHC -Wno - incomplete - uni - patterns # module GHC.StgToJS.Prim ( genPrim ) where import GHC.Prelude import GHC.JS.Syntax hiding (J...
null
https://raw.githubusercontent.com/ghc/ghc/239202a2b14714740e016d7bbcd4f351356fcb00/compiler/GHC/StgToJS/Prim.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE MultiWayIf # arguments. ^ Profiling (cost-centres) enabled ^ Array bounds-checking enabled ^ the primitive operation ^ where to store the result ^ arguments ---------------------------- Int ---------------------------------------------- add with carry: overflow == 0 iff ...
# LANGUAGE BlockArguments # disable this warning because of all the lambdas matching on ' # OPTIONS_GHC -Wno - incomplete - uni - patterns # module GHC.StgToJS.Prim ( genPrim ) where import GHC.Prelude import GHC.JS.Syntax hiding (JUOp (..)) import GHC.JS.Make import GHC.StgToJS.Heap import GHC.StgToJS.Type...
3646fdb00158cc020cbf2272d4c5a40cf033e9811f9e3975ed37d276f9eccf4d
wz1000/hie-lsp
Base.hs
-- | This module provides 'RequesterT', the standard implementation of -- 'Requester'. # LANGUAGE AllowAmbiguousTypes # # LANGUAGE CPP # {-# LANGUAGE EmptyDataDecls #-} # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiPa...
null
https://raw.githubusercontent.com/wz1000/hie-lsp/dbb3caa97c0acbff0e4fd86fc46eeea748f65e89/reflex-0.6.1/src/Reflex/Requester/Base.hs
haskell
| This module provides 'RequesterT', the standard implementation of 'Requester'. # LANGUAGE EmptyDataDecls # # LANGUAGE GADTs # # LANGUAGE Rank2Types # # OPTIONS_GHC -fplugin=Reflex.Optimizer # TODO: Make this module type-safe # UNPACK # # UNPACK # # UNPACK # # UNPACK # # UNPACK # # UNPACK # | Runs in reverse to acc...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE CPP # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecursiveDo # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeFamilies # # LANGUAG...
3830cc24a8982a82297582982120606d36adb06317cbcee40a19f4af1ac62c49
conscell/hugs-android
BankersQueue.hs
Copyright ( c ) 1998 - 1999 . -- See COPYRIGHT file for terms and conditions. module BankersQueue {-# DEPRECATED "This module is unmaintained, and will disappear soon" #-} ( -- type of banker's queues instance of Sequence , Functor , Monad , MonadPlus -- sequence operations empty,single,cons,...
null
https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/oldlib/BankersQueue.hs
haskell
See COPYRIGHT file for terms and conditions. # DEPRECATED "This module is unmaintained, and will disappear soon" # type of banker's queues sequence operations documentation signatures for exported functions Adapted from and invariant: front at least as long as rear not exported not exported not exported emp...
Copyright ( c ) 1998 - 1999 . module BankersQueue ( instance of Sequence , Functor , Monad , MonadPlus empty,single,cons,snoc,append,lview,lhead,ltail,rview,rhead,rtail, null,size,concat,reverse,reverseOnto,fromList,toList, map,concatMap,foldr,foldl,foldr1,foldl1,reducer,reducel,reduce1, c...
b85a570bedc5c2ad62897a94b47520c0b4dcb80a1398a412b16832b6db4c072f
pirapira/coq2rust
extract_env.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/plugins/extraction/extract_env.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** ************************************...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Miniml open Term open De...
f26144c632323925ab7c97105bacbdabcf1fb0ff75a430c9bca49fe9fa015561
pixlsus/registry.gimp.org_static
mhwaterpat.scm
;;mhwaterpattern ;Kiki -mura.net/GIMP/gimp.htm ; (define (script-fu-mhwaterpat width height seedr wtype type? rnd? more?) (let* ((img (car (gimp-image-new 256 256 RGB))) (drawable (car (gimp-layer-new img width height RGB "drawable" 100 NORMAL))) (old-fg (car (gimp-palette-get-foreground))) ...
null
https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/mhwaterpat.scm
scheme
mhwaterpattern Kiki レイヤー追加 (gimp-image-scale img width height) delete alpha
-mura.net/GIMP/gimp.htm (define (script-fu-mhwaterpat width height seedr wtype type? rnd? more?) (let* ((img (car (gimp-image-new 256 256 RGB))) (drawable (car (gimp-layer-new img width height RGB "drawable" 100 NORMAL))) (old-fg (car (gimp-palette-get-foreground))) (old-bg (car (gimp-...
223beda53b44119940fc3da6ee04ecc44cd9cc5ee029f737d8a7bfaaa0852309
galdor/tungsten
routes.lisp
(in-package :http) (deftype route-path-segment () '(or string symbol)) (deftype route-path () 'list) (defclass route () ((name :type symbol :initarg :name :reader route-name) (method :type (or request-method null) :initarg :method :initform nil :reader route-method) (path ...
null
https://raw.githubusercontent.com/galdor/tungsten/5d6e71fb89af32ab3994c5b2daf8b902a5447447/tungsten-http/src/routes.lisp
lisp
(in-package :http) (deftype route-path-segment () '(or string symbol)) (deftype route-path () 'list) (defclass route () ((name :type symbol :initarg :name :reader route-name) (method :type (or request-method null) :initarg :method :initform nil :reader route-method) (path ...
3e402a2cdee382843292b52c8934efc3a37fd37a29f8ef5a38bf333c9b59b641
huangjs/cl
dqk15.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ " " f2cl6.l ,...
null
https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/src/numerical/slatec/dqk15.lisp
lisp
Compiled by f2cl version: Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ " " f2cl6.l , v 1.48 2008/08/24 00:56:27 rt...
9ced91849becdc077f07720b48774419b5fcbab545aa537f6ed2a73972efce9f
spechub/Hets
ParseMS.hs
| Module : ./OWL2 / ParseMS.hs Copyright : ( c ) License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : portable Manchester Syntax parser References : < -manchester-syntax/ > Module : ./OWL2/ParseMS.hs Copyright :...
null
https://raw.githubusercontent.com/spechub/Hets/f582640a174df08d4c965d7c0a1ab24d1a31000d/OWL2/ParseMS.hs
haskell
| Parses a comment | OWL and CASL structured keywords including 'andS' and 'notS' | rfc3987 plus '+' from scheme (scheme does not allow the dots) uriQ = fullIri <|> abbrIri * description | plain string parser with skip | keyword not followed by any alphanum creating the facet-value pairs parses "some" or "only...
| Module : ./OWL2 / ParseMS.hs Copyright : ( c ) License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : portable Manchester Syntax parser References : < -manchester-syntax/ > Module : ./OWL2/ParseMS.hs Copyright :...
59daf283d7f619e73ab6fd551959654aa2c8235a50cc9315d341085e076f7bd8
GaloisInc/semmc
MemAccesses.hs
{-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE KindSignatures # # LANGUAGE PolyKinds # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE TypeOperators # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE AllowAmbiguousTypes # # LANG...
null
https://raw.githubusercontent.com/GaloisInc/semmc/4dc4439720b3b0de8812a68f8156dc89da76da57/semmc-synthesis/src/SemMC/Synthesis/Cegis/MemAccesses.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE GADTs # * Utilities | Returns the set of memory operations that are accessed by the formula | Return the concrete addresses accessed by the formula | Gets the set of memory accesses occurring in an expression * Utilities | Filters out locations that do not refer to memory or ins...
# LANGUAGE ScopedTypeVariables # # LANGUAGE KindSignatures # # LANGUAGE PolyKinds # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE TypeOperators # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE TypeApplications # # LANGUAGE UndecidableInsta...
a33e9881088429d59fa710f14a8d49fc74ab2b3c172ded33008a3f06ddfa5ff2
xclerc/ocamljava
mapper.mli
* This file is part of OCaml - Java optimizer . * Copyright ( C ) 2007 - 2015 . * * optimizer is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation ; either version 3 of the License , o...
null
https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/optimizer/src/mapper.mli
ocaml
* Mappers for various structures.
* This file is part of OCaml - Java optimizer . * Copyright ( C ) 2007 - 2015 . * * optimizer is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation ; either version 3 of the License , o...
30490a3e973f1ff28ef27dbfba5757e61e0c6c0f1bed359e4bfcdda372b2a744
ocamllabs/ocaml-modular-implicits
thread.mli
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/otherlibs/threads/thread.mli
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with type t * { 6 Thread creation and ter...
c97bd329790f452e0b73c98d5d59a3c6676fa55d53f26b78f67e226e11625bcc
froggey/Mezzano
tcp.lisp
;;; TCP ;;; Transmission Control Protocol - Protocol Specification ;;; ;;; EFSM / SDL modeling of the original TCP standard ( ) and the ;;; Congestion Control Mechanism of TCP Reno ;;; -07-22-tcp-EFSM.pdf ;;; Computing TCP 's Retransmission Timer ;;; (in-package :mezzano.network.tcp) (defconstant +tcp4-heade...
null
https://raw.githubusercontent.com/froggey/Mezzano/9d34948fee1cfd54875ae909f12b3367a888f3cf/net/tcp.lisp
lisp
TCP Congestion Control Mechanism of TCP Reno -07-22-tcp-EFSM.pdf FIXME: Inbound connections need to timeout if state :syn-received don't change. TODO: Better locking on this is probably needed. It looks like it is accesed from the network serial queue and from user threads. find a suitable port number Do...
Transmission Control Protocol - Protocol Specification EFSM / SDL modeling of the original TCP standard ( ) and the Computing TCP 's Retransmission Timer (in-package :mezzano.network.tcp) (defconstant +tcp4-header-source-port+ 0) (defconstant +tcp4-header-destination-port+ 2) (defconstant +tcp4-header-sequence...
2dea842cce3db549f61f18eae46d08a35ac79f9f6f78de35b7ec15158d90c9ef
ztellman/immutable-bitset
immutable_bitset_test.clj
(ns immutable-bitset-test (:use [clojure test] [immutable-bitset]) (:require [criterium.core :as c] [clojure.set :as s] [collection-check :as check] [simple-check.generators :as gen]) (:import [java.util BitSet])) (deftest test-equivalency (check/assert-set-like 1e3 (sparse-bitset) ...
null
https://raw.githubusercontent.com/ztellman/immutable-bitset/63fbe232390522527db021266be29cfcec5c1f33/test/immutable_bitset_test.clj
clojure
(ns immutable-bitset-test (:use [clojure test] [immutable-bitset]) (:require [criterium.core :as c] [clojure.set :as s] [collection-check :as check] [simple-check.generators :as gen]) (:import [java.util BitSet])) (deftest test-equivalency (check/assert-set-like 1e3 (sparse-bitset) ...
613b2cbab86153da37760e1a3f7c9f4d71945b07346d7962a25ca4634d6257a2
epiccastle/spire
ssh_test.clj
(ns spire.ssh-test (:require [clojure.test :refer :all] [clojure.string :as string] [spire.transport :as transport] [spire.module.shell :as shell] [spire.test-config :as test-config])) (deftest ssh-host-descriptions (testing "ssh host descriptions" (transport/ssh...
null
https://raw.githubusercontent.com/epiccastle/spire/7439a0a17c25fd54e3d86712d2a44b38fd71877a/test/clojure/spire/ssh_test.clj
clojure
(ns spire.ssh-test (:require [clojure.test :refer :all] [clojure.string :as string] [spire.transport :as transport] [spire.module.shell :as shell] [spire.test-config :as test-config])) (deftest ssh-host-descriptions (testing "ssh host descriptions" (transport/ssh...
0bce55247a15c491a775c4a438b294f55f44cc9f3db2d1fcaf34863b83409a83
TrustInSoft/tis-kernel
unmarshal_hashtbl_test.ml
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/libraries/datatype/unmarshal_hashtbl_test.ml
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 Copyright ( C ) 2009 - 2012 ( Institut National de Recherche en Informatique et en LIA...
bae8d5e0f667ec72d2f255721d950bb12fdca8e7017f352bedb0a9aadc1e70e4
tonyg/kali-scheme
analyze.scm
Copyright ( c ) 1993 , 1994 by and . Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING . ; Simple code analysis to determine whether it's a good idea to ; in-line calls to a given procedure. ; Hook into the byte code compiler. (set-optimizer! 'auto-integrate (lambda (forms package)...
null
https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/opt/analyze.scm
scheme
Simple code analysis to determine whether it's a good idea to in-line calls to a given procedure. Hook into the byte code compiler. These should already be taken care of. ((primitive-procedure-node? node) We elect to integrate a procedure definition when -------------------- SIMPLE? takes an alpha-converted expr...
Copyright ( c ) 1993 , 1994 by and . Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING . (set-optimizer! 'auto-integrate (lambda (forms package) (let ((out (current-noise-port))) (newline out) (display "Analyzing... " out) (force-output out) (let* ((forms (fin...
477f38b603fa2bbad9778aa7ba4640fc7bb1973bc58dbff69398c75666a999e0
Bogdanp/koyo
mod.rkt
#lang racket/base Prior to racket / racket@14f0f86 , dynamic - rerequire did not handle ;; transitive dependencies correctly so this module can be used to ;; force it to reload dependencies properly on those versions. (require racket/list racket/match version/utils "zo.rkt") (provide sh...
null
https://raw.githubusercontent.com/Bogdanp/koyo/2dd096940da875085855124ef04421657f9c4581/koyo-lib/koyo/private/mod.rkt
racket
transitive dependencies correctly so this module can be used to force it to reload dependencies properly on those versions.
#lang racket/base Prior to racket / racket@14f0f86 , dynamic - rerequire did not handle (require racket/list racket/match version/utils "zo.rkt") (provide should-touch-dependents? touch-dependents) (define should-touch-dependents? (version<? (version) "8.2.0.4")) (define (touch-dep...
16158a894ea7bf5f842d6fded33577fc29b04f92adb7c46d5f5ed39c36c28469
ulricha/dsh
Lang.hs
# LANGUAGE FlexibleInstances # # LANGUAGE StandaloneDeriving # {-# LANGUAGE TemplateHaskell #-} module Database.DSH.FKL.Lang where import qualified Data.Foldable as F import Prelude hiding ((<$>)) import Text.PrettyPrint.ANSI.Leijen import Tex...
null
https://raw.githubusercontent.com/ulricha/dsh/e6cd5c6bea575e62a381e89bfc4cc7cb97485106/src/Database/DSH/FKL/Lang.hs
haskell
# LANGUAGE TemplateHaskell # operators might be lifted to arbitrary levels. occur either unlifted or lifted once. | Forget does not unsegment the vector. That is: the descriptor occur. This is propably ok when we know that a concated vector will be unconcated again. We know this statically when introducing con...
# LANGUAGE FlexibleInstances # # LANGUAGE StandaloneDeriving # module Database.DSH.FKL.Lang where import qualified Data.Foldable as F import Prelude hiding ((<$>)) import Text.PrettyPrint.ANSI.Leijen import Text.Printf import Database....
d2097de65452915950058c937cd02b4b3063f9bae613e028339b40e32ba27ae9
2600hz/kazoo
kz_services.erl
%%%----------------------------------------------------------------------------- ( C ) 2012 - 2020 , 2600Hz %%% @doc 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 /. %%% %%% @end %%%--------...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_services/src/kz_services.erl
erlang
----------------------------------------------------------------------------- @doc @end ----------------------------------------------------------------------------- ------------------------------------------------------------------------------ @doc Returns the account id of the {@link services()}. @end ----------...
( C ) 2012 - 2020 , 2600Hz 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 /. -module(kz_services). -export([account_id/1]). -export([services_jobj/1 ,set_services_jobj/2 ]). ...
1c36b6b7335475089559d59a2c84cc7f5011de119dab72536e541422b58b4d64
svenpanne/EOPL3
exercise-2-27.rkt
#lang eopl ; ------------------------------------------------------------------------------ Exercise 2.27 ((lambda (a) (a b)) c) ; app-exp ; / \ ; lambda-exp var-exp ; / \ | ; bound-var body c ; | | ; a app-exp ; ...
null
https://raw.githubusercontent.com/svenpanne/EOPL3/3fc14c4dbb1c53a37bd67399eba34cea8f8234cc/chapter2/exercise-2-27.rkt
racket
------------------------------------------------------------------------------ app-exp / \ lambda-exp var-exp / \ | bound-var body c | | a app-exp / \ var-exp var-exp | ...
#lang eopl Exercise 2.27 ((lambda (a) (a b)) c) (lambda (x) (lambda (y) ((lambda (x) (x y)) x)))
565a44c87dd3982a7d124bf489fce9e2c109d77739ec9b6f0754047abd92950b
saltysystems/overworld
ow_sparsegrid.erl
-module(ow_sparsegrid). -export([ new/0, col/2, col/3, row/3, row/2, put/4, put/3, get/2, floodfill/2, is_contiguous/2, set_flag/3, has_flag/3, get_flag/2, whereis/2 ]). % @doc % This module defines a new version of grid2d with a sparse grid. % @end -type coor...
null
https://raw.githubusercontent.com/saltysystems/overworld/272d188008e70a37c8016097d8c6581b0d691dd5/src/ow_sparsegrid.erl
erlang
@doc This module defines a new version of grid2d with a sparse grid. @end list and order them and build a new map list and order them and build a new map each subsequent func needs to use the updated board from the last one.. lists:foldl ? Performs a floodfill starting at the specified coordinates. return 't...
-module(ow_sparsegrid). -export([ new/0, col/2, col/3, row/3, row/2, put/4, put/3, get/2, floodfill/2, is_contiguous/2, set_flag/3, has_flag/3, get_flag/2, whereis/2 ]). -type coords() :: ow_vector:vector(). new() -> #{}. -spec col(pos_integer(), map(), in...
9ea7ab59acb2e869e0e7911b0d5adf4b0be5a82cb758436bdb301204a32d7592
ghcjs/ghcjs
t10011.hs
# LANGUAGE ScopedTypeVariables , TypeOperators , GADTs # module Main ( main -- :: IO () ) where import Data.Data import Data.Ratio main :: IO () main = let bad = gmapT (\(x :: b) -> case eqT :: Maybe (b :~: Integer) of Nothing -> x; Just Refl -> x * 2) (1 %...
null
https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/numeric/t10011.hs
haskell
:: IO ()
# LANGUAGE ScopedTypeVariables , TypeOperators , GADTs # module Main ) where import Data.Data import Data.Ratio main :: IO () main = let bad = gmapT (\(x :: b) -> case eqT :: Maybe (b :~: Integer) of Nothing -> x; Just Refl -> x * 2) (1 % 2) :: Rational in print...
d30d0e2ab5fdbda75beb120f26767e226d3cd183ce789f3163d88b5cabfdc766
Clozure/ccl-tests
doit2.lsp
#+allegro (progn (rt:disable-note :nil-vectors-are-strings) (rt:disable-note :standardized-package-nicknames) (rt:disable-note :type-of/strict-builtins) (rt:disable-note :assume-no-simple-streams) (rt:disable-note :assume-no-gray-streams)) #+lispworks (progn (rtest:disable-note :allow-nil-arrays) (rtest:...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/doit2.lsp
lisp
invoked from a file that is being loaded, so remove them
#+allegro (progn (rt:disable-note :nil-vectors-are-strings) (rt:disable-note :standardized-package-nicknames) (rt:disable-note :type-of/strict-builtins) (rt:disable-note :assume-no-simple-streams) (rt:disable-note :assume-no-gray-streams)) #+lispworks (progn (rtest:disable-note :allow-nil-arrays) (rtest:...
1b06bb27ac54df2e82ed17708ccab15aff45cebb5b478c6e41b1e658b80605f5
sethalves/snow2-client
srfi-27-a.scm
; MODULE DEFINITION FOR SRFI-27 ; ============================= ; , , in Scheme 48 0.57 ; This file contains the top - level definition for the 54 - bit integer - only implementation of SRFI-27 for the Scheme 48 0.57 system . ; 1 . The core generator is implemented in ' mrg32k3a-a.scm ' . 2 . The generic p...
null
https://raw.githubusercontent.com/sethalves/snow2-client/b70c3ca5522a666a71a4c8992f771d5faaceccd6/srfi/srfi-27/srfi-27-a.scm
scheme
MODULE DEFINITION FOR SRFI-27 ============================= creating the module: ,config ,load srfi-27-a.scm loading the module, once created: history of this file: (open scheme-level-1 (subset srfi-9 (define-record-type)) (subset posix-time (current-time))
, , in Scheme 48 0.57 This file contains the top - level definition for the 54 - bit integer - only implementation of SRFI-27 for the Scheme 48 0.57 system . 1 . The core generator is implemented in ' mrg32k3a-a.scm ' . 2 . The generic parts of the interface are in ' mrg32k3a.scm ' . 3 . The non - generic...
dc0ba36a18ba1ec91228c76695ef17ad5ed55c6a23c2639d7d1424236364c797
tnelson/Forge
emptyJoinError.rkt
#lang forge/core (require (only-in rackunit check-exn)) (set-option! 'verbose 2) ; needed in order to do last-checking now (define Person (make-sig 'Person)) (define Marker (make-sig 'Marker)) (define Node (make-sig 'Node)) (define Color (make-sig 'Color)) (define CoastalTown (make-sig 'CoastalTown #:extends Node)) ...
null
https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/tests/forge-functional/other/emptyJoinError.rkt
racket
needed in order to do last-checking now
#lang forge/core (require (only-in rackunit check-exn)) (define Person (make-sig 'Person)) (define Marker (make-sig 'Marker)) (define Node (make-sig 'Node)) (define Color (make-sig 'Color)) (define CoastalTown (make-sig 'CoastalTown #:extends Node)) (define markers (make-relation 'markers (list Person Marker))) (de...
a28ca0d6e346489385e6cfe80e3f0e900fa98e17ec085e2d04984e84276b4fca
herbelin/coq-hh
coqc.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/scripts/coqc.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** environment coqc options compil...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Afin de rendre Coq plus por...
cc40a61c530db4ea09dada6163f2253a688a4a5135edec1729eb4c7c44a9ab33
zalando/friboo
db_test.clj
(ns org.zalando.stups.friboo.system.db-test (:require [clojure.test :refer :all] [org.zalando.stups.friboo.system.db :refer :all] [cheshire.core :as json] [clj-time.format :as f] [org.zalando.stups.friboo.test-utils :as u] [com.stuartsierra.component :as com...
null
https://raw.githubusercontent.com/zalando/friboo/5e312365a57535b0197fd787bd95ffafe6c3f4aa/test/org/zalando/stups/friboo/system/db_test.clj
clojure
joda time clj-time default parser clj-time date-time parser
(ns org.zalando.stups.friboo.system.db-test (:require [clojure.test :refer :all] [org.zalando.stups.friboo.system.db :refer :all] [cheshire.core :as json] [clj-time.format :as f] [org.zalando.stups.friboo.test-utils :as u] [com.stuartsierra.component :as com...
f4c23acb4c179a0d8e1d167e6f0cbf487cbca0a52c67cbdce623ea90f544585c
ProjectMAC/propagators
dot-writer.scm
;;; ---------------------------------------------------------------------- Copyright 2010 . ;;; ---------------------------------------------------------------------- This file is part of Propagator Network Prototype . ;;; Propagator Network Prototype is free software ; you can ;;; redistribute it and/or modif...
null
https://raw.githubusercontent.com/ProjectMAC/propagators/add671f009e62441e77735a88980b6b21fad7a79/extensions/dot-writer.scm
scheme
---------------------------------------------------------------------- ---------------------------------------------------------------------- you can redistribute it and/or modify it under the terms of the GNU any later version. will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of M...
Copyright 2010 . This file is part of Propagator Network Prototype . General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) Propagator Network Prototype is distributed in the hope that it You should have received a copy of the GNU Gene...
8c52432e681bcb922b15219e6dec75bf6622598b0273cc63bf7b86b234997c1a
Liqwid-Labs/plutus-extra
Main.hs
# LANGUAGE QuasiQuotes # {-# LANGUAGE TemplateHaskellQuotes #-} # LANGUAGE TypeFamilies # module Main (main) where -------------------------------------------------------------------------------- import Test.Tasty (defaultMain, localOption, testGroup) import Test.Tasty.Plutus.Options (maxSize, testCount) import Prel...
null
https://raw.githubusercontent.com/Liqwid-Labs/plutus-extra/87783568ca459679de59809bba2f70a654d1e94d/tasty-plutus/test/Properties/Main.hs
haskell
# LANGUAGE TemplateHaskellQuotes # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------
# LANGUAGE QuasiQuotes # # LANGUAGE TypeFamilies # module Main (main) where import Test.Tasty (defaultMain, localOption, testGroup) import Test.Tasty.Plutus.Options (maxSize, testCount) import Prelude import MintingPolicy qualified as MP (tests) import Validator qualified as V (tests) main :: IO () main = defau...
3ab3d1ef6640529468a004a6320e773ee4f12e6756bd3e42a3b5a2e098ba19c0
let-def/pdfmagick
main.ml
module Split = struct let numget x = let x' = int_of_float x in if abs_float (float_of_int x' -. x) <= epsilon_float then Pdf.Integer x' else Pdf.Real x let box x y x' y' = Pdf.Array [numget x; numget y; numget x'; numget y'] let split_h (x,y,x',y') = let y2 = y +. y' /. 2. in [...
null
https://raw.githubusercontent.com/let-def/pdfmagick/157fbd632ba1e60e0fd6076d207e6516a1e25f79/main.ml
ocaml
module Split = struct let numget x = let x' = int_of_float x in if abs_float (float_of_int x' -. x) <= epsilon_float then Pdf.Integer x' else Pdf.Real x let box x y x' y' = Pdf.Array [numget x; numget y; numget x'; numget y'] let split_h (x,y,x',y') = let y2 = y +. y' /. 2. in [...
95a15a1632333db1186dae16fff0e1b58d3229af893241a7906a150fb575b3ba
zoomhub/zoomhub
Main.hs
module Main (main) where import qualified ZoomHub.Web.Main as Web main :: IO () main = Web.main
null
https://raw.githubusercontent.com/zoomhub/zoomhub/3779709478d17a4c46762de1d5d3ae451437c087/app/Main.hs
haskell
module Main (main) where import qualified ZoomHub.Web.Main as Web main :: IO () main = Web.main
b159f88466dc9239b0234decdd783978f357468b587903f65e68136373ddbf22
quil-lang/magicl
benchmark-utilities.lisp
;;;; benchmark-utilities.lisp ;;;; Author : (in-package #:magicl) ;;; Little utilities for benchmarking. (defun time-backends (fn &optional (backends (reverse magicl.backends::*known-backends*))) "Time the thunk FN against the backends BACKENDS. By default. BACKENDS are all backends." (format t ";;; Timing ~...
null
https://raw.githubusercontent.com/quil-lang/magicl/45eae6e60329e8312496d25f1abfbf15274f4c89/src/benchmark-utilities.lisp
lisp
benchmark-utilities.lisp Little utilities for benchmarking.
Author : (in-package #:magicl) (defun time-backends (fn &optional (backends (reverse magicl.backends::*known-backends*))) "Time the thunk FN against the backends BACKENDS. By default. BACKENDS are all backends." (format t ";;; Timing ~A~%" fn) (dolist (b (alexandria:ensure-list backends)) (handler-cas...
611f97ea0d4dfe221fed4cce51c60a85465ab56cf9b7d0787b908904b08f93db
erlyaws/yaws
ybed.erl
-module(ybed). -compile(export_all). start() -> {ok, spawn_link(?MODULE, run, [])}. run() -> Id = "embedded", GconfList = [{id, Id}], Docroot = "/tmp", SconfList = [{port, 8888}, {servername, "foobar"}, {listen, {0,0,0,0}}, {docroot, Docroot}], ...
null
https://raw.githubusercontent.com/erlyaws/yaws/da198c828e9d95ca2137da7884cddadd73941d13/www/ybed.erl
erlang
-module(ybed). -compile(export_all). start() -> {ok, spawn_link(?MODULE, run, [])}. run() -> Id = "embedded", GconfList = [{id, Id}], Docroot = "/tmp", SconfList = [{port, 8888}, {servername, "foobar"}, {listen, {0,0,0,0}}, {docroot, Docroot}], ...
95e730c272fd74c3cdae1b02993c15171e9079ff8e1eb8cc588826e891f128e8
LuisThiamNye/chic
nrepl.clj
(ns chic.debug.nrepl (:require [nrepl.core :as nrepl] [nrepl.server] [nrepl.middleware.session :as middleware.session] [nrepl.middleware :as middleware] [rewrite-clj.parser :as rw.parse])) (def *root-session-bindings "Var->init" (atom {})) (def ^:dynamic *last-eval* nil) (defn listen-eval-msg [...
null
https://raw.githubusercontent.com/LuisThiamNye/chic/813633a689f9080731613f788a295604d4d9a510/src/chic/debug/nrepl.clj
clojure
Restore classloader after each eval (so they don't keep stacking up)
(ns chic.debug.nrepl (:require [nrepl.core :as nrepl] [nrepl.server] [nrepl.middleware.session :as middleware.session] [nrepl.middleware :as middleware] [rewrite-clj.parser :as rw.parse])) (def *root-session-bindings "Var->init" (atom {})) (def ^:dynamic *last-eval* nil) (defn listen-eval-msg [...
507dd409756474de464766f18503a5e41963d3aaf24ce79eb0cee55b24d12aac
reagent-project/reagent-cookbook
project.clj
(defproject test-example "0.1.0-SNAPSHOT" :dependencies [[org.clojure/clojure "1.7.0"] [org.clojure/clojurescript "1.7.122"] [reagent "0.5.1"]] :source-paths ["src/clj"] :plugins [[lein-cljsbuild "1.0.6"] [lein-doo "0.1.6"]] :clean-targets ^{:protect false} ["res...
null
https://raw.githubusercontent.com/reagent-project/reagent-cookbook/35aa77600030471f1dbe8b5d85dbffb89081c5fa/old-recipes/test-example/project.clj
clojure
(defproject test-example "0.1.0-SNAPSHOT" :dependencies [[org.clojure/clojure "1.7.0"] [org.clojure/clojurescript "1.7.122"] [reagent "0.5.1"]] :source-paths ["src/clj"] :plugins [[lein-cljsbuild "1.0.6"] [lein-doo "0.1.6"]] :clean-targets ^{:protect false} ["res...
ca6cf3d2309abf63f97662eb5278a2fb2619ef44a24042e49bb63f82042130de
cojna/iota
ZAlgorithm.hs
{-# LANGUAGE BangPatterns #-} module Data.ByteString.ZAlgorithm where import Control.Monad import qualified Data.ByteString as B import qualified Data.ByteString.Unsafe as B import Data.Function (fix) import qualified Data.Vector.Unboxed as U import qualified Data.Vector.Unboxed.Mutable as UM {- | @z[i] = lcp s $ d...
null
https://raw.githubusercontent.com/cojna/iota/11089062dd061e7f05508c7dbdfd34cf59889572/src/Data/ByteString/ZAlgorithm.hs
haskell
# LANGUAGE BangPatterns # | @z[i] = lcp s $ drop i s@ time complexity: /O(n)/ >>> :set -XOverloadedStrings >>> zAlgorithm "ababab" [6,0,4,0,2,0] >>> zAlgorithm "abc$xabcxx" [10,0,0,0,0,3,0,0,0,0] >>> zAlgorithm "" []
module Data.ByteString.ZAlgorithm where import Control.Monad import qualified Data.ByteString as B import qualified Data.ByteString.Unsafe as B import Data.Function (fix) import qualified Data.Vector.Unboxed as U import qualified Data.Vector.Unboxed.Mutable as UM zAlgorithm :: B.ByteString -> U.Vector Int zAlgorithm...
0456a3e10a967f3cc60d90bfb36601f0ef85ffbd83741848065b38ad0571b074
exoscale/clojure-kubernetes-client
v1_network_policy.clj
(ns clojure-kubernetes-client.specs.v1-network-policy (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] [clojure-kubernetes-client.specs.v1-object-meta :refer :all] [clojure-kubernetes-client.specs.v1-network-policy-spec :refer :all] ) (:import (java....
null
https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_network_policy.clj
clojure
(ns clojure-kubernetes-client.specs.v1-network-policy (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] [clojure-kubernetes-client.specs.v1-object-meta :refer :all] [clojure-kubernetes-client.specs.v1-network-policy-spec :refer :all] ) (:import (java....
92b86d0a0d34abdde4a5408af89372bf118cc72198c60fd567362238ce6cd103
adamdoupe/find_ear_rails
typing_suite.ml
open OUnit let suite = "Typing" >::: [ Type_progs.suite; Access_tests.suite ; ]
null
https://raw.githubusercontent.com/adamdoupe/find_ear_rails/38f892f9962ad415a583973caf24fbab1a011be1/diamondback-ruby-0.20090726/tests/typing/typing_suite.ml
ocaml
open OUnit let suite = "Typing" >::: [ Type_progs.suite; Access_tests.suite ; ]
d300389aeb88433f440c1d09b13ac2f5434487e20c88cfb51cfe180130d896fb
BillHallahan/G2
Expr.hs
# LANGUAGE FlexibleContexts # # LANGUAGE TupleSections # module G2.Language.Monad.Expr ( mkDCTrueM , mkDCFalseM , mkDCIntE , mkDCIntegerE , mkDCFloatE , mkDCDoubleE ...
null
https://raw.githubusercontent.com/BillHallahan/G2/4d287df8ed7ba13c06d96d4911b9eedf870e80a1/src/G2/Language/Monad/Expr.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE TupleSections # module G2.Language.Monad.Expr ( mkDCTrueM , mkDCFalseM , mkDCIntE , mkDCIntegerE , mkDCFloatE , mkDCDoubleE ...
99a76fbf50632c812ec37789bd7e0662b11c9c9f237bf68311e639a56e5e5734
casperschipper/ocaml-cisp
cisp3.ml
open Cisp open Midi open Seq simple mod of controller 1 onto pitch let sr = ref 44100.0 type data = {c1: int; p: pitch; c2: int; c3: int; c4: int; c5: int; c6: int} let currentState = ref {c1= 0; p= Pitch 0; c2= 0; c3= 0; c4= 1; c5= 1; c6= 1} let pitchControl3 = let ( let* ) x f = Reader.bind f x in let* (Mi...
null
https://raw.githubusercontent.com/casperschipper/ocaml-cisp/571ffb8e508c5427d01e407ba5e91ff2a4604f40/examples/cisp_backup/genome/cisp3.ml
ocaml
create trigger from note On write state ref this maps midi input msg to an output msg (raw midi) take msg, make it a state run a bunch of readers to extract properties
open Cisp open Midi open Seq simple mod of controller 1 onto pitch let sr = ref 44100.0 type data = {c1: int; p: pitch; c2: int; c3: int; c4: int; c5: int; c6: int} let currentState = ref {c1= 0; p= Pitch 0; c2= 0; c3= 0; c4= 1; c5= 1; c6= 1} let pitchControl3 = let ( let* ) x f = Reader.bind f x in let* (Mi...
83e783552a4329248d7a963a6aeed33d30597b5b3080ba4d0cf755558a3a12eb
theodormoroianu/SecondYearCourses
lab13-sol_20210115191750.hs
import Data.Char import Data.List prelStr strin = map toUpper strin ioString = do strin <- getLine putStrLn $ "Intrare\n" ++ strin let strout = prelStr strin putStrLn $ "Iesire\n" ++ strout prelNo noin = sqrt noin ioNumber = do noin <- readLn :: IO Double ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/l/.history/lab13/lab13-sol_20210115191750.hs
haskell
import Data.Char import Data.List prelStr strin = map toUpper strin ioString = do strin <- getLine putStrLn $ "Intrare\n" ++ strin let strout = prelStr strin putStrLn $ "Iesire\n" ++ strout prelNo noin = sqrt noin ioNumber = do noin <- readLn :: IO Double ...
89d0e8e45896475c61c5545dbaed233802632b9d81469cb21d5b0c2ba689bae5
sfrank/minheap
pairing-heap-elmasri-test.lisp
(defpackage :heap-pairing-elmasri-test (:use :CL :pairing-elmasri :lisp-unit)) (in-package :heap-pairing-elmasri-test) (define-test test-basic (let ((heap (make-instance 'pairing-elmasri:pairing-elmasri)) (htable (make-hash-table :test #'eql))) (assert-true (empty-p heap)) (assert-eql 0 (heap-size h...
null
https://raw.githubusercontent.com/sfrank/minheap/51cc9edcbbe13d9132fe12b0b197848f31513232/test/pairing-heap-elmasri-test.lisp
lisp
(defpackage :heap-pairing-elmasri-test (:use :CL :pairing-elmasri :lisp-unit)) (in-package :heap-pairing-elmasri-test) (define-test test-basic (let ((heap (make-instance 'pairing-elmasri:pairing-elmasri)) (htable (make-hash-table :test #'eql))) (assert-true (empty-p heap)) (assert-eql 0 (heap-size h...
8ba2bf578dd046ad00d62b559c093636b66372ee319aad003bbbe7d440173226
tlaplus/tlapm
dumpfp.ml
* Copyright ( C ) 2011 INRIA and Microsoft Corporation * Copyright (C) 2011 INRIA and Microsoft Corporation *) open Printf open Obj (* NOTE: This module uses Obj, but that's OK because this is DEBUGGING code. Production code must NEVER use Obj. *) let tag_name t = List.assoc t [ lazy_tag, "lazy"; ...
null
https://raw.githubusercontent.com/tlaplus/tlapm/158386319f5b6cd299f95385a216ade2b85c9f72/src/dumpfp.ml
ocaml
NOTE: This module uses Obj, but that's OK because this is DEBUGGING code. Production code must NEVER use Obj.
* Copyright ( C ) 2011 INRIA and Microsoft Corporation * Copyright (C) 2011 INRIA and Microsoft Corporation *) open Printf open Obj let tag_name t = List.assoc t [ lazy_tag, "lazy"; closure_tag, "closure"; object_tag, "object"; infix_tag, "infix"; forward_tag, "forward"; abstract_t...
0a3021a39fd4da0bdccb2a0daab54c126080aa899f79a7d112bfbc3741b3ad78
cpeikert/Lol
CycBenches.hs
| Module : Crypto . Lol . Benchmarks . CycBenches Description : Benchmarks for the ' Cyc ' interface . Copyright : ( c ) , 2011 - 2017 , 2011 - 2017 License : GPL-3 Maintainer : Stability : experimental Portability : POSIX Benchmarks for the ' Cyc ' interface...
null
https://raw.githubusercontent.com/cpeikert/Lol/4416ac4f03b0bff08cb1115c72a45eed1fa48ec3/lol/Crypto/Lol/Benchmarks/CycBenches.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # must come after imports # ANN module "HLint: ignore Use camelCase" # | Benchmarks for single-index 'Cyc' operations. | Benchmarks for inter-ring 'Cyc' operations. no CRT conver...
| Module : Crypto . Lol . Benchmarks . CycBenches Description : Benchmarks for the ' Cyc ' interface . Copyright : ( c ) , 2011 - 2017 , 2011 - 2017 License : GPL-3 Maintainer : Stability : experimental Portability : POSIX Benchmarks for the ' Cyc ' interface...
875fd249e3407a3e18f2790b266b8f9960dc46b366de0d1509de1a81b15d4769
septract/jstar-old
methdec.ml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This file is part of jStar src / / methdec.ml Release $ Release$ Version $ Rev$ $ Copyright$ jStar is distributed under a BSD license , see , L...
null
https://raw.githubusercontent.com/septract/jstar-old/c3b4fc6c1efc098efcdb864edbf0c666130f5fe5/src/jimplefront/methdec.ml
ocaml
======================== ========================
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This file is part of jStar src / / methdec.ml Release $ Release$ Version $ Rev$ $ Copyright$ jStar is distributed under a BSD license , see , L...
1e81b8e9bbb88f016bd5e80b910262fdf7cfe367d2ac60babd7689531a0cea0b
manavpatnaik/haskell
12_capitalize_vowels.hs
import Prelude import Data.Char (toUpper) capitalizeVowels :: String -> String capitalizeVowels [] = [] capitalizeVowels (x:xs) | is_vowel x = toUpper x : capitalizeVowels xs | otherwise = x : capitalizeVowels xs where is_vowel :: Char -> Bool is_vowel a = a `elem` "aeiou" isVowel :: Cha...
null
https://raw.githubusercontent.com/manavpatnaik/haskell/dfcc99385c5fca4285393cb15efd2583c8d895fb/higher_order_functions/12_capitalize_vowels.hs
haskell
Using function composisiton
import Prelude import Data.Char (toUpper) capitalizeVowels :: String -> String capitalizeVowels [] = [] capitalizeVowels (x:xs) | is_vowel x = toUpper x : capitalizeVowels xs | otherwise = x : capitalizeVowels xs where is_vowel :: Char -> Bool is_vowel a = a `elem` "aeiou" isVowel :: Cha...
7a6baf8ed122e7d1251fe9b4f921611656a9dd0a84e022096cb36a31d589e2a3
coccinelle/coccinelle
buffer.mli
type t val create : int -> t val contents : t -> string val to_bytes : t -> bytes val sub : t -> int -> int -> string val blit : t -> int -> bytes -> int -> int -> unit val nth : t -> int -> char val length : t -> int val clear : t -> unit val reset : t -> unit val add_char : t -> char -> unit val add_utf_8_uchar : t -...
null
https://raw.githubusercontent.com/coccinelle/coccinelle/57cbff0c5768e22bb2d8c20e8dae74294515c6b3/bundles/stdcompat/stdcompat-current/interfaces/4.06/buffer.mli
ocaml
type t val create : int -> t val contents : t -> string val to_bytes : t -> bytes val sub : t -> int -> int -> string val blit : t -> int -> bytes -> int -> int -> unit val nth : t -> int -> char val length : t -> int val clear : t -> unit val reset : t -> unit val add_char : t -> char -> unit val add_utf_8_uchar : t -...
ffa0a6999d646979b2070d528ab2c6be92317f84b78f8b47fbe8e26e9ea6ca7d
hellonico/origami-fun
shapes2.clj
(ns opencv4.shapes2 (:import [org.opencv.core MatOfPoint MatOfPoint2f]) (:require [opencv4.core :refer :all])) ; -to-detect-simple-geometric-shapes-using-opencv ; -to-convert-matofpoint-to-matofpoint2f-in-opencv-java-api (def target-image "resources/morph/shapes3.jpg") ; WORK SOME MORE ; (def target-image "reso...
null
https://raw.githubusercontent.com/hellonico/origami-fun/80117788530d942eaa9a80e2995b37409fa24889/test/opencv4/shapes2.clj
clojure
-to-detect-simple-geometric-shapes-using-opencv -to-convert-matofpoint-to-matofpoint2f-in-opencv-java-api WORK SOME MORE (def target-image "resources/morph/colourful-shapes.jpg") draw filled contours draw around the shapes CONTOUR FEATURES draw different color depending on the shape
(ns opencv4.shapes2 (:import [org.opencv.core MatOfPoint MatOfPoint2f]) (:require [opencv4.core :refer :all])) (def target-image "resources/morph/shapes3.jpg") (def img (imread target-image)) (def gray (imread target-image 0)) (def thresh (new-mat)) (threshold gray thresh 127 240 1) (imwrite thresh "output...
ba07f825cb2160d9a19f4d9855fefc2f499d1f1b036442d2357b4f5904dc5c4b
practicalli/four-clojure
019_last_element.clj
(ns four-clojure.019-last-element) # 019 Last Element ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Difficulty: Easy Topics : seqs core - functions ;; Restriction: `last` ;; Write a function which returns the last element in a sequence. (= ( _ _ [ 1 2 3 4 5 ] ) 5 ) (= ( _ _ ' ( 5 4 3 ) ) 3 ) ;; (= (__ ["b...
null
https://raw.githubusercontent.com/practicalli/four-clojure/9812b63769a06f9b0bfd63e5ffce380b67e5468b/src/four_clojure/019_last_element.clj
clojure
Difficulty: Easy Restriction: `last` Write a function which returns the last element in a sequence. (= (__ ["b" "c" "d"]) "d") This exercise would be easy to solve using the `last` function, however, to help us learn about the last function 4Clojure has prevented us from using it. Taking an imperative approach,...
(ns four-clojure.019-last-element) # 019 Last Element Topics : seqs core - functions (= ( _ _ [ 1 2 3 4 5 ] ) 5 ) (= ( _ _ ' ( 5 4 3 ) ) 3 ) Deconstruct the problem We can see the docs and source code for the ` last ` function to help , but lets think about how to solve this first . (loop [col...
49b2a2bbd5598d2c6b604a5963f17f5275ae68e31d41a8ddbdfb53e62bec6a5f
pkel/cpr
distributions.ml
open Rresult type 'a iid = { sample : unit -> 'a ; string : string lazy_t } let sample t = t.sample () let to_string t = Lazy.force t.string let constant x = { sample = (fun () -> x); string = lazy (Printf.sprintf "constant %g" x) } ;; let uniform ~lower ~upper = let sample () = Random.float (upper -. low...
null
https://raw.githubusercontent.com/pkel/cpr/854db775bdeb2e95ec94dc9f815314157e74dd81/simulator/lib/distributions.ml
ocaml
collect info about probabilities prepare alias table init alias table
open Rresult type 'a iid = { sample : unit -> 'a ; string : string lazy_t } let sample t = t.sample () let to_string t = Lazy.force t.string let constant x = { sample = (fun () -> x); string = lazy (Printf.sprintf "constant %g" x) } ;; let uniform ~lower ~upper = let sample () = Random.float (upper -. low...
60fe3bf08032cdd84f0ce73ad255f61d9a88fd17e29c57b786fb34010efc9fa7
fp-works/2019-winter-Haskell-school
Exercise01Spec.hs
module CIS194.Homework06.Exercise01Spec where import CIS194.Homework06.Exercise01 import Test.Tasty.Hspec spec_fib :: Spec spec_fib = it "returns the nth fib number" $ do fib 0 `shouldBe` 0 fib 1 `shouldBe` 1 fib 2 `shouldBe` 1 fib 3 `shouldBe` 2 fib 9 `shouldBe` 34 spec_fibs1 :: Spec spec_fi...
null
https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week6/daniel-deng/test/Exercise01Spec.hs
haskell
module CIS194.Homework06.Exercise01Spec where import CIS194.Homework06.Exercise01 import Test.Tasty.Hspec spec_fib :: Spec spec_fib = it "returns the nth fib number" $ do fib 0 `shouldBe` 0 fib 1 `shouldBe` 1 fib 2 `shouldBe` 1 fib 3 `shouldBe` 2 fib 9 `shouldBe` 34 spec_fibs1 :: Spec spec_fi...
16ab6b4cc9705880701b3a79c6c050c301e2206f882038910ab6ef7e5290a9b0
Average-user/gozar
util.cljc
(ns gozar.util (:require [gozar.sgfparser :as parser])) (def enemy {:white :black, :black :white}) (defn stones "Initialize stones given a size" [size] (->> (for [x (range size), y (range size)] [[x y] :free]) (into {}))) (defn create-board "Creates a board given variable information" [size handic...
null
https://raw.githubusercontent.com/Average-user/gozar/102a184bfb41f44a5ee1bc2aa03a63d72290592e/src/cljc/gozar/util.cljc
clojure
(ns gozar.util (:require [gozar.sgfparser :as parser])) (def enemy {:white :black, :black :white}) (defn stones "Initialize stones given a size" [size] (->> (for [x (range size), y (range size)] [[x y] :free]) (into {}))) (defn create-board "Creates a board given variable information" [size handic...
baaa30d8c3cc90c3f027dd110fc0cfe9a02824775470d439ca6b4b4396125574
day8/re-com
kwargs_to_map_test.clj
(ns kwargs-to-map-test (:require [clojure.test :refer :all] [kwargs-to-map :refer :all] [rewrite-clj.zip :as z])) (def namespace-form (z/of-string " (ns sample-namespace.core (:require [re-com.core :refer [box title p v-box h-box md-circle-icon-button border] :as re-com]))")) (def h-bo...
null
https://raw.githubusercontent.com/day8/re-com/07451b1d19c59eb185548efe93e2d00b5d3eab89/scripts/kwargs-to-map/test/kwargs_to_map_test.clj
clojure
(ns kwargs-to-map-test (:require [clojure.test :refer :all] [kwargs-to-map :refer :all] [rewrite-clj.zip :as z])) (def namespace-form (z/of-string " (ns sample-namespace.core (:require [re-com.core :refer [box title p v-box h-box md-circle-icon-button border] :as re-com]))")) (def h-bo...
830c71506a835c95a53a56e93e717ec51873a64e827e1e38836e5111f1ecef3c
alexandergunnarson/quantum
logic.cljc
(ns quantum.untyped.core.logic (:refer-clojure :exclude [= and not or if-let when-let]) (:require [clojure.core :as core] [quantum.untyped.core.core :as ucore] [quantum.untyped.core.form.evaluate :refer [case-env]] [quantum.untyped.core.vars :as uvar :refer [defalia...
null
https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src-untyped/quantum/untyped/core/logic.cljc
clojure
===== Logical operators ===== ;; tests value-equivalence tests identity-equivalence ===== Function-logical operators ===== ;; ===== `cond(f|c|p)` ===== ;; As in, this expression is not used as a function taking @obj as an argument for use with condp ===== `if(n|c|p)` ===== ;; ===== `when(f|c|p)` ===== ;; ====...
(ns quantum.untyped.core.logic (:refer-clojure :exclude [= and not or if-let when-let]) (:require [clojure.core :as core] [quantum.untyped.core.core :as ucore] [quantum.untyped.core.form.evaluate :refer [case-env]] [quantum.untyped.core.vars :as uvar :refer [defalia...