_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
3172cdc51dad0dc1a711f652ffc39c7fd641fb0844685274d1227fef2fdcbd48
grin-compiler/ghc-wpc-sample-programs
HashSetProperties.hs
# LANGUAGE CPP , GeneralizedNewtypeDeriving # -- | Tests for the 'Data.HashSet' module. We test functions by -- comparing them to a simpler model, a list. module Main (main) where import qualified Data.Foldable as Foldable import Data.Hashable (Hashable(hashWithSalt)) import qualified Data.List as L import qualifie...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/unordered-containers-0.2.10.0/tests/HashSetProperties.hs
haskell
| Tests for the 'Data.HashSet' module. We test functions by comparing them to a simpler model, a list. Key type that generates more hash collisions. ---------------------------------------------------------------------- * Properties ---------------------------------------------------------------------- ** Instanc...
# LANGUAGE CPP , GeneralizedNewtypeDeriving # module Main (main) where import qualified Data.Foldable as Foldable import Data.Hashable (Hashable(hashWithSalt)) import qualified Data.List as L import qualified Data.HashSet as S import qualified Data.Set as Set import Data.Ord (comparing) import Test.QuickCheck (Arbit...
eeae95c3d12d8759f6b541cd61cb33792b621d7bbd0ce42322cd2040dca8b03e
simmone/racket-simple-xlsx
work-sheet-tail-test.rkt
#lang racket (require simple-xml) (require rackunit/text-ui rackunit) (require "../../../../../xlsx/xlsx.rkt") (require "../../../../../sheet/sheet.rkt") (require "../../../../../lib/lib.rkt") (require"../../../../../xl/worksheets/worksheet.rkt") (require racket/runtime-path) (define-runtime-path work_sheet_tail_p...
null
https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/tests/xl/worksheets/worksheet/work-sheet-tail/work-sheet-tail-test.rkt
racket
#lang racket (require simple-xml) (require rackunit/text-ui rackunit) (require "../../../../../xlsx/xlsx.rkt") (require "../../../../../sheet/sheet.rkt") (require "../../../../../lib/lib.rkt") (require"../../../../../xl/worksheets/worksheet.rkt") (require racket/runtime-path) (define-runtime-path work_sheet_tail_p...
4f2bed862ac6367f051a4355fb92d6f5d4b2e347ed127262e015d9efd1606655
VisionsGlobalEmpowerment/webchange
state_flipbook_screenshot.cljs
(ns webchange.lesson-builder.state-flipbook-screenshot (:require [re-frame.core :as re-frame] [re-frame.std-interceptors :as i] [webchange.interpreter.renderer.scene.app :as app] [webchange.lesson-builder.layout.stage.state :as stage] [webchange.lesson-builder.state-flipbook :as state] [webcha...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/aea602b595765e627ad7b9eff09962cb5df336ef/src/cljs/webchange/lesson_builder/state_flipbook_screenshot.cljs
clojure
(ns webchange.lesson-builder.state-flipbook-screenshot (:require [re-frame.core :as re-frame] [re-frame.std-interceptors :as i] [webchange.interpreter.renderer.scene.app :as app] [webchange.lesson-builder.layout.stage.state :as stage] [webchange.lesson-builder.state-flipbook :as state] [webcha...
052334acfebaf4cc6896bef5354296558adefaf999a363926847a295f3766875
I3ck/HGE2D
Engine.hs
-- | Module : Copyright : ( c ) 2016 -- License : see LICENSE -- Containing functions for the engine , mostly to interact with GLUT and OpenGL module HGE2D.Engine where import HGE2D.Datas import HGE2D.Classes import HGE2D.Time import HGE2D.Render () import Control.Concurrent (newMVar, read...
null
https://raw.githubusercontent.com/I3ck/HGE2D/7ab789964013d8f24cd0be9fbad967d41d00a4bb/src/HGE2D/Engine.hs
haskell
| License : see LICENSE ------------------------------------------------------------------------------ | Main function to run the engine ------------------------------------------------------------------------------ | Function to render the current state of the engine -----------------------------------------...
Module : Copyright : ( c ) 2016 Containing functions for the engine , mostly to interact with GLUT and OpenGL module HGE2D.Engine where import HGE2D.Datas import HGE2D.Classes import HGE2D.Time import HGE2D.Render () import Control.Concurrent (newMVar, readMVar, takeMVar, putMVar, swapMVar, MVa...
c45f004badec2c03cec525754aa572f885ca2fb95a07de972ca8f77be9adf1d5
tmattio/js-bindings
async_hooks.mli
[@@@ocaml.warning "-7-11-32-33-39"] [@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"] ] open Ts2ocaml_baselib module Internal : sig module AnonymousInterfaces : sig type anonymous_interface_0 = [`anonymous_interface_0] intf [@@js.custom { of_js=Obj.magic; to_js=Obj.magic }] end module Types : sig ...
null
https://raw.githubusercontent.com/tmattio/js-bindings/fe1d40a5b8cae157af85fa84ca482fb6b0ddf1e0/lib/node/_gen/async_hooks.mli
ocaml
export * from 'async_hooks';
[@@@ocaml.warning "-7-11-32-33-39"] [@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"] ] open Ts2ocaml_baselib module Internal : sig module AnonymousInterfaces : sig type anonymous_interface_0 = [`anonymous_interface_0] intf [@@js.custom { of_js=Obj.magic; to_js=Obj.magic }] end module Types : sig ...
a2a8c16c48cb5a68bed195b73b8d955c00cb1cb6d0abbdf16ff57f39aa82cfb3
runtimeverification/haskell-backend
Kore.hs
module Test.Kore ( testId, Gen, standaloneGen, idGen, stringLiteralGen, symbolGen, aliasGen, sortVariableGen, sortGen, korePatternGen, attributesGen, koreSentenceGen, moduleGen, definitionGen, sortActual, sortVariable, sortVariableSort, predicateGe...
null
https://raw.githubusercontent.com/runtimeverification/haskell-backend/7379ceb40c2f37dcc81e8eb025f7cb3e8a6dad55/kore/test/Test/Kore.hs
haskell
* Re-exports | @Context@ stores the variables and sort variables in scope. non-recursive generators recursive generators
module Test.Kore ( testId, Gen, standaloneGen, idGen, stringLiteralGen, symbolGen, aliasGen, sortVariableGen, sortGen, korePatternGen, attributesGen, koreSentenceGen, moduleGen, definitionGen, sortActual, sortVariable, sortVariableSort, predicateGe...
7aa952dc5e10eb125ab0e15235f7e8f8727ff44faad75cb8f987dd1cce2402f2
nponeccop/HNC
Visualise.hs
# LANGUAGE LambdaCase # module FFI.Visualise (showType) where import Data.Functor.Foldable import HN.TypeTools import SPL.Types import Utils showType (TT y) = showTT $ showTypeP <$> y showType t = showTypeP t showTT x = concatMap (++ " ") (init x) ++ "-> " ++ last x showTypeP :: T -> String showTypeP = cata $ \cas...
null
https://raw.githubusercontent.com/nponeccop/HNC/d8447009a04c56ae2cba4c7c179e39384085ea00/FFI/Visualise.hs
haskell
# LANGUAGE LambdaCase # module FFI.Visualise (showType) where import Data.Functor.Foldable import HN.TypeTools import SPL.Types import Utils showType (TT y) = showTT $ showTypeP <$> y showType t = showTypeP t showTT x = concatMap (++ " ") (init x) ++ "-> " ++ last x showTypeP :: T -> String showTypeP = cata $ \cas...
5abb77dda4ff183938cd32c5184b6b536322a90cacadc717abe3c2e230b94f28
brendanhay/gogol
Get.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-pubsub/gen/Gogol/PubSub/Projects/Schemas/Get.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Gets a schema. * Resource ** Constructing a Request | A resource alias for @pubsub.projects.schemas.get@ method which the 'PubSubProjectsSchemasGet' request conforms to. | Gets a schema. /See:/ 'newPubSubProjectsSchemasGet...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
49aca01e4d23b80b3fed794506d10bdbc450425cd3873d797a3e90c4dcc4c1b8
CNMAT/CNMAT-OM
o-operations.lisp
;;;================================== ;;; O-OPERATIONS ;;;================================== (in-package :cnmat) ;;;================================== ;;; O-LIST-TRANS ;;;================================== ;;;REQUIRES ALEA LIBRARY TO WORK (in-package :cnmat) (defun bpf-probabilities (mybpf num-samples) (let*...
null
https://raw.githubusercontent.com/CNMAT/CNMAT-OM/b01a2678092a9ef4f7ad68087fbc57cb057df967/src/tessellate/o-operations.lisp
lisp
================================== O-OPERATIONS ================================== ================================== O-LIST-TRANS ================================== REQUIRES ALEA LIBRARY TO WORK returns a random element with equal proability of being chosen ================================== O-LIST-LENGTHS ========...
(in-package :cnmat) (in-package :cnmat) (defun bpf-probabilities (mybpf num-samples) (let* ((samples (om::bpf-sample mybpf 'nil 'nil num-samples)) (listA-probabilities (om::om- 1.0 (om::om/ samples 100))) (listB-probabilities (om::om- 1.0 listA-probabilities)) ) (mat-trans (li...
f0eea08f94386bbdb94727160eab5d78832cb5d1d085a585016c02f25721928a
grievejia/pyre-ast
pyreAst.mli
* This module provides tagless - final interfaces for the syntax of Python . { { : -final/JFP.pdf } Tagless - final style } , also known as { { : /~wcook/Drafts/2012/ecoop2012.pdf } object algebra } in OOP contexts , is a programming techinque of embedding domain - specific languages in a typed funct...
null
https://raw.githubusercontent.com/grievejia/pyre-ast/e832067a8335c559d564b0dc364342185ea7a8bd/lib/pyreAst.mli
ocaml
Syntax of DSL An evaluator of the DSL, as an example of a downstream processing logic of the DSL's syntax. The program constructs an explicit AST for the DSL, then process it. This definition is still needed, as the result type of [eval]. An evaluator of the DSL. Note the lack of explicit pattern matc...
* This module provides tagless - final interfaces for the syntax of Python . { { : -final/JFP.pdf } Tagless - final style } , also known as { { : /~wcook/Drafts/2012/ecoop2012.pdf } object algebra } in OOP contexts , is a programming techinque of embedding domain - specific languages in a typed funct...
7a327ed8ea99e6033f26a5c4c902375cefd479aced69aa941cc7140484ceb585
KestrelInstitute/Specware
parse-debug-1.lisp
-*- Mode : LISP ; Package : Specware ; Base : 10 ; Syntax : Common - Lisp -*- (in-package :Parser4) (defvar *parser-node-number*) (defvar *all-nodes*) (defun reset-parser-debug-vars () (setq *parser-node-number* 0) (setq *all-nodes* nil) ) (defun find-node (n) (find-if #'(lambda (x) (= (parser-node-number...
null
https://raw.githubusercontent.com/KestrelInstitute/Specware/2be6411c55f26432bf5c9e2f7778128898220c24/Library/Algorithms/Parsing/Chart/Handwritten/Lisp/parse-debug-1.lisp
lisp
Package : Specware ; Base : 10 ; Syntax : Common - Lisp -*- (when (parental-parser-rule? rule) -------------------------------------------------------------------------------- ---------------------------------------- (let* ((parent-rule (reduction-parent-rule reduction)) (child-index (reduction-child-index red...
(in-package :Parser4) (defvar *parser-node-number*) (defvar *all-nodes*) (defun reset-parser-debug-vars () (setq *parser-node-number* 0) (setq *all-nodes* nil) ) (defun find-node (n) (find-if #'(lambda (x) (= (parser-node-number x) n)) *all-nodes*)) (defun show-node (node &optional (msg "")) (unless ...
b67490a6f9dc2c3e8d56df4a4386ce9d65abad45fd1a25c39479cd1ba1f06c33
nominolo/lambdachine
Main.hs
# LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE BangPatterns #-} # LANGUAGE PatternGuards , CPP # module Main where #include "Locations.h" import Lambdachine.Utils import Lambdachine . Ghc . Pipeline import Lambdachine . Ghc . CoreToBC import Lambda...
null
https://raw.githubusercontent.com/nominolo/lambdachine/49d97cf7a367a650ab421f7aa19feb90bfe14731/compiler/Main.hs
haskell
# LANGUAGE TypeSynonymInstances # # LANGUAGE BangPatterns # , flags = Opt_D_dump_simpl_iterations : Opt_D_verbose_core2core : Opt_D_dump_rules : Opt_D_dump_rule_firings : Opt_D_dump_inlinings : dopt_unset dflags3 Opt_ReadUserPackageConf The real object file The .o file mus...
# LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE PatternGuards , CPP # module Main where #include "Locations.h" import Lambdachine.Utils import Lambdachine . Ghc . Pipeline import Lambdachine . Ghc . CoreToBC import Lambdachine.Ghc.StgToBytecode import Lambdachine . . Eval import Lambdach...
aaa326b95c63e30a71b689b2f3a1dd39d695ea42122a7629301f98ca203b7e57
haskell-works/avro
Reader.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} # LANGUAGE TemplateHaskell # module Avro.Deconflict.B.Reader where import Data.Avro.Deriving deriveAvroFromByteString [r| [ { "type": "record", "name": "Foo", "namespace": "avro.test", "fields": [ { "...
null
https://raw.githubusercontent.com/haskell-works/avro/9eb4970fd72939a68aa6f947d3d2dc17280352f8/test/Avro/Deconflict/B/Reader.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE QuasiQuotes #
# LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # module Avro.Deconflict.B.Reader where import Data.Avro.Deriving deriveAvroFromByteString [r| [ { "type": "record", "name": "Foo", "namespace": "avro.test", "fields": [ { "name": "fieldA", "type": ["null", { "type": "record", ...
08fd5707c64bcbbaef504611cbf327cfc376424757b3bf24c9e30e1c7612acc7
kunstmusik/music-examples
plotting.clj
(ns music-examples.plotting (:require [pink.util :refer [shared arg mul with-duration create-buffer generator]] [pink.config :refer [*buffer-size* *current-buffer-num* *sr*]] [pink.envelopes :refer :all] [pink.gen :refer [gen9 gen17]] [pink.oscillators :refer :all] ...
null
https://raw.githubusercontent.com/kunstmusik/music-examples/6d0410be272d0b86c1851e943c07515af37e5f7a/src/music_examples/plotting.clj
clojure
) (blit-square-static-1 440 0)) ) env0 (shared env0 (shared (if (number? amp) (arg amp))) freqf (shared (arg freq)) [adjust & tbls] (horn-lookup freq horn-stopped-wave-tables) ] )
(ns music-examples.plotting (:require [pink.util :refer [shared arg mul with-duration create-buffer generator]] [pink.config :refer [*buffer-size* *current-buffer-num* *sr*]] [pink.envelopes :refer :all] [pink.gen :refer [gen9 gen17]] [pink.oscillators :refer :all] ...
b3d5f2878f4be71b4218aa5f34ee704a4f867a98685b94b2f8bd6ecb6feff255
learningclojurescript/code-examples
core.cljs
(ns testing.core (:require )) (enable-console-print!) (println "Edits to this text should show up in your developer console.") ;; define your app data so that it doesn't get over-written on reload (defonce app-state (atom {:text "Hello world!"})) (defn on-js-reload [] ;; optionally touch your app-state to for...
null
https://raw.githubusercontent.com/learningclojurescript/code-examples/fdbd0e35ae5a16d53f1f784a52c25bcd4e5a8097/chapter-8/testing/src/testing/core.cljs
clojure
define your app data so that it doesn't get over-written on reload optionally touch your app-state to force rerendering depending on your application (swap! app-state update-in [:__figwheel_counter] inc)
(ns testing.core (:require )) (enable-console-print!) (println "Edits to this text should show up in your developer console.") (defonce app-state (atom {:text "Hello world!"})) (defn on-js-reload [] )
292ad9987ad158a95f59732e3796bf585c4932917b10f75a5bf6bc1752b84e0a
tobast/OCrypto
rc4_bitv.ml
This file is part of OCrypto . OCrypto is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . OCrypto i...
null
https://raw.githubusercontent.com/tobast/OCrypto/fa3dded3cedf160a8d290cc6edd4d9cc543497c7/rc4_bitv.ml
ocaml
This file is part of OCrypto . OCrypto is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . OCrypto i...
e46a881d93a946071b7b110b67489f9395caad1427c68d9d7caa05a3e26419d4
MaybeJustJames/zephyr
DCE.hs
module Language.PureScript.DCE ( module DCE ) where import Language.PureScript.DCE.CoreFn as DCE ( runDeadCodeElimination, runBindDeadCodeElimination ) import Language.PureScript.DCE.Foreign as DCE ( runForeignModuleDeadCodeElimination ) import Language.PureScript.DCE.Errors as DCE ( Level(..), DCE...
null
https://raw.githubusercontent.com/MaybeJustJames/zephyr/4050157a001eacf06f47cd8cfa9643eb3f58d4da/src/Language/PureScript/DCE.hs
haskell
module Language.PureScript.DCE ( module DCE ) where import Language.PureScript.DCE.CoreFn as DCE ( runDeadCodeElimination, runBindDeadCodeElimination ) import Language.PureScript.DCE.Foreign as DCE ( runForeignModuleDeadCodeElimination ) import Language.PureScript.DCE.Errors as DCE ( Level(..), DCE...
e1b33a39730c63bb592091fe2062501547db3e89fb500c259d27b1d840d9dfd9
shirok/Gauche
vc.scm
;;;; net.file.vc -- net.file access to the version control systems (define-module net.file.vc (use vc) (use util.debug) (extend net.file.base) (export uri->vc-object)) (select-module net.file.vc) (define uri->vc-object (let ((orig-uri->vc-object uri->vc-object)) (lambda (specific) (orig-uri->vc-ob...
null
https://raw.githubusercontent.com/shirok/Gauche/ecaf82f72e2e946f62d99ed8febe0df8960d20c4/lib/net/file/vc.scm
scheme
net.file.vc -- net.file access to the version control systems
(define-module net.file.vc (use vc) (use util.debug) (extend net.file.base) (export uri->vc-object)) (select-module net.file.vc) (define uri->vc-object (let ((orig-uri->vc-object uri->vc-object)) (lambda (specific) (orig-uri->vc-object specific)))) (define-method uri-scheme-of ((obj <vc-object>))...
7ace97143d10a7cfc7bcaf6891c9f47ec0f66d785c27e31281d9ef781cdf5176
gwathlobal/CotD
gods.lisp
(in-package :cotd) (defconstant +malseraphs-piety-very-low+ 40) (defconstant +malseraphs-piety-low+ 80) (defconstant +malseraphs-piety-medium+ 120) (defconstant +malseraphs-piety-high+ 160) (defconstant +malseraphs-piety-very-high+ 200) (defclass god () ((id :initarg :id :accessor id) (name :initform "Unnamed go...
null
https://raw.githubusercontent.com/gwathlobal/CotD/d01ef486cc1d3b21d2ad670ebdb443e957290aa2/src/gods.lisp
lisp
(in-package :cotd) (defconstant +malseraphs-piety-very-low+ 40) (defconstant +malseraphs-piety-low+ 80) (defconstant +malseraphs-piety-medium+ 120) (defconstant +malseraphs-piety-high+ 160) (defconstant +malseraphs-piety-very-high+ 200) (defclass god () ((id :initarg :id :accessor id) (name :initform "Unnamed go...
3690e366c6d3617bbbf1a4b49932db23041de382e2c4aa9a70768f187377ad09
herd/herdtools7
webInput.ml
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/herd-www/webInput.ml
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2013 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...
ad8ddf0983c771c0c00a29d164827e0789cfd371971d185c0394900ee438b495
hiratara/Haskell-Nyumon-Sample
chap02-samples-2-3-1-do.hs
main = do let x = 10 y = 20 print (x + y)
null
https://raw.githubusercontent.com/hiratara/Haskell-Nyumon-Sample/ac52b741e3b96722f6fc104cfa84078e39f7a241/chap02-samples/chap02-samples-2-3-1-do.hs
haskell
main = do let x = 10 y = 20 print (x + y)
5cfac9f6c5f584cd7b498f0651f6856c804ce266995a964be446a59a0ce60c9e
witan-org/witan
pp.ml
(********************************************************************) (* *) The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2017 -- INRIA - CNRS - Paris - Sud University (* ...
null
https://raw.githubusercontent.com/witan-org/witan/d26f9f810fc34bf44daccb91f71ad3258eb62037/src/popop_lib/pp.ml
ocaml
****************************************************************** This software is distributed under the terms of the GNU Lesser on linking described in file LICENSE. ...
The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2017 -- INRIA - CNRS - Paris - Sud University General Public License version 2.1 , with the special exception open Format type 'a pp = formatter -> 'a -> unit type formatter = Format.formatter let option f fmt = f...
c30a53342e975794faac36ecedfac6d44a120bb681dbfbf1f4c00ac332e63de5
dmitryvk/cl-gtk2
glib.lisp
(defpackage :glib (:use :cl :cffi :iter) (:export #:at-init #:gsize #:gssize #:goffset #:*glib-major-version* #:*glib-minor-version* #:*glib-micro-version* #:*glib-binary-age* #:*glib-interface-age* #:g-free ...
null
https://raw.githubusercontent.com/dmitryvk/cl-gtk2/a3108fbc701dbab93b899e04b9637ded2f813410/glib/glib.lisp
lisp
Glib Fundamentals Fundamentals - Basic types TODO: not sure about these: for amd64 they are ok Fundamentals - Version information Omitted: Core Application Support - The Main Event Loop ; TODO : might work on amd64 linux , but on others Omitted GPid, g_child_add_watch, g_child_add_watch_full Core Appl...
(defpackage :glib (:use :cl :cffi :iter) (:export #:at-init #:gsize #:gssize #:goffset #:*glib-major-version* #:*glib-minor-version* #:*glib-micro-version* #:*glib-binary-age* #:*glib-interface-age* #:g-free ...
5b28d199c8bc1b2ca1895fd4226f2beaffdd1a5756990d4255e9b6d58f538f57
heraldry/heraldicon
core.cljs
(ns heraldicon.reader.blazonry.process.core (:require [heraldicon.reader.blazonry.process.charge :as charge] [heraldicon.reader.blazonry.process.charge-group :as charge-group] [heraldicon.reader.blazonry.process.ordinary :as ordinary] [heraldicon.reader.blazonry.process.tincture :as tincture])) (defn pro...
null
https://raw.githubusercontent.com/heraldry/heraldicon/71126cfd7ba342dea0d1bb849be92cbe5290a6fd/src/heraldicon/reader/blazonry/process/core.cljs
clojure
(ns heraldicon.reader.blazonry.process.core (:require [heraldicon.reader.blazonry.process.charge :as charge] [heraldicon.reader.blazonry.process.charge-group :as charge-group] [heraldicon.reader.blazonry.process.ordinary :as ordinary] [heraldicon.reader.blazonry.process.tincture :as tincture])) (defn pro...
b102c82aaecb385b22499a4e048a73f33e6b2fc84938ee35df045e05a2a09de1
mathematical-systems/clml
zhpr.lisp
;;; Compiled by f2cl version: ( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ " " $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 " " $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ " " $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ " " $ I d : f2cl5.l , v 1.197 2008/09/11 15:0...
null
https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/blas/zhpr.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))
( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ " " $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 " " $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ " " $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ " " $ I d : f2cl5.l , v 1.197 2008/09/11 15:03:25 rtoy Exp $ " " $ I d :...
8bf75dfb4a3dfbf39ff81a442c0a8e0d3a9107c5a8445174c5a1d0375a2c092e
gafiatulin/codewars
JoinedWords.hs
String array joining in Haskell -- module JoinedWords where joinS :: [String] -> String -> String joinS l s = drop (length s) (foldl (\str w -> str ++ s ++ w) "" l)
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/7%20kyu/JoinedWords.hs
haskell
String array joining in Haskell module JoinedWords where joinS :: [String] -> String -> String joinS l s = drop (length s) (foldl (\str w -> str ++ s ++ w) "" l)
60590eea4a003da0d54ca4fd84f0c8b2feb735cddda7e3a9e375e4ca5efeb714
LeifAndersen/racket-compiler2
tests.rkt
#lang racket/base (require nanopass/base syntax/parse racket/match racket/set racket/dict racket/hash racket/port racket/list racket/function racket/bool racket/stxparam racket/stxparam-exptime racket/block ...
null
https://raw.githubusercontent.com/LeifAndersen/racket-compiler2/ebd40c81621f6e4012fc72c838cd8e4ad1d8a266/private/tests.rkt
racket
Store of all tests created with define-compiler-test Defines a test-suite for nanopass, binds quasiquote to the language, test called `lang`-tests lang tests ... -> void Run all tests defined with define-compiler-test Compare result of current compiler to regular compiler Used to update the current compiler whil...
#lang racket/base (require nanopass/base syntax/parse racket/match racket/set racket/dict racket/hash racket/port racket/list racket/function racket/bool racket/stxparam racket/stxparam-exptime racket/block ...
6328925e769739ce9b91b5614e7ea501a70ca2b8c71455ac77780ae85cb1ac56
yallop/ocaml-ctypes
ctypes_weak_ref.mli
* Copyright ( c ) 2013 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2013 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) (** A single-cell variant of ...
null
https://raw.githubusercontent.com/yallop/ocaml-ctypes/52ff621f47dbc1ee5a90c30af0ae0474549946b4/src/ctypes-foreign/ctypes_weak_ref.mli
ocaml
* A single-cell variant of the weak arrays in the standard library. * An expired weak reference was accessed. * The type of weak references.. * Obtain a weak reference from a strong reference. * Update a weak reference. * Obtain a strong reference from a weak reference. * Whether a weak reference is still live.
* Copyright ( c ) 2013 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2013 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) exception EmptyWeakReference...
9da7f5868e2b15e80b0f1b436ca96afbd918fa7c62f4d9515de12d43c4ed403c
racket/racket7
api.rkt
#lang racket/base (require "../common/check.rkt" "../security/main.rkt" "../file/host.rkt" (prefix-in raw: "parameter.rkt") (rename-in "complete.rkt" [path->complete-path raw:path->complete-path]) (only-in '#%kernel ;; get `chaperone-pro...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/io/path/api.rkt
racket
get `chaperone-procedure` that doesn't support keyword arguments: Supplying `current-directory` (as opposed to `raw:current-directory`) triggers an appropriate security-guard check if needed: ----------------------------------------
#lang racket/base (require "../common/check.rkt" "../security/main.rkt" "../file/host.rkt" (prefix-in raw: "parameter.rkt") (rename-in "complete.rkt" [path->complete-path raw:path->complete-path]) (only-in '#%kernel chaperone-procedure) ...
fd5d30e364102fc34dce892924b5d2010a5752dcccef56339820a692e6dfe691
camfort/fortran-src
Scalar.hs
module Language.Fortran.Repr.Type.Scalar where import Language.Fortran.Repr.Type.Scalar.Common import Language.Fortran.Repr.Type.Scalar.Int import Language.Fortran.Repr.Type.Scalar.Real import Language.Fortran.Repr.Type.Scalar.Complex import Language.Fortran.Repr.Type.Scalar.String import Language.Fortran.Repr.Compat...
null
https://raw.githubusercontent.com/camfort/fortran-src/43058030e2f6f9e5264b923134da0291e7ae807f/src/Language/Fortran/Repr/Type/Scalar.hs
haskell
| A Fortran scalar type.
module Language.Fortran.Repr.Type.Scalar where import Language.Fortran.Repr.Type.Scalar.Common import Language.Fortran.Repr.Type.Scalar.Int import Language.Fortran.Repr.Type.Scalar.Real import Language.Fortran.Repr.Type.Scalar.Complex import Language.Fortran.Repr.Type.Scalar.String import Language.Fortran.Repr.Compat...
02640bc47e368e2a6e8e238b052d9c164a703235f62db5f8da5d72789bd06763
oakes/clojure-conj-2014
01-title.clj
(defscreen title-screen :on-show (fn [screen entities] (update! screen :renderer (stage) :camera (orthographic)) (let [ui-skin (skin "skin/uiskin.json") small-font (skin! ui-skin :get-font "small-font") small-style (style :label small-font (color :white))] (table [(label (str "Maki...
null
https://raw.githubusercontent.com/oakes/clojure-conj-2014/575e8eeced02d761f8d278b95906083f03ba9565/01-title.clj
clojure
(defscreen title-screen :on-show (fn [screen entities] (update! screen :renderer (stage) :camera (orthographic)) (let [ui-skin (skin "skin/uiskin.json") small-font (skin! ui-skin :get-font "small-font") small-style (style :label small-font (color :white))] (table [(label (str "Maki...
b4971b653ec782251299a419ebe3288e692a6239bf5d5ce219d7c26440e32332
aconchillo/guile-json
json.scm
( json ) --- Guile JSON implementation . Copyright ( C ) 2013 - 2020 Aleix Conchillo Flaque < > ;; ;; This file is part of guile-json. ;; ;; guile-json 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/aconchillo/guile-json/7cdda5ca9e05fd3f7834c865fe4701f32b885f71/json.scm
scheme
This file is part of guile-json. guile-json is free software: you can redistribute it and/or modify either version 3 of the License , or (at your option) any later version. guile-json is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABIL...
( json ) --- Guile JSON implementation . Copyright ( C ) 2013 - 2020 Aleix Conchillo Flaque < > 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 JSON module for (define-module (json) #:use-module (json builder) #:...
82e149e058575471f3509da32aa73d28cb8f3fa88c023a49b978b912276d4b6d
ocaml-jupyter/jupyter-kernel
Log.mli
* iocaml - an OCaml kernel for IPython * * ( c ) 2014 MicroJamJar Ltd * * Author(s ): * Description : log file for debugging * * iocaml - an OCaml kernel for IPython * * (c) 2014 MicroJamJar Ltd * * Author(s): * Description: log file for debugging * *) val src : Logs.Src.t * Log...
null
https://raw.githubusercontent.com/ocaml-jupyter/jupyter-kernel/a67f94522e2c5cb7248aed8b602d160d26e69825/src/Log.mli
ocaml
* Open log file using [Logs]. This will add a reporter to [Logs], and is a bit brittle as it might be replaced. See {!file_reporter} to build the underlying reporter and install it yourself.
* iocaml - an OCaml kernel for IPython * * ( c ) 2014 MicroJamJar Ltd * * Author(s ): * Description : log file for debugging * * iocaml - an OCaml kernel for IPython * * (c) 2014 MicroJamJar Ltd * * Author(s): * Description: log file for debugging * *) val src : Logs.Src.t * Log...
4f387af90bbb08c1a11a80f8f0dbae00fbb3aef98bed3d4e7b6901f35b220fd1
bartavelle/language-puppet
Helpers.hs
{-# OPTIONS_HADDOCK hide, prune, ignore-exports #-} {-# LANGUAGE RankNTypes #-} -- | Internal helpers module. module Puppet.Interpreter.Helpers where import XPrelude import Control.Monad.Operational import Control.Monad.Writer.Class import qualified Data.HashMap.Strict ...
null
https://raw.githubusercontent.com/bartavelle/language-puppet/6af7458e094440816c8b9b7b387050612e87a70f/src/Puppet/Interpreter/Helpers.hs
haskell
# OPTIONS_HADDOCK hide, prune, ignore-exports # # LANGUAGE RankNTypes # | Internal helpers module. ^ Server settings add the `facts` key: #accessing-facts-from-puppet-code Scope | Give key such as "os.family" | Ask the value of a fact given a specified key The fact set comes from the reader used by t...
module Puppet.Interpreter.Helpers where import XPrelude import Control.Monad.Operational import Control.Monad.Writer.Class import qualified Data.HashMap.Strict as Map import qualified Data.Vector as Vector import qualified Data.List as List import ...
8d235efea6b4cb3c4d9e6c3f47fda1c8b938be2758a3de5772b56898f756f2aa
ragkousism/Guix-on-Hurd
import-utils.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2015 < > Copyright © 2016 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; ei...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/tests/import-utils.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2015 < > Copyright © 2016 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (test-import-utils) #:use-module (guix tests) #:use-module (guix impo...
26adad6db62f65332432dba5bdee15ba482ac8341971a366b49f16bbd28b0f5f
jtobin/deanie
MixtureImportance.hs
module Main where import Control.Monad import Deanie import Model.Mixture as Model logDensity :: Bool -> Double -> Double logDensity accept x | accept = logDensityGaussian (negate 2) 0.5 x | otherwise = logDensityGaussian 2 0.5 x posterior :: Program (Double, Bool) posterior = importance Model.observations (...
null
https://raw.githubusercontent.com/jtobin/deanie/37045f82401d18a63be4d333cff9b9053b927d3a/test/MixtureImportance.hs
haskell
module Main where import Control.Monad import Deanie import Model.Mixture as Model logDensity :: Bool -> Double -> Double logDensity accept x | accept = logDensityGaussian (negate 2) 0.5 x | otherwise = logDensityGaussian 2 0.5 x posterior :: Program (Double, Bool) posterior = importance Model.observations (...
9e2e42d5f8ad8e86b3e43d331978d6c3a22505bf3fa9b75526eef28ac66ae9e3
fogus/trammel
factors.clj
factors.clj -- Contracts programming library for Clojure by - < > May 26 , 2010 Copyright ( c ) , 2010 - 2013 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse ; Public License 1.0 (-1.0.php) ; which can be found in the file COPYING the root of this ;...
null
https://raw.githubusercontent.com/fogus/trammel/8d5cd1144af105d8027fab6161191814877331b6/src/trammel/factors.clj
clojure
Public License 1.0 (-1.0.php) which can be found in the file COPYING the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.
factors.clj -- Contracts programming library for Clojure by - < > May 26 , 2010 Copyright ( c ) , 2010 - 2013 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse (ns trammel.factors "Provides some common argument checkers and factorings." (:require...
bb3d5ecdebf92d44a9f58f8381e24aa50e149196987def1730b14c242e291e52
mithrandi/isaacranks
Ranks.hs
module Ranks ( initWeights, ilsrPairwise, ) where import Data.List ((!!), iterate) import Import hiding ((<>), Vector, fromList) import Numeric.LinearAlgebra mean :: Vector R -> R mean v = sumElements v / fromIntegral (size v) expTransform :: Vector R -> Vector R expTransform weights = weights' / scalar (mea...
null
https://raw.githubusercontent.com/mithrandi/isaacranks/7943ea00ef3d3f415cae61e33d9f16f234de895f/Ranks.hs
haskell
module Ranks ( initWeights, ilsrPairwise, ) where import Data.List ((!!), iterate) import Import hiding ((<>), Vector, fromList) import Numeric.LinearAlgebra mean :: Vector R -> R mean v = sumElements v / fromIntegral (size v) expTransform :: Vector R -> Vector R expTransform weights = weights' / scalar (mea...
fba2c451d80d4ad4e5b7eb9351de7a93307c3fa95087037739b424071831e7fc
UBTECH-Walker/WalkerSimulationFor2020WAIC
leg_motion_MetaFuncCtrl.lisp
; Auto-generated. Do not edit! (cl:in-package walker_srvs-srv) ;//! \htmlinclude leg_motion_MetaFuncCtrl-request.msg.html (cl:defclass <leg_motion_MetaFuncCtrl-request> (roslisp-msg-protocol:ros-message) ((func_name :reader func_name :initarg :func_name :type cl:string :initform "") (param_jso...
null
https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_18.04_v1.2_20200616/walker_install/share/common-lisp/ros/walker_srvs/srv/leg_motion_MetaFuncCtrl.lisp
lisp
Auto-generated. Do not edit! //! \htmlinclude leg_motion_MetaFuncCtrl-request.msg.html //! \htmlinclude leg_motion_MetaFuncCtrl-response.msg.html
(cl:in-package walker_srvs-srv) (cl:defclass <leg_motion_MetaFuncCtrl-request> (roslisp-msg-protocol:ros-message) ((func_name :reader func_name :initarg :func_name :type cl:string :initform "") (param_json :reader param_json :initarg :param_json :type cl:string :initform "") ...
1f2cec991784e88efb50c10ec10a6039d0842902a0cb76c09d96338a877aff9c
amperity/ken
util.clj
(ns ^:no-doc ken.util "Utilities for the observability code." (:require [manifold.deferred :as d])) (defn current-thread-name "Return the name of the current thread." [] (.getName (Thread/currentThread))) (defn stopwatch "Create a delay which will yield the number of milliseconds elapsed between i...
null
https://raw.githubusercontent.com/amperity/ken/d254ab93777d2aeb2626c658850cc55732bfe9cd/src/ken/util.clj
clojure
An error was thrown synchronously, so invoke `final` and re-throw. A deferred value was returned. In this case, we need to ensure that when the deferred is realized, the thread that delivers its value to any chained callbacks retains the _original_ bindings from the context where `wrap-finally` was called. Without...
(ns ^:no-doc ken.util "Utilities for the observability code." (:require [manifold.deferred :as d])) (defn current-thread-name "Return the name of the current thread." [] (.getName (Thread/currentThread))) (defn stopwatch "Create a delay which will yield the number of milliseconds elapsed between i...
d43836ffb2eb897eec44a510a336e0557bd9841d7b98707899b6ff7550e833d5
chef/chef-server
chef_test_db_helper.erl
-*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*- %% ex: ts=4 sw=4 et @author < > @author < > %% Copyright 2013 - 2015 Chef , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file ...
null
https://raw.githubusercontent.com/chef/chef-server/6d31841ecd73d984d819244add7ad6ebac284323/src/oc_erchef/apps/chef_test/src/chef_test_db_helper.erl
erlang
ex: ts=4 sw=4 et 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 and limitations under the License. We expect...
-*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*- @author < > @author < > Copyright 2013 - 2015 Chef , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed un...
e2999322cb8f96614d2bdb72e325d0239c798376020a33a019d73df69d4beead
Helium4Haskell/helium
SimpleOverloadedPat2.hs
-- should get an overloading warning main = let eq = (==) in eq 3 4
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/staticwarnings/SimpleOverloadedPat2.hs
haskell
should get an overloading warning
main = let eq = (==) in eq 3 4
1c7890914169219e9ed8b184acb460df875f787ab504dfad7d8ed04b8a1977dd
dmrd/ebbinghaus
system.cljs
(ns ebbinghaus.system (:require [com.stuartsierra.component :as component] [ebbinghaus.components.ui :refer [new-ui-component]])) (declare system) (defn new-system [] (component/system-map :app-root (new-ui-component))) (defn init [] (set! system (new-system))) (defn start [] (set! system (co...
null
https://raw.githubusercontent.com/dmrd/ebbinghaus/573389a5a07a44d7bcfe817a8fd9fd8397862913/src/cljs/ebbinghaus/system.cljs
clojure
(ns ebbinghaus.system (:require [com.stuartsierra.component :as component] [ebbinghaus.components.ui :refer [new-ui-component]])) (declare system) (defn new-system [] (component/system-map :app-root (new-ui-component))) (defn init [] (set! system (new-system))) (defn start [] (set! system (co...
f118ecaab75d979c1c69582d283f158d686fce5df557c1b82ede2795f4f5ba64
wireless-net/erlang-nommu
ex_slider.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2009 - 2013 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/examples/demo/ex_slider.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2009 - 2013 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(ex_slider). -behaviour(wx_object)...
4e97ae185277206c229923c216fba15a5ca93e0416b70416c994a4c65a37f5ca
Helium4Haskell/helium
CommentOrOperator5.hs
main = :--
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/parser/CommentOrOperator5.hs
haskell
504c4e183f3c4019370becdf89bd2fedec448c0c732a50f9bde45f83d22c765e
yallop/ocaml-reex
reex_types.ml
* Copyright ( c ) 2022 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2022 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) module Charset = struct inc...
null
https://raw.githubusercontent.com/yallop/ocaml-reex/8941fb7033762f6b87fa2f33afa87440001eccbe/lib/reex_types.ml
ocaml
TODO: should we distribute over sums? Can we do better? What about checking that s is any empty regex?
* Copyright ( c ) 2022 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2022 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) module Charset = struct inc...
e7c509bb7405b181bac0cf6c66de6e566b08ee949c2d64845d0667a6241a7f7f
PearsonEducation/subpub
pe_stats_event_handler.erl
SubPub - Copyright ( c ) 2013 Pearson . All rights reserved . % Licensed under the Apache License , Version 2.0 ( the " License " ) ; % % you may not use this file except in compliance with the License. -module(pe_stats_event_handler). -behaviour(gen_event). -export([init/1, handle_event/2, handle_cast...
null
https://raw.githubusercontent.com/PearsonEducation/subpub/f2275c5da24d8860d206cff81d1ce87ecd956c72/src/pe_stats_event_handler.erl
erlang
you may not use this file except in compliance with the License. Stats event handlers Event handler for incrementing statsd counters that record the sending of a message that has been received from RabbitMQ. Event handler for incrementing statsd counters that record the sending of a message that has been receiv...
SubPub - Copyright ( c ) 2013 Pearson . All rights reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; -module(pe_stats_event_handler). -behaviour(gen_event). -export([init/1, handle_event/2, handle_cast/2, handle_call/2, handle_info/2, terminate/2, code_change/3]). -include...
a51b3e7b1ad15d101451fa0d675baf42632b6e57156b56ae0b0bb4c2b596b92a
Chris00/ocaml-mindstorm
info.ml
open Lwt open Lwt_io module NXT = Mindstorm_lwt.NXT let new_brick_name = ref None let print_info conn = printf "Connected!\n%!" >>= fun () -> begin match !new_brick_name with | None -> return () | Some name -> NXT.set_brick_name conn name ~check_status:true >>= fun () -> printf "Brick name set to %S...
null
https://raw.githubusercontent.com/Chris00/ocaml-mindstorm/a96ea45059cafd136c98190674b6214f03357cf8/tests-lwt/info.ml
ocaml
open Lwt open Lwt_io module NXT = Mindstorm_lwt.NXT let new_brick_name = ref None let print_info conn = printf "Connected!\n%!" >>= fun () -> begin match !new_brick_name with | None -> return () | Some name -> NXT.set_brick_name conn name ~check_status:true >>= fun () -> printf "Brick name set to %S...
2f452e182c771149e65ffc3a905ce7e9c3573ef42ef8c79779a8742aac96462e
privet-kitty/cl-competitive
anneal.lisp
(defpackage :cp/anneal (:use :cl) (:export #:calc-prob #:calc-fast-prob)) (in-package :cp/anneal) (declaim (inline calc-prob)) (defun calc-prob (prev-score new-score temp &optional (maximize t)) (declare (double-float temp)) (unless maximize (rotatef prev-score new-score)) (if (>= new-score prev-score) ...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/anneal.lisp
lisp
(defpackage :cp/anneal (:use :cl) (:export #:calc-prob #:calc-fast-prob)) (in-package :cp/anneal) (declaim (inline calc-prob)) (defun calc-prob (prev-score new-score temp &optional (maximize t)) (declare (double-float temp)) (unless maximize (rotatef prev-score new-score)) (if (>= new-score prev-score) ...
42043d716e3acf901ceac7e639779ede3caa5c23bbdd6f86812136972dce2ebd
gsakkas/rite
20060320-22:38:06-708bc29e217c4928054fc822a3c96238.seminal.ml
exception Unimplemented exception AlreadyDone let pi = 4.0 *. atan 1.0 (*** part a ***) type move = Home | Forward of float | Turn of float | For of int * move list (*** part b ***) let makePoly sides len = For(sides, [Forward(len); Turn((2.0 *. pi) /. (float_of_int sides))]) (*** part c ...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060320-22%3A38%3A06-708bc29e217c4928054fc822a3c96238.seminal.ml
ocaml
** part a ** ** part b ** ** part c ** ** part d ** ** part e ** ####################################################################################### ################################################################################ ##################################################################################...
exception Unimplemented exception AlreadyDone let pi = 4.0 *. atan 1.0 type move = Home | Forward of float | Turn of float | For of int * move list let makePoly sides len = For(sides, [Forward(len); Turn((2.0 *. pi) /. (float_of_int sides))]) let interpLarge (movelist : move list) : (float...
c043682a9ca7754a3ea08db488e1b72c4cc84dd8044baef40497bf2824a483b9
huangz1990/SICP-answers
79-install-complex-package.scm
;;; 79-install-complex-package.scm (load "p123-put-and-get.scm") (load "p119-tag.scm") (define (install-complex-package) ;; imported procedures from rectangular and polar packages (define (make-from-real-imag x y) ((get 'make-from-real-imag 'rectangular) x y)) (define (make-from-mag-ang r a) ...
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/79-install-complex-package.scm
scheme
79-install-complex-package.scm imported procedures from rectangular and polar packages interface to rest of the system 新增 equ? 的另一种实现,对比 magnitude 和 angle (put 'equ? '(complex complex) (lambda (x y) (and (= (magnitude x) (magnitude x)) (= (angle x) (angle y)))))
(load "p123-put-and-get.scm") (load "p119-tag.scm") (define (install-complex-package) (define (make-from-real-imag x y) ((get 'make-from-real-imag 'rectangular) x y)) (define (make-from-mag-ang r a) ((get 'make-from-mag-ang 'polar) r a)) (define (tag z) (attach-tag 'complex z)) ...
3763496d2536e8b5e9d62816d17a3f6bde18d4f161a49d0e147c2179fb2572a8
pschachte/wybe
Macho.hs
-- File : Macho.hs Author : , extended by -- Purpose : Extended version of parser for Mach-O object format files -- Original : hackage.haskell.org/package/macho-0.22 Copyright : ( c ) . All rights reserved . -- Redistribution and use in source and binary forms, with or without -- modification,...
null
https://raw.githubusercontent.com/pschachte/wybe/06f100f95276840b23b8810bdbc811aba9c5d0bd/src/Macho.hs
haskell
File : Macho.hs Purpose : Extended version of parser for Mach-O object format files Original : hackage.haskell.org/package/macho-0.22 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of cond...
Author : , extended by Copyright : ( c ) . All rights reserved . 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright 3 . The names of the author may not be used to endorse or promote THIS SOFTWARE IS PROVIDED...
b62d181aae47c5cb0074a09f76b34bbff05ebd6b66a8a20f0c70da675b3475a0
rowangithub/DOrder
test1.ml
let rec loop x y z lock = if (Random.bool ()) then if (x <> y) then let lock = 0 in let x = y in if (0 <= z) then loop x (y+1) z 1 else loop x y z lock else assert (lock = 0) else () let main x z = let lock, y = if (z >= 0) then 1, x+1 else 0, x in loop x y z lock let _ = main 2 3...
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/icfp/test1.ml
ocaml
let rec loop x y z lock = if (Random.bool ()) then if (x <> y) then let lock = 0 in let x = y in if (0 <= z) then loop x (y+1) z 1 else loop x y z lock else assert (lock = 0) else () let main x z = let lock, y = if (z >= 0) then 1, x+1 else 0, x in loop x y z lock let _ = main 2 3...
b07c1345d01e94c300b131346101acede54840cf79cc45de31fb86799940e14e
brendanhay/gogol
Insert.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-youtube-analytics/gen/Gogol/YouTubeAnalytics/GroupItems/Insert.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Creates a group item. /See:/ < YouTube Analytics API Reference> for @youtubeAnalytics.groupItems.insert@. * Resource ** Constructing a Request | A resource alias for @youtubeAnalytics.groupItems.insert@ method which the | Cr...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
3793a3f24faf48f34d721e3de5c9cb31b2890240ec57831524e1e870827922ee
AccelerationNet/clsql-helper
utils.lisp
(in-package :clsql-helper) (cl-interpol:enable-interpol-syntax) (defvar *connection-settings* ()) (defvar *clsql-codebase-loaded* T) (defvar *command-log-stream* nil "a stream that we will record sql commands to in the body of ") (defvar *default-log-fn* 'default-log-fn) (defvar *record-this-dirty-slot* t "Sho...
null
https://raw.githubusercontent.com/AccelerationNet/clsql-helper/846b67a26906da5ea2cff790a36a4cb2f496a528/utils.lisp
lisp
(in-package :clsql-helper) (cl-interpol:enable-interpol-syntax) (defvar *connection-settings* ()) (defvar *clsql-codebase-loaded* T) (defvar *command-log-stream* nil "a stream that we will record sql commands to in the body of ") (defvar *default-log-fn* 'default-log-fn) (defvar *record-this-dirty-slot* t "Sho...
0ce586277e0b8d5fe148fb3e163ab44ea242056757418bb9801385f03f5f4b9d
yuriy-chumak/ol
syscalls.scm
(define-library (olvm syscalls) (export read write open close lseek stat sendfile ) (import (scheme core) (srfi 16)) (begin (define read (case-lambda ((port) (syscall 0 port)) ((port count) (syscall 0 port count)))) (define wri...
null
https://raw.githubusercontent.com/yuriy-chumak/ol/0a38b3f9dbb720aa3fbc3e8219429ebe240c86bf/libraries/olvm/syscalls.scm
scheme
(define-library (olvm syscalls) (export read write open close lseek stat sendfile ) (import (scheme core) (srfi 16)) (begin (define read (case-lambda ((port) (syscall 0 port)) ((port count) (syscall 0 port count)))) (define wri...
16422052d41a01df5a961e179fe4089cb1a59c7a4533dadb0715c7c7bd0d27a9
taylorwood/advent-of-code
10.clj
(ns advent-of-code.2016.10 (:require [clojure.string :as cs])) (def raw-input (cs/split-lines (slurp "resources/advent/day-10.txt"))) (defn parse-give [s] (let [[_ g lt li ht hi :as x] (re-matches #"bot (\d+) gives low to (bot|output) (\d+) and high to (bot|output) (\d+)" s)] (if x [(keyword (str "bot-"...
null
https://raw.githubusercontent.com/taylorwood/advent-of-code/c6b08f4b618875a45c8083a04ae2c669626c43bf/src/advent_of_code/2016/10.clj
clojure
(ns advent-of-code.2016.10 (:require [clojure.string :as cs])) (def raw-input (cs/split-lines (slurp "resources/advent/day-10.txt"))) (defn parse-give [s] (let [[_ g lt li ht hi :as x] (re-matches #"bot (\d+) gives low to (bot|output) (\d+) and high to (bot|output) (\d+)" s)] (if x [(keyword (str "bot-"...
9e4f19b54a741f64556e013403dcb0eb558e5c6714f045f73b2a785a94242176
neonsquare/mel-base
rfc2822.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*- Copyright ( c ) 2004 , < > . ;;; All rights reserved. ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; * Redistribution...
null
https://raw.githubusercontent.com/neonsquare/mel-base/7edc8fb94f30d29637bae0831c55825b0021e0f8/rfc2822.lisp
lisp
Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*- All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list...
Copyright ( c ) 2004 , < > . DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , (in-package :mel.mime) (define-condition mime-parse-error (parse-error) ((context :accessor mime-parse-context :initarg :context :initform...
d53f864b6e7875cda2d00edfb2504ff1368e41d351238998d6eb47b5a728adf5
facebook/duckling
Tests.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. module Duckling.Time.HE.Tests ( tests ) where import Data.String import Prelude import Test.Tasty import ...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/tests/Duckling/Time/HE/Tests.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree.
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.Time.HE.Tests ( tests ) where import Data.String import Prelude import Test.Tasty import Duckling.Dimensions.Types import Duckling.Time.HE.Corpus import Duckling.Testing.Asserts tests :: TestTree tests = testGroup "HE Tests" [ makeCorpusTest [Se...
b77a2919f3110319b889acc02beef888b049309c6b699bf9a6db2e57e4f62179
AppsFlyer/aerospike-clj
integration_test.clj
(ns ^{:author "Ido Barkan" :integration true :doc "Integration tests. Requires a local Aerospike instance. To run instances locally inside docker containers: $ sudo docker pull aerospike $ sudo docker run -d --name aerospike -p 3000:3000 ...
null
https://raw.githubusercontent.com/AppsFlyer/aerospike-clj/755a50edd675d195e8b32dedd52d43f59cadff85/test/aerospike_clj/integration_test.clj
clojure
per value it is identical per value it is identical true value returns the same after being sanitized/desanitized false value returns the same after being sanitized/desanitized nil value retuns the same after being sanitized/desanitized getting all bins for the record adding value to bin removing value from bin...
(ns ^{:author "Ido Barkan" :integration true :doc "Integration tests. Requires a local Aerospike instance. To run instances locally inside docker containers: $ sudo docker pull aerospike $ sudo docker run -d --name aerospike -p 3000:3000 ...
70e16cf76111988af81b1b43deb7f6a1b1d1f189cd80f74cfa2f71feecfed0e3
potatosalad/erlang-jose
jose_jwk_kty_okp_x25519.erl
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- %% vim: ts=4 sw=4 ft=erlang noet %%%------------------------------------------------------------------- @author < > 2014 - 2022 , %%% @doc %%% %%% @end Created : 15 Jan 2016 by < > %%%---------------------------...
null
https://raw.githubusercontent.com/potatosalad/erlang-jose/4dd5bc960299582f4459da0b7a60ed8e336399cd/src/jwk/jose_jwk_kty_okp_x25519.erl
erlang
vim: ts=4 sw=4 ft=erlang noet ------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- jose_jwk callbacks jose_jwk_kty callbacks jose_jwk_use_enc callbacks API Types ========================================================...
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- @author < > 2014 - 2022 , Created : 15 Jan 2016 by < > -module(jose_jwk_kty_okp_x25519). -behaviour(jose_jwk). -behaviour(jose_jwk_kty). -behaviour(jose_jwk_use_enc). -include("jose_public_key.hrl"). -export([...
b4ad01cd802e5f1c5b5c57bd46f2e0996f809c1a67ce69ed885b33014a2f2c73
fredyouhanaie/etsmgr
etscounter_app.erl
% -*- indent-tabs-mode:nil; -*- %%%------------------------------------------------------------------- @author < > ( C ) 2019 , %%% @doc etscounter public API %%% %%% @end Created : 3 Jun 2019 by < > %%%------------------------------------------------------------------- -module(etscounter_app). -beha...
null
https://raw.githubusercontent.com/fredyouhanaie/etsmgr/813c8da2e6f439ea1edacecb91e63222651906c5/Examples/etscounter/src/etscounter_app.erl
erlang
-*- indent-tabs-mode:nil; -*- ------------------------------------------------------------------- @doc etscounter public API @end ------------------------------------------------------------------- Application callbacks ==================================================================== API =====================...
@author < > ( C ) 2019 , Created : 3 Jun 2019 by < > -module(etscounter_app). -behaviour(application). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> etscounter_sup:start_link(). stop(_State) -> ok. Internal functions
05241f564f4ea722d691bd11cf9b8f56f6a4b5ff3be3cff10216f20fc7858f38
ocsigen/js_of_ocaml
viewer_common.ml
Graph viewer * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of the License , ...
null
https://raw.githubusercontent.com/ocsigen/js_of_ocaml/58210fabc947c4839b6e71ffbbf353a4ede0dbb7/examples/graph_viewer/viewer_common.ml
ocaml
** ** ** ** ** Format.eprintf "REDRAW %d %d %d %d@." x' y' w h; XXX FIX: does not change pm.valid_rect when it is large enough already and valid Format.eprintf "Translation: %d %d@." dx dy;
Graph viewer * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of the License , ...
adac5794bdb13242a8a642ac7a86c943679b634fbcb3dad2bf4fe35a78b4a6c1
jyh/metaprl
tactic_type.mli
* Define the common types . * A file with this name is required for every theory . * * ---------------------------------------------------------------- * * This file is part of MetaPRL , a modular , higher order * logical framework that provides a logical programming * environment for OCaml and ...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/tactics/proof/tactic_type.mli
ocaml
* -*- * Local Variables: * Caml-master: "refiner" * End: * -*-
* Define the common types . * A file with this name is required for every theory . * * ---------------------------------------------------------------- * * This file is part of MetaPRL , a modular , higher order * logical framework that provides a logical programming * environment for OCaml and ...
8945780ae56c4c6a9b56fbfa5318c5b15a0cf1ba0756f4a4d5374e8681a90d53
mchakravarty/gloss-game
Game.hs
-- | -- Module : Main Copyright : [ 2013 ] -- License : BSD3 -- Maintainer : < > -- Portability : haskell2011 module Graphics.Gloss.Game ( * Reexport some basic Gloss datatypes module Graphics.Gloss.Data.Color, module Graphics.Gloss.Data.Display, module Graphics.Gloss.Data.Picture, ...
null
https://raw.githubusercontent.com/mchakravarty/gloss-game/1fa1208ae97cee7c1b9ac406cedf14d61551a3e6/Graphics/Gloss/Game.hs
haskell
| Module : Main License : BSD3 Portability : haskell2011 * Geometry * Load sprites into pictures * Query pictures * More convenient game play * Game scenes standard libraries packages keep 'Picture' abstract -------- ^origin & extent, where the origin is at the centre On-the-fly image loading ...
Copyright : [ 2013 ] Maintainer : < > module Graphics.Gloss.Game ( * Reexport some basic Gloss datatypes module Graphics.Gloss.Data.Color, module Graphics.Gloss.Data.Display, module Graphics.Gloss.Data.Picture, module Graphics.Gloss.Interface.Pure.Game, Size, Rect, bmp, png, jpg, ...
52e32179753cc72284a21500598922ad0c2ccec19c170cb18ebf2cf21f8dd1b0
Drup/llvmgraph
llvmgraph.ml
open Graph let id x = x module Misc = struct let basicblock_in_function llb llf = Llvm.block_parent llb = llf end open Misc module G = struct (** Raise Invalid_argument if the basic block is not part of the graph. *) let check_block g b = if basicblock_in_function b g then () else raise @@ ...
null
https://raw.githubusercontent.com/Drup/llvmgraph/f5686a3d9f0a469e7eab3a8338860ea3a1cd5395/src/llvmgraph.ml
ocaml
* Raise Invalid_argument if the basic block is not part of the graph. LABELED * We will implement all other primitives though folding on successor or predecessor edges. * Degree of a vertex * Search functions Implemented by iteration on the successors of each node. * Can't implement vertex mapping.
open Graph let id x = x module Misc = struct let basicblock_in_function llb llf = Llvm.block_parent llb = llf end open Misc module G = struct let check_block g b = if basicblock_in_function b g then () else raise @@ Invalid_argument "Llvmgraph: This basic block doesn't belong to thi...
c64f6b4b4e0fe2f76310457d3e4fdda542dd434629059abed291079b60ab1e13
ekmett/gc
Manager.hs
# LANGUAGE ForeignFunctionInterface # {-# LANGUAGE Safe #-} -- | Copyright : ( C ) 2015 - 2021 -- License : BSD-style (see the file LICENSE) Maintainer : < > -- Stability : experimental Portability : GHC -- -- This module supplies a variant of the selfish form of -- </~hertzm/prmm-ismm-20...
null
https://raw.githubusercontent.com/ekmett/gc/8ab7839898a429d69daa085ead6e57b00ecfbc37/src/System/Mem/Manager.hs
haskell
# LANGUAGE Safe # | License : BSD-style (see the file LICENSE) Stability : experimental This module supplies a variant of the selfish form of </~hertzm/prmm-ismm-2011.pdf "Poor Richard's Memory Manager"> Haskell in user-space. Usage: @ main = do _ <- 'selfishManager' ... @ is starting to c...
# LANGUAGE ForeignFunctionInterface # Copyright : ( C ) 2015 - 2021 Maintainer : < > Portability : GHC by Hertz , , , , , and Bard , adapted to run in Due to the fact that returns memory to the operating system and does n't really tell me about it , this follows their ' ' ( without R...
57dfc26c6fd37269e8732f0e290183de32df2fc02853ef0d51ccf76cd139ad49
pallet/pallet
conditional_test.clj
(ns pallet.actions.direct.conditional-test (:require [clojure.test :refer :all] [pallet.actions :refer [exec-script plan-when plan-when-not]] [pallet.algo.fsmop :refer [failed?]] [pallet.api :refer [group-spec lift plan-fn]] [pallet.build-actions :refer [build-actions]] [pallet.common.logging.loguti...
null
https://raw.githubusercontent.com/pallet/pallet/30226008d243c1072dcfa1f27150173d6d71c36d/test/pallet/actions/direct/conditional_test.clj
clojure
(ns pallet.actions.direct.conditional-test (:require [clojure.test :refer :all] [pallet.actions :refer [exec-script plan-when plan-when-not]] [pallet.algo.fsmop :refer [failed?]] [pallet.api :refer [group-spec lift plan-fn]] [pallet.build-actions :refer [build-actions]] [pallet.common.logging.loguti...
05f97dc670bd821ab68fa7d860f74e414e3fb3d95dc63a251635535ce8cb02f5
jaspervdj/number-six
LastFm.hs
-------------------------------------------------------------------------------- -- | Get a user's last listened track on last.fm {-# LANGUAGE OverloadedStrings #-} module NumberSix.Handlers.LastFm ( handler ) where -------------------------------------------------------------------------------- import ...
null
https://raw.githubusercontent.com/jaspervdj/number-six/1aba681786bd85bd20f79406c681ea581b982cd6/src/NumberSix/Handlers/LastFm.hs
haskell
------------------------------------------------------------------------------ | Get a user's last listened track on last.fm # LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -----...
module NumberSix.Handlers.LastFm ( handler ) where import Control.Applicative ((<$>)) import Control.Monad.Trans (liftIO) import Data.Text (Text) import Text.XmlHtml import Text.XmlHtml.Cursor import NumberSix.Bang import Num...
6b1e6ee9dd0343a7bcae44e3d6a70932065aac551d85507cb6218cdc6071c683
russelldb/rebar_templates
mochi_app.erl
@author author < > YYYY author . %% @doc Callbacks for the {{appid}} application. -module({{appid}}_app). -author('author <>'). -behaviour(application). -export([start/2, stop/1]). , _ ) - > ServerRet %% @doc application start callback for {{appid}}. start(_Type, _StartArgs) -> {{appid}}_deps:ensure...
null
https://raw.githubusercontent.com/russelldb/rebar_templates/cf3f1a275c3cdda25f32b6ea728e1bf2fbea4aab/templates/mochi_app.erl
erlang
@doc Callbacks for the {{appid}} application. @doc application start callback for {{appid}}. @doc application stop callback for {{appid}}. Tests
@author author < > YYYY author . -module({{appid}}_app). -author('author <>'). -behaviour(application). -export([start/2, stop/1]). , _ ) - > ServerRet start(_Type, _StartArgs) -> {{appid}}_deps:ensure(), {{appid}}_sup:start_link(). @spec stop(_State ) - > ServerRet stop(_State) -> ok. ...
4c1475897832fa4175f81c294bb943994fe74c6e12b0715445415559c40ad871
binsec/binsec
disasm_cfg.ml
(**************************************************************************) This file is part of BINSEC . (* *) Copyright ( C ) 2016 - 2022 CEA ( Co...
null
https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/disasm/disasm_cfg.ml
ocaml
************************************************************************ alternatives) you can redistribute it an...
This file is part of BINSEC . Copyright ( C ) 2016 - 2022 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ve...
c7cb3bbb6159c0a5a068df8eae02b43d79b4eee9c7e8c1d4265ce19b9ce63bc4
naproche/naproche
Timing.hs
{- generated by Isabelle -} Title : Isabelle / Timing.hs Author : Makarius LICENSE : BSD 3 - clause ( Isabelle ) Support for time measurement . See " $ ISABELLE_HOME / src / Pure / General / timing . ML " and " $ ISABELLE_HOME / src / Pure / General / timing.scala " Author: ...
null
https://raw.githubusercontent.com/naproche/naproche/8845c113fa4c8803727b6c58dfa75a4050501124/Isabelle/src/Isabelle/Timing.hs
haskell
generated by Isabelle
Title : Isabelle / Timing.hs Author : Makarius LICENSE : BSD 3 - clause ( Isabelle ) Support for time measurement . See " $ ISABELLE_HOME / src / Pure / General / timing . ML " and " $ ISABELLE_HOME / src / Pure / General / timing.scala " Author: Makarius LICENSE: ...
2b40d951370659efd14b71d68a7e517b4cb6e0b0422a6ac46873855b9bfe851f
jwymanm/chiara
threading.clj
(ns chiara.threading) ;; ------ Queues ;; ------ (defn queue "Create a queue object to pass into `queued`." [] (atom [])) (defmacro queued "`queued` code blocks will wait for each other to finish before executing. (time (dorun (pmap #(do (Thread/sleep 100) %) (range 10)))) = > Elapsed time : 100.221...
null
https://raw.githubusercontent.com/jwymanm/chiara/6ea0ebf636e6ba01b74c7a2678d62af0790e3758/src/chiara/threading.clj
clojure
------ ------ ------- Spacing ------- `next` might be in the past in which case "next" is really now
(ns chiara.threading) Queues (defn queue "Create a queue object to pass into `queued`." [] (atom [])) (defmacro queued "`queued` code blocks will wait for each other to finish before executing. (time (dorun (pmap #(do (Thread/sleep 100) %) (range 10)))) = > Elapsed time : 100.221453 msecs (def ...
26353f29bde7060353cfd4c63ea0f5be0f8fc5eaccfac5e970c608892e6915cf
runtimeverification/haskell-backend
WarnTrivialClaim.hs
# LANGUAGE NoStrict # # LANGUAGE NoStrictData # | Copyright : ( c ) Runtime Verification , 2020 - 2021 License : BSD-3 - Clause Copyright : (c) Runtime Verification, 2020-2021 License : BSD-3-Clause -} module Kore.Log.WarnTrivialClaim ( WarnTrivialClaim (..), warnProvenClaimZeroDepth, ...
null
https://raw.githubusercontent.com/runtimeverification/haskell-backend/c86e9d2c0a2d7800a3cb49443d962463f88175d1/kore/src/Kore/Log/WarnTrivialClaim.hs
haskell
| Warning when a claim is proved without rewriting. | Warning when a claim is proved during initialization.
# LANGUAGE NoStrict # # LANGUAGE NoStrictData # | Copyright : ( c ) Runtime Verification , 2020 - 2021 License : BSD-3 - Clause Copyright : (c) Runtime Verification, 2020-2021 License : BSD-3-Clause -} module Kore.Log.WarnTrivialClaim ( WarnTrivialClaim (..), warnProvenClaimZeroDepth, ...
7c31087faf815f8acbfccf78e8867cc6a3fa71dc708ed8a68ffca2832eb43069
conreality/conreality
main.ml
(* This is free and unencumbered software released into the public domain. *) (** The `conctl` command-line interface. *) open Cmdliner open Consensus open Consensus.Prelude open Consensus.Messaging open Consensus.Networking open Consensus.Syntax open Lwt.Infix open Lwt_unix (* Configuration *) let version = Consen...
null
https://raw.githubusercontent.com/conreality/conreality/e03328ef1f0056b58e4ffe181a279a1dc776e094/src/conctl/main.ml
ocaml
This is free and unencumbered software released into the public domain. * The `conctl` command-line interface. Configuration Option types Command implementations Consensus.Vision.hello () Help sections common to all commands Options common to all commands Command table ...
open Cmdliner open Consensus open Consensus.Prelude open Consensus.Messaging open Consensus.Networking open Consensus.Syntax open Lwt.Infix open Lwt_unix let version = Consensus.Version.string type verbosity = Normal | Quiet | Verbose type common_options = { debug: bool; verbosity: verbosity } let str = Printf....
6f81c47d6bd736a9b5dd6503cd74f128d462f3289882a5391241e2c11e8307c4
mmark-md/mmark-ext
Comment.hs
-- | Module : Text . MMark . Extension . Comment Copyright : © 2018 – present License : BSD 3 clause -- Maintainer : < > -- Stability : experimental -- Portability : portable -- -- Turn paragraphs into comments by prefixing them with a certain sequence -- of characters. module T...
null
https://raw.githubusercontent.com/mmark-md/mmark-ext/cc7d035224d32a6133789d65cd0e130bcdbf8d2c/Text/MMark/Extension/Comment.hs
haskell
| Stability : experimental Portability : portable Turn paragraphs into comments by prefixing them with a certain sequence of characters. | This extension removes top-level paragraphs starting with the given sequence of non-markup characters. | Sequence of characters that starts a comment
Module : Text . MMark . Extension . Comment Copyright : © 2018 – present License : BSD 3 clause Maintainer : < > module Text.MMark.Extension.Comment ( commentParagraph, ) where import Control.Monad import Data.List.NonEmpty (NonEmpty (..)) import Data.Text (Text) import qualifi...
1ca2b90594e54657e0e5f68fdee1e7453e03634bc7a4b900cc45f1df7bf4ab94
cojna/iota
WarshallFloyd.hs
module Data.Graph.Dense.WarshallFloyd where import Control.Monad.Primitive import qualified Data.Vector.Unboxed as U import qualified Data.Vector.Unboxed.Mutable as UM import My.Prelude (rep) -- | O(V^3) warshallFloyd :: (PrimMonad m, U.Unbox a, Num a, Ord a) => Int -> UM.MVector (PrimState m) a -> m () wars...
null
https://raw.githubusercontent.com/cojna/iota/6d2ad5b71b1b50bca9136d6ed84f80a0b7713d7c/src/Data/Graph/Dense/WarshallFloyd.hs
haskell
| O(V^3)
module Data.Graph.Dense.WarshallFloyd where import Control.Monad.Primitive import qualified Data.Vector.Unboxed as U import qualified Data.Vector.Unboxed.Mutable as UM import My.Prelude (rep) warshallFloyd :: (PrimMonad m, U.Unbox a, Num a, Ord a) => Int -> UM.MVector (PrimState m) a -> m () warshallFloyd n ...
efd67101aa2cc53d1d4c09d0ebda66254ec925a40241ee1aaed15c0711af379d
tommaisey/aeon
s-new.help.scm
; /s_new Create a new synth ; string - synth definition name ; int - synth ID int - add action ( 0,1,2 , 3 or 4 see below ) ; int - add target ID ; [ ; int or string - a control index or name ; float - a control value ; ] * N ; Create a new synth from a synth definition, g...
null
https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/server-command/s-new.help.scm
scheme
/s_new Create a new synth string - synth definition name int - synth ID int - add target ID [ int or string - a control index or name float - a control value ] * N Create a new synth from a synth definition, give it an ID, and add it as determined by the add action a...
int - add action ( 0,1,2 , 3 or 4 see below ) to the tree of nodes . There are four ways to add the node to the tree 1 - add the new node to the the tail of the group specified by 2 - add the new node just before the node specified by the add 3 - add the new node just after the node specified by the add...
29c2340a864dfc68d1ea369a1f65c2652b85e9c9d4bacc6990277860b7504352
FranklinChen/hugs98-plus-Sep2006
ModuleTest.hs
----------------------------------------------------------------------------- -- | Module : Distribution . ModuleTest Copyright : 2003 - 2004 -- Maintainer : < > -- Stability : alpha Portability : GHC -- -- Explanation: Test this module and sub modules. All rights reserved . R...
null
https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/Cabal/tests/ModuleTest.hs
haskell
--------------------------------------------------------------------------- | Stability : alpha Explanation: Test this module and sub modules. Import everything, since we want to test the compilation of them: import qualified Distribution.InstalledPackageInfo(hunitTests) base ------------------------------...
Module : Distribution . ModuleTest Copyright : 2003 - 2004 Maintainer : < > Portability : GHC All rights reserved . Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : * Redist...
89e2097082077c817c8ef5b2f7fa2983d133c236fbb642298753aa4f5ccc2c10
modular-macros/ocaml-macros
socketsbuf.ml
open Printf (* Threads, sockets, and buffered I/O channels *) Serves as a regression test for PR#5578 let serve_connection s = let ic = Unix.in_channel_of_descr s and oc = Unix.out_channel_of_descr s in let l = input_line ic in fprintf oc ">>%s\n" l; close_out oc let server sock = while true do let...
null
https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/lib-threads/socketsbuf.ml
ocaml
Threads, sockets, and buffered I/O channels
open Printf Serves as a regression test for PR#5578 let serve_connection s = let ic = Unix.in_channel_of_descr s and oc = Unix.out_channel_of_descr s in let l = input_line ic in fprintf oc ">>%s\n" l; close_out oc let server sock = while true do let (s, _) = Unix.accept sock in ignore(Thread.cr...
ed93345eb17698da62b791c75f9900d2b71ac79a54563be3c2b1d92c281caf5f
exoscale/clojure-kubernetes-client
v1_affinity.clj
(ns clojure-kubernetes-client.specs.v1-affinity (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] [clojure-kubernetes-client.specs.v1-node-affinity :refer :all] [clojure-kubernetes-client.specs.v1-pod-affinity :refer :all] [clojure-kubernetes-client.spe...
null
https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_affinity.clj
clojure
(ns clojure-kubernetes-client.specs.v1-affinity (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] [clojure-kubernetes-client.specs.v1-node-affinity :refer :all] [clojure-kubernetes-client.specs.v1-pod-affinity :refer :all] [clojure-kubernetes-client.spe...
b3bc96cde4ffa05e22428a8351626bbd79bf02f52624541b7eefee5552c75d50
ragkousism/Guix-on-Hurd
dico.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2015 , 2016 < > Copyright © 2016 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundati...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/dico.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2015 , 2016 < > Copyright © 2016 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gnu packages dico) #:use-module (guix packages) #:use-module ...
9e87cccd62eccdca161f2a2f964a416266c62db33264e40c06a356ddf59f5ccf
rsnikhil/Forvis_RISCV-ISA-Spec
Virtual_Mem.hs
Copyright ( c ) 2018 - 2019 -- See LICENSE for license details module Virtual_Mem where -- ================================================================ This module defines the Sv32 , Sv39 and Sv48 Virtual Memory schemes -- for translating virtual addresses to physical addresses by -- performing "page table...
null
https://raw.githubusercontent.com/rsnikhil/Forvis_RISCV-ISA-Spec/0c5590a12f4b39644d0497fa6285ad5e33003dfc/src/Virtual_Mem.hs
haskell
See LICENSE for license details ================================================================ for translating virtual addresses to physical addresses by performing "page table walks" on the page table. Abbreviations: PT Page Table PTW Page Table Walk PTE Page Table Entry VA Virtual Add...
Copyright ( c ) 2018 - 2019 module Virtual_Mem where This module defines the Sv32 , Sv39 and Sv48 Virtual Memory schemes Page Table Node PA Physical Address Physical Page Number ASID Addres Space I d Note : Most actual implementations have MMUs ( Memory - Managment Stan...
f7d1467a6b4883630f5cb07186fa6bd20d3f8d928a01379a5e7af32465732a1a
soarlab/FPTaylor
maxima.mli
(* ========================================================================== *) : A Tool for Rigorous Estimation of Round - off Errors (* *) Author : , University of Utah (* ...
null
https://raw.githubusercontent.com/soarlab/FPTaylor/efbbc83970fe3c9f4cb33fafbbe1050dd18749cd/maxima.mli
ocaml
========================================================================== ========================================================================== -----------...
: A Tool for Rigorous Estimation of Round - off Errors Author : , University of Utah This file is distributed under the terms of the MIT license Interface to Maxima val maxima : string -> ...
10a4ef80969480fac21501311ce08b796b08c3d6b952578e0b93c8f000542758
runtimeverification/haskell-backend
Simplification.hs
| Copyright : ( c ) Runtime Verification , 2019 - 2021 License : BSD-3 - Clause The simplification attribute identifies axioms that are useful for simplifying configurations , without being part of the main semantics . Kore syntax : @simplification{}()@ Informal example of an axiom that would u...
null
https://raw.githubusercontent.com/runtimeverification/haskell-backend/b06757e252ee01fdd5ab8f07de2910711997d845/kore/src/Kore/Attribute/Simplification.hs
haskell
| Kore identifier representing the @simplification@ attribute symbol. | Kore symbol representing the @simplification@ attribute. | Kore pattern representing the @simplification@ attribute.
| Copyright : ( c ) Runtime Verification , 2019 - 2021 License : BSD-3 - Clause The simplification attribute identifies axioms that are useful for simplifying configurations , without being part of the main semantics . Kore syntax : @simplification{}()@ Informal example of an axiom that would u...
500f3d253524f609bebebfd3c45f267364a374c684e66ad9c8a018c380bc0384
ssomayyajula/refinery
prop_logic.mli
open Base (* Propositional logic uses a caml-like language to produce a proof system * defined over caml-like variables/terms. *) module PropLogic : functor (T : Caml.CAML_LIKE) -> PROOF_SYSTEM with type term_var = T.var and type term = T.t
null
https://raw.githubusercontent.com/ssomayyajula/refinery/2be3e85e25d40e0172cfa82e6352d78a95b342a6/prop_logic.mli
ocaml
Propositional logic uses a caml-like language to produce a proof system * defined over caml-like variables/terms.
open Base module PropLogic : functor (T : Caml.CAML_LIKE) -> PROOF_SYSTEM with type term_var = T.var and type term = T.t
8bcd8b0f51eee609169140a8afc6922f5f56cd6794a3ce7b87390b8c954a7ff2
retro/keechma-next-realworld-app
user_actions.cljs
(ns app.controllers.guest.user-actions (:require [keechma.next.controller :as ctrl] [keechma.next.controllers.pipelines :as pipelines] [keechma.next.toolbox.pipeline :refer [pswap! preset!] :refer-macros [pipeline!]] [app.api :as api] [promesa.core :as p] [a...
null
https://raw.githubusercontent.com/retro/keechma-next-realworld-app/47a14f4f3f6d56be229cd82f7806d7397e559ebe/classes/production/realworld-2/app/controllers/guest/user_actions.cljs
clojure
(ns app.controllers.guest.user-actions (:require [keechma.next.controller :as ctrl] [keechma.next.controllers.pipelines :as pipelines] [keechma.next.toolbox.pipeline :refer [pswap! preset!] :refer-macros [pipeline!]] [app.api :as api] [promesa.core :as p] [a...
a8ef4235edc525b7d573266790f3ce1b8efabe7707068ac342d6c157c540a4cd
kowainik/hintman
Comment.hs
# LANGUAGE DataKinds # {- | This module contains functions to construct and submit comments. -} module Hintman.Comment ( submitReview ) where import Data.Aeson (Value, encode) import GitHub.Auth (Auth (..)) import GitHub.Data.Request (CommandMethod (Post), RW (RW), Request, command) import GitHub.Reque...
null
https://raw.githubusercontent.com/kowainik/hintman/3dd38fa789098fbadfc905be801853942b81b7be/src/Hintman/Comment.hs
haskell
| This module contains functions to construct and submit comments. | This function submits PR review according to the following API endpoint: * /#create-a-pull-request-review
# LANGUAGE DataKinds # module Hintman.Comment ( submitReview ) where import Data.Aeson (Value, encode) import GitHub.Auth (Auth (..)) import GitHub.Data.Request (CommandMethod (Post), RW (RW), Request, command) import GitHub.Request (executeRequest) import Hintman.Core.PrInfo (Owner (..), PrInfo (..),...
76f0d204872fdf3364113ad1c5d1a364974f0fd75bff53ba5b8b24aaf8fbfcc4
kind2-mc/kind2
pretty.mli
This file is part of the Kind 2 model checker . Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa 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 a...
null
https://raw.githubusercontent.com/kind2-mc/kind2/c601470eb68af9bd3b88828b04dbcdbd6bd6bbf5/src/utils/pretty.mli
ocaml
* prints separating line * prints separating double line * add color tags to a formatter * Timeout tag. * Success tag. * Failure tag. * Error tag. * Warning tag. * Note tag. * Interruption tag. * Done tag.
This file is part of the Kind 2 model checker . Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa 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 a...
8bdcb1c32646d3b159d3006ef88c0463da446e78e2e9aa651051ace4125f315d
coingaming/lnd-client
LndEnv.hs
# LANGUAGE DeriveGeneric # # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeApplications # module LndClient.Data.LndEnv ( LndEnv (..), RawConfig (..), LndWalletPassword (..), LndTlsCert (..), LndHexMacaroon (..), LndHost' (..), LndPort' (..), LndCo...
null
https://raw.githubusercontent.com/coingaming/lnd-client/0b1e4079c11be795c1731c0881430ccb3ef296ef/src/LndClient/Data/LndEnv.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE DeriveGeneric # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TypeApplications # module LndClient.Data.LndEnv ( LndEnv (..), RawConfig (..), LndWalletPassword (..), LndTlsCert (..), LndHexMacaroon (..), LndHost' (..), LndPort' (..), LndConfig (..), newLndEnv, readL...
a8a60c2fab9d15063ef41e27f1c6dd19245284f2b1e670262e6bb3ac1e8348a4
casperschipper/ocaml-cisp
wfs_score.ml
type env = Normal of { fade_in : float; fade_out : float } type sound = Simple_sine of float type position = { x : float; y : float } type event = { start : float; duration : float; envelope : env; sound : sound ; position : position } type score = event list let position_to_point_str { x ; y } = "Point("^Float.to_s...
null
https://raw.githubusercontent.com/casperschipper/ocaml-cisp/571ffb8e508c5427d01e407ba5e91ff2a4604f40/src/wfs_score/wfs_score.ml
ocaml
type env = Normal of { fade_in : float; fade_out : float } type sound = Simple_sine of float type position = { x : float; y : float } type event = { start : float; duration : float; envelope : env; sound : sound ; position : position } type score = event list let position_to_point_str { x ; y } = "Point("^Float.to_s...
3d2a4c59defb72975180bb8be41dc4b75da34a2efb574a2236caf822d7f30951
jkk/cantata
jdbc.clj
(ns cantata.jdbc "Interaction with a JDBC data source See cantata.core for the main API entry point" (:require [cantata.data-source :as cds] [cantata.data-model :as cdm] [cantata.util :as cu :refer [throw-info]] [cantata.records :as r] [cantata.parse :as cpa] ...
null
https://raw.githubusercontent.com/jkk/cantata/12e66b9d839674cc45a04a1ebed34a91a2e50e44/src/cantata/jdbc.clj
clojure
H2 hack match clojure.java.jdbc identifier munging TODO: joins TODO: joins HACK clojure.java.jdbc hack to allow query logging
(ns cantata.jdbc "Interaction with a JDBC data source See cantata.core for the main API entry point" (:require [cantata.data-source :as cds] [cantata.data-model :as cdm] [cantata.util :as cu :refer [throw-info]] [cantata.records :as r] [cantata.parse :as cpa] ...
093a7b69e563cbb52931f54e0b7328db6f8f63567dee6fe1461ec7c150e2fef7
racket/racket7
fsemaphore.rkt
#lang racket/base (require "check.rkt" "semaphore.rkt") (provide fsemaphore? make-fsemaphore fsemaphore-post fsemaphore-wait fsemaphore-try-wait? fsemaphore-count) (struct fsemaphore (sema)) (define/who (make-fsemaphore init) (check who exact-nonnegative-intege...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/thread/fsemaphore.rkt
racket
#lang racket/base (require "check.rkt" "semaphore.rkt") (provide fsemaphore? make-fsemaphore fsemaphore-post fsemaphore-wait fsemaphore-try-wait? fsemaphore-count) (struct fsemaphore (sema)) (define/who (make-fsemaphore init) (check who exact-nonnegative-intege...
99cc4f8af476acf4daf03ab017660c0114e3d17d4f03d938fa81fb86a7d32395
lylek/vintage-basic
Builtins.hs
-- | A representation of BASIC's builtin functions. module Language.VintageBasic.Builtins where -- | An enumeration of BASIC's builtin functions. data Builtin = AbsBI | AscBI | AtnBI | ChrBI | CosBI | ExpBI | IntBI | LeftBI | LenBI | LogBI | MidBI | RightBI | RndBI | SgnBI | SinBI | SpcBI | StrBI | Sqr...
null
https://raw.githubusercontent.com/lylek/vintage-basic/6cb46767aeb6d2c0b9da4175c7fa8c0ffc31b1c7/src/Language/VintageBasic/Builtins.hs
haskell
| A representation of BASIC's builtin functions. | An enumeration of BASIC's builtin functions. | An association list mapping BASIC builtins to their string representation. It is used forwards to print BASIC code, and backwards to parse BASIC code.
module Language.VintageBasic.Builtins where data Builtin = AbsBI | AscBI | AtnBI | ChrBI | CosBI | ExpBI | IntBI | LeftBI | LenBI | LogBI | MidBI | RightBI | RndBI | SgnBI | SinBI | SpcBI | StrBI | SqrBI | TabBI | TanBI | ValBI deriving (Show,Eq) builtinToStrAssoc :: [(Builtin, String)] builtinT...
cfbc59f8ffa72ff710e7a58d6563487174800a70495f78ef8747e2ea8d3236a2
siriusdemon/Pearl
a2.rkt
#lang racket (require "a1.rkt") 1 (define list-ref (lambda (ls n) (letrec ([nth-cdr (lambda (n) (if (= n 0) ls (cdr (nth-cdr (- n 1)))))]) (car (nth-cdr n))))) (println (list-ref '(a b c) 2)) (println (list-ref '(a b c) ...
null
https://raw.githubusercontent.com/siriusdemon/Pearl/e5ca9d455b28f62ffa00320ee510f3d89913c2e0/code/a2.rkt
racket
#t #t #t #t #t #t #t #t #f #f #f #f not as parameter #t #f #t #t not as parameter not as parameter not as parameter #t #f #f #f #t #t #t not as parameter #f #t #f #t #f #t #f #t declare x is bound, so it is not free (x) (y) (y e x) declare x is bound, so it is not free () () (x) ...
#lang racket (require "a1.rkt") 1 (define list-ref (lambda (ls n) (letrec ([nth-cdr (lambda (n) (if (= n 0) ls (cdr (nth-cdr (- n 1)))))]) (car (nth-cdr n))))) (println (list-ref '(a b c) 2)) (println (list-ref '(a b c) ...
1e20e352164039e8a512ea02a2b94cea86b799d929df2536f22ad1743a25204f
ucsd-progsys/liquidhaskell
Hex00.hs
module Hex00 where foo :: Int -> Int -> Int foo x y = x + y {-@ foo :: {x:Int | x = 0x7} -> {y:Int | y = 0x8} -> {v:Int | v = 0xF} @-}
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/20cd67af038930cb592d68d272c8eb1cbe3cb6bf/tests/pos/Hex00.hs
haskell
@ foo :: {x:Int | x = 0x7} -> {y:Int | y = 0x8} -> {v:Int | v = 0xF} @
module Hex00 where foo :: Int -> Int -> Int foo x y = x + y
d9028345a70692cf6b27e7d594604f4092daa08203cfac524633a090d0d69252
v-kolesnikov/sicp
2_29_test.clj
(ns sicp.chapter02.2-29-test (:require [clojure.test :refer [deftest]] [sicp.chapter02.2-29 :as sicp-2-29] [sicp.test-helper :refer [assert-equal]])) (deftest test-total-weight (let [mobile (sicp-2-29/make-mobile '(1 2) '(2 3))] (assert-equal 5 (sicp-2-29/total-weight mobile))))
null
https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/test/sicp/chapter02/2_29_test.clj
clojure
(ns sicp.chapter02.2-29-test (:require [clojure.test :refer [deftest]] [sicp.chapter02.2-29 :as sicp-2-29] [sicp.test-helper :refer [assert-equal]])) (deftest test-total-weight (let [mobile (sicp-2-29/make-mobile '(1 2) '(2 3))] (assert-equal 5 (sicp-2-29/total-weight mobile))))
3bbe3dd6e9fcd91c911b12e60ab7911593d9bd45196ac1857771b9c484cd3b6c
metrix-ai/deferred-folds
Unfoldl.hs
module DeferredFolds.Defs.Unfoldl where import qualified Data.ByteString as ByteString import qualified Data.ByteString.Short.Internal as ShortByteString import qualified Data.IntMap.Strict as D import qualified Data.Map.Strict as C import DeferredFolds.Prelude hiding (fold) import qualified DeferredFolds.Prelude as A...
null
https://raw.githubusercontent.com/metrix-ai/deferred-folds/41ad482be5b5abae9d20de1c949363b3025d760b/library/DeferredFolds/Defs/Unfoldl.hs
haskell
# INLINE (<|>) # # INLINE foldMap # # INLINE foldl' # | Unlift a monadic unfold | Lift a fold input mapping function into a mapping of unfolds | Construct from any foldable | Filter the values given a predicate | Ints in the specified inclusive range | Associations of a map | Bytes of a bytestring | Bytes of a ...
module DeferredFolds.Defs.Unfoldl where import qualified Data.ByteString as ByteString import qualified Data.ByteString.Short.Internal as ShortByteString import qualified Data.IntMap.Strict as D import qualified Data.Map.Strict as C import DeferredFolds.Prelude hiding (fold) import qualified DeferredFolds.Prelude as A...
e0ac1ef72a7a3d1f90aa97df526b684a929495500a047e7bf78d2b73b87294a6
kupl/FixML
sub13.ml
type ae = CONST of int | VAR of string | POWER of string * int | TIMES of ae list | SUM of ae list let diff (f, v) = let rec deployEnv env o = match env with | a::b -> ( match a with |(x, c, p) -> if o = 0 && c = 0 then deployEnv b o else if x = "const" && ...
null
https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/differentiate/diff/submissions/sub13.ml
ocaml
type ae = CONST of int | VAR of string | POWER of string * int | TIMES of ae list | SUM of ae list let diff (f, v) = let rec deployEnv env o = match env with | a::b -> ( match a with |(x, c, p) -> if o = 0 && c = 0 then deployEnv b o else if x = "const" && ...
5461f1dc459844cd40c38ca03f551a9792776050e2842efe536af91e3467763e
part-cw/lambdanative
access-remote.scm
;;(include "../../libs/gambit/common.sch") ;;(include "../../libs/gambit/myenv.sch") ;;(include "../../multi-parser/id/srfi-12.sch") ;;(include "../../multi-parser/id/http.sch") ( include " .. / .. /libs / input - parse.sch " ) ;; Uniform access to local and remote resources Resolution for relative URIs in accordan...
null
https://raw.githubusercontent.com/part-cw/lambdanative/74ec19dddf2f2ff787ee70ad677bc13b9dfafc29/modules/ssax/access-remote.scm
scheme
(include "../../libs/gambit/common.sch") (include "../../libs/gambit/myenv.sch") (include "../../multi-parser/id/srfi-12.sch") (include "../../multi-parser/id/http.sch") Uniform access to local and remote resources This software is in Public Domain. Please send bug reports and comments to: Dmitry Lizorkin =...
( include " .. / .. /libs / input - parse.sch " ) Resolution for relative URIs in accordance with RFC 2396 IT IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND . REQ - URI - a string representing a URI of the resource (define (resource-exists? req-uri) (cond HTTP scheme is used in REQ - URI (with...