_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 |
|---|---|---|---|---|---|---|---|---|
1630ea09168ffd7f83cfac1e3fc73b0e3cb690088f22817e91cef910a8ae41b1 | manuel-serrano/hop | vector.scm | ;*=====================================================================*/
* serrano / prgm / project / hop / hop / hopscript / vector.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/d39336c2ca1f2f6939be8a24f99feeb9a70cc008/hopscript/vector.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
*=====================================================================*/
*---------------------------... | * serrano / prgm / project / hop / hop / hopscript / vector.scm * /
* Author : * /
* Creation : Fri May 7 09:59:09 2021 * /
* Last change : Thu Aug 19 11:37:19 2021 ( serrano ) * /
* Cop... |
4814c266152f0e09328f9d602193b6646140ffa1aa3cf03683dc4ed4631d602b | atgreen/red-light-green-light | test-execute-file.lisp | -*- Mode : LISP ; Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : POSTMODERN - TESTS ; -*-
(in-package :postmodern-tests)
(def-suite :postmodern-execute-file
:description "Execute file suite for postmodern"
:in :postmodern)
(in-suite :postmodern-execute-file)
(defparameter *good-file* (asdf:system-re... | null | https://raw.githubusercontent.com/atgreen/red-light-green-light/f067507721bbab4aa973866db5276c83df3e8784/local-projects/postmodern-20220220-git/postmodern/tests/test-execute-file.lisp | lisp | Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : POSTMODERN - TESTS ; -*-
| (in-package :postmodern-tests)
(def-suite :postmodern-execute-file
:description "Execute file suite for postmodern"
:in :postmodern)
(in-suite :postmodern-execute-file)
(defparameter *good-file* (asdf:system-relative-pathname :postmodern "postmodern/tests/test-execute-file.sql"))
(defparameter *first-includ... |
225e36ebffaca876622c6b0e00ea5ad2932c7980fbeaf9237a2e2b45a6cd2b6b | otakar-smrz/elixir-fm | C.hs |
module Elixir.Data.Sunny.Foreign.C (section) where
import Elixir.Lexicon
lexicon = include section
cluster_1 = cluster
|> ['r','U','z','U','f','I','t','^','s'] <| [
_____ `xtra` {- <rUzUfIt^s> -} [ ['R','u','s','o','v','i','c','k'] ] ]
cluster_2 = cluster
|> ['r','U','z'... | null | https://raw.githubusercontent.com/otakar-smrz/elixir-fm/fae5bab6dd53c15d25c1e147e7787b2c254aabf0/Haskell/ElixirFM/Elixir/Data/Sunny/Foreign/C.hs | haskell | <rUzUfIt^s>
<rUs>
<rAsIn.g>
<rIstU>
<rUstUk>
<rUskI_h>
<rU^sU>
<rA^sIfskI>
<rI^stir>
<rU.gUzIn>
<rUfA'Il>
<rIfir>
<rAfAyIl>
<rAftir>
<rIfkind>
<rIfyIrA>
<rUkits>
<rUlA>
<rUlAn>
<rAlf>
<rAm>
<rAm>
<rUmA>
<rUmIdAl>
<rAmAkAntA>
<rAmAkrI^snA>
<rAmUn>
<rAmIn>
<rImUn> ... |
module Elixir.Data.Sunny.Foreign.C (section) where
import Elixir.Lexicon
lexicon = include section
cluster_1 = cluster
|> ['r','U','z','U','f','I','t','^','s'] <| [
cluster_2 = cluster
|> ['r','U','z','f','i','l','t'] <| [
< >
cluster_3 = cluster
|> ['r','U','s'] <| [
cluster_4 = cluster... |
42fa7ed552f6d1afd3f9532b3fec34b3cab7bedd072bde7244591d8f274eb97c | wireapp/wire-server | Federation.hs | -- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License... | null | https://raw.githubusercontent.com/wireapp/wire-server/f14583c34a528bd06305f4e938ee0d69cbb3d679/services/galley/src/Galley/API/Federation.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
# LANGUAGE RecordWildCards #
mod... |
36410e9ced1044c42b0966955c35531081a295289f0ebdcece00873d89e81d9f | aeternity/aeternity | aens_preclaim_tx.erl | %%%=============================================================================
( C ) 2018 , Aeternity Anstalt
%%% @doc
%%% Module defining the Naming System pre-claim transaction
%%% @end
%%%=============================================================================
-module(aens_preclaim_tx).
-behavior(aetx... | null | https://raw.githubusercontent.com/aeternity/aeternity/f92daa4bf386f84cbfde7d1b91ea8082b7af0b16/apps/aens/src/aens_preclaim_tx.erl | erlang | =============================================================================
@doc
Module defining the Naming System pre-claim transaction
@end
=============================================================================
Behavior API
Getters
===================================================================
... | ( C ) 2018 , Aeternity Anstalt
-module(aens_preclaim_tx).
-behavior(aetx).
-export([new/1,
type/0,
fee/1,
gas/1,
ttl/1,
nonce/1,
origin/1,
check/3,
process/3,
signers/2,
version/1,
serialization_template/1,
... |
63acf576d38f305517c843fa26ec8f5abcf5d7db32b18eaf19ba296f3fa603d5 | isovector/cccc | Compiler.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
{-# OPTIONS_GHC -Wall #-}
module Compiler where
import Control.Lens ((<&>))
import Control.Monad (join)
import Data.Map (Map)
import qualified Data.Map as M
import Data.M... | null | https://raw.githubusercontent.com/isovector/cccc/57497046e7bf6170dfdb4964da6840001d46c91f/src/Compiler.hs | haskell | # LANGUAGE OverloadedStrings #
# OPTIONS_GHC -Wall #
build classes
build instances + dicts
build class env
build initial symbol table | # LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
module Compiler where
import Control.Lens ((<&>))
import Control.Monad (join)
import Data.Map (Map)
import qualified Data.Map as M
import Data.Monoid ((<>))
import Data.Traversable (for)
import ... |
387035663850c00ecd37a31c384a1d77cbc301405e341902c74241080350399e | alanzplus/EOPL | explicit-refs-spec.rkt | #lang eopl
(provide scanner-spec)
(provide grammer-spec)
(provide scan)
(provide scan-parse)
(provide read-print-ast)
(provide program)
(provide a-program)
(provide expression)
(provide var-exp)
(provide const-exp)
(provide zero?-exp)
(provide if-exp)
(provide let-exp)
(provide diff-exp)
(provide proc-exp)
(provide ca... | null | https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/EOPL/ch4/explicit-refs-spec.rkt | racket | #lang eopl
(provide scanner-spec)
(provide grammer-spec)
(provide scan)
(provide scan-parse)
(provide read-print-ast)
(provide program)
(provide a-program)
(provide expression)
(provide var-exp)
(provide const-exp)
(provide zero?-exp)
(provide if-exp)
(provide let-exp)
(provide diff-exp)
(provide proc-exp)
(provide ca... | |
5e3a2664668ea9a09e5222107fdc5976ae471f9dc7ba2436256ca7572786891e | e-bigmoon/haskell-blog | Blog-example-advanced.hs | #!/usr/bin/env stack
-- stack script --resolver lts-17.3
# LANGUAGE OverloadedStrings , TypeFamilies , QuasiQuotes ,
TemplateHaskell , GADTs , FlexibleContexts ,
MultiParamTypeClasses , DeriveDataTypeable ,
, ViewPatterns , DerivingStrategies , StandaloneDeriving , Undecida... | null | https://raw.githubusercontent.com/e-bigmoon/haskell-blog/5c9e7c25f31ea6856c5d333e8e991dbceab21c56/sample-code/yesod/examples/ex02/Blog-example-advanced.hs | haskell | stack script --resolver lts-17.3
Key name for email value may vary between providers
let emailKey = "openid.ax.value.email" in
Just email -> do
Nothing -> return Nothing
create a new pool
perform any necessary migration
create a new HTTP manager
start our serve | #!/usr/bin/env stack
# LANGUAGE OverloadedStrings , TypeFamilies , QuasiQuotes ,
TemplateHaskell , GADTs , FlexibleContexts ,
MultiParamTypeClasses , DeriveDataTypeable ,
, ViewPatterns , DerivingStrategies , StandaloneDeriving , UndecidableInstances , DataKinds , FlexibleI... |
8c179c0ae00f56658797bd285ffaa285a7f50187f014b0ae3238060bfb5232da | lehins/Color | Rec709Spec.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Graphics.Color.Space.RGB.ITU.Rec709Spec (spec) where
import Graphics.Color.Space.Common
import Graphics.Color.Space.RGB.ITU.Rec709
instance (Elevator e, Random e) => Arbitrary (Color (BT709 l) e... | null | https://raw.githubusercontent.com/lehins/Color/8f17d4d17dc9b899af702f54b69d49f3a5752e7b/Color/tests/Graphics/Color/Space/RGB/ITU/Rec709Spec.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Graphics.Color.Space.RGB.ITU.Rec709Spec (spec) where
import Graphics.Color.Space.Common
import Graphics.Color.Space.RGB.ITU.Rec709
instance (Elevator e, Random e) => Arbitrary (Color (BT709 l) e... | |
bd41b559ba7a9a490d492784fae5017818857e49e86d939cde47718621666bf1 | exercism/erlang | atbash_cipher.erl | -module(atbash_cipher).
-export([decode/1, encode/1]).
decode(_Phrase) -> undefined.
encode(_Phrase) -> undefined.
| null | https://raw.githubusercontent.com/exercism/erlang/57ac2707dae643682950715e74eb271f732e2100/exercises/practice/atbash-cipher/src/atbash_cipher.erl | erlang | -module(atbash_cipher).
-export([decode/1, encode/1]).
decode(_Phrase) -> undefined.
encode(_Phrase) -> undefined.
| |
43af62499ae6263c050c1d94fa22eddb5b86900b6e5706c3dbe8e19a0a699a17 | fpottier/mpri-2.4-projet-2022-2023 | PPrintExtra.ml | open PPrint
let print (doc : document) : unit =
PPrint.ToChannel.pretty 0.9 80 stdout doc;
flush stdout
let to_string (doc : document) : string =
let b = Buffer.create 80 in
PPrint.ToBuffer.pretty 0.9 80 b doc;
Buffer.contents b
| null | https://raw.githubusercontent.com/fpottier/mpri-2.4-projet-2022-2023/1ce08cadfb3a8ec8bc72609bc82873b29d2ce241/src/PPrintExtra.ml | ocaml | open PPrint
let print (doc : document) : unit =
PPrint.ToChannel.pretty 0.9 80 stdout doc;
flush stdout
let to_string (doc : document) : string =
let b = Buffer.create 80 in
PPrint.ToBuffer.pretty 0.9 80 b doc;
Buffer.contents b
| |
66157a116f73d27e6c16931dd5bfc5616dc395d3b2fe2bb08c03e97a996a5b79 | camlp5/camlp5 | 4.05.1.ml | (* camlp5r pa_macro.cmo *)
(* versdep.ml,v *)
Copyright ( c ) INRIA 2007 - 2017
open Parsetree;;
open Longident;;
open Asttypes;;
type ('a, 'b) choice =
Left of 'a
| Right of 'b
;;
let option_map f x =
match x with
Some x -> Some (f x)
| None -> None
;;
let mustSome symbol =
function
Some x -> ... | null | https://raw.githubusercontent.com/camlp5/camlp5/9e8155f8ae5a584bbb4ad96d10d6fec63ed8204c/ocaml_src/lib/versdep/4.05.1.ml | ocaml | camlp5r pa_macro.cmo
versdep.ml,v
| Copyright ( c ) INRIA 2007 - 2017
open Parsetree;;
open Longident;;
open Asttypes;;
type ('a, 'b) choice =
Left of 'a
| Right of 'b
;;
let option_map f x =
match x with
Some x -> Some (f x)
| None -> None
;;
let mustSome symbol =
function
Some x -> x
| None -> failwith ("Some: " ^ symbol)
;;
... |
20b8cf36df3442018dd73817b152f9970831311e0a3da53ad1a243b54edbb90d | kupl/FixML | sub31.ml |
let rec fold f l a =
match l with
|[]->a
|hd::tl->f hd (fold f tl a)
let max lst = fold (fun x y -> if x>y then x else y) lst 0
| null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/maxmin/maxmin/submissions/sub31.ml | ocaml |
let rec fold f l a =
match l with
|[]->a
|hd::tl->f hd (fold f tl a)
let max lst = fold (fun x y -> if x>y then x else y) lst 0
| |
94abf2a1536ba6bc20d869833d601323dda6bebf26fe512503871e541e42b557 | purescript/purescript | Errors.hs | module Language.PureScript.Errors
( module Language.PureScript.AST
, module Language.PureScript.Errors
) where
import Prelude
import Protolude (unsnoc)
import Control.Arrow ((&&&))
import Control.Exception (displayException)
import Control.Lens (both, head1, ove... | null | https://raw.githubusercontent.com/purescript/purescript/042150325abf842064877ce9268fbce8df029e64/src/Language/PureScript/Errors.hs | haskell | | A type of error messages
^ A description of what we were trying to do, and the error which occurred
^ constraint that could not be solved
^ a list of instances that stopped further progress in instance chains due to ambiguity
^ whether eliminating unknowns with annotations might help
| constructor name, expecte... | module Language.PureScript.Errors
( module Language.PureScript.AST
, module Language.PureScript.Errors
) where
import Prelude
import Protolude (unsnoc)
import Control.Arrow ((&&&))
import Control.Exception (displayException)
import Control.Lens (both, head1, ove... |
44f003adee4a9ad8449e540d55ba5fbaf68d00c9db5d8291595b2175cf6230c9 | msp-strath/Mary | Value.hs | module Shonkier.Value where
import Control.Monad.State
import Control.Monad.Reader
import Control.Applicative
import Data.Map (Map, singleton, toAscList)
needed for ghc versions < = 8.2.2
import Data.Text (Text)
import Data.Bwd
import Data.Lisp
import Shonkier.Syntax
import Utils.List
---------------------------... | null | https://raw.githubusercontent.com/msp-strath/Mary/d805849e6da4133093564077d2344815155d7e5e/src/Shonkier/Value.hs | haskell | -------------------------------------------------------------------------
ABORT
-------------------------------------------------------------------------
how to signal a failure
-------------------------------------------------------------------------
RHS TRANSLATION
-------------------------------------------------... | module Shonkier.Value where
import Control.Monad.State
import Control.Monad.Reader
import Control.Applicative
import Data.Map (Map, singleton, toAscList)
needed for ghc versions < = 8.2.2
import Data.Text (Text)
import Data.Bwd
import Data.Lisp
import Shonkier.Syntax
import Utils.List
abortA :: Atomy a => a
ab... |
1a5b4505d2866a709855af11b88468064ace7aee15087ab6036d61c19f8f3412 | tonyg/kali-scheme | eval.scm | Copyright ( c ) 1993 , 1994 and . See file COPYING .
; Evaluator for nodes.
; This doesn't handle n-ary procedures.
; (NAME-NODE-BINDING name-node) is used as an EQ? key in local environments,
; and passed as-is to the global-environment arguments.
; Exports:
( EVAL - NODE node global - ref global - set !... | null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/ps-compiler/prescheme/eval.scm | scheme | Evaluator for nodes.
This doesn't handle n-ary procedures.
(NAME-NODE-BINDING name-node) is used as an EQ? key in local environments,
and passed as-is to the global-environment arguments.
Exports:
CLOSURE? (CLOSURE-NODE closure) (CLOSURE-ENV closure)
Environments
Closures
exported
Particular operators
Used b... | Copyright ( c ) 1993 , 1994 and . See file COPYING .
( EVAL - NODE node global - ref global - set ! eval - primitive )
( UNSPECIFIC ? thing )
(define (eval-node node global-ref global-set! eval-primitive)
(eval node (make-env '()
(make-eval-data global-ref
global-set!
e... |
f68aa3fc5ee25ed1d2cb5046f31b4b5e65b2f4cc29ae6bd9ab15a812191c7287 | interactive-ssr/issr-server | proxy.lisp | (in-package #:issr.server)
(defvar *js-name* "issr.min.js")
(defun make-destinator (config)
(lambda ()
(if (str:starts-with-p "/-issr" (yxorp:header :uri))
(if (yxorp:header :upgrade)
(config-websocket-port config)
(config-http-port config))
(config-application-destinatio... | null | https://raw.githubusercontent.com/interactive-ssr/issr-server/e828e3ea6c6a711f27ceee5a80d3646a89473768/src/proxy.lisp | lisp | else
add issr ids and js
use issr favicon | (in-package #:issr.server)
(defvar *js-name* "issr.min.js")
(defun make-destinator (config)
(lambda ()
(if (str:starts-with-p "/-issr" (yxorp:header :uri))
(if (yxorp:header :upgrade)
(config-websocket-port config)
(config-http-port config))
(config-application-destinatio... |
88a495263239ddb75d333d6d5a66f3aeb1fdad524cabd70f9a9caf89fa36b386 | dennismckinnon/Ethereum-Contracts | CC-v2.lsp | Consensus contract
;
Two Api Calls ( it only accepts from )
Create , Format : " create " " name " 0xContractaddress
;Creates a poll contract for this contractID and this name, and creates a list entry
The list entry will have a quadruplet of values "
Descision ( 0 - undecided/ 1 - rejected/ 2 - Accepted )
; Poll Con... | null | https://raw.githubusercontent.com/dennismckinnon/Ethereum-Contracts/25b5e7037da382dd95a1376fad81f936f6610b36/DOUG/Old/CC-v2.lsp | lisp |
Creates a poll contract for this contractID and this name, and creates a list entry
Poll Contract Address
"name"
ContractID
Metadata section
metadata notifier
contract creator
contract Author
Date
Name
Initialization of program
Poll list start
get dependancies
polladdress
vote
list pointer
register vote returns 0 ... | Consensus contract
Two Api Calls ( it only accepts from )
Create , Format : " create " " name " 0xContractaddress
The list entry will have a quadruplet of values "
Descision ( 0 - undecided/ 1 - rejected/ 2 - Accepted )
{
version
Brief description ( not past address )
[[0x6]] "This Contract reports only to do"... |
0110b5107d50a5e7e6bdc6bafb515a61c75a0f299def37fbe5c58c3ab6d814c6 | zenspider/schemers | exercise.2.91.scm | #lang racket/base
(require "../lib/test.rkt")
(require "../lib/myutils.scm")
Exercise 2.91
;; A univariate polynomial can be divided by another
;; one to produce a polynomial quotient and a polynomial remainder.
;; For example,
;;
;; x^5 - 1
------- = x^3 + x , remainder x - 1
;; x^2 - 1
;;
;; Divi... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_2/exercise.2.91.scm | scheme | A univariate polynomial can be divided by another
one to produce a polynomial quotient and a polynomial remainder.
For example,
x^5 - 1
x^2 - 1
Division can be performed via long division. That is, divide the
highest-order term of the dividend by the highest-order term of
multiply the result by the... | #lang racket/base
(require "../lib/test.rkt")
(require "../lib/myutils.scm")
Exercise 2.91
------- = x^3 + x , remainder x - 1
the divisor . The result is the first term of the quotient . Next ,
to be the remainder . Also , if the dividend ever becomes zero ,
return zero as both quotient and rema... |
a877edb20c6c4a3f3064888f9526a260b7818338ca8caeca184b39fb8843695c | nmattia/highcharts-hs | JSQQ.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE DefaultSignatures #
# LANGUAGE TupleSections #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# LANGUAGE LambdaCase #
module Language.JavaScript.JSQQ where
import Language.Haskell.TH.Quote
import Data.Semigroup
import Data.Maybe
import Control.Monad
import Lan... | null | https://raw.githubusercontent.com/nmattia/highcharts-hs/1193872d2f4ccf0cfa311ece48b1bb40511837ac/js-qq/src/Language/JavaScript/JSQQ.hs | haskell | toJS = JS . BL8.unpack . encode
[(JS var name, HS var name)]
| from -> to -> string -> out | # LANGUAGE TemplateHaskell #
# LANGUAGE DefaultSignatures #
# LANGUAGE TupleSections #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# LANGUAGE LambdaCase #
module Language.JavaScript.JSQQ where
import Language.Haskell.TH.Quote
import Data.Semigroup
import Data.Maybe
import Control.Monad
import Lan... |
0a966ccfca92971fb8c3923e959ad8051d7e1cfcff3383969325329bc29c1032 | psholtz/MIT-SICP | exercise2-81.scm | ;;
Exercise 2.81
;;
has noticed that " apply - generic " may try to coerce the arguments
;; to each other's type even if htey already have the same type. Therefore, he reasons,
;; we need to put procedures in the coercion table to "coerce" arguments of each type
;; to their own type. For example, in addition to ... | null | https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Section-2.5/mit-scheme/exercise2-81.scm | scheme |
to each other's type even if htey already have the same type. Therefore, he reasons,
we need to put procedures in the coercion table to "coerce" arguments of each type
to their own type. For example, in addition to the "scheme-number->complex" coercion
shown above, he would do:
(put-coercion 'complex complex c... | Exercise 2.81
has noticed that " apply - generic " may try to coerce the arguments
( define ( scheme - number->scheme - number n ) n )
( define ( complex->complex z ) z )
( put - coercion ' scheme - number ' scheme - number scheme - number->scheme - number )
( a ) With ' coercion procedures installed , w... |
b4ab505475b166efbf243821f262ad2c61eaa26067287feac0a472ae965061e0 | igorhvr/bedlam | image.scm | 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 WAR... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/siscweb/siscweb-src-0.5/scm/siscweb/image.scm | scheme | you may not use this file except in compliance with
the License. You may obtain a copy of the License at
/
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
Contributor(s):
Alternatively, the contents of th... | The contents of this file are subject to the Mozilla Public License Version
Software distributed under the License is distributed on an " AS IS " basis ,
The Original Code is SISCweb .
The Initial Developer of the Original Code is .
Portions created by the Initial Developer are Copyright ( C ) 2005 - 2006
... |
e610dfc6f2200223dd05c7b4fbd20ba980d316880151af55708ff57f983d8cb2 | okuoku/nausicaa | test-makers.sps | -*- coding : utf-8 -*-
;;;
Part of : / Scheme
;;;Contents: test file for makers
Date : Sat May 22 , 2010
;;;
;;;Abstract
;;;
;;;
;;;
Copyright ( c ) 2010 , 2011 < >
;;;
;;;This program is free software: you can redistribute it and/or modify
;;;it under the terms of the GNU General Public License as published by... | null | https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/tests/test-makers.sps | scheme |
Contents: test file for makers
Abstract
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; witho... | -*- coding : utf-8 -*-
Part of : / Scheme
Date : Sat May 22 , 2010
Copyright ( c ) 2010 , 2011 < >
the Free Software Foundation , either version 3 of the License , or ( at
General Public License for more details .
You should have received a copy of the GNU General Public License
#!r6rs
(import (for (na... |
a121f47863bc4191a4dd05d4382a4f15b4c177df5c74d5e6a6543bddf5cc9583 | kmi/irs | review2008.lisp | Copyright © 2008 The Open University
Composite services for the LHDL project review 2008 .
;;; XXX The mix of lift/lower might hurt us here.
get - input - role and orch - get - input - role are from ( cleaned
;;; up by me).
(in-package #:ocml)
(in-ontology lhdl-goals)
(defun get-input-role (goal-input)
(... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/apps/lhdl/ontologies/lhdl-goals/review2008.lisp | lisp | XXX The mix of lift/lower might hurt us here.
up by me).
XXX These are hacks. They should be done either by aligning the
types in the definitions, or by mediation. Once again, I don't
have time to do it properly.
Compute the XML file name
for the file identified by BINARY-PART.
{{{ move-file-s3-to-bt-goal
}}... | Copyright © 2008 The Open University
Composite services for the LHDL project review 2008 .
get - input - role and orch - get - input - role are from ( cleaned
(in-package #:ocml)
(in-ontology lhdl-goals)
(defun get-input-role (goal-input)
(let ((ws wp::*current-orchestration-web-service*))
XXX This mig... |
ef281c2d3542e2489f714a605e61a3f6c4a5b1b02054edbcd864be979fac7cb3 | BinaryAnalysisPlatform/bap-plugins | predicate.ml | open Core_kernel
open Bap.Std
open Poly
type t = {
sat : 'a. 'a term -> exp -> bool
}
exception Unbound_predicate of string [@@deriving sexp]
let preds = String.Table.create ()
let register name (p : t) =
Hashtbl.add_exn preds ~key:name ~data:p
let lookup = Hashtbl.find preds
let is_marked = {
sat = fun... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap-plugins/2e9aa5c7c24ef494d0e7db1b43c5ceedcb4196a8/saluki/predicate.ml | ocaml | open Core_kernel
open Bap.Std
open Poly
type t = {
sat : 'a. 'a term -> exp -> bool
}
exception Unbound_predicate of string [@@deriving sexp]
let preds = String.Table.create ()
let register name (p : t) =
Hashtbl.add_exn preds ~key:name ~data:p
let lookup = Hashtbl.find preds
let is_marked = {
sat = fun... | |
c9e1596c47b0879cf2b381bfa614a54fc168d7133c98800c61d38a10067e7426 | sebastiaanvisser/clay | Mask.hs | # LANGUAGE
OverloadedStrings
, FlexibleInstances
, GeneralizedNewtypeDeriving
#
OverloadedStrings
, FlexibleInstances
, GeneralizedNewtypeDeriving
#-}
module Clay.Mask
(
-- * Generic mask property.
Mask (mask)
-- * The mask-composite.
, MaskComposite
, clear, copy
, sourceOver, sourceIn... | null | https://raw.githubusercontent.com/sebastiaanvisser/clay/16f55a5c6ab7fd98e39cedf852bd3400a02ac45f/src/Clay/Mask.hs | haskell | * Generic mask property.
* The mask-composite.
* The mask-position.
* The mask-size.
* The mask-repeat.
* The mask-origin.
* The mask-clip.
* The mask-attachment.
* The mask-image.
-----------------------------------------------------------------------------
| We implement the generic mask property as a type ... | # LANGUAGE
OverloadedStrings
, FlexibleInstances
, GeneralizedNewtypeDeriving
#
OverloadedStrings
, FlexibleInstances
, GeneralizedNewtypeDeriving
#-}
module Clay.Mask
(
Mask (mask)
, MaskComposite
, clear, copy
, sourceOver, sourceIn, sourceOut, sourceAtop
, destinationOver, destinatio... |
bbe178f21dbc78ac6cf79f55b02b41ec25d45e91361fb81c7b3ba18c1e8a6a08 | contivero/hasmin | RepeatStyle.hs | {-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
-- Module : Hasmin.Types.RepeatStyle
Copyright : ( c ) 2017
-- License : BSD3
-- Stability : experimental
-- Portability : unknown
--
-------------------------------------------------... | null | https://raw.githubusercontent.com/contivero/hasmin/2a7604159b51e69c5e9c564dce53cb3ab09ae22b/src/Hasmin/Types/RepeatStyle.hs | haskell | # LANGUAGE OverloadedStrings #
---------------------------------------------------------------------------
|
Module : Hasmin.Types.RepeatStyle
License : BSD3
Stability : experimental
Portability : unknown
---------------------------------------------------------------------------
| CSS <-backgrounds-3... | Copyright : ( c ) 2017
module Hasmin.Types.RepeatStyle
( RepeatStyle(..)
, RSKeyword(..)
) where
import Data.Monoid ((<>))
import Data.Text.Lazy.Builder (singleton)
import Hasmin.Class
data type , used in the properties @background - repeat@ and @background@.
data RepeatStyle = RepeatX
... |
de3721308edc0c26ed5c83a00e68758b0a2d78bbb6338b27ebd1910330b016e4 | sbcl/sbcl | system.impure.lisp | This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch after the fork
from CMU CL .
;;;;
;;;; This software is in the public domain and is provided with
;;;;... | null | https://raw.githubusercontent.com/sbcl/sbcl/dd911e00794a976aa590f5c458a9c3ae4d0bb6fa/tests/system.impure.lisp | lisp | more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS files for
more information.
There's nothing to assert here since the result can vary | This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
(in-package "SB-VM")
#-(and (or x86 x86-64) (not interpreter)) (invoke-restart 'run-tests::skip-file)
(test-util:with-test (:name :basic-cpuid)
(flet ((to-ascii (bi... |
e535be622a45dc9819e9ea649b2bc2feb8b5ffc3822ee386bf2004b6ffca1d42 | mirage/ocaml-vhd | patterns_lwt.ml |
* Copyright ( C ) 2011 - 2013 Citrix Inc
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file... | null | https://raw.githubusercontent.com/mirage/ocaml-vhd/ae12a799a2725b61b98a3d7c586249dad2d442b0/vhd_format_lwt_test/patterns_lwt.ml | ocaml | Verify that vhd [t] contains the sectors [expected]
Verify the raw data stream from [t] contains exactly [expected] and no more.
We consider sectors missing from the bitmap as being identical to sectors
present in the bitmap but which are full of zeroes.
XXX: this won't cope with very large copy requests
t... |
* Copyright ( C ) 2011 - 2013 Citrix Inc
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file... |
06c0653c8509859bdf693b0e198fdeaf3d04f7d78d0ac017c18e653840338eab | fetburner/Coq2SML | system.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/lib/system.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Expanding shell variables and home-... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ Id$
open Pp
open Util
op... |
680a286e3478a1a989f8163e99322a7608dc0913230b7515cd305080f78da494 | sneeuwballen/benchpress | Run_event.mli | (* This file is free software. See file "license" for more details. *)
(** {1 Event Stored on Disk or Transmitted on Network} *)
open Common
type prover = Prover.t
type checker = Proof_checker.t
type t =
| Prover_run of (Prover.name, Res.t) Run_result.t
| Checker_run of (Prover.name * Proof_checker.name, Proof... | null | https://raw.githubusercontent.com/sneeuwballen/benchpress/180692844c7680d391fb97ea348084fe9b143ea1/src/core/Run_event.mli | ocaml | This file is free software. See file "license" for more details.
* {1 Event Stored on Disk or Transmitted on Network} |
open Common
type prover = Prover.t
type checker = Proof_checker.t
type t =
| Prover_run of (Prover.name, Res.t) Run_result.t
| Checker_run of (Prover.name * Proof_checker.name, Proof_check_res.t) Run_result.t
type event = t
val mk_prover : (Prover.name, Res.t) Run_result.t -> t
val mk_checker : (Prover.name ... |
ec6fc8647a9961c89be840e7502369bc70df2190eadfad020814a9819c94c55f | dorchard/effect-monad | Reader.hs | # LANGUAGE ImplicitParams , DataKinds , RebindableSyntax , TypeOperators , ScopedTypeVariables #
import Prelude hiding (Monad(..))
import Control.Effect
import Control.Effect.Reader
import Data.Type.Map
import GHC.TypeLits
{- Examples -}
-- example :: Reader '["x" :-> a, "xs" :-> [a]] [a]
example = do
x <- ask (... | null | https://raw.githubusercontent.com/dorchard/effect-monad/5750ef8438f750e528002a0a4e255514cbf3150a/examples/Reader.hs | haskell | Examples
example :: Reader '["x" :-> a, "xs" :-> [a]] [a]
Examples with subeffecting (need to refine the types a bit to 'run') | # LANGUAGE ImplicitParams , DataKinds , RebindableSyntax , TypeOperators , ScopedTypeVariables #
import Prelude hiding (Monad(..))
import Control.Effect
import Control.Effect.Reader
import Data.Type.Map
import GHC.TypeLits
example = do
x <- ask (Var::(Var "x"))
xs <- ask (Var::(Var "xs"))
x' <- ask (Var::(Va... |
5deadf3ffd475152e6f4361aeda40d1c181c54bde7b460ca71ff8b2d70d076bb | aggieben/weblocks | test-template.lisp |
(in-package :weblocks-test)
;;; utilities for easier testing
(defun table-header-template (headers rows &key summary pretable posttable
(table-class "employee"))
`(:div :class ,(format nil "view table ~A" table-class)
(:div :class "extra-top-1" "<!-- empty -->")
(:div :class "extra-top-2" "<!-- empty -... | null | https://raw.githubusercontent.com/aggieben/weblocks/8d86be6a4fff8dde0b94181ba60d0dca2cbd9e25/test/views/tableview/test-template.lisp | lisp | utilities for easier testing |
(in-package :weblocks-test)
(defun table-header-template (headers rows &key summary pretable posttable
(table-class "employee"))
`(:div :class ,(format nil "view table ~A" table-class)
(:div :class "extra-top-1" "<!-- empty -->")
(:div :class "extra-top-2" "<!-- empty -->")
(:div :class "extra-top-3"... |
45755226782f57498c192923d36c95d6b24cd65d59e288acf37303afd3cbf468 | maximedenes/native-coq | functional_principles_proofs.ml | open Printer
open Errors
open Util
open Term
open Namegen
open Names
open Declarations
open Pp
open Entries
open Hiddentac
open Evd
open Tacmach
open Proof_type
open Tacticals
open Tactics
open Indfun_common
open Libnames
let msgnl = Pp.msgnl
let observe =
if do_observe ( )
then Pp.msgnl
else ( )
l... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/plugins/funind/functional_principles_proofs.ml | ocaml | msgnl (goal ++ fnl () ++ (str s)++(str " ")++(str "finished"));
observe (str "is_trivial_eq " ++ Printer.pr_lconstr t ++ (if res then str " true" else str " false"));
observe_tac msg
observe_tac "change_hyp_with_using thin"
observe_tac "change_hyp_with_using rename "
introducing context
Reductionops.loca... | open Printer
open Errors
open Util
open Term
open Namegen
open Names
open Declarations
open Pp
open Entries
open Hiddentac
open Evd
open Tacmach
open Proof_type
open Tacticals
open Tactics
open Indfun_common
open Libnames
let msgnl = Pp.msgnl
let observe =
if do_observe ( )
then Pp.msgnl
else ( )
l... |
2f0bf50cdc44ceda8591e653b26870240a58ba43cfdfabc73d07999affde92a6 | fukamachi/lack | lack.lisp | (in-package :cl-user)
(defpackage lack
(:use :cl)
(:import-from :lack.builder
:builder)
(:export :builder))
(in-package :lack)
| null | https://raw.githubusercontent.com/fukamachi/lack/1f155216aeea36291b325c519f041e469262a399/src/lack.lisp | lisp | (in-package :cl-user)
(defpackage lack
(:use :cl)
(:import-from :lack.builder
:builder)
(:export :builder))
(in-package :lack)
| |
51ef60a4badda5a926682e38aafae45a3f0175ab8205bf47355a3389e4c06f69 | turquoise-hexagon/euler | solution.scm | (import
(chicken fixnum))
(define-syntax test?
(syntax-rules ()
((_ n compare?)
(let loop ((c (fx/ n 10)) (p (fxmod n 10)))
(if (fx= c 0)
#t
(let ((t (fxmod c 10)))
(if (compare? p t)
(loop (fx/ c 10) t)
#f)))))))
(define (bouncy? n)
(not (or (test?... | null | https://raw.githubusercontent.com/turquoise-hexagon/euler/4c40455b3f78b4b6bb7409e8fe7323dda74b2a63/src/spoilers/112/solution.scm | scheme | (import
(chicken fixnum))
(define-syntax test?
(syntax-rules ()
((_ n compare?)
(let loop ((c (fx/ n 10)) (p (fxmod n 10)))
(if (fx= c 0)
#t
(let ((t (fxmod c 10)))
(if (compare? p t)
(loop (fx/ c 10) t)
#f)))))))
(define (bouncy? n)
(not (or (test?... | |
d2f4693d4ee6dfdba33911cf8c56859aa4c253ee34c61ed7102ebdc3181f4ce9 | leafclick/pgmig | logging.clj | (ns pgmig.logging
(:require [alexandermann.unclogging :as unclog]
[taoensso.timbre :as log]))
(defn configure-logging
([]
(configure-logging {:output-fn log/default-output-fn}))
([config]
(if (:output-fn config)
(unclog/merge-config! config)
(unclog/merge-config! (assoc config :output... | null | https://raw.githubusercontent.com/leafclick/pgmig/60dcbe719d83479cf8c4df39d3eeba28dcfad8f5/src/clj/pgmig/logging.clj | clojure | (ns pgmig.logging
(:require [alexandermann.unclogging :as unclog]
[taoensso.timbre :as log]))
(defn configure-logging
([]
(configure-logging {:output-fn log/default-output-fn}))
([config]
(if (:output-fn config)
(unclog/merge-config! config)
(unclog/merge-config! (assoc config :output... | |
49952cd96b4164b492bf3f97a452a07e38e8305fc1f66f8a6f0ebb92b51878b5 | philipcmonk/phlisped | movement.rkt | #lang racket
(require "../core/common.rkt")
(require "../core/disp.rkt")
(provide data)
(define (nth-child n event)
(if (> (length (utterance-args (whole-tree-selection-u Selected-tree))) n)
(select (list-ref (utterance-args (whole-tree-selection-u Selected-tree)) n) Selected-tree)
(select (last (utterance-args... | null | https://raw.githubusercontent.com/philipcmonk/phlisped/ded1be5d9e7206cd3c71db49ccd250fa4381cf99/commands/movement.rkt | racket | (set-whole-tree-utterance-tree! tree ((v11n-node->v11n-utterance (whole-tree-v11n tree)) (whole-tree-n-tree tree) 0 0 0 0 '() tree)) | #lang racket
(require "../core/common.rkt")
(require "../core/disp.rkt")
(provide data)
(define (nth-child n event)
(if (> (length (utterance-args (whole-tree-selection-u Selected-tree))) n)
(select (list-ref (utterance-args (whole-tree-selection-u Selected-tree)) n) Selected-tree)
(select (last (utterance-args... |
5c4e8c3aea98e6edd1281a99ee0a856d62e52ebf99d409432780b8343610f704 | pascal-knodel/haskell-craft | E'12'28.hs | --
--
--
------------------
Exercise 12.28 .
------------------
--
--
--
module E'12'28 where
| null | https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/_/links/E'12'28.hs | haskell |
----------------
----------------
| Exercise 12.28 .
module E'12'28 where
|
60ab615551640e98a88035703b8a893b5b5fc268652d122c1a1a9e6ef3c60935 | zadean/xqerl | prod_SchemaImport_SUITE.erl | -module('prod_SchemaImport_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['schema-import-1'/1]).
-export(['schema-import-2'/1]).
-export(['schema-impor... | null | https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/prod/prod_SchemaImport_SUITE.erl | erlang | -module('prod_SchemaImport_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['schema-import-1'/1]).
-export(['schema-import-2'/1]).
-export(['schema-impor... | |
1630c1d827cac394d5321971e5eef6d34f5c5a2e583cda24b8284a075f46ff83 | dakrone/clj-http | multipart.clj | (ns clj-http.multipart
"Namespace used for clj-http to create multipart entities and bodies."
(:import [java.io File InputStream]
org.apache.http.Consts
org.apache.http.entity.ContentType
[org.apache.http.entity.mime HttpMultipartMode MultipartEntityBuilder]
[org.apache.h... | null | https://raw.githubusercontent.com/dakrone/clj-http/dd15359451645f677b3e294164cf70330b92241d/src/clj_http/multipart.clj | clojure | we don't need to make a fake byte-array every time, only once
Create a FileBody object from the given map, requiring at least :content
Create an InputStreamBody object from the given map, requiring at least
:content and :name. If no :length is specified, clj-http will use
chunked transfer-encoding, if :length is s... | (ns clj-http.multipart
"Namespace used for clj-http to create multipart entities and bodies."
(:import [java.io File InputStream]
org.apache.http.Consts
org.apache.http.entity.ContentType
[org.apache.http.entity.mime HttpMultipartMode MultipartEntityBuilder]
[org.apache.h... |
1cd31e993e626a7b0c65a89d147196b99183eb775066df039f1d033d9875ed8e | zotonic/zotonic | validator_base_presence.erl | @author < >
2009
%% @doc Validator for checking if a input has been filled/checked in.
Copyright 2009
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%... | null | https://raw.githubusercontent.com/zotonic/zotonic/1a0e495474ec13c3356d45d49c89123da0aa23b7/apps/zotonic_mod_base/src/validators/validator_base_presence.erl | erlang | @doc Validator for checking if a input has been filled/checked in.
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 o... | @author < >
2009
Copyright 2009
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(validator_base_presence).
-include_lib("zotonic_core/include/zotonic.hrl").
-export([render_validator/5, validate/5]).
r... |
d557ac255175225cae69e2ec9d696d76958be47d04c35fcea929214cd2d796c4 | peti/cabal2spec | Cabal2Spec.hs | module Cabal2Spec ( cabal2spec, createSpecFile, ForceBinary, RunTests, CopyrightYear ) where
import Control.Monad
import Data.Char
import Data.List ( delete, nub, sort, (\\), inits, intersect, isPrefixOf, groupBy )
import Data.Time.Clock
import Data.Time.Format
import Distribution.Compiler
import Distribution.License
... | null | https://raw.githubusercontent.com/peti/cabal2spec/f3b903ce1812b2149ff2b8ebe5c6d1d254928b15/src/Cabal2Spec.hs | haskell | run commands before opening file to prevent empty file on error
maybe shell commands should be in a monad or something
Some packages conflate the synopsis and description fields. Ugh.
TODO: getSymbolicPath should not be used like this
TODO: What does this warning accomplish?
Add the license file to the main pack... | module Cabal2Spec ( cabal2spec, createSpecFile, ForceBinary, RunTests, CopyrightYear ) where
import Control.Monad
import Data.Char
import Data.List ( delete, nub, sort, (\\), inits, intersect, isPrefixOf, groupBy )
import Data.Time.Clock
import Data.Time.Format
import Distribution.Compiler
import Distribution.License
... |
f10d4cbc93caca11de8a7a587e2b27e39ef34f2bcbd0285ee5a2449c642aa0c1 | rizo/snowflake-os | genlex.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, proje... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/libraries/stdlib/genlex.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : genlex.mli , v 1.9 2005 - 10 ... |
ba4b91f37c53fad86c2dfa1cec8d9940ae4e3a089a8b0d8bd8ccf95020639fad | ngorogiannis/cyclist | prod.mli | open Lib
open Generic
include OrderedContainer with type elt = Atom.t
include Containers.S
with type Set.elt = t
with type Map.key = t
with type Hashmap.key = t
with type Hashset.elt = t
with type MSet.elt = t
with type FList.t = t list
val get_eqs : t -> (Term.t * Term.t) list
val get_deqs : t -> (Term.... | null | https://raw.githubusercontent.com/ngorogiannis/cyclist/c93a168d586b308ab2a2c730cd1b2375ab263167/src/firstorder/prod.mli | ocaml | val to_string : t -> string
val pp : Format.formatter -> t -> unit | open Lib
open Generic
include OrderedContainer with type elt = Atom.t
include Containers.S
with type Set.elt = t
with type Map.key = t
with type Hashmap.key = t
with type Hashset.elt = t
with type MSet.elt = t
with type FList.t = t list
val get_eqs : t -> (Term.t * Term.t) list
val get_deqs : t -> (Term.... |
336decd60f7b89aaf0c9d732581a5e7ab4129b7d7716d99119e8f6bf11254224 | egison/sweet-egison | delete.hs | {-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE DataKinds #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
import Control.Egison
import System.Environment
import Control.Mo... | null | https://raw.githubusercontent.com/egison/sweet-egison/fd3b392f9a2993bbc59d541b61f6641c7d193d6e/sample/delete.hs | haskell | # LANGUAGE QuasiQuotes #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts # | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
import Control.Egison
import System.Environment
import Control.Monad.Search
import Data.List hiding ( delete )
import Data.Maybe
delete x xs =
ma... |
e3a331c1cda9a6d79b96296231281c647e6c78473578732119e9598ef98dfae0 | haskellari/microstache | Render.hs | -- |
-- Module : Text.Microstache.Render
Copyright : © 2016–2017 Stack Builders
License : BSD 3 clause
--
Maintainer : < >
-- Stability : experimental
-- Portability : portable
--
Functions for rendering templates . You do n't usually need to
-- import the module, because "Text.Mic... | null | https://raw.githubusercontent.com/haskellari/microstache/bb397ddcd11ae4e9870a3fdcd65435a6a82d657a/src/Text/Microstache/Render.hs | haskell | |
Module : Text.Microstache.Render
Stability : experimental
Portability : portable
import the module, because "Text.Microstache" re-exports everything you may
need, import that module instead.
# LANGUAGE OverloadedStrings #
--------------------------------------------------------------------------
Th... | Copyright : © 2016–2017 Stack Builders
License : BSD 3 clause
Maintainer : < >
Functions for rendering templates . You do n't usually need to
# LANGUAGE CPP #
module Text.Microstache.Render
( renderMustache, renderMustacheW )
where
import Control.Monad (forM_,... |
0f49d3fc9aa52c27b4e95bcc22477c098f28082a7fe9ac5ea87cf9852c388f6b | kazu-yamamoto/rpf | Base.hs | {-# LANGUAGE OverloadedStrings #-}
module Milter.Base (
Packet (..)
, getPacket
, getIP
, getKeyVal
, getBody
, negotiate
, accept, discard, hold, reject, continue
) where
import Blaze.ByteString.Builder
import Blaze.ByteString.Builder.Char8
import Control.Applicative
import Control.Monad
import qua... | null | https://raw.githubusercontent.com/kazu-yamamoto/rpf/b9d5b6ee00efe508d8ba411c682b3b67e3dba768/Milter/Base.hs | haskell | # LANGUAGE OverloadedStrings #
--------------------------------------------------------------
--------------------------------------------------------------
--------------------------------------------------------------
--------------------------------------------------------------
removing the last '\0'
-------------... |
module Milter.Base (
Packet (..)
, getPacket
, getIP
, getKeyVal
, getBody
, negotiate
, accept, discard, hold, reject, continue
) where
import Blaze.ByteString.Builder
import Blaze.ByteString.Builder.Char8
import Control.Applicative
import Control.Monad
import qualified Data.ByteString as X (unpack... |
3a70339f19d2d9bf35cd528c4f07750e1f253997d2d938dbc25262c73856f042 | JHU-PL-Lab/jaylang | ddpa_abstract_ast.ml | open Batteries
open Jhupllib
open Jayil
open Ast
open Ast_pp
open Pp_utils
(** A type to express abstract variables. *)
type abstract_var = Abs_var of ident [@@deriving eq, ord, to_yojson, show]
(** A type to expression abstract record values. *)
type abstract_record_value = Abs_record_value of abstract_var Ident_map... | null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/src/ddpa-analysis/types/ddpa_abstract_ast.ml | ocaml | * A type to express abstract variables.
* A type to expression abstract record values.
* A type to expression abstract reference values.
* A type to express abstract values.
* A type to represent the bodies of abstract clauses.
* A type to represent abstract clauses.
* A type to represent abstract expressions.
*... | open Batteries
open Jhupllib
open Jayil
open Ast
open Ast_pp
open Pp_utils
type abstract_var = Abs_var of ident [@@deriving eq, ord, to_yojson, show]
type abstract_record_value = Abs_record_value of abstract_var Ident_map.t
[@@deriving eq, ord, to_yojson]
type abstract_ref_value = Abs_ref_value of abstract_var
[@@de... |
2379aad3330ce31cecb019b6f12b1350f38188464543f8402666c4f5dcf10074 | mit-pdos/mcqc | Context.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE TypeSynonymInstances #-}
module Types.Context where
import System.IO.Unsafe
import Data.Map
import Data.Text (Text)
import Control.Monad.State
import Debug.Trace
-- Named context
type Context a = Map Text a
-- ... | null | https://raw.githubusercontent.com/mit-pdos/mcqc/85b5a65f1750ffb7c2336fa4c9266cc238aeeb5e/src/Types/Context.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeSynonymInstances #
Named context
Print key values correctly
Merge two contexts, always prefer old definitions | # LANGUAGE RecordWildCards #
# LANGUAGE FlexibleInstances #
module Types.Context where
import System.IO.Unsafe
import Data.Map
import Data.Text (Text)
import Control.Monad.State
import Debug.Trace
type Context a = Map Text a
printCtx :: Show a => Context a -> IO ()
printCtx = putStr . concatMap (++"\n") . elems . map... |
f42ef83b292a5cd07d0766381da0423de6ac5d3ae4466b2cbde18f85307bbdb7 | kronkltd/jiksnu | serializers.clj | (ns jiksnu.serializers
(:require [clojure.data.json :as json])
(:import clojure.lang.Var
java.io.PrintWriter
java.text.SimpleDateFormat
java.util.Date
org.bson.types.ObjectId))
(defn write-json-date
([^Date date ^PrintWriter out]
(write-json-date date out false))
... | null | https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/src/jiksnu/serializers.clj | clojure | (ns jiksnu.serializers
(:require [clojure.data.json :as json])
(:import clojure.lang.Var
java.io.PrintWriter
java.text.SimpleDateFormat
java.util.Date
org.bson.types.ObjectId))
(defn write-json-date
([^Date date ^PrintWriter out]
(write-json-date date out false))
... | |
d67d7faea3b874ae3726dd9987f6351dbcda9964d6099f8c29d2a751b02c3947 | wdebeaum/step | unlucky.lisp | ;;;;
;;;; W::unlucky
;;;;
(define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL
:words (
(W::unlucky
(wordfeats (W::morph (:FORMS (-er -LY))))
(SENSES
((meta-data :origin cardiac :entry-date 20080508 :change-date 20090731 :comments LM-vocab)
(LF-PARENT ONT::unlucky)
(TEMPL central-adj-templ)
... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/unlucky.lisp | lisp |
W::unlucky
|
(define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL
:words (
(W::unlucky
(wordfeats (W::morph (:FORMS (-er -LY))))
(SENSES
((meta-data :origin cardiac :entry-date 20080508 :change-date 20090731 :comments LM-vocab)
(LF-PARENT ONT::unlucky)
(TEMPL central-adj-templ)
)
)
)
))
|
ac2b0c892135214910d68bd35dd37afd9f731d4b8075a3151b915648f0d7a8bc | fp-works/2019-winter-Haskell-school | LogAnalysis.hs | Week 2 Exercise : /~cis194/spring13/hw/02-ADTs.pdf
module LogAnalysis where
import Log
parseMessage :: String -> LogMessage
parseMessage message = case words message of
"E":n:t:m -> LogMessage (Error (read n)) (read t) (unwords m)
"W":t:m -> LogMessage Warning (r... | null | https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week2/aljon/src/LogAnalysis.hs | haskell | Week 2 Exercise : /~cis194/spring13/hw/02-ADTs.pdf
module LogAnalysis where
import Log
parseMessage :: String -> LogMessage
parseMessage message = case words message of
"E":n:t:m -> LogMessage (Error (read n)) (read t) (unwords m)
"W":t:m -> LogMessage Warning (r... | |
cdf4fd69dc3ee4a7c6b8c45c54e9ac4862f1a424ba20ec5d47b104b8578ffbeb | robert-strandh/Clump | docstrings-english.lisp | (cl:in-package #:clump-binary-tree)
(setf (documentation 'left 'function)
(format nil "Given a binary tree, return the left child of that tree.~@
If an object other than a binary tree is given,~@
then an error of type INVALID-BINARY-TREE is signaled."))
(setf (documentation... | null | https://raw.githubusercontent.com/robert-strandh/Clump/1ea4dbac1cb86713acff9ae58727dd187d21048a/Binary-tree/docstrings-english.lisp | lisp | (cl:in-package #:clump-binary-tree)
(setf (documentation 'left 'function)
(format nil "Given a binary tree, return the left child of that tree.~@
If an object other than a binary tree is given,~@
then an error of type INVALID-BINARY-TREE is signaled."))
(setf (documentation... | |
7a5be8cf3231bce0e6034f669b22e3166e2987240fec30dddfe068dbcf67007d | thlack/surfs | multi_users_select.clj | (ns ^:no-doc thlack.surfs.elements.spec.multi-users-select
(:require [clojure.spec.alpha :as s]
[thlack.surfs.strings.spec :as strings.spec]))
(s/def ::type #{:multi_users_select})
(s/def ::initial_users (s/coll-of ::strings.spec/id :into [] :gen-max 10 :min-count 1))
| null | https://raw.githubusercontent.com/thlack/surfs/e03d137d6d43c4b73a45a71984cf084d2904c4b0/src/thlack/surfs/elements/spec/multi_users_select.clj | clojure | (ns ^:no-doc thlack.surfs.elements.spec.multi-users-select
(:require [clojure.spec.alpha :as s]
[thlack.surfs.strings.spec :as strings.spec]))
(s/def ::type #{:multi_users_select})
(s/def ::initial_users (s/coll-of ::strings.spec/id :into [] :gen-max 10 :min-count 1))
| |
2a5fc4f5ea1b227b90b8590e456cf6f098bbaa23dcb16ae97cdfada430c285e3 | spechub/Hets | GraphAbstraction.hs | # LANGUAGE FlexibleInstances #
|
Module : ./GUI / GraphAbstraction.hs
Description : Interface for graph viewing and abstraction
Copyright : ( c ) , , Uni Bremen 2002 - 2008
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability :... | null | https://raw.githubusercontent.com/spechub/Hets/bbaa9dd2d2e5eb1f2fd3ec6c799a6dde7dee6da2/GUI/GraphAbstraction.hs | haskell | * Types
* Creation and display
* Node interface
* Edge interface
* Conversion and update of graph
| uDrawGraph graph
| Node id type
| Node value
| Edge value
| Datastructure for changes, storing all needed information for change
Node changes
Edge changes
Compressed edge changes
| Internal node
^ uDrawGra... | # LANGUAGE FlexibleInstances #
|
Module : ./GUI / GraphAbstraction.hs
Description : Interface for graph viewing and abstraction
Copyright : ( c ) , , Uni Bremen 2002 - 2008
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability :... |
ed1d55c4feaacff8660ee08b12a101b526ebca6c20995a7c222a56703d2e672c | clojurians-org/haskell-example | SFTP.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE LambdaCase #
# LANGUAGE RecursiveDo #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
module Frontend.Page.DataSandbox.DataService.FileService.SFTP
(dataService_sftp) where
import Common.Api
import Common.Types
import Common.WebSocketM... | null | https://raw.githubusercontent.com/clojurians-org/haskell-example/c96b021bdef52a121e04ea203c8c3e458770a25a/conduit-ui/frontend/src/Frontend/Page/DataSandbox/DataService/FileService/SFTP.hs | haskell | -
elClass "a" "section" $ text "."
elClass "i" "divider" $ text "/"
elClass "a" "section" $ text "xxx"
- | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE LambdaCase #
# LANGUAGE RecursiveDo #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
module Frontend.Page.DataSandbox.DataService.FileService.SFTP
(dataService_sftp) where
import Common.Api
import Common.Types
import Common.WebSocketM... |
9d9e2116d9e658b9a74c6ff8438edc8a3194b60e27dc2bae61f8b5a4e6b7c782 | borgeby/clj-json-pointer | compliance_test.cljc | (ns clj-json-pointer.compliance-test
"Implementation of the JSON patch compliance test suite from -patch/json-patch-tests"
(:require [clojure.test :refer [deftest is testing]]
[clj-json-pointer.core :as json-pointer])
#?(:clj (:import (clojure.lang ExceptionInfo))))
(deftest json-patch-compliance-tes... | null | https://raw.githubusercontent.com/borgeby/clj-json-pointer/f04e47c8f23fe4cf01f9d20b869508471d7b6518/test/clj_json_pointer/compliance_test.cljc | clojure | (ns clj-json-pointer.compliance-test
"Implementation of the JSON patch compliance test suite from -patch/json-patch-tests"
(:require [clojure.test :refer [deftest is testing]]
[clj-json-pointer.core :as json-pointer])
#?(:clj (:import (clojure.lang ExceptionInfo))))
(deftest json-patch-compliance-tes... | |
72473e97b311a8652edd6cbe5802f0673bcbebc0fc0322b09633161e1c8e6430 | eproxus/grapherl | grapherl.erl | %%==============================================================================
Copyright 2010 Erlang Solutions Ltd.
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
... | null | https://raw.githubusercontent.com/eproxus/grapherl/2c5d0e4b3de45f2aa02f9cd4008dbaea0c0bc972/src/grapherl.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 ex... | Copyright 2010 Erlang Solutions Ltd.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
@doc Create graphs of Erlang systems and programs .
all extensions that graphviz ( ` dot ' ) supports . Default ... |
afc89f1a0911887111bb2c2b8e8dd93f46bdbae56e36f1b87a13a9080c40688e | cyppan/grape | garfield.clj | (ns grape.fixtures.garfield)
| null | https://raw.githubusercontent.com/cyppan/grape/62488a335542fc58fc9126b8d5ff7fccdd16f1d7/test/grape/fixtures/garfield.clj | clojure | (ns grape.fixtures.garfield)
| |
3ba1d32adcfd62d40cecba90326c928b4202e6b28072c615389f5473e63bbab7 | master/ejabberd | ejabberd_web.erl | %%%----------------------------------------------------------------------
File : ejabberd_web.erl
Author : < >
%%% Purpose :
Created : 28 Feb 2004 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2012 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
modify it un... | null | https://raw.githubusercontent.com/master/ejabberd/9c31874d5a9d1852ece1b8ae70dd4b7e5eef7cf7/src/web/ejabberd_web.erl | erlang | ----------------------------------------------------------------------
Purpose :
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warr... | File : ejabberd_web.erl
Author : < >
Created : 28 Feb 2004 by < >
ejabberd , Copyright ( C ) 2002 - 2012 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU G... |
ecc9364e0ef0a4e3296947b055659ce90d1b9c8a4bb9fd03dc3bef43fe79b8d9 | kloimhardt/werkbank | matrix.clj | ;
Copyright © 2017 .
This work is based on the Scmutils system of MIT / GNU Scheme :
Copyright © 2002 Massachusetts Institute of Technology
;
; This is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; ei... | null | https://raw.githubusercontent.com/kloimhardt/werkbank/df66274eb978d060a043b8429b29d0f36c4a2e89/src/sicmutils/matrix.clj | clojure |
This is free software; you can redistribute it and/or modify
either version 3 of the License , or ( at
your option) any later version.
This software is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR... | Copyright © 2017 .
This work is based on the Scmutils system of MIT / GNU Scheme :
Copyright © 2002 Massachusetts Institute of Technology
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(ns sicmutils.matrix
(:refer-clo... |
d161b51566bfb21a80cd68430f87e507c30ea7691b1c63cb772917364e2b37d7 | johnlinvc/erruby | erruby_file.erl | -module(erruby_file).
-include("../rb.hrl").
-export([install_file_classes/0]).
install_file_classes() ->
{ok, FileClass} = erruby_class:new_class(),
'File' = erruby_object:def_global_const('File', FileClass),
erruby_object:def_singleton_method(FileClass, 'expand_path', fun method_expand_path/3),
ok.
method_e... | null | https://raw.githubusercontent.com/johnlinvc/erruby/60df66495a01f9dda08bd3f670bfe9dc0661a168/src/erruby_lib/erruby_file.erl | erlang | -module(erruby_file).
-include("../rb.hrl").
-export([install_file_classes/0]).
install_file_classes() ->
{ok, FileClass} = erruby_class:new_class(),
'File' = erruby_object:def_global_const('File', FileClass),
erruby_object:def_singleton_method(FileClass, 'expand_path', fun method_expand_path/3),
ok.
method_e... | |
68fe14ce45286a1476c8630c80db7b68d93225c7ddea6688e36774de84d2b487 | fugue/fregot | Extended.hs | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
-}
{-# LANGUAGE Rank... | null | https://raw.githubusercontent.com/fugue/fregot/c3d87f37c43558761d5f6ac758d2f1a4117adb3e/lib/Control/Monad/Except/Extended.hs | haskell | # LANGUAGE Rank2Types # | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
-}
module Control.Mo... |
3f2f289ed9f1daa94906e3e85e7a6e6e0a157dd5eca6fd6fc94ebb134c129a54 | jwiegley/notes | LensPipes.hs | module LensPipes where
import Control.Applicative
import Control.Lens
import Control.Lens.Internal.Bazaar
import Control.Monad
import Pipes
import Pipes.Core
import Pipes.Lift
import qualified Pipes.Prelude as P
pipe :: Monad m => Lens' Int (Produc... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/LensPipes.hs | haskell | module LensPipes where
import Control.Applicative
import Control.Lens
import Control.Lens.Internal.Bazaar
import Control.Monad
import Pipes
import Pipes.Core
import Pipes.Lift
import qualified Pipes.Prelude as P
pipe :: Monad m => Lens' Int (Produc... | |
88b75f6dc90f447506c2971bca7a5a8c111943dc09005ab46908047feb8dc046 | opennars/Narjure | list_expansion.clj | (ns nal.deriver.list-expansion
(:require [nal.deriver.utils :refer [walk]]
[clojure.string :as s]))
(def max-elements-in-list 7)
(defn get-list
"Finds the first :list element in the rule."
[prefix statement]
(cond
(and (keyword? statement) (s/starts-with? (str statement) prefix))
statement... | null | https://raw.githubusercontent.com/opennars/Narjure/cd5a72e6777fc47271d721fef8362aa2dad664ca/src/nal/deriver/list_expansion.clj | clojure | (ns nal.deriver.list-expansion
(:require [nal.deriver.utils :refer [walk]]
[clojure.string :as s]))
(def max-elements-in-list 7)
(defn get-list
"Finds the first :list element in the rule."
[prefix statement]
(cond
(and (keyword? statement) (s/starts-with? (str statement) prefix))
statement... | |
93ecae7ef7d61ac24db953afe8b0218196812e3e066cc969075c67eb49a4452a | eugenehr/erlyconv | cp10081.erl | %% THIS FILE WAS AUTOMATICALLY GENERATED BY gen_src.pl
FROM mappings / MICSFT / MAC / TURKISH.TXT AT 2016 - 08 - 19
-module(cp10081).
-vsn(20160819).
-export([to_unicode/1, from_unicode/1]).
%% Public functions
to_unicode(16#80) -> 16#00C4;
to_unicode(16#81) -> 16#00C5;
to_unicode(16#82) -> 16#00C7;
to_unicode(16#83... | null | https://raw.githubusercontent.com/eugenehr/erlyconv/ecdcd7db8f785c9638cd1ebad37ccd426c050cdf/src/cp10081.erl | erlang | THIS FILE WAS AUTOMATICALLY GENERATED BY gen_src.pl
Public functions
Private functions | FROM mappings / MICSFT / MAC / TURKISH.TXT AT 2016 - 08 - 19
-module(cp10081).
-vsn(20160819).
-export([to_unicode/1, from_unicode/1]).
to_unicode(16#80) -> 16#00C4;
to_unicode(16#81) -> 16#00C5;
to_unicode(16#82) -> 16#00C7;
to_unicode(16#83) -> 16#00C9;
to_unicode(16#84) -> 16#00D1;
to_unicode(16#85) -> 16#00D6;
t... |
3714d25ffc0d20c1bd09013b326f9eb08f14c7e1c81a7f238537724ca0a57c13 | Cantido/horizons | parser.clj | (ns horizons.parsing.parser
"Parses and transforms output from the HORIZONS telnet client."
(:require [horizons.parsing.transform :as t]
[horizons.parsing.tree :as tree]
[instaparse.core :as core]
[instaparse.transform :as it]
[clojure.tools.logging :as log]
... | null | https://raw.githubusercontent.com/Cantido/horizons/989e0964d5eebb82c3968049ffd05649625bc25d/src/horizons/parsing/parser.clj | clojure | instaparse/parser tries to slurp the given URL,
so it's probably best to wait until startup call it. | (ns horizons.parsing.parser
"Parses and transforms output from the HORIZONS telnet client."
(:require [horizons.parsing.transform :as t]
[horizons.parsing.tree :as tree]
[instaparse.core :as core]
[instaparse.transform :as it]
[clojure.tools.logging :as log]
... |
9e577c63ec51a4321dd1edbd76189d859ed233a90f9d832db5448e93135543f8 | ntrocado/cl-collider-examples | 5-2.lisp | (defun rrand (n1 n2)
(if (= n1 n2)
n1
(let ((mi (min n1 n2))
(ma (max n1 n2)))
(+ mi (random (- ma mi))))))
(defun exp-rand (mi ma)
(lin-exp (random 1.0) 0 1.0 mi ma))
(defun rand2 (n)
(- (random (* 2 n)) n))
(defparameter *b*
(buffer-read
(merge-pathnames #p"sounds/a11wlk01.wav"
(... | null | https://raw.githubusercontent.com/ntrocado/cl-collider-examples/67eec426ea45f5423eefd9391d9a7e8ba41f8b51/nick-collins-tutorial/5-2.lisp | lisp | simple sine grain synthdef
listen to a single grain
simple playbuf grain synthdef
amp is missing
individual grain
The sound can be made to disappear into a stream of tiny quanta and reappear, coalescing out of distinct particles
eval at the repl | (defun rrand (n1 n2)
(if (= n1 n2)
n1
(let ((mi (min n1 n2))
(ma (max n1 n2)))
(+ mi (random (- ma mi))))))
(defun exp-rand (mi ma)
(lin-exp (random 1.0) 0 1.0 mi ma))
(defun rand2 (n)
(- (random (* 2 n)) n))
(defparameter *b*
(buffer-read
(merge-pathnames #p"sounds/a11wlk01.wav"
(... |
6404c9a865ecf9dabd2eb258e589d37ca940b6e713685b70aa81c6dd33e0322f | BranchTaken/Hemlock | test_of_alist_to_alist.ml | open! Basis.Rudiments
open! Basis
open MapTest
open Map
let test () =
let test kvs = begin
let map = of_alist (module UnsTestCmper) kvs in
File.Fmt.stdout
|> Fmt.fmt "of_alist "
|> (List.pp (pp_kv String.pp)) kvs
|> Fmt.fmt "; to_alist -> "
|> (List.pp (pp_kv String.pp)) (to_alist map)
|>... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/f3604ceda4f75cf18b6ee2b1c2f3c5759ad495a5/bootstrap/test/basis/map/test_of_alist_to_alist.ml | ocaml | open! Basis.Rudiments
open! Basis
open MapTest
open Map
let test () =
let test kvs = begin
let map = of_alist (module UnsTestCmper) kvs in
File.Fmt.stdout
|> Fmt.fmt "of_alist "
|> (List.pp (pp_kv String.pp)) kvs
|> Fmt.fmt "; to_alist -> "
|> (List.pp (pp_kv String.pp)) (to_alist map)
|>... | |
eba5d5b6e48174728d43ef346390f31e344a159f519877ccaf6b744b92f3d38b | ahf/ircd-pony | pony_hostmask.erl | -module(pony_hostmask).
-export([parse/1]).
parse_nickname_hostname([NicknameAndUsername, Hostname]) ->
case string:tokens(NicknameAndUsername, "!") of
[Nickname, Username] ->
{ok, Nickname, Username, Hostname};
_ ->
{error, {invalid_hostmask, NicknameAndUsername}}
end;
... | null | https://raw.githubusercontent.com/ahf/ircd-pony/e44eabd77954c020d76c6aa1cbde1284f6a6b115/src/pony_hostmask.erl | erlang | -module(pony_hostmask).
-export([parse/1]).
parse_nickname_hostname([NicknameAndUsername, Hostname]) ->
case string:tokens(NicknameAndUsername, "!") of
[Nickname, Username] ->
{ok, Nickname, Username, Hostname};
_ ->
{error, {invalid_hostmask, NicknameAndUsername}}
end;
... | |
dfff0bcccc9d65c44ebe2978dc64ddbbe15787ee8c6dbd247016848eeaf1700a | skanev/playground | 42.scm | SICP exercise 1.42
;
Let f and be two one - argument functions . The composition f after is defined to be
; the function x ↦ f(g(x)). Define a procedure compose that implements composition. For
example , if inc is a procedure that adds 1 to its argument ,
;
( ( compose square inc ) 6 )
49
(define (compose ... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/01/42.scm | scheme |
the function x ↦ f(g(x)). Define a procedure compose that implements composition. For
| SICP exercise 1.42
Let f and be two one - argument functions . The composition f after is defined to be
example , if inc is a procedure that adds 1 to its argument ,
( ( compose square inc ) 6 )
49
(define (compose f g)
(lambda (x) (f (g x))))
|
8a7c6e1d2f176b4c36ff38ddbe0d617d82a6f5e0a1f86da3c21804c8ccd19758 | gcv/appengine-magic | url_fetch.clj | (ns appengine-magic.services.url-fetch
(:use [appengine-magic.utils :only [derefify-future]])
(:import [com.google.appengine.api.urlfetch
URLFetchServiceFactory
FetchOptions
FetchOptions$Builder
HTTPHeader
HTTPRequest
HTTPMethod]))
(defonce ^{... | null | https://raw.githubusercontent.com/gcv/appengine-magic/facc9fe4945b3becd772d6b053844e572dcc1c73/src/appengine_magic/services/url_fetch.clj | clojure | (ns appengine-magic.services.url-fetch
(:use [appengine-magic.utils :only [derefify-future]])
(:import [com.google.appengine.api.urlfetch
URLFetchServiceFactory
FetchOptions
FetchOptions$Builder
HTTPHeader
HTTPRequest
HTTPMethod]))
(defonce ^{... | |
648baeeadafb2e5f77148e6bd0f4f2ce9a9ab7d72a67320b3847b2839554fee0 | tommaisey/aeon | lin-cong-c.help.scm | ;; Default initial parameters.
(hear
(let ((x (mouse-x kr 20 sample-rate 0 0.1)))
(mul (lin-cong-c ar x 1.1 0.13 1 0) 0.2)))
;; randomly modulate parameters.
(hear
(mul (lin-cong-c
ar
(mul-add (lf-noise2 kr 1.0) 1e4 1e4)
(mul-add (lf-noise2 kr 0.1) 0.5 1.4)
(mul-add (lf-noise2 kr 0.1... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/chaos/lin-cong-c.help.scm | scheme | Default initial parameters.
randomly modulate parameters.
As frequency control... |
(hear
(let ((x (mouse-x kr 20 sample-rate 0 0.1)))
(mul (lin-cong-c ar x 1.1 0.13 1 0) 0.2)))
(hear
(mul (lin-cong-c
ar
(mul-add (lf-noise2 kr 1.0) 1e4 1e4)
(mul-add (lf-noise2 kr 0.1) 0.5 1.4)
(mul-add (lf-noise2 kr 0.1) 0.1 0.1)
(lf-noise2 kr 0.1)
0)
0.2))
(he... |
4a46fb44c4ab0d27fb1df1c329b6a4729deb7629d5e13e7a9dace57960f655a7 | toschoo/mom | responder.hs | module Main
where
import qualified Socket as Sock
import qualified Network.Mom.Stompl.Frame as F
import qualified Network.Socket as S
import qualified Network.Socket.ByteString as SB
import Network.BSD (getProtocolNumber)
import Control.Monad (forever, void)
import Con... | null | https://raw.githubusercontent.com/toschoo/mom/b58ca23d05c98ab50d9e981bd4ad2cdb76846399/src/client/test/suite/responder.hs | haskell | addr)) | module Main
where
import qualified Socket as Sock
import qualified Network.Mom.Stompl.Frame as F
import qualified Network.Socket as S
import qualified Network.Socket.ByteString as SB
import Network.BSD (getProtocolNumber)
import Control.Monad (forever, void)
import Con... |
3813d72462f856b153cb9bd994dd0e1ba6b1b1e43f71841579998a0acd42c5a1 | antono/guix-debian | gcal.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the Lice... | null | https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/gnu/packages/gcal.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages gcal)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (g... |
ee388956757d594a6b1dc96b19a2d0e993b24600e717700fa8adb351da4665f0 | ciderpunx/57-exercises-for-programmers | Library.hs | module Library where
reusable function used in more than one place
import Control.Exception (catch, IOException)
import Control.Monad (forM)
import System.Random (randomRIO)
import Data.Array.IO (writeArray, IOArray, readArray, newListArray)
import System.IO (hSetEcho,stdin,hFlush, stdout)
import Data.Char (toUpper, ... | null | https://raw.githubusercontent.com/ciderpunx/57-exercises-for-programmers/25958ab80cc3edc29756d3bddd2d89815fd390bf/src/Library.hs | haskell | /O(N)/ from:
Prompt for a string, with a message
Prompt for a password (dont echo input)
Prompts for a number with message M
Warns and restarts on no parse
Prompt for a non-negative number, with message
Warns and restarts on no parse
Prompt for a non-negative float, with message
Prompt for a non-negative Int,... | module Library where
reusable function used in more than one place
import Control.Exception (catch, IOException)
import Control.Monad (forM)
import System.Random (randomRIO)
import Data.Array.IO (writeArray, IOArray, readArray, newListArray)
import System.IO (hSetEcho,stdin,hFlush, stdout)
import Data.Char (toUpper, ... |
267e935f1c4629037dbef51fee2a5961d15ebae00788a86ca96a28cbfb515eab | machine-intelligence/provability | Parser.hs | {-# LANGUAGE OverloadedStrings #-}
module Modal.Parser where
import Control.Applicative
import Control.Monad (void)
import Data.Char
import Data.Functor.Identity
import Data.Set (Set)
import Data.Text (Text)
import Modal.Utilities
import Text.Parsec hiding ((<|>), optional, many)
import Text.Parsec.Text (Parser)
import... | null | https://raw.githubusercontent.com/machine-intelligence/provability/12d981dfe7d0420b06f5548e96afc3f39f338d26/src/Modal/Parser.hs | haskell | # LANGUAGE OverloadedStrings #
can span newlines and eat tabs etc. Ugh.
TODO: we may safely relax this, but it's not clear how far.
-----------------------------------------------------------------------------
Testing | module Modal.Parser where
import Control.Applicative
import Control.Monad (void)
import Data.Char
import Data.Functor.Identity
import Data.Set (Set)
import Data.Text (Text)
import Modal.Utilities
import Text.Parsec hiding ((<|>), optional, many)
import Text.Parsec.Text (Parser)
import Text.Printf (printf)
import qualif... |
2070f7bb689b44c1d6bb59c3b9e41965f9acf6c2775639192acded281460238a | bschwb/cis194-solutions | Fibonacci.hs | # OPTIONS_GHC -Wall #
# OPTIONS_GHC -fno - warn - missing - methods #
# LANGUAGE FlexibleInstances #
module Fibonacci where
--------------------------------------------------------------------------------
Exercise 1
fib :: Integer -> Integer
fib 0 = 0
fib 1 = 1
fib n = fib(n-1) + fib (n-2)
fibs1 :: [Integer]
fib... | null | https://raw.githubusercontent.com/bschwb/cis194-solutions/e79f96083b6edbfed18a2adbc749c41d196d8ff7/06-lazy/Fibonacci.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
couldn't think of something with only n additions so i had a look at
i especially like fibs4
my idea which does not work
fiba _ = []
--------------------------... | # OPTIONS_GHC -Wall #
# OPTIONS_GHC -fno - warn - missing - methods #
# LANGUAGE FlexibleInstances #
module Fibonacci where
Exercise 1
fib :: Integer -> Integer
fib 0 = 0
fib 1 = 1
fib n = fib(n-1) + fib (n-2)
fibs1 :: [Integer]
fibs1 = fmap fib [0..]
Exercise 2
-fibonacci-numbers-in-haskell
: : [ Intege... |
52c478ac39e5a7f7a4e011c6778be17a0d67762a3306500ad9e6e7e37b3feaab | haskell-tls/hs-tls | Types.hs | # LANGUAGE CPP #
{-# LANGUAGE EmptyDataDecls #-}
-- |
Module : Network .
-- License : BSD-style
Maintainer : < >
-- Stability : experimental
-- Portability : unknown
--
module Network.TLS.Types
( Version(..)
, SessionID
, SessionData(..)
, SessionFlag(..)
, CertReqContext
,... | null | https://raw.githubusercontent.com/haskell-tls/hs-tls/4c9e32c2777543f098c1ec92711b252321f29fc2/core/Network/TLS/Types.hs | haskell | # LANGUAGE EmptyDataDecls #
|
License : BSD-style
Stability : experimental
Portability : unknown
| Versions known to TLS
SSL2 is just defined, but this version is and will not be supported.
| A session ID
| Session data to resume
| Some session flags
| Certificate request context for TLS 1.3.
NewSess... | # LANGUAGE CPP #
Module : Network .
Maintainer : < >
module Network.TLS.Types
( Version(..)
, SessionID
, SessionData(..)
, SessionFlag(..)
, CertReqContext
, TLS13TicketInfo(..)
, CipherID
, CompressionID
, Role(..)
, invertRole
, Direction(..)
, HostName... |
d5d42a6b65e496048864cada32409949980b68a3935aa43ccd85c10b0776cabd | DanielKeogh/hashtrie | hashtrie.lisp | ;;;; hashtrie.lisp
(in-package #:hashtrie)
(proclaim '(optimize (speed 3) (safety 0) (debug 0)))
(defstruct (hashtrie (:constructor nil)))
(defstruct (persistent-hashtrie (:conc-name phm-)
(:include hashtrie))
(meta nil :type (or null hashtrie))
(count nil :type fixnum :read-only t)
(root nil :type (or nul... | null | https://raw.githubusercontent.com/DanielKeogh/hashtrie/c39e81f91ffcc3d66bd0daa1330d3a50f3ac0dbe/hashtrie.lisp | lisp | hashtrie.lisp
Persisent hash map impl
transient-hashtrie impl
else
hash-map-array-node
hash-map-bitmap-node
else
else
else
hash-collision-node
Print |
(in-package #:hashtrie)
(proclaim '(optimize (speed 3) (safety 0) (debug 0)))
(defstruct (hashtrie (:constructor nil)))
(defstruct (persistent-hashtrie (:conc-name phm-)
(:include hashtrie))
(meta nil :type (or null hashtrie))
(count nil :type fixnum :read-only t)
(root nil :type (or null hash-map-node) :r... |
377b94043040ee1b58db78a08bd08f7d51ab59e88876fc1f2c388865c464c23f | johnwhitington/haskell-from-the-very-beginning-exercises | Examples.hs | printDictEntry :: Show a => (a, String) -> IO ()
printDictEntry (k, v) =
do putStrLn (show k)
putStrLn v
doList :: Monad m => (a -> m b) -> [a] -> m ()
doList _ [] = return ()
doList f (x:xs) =
do f x
doList f xs
printDict :: Show a => [(a, String)] -> IO ()
printDict = doList printDictEntry
| null | https://raw.githubusercontent.com/johnwhitington/haskell-from-the-very-beginning-exercises/18bda69bf8a0233feb6f023c6a2219b7c20e9fa1/examples/Chapter16/Examples.hs | haskell | printDictEntry :: Show a => (a, String) -> IO ()
printDictEntry (k, v) =
do putStrLn (show k)
putStrLn v
doList :: Monad m => (a -> m b) -> [a] -> m ()
doList _ [] = return ()
doList f (x:xs) =
do f x
doList f xs
printDict :: Show a => [(a, String)] -> IO ()
printDict = doList printDictEntry
| |
0e0a4f3ea800e273aea2768f2b5715598d159b7902198828d8401cff633bac24 | tmfg/mmtis-national-access-point | finap_services.clj | (ns dashboard.data.finap-services
(:require [org.httpkit.client :as http-client]
[cheshire.core :as cheshire]))
(defn fetch-published-service-count []
(-> "-search?response_format=json"
http-client/get deref :body (cheshire/decode keyword)
:total-service-count))
| null | https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/a86cc890ffa1fe4f773083be5d2556e87a93d975/tools/dashboard/src/clj/dashboard/data/finap_services.clj | clojure | (ns dashboard.data.finap-services
(:require [org.httpkit.client :as http-client]
[cheshire.core :as cheshire]))
(defn fetch-published-service-count []
(-> "-search?response_format=json"
http-client/get deref :body (cheshire/decode keyword)
:total-service-count))
| |
003ba1aa92c4665117c3c837e52f861b78d786c99e8c039bde5c0e15304f1ee7 | shin-sakata/Citrous | Extractor.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
module Citrous.Unit.Extractor where
import Data.Convertible.Utf8
import Data.Convertible.Utf8.Internal
import Text.Read (readMaybe)
class Extractor a where
extract :: ByteString -> Maybe a
instance {-# O... | null | https://raw.githubusercontent.com/shin-sakata/Citrous/85ecf51ae41852a3d1c038c76c56a78145a6e21d/src/Citrous/Unit/Extractor.hs | haskell | # OVERLAPPING #
# OVERLAPPING #
# OVERLAPPING #
# OVERLAPPING #
# OVERLAPPING #
# OVERLAPPING #
# OVERLAPPING #
# OVERLAPPING #
# OVERLAPPING #
# OVERLAPPABLE # | # LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
module Citrous.Unit.Extractor where
import Data.Convertible.Utf8
import Data.Convertible.Utf8.Internal
import Text.Read (readMaybe)
class Extractor a where
extract :: ByteString -> Maybe a
extract = Ju... |
cdaaee823e1c62e2652565e6e629ade281c1e32b9f7cc678c1b6245fd0f9b599 | patricoferris/ocaml-multicore-monorepo | test_common.ml | open OUnit2
let (prf, strf) = Format.(fprintf, asprintf)
let pp_map pp f ppf x = pp ppf (f x)
let pp_diff pp ppf (a, b) = prf ppf "@[<v>want: %a@,have: %a@]" pp a pp b
let rec blocks_of_cs n cs =
let open Cstruct in
if length cs <= n then [ cs ]
else sub cs 0 n :: blocks_of_cs n (shift cs n)
let rec range a b ... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/mirage-crypto/tests/test_common.ml | ocaml | open OUnit2
let (prf, strf) = Format.(fprintf, asprintf)
let pp_map pp f ppf x = pp ppf (f x)
let pp_diff pp ppf (a, b) = prf ppf "@[<v>want: %a@,have: %a@]" pp a pp b
let rec blocks_of_cs n cs =
let open Cstruct in
if length cs <= n then [ cs ]
else sub cs 0 n :: blocks_of_cs n (shift cs n)
let rec range a b ... | |
6bbe38b9c4b37048bc7779573a24953d676c5abcf06886205a5e48a28fc28a2f | huiyaozheng/Mirage-zmq | config.ml | open Mirage
let main = foreign ~packages:[package "mirage-zmq"] "Unikernel.Main" (stackv4 @-> job)
let stack = generic_stackv4 default_network
let () =
register "xsub_unikernel" [
main $ stack
]
| null | https://raw.githubusercontent.com/huiyaozheng/Mirage-zmq/af288a3378a7c357bd5646a3abf4fd5ae777369b/test/XSUB/unikernel/config.ml | ocaml | open Mirage
let main = foreign ~packages:[package "mirage-zmq"] "Unikernel.Main" (stackv4 @-> job)
let stack = generic_stackv4 default_network
let () =
register "xsub_unikernel" [
main $ stack
]
| |
032d54cf87c6dc60babc859c70476a0896cb5cef482d37791d9d6c607304aab4 | digital-asset/ghc | T10715.hs | # LANGUAGE FlexibleContexts #
module T10715 where
import Data.Coerce (coerce, Coercible)
import Data.Ord ( Down ) -- convenient newtype
data X a
-- See Trac #10715 for a long discussion about whether
-- this should be accepted or not.
--
But in Trac # 12466 we decided to accept contradictory
-- type signatures, s... | null | https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/typecheck/should_fail/T10715.hs | haskell | convenient newtype
See Trac #10715 for a long discussion about whether
this should be accepted or not.
type signatures, so definition is now accepeted even
though you can never call it. Instead we get a
redundant pattern-match warning, in the
post-typechecking pattern-match checks | # LANGUAGE FlexibleContexts #
module T10715 where
import Data.Coerce (coerce, Coercible)
data X a
But in Trac # 12466 we decided to accept contradictory
doCoerce :: Coercible a (X a) => a -> X a
doCoerce = coerce
|
3b756c22e267d715674883814bac564962dd2c0861e0a8717d6ec18e14254158 | lumberdev/auth0-clojure | edn.clj | (ns auth0-clojure.utils.edn
(:require [clojure.string :as string]))
(defn dashes->underscores [str]
(string/replace str \- \_))
(defn underscores->dashes [str]
(string/replace str \_ \-))
(defn kw->str-val [k]
(-> k
name
dashes->underscores))
(defn str-val->kw
([str]
(str-val->kw nil str))
... | null | https://raw.githubusercontent.com/lumberdev/auth0-clojure/ed01e95d7a11e6948d286a35aead100ab5a39a00/src/auth0_clojure/utils/edn.clj | clojure | possible parse values
alternatives | (ns auth0-clojure.utils.edn
(:require [clojure.string :as string]))
(defn dashes->underscores [str]
(string/replace str \- \_))
(defn underscores->dashes [str]
(string/replace str \_ \-))
(defn kw->str-val [k]
(-> k
name
dashes->underscores))
(defn str-val->kw
([str]
(str-val->kw nil str))
... |
45769b56f5a6f6667021abf21a9f5163fe05d7f40e46175f617b8d09b00d3062 | dco-dev/interval-tree | core.clj | (ns com.dean.interval-tree.core
(:require [clojure.core.reducers :as r]
[com.dean.interval-tree.tree.interval :as interval]
[com.dean.interval-tree.tree.interval-map :refer [->IntervalMap]]
[com.dean.interval-tree.tree.interval-set :refer [->IntervalSet]]
... | null | https://raw.githubusercontent.com/dco-dev/interval-tree/a82ef893b33fa361206231dabbc96f8f81b2598b/src/com/dean/interval_tree/core.clj | clojure |
Set Algebra
Ordered Set
TODO: allow high speed construction AND custom compare-fn
TODO: refactor
NOTE: subject to change!
experimentally determined to be in the ballpark, given the current
performance characteristics upstream
Ordered Map
Interval Map
Interval Set
| (ns com.dean.interval-tree.core
(:require [clojure.core.reducers :as r]
[com.dean.interval-tree.tree.interval :as interval]
[com.dean.interval-tree.tree.interval-map :refer [->IntervalMap]]
[com.dean.interval-tree.tree.interval-set :refer [->IntervalSet]]
... |
d90692c98f652f4a184fed5abf19280ba120db4dbfba99448b6218c5d891beb5 | B-Lang-org/bsc | BDD.hs | # LANGUAGE CPP #
module BDD(
BDD, bddFalse, bddTrue, bddVar,
bddAnd, bddOr, bddNot, bddImplies, bddEquiv,
bddRestrict, bddAllSat,
bddIsTrue, bddIsFalse, bddIsIf) where
import Control.Monad(liftM, ap)
import Data.List(sort)
import qualified Data.Map as M
import qualified Data.IntMap as ... | null | https://raw.githubusercontent.com/B-Lang-org/bsc/91ad4276a74525410a9efe132785b812af5c9fc3/src/comp/BDD.hs | haskell | mkPair x y = (x, y)
inefficient
Check
bddIsIso
--
--
the next unique number to use
a cache of N nodes to avoid recreating an existing N node
--
XXX should pre-compute what to do when constants are encountered
XXX exponential
Some BDD test code to compute the solution to the N queen problem .
make sure the... | # LANGUAGE CPP #
module BDD(
BDD, bddFalse, bddTrue, bddVar,
bddAnd, bddOr, bddNot, bddImplies, bddEquiv,
bddRestrict, bddAllSat,
bddIsTrue, bddIsFalse, bddIsIf) where
import Control.Monad(liftM, ap)
import Data.List(sort)
import qualified Data.Map as M
import qualified Data.IntMap as ... |
89ca148dc5f4c9dedac2577e633e029866ec9b7cd95a0aa8b6edd70f6817d523 | alphagov/govuk-guix | utils.scm | (define-module (gds build utils)
#:export (run-command))
(define (run-command . args)
(simple-format #t "Running command: ~A\n" (string-join args))
(let
((exit-val
(status:exit-val (apply system* args))))
(display "\n")
(if (zero? exit-val)
#t
(begin
(simple-format... | null | https://raw.githubusercontent.com/alphagov/govuk-guix/dea8c26d2ae882d0278be5c745e23abb25d4a4e2/gds/build/utils.scm | scheme | (define-module (gds build utils)
#:export (run-command))
(define (run-command . args)
(simple-format #t "Running command: ~A\n" (string-join args))
(let
((exit-val
(status:exit-val (apply system* args))))
(display "\n")
(if (zero? exit-val)
#t
(begin
(simple-format... | |
7ce0d48dacbe1675b8e47bfae959aab05e42ffd624efd5f41861a4a622b29f93 | smart-chain-fr/tokenomia | Folder.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE ExtendedDefaultRules #
# LANGUAGE TypeApplications #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE NamedFieldPuns #
# LANGUAGE TupleSections #
# LANGUAGE DuplicateRecordFields #
# OPTIONS_GHC -fno - war... | null | https://raw.githubusercontent.com/smart-chain-fr/tokenomia/67b361e0bd8494ed0b1af701e28eb8b3e9211fc9/src/Tokenomia/Wallet/LocalRepository/Folder.hs | haskell | # LANGUAGE RankNTypes # | # LANGUAGE LambdaCase #
# LANGUAGE TemplateHaskell #
# LANGUAGE ExtendedDefaultRules #
# LANGUAGE TypeApplications #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE NamedFieldPuns #
# LANGUAGE TupleSections #
# LANGUAGE DuplicateRecordFields #
# OPTIONS_GHC -fno - warn - missing - signatures #
#... |
373476d58bb5f0f294bf81a1140257bc9b58326e93584b68f1116d7cc5f8a02f | serokell/qtah | QListView.hs | This file is part of Qtah .
--
Copyright 2015 - 2018 The Qtah Authors .
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your option) ... | null | https://raw.githubusercontent.com/serokell/qtah/abb4932248c82dc5c662a20d8f177acbc7cfa722/qtah-generator/src/Graphics/UI/Qtah/Generator/Interface/Widgets/QListView.hs | haskell |
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MER... | This file is part of Qtah .
Copyright 2015 - 2018 The Qtah Authors .
the Free Software Foundation , either version 3 of the License , or
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
module Graphics.UI.Qtah.Generator.Interface.Wi... |
e142823594dd9b13541ecb4cb15b71f6200800ea8a2f588c82eb1a733d2d30c3 | hipsleek/hipsleek | run-oc.ml | #include "xdebug.cppo"
let results = ref ([] : (float * string) list)
let sorted_results = ref ([] : (float * string) list)
let get_formula (fr : int) (input : string) : (string * int) =
let s = String.index_from input fr '#' in
let e = String.index_from input fr ';' in
let res = (String.sub input s (e - s + 1),... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/bef_indent/run-oc.ml | ocaml | #include "xdebug.cppo"
let results = ref ([] : (float * string) list)
let sorted_results = ref ([] : (float * string) list)
let get_formula (fr : int) (input : string) : (string * int) =
let s = String.index_from input fr '#' in
let e = String.index_from input fr ';' in
let res = (String.sub input s (e - s + 1),... | |
76d179df2b98a2e89928a47d109add0e5d0d882e80dab92dc19c572acaa5933b | freza/audit_log | audit_log_app.erl | Copyright ( c ) 2012 < >
Copyright ( c ) 2005 - 2011 Everything Everywhere Ltd.
%%% All rights reserved.
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the following conditions
%%% are met:
%%%
1 . Redistributions of source code must ret... | null | https://raw.githubusercontent.com/freza/audit_log/db965480ee9db88e01daa23685c30e79d10a3cea/src/audit_log_app.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer in the
document... | Copyright ( c ) 2012 < >
Copyright ( c ) 2005 - 2011 Everything Everywhere Ltd.
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ` ` AS IS '' AND
IMPLIED WARRAN... |
646df20e92899d875e919357e401b0a037f5e95a03f30e75ce9daeb0743b1d9d | HealthSamurai/dsql | core.clj | (ns dsql.core
(:require [clojure.string :as str])
(:refer-clojure :exclude [format]))
(defn reduce-separated [sep acc f coll]
(if (empty? coll)
acc
(loop [[x & xs] coll
acc acc]
(let [acc' (f acc x)]
(if (empty? xs)
acc'
(recur xs (conj acc' sep)))))))
(defn ... | null | https://raw.githubusercontent.com/HealthSamurai/dsql/6ef2883b94f3441855e727bf35d4b0f06c217db6/src/dsql/core.clj | clojure | (ns dsql.core
(:require [clojure.string :as str])
(:refer-clojure :exclude [format]))
(defn reduce-separated [sep acc f coll]
(if (empty? coll)
acc
(loop [[x & xs] coll
acc acc]
(let [acc' (f acc x)]
(if (empty? xs)
acc'
(recur xs (conj acc' sep)))))))
(defn ... | |
c7cca49f6db5520fc302722a55f052745deeafb06ec0a004b6eb78f79f6a47bd | haskell-opengl/OpenGLRaw | PGI.hs | --------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.PGI
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
-- A convenience module, combining all raw modules containing... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/PGI.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.PGI
License : BSD3
Stability : stable
Portability : portable
A convenience module, combining all raw modules containing PGI extensions.
----------------------------------------------------------... | Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.PGI (
module Graphics.GL.PGI.MiscHints,
module Graphics.GL.PGI.VertexHints
) where
import Graphics.GL.PGI.MiscHints
import Graphics.GL.PGI.VertexHints
|
a842200ccd7b40a5514d5917672bfb030ab56af132457aeded0910d073058562 | portkey-cloud/aws-clj-sdk | config.clj | (ns portkey.aws.config (:require [portkey.aws]))
(def
endpoints
'{"ap-northeast-1"
{:credential-scope {:service "config", :region "ap-northeast-1"},
:ssl-common-name "config.ap-northeast-1.amazonaws.com",
:endpoint "-northeast-1.amazonaws.com",
:signature-version :v4},
"eu-west-1"
{:credential-s... | null | https://raw.githubusercontent.com/portkey-cloud/aws-clj-sdk/10623a5c86bd56c8b312f56b76ae5ff52c26a945/src/portkey/aws/config.clj | clojure | (ns portkey.aws.config (:require [portkey.aws]))
(def
endpoints
'{"ap-northeast-1"
{:credential-scope {:service "config", :region "ap-northeast-1"},
:ssl-common-name "config.ap-northeast-1.amazonaws.com",
:endpoint "-northeast-1.amazonaws.com",
:signature-version :v4},
"eu-west-1"
{:credential-s... | |
6ee49e47c7aa3642aefdb165798926e078ba5e36a80c5238f03ce30369318ed1 | thesis/shale | logging.clj | (ns shale.logging
(:require [clojure.pprint :refer [pprint]]
[com.stuartsierra.component :as component]
[schema.core :as s]
[taoensso.timbre :as timbre]
[taoensso.timbre.tools.logging]))
(s/defrecord Logger
[config :- (s/maybe {s/Any s/Any})
logging-config :- (s/m... | null | https://raw.githubusercontent.com/thesis/shale/84180532e46ee5d9ee0218138da04ea035bcf7d2/src/clj/shale/logging.clj | clojure | (ns shale.logging
(:require [clojure.pprint :refer [pprint]]
[com.stuartsierra.component :as component]
[schema.core :as s]
[taoensso.timbre :as timbre]
[taoensso.timbre.tools.logging]))
(s/defrecord Logger
[config :- (s/maybe {s/Any s/Any})
logging-config :- (s/m... | |
047a75ad499843e1edc423750d6643fef4f706c7aa2dd9ac584b21d4c6f73507 | DavidVujic/polylith-experiments | events.cljs | (ns example.hello-world.events
(:require [re-frame.core :as rf]))
(rf/reg-event-db
:theme
(fn [db [_ theme]]
(assoc-in db [:theme :active] theme)))
(rf/reg-event-fx
:toggle-theme
(fn [_ [_ on?]]
{:dispatch [:theme (if on? :light :dark)]}))
| null | https://raw.githubusercontent.com/DavidVujic/polylith-experiments/ac63d55d2a5e77082aa629304aafa86b667c12bc/components/hello_world/src/example/hello_world/events.cljs | clojure | (ns example.hello-world.events
(:require [re-frame.core :as rf]))
(rf/reg-event-db
:theme
(fn [db [_ theme]]
(assoc-in db [:theme :active] theme)))
(rf/reg-event-fx
:toggle-theme
(fn [_ [_ on?]]
{:dispatch [:theme (if on? :light :dark)]}))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.