_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
25057bb544050dc419438a3230b38f80e37cf4b125ecf42e58ebe5904084f482
dselsam/arc
Color.hs
Copyright ( c ) 2020 Microsoft Corporation . All rights reserved . Released under Apache 2.0 license as described in the file LICENSE . Authors : , , . # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParam...
null
https://raw.githubusercontent.com/dselsam/arc/7e68a7ed9508bf26926b0f68336db05505f4e765/src/Lib/Color.hs
haskell
# LANGUAGE StrictData # our own , indicating a " bit " that is true our own, indicating a "bit" that is true TODO : must be some generic support for enums TODO: must be some generic support for enums TODO: enumCtxVals? TODO: clearly bad design!
Copyright ( c ) 2020 Microsoft Corporation . All rights reserved . Released under Apache 2.0 license as described in the file LICENSE . Authors : , , . # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParam...
b987805c68baf21aee052f3f83ed834f9b9a04cf22f79027b7d0b91091df448c
dcavar/schemeNLP
arithmetic4.scm
(- 4 1 2) (* 3 3.1) (>= (* (+ #x02 3) 2) 9) (abs 3.2) (abs -3)
null
https://raw.githubusercontent.com/dcavar/schemeNLP/daa0ddcc4fa67fe00dcf6054c4d30d11a00b2f7f/src/arithmetic4.scm
scheme
(- 4 1 2) (* 3 3.1) (>= (* (+ #x02 3) 2) 9) (abs 3.2) (abs -3)
f89cb8d49b18bb9fc51dd0839bdcc66433422212d0f43a6d2de94a7475ec2b50
s-expressionists/Clostrum
compilation-environment.lisp
(cl:in-package #:clostrum-basic) (defclass compilation-environment (env:compilation-environment) ((function-descriptions :initarg :function-descriptions :reader function-descriptions :initform (make-hash-table :test #'equal)) (variable-descriptions :initarg :variable-descriptions :reader varia...
null
https://raw.githubusercontent.com/s-expressionists/Clostrum/7412592b4c802a8c6cd9f49651a665a491c5890a/Code/Basic/compilation-environment.lisp
lisp
(cl:in-package #:clostrum-basic) (defclass compilation-environment (env:compilation-environment) ((function-descriptions :initarg :function-descriptions :reader function-descriptions :initform (make-hash-table :test #'equal)) (variable-descriptions :initarg :variable-descriptions :reader varia...
8d538220527581ef190cc048b056670ac6e2cd691d2af41154f74e547f54ae5e
malcolmreynolds/GSLL
matrix-variance.lisp
Regression test MATRIX - VARIANCE for GSLL , automatically generated (in-package :gsl) (LISP-UNIT:DEFINE-TEST MATRIX-VARIANCE (LISP-UNIT::ASSERT-NUMERICAL-EQUAL (LIST 719.5467479557992d0) (MULTIPLE-VALUE-LIST (LET ((M1 ...
null
https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/tests/matrix-variance.lisp
lisp
Regression test MATRIX - VARIANCE for GSLL , automatically generated (in-package :gsl) (LISP-UNIT:DEFINE-TEST MATRIX-VARIANCE (LISP-UNIT::ASSERT-NUMERICAL-EQUAL (LIST 719.5467479557992d0) (MULTIPLE-VALUE-LIST (LET ((M1 ...
ad3c5f2d8323d680a836c1360c02fdad7f58e6f3ce2b28c2548484ae460e7639
racket/racket7
udp-receive.rkt
#lang racket/base (require "../common/check.rkt" "../host/thread.rkt" "../host/rktio.rkt" "../sandman/main.rkt" "../string/convert.rkt" "../string/integer.rkt" "port-number.rkt" "check.rkt" "address.rkt" "udp-socket.rkt" "error.rk...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/io/network/udp-receive.rkt
racket
in atomic mode: ---------------------------------------- in atomic mode re-check closed on every iteration, in case the state changes while we block ---------------------------------------- in atomic mode `thunk` that raises an exception
#lang racket/base (require "../common/check.rkt" "../host/thread.rkt" "../host/rktio.rkt" "../sandman/main.rkt" "../string/convert.rkt" "../string/integer.rkt" "port-number.rkt" "check.rkt" "address.rkt" "udp-socket.rkt" "error.rk...
1e2fe7063a160a128c0486655ce25937813fc3550a33a0b08de6d226b9bc6025
hoelzl/Clicc
p1main.lisp
;;;----------------------------------------------------------------------------- Copyright ( C ) 1993 Christian - Albrechts - Universitaet zu Kiel , Germany ;;;----------------------------------------------------------------------------- Projekt : APPLY - A Practicable And Portable Lisp Implementation ;;; ...
null
https://raw.githubusercontent.com/hoelzl/Clicc/cea01db35301144967dc74fd2f96dd58aa52d6ea/src/compiler/p1main.lisp
lisp
----------------------------------------------------------------------------- ----------------------------------------------------------------------------- ------------------------------------------------------ Funktion : Start und Abschluss von Pass 1 $Log: p1main.lisp,v $ Revision 1.84 1994/05/22 16...
Copyright ( C ) 1993 Christian - Albrechts - Universitaet zu Kiel , Germany Projekt : APPLY - A Practicable And Portable Lisp Implementation $ Revision : 1.84 $ Erzeugen einer leeren ' * -ffi.h'-Datei verhindert . Revision 1.83 1994/04/18 12:17:01 pm Foreign Function Interface voellig ueberarbeitet ...
d61752ccb7d242296c8a81284b54a956597eb195fe882ea3b24381eed09c8019
CBMM/tagging
AdminPanel.hs
module Main where import Data.Proxy import Reflex import Reflex.Dom import Tagging.User import Tagging.Stimulus import Tagging.Response import Tagging.Crud import Reflex.Dom.Contrib.Widgets.ButtonGroup main = mainWidget $ do el "hr" $ return () el "hr" $ return () text "TaggingUser Table" crudTableWidget (Pr...
null
https://raw.githubusercontent.com/CBMM/tagging/15f257394f3dda5baf6db0581a52d9c9f99e2abe/tagging-client/exec/AdminPanel.hs
haskell
el "hr" $ return () crudTableWidget (Proxy :: Proxy StimSeqItem) (constDyn (const True)) el "br" $ return () el "hr" $ return () text "StimulusRequest Table" crudTableWidget (Proxy :: Proxy StimulusRequest) (constDyn (const True)) el "br" $ return () el "hr" $ return () text "StimulusResponse Table" el "br" $...
module Main where import Data.Proxy import Reflex import Reflex.Dom import Tagging.User import Tagging.Stimulus import Tagging.Response import Tagging.Crud import Reflex.Dom.Contrib.Widgets.ButtonGroup main = mainWidget $ do el "hr" $ return () el "hr" $ return () text "TaggingUser Table" crudTableWidget (Pr...
6541c9c9b742c5fc31f73a3dc4f4db21b7ef4bced74ae6f9a9b3b9cbde679ea6
kutyel/haskell-book
Chapter18Spec.hs
module Test.Chapter18Spec where import Chapter17 (pureList) import Chapter18 import Control.Applicative (liftA2, (<**>)) import Control.Monad (join, liftM2) import Data.Traversable (for) import Test.Hspec (Spec, describe, it, shouldBe) import Test.QuickCheck (Arbitrary (arbitrary), Testable (property), frequency, oneo...
null
https://raw.githubusercontent.com/kutyel/haskell-book/fd4dc0332b67575cfaf5e3fb0e26687dc01772a0/test/Test/Chapter18Spec.hs
haskell
this will be used to generate random values! custom properties arbitrary and eqprop instances
module Test.Chapter18Spec where import Chapter17 (pureList) import Chapter18 import Control.Applicative (liftA2, (<**>)) import Control.Monad (join, liftM2) import Data.Traversable (for) import Test.Hspec (Spec, describe, it, shouldBe) import Test.QuickCheck (Arbitrary (arbitrary), Testable (property), frequency, oneo...
f91d71b1bc5c6dbafaeb8d6be3a12070314fb30952d5a00f39a1404d54a6dfef
ekmett/ekmett.github.com
Comonad.hs
{-# OPTIONS_GHC -fglasgow-exts #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Comonad Copyright : ( C ) 2008 ( C ) 2004 -- License : BSD-style (see the file LICENSE) -- Maintainer : < > -- Stability : experimental -- Port...
null
https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/category-extras-backup/src/Control/Comonad.hs
haskell
# OPTIONS_GHC -fglasgow-exts # --------------------------------------------------------------------------- | Module : Control.Comonad License : BSD-style (see the file LICENSE) Stability : experimental Portability : portable This module declares the 'Comonad' class -------------------------------...
Copyright : ( C ) 2008 ( C ) 2004 Maintainer : < > module Control.Comonad ( module Control.Functor.Pointed , Comonad(..) , liftW , (=>>) , (.>>) , liftCtx , mapW , parallelW , unfoldW , sequenceW ) where import Control.Monad.Identity import Control.Functor.Pointed infixl 1 =>>, .>...
b0a860c6754aeae4fa18a2677bf98dc4b31e5b4c50ffdb21a0127941b9abe07e
Smoltbob/Caml-Est-Belle
fclosure.mli
* This module will unnest the letrecs in the next versions . For now it only transforms a Fknormal.t into a Fclosure.t The function returning a string is just a dbeugging function for now The function returning a string is just a dbeugging function for now *) open Fknormal;; type t = | Let of (Id.t * Ftype.t) * ...
null
https://raw.githubusercontent.com/Smoltbob/Caml-Est-Belle/3d6f53d4e8e01bbae57a0a402b7c0f02f4ed767c/compiler/fclosure.mli
ocaml
name of clsr * lbl of fct * free vars of fct * in val clos : Fknormal.t -> Fknormal.t * This function is for debugging purpose only, it returns its argument as a string
* This module will unnest the letrecs in the next versions . For now it only transforms a Fknormal.t into a Fclosure.t The function returning a string is just a dbeugging function for now The function returning a string is just a dbeugging function for now *) open Fknormal;; type t = | Let of (Id.t * Ftype.t) * ...
4cb77f5c8f724999a92a0fdc5817a73623762a387e280ead7d1da2f58ddb60c9
nuprl/gradual-typing-performance
ramp-west.rkt
#lang racket/base (provide ramp-west) (require racket/draw racket/runtime-path) (define-runtime-path ramp-west-img "ramp-west.png") (define ramp-west (read-bitmap ramp-west-img))
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/2htdp/planetcute/ramp-west.rkt
racket
#lang racket/base (provide ramp-west) (require racket/draw racket/runtime-path) (define-runtime-path ramp-west-img "ramp-west.png") (define ramp-west (read-bitmap ramp-west-img))
7d3f5d5269377eeb51f351630527fc71e76a93f60064e568d48afd5503904500
thephoeron/quipper-language
TimeStep-binary.hs
This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the -- file COPYRIGHT for a list of authors, copyright holders, licensing, -- and other details. All rights reserved. -- -- ====================================================================== import Quipper import QuipperLib.Qureg import Qui...
null
https://raw.githubusercontent.com/thephoeron/quipper-language/15e555343a15c07b9aa97aced1ada22414f04af6/tests/TimeStep-binary.hs
haskell
file COPYRIGHT for a list of authors, copyright holders, licensing, and other details. All rights reserved. ====================================================================== time step /dt/ to (/a/,/b/,/r/). Here /a/ and /b/ are /m/-qubit
This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the import Quipper import QuipperLib.Qureg import QuipperLib.Decompose import Algorithms.BWT.Definitions | Algorithm 3 . @timestep ( a , b , r , dt , m)@ : Apply the registers while /r/ is a single qubit . timestep :: (Qureg, Qureg, Qubit,...
8ead9ecccef2a154f4f33dd5649145a9fb1181197b28ed1a95776d23ff5af1fb
Emmanuel-PLF/facile
fcl_alldiff.mli
(***********************************************************************) (* *) FaCiLe A Functional Constraint Library (* ...
null
https://raw.githubusercontent.com/Emmanuel-PLF/facile/3b6902e479019c25b582042d9a02152fec145eb0/lib/fcl_alldiff.mli
ocaml
********************************************************************* under the terms of the GNU Lesser Gener...
FaCiLe A Functional Constraint Library , , LOG , CENA Copyright 2004 CENA . All rights reserved . This file is distributed $ I d : fcl_alldiff.mli , v 1.16 2004/08/12 15:22:07 bar...
0a90a3376a3e07fe0ba9fdc734436cd2ac0f866eb7ff143c19c12d7e142fccc3
stan-dev/stanc3
Errors.ml
(** Setup of our compiler errors *) open Core_kernel module Str = Re.Str (** Our type of syntax error information *) type syntax_error = | Lexing of Middle.Location.t | UnexpectedEOF of Middle.Location.t | Include of string * Middle.Location.t | Parsing of string * Middle.Location_span.t (** Exception for Sy...
null
https://raw.githubusercontent.com/stan-dev/stanc3/e98e2afe12ba31b0ba6905b608247dc7b115325c/src/frontend/Errors.ml
ocaml
* Setup of our compiler errors * Our type of syntax error information * Exception for Syntax Errors
open Core_kernel module Str = Re.Str type syntax_error = | Lexing of Middle.Location.t | UnexpectedEOF of Middle.Location.t | Include of string * Middle.Location.t | Parsing of string * Middle.Location_span.t exception SyntaxError of syntax_error * Exception [ SemanticError ( msg , ) ] indicates a semantic...
e9f1def098dae7d992fd293968cb75749e65b37b7a3e0d875d7a0a094e723e89
thephoeron/quipper-language
Simplification.hs
This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the -- file COPYRIGHT for a list of authors, copyright holders, licensing, -- and other details. All rights reserved. -- -- ====================================================================== {-# LANGUAGE BangPatterns #-} # LANGUAGE MonadCom...
null
https://raw.githubusercontent.com/thephoeron/quipper-language/15e555343a15c07b9aa97aced1ada22414f04af6/QuipperLib/ClassicalOptim/Simplification.hs
haskell
file COPYRIGHT for a list of authors, copyright holders, licensing, and other details. All rights reserved. ====================================================================== # LANGUAGE BangPatterns # | This module contains the core of the classical circuit optimization algorithm. set-monad-0.1.0.0 contai...
This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the # LANGUAGE MonadComprehensions # module QuipperLib.ClassicalOptim.Simplification where import qualified Data.Map as M import qualified Data.List as L import qualified Data.IntSet as IS import qualified Control.DeepSeq as Seq import Contr...
4ac62b62d430e33a8a316ec886bac79917520cd03957423911aae1648c1128be
dalaing/little-languages
Text.hs
module Common.Test.Term.Text where import Control.Lens (view) import Test.Tasty import Test.Tasty.QuickCheck import Common.Term import Common.Term.Gen import Common.Term.Parse import Common.Term.Pretty textTests :: ( Eq tm , Show tm ) => TermOutput e ty tm -> TestTree t...
null
https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/multityped/nb-modular/src/Common/Test/Term/Text.hs
haskell
module Common.Test.Term.Text where import Control.Lens (view) import Test.Tasty import Test.Tasty.QuickCheck import Common.Term import Common.Term.Gen import Common.Term.Parse import Common.Term.Pretty textTests :: ( Eq tm , Show tm ) => TermOutput e ty tm -> TestTree t...
4cf3c0ab9060e601ae8d0073d2b4c239f5e09d9dc0ceb2f017f2712733f64f3a
zadean/xqerl
xqerl_mod_ext_basex.erl
Copyright ( c ) 2019 - 2020 . SPDX - FileCopyrightText : 2022 % SPDX - License - Identifier : Apache-2.0 %% @doc Namespace %% BaseX client module -module(xqerl_mod_ext_basex). -include("xqerl.hrl"). -define(NS, <<"">>). -define(PX, <<"basex">>). -define(XL, <<"">>). -define(ND, <<"non-deterministic...
null
https://raw.githubusercontent.com/zadean/xqerl/06c651ec832d0ac2b77bef92c1b4ab14d8da8883/src/xqerl_mod_ext_basex.erl
erlang
@doc Namespace BaseX client module ==================================================================== API functions ==================================================================== basex:connect( $host as xs:string, $port as xs:integer, $user as xs:string, Execute a BaseX command ...
Copyright ( c ) 2019 - 2020 . SPDX - FileCopyrightText : 2022 SPDX - License - Identifier : Apache-2.0 -module(xqerl_mod_ext_basex). -include("xqerl.hrl"). -define(NS, <<"">>). -define(PX, <<"basex">>). -define(XL, <<"">>). -define(ND, <<"non-deterministic">>). -define(URI(V), #xqAtomicValue{type =...
b07a47f07a86e3b121e470cd0798e276dc9674a02a6281c457c6b5ac78e478ad
mhayashi1120/Gauche-net-twitter
media.scm
(define-module net.twitter.media (extend net.twitter.base) (export status/json upload/json) ) (select-module net.twitter.media) # TODO ;; WARN: This module still not working ;; consider to use with `net.twitter.media+` module. ;; TODO FIXME Seems not working yet (define (status/json cred media-id) (call...
null
https://raw.githubusercontent.com/mhayashi1120/Gauche-net-twitter/2c6ae5ff15461cb34a86c71e8f9f4eb5b7a7bf87/src/net/twitter/media.scm
scheme
WARN: This module still not working consider to use with `net.twitter.media+` module. TODO FIXME Seems not working yet - :media : <string> binary data - :media-data : <string> base64 encoded data.
(define-module net.twitter.media (extend net.twitter.base) (export status/json upload/json) ) (select-module net.twitter.media) # TODO (define (status/json cred media-id) (call/oauth->json cred 'uploading-status #"/1.1/media/upload" (api-params `(:command "STATUS") media-id))) # # (define (u...
bb92516174d881171a9f659b45d88e91e560e2ef8160a4543bec6fe430393c81
opencog/learn
1-dict-conf.scm
; ; dict-conf.scm - Configuration parameters for a random artificial grammar. ; ; Copy and edit this file and adjust the parameters as desired. ; Then create the dictionary by running `../1-gen-dict/gen-dict.sh`. ; ; --------------------- ; Number of Link Grammar link types (connector types) (define num-link-types 6) ...
null
https://raw.githubusercontent.com/opencog/learn/fb038fd29848bee57ebb1c80ad3f8310ac7f3075/attic/run-v3/run-config/1-dict-conf.scm
scheme
dict-conf.scm - Configuration parameters for a random artificial grammar. Copy and edit this file and adjust the parameters as desired. Then create the dictionary by running `../1-gen-dict/gen-dict.sh`. --------------------- Number of Link Grammar link types (connector types) Link-type Zipf distribution expone...
(define num-link-types 6) exponent . Setting this to 1 gives the classic Zipf distribution , with and so on . Setting this to zero gives a uniform random distribution . (define link-type-exp 1) in a disjunct . Randomly - created disjuncts will have 1 to this many (define max-disjunct-size 3) Disjunct - size...
50e16b7abcf1524425739a5c2af81547b635c99af629ed8f588dce6dd61a1954
erlio/vmq_server
vmq_metrics.erl
Copyright 2014 Erlio GmbH Basel Switzerland ( ) %% 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, sof...
null
https://raw.githubusercontent.com/erlio/vmq_server/d008c6dcc62fe985d08456caa4024750e1febf38/src/vmq_metrics.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright 2014 Erlio GmbH Basel Switzerland ( ) Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(vmq_metrics). -behaviour(gen_server). -export([ incr_socket_open/0, incr_socket_close/0, i...
c585dba1ab33f2b724aa275dfa38bb8f3b904b7dd8e1b4e97ad380554fc0454a
micahasmith/crypto-watch
redis.clj
(ns crypto.infra.redis (:require [crypto.infra.helpers :refer :all] [crypto.infra.config :refer [get-config]] [taoensso.carmine :as car :refer (wcar)] [mount.core :refer [defstate]])) ; (defstate connection :start (get-config :redis)) (defmacro redis* [& body] `(car/w...
null
https://raw.githubusercontent.com/micahasmith/crypto-watch/265d03148a018e422513a6daee67cf6e58ac12bf/crypto/src/crypto/infra/redis.clj
clojure
(ns crypto.infra.redis (:require [crypto.infra.helpers :refer :all] [crypto.infra.config :refer [get-config]] [taoensso.carmine :as car :refer (wcar)] [mount.core :refer [defstate]])) (defstate connection :start (get-config :redis)) (defmacro redis* [& body] `(car/wcar...
aa93dd752c234c04208e3590b92593dbca654af5f94a048960bb8123527c2fe7
robert-strandh/CLIMatis
clouseau.lisp
(in-package #:clouseau) (defparameter *objects-to-inspect* nil) (defparameter *objects-on-display* nil) (defparameter *inspect-fun* nil) (defparameter *uninspect-fun* nil) (defgeneric inspect-object (object)) (defmethod inspect-object (object) (let* ((color (clim3:make-color 0.0 1.0 0.0)) (opaque (clim3:opaque ...
null
https://raw.githubusercontent.com/robert-strandh/CLIMatis/4949ddcc46d3f81596f956d12f64035e04589b29/Applications/Clouseau/clouseau.lisp
lisp
(in-package #:clouseau) (defparameter *objects-to-inspect* nil) (defparameter *objects-on-display* nil) (defparameter *inspect-fun* nil) (defparameter *uninspect-fun* nil) (defgeneric inspect-object (object)) (defmethod inspect-object (object) (let* ((color (clim3:make-color 0.0 1.0 0.0)) (opaque (clim3:opaque ...
78d991daea5e4533895d9a92193214e1ab00c883001683f87ec93b16501ded7f
mfelleisen/Evolution
dealer.rkt
#lang racket ;; =================================================================================================== ;; this class extends the dealer from ../ with hooks for observations and JSON serialization, both for playing Evolution with a GUI (require "json.rkt" "observer.rkt" (only-in "../d...
null
https://raw.githubusercontent.com/mfelleisen/Evolution/cf5ef02696339f8e83cc831932206c6a4ead689e/Xternal/dealer.rkt
racket
=================================================================================================== this class extends the dealer from ../ with hooks for observations and JSON serialization, re-exports =================================================================================================== ------------...
#lang racket both for playing Evolution with a GUI (require "json.rkt" "observer.rkt" (only-in "../dealer.rkt" dealer/c create-dealer/c MAX-PLAYERS MIN-PLAYERS)) the interface of the dealer for external uses ( xmain , xserver , etc ) (define dealer/observer/c (and/c dealer/c json/c with-observe...
a841d80ffdcb7ea693a1cf01f62e390fdae4d9c8106bd63a9f0314116916fc4f
picty/concerto
checkLinks.ml
(* checkLinks.ml Inputs: - possible_links.csv - certs/ Outputs: - links.csv *) open Parsifal open Getopt open FileOps open X509Util let data_dir = ref "" let suffix = ref "" let options = [ mkopt (Some 'h') "help" Usage "show this help"; mkopt (Some 'd') "data-dir" (StringVal data_dir) "set ...
null
https://raw.githubusercontent.com/picty/concerto/fac5dd04a5a3dcd91782e17b7bd3e0f4a9ddd2e0/checkLinks.ml
ocaml
checkLinks.ml Inputs: - possible_links.csv - certs/ Outputs: - links.csv TODO: Check that this _ is []
open Parsifal open Getopt open FileOps open X509Util let data_dir = ref "" let suffix = ref "" let options = [ mkopt (Some 'h') "help" Usage "show this help"; mkopt (Some 'd') "data-dir" (StringVal data_dir) "set the data directory"; mkopt None "suffix" (StringVal suffix) "adds a suffix to the CSV files used"...
2fd7dd504087c176bfba83b24d9896a4953e83ab76b820c824959d19e9b1765d
CatalaLang/catala
errors.mli
This file is part of the Catala compiler , a specification language for tax and social benefits computation rules . Copyright ( C ) 2020 , contributor : < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . ...
null
https://raw.githubusercontent.com/CatalaLang/catala/07edff2cd2371581ba0e5664aa32bcf06650bd0e/compiler/catala_utils/errors.mli
ocaml
* Error formatting and helper functions * The payload of the expression is a main error message, with a list of secondary positions related to the error, each carrying an optional secondary message to describe what is pointed by the position. * {1 Warning printing}
This file is part of the Catala compiler , a specification language for tax and social benefits computation rules . Copyright ( C ) 2020 , contributor : < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . ...
867233fe0f9c87ca6fc3b8025d38bc51ba767ef3a7dcb0f02074c998d1cfa50c
PrecursorApp/precursor
jwt.clj
(ns pc.util.jwt (:require [clojure.string :as str] [cheshire.core :as json] [pc.util.base64 :as base64])) (defn decode [jwt-str] (let [[header payload signature] (str/split jwt-str #"\.")] {:header (-> header base64/decode (json/decode true)) :payload (-> payload base64/decode (jso...
null
https://raw.githubusercontent.com/PrecursorApp/precursor/30202e40365f6883c4767e423d6299f0d13dc528/src/pc/util/jwt.clj
clojure
(ns pc.util.jwt (:require [clojure.string :as str] [cheshire.core :as json] [pc.util.base64 :as base64])) (defn decode [jwt-str] (let [[header payload signature] (str/split jwt-str #"\.")] {:header (-> header base64/decode (json/decode true)) :payload (-> payload base64/decode (jso...
64bdd07592b0ec6ac511ecae50fe751ab0d5160b427242057d49b3a16a846bb6
mankyKitty/fantastic-waddle
Main.hs
module Main where import Reflex.Dom (Widget, mainWidgetWithHead,mainWidget) import System.Random (getStdGen) import Frontend (body) main :: IO () main = do initialGen <- getStdGen mainWidget (body initialGen)
null
https://raw.githubusercontent.com/mankyKitty/fantastic-waddle/680ca473bf7141c63528195ae23cb799b2fb0eac/frontend/exe/Main.hs
haskell
module Main where import Reflex.Dom (Widget, mainWidgetWithHead,mainWidget) import System.Random (getStdGen) import Frontend (body) main :: IO () main = do initialGen <- getStdGen mainWidget (body initialGen)
dc9c6c7445f9bf6130fcb8aacddd13414d015f79fc558b9609df15fc4d2429b7
mikera/orculje
test_materials.clj
(ns mikera.orculje.test-materials (:use mikera.orculje.materials) (:use clojure.test)) (deftest test-mats (doseq [[k mat] MATERIALS] (is (mat (:material-type mat))) (is (= (:key mat) k))))
null
https://raw.githubusercontent.com/mikera/orculje/4c7f9af78f9a8744e1ab3aef3ded151306883083/src/test/clojure/mikera/orculje/test_materials.clj
clojure
(ns mikera.orculje.test-materials (:use mikera.orculje.materials) (:use clojure.test)) (deftest test-mats (doseq [[k mat] MATERIALS] (is (mat (:material-type mat))) (is (= (:key mat) k))))
be2cdfff2a49ea9319985ff82e4157c85c1ff2ae21c662d8981695777246a234
music-suite/music-pitch
Number.hs
-- | Number component of intervals. module Music.Pitch.Common.Number ( Number, HasNumber(..), unison, prime, second, third, fourth, fifth, sixth, seventh, octave, ninth, tenth, eleventh, twelfth, ...
null
https://raw.githubusercontent.com/music-suite/music-pitch/65541021ae9f5bdaad26a02e622c88d60f068f63/src/Music/Pitch/Common/Number.hs
haskell
| Number component of intervals. | A synonym for @2@. | A synonym for @3@. | A synonym for @4@. | A synonym for @7@. | A synonym for @8@. | A synonym for @9@. | A synonym for @10@. | A synonym for @12@. | A synonym for @12@. | Returns the number portion of an interval. The interval number is negative if a...
module Music.Pitch.Common.Number ( Number, HasNumber(..), unison, prime, second, third, fourth, fifth, sixth, seventh, octave, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth,...
de242ba9d39ef1fc89e3611693dcd581cc2f95a864140a84340e76fdd00e0f5a
cbaggers/varjo
environment.lisp
(in-package :varjo.api) (in-readtable fn:fn-reader) ;; ;; Environment Public API ;; ;; In macros we have access to the environment, we should have safe ways to ;; interact with that environment. ;; ;;------------------------------------------------------------------------- (defgeneric add-lisp-form-as-uniform (form ...
null
https://raw.githubusercontent.com/cbaggers/varjo/9e77f30220053155d2ef8870ceba157f75e538d4/src/varjo.api/environment.lisp
lisp
Environment Public API In macros we have access to the environment, we should have safe ways to interact with that environment. ------------------------------------------------------------------------- ------------------------------------------------------------------------- Symbol Bindings ---------------------...
(in-package :varjo.api) (in-readtable fn:fn-reader) (defgeneric add-lisp-form-as-uniform (form type-spec env &optional name)) (defgeneric all-bound-symbols (env)) (defgeneric argument-is-uniform-p (name env)) (defgeneric argument-type (name env)) (defgeneric argument-uniform-name (name env)) (defgeneric metadata-for...
f1235f28a2fbb74687c3dcec9f0c1c412029833d9e73bfcd63f43dcf79014894
racket/games
info.rkt
#lang info (define game-set "Puzzle Games") (define game "lights-out.rkt")
null
https://raw.githubusercontent.com/racket/games/e57376f067be51257ed12cdf3e4509a00ffd533d/lights-out/info.rkt
racket
#lang info (define game-set "Puzzle Games") (define game "lights-out.rkt")
52eddbf815bea508e12d970f806b8a88fb33432189cd9e75e6c2619749b52d07
CryptoKami/cryptokami-core
Communication.hs
# LANGUAGE BinaryLiterals # -- | Communication-related serialization -- messages mostly. module Pos.Binary.Communication ( ) where import Universum import Pos.Binary.Class (Bi (..), Cons (..), Field (..), decodeKnownCborDataItem, decodeUnknownCborDataIt...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/lib/src/Pos/Binary/Communication.hs
haskell
| Communication-related serialization -- messages mostly. TODO: move into each component -------------------------------------------------------------------------- Blocks -------------------------------------------------------------------------- deriveSimpleBi is not happy with constructors without arguments "fake...
# LANGUAGE BinaryLiterals # module Pos.Binary.Communication ( ) where import Universum import Pos.Binary.Class (Bi (..), Cons (..), Field (..), decodeKnownCborDataItem, decodeUnknownCborDataItem, deriveSimpleBi, encode...
ae16a11ba3a85a7a24cd09ea17fc0fdd151b8ead7473ac35a751a29ce90b93f6
benzap/fif
scope_test.cljc
(ns fif.utils.scope-test (:require [clojure.test :refer [deftest testing is are]] [fif.utils.scope :refer [new-scope update-scope get-in-scope remove-scope update-global-scope ...
null
https://raw.githubusercontent.com/benzap/fif/972adab8b86c016b04babea49d52198585172fe3/test/fif/utils/scope_test.cljc
clojure
(ns fif.utils.scope-test (:require [clojure.test :refer [deftest testing is are]] [fif.utils.scope :refer [new-scope update-scope get-in-scope remove-scope update-global-scope ...
d63dddc44b6b3c8d80aa53bd51814c1ec0ad40bd7954e5f6a4167dd9eb0a666c
vyzo/gerbil
core__12.scm
(declare (block) (standard-bindings) (extended-bindings) (inlining-limit 200)) (begin (define |gerbil/core$<more-sugar>[1]#setq-macro::t| (make-class-type 'gerbil.core#setq-macro::t (cons |gerbil/core$<MOP>$<MOP:3>[1]#macro-object::t| '()) '() 'setq-macro '() '#f)) (define |gerbil/...
null
https://raw.githubusercontent.com/vyzo/gerbil/17fbcb95a8302c0de3f88380be1a3eb6fe891b95/src/bootstrap/gerbil/core__12.scm
scheme
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>...
(declare (block) (standard-bindings) (extended-bindings) (inlining-limit 200)) (begin (define |gerbil/core$<more-sugar>[1]#setq-macro::t| (make-class-type 'gerbil.core#setq-macro::t (cons |gerbil/core$<MOP>$<MOP:3>[1]#macro-object::t| '()) '() 'setq-macro '() '#f)) (define |gerbil/...
b45814a87f6c2f021381a264caf68951e6979f15ccf90173181345c85a17c28a
smtcoq/smtcoq
zchaff_checker.ml
(**************************************************************************) (* *) (* SMTCoq *) Copyright ( C ) 2011 - 2022 (* ...
null
https://raw.githubusercontent.com/smtcoq/smtcoq/de9c46d059ddd38c0c1922d91cb788c3d550d488/src/extraction/zchaff_checker.ml
ocaml
************************************************************************ SMTCoq ...
Copyright ( C ) 2011 - 2022 See file " " for the list of authors open Smtcoq_plugin let mkInt = Uint63.of_int let mkArray a = let l = (Array.length a) - 1 in snd (Array.fold_left (fun (i,acc) c -> let acc' =...
c325b3560f1b8f7da667bbd1727e161dc527e351ae82fbbe6bb4ee431053e124
hhucn/decide3
nav_drawer.cljs
(ns decide.ui.components.nav-drawer (:require [com.fulcrologic.fulcro-i18n.i18n :as i18n] [com.fulcrologic.fulcro.components :as comp :refer [defsc]] [com.fulcrologic.fulcro.dom :as dom] [com.fulcrologic.fulcro.mutations :as m :refer [defmutation]] [com.fulcrologic.fulcro.react.hooks :as hooks] ...
null
https://raw.githubusercontent.com/hhucn/decide3/8c7d788db69cd495694ee2f7eae971a4b7533600/src/main/decide/ui/components/nav_drawer.cljs
clojure
(ns decide.ui.components.nav-drawer (:require [com.fulcrologic.fulcro-i18n.i18n :as i18n] [com.fulcrologic.fulcro.components :as comp :refer [defsc]] [com.fulcrologic.fulcro.dom :as dom] [com.fulcrologic.fulcro.mutations :as m :refer [defmutation]] [com.fulcrologic.fulcro.react.hooks :as hooks] ...
1590580db6af945244292b0e7a04d823d652c8a01760f598c65ed8a91b68c75a
tschady/advent-of-code
d16_test.clj
(ns aoc.2015.d16-test (:require [aoc.2015.d16 :as sut] [clojure.test :refer :all])) (deftest challenge (is (= 213 (sut/part-1 sut/input))) (is (= 323 (sut/part-2 sut/input))))
null
https://raw.githubusercontent.com/tschady/advent-of-code/1e4a95ef580c3bf635837eff52aa998b0acfc666/test/aoc/2015/d16_test.clj
clojure
(ns aoc.2015.d16-test (:require [aoc.2015.d16 :as sut] [clojure.test :refer :all])) (deftest challenge (is (= 213 (sut/part-1 sut/input))) (is (= 323 (sut/part-2 sut/input))))
8766bd63a9a970dd8566bae69ea9616a189a7f7d710e75605a9a1640284fc754
pkhuong/Xecto
mpsc-queue.lisp
(defpackage "MPSC-QUEUE" (:use "CL" "SB-EXT") (:shadow cl:get) (:export "QUEUE" "P" "MAKE" "PUT" "GET" "P")) (in-package "MPSC-QUEUE") (defstruct (queue (:constructor %make-queue (head))) (head nil :type list) (tail nil :type list)) (declaim (inline p)) (defun p (x) (queue-p x)) (defun slow-...
null
https://raw.githubusercontent.com/pkhuong/Xecto/5eb5651f6333b13e8bdf9e52128116444f3a1a37/mpsc-queue.lisp
lisp
stupid. It's just an xchg
(defpackage "MPSC-QUEUE" (:use "CL" "SB-EXT") (:shadow cl:get) (:export "QUEUE" "P" "MAKE" "PUT" "GET" "P")) (in-package "MPSC-QUEUE") (defstruct (queue (:constructor %make-queue (head))) (head nil :type list) (tail nil :type list)) (declaim (inline p)) (defun p (x) (queue-p x)) (defun slow-...
309cc223c40912dc707f473c59322ddb8512fb11b4b4a80a1d6b229f935fd21c
gvolpe/fts
Handler.hs
# LANGUAGE LambdaCase # # LANGUAGE OverloadedLabels # {-# LANGUAGE OverloadedStrings #-} module Handler ( eventHandler ) where import Control.Lens import Data.Foldable ( traverse_ ) import Data.Generics.Labels ( ) import Data.Text ...
null
https://raw.githubusercontent.com/gvolpe/fts/87362aa512f2cc2e3d3d4a4738312aacc67c5cc1/ui/Handler.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE LambdaCase # # LANGUAGE OverloadedLabels # module Handler ( eventHandler ) where import Control.Lens import Data.Foldable ( traverse_ ) import Data.Generics.Labels ( ) import Data.Text ( Text ) import HTTP...
d89ca49016ba6368a376fce444ff58a4ec8ef9f24d1997044e2ad2c2d8ad7a97
jimcrayne/jhc
tcfail110.hs
{-# LANGUAGE Rank2Types #-} module ShouldCompile where data Foo a b = Foo { foo :: a -> b } -- kind error in here bar :: String -> (forall a . Foo a) -> IO () bar s _ = putStrLn s
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/4_fail/ghc/tcfail110.hs
haskell
# LANGUAGE Rank2Types # kind error in here
module ShouldCompile where data Foo a b = Foo { foo :: a -> b } bar :: String -> (forall a . Foo a) -> IO () bar s _ = putStrLn s
aeac502240e0a72198aadaa6fbd3811e7defc0a58acae3ea4a5543f2decfbda6
wilkes/karras
core.clj
;; The MIT License ;; Copyright ( c ) 2010 Wilkes Joiner ;; ;; 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, ...
null
https://raw.githubusercontent.com/wilkes/karras/38830c8e0313428c6c9c1b5cb035dc2a04ec7625/src/karras/core.clj
clojure
The MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnished to do so, subject to the following conditions: The above...
Copyright ( c ) 2010 Wilkes Joiner 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 KIND , EXPRE...
c9ffa799426bb549b2f467e89b07c9ed78f50d12e33fa8a3796433bbedc110a6
HealthSamurai/stresty
anti.cljc
(ns app.anti (:require [app.pages :as pages] [anti.tags-list] [anti.date-input] [anti.alt-dropdown] [anti.button] [anti.spin] [anti.input] [anti.native-select] [anti.checkbox] [anti.alt-select] [ant...
null
https://raw.githubusercontent.com/HealthSamurai/stresty/130cedde6bf53e07fe25a6b0b13b8bf70846f15a/src-ui/app/anti.cljc
clojure
(ns app.anti (:require [app.pages :as pages] [anti.tags-list] [anti.date-input] [anti.alt-dropdown] [anti.button] [anti.spin] [anti.input] [anti.native-select] [anti.checkbox] [anti.alt-select] [ant...
5848326dd26dd5899cd2991153886cf675df6ca0396235c69e00058762bf422f
richmit/mjrcalc
exp-Gravity2D.lisp
;; -*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; @file exp-Gravity2D.lisp @author < > @brief De...
null
https://raw.githubusercontent.com/richmit/mjrcalc/96f66d030034754e7d3421688ff201f4f1db4833/exp-Gravity2D.lisp
lisp
-*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*- @file exp-Gravity2D.lisp @std Common Lisp Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: and/or other materials prov...
@author < > @brief Demonstrate the danger of assuming everything is a sphere in gravity problems.@EOL @parblock Copyright ( c ) 2015 , < > All rights reserved . 1 . Redistributions of source code must retain the above copyright notice , this list of conditions , and the following disclai...
616c666e02e9d69c3cfdf24eabf8a4a0d69b197be7e625af56e66de0d224deb7
twosigma/waiter
authenticator_test.clj
;; Copyright ( c ) Two Sigma Open Source , LLC ;; 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/twosigma/waiter/b39178d5d4df527a0707cd23591a5b5671b2565d/waiter/test/waiter/auth/authenticator_test.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 governing permi...
Copyright ( c ) Two Sigma Open Source , LLC distributed under the License is distributed on an " AS IS " BASIS , (ns waiter.auth.authenticator-test (:require [clj-time.core :as t] [clojure.string :as str] [clojure.test :refer :all] [waiter.auth.authentication :refer :all] ...
1d89fadd8ee5e783b5883abf8696cd1c5c7d93bd1b4563b5a4dc2b6258474cdb
dhleong/wish
sheet_builder_util.cljs
(ns ^{:author "Daniel Leong" :doc "Utility widgets, etc. for implementing a sheet builder"} wish.views.sheet-builder-util (:require-macros [wish.util :refer [fn-click]]) (:require [reagent.core :as r] [spade.core :refer [defattrs defclass]] [wish.util :refer [<sub >evt click>evt]] ...
null
https://raw.githubusercontent.com/dhleong/wish/9036f9da3706bfcc1e4b4736558b6f7309f53b7b/src/cljs/wish/views/sheet_builder_util.cljs
clojure
======= util ============================================ if it's a const number, we can skip some steps if the fn returns a number, we can use that perhaps it expects a set of features? I'm not sure if we ever used this, but... fallback, I guess? ======= selected option count indicator ================= ======...
(ns ^{:author "Daniel Leong" :doc "Utility widgets, etc. for implementing a sheet builder"} wish.views.sheet-builder-util (:require-macros [wish.util :refer [fn-click]]) (:require [reagent.core :as r] [spade.core :refer [defattrs defclass]] [wish.util :refer [<sub >evt click>evt]] ...
890b9a420c7ac71705820d9a74a15392f52ee6b6a5052cf3e0cb909ccb8ea23f
ermine/sulci
plugin_xmlrpc.ml
* ( c ) 2005 - 2010 * (c) 2005-2010 Anastasia Gornostaeva *) open Unix open Xml let proc ev event from (xml:element) (out:element -> unit) = Event.sync (Event.send ev xml) let sulci_rpc out in_chan out_chan () = let xml = input_value in_chan in match get_tagname xml with | "iq" -> let...
null
https://raw.githubusercontent.com/ermine/sulci/3ee4bd609b01e2093a6d37bf74579728d0a93b70/src/plugin_xmlrpc.ml
ocaml
todo: figure our how to send
* ( c ) 2005 - 2010 * (c) 2005-2010 Anastasia Gornostaeva *) open Unix open Xml let proc ev event from (xml:element) (out:element -> unit) = Event.sync (Event.send ev xml) let sulci_rpc out in_chan out_chan () = let xml = input_value in_chan in match get_tagname xml with | "iq" -> let...
a29388ff4319377ccdc6c4e6716f6ea7221a46ea9484ac0390024d3c81d290d5
dbmcclain/vmath
photom-saver.lisp
To use this file , get out of LispWorks environment and enter the ;; following command on a shell command line (Bash): rawlisp -init " /projects / lispworks / vmath / saver.lisp " ;; (change-directory "/projects/lispworks/") (load "defsys.lisp") (load-system "scids") ;; SciDS data files (load-sy...
null
https://raw.githubusercontent.com/dbmcclain/vmath/4f811af1a5ae80d864fbe9505054498d29f90e7a/photom-saver.lisp
lisp
following command on a shell command line (Bash): SciDS data files vectorized math reppy channels lazy eval
To use this file , get out of LispWorks environment and enter the rawlisp -init " /projects / lispworks / vmath / saver.lisp " (change-directory "/projects/lispworks/") (load "defsys.lisp") (compile-system "photom" :load t) (save-image "photom-image" :restart-function 'phot:photom :c...
8e90d89f3e8d290faea3c73896bc32b6db5e07aa3de8fd3414218558f47a21ec
kowainik/hit-on
Clone.hs
| Module : Hit . Git . Clone Copyright : ( c ) 2019 - 2020 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > Stability : Stable Portability : Portable @hit clone@ and @hit fork@ command runners and helpers . Mo...
null
https://raw.githubusercontent.com/kowainik/hit-on/c6b3fc764a8b6cc69542e935a0715985fe72eba6/src/Hit/Git/Clone.hs
haskell
| Step up into the folder and Add the upstream remote
| Module : Hit . Git . Clone Copyright : ( c ) 2019 - 2020 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > Stability : Stable Portability : Portable @hit clone@ and @hit fork@ command runners and helpers . Mo...
aa2ed014c62cb986a9d98a174ce1767d37f56990c703fb39f86816b67d452f28
SquidDev/illuaminate
types.ml
module Unit = struct type t = unit let equal () () = true let hash () = 1 let pp out () = Format.pp_print_string out "()" end
null
https://raw.githubusercontent.com/SquidDev/illuaminate/7a6e4bf56f01e81a47c743cb452791c2168ccbda/src/data/types.ml
ocaml
module Unit = struct type t = unit let equal () () = true let hash () = 1 let pp out () = Format.pp_print_string out "()" end
3a8c4087978afb80d69581e49e1beefdb5efe8bea4fd7cf8eb47c32abbb728f2
let-def/lrgrep
Gensym.ml
(******************************************************************************) (* *) (* Fix *) (* ...
null
https://raw.githubusercontent.com/let-def/lrgrep/29e64174dc9617bcd1871fd2e4fd712269568324/lib/fix/Gensym.ml
ocaml
**************************************************************************** Fix ...
, Paris . All rights reserved . This file is distributed under the terms of the GNU Library General Public License version 2 , with a type gensym = unit -> int let postincrementor c () = let y = !c in c := y + 1; y let make () = postincr...
0c4f2c856c21254f209866780b7b1f20062df522995b7655346270a9a45345df
ocaml-multicore/ocaml-tsan
odoc_test.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/f54002470cc6ab780963cc81b11a85a820a40819/ocamldoc/odoc_test.mli
ocaml
************************************************************************ OCaml ...
, projet Cambium , INRIA Paris Copyright 2022 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the
8c80be02678e8fe3029d6cf872c78ba201b5bbe22fda5a6ca4d1ae11ac938b92
glguy/advent
07.hs
{-# Language QuasiQuotes, ImportQualifiedPost, DeriveTraversable #-} | Module : Main Description : Day 7 solution Copyright : ( c ) , 2017 License : ISC Maintainer : < > This task asks us to balance a nearly balanced tree . Each node has its own weight and a balanced tree is one wh...
null
https://raw.githubusercontent.com/glguy/advent/7ab9f9e47208fd5720e36bac33fee2b78d4ec50b/solutions/src/2017/07.hs
haskell
# Language QuasiQuotes, ImportQualifiedPost, DeriveTraversable # $setup * Types * Computation * Change tracking $setup Example tree from the problem description @ gyxo / / \\ | jptl | | pbga \/ / - padx - havc \...
| Module : Main Description : Day 7 solution Copyright : ( c ) , 2017 License : ISC Maintainer : < > This task asks us to balance a nearly balanced tree . Each node has its own weight and a balanced tree is one where each node 's children must all have the same total weight . ...
9f8bd790adf6a315f15c21b646b48d0078219467f99b14364fd36448b8c51664
3b/cl-opengl
funcs-gles1-gles2.lisp
;;; this file is automatically generated, do not edit ;;; generated from files with the following copyright: ;;; Copyright ( c ) 2013 - 2017 The Khronos Group Inc. ;;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;;; you may not use this file except in compliance with the License. ;;; You m...
null
https://raw.githubusercontent.com/3b/cl-opengl/e2d83e0977b7e7ac3f3d348d8ccc7ccd04e74d59/gl/funcs-gles1-gles2.lisp
lisp
this file is automatically generated, do not edit generated from files with the following copyright: 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 CON...
Copyright ( c ) 2013 - 2017 The Khronos Group Inc. distributed under the License is distributed on an " AS IS " BASIS , (in-package #:cl-opengl-bindings) generated 2017 - 10 - 04T20:14:06Z from gl.xml @ git sha 2c8fa02871abd4102bd03d09d42645cce20c468f , 2017 - 10 - 03T15:09:09Z (defglextfun ("glCopyTextureLe...
a58c05d0e510a8d4746e592e133eb53403dc12b077fbd4fada32f64f14fbaa0e
nyu-acsys/drift
dotprod5.ml
let make_array n i = assert (0 <= i && i < n); 0 let update i n a x = a i; let a j = if i=j then x else a j in a let rec bcopy_aux m src des i = if i >= m then () else bcopy_aux m src (update i m des (src i)) (i+1) let main (n(*-:{v:Int|true}*)) (m(*-:{v:Int|true}*)) (i(*-:{v:Int|true}*)) = let array1 = make_a...
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/r_type/high/dotprod5.ml
ocaml
-:{v:Int|true} -:{v:Int|true} -:{v:Int|true}
let make_array n i = assert (0 <= i && i < n); 0 let update i n a x = a i; let a j = if i=j then x else a j in a let rec bcopy_aux m src des i = if i >= m then () else bcopy_aux m src (update i m des (src i)) (i+1) let array1 = make_array n in let array2 = make_array m in if i=0 && n<=m then bcopy_aux n ar...
c3e20d6b7e070b934e6d8bc5a36631954991cccec6cd3f350b07ee0c6689efda
heshrobe/joshua-dist
drei-interface.lisp
;;; -*- Mode: Lisp; Package: DREI-LISP-SYNTAX -*- ( c ) copyright 2005 , 2014 by ( ) ( c ) copyright 2006 - 2007 by ( ) ;;; ;;; This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the F...
null
https://raw.githubusercontent.com/heshrobe/joshua-dist/046d30ea4668aba8c85a5cdd7108ee9b853916bd/joshua/developer/drei-interface.lisp
lisp
-*- Mode: Lisp; Package: DREI-LISP-SYNTAX -*- This library is free software; you can redistribute it and/or either 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 PURPOSE. See the GNU Li...
( c ) copyright 2005 , 2014 by ( ) ( c ) copyright 2006 - 2007 by ( ) modify it under the terms of the GNU Library General Public version 2 of the License , or ( at your option ) any later version . Library General Public License for more details . You should have received a...
606ddd28a5141db43a5477eacf0b2e8ec7c1e38bb4fd5ed2018f93c5293e04c7
adam-james-v/scripts
uberscripter.clj
(ns uberscripter.core (:require [babashka.classpath :refer [add-classpath]] [clojure.string :as st] [clojure.java.shell :refer [sh]])) (defn get-deps [f] (->> (slurp f) (format "[%s]") read-string first second second str (sh "clojure" "-Spa...
null
https://raw.githubusercontent.com/adam-james-v/scripts/d91dc28b6e4946233fe675cc306af3343cc11204/uberscripter.clj
clojure
(ns uberscripter.core (:require [babashka.classpath :refer [add-classpath]] [clojure.string :as st] [clojure.java.shell :refer [sh]])) (defn get-deps [f] (->> (slurp f) (format "[%s]") read-string first second second str (sh "clojure" "-Spa...
4d60e234a1c52b1240d269dbf45cf31c4bb691fe9502b6b42fe384ed5646b670
gedge-platform/gedge-platform
stdout_formatter_utils.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 ) 2019 - 2020 VMware , Inc. or its affiliates . All rights reserved . %% %% @doc %% This module contains utility functions ...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/stdout_formatter/src/stdout_formatter_utils.erl
erlang
@doc This module contains utility functions used by other modules in this library. @doc Fills the initial properties map with default and inherited values. provides one, with the following order of precedence: <ol> <li>the initial properties map</li> <li>the inherited properties</li> <li>the default proper...
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 ) 2019 - 2020 VMware , Inc. or its affiliates . All rights reserved . -module(stdout_formatter_utils). -export([set_default_...
e5de199a7f3ce3f287ec12058f1cde9efd86c7ee68bc1ef7c65ad5a8e1ee1223
lemmaandrew/CodingBatHaskell
lessBy10.hs
From Given three ints , a b c , return true if one of them is 10 or more less than one of the others . Given three ints, a b c, return true if one of them is 10 or more less than one of the others. -} import Test.Hspec ( hspec, describe, it, shouldBe ) lessBy10 :: Int -> Int -> Int -> Bool lessBy10 a b c = ...
null
https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/Logic-1/lessBy10.hs
haskell
From Given three ints , a b c , return true if one of them is 10 or more less than one of the others . Given three ints, a b c, return true if one of them is 10 or more less than one of the others. -} import Test.Hspec ( hspec, describe, it, shouldBe ) lessBy10 :: Int -> Int -> Int -> Bool lessBy10 a b c = ...
145a8e0aec22ccb2f23b61d0715eb8cd6c918d61781bf69729f52237adff9618
aryx/xix
check.mli
type error = | Inconsistent of string * Location_cpp.loc * (* error here *) previous / def / whatever here | Misc of string * Location_cpp.loc val string_of_error: error -> string exception Error of error val failhard : bool ref (* can raise Error if failhard, otherwise print on stderr *) val check_p...
null
https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/compiler/check.mli
ocaml
error here can raise Error if failhard, otherwise print on stderr
type error = | Inconsistent of previous / def / whatever here | Misc of string * Location_cpp.loc val string_of_error: error -> string exception Error of error val failhard : bool ref val check_program: Ast.program -> unit
9aed5bb120b623612a2c837666dc12857b8498bb50044727e512e68fff6daa12
haskell-opengl/OpenGLRaw
MultiBind.hs
-------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.ARB.MultiBind Copyright : ( c ) 2019 -- License : BSD3 -- Maintainer : < > -- Stability : stable -- Portability : portable -- ---------------------------------------------------...
null
https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/ARB/MultiBind.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.GL.ARB.MultiBind License : BSD3 Stability : stable Portability : portable ------------------------------------------------------------------------------ * Extension Support * Functions
Copyright : ( c ) 2019 Maintainer : < > module Graphics.GL.ARB.MultiBind ( glGetARBMultiBind, gl_ARB_multi_bind, glBindBuffersBase, glBindBuffersRange, glBindImageTextures, glBindSamplers, glBindTextures, glBindVertexBuffers ) where import Graphics.GL.ExtensionPredicates import Graph...
795189af849ceb92b2e3b1eeef9a4440471af17a0433a756ba331dd4e4a719a7
NinjaTrappeur/ex-hack
Hackage.hs
# LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # module ExHack.Hackage.Hackage ( findComponentRoot, getModExports, getModNames, getPackageExports, unpackHackageTarball, PackageExports(..) ) where import qualified Codec.Archive.Tar as Tar (Entries (..), entryPath, read, ...
null
https://raw.githubusercontent.com/NinjaTrappeur/ex-hack/dace36926065d5a0dd0076beec1a6eeacd848732/src/ExHack/Hackage/Hackage.hs
haskell
| Unpack a tarball to a specified directory. ^ 'FilePath' pointing to the directory we want to extract the tarball to. ^ Newly created directory containing the extracted tarball. TODO: unsafe head here. We are pretty sure we'll have at least a basedir since the tarballs we are unpacking are haskell packages. Howe...
# LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # module ExHack.Hackage.Hackage ( findComponentRoot, getModExports, getModNames, getPackageExports, unpackHackageTarball, PackageExports(..) ) where import qualified Codec.Archive.Tar as Tar (Entries (..), entryPath, read, ...
c4a5f198ae6bf4baf762b72a9b0b0b3bcd3efb0fd5a74ab9a6a27548bbb749fb
samrushing/irken-compiler
t_lla.scm
;; -*- Mode: Irken -*- (datatype color (:red) (:green) (:blue)) (define (^llvm-x) (color:green) ) (^llvm-x)
null
https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/llvm/t_lla.scm
scheme
-*- Mode: Irken -*-
(datatype color (:red) (:green) (:blue)) (define (^llvm-x) (color:green) ) (^llvm-x)
aa907bed4ea5f863dab70e3e8c599988d2a9d00db6da7410565708f1546d75f3
ua-parser/uap-clj
core_spec.clj
(ns uap-clj.core-spec "Tests for limited bad input edge cases for core 'useragent' function. Exhaustive (generative) testing for the os, device, and browser functions - which 'useragent' calls - are found in their own specs. " (:require [speclj.core :refer :all] [uap-clj.common-spec :refer [u...
null
https://raw.githubusercontent.com/ua-parser/uap-clj/62ce2aeca0c33444537a5d357a3a24ecce69d0ba/spec/uap_clj/core_spec.clj
clojure
(ns uap-clj.core-spec "Tests for limited bad input edge cases for core 'useragent' function. Exhaustive (generative) testing for the os, device, and browser functions - which 'useragent' calls - are found in their own specs. " (:require [speclj.core :refer :all] [uap-clj.common-spec :refer [u...
477ac2ce47bf5d0ff588fcedf28ee6932e57373f306bbeda223442d457f835ae
coco-team/lustrec
test_json_parser_variables.ml
open Basetypes open Corelang open Datatype open Json_parser open LustreSpec open OUnit2 module ParseExt = struct let parse_condition _ = Condition.tru let parse_action _ = Action.nil let parse_event json = Some Yojson.Basic.(json |> to_string) end module Parse = Parser (ParseExt) let location = Location.du...
null
https://raw.githubusercontent.com/coco-team/lustrec/b21f9820df97e661633cd4418fdab68a6c6ca67d/src/tools/stateflow/json-parser/test_json_parser_variables.ml
ocaml
open Basetypes open Corelang open Datatype open Json_parser open LustreSpec open OUnit2 module ParseExt = struct let parse_condition _ = Condition.tru let parse_action _ = Action.nil let parse_event json = Some Yojson.Basic.(json |> to_string) end module Parse = Parser (ParseExt) let location = Location.du...
0a72dde7e6a83d962af9d7e8e57c14bce8a0f2c8d5ecf3c14a503979d6a440fb
chiroptical/thinking-with-types
Main.hs
module Main where import Lib main :: IO () main = putStrLn "hello"
null
https://raw.githubusercontent.com/chiroptical/thinking-with-types/781f90f1b08eb94ef3600c5b7da92dfaf9ea4285/Chapter2/exercises/app/Main.hs
haskell
module Main where import Lib main :: IO () main = putStrLn "hello"
51df91e64ede9cdd31394f1efcc70b55e42adc0a19dc9414fda08c8d037a3c2a
jacekschae/learn-re-frame-course-files
core.cljs
(ns app.core (:require [reagent.core :as r] [re-frame.core :as rf] [app.db] [app.router :as router] ;; -- auth -- [app.auth.views.profile :refer [profile]] [app.auth.views.sign-up :refer [sign-up]] [app.auth.views.log-in :refer [log-i...
null
https://raw.githubusercontent.com/jacekschae/learn-re-frame-course-files/a86e6f14b89c595b4389b03459539a9544af4e1d/increments/23-active-page/src/app/core.cljs
clojure
-- auth -- -- become-a-chef -- -- inbox -- -- nav -- -- recipes --
(ns app.core (:require [reagent.core :as r] [re-frame.core :as rf] [app.db] [app.router :as router] [app.auth.views.profile :refer [profile]] [app.auth.views.sign-up :refer [sign-up]] [app.auth.views.log-in :refer [log-in]] [app.auth....
c2fe9b28bf553aa54a2505ce960d34eaec0ecf4b5ca3e29c5f981d756040f46f
ujamjar/hardcaml
test_vpi_load.ml
open HardCaml let clocks = ["clock",1] let resets = ["reset",1] let inputs = ["a",2; "b",3] let outputs = ["c",4; "d",5] let verilog_file_name = "test.v" let testbench_file_name = "testbench.v" let vvp_file_name = "test.vvp" let vcd_file_name = "vpi_load.vcd" let module_name = "test" (* write testbench *) let file =...
null
https://raw.githubusercontent.com/ujamjar/hardcaml/65f32f543348e81cbb7f6d0e77f1f1203bf4e335/test/test_vpi_load.ml
ocaml
write testbench
open HardCaml let clocks = ["clock",1] let resets = ["reset",1] let inputs = ["a",2; "b",3] let outputs = ["c",4; "d",5] let verilog_file_name = "test.v" let testbench_file_name = "testbench.v" let vvp_file_name = "test.vvp" let vcd_file_name = "vpi_load.vcd" let module_name = "test" let file = open_out testbench_fi...
2f963b022b209893ed5bf0bb3a28c808ea4728f23d55ebe54cefeb96b4c4cf36
WorksHub/client
re_frame.cljc
(ns wh.re-frame (:require #?(:cljs [reagent.core :as r]) [re-frame.db :as r-db] [re-frame.interop]) (:refer-clojure :exclude [atom])) (defn set-app-db! [app-db] (reset! r-db/app-db app-db)) (def atom #?(:cljs r/atom :clj clojure.core/atom)) (def props #?(:cljs r/props :c...
null
https://raw.githubusercontent.com/WorksHub/client/04ed14c86ba219fcb7aa83457844c9ae65b6a99f/common/src/wh/re_frame.cljc
clojure
(ns wh.re-frame (:require #?(:cljs [reagent.core :as r]) [re-frame.db :as r-db] [re-frame.interop]) (:refer-clojure :exclude [atom])) (defn set-app-db! [app-db] (reset! r-db/app-db app-db)) (def atom #?(:cljs r/atom :clj clojure.core/atom)) (def props #?(:cljs r/props :c...
a6f066bc95e428dbdc4e268e3a63d074019a457fcaa76f3aae0e520ba858664b
earl-ducaine/cl-garnet
multifont-textinter.lisp
-*- Mode : LISP ; Syntax : Common - Lisp ; Package : INTERACTORS ; Base : 10 -*- ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; The Garnet User Interface Development Environment . ; ; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; This code was w...
null
https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/src/inter/multifont-textinter.lisp
lisp
Syntax : Common - Lisp ; Package : INTERACTORS ; Base : 10 -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; This code was written as part of the Garnet project at ;; ; ; please contact to be put on the ma...
$ Id$ ^p = previous line , = next line uparrow , = previous line , next line ^e = end of line = kill line , ^u = delete entire string , ^w , CUT = delete selection META - w , COPY = copy selection to cut buffer ^y , PASTE = yank kill buffer or X cut buffer ^Y , ^PASTE = yank X buffer m...
92c7de0b789dcc33c34b588e1614a3a88bac4f98ce1a3373e74c1d14a3c3a729
ANSSI-FR/xsvgen
xml_validator.ml
(***********************************************************************) (* *) (* XML Schema Validator Generator *) (* *) ( SafeRive...
null
https://raw.githubusercontent.com/ANSSI-FR/xsvgen/3c2b5e43e7adcb856a3a2aa01bfc039bf3c6459b/xv/xml_validator.ml
ocaml
********************************************************************* XML Schema Validator Generator ...
( SafeRiver ) Copyright 2012 , ANSSI and SafeRiver . $ I d : xml_validator.ml 1704 2012 - 06 - 04 16:49:33Z maarek $ * { 1 XML validator } let filename = ref "" let add_filename str= filename := str let usage_message = "Usage: se...
9ec6f4fd669f09ed3eb76fc25e6007f1bd79b7667a1fe57fa08deb326cdd4f14
argp/bap
batBitSet.mli
* Bitset - Efficient bit sets * Copyright ( C ) 2003 * Copyright ( C ) 2008 * Copyright ( C ) 2012 * * 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 ; eithe...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/src/batBitSet.mli
ocaml
* Create an empty bitset of capacity 0, the bitset will automatically expand when needed. Example: [BitSet.empty ()] * Create an empty bitset with at least an initial capacity (in number of bits). Example: [BitSet.create 0 = BitSet.empty ()] @raise Invalid_argument on negative capacity * [next_set_b...
* Bitset - Efficient bit sets * Copyright ( C ) 2003 * Copyright ( C ) 2008 * Copyright ( C ) 2012 * * 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 ; eithe...
9614abe92f0089ae04b6171c7eee3fc4c5cc30e6407798b2433e8c1f45c6ffab
ghc/packages-Cabal
setup.test.hs
import Test.Cabal.Prelude main = setupAndCabalTest $ do skipUnless =<< ghcVersionIs (>= mkVersion [8,1]) fails (setup' "configure" []) >>= assertRegex "Expect problem with Asdf" "Asdf"
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/Backpack/Reexport2/setup.test.hs
haskell
import Test.Cabal.Prelude main = setupAndCabalTest $ do skipUnless =<< ghcVersionIs (>= mkVersion [8,1]) fails (setup' "configure" []) >>= assertRegex "Expect problem with Asdf" "Asdf"
1ce0803dcabd6ffb0ffd3d6d250c600ff64636ef04bfc0565201d9c86d075f87
lpw25/ocaml-typed-effects
test6.ml
(* Tests nested calls from C (main C) to OCaml (main OCaml) to C (caml_to_c) to * OCaml (c_to_caml) to C (printf functions). Exception is raised in a * Callback, which unwinds the C stack and gets caught in OCaml. *) exception E let printf = Printf.printf let c_to_caml () = printf "[Caml] Enter c_to_caml\n%!"; ...
null
https://raw.githubusercontent.com/lpw25/ocaml-typed-effects/79ea08b285c1fd9caf3f5a4d2aa112877f882bea/testsuite/tests/callback/test6.ml
ocaml
Tests nested calls from C (main C) to OCaml (main OCaml) to C (caml_to_c) to * OCaml (c_to_caml) to C (printf functions). Exception is raised in a * Callback, which unwinds the C stack and gets caught in OCaml.
exception E let printf = Printf.printf let c_to_caml () = printf "[Caml] Enter c_to_caml\n%!"; printf "[Caml] c_to_caml: raise exception\n%!"; raise E let _ = Callback.register "c_to_caml" c_to_caml external caml_to_c : unit -> unit = "caml_to_c" let _ = try printf "[Caml] Call caml_to_c\n%!"; cam...
249c7a031c2e7fdc4d4c95db8d75f48e416e95355e54d8edae1aaa4fee9205ce
cedlemo/OCaml-GI-ctypes-bindings-generator
Sensitivity_type.ml
open Ctypes open Foreign type t = Auto | On | Off let of_value v = if v = Unsigned.UInt32.of_int 0 then Auto else if v = Unsigned.UInt32.of_int 1 then On else if v = Unsigned.UInt32.of_int 2 then Off else raise (Invalid_argument "Unexpected Sensitivity_type value") let to_value = function | Auto -> Unsigne...
null
https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Sensitivity_type.ml
ocaml
open Ctypes open Foreign type t = Auto | On | Off let of_value v = if v = Unsigned.UInt32.of_int 0 then Auto else if v = Unsigned.UInt32.of_int 1 then On else if v = Unsigned.UInt32.of_int 2 then Off else raise (Invalid_argument "Unexpected Sensitivity_type value") let to_value = function | Auto -> Unsigne...
73881a476f35def84fd4cf3b26f802ed8960aff806d98a822a99eb29886bf55d
scarvalhojr/haskellbook
section30.7-2.hs
import Control.Exception data EATD = NotEven Int | NotDivThree Int deriving (Eq, Show) instance Exception EATD evenAndThreeDiv :: Int -> IO Int evenAndThreeDiv i | rem i 3 /= 0 = throwIO (NotDivThree i) | odd i = throwIO (NotEven i) | otherwise = return i type EA e = IO (Either e Int...
null
https://raw.githubusercontent.com/scarvalhojr/haskellbook/6016a5a78da3fc4a29f5ea68b239563895c448d5/chapter30/section30.7-2.hs
haskell
Left (NotEven 3) Left (NotDivThree 4) Right 6
import Control.Exception data EATD = NotEven Int | NotDivThree Int deriving (Eq, Show) instance Exception EATD evenAndThreeDiv :: Int -> IO Int evenAndThreeDiv i | rem i 3 /= 0 = throwIO (NotDivThree i) | odd i = throwIO (NotEven i) | otherwise = return i type EA e = IO (Either e Int...
1bdb9f1e96e9f36bd9f322767bfbb669e04bb5152a6a89e3c2fa9190e02f341f
zxymike93/SICP
307.rkt
#lang sicp 注意参数、本地变量的命名不能相同 , 所以采用 password psswd pw (define (make-account balance password) ;; 密码 (define psswd password) (define (auth? pw) (eq? pw psswd)) ;; 取钱 (define (withdraw amount) (if (>= balance amount) (begin (set! balance (- balance amount)) ...
null
https://raw.githubusercontent.com/zxymike93/SICP/9d8e84d6a185bf4d7f28c414fc3359741384beb5/chapter3/307.rkt
racket
密码 取钱 存钱 tests 注释掉的过程都是出错测试
#lang sicp 注意参数、本地变量的命名不能相同 , 所以采用 password psswd pw (define (make-account balance password) (define psswd password) (define (auth? pw) (eq? pw psswd)) (define (withdraw amount) (if (>= balance amount) (begin (set! balance (- balance amount)) balance) ...
9f879ffa1b24e454139aef85ca66ef9f06b3906e83e4142abfe07c57e39a5200
axelarge/advent-of-code
day06_test.clj
(ns advent-of-code.y2020.day06-test (:require [clojure.test :refer :all] [advent-of-code.y2020.day06 :refer :all])) (deftest test-solve1 (is (= (solve1 input) 6612))) (deftest test-solve2 (is (= (solve2 input) 3268)))
null
https://raw.githubusercontent.com/axelarge/advent-of-code/4c62a53ef71605780a22cf8219029453d8e1b977/test/advent_of_code/y2020/day06_test.clj
clojure
(ns advent-of-code.y2020.day06-test (:require [clojure.test :refer :all] [advent-of-code.y2020.day06 :refer :all])) (deftest test-solve1 (is (= (solve1 input) 6612))) (deftest test-solve2 (is (= (solve2 input) 3268)))
918800fe27fddbda1069df530048e021a441e228d24be726b4cf33a64ee1cd89
jordanthayer/ocaml-search
ascii85.ml
(** ASCII85 encode a data stream. *) let max_width = 72 (* The maximum width of the data. *) let encode data = (** ASCII85 encoding of the given data. *) let init_size = 100 in let out = Buffer.create init_size in let do_tuple ?(width=0) tuple count = (* Encode a single tuple. Result in the new wi...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/image/ascii85.ml
ocaml
* ASCII85 encode a data stream. The maximum width of the data. * ASCII85 encoding of the given data. Encode a single tuple. Result in the new width of the text. Encode the data stream.
let max_width = 72 let encode data = let init_size = 100 in let out = Buffer.create init_size in let do_tuple ?(width=0) tuple count = let eighty_five = Int64.of_int 85 in let rec do_div ?(i=5) ?(accum=[]) tuple = if i = 0 then accum else let offset = int_of_char '!' in let ival = Int64....
d214bd5fad692189103b8c49b227c7a67877091f353a772f89b83361add6c114
Rotaerk/vulkanTest
Local.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE FlexibleContexts # {-# LANGUAGE RankNTypes #-} module Graphics.Vulkan.Marshal.Create.Local ( module Graphics.Vulkan.Marshal.Create, copyFieldFrom, copyField ) where import Data.Reflection import Graphics.Vulkan.Marshal import Graphics.Vulkan.Marshal.Create copyFiel...
null
https://raw.githubusercontent.com/Rotaerk/vulkanTest/27891ac74e4b8eae5dffeb25118be0b4b9516bc7/sandbox/sandbox/src/Graphics/Vulkan/Marshal/Create/Local.hs
haskell
# LANGUAGE RankNTypes #
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE FlexibleContexts # module Graphics.Vulkan.Marshal.Create.Local ( module Graphics.Vulkan.Marshal.Create, copyFieldFrom, copyField ) where import Data.Reflection import Graphics.Vulkan.Marshal import Graphics.Vulkan.Marshal.Create copyFieldFrom :: forall fname a. (Ca...
355cb44769aba9096a793379e57ee2b62a69f159fbffdd2a39e63a966e5351fc
pariyatti/kosa
support_test.clj
(ns kuti.support-test (:require [kuti.support :as sut] [clojure.test :refer :all])) (deftest assoc-unless (testing "associates when key doesn't exist" (is (= "value" (-> (sut/assoc-unless {} :new-key "value") :new-key)))) (testing "ignores when key already exists" (...
null
https://raw.githubusercontent.com/pariyatti/kosa/548a914cde6456a88e224aeb647cb6d01f0ca3bd/test/kuti/support_test.clj
clojure
(ns kuti.support-test (:require [kuti.support :as sut] [clojure.test :refer :all])) (deftest assoc-unless (testing "associates when key doesn't exist" (is (= "value" (-> (sut/assoc-unless {} :new-key "value") :new-key)))) (testing "ignores when key already exists" (...
3eec3902cb64fe8809551663f7e8cffe246c198c9e26754c6b5a4ffe33245c0f
ujihisa/cloft
item.clj
(ns cloft.item (:require [cloft.material :as m])) (def swords #{m/wood-sword m/stone-sword m/iron-sword m/gold-sword m/diamond-sword}) (def pickaxe-durabilities {m/wood-pickaxe 60 m/stone-pickaxe 132 m/iron-pickaxe 251 m/gold-pickaxe 33 m/diamond-pickaxe 1562}) (def pickaxes (set (keys pickaxe...
null
https://raw.githubusercontent.com/ujihisa/cloft/98284fa763d16280d4685478b2be2ab0efbb00b0/src/cloft/item.clj
clojure
(ns cloft.item (:require [cloft.material :as m])) (def swords #{m/wood-sword m/stone-sword m/iron-sword m/gold-sword m/diamond-sword}) (def pickaxe-durabilities {m/wood-pickaxe 60 m/stone-pickaxe 132 m/iron-pickaxe 251 m/gold-pickaxe 33 m/diamond-pickaxe 1562}) (def pickaxes (set (keys pickaxe...
7be8606895946f274ee761f23cd3b368d33845c2ab703eb87ef9a4a163728514
max-au/spg
spg_cluster_SUITE.erl
%%------------------------------------------------------------------- @author < > %% @doc Scalable Process Groups cluster - wide test , uses PropEr stateful %% testing routine. %% @end %% ------------------------------------------------------------------- -module(spg_cluster_SUITE). -author(""). %% Test server...
null
https://raw.githubusercontent.com/max-au/spg/a0a951c8116ae910275206c47f9e40db98a7bd10/test/spg_cluster_SUITE.erl
erlang
------------------------------------------------------------------- @doc testing routine. @end ------------------------------------------------------------------- Test server callbacks Test cases exports PropEr state machine PropEr shims -------------------------------------------------------------------- Pro...
@author < > Scalable Process Groups cluster - wide test , uses PropEr stateful -module(spg_cluster_SUITE). -author(""). -export([ init_per_suite/1, end_per_suite/1, all/0 ]). -export([ spg_sequential/0, spg_sequential/1 ]). -behaviour(proper_statem). -export([ initial_state/0, command/1, ...
2105d6259e0424e7af0bb8e54c09ea95393cd7f70f075cf1ed54fc4e2f5e7bb2
dschrempf/mcmc
Hamiltonian.hs
# OPTIONS_GHC -Wno - orphans # -- | -- Module : Main Description : Hamiltonian MCMC sampler Copyright : 2021 License : GPL-3.0 - or - later -- -- Maintainer : -- Stability : experimental -- Portability : portable -- Creation date : Mon Jul 5 17:11:32 2021 . module Main ( main, ...
null
https://raw.githubusercontent.com/dschrempf/mcmc/666e4aeb7895c47e3ccbd4de0211f830324c7af2/mcmc-examples/Hamiltonian/Hamiltonian.hs
haskell
| Module : Main Maintainer : Stability : experimental Portability : portable The function is really hard to estimate . It works somewhat , but -- the example is a little bit frustrating. logRosenbrock a b xs | otherwise = error "lhf: Number of parameters has changed." where x = xs VB....
# OPTIONS_GHC -Wno - orphans # Description : Hamiltonian MCMC sampler Copyright : 2021 License : GPL-3.0 - or - later Creation date : Mon Jul 5 17:11:32 2021 . module Main ( main, ) where import Control.Lens import Control.Monad import qualified Data.Vector as VB import qualified Data.Ve...
adbdd034c8a443f5c8e2ff16815d67bd3aeec0da869ed3e5e5221543783dfdbc
rodrigosetti/stamps
shape.rkt
#lang racket/base (module core typed/racket/base (require typed/racket/class racket/list racket/math math/matrix "adjustments.rkt" "path-record.rkt" typed/racket/unsafe) (provide ShapeConstructor ShapeRenderer Shape) (unsaf...
null
https://raw.githubusercontent.com/rodrigosetti/stamps/958938dd71fdaa64041ea13f1b491bda628bda9c/private/shape.rkt
racket
Types Shape constructors shape constructor shape shape-renderer creates a shape-constructor that randomly selects a shape to render every time it renders shape-constructor shape shape-renderer shape-constructor shape shape-renderer list of shape-renderers, from list of shapes applied to adjs shortcut for...
#lang racket/base (module core typed/racket/base (require typed/racket/class racket/list racket/math math/matrix "adjustments.rkt" "path-record.rkt" typed/racket/unsafe) (provide ShapeConstructor ShapeRenderer Shape) (unsaf...
3a80f87d3d7cd51bd706ce819d98ee65955c365151641a205c3774bd9ee6ba43
typeclasses/dsv
AttoParser.hs
# LANGUAGE NoImplicitPrelude # module DSV.AttoParser ( AttoParser ) where attoparsec import qualified Data.Attoparsec.ByteString as Atto type AttoParser = Atto.Parser
null
https://raw.githubusercontent.com/typeclasses/dsv/ae4eb823e27e4c569c4f9b097441985cf865fbab/dsv/library/DSV/AttoParser.hs
haskell
# LANGUAGE NoImplicitPrelude # module DSV.AttoParser ( AttoParser ) where attoparsec import qualified Data.Attoparsec.ByteString as Atto type AttoParser = Atto.Parser
c36590da8bb44213d8f258c6b900f5093ec8c45f4a92cdc48fee22cbccfb8bda
neil-lindquist/linear-programming
base.lisp
(uiop:define-package :linear-programming-test/base (:use :cl :fiveam) (:export #:linear-programming)) (in-package :linear-programming-test/base) (def-suite* linear-programming :description "The base suite for the linear programming library tests")
null
https://raw.githubusercontent.com/neil-lindquist/linear-programming/417f764e65be1a92f7f9fc0f1ed8092700e916c6/t/base.lisp
lisp
(uiop:define-package :linear-programming-test/base (:use :cl :fiveam) (:export #:linear-programming)) (in-package :linear-programming-test/base) (def-suite* linear-programming :description "The base suite for the linear programming library tests")
069d0c1043fde875132a9ee1ffef638d884b070d1c547041d2062373dffa91c1
dschrempf/elynx
SiteprofilesPhylobayesSpec.hs
-- | Module : ELynx . Import . MarkovProcess . SiteprofilesPhylobayesSpec Copyright : 2021 License : GPL-3.0 - or - later -- -- Maintainer : -- Stability : unstable -- Portability : portable -- Creation date : We d Sep 18 09:51:35 2019 . module ELynx.Import.MarkovProcess.Siteprofile...
null
https://raw.githubusercontent.com/dschrempf/elynx/f73f4474c61c22c6a9e54c56bdc34b37eff09687/elynx-markov/test/ELynx/Import/MarkovProcess/SiteprofilesPhylobayesSpec.hs
haskell
| Maintainer : Stability : unstable Portability : portable
Module : ELynx . Import . MarkovProcess . SiteprofilesPhylobayesSpec Copyright : 2021 License : GPL-3.0 - or - later Creation date : We d Sep 18 09:51:35 2019 . module ELynx.Import.MarkovProcess.SiteprofilesPhylobayesSpec ( spec, ) where import qualified Data.Vector.Storable as V impo...
9231bb2fa1228b0f78a09f8f2d993141e4dbdb845a64c7fc25d88b5d26390359
the-language/zKanren
zkanren.rkt
: MicroKanren with Constraints and noto Copyright ( C ) 2017 ;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ;; (at your option) any ...
null
https://raw.githubusercontent.com/the-language/zKanren/98df0700cb8935d1bde417ccb7f00b0417e00f6b/zkanren.rkt
racket
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero Gen...
: MicroKanren with Constraints and noto Copyright ( C ) 2017 it under the terms of the GNU Affero 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 Affero General Public License #lang racket (define...
a32d772b48e26bf60bf8057f7e2c946447088e56f8500335e59d96a26c1a10cb
jtdaugherty/tracy
Environment.hs
module Tracy.Lights.Environment ( environmentLight ) where import Control.Applicative import Control.Lens import Data.Maybe import Linear import Tracy.Types environmentLight :: Bool -> Material -> Light environmentLight sh m = Light sh envDir (envColor m) envShadow envG envPDF envG :: LightDir -> Shade ->...
null
https://raw.githubusercontent.com/jtdaugherty/tracy/ad36ea16a3b9cda5071ca72374d6e1c1b415d520/src/Tracy/Lights/Environment.hs
haskell
module Tracy.Lights.Environment ( environmentLight ) where import Control.Applicative import Control.Lens import Data.Maybe import Linear import Tracy.Types environmentLight :: Bool -> Material -> Light environmentLight sh m = Light sh envDir (envColor m) envShadow envG envPDF envG :: LightDir -> Shade ->...
e58bbcea22fb819baa0702fdd59bbaaa1122ac403fb986a60cc593bb63634c2f
aeternity/mnesia_leveled
mnesia_leveled.erl
%%---------------------------------------------------------------- Copyright ( c ) 2018 Aeternity Anstalt %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the License at %% %% ...
null
https://raw.githubusercontent.com/aeternity/mnesia_leveled/11c480b5546ed6087ae688e8596bd596a1f7bdd1/src/mnesia_leveled.erl
erlang
---------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissions an...
Copyright ( c ) 2018 Aeternity Anstalt This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY @doc leveled storage backend for . ...
e78e96a6b5e457c89f58d531c40879f9c9a5be4f5f9a149ac0bd7411e32c2c02
BranchTaken/Hemlock
test_empty_cmper_m_singleton_length.ml
open! Basis.Rudiments open! Basis open Set let test () = let e = empty (module Uns) in assert (length e = 0L); File.Fmt.stdout |> fmt e |> Fmt.fmt "\n" |> ignore; let s = singleton (cmper_m e) 0L in assert (length s = 1L); File.Fmt.stdout |> fmt s |> Fmt.fmt "\n" |> ignore let _ = test ()
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/a21b462fe7f70475591d2ffae185c91552bf6372/bootstrap/test/basis/set/test_empty_cmper_m_singleton_length.ml
ocaml
open! Basis.Rudiments open! Basis open Set let test () = let e = empty (module Uns) in assert (length e = 0L); File.Fmt.stdout |> fmt e |> Fmt.fmt "\n" |> ignore; let s = singleton (cmper_m e) 0L in assert (length s = 1L); File.Fmt.stdout |> fmt s |> Fmt.fmt "\n" |> ignore let _ = test ()
a262e54e3366fd222b6affc53886446f6cef590b38cbd75d8fefd91a7dc28f1f
marick/structural-typing
f_type_repo_error_handler.clj
`(ns structural-typing.use.condensed-type-descriptions.f-type-repo-error-handler (:require [structural-typing.preds :as pred]) (:use midje.sweet structural-typing.type structural-typing.global-type structural-typing.clojure.core structural-typing.assist.testutil) (:refer-clojure :e...
null
https://raw.githubusercontent.com/marick/structural-typing/9b44c303dcfd4a72c5b75ec7a1114687c809fba1/test/structural_typing/use/condensed_type_descriptions/f_type_repo_error_handler.clj
clojure
`(ns structural-typing.use.condensed-type-descriptions.f-type-repo-error-handler (:require [structural-typing.preds :as pred]) (:use midje.sweet structural-typing.type structural-typing.global-type structural-typing.clojure.core structural-typing.assist.testutil) (:refer-clojure :e...
e368c1b4454c5794777b295b6e45168c020f5d4f1349d6919d0f00ba2840cd2c
xvw/planet
link.mli
(** Describe links *) open Bedrock open Paperwork type uri = string type name = string (** Describe a simple link. *) type simple = name * uri (** Dated link. *) type dated = name * Timetable.Day.t * uri * { 2 Mappers } val mapper_simple : Qexp.t -> simple Validation.t val mapper_dated : Qexp.t -> dated Validatio...
null
https://raw.githubusercontent.com/xvw/planet/c2a77ea66f61cc76df78b9c2ad06d114795f3053/src/shapes/link.mli
ocaml
* Describe links * Describe a simple link. * Dated link. * {2 Utils}
open Bedrock open Paperwork type uri = string type name = string type simple = name * uri type dated = name * Timetable.Day.t * uri * { 2 Mappers } val mapper_simple : Qexp.t -> simple Validation.t val mapper_dated : Qexp.t -> dated Validation.t val pp_simple : Format.formatter -> simple -> unit val pp_dated : ...
c13da0a5299dd241427a5158d6a9525e7c6d3d2398b4ac5e8882ac8f7aab9da1
singnet/snet-minting-policy
Game.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DerivingStrategies #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE Generalize...
null
https://raw.githubusercontent.com/singnet/snet-minting-policy/1eb6ce64d408318e715d809cbe2e32a302aaabeb/examples/src/Plutus/Contracts/Game.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DeriveAnyClass # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE NoImplicitPrelude # # LANGUAGE PartialTypeSignatures # # LANGUAGE TemplateHaskell # # LANGUAGE TypeOperators # ...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications ...
3ad1768a99f031281e529a3d30f5531f1281870a7f4796866b9eea2f6e9fc9c5
kloimhardt/werkbank
basis.clj
; Copyright © 2017 . This work is based on the Scmutils system of MIT / GNU Scheme : Copyright © 2002 Massachusetts Institute of Technology ; ; This 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/kloimhardt/werkbank/df66274eb978d060a043b8429b29d0f36c4a2e89/src/sicmutils/calculus/basis.clj
clojure
This is free software; you can redistribute it and/or modify either version 3 of the License , or ( at your option) any later version. This software 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 PUR...
Copyright © 2017 . This work is based on the Scmutils system of MIT / GNU Scheme : Copyright © 2002 Massachusetts Institute of Technology 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 (ns sicmutils.calculus.basis) (def...
964c1fcab3bb43481e8276451f7f028a8d35baa422721fe1c6db8b29947abbc3
haskell/haskell-language-server
Ormolu3.hs
foo :: String foo = "a" .=? "b" <> "c" .=? "d" <> "e" .=? "f"
null
https://raw.githubusercontent.com/haskell/haskell-language-server/4d5ce72cf219348e627cef03f8e2304ada60bb7d/plugins/hls-ormolu-plugin/test/testdata/Ormolu3.hs
haskell
foo :: String foo = "a" .=? "b" <> "c" .=? "d" <> "e" .=? "f"
31ec25bf72fd872f30b49080b8975815c1268ad48e3c4b8c18250099eb4be1ec
Odie/gd-edit
help.clj
(ns gd-edit.commands.help (:require [clojure.string :as str] [gd-edit.utils :as u])) (def command-help-map " Command help map is a list of 'help-items', where each is a tuple of [command-name brief-help-text detail-help-text] " [["exit" "Exits the program"] ["q" "Query the database" ...
null
https://raw.githubusercontent.com/Odie/gd-edit/651d3367dc083f0d678dffe9608c9b5cc12038ad/src/gd_edit/commands/help.clj
clojure
If there are no other parameters, show the list of commands and a short help text. Print the name of the command followed by the short help text If the user is looking for help text on a specific command, try to find the help text.
(ns gd-edit.commands.help (:require [clojure.string :as str] [gd-edit.utils :as u])) (def command-help-map " Command help map is a list of 'help-items', where each is a tuple of [command-name brief-help-text detail-help-text] " [["exit" "Exits the program"] ["q" "Query the database" ...
fa91c92d6b71d39274762188b1161f1632a5313ce26ff299c418b2fabc203952
LambdaScientist/CLaSH-by-example
StandardMux1.hs
# LANGUAGE DataKinds # # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE NoImplicitPrelude # module InAndOut.Models.StandardMux1 where import CLaSH.Prelude import Control.Lens hiding ((:>)) import Control.Monad.Trans.State import SAFE.TestingTools import SAFE.CommonClash import Text...
null
https://raw.githubusercontent.com/LambdaScientist/CLaSH-by-example/e783cd2f2408e67baf7f36c10398c27036a78ef3/HaskellClashExamples/src/InAndOut/Models/StandardMux1.hs
haskell
inputs Outputs and state data Signal st
# LANGUAGE DataKinds # # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE NoImplicitPrelude # module InAndOut.Models.StandardMux1 where import CLaSH.Prelude import Control.Lens hiding ((:>)) import Control.Monad.Trans.State import SAFE.TestingTools import SAFE.CommonClash import Text...
b09168ed561160d1ec751ac511953a76ee019c8a9de9c522629aa31f0a5f6d8b
facebookarchive/pfff
visitor_php.ml
* * Copyright ( C ) 2010 , 2011 Facebook * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_php/parsing/visitor_php.ml
ocaml
for v_int, v_bool, etc *************************************************************************** Prelude *************************************************************************** *************************************************************************** Side effect style visitor *****************************...
* * Copyright ( C ) 2010 , 2011 Facebook * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file...
681d3f420a65415588231c96cfc52a3e3efc6a7597a04838fa4187d95781f543
e-wrks/edh
Math.hs
module Language.Edh.Batteries.Math where -- import Debug.Trace import Control.Concurrent.STM import Data.Lossless.Decimal as D import Data.Text (Text) import qualified Data.Text as T import Language.Edh.Args import Language.Edh.Batteries.Data import Language.Edh.Batteries.InterOp import Language.Edh.Control...
null
https://raw.githubusercontent.com/e-wrks/edh/05b339ae6172770113f61f9584ac9792877853cb/host.hs/src/Language/Edh/Batteries/Math.hs
haskell
import Debug.Trace | operator (+) | operator (-) | operator (*) | operator (/) | operator (//) integer division truncated toward negative infinity, following Python -history.blogspot.com/2010/08/why-pythons-integer-division-floors.html | operator (**) | virtual attribute Decimal.finite test whethe...
module Language.Edh.Batteries.Math where import Control.Concurrent.STM import Data.Lossless.Decimal as D import Data.Text (Text) import qualified Data.Text as T import Language.Edh.Args import Language.Edh.Batteries.Data import Language.Edh.Batteries.InterOp import Language.Edh.Control import Language.Edh.Evaluate im...