_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 |
|---|---|---|---|---|---|---|---|---|
729071a6abffeebb085deb8713ce433da0e469f169ac4219c7fca0be26321799 | frasertweedale/hs-tax-ato | CGT.hs | -- This file is part of hs-tax-ato
Copyright ( C ) 2018 Fraser Tweedale
--
-- hs-tax-ato is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your option) any... | null | https://raw.githubusercontent.com/frasertweedale/hs-tax-ato/8370e1700bad86498569453079c7b88435954f6f/src/Data/Tax/ATO/CGT.hs | haskell | This file is part of hs-tax-ato
hs-tax-ato is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS... | Copyright ( C ) 2018 Fraser Tweedale
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU Affero General Public License
|
Types and calculations for /capital gains tax/ ( ... |
68c824833522ddc38fa8770e81d5b558462d89cabaab5490446f4c02d3750f9a | bmourad01/ocamlchess | game.ml | open Core_kernel [@@warning "-D"]
module Child = Position.Child
module Histogram = Position.Histogram
type declared_draw = [
| `Mutual_agreement
| `Threefold_repetition
| `Fifty_move_rule
] [@@deriving compare, equal, sexp]
type automatic_draw = [
| `Stalemate
| `Insufficient_material
| `Fivefold_repetit... | null | https://raw.githubusercontent.com/bmourad01/ocamlchess/dca9e466d2f2f08e1e1517396ad4887fc3acc7b5/chess/src/game.ml | ocaml | We do hard comparison instead of checking the hashes because we also
care about the halfmove and fullmove clocks. | open Core_kernel [@@warning "-D"]
module Child = Position.Child
module Histogram = Position.Histogram
type declared_draw = [
| `Mutual_agreement
| `Threefold_repetition
| `Fifty_move_rule
] [@@deriving compare, equal, sexp]
type automatic_draw = [
| `Stalemate
| `Insufficient_material
| `Fivefold_repetit... |
470d195d2c87ef6d00618f1f621e0cf51086eb37b0ace003c88e17c0f435b21e | pkamenarsky/concur-replica | Props.hs | {-# LANGUAGE OverloadedStrings #-}
-- | SVG properties/attributes
--
-- See: <-US/docs/Web/SVG/Attribute>
module Concur.Replica.SVG.Props where
-- Note that this module is auto-generated.
-- See @./misc/gen-svg-modules@ for details.
import Concur.Replica.DOM.Props (Props, textProp)
import qualified Data.T... | null | https://raw.githubusercontent.com/pkamenarsky/concur-replica/e15785b3b09e97790ae23c8ae8671c191d039a2c/src/Concur/Replica/SVG/Props.hs | haskell | # LANGUAGE OverloadedStrings #
| SVG properties/attributes
See: <-US/docs/Web/SVG/Attribute>
Note that this module is auto-generated.
See @./misc/gen-svg-modules@ for details. |
module Concur.Replica.SVG.Props where
import Concur.Replica.DOM.Props (Props, textProp)
import qualified Data.Text as T
accentHeight :: T.Text -> Props a
accentHeight = textProp "accent-height"
accumulate :: T.Text -> Props a
accumulate = textProp "accumulate"
additive :: T.Text -> Props... |
16e37c8c405fda420b0d51c51336a69ec4fe61a0fe0ed01d83f7a8f6550ee419 | nuprl/gradual-typing-performance | data.rkt | #lang typed/racket/base
(provide
(struct-out label)
(struct-out suffix-tree)
(struct-out node))
(module* unsafe #f
(require typed/racket/unsafe)
(provide (struct-out label)
(struct-out suffix-tree)
(struct-out node)))
(define-struct label ([datum : (Vectorof (U Char Symbol))] [i : Na... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/boundary-configurations/suffixtree/configuration100000-1/data.rkt | racket | A suffix tree consists of a root node.
up-label: label
parent: (union #f node)
suffix-link: (union #f node) | #lang typed/racket/base
(provide
(struct-out label)
(struct-out suffix-tree)
(struct-out node))
(module* unsafe #f
(require typed/racket/unsafe)
(provide (struct-out label)
(struct-out suffix-tree)
(struct-out node)))
(define-struct label ([datum : (Vectorof (U Char Symbol))] [i : Na... |
b7693be970f56f3428a3a9ddef2d0939660eda20f592ce66c99bdde298ceb243 | racket/compatibility | process.rkt | #lang racket/base
;; deprecated library, see `racket/system`
(require racket/system)
(provide (all-from-out racket/system))
| null | https://raw.githubusercontent.com/racket/compatibility/492030dac6f095045ce8a13dca75204dd5f34e32/compatibility-lib/mzlib/process.rkt | racket | deprecated library, see `racket/system` | #lang racket/base
(require racket/system)
(provide (all-from-out racket/system))
|
a8358d60821473bdf9d2bfac7e7b17902680928aa44176078ba083f1245d99de | nvim-treesitter/nvim-treesitter | injections.scm | [
(comment)
(block_comment_text)
] @comment
| null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/620cc936ad6b26c59bb2d888b3890bb8d06c50c7/queries/tlaplus/injections.scm | scheme | [
(comment)
(block_comment_text)
] @comment
| |
bdd45c77dfeedf1f3b7e19521058f58b3fd81475219605cfd3095b49f9f5de81 | ocsigen/ocaml-eliom | morematch.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/basic-more/morematch.ml | ocaml | ************************************************************************
OCaml
... | , projet , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
File " morematch.ml " , line 38 , characters 10 - 93 :
Warning : this pattern - matching is not exhaustive ... |
62868f022e7dc1aef1972bf6907addfa967195aa117a2349e77670b6278f5576 | erlangonrails/devdb | node_public.erl | %%% ====================================================================
` ` 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 Public License ... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/ejabberd-2.1.4/src/mod_pubsub/node_public.erl | erlang | ====================================================================
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 via the world wide web at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
th... | ` ` 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 "
The Initial Developer of the Original Code is ProcessOne .
Portions created by ProcessOne are C... |
67cfe701f49f65347994a6a42818112d4e44a81e64b71972d4e265ef5896e915 | clingen-data-model/genegraph | annotate_test.clj | (ns genegraph.annotate-test
(:require [genegraph.annotate :as ann :refer :all]
[genegraph.database.query :as q]
[genegraph.database.validation :as validate]
[genegraph.server-test :refer [mount-database-fixture]]
[clojure.test :refer :all]
[clojure.edn :as e... | null | https://raw.githubusercontent.com/clingen-data-model/genegraph/cc27195eca7373e14212aba7fff0bcfb4c44d7be/test/genegraph/annotate_test.clj | clojure | (ns genegraph.annotate-test
(:require [genegraph.annotate :as ann :refer :all]
[genegraph.database.query :as q]
[genegraph.database.validation :as validate]
[genegraph.server-test :refer [mount-database-fixture]]
[clojure.test :refer :all]
[clojure.edn :as e... | |
d132fcf270716efa4d5776cc77da449ce1a929ddb2c96e10ab1607079b7f2b88 | dmitryvk/cl-gtk2 | gtk.tree-view.lisp | (in-package :gtk)
(defcfun (tree-view-columns-autosize "gtk_tree_view_columns_autosize") :void
(tree-view g-object))
(export 'tree-view-columns-autosize)
(defcfun (tree-view-append-column "gtk_tree_view_append_column") :int
(tree-view (g-object gtk:tree-view))
(column (g-object gtk:tree-view-column)))
(export... | null | https://raw.githubusercontent.com/dmitryvk/cl-gtk2/a3108fbc701dbab93b899e04b9637ded2f813410/gtk/gtk.tree-view.lisp | lisp | TODO: gtk_tree_view_set_destroy_count_func
TODO: GtkTreeView drag-and-drop | (in-package :gtk)
(defcfun (tree-view-columns-autosize "gtk_tree_view_columns_autosize") :void
(tree-view g-object))
(export 'tree-view-columns-autosize)
(defcfun (tree-view-append-column "gtk_tree_view_append_column") :int
(tree-view (g-object gtk:tree-view))
(column (g-object gtk:tree-view-column)))
(export... |
17450d3c0841d600e839609b02cbabdf6de6ea7703fa89aa9ebed01b4178af70 | MassD/99 | p83.ml |
Construct all spanning trees . ( medium )
! [ spanning tree]( / img / spanning - tree - graph1.gif )
Write a function s_tree g to construct ( by backtracking ) all spanning trees of a given graph g. With this predicate , find out how many spanning trees there are for the graph depicted to the left . The data o... | null | https://raw.githubusercontent.com/MassD/99/1d3019eb55b0d621ed1df4132315673dd812b1e1/80-89%2B94-graphs/p83.ml | ocaml | graph is not connected |
Construct all spanning trees . ( medium )
! [ spanning tree]( / img / spanning - tree - graph1.gif )
Write a function s_tree g to construct ( by backtracking ) all spanning trees of a given graph g. With this predicate , find out how many spanning trees there are for the graph depicted to the left . The data o... |
2f62dfa99be426e4d50cfb0e47f34f3a8fa4b12f468f90b428b8995512d16278 | alexandergunnarson/quantum | paths.cljc | (ns quantum.test.core.paths
(:require [quantum.core.paths :as ns]))
(defn test:->file [x])
(defn test:->uri [x])
(defn test:->url [x])
(defn test:contains? [x])
(defn test:path
[& parts])
(defn test:url-path
[& parts])
(defn test:path->file-name [x])
(defn test:extension [x])
(defn test:find-directory
[di... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/test/quantum/test/core/paths.cljc | clojure | ___________________________________________________________________________________________________________________________________
========================================================{ }==========================================================
FILE RELATIONS | (ns quantum.test.core.paths
(:require [quantum.core.paths :as ns]))
(defn test:->file [x])
(defn test:->uri [x])
(defn test:->url [x])
(defn test:contains? [x])
(defn test:path
[& parts])
(defn test:url-path
[& parts])
(defn test:path->file-name [x])
(defn test:extension [x])
(defn test:find-directory
[di... |
46931e0de53532ded253aaa383b17c81eceb15952057a5eddf0aca7723190c39 | atolab/apero-core | abuf.mli | type byte = Abytes.byte
type bigstring = Abytes.bigstring
type t
include Ordered.Comparable with type t := t
val create : ?grow:int -> int -> t
* [ create c ] allocates a new Abuf of capacity [ c ] .
val create_bytes : ?grow:int -> int -> t
* [ create_bytes c ] allocates a new Abuf of bytes and of capacity [ c... | null | https://raw.githubusercontent.com/atolab/apero-core/6e8b9bb8383de641396463fb4e5685b7f135755c/lib/abuf.mli | ocaml | * [blit ~src ~src_idx ~dst ~dst_idx ~len] copies [len] bytes from [src] at index [src_idx]
to [dst] at index [dst_idx].
* [blit_from_bigstring ~src ~src_idx ~dst ~dst_idx ~len] copies [len] bytes from [src] at index [src_idx]
to [dst] at index [dst_idx].
* [blit_to_abytes ~src ~src_idx ~dst ~dst_idx ~len] c... | type byte = Abytes.byte
type bigstring = Abytes.bigstring
type t
include Ordered.Comparable with type t := t
val create : ?grow:int -> int -> t
* [ create c ] allocates a new Abuf of capacity [ c ] .
val create_bytes : ?grow:int -> int -> t
* [ create_bytes c ] allocates a new Abuf of bytes and of capacity [ c... |
5b97429ae4d9b370a2ec85dfcbd58522a933fc4395e8ccb6abe843004a6dfc44 | nomeata/free-theorems-static-webui | Simplify.hs | {-# OPTIONS_GHC -fglasgow-exts #-}
module Language.Haskell.FreeTheorems.Theorems.Simplify
( simplify
, simplifyUnfoldedLift
)
where
import Data.Generics
import Data.Generics.Aliases
import Data.Generics.Schemes
import Data.Generics.Text (gshow)
import Language.Haskell.FreeTheorems.Theorems
simplify :: Fo... | null | https://raw.githubusercontent.com/nomeata/free-theorems-static-webui/44149706c2b809734ab3848047e314359bc59ccb/free-theorems/src/Language/Haskell/FreeTheorems/Theorems/Simplify.hs | haskell | # OPTIONS_GHC -fglasgow-exts #
Generics stuff:
Remember variables in scope
This will remember all variables currently in scope
Remove unused quantified variables
Find definitions, and apply as far as possible
Will loop if the definition
would not remove itself
Remove empty Implication
Nothing to optimize
Remo... |
module Language.Haskell.FreeTheorems.Theorems.Simplify
( simplify
, simplifyUnfoldedLift
)
where
import Data.Generics
import Data.Generics.Aliases
import Data.Generics.Schemes
import Data.Generics.Text (gshow)
import Language.Haskell.FreeTheorems.Theorems
simplify :: Formula -> Formula
simplify f = gsimp... |
549a1bc2032607a66b4dfca7d83246e9df1c8920ab806c7e5add86485be3ad8e | sealchain-project/sealchain | API.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeOperators #
{-# LANGUAGE OverloadedStrings #-}
module Pact.Server.API
( ApiV1API
, PactServerAPI
, pactServerAPI
) where
import Data.Aeson
import Data.Proxy
import Servant.API
import qualified Pact.Analyze.Remote.Types as Analyze
import Pact.Ty... | null | https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/pact/src/Pact/Server/API.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeOperators #
module Pact.Server.API
( ApiV1API
, PactServerAPI
, pactServerAPI
) where
import Data.Aeson
import Data.Proxy
import Servant.API
import qualified Pact.Analyze.Remote.Types as Analyze
import Pact.Types.API
import Pact.Types.Command
i... |
f397bc90c62467e61a5569aff1156cf5863b75b5dd69b757104ab02423ab4011 | alex-hhh/ActivityLog2 | box-and-whiskers.rkt | #lang racket/base
;; box-and-whiskers.rkt -- box-and-whiskers plot renderer
;;
;; This file is part of ActivityLog2 -- -hhh/ActivityLog2
Copyright ( c ) 2021 < >
;;
;; 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 Fre... | null | https://raw.githubusercontent.com/alex-hhh/ActivityLog2/36a4bb8af45db19cea02e982e22379acb18d0c49/rkt/widgets/box-and-whiskers.rkt | racket | box-and-whiskers.rkt -- box-and-whiskers plot renderer
This file is part of ActivityLog2 -- -hhh/ActivityLog2
This program is free software: you can redistribute it and/or modify it
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
without even the implied warranty ... | #lang racket/base
Copyright ( c ) 2021 < >
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 )
You should have received a copy of the GNU General Public License along
(require math/statistics
plot/u... |
bd57e9fd4464dd85b3ebc9b2677a695d6c7292b9057f11a5a6d1207d668c6df9 | cognitect-labs/aws-api | signers_test.clj | Copyright ( c ) Cognitect , Inc.
;; All rights reserved.
(ns cognitect.aws.signers-test
"See -v4-test-suite.html"
(:require [clojure.java.io :as io]
[clojure.spec.alpha :as s]
[clojure.spec.test.alpha :as stest]
[clojure.string :as str]
[clojure.test :as t :refer [... | null | https://raw.githubusercontent.com/cognitect-labs/aws-api/dbd5c31d2c7de3e9c38cd1eee5a9c94ff83ca5d3/test/src/cognitect/aws/signers_test.clj | clojure | All rights reserved.
| Copyright ( c ) Cognitect , Inc.
(ns cognitect.aws.signers-test
"See -v4-test-suite.html"
(:require [clojure.java.io :as io]
[clojure.spec.alpha :as s]
[clojure.spec.test.alpha :as stest]
[clojure.string :as str]
[clojure.test :as t :refer [deftest is testing]]
... |
acd8bbf13dcc1557c72861bc2d02439298bf30a28d471618ae773c04edc6c81c | tfausak/monadoc-5 | Sha256.hs | module Monadoc.Type.Sha256 where
import qualified Crypto.Hash as Crypto
import qualified Database.SQLite.Simple.FromField as Sql
import qualified Database.SQLite.Simple.ToField as Sql
import Monadoc.Prelude hiding (fromString)
import qualified Monadoc.Utility.Sql as Sql
import qualified Text.Read as Read
| A 256 - ... | null | https://raw.githubusercontent.com/tfausak/monadoc-5/5361dd1870072cf2771857adbe92658118ddaa27/src/lib/Monadoc/Type/Sha256.hs | haskell | 'toDigest' to convert to and from this type. This algorithm was selected as
ones like SHA3-512. | module Monadoc.Type.Sha256 where
import qualified Crypto.Hash as Crypto
import qualified Database.SQLite.Simple.FromField as Sql
import qualified Database.SQLite.Simple.ToField as Sql
import Monadoc.Prelude hiding (fromString)
import qualified Monadoc.Utility.Sql as Sql
import qualified Text.Read as Read
| A 256 - ... |
f90736dfb612531706c7faf750d5e5f163e3079768075ed7acc0ecf0ab3c004c | xh4/web-toolkit | version.lisp | (in-package :http)
| null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/http/version.lisp | lisp | (in-package :http)
| |
fface1526e41c199237b67090f130df9c4f76d79b99d21b912677289de58a55e | cj1128/sicp-review | 2.42.scm | (load "flatmap.scm")
; inclusive, [start, end]
(define (enumerate-interval start end)
(if (> start end)
'()
(cons start
(enumerate-interval (+ start 1) end))))
(define (queens board-size)
(define (queen-cols k)
(if (= k 0)
(list empty-board)
(filter
(lambda (s... | null | https://raw.githubusercontent.com/cj1128/sicp-review/efaa2f863b7f03c51641c22d701bac97e398a050/chapter-2/2.2/2.42.scm | scheme | inclusive, [start, end] | (load "flatmap.scm")
(define (enumerate-interval start end)
(if (> start end)
'()
(cons start
(enumerate-interval (+ start 1) end))))
(define (queens board-size)
(define (queen-cols k)
(if (= k 0)
(list empty-board)
(filter
(lambda (solution)
(safe... |
be6f077b09cc018fdf2bfcbe6695e41b14d3ee6b10b798d4489267d4546c04ca | aantron/dream | app.ml | let () =
Dream.run ~interface:"0.0.0.0" ~port:80
@@ Dream.logger
@@ Dream.router [
Dream.get "/" (fun _ -> Dream.html "Dream started by systemd!");
]
| null | https://raw.githubusercontent.com/aantron/dream/9bec26f837febae64e37a5eb39f7ef66914db4b1/example/z-systemd/app.ml | ocaml | let () =
Dream.run ~interface:"0.0.0.0" ~port:80
@@ Dream.logger
@@ Dream.router [
Dream.get "/" (fun _ -> Dream.html "Dream started by systemd!");
]
| |
ea88f1791068846e0b3e04ed3ff00297306e1732f8530016b8af844529ec589e | synrc/rt | srv.erl | -module(srv).
-export([start/1, loop/4, setup_loop/1]).
-include_lib("rt/include/pi.hrl").
name(App) -> list_to_atom(lists:concat([otp, App])).
setup(Parent, App) ->
catch unregister(name(App)),
catch register(name(App), self()),
process_flag(trap_exit, true),
put('$ancestors', [Parent]).
start(#pi... | null | https://raw.githubusercontent.com/synrc/rt/8b44274a009c1b4f36036b20576296954b95ee8c/src/srv.erl | erlang | -module(srv).
-export([start/1, loop/4, setup_loop/1]).
-include_lib("rt/include/pi.hrl").
name(App) -> list_to_atom(lists:concat([otp, App])).
setup(Parent, App) ->
catch unregister(name(App)),
catch register(name(App), self()),
process_flag(trap_exit, true),
put('$ancestors', [Parent]).
start(#pi... | |
d86fe382c863f50636492ea5016052d8cadc562386a879f3c1e519ba783182da | v-kolesnikov/sicp | 1_23.clj | (ns sicp.chapter01.1-23
(:require [sicp.common :refer [square]]))
(defn divides? [a b]
(zero? (rem b a)))
(defn find-divisor [n test-divisor]
(let [next-divisor (fn [n]
(if (> n 2) (+ n 2) 3))]
(cond
(> (square test-divisor)
n) n
(divides? test-divisor n) test-div... | null | https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/src/sicp/chapter01/1_23.clj | clojure | (ns sicp.chapter01.1-23
(:require [sicp.common :refer [square]]))
(defn divides? [a b]
(zero? (rem b a)))
(defn find-divisor [n test-divisor]
(let [next-divisor (fn [n]
(if (> n 2) (+ n 2) 3))]
(cond
(> (square test-divisor)
n) n
(divides? test-divisor n) test-div... | |
f0513ef0022bcae848623e087974fd2d088a12dfab5c21d7c73c326f21102405 | Mathnerd314/stroscot | Assert.hs |
import Data.Function
import Data.List.Extra
import Data.Maybe(fromJust)
import Unsafe.Coerce
import Control.Concurrent.Extra
import Control.Exception.Extra
import Data.Tuple.Extra
import Data.IORef
import Control.Monad.Extra
import Control.Monad.IO.Class
import System.Clock
import qualified Data.Map as Map
import qual... | null | https://raw.githubusercontent.com/Mathnerd314/stroscot/47638b8609bf6b7539e187120f7d8be3438893bf/src/build/Test/Assert.hs | haskell | | An 'IO' action that when evaluated calls 'assert' in the 'IO' monad, which throws an 'AssertionFailed' exception if the argument is 'False'.
a complex computation |
import Data.Function
import Data.List.Extra
import Data.Maybe(fromJust)
import Unsafe.Coerce
import Control.Concurrent.Extra
import Control.Exception.Extra
import Data.Tuple.Extra
import Data.IORef
import Control.Monad.Extra
import Control.Monad.IO.Class
import System.Clock
import qualified Data.Map as Map
import qual... |
bc29987926966855b0d297c23304bb63753458749309d4af10a260c8373cd1d5 | ahrefs/atd | test_annot_t.expected.mli | (* Auto-generated from "test_annot.atd" *)
[@@@ocaml.warning "-27-32-33-35-39"]
type pointC = ProtoE_t.pointC = { f: float }
type pointB = ProtoB_t.pointB = { f: float }
type pointA = ProtoA_t.pointA = { f: float }
| null | https://raw.githubusercontent.com/ahrefs/atd/03386f2ffa5aea981ebd1c25346b157db78f986b/atdgen/test/test_annot_t.expected.mli | ocaml | Auto-generated from "test_annot.atd" | [@@@ocaml.warning "-27-32-33-35-39"]
type pointC = ProtoE_t.pointC = { f: float }
type pointB = ProtoB_t.pointB = { f: float }
type pointA = ProtoA_t.pointA = { f: float }
|
3de087b312782c0538e6cbac4a7b776fe145112b1f8508109b101fb9ee591c78 | appleby/Lisp-In-Small-Pieces | reflisp.scm | $ I d : reflisp.scm , v 1.6 2006/11/24 18:37:22
;;;(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
;;; This file is derived from the files that accompany the book:
LISP Implantation Semantique Programmation ( InterEditions , France )
or Lisp In Small Pieces ( Cambridge Univ... | null | https://raw.githubusercontent.com/appleby/Lisp-In-Small-Pieces/af4139232bb7170f32470774a92d647e83254721/si/reflisp.scm | scheme | (((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
This file is derived from the files that accompany the book:
The original sources can be downloaded from the author's website at
-systeme.lip6.fr/Christian.Queinnec/WWW/LiSP.html
This file may have been altered from the original in order to... | $ I d : reflisp.scm , v 1.6 2006/11/24 18:37:22
LISP Implantation Semantique Programmation ( InterEditions , France )
or Lisp In Small Pieces ( Cambridge University Press ) .
By Christian Queinnec < >
Bytecode size roughly 1 K bytes ( actually 1362 bytes )
cons - size : 583 .
(apply
(lamb... |
0cd4e0513101d461137f92eb9018e5524efa4cfd67c86e6f30bc7cdb551a1298 | xapi-project/ocaml-qmp | qmp_protocol.mli |
* Copyright ( C ) 2013 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in fi... | null | https://raw.githubusercontent.com/xapi-project/ocaml-qmp/1036d976dc0ef8ca75507fed195a1c03e4091fe9/lib/qmp_protocol.mli | ocaml | * [negotiate t] performs the initial protocol negotiation, needed
before any commands can be sent on the connection.
* [close t] closes the connection |
* Copyright ( C ) 2013 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in fi... |
9010f451dafc50a2081029dd9495ff5f1709aa3f87bcfbcd812fa83ea77501ab | hannesm/jackline | jackline.ml | open Lwt.Infix
let init_system ui_mvar =
let open Cli_state in
let err r m =
Lwt.async (fun () ->
Connect.disconnect () >>= fun () ->
let handle s =
add_status ~kind:`Error s (`Local ((`Full s.config.Xconfig.jid), "async error")) m ;
if r then
Lwt.return (`Failur... | null | https://raw.githubusercontent.com/hannesm/jackline/846be4e7fcddf45e66e0ff5b29fb5a212d6ee8c3/bin/jackline.ml | ocaml | happens on /disconnect
not sure whether true should be false
loading old users.sexp
setup self contact
delete users.sexp
main loop
cancel history dumper
store histories a last time | open Lwt.Infix
let init_system ui_mvar =
let open Cli_state in
let err r m =
Lwt.async (fun () ->
Connect.disconnect () >>= fun () ->
let handle s =
add_status ~kind:`Error s (`Local ((`Full s.config.Xconfig.jid), "async error")) m ;
if r then
Lwt.return (`Failur... |
22032fc8c59ad3f543b0ee6e6b4f8d313615a012d104738a204a2c700d9691d9 | incoherentsoftware/defect-process | DisappearingPlatform.hs | module Level.Room.DisappearingPlatform
( DisappearingPlatform(..)
, mkDisappearingPlatform
, updateDisappearingPlatform
, drawDisappearingPlatform
, disappearingPlatformSurface
) where
import Control.Monad.IO.Class (MonadIO)
import Collision.Hitbox
import Configs
import Configs.All.Settings
im... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/15f2569e7d0e481c2e28c0ca3a5e72d2c049b667/src/Level/Room/DisappearingPlatform.hs | haskell | module Level.Room.DisappearingPlatform
( DisappearingPlatform(..)
, mkDisappearingPlatform
, updateDisappearingPlatform
, drawDisappearingPlatform
, disappearingPlatformSurface
) where
import Control.Monad.IO.Class (MonadIO)
import Collision.Hitbox
import Configs
import Configs.All.Settings
im... | |
d4e4cd3c5d01ae64a3afef9819baff32212282b8f513267008b55fd7e935c28e | ocsigen/macaque | pa_macaque.ml | macaque : pa_comp.ml
MaCaQue : Macros for Caml Queries
Copyright ( C ) 2009 ,
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation ; either
version 2 of t... | null | https://raw.githubusercontent.com/ocsigen/macaque/a92e91c7ed443086551d909c3cfad22c71144f54/src/pa_macaque.ml | ocaml | * Command-line options
* Comprehension (syntaxic form) structure
* Description (syntaxic form) structure
* Syntaxic form parsing
Identifiers
Table descriptions
* Code emission from the syntaxic form
general definitions
common definitions
Note: Identifiers beginning with _ are named in this way to remove u... | macaque : pa_comp.ml
MaCaQue : Macros for Caml Queries
Copyright ( C ) 2009 ,
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation ; either
version 2 of t... |
45be7d2b55c372dd330d8ae2ceb81180fbfb94b91473cf96261bf7aabfa57c68 | johnmn3/tau.alpha | automata.cljs | (ns tau.alpha.example.automata)
(defn make-initial-conditions [width]
(let [w (* 4 width)
size (dec (* w width))
a (js/Array. size)
b (js/Uint8ClampedArray. (amap a i _ (if (= 0 (mod (inc i) 4)) 255 0)))]
(.set b
#js [255 255 255 255]
(int (* width 2)))
b))
(def ... | null | https://raw.githubusercontent.com/johnmn3/tau.alpha/b1b7e89e95b9b1eb0c7a7ca8c4b8c9a793d2d710/ex/src/tau/alpha/example/automata.cljs | clojure | (println "width:" width) | (ns tau.alpha.example.automata)
(defn make-initial-conditions [width]
(let [w (* 4 width)
size (dec (* w width))
a (js/Array. size)
b (js/Uint8ClampedArray. (amap a i _ (if (= 0 (mod (inc i) 4)) 255 0)))]
(.set b
#js [255 255 255 255]
(int (* width 2)))
b))
(def ... |
5fc82065b9de6b76690b6a4cfa2d5378a725d2490c26db7c4eab34ee835f7b45 | aionescu/dynasty | NameResolution.hs | {-# LANGUAGE StrictData #-}
module Language.Dynasty.NameResolution(resolveNames) where
import Control.Monad(join)
import Control.Monad.Except(throwError, liftEither, withError)
import Control.Monad.Reader(ReaderT(runReaderT), local, ask, asks)
import Control.Monad.State(StateT, gets, modify, execStateT)
import Contro... | null | https://raw.githubusercontent.com/aionescu/dynasty/bd51207703e2503a4bcce9045ac370f96d077d16/src/Language/Dynasty/NameResolution.hs | haskell | # LANGUAGE StrictData # |
module Language.Dynasty.NameResolution(resolveNames) where
import Control.Monad(join)
import Control.Monad.Except(throwError, liftEither, withError)
import Control.Monad.Reader(ReaderT(runReaderT), local, ask, asks)
import Control.Monad.State(StateT, gets, modify, execStateT)
import Control.Monad.Trans.Writer.CPS(Wri... |
a042406846a63cabf81a3fcb5dcd30281c0e1cf3996d9ca7856028308c1f8b73 | hanshuebner/vlm | compile-g5-emulator.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : COMMON - LISP - USER ; Base : 10 ; Lowercase : Yes -*-
(in-package "COMMON-LISP-USER")
Compile the PowerPC ( G5 ) assembly source files using OpenMCL
;;; TODO: Integrate with MAKE?
(setf (logical-pathname-translations "VLM")
(let* ((parent
(make... | null | https://raw.githubusercontent.com/hanshuebner/vlm/20510ddc98b52252a406012a50a4d3bbd1b75dd0/compile-g5-emulator.lisp | lisp | Syntax : Common - Lisp ; Package : COMMON - LISP - USER ; Base : 10 ; Lowercase : Yes -*-
TODO: Integrate with MAKE?
The actual emulator core
emulator macros. (In theory, these files should work with Lisp
implementations other than OpenMCL with only minor tweaks.)
PowerPC Assembler
Ivory data structures and typ... |
(in-package "COMMON-LISP-USER")
Compile the PowerPC ( G5 ) assembly source files using OpenMCL
(setf (logical-pathname-translations "VLM")
(let* ((parent
(make-pathname :name nil :type nil :version nil :defaults *load-truename*))
(target (format nil "~A/**/" parent)))
`(("VLM:VLM;**;" ,target... |
91aded0f4cbe1c3f0dfc60f4d9c0c56f8b8de07abbdaa355723c0557fef0bde1 | Trattue/oktade | ConstantPool.hs | -- |
-- Module: Data.Oktade.Classfile.Metadata.ConstantPool
-- License: Apache-2.0
--
-- Types and functions for parsing and unparsing the classfile constant pool.
module Data.Oktade.Classfile.Metadata.ConstantPool
( -- * Constant Pool
-- $constant-pool
ConstantPool (..),
-- ** Constant Pool Entries
... | null | https://raw.githubusercontent.com/Trattue/oktade/beede27bb442347aaffcbbcea8c94a93e5a8c6a6/src/Data/Oktade/Classfile/Metadata/ConstantPool.hs | haskell | |
Module: Data.Oktade.Classfile.Metadata.ConstantPool
License: Apache-2.0
Types and functions for parsing and unparsing the classfile constant pool.
* Constant Pool
$constant-pool
** Constant Pool Entries
*** References
------------------------------------------------------------------------------
Constant Po... | module Data.Oktade.Classfile.Metadata.ConstantPool
ConstantPool (..),
ConstantPoolEntry (..),
constantPoolSize,
MethodRefKind (..),
ClassRef (..),
NameAndTypeRef (..),
Utf8Ref (..),
PackageRef (..),
ConstantPoolRef (..),
BootstrapMethodAttrRef,
)
where
import Data.Attoparsec... |
3fdedbd3a484ed9693d7aa9e780e2d85facd282e4be91b3d0a72b48d20f0ba70 | thepower/tpnode | vm_wasm.erl | -module(vm_wasm).
-include("include/tplog.hrl").
-export([run/0,run/2,client/2,loop/1,start_link/0]).
run(Host, Port) ->
spawn(?MODULE,client,[Host, Port]).
run() ->
{ok,Port}=application:get_env(tpnode, vmport),
spawn(?MODULE,client,["127.0.0.1", Port]).
start_link() ->
Pid=run(),
link(Pid),
{ok,Pid}.
... | null | https://raw.githubusercontent.com/thepower/tpnode/6212422bc9061d44d150ef2d777d6e694396ed15/apps/tpnode/src/vm_wasm.erl | erlang | -module(vm_wasm).
-include("include/tplog.hrl").
-export([run/0,run/2,client/2,loop/1,start_link/0]).
run(Host, Port) ->
spawn(?MODULE,client,[Host, Port]).
run() ->
{ok,Port}=application:get_env(tpnode, vmport),
spawn(?MODULE,client,["127.0.0.1", Port]).
start_link() ->
Pid=run(),
link(Pid),
{ok,Pid}.
... | |
57a459a4f209e1a95e4a2d3c091da39ba9bafc80e11c017efa67572b71adecc3 | haskellari/qc-instances | ByteString.hs | # LANGUAGE BangPatterns #
# LANGUAGE FlexibleContexts #
# OPTIONS_GHC -fno - warn - orphans #
module Test.QuickCheck.Instances.ByteString () where
import Prelude ()
import Test.QuickCheck.Instances.CustomPrelude
import Data.Word (Word8)
import Test.QuickCheck
import Test.QuickCheck.Gen
import Test.Q... | null | https://raw.githubusercontent.com/haskellari/qc-instances/94ec49f96c9afd7d29880c22bedfbabe01ad30d5/src/Test/QuickCheck/Instances/ByteString.hs | haskell | -----------------------------------------------------------------------------
bytestring
----------------------------------------------------------------------------- | # LANGUAGE BangPatterns #
# LANGUAGE FlexibleContexts #
# OPTIONS_GHC -fno - warn - orphans #
module Test.QuickCheck.Instances.ByteString () where
import Prelude ()
import Test.QuickCheck.Instances.CustomPrelude
import Data.Word (Word8)
import Test.QuickCheck
import Test.QuickCheck.Gen
import Test.Q... |
22fbb237a996e7963aec307dcfb9d22e0e7e4571cfe941d0d8283b288946da0b | brunjlar/neural | doctest.hs | module Main (main) where
import System.FilePath.Glob (glob)
import Test.DocTest (doctest)
main :: IO ()
main = do
glob "src/**/*.hs" >>= doctest
glob "examples/iris/**/*.hs" >>= doctest
glob "examples/sqrt/**/*.hs" >>= doctest
| null | https://raw.githubusercontent.com/brunjlar/neural/1211d1a2bed14b4036f48c500f945fea027cd3b9/doctest/doctest.hs | haskell | module Main (main) where
import System.FilePath.Glob (glob)
import Test.DocTest (doctest)
main :: IO ()
main = do
glob "src/**/*.hs" >>= doctest
glob "examples/iris/**/*.hs" >>= doctest
glob "examples/sqrt/**/*.hs" >>= doctest
| |
763fccfebb08f9e22e372f6685371c521ce1ecc5d1d9b30adfb005eac13b488b | jochu/swank-clojure | internal.clj | (ns swank.commands.contrib.swank-c-p-c.internal
(:use (swank util core commands)
(swank.commands completion)
(swank.util string clojure)))
(defn compound-prefix-match?
"Takes a `prefix' and a `target' string and returns whether `prefix'
is a compound-prefix of `target'.
Viewing each of `prefix... | null | https://raw.githubusercontent.com/jochu/swank-clojure/b08daf866488b449a44ba8df6e5ae17a3515ef57/src/swank/commands/contrib/swank_c_p_c/internal.clj | clojure | (ns swank.commands.contrib.swank-c-p-c.internal
(:use (swank util core commands)
(swank.commands completion)
(swank.util string clojure)))
(defn compound-prefix-match?
"Takes a `prefix' and a `target' string and returns whether `prefix'
is a compound-prefix of `target'.
Viewing each of `prefix... | |
3f3ab66218c0bb015b96c149d7a8cc33d385b2216831f893af47727e424f4cf5 | kawasima/darzana | a000.clj | (control/defroute "" :get
(api/call-api {:id :jsonplaceholder
:path "/posts"
:method :get
:var "posts"})
(log/scopes)
(renderer/render {:template "posts/index.ftlh"}))
| null | https://raw.githubusercontent.com/kawasima/darzana/4b37c8556f74219b707d23cb2d6dce70509a0c1b/dev/resources/scripts/a000.clj | clojure | (control/defroute "" :get
(api/call-api {:id :jsonplaceholder
:path "/posts"
:method :get
:var "posts"})
(log/scopes)
(renderer/render {:template "posts/index.ftlh"}))
| |
73a57756565fc9dc4418893231c3f4a3e0b3895c6ca75118b55e1319f8a752bb | clojure-interop/google-cloud-clients | GrpcTranslationServiceCallableFactory.clj | (ns com.google.cloud.translate.v3beta1.stub.GrpcTranslationServiceCallableFactory
"gRPC callable factory implementation for Cloud Translation API.
This class is for advanced usage."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.translate.v3beta1.stub GrpcTranslationServiceCallable... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.translate/src/com/google/cloud/translate/v3beta1/stub/GrpcTranslationServiceCallableFactory.clj | clojure | (ns com.google.cloud.translate.v3beta1.stub.GrpcTranslationServiceCallableFactory
"gRPC callable factory implementation for Cloud Translation API.
This class is for advanced usage."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.translate.v3beta1.stub GrpcTranslationServiceCallable... | |
5019ffc0e7dc5e7205746db36e58d92ea582c056e544dc1f9f3d14cef9818d90 | racket/gui | canvas-mixin.rkt | #lang racket/base
(require racket/class
racket/draw
"../common/queue.rkt"
"backing-dc.rkt")
(provide
(protect-out canvas-autoscroll-mixin
canvas-mixin
fix-bitmap-size))
;; Implements canvas autoscroll, applied *before* platform-specific canvas
;; methods:
(defi... | null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mred/private/wx/common/canvas-mixin.rkt | racket | Implements canvas autoscroll, applied *before* platform-specific canvas
methods:
disable scroll offsets
To be overridden:
To be overridden:
To be overridden:
Implements canvas refresh, applied *after* platform-specific canvas
methods:
Avoid multiple queued paints, and also allow cancel
of queued paint:
#f or... | #lang racket/base
(require racket/class
racket/draw
"../common/queue.rkt"
"backing-dc.rkt")
(provide
(protect-out canvas-autoscroll-mixin
canvas-mixin
fix-bitmap-size))
(define (canvas-autoscroll-mixin %)
(class %
(super-new)
(inherit get-client-size... |
e2cdecb563ddf4fa755e00142ff2301c6b9b6d86798517e02690b6fcf3ee3318 | samply/blaze | cassandra_test.clj | (ns blaze.page-store.cassandra-test
(:require
[blaze.async.comp :as ac]
[blaze.byte-buffer :as bb]
[blaze.cassandra :as cass]
[blaze.cassandra-spec]
[blaze.page-store :as page-store]
[blaze.page-store.cassandra]
[blaze.page-store.cassandra.codec :as codec]
[blaze.page-store.cassandra.c... | null | https://raw.githubusercontent.com/samply/blaze/6441a0a2f988b8784ed555c1d20f634ef2df7e4a/modules/page-store-cassandra/test/blaze/page_store/cassandra_test.clj | clojure | (ns blaze.page-store.cassandra-test
(:require
[blaze.async.comp :as ac]
[blaze.byte-buffer :as bb]
[blaze.cassandra :as cass]
[blaze.cassandra-spec]
[blaze.page-store :as page-store]
[blaze.page-store.cassandra]
[blaze.page-store.cassandra.codec :as codec]
[blaze.page-store.cassandra.c... | |
377b795e12a108ad0f1e78558ae8d436fbba339d4f1217b525dd3ebf3941cc78 | racket/racket-lang-org | new-name.rkt | #lang plt-web
(require "resources.rkt"
plt-web/style)
(define name i)
(define (url str) (tt (a href: str str)))
(define styles
@style/inline{
.nestedheading {
text-align: center;
font-weight: bold;
font-size: large;
}
.nested {
margin-left: auto;
margin-right: au... | null | https://raw.githubusercontent.com/racket/racket-lang-org/88dada2ee769ada9afaf1e3ec1fb28b8ddf216db/www/new-name.rkt | racket | #lang plt-web
(require "resources.rkt"
plt-web/style)
(define name i)
(define (url str) (tt (a href: str str)))
(define styles
@style/inline{
.nestedheading {
}
.nested {
}
.faqsection {
}
.faqques {
}
.faqans {
}})
(define ((FAQ tag . ques) . answer)
@div[class... | |
b1627628889ac8df8399676621b41608cf5da1e53947d1d460d78db55647f347 | mikpe/pdp10-tools | sim_kernel.erl | -*- erlang - indent - level : 2 -*-
%%%
simulator for pdp10 - elf
Copyright ( C ) 2020
%%%
This file is part of pdp10 - tools .
%%%
pdp10 - tools 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 ,... | null | https://raw.githubusercontent.com/mikpe/pdp10-tools/99216b63317fe5b5ac18f1a0d3c81b464f8b8f40/erlang/apps/sim/src/sim_kernel.erl | erlang |
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
=============================================================================
Simulate traps to the ke... | -*- erlang - indent - level : 2 -*-
simulator for pdp10 - elf
Copyright ( C ) 2020
This file is part of pdp10 - tools .
pdp10 - tools 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 vers... |
598536f657827d415a4cabb5f11d4f936b9ed1cb5dbdc3d4a95c3c8e38f81c87 | McCLIM/McCLIM | grovel.lisp | (in-package #:mcclim-fontconfig)
(pkg-config-cflags "fontconfig")
(include "fontconfig/fontconfig.h")
(ctype fc-bool "FcBool")
(ctype fc-char32 "FcChar32")
(ctype fc-char8 "FcChar8")
(constant (+fc-false+ "FcFalse"))
(constant (+fc-true+ "FcTrue"))
(constant (+fc-dontcare+ "FcDontCare"))
(constant (+fc-charset-map-... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/c079691b0913f8306ceff2620b045b6e24e2f745/Extensions/fontconfig/src/grovel.lisp | lisp | Range disabled as it's not available on debian-9
Range disabled as it's not available on debian-9 | (in-package #:mcclim-fontconfig)
(pkg-config-cflags "fontconfig")
(include "fontconfig/fontconfig.h")
(ctype fc-bool "FcBool")
(ctype fc-char32 "FcChar32")
(ctype fc-char8 "FcChar8")
(constant (+fc-false+ "FcFalse"))
(constant (+fc-true+ "FcTrue"))
(constant (+fc-dontcare+ "FcDontCare"))
(constant (+fc-charset-map-... |
8a752cad51c12e007614db94336334105d41e75cd20e149439d5906e7993b065 | kennytilton/cells | ag-utilities.lisp | ;; -*- mode: Lisp; Syntax: Common-Lisp; Package: triple-cells; -*-
;;;
;;;
Copyright ( c ) 2008 by .
;;;
(in-package :3c)
;; --- ag utils -----------------------
#+test
(progn
(make-tutorial-store)
(let ((s (mk-upi "a"))
(p (new-blank-node)))
(loop repeat 10
do (add-triple s (mk-upi (... | null | https://raw.githubusercontent.com/kennytilton/cells/64d05c83e155d5f35b3bd115dcd07f152ef79c39/triple-cells/ag-utilities.lisp | lisp | -*- mode: Lisp; Syntax: Common-Lisp; Package: triple-cells; -*-
--- ag utils -----------------------
use for robustness | Copyright ( c ) 2008 by .
(in-package :3c)
#+test
(progn
(make-tutorial-store)
(let ((s (mk-upi "a"))
(p (new-blank-node)))
(loop repeat 10
do (add-triple s (mk-upi (random 10)) p))
(index-new-triples)
(loop for tr in (get-triples-list :s s)
do (print (upi->value (pred... |
f8fac9ac4ddc731a144a27c7c0c977b7e19743896785096d6a75a97f349889f1 | nyu-acsys/drift | binomial04.ml |
let rec bot _ = bot ()
let fail _ = assert false
let rec bin_1030 bin_without_checking_1089 x_DO_NOT_CARE_1091 x_DO_NOT_CARE_1092 x_DO_NOT_CARE_1093 n_1031 prev_set_flag_bin_1076 s_prev_bin_n_1074 s_prev_bin_k_1075 k_1032 =
let u = if prev_set_flag_bin_1076 then
if ((0 * 1) + (0 * s_prev_bin_n_1... | null | https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/r_type/termination/binomial04.ml | ocaml |
let rec bot _ = bot ()
let fail _ = assert false
let rec bin_1030 bin_without_checking_1089 x_DO_NOT_CARE_1091 x_DO_NOT_CARE_1092 x_DO_NOT_CARE_1093 n_1031 prev_set_flag_bin_1076 s_prev_bin_n_1074 s_prev_bin_k_1075 k_1032 =
let u = if prev_set_flag_bin_1076 then
if ((0 * 1) + (0 * s_prev_bin_n_1... | |
64db823fd8218d54153443b41d75a1a6719464d4bc01ab4143bcc65b4cea96b7 | RyanGlScott/text-show-instances | Directory.hs | # LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wno - orphans #
|
Module : TextShow . System . Directory
Copyright : ( C ) 2014 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : Provisional
Portability : GHC
' TextShow ' instance for ' Permissions ' .
/S... | null | https://raw.githubusercontent.com/RyanGlScott/text-show-instances/b08f4b46466cdc3c3f3c979b7a0abf5590fa2916/src/TextShow/System/Directory.hs | haskell | | /Since: 3.6/ | # LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wno - orphans #
|
Module : TextShow . System . Directory
Copyright : ( C ) 2014 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : Provisional
Portability : GHC
' TextShow ' instance for ' Permissions ' .
/S... |
c5da69485a2c188aa1e52bd94d1ff1ed2295860db3e1098ee0d9d03e0eb1b2d7 | jtdaugherty/tart | CanvasSizePrompt.hs | module Events.CanvasSizePrompt
( handleCanvasSizePromptEvent
)
where
import qualified Graphics.Vty as V
import Lens.Micro.Platform
import Brick
import Brick.Focus
import Brick.Widgets.Edit
import Types
import State
handleCanvasSizePromptEvent :: AppState -> BrickEvent Name e -> EventM Name (Next AppState)
handl... | null | https://raw.githubusercontent.com/jtdaugherty/tart/03d2bb8c3a01f3249c6a442b42aa319dc3a4f5de/programs/Events/CanvasSizePrompt.hs | haskell | module Events.CanvasSizePrompt
( handleCanvasSizePromptEvent
)
where
import qualified Graphics.Vty as V
import Lens.Micro.Platform
import Brick
import Brick.Focus
import Brick.Widgets.Edit
import Types
import State
handleCanvasSizePromptEvent :: AppState -> BrickEvent Name e -> EventM Name (Next AppState)
handl... | |
f7a0e909a4237a06e7c062d55291e8269fd09df074e8a4b22090a710174aac0c | mikeizbicki/subhask | Metric.hs | -- | This module defines the algebra over various types of balls in metric spaces
module SubHask.Algebra.Metric
where
import SubHask.Category
import SubHask.Algebra
import SubHask.Internal.Prelude
import Control.Monad
import GHC.Classes (Ord)
import qualified Data.List as L
import System.IO
----------------------... | null | https://raw.githubusercontent.com/mikeizbicki/subhask/f53fd8f465747681c88276c7dabe3646fbdf7d50/src/SubHask/Algebra/Metric.hs | haskell | | This module defines the algebra over various types of balls in metric spaces
------------------------------------------------------------------------------
| Useful for identifying tree metrics.
------------------------------------------------------------------------------
| The closed balls in metric space.
Note... | module SubHask.Algebra.Metric
where
import SubHask.Category
import SubHask.Algebra
import SubHask.Internal.Prelude
import Control.Monad
import GHC.Classes (Ord)
import qualified Data.List as L
import System.IO
printTriDistances :: (Show (Scalar m), Metric m) => m -> m -> m -> IO ()
printTriDistances m1 m2 m3 = d... |
02c6e2187760053ad15420b7c4f5ca0ecf76ca49ae4b3ede7e959d15de915d77 | sharplispers/ironclad | md4.lisp | ;;;; -*- mode: lisp; indent-tabs-mode: nil -*-
md4.lisp -- the MD4 digest algorithm as given in RFC1320
(in-package :crypto)
(define-digest-registers (md4 :endian :little)
(a #x67452301)
(b #xefcdab89)
(c #x98badcfe)
(d #x10325476))
(defconst +pristine-md4-registers+ (initial-md4-regs))
(defun update-md... | null | https://raw.githubusercontent.com/sharplispers/ironclad/6cc4da8554558ee2e89ea38802bbf6d83100d4ea/src/digests/md4.lisp | lisp | -*- mode: lisp; indent-tabs-mode: nil -*-
Fill with 0 bit padding
Create new fully 0 padded block
Add 64bit message bit length
Flush last block
Done, remember digest for later calls | md4.lisp -- the MD4 digest algorithm as given in RFC1320
(in-package :crypto)
(define-digest-registers (md4 :endian :little)
(a #x67452301)
(b #xefcdab89)
(c #x98badcfe)
(d #x10325476))
(defconst +pristine-md4-registers+ (initial-md4-regs))
(defun update-md4-block (regs block)
(declare (type md4-regs ... |
eb850d9c481c0b466cd00a5b4696860f75b0c1f6784870cf7e72b177c5ea9851 | logseq/deprecated-github-backend | page.clj | (ns app.db.page
(:refer-clojure :exclude [get])
(:require [toucan.db :as db]
[clojure.java.jdbc :as jdbc]
[honeysql.core :as h]
[toucan.models :as model]
[ring.util.response :as resp]
[app.config :as config]
[app.cookie :as cookie]
... | null | https://raw.githubusercontent.com/logseq/deprecated-github-backend/7aa2f187f0f2d7b1e9c3f6a057bede939b4790b7/src/main/app/db/page.clj | clojure | TODO: safe check
TODO: upsert | (ns app.db.page
(:refer-clojure :exclude [get])
(:require [toucan.db :as db]
[clojure.java.jdbc :as jdbc]
[honeysql.core :as h]
[toucan.models :as model]
[ring.util.response :as resp]
[app.config :as config]
[app.cookie :as cookie]
... |
f7fdc42ce24cd4f5d965300b17f1012272d5a14dcebee4dd249b93de20133be8 | kazu-yamamoto/llrbtree | Leftist.hs | {-|
Leftist Heap
- the fun of programming
-}
module Data.Heap.Leftist (
-- * Data structures
Leftist(..)
, Rank
-- * Creating heaps
, empty
, singleton
, insert
, fromList
-- * Converting to a list
, toList
-- * Deleting
, deleteMin
-- * Checking heaps
, null
-- * Helper functions
... | null | https://raw.githubusercontent.com/kazu-yamamoto/llrbtree/36f259e36c2b320aa37bbbae9577e01fd8a27118/Data/Heap/Leftist.hs | haskell | |
Leftist Heap
- the fun of programming
* Data structures
* Creating heaps
* Converting to a list
* Deleting
* Checking heaps
* Helper functions
--------------------------------------------------------------
--------------------------------------------------------------
-------------------------------------... |
module Data.Heap.Leftist (
Leftist(..)
, Rank
, empty
, singleton
, insert
, fromList
, toList
, deleteMin
, null
, merge
, minimum
, valid
, heapSort
) where
import Control.Applicative hiding (empty)
import Data.List (foldl', unfoldr)
import Data.Maybe
import Prelude hiding (minimum, ma... |
858702f854a211e599f8e4fa565354580f2b36eff64e60bfabc94a1db2262837 | shirok/Gauche | completion.scm | ;;;
;;; gauche.interactive.completion
;;;
Copyright ( c ) 2021 - 2022 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistributions of source code must retain the above copy... | null | https://raw.githubusercontent.com/shirok/Gauche/e97efb5e54f9ab97746369b8ac748f338224c746/lib/gauche/interactive/completion.scm | scheme |
gauche.interactive.completion
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaim... | Copyright ( c ) 2021 - 2022 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
This module is autoloaded from - reader .... |
8e1e83704112c15590defcf580e63327f8232bd816c2a96a1cd5be4ce175d390 | AbstractMachinesLab/caramel | Config_option.mli | (**************************************************************************)
(* *)
(* OCamlFormat *)
(* *)
... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocamlformat-0.17.0/lib/Config_option.mli | ocaml | ************************************************************************
OCamlFormat
... | Copyright ( c ) Facebook , Inc. and its affiliates .
This source code is licensed under the MIT license found in
module type CONFIG = sig
type config
val profile_option_names : string list
val warn : config -> ('a, Format.formatter, unit, unit) format4 -> 'a
end
module M... |
5b9ee8436ddb25f1f5e4145eceda9509a8ab785ce9622eec266113ee3f638401 | plow-technologies/rescript-linter | Iterator.ml | open Rescript_parser
let withPattern iterator f callback =
{ iterator with
Ast_iterator.pat=
(fun iterator1 pattern ->
let res = f pattern in
(match res with Rule.LintError (msg, loc) -> callback (msg, loc) | Rule.LintOk -> ()) ;
iterator.Ast_iterator.pat iterator1 pattern ) }
let ... | null | https://raw.githubusercontent.com/plow-technologies/rescript-linter/134083e70d71dd0a9cb48f281814589719817435/lib/Iterator.ml | ocaml | open Rescript_parser
let withPattern iterator f callback =
{ iterator with
Ast_iterator.pat=
(fun iterator1 pattern ->
let res = f pattern in
(match res with Rule.LintError (msg, loc) -> callback (msg, loc) | Rule.LintOk -> ()) ;
iterator.Ast_iterator.pat iterator1 pattern ) }
let ... | |
8bdff2ebbff4397e178aeb6722d1db16d55191980f8c0e359e71b12f26e5d714 | haskell-game/tiny-games-hs | 1234-hero.hs | #!/usr/bin/env stack
-- stack script --compile --resolver=lts-20 --package gloss --package random
import Import;m(x,y)=translate x y;z x=scale x x;f=fromIntegral;w=show;t=text
main=do{g<-getStdGen;play(InWindow""(512,512)(0,0))white 30(randomRs(1,4)g,0,16,
0)(\(g,s,y,h)->z 16$m(0,-13)(rectangleWire 33 2)<>foldMap(\x->m... | null | https://raw.githubusercontent.com/haskell-game/tiny-games-hs/9dcd6f220d265966bf1f1ca259b5aa956a4cc8a6/hackage/1234-hero/1234-hero.hs | haskell | stack script --compile --resolver=lts-20 --package gloss --package random
^10 ------------------------------------------------------------------ 80> -- | #!/usr/bin/env stack
import Import;m(x,y)=translate x y;z x=scale x x;f=fromIntegral;w=show;t=text
main=do{g<-getStdGen;play(InWindow""(512,512)(0,0))white 30(randomRs(1,4)g,0,16,
0)(\(g,s,y,h)->z 16$m(0,-13)(rectangleWire 33 2)<>foldMap(\x->m(-20+8*f x,-13.5)
(z 0.01$t$w$x))[1..4]<>(m(-12,-9)$z 0.05$t$w s<>(guard(s/=h... |
79f6807083ba9cdfbf4aa6bbba96ab6444e4612323e5a387cc0d4d5dabb6d4d4 | S8A/htdp-exercises | ex020.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex020) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex020.rkt | racket | about the language level of this file in a form that our tools can easily process. | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex020) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none ... |
33316fdfaf289ae8d6e3d6faa15a9066d64d767ef4e14da675be5bc2d56d890d | semerdzhiev/fp-2020-21 | 05-sum-digits-iterative.rkt | #lang racket
(require rackunit)
(require rackunit/text-ui)
Търсим сумата от цифрите на число .
да генерира .
(define (sum-digits number)
(void)
)
(define tests
(test-suite "to-decimal tests"
(check-equal? (sum-digits 11001) 3)
(check-equal? (sum-digits 804357) 27)
(check-equal? (sum-digits 98... | null | https://raw.githubusercontent.com/semerdzhiev/fp-2020-21/64fa00c4f940f75a28cc5980275b124ca21244bc/group-b/exercises/02.recursive-iterative-processes/05-sum-digits-iterative.rkt | racket | #lang racket
(require rackunit)
(require rackunit/text-ui)
Търсим сумата от цифрите на число .
да генерира .
(define (sum-digits number)
(void)
)
(define tests
(test-suite "to-decimal tests"
(check-equal? (sum-digits 11001) 3)
(check-equal? (sum-digits 804357) 27)
(check-equal? (sum-digits 98... | |
a619cdd8da39c456a77a6f9b100cc5fc84a8baab1065e59f2afa2cb9d85f0518 | onedata/op-worker | dataset_test_SUITE.erl | %%%-------------------------------------------------------------------
@author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% Tests of datasets mechanism.
%%% @... | null | https://raw.githubusercontent.com/onedata/op-worker/c7e9d655ccd57b0c2712759ef9e588d79f3e52bd/test_distributed/suites/dataset/dataset_test_SUITE.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
Tests of datasets mechanism.
@end
-------------------------------------------------------------------
exported for CT
tests
============================================... | @author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(dataset_test_SUITE).
-author("Jakub Kudzia").
-include("modules/dataset/dataset.hrl").
-include("modules/fslogic/data_access_control.hrl").
-include("modules/fslogic/file_details.hrl").
-in... |
3e1b5c65e3df2893691af75110222a3b363303d9eb7c9c8cf884c2bd1deeb6e7 | lancelet/star-stream | Types.hs | |
Module : Gaia . Types
Description : Types for the Gaia module .
See
for more information .
Only the fields that we require are represented . The actual Gaia dataset
contains much more information .
Module : Gaia.Types
Description : Types for the Gaia module.
See
for more information.
On... | null | https://raw.githubusercontent.com/lancelet/star-stream/88ae016360500a0c81dd1de4b0af68098b2ac5bc/star-render/src/Gaia/Types.hs | haskell | # LANGUAGE TemplateHaskell #
| Gaia DPAC solution identifier.
| Gaia unique source identifier for DR2.
| Random index used to select subsets.
| Identification of an observed source.
# UNPACK #
# UNPACK #
# UNPACK #
| Right ascension (angle in degrees).
| Declination (angle in degrees).
| Position informati... | |
Module : Gaia . Types
Description : Types for the Gaia module .
See
for more information .
Only the fields that we require are represented . The actual Gaia dataset
contains much more information .
Module : Gaia.Types
Description : Types for the Gaia module.
See
for more information.
On... |
a2527bf76d589159fc93a117e0e78218d6d59fe013e4cfe3c5be17e2b35111a2 | hamler-lang/hamler | Int.erl | -module('Int').
-export([toFloat/1]).
toFloat(X) -> X * 1.0.
| null | https://raw.githubusercontent.com/hamler-lang/hamler/37f37c9b01b94c7d21c27b681de7068c29ee56e9/lib/Data/Int.erl | erlang | -module('Int').
-export([toFloat/1]).
toFloat(X) -> X * 1.0.
| |
e44f891fadf798da6b374dd7d93e8aaee6218e17ba90189689391fc60a5c3b61 | gwright83/Wheeler | Precedence.hs | --
Precedence.hs
--
-- Precedence defintions for Show instances.
--
, 27 August 2011
--
module Math.Symbolic.Wheeler.Precedence where
-- For the showInternal function we only care if the
-- precedence is more or less than list construction:
listPrecedence :: Int
listPrecedence = 1
nonListPrecedence :: Int... | null | https://raw.githubusercontent.com/gwright83/Wheeler/cfc8c66f019de92f087cc8157f2a9be22ae26cf7/src/Math/Symbolic/Wheeler/Precedence.hs | haskell |
Precedence defintions for Show instances.
For the showInternal function we only care if the
precedence is more or less than list construction:
Precedence for the standard Show instances of parts
of an expression: | Precedence.hs
, 27 August 2011
module Math.Symbolic.Wheeler.Precedence where
listPrecedence :: Int
listPrecedence = 1
nonListPrecedence :: Int
nonListPrecedence = 2
applicationPrecedence :: Int
applicationPrecedence = 10
powerPrecedence :: Int
powerPrecedence = 8
productPrecedence :: Int
product... |
c5c8bdd266088c06a94591c88cff312ec8adee1e679849e7f4bb2aaf016c45f2 | ageldama/cl-state-machine | state-transition.lisp | (in-package :cl-state-machine)
(defstruct state-transition
"Represent a state transition context.
Will be passed to state transition hook functions.
The name of triggering event is `event' and `args' is every arguments
has passed to `trigger'.
`from-state-name' and `to-state-name' are the same as `event' slot's
va... | null | https://raw.githubusercontent.com/ageldama/cl-state-machine/eb5d59f7a864c2fc38822fc258162f9cda56adb4/src/state-transition.lisp | lisp | (in-package :cl-state-machine)
(defstruct state-transition
"Represent a state transition context.
Will be passed to state transition hook functions.
The name of triggering event is `event' and `args' is every arguments
has passed to `trigger'.
`from-state-name' and `to-state-name' are the same as `event' slot's
va... | |
d86b8bfb89bb003c6ab8253c9c993d57baecd229c486bcb0ef6beca8e12c8cb0 | mdsebald/link_blox_app | lblx_logic_config1.erl | %%% @doc
BLOCKTYPE
1 Input Configurable Logic Gate
%%% DESCRIPTION
%%% Output is set to the config value corresponding to the binary input value
%%% LINKS
%%% @end
-module(lblx_logic_config1).
-author("Mark Sebald").
-include("../block_state.hrl").
%% =======================================... | null | https://raw.githubusercontent.com/mdsebald/link_blox_app/64034fa5854759ad16625b93e3dde65a9c65f615/src/block_types/lblx_logic_config1.erl | erlang | @doc
DESCRIPTION
Output is set to the config value corresponding to the binary input value
LINKS
@end
====================================================================
API functions
====================================================================
Merge the block type specific, Config, In... | BLOCKTYPE
1 Input Configurable Logic Gate
-module(lblx_logic_config1).
-author("Mark Sebald").
-include("../block_state.hrl").
-export([groups/0, version/0]).
-export([create/2, create/4, create/5, upgrade/1, initialize/1, execute/2, delete/1]).
groups() -> [logic].
version() -> "0.1.0".
-spec defa... |
ceeedff921bdceb9540571bb1e2fd6c84c61ae3cd883c290473e0afbb13ef73d | stumpwm/mahogany | keytrans.lisp | A large portion of this file was taken from Stumpwm 's keytrans.lisp file :
Copyright ( C ) 2006 - 2008
;;
This file is part of stumpwm .
;;
stumpwm 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 ... | null | https://raw.githubusercontent.com/stumpwm/mahogany/3d8a4e761c5b17496a1b9c02a3562b8cedcd351e/lisp/keyboard/keytrans.lisp | lisp |
you can redistribute it and/or modify
either version 2 , or ( at your option )
any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
along with this software; see the file COPY... | A large portion of this file was taken from Stumpwm 's keytrans.lisp file :
Copyright ( C ) 2006 - 2008
This file is part of stumpwm .
it under the terms of the GNU General Public License as published by
stumpwm is distributed in the hope that it will be useful ,
You should have received a copy of the... |
52886c9a3df1c729e60090cc613f71eeb505ff4f9526bc8f9e2d1ba7c93a9a3b | lambdamikel/VISCO | object-buttons5.lisp | -*- Mode : Lisp ; Syntax : Ansi - Common - Lisp ; Package : GUI ; Base : 10 -*-
(in-package gui)
(defclass object-button (icon-button)
((tester :initform #'standard-tester)
(when-action-begins :initform #'creating-begins)
(when-action-ends :initform #'creating-ends)))
(defmethod when-selected ((button o... | null | https://raw.githubusercontent.com/lambdamikel/VISCO/836d325b5c6037517470835c635b3063446d3d8a/src/GUI/object-buttons5.lisp | lisp | Syntax : Ansi - Common - Lisp ; Package : GUI ; Base : 10 -*-
|
(in-package gui)
(defclass object-button (icon-button)
((tester :initform #'standard-tester)
(when-action-begins :initform #'creating-begins)
(when-action-ends :initform #'creating-ends)))
(defmethod when-selected ((button object-button))
#'(lambda (button)
(funcall (slot-value button 'when-select... |
c71ab6b871db509c37df36fb5f6bd918506250685e3058a1b0e269a309e27029 | chenyukang/eopl | top.scm | (module top (lib "eopl.ss" "eopl")
;; top level module. Loads all required pieces.
;; Run the test suite with (run-all).
(require "drscheme-init.scm")
(require "data-structures.scm") ; for expval constructors
(require "lang.scm") ; for scan&parse
(require "interp.scm") ; ... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/base/chapter3/lexaddr-lang/top.scm | scheme | top level module. Loads all required pieces.
Run the test suite with (run-all).
for expval constructors
for scan&parse
for value-of-program
for test-list
for translation-of-program
interface to test harness ;;;;;;;;;;;;;;;;
run-all : () -> Unspecified
runs all the tests in test-list, comparing the r... | (module top (lib "eopl.ss" "eopl")
(require "drscheme-init.scm")
(provide run run-all)
run : String - > ExpVal
Page : 98
(define run
(lambda (string)
(value-of-translation
(translation-of-program
(scan&parse string)))))
(define run-all
(lambda ()
... |
c95dbb5dd7e138f72f5231dc2478eaf39c4cf8331ffdd75af2c06a1f7f0cf5d5 | ptal/AbSolute | test_split_strategies.ml | Copyright 2019
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 3 of the License , or ( at your option ) any later version .
This program is distr... | null | https://raw.githubusercontent.com/ptal/AbSolute/469159d87e3a717499573c1e187e5cfa1b569829/test/test_split_strategies.ml | ocaml | Copyright 2019
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 3 of the License , or ( at your option ) any later version .
This program is distr... | |
9b0509fa8f960632bc4479ef2bed1a350b2a588a3208f7f11d111788b12262c8 | gogins/csound-extended-nudruz | besthex.lisp | (in-package :cm)
BESTHEX -- all unsorted first hexachords that will have a
;; hexachorally-related inversion
;; (when paired with complementary hexachord to make a complete row)
;; building 'besthex':
;(no-nils
; (loop for thex in
; (mapcar (lambda (x) (cons 0 x))
( subsets - len ( indices 11 1 ) 5... | null | https://raw.githubusercontent.com/gogins/csound-extended-nudruz/4551d54890f4adbadc5db8f46cc24af8e92fb9e9/sources/data/besthex.lisp | lisp | hexachorally-related inversion
(when paired with complementary hexachord to make a complete row)
building 'besthex':
(no-nils
(loop for thex in
(mapcar (lambda (x) (cons 0 x))
collect
(if (member (otherhex thex)
:test #'list-eql)
thex)))
'besthextri' test for trichords with common ... | (in-package :cm)
BESTHEX -- all unsorted first hexachords that will have a
( subsets - len ( indices 11 1 ) 5 ) )
( alltransp ( mod12 ( mapcar ( lambda ( n ) ( - 12 n ) ) thex ) ) )
(defparameter besthex
'((0 1 2 3 4 5) (0 1 2 3 4 6) (0 1 2 3 4 10) (0 1 2 3 4 11) (0 1 2 3 5 7)
(0 1 2 3 5 1... |
aae44f8cff3936a261a1de02a58bf91b33692a2f35f53899d1228b732c45889d | GaloisInc/halfs | Types.hs | module Tests.Types
where
import Data.Word
data BDGeom = BDGeom
{ bdgSecCnt :: Word64 -- ^ number of sectors
, bdgSecSz :: Word64 -- ^ sector size, in bytes
} deriving Show
| null | https://raw.githubusercontent.com/GaloisInc/halfs/2eb16fb3744e6221ee706b6bd290681a08c18048/test/src/Tests/Types.hs | haskell | ^ number of sectors
^ sector size, in bytes | module Tests.Types
where
import Data.Word
data BDGeom = BDGeom
} deriving Show
|
8885c020a7ef1224ccab93dcc3ec458e3fa843514a1924e907629f166b977873 | Guest0x0/normalization-bench | NBE_HashConsing.ml |
open Common.Syntax
module CacheIndex = struct
let indicies = Array.init 10000 (fun idx -> Idx idx)
let rec of_term = function
| Idx idx -> indicies.(idx)
| Lam tm' -> Lam(of_term tm')
| App(f, a) -> App(of_term f, of_term a)
let to_term tm = tm
type value =
| ... | null | https://raw.githubusercontent.com/Guest0x0/normalization-bench/ed3a61c65c5ac3238f8905a020df671caac991fa/Normalizers/NBE_HashConsing.ml | ocaml |
open Common.Syntax
module CacheIndex = struct
let indicies = Array.init 10000 (fun idx -> Idx idx)
let rec of_term = function
| Idx idx -> indicies.(idx)
| Lam tm' -> Lam(of_term tm')
| App(f, a) -> App(of_term f, of_term a)
let to_term tm = tm
type value =
| ... | |
653961bcdb81fd7646cd2d667e89540c737117d64ad81bd38044bc2e2fa8a65f | xh4/web-toolkit | null.lisp | (in-package :json)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defclass null ()
((value
:initarg :value
:initform nil
:accessor value))))
(defmethod print-object ((object null) stream)
(print-unreadable-object (object stream :type t)))
(eval-when (:compile-toplevel :load-topleve... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/json/null.lisp | lisp | (in-package :json)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defclass null ()
((value
:initarg :value
:initform nil
:accessor value))))
(defmethod print-object ((object null) stream)
(print-unreadable-object (object stream :type t)))
(eval-when (:compile-toplevel :load-topleve... | |
6dfb07eb54d8fc470c13418590bfa009678a3ef39913dd7bb52ab10317403ea5 | khotyn/4clojure-answer | 72-rearranging-code.clj | (fn [arg] (reduce + arg))
| null | https://raw.githubusercontent.com/khotyn/4clojure-answer/3de82d732faedceafac4f1585a72d0712fe5d3c6/72-rearranging-code.clj | clojure | (fn [arg] (reduce + arg))
| |
59d64dafcb3c4f9a5f6eef7879de1ad12d306bb72b3f0ed4cdca5838db05fdd9 | Supersonido/rebar3_elixir | example_app.erl | %%%-------------------------------------------------------------------
%% @doc example public API
%% @end
%%%-------------------------------------------------------------------
-module(example_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%%=====================================... | null | https://raw.githubusercontent.com/Supersonido/rebar3_elixir/6f11998e6b5aaccddbdc637b5ba7955accf25a93/example/src/example_app.erl | erlang | -------------------------------------------------------------------
@doc example public API
@end
-------------------------------------------------------------------
Application callbacks
====================================================================
API
========================================================... |
-module(example_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
io:format("~p",['Elixir.Decimal':new(<<"1.32">>)]),
example_sup:start_link().
stop(_State) ->
ok.
Internal functions
|
a3860ad970cd076fce515ff6202b67974951807ac98576abf767b45c28d04917 | vmchale/hgis | Hylo.hs | {-# LANGUAGE RankNTypes #-}
-- | Module to transform shapefiles.
module GIS.Hylo where
import Geometry.Shapefile.MergeShpDbf
import Geometry.Shapefile.ReadShp
import Geometry.Shapefile.Types
import Data.List
import Data.Char
import Data.Maybe
import Data.Monoid
import GIS.Math.Projections
import GIS.Math.Spherical
imp... | null | https://raw.githubusercontent.com/vmchale/hgis/5bd38f150a8d237dc78501859352bf1cf734f92b/src/GIS/Hylo.hs | haskell | # LANGUAGE RankNTypes #
| Module to transform shapefiles.
| Get the areas of various objects and return a string suitable for printing
| Get the perimeters of various objects and return a string suitable for printing
| Label with relative compactness
| Given a projection and lists of districts, draw a map.
| Give... | module GIS.Hylo where
import Geometry.Shapefile.MergeShpDbf
import Geometry.Shapefile.ReadShp
import Geometry.Shapefile.Types
import Data.List
import Data.Char
import Data.Maybe
import Data.Monoid
import GIS.Math.Projections
import GIS.Math.Spherical
import GIS.Utils
import Control.Lens.Tuple
import Control.Lens
impor... |
3d98767e221281d716ac04565e5ff017e13fdf4cd97016dff4f84aef12781416 | 12urenloop/cvc | Sensor.hs | --------------------------------------------------------------------------------
-- | Communication with sensors (i.e. Gyrid)
{-# LANGUAGE OverloadedStrings #-}
module CountVonCount.Sensor
( listen
) where
--------------------------------------------------------------------------------
import Control... | null | https://raw.githubusercontent.com/12urenloop/cvc/f8a0d57775fc6b50f18f96b9a17cb8baf4a1f1ee/count-von-count/lib/CountVonCount/Sensor.hs | haskell | ------------------------------------------------------------------------------
| Communication with sensors (i.e. Gyrid)
# LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
---------... | module CountVonCount.Sensor
( listen
) where
import Control.Concurrent (forkIO)
import Control.Monad (forever)
import qualified Data.Foldable as F
import Data.ByteString.Char8 ()
import qualified Network.Socket as S
import qualified Sy... |
6a7180d8f4c57fb9fcc832f17e5ed98816ba3f2010bd9b92548af0a2481801ab | NicklasBoto/signe | Check.hs | # LANGUAGE GeneralisedNewtypeDeriving #
# LANGUAGE RecordWildCards #
# LANGUAGE NamedFieldPuns #
# LANGUAGE CPP , MagicHash #
# LANGUAGE BlockArguments #
# LANGUAGE TupleSections #
# LANGUAGE LambdaCase #
module Type.Check where
import ... | null | https://raw.githubusercontent.com/NicklasBoto/signe/5f9185e4e20675dec8cfb05ce6e956d923ac4271/src/Type/Check.hs | haskell | FIXME: impose orthogonality constraints when possible
FIXME: Handle not factorizable types better | # LANGUAGE GeneralisedNewtypeDeriving #
# LANGUAGE RecordWildCards #
# LANGUAGE NamedFieldPuns #
# LANGUAGE CPP , MagicHash #
# LANGUAGE BlockArguments #
# LANGUAGE TupleSections #
# LANGUAGE LambdaCase #
module Type.Check where
import ... |
c29d7fe5e5296718beca76bebb4320c763ae45968b7c35a93bf73c187bfe4d66 | otherjoel/punct | info.rkt | #lang info
(define collection "punct")
(define version "0.1")
(define pkg-desc "implementation part of \"punct\"")
(define license 'BlueOak-1.0.0)
(define deps '("at-exp-lib"
"commonmark-lib"
"threading-lib"
"base"))
| null | https://raw.githubusercontent.com/otherjoel/punct/b642c2ce642e368cb4883c52d2959f96100606d6/punct-lib/info.rkt | racket | #lang info
(define collection "punct")
(define version "0.1")
(define pkg-desc "implementation part of \"punct\"")
(define license 'BlueOak-1.0.0)
(define deps '("at-exp-lib"
"commonmark-lib"
"threading-lib"
"base"))
| |
8e16b2addae0a29367ae91bd49c6e16331f4dd0f61d97ce36685a1937b39e1af | cyga/real-world-haskell | B.hs | file : ch25 / B.hs
mean :: [Double] -> Double
mean xs = s / fromIntegral n
where
(n, s) = foldl k (0, 0) xs
k (n, s) x = (n+1, s+x)
| null | https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch25/B.hs | haskell | file : ch25 / B.hs
mean :: [Double] -> Double
mean xs = s / fromIntegral n
where
(n, s) = foldl k (0, 0) xs
k (n, s) x = (n+1, s+x)
| |
fba1e4bebe6a40f94b4b4682fc0d48ab2a11b2b2d140a6d59e557ce6efbff04a | defaultxr/cl-patterns | pmeta.lisp | ;;;; t/pmeta.lisp - tests for `pmeta' and related functionality.
(in-package #:cl-patterns/tests)
(in-suite cl-patterns-tests)
(test pmeta
"Test pmeta"
(with-fixture temporary-pdef-dictionary ()
(pdef :foo (pbind :dur (pwhite 0.5 2.0 8)))
(is (= 4
(reduce #'+ (mapcar #'dur (next-upto-n (pmeta ... | null | https://raw.githubusercontent.com/defaultxr/cl-patterns/9dacc765ee5f97d16f76feed96b2a91913dfff65/t/patterns/pmeta.lisp | lisp | t/pmeta.lisp - tests for `pmeta' and related functionality.
FIX:
:inject (pbind :y (pseq (list :zzz :xxx))))))
"pmeta with :inject key yields incorrect results")
(next-upto-n (pmeta :step-inject (pbind :bar (pseries 9 1))
... |
(in-package #:cl-patterns/tests)
(in-suite cl-patterns-tests)
(test pmeta
"Test pmeta"
(with-fixture temporary-pdef-dictionary ()
(pdef :foo (pbind :dur (pwhite 0.5 2.0 8)))
(is (= 4
(reduce #'+ (mapcar #'dur (next-upto-n (pmeta :pattern (pseq (list :foo) 1) :dur 4)))))
"pmeta's :dur k... |
44a1887f75042e713d9f8966b71b110122051c570b3b8e94747e1684043e2bc1 | metabase/metabase | humanization.clj | (ns metabase.models.humanization
"Logic related to humanization of table names and other identifiers, e.g. taking an identifier like `my_table` and
returning a human-friendly one like `My Table`.
There are currently two implementations of humanization logic, previously three.
Which implementation is used is de... | null | https://raw.githubusercontent.com/metabase/metabase/dad3d414e5bec482c15d826dcc97772412c98652/src/metabase/models/humanization.clj | clojure | -> \"Cool Toucans\"
this is the same as:
-> \"Cool Toucans\"
specifiy a different strategy:
-> \"cool_toucans\""
We are assuming that ALL_UPPER_CASE means we should be Title Casing
simple replaces hyphens and underscores with spaces and capitalizes
explode on hyphens, underscores, and spaces
actual advanced metho... | (ns metabase.models.humanization
"Logic related to humanization of table names and other identifiers, e.g. taking an identifier like `my_table` and
returning a human-friendly one like `My Table`.
There are currently two implementations of humanization logic, previously three.
Which implementation is used is de... |
c62c55bf033c997f7d956ac74e703aa07bb021372a43d9b34d974c6ba2e8e8b5 | OCamlPro/scilint | scilabTypedPrimitives.ml | OCamlPro Scilab Toolbox - Typed primitives
* Copyright ( C ) 2013 - OCamlPro - Benjamin CANOU
*
* This file must be used under the terms of the CeCILL .
* This source file is licensed as described in the file COPYING , which
* you should have received as part of this distribution .
* The ... | null | https://raw.githubusercontent.com/OCamlPro/scilint/9d9ddd8e1630ddeae7f4f875bce62b2f65ec17d8/src/input/scilabTypedPrimitives.ml | ocaml | OCamlPro Scilab Toolbox - Typed primitives
* Copyright ( C ) 2013 - OCamlPro - Benjamin CANOU
*
* This file must be used under the terms of the CeCILL .
* This source file is licensed as described in the file COPYING , which
* you should have received as part of this distribution .
* The ... | |
7553b60393cfa441ee89a43cdc124f610b3ca0bec34154c7d284316a47ae27a7 | input-output-hk/cardano-wallet | Types.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE Fl... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/b058cffeee4979ee3ae30ea6539246ddca73f762/lib/wallet/api/http/Cardano/Wallet/Api/Types.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE GADTs #
# LANGUAGE PackageImports #
|
License: Apache-2.0
API type representations of various types. We define here pretty much all our
user-facing types that are mostly composed with internal / primitive types.
This module also define requir... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE... |
5bea563c04bfe2379ec539c5ac6ca54ca0abe5f80f1fbc6d0c54be0417d7c8f2 | PrecursorApp/precursor | drawing.cljs | (ns frontend.components.drawing
(:require [datascript.core :as d]
[frontend.camera :as cameras]
[frontend.db :as fdb]
[frontend.db.trans :as trans]
[frontend.models.layer :as layer-model]
[frontend.state :as state]
[frontend.svg :as svg]
... | null | https://raw.githubusercontent.com/PrecursorApp/precursor/30202e40365f6883c4767e423d6299f0d13dc528/src-cljs/frontend/components/drawing.cljs | clojure | number of ticks to pause before saving layer
number of ticks to pause before saving layers
number of ticks to pause before saving layer
e stands for edge
TODO: would be nice to get this a different way :(
only if not on mobile
dummy span so that the component can be mounted
go opposite
the mouse could be autom... | (ns frontend.components.drawing
(:require [datascript.core :as d]
[frontend.camera :as cameras]
[frontend.db :as fdb]
[frontend.db.trans :as trans]
[frontend.models.layer :as layer-model]
[frontend.state :as state]
[frontend.svg :as svg]
... |
2789a4083c0f872b85f48eeb4634be5d6cbc67f2d04cf3b411d926745b6b524a | ucsd-progsys/nate | builtini_ScrollValue.ml | ##ifdef CAMLTK
let cCAMLtoTKscrollValue = function
ScrollPage v1 ->
TkTokenList [TkToken"scroll"; TkToken (string_of_int v1); TkToken"pages"]
| ScrollUnit v1 ->
TkTokenList [TkToken"scroll"; TkToken (string_of_int v1); TkToken"units"]
| MoveTo v1 ->
TkTokenList [TkToken"moveto"; TkToken (Printf.sprint... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/otherlibs/labltk/builtin/builtini_ScrollValue.ml | ocaml | str l -> scrllv -> str l
str l -> scrllv -> str l | ##ifdef CAMLTK
let cCAMLtoTKscrollValue = function
ScrollPage v1 ->
TkTokenList [TkToken"scroll"; TkToken (string_of_int v1); TkToken"pages"]
| ScrollUnit v1 ->
TkTokenList [TkToken"scroll"; TkToken (string_of_int v1); TkToken"units"]
| MoveTo v1 ->
TkTokenList [TkToken"moveto"; TkToken (Printf.sprint... |
f2e19ff94ca4849c4feefbc695eae8afe2d20fb8c1508445c5eed15b75d21677 | mirage/capnp-rpc | unix_flow.mli | * Wraps a Unix [ file_descr ] to provide the Mirage flow API .
include Mirage_flow.S
val connect : ?switch:Lwt_switch.t -> Lwt_unix.file_descr -> flow
val socketpair : ?switch:Lwt_switch.t -> unit -> flow * flow
| null | https://raw.githubusercontent.com/mirage/capnp-rpc/f04fa96a583994b71731bc1288833f8304c9ce81/unix/unix_flow.mli | ocaml | * Wraps a Unix [ file_descr ] to provide the Mirage flow API .
include Mirage_flow.S
val connect : ?switch:Lwt_switch.t -> Lwt_unix.file_descr -> flow
val socketpair : ?switch:Lwt_switch.t -> unit -> flow * flow
| |
f2d9f7e8c21d37a37c91795688dba82a80bd7500c5dc1d052bcaaf94502ee7f2 | biocad/hasbolt-extras | Instances.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE QuasiQuotes #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - orphans #
module Database.Bolt.Ext... | null | https://raw.githubusercontent.com/biocad/hasbolt-extras/279193edf8bec50d2facd2ec0ce5153600dcabc9/src/Database/Bolt/Extras/DSL/Internal/Instances.hs | haskell | # LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables # | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - orphans #
module Database.Bolt.Extras.DSL.Internal.Instances () where
import Control.Monad.Writer ... |
97bb3e8927f39a53cffa281d96c6ab891a09834f7f40d04fbf16b8360a68f0fa | RichiH/git-annex | Required.hs | git - annex command
-
- Copyright 2015 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2015 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Command.Required where
import Command
import Logs.PreferredContent
import qualified Command.Wanted
cmd... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Command/Required.hs | haskell | git - annex command
-
- Copyright 2015 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2015 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Command.Required where
import Command
import Logs.PreferredContent
import qualified Command.Wanted
cmd... | |
69f819eae87ed6ea412a89231828f9707e2abf0faaf98ac3f49ee13ad8cb550a | bsansouci/bsb-native | ocamlbuildlight.mli | (***********************************************************************)
(* *)
(* ocamlbuild *)
(* *)
, , projet Galliu... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/ocamlbuild/ocamlbuildlight.mli | ocaml | *********************************************************************
ocamlbuild
... | , , projet Gallium , INRIA Rocquencourt
Copyright 2007 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
Original author :
|
7b68a151d3092cf885c12af82d0b52f9fccb77cac0a57ada83ce831e965b3a6f | CRogers/obc | gMain.mli | (**************************************************************************)
(* Lablgtk *)
(* *)
(* This program is free software; you can redistribute it *)
and/or ... | null | https://raw.githubusercontent.com/CRogers/obc/49064db244e0c9d2ec2a83420c8d0ee917b54196/lablgtk/gMain.mli | ocaml | ************************************************************************
Lablgtk
This program is free software; you can redistribute it
comes with the library. ... | and/or modify it under the terms of the GNU Library General
Public License as published by the Free Software Foundation
version 2 , with the exception described in file COPYING which
GNU Library General Public License for more details .
You should have r... |
4abd5e9527bf50ac696fe83e978905b67d439da7aee869cdbf4bbafb7ffa381e | coq-community/coqffi | error.mli | type error_kind =
| UnsupportedOCamlSignature of Types.signature_item
| UnsupportedGADT
| UnsupportedOCamlType of Types.type_expr
| UnknownOCamlType of string
| Anomaly of exn
exception CoqffiExn of error_kind
val raise_error : error_kind -> 'a
val error_kind_of_exn : exn -> error_kind
val pp_error_kind :... | null | https://raw.githubusercontent.com/coq-community/coqffi/0e31ff7bcced176afd6233c7825f4bd41ab894ce/src/error.mli | ocaml | type error_kind =
| UnsupportedOCamlSignature of Types.signature_item
| UnsupportedGADT
| UnsupportedOCamlType of Types.type_expr
| UnknownOCamlType of string
| Anomaly of exn
exception CoqffiExn of error_kind
val raise_error : error_kind -> 'a
val error_kind_of_exn : exn -> error_kind
val pp_error_kind :... | |
4b7dba929547b5a432dbbf3f08c40458d1cf3c2654655d2f309bbc0ab2664f2c | larcenists/larceny | linker.scm | ;;
;; This is designed to be called from a custom loader :-p
;;
(sassy-make-bin "test.i"
(sassy
'((entry start)
(macro prelude
(begin (push ebp)
(mov ebp esp)))
(macro postlude
... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Asm/Nasm/Experiments/linker.scm | scheme |
This is designed to be called from a custom loader :-p
| (sassy-make-bin "test.i"
(sassy
'((entry start)
(macro prelude
(begin (push ebp)
(mov ebp esp)))
(macro postlude
(begin (mov esp ebp)
... |
7e66d7991885d6358897c94006fbbfdcea742658ec5e7b81ca5cbed7a24c64e3 | iij/lmq | lmq_metrics.erl | -module(lmq_metrics).
-export([create_queue_metrics/1, update_metric/2, update_metric/3,
get_metric/2, get_metric_name/2]).
-include("lmq.hrl").
%% ==================================================================
%% Public API
%% ==================================================================
create_queue_... | null | https://raw.githubusercontent.com/iij/lmq/3f01c555af973a07a3f2b22ff95a2bc1c7930bc2/src/lmq_metrics.erl | erlang | ==================================================================
Public API
==================================================================
==================================================================
================================================================== | -module(lmq_metrics).
-export([create_queue_metrics/1, update_metric/2, update_metric/3,
get_metric/2, get_metric_name/2]).
-include("lmq.hrl").
create_queue_metrics(Name) when is_atom(Name) ->
folsom_metrics:new_meter(get_metric_name(Name, push)),
folsom_metrics:new_meter(get_metric_name(Name, pull)),
... |
88daae2168035fdd2a0e00748b2519d41438b538029432102899c57a8a474c43 | Elzair/nazghul | ifc.scm | ;; ----------------------------------------------------------------------------
;; ifc.scm - kernel-to-object interface
;; ----------------------------------------------------------------------------
;; Define a vtable scheme - a list of (<name> <body>) pairs
(define (vtable-call vtable method args)
(let ((proc (ass... | null | https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.001/ifc.scm | scheme | ----------------------------------------------------------------------------
ifc.scm - kernel-to-object interface
----------------------------------------------------------------------------
Define a vtable scheme - a list of (<name> <body>) pairs
If we fail to find the desired method then see if there's a default... |
(define (vtable-call vtable method args)
(let ((proc (assoc method vtable)))
(if (eq? #f proc)
(let ((proc (assoc 'default vtable)))
(if (eq? #f proc)
'()
(apply (cdr proc) args)))
(apply (cdr proc) args))))
(define (method name body) (cons name body))
(def... |
ad25c4962b6b2a0c560c10a871ae55e08d48a35a7555e8497890a4d85b6af0d1 | jordanthayer/ocaml-search | evaluate.ml | *
@author eaburns
@since 2010 - 06 - 19
@author eaburns
@since 2010-06-19
*)
open Geometry
open Printf
open Verbosity
type value =
| List of value array
| Bool of bool
| Number of float
| String of string
| Color of Drawing.color
| Font of Drawing.text_style
| Length of Length.t
... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/spt/src/spt-it-out/evaluate.ml | ocaml | * [to_string t] gets the string representation.
* [evaluate functs eval_rec env expr] evaluates [expr].
[functs] is a list of function names followed by their
evaluation function. [eval_rec] is the evaluation function to
call when recursive evaluation is required. | *
@author eaburns
@since 2010 - 06 - 19
@author eaburns
@since 2010-06-19
*)
open Geometry
open Printf
open Verbosity
type value =
| List of value array
| Bool of bool
| Number of float
| String of string
| Color of Drawing.color
| Font of Drawing.text_style
| Length of Length.t
... |
f81f72c7fa0d2c4eeea11cbe250b435d0a79151cc5865f66b1508da5d49dfa12 | commercialhaskell/stack | TestParser.hs | # LANGUAGE NoImplicitPrelude #
module Stack.Options.TestParser
( testOptsParser
) where
import Options.Applicative
import Options.Applicative.Args
import Options.Applicative.Builder.Extra
import Stack.Options.Utils
import Stack.Prelude
import Stack.Types... | null | https://raw.githubusercontent.com/commercialhaskell/stack/975f5845c6666d1f5d4ac72d6abe3adcd22a9df0/src/Stack/Options/TestParser.hs | haskell | | Parser for test arguments. | # LANGUAGE NoImplicitPrelude #
module Stack.Options.TestParser
( testOptsParser
) where
import Options.Applicative
import Options.Applicative.Args
import Options.Applicative.Builder.Extra
import Stack.Options.Utils
import Stack.Prelude
import Stack.Types... |
72ba690df0b8e47047467b5ae821f76ea73190417bc7112129c337822e4aff82 | spawnfest/eep49ers | snmpm_user_old.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2009 - 2016 . 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.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/snmp/src/manager/snmpm_user_old.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 2009 - 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(snmpm_user_old).
-export([behaviour_info/1]).
behaviour_info(callbacks) ->
[{handle_error, 3},
... |
49a272e8d70a9f0aa62ab6497ad408125a22caba434b23805686e61a6518a7d6 | sulami/spielwiese | partialFold.hs | module PartialFold where
foldP :: (a -> b -> Either b b) -> b -> [a] -> b
foldP _ acc [] = acc
foldP f acc (x:xs) = case f x acc of
(Right rv) -> rv
(Left nrv) -> foldP f nrv xs
toZero :: Int -> Int -> Either Int Int
toZero 0 c = Right c
toZero _ c = Left $ c + 1
| null | https://raw.githubusercontent.com/sulami/spielwiese/da354aa112d43d7ec5f258f4b5afafd7a88c8aa8/stuff/partialFold.hs | haskell | module PartialFold where
foldP :: (a -> b -> Either b b) -> b -> [a] -> b
foldP _ acc [] = acc
foldP f acc (x:xs) = case f x acc of
(Right rv) -> rv
(Left nrv) -> foldP f nrv xs
toZero :: Int -> Int -> Either Int Int
toZero 0 c = Right c
toZero _ c = Left $ c + 1
| |
1b60f853aa36c485ab7c54092a3bc942cd347ff9bace6ea7cc2241668c48e117 | OCADml/OCADml | path2.mli | (** 2d path generation (including arcs and basic shapes), manipulation
(including offset and roundovers (see {!module:Round}), and measurement. *)
* @inline
include Path.S with type vec := V2.t and type line := V2.line
* { 1 Search }
* [ nearby_idxs ? min_tree_size ? radius path p ]
Find the indices of poi... | null | https://raw.githubusercontent.com/OCADml/OCADml/f8cd87da86cd5ea4c31ec169c796640ffdc6bdee/lib/path2.mli | ocaml | * 2d path generation (including arcs and basic shapes), manipulation
(including offset and roundovers (see {!module:Round}), and measurement.
* [of_path3 p]
Project the 3d path [p] onto the given [plane] (default = {!Plane.xy}).
* [to_path3 t]
Lift the 2d path [p] onto the given [plane] (default = {!Plan... |
* @inline
include Path.S with type vec := V2.t and type line := V2.line
* { 1 Search }
* [ nearby_idxs ? min_tree_size ? radius path p ]
Find the indices of points within [ radius ] ( default = [ 1e-9 ] ) distance from
the target point [ p ] in [ path ] . Match indices will be returned in arbitrary
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.