_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
ad6bfbfbf1ec60e84b54ae605faf976a6ba4c794b0b44941a808df482b01cd6a
igorhvr/bedlam
packrat-code.scm
Packrat Parser Library ;; Copyright ( c ) 2004 , 2005 < > Copyright ( c ) 2005 LShift Ltd. < > ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without ;; restriction, i...
null
https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/packrat/packrat-code.scm
scheme
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to do so, subject to the following conditions...
Packrat Parser Library Copyright ( c ) 2004 , 2005 < > Copyright ( c ) 2005 LShift Ltd. < > files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PR...
7756e549ec86de1859d433ed3c82938776f8d60d43a5632cd351c5025bc74657
lpeterse/koka
Quote.hs
------------------------------------------------------------------------------ Copyright 2012 Microsoft Corporation . -- -- This is free software; you can redistribute it and/or modify it under the terms of the Apache License , Version 2.0 . A copy of the License can be found in the file " license.txt " at the ro...
null
https://raw.githubusercontent.com/lpeterse/koka/43feefed258b9a533f07967d3f8867b02384df0e/src/Interpreter/Quote.hs
haskell
---------------------------------------------------------------------------- This is free software; you can redistribute it and/or modify it under the ---------------------------------------------------------------------------
Copyright 2012 Microsoft Corporation . terms of the Apache License , Version 2.0 . A copy of the License can be found in the file " license.txt " at the root of this distribution . module Interpreter.Quote ( messageQuote ) where import System.Random import Lib.Printer import Interpreter.State import Inter...
5afaf5287ff8a54267194016b7a2210ef81e81511a9eaa83fc71a864744445fb
strint/sicpAns
1024_prime_three_smallest_primes_fermat.scm
;report (define (timed-prime-test n) (newline) (display n) (start-prime-test n (runtime))) (define (start-prime-test n start-time) (if (fast-prime? n 1) (report-prime (- (runtime) start-time)))) (define (report-prime elapsed-time) (display "***") (display elapsed-time)) ;prime? (define (fast-prime? n times...
null
https://raw.githubusercontent.com/strint/sicpAns/efc4bdfaab7583117d42f2141d4b3b9e12792b79/1.2.6-6_Primes/1024_prime_three_smallest_primes_fermat.scm
scheme
report prime? test search
(define (timed-prime-test n) (newline) (display n) (start-prime-test n (runtime))) (define (start-prime-test n start-time) (if (fast-prime? n 1) (report-prime (- (runtime) start-time)))) (define (report-prime elapsed-time) (display "***") (display elapsed-time)) (define (fast-prime? n times) (cond ((= ti...
c562b93acf59c6bd154c0c2485092e951ad55068831dd80cecd35cc61bcfad26
janestreet/async_js
async_js_test.ml
module Expect_test_config = struct open Async_kernel module IO = Deferred open Js_of_ocaml external loop_while : (unit -> bool Js.t) Js.callback -> unit = "loop_while" let run f = let result = f () in loop_while (Js.wrap_callback (fun () -> Async_kernel_scheduler.Expert.run_cycles_unt...
null
https://raw.githubusercontent.com/janestreet/async_js/2d290b3af2efaa9ee3415c7da539dda592e36526/async_js_test/src/async_js_test.ml
ocaml
module Expect_test_config = struct open Async_kernel module IO = Deferred open Js_of_ocaml external loop_while : (unit -> bool Js.t) Js.callback -> unit = "loop_while" let run f = let result = f () in loop_while (Js.wrap_callback (fun () -> Async_kernel_scheduler.Expert.run_cycles_unt...
544633231864c5790d5680b8c40f2843284a3f6e354145744ddae1a275be556f
tfausak/factory
API.hs
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # {- | This is the high-level description of the API. This is the basis for everything else, including the server and documentation. -} module Factory.API where import Servant.API as Servant import qualified Data.Proxy as Proxy import qualified Data.Text as Tex...
null
https://raw.githubusercontent.com/tfausak/factory/27025465dc0045d43d8db1769bcc665fb55ee62e/library/Factory/API.hs
haskell
| This is the high-level description of the API. This is the basis for everything else, including the server and documentation. | This is the full API, including documentation and client code. It is separate from the 'documentedAPI' so that we don't have to generate documentation for the document...
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # module Factory.API where import Servant.API as Servant import qualified Data.Proxy as Proxy import qualified Data.Text as Text import qualified Factory.API.MIME as MIME import qualified Factory.Types.Widget as Widget type API = GetMarkdown :<|> GetJavaScript...
737b253eeca08c1fdde7104ed6efb0046ca9828a99685a414380f15c4ae1848f
conjure-cp/conjure
ExplicitBounded.hs
# LANGUAGE QuasiQuotes # module Conjure.Rules.Vertical.Sequence.ExplicitBounded where import Conjure.Rules.Import rule_Comprehension :: Rule rule_Comprehension = "sequence-comprehension{ExplicitBounded}" `namedRule` theRule where theRule (Comprehension body gensOrConds) = do (gocBefore, (pat, sequ), goc...
null
https://raw.githubusercontent.com/conjure-cp/conjure/dd5a27df138af2ccbbb970274c2b8f22ac6b26a0/src/Conjure/Rules/Vertical/Sequence/ExplicitBounded.hs
haskell
# LANGUAGE QuasiQuotes # module Conjure.Rules.Vertical.Sequence.ExplicitBounded where import Conjure.Rules.Import rule_Comprehension :: Rule rule_Comprehension = "sequence-comprehension{ExplicitBounded}" `namedRule` theRule where theRule (Comprehension body gensOrConds) = do (gocBefore, (pat, sequ), goc...
fb5565b46f4e939fe2de1f271541ea7697fbc7227d08961104afa1983c261b18
haskell-gi/haskell-gi
Gtk.hs
module Data.GI.Gtk ( module GI.Gtk , module Data.GI.Gtk.ComboBox , module Data.GI.Gtk.ModelView.CellLayout , module Data.GI.Gtk.ModelView.CustomStore , module Data.GI.Gtk.ModelView.ForestStore , module Data.GI.Gtk.ModelView.SeqStore , module Data.GI.Gtk.ModelView.TreeModel , module Data....
null
https://raw.githubusercontent.com/haskell-gi/haskell-gi/5e6ab75d212a551db22eba194553eb2b38794e25/gi-gtk-hs/src/Data/GI/Gtk.hs
haskell
module Data.GI.Gtk ( module GI.Gtk , module Data.GI.Gtk.ComboBox , module Data.GI.Gtk.ModelView.CellLayout , module Data.GI.Gtk.ModelView.CustomStore , module Data.GI.Gtk.ModelView.ForestStore , module Data.GI.Gtk.ModelView.SeqStore , module Data.GI.Gtk.ModelView.TreeModel , module Data....
c932559901e413a91d54aaffffac672307cf4c244d027736d4aef34cc3d6e1f9
janestreet/ecaml
test_symbol.ml
open! Core open! Async_kernel open! Import open! Symbol let%expect_test "[intern] with same name returns equal symbols" = require [%here] (equal (intern "foo") (intern "foo")); return () ;; let%expect_test "[intern] with different names returns unequal symbols" = require [%here] (not (equal (intern "foo") (inte...
null
https://raw.githubusercontent.com/janestreet/ecaml/7c16e5720ee1da04e0757cf185a074debf9088df/test/test_symbol.ml
ocaml
open! Core open! Async_kernel open! Import open! Symbol let%expect_test "[intern] with same name returns equal symbols" = require [%here] (equal (intern "foo") (intern "foo")); return () ;; let%expect_test "[intern] with different names returns unequal symbols" = require [%here] (not (equal (intern "foo") (inte...
f7d073d88a34cc7d230d4b69108aad9883504e371d910376aa2bef6bece13135
kudu-dynamics/blaze
Fir.hs
# LANGUAGE TemplateHaskell # module Blaze.Types.Fir where import Blaze.Prelude import Binja.BasicBlock as BB import Binja.Function (MLILSSAFunction) import Blaze.Pretty type F = MLILSSAFunction data IfChainNode n = IfChainNode { _commonEscape :: n , _destination :: n , _self :: n , _par...
null
https://raw.githubusercontent.com/kudu-dynamics/blaze/63e30781f4c7bd816118e855f6fa4ae6e59949fe/src/Blaze/Types/Fir.hs
haskell
newtype ChildSibling n = ChildSibling n TODO: needs to keep track of whether True or False branch goes to escape or destination eventually should actually contain PIL instead of referring to binja bb
# LANGUAGE TemplateHaskell # module Blaze.Types.Fir where import Blaze.Prelude import Binja.BasicBlock as BB import Binja.Function (MLILSSAFunction) import Blaze.Pretty type F = MLILSSAFunction data IfChainNode n = IfChainNode { _commonEscape :: n , _destination :: n , _self :: n , _par...
030bfaef88bb1929aebbcd443dad777c904bf94609913e931eb7a4f5c0e70109
ds-wizard/engine-backend
QuestionnaireActionDTO.hs
module Wizard.Api.Resource.Websocket.QuestionnaireActionDTO where import GHC.Generics import Wizard.Api.Resource.Questionnaire.Event.QuestionnaireEventChangeDTO import Wizard.Api.Resource.Questionnaire.Event.QuestionnaireEventDTO import Wizard.Api.Resource.Questionnaire.QuestionnaireDetailWsDTO import Wizard.Model.Us...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/bcd95eef9e96d5d9d7c737671aa29119692e694c/engine-wizard/src/Wizard/Api/Resource/Websocket/QuestionnaireActionDTO.hs
haskell
module Wizard.Api.Resource.Websocket.QuestionnaireActionDTO where import GHC.Generics import Wizard.Api.Resource.Questionnaire.Event.QuestionnaireEventChangeDTO import Wizard.Api.Resource.Questionnaire.Event.QuestionnaireEventDTO import Wizard.Api.Resource.Questionnaire.QuestionnaireDetailWsDTO import Wizard.Model.Us...
340d134326876aa1245c5c92238209aa23505df722880bcb4a24990d619cff0f
LeventErkok/sbv
UISat.hs
----------------------------------------------------------------------------- -- | Module : TestSuite . Queries . UISat Copyright : ( c ) -- License : BSD3 -- Maintainer: -- Stability : experimental -- -- Testing UI function sat examples via queries ---------------------------------------------------------...
null
https://raw.githubusercontent.com/LeventErkok/sbv/cfaa40b8c8ff8e1b7ff9ab71304654f6f531ba72/SBVTestSuite/TestSuite/Queries/UISat.hs
haskell
--------------------------------------------------------------------------- | License : BSD3 Maintainer: Stability : experimental Testing UI function sat examples via queries --------------------------------------------------------------------------- # LANGUAGE OverloadedStrings # # OPTIONS_GHC -Wall -Werror #...
Module : TestSuite . Queries . UISat Copyright : ( c ) module TestSuite.Queries.UISat(tests) where import Control.Monad (unless, when) import Data.SBV.Control import Utils.SBVTestFramework tests :: TestTree tests = testGroup "Basics.Queries.UIAllSat" [ goldenCapturedIO "query_uiSat_test1" $ \rf...
a0955c1ee6d551c174c110f1c740fd7ccdf677c31768885d250c045b18577f38
functional-koans/clojure-koans
27_multimethods.clj
(ns koans.27-multimethods (:require [koan-engine.core :refer :all])) (defmulti multimethod-without-args (fn [keyword-arg] keyword-arg)) (defmethod multimethod-without-args :first [_] (str "Hello, World!")) (defmethod multimethod-without-args :second [_] (str "Hello there")) (defmulti multimethod-with-args (fn...
null
https://raw.githubusercontent.com/functional-koans/clojure-koans/a9c22921a5a3fb0c7fc09d9bd57c61b308b1a803/src/koans/27_multimethods.clj
clojure
(ns koans.27-multimethods (:require [koan-engine.core :refer :all])) (defmulti multimethod-without-args (fn [keyword-arg] keyword-arg)) (defmethod multimethod-without-args :first [_] (str "Hello, World!")) (defmethod multimethod-without-args :second [_] (str "Hello there")) (defmulti multimethod-with-args (fn...
b2efa11fb45cbab7776e983f2cfa57cdd170ca8f7a896972459ebaa7b176183a
bobzhang/fan
control_require.ml
let loaded_modules = ref Setf.String.empty let add_to_loaded_modules = function | name -> loaded_modules := (Setf.String.add name (!loaded_modules)) let add = function | name -> if not @@ (Setf.String.mem name (!loaded_modules)) then (add_to_loaded_modules name; Dyn_load.load (name ^ Dyn_loa...
null
https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/cold/control_require.ml
ocaml
let loaded_modules = ref Setf.String.empty let add_to_loaded_modules = function | name -> loaded_modules := (Setf.String.add name (!loaded_modules)) let add = function | name -> if not @@ (Setf.String.mem name (!loaded_modules)) then (add_to_loaded_modules name; Dyn_load.load (name ^ Dyn_loa...
0d9729f207dd20f6495f3f2fa04bec955dd742a03055e205fd691455135c4fce
wellposed/numerical
Basic.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE DataKinds # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE GADTs #-} # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleCont...
null
https://raw.githubusercontent.com/wellposed/numerical/6b458232760b20674487bd9f8442b0991ce59423/src/Numerical/Matrix/Basic.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE DeriveDataTypeable # # LANGUAGE ConstraintKinds # # LANGUAGE GADTs # note, the contents of this module will probably be completely relocated elsewhere at some point cleverDotProduct :: (Address ~ MArrayAddress mvecL , Address ~ MArrayAddress mvecR ...
# LANGUAGE DataKinds # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE ScopedTypeVariables # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE FunctionalDependencies # module Numerical.Matrix.Basic where import Numerical . Array . Mutable as Mut...
3445e5e3563d3d4939c1e630ef40887bd6696fc095debd1f974f2940004389a0
bsaleil/lc
procedure.scm
;;--------------------------------------------------------------------------- ;; Copyright ( c ) 2015 , . All rights reserved . ;; ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions are ;; met: ;; 1. Redistributions of so...
null
https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/unit-tests/procedure.scm
scheme
--------------------------------------------------------------------------- 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 ...
Copyright ( c ) 2015 , . All rights reserved . THIS SOFTWARE IS PROVIDED ` ` AS IS '' AND ANY EXPRESS OR INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT (define (fact n) (if (or (= n 0) (= n 1)) ...
1345b65123e1f1072a1087a7e7b30afb48169842f6019a6807c30b758bd4642a
aaronc/fx-clj
transforms.clj
(ns ^:no-doc fx-clj.core.transforms (:require [fx-clj.core.extensibility :refer [def-transform-tag do-transform convert-arg]])) ;(def-transform-tag append! ::append ; "Appends an element or list elements to the DefaultProperty ;of the target node if a node is specified or to the end of a ;List is a list is...
null
https://raw.githubusercontent.com/aaronc/fx-clj/29639356d8d1253438ecf61e123caacefa9269ec/src/fx_clj/core/transforms.clj
clojure
(def-transform-tag append! ::append "Appends an element or list elements to the DefaultProperty of the target node if a node is specified or to the end of a List is a list is specified." [& items]) (defmethod do-transform ::append [node [& items]] (or (when-let [def-property (fx-clj.core.pset/lookup-default-p...
(ns ^:no-doc fx-clj.core.transforms (:require [fx-clj.core.extensibility :refer [def-transform-tag do-transform convert-arg]])) (def-transform-tag add-class! ::add-class! "A transform for use with at!. Adds CSS class(es) to the selected node." [& classes]) (defmethod do-transform ::add-class! [node...
af34ed9b9f7911c97b7110457529c3c35200de81fdcacaa9acb6c63c74255d25
camllight/camllight
gc.mli
(* Memory management control and statistics. *) type stat = { minor_words : int; promoted_words : int; major_words : int; minor_collections : int; major_collections : int; heap_words : int; heap_chunks : int; live_words : int; live_blocks : int; free_words : int; free_blocks : int; largest_word...
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/windows/src/lib/gc.mli
ocaml
Memory management control and statistics. Return the current values of the memory management counters in a [stat] record. Print the current values of the memory management counters (in human-readable form) into the channel argument. Get the current parameters. Change some of them. Set the new value...
type stat = { minor_words : int; promoted_words : int; major_words : int; minor_collections : int; major_collections : int; heap_words : int; heap_chunks : int; live_words : int; live_blocks : int; free_words : int; free_blocks : int; largest_words : int; fragments : int };; The memory mana...
0954b911710f479f5cff011a981e9fe1595c2bd1458dcdb13087ae35c6b80ff3
janestreet/incr_map
map_operations.mli
open! Core open Import module Without_stabilize : sig type ('key, 'data) t [@@deriving sexp_of] val add : key:'key -> data:'data -> ('key, 'data) t val remove : 'key -> ('key, _) t end type ('key, 'data) t [@@deriving sexp_of] val add : key:'key -> data:'data -> ('key, 'data) t val remove : 'key -> ('key, _) ...
null
https://raw.githubusercontent.com/janestreet/incr_map/b56e7d8b1299d77790e3bc72e2aeeca74afd04fe/test/map_operations.mli
ocaml
* default is approximately the sqrt of the non-tuple variants to keep the probability of modifications approximately equivalent.
open! Core open Import module Without_stabilize : sig type ('key, 'data) t [@@deriving sexp_of] val add : key:'key -> data:'data -> ('key, 'data) t val remove : 'key -> ('key, _) t end type ('key, 'data) t [@@deriving sexp_of] val add : key:'key -> data:'data -> ('key, 'data) t val remove : 'key -> ('key, _) ...
67f6c12e0bada7c79efed32a2786122d3896bb4d97b8f9aa69b13f621f333e32
windymelt/cl-punch
cl-punch.lisp
(in-package :cl-user) (defpackage cl-punch-test (:use :cl :cl-punch :prove)) (in-package :cl-punch-test) ;; NOTE: To run this test file, execute `(asdf:test-system :cl-punch)' in your Lisp. (plan 5) (enable-punch-syntax) (is (^(* _ 2) 2) 4) (is (mapcar ^(* _ 3) '(1 2 3)) '(3 6 9)) (is (^(* _...
null
https://raw.githubusercontent.com/windymelt/cl-punch/f8ac331c8f43ae2abfd2e4ebf70c02e91692538c/t/cl-punch.lisp
lisp
NOTE: To run this test file, execute `(asdf:test-system :cl-punch)' in your Lisp.
(in-package :cl-user) (defpackage cl-punch-test (:use :cl :cl-punch :prove)) (in-package :cl-punch-test) (plan 5) (enable-punch-syntax) (is (^(* _ 2) 2) 4) (is (mapcar ^(* _ 3) '(1 2 3)) '(3 6 9)) (is (^(* _ _) 2 3) 6) (is (mapcar ^(if (oddp _) (* 2 <_) <_) '(1 2 3 4 5)) '(2...
d1c485b54c6ce807f9b1716e8a1c81fc51945f2da50df84f4c0bc7c3a59fa736
zadean/xqerl
fn_hours_from_time_SUITE.erl
-module('fn_hours_from_time_SUITE'). -include_lib("common_test/include/ct.hrl"). -export([ all/0, groups/0, suite/0 ]). -export([ init_per_suite/1, init_per_group/2, end_per_group/2, end_per_suite/1 ]). -export(['fn-hours-from-time1args-1'/1]). -export(['fn-hours-from-time1args-2'/1]). -...
null
https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/fn/fn_hours_from_time_SUITE.erl
erlang
-module('fn_hours_from_time_SUITE'). -include_lib("common_test/include/ct.hrl"). -export([ all/0, groups/0, suite/0 ]). -export([ init_per_suite/1, init_per_group/2, end_per_group/2, end_per_suite/1 ]). -export(['fn-hours-from-time1args-1'/1]). -export(['fn-hours-from-time1args-2'/1]). -...
b2797dfc3d3c4a7cfe808e39a949209de2bc321cb2f5197768740ce4aea446b4
leo-project/leo_gateway
leo_nfs_proto3_xdr.erl
%% %% src/leo_nfs_proto3_xdr was generated by erpcgen (do not edit) %% -module(leo_nfs_proto3_xdr). -export([enc_uint64/1, dec_uint64/2]). -export([enc_int64/1, dec_int64/2]). -export([enc_uint32/1, dec_uint32/2]). -export([enc_int32/1, dec_int32/2]). -export([enc_filename3/1, dec_filename3/2]). -export([enc_nfspath3/1...
null
https://raw.githubusercontent.com/leo-project/leo_gateway/7bac8912b762688f0ef237b31fee17e30e3888a3/src/leo_nfs_proto3_xdr.erl
erlang
src/leo_nfs_proto3_xdr was generated by erpcgen (do not edit)
-module(leo_nfs_proto3_xdr). -export([enc_uint64/1, dec_uint64/2]). -export([enc_int64/1, dec_int64/2]). -export([enc_uint32/1, dec_uint32/2]). -export([enc_int32/1, dec_int32/2]). -export([enc_filename3/1, dec_filename3/2]). -export([enc_nfspath3/1, dec_nfspath3/2]). -export([enc_fileid3/1, dec_fileid3/2]). -export([e...
6a6bcc92f7a0bd1122b2e27fc856dac21ee604d67b6f1f55dbaa5b714ae5a3aa
Mzk-Levi/texts
Ops.hs
# LANGUAGE TypeOperators , MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances , UndecidableInstances , IncoherentInstances , KindSignatures , RankNTypes # FlexibleInstances, UndecidableInstances, IncoherentInstances, KindSignatures, RankNTypes #-} --------------------------------------------...
null
https://raw.githubusercontent.com/Mzk-Levi/texts/34916d6531af9bc39e50b596247ac2017d8cfdc3/compdata-param-master/src/Data/Comp/Param/Multi/Ops.hs
haskell
------------------------------------------------------------------------------ | License : BSD3 Stability : experimental This module provides operators on higher-order difunctors. ------------------------------------------------------------------------------ Sums |Formal sum of signatures (difunctors). ...
# LANGUAGE TypeOperators , MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances , UndecidableInstances , IncoherentInstances , KindSignatures , RankNTypes # FlexibleInstances, UndecidableInstances, IncoherentInstances, KindSignatures, RankNTypes #-} Module : Data . Comp . . Multi . ...
c5f1a32f582cb7a4fad4be65077774f1617d979adbae0b6a79c4f6cc0d88cd73
kryonix/pg_cuckoo
Lib.hs
| Module : Lib Description : Cuckoo Interface Copyright : < > License : AllRightsReserved Maintainer : Module : Lib Description : Cuckoo Interface Copyright : © Denis Hirn <> License : AllRightsReserved Maintainer : Denis Hirn -} module Database.PgCuckoo.Lib ( parseCon...
null
https://raw.githubusercontent.com/kryonix/pg_cuckoo/755e3199b4831d99e716637fbbebbe794a9a7104/PgCuckoo/src/Database/PgCuckoo/Lib.hs
haskell
| access list elements safely | Perform parse_query extension sanity check ^ The authentication string ^ Query | Gets an authStr and an I.Expr (const) and returns the O.Expr of it Use the authStr and the expr node to get the constant as query-tree Parse the query-tree Get Catalog data Compile constants Infere...
| Module : Lib Description : Cuckoo Interface Copyright : < > License : AllRightsReserved Maintainer : Module : Lib Description : Cuckoo Interface Copyright : © Denis Hirn <> License : AllRightsReserved Maintainer : Denis Hirn -} module Database.PgCuckoo.Lib ( parseCon...
8534859c465124200cd8f2b4c669632cbeb5d2c6044fec96093defa7c42f4c78
keera-studios/keera-posture
ReactiveModelInternals.hs
-- | This module has been generated by hails. -- -- This module holds the reactive program model. It holds a program model, -- but includes events that other threads can listen to, so that a change -- in a part of the model is notified to another part of the program. The -- reactive model is not necessarily concurrent ...
null
https://raw.githubusercontent.com/keera-studios/keera-posture/9de5095a4a10c0cb54f6191f1a448e96645193ae/src/Model/ReactiveModel/ReactiveModelInternals.hs
haskell
| This module has been generated by hails. This module holds the reactive program model. It holds a program model, but includes events that other threads can listen to, so that a change in a part of the model is notified to another part of the program. The reactive model is not necessarily concurrent (it doesn't ...
module Model.ReactiveModel.ReactiveModelInternals ( ReactiveModel , GRM.basicModel , GRM.emptyRM , GRM.pendingEvents , GRM.pendingHandlers , GRM.getPendingHandler , GRM.onEvent , GRM.onBasicModel , GRM.triggerEvent ) where import GenericModel . import Model.Model import Model.Reactiv...
ac23747190d6b19e6baddded63e8dd2361f3ab0eb7ea4523900d7382ba0eb0f5
kafka4beam/kflow
payload_gen.erl
%% @doc This module provides lazy, composable producer streams that can be considered counterparts to Archiver 's consumer pipes and %% therefore can facilitate testing %% %% Also it comes with an implementation of binary data stream which is %% able to produce sufficiently large amounts of plausibly %% pseudorandom ...
null
https://raw.githubusercontent.com/kafka4beam/kflow/2c44379a2934385a17fb504e7a933c859da7ab06/src/testbed/payload_gen.erl
erlang
@doc This module provides lazy, composable producer streams that therefore can facilitate testing Also it comes with an implementation of binary data stream which is able to produce sufficiently large amounts of plausibly pseudorandom binary payload in a deterministic way. It also contains routines to check bina...
can be considered counterparts to Archiver 's consumer pipes and -module(payload_gen). -include("payload_gen.hrl"). -dialyzer(no_improper_lists). Generic stream API : -export([ interleave_streams/1 , retransmits/2 , next/1 , consume/2 , consume/1 ]). -export([ interleave_...
4a4d3ef30a5cbc936fd489f42cf6a66064d9d77951298f4488c0dadbe462dd88
facebookarchive/pfff
test_parsing_php.mli
(*s: test_parsing_php.mli *) This runs the PHP parser on a set of files or directories and displays * any parsing errors . It also stores the current parsing result * on those files or directories in / tmp/<filename_based_on_concatenation _ * of_files_and_dirs > and compares it with any previous run , prov...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_php/parsing/test_parsing_php.mli
ocaml
s: test_parsing_php.mli x: test_parsing_php.mli Print the set of tokens in a PHP file Print the AST of a PHP file using a JSON format val test_json_php : Common.filename -> unit Print any scalar in a PHP file by internally using a visitor x: test_parsing_php.mli e: test_parsing_php.mli
This runs the PHP parser on a set of files or directories and displays * any parsing errors . It also stores the current parsing result * on those files or directories in / tmp/<filename_based_on_concatenation _ * of_files_and_dirs > and compares it with any previous run , providing some * form of regre...
81c9939a1fa0136d8afe7433105386f4718c2ee2825cb77b7a315939d274ca0f
ngless-toolkit/ngless
ValidationIO.hs
Copyright 2013 - 2021 NGLess Authors - License : MIT - License: MIT -} module ValidationIO ( validateIO ) where import System.Directory import Data.Maybe import Control.Monad import Control.Monad.IO.Class import Control.Monad.Reader import Control.Monad.Trans.Writer import qualified Data.Text as T i...
null
https://raw.githubusercontent.com/ngless-toolkit/ngless/6522017c229fa3796d3abbee85547b76b6c4f41d/NGLess/ValidationIO.hs
haskell
| check that necessary files exist Attempt to run executeCountCheck in the validation stage
Copyright 2013 - 2021 NGLess Authors - License : MIT - License: MIT -} module ValidationIO ( validateIO ) where import System.Directory import Data.Maybe import Control.Monad import Control.Monad.IO.Class import Control.Monad.Reader import Control.Monad.Trans.Writer import qualified Data.Text as T i...
6fac394e34157807b0e83d52e384a0fa1b2b95b6f4f137f29964bc138cf56c2b
puppetlabs/jruby-utils
jruby_pool.clj
(ns puppetlabs.services.protocols.jruby-pool) (defprotocol JRubyPool (fill [pool-context] "Creates all the necessary JRuby instances and adds them to the pool.") (shutdown [pool-context] "Shuts down the JRuby pool, inserting a poison pill to prevent further borrows and terminating all JRuby i...
null
https://raw.githubusercontent.com/puppetlabs/jruby-utils/7b53c3c6a0c61635362402313bcec809abf5a856/src/clj/puppetlabs/services/protocols/jruby_pool.clj
clojure
(ns puppetlabs.services.protocols.jruby-pool) (defprotocol JRubyPool (fill [pool-context] "Creates all the necessary JRuby instances and adds them to the pool.") (shutdown [pool-context] "Shuts down the JRuby pool, inserting a poison pill to prevent further borrows and terminating all JRuby i...
25a48b92a9d2cf28317885072cff5c96492193296a42f5384a9fb4b017af4447
Opetushallitus/aipal
i18n.clj
Copyright ( c ) 2013 The Finnish National Board of Education - Opetushallitus ;; This program is free software : Licensed under the EUPL , Version 1.1 or - as soon as they will be approved by the European Commission - subsequent versions of the EUPL ( the " Licence " ) ; ;; ;; You may not use this work except...
null
https://raw.githubusercontent.com/Opetushallitus/aipal/767bd14ec7153dc97fdf688443b9687cdb70082f/aipal/src/clj/aipal/rest_api/i18n.clj
clojure
You may not use this work except in compliance with the Licence. You may obtain a copy of the Licence at: / This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Copyright ( c ) 2013 The Finnish National Board of Education - Opetushallitus This program is free software : Licensed under the EUPL , Version 1.1 or - as soon as they will be approved by the European Commission - subsequent versions European Union Public Licence for more details . (ns aipal.rest-api.i18n ...
b32467f2f0366b3876e897d253cf014da1ef078f13f2a68d480fc12e3e6c36a0
google/codeworld
Migration.hs
{-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} module Main where import Control.Monad import Data.List import System.Directory import System.FilePath import Util getAllUserDirs :: BuildMode -> IO [FilePath] getAllUserDirs bm = listDirectoryWithPrefix $ projectRootDir bm Project directories have no...
null
https://raw.githubusercontent.com/google/codeworld/77b0863075be12e3bc5f182a53fcc38b038c3e16/codeworld-server/src/Migration.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings #
module Main where import Control.Monad import Data.List import System.Directory import System.FilePath import Util getAllUserDirs :: BuildMode -> IO [FilePath] getAllUserDirs bm = listDirectoryWithPrefix $ projectRootDir bm Project directories have no 3 - letters prefix dirs inside . isProjectStructureCorrect :: ...
0aa0c35c61db1cd49dd20e16c0d6ed689f5c1110fcbe84dd46bba6e3bb1054e9
NetworkVerification/nv
SmtUnboxed.ml
open Nv_datastructures open Nv_lang open Syntax open Collections open SmtUtils open SmtLang open Nv_utils.OCamlUtils * * SMT encoding without SMT - datatypes module Unboxed : SmtEncodingSigs.ExprEncoding = struct type 'a t = 'a list let proj (i : int) (name : string) = Printf.sprintf "%s-proj-%d" name i let li...
null
https://raw.githubusercontent.com/NetworkVerification/nv/e76824c537dcd535f2224b31f35cd37601a60957/src/lib/smt/SmtUnboxed.ml
ocaml
we always know this is going to be a singleton list lo = hi lo=hi intermediate variables no longer help here, probably because the expressions are pretty simple in this encoding I'm assuming here that the cases are exhaustive assumes symbs are not of type tuple here. This is not a weird assumption ...
open Nv_datastructures open Nv_lang open Syntax open Collections open SmtUtils open SmtLang open Nv_utils.OCamlUtils * * SMT encoding without SMT - datatypes module Unboxed : SmtEncodingSigs.ExprEncoding = struct type 'a t = 'a list let proj (i : int) (name : string) = Printf.sprintf "%s-proj-%d" name i let li...
05b07de0316e8d2c245e2642a48da5e54a67ad012b93f988eaa55b0b669d1306
otto-de-legacy/oscillator
routes.clj
(ns de.otto.oscillator.routes (:require [compojure.core :as compojure] [compojure.route :as route] [ring.middleware.params :as params] [ring.middleware.keyword-params :as kparams] [de.otto.oscillator.view.page :as page])) (defn oscillator-routes [& {:keys [page-config ...
null
https://raw.githubusercontent.com/otto-de-legacy/oscillator/c1ddf409a70cb91329f0039b95c7bc12289922e2/src/de/otto/oscillator/routes.clj
clojure
(ns de.otto.oscillator.routes (:require [compojure.core :as compojure] [compojure.route :as route] [ring.middleware.params :as params] [ring.middleware.keyword-params :as kparams] [de.otto.oscillator.view.page :as page])) (defn oscillator-routes [& {:keys [page-config ...
9d94956ebff6d0d2b6a3a4272d9e8b4bc388b1b21a3657cb8399eb5ac02b9d55
WJWH/HPi
GPIO.hs
{-# LANGUAGE OverloadedStrings, ForeignFunctionInterface #-} |Library for controlling the GPIO pins on ( or any system using the Broadcom 2835 SOC ) . It is constructed as a FFI wrapper over the BCM2835 library by . module System.RaspberryPi.GPIO ( -- *Data types Pin(..), PinMode(..), ...
null
https://raw.githubusercontent.com/WJWH/HPi/178f58005fbbee3f4e25c3411e7fe0d24c6b061c/System/RaspberryPi/GPIO.hs
haskell
# LANGUAGE OverloadedStrings, ForeignFunctionInterface # *Data types *General functions *I2C specific functions *SPI specific functions make reading and writing simpler ------------------------------------------- Data types --------------------------------------------------------------------------- |This de...
|Library for controlling the GPIO pins on ( or any system using the Broadcom 2835 SOC ) . It is constructed as a FFI wrapper over the BCM2835 library by . module System.RaspberryPi.GPIO ( Pin(..), PinMode(..), LogicLevel, Address, SPIBitOrder(..), SPIPin(..), CPOL, ...
fe0f7f2895eceea46682f4d7e6cfee332b2f77931a151b7eef3406a54e07d6ac
fdopen/ppx_cstubs
ppx_cstubs_custom.cppo.ml
This file is part of ppx_cstubs ( ) * Copyright ( c ) 2018 - 2019 fdopen * * 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 , with linking exception ; * either version...
null
https://raw.githubusercontent.com/fdopen/ppx_cstubs/638b019ab5eb0d8a187710d00414a1d2536e249c/src/custom/ppx_cstubs_custom.cppo.ml
ocaml
FIXME: remove this ugly code, once ppxlib supports passing argv to Ppxlib.Driver.standalone
This file is part of ppx_cstubs ( ) * Copyright ( c ) 2018 - 2019 fdopen * * 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 , with linking exception ; * either version...
f5f8e4035ac19dcef858438ef7e8a1710544f7747e70fbc2aa84365ef5d56844
ferzcam/tropical-geometry
Core.hs
module Core ( module Polynomial.Prelude, module Polynomial.Monomial, module Polynomial.Hypersurface, module Arithmetic.Numbers, module Arithmetic.Matrix, module Geometry.ConvexHull2, module Geometry.ConvexHull3, module Graphics.Drawings ) where import Polynomial.Prelude ...
null
https://raw.githubusercontent.com/ferzcam/tropical-geometry/de366949f28530ac1008c7423122d37488b3b049/library/Core.hs
haskell
module Core ( module Polynomial.Prelude, module Polynomial.Monomial, module Polynomial.Hypersurface, module Arithmetic.Numbers, module Arithmetic.Matrix, module Geometry.ConvexHull2, module Geometry.ConvexHull3, module Graphics.Drawings ) where import Polynomial.Prelude ...
19a78b1776d843d3d73158d38dd29a0fe1b36f989af71e65d87f5f2c6051b707
johnwhitington/ocamli
int_misc.ml
(**************************************************************************) (* *) (* OCaml *) (* *) , ...
null
https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/otherlibs/int_misc.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the let rec gcd_int i1 i2 = if i2 = 0 then abs i1 else gcd_int i2 (i1 mod i2) ;; let rec num_bits_int_aux n = if ...
0bc6f26e81aaed9f1065398aac9874399e1ee72ac5ee091245d273fee27c4218
xapi-project/xen-api
xapi_bond.ml
* Copyright ( C ) 2006 - 2011 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 describe...
null
https://raw.githubusercontent.com/xapi-project/xen-api/48cc1489fff0e344246ecf19fc1ebed6f09c7471/ocaml/xapi/xapi_bond.ml
ocaml
Returns the name of a new bond device, which is the string "bond" followed * by the smallest integer > 0 that does not yet appear in a bond name on this host. list all the bond PIFs on this host This function is potentially expensive, so do not call it more often than necessary. Only move the VIFs of a VM if th...
* Copyright ( C ) 2006 - 2011 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 describe...
4e5a1b362b58752cac75e3c03733c197f3f5a26b452dc0ea5e973c07fa61c4e8
gcross/LogicGrowsOnTrees
tutorial-9.hs
import GHC.Conc (setNumCapabilities) import LogicGrowsOnTrees.Parallel.Adapter.Threads (RunOutcome(..) ,TerminationReason(..) ,exploreTreeUntilFirst ,setNumberOfWorkers ) import LogicGrowsOnTrees.Checkpoint (Progress(..)) import LogicGrowsOnTrees.Examples.Queens (nqueensUsingBitsSolutions) main = ...
null
https://raw.githubusercontent.com/gcross/LogicGrowsOnTrees/4befa81eb7152d877a7c78338d21bed61b06db66/LogicGrowsOnTrees/tutorial/tutorial-9.hs
haskell
import GHC.Conc (setNumCapabilities) import LogicGrowsOnTrees.Parallel.Adapter.Threads (RunOutcome(..) ,TerminationReason(..) ,exploreTreeUntilFirst ,setNumberOfWorkers ) import LogicGrowsOnTrees.Checkpoint (Progress(..)) import LogicGrowsOnTrees.Examples.Queens (nqueensUsingBitsSolutions) main = ...
b706935f77d98d3393b3ebfb6b2720d9189c69683dffa01365195c2a194b17e1
OCamlPro/liquidity
reason_syntax_util.mli
Hello ! Welcome to the Reason syntax util logic . This file 's shared between the repo and the BuckleScript repo . In Reason , it 's in src / reason - parser . In BuckleScript , it 's in jscomp / outcome_printer . We periodically copy this file from Reason ( the source of truth ) to BuckleScript , t...
null
https://raw.githubusercontent.com/OCamlPro/liquidity/3578de34cf751f54b9e4c001a95625d2041b2962/tools/liquidity/reason/reason_syntax_util.mli
ocaml
Hello ! Welcome to the Reason syntax util logic . This file 's shared between the repo and the BuckleScript repo . In Reason , it 's in src / reason - parser . In BuckleScript , it 's in jscomp / outcome_printer . We periodically copy this file from Reason ( the source of truth ) to BuckleScript , t...
1330af3af1df25604b9ec23b928d8e82459953009778b25e2b0f0c8028880cd4
GregorySchwartz/too-many-cells
Plot.hs
TooManyCells . Diversity . Plot Collects the functions pertaining to the plotting of data . Gregory W. Schwartz Collects the functions pertaining to the plotting of data. -} # LANGUAGE FlexibleContexts # # LANGUAGE QuasiQuotes # module TooManyCells.Diversity.Plot ( plotDiversity , plotChao1 ,...
null
https://raw.githubusercontent.com/GregorySchwartz/too-many-cells/0de948c6e99a489f1d2e8c412a04e4bcf3b26806/src/TooManyCells/Diversity/Plot.hs
haskell
Remote Local | Get the label of a population diversity as a String. | Plot the diversity of a group of populations. | Plot the rarefaction curves of a group of populations. | Plot the diversity of a group of populations. | Plot the rarefaction curves of a group of populations.
TooManyCells . Diversity . Plot Collects the functions pertaining to the plotting of data . Gregory W. Schwartz Collects the functions pertaining to the plotting of data. -} # LANGUAGE FlexibleContexts # # LANGUAGE QuasiQuotes # module TooManyCells.Diversity.Plot ( plotDiversity , plotChao1 ,...
48bc95648e74a571323669fe453b65d8e35c023670b84b410371cc771bd9a940
debug-ito/net-spider
Pangraph.hs
# LANGUAGE FlexibleInstances , OverloadedStrings # -- | Module : NetSpider . Pangraph Description : Conversion between NetSpider and Pangraph Maintainer : < > -- Conversion of NetSpider data model into Pangraph data model . This module allows you to export a snapshot graph ( ' SnapshotNode 's and ' Snaps...
null
https://raw.githubusercontent.com/debug-ito/net-spider/82dfbdca1add1edfd54ef36cb1ca5129d528b814/net-spider-pangraph/src/NetSpider/Pangraph.hs
haskell
| * Converters * Types * Utility * Re-exports | Make Pangraph 'Attribute's from 'Timestamp'. [("@timestamp","1539256985000")] [("@timestamp","1537660132000"),("@tz_offset_min","540"),("@tz_summer_only","False"),("@tz_name","")] | Make Pangraph 'P.Vertex' from 'SnapshotNode'. Node attributes (@na@) is conve...
# LANGUAGE FlexibleInstances , OverloadedStrings # Module : NetSpider . Pangraph Description : Conversion between NetSpider and Pangraph Maintainer : < > Conversion of NetSpider data model into Pangraph data model . This module allows you to export a snapshot graph ( ' SnapshotNode 's and ' SnapshotLink ...
bd9aca8c90da766aef4e6855ff1dd0c59e2162d3a1df7c823db0dd7dbd2182bc
jimpil/annotator-clj
allignment.clj
(ns PAnnotator.allignment (:require [PAnnotator.util :as ut])) (defn scoring-fn [s1 s2 match mis m [i j :as index]] the key values in map are ] and value=[score [ where it came from i , j ] char1 char2 ] top row and first col are 0 (let [d (first (get m [(dec i) (dec j)])) ;;score...
null
https://raw.githubusercontent.com/jimpil/annotator-clj/40390d46e9da83d1a4b4296c9f84263ce3afa501/src/PAnnotator/allignment.clj
clojure
score match/mismatch (diagonal) score deletion (above) score insertion (left) current char in s1 current char in s2 chooses how to calc current [i j] in matrix by choosing from d, u, l. insertion of the best score into the matrix NOT READY - PERFORMS WORSE THAN SERIAL! stores the next location [i j] to go to in H build...
(ns PAnnotator.allignment (:require [PAnnotator.util :as ut])) (defn scoring-fn [s1 s2 match mis m [i j :as index]] the key values in map are ] and value=[score [ where it came from i , j ] char1 char2 ] top row and first col are 0 (+ d match) (+ d mis)) ...
17cc9b48c430948808db05530bb8be68ff59290087f08444a4c7bcf493c971c2
heyoka/faxe
amqp_options.erl
%%%------------------------------------------------------------------- @author ( C ) 2020 , < COMPANY > %%% @doc %%% %%% @end Created : 31 . Aug 2020 18:42 %%%------------------------------------------------------------------- -module(amqp_options). -author("heyoka"). -include_lib("amqp_client/include/amqp_cli...
null
https://raw.githubusercontent.com/heyoka/faxe/74363ab84339cebb0fd51d70e27f51d4ac25b2b1/apps/faxe/src/lib/amqp_options.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API
@author ( C ) 2020 , < COMPANY > Created : 31 . Aug 2020 18:42 -module(amqp_options). -author("heyoka"). -include_lib("amqp_client/include/amqp_client.hrl"). -export([parse/1, parse/2]). -spec parse(list()|map()) -> #amqp_params_network{}. parse(Opts) -> parse(Opts, #{}). -spec parse(list()|map(), map()) -...
4d8b3dde2ee6212421c40b215a0ccfb546306eddf1b230d0f9e0ec5deb200517
jellelicht/guix
install.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2013 , 2014 , 2015 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version...
null
https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/build/install.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2013 , 2014 , 2015 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gnu build install) #:use-module (guix build utils) #:use-module (guix build stor...
4a900873b121043fe7ee7ac30c5bb47b728c30821d27fd6250121580310add34
divipp/x86-64
Asm.hs
# language GeneralizedNewtypeDeriving # # language NoMonomorphismRestriction # {-# language ScopedTypeVariables #-} # language StandaloneDeriving # # language FlexibleInstances # {-# language FlexibleContexts #-} # language PatternSynonyms # # language KindSignatures # # language PatternGuards # # language BangPatterns...
null
https://raw.githubusercontent.com/divipp/x86-64/a9e976a63b2946f1e7206866184f3fe6b060ac2d/CodeGen/X86/Asm.hs
haskell
# language ScopedTypeVariables # # language FlexibleContexts # # language TypeFamilies # # language CPP # ----------------------------------------------------- utils ----------------------------------------------------- byte sequences ----------------------------------------------------- sizes | The size of a register...
# language GeneralizedNewtypeDeriving # # language NoMonomorphismRestriction # # language StandaloneDeriving # # language FlexibleInstances # # language PatternSynonyms # # language KindSignatures # # language PatternGuards # # language BangPatterns # # language ViewPatterns # # language LambdaCase # # language RankNTy...
ac4fe2ebce7b63928abc0029abc005d31f2f6f74efc5f182f57a9ef1fe32dd28
solsarratea/selfsyn
core_test.clj
(ns selfsyn.core-test (:require [clojure.test :refer :all] [selfsyn.core :refer :all])) (deftest a-test (testing "1 is 1" (is (= 1 1))))
null
https://raw.githubusercontent.com/solsarratea/selfsyn/adc4e50f2846bd8ce1f2679152c80de1271b0e63/test/selfsyn/core_test.clj
clojure
(ns selfsyn.core-test (:require [clojure.test :refer :all] [selfsyn.core :refer :all])) (deftest a-test (testing "1 is 1" (is (= 1 1))))
770ce7666c82f0464f6563be31d732593dc058774c15e25d7d802652611b9a91
thi-ng/geom
subdiv.clj
(require '[thi.ng.geom.core :as g]) (require '[thi.ng.geom.vector :refer [vec2]]) (require '[thi.ng.geom.utils.subdiv :as sd]) (require '[thi.ng.geom.svg.core :as svg]) (require '[thi.ng.math.core :as m]) (require '[thi.ng.dstruct.core :as d]) (defn demo [points [id col]] (for [i (range 1 6)] (let [off-x (* 12...
null
https://raw.githubusercontent.com/thi-ng/geom/85783a1f87670c5821473298fa0b491bd40c3028/examples/svg/subdiv.clj
clojure
(require '[thi.ng.geom.core :as g]) (require '[thi.ng.geom.vector :refer [vec2]]) (require '[thi.ng.geom.utils.subdiv :as sd]) (require '[thi.ng.geom.svg.core :as svg]) (require '[thi.ng.math.core :as m]) (require '[thi.ng.dstruct.core :as d]) (defn demo [points [id col]] (for [i (range 1 6)] (let [off-x (* 12...
6fd7ab58a2b54a98205f4964b1ae3d46344e62af80c9640890fc142610ce871a
clj-bots/pin-ctrl
state_wrapper.clj
(ns clj-bots.pin-ctrl.state-wrapper (:require [clj-bots.pin-ctrl.protocols :as pcp] [clojure.core.async :as async])) ;; We have this wrapper around the implementation boards. It also implements the board protocols, and defers ;; to the implementations for the juicy stuff. Really, the only job of this wr...
null
https://raw.githubusercontent.com/clj-bots/pin-ctrl/1d4aac384061bbb0cb5e01a4ddc51fc0e432c576/src/clj_bots/pin_ctrl/state_wrapper.clj
clojure
We have this wrapper around the implementation boards. It also implements the board protocols, and defers to the implementations for the juicy stuff. Really, the only job of this wrapper is to sanely handle state _once_, so that individual implementations don't have to worry about it. The maintainence of state is h...
(ns clj-bots.pin-ctrl.state-wrapper (:require [clj-bots.pin-ctrl.protocols :as pcp] [clojure.core.async :as async])) : adapters " so you can create things like ain pins on pi , or software pwm ; better drivers ? " } So maybe this should be called something more general than ` BoardWrapper ` . (def...
caf181a9fe0bc19ab29cd208f95c1b6d0721323a19c0412ca2ad4d68a867d08c
sol/tinc
Nix.hs
# LANGUAGE CPP # # LANGUAGE ViewPatterns # # LANGUAGE RecordWildCards # module Tinc.Nix ( NixCache , cabal , nixShell , resolverFile , createDerivations #ifdef TEST , Function (..) , defaultDerivation , shellDerivation , resolverDerivation , pkgImport , parseNixFunction , disableTests , extractDependencies , derivati...
null
https://raw.githubusercontent.com/sol/tinc/427df659df20d548bbe4c7bd0ea76cc13de40238/src/Tinc/Nix.hs
haskell
# LANGUAGE CPP # # LANGUAGE ViewPatterns # # LANGUAGE RecordWildCards # module Tinc.Nix ( NixCache , cabal , nixShell , resolverFile , createDerivations #ifdef TEST , Function (..) , defaultDerivation , shellDerivation , resolverDerivation , pkgImport , parseNixFunction , disableTests , extractDependencies , derivati...
f8c36853b1c3db3a8b1c69c8f828fb1324d70562272781afc98f65e41db12fbc
pbrisbin/msu
Parse.hs
# LANGUAGE RecordWildCards # module MSU.Xrandr.Parse ( Display(..) , parseXrandr , parseXrandrUnsafe ) where import Control.Monad (void) import Control.Monad.IO.Class (MonadIO) import Text.Parsec import Text.Parsec.String import UnliftIO.Exception (throwString) data Display = Display { name :: St...
null
https://raw.githubusercontent.com/pbrisbin/msu/ed601633422b8668e5a9d0b4b294b5525ffe7ef0/src/MSU/Xrandr/Parse.hs
haskell
# LANGUAGE RecordWildCards # module MSU.Xrandr.Parse ( Display(..) , parseXrandr , parseXrandrUnsafe ) where import Control.Monad (void) import Control.Monad.IO.Class (MonadIO) import Text.Parsec import Text.Parsec.String import UnliftIO.Exception (throwString) data Display = Display { name :: St...
d6d9aa03a62326450c1182f153f4955c1a509a7e0cd6c2e9ec0034db511e5542
SKA-ScienceDataProcessor/RC
CH.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE GADTs #-} # LANGUAGE DeriveGeneric # -- | Library functions for the module DNA.CH ( -- * Array functions zipArray , foldArray , generateArrayShape , generateArraySlice , scatterShape -- * CH utils , Result(..)...
null
https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS1/dna-runtime/DNA/CH.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE GADTs # | Library functions for the * Array functions * CH utils * Logging -------------------------------------------------------------- Array manipulations -------------------------------------------------------------- ---------------------------------------------------...
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE DeriveGeneric # module DNA.CH ( zipArray , foldArray , generateArrayShape , generateArraySlice , scatterShape , Result(..) , RemoteMap(..) , sendToI , sendResult , handleRule , producer , startActor , defaultMain , monitorActors , scatte...
39e2efb600285b5610b54ca8bfdf6023d8bc44680272703a394749254dc72afc
Morgawr/Cloister-Engine
font.clj
(ns cloister.bindings.font (:import (org.newdawn.slick TrueTypeFont Color)) (:import (java.awt Font))) (defn make-color "Mapping for Slick's Color()" ([r g b] (Color. r g b)) ([r g b a] (Color. r g b a)) ([value] (Color. value))) (def color-map {:black Color/black ...
null
https://raw.githubusercontent.com/Morgawr/Cloister-Engine/0ca1eb6840cb6b3aac90c4f9ce187a375a99591e/src/cloister/bindings/font.clj
clojure
(ns cloister.bindings.font (:import (org.newdawn.slick TrueTypeFont Color)) (:import (java.awt Font))) (defn make-color "Mapping for Slick's Color()" ([r g b] (Color. r g b)) ([r g b a] (Color. r g b a)) ([value] (Color. value))) (def color-map {:black Color/black ...
c9df4b720fe5f836e2b24bd048782853a5c01ce4b0ef1348e7e0d7f05656ef93
ekmett/rope
Body.hs
# LANGUAGE GeneralizedNewtypeDeriving , DeriveDataTypeable , MultiParamTypeClasses , FlexibleContexts , TypeSynonymInstances # module Data.Rope.Body ( Body , Offset(..) , Chunk(..) , measureBody , consBody , snocBody , packBody ) where import Prelude hiding (null, length) import Data.Fi...
null
https://raw.githubusercontent.com/ekmett/rope/418b895e4895f566d726ca17688c428bcc95aa25/Data/Rope/Body.hs
haskell
# LANGUAGE GeneralizedNewtypeDeriving , DeriveDataTypeable , MultiParamTypeClasses , FlexibleContexts , TypeSynonymInstances # module Data.Rope.Body ( Body , Offset(..) , Chunk(..) , measureBody , consBody , snocBody , packBody ) where import Prelude hiding (null, length) import Data.Fi...
6da90c76ff3a9eff93910109ebac9241e6bd714a424f47f91609b715e86c9814
johnlawrenceaspden/hobby-code
fmdp.clj
;; A finite markov decision process (def p {[:A,1] [[1/6 3 :A] [2/6 2 :B] [3/6 1 :B]] [:A,2] [[1, 0, :B]] [:B,1] [[1,10, :A]]}) ;; A policy (def pi {:B [[1,1]] :A [[1,1] [1,2]]}) ;; A random weighted choice function (defn wrand "given a vector...
null
https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/reinforcement-learning/fmdp.clj
clojure
A finite markov decision process A policy A random weighted choice function 1 ; 2 ; 1 ; 0 ; 2 ; 2 ; 2 ; 2 ; 2 ; 1 (:A) ; (:B) ; (:B) ; (:D) ; (:C) ; (:A) ; (:B) ; (:D) ; (:B) run the chain by hand state A (0 :B) reward 0 state B state A (0 :B) reward 0 state B automate that (0 :B) run it to infinity (...
(def p {[:A,1] [[1/6 3 :A] [2/6 2 :B] [3/6 1 :B]] [:A,2] [[1, 0, :B]] [:B,1] [[1,10, :A]]}) (def pi {:B [[1,1]] :A [[1,1] [1,2]]}) (defn wrand "given a vector of slice sizes, returns the index of a slice given a random spin of a roulette whe...
733ff664e15cd24685a3bd8d0c3f651da9aa5704fe790e7854e8dcd5edc657ae
AccelerateHS/accelerate-llvm
Permute.hs
# LANGUAGE CPP # # LANGUAGE GADTs # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # -- | Module : Data . Array . Accelerate . LLVM.Native . CodeGen . Permute Copyright : [ 2016 .. 20...
null
https://raw.githubusercontent.com/AccelerateHS/accelerate-llvm/0dec9b4deeb86a28fe89fb330f93aa025ef38745/accelerate-llvm-native/src/Data/Array/Accelerate/LLVM/Native/CodeGen/Permute.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RecordWildCards # | License : BSD3 Stability : experimental Forward permutation specified by an indexing mapping. The resulting array is initialised with the given defaults, and any further values that are permuted into the result array are added to the curr...
# LANGUAGE CPP # # LANGUAGE GADTs # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # Module : Data . Array . Accelerate . LLVM.Native . CodeGen . Permute Copyright : [ 2016 .. 2020 ] The Accelerate Team Maintainer : < > Portability : non - portabl...
5c6438ddbc9476bed9554b1feb2978c3aab1bb929281a4798da5265378453da5
backtracking/mlpost
gmlpost.ml
open GMain open GdkKeysyms open Glexer open Format let () = ignore (GtkMain.Main.init ()) let usage () = eprintf "usage: gmlpost file.ml fig-name@."; exit 1 let ml_file, fig_name = if Array.length Sys.argv <> 3 then usage (); let f = Sys.argv.(1) in if not (Sys.file_exists f && Filename.check_suffix f ".ml...
null
https://raw.githubusercontent.com/backtracking/mlpost/bd4305289fd64d531b9f42d64dd641d72ab82fd5/tools/gmlpost.ml
ocaml
size parameters ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------------------ Menu ba...
open GMain open GdkKeysyms open Glexer open Format let () = ignore (GtkMain.Main.init ()) let usage () = eprintf "usage: gmlpost file.ml fig-name@."; exit 1 let ml_file, fig_name = if Array.length Sys.argv <> 3 then usage (); let f = Sys.argv.(1) in if not (Sys.file_exists f && Filename.check_suffix f ".ml...
978471d7d3ffe296dcd669fe5ab22171f99feae579a441d98909bab751d7f11c
databrary/databrary
SQL.hs
# LANGUAGE TemplateHaskell # module Model.Permission.SQL ( accessRow , accessSets ) where import Model.SQL.Select import Model.Permission.Types accessRow :: String -- ^ Table name -> Selector -- ^ 'Access' accessRow table = selectColumns 'Access table ["site", "member"] accessSets :: String -- ^ @'Access'@ ...
null
https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Model/Permission/SQL.hs
haskell
^ Table name ^ 'Access' ^ @'Access'@
# LANGUAGE TemplateHaskell # module Model.Permission.SQL ( accessRow , accessSets ) where import Model.SQL.Select import Model.Permission.Types accessRow table = selectColumns 'Access table ["site", "member"] -> [(String, String)] accessSets a = [ ("site", "${accessSite " ++ a ++ "}") , ("member", "${acc...
9d1b2b4ff0db8ff4b6a64b166537d3bb345a9fe99722f92b0b8b709e73e4dc04
decal/pathgro
path-macos.scm
(define-module (pathgro base path-macos) #:export (path-macos)) (define (path-macos apth) (list (string-append "/" "_" apth) (string-append "/" apth "_") (string-append "/" "_" apth "_") (string-append "/" "-" apth) (string-append "/" apth "-") (string-append "/" "-" apth "-") (string-append "/" ":" a...
null
https://raw.githubusercontent.com/decal/pathgro/48c4007611f9c4ae6ff24e50ae27615c65cad3b2/pathgro/base/path-macos.scm
scheme
(define-module (pathgro base path-macos) #:export (path-macos)) (define (path-macos apth) (list (string-append "/" "_" apth) (string-append "/" apth "_") (string-append "/" "_" apth "_") (string-append "/" "-" apth) (string-append "/" apth "-") (string-append "/" "-" apth "-") (string-append "/" ":" a...
277bab07cb6180e5a4a36d6e2dda473ba07cee45fb52ca5c761e7483d831224d
bsless/more.async
channel.clj
(ns more.async.dataflow.channel (:require [more.async.dataflow.buffer :as buffer] [clojure.spec.alpha :as s] [clojure.core.async :as a] [clojure.data])) (s/def ::name (s/or :keyword keyword? :string string? :number number? :symbol symbol?)) (s/...
null
https://raw.githubusercontent.com/bsless/more.async/ce343e393a89bb3d63dc3a49ee477718e85e1617/src/main/clojure/more/async/dataflow/channel.clj
clojure
(ns more.async.dataflow.channel (:require [more.async.dataflow.buffer :as buffer] [clojure.spec.alpha :as s] [clojure.core.async :as a] [clojure.data])) (s/def ::name (s/or :keyword keyword? :string string? :number number? :symbol symbol?)) (s/...
c79bfb44406025dab8548ce06e296a9baba71a07c9390bfe26c1147724a90fbd
informatica-unica/lip
fractions.ml
let compare_posfrac (a1,b1) (a2,b2) = assert (a1>=0 && b1>0 && a2>=0 && b2>0); let l = a1 * b2 and r = a2 * b1 in if l=r then 0 else if l>r then 1 else -1;; compare_posfrac (1,2) (2,1);; assert (compare_posfrac (1,2) (2,4) == 0);; assert (compare_posfrac (1,2) (1,3) == 1);; assert (compare_posfrac (1,2) (2,...
null
https://raw.githubusercontent.com/informatica-unica/lip/baf3a09d57597bf0864003fbea7a0fd9da886782/ocaml-basics/fractions/fractions.ml
ocaml
let compare_posfrac (a1,b1) (a2,b2) = assert (a1>=0 && b1>0 && a2>=0 && b2>0); let l = a1 * b2 and r = a2 * b1 in if l=r then 0 else if l>r then 1 else -1;; compare_posfrac (1,2) (2,1);; assert (compare_posfrac (1,2) (2,4) == 0);; assert (compare_posfrac (1,2) (1,3) == 1);; assert (compare_posfrac (1,2) (2,...
3d717c3c0b007611de17b9a5a03af069274db5a28586cf8629301d24b750cfd1
jimcrayne/jhc
tc084.hs
This program shows up a bug in the handling of the monomorphism restriction in an earlier version of ghc . With ghc 0.18 and before , f gets a type with an unbound type variable , which shows up in the interface file . Reason : it was being monomorphised . the monomorphism restric...
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/2_pass/ghc/tc084.hs
haskell
Everything is ok if this signature is put in but the program should be perfectly legal without it. This use of f binds the overloaded monomorphic type to Int
This program shows up a bug in the handling of the monomorphism restriction in an earlier version of ghc . With ghc 0.18 and before , f gets a type with an unbound type variable , which shows up in the interface file . Reason : it was being monomorphised . the monomorphism restric...
6851be1674bca3e9b6b86868fb77b5f1d87e97d33ffa626f455d75bc09d8ebc0
tezos/tezos-mirror
environment_V9.mli
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2022 Nomadic Labs . < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/17af7237be64d267f55a62bfcefafb79e383bee1/src/lib_protocol_environment/environment_V9.mli
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2022 Nomadic Labs . < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN A...
e3b87912b2fa795920ae308316317b6da08895ffe61e9aa578c4f2e37a603381
ekmett/reflection
Constraints.hs
# LANGUAGE Rank2Types , TypeFamilies , TypeOperators , ConstraintKinds , PolyKinds , FlexibleInstances , MultiParamTypeClasses , ScopedTypeVariables , FlexibleContexts , UndecidableInstances , CPP # module Constraints where import Control.Newtype.Generics -- from newtype-generics import Data.Constraint -- fro...
null
https://raw.githubusercontent.com/ekmett/reflection/b5ab2a1eea96449e8305d9f50692bc049378bdb3/examples/Constraints.hs
haskell
from newtype-generics from constraints from constraints from tagged from reflection from semigroups | Values in our dynamically constructed monoid over 'a'
# LANGUAGE Rank2Types , TypeFamilies , TypeOperators , ConstraintKinds , PolyKinds , FlexibleInstances , MultiParamTypeClasses , ScopedTypeVariables , FlexibleContexts , UndecidableInstances , CPP # module Constraints where #if !(MIN_VERSION_base(4,11,0)) #endif newtype Lift (p :: * -> Constraint) (a :: *) (s :: *) =...
1a557b0b1e8a2ce11c4938f2dce9e55e13347ca96a023ab9711c395a5814ad4d
deadtrickster/prometheus-cowboy
prometheus_cowboy1_handler.erl
%% @doc %% Cowboy2 handler for exporting prometheus metrics. %% @end -module(prometheus_cowboy1_handler). %% -behaviour(cowboy_http_handler). -export([init/3, handle/2, terminate/3]). %% =================================================================== %% cowboy_http_handler callbacks %% ========...
null
https://raw.githubusercontent.com/deadtrickster/prometheus-cowboy/24a29e2f0b096f739587a526bc927a951c44b862/src/prometheus_cowboy1_handler.erl
erlang
@doc Cowboy2 handler for exporting prometheus metrics. @end -behaviour(cowboy_http_handler). =================================================================== cowboy_http_handler callbacks =================================================================== =====================================================...
-module(prometheus_cowboy1_handler). -export([init/3, handle/2, terminate/3]). init(_Transport, Request, Opts) -> {ok, Request, Opts}. handle(Request0, State) -> {Method, Request} = cowboy_req:method(Request0), {ok, Response} = gen_response(Method, Request), {ok, Response, State}. termin...
0bab979cb8b2007501181fbd0f688a9f6c104a45bfc543a5d78dd8329963160b
Feuerlabs/kvdb
kvdb_schema_events.erl
%%%---- BEGIN COPYRIGHT ------------------------------------------------------- %%% Copyright ( C ) 2012 Feuerlabs , Inc. All rights reserved . %%% This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one ...
null
https://raw.githubusercontent.com/Feuerlabs/kvdb/c8c71bf5422a8fa2e58c608c65629be7a58e27f3/src/kvdb_schema_events.erl
erlang
---- BEGIN COPYRIGHT ------------------------------------------------------- ---- END COPYRIGHT --------------------------------------------------------- @doc @end
Copyright ( C ) 2012 Feuerlabs , Inc. All rights reserved . This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. @author KVDB schema callback module for queue - related events -module...
e4258611d509e39b50fa95abe10fb0fa98a7cc5001e5c8f6012b331efb7fae72
leptonyu/guiguzi
Internal.hs
# LANGUAGE TemplateHaskell # module Data.Captcha.Internal where import Codec.Picture import Data.ByteString.Lazy (ByteString) import Data.Char import FileEmbedLzma import Graphics.Rasterific import Graphics.Rasterific.Texture import Graphics....
null
https://raw.githubusercontent.com/leptonyu/guiguzi/9b3cb22f1b0c5387964c0097ef9a789125d2daee/captcha/src/Data/Captcha/Internal.hs
haskell
# LANGUAGE TemplateHaskell # module Data.Captcha.Internal where import Codec.Picture import Data.ByteString.Lazy (ByteString) import Data.Char import FileEmbedLzma import Graphics.Rasterific import Graphics.Rasterific.Texture import Graphics....
7749858195705801e3c915243eb32d65703adaf02c5a4f16472a723ec845a273
jonsterling/dreamtt
Equate.mli
(** The equational theory of types *) exception UnequalTypes open Effect val equate_gtp : Syntax.gtp -> Syntax.gtp -> unit lm val equate_gtele : Syntax.gtele -> Syntax.gtele -> unit lm
null
https://raw.githubusercontent.com/jonsterling/dreamtt/aa30a57ca869e91a295e586773a892c6601b5ddb/core/Equate.mli
ocaml
* The equational theory of types
exception UnequalTypes open Effect val equate_gtp : Syntax.gtp -> Syntax.gtp -> unit lm val equate_gtele : Syntax.gtele -> Syntax.gtele -> unit lm
1016ca5dce999caaa2d6d6a666c7011999ba740cdeaa5d128e41f45e43b4b8ac
TrustInSoft/tis-interpreter
wpReport.ml
Modified by TrustInSoft (**************************************************************************) (* *) This file is part of WP plug - in of Frama - C. (* ...
null
https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/wp/wpReport.ml
ocaml
************************************************************************ alternatives) ...
Modified by TrustInSoft This file is part of WP plug - in of Frama - C. Copyright ( C ) 2007 - 2015 CEA ( Commissariat a l'energie atomique et aux energies Lesser General Public License as published by the Free Soft...
fd3329d04b216f59a0ac9e552ad715fcba1cd526ae6aef0b6791e11ef2c2266c
bjorng/wings
e3d_tds.erl
%% %% e3d_tds.erl -- %% Functions for reading and writing 3D Studio Max files ( .tds ) , version 3 . %% Copyright ( c ) 2001 - 2011 %% %% See the file "license.terms" for information on usage and redistribution %% of this file, and for a DISCLAIMER OF ALL WARRANTIES. %% %% $Id$ %% -module(e3d_t...
null
https://raw.githubusercontent.com/bjorng/wings/1e2c2d62e93a98c263b167c7a41f8611e0ff08cd/e3d/e3d_tds.erl
erlang
e3d_tds.erl -- See the file "license.terms" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. $Id$ Import. editor(Bin, E3DFile) -> E3DFile Collect objects and materials from the sub-chunks of 'editor'. keyframer(Bin) Go through the keyframer dat...
Functions for reading and writing 3D Studio Max files ( .tds ) , version 3 . Copyright ( c ) 2001 - 2011 -module(e3d_tds). -export([import/1,export/2]). -include("e3d.hrl"). -include("e3d_image.hrl"). -import(lists, [map/2,foldl/3,reverse/1,reverse/2,member/2, sort/1,keysort/2,usort/1,keydelete/3,...
2000b7f80b14a6df7f503b4c42409422c5a466419bba486eab4f0ccc5f7f9d42
jacekschae/learn-reagent-course-files
orders.cljs
(ns giggin.components.orders (:require [giggin.state :as state] [giggin.helpers :refer [format-price]] [giggin.components.checkout-modal :refer [checkout-modal]])) (defn total [] (->> @state/orders (map (fn [[id quant]] (* quant (get-in @state/gigs [id :price])))) (reduce +)...
null
https://raw.githubusercontent.com/jacekschae/learn-reagent-course-files/bad40303c8e0a8526318a69fdf9c2d786b4240cb/increments/18-ajax-requests/src/giggin/components/orders.cljs
clojure
(ns giggin.components.orders (:require [giggin.state :as state] [giggin.helpers :refer [format-price]] [giggin.components.checkout-modal :refer [checkout-modal]])) (defn total [] (->> @state/orders (map (fn [[id quant]] (* quant (get-in @state/gigs [id :price])))) (reduce +)...
e4426c83d445e56ef70f66d8d251890111416ffc727a2208f8af899f37ad5bda
CardanoSolutions/kupo
Node.hs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. # LANGUAGE PatternSynonyms # module Kupo.App.FetchBlock.Node ( FetchBlockClient , newFetchBlockClient ) where import Kupo.Prel...
null
https://raw.githubusercontent.com/CardanoSolutions/kupo/b98b4ced346b4e0b95924fde5eec3452b7030e07/src/Kupo/App/FetchBlock/Node.hs
haskell
| Callback given to intermediate client states to ease signature / handling. | A chain-sync client tailored to retrieving specific blocks, identified by their point on chain. The client is idle most of the time, waiting for requests from an external actor, and provide requested block in a timely manner as callback...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. # LANGUAGE PatternSynonyms # module Kupo.App.FetchBlock.Node ( FetchBlockClient , newFetchBlockClient ) where import Kupo.Prel...
5170f1ce13294e16b5575ddcff53d16b972309c7e354c96148bd0bbcca681a57
oriansj/mes-m2
bytevectors.scm
GNU --- Maxwell Equations of Software Copyright © 2016,2017,2018 Jan ( janneke ) Nieuwenhuizen < > ;;; This file is part of GNU . ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either ve...
null
https://raw.githubusercontent.com/oriansj/mes-m2/b44fbc976ae334252de4eb82a57c361a195f2194/module/mescc/bytevectors.scm
scheme
you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. 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. Commentary: Code: rnrs com...
GNU --- Maxwell Equations of Software Copyright © 2016,2017,2018 Jan ( janneke ) Nieuwenhuizen < > This file is part of GNU . under the terms of the GNU General Public License as published by GNU is distributed in the hope that it will be useful , but You should have received a copy of the GNU General P...
f2bed4a25a2123b50eed381747e3148887ab7d9ec65712f05af7db10c9f2a731
Simspace/postgresql-tx
Internal.hs
# LANGUAGE BlockArguments # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE DataKinds # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralisedNewtypeDeriving # # LANGUAGE KindSignatures # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVaria...
null
https://raw.githubusercontent.com/Simspace/postgresql-tx/9c2f21c59bb2f1c6e14b49fe1ce1352b9fd22530/squeal/src/Database/PostgreSQL/Tx/Squeal/Internal.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE RankNTypes # * Disclaimer $disclaimer ** Internals | Runtime environment needed to run @squeal-postgresql@ via @postgresql-tx@. | Monad type alias for running @squeal-postgresql@ via @postgresql-tx@. 'SquealTxM'' constructor and 'fromSquealTxM' function, respectively. ...
# LANGUAGE BlockArguments # # LANGUAGE DataKinds # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralisedNewtypeDeriving # # LANGUAGE KindSignatures # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE UndecidableIn...
3aff9b60b28a4d05dfb3966c09bf07f4cc3259e0a096fecd3cdb309ba775cbf7
ltoth/unison
files.mli
Unison file synchronizer : src / files.mli Copyright 1999 - 2010 , ( see COPYING for details ) (* As usual, these functions should only be called by the client (i.e., in *) (* the same address space as the user interface). *) (* Delete the given subtree of the given replica ...
null
https://raw.githubusercontent.com/ltoth/unison/e763510165e3d93c5140a4c5f2ea0dcbf5825a0c/files.mli
ocaml
As usual, these functions should only be called by the client (i.e., in the same address space as the user interface). Delete the given subtree of the given replica source root deleted path root path to delete updates that will be discarded Regio...
Unison file synchronizer : src / files.mli Copyright 1999 - 2010 , ( see COPYING for details ) val delete : -> unit Lwt.t val copyReg : Lwt_util.region Copy a path in one replica to another path in a second replica . The copy val copy : [`Update of (Uutil.Filesize.t * Uutil.Filesize.t) | `Copy] ...
7357a5a8c872a203084b44885fe57cc110dbc4bb12697a120c06f61ed2d83106
gedge-platform/gedge-platform
rabbit_mgmt_wm_channel.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . %% -module(rabbit_mgmt_wm_channel). -export([init/2...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_management/src/rabbit_mgmt_wm_channel.erl
erlang
-------------------------------------------------------------------- --------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit_mgmt_wm_channel). -export([init/2, to_j...
39a02394378f669c6977f120d3ac9295cb86de098a01018c16ca71ce9ba93552
haskell-repa/repa
Sel.hs
# LANGUAGE UndecidableInstances # module Data.Array.Repa.Vector.Sel ( Sel2(..) , fromTags , fromFlags) where import Data.Array.Repa.Vector.Operators.Scan import Data.Array.Repa.Vector.Base import Data.Array.Repa as R import GHC.Exts import qualified Data.Vector.Unboxed as U ...
null
https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/icebox/abandoned/repa-vector-old/chains/Data/Array/Repa/Vector/Sel.hs
haskell
| O(1). Construct a selector. A selector is a description of how to perform a `combine` operation. Suppose we are evaluating the following expression: This is difficult to parallelise. For each element in the result, the source array we get this element from depends on the tag values associated with...
# LANGUAGE UndecidableInstances # module Data.Array.Repa.Vector.Sel ( Sel2(..) , fromTags , fromFlags) where import Data.Array.Repa.Vector.Operators.Scan import Data.Array.Repa.Vector.Base import Data.Array.Repa as R import GHC.Exts import qualified Data.Vector.Unboxed as U ...
8103070a58f4403736381cefa64c0f2e0c039ce25a4c152ef7654f8573360334
bytekid/mkbtt
nodex.mli
Copyright 2010 * GNU Lesser General Public License * * This file is part of MKBtt . * * 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 (...
null
https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mascott/src/nodex.mli
ocaml
** SUBMODULES ******************************************************** ** TYPES ************************************************************* ** VALUES ************************************************************
Copyright 2010 * GNU Lesser General Public License * * This file is part of MKBtt . * * 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 (...
26834528229bdd65b00869d754a5b681ca3d64b161d7689ad30841a28184a88b
typelead/intellij-eta
MagicHash00001.hs
# LANGUAGE MagicHash # module MagicHash00001 where -- Ripped from Data.List, verify I# constructor is valid. findIndices :: (a -> Bool) -> [a] -> [Int] #ifdef USE_REPORT_PRELUDE findIndices p xs = [ i | (x,i) <- zip xs [0..], p x] #else -- Efficient definition findIndices p ls = loop 0# ls where...
null
https://raw.githubusercontent.com/typelead/intellij-eta/ee66d621aa0bfdf56d7d287279a9a54e89802cf9/plugin/src/test/resources/fixtures/eta/sources/MagicHash00001.hs
haskell
Ripped from Data.List, verify I# constructor is valid. Efficient definition
# LANGUAGE MagicHash # module MagicHash00001 where findIndices :: (a -> Bool) -> [a] -> [Int] #ifdef USE_REPORT_PRELUDE findIndices p xs = [ i | (x,i) <- zip xs [0..], p x] #else findIndices p ls = loop 0# ls where loop _ [] = [] loop n (x:xs) | p x = ...
4917516536d32fa40079edf4ecdb0ae1d8955b1ca3becf0c3c15a34d5e869740
janestreet/core
test_stable.ml
open! Core open! Expect_test_helpers_core let%expect_test "[sexp_of_int] respects [sexp_of_int_style]" = let sexp_of_int = Core.Core_stable.sexp_of_int in let r = Int_conversions.sexp_of_int_style in let old = !r in r := `Underscores; print_s [%sexp (1234 : int)]; [%expect {| 1_234 |}]; r := `No_unde...
null
https://raw.githubusercontent.com/janestreet/core/4b6635d206f7adcfac8324820d246299d6f572fe/core/test/test_stable.ml
ocaml
open! Core open! Expect_test_helpers_core let%expect_test "[sexp_of_int] respects [sexp_of_int_style]" = let sexp_of_int = Core.Core_stable.sexp_of_int in let r = Int_conversions.sexp_of_int_style in let old = !r in r := `Underscores; print_s [%sexp (1234 : int)]; [%expect {| 1_234 |}]; r := `No_unde...
00ad9ffa30afa6207da0ecdfc6f9825d4ad1e364bb534985a9f94f1fe009467c
b3rnie/crontab
crontab_test.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% @doc Test support code 2012 %%% @end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%_* Module declaration =============================================== -module(crontab_test). %%%_* Exports ...
null
https://raw.githubusercontent.com/b3rnie/crontab/d7f8fb707298661cb374670380c98c3600bd16e8/src/crontab_test.erl
erlang
@doc Test support code @end _* Module declaration =============================================== _* Exports ========================================================== _* Includes ========================================================= _* Macros =========================================================== _* Code ...
2012 -module(crontab_test). -export([ execute_funs/1 , with_crontab/1 , waitfor/1 ]). execute_funs(Fs) -> lists:foreach(fun(F) -> F() end, Fs). with_crontab(F) -> try start_app(crontab), F() after stop_app(crontab) end. waitfor(App) -> case whereis(App) of undefined -> ok; ...
2dbcecd43f0e1103895f46100845d4eb20d917dd30547cc9953a640b530ba520
realworldocaml/examples
pattern_monomorphic_small.ml
type t = | Alice | Bob let test v = match v with | Alice -> 100 | Bob -> 101
null
https://raw.githubusercontent.com/realworldocaml/examples/32ea926861a0b728813a29b0e4cf20dd15eb486e/code/back-end/pattern_monomorphic_small.ml
ocaml
type t = | Alice | Bob let test v = match v with | Alice -> 100 | Bob -> 101
349e2a58d6ccdda1065f1cb4e5f1f43986eabdbd7dcfe50b44872c1591517f7d
CafeOBJ/cafeobj
list.lisp
;;;-*- Mode:Lisp; Syntax:Common-Lisp; Package:CHAOS -*- ;;; Copyright ( c ) 2000 - 2018 , . All rights reserved . ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; * Redistributions of source code ...
null
https://raw.githubusercontent.com/CafeOBJ/cafeobj/261e3a50407f568272321378df370e5cf7492aaf/comlib/list.lisp
lisp
-*- Mode:Lisp; Syntax:Common-Lisp; Package:CHAOS -*- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the follo...
Copyright ( c ) 2000 - 2018 , . All rights reserved . DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , (in-package :CHAOS) #-:chaos-debug (declaim (optimize (speed 3) (safety 0) #-GCL (debug 0))) #+:chaos-debug (declaim (optim...
1f1eabd8414bd5e855dbb3f21f7f7e65a3ff34fb7e866f40267c42468206b833
SleepyBag/leetcode-racket
1310.rkt
(require math/array) (define/contract (xor-queries arr queries) (-> (listof exact-integer?) (listof (listof exact-integer?)) (listof exact-integer?)) (let ((prefix-sum (list 0))) (for-each (lambda (n) (set! prefix-sum (cons (bitwise-xor (car prefix-sum) n) prefix-sum) ...
null
https://raw.githubusercontent.com/SleepyBag/leetcode-racket/84b8883160cf50f069e1bb8eabac46bb844c1bb2/1310.rkt
racket
(require math/array) (define/contract (xor-queries arr queries) (-> (listof exact-integer?) (listof (listof exact-integer?)) (listof exact-integer?)) (let ((prefix-sum (list 0))) (for-each (lambda (n) (set! prefix-sum (cons (bitwise-xor (car prefix-sum) n) prefix-sum) ...
f8b21539d41a5044e6f46981121575f20180e8fc286a6337fb95b426fc11b522
irastypain/sicp-on-language-racket
cons-point.rkt
#lang racket ; Конструктор точки и селекторы для получения координат (define (make-point x y) (cons x y)) (define (x-point p) (car p)) (define (y-point p) (cdr p)) процедур (provide make-point x-point y-point)
null
https://raw.githubusercontent.com/irastypain/sicp-on-language-racket/0052f91d3c2432a00e7e15310f416cb77eeb4c9c/src/lib/cons-point.rkt
racket
Конструктор точки и селекторы для получения
#lang racket координат (define (make-point x y) (cons x y)) (define (x-point p) (car p)) (define (y-point p) (cdr p)) процедур (provide make-point x-point y-point)
f9717df1d8b064c36e78705d4636a58386b4660be814931b468c2272607e369f
ml4tp/tcoq
evarconv.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/pretyping/evarconv.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** reducible but not necessarily reduc...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open CErrors open Util open N...
0adab146844332b1c4f0552b39c5212c7ee34c56315465f5def77cb310d061b6
chessai/we-tha-best-slack
Main.hs
# language ImportQualifiedPost , LambdaCase , OverloadedStrings # ImportQualifiedPost , LambdaCase , OverloadedStrings #-} module Main where import Control.Monad import Control.Monad.IO.Class (MonadIO, liftIO) import Data.Maybe import Data.Text (Text) import Data.Text qualified as T import Sys...
null
https://raw.githubusercontent.com/chessai/we-tha-best-slack/2564392832e70eca332a699306f9203821af3466/src/Main.hs
haskell
a message was sent.
# language ImportQualifiedPost , LambdaCase , OverloadedStrings # ImportQualifiedPost , LambdaCase , OverloadedStrings #-} module Main where import Control.Monad import Control.Monad.IO.Class (MonadIO, liftIO) import Data.Maybe import Data.Text (Text) import Data.Text qualified as T import Sys...
45ff0e9e2b02cd68ac013b6cb0e56135f3b057b0d94d28dc3afd18744e1059c4
archaelus/tsung
ts_http_common.erl
This code was developped by IDEALX ( / ) and %%% contributors (their names can be found in the CONTRIBUTORS file). Copyright ( C ) 2000 - 2004 IDEALX %%% %%% This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free S...
null
https://raw.githubusercontent.com/archaelus/tsung/b4ea0419c6902d8bb63795200964d25b19e46532/src/tsung/ts_http_common.erl
erlang
contributors (their names can be found in the CONTRIBUTORS file). This program is free software; you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANT...
This code was developped by IDEALX ( / ) and Copyright ( C ) 2000 - 2004 IDEALX it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or You should have received a copy of the GNU General Public License Foundation , Inc. ,...
e691b0433f1412b5cbf82e7e75bb37d5e5a98152c6faed295d284563547bcd04
orbitz/scow
append_entries_faulty.ml
open Core.Std open Async.Std module Elt = struct type t = int let compare = Int.compare end module Statem = struct type op = Elt.t type ret = unit type t = Int.Set.t ref let create () = ref Int.Set.empty let apply t op = t := Set.add !t op; Deferred.unit end module Log = Scow_log_memory.Make(...
null
https://raw.githubusercontent.com/orbitz/scow/feb633ef94824f44f0ffc679a548f97288c8ae48/examples/append_entries_faulty.ml
ocaml
open Core.Std open Async.Std module Elt = struct type t = int let compare = Int.compare end module Statem = struct type op = Elt.t type ret = unit type t = Int.Set.t ref let create () = ref Int.Set.empty let apply t op = t := Set.add !t op; Deferred.unit end module Log = Scow_log_memory.Make(...
5e11670b10eb6b859e4afa19bc219fd0e9a0cf66f34fd1343ddd52a41d935ccd
burtonsamograd/med
all.lisp
(eval-when (:compile-toplevel :load-toplevel) (unless (find-package :med) (sys.int::cal "package.lisp"))) (in-package :med) (defmacro awhen (cond &body body) `(let ((it ,cond)) (when it ,@body))) (defvar *loaded-files* ()) (defun cal-1 (path force-load) "Compile and load PATH. If the compil...
null
https://raw.githubusercontent.com/burtonsamograd/med/667c45032f60831447ad0eafd4d5c9a9748b4366/all.lisp
lisp
automatically choose 'smash existing class' when loading
(eval-when (:compile-toplevel :load-toplevel) (unless (find-package :med) (sys.int::cal "package.lisp"))) (in-package :med) (defmacro awhen (cond &body body) `(let ((it ,cond)) (when it ,@body))) (defvar *loaded-files* ()) (defun cal-1 (path force-load) "Compile and load PATH. If the compil...
d1d6cebc3430afa84ba352f654f5d8ab5fb4546896d165a0d65cf89ec93134f7
aryx/yacfe
oassoc_buffer.mli
(* !!take care!!: this classe have side effect, not a pure oassoc *) class ['a, 'b] oassoc_buffer : int -> (< add : 'a * 'b -> 'd; assoc : 'a -> 'b; del : 'a * 'b -> 'd; delkey : 'a -> 'd; iter : ('a * 'b -> unit) -> unit; length : int; keys: 'a list; clear: unit; .. > as 'd) -> object ('o) inherit ...
null
https://raw.githubusercontent.com/aryx/yacfe/86a4994822abca03ec9e03f1a7e60eca66db0a08/commons_ocollection/oassoc_buffer.mli
ocaml
!!take care!!: this classe have side effect, not a pure oassoc ocollection concrete instantiation of virtual methods oassoc concrete instantiation of virtual methods ugly, from objet class, extension trick
class ['a, 'b] oassoc_buffer : int -> (< add : 'a * 'b -> 'd; assoc : 'a -> 'b; del : 'a * 'b -> 'd; delkey : 'a -> 'd; iter : ('a * 'b -> unit) -> unit; length : int; keys: 'a list; clear: unit; .. > as 'd) -> object ('o) inherit ['a,'b] Oassoc.oassoc method empty : 'o method add : 'a * 'b -> ...
b6075a7acba8dad5a4f4e330537c13d12590883e424da6022a7fd893763e67d7
antono/guix-debian
graphviz.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2013 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the Lice...
null
https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/gnu/packages/graphviz.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2013 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gnu packages graphviz) #:use-module (guix packages) #:use-module (guix build-system gnu) #:u...
34dc1da87db0ed9155739ca324410cf45038daaf9a17f43e73afff658af8f16b
KirinDave/fuzed
port_wrapper.erl
-module(port_wrapper). -export([wrap/1, wrap/2, wrap_link/1, wrap_link/2, send/2, shutdown/1, rpc/2, pure_send/2]). -author('Dave Fayram'). wrap(Command) -> spawn(fun() -> process_flag(trap_exit, true), Port = create_port(Command), loop(Port, infinity, Command) end). wrap(Command, Timeout) -> spawn(fun() -> proces...
null
https://raw.githubusercontent.com/KirinDave/fuzed/56098d9e4c139613845289bdd5acebdfe608981a/elibs/port_wrapper.erl
erlang
We timed out, which means we need to close and then restart the port Hard and Unanticipated Crash Local API TODO: Add retry detection
-module(port_wrapper). -export([wrap/1, wrap/2, wrap_link/1, wrap_link/2, send/2, shutdown/1, rpc/2, pure_send/2]). -author('Dave Fayram'). wrap(Command) -> spawn(fun() -> process_flag(trap_exit, true), Port = create_port(Command), loop(Port, infinity, Command) end). wrap(Command, Timeout) -> spawn(fun() -> proces...
f871005e6b8ea535067210a24fc82539edfcd54895634cdc93c1b47e22c2b4ee
velveteer/slacker
Config.hs
module Slacker.Config ( SlackConfig(..) , defaultSlackConfig , setApiToken , setAppToken , setDebugDisconnect , setGracefulShutdownHandler , setNumThreads , setInboundQueueMax , setOnException , setLogLevel , withLogLevel , logStdout , logThread ) where import Control.Monad.Catch ...
null
https://raw.githubusercontent.com/velveteer/slacker/c4ee244107aeef568d6ee5dfee358756fd77daa3/src/Slacker/Config.hs
haskell
^ App token with connection scope to initiate websocket session ^ Maximum amount of work to keep queued up. Setting this higher can increase memory usage, but means threads are less likely to drop events during high traffic. Larger queues can also lead to longer graceful shutdown times if your app experiences high ...
module Slacker.Config ( SlackConfig(..) , defaultSlackConfig , setApiToken , setAppToken , setDebugDisconnect , setGracefulShutdownHandler , setNumThreads , setInboundQueueMax , setOnException , setLogLevel , withLogLevel , logStdout , logThread ) where import Control.Monad.Catch ...
1622685183be78d5b4c6837cf6ae26c7de3629075f7cb7b9673111d68ac137b8
mbutterick/beautiful-racket
sample-for.rkt
#lang basic-demo-3 10 for a = 1 to 3 21 for b = 9 to 7 step -1 22 print a : print b 23 next b 30 next a
null
https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/basic-demo-3/sample-for.rkt
racket
#lang basic-demo-3 10 for a = 1 to 3 21 for b = 9 to 7 step -1 22 print a : print b 23 next b 30 next a
38826f0444c5162854a2a3eec96912a7545ff2492dc01c2e576811a0279144bc
binaryage/clearcut
debug.clj
(ns clearcut.debug "Debug utils." (:require [clojure.pprint] [clojure.string :as string] [clearcut.log] [clearcut.config :as config])) (def log clearcut.log/log) (defmacro debug-assert [& args] (if (config/debug?) `(assert ~@args)))
null
https://raw.githubusercontent.com/binaryage/clearcut/7f44705cd8743f8679199cb78a215487eb411ed4/src/lib/clearcut/debug.clj
clojure
(ns clearcut.debug "Debug utils." (:require [clojure.pprint] [clojure.string :as string] [clearcut.log] [clearcut.config :as config])) (def log clearcut.log/log) (defmacro debug-assert [& args] (if (config/debug?) `(assert ~@args)))
ab2cc0e3b78cea3f3d7d836e278834b02759afd51cf029e443421be3383da987
pyr/recordbus
recordbus.clj
(ns org.spootnik.recordbus (:gen-class) (:require [org.spootnik.recordbus.sql :as sql] [org.spootnik.recordbus.kafka :as kafka] [org.spootnik.recordbus.config :as config] [cheshire.core :as json] [clojure.tools.logging :as log])) (defn cal...
null
https://raw.githubusercontent.com/pyr/recordbus/fdfb753645bac9be11dfdd6825731904219c7275/src/org/spootnik/recordbus.clj
clojure
(ns org.spootnik.recordbus (:gen-class) (:require [org.spootnik.recordbus.sql :as sql] [org.spootnik.recordbus.kafka :as kafka] [org.spootnik.recordbus.config :as config] [cheshire.core :as json] [clojure.tools.logging :as log])) (defn cal...
cb3043d41e20cd4b4b18557abac5745e651c22ff6f237cd775fc3a11ad5d5695
ijvcms/chuanqi_dev
util_json.erl
%%%------------------------------------------------------------------- @author zhengsiying ( C ) 2015 , < COMPANY > %%% @doc %%% %%% @end Created : 25 . 三月 2015 20:37 %%%------------------------------------------------------------------- -module(util_json). -include("util_json.hrl"). %% API -export([ encode/1...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/api/util/util_json.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API ==================================================================== API functions ==================================================================== ==========...
@author zhengsiying ( C ) 2015 , < COMPANY > Created : 25 . 三月 2015 20:37 -module(util_json). -include("util_json.hrl"). -export([ encode/1, decode/1 ]). encode(Rc) -> rfc4627:encode(Rc). decode(Bin) -> rfc4627:decode(Bin). Internal functions
788cff80ab09f8fb15d510c345a7798458f61cbc8df20d16c53d8a80bacce552
janestreet/merlin-jst
tast_helper.ml
open Typedtree module Pat = struct let pat_extra = [] let pat_attributes = [] let constant ?(loc=Location.none) pat_env pat_type c = let pat_desc = Tpat_constant c in let pat_mode = Types.Value_mode.newvar () in { pat_desc; pat_loc = loc; pat_extra; pat_attributes; pat_type; pat_mode; pat_env } l...
null
https://raw.githubusercontent.com/janestreet/merlin-jst/980b574405617fa0dfb0b79a84a66536b46cd71b/src/ocaml/merlin_specific/tast_helper.ml
ocaml
open Typedtree module Pat = struct let pat_extra = [] let pat_attributes = [] let constant ?(loc=Location.none) pat_env pat_type c = let pat_desc = Tpat_constant c in let pat_mode = Types.Value_mode.newvar () in { pat_desc; pat_loc = loc; pat_extra; pat_attributes; pat_type; pat_mode; pat_env } l...
268f537c8b52d8b9c83a163c08173da1a5bbfb7af688892d4376cf09a20116a3
DanielG/kvm-in-a-box
IP.hs
# LANGUAGE ScopedTypeVariables # module IP where import Safe import Numeric import Data.IP import Data.Word import Data.Bits import Data.List import Data.List.Split import GHC.Generics import Control.DeepSeq import Control.Arrow import BitUtils import MAC -- | CIDR prefix type Prefix = Int type Address a = (a, Pref...
null
https://raw.githubusercontent.com/DanielG/kvm-in-a-box/3c433eb5a473ac86bfec0c4926fc84643b77942c/src/IP.hs
haskell
| CIDR prefix
# LANGUAGE ScopedTypeVariables # module IP where import Safe import Numeric import Data.IP import Data.Word import Data.Bits import Data.List import Data.List.Split import GHC.Generics import Control.DeepSeq import Control.Arrow import BitUtils import MAC type Prefix = Int type Address a = (a, Prefix) showIP :: IP...
40055de1cfad927c5784118cdbc6b34ac6254a4b4bd2c06282aecbfdfcb9e429
rtoy/ansi-cl-tests
defgeneric-method-combination-max.lsp
;-*- Mode: Lisp -*- Author : Created : Sat May 24 21:31:55 2003 Contains : Tests of with : method - combination MAX (in-package :cl-test) (declaim (special *x*)) (compile-and-load "defgeneric-method-combination-aux.lsp") (deftest defgeneric-method-combination.max.1 (let ((*x* nil) (fn ...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/defgeneric-method-combination-max.lsp
lisp
-*- Mode: Lisp -*-
Author : Created : Sat May 24 21:31:55 2003 Contains : Tests of with : method - combination MAX (in-package :cl-test) (declaim (special *x*)) (compile-and-load "defgeneric-method-combination-aux.lsp") (deftest defgeneric-method-combination.max.1 (let ((*x* nil) (fn (eval '(defgeneri...