_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 |
|---|---|---|---|---|---|---|---|---|
8edf2cdeab72916a69b75cab57883048a87a5ef5d6761da97a795ebb293308e3 | camlp5/camlp5 | fstream.mli | (* camlp5r *)
(* fstream.mli,v *)
Copyright ( c ) INRIA 2007 - 2017
(* Module [Fstream]: functional streams *)
This module implement functional streams and parsers together with
backtracking parsers . To be used with syntax [ pa_fstream.cmo ] . The
syntax is :
For functional streams :
- stre... | null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/ocaml_src/lib/fstream.mli | ocaml | camlp5r
fstream.mli,v
Module [Fstream]: functional streams
* Functional streams
The type of 'a functional streams
[Fstream.from f] returns a stream built from the function [f].
To create a new stream element, the function [f] is called with
the current stream count. The user function [f] must re... | Copyright ( c ) INRIA 2007 - 2017
This module implement functional streams and parsers together with
backtracking parsers . To be used with syntax [ pa_fstream.cmo ] . The
syntax is :
For functional streams :
- stream : [ fstream [: ... :] ]
For functional parsers :
- parser : [ ... |
3b349eb5bd4c8b2057bad2d161c205a1cdd8f5c0a6f0a52af5dc3afaa6c3f6b8 | picnic/RelationExtraction | coq_stuff.ml | (****************************************************************************)
RelationExtraction - Extraction of inductive relations for Coq
(* *)
(* This program is free software: you can redistribute it and/or modify *)
it u... | null | https://raw.githubusercontent.com/picnic/RelationExtraction/a4cee37d0a8e5f0eff2e010e6305e037aa0d2564/coq_stuff.ml | ocaml | **************************************************************************
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
... | RelationExtraction - Extraction of inductive relations for Coq
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
Copyright 2... |
a0c61611a9caf1937e69856ae3c9d94cd3bb976350f38e248cc486bb186e24d6 | Factual/skuld | stress_test.clj | (ns skuld.stress-test
(:use clojure.tools.logging
clojure.test
skuld.util
skuld.node
skuld.node-test)
(:require [skuld.client :as client]
[skuld.admin :as admin]
[skuld.vnode :as vnode]
[skuld.flake ... | null | https://raw.githubusercontent.com/Factual/skuld/79599f9b13aee35c680183d6bf9e2fcbfde1d7c7/test/skuld/stress_test.clj | clojure | Claim all extant IDs
Make sure we never double-claim
Out of claims?
we do n't want them recovering data behind
our backs. ;-)
Enqueue something and claim it.
(->> replacements
(map vnodes)
(map vals)
(map (partial mapcat (fn [vnode]
(try (doall (vnode/tasks vnode))
... | (ns skuld.stress-test
(:use clojure.tools.logging
clojure.test
skuld.util
skuld.node
skuld.node-test)
(:require [skuld.client :as client]
[skuld.admin :as admin]
[skuld.vnode :as vnode]
[skuld.flake ... |
68424b9a9ef77e2a6f50db1c2cd1dee73006bf16fd679a4eef5bc1a8cd14fb98 | justinmeiners/lisp-interpreter | big_data2.scm | canada
(let ((data (read)))
(gc-flip)
(print-gc-statistics)
(newline)
(display "records: ")
(display (vector-length data)))
(gc-flip)
(print-gc-statistics)
| null | https://raw.githubusercontent.com/justinmeiners/lisp-interpreter/a84a24653fb46ecda32fb71a3a360b42e3253498/tests/data/big_data2.scm | scheme | canada
(let ((data (read)))
(gc-flip)
(print-gc-statistics)
(newline)
(display "records: ")
(display (vector-length data)))
(gc-flip)
(print-gc-statistics)
| |
a84b40741c9a00a6d98d3f86efea934941a246649f8aea298aa582f432c1fc13 | SimulaVR/godot-haskell | Tabs.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.Tabs
(Godot.Core.Tabs._ALIGN_RIGHT,
Godot.Co... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/Tabs.hs | haskell | | Emitted when the active tab is rearranged via mouse drag. See @drag_to_rearrange_enabled@.
| Emitted when a tab is right-clicked.
| Emitted when switching to another tab.
| Emitted when a tab is clicked, even if it is the current tab.
| Emitted when a tab is closed.
| Emitted when a tab is hovered by the mouse.... | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.Tabs
(Godot.Core.Tabs._ALIGN_RIGHT,
Godot.Co... |
57b542c8f6aeb64f91d25e0c624d6e3d4bb407c278505a9ecda05afbd35ec4b8 | hstreamdb/hstream | Boilerplate.hs | {-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE StandaloneDeriving #
module HStream.SQL.Codegen.V1.Boilerplate where
import Data.Aeson
import qualified Data.Aeson ... | null | https://raw.githubusercontent.com/hstreamdb/hstream/35b2284d122202a6ad7efc98e6c6304b68a0e49d/hstream-sql/src/HStream/SQL/Codegen/V1/Boilerplate.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings # | # LANGUAGE FlexibleInstances #
# LANGUAGE RecordWildCards #
# LANGUAGE StandaloneDeriving #
module HStream.SQL.Codegen.V1.Boilerplate where
import Data.Aeson
import qualified Data.Aeson as Aeson
import qualified Data.Binary as B
import Dat... |
6fcf419940f0efab4265584a31089b476546fffa32945e6c20e03b4b844e448c | TrustInSoft/tis-kernel | gui_printers.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/gui/gui_printers.mli | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
de5cdbfcab4dd6e056a5a8923a7beb13a95745ad538bee692a34f605e471f240 | illiichi/orenolisp | conversion_test.clj | (ns model.conversion-test
(:require [clojure.test :refer [deftest testing is] :as t]
[orenolisp.model.editor :as ed]
[orenolisp.model.conversion :as conv]))
(deftest reflexivity-of-conversion
(doseq [sexp ['()
'(1)
'[[[1]] 3 4/5]
'(a [b c])... | null | https://raw.githubusercontent.com/illiichi/orenolisp/7b085fb687dbe16b5cbe8c739238bbaf79156814/test/model/conversion_test.clj | clojure | (ns model.conversion-test
(:require [clojure.test :refer [deftest testing is] :as t]
[orenolisp.model.editor :as ed]
[orenolisp.model.conversion :as conv]))
(deftest reflexivity-of-conversion
(doseq [sexp ['()
'(1)
'[[[1]] 3 4/5]
'(a [b c])... | |
509db4c6509484d64d76cd6d26788ded5e029b35ce553a3d8aab838dac35e88d | vyos/vyconf | vyconf_config_test.ml | open OUnit2
open Vyconf_config
let try_load file =
let conf = load file in
match conf with
| Ok _ -> ()
| Error msg -> assert_failure msg
let try_load_fail file err =
let conf = load file in
match conf with
| Ok _ -> assert_failure err
| Error msg -> ()
let test_load_nonexistent_file... | null | https://raw.githubusercontent.com/vyos/vyconf/dd9271b4304c6b1a5a2576821d1b2b8fd3aa6bf5/test/vyconf_config_test.ml | ocaml | Please don't create this file there! | open OUnit2
open Vyconf_config
let try_load file =
let conf = load file in
match conf with
| Ok _ -> ()
| Error msg -> assert_failure msg
let try_load_fail file err =
let conf = load file in
match conf with
| Ok _ -> assert_failure err
| Error msg -> ()
let test_load_nonexistent_file... |
9da347c52623ece16ea4f03079bd057818090ff162018953a624b71eb22ae3b1 | mzp/coq-ide-for-ios | tacticals.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/tactics/tacticals.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i
i
Tacticals i.e. functions from t... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : tacticals.mli 13323... |
aa1c6720f4a1eb03e6603765c3a55600a28d449cd5382a64b70b68596ce0ac21 | sile/cl-asm | cl-asm.lisp | (in-package :cl-asm)
TODO : 32bit対応
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; types
(deftype byte-width () '(member 1 2 4 8))
(deftype address () 'integer)
(defstruct operand)
(defstruct (destination (:include operand))
(size 0 :type byte-width))
(defstruct (reg (:include destination)) ;; XXX: incorrect-... | null | https://raw.githubusercontent.com/sile/cl-asm/141f998d195ba5a0e990f547903a04c219cc887d/cl-asm.lisp | lisp |
types
XXX: incorrect-name
TODO: error message
TODO: extend
XXX
XXX: name
TODO: check size of register
index
default-imm-size
disp-len-map
index
default-imm-size
disp-len-map
XXX: name
TODO: 整理 | (in-package :cl-asm)
TODO : 32bit対応
(deftype byte-width () '(member 1 2 4 8))
(deftype address () 'integer)
(defstruct operand)
(defstruct (destination (:include operand))
(size 0 :type byte-width))
(name t :type symbol)
(code 0 :type (mod 8)))
(defstruct (label (:include operand))
(name t :type symbol)
... |
43d673ac9b442fd4864493efa615b5ca2f6b417b1ef8514fab0c0289a3c3cbde | frex-project/metaocaml-frex | printf_example.ml | A small - scale example illustrating partially - static monoids .
References for the unstaged printf function :
Functional Unparsing
May 1998 -- JFP 8(6):621 - 625 , 1998 , extended version
On typing delimited continuations : three new solutions to the
printf problem
... | null | https://raw.githubusercontent.com/frex-project/metaocaml-frex/e249551a41bd6a8af1a95d77bf9946822a19e3b0/test/printf_example.ml | ocaml | * A staged version of Printf_unstaged -- identical except for
quoting and splicing annotations and the 'code' type constructor.
The continuation function is treated as static, and so it doesn't
appear in the generated code.
* An improved version of Printf_staged that uses partially-static
strings rath... | A small - scale example illustrating partially - static monoids .
References for the unstaged printf function :
Functional Unparsing
May 1998 -- JFP 8(6):621 - 625 , 1998 , extended version
On typing delimited continuations : three new solutions to the
printf problem
... |
c331a522d13819bc7ac0548ef80d6d4873e4f74f5851b953ca2a77c47c07e596 | well-typed-lightbulbs/ocaml-esp32 | uchar.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/stdlib/uchar.mli | ocaml | ************************************************************************
OCaml
... |
Copyright 2014 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* Unicode characters .
@since 4.03
@since 4.03 *)
type t
* The type for Unicode characters .
... |
067aaea288adf3dd3911be1724e3f35e7374f7e2be9c4cba14d7e18379779b0b | edicl/cl-who | util.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - WHO ; Base : 10 -*-
$ Header : /usr / local / cvsrep / cl - who / util.lisp , v 1.4 2009/01/26 11:10:49 edi Exp $
Copyright ( c ) 2003 - 2009 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or without
;;; modif... | null | https://raw.githubusercontent.com/edicl/cl-who/0d3826475133271ee8c590937136c1bc41b8cbe0/util.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - WHO ; Base : 10 -*-
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 ... | $ Header : /usr / local / cvsrep / cl - who / util.lisp , v 1.4 2009/01/26 11:10:49 edi Exp $
Copyright ( c ) 2003 - 2009 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package :cl-w... |
c40b36923e468fe100b3e4949f636e94724c801e40ec225339677be4fe61e86a | nitrogen/NitrogenProject.com | demos_api.erl | -module (demos_api).
-include_lib ("nitrogen_core/include/wf.hrl").
-compile(export_all).
main() -> #template { file="./templates/demos46.html" }.
title() -> "Javascript API".
headline() -> "Javascript API".
left() ->
[
"
<p>
The <code>#api{}</code> element allows you to create a
... | null | https://raw.githubusercontent.com/nitrogen/NitrogenProject.com/b4b3a0dbe17394608d2ee6eaa089e3ece1285075/src/demos/demos_api.erl | erlang | however, to demonstrate the fact that the elements work with pure javascript with no
Notice the argument pattern matching! | -module (demos_api).
-include_lib ("nitrogen_core/include/wf.hrl").
-compile(export_all).
main() -> #template { file="./templates/demos46.html" }.
title() -> "Javascript API".
headline() -> "Javascript API".
left() ->
[
"
<p>
The <code>#api{}</code> element allows you to create a
... |
ede7905f44f8a02d3accef285eec647b83b8b5c6c1962bd53d54f87c29507f21 | EveryTian/Haskell-Codewars | ready-for-prime-time.hs | -- -for-prime-time
module PrimeTime where
prime :: Int -> [Int]
prime n
| n <= 1 = []
| n == 2 = [2]
| otherwise = reverse $ addItem 3 [2] n
where addItem x retArr n
| x > n = retArr
| otherwise = if isPrime x $ reverse retArr
then addItem (x + 2) (x... | null | https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/5kyu/ready-for-prime-time.hs | haskell | -for-prime-time |
module PrimeTime where
prime :: Int -> [Int]
prime n
| n <= 1 = []
| n == 2 = [2]
| otherwise = reverse $ addItem 3 [2] n
where addItem x retArr n
| x > n = retArr
| otherwise = if isPrime x $ reverse retArr
then addItem (x + 2) (x:retArr) n
... |
fe08dfba0dc7602909d27cb373bcf3605b60ec5dffc8cb0f60352c62a2a9309e | yesodweb/serversession | HomeSpec.hs | module Handler.HomeSpec (spec) where
import TestImport
-- The test was put on hold because the Example and the reality are too far apart.
-- If I find any bugs, I may add them here.
spec :: Spec
spec = return ()
-- spec = withApp $ do
-- it "loads the index and checks it looks right" $ do
-- get HomeR
... | null | https://raw.githubusercontent.com/yesodweb/serversession/bdede5fb660890df670f103d64a5e69024b13e57/examples/serversession-example-yesod-persistent/test/Handler/HomeSpec.hs | haskell | The test was put on hold because the Example and the reality are too far apart.
If I find any bugs, I may add them here.
spec = withApp $ do
it "loads the index and checks it looks right" $ do
get HomeR
request $ do
setUrl HomeR
fileByLabel "Choose a file" "test/Spec.... | module Handler.HomeSpec (spec) where
import TestImport
spec :: Spec
spec = return ()
statusIs 200
setMethod " POST "
addToken
byLabel " What 's on the file ? " " Some Content "
statusIs 200
htmlCount " .message " 1
htmlAllContain " .m... |
50eee89281e49073bf51516247faf9a5f6cc5a307141d8f55e411136c2afcaa2 | emqx/emqx | emqx_rule_engine_api.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_rule_engine/src/emqx_rule_engine_api.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_rule_engine_api).
-include("rule_engine.hrl").
-include_lib("emqx/include/logger.h... |
1aa2031ed6e5bb2550f4591df7fd5663148312ffa3e7ff5ca01f5e7fdfa564e4 | Clojure2D/clojure2d-examples | perlin.clj | (ns rt4.the-next-week.ch10.perlin
(:require [fastmath.core :as m]
[fastmath.vector :as v]
[fastmath.random :as r])
(:import [fastmath.vector Vec3]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defrecord Perlin [ranvec perm-x perm-y p... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9d294e9073cfb8680b7f82ce40a661ef2feff384/src/rt4/the_next_week/ch10/perlin.clj | clojure | (ns rt4.the-next-week.ch10.perlin
(:require [fastmath.core :as m]
[fastmath.vector :as v]
[fastmath.random :as r])
(:import [fastmath.vector Vec3]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defrecord Perlin [ranvec perm-x perm-y p... | |
74020ebb55b81d77b8809366bab0d11791f6d1cfab6f9dfb30fa524ff5681502 | onedata/op-worker | async_request_manager.erl | %%%-------------------------------------------------------------------
@author
( C ) 2019 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% This module monitors execution of ... | null | https://raw.githubusercontent.com/onedata/op-worker/b0e4045090b180f28c79d40b9b334d7411ec3ca5/src/modules/communication/router/async_request_manager.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
This module monitors execution of client requests and periodically
send heartbeat messages to inform him that his requests are still being
handled or error messages in c... | @author
( C ) 2019 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
( ReqId , Pid ) | - pending_requests : # { } |
( ReqId , Pid ) | - pending_requests : # { ReqId = > Pid } |
( ReqId , Pid ) | - pending_req... |
06a55672d62f44fa015c413feaf9831903e00fc40b6567be631ad645985f55fd | bsansouci/bsb-native | question.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Galli... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/debugger/question.mli | ocaml | *********************************************************************
OCaml
... | , projet Gallium , INRIA Rocquencourt
Copyright 2006 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
val yes_or_no : string -> bool
|
7a94458c185d5e0e1b70014c2c11e6acb90ce92d3222db151e87c9c9506079cb | airalab/hs-web3 | Block.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
Module : Network . . Api . Block
Copyright : 2016 - 2021
-- License : Apache-2.0
--
-- Maintainer :
-- Stability : experimental
-- Portability : unknown
--
-- Api calls with `block` prefix.
--
module Network.Ipfs.Api.Block where
import ... | null | https://raw.githubusercontent.com/airalab/hs-web3/c03b86eb621f963886a78c39ee18bcec753f17ac/packages/ipfs/src/Network/Ipfs/Api/Block.hs | haskell | # LANGUAGE OverloadedStrings #
|
License : Apache-2.0
Maintainer :
Stability : experimental
Portability : unknown
Api calls with `block` prefix.
|
Module : Network . . Api . Block
Copyright : 2016 - 2021
module Network.Ipfs.Api.Block where
import Control.Monad.IO.Class (MonadIO)
import Data.Aeson (decode)
import Data.Text (Text)
import Network.HTTP.Clie... |
2f802d63a79e6ae1ac724e4ec6e113f8a6324116b8f2c5f891a408e023b410ea | fgalassi/cs61a-sp11 | h10.1.scm | (load "im-client")
(define (im who message)
;;;Send message to who.
(if (not (list? who)) (set! who (list who)))
(for-each (lambda (client)
(if (not
(send-request (make-request whoiam client 'send-msg message) port-to-server))
(close-connection)))
who))
| null | https://raw.githubusercontent.com/fgalassi/cs61a-sp11/66df3b54b03ee27f368c716ae314fd7ed85c4dba/homework/h10.1.scm | scheme | Send message to who. | (load "im-client")
(define (im who message)
(if (not (list? who)) (set! who (list who)))
(for-each (lambda (client)
(if (not
(send-request (make-request whoiam client 'send-msg message) port-to-server))
(close-connection)))
who))
|
3355e272947a16a5894efcb8a7baf5a466bd0fd5235354e2f01a140c3e896f98 | input-output-hk/qeditas | hash.ml | Copyright ( c ) 2015 The Qeditas developers
Distributed under the MIT software license , see the accompanying
file COPYING or -license.php .
file COPYING or -license.php. *)
open Big_int
open Hashaux
open Sha256
open Ripemd160
open Ser
type hashval = int32 * int32 * int32 * int32 * int32
let hash160 s = ... | null | https://raw.githubusercontent.com/input-output-hk/qeditas/f4871bd20833cd08a215f9d5fc9df2d362cba410/src/hash.ml | ocaml | ** x:int32 **
** x:int64 **
** x and y are hashvals **
** hashopair, x and y are hashval options ** | Copyright ( c ) 2015 The Qeditas developers
Distributed under the MIT software license , see the accompanying
file COPYING or -license.php .
file COPYING or -license.php. *)
open Big_int
open Hashaux
open Sha256
open Ripemd160
open Ser
type hashval = int32 * int32 * int32 * int32 * int32
let hash160 s = ... |
567c54c1a2227390c24c415643a892a05a2bc57185268000aeeb9252ef5c0bc8 | odis-labs/helix | Todos.ml | type t =
{ items : (string * bool) list; filter : [ `all | `completed | `remaining ] }
let empty = { items = []; filter = `all }
let add todo todos = { todos with items = todo :: todos.items }
let length todos = List.length todos.items
let remove title todos =
{ todos with items = List.remove_assq title todos.ite... | null | https://raw.githubusercontent.com/odis-labs/helix/05d59aa6c13621275c31953a3515ee8843508f9e/examples/jsx-jsoo-re/Todos.ml | ocaml | type t =
{ items : (string * bool) list; filter : [ `all | `completed | `remaining ] }
let empty = { items = []; filter = `all }
let add todo todos = { todos with items = todo :: todos.items }
let length todos = List.length todos.items
let remove title todos =
{ todos with items = List.remove_assq title todos.ite... | |
c247034b19ab5b621d81a8926032dad9563b25850c33b2557f4768e07b2844f4 | RichiH/git-annex | UpgradeWatcher.hs | git - annex assistant thread to detect when git - annex is upgraded
-
- Copyright 2013 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2013 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
module Assistant.Threads.UpgradeWatcher (
up... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Assistant/Threads/UpgradeWatcher.hs | haskell | Ignore bogus events generated during the startup scan.
We ask the watcher to not generate them, but just to be safe..
(For example, other associated files may be being put into
place.) Not needed when using a distribution bundle, because
in that case git-annex handles the upgrade in a non-racy way. | git - annex assistant thread to detect when git - annex is upgraded
-
- Copyright 2013 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2013 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
module Assistant.Threads.UpgradeWatcher (
up... |
d20bad8a7d674ce6e45d5f49a41b17d72adca1956bce1f0d32ec6650fe0261fd | FundingCircle/jackdaw | confluent_test.clj | (ns jackdaw.serdes.json-schema.confluent-test
(:require [jackdaw.serdes.json-schema.confluent :as jsco]
[jackdaw.serdes.avro.schema-registry :as reg]
[clojure.data.json :as json]
[clojure.test :refer [deftest is testing] :as test]))
(defn ->serde
([schema-str]
(->serde schema... | null | https://raw.githubusercontent.com/FundingCircle/jackdaw/1e51947eb0b4e882972d7bacd5c3ba0e77f89327/test/jackdaw/serdes/json_schema/confluent_test.clj | clojure | if no schema dont fail on invalid schema | (ns jackdaw.serdes.json-schema.confluent-test
(:require [jackdaw.serdes.json-schema.confluent :as jsco]
[jackdaw.serdes.avro.schema-registry :as reg]
[clojure.data.json :as json]
[clojure.test :refer [deftest is testing] :as test]))
(defn ->serde
([schema-str]
(->serde schema... |
fcbe6405ff6317f5c35ce71ce2266b1f596ba7a1e24cd1cd74142aad4c8ad000 | nuttycom/aftok | Bitcoin.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE TemplateHaskell #
module Aftok.Currency.Bitcoin
( Satoshi (..),
_Satoshi,
ssub,
NetworkMode (..),
renderNetworkMode,
parseNetworkMode,
getNetwork,
H.Address,
)
where
import Bippy.Types (Satoshi (..))
import Cont... | null | https://raw.githubusercontent.com/nuttycom/aftok/54e7812859054a4b59fb802a1996ffb4de6c9bed/lib/Aftok/Currency/Bitcoin.hs | haskell | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE TemplateHaskell #
module Aftok.Currency.Bitcoin
( Satoshi (..),
_Satoshi,
ssub,
NetworkMode (..),
renderNetworkMode,
parseNetworkMode,
getNetwork,
H.Address,
)
where
import Bippy.Types (Satoshi (..))
import Cont... | |
11809b6a1605b0fac0a36ddbbb3d7b96687d744a34316e671cf5cfdce1246fc3 | goldfirere/singletons | Singletons.hs | # LANGUAGE DataKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE NoNamedWildCards #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
-----------------------------------------------------------------------------
-- |
Module : Data . . Singletons
Copyright : ( C ... | null | https://raw.githubusercontent.com/goldfirere/singletons/a169d3f6c0c8e962ea2983f60ed74e507bca9b2b/singletons-base/src/Data/Traversable/Singletons.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see LICENSE)
Stability : experimental
Portability : non-portable
--------------------------------------------------------------------------
* Defunctionalization symbols
left to right.
A definition of '... | # LANGUAGE DataKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE NoNamedWildCards #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
Module : Data . . Singletons
Copyright : ( C ) 2018
Maintainer :
Defines the promoted and singled versions of the ' ... |
65c1da7a0a67d6669617d9867f560cbe3eb05e5bfa8ca357ca2ef3c4543238ee | cxxxr/apispec | media-type.lisp | (uiop:define-package #:apispec/classes/media-type
(:use #:cl)
(:use-reexport #:apispec/classes/media-type/class
#:apispec/classes/media-type/parse))
(in-package #:apispec/classes/media-type)
| null | https://raw.githubusercontent.com/cxxxr/apispec/4bdd238f6b5effed305d284e0e6b7cef214e94a2/src/classes/media-type.lisp | lisp | (uiop:define-package #:apispec/classes/media-type
(:use #:cl)
(:use-reexport #:apispec/classes/media-type/class
#:apispec/classes/media-type/parse))
(in-package #:apispec/classes/media-type)
| |
8b29ff148def6a32ed0d35cd1ebf35a64595f8b88b4b04f23099981a680f298b | truqu/cut | test_cut.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/truqu/cut/df35bf5f6999bdb16ce548073b284ca06b6bcb18/test/src/test_cut.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
this isn't gett... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is Erlando .
The Initial Developer of the Original Code is VMware , Inc.
Copyright ( c ) 2011 - 2013 VMware , Inc. All rights reserved .
-module(test_c... |
0a6dc1d7a0f5df4d4add8e23b1d1311d014d69e8f66f16c357cd81d9b618da82 | k0001/di | Setup.hs | #! /usr/bin/env nix-shell
#! nix-shell ./shell.nix -i runghc
import Distribution.Simple
main = defaultMain
| null | https://raw.githubusercontent.com/k0001/di/91606e55d215bfe36be1fa48ed63a5787a6e10d8/df1/Setup.hs | haskell | #! /usr/bin/env nix-shell
#! nix-shell ./shell.nix -i runghc
import Distribution.Simple
main = defaultMain
| |
a26d441cc8888e48338cdaad36c02ece4edee80defc4e135f83eced9efabed6c | mightybyte/zeus | Route.hs | # LANGUAGE EmptyCase #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
module Common.Route where
-- Y... | null | https://raw.githubusercontent.com/mightybyte/zeus/5566e3244f1ab0cd245e4c36be315a5abddb5810/common/src/Common/Route.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
# LANGUAGE OverloadedStrings #
You will probably want these imports for composing Encoders .
----------------------------------------------------------------------------
----------------------------------------------------------------------------
This needs to match the Bac... | # LANGUAGE EmptyCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE TemplateHaskell #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
module Common.Route where
import Prelude hiding ( i d , ( . ) )
import Control . Category
import Prelude hiding (... |
229c770096e7e12e08b0fefcb279e2fb3d6cac78c5e7ae0372025216264cea58 | nubank/k8s-api | custom_resource_definition.clj | (ns kubernetes-api.extensions.custom-resource-definition
(:require [camel-snake-kebab.core :as csk]
[clojure.string :as string]
[kubernetes-api.misc :as misc]))
(defn new-route-name
[verb group version scope kind {:keys [all-namespaces]}]
(letfn [(prefix [k8s-verb]
(case k8s-v... | null | https://raw.githubusercontent.com/nubank/k8s-api/5d8fb2e3ef789222f98092d48af454d297a41bc7/src/kubernetes_api/extensions/custom_resource_definition.clj | clojure | TODO: Fix Watch requests | (ns kubernetes-api.extensions.custom-resource-definition
(:require [camel-snake-kebab.core :as csk]
[clojure.string :as string]
[kubernetes-api.misc :as misc]))
(defn new-route-name
[verb group version scope kind {:keys [all-namespaces]}]
(letfn [(prefix [k8s-verb]
(case k8s-v... |
d12bf743501fb4fbf0495d6b04bb66623f9ed6879877a61e5061e689f19bf677 | joelburget/lvca | Sort.mli | (** Sorts divide ASTs into syntactic categories.
We don't allow higher-order sorts. In other words, no functions at the sort level. In
other words, the head of an application is always concrete. *)
open Lvca_util
type t =
| Ap of Provenance.t * string * t list (** A higher-kinded sort can be applied *)
| ... | null | https://raw.githubusercontent.com/joelburget/lvca/1cc58167dfd6f03b44920cdd9c4c1ff5c2ee3532/syntax/Sort.mli | ocaml | * Sorts divide ASTs into syntactic categories.
We don't allow higher-order sorts. In other words, no functions at the sort level. In
other words, the head of an application is always concrete.
* A higher-kinded sort can be applied | open Lvca_util
type t =
| Name of Provenance.t * string
val mk_Ap : ?provenance:Provenance.t -> string -> t list -> t
val mk_Name : ?provenance:Provenance.t -> string -> t
val equivalent : ?info_eq:(Provenance.t -> Provenance.t -> bool) -> t -> t -> bool
val ( = ) : t -> t -> bool
val info : t -> Provenance.t
val p... |
8c5d4b759b86460f445cd25a32db67a4db2a8558ffc06ef2c964fbd4d0acbd91 | pirapira/coq2rust | fourier.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/plugins/fourier/fourier.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Méthode d'élimination de Fourier
... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Référence :
Auteur(s ) : ... |
ac4261b588be58cec6c8d64a27127c07723e1202e2931001abeaad6cd1b3b80c | borodust/alien-works | canvas.lisp | (cl:in-package :alien-works.graphics)
(declaim (special *canvas*))
(defvar *paint-stack* (make-array 1 :fill-pointer 0 :adjustable t))
(defvar *font-stack* (make-array 1 :fill-pointer 0 :adjustable t))
(defparameter *pi-degree* (float (/ 180 pi) 0f0))
(defvar *canvas-task-queue* nil)
;;;
;;; PAINT
;;;
(defun %push... | null | https://raw.githubusercontent.com/borodust/alien-works/cee506e0b13b6f2d278699e12c7983200c66655b/src/graphics/canvas.lisp | lisp |
PAINT
FONT
UNBUFFERED TEXTURE
DRAW COMMAND
COMMAND QUEUE
CONTEXT
DRAWING
| (cl:in-package :alien-works.graphics)
(declaim (special *canvas*))
(defvar *paint-stack* (make-array 1 :fill-pointer 0 :adjustable t))
(defvar *font-stack* (make-array 1 :fill-pointer 0 :adjustable t))
(defparameter *pi-degree* (float (/ 180 pi) 0f0))
(defvar *canvas-task-queue* nil)
(defun %push-paint ()
(let (... |
96baf0d8bc0d398a983f3591ffff982fbb6ecb8110412ab48024c3f97c40679c | janestreet/base | indexed_container.ml | open! Import
module Array = Array0
include Indexed_container_intf
let with_return = With_return.with_return
let iteri ~fold t ~f =
ignore
(fold t ~init:0 ~f:(fun i x ->
f i x;
i + 1)
: int)
;;
let foldi ~fold t ~init ~f =
let i = ref 0 in
fold t ~init ~f:(fun acc v ->
let acc = f !i ... | null | https://raw.githubusercontent.com/janestreet/base/1462b7d5458e96569275a1c673df968ecbf3342f/src/indexed_container.ml | ocaml | open! Import
module Array = Array0
include Indexed_container_intf
let with_return = With_return.with_return
let iteri ~fold t ~f =
ignore
(fold t ~init:0 ~f:(fun i x ->
f i x;
i + 1)
: int)
;;
let foldi ~fold t ~init ~f =
let i = ref 0 in
fold t ~init ~f:(fun acc v ->
let acc = f !i ... | |
086f82258344ea0f3027ee8d80b312e0df2ad705d9a52e587eb70c118c49a7f2 | steffan-westcott/clj-otel | counter_service.clj | (ns tutorial.counter-service
"Instrumented version of tutorial counter-service application."
(:require [ring.adapter.jetty :as jetty]
[ring.middleware.params :as params]
[ring.util.response :as response]
[steffan-westcott.clj-otel.api.trace.http :as trace-http]
[steff... | null | https://raw.githubusercontent.com/steffan-westcott/clj-otel/c7fce427ed2fb0c4d64dad23cf1e8eb2a7cb58d9/tutorial/instrumented/src/tutorial/counter_service.clj | clojure | (ns tutorial.counter-service
"Instrumented version of tutorial counter-service application."
(:require [ring.adapter.jetty :as jetty]
[ring.middleware.params :as params]
[ring.util.response :as response]
[steffan-westcott.clj-otel.api.trace.http :as trace-http]
[steff... | |
af205046da1f1f59efb0d1dc97607041b4315630ac27c040de2e05e2522d7911 | Zulu-Inuoe/jzon | schubfach.lisp | ;;
This implementation was ported from the Scala version in
;; jsoniter found here:
;; <-scala/blob/master/jsoniter-scala-core/jvm/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/core/JsonWriter.scala>
which is in turn based on the Java version here :
;;
;;
;; NOTE - There are many improvements to be made ... | null | https://raw.githubusercontent.com/Zulu-Inuoe/jzon/7ed58c0fd1fad57b874abec012f68efaa0ed09ee/src/schubfach.lisp | lisp |
jsoniter found here:
<-scala/blob/master/jsoniter-scala-core/jvm/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/core/JsonWriter.scala>
NOTE - There are many improvements to be made by properly
versions use signed types everywhere, and this can often
get in the way of optimizations and co... | This implementation was ported from the Scala version in
which is in turn based on the Java version here :
defining numerical ranges of variables . The Java and Scala
CL 's number system ( hence the % int32 and such macros
5x the builtin writer on SBCL , with about 7x with ( speed 3 )
(d... |
7cbc9ab4be3e56dbf10f0e460dafbfe6a1d51ff129d6622b1ba3bbea18edc868 | manuel-serrano/bigloo | walk.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / comptime / Reduce / walk.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/comptime/Reduce/walk.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* The Reduction optimizations */
*===========================... | * serrano / prgm / project / bigloo / comptime / Reduce / walk.scm * /
* Author : * /
* Creation : Thu Jul 13 10:25:23 1995 * /
* Last change : Sat Feb 15 14:00:10 2014 ( serrano ) * /
* Copy... |
72705b9272bb57300aa1d86d62c18954e5e5681e8e0a77b0893dbb9f464a15a0 | daypack-dev/daypack-lib | ranges.ml | let normalize (type a) ?(skip_filter_invalid = false)
?(skip_filter_empty = false) ?(skip_sort = false) ~(modulo : int64 option)
~(to_int64 : a -> int64) ~(of_int64 : int64 -> a) (s : a Range.range Seq.t)
: a Range.range Seq.t =
match modulo with
| None ->
s
|> Seq.map (Range.int64_exc_range_of_ra... | null | https://raw.githubusercontent.com/daypack-dev/daypack-lib/63fa5d85007eca73aa6c51874a839636dd0403d3/src/ranges.ml | ocaml | not sure what would be a reasonable normalization procedure when domain is a field | let normalize (type a) ?(skip_filter_invalid = false)
?(skip_filter_empty = false) ?(skip_sort = false) ~(modulo : int64 option)
~(to_int64 : a -> int64) ~(of_int64 : int64 -> a) (s : a Range.range Seq.t)
: a Range.range Seq.t =
match modulo with
| None ->
s
|> Seq.map (Range.int64_exc_range_of_ra... |
b0f20e5d1398e03dc6548acb0f42b85f916a77653417d830a9c2d677027326c2 | ropas/sparrow | structBlk.mli | (***********************************************************************)
(* *)
Copyright ( c ) 2007 - present .
Programming Research Laboratory ( ROPAS ) , Seoul National University .
(* All rights reserved... | null | https://raw.githubusercontent.com/ropas/sparrow/3ec055b8c87b5c8340ef3ed6cde34f5835865b31/src/domain/structBlk.mli | ocaml | *********************************************************************
All rights reserved.
See the LICENSE file for details. ... | Copyright ( c ) 2007 - present .
Programming Research Laboratory ( ROPAS ) , Seoul National University .
This software is distributed under the term of the BSD license .
module Struct : AbsDom.SET with type t = string
module PowStruct : PowDom.CPO with type elt = Stru... |
dfdbbb0fc0eb3a21bc0756d14dda547bda2f6a5f5ef35319bb658a07fefde2e6 | jstepien/mutant | colls.clj | (ns mutant.core-test.src.colls)
(defn all? [xs]
(reduce #(and %1 %2) (for [x xs] (boolean x))))
| null | https://raw.githubusercontent.com/jstepien/mutant/fb25d27bc8d53d875cf18dad43acf7eb5fc57b3b/test/mutant/core_test/src/colls.clj | clojure | (ns mutant.core-test.src.colls)
(defn all? [xs]
(reduce #(and %1 %2) (for [x xs] (boolean x))))
| |
7b05b9575f00a314ffc32ce26723a9d8386852066c587da112712197d4b228d6 | Cantido/clj-bittorrent | encode.clj | (ns clj-bittorrent.message.encode
(:require [clj-bittorrent.math.binary :as bin]
[clj-bittorrent.message.schema :refer :all])
(:import (java.nio.charset StandardCharsets)))
(defn keep-alive
"Builds a kee-alive message. Peers may close a connection if they receive
no messages (keep-alive or any o... | null | https://raw.githubusercontent.com/Cantido/clj-bittorrent/5fea93e318f9d07e4bbee6aced12e10ae0f46f2a/src/clj_bittorrent/message/encode.clj | clojure | (ns clj-bittorrent.message.encode
(:require [clj-bittorrent.math.binary :as bin]
[clj-bittorrent.message.schema :refer :all])
(:import (java.nio.charset StandardCharsets)))
(defn keep-alive
"Builds a kee-alive message. Peers may close a connection if they receive
no messages (keep-alive or any o... | |
e4e843222992d24cfa1ff862e6efc267c73ab660384c27d59f6696f3dc84db12 | aloiscochard/codex | Codex1.hs | # LANGUAGE DeriveGeneric #
module Main.Config.Codex1 where
import Data.Yaml
import GHC.Generics
import qualified Codex as New
data Codex = Codex { hackagePath :: FilePath, tagsCmd :: String, tagsFileHeader :: Bool, tagsFileSorted :: Bool }
deriving Generic
instance ToJSON Codex
instance FromJSON Codex
migrateWar... | null | https://raw.githubusercontent.com/aloiscochard/codex/6edbdc34357d13e52b434c19665725684cdd2dba/codex/Main/Config/Codex1.hs | haskell | # LANGUAGE DeriveGeneric #
module Main.Config.Codex1 where
import Data.Yaml
import GHC.Generics
import qualified Codex as New
data Codex = Codex { hackagePath :: FilePath, tagsCmd :: String, tagsFileHeader :: Bool, tagsFileSorted :: Bool }
deriving Generic
instance ToJSON Codex
instance FromJSON Codex
migrateWar... | |
ff610998113e9188dfbd526f3a7a6df29d0dd0e2fbf4fd37f013d45777c24457 | llaisdy/liga | calibration_SUITE.erl | -module(calibration_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-export([all/0,
init_per_suite/1, end_per_suite/1,
init_per_testcase/2, end_per_testcase/2
]).
-export([sample_size/1
,specialisation/1
,generalisation/1
,holdouts/1
]).
all() ->
[
... | null | https://raw.githubusercontent.com/llaisdy/liga/82fe6a3288973fc9322d78f4ac4d686f91aabb76/test/calibration_SUITE.erl | erlang | set up
tests
for each language:
training data: random % of each language
for each language:
test data = all rest of data from that account
for each language:
test data = data from all other accounts
for each language:
test data = data from holdout account(s)
private | -module(calibration_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-export([all/0,
init_per_suite/1, end_per_suite/1,
init_per_testcase/2, end_per_testcase/2
]).
-export([sample_size/1
,specialisation/1
,generalisation/1
,holdouts/1
]).
all() ->
[
... |
2b7a4cb34d1a045b12892cb66fb54aad3042725dd4974144f7a527e5b1f218b9 | antifuchs/autobench | incremental-html.lisp | (in-package :autobench-web)
(defvar *default-tag-stream*)
(defun invoke-tag (tagoid stream continuation)
(macrolet ((continue-with-output ((format-before &rest args-before) (format-after &rest args-after))
`(progn
(format stream ,format-before ,@args-before)
(force... | null | https://raw.githubusercontent.com/antifuchs/autobench/acc14ee2a8899cb630aa8dd02f3ffd7f5858ce28/web/incremental-html.lisp | lisp | (in-package :autobench-web)
(defvar *default-tag-stream*)
(defun invoke-tag (tagoid stream continuation)
(macrolet ((continue-with-output ((format-before &rest args-before) (format-after &rest args-after))
`(progn
(format stream ,format-before ,@args-before)
(force... | |
9266a9ad7e0bd54a47768774b901fdd5551d1b60f7be96f11b0ecff035351f8d | google/proto-lens | Definitions.hs | -- Copyright 2016 Google Inc. All Rights Reserved.
--
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file or at
-- -source/licenses/bsd
-- | This module takes care of collecting all the definitions in a .proto file
and assigning names to all of the defined things (... | null | https://raw.githubusercontent.com/google/proto-lens/f0fcbd1931d73bf83745b89abcb0f2cd634f3b9f/proto-lens-protoc/app/Data/ProtoLens/Compiler/Definitions.hs | haskell | Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file or at
-source/licenses/bsd
| This module takes care of collecting all the definitions in a .proto file
and field names).
# LANGUAGE OverloadedStrings #
| 'Env' contain... |
and assigning names to all of the defined things ( messages , enums
# LANGUAGE CPP #
# LANGUAGE DeriveFunctor #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE OverloadedLabels #
module Data.ProtoLens.Compiler.Definitions
( Env
, Definition(..)
, MessageInfo(..)
, ServiceInfo(..)
, MethodInfo... |
73a56e83dcf0ae535968bc78a5af27ace71d5ac69050850c06b487a6352433b2 | qfpl/reflex-workshop | Interactivity.hs | |
Copyright : ( c ) 2018 , Commonwealth Scientific and Industrial Research Organisation
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) 2018, Commonwealth Scientific and Industrial Research Organisation
License : BSD3
Maintainer :
Stability : experi... | null | https://raw.githubusercontent.com/qfpl/reflex-workshop/244ef13fb4b2e884f455eccc50072e98d1668c9e/src/Types/Interactivity.hs | haskell | # LANGUAGE OverloadedStrings # | |
Copyright : ( c ) 2018 , Commonwealth Scientific and Industrial Research Organisation
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) 2018, Commonwealth Scientific and Industrial Research Organisation
License : BSD3
Maintainer :
Stability : experi... |
31e71b851547b91a6f0ab65ed0a156d6b6208934cfce18ae52659eda3cf3984c | thi-ng/demos | core_test.clj | (ns ex01.core-test
(:require [clojure.test :refer :all]
[ex01.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/thi-ng/demos/048cd131099a7db29be56b965c053908acad4166/ws-ldn-9/day1/ex01/test/ex01/core_test.clj | clojure | (ns ex01.core-test
(:require [clojure.test :refer :all]
[ex01.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
7b3acd90e6fa6bd782e4567126e23127e820e901c8673df9dba010c93ae49604 | avsm/eeww | proc.ml | # 2 "asmcomp/power/proc.ml"
(**************************************************************************)
(* *)
(* OCaml *)
(* ... | null | https://raw.githubusercontent.com/avsm/eeww/651d8da20a3cc9e88354ed0c8da270632b9c0c19/boot/ocaml/asmcomp/power/proc.ml | ocaml | ************************************************************************
OCaml
... | # 2 "asmcomp/power/proc.ml"
, projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Misc
open Cmm
open Reg
open Arch
open Mach
let word_addressed = false... |
b73cd8683f3cce49ef07035f31bc78d1e29ecf3b0b3ef821e79f6a1db919698e | azimut/shiny | draw.lisp | (in-package :shiny)
(defparameter *dirlight-pos* (v! 1000 1000 1000))
(defparameter *dirlight-mul* .5)
(defparameter *pointlight-pos* (v! 0 2 0))
(defun render-all-the-things (actor camera)
(update actor)
(draw actor camera))
(defgeneric draw (actor camera))
(defmethod draw (actor camera))
;; (defmethod draw ((... | null | https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/examples/particles-tfs/draw.lisp | lisp | (defmethod draw ((actor camera) camera)
:time (mynow)
;; :color (v! .1 .1 .8)
:world-view (world->view camera)
:view-clip (projection camera))))
(defmethod draw ((actor sphere) camera)
:time (mynow)
:scale scale
:world-view (world->vi... | (in-package :shiny)
(defparameter *dirlight-pos* (v! 1000 1000 1000))
(defparameter *dirlight-mul* .5)
(defparameter *pointlight-pos* (v! 0 2 0))
(defun render-all-the-things (actor camera)
(update actor)
(draw actor camera))
(defgeneric draw (actor camera))
(defmethod draw (actor camera))
( with - slots ( ... |
d659d4729e2ec0f01892ac85ec5c96f30e9a4c70e51bfff17f967295265260d5 | facet-lang/facet | Semialign.hs | module Facet.Semialign
( zipWithM
, zipWithM_
, module S
) where
import Data.Foldable (sequenceA_)
import Data.Semialign as S
zipWithM :: (Applicative m, Traversable t, Zip t) => (a -> b -> m c) -> t a -> t b -> m (t c)
zipWithM f xs ys = sequenceA $ S.zipWith f xs ys
zipWithM_ :: (Applicative m, Foldable t, Zip t) ... | null | https://raw.githubusercontent.com/facet-lang/facet/4626eed1395cd91acc2d38910f27809ad6e753fa/src/Facet/Semialign.hs | haskell | module Facet.Semialign
( zipWithM
, zipWithM_
, module S
) where
import Data.Foldable (sequenceA_)
import Data.Semialign as S
zipWithM :: (Applicative m, Traversable t, Zip t) => (a -> b -> m c) -> t a -> t b -> m (t c)
zipWithM f xs ys = sequenceA $ S.zipWith f xs ys
zipWithM_ :: (Applicative m, Foldable t, Zip t) ... | |
d02995635c9acf2fc38de271ae45783d47c6530268af856be883a9b41b5aa345 | squirrel-prover/squirrel-prover | traceSequent.ml | (** Extends {!LowTraceSequent} with functions relying on the {!Prover} module. *)
module ES = LowEquivSequent
module Args = TacticsArgs
(*------------------------------------------------------------------*)
include LowTraceSequent
include Sequent.Mk(struct
module S = LowTraceSequent
let to_general_sequent ... | null | https://raw.githubusercontent.com/squirrel-prover/squirrel-prover/3cf8b728424cabfb39cf41eba52d53f02a86f358/src/traceSequent.ml | ocaml | * Extends {!LowTraceSequent} with functions relying on the {!Prover} module.
------------------------------------------------------------------ |
module ES = LowEquivSequent
module Args = TacticsArgs
include LowTraceSequent
include Sequent.Mk(struct
module S = LowTraceSequent
let to_general_sequent s = Goal.Trace s
let to_global_sequent s =
let es =
ES.init
~env:(S.env s) ~hint_db:(S.hint_db s)
Equiv.Smart.mk_fa... |
1d63d542cc7fc911bec58d5a0614b9c28d93017108f9780dcda729f57a0ba4f0 | default-kramer/plisqin | truth.rkt | #lang racket
; This module works with symbols; it is unaware of "real" fallbacks.
For example , this code recognizes ' /void but does n't know that /void even exists .
; The SQL rendering logic will have to do a small translation from real
; fallbacks to their symbolic equivalents.
(provide probe truth-test)
(modul... | null | https://raw.githubusercontent.com/default-kramer/plisqin/26421c7c42656c873c4e0a4fc7f48c0a3ed7770f/plisqin-lib/private2/sql/truth.rkt | racket | This module works with symbols; it is unaware of "real" fallbacks.
The SQL rendering logic will have to do a small translation from real
fallbacks to their symbolic equivalents.
This makes the matchers easier to write.
op : `op?`
A non-fallback-sym? value indicates "no fallback"
rhs : (or/c fallback-sym... | #lang racket
For example , this code recognizes ' /void but does n't know that /void even exists .
(provide probe truth-test)
(module help racket
(provide probe ops op? fallbacks fallback-sym? truth-test)
(define-syntax-rule (define-symlist id contract-id? [sym ...])
(begin
(define id '(sym ...))
... |
3cad98827446d66ef3994f148ec906b59c0700e0ca43433fa2e96a4d18649263 | passy/coding-puzzles | Main.hs | f :: Int -> [Int] -> [Int]
f n arr = filter' (< n) arr
filter' :: (a -> Bool) -> [a] -> [a]
filter' _ [] = []
filter' pred (x:xs) = if pred x then x : filter' pred xs else filter' pred xs
-- The Input/Output section. You do not need to change or modify this part
main = do
n <- readLn :: IO Int
inputdata <- ge... | null | https://raw.githubusercontent.com/passy/coding-puzzles/686bd0775ee5a98004229d44c913376d033b13de/hackerrank/fp-filter-array/Main.hs | haskell | The Input/Output section. You do not need to change or modify this part | f :: Int -> [Int] -> [Int]
f n arr = filter' (< n) arr
filter' :: (a -> Bool) -> [a] -> [a]
filter' _ [] = []
filter' pred (x:xs) = if pred x then x : filter' pred xs else filter' pred xs
main = do
n <- readLn :: IO Int
inputdata <- getContents
let
numbers = map read (lines inputdata) :: [Int]
... |
411a0ecede743aa14dc97ecdf0c934130183abfd5ea167502c45a219b7b8eab6 | lojic/LearningRacket | day07-2.rkt | #lang racket
(require (only-in "./advent.rkt" pair-stream))
(require threading)
(define (parse-spec str)
(define color->symbol (compose string->symbol (λ (l) (string-join l "-")) string-split))
(define (parse-bag str)
(if (string=? "no other bags" str)
#f
(let ([ m (regexp-match #px"^[ ]?(\\d... | null | https://raw.githubusercontent.com/lojic/LearningRacket/eb0e75b0e16d3e0a91b8fa6612e2678a9e12e8c7/advent-of-code-2020/day07-2.rkt | racket | ------------------------------------------------------------------------------------------
count-bags
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
parse-spec
-------------------... | #lang racket
(require (only-in "./advent.rkt" pair-stream))
(require threading)
(define (parse-spec str)
(define color->symbol (compose string->symbol (λ (l) (string-join l "-")) string-split))
(define (parse-bag str)
(if (string=? "no other bags" str)
#f
(let ([ m (regexp-match #px"^[ ]?(\\d... |
0f83a40ddd20740b0b332e17ec5f51a11f7825c4135217137a71e850827b8778 | jackdoe/bzzz | kv.clj | (ns bzzz.kv
(use bzzz.util)
(use bzzz.cached-eval)
(:require [clojure.java.io :as io])
(:require [bzzz.index-directory :as index-directory])
(:import (org.mapdb DBMaker DB)))
(def db* (atom {}))
(def locks* (atom {}))
(defn open-db ^org.mapdb.DB [file-name]
(let [file-name (str file-name)
lock (ge... | null | https://raw.githubusercontent.com/jackdoe/bzzz/ae98708056e39ada28f22aad9e43ea91695b346b/src/bzzz/kv.clj | clojure | (ns bzzz.kv
(use bzzz.util)
(use bzzz.cached-eval)
(:require [clojure.java.io :as io])
(:require [bzzz.index-directory :as index-directory])
(:import (org.mapdb DBMaker DB)))
(def db* (atom {}))
(def locks* (atom {}))
(defn open-db ^org.mapdb.DB [file-name]
(let [file-name (str file-name)
lock (ge... | |
ea3e65d977ff98174fe112c15e620de5e6cbc26e0abef08e44e366e68f71ca4f | nextjournal/clerk | viewer_normalization.clj | ^{:nextjournal.clerk/visibility :hide}
(ns viewer-normalization
(:require [nextjournal.clerk :as clerk]))
(clerk/with-viewer '(fn [v] [:span "The answer is " v "."])
42)
^{::clerk/viewer '#(vector :span "The answer is " % ".")}
(do 42)
^{::clerk/viewer {:render-fn '(fn [v] [:span "The answer is " v "."])}}
(do 4... | null | https://raw.githubusercontent.com/nextjournal/clerk/92cfcc59898c1aff24eef1b59ae07af8af0adac5/notebooks/viewer_normalization.clj | clojure | ^{:nextjournal.clerk/visibility :hide}
(ns viewer-normalization
(:require [nextjournal.clerk :as clerk]))
(clerk/with-viewer '(fn [v] [:span "The answer is " v "."])
42)
^{::clerk/viewer '#(vector :span "The answer is " % ".")}
(do 42)
^{::clerk/viewer {:render-fn '(fn [v] [:span "The answer is " v "."])}}
(do 4... | |
8407990b821dcdb0d5ba46c19d38d0fb3371d9e1e55c9a3ed0ba0ae9fb1bf25b | lisp/de.setf.xml | namespace.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*-
(in-package :xml-query-data-model)
(setq xml-query-data-model:*namespace*
(xml-query-data-model:defnamespace "#"
(:use)
(:ni... | null | https://raw.githubusercontent.com/lisp/de.setf.xml/827681c969342096c3b95735d84b447befa69fa6/namespaces/www-w3-org/2004/02/wsa/ServiceModel-owl/namespace.lisp | lisp | Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*-
(xqdm:find-namespace "#" :if-does-not-exist :load) |
(in-package :xml-query-data-model)
(setq xml-query-data-model:*namespace*
(xml-query-data-model:defnamespace "#"
(:use)
(:nicknames)
(:export
"Actio... |
42a05e6c0457e2884d2ccd9cd21ed7d9a59bc9d04f828bd6740cacf5c269fda6 | ingesolvoll/kee-frame-sample | league.cljs | (ns kee-frame-sample.view.league
(:require
[cljs-react-material-ui.reagent :as ui]
[glimt.core :as http]
[kee-frame-sample.controller.league :as c]
[kee-frame.core :as k]
[re-frame.core :refer [subscribe dispatch]]
[reagent.core :as r]))
(defn http-loader-view [fsm-id content]
(r/with-let [state ... | null | https://raw.githubusercontent.com/ingesolvoll/kee-frame-sample/3ce8512902985ca5b2b08ec840f528503c1c6b01/src/cljs/kee_frame_sample/view/league.cljs | clojure | (ns kee-frame-sample.view.league
(:require
[cljs-react-material-ui.reagent :as ui]
[glimt.core :as http]
[kee-frame-sample.controller.league :as c]
[kee-frame.core :as k]
[re-frame.core :refer [subscribe dispatch]]
[reagent.core :as r]))
(defn http-loader-view [fsm-id content]
(r/with-let [state ... | |
f70581125ce282355d3f0237a1b4fa87208c7371f33aff8cdbd4ac05bae35c93 | privet-kitty/dufy | munsell.lisp | ;;;
;;; Test for dufy/munsell
;;;
(in-package :dufy/test)
(def-suite munsell-suite :in main-suite)
(in-suite munsell-suite)
(defun ordered-in-circle-group-p (list &optional (perimeter 360d0))
"Checks if for every triplet (X1 X2 X3) in LIST X2 is within
the (counterclockwise) interval [X1, X3] in a circle group. Th... | null | https://raw.githubusercontent.com/privet-kitty/dufy/c6ad03a9fca16a759c1c52449ac88420a536feca/test/munsell.lisp | lisp |
Test for dufy/munsell
achromatic |
(in-package :dufy/test)
(def-suite munsell-suite :in main-suite)
(in-suite munsell-suite)
(defun ordered-in-circle-group-p (list &optional (perimeter 360d0))
"Checks if for every triplet (X1 X2 X3) in LIST X2 is within
the (counterclockwise) interval [X1, X3] in a circle group. The last
element of LIST is regarded... |
6035385bcafe7c19338ed756d1fbfaf2277a830c2e7a8549d4f33ff2521c4a08 | ocsigen/ocaml-eliom | ast_iterator.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/parsing/ast_iterator.mli | ocaml | ************************************************************************
OCaml
... | , LexiFi
Copyright 2012 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* { ! iterator } allows to implement AST inspection using open recursion . A
typical mapper would be b... |
0014e36e2c561acc610848e78e957b824e15df2cdce84293ccc504d3a4b3fca3 | dbuenzli/note | clock.ml | (* This code is in the public domain.
Prints a clock with the current local time in the terminal. *)
let pr_time t =
let tm = Unix.localtime t in
Printf.printf "\x1B[8D%02d:%02d:%02d%!"
tm.Unix.tm_hour tm.Unix.tm_min tm.Unix.tm_sec
open Note;;
let seconds, run =
let e, send = E.create () in
let run (... | null | https://raw.githubusercontent.com/dbuenzli/note/e3ed0b0725e4fcd6ebbf07dd1cd37733b301f239/test/clock.ml | ocaml | This code is in the public domain.
Prints a clock with the current local time in the terminal. |
let pr_time t =
let tm = Unix.localtime t in
Printf.printf "\x1B[8D%02d:%02d:%02d%!"
tm.Unix.tm_hour tm.Unix.tm_min tm.Unix.tm_sec
open Note;;
let seconds, run =
let e, send = E.create () in
let run () = while true do send (Unix.gettimeofday ()); Unix.sleep 1 done in
e, run
let log = E.log seconds pr_... |
254c52f02d7cb3c2fa3107334e64305f35e25f5124a08d02f1d9571f642b7156 | tisnik/clojure-examples | project.clj | ;
( C ) Copyright 2015 , 2020 , 2021
;
; All rights reserved. This program and the accompanying materials
; are made available under the terms of the Eclipse Public License v1.0
; which accompanies this distribution, and is available at
-v10.html
;
; Contributors:
;
(defproject webapp2 "0.1.0-SN... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/d0879d8587e58d14dbdd4e2ae1a206eea95c96bf/webapp2/project.clj | clojure |
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Contributors:
| ( C ) Copyright 2015 , 2020 , 2021
-v10.html
(defproject webapp2 "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.10.1"]
[ring/ring-core "1.3.2"]
... |
ecdb5a17a822014c350f557198afd65981fe8f8d0033a920bf99f5bd7ba044af | korya/efuns | instructs.ml | type instruction =
| OpACC0
| OpACC1
| OpACC2
| OpACC3
| OpACC4
| OpACC5
| OpACC6
| OpACC7
| OpACC
| OpPUSH
| OpPUSHACC0
| OpPUSHACC1
| OpPUSHACC2
| OpPUSHACC3
| OpPUSHACC4
| OpPUSHACC5
| OpPUSHACC6
| OpPUSHACC7
| OpPUSHACC
| OpPOP
| OpASSIGN
| OpENVACC1... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/ocamlsrc/compat/beta/instructs.ml | ocaml | type instruction =
| OpACC0
| OpACC1
| OpACC2
| OpACC3
| OpACC4
| OpACC5
| OpACC6
| OpACC7
| OpACC
| OpPUSH
| OpPUSHACC0
| OpPUSHACC1
| OpPUSHACC2
| OpPUSHACC3
| OpPUSHACC4
| OpPUSHACC5
| OpPUSHACC6
| OpPUSHACC7
| OpPUSHACC
| OpPOP
| OpASSIGN
| OpENVACC1... | |
75a1c3bf194a153bf5a1420581403f2109e207c8fc734eab26cd43147407bcf1 | overtone/overtone | app_icon.clj | (ns overtone.libs.app-icon
(:use [clojure.java.io]
[overtone.helpers.lib :only [branch]]
[overtone.helpers.system :only [get-os]])
(:import java.awt.Toolkit))
(defn- load-icon [path]
(let [icon-url (clojure.java.io/resource path)]
(-> (java.awt.Toolkit/getDefaultToolkit)
(.createImage... | null | https://raw.githubusercontent.com/overtone/overtone/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/src/overtone/libs/app_icon.clj | clojure | (ns overtone.libs.app-icon
(:use [clojure.java.io]
[overtone.helpers.lib :only [branch]]
[overtone.helpers.system :only [get-os]])
(:import java.awt.Toolkit))
(defn- load-icon [path]
(let [icon-url (clojure.java.io/resource path)]
(-> (java.awt.Toolkit/getDefaultToolkit)
(.createImage... | |
2b3e3d99b2e57ce5336e085d0770a42e9788d94260e2c80e0cea251f3b4fa71d | alasconnect/auth0 | Main.hs | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Main where
--------------------------------------------------------------------------------
import Data.Aeson
import Data.Either
import Data.Maybe
import Data.Monoid ((<>))
import Data.Text (Text, pack)
import Servant.Client
import System.Environment (lo... | null | https://raw.githubusercontent.com/alasconnect/auth0/6e868552885729487e60a2dfe6073f485b505651/test/Main.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Not... | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Main where
import Data.Aeson
import Data.Either
import Data.Maybe
import Data.Monoid ((<>))
import Data.Text (Text, pack)
import Servant.Client
import System.Environment (lookupEnv)
import System.Random
import Test.Hspec
import Auth0
import Auth0.Authent... |
eb6d45c012a86a19f491b03269808b854b86c49c1f8c26c809aa55c967cb6262 | gheber/kenzo | kan.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 - *
KAN KAN KAN KAN KAN KAN KAN KAN KAN KAN KAN KAN
KAN KAN KAN KAN KAN KAN KAN KAN KAN KAN KAN KAN
KAN KAN KAN KAN KAN KAN KAN KAN KAN KAN KAN KAN
(IN-PACKAGE #:cat-7)
(provide "k... | null | https://raw.githubusercontent.com/gheber/kenzo/48e2ea398b80f39d3b5954157a7df57e07a362d7/src/kenzo-7/kan.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 - *
dmns like in (funcall kfll ...) |
KAN KAN KAN KAN KAN KAN KAN KAN KAN KAN KAN KAN
KAN KAN KAN KAN KAN KAN KAN KAN KAN KAN KAN KAN
KAN KAN KAN KAN KAN KAN KAN KAN KAN KAN KAN KAN
(IN-PACKAGE #:cat-7)
(provide "kan")
(DEFUN KAN (idnm)
(declare (fixnum idnm))
(the (or null ... |
bb52355fe6be4da49a35f822216defd7e00dccc9f6259b40f02a712de863b7aa | helium/packet-purchaser | pp_app.erl | %%%-------------------------------------------------------------------
%% @doc packet_purchaser public API
%% @end
%%%-------------------------------------------------------------------
-module(pp_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%%=================================... | null | https://raw.githubusercontent.com/helium/packet-purchaser/1976840bb8352f6f1caeaa6d9146c8773a3e315d/src/pp_app.erl | erlang | -------------------------------------------------------------------
@doc packet_purchaser public API
@end
-------------------------------------------------------------------
Application callbacks
====================================================================
API
===============================================... |
-module(pp_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
case pp_sup:start_link() of
{error, _} = Error ->
Error;
OK ->
pp_cli_registry:register_cli(),
OK
end.
stop(_State) ->
ok.
Internal functions
|
a8d5a8510c410923ab652bcbf8b372d8cdb3c7e5dae8fcd6ffb97788d5213a95 | racket/typed-racket | for-no-anns.rkt | #lang typed/racket
;; test for optional annotation on for:-bound variables
(for: ([i (in-range 10)] ; no annotation
[j : Integer (in-range 10 20)])
(display (+ i j)))
(for/fold: : Integer ([acc 0])
([i (in-range 10)])
(+ i acc))
(let ((x '(1 3 5 7 9)))
(do: : Number ((x x (cdr x... | null | https://raw.githubusercontent.com/racket/typed-racket/0236151e3b95d6d39276353cb5005197843e16e4/typed-racket-test/succeed/for-no-anns.rkt | racket | test for optional annotation on for:-bound variables
no annotation | #lang typed/racket
[j : Integer (in-range 10 20)])
(display (+ i j)))
(for/fold: : Integer ([acc 0])
([i (in-range 10)])
(+ i acc))
(let ((x '(1 3 5 7 9)))
(do: : Number ((x x (cdr x))
(sum 0 (+ sum (car x))))
((null? x) sum)))
|
78f117e479e1a2f12cfc278a896189ccf35d3c364e48dfe567c6e82b5203c507 | vikram/lisplibraries | person.lisp |
(in-package :employer-employee)
;;; Person
(defclass person ()
((id :accessor person-id)
(first-name :accessor person-first-name
:initarg :first-name)
(last-name :accessor person-last-name
:initarg :last-name
:type string)
(age :accessor person-age
:initarg :age
:type (or null integ... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/weblocks-stable/contrib/yarek/examples/employer-employee/src/model/person.lisp | lisp | Person
Table View
Data View
Form View |
(in-package :employer-employee)
(defclass person ()
((id :accessor person-id)
(first-name :accessor person-first-name
:initarg :first-name)
(last-name :accessor person-last-name
:initarg :last-name
:type string)
(age :accessor person-age
:initarg :age
:type (or null integer))
(ad... |
fdebdaf5d33a31b3192920fa9e60aeb9f66b3fa4582b23ac6ce4fcb268bb1398 | dinosaure/prettym | enclosure.mli | * [ Enclosure ] module follows [ Faraday ] implementation ( thx \@spiros ) . The main
difference is : [ Enclosure ] uses a bounded internal [ Bigstringaf.t ] which can
not be grow . Internal queue which contains [ IOVec ] elements can not grow too .
By this way , we ensure that [ encoder ] uses a bounde... | null | https://raw.githubusercontent.com/dinosaure/prettym/0bd5987d6adaaf4137fa56d5cfaff25fa172f623/lib/enclosure.mli | ocaml | * Weight of {!t}.
* [sub t off len] does a sub operation of {!t} of [len] bytes starting at
[off].
* Weight of {!t}.
* Length (in bytes) of {!t}.
* Length (in bytes) of a list of {!t}.
* [shift t n] shifts [n] bytes on [t].
* [split t off] splits [t] at [off] point.
* [merge a b] tries to merge [a] and [b] ... | * [ Enclosure ] module follows [ Faraday ] implementation ( thx \@spiros ) . The main
difference is : [ Enclosure ] uses a bounded internal [ Bigstringaf.t ] which can
not be grow . Internal queue which contains [ IOVec ] elements can not grow too .
By this way , we ensure that [ encoder ] uses a bounde... |
c5b9de965aee583bd34a9254641de7dae7f2e3e6f4c36311e29a5cf4ca86aa94 | screenshotbot/screenshotbot-oss | build.lisp | ;;;; Copyright 2018-Present Modern Interpreters Inc.
;;;;
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 /.
(defpackage :screenshotbot/magick/build
(:use :cl
:asdf)
(:export #:lib-source... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/0dc4627a08a251f86f306a47098e8ff8463146cb/src/screenshotbot/magick/build.lisp | lisp | Copyright 2018-Present Modern Interpreters Inc.
We could just always use * here as a wildcard.
Debian 11 default location. This returns the file itself,
but that's okay. The only caller of this will replace the
:name part of the pathname.
I don't want to pull in cl-ppcre just for this... | 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 /.
(defpackage :screenshotbot/magick/build
(:use :cl
:asdf)
(:export #:lib-source-file
#:magick-cl-source-file))
(in-package :sc... |
d828bc96c95f93fa7756931858517f5b87a408090db087aca232beb22ee850b2 | tonyg/kali-scheme | template.scm | ; -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*-
Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
Somewhat redundant with vm / istruct.scm . Fix this some day .
; Templates
; Templates are made only by the compiler.
;(define make-t... | null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/rts/template.scm | scheme | -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*-
Templates
Templates are made only by the compiler.
(define make-template make-vector)
(define (template? obj)
(and (vector? obj)
(>= (vector-length obj) template-overhead)
(code-vector? (template-code obj))
))
(define template-length vect... | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
Somewhat redundant with vm / istruct.scm . Fix this some day .
(define (template-code tem) (template-ref tem 0))
(define (template-info tem) (template-ref tem 1))
code
(define ... |
bdaea73a8431063573e763290117b3f7d5ea3441c7bdd27ebe2816877bd6e5cb | tweag/ormolu | transform-multi-line4-out.hs | # LANGUAGE TransformListComp #
quux' xs ys =
[ ( x,
y
)
| x <- xs,
y <- ys,
then group by
First comment
( x
+ y
)
using
Second comment
groupWith -- Third comment
]
| null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/value/function/comprehension/transform-multi-line4-out.hs | haskell | Third comment | # LANGUAGE TransformListComp #
quux' xs ys =
[ ( x,
y
)
| x <- xs,
y <- ys,
then group by
First comment
( x
+ y
)
using
Second comment
]
|
69bd1caaad16a43f871439c856a29ad1e572e9e5fd504db1d56dba531fc6bf50 | themattchan/advent-of-code | day18.hs | #! /usr/bin/env runhaskell -i../../
# LANGUAGE BangPatterns #
# LANGUAGE DeriveFunctor #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE PatternGuards #
# LANGUAGE TupleSections #
# LANGUAGE ScopedTypeVariables #
module Day18 where
import Utils
import Zipper
import Control.Monad.State.Lazy
import Control.Monad.Except
impor... | null | https://raw.githubusercontent.com/themattchan/advent-of-code/0b08a4fbadf7e713d40044523af3debb7d0cb6b9/2017/day18/day18.hs | haskell | # LANGUAGE LambdaCase # | #! /usr/bin/env runhaskell -i../../
# LANGUAGE BangPatterns #
# LANGUAGE DeriveFunctor #
# LANGUAGE PatternGuards #
# LANGUAGE TupleSections #
# LANGUAGE ScopedTypeVariables #
module Day18 where
import Utils
import Zipper
import Control.Monad.State.Lazy
import Control.Monad.Except
import Data.Functor.Identity
import ... |
09c8efc90df6fcd55c8a85a2baf7f5fe583056f00e07afbd68a65ec4a41316da | polyfy/polylith | os.clj | (ns polylith.clj.core.util.interface.os
(:require [polylith.clj.core.util.os :as os]))
(defn windows? []
(os/windows-os?))
| null | https://raw.githubusercontent.com/polyfy/polylith/76936c752fb5b729c216b23d92c8a8d71cfdc92f/components/util/src/polylith/clj/core/util/interface/os.clj | clojure | (ns polylith.clj.core.util.interface.os
(:require [polylith.clj.core.util.os :as os]))
(defn windows? []
(os/windows-os?))
| |
aa89e5cb8130b3de6638ec3a624208427d433855fa2e6e2e1c3187365954e3df | haskell-repa/repa | Project.hs |
module Data.Array.Repa.Flow.Par.Operator.Project
(gather)
where
import Data.Array.Repa.Flow.Par.Flow
import qualified Data.Array.Repa.Flow.Seq as Seq
import GHC.Exts
-- | Takes a vector and a flow of indices, and produces a flow of elements
-- corresponding to each index.
gather :: (Int# -> a)
... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/icebox/abandoned/repa-flow/Data/Array/Repa/Flow/Par/Operator/Project.hs | haskell | | Takes a vector and a flow of indices, and produces a flow of elements
corresponding to each index.
# INLINE frag' # |
module Data.Array.Repa.Flow.Par.Operator.Project
(gather)
where
import Data.Array.Repa.Flow.Par.Flow
import qualified Data.Array.Repa.Flow.Seq as Seq
import GHC.Exts
gather :: (Int# -> a)
-> Flow mode dist Int
-> Flow mode dist a
gather !get (Flow gang distro start frag)
= Flow gang... |
584b3a4894b45361fc9eaf4a235037f3c52f3a452b2e546e6b9f5206940ac39c | clj-easy/graal-build-time | single_segment_example.clj | (ns single-segment-example
"Single segment namespaces generate no resulting package.
As such, they can't be included for build time registration.
This namespace is referenced by our graal build time test app,
it should generate a warning and be properly skipped.")
(defn dummy [])
| null | https://raw.githubusercontent.com/clj-easy/graal-build-time/62f5661b96211dd47aa4dccc25de5f843397305c/test-hello-world/src/single_segment_example.clj | clojure | (ns single-segment-example
"Single segment namespaces generate no resulting package.
As such, they can't be included for build time registration.
This namespace is referenced by our graal build time test app,
it should generate a warning and be properly skipped.")
(defn dummy [])
| |
4d653c60bcea427d422e25422fdb2bd92038070f6a39241c0d7dacbf3799397c | aeternity/aeternity | aemon_mon_on_chain.erl | %% @doc This module implements metric worker process which calculates
%% on-chain metrics based on chain height changes.
-module(aemon_mon_on_chain).
-behaviour(gen_server).
%% API
-export([ start_link/0
, notify/3
, notify_new_block/3
]).
%% gen_server callbacks
-export([ init/1
, ha... | null | https://raw.githubusercontent.com/aeternity/aeternity/b7ce6ae15dab7fa22287c2da3d4405c29bb4edd7/apps/aemon/src/aemon_mon_on_chain.erl | erlang | @doc This module implements metric worker process which calculates
on-chain metrics based on chain height changes.
API
gen_server callbacks
==================================================================
API
==================================================================
gen_server callbacks
============... | -module(aemon_mon_on_chain).
-behaviour(gen_server).
-export([ start_link/0
, notify/3
, notify_new_block/3
]).
-export([ init/1
, handle_call/3
, handle_cast/2
, handle_info/2
, terminate/2
, code_change/3
]).
-record(st, { pubkey = <<>> :: bi... |
c3d1abf17c6c14563962ce95e9ab9ca0f5be7694e7ea17b4395c7d0c71322700 | aeternity/aeternity | aesc_offchain_update.erl | -module(aesc_offchain_update).
-export([ op_transfer/3
, op_deposit/2
, op_withdraw/2
, op_new_contract/6
, op_call_contract/6
, op_call_contract/8
, op_meta/1
]).
-export([serialize/1,
deserialize/1,
for_client/1,
apply_on_trees/6]).
... | null | https://raw.githubusercontent.com/aeternity/aeternity/d11536b9ae44235f7b13a8edbe6ee91539987b42/apps/aechannel/src/aesc_offchain_update.erl | erlang | the off-chain contract call failed. Revert the amounts
this has impact on the on-chain when this is being used
the contract is not subject to the minimum
channel reserve and thus is allowed to go as
low as 0 tokens:
TODO none = aec_accounts_trees:lookup(Pubkey, Trees),
enforce account is present
no nonce bump | -module(aesc_offchain_update).
-export([ op_transfer/3
, op_deposit/2
, op_withdraw/2
, op_new_contract/6
, op_call_contract/6
, op_call_contract/8
, op_meta/1
]).
-export([serialize/1,
deserialize/1,
for_client/1,
apply_on_trees/6]).
... |
db2f80ce264a6ec886ba9f68cc8affb7e53e0029b1745b8eb061c1f501a89673 | mdedwards/slippery-chicken | videos-example-06-a.lsp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; File: videos-example-06-a.lsp
;;;
Class Hierarchy : None
;;;
Version : 1.0
;;;
;;; Project: slippery chicken (algorithmic composition)
;;;
Purpose : Lisp example code to accompany video t... | null | https://raw.githubusercontent.com/mdedwards/slippery-chicken/c1c11fadcdb40cd869d5b29091ba5e53c5270e04/doc/examples/videos-example-06-a.lsp | lisp |
File: videos-example-06-a.lsp
Project: slippery chicken (algorithmic composition)
****
This file is part of slippery-chicken
slippery-chicken is free software; you can redistribute it
and/or modify it under the terms of the GNU G... | Class Hierarchy : None
Version : 1.0
Purpose : Lisp example code to accompany video tutorial 6
Author :
Creation date : 22nd December 2012
Licence : Copyright ( c ) 2012
Public License as published by the Free Software
... |
6ecca067b3ca653a249300729e60b444fe2e4602b1ebc1988e98eab77d6b3564 | clj-commons/rewrite-clj | whitespace.cljc | (ns ^:no-doc rewrite-clj.node.whitespace
(:require [rewrite-clj.node.protocols :as node]
[rewrite-clj.reader :as r])
#?(:cljs (:require-macros rewrite-clj.node.whitespace)))
#?(:clj (set! *warn-on-reflection* true))
# # Newline Modifiers
(def ^:dynamic *newline-fn*
"This function is applied to ev... | null | https://raw.githubusercontent.com/clj-commons/rewrite-clj/ced60309613a2672b4adc0532948d496a0778d77/src/rewrite_clj/node/whitespace.cljc | clojure | ## Utilities
## Predicates | (ns ^:no-doc rewrite-clj.node.whitespace
(:require [rewrite-clj.node.protocols :as node]
[rewrite-clj.reader :as r])
#?(:cljs (:require-macros rewrite-clj.node.whitespace)))
#?(:clj (set! *warn-on-reflection* true))
# # Newline Modifiers
(def ^:dynamic *newline-fn*
"This function is applied to ev... |
58759272b7d71d34486c2877920c85045b6ec1bd919bb6f6e29d0a6156778e3e | VoyagerInnovations/esmpp | esmpp_dummy_receiver.erl | @private This is a default receiver which issues warnings to the console for
un - acted MOs and DRs
-module(esmpp_dummy_receiver).
-export([
mo/3,
dr/4
]).
@private
mo(Sender, Receiver, Message) ->
io:format(
standard_error,
"[~p] Warning - Un-acted message - Sender: ~p - Receiver: ~p - Message: ~... | null | https://raw.githubusercontent.com/VoyagerInnovations/esmpp/708875621f6456a93a3002612423fd68d85ffe82/src/esmpp_dummy_receiver.erl | erlang | @private This is a default receiver which issues warnings to the console for
un - acted MOs and DRs
-module(esmpp_dummy_receiver).
-export([
mo/3,
dr/4
]).
@private
mo(Sender, Receiver, Message) ->
io:format(
standard_error,
"[~p] Warning - Un-acted message - Sender: ~p - Receiver: ~p - Message: ~... | |
cee11dca4c280185e4c453f31636d4accb1dab7b51fee9f5273d787947d8da20 | hunt-framework/hunt | DocId.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
-- ----------------------------------------------------------------------------
|
Module : . Index . Common . DocId
Copyright : Copyright ( C ) 2014
License : MIT
Maintainer : ( )
The document identifier typ... | null | https://raw.githubusercontent.com/hunt-framework/hunt/d692aae756b7bdfb4c99f5a3951aec12893649a8/hunt-searchengine/src/Hunt/Common/DocId.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
------------------------------------------------------------
| The unique identifier of a document .... |
|
Module : . Index . Common . DocId
Copyright : Copyright ( C ) 2014
License : MIT
Maintainer : ( )
The document identifier type DocId and the newtype ' with Show and ToJSOn instances
Module : Hunt.Index.Common.DocId
Copyright : Copyright (C) 2014 Uwe Schmidt
Lic... |
5cabc6a23758561fdca55fb1abef524fe6722db324f43498d582216e2dfe7c9d | smucclaw/dsl | Error.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE RecordWildCards #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
# LANGUAGE EmptyCase #
{-|
Show parser errors with more helpful context.
-}
module LS.Error where
import qualified Data.List.NonEmpty ... | null | https://raw.githubusercontent.com/smucclaw/dsl/1a6f4768d210f4c77232739fe57cd82e78a29239/lib/haskell/natural4/src/LS/Error.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
|
Show parser errors with more helpful context.
| Parse error bundle to display
| Textual rendition of the bundle
& sequence -- NOTE: This only works if the table is actually rectangular and doesn't have jagged rows
-----------------------------------------... | # LANGUAGE RecordWildCards #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE EmptyCase #
module LS.Error where
import qualified Data.List.NonEmpty as NE
import Data.Proxy
import Text.Megaparsec.Pos
import Text.Megaparsec
import qualified Text.PrettyPrint.Boxes as Bo... |
6909d873cd64e33f7042005ec1f541f503667d677b1003b27fd5b842004f5f2f | SFML-haskell/SFML | SFSoundBuffer.hs | module SFML.Audio.SFSoundBuffer
where
import SFML.System.Time (Time)
class SFSoundBuffer a where
-- | Get the number of channels used by a sound buffer.
--
-- If the sound is mono then the number of channels will
be 1 , 2 for stereo , etc .
getChannelCount :: a -> IO Int
-- | Get the... | null | https://raw.githubusercontent.com/SFML-haskell/SFML/1d1ceee6bc782f4f194853fbd0cc4acb33b86d41/src/SFML/Audio/SFSoundBuffer.hs | haskell | | Get the number of channels used by a sound buffer.
If the sound is mono then the number of channels will
| Get the total duration of a sound buffer. | module SFML.Audio.SFSoundBuffer
where
import SFML.System.Time (Time)
class SFSoundBuffer a where
be 1 , 2 for stereo , etc .
getChannelCount :: a -> IO Int
getDuration :: a -> IO Time
|
47c88ca9ad04d069f2a5483aba007ec80f7d94f2efab7d85ee59611b2104479b | danelahman/haskell-coop | MLFPStateFwd.hs | # LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
|
Module : Control . Runner . MLFPState
Description : Using a runner to run a footprint of general , external ML - style state
Copyright : ( c ) , 2019
License : MIT
Maintainer :
Stability ... | null | https://raw.githubusercontent.com/danelahman/haskell-coop/95ddb0f340313a25f2e006c75dab8e2c93add8f8/src/Control/Runner/MLFPStateFwd.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
| Type of natural numbers that we use for the footprint size.
| Shape of the memory.
This is a length-indexed vector of the types that
the memory locations store in the memory.
| Footprint is a memory shape indexed vector of ML-style
references, with the typing ensurin... | # LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
|
Module : Control . Runner . MLFPState
Description : Using a runner to run a footprint of general , external ML - style state
Copyright : ( c ) , 2019
License : MIT
Maintainer :
Stability : experimental
This module uses the ` fpRunner ... |
89bc566132045ef3bb1aae160238d4f99e0943097c247e523e367ee3f0ccec85 | serokell/importify | 28-ListAsQualifiedWholeUnused.hs | module ListAsQualifiedWholeUnused where
import qualified Data.List as L
main :: IO ()
main = pure ()
| null | https://raw.githubusercontent.com/serokell/importify/09f31d851b2152ae6ce880b81abc3554ade29f37/test/test-data/base%40basic/28-ListAsQualifiedWholeUnused.hs | haskell | module ListAsQualifiedWholeUnused where
import qualified Data.List as L
main :: IO ()
main = pure ()
| |
c3b9a631bfcf6f14d81339cc6ee7ad32369a8b304f4b0fc23906a3f67dd515dc | francescoc/erlangprogramming | serial.erl | %% Code from
%% Erlang Programming
and
O'Reilly , 2008
%% /
/
( c ) and
-module(serial).
-export([treeToList/1,tree1/0,listToTree/1,test1/0,test2/0,test3/0]).
treeToList({leaf,N}) ->
[2,N];
treeToList({node,T1,T2}) ->
TTL1 = treeToList(T1),
[Size1|_] = TTL1,
TTL2 = treeTo... | null | https://raw.githubusercontent.com/francescoc/erlangprogramming/b4c39cbebe6599f23eb9d1a052316baf75e40a47/chapter9/serial.erl | erlang | Code from
Erlang Programming
/ | and
O'Reilly , 2008
/
( c ) and
-module(serial).
-export([treeToList/1,tree1/0,listToTree/1,test1/0,test2/0,test3/0]).
treeToList({leaf,N}) ->
[2,N];
treeToList({node,T1,T2}) ->
TTL1 = treeToList(T1),
[Size1|_] = TTL1,
TTL2 = treeToList(T2),
[Size2|_] = TTL2,
[Size1+Si... |
0d1d22b16681331565b21194ac7dbb1f3ced670acc47ec288ee8c549fdb2bd75 | anakryiko/erles | erles_reqs.erl | -module(erles_reqs).
-export([init/1, handle_sync_event/4, handle_event/3, handle_info/3, code_change/4, terminate/3]).
-export([disconnected/2, disconnected/3,
pending/2, pending/3,
retry_pending/2, retry_pending/3]).
-include("erles_clientapi_pb.hrl").
-include("erles.hrl").
-include("erles_intern... | null | https://raw.githubusercontent.com/anakryiko/erles/3ffa0c1291e1ef7afb5ba351c264414a55efc447/src/erles_reqs.erl | erlang | -module(erles_reqs).
-export([init/1, handle_sync_event/4, handle_event/3, handle_info/3, code_change/4, terminate/3]).
-export([disconnected/2, disconnected/3,
pending/2, pending/3,
retry_pending/2, retry_pending/3]).
-include("erles_clientapi_pb.hrl").
-include("erles.hrl").
-include("erles_intern... | |
47389877535c58d48f59f2afc6ef07b5594c66b403ccb6dc391a8d29db61fd82 | fjvallarino/monomer | Common.hs | |
Module : . Common
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Common module , including basic types definitions .
Module : Monomer.Common
Copyright : (c) 2018 Francisco Vallar... | null | https://raw.githubusercontent.com/fjvallarino/monomer/3b321ed0bd5c1458864c02696c43aa39b627640f/src/Monomer/Common.hs | haskell | |
Module : . Common
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Common module , including basic types definitions .
Module : Monomer.Common
Copyright : (c) 2018 Francisco Vallar... | |
6847ed87a891f0442cf5582e6d72af771f94e3db44e5343671345cb43113acae | jasonkuhrt-archive/hpfp-answers | Validation.hs | module Validation where
import Test.QuickCheck hiding (Failure, Success)
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
data Validation err x =
Failure err
| Success x
deriving (Eq, Show)
instance Functor (Validation a) where
fmap _ (Failure x) = Failure x
fmap f (Success x) = Success (... | null | https://raw.githubusercontent.com/jasonkuhrt-archive/hpfp-answers/c03ae936f208cfa3ca1eb0e720a5527cebe4c034/chapter-17-applicative/EitherLike/Validation.hs | haskell | Test | module Validation where
import Test.QuickCheck hiding (Failure, Success)
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
data Validation err x =
Failure err
| Success x
deriving (Eq, Show)
instance Functor (Validation a) where
fmap _ (Failure x) = Failure x
fmap f (Success x) = Success (... |
99aa492f6bd2a2abdef01f57eb0e9d65cd3b004667903442eb7cd6660d6382f7 | protosens/monorepo.cljc | b.cljc | (ns b)
| null | https://raw.githubusercontent.com/protosens/monorepo.cljc/1c7cc00cbfb7c7484521146bf998438d2867552f/module/namespace/resrc/test/b.cljc | clojure | (ns b)
| |
12d68469274da114f7988d5bce2ba0a59cde17219e3c851b892cdd3207f35e5f | S8A/htdp-exercises | ex377.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex377) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex377.rkt | racket | about the language level of this file in a form that our tools can easily process.
.: Data definitions :.
An Xexpr is a list:
– (cons Symbol (cons [List-of Attribute] Body))
where Body is short for [List-of Xexpr]
(cons Symbol (cons String '()))
An XItem.v2 is one of:
An XEnum.v2 is one of:
– (cons 'ul [L... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex377) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
–
– ( cons Symbol Body )
An Attribute is a list... |
47d027f9d37a19b7129c9757c802413f61a8af1b18c48fcae5fef2ad1466bbdb | WhatsApp/erlt | shape_mod1.erl | -file("dev_struct/src/shape_mod1.erlt", 1).
-module(shape_mod1).
-eqwalizer_unchecked([{test, 0}]).
-export([test/0, test/1, test2/1, test_in_lc/1]).
-spec test() -> integer().
test() ->
erlang:size({#{},
test3(#{a => 1, b => 2}),
test4((#{a => 1, b => 2})#{}),
... | null | https://raw.githubusercontent.com/WhatsApp/erlt/616a4adc628ca8754112e659701e57f1cd7fecd1/tests/dev_struct/ir-spec/shape_mod1.erl | erlang | -file("dev_struct/src/shape_mod1.erlt", 1).
-module(shape_mod1).
-eqwalizer_unchecked([{test, 0}]).
-export([test/0, test/1, test2/1, test_in_lc/1]).
-spec test() -> integer().
test() ->
erlang:size({#{},
test3(#{a => 1, b => 2}),
test4((#{a => 1, b => 2})#{}),
... | |
1c74502f7d18361262ddd908c1e8b6cee7d409a6280060a92728e8fa0479adfc | phoe/protest | validation.lisp | ;;;; src/protocol/validation.lisp
(in-package :protest/protocol)
(defun validate-protocol (protocol)
(check-dependencies-valid protocol)
(check-dependencies-not-circular protocol)
(check-duplicate-element-forms protocol)
(check-duplicate-effective-elements protocol)
(check-exports protocol))
(defun validat... | null | https://raw.githubusercontent.com/phoe/protest/be885130044d9950758a2d1726246c4c114692c1/src/protocol/validation.lisp | lisp | src/protocol/validation.lisp
The following function is meant to return a list of all effective
dependencies of a protocol, but as a side effect it does error-checking. |
(in-package :protest/protocol)
(defun validate-protocol (protocol)
(check-dependencies-valid protocol)
(check-dependencies-not-circular protocol)
(check-duplicate-element-forms protocol)
(check-duplicate-effective-elements protocol)
(check-exports protocol))
(defun validate-all-protocols ()
(let ((protoc... |
ec00fa693ae67db850d4ce3ad45ac2530b589f64b4c6b6edd9ab6ac63bdb9128 | cbaggers/cepl | theAssignerProblem.lisp | ;; walk each path until you find an uncertainty
;; and uncertainty is any point where a variable is invloved as an index.
;; at that point you cant tell what contents will be accessed so we have
;; to assume that all is used.
Then we look at the varjo type .
;; arrays: For each element create assigner (element may b... | null | https://raw.githubusercontent.com/cbaggers/cepl/d1a10b6c8f4cedc07493bf06aef3a56c7b6f8d5b/core/protocode/_/theAssignerProblem.lisp | lisp | walk each path until you find an uncertainty
and uncertainty is any point where a variable is invloved as an index.
at that point you cant tell what contents will be accessed so we have
to assume that all is used.
arrays: For each element create assigner (element may be struct)
struct: for each field create an as... |
Then we look at the varjo type .
(defun make-assigners (uniform)
)
( defstruct - g ham ( d : short ) ( e : short 3 ) )
( defstruct - g jam ( a : float 3 ) ( b : ham 2 ) ( c : int ) )
uniforms : ( ( test jam 5 ) )
From : The maximum number of available locations within a single
1024 loc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.