_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 |
|---|---|---|---|---|---|---|---|---|
727563ae2d3273a06fd5c19d61a67618b498adc97d7ecfd0c2303ae904833678 | rescript-lang/rescript-compiler | rescript_cpp.ml | Copyright ( C ) 2021- , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later vers... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/80054a29289286121014e9d6ce789e08b48516bf/jscomp/ml/rescript_cpp.ml | ocaml | so that it can be overridden
let iter_directive_built_in_value f = Hashtbl.iter f directive_built_in_values
a || (b || (c || d))
let l = v in
a && (b && (c && d))
let l = v in
let string_of_dir_conditional (x : dir_conditional) =
match x with
| Dir_if_true -> "Dir_if_true"
| Dir_if_false -> "D... | Copyright ( C ) 2021- , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later vers... |
fa5936cd7be19c8174f56d7dad42e5c91add1cd960757d30edcb9f72bd5d5d94 | huangz1990/real-world-haskell-cn | runLength.hs | -- file: ch12/Barcode.hs
type Run = Int
type RunLength a = [(Run, a)]
runLength :: Eq a => [a] -> RunLength a
runLength = map rle . group
where rle xs = (length xs, head xs) | null | https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/code/ch12/runLength.hs | haskell | file: ch12/Barcode.hs | type Run = Int
type RunLength a = [(Run, a)]
runLength :: Eq a => [a] -> RunLength a
runLength = map rle . group
where rle xs = (length xs, head xs) |
6d1216198aff053689ddbd62065d38305d96f4356039e2f8500686f2f218ac22 | digital-asset/ghc | tc257.hs | # LANGUAGE KindSignatures , ConstraintKinds , MultiParamTypeClasses , FlexibleInstances , UndecidableInstances #
module Ctx where
import Data.Kind ( Type, Constraint )
data Proxy (ctxt :: Type -> Constraint) = Proxy
At one time , this one worked :
nonmeth :: ctxt Int => Proxy ctxt -> a
nonmeth prox = nonmeth prox
... | null | https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/typecheck/should_compile/tc257.hs | haskell | But this one didn't:
The error was:
The problem was that irreducible evidence did not interact with
evidence of equal type. | # LANGUAGE KindSignatures , ConstraintKinds , MultiParamTypeClasses , FlexibleInstances , UndecidableInstances #
module Ctx where
import Data.Kind ( Type, Constraint )
data Proxy (ctxt :: Type -> Constraint) = Proxy
At one time , this one worked :
nonmeth :: ctxt Int => Proxy ctxt -> a
nonmeth prox = nonmeth prox
... |
c03dd6256def8eb7ff0f118dfd56dc63f36fa843b9a361c39f562a3dad131072 | privet-kitty/cl-competitive | base.lisp | (defpackage :cp/test/base
(:use #:cl #:fiveam)
(:export #:base-suite))
(in-package :cp/test/base)
(def-suite base-suite)
| null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/test/base.lisp | lisp | (defpackage :cp/test/base
(:use #:cl #:fiveam)
(:export #:base-suite))
(in-package :cp/test/base)
(def-suite base-suite)
| |
2da62bd0fc013c087d3ec0531b377460efcbe2da53293b912a1e7ef5568cdf3f | rescript-lang/rescript-compiler | ext_topsort.ml | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/e60482c6f6a69994907b9bd56e58ce87052e3659/jscomp/ext/ext_topsort.ml | ocaml | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | |
ed48ae0a682167e780d5c0bfa9c626d2c691e2e8e4b0bff225524c7bfcb77fdc | greglook/clj-multiformats | b58.cljc | (ns multiformats.base.b58
"Base 58 encoding implementation variants."
(:require
[alphabase.core :as abc]))
(def btc-alphabet
"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")
(defn format-btc
"Format byte data as base58 using the bitcoin alphabet."
[data]
(abc/encode btc-alphabet data))
... | null | https://raw.githubusercontent.com/greglook/clj-multiformats/51ebc08e03625fef323101b6f0e390d0c8e2244a/src/multiformats/base/b58.cljc | clojure | (ns multiformats.base.b58
"Base 58 encoding implementation variants."
(:require
[alphabase.core :as abc]))
(def btc-alphabet
"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")
(defn format-btc
"Format byte data as base58 using the bitcoin alphabet."
[data]
(abc/encode btc-alphabet data))
... | |
7303a08e1fca638941442908db1fb19e048ce293647627a7cdd88b19ec781e1e | helvm/helma | SimpleParams.hs | module HelVM.HelMA.Automata.WhiteSpace.SimpleParams where
import HelVM.HelMA.Automaton.API.AutoParams
import HelVM.HelMA.Automaton.API.IOTypes
import HelVM.HelMA.Automaton.Types.FormatType
import HelVM.HelMA.Automaton.Types.RAMType
import HelVM.HelMA.Automaton.Types.S... | null | https://raw.githubusercontent.com/helvm/helma/2ae31668ce11ded53daf01effe25047d5ce471cf/hs/src/HelVM/HelMA/Automata/WhiteSpace/SimpleParams.hs | haskell | | Construction for tests
| Construction for benchmark
| Type | module HelVM.HelMA.Automata.WhiteSpace.SimpleParams where
import HelVM.HelMA.Automaton.API.AutoParams
import HelVM.HelMA.Automaton.API.IOTypes
import HelVM.HelMA.Automaton.Types.FormatType
import HelVM.HelMA.Automaton.Types.RAMType
import HelVM.HelMA.Automaton.Types.S... |
1cce38b6a5e1127f91e44a852a94be788117342b4bcded7bf9c37525aa48048f | ucsd-progsys/nate | z.ml | (*F*)
List.iter (/) [1;2]
| null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/easyocaml-additional/exams/z.ml | ocaml | F | List.iter (/) [1;2]
|
933a88955f7daf723211475763d26e4572407d8e06912270b03a509b37f61b6d | racket/racket7 | load.rkt | #lang racket/base
(require racket/private/check
racket/private/executable-path
"module.rkt"
"parameter.rkt")
(provide load
load-extension
load/use-compiled
embedded-load)
(define/who (load s)
(check who path-string? s)
(call-with-current-load-relative-director... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/eval/load.rkt | racket | ---------------------------------------- | #lang racket/base
(require racket/private/check
racket/private/executable-path
"module.rkt"
"parameter.rkt")
(provide load
load-extension
load/use-compiled
embedded-load)
(define/who (load s)
(check who path-string? s)
(call-with-current-load-relative-director... |
7ca3d0923671cb6f7fef8b56e16fbe60449869fd3d379e09e3fbf97ad97a030f | coq/coq | abbreviation.mli | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/f227d8ed33a5ba2343de962f404b0b094dcc86a3/interp/abbreviation.mli | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
b65ae74c05e68034f1aeafdf70baa0d98be557715a62c0c1316fafc2af5f79d2 | DavidAlphaFox/RabbitMQ | rabbit_mgmt_wm_queues.erl | The contents of this file are subject to the Mozilla Public License
Version 1.1 ( the " License " ) ; you may not use this file except in
%% compliance with the License. You may obtain a copy of the License at
%% /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITH... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_queues.erl | erlang | compliance with the License. You may obtain a copy of the License at
/
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
--------------------------------------------------------------------
---... | 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
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ Management Plugin .
The Initial Developer of the Original Code... |
014c05f1bfcd1074bdc1454d87bf3e7570b073a4a32f0dae83604a99ea9041fb | icicle-lang/zebra-ambiata | Block.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Test.Zebra.Factset.Block where
import qualified Data.List as List
import qualified Data.Map as Map
import qualified Data.Text as Text
import qualified Data.Vector as Boxed
import Disorder.Core.Run (ExpectedTe... | null | https://raw.githubusercontent.com/icicle-lang/zebra-ambiata/394ee5f98b4805df2c76abb52cdaad9fd7825f81/zebra-core/test/Test/Zebra/Factset/Block.hs | haskell | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Test.Zebra.Factset.Block where
import qualified Data.List as List
import qualified Data.Map as Map
import qualified Data.Text as Text
import qualified Data.Vector as Boxed
import Disorder.Core.Run (ExpectedTe... | |
1282e3d9bbb5adbbd3f74a26cf4bce14a69d5ecc3283c00bf4b82fcfc74e49d9 | sile/logi | logi_builtin_layout_default_tests.erl | 2014 - 2016 < >
%% @end
-module(logi_builtin_layout_default_tests).
-include_lib("eunit/include/eunit.hrl").
%----------------------------------------------------------------------------------------------------------------------
%% Unit Tests
%%-------------------------------------------------------------------... | null | https://raw.githubusercontent.com/sile/logi/1022fbc238a7d18765fe864a7174958142160ee8/test/logi_builtin_layout_default_tests.erl | erlang | @end
----------------------------------------------------------------------------------------------------------------------
Unit Tests
---------------------------------------------------------------------------------------------------------------------- | 2014 - 2016 < >
-module(logi_builtin_layout_default_tests).
-include_lib("eunit/include/eunit.hrl").
new_test_() ->
[
{"Creates a `logi_builtin_layout_default' layout",
fun () ->
Layout = logi_builtin_layout_default:new(),
?assert(logi_layout:is_layout(Layout))
e... |
fc72abe08b419a3bdff618f74617ef694739d67bf15a8d0dfed6f94fdea2d4de | darrenldl/ProVerif-ATP | ffgg.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | null | https://raw.githubusercontent.com/darrenldl/ProVerif-ATP/7af6cfb9e0550ecdb072c471e15b8f22b07408bd/proverif2.00/examples/pitype/ffgg/ffgg.ml | ocaml | Public key encryption
Host names | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... |
2430f91004b36ae8a9404cfccf3b295f1fa17cfb0a424d5e65cf9bf8813db4f4 | metosin/testit | eventually_test.clj | (ns testit.eventually-test
(:require [clojure.test :refer :all]
[clojure.string :as str]
[testit.core :refer :all]
[testit.eventually :refer [eventually *eventually-timeout-ms*]]))
(deftest ^:slow eventually-test
(facts "immediatelly pass"
(+ 1 2) =eventually=> 3
3 =even... | null | https://raw.githubusercontent.com/metosin/testit/85c9cfc9629f44d13e9b16fe25175235ae1e39e1/test/testit/eventually_test.clj | clojure |
Uncomment these to see failing tests:
=>
Expected: (pos? (deref d))
Actual: -1
(deref d) =eventually= pos?
=>
Expected: (pos? (deref d))
Actual: :testit.core/timeout
(deref d) =eventually= pos? | (ns testit.eventually-test
(:require [clojure.test :refer :all]
[clojure.string :as str]
[testit.core :refer :all]
[testit.eventually :refer [eventually *eventually-timeout-ms*]]))
(deftest ^:slow eventually-test
(facts "immediatelly pass"
(+ 1 2) =eventually=> 3
3 =even... |
6bab9378fdccde4ddd384c9171eaa35d23dd3fe0afb866375192ff50e1ec2641 | SNePS/SNePS2 | rule-finfers.lisp | -*- Mode : Lisp ; Syntax : Common - Lisp ; Package : SNIP ; Base : 10 -*-
Copyright ( C ) 1984 - -2013
Research Foundation of State University of New York
Version : $ I d : rule - finfers.lisp , v 1.2 2013/08/28 19:07:28 shapiro Exp $
;; This file is part of SNePS.
$ BEGIN LICENSE$
The contents of this... | null | https://raw.githubusercontent.com/SNePS/SNePS2/d3862108609b1879f2c546112072ad4caefc050d/snip/fns/rule-finfers.lisp | lisp | Syntax : Common - Lisp ; Package : SNIP ; Base : 10 -*-
This file is part of SNePS.
you may
not use this file except in compliance with the License. You
may obtain a copy of the License at
. edu/sneps/Downloads/ubpl.pdf.
or implied. See the License for the specific language gov
erning rights and limitations ... |
Copyright ( C ) 1984 - -2013
Research Foundation of State University of New York
Version : $ I d : rule - finfers.lisp , v 1.2 2013/08/28 19:07:28 shapiro Exp $
$ BEGIN LICENSE$
The contents of this file are subject to the University at
Software distributed under the License is distributed on an
" AS... |
09c74da310f9d994179a1d676682965804d4baac84f3c96ed57fce4b01d85549 | input-output-hk/cardano-ledger | Payload.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Cardano.Chain.Update.Payload (
APayload ... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/b9aa1ad1728c0ceeca62657ec94d6d099896c052/eras/byron/ledger/impl/src/Cardano/Chain/Update/Payload.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings #
| Update System payload
Used for debugging purposes only | # LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Cardano.Chain.Update.Payload (
APayload (..),
Payload,
payload,
)
where
import Cardano.Chain.Update.Pr... |
53f760b02aeac1552ad9ef912ee95e12bac10348d6a5c00e1936ee2e474eeb2d | masaeedu/proppie | Main.hs | module Main where
import Data.Coerce
import Pipes (Server', Client, request, respond, (>>>), runEffect)
import Data.Foldable
import Control.Monad
import Optics
import Newtypes
import ExtraClasses
server :: Functor m => Server' Int m r
server = forever $ respond (* 2)
client :: Show s => Int -> Client s (Int, Int) I... | null | https://raw.githubusercontent.com/masaeedu/proppie/95e11f23e462de976ba90bd1a66be3a258628b23/app/Main.hs | haskell | module Main where
import Data.Coerce
import Pipes (Server', Client, request, respond, (>>>), runEffect)
import Data.Foldable
import Control.Monad
import Optics
import Newtypes
import ExtraClasses
server :: Functor m => Server' Int m r
server = forever $ respond (* 2)
client :: Show s => Int -> Client s (Int, Int) I... | |
8131965794324c98739c5657833c0adf0684540218c1ff118163c940bc1e20b7 | gldubc/cast-machine | errors.ml | Props to for this Fouine file
open Lexing
(* small module to format some text *)
module Format = struct
let green = 32
let red = 31
let yellow = 33
let blue = 34
let magenta = 35
let cyan = 36
let lightgray = 37
let darkgray = 90
let lightred ... | null | https://raw.githubusercontent.com/gldubc/cast-machine/9735444063b4366cd53e585ec52ad808a051f503/src/errors.ml | ocaml | small module to format some text
creating all of our errors
error of parsing | Props to for this Fouine file
open Lexing
module Format = struct
let green = 32
let red = 31
let yellow = 33
let blue = 34
let magenta = 35
let cyan = 36
let lightgray = 37
let darkgray = 90
let lightred = 91
let lightgreen = 92
let li... |
a22b6bf78a2b1992381b86d0a83688a1630964449a74ab63b6902078b72ab7f3 | strymonas/staged-streams.ocaml | stream_combinators.mli | (* Public interface of the combinator library *)
type 'a stream
(* Producers *)
val of_arr : 'a array code -> 'a stream
val unfold : ('z code -> ('a * 'z) option code) -> 'z code -> 'a stream
Consumer
val fold : ('z code -> 'a code -> 'z code) -> 'z code -> 'a stream -> 'z code
val fold_tupled : ('z1 code -> 'a co... | null | https://raw.githubusercontent.com/strymonas/staged-streams.ocaml/91669be7d0922e9d537afa133bf0b69bce0f0d89/lib/stream_combinators.mli | ocaml | Public interface of the combinator library
Producers
Transformers |
type 'a stream
val of_arr : 'a array code -> 'a stream
val unfold : ('z code -> ('a * 'z) option code) -> 'z code -> 'a stream
Consumer
val fold : ('z code -> 'a code -> 'z code) -> 'z code -> 'a stream -> 'z code
val fold_tupled : ('z1 code -> 'a code -> 'z1 code) -> 'z1 code ->
('z2 code -> 'a ... |
addfd6998f0b4b7db1ee6649d56ac7a1f996161cb366486425b1498ca19abd19 | turlando/airhead | core.cljs | (ns airhead-frontend.core
(:require [reagent.core :as r]
[airhead-frontend.components :refer [page-component]]
[airhead-frontend.state :as state]))
(def dev? ^boolean js/goog.DEBUG)
(defn maybe-dev-setup! []
(when dev?
(enable-console-print!)))
(defn mount-root []
(r/render [page-co... | null | https://raw.githubusercontent.com/turlando/airhead/f38d8b3177d90462ad377c207a84966388cb326e/frontend/src/cljs/airhead_frontend/core.cljs | clojure | (ns airhead-frontend.core
(:require [reagent.core :as r]
[airhead-frontend.components :refer [page-component]]
[airhead-frontend.state :as state]))
(def dev? ^boolean js/goog.DEBUG)
(defn maybe-dev-setup! []
(when dev?
(enable-console-print!)))
(defn mount-root []
(r/render [page-co... | |
7af5d0877e24cdda3c49e12e63b4dfa347931932da95cb79fe1c32779efcd48b | ghc/ghc | Documentation.hs | {-# LANGUAGE GADTs #-}
module Rules.Documentation (
-- * Rules
buildPackageDocumentation, documentationRules,
-- * Utilities
haddockDependencies
) where
import Hadrian.BuildPath
import Hadrian.Haskell.Cabal
import Hadrian.Haskell.Cabal.Type
import Rules.Generate (ghcPrimDependencies)
import Base... | null | https://raw.githubusercontent.com/ghc/ghc/2592ab6924ee34ed0f0d82a7cb0aed393d93bb14/hadrian/src/Rules/Documentation.hs | haskell | # LANGUAGE GADTs #
* Rules
* Utilities
TODO: Get rid of this hack.
TODO: Get rid of this hack.
| Build all documentation
also implies "docs-haddock"
include PDFs unless --docs=no-sphinx[-pdf] is
passed.
include manpage unless --docs=no-sphinx[-man] is given.
include toplevel html target unless we neither want... |
module Rules.Documentation (
buildPackageDocumentation, documentationRules,
haddockDependencies
) where
import Hadrian.BuildPath
import Hadrian.Haskell.Cabal
import Hadrian.Haskell.Cabal.Type
import Rules.Generate (ghcPrimDependencies)
import Base
import Context
import Expression (getContextData, interp... |
31dc391ee11da0d5086b08ce92d10a040eb330779d4b7e72ea142050a62b3ef5 | lgessler/glam | util.clj | (ns glam.xtdb.util
(:require [glam.xtdb.easy :as gxe]
[glam.server.id-counter :refer [id-counter]]))
(defn identize
"Turn a single id or seq of ids into a (Pathom-style) ident or vec of idents, respectively.
Note that this will look like {:foo/id 1} instead of [:foo/id 1] -- the latter is a Fulcroism... | null | https://raw.githubusercontent.com/lgessler/glam/a31b5cb6caaabdeaca44360b292de370f48ea2a2/src/main/glam/xtdb/util.clj | clojure | conveniences
join conveniences | (ns glam.xtdb.util
(:require [glam.xtdb.easy :as gxe]
[glam.server.id-counter :refer [id-counter]]))
(defn identize
"Turn a single id or seq of ids into a (Pathom-style) ident or vec of idents, respectively.
Note that this will look like {:foo/id 1} instead of [:foo/id 1] -- the latter is a Fulcroism... |
137a6db113ae380e5340d9bb203bdbba14319d01fbade2eb355023c6db5031fb | Apress/beg-haskell | WithMonads.hs | module Chapter7.APriori.WithMonads where
import Control.Monad (guard)
-- import Data.Set (Set)
import qualified Data.Set as S
import Data.List (unfoldr)
import Chapter7.APriori.Types
apriori2 :: Double -> Double -> [Transaction] -> [AssocRule]
transactions =
let l1 = generateL1 minSupport transactions
... | null | https://raw.githubusercontent.com/Apress/beg-haskell/aaacbf047d553e6177c38807e662cc465409dffd/chapter7/src/Chapter7/APriori/WithMonads.hs | haskell | import Data.Set (Set) | module Chapter7.APriori.WithMonads where
import Control.Monad (guard)
import qualified Data.Set as S
import Data.List (unfoldr)
import Chapter7.APriori.Types
apriori2 :: Double -> Double -> [Transaction] -> [AssocRule]
transactions =
let l1 = generateL1 minSupport transactions
allL = concat $ unfold... |
6afb809891b63578a7d4c923d112ee9fb01af440b94c3d019e0153d3add7b941 | lortabac/ariel | Examples.hs | # LANGUAGE OverloadedLists #
{-# LANGUAGE OverloadedStrings #-}
module Examples where
import Ariel.Common.Prim
import Ariel.Common.Types
import Ariel.Core.Run
import Ariel.Core.Types
exampleDefs :: Defs
exampleDefs =
Defs
{ globals = mempty,
sumTypes = [(QName "base" "bool", ["false", "true"])]
}
ex... | null | https://raw.githubusercontent.com/lortabac/ariel/b613b6f24c12879f0267f950cae9052ba18a9a18/bench/Examples.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE OverloadedLists #
module Examples where
import Ariel.Common.Prim
import Ariel.Common.Types
import Ariel.Core.Run
import Ariel.Core.Types
exampleDefs :: Defs
exampleDefs =
Defs
{ globals = mempty,
sumTypes = [(QName "base" "bool", ["false", "true"])]
}
exampleSum :: Int -> IO Expr
exampleS... |
89275d1a8459e4b751971049efb6d9a46251341737af891772b1e3244d928af6 | garrigue/lablgtk | css.ml | (**************************************************************************)
Lablgtk - Examples
(* *)
(* This code is in the public domain. *)
(* You may f... | null | https://raw.githubusercontent.com/garrigue/lablgtk/50a134c961120fcf29d2b665ab66b8fa488deff5/examples/css.ml | ocaml | ************************************************************************
This code is in the public domain.
You may freely copy parts of it in your application.
... | Lablgtk - Examples
$ Id$
let _ = GMain.init ()
let css_provider_from_data data =
let provider = GObj.css_provider () in
provider#load_from_data data;
provider
let () =
GtkData.StyleContext.add_provider_for_screen
(Gdk.Screen.default ())
(css_p... |
12fd6040222ffef23a0bf34ecef6296062bd5cabce16c5d2cf6a27bbe6394fd2 | input-output-hk/rscoin-haskell | Updates.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE Rank2Types #-}
# LANGUAGE TupleSections #
-- | Storage updates.
module RSCoin.Bank.Storage.Updates
(
Update
, ExceptUpdate
, addAddress
, addMintette
, addMintetteIfP... | null | https://raw.githubusercontent.com/input-output-hk/rscoin-haskell/109d8f6f226e9d0b360fcaac14c5a90da112a810/src/RSCoin/Bank/Storage/Updates.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE Rank2Types #
| Storage updates.
| Add given address to storage and associate given strategy with it.
| Add given mintette to storage and associate given key with it.
| Add given mintette to storage and associate given key with it if
this key has a permission... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE TupleSections #
module RSCoin.Bank.Storage.Updates
(
Update
, ExceptUpdate
, addAddress
, addMintette
, addMintetteIfPermitted
, permitMintette
, addExplorer
, removeMintette
, removeExplore... |
e92af2895b81b82eee399e1e341e7cc6bf00d71622160b20802541ebc641bd08 | lspitzner/brittany | Test479.hs | -- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft }
import MoreThanSufficientlyLongModuleNameWithSome
(compact, fit, inA, items, layout, not, that, will)
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test479.hs | haskell | brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } | import MoreThanSufficientlyLongModuleNameWithSome
(compact, fit, inA, items, layout, not, that, will)
|
7d11c4f0c5922eb146c6374b15b2dc1b0e1c0862ff83a803ed4309182f857994 | processone/fast_yaml | fast_yaml_sup.erl | %%%----------------------------------------------------------------------
%%% File : fast_yaml_sup.erl
Author : < >
%%% Purpose : YAML parser supervisor
Created : 7 Aug 2013 by < >
%%%
%%%
Copyright ( C ) 2002 - 2023 ProcessOne , SARL . All Rights Reserved .
%%%
Licensed under the Apache License , Ve... | null | https://raw.githubusercontent.com/processone/fast_yaml/8d7084aa40ae4bcec8980d4707b70eb1af6f33fc/src/fast_yaml_sup.erl | erlang | ----------------------------------------------------------------------
File : fast_yaml_sup.erl
Purpose : YAML parser supervisor
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, soft... | Author : < >
Created : 7 Aug 2013 by < >
Copyright ( C ) 2002 - 2023 ProcessOne , SARL . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(fast_yaml_sup).
-behaviour(supervisor).
-... |
1438416165173c3b7df4011c8af27f63bed12c42510c83d9a3305fd55805f2f6 | huangz1990/real-world-haskell-cn | on.hs | -- file: ch12/Barcode.hs
on :: (a -> a -> b) -> (c -> a) -> c -> c -> b
on f g x y = g x `f` g y
compareWithoutParity = compare `on` fromParity | null | https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/code/ch12/on.hs | haskell | file: ch12/Barcode.hs | on :: (a -> a -> b) -> (c -> a) -> c -> c -> b
on f g x y = g x `f` g y
compareWithoutParity = compare `on` fromParity |
0ec469d62a08e473554a249792927fed0cba4afa0e4f01e1311f50d840bef80d | cushon/project-euler | 58.rkt | #lang racket
(require "common.rkt")
; Find the side length of the square spiral for which the ratio of primes
along both diagonals falls below 10 % .
(define (solve)
(define (spiral-diagonals target)
(define (h base n prime total)
(if (and (> total 1) (< (/ prime total) target)) (sub1 (* n 2))
... | null | https://raw.githubusercontent.com/cushon/project-euler/d7fcbfff0cd59b2c3691293ff35bb2043b409f68/58.rkt | racket | Find the side length of the square spiral for which the ratio of primes | #lang racket
(require "common.rkt")
along both diagonals falls below 10 % .
(define (solve)
(define (spiral-diagonals target)
(define (h base n prime total)
(if (and (> total 1) (< (/ prime total) target)) (sub1 (* n 2))
(h
(+ base (* (* n 2) 4))
(add1 n)
(... |
94724bf208a908d3c157595916674e91dae993cd5d3af7a006102a0b9ae462ff | rems-project/cerberus | main.ml | open Cerb_frontend
open Cerb_backend
open Global_ocaml
open Cerb_runtime
open Pipeline
let (>>=) = Exception.except_bind
let (>>) m f = m >>= fun _ -> f
let return = Exception.except_return
let io, get_progress =
let open Pipeline in
let progress = ref 0 in
{ pass_message = begin
let ref = ref 0 in
... | null | https://raw.githubusercontent.com/rems-project/cerberus/d089e8f936636e916b64f1562eadccfcd13e5e9f/backend/absint/main.ml | ocaml |
let args = match args_opt with
| None -> []
| Some args -> Str.split (Str.regexp "[ \t]+") args
in
set global configuration
Looking for and parsing the core standard library
Looking for and parsing the implementation file
Link and execute
CLI stuff
entry point | open Cerb_frontend
open Cerb_backend
open Global_ocaml
open Cerb_runtime
open Pipeline
let (>>=) = Exception.except_bind
let (>>) m f = m >>= fun _ -> f
let return = Exception.except_return
let io, get_progress =
let open Pipeline in
let progress = ref 0 in
{ pass_message = begin
let ref = ref 0 in
... |
b27203f28c45e1acbd5cb2f3861fb3aed34cd76d312915e9871247a00160ed11 | Clojure2D/clojure2d-examples | ex02_draw.clj | (ns ex02-draw
"Draw callback function"
(:require [clojure2d.core :as c2d]
[fastmath.core :as m]
[clojure2d.pixels :as p]))
;; make things as fast as possible
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defn draw
"Draw frame"
[ca... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/09bce3c154f277fbfc78bb25c97eec6fffb8ae37/src/ex02_draw.clj | clojure | make things as fast as possible
callback function accepts canvas, window, frame number and current state
scale frame number down
math function responsible for object shape
normalize
width of ellipse
height of ellipse
set color for background
draw background with alpha, to fake motion blur
take canvas
conver... | (ns ex02-draw
"Draw callback function"
(:require [clojure2d.core :as c2d]
[fastmath.core :as m]
[clojure2d.pixels :as p]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defn draw
"Draw frame"
n (->> fc
(m/tan)... |
bc8545e3b0e797dcc79e31e3cca9fe97a9f09b29cf6f246c0ab1a569f616bef9 | jyh/metaprl | ma_lemmas.ml | extends Nuprl_lemmas
| null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/mesa/ma_lemmas.ml | ocaml | extends Nuprl_lemmas
| |
777af0e8513f7000c1d280c4fc823737ee9a2847468e14c79d6ee1e5460143d9 | keoko/postgresql-simple-examples | Words.hs | {-# LANGUAGE OverloadedStrings #-}
module Words where
import Database.PostgreSQL.Simple
connectionByInfo :: IO (Connection)
connectionByInfo = connect defaultConnectInfo {
connectDatabase = "helloworld"
, connectUser = "natxo"
}
main :: IO ()
main = do
conn <- connectionByInfo
putStrLn "enter a word to add... | null | https://raw.githubusercontent.com/keoko/postgresql-simple-examples/f83b8e8b98e98695846104470fedbfe843510b7b/Words.hs | haskell | # LANGUAGE OverloadedStrings # | module Words where
import Database.PostgreSQL.Simple
connectionByInfo :: IO (Connection)
connectionByInfo = connect defaultConnectInfo {
connectDatabase = "helloworld"
, connectUser = "natxo"
}
main :: IO ()
main = do
conn <- connectionByInfo
putStrLn "enter a word to add"
wordToAdd <- getLine
execute ... |
62182c7e72f345aa35c2c2d15a4b2f735f0c956710ecb1cf43d9d4ad209813e1 | clojure/tools.build | data_readers.cljc | {j1a #?(:cljs my.cljs.foo/j1a-reader :clj my.clj.foo/j1a-reader)
j1b #?(:cljs my.cljs.foo/j1b-reader :clj my.clj.foo/j1b-reader)} | null | https://raw.githubusercontent.com/clojure/tools.build/c31f6d19d8fdb35c3014e4cc9cf5e39cfcc178bf/test-data/uber-conflict/j1/data_readers.cljc | clojure | {j1a #?(:cljs my.cljs.foo/j1a-reader :clj my.clj.foo/j1a-reader)
j1b #?(:cljs my.cljs.foo/j1b-reader :clj my.clj.foo/j1b-reader)} | |
1244efad2adcdc8df203d1a8b918173dfb8b193a74f8b15da5fdc9e1edde0d85 | ditto/ditto | Funify.hs | module Ditto.Funify where
import Ditto.Syntax
import Ditto.Whnf
import Ditto.Monad
import Ditto.Conv
import Ditto.Sub
import Ditto.Throw
----------------------------------------------------------------------
funifies :: [Name] -> Args -> Args -> TCM (Maybe Sub)
funifies xs [] [] = return . Just $ []
funifies xs (a1:a... | null | https://raw.githubusercontent.com/ditto/ditto/f0d35271950216308f3f9bbcf701b176ece5ccd9/src/Ditto/Funify.hs | haskell | --------------------------------------------------------------------
-------------------------------------------------------------------- | module Ditto.Funify where
import Ditto.Syntax
import Ditto.Whnf
import Ditto.Monad
import Ditto.Conv
import Ditto.Sub
import Ditto.Throw
funifies :: [Name] -> Args -> Args -> TCM (Maybe Sub)
funifies xs [] [] = return . Just $ []
funifies xs (a1:as1) (a2:as2) = funify xs a1 a2 >>= \case
Nothing -> return Nothing
... |
40f0b5f5b9e4c3049a174f536790324dd765fd75d572e283c0b0d4bf4b71d240 | armedbear/abcl | collections.lisp | (in-package :jss)
(defun set-to-list (set)
"Convert the java.util.Set named in SET to a Lisp list."
(declare (optimize (speed 3) (safety 0)))
(with-constant-signature ((iterator "iterator" t) (hasnext "hasNext") (next "next"))
(loop with iterator = (iterator set)
while (hasNext iterator)
for it... | null | https://raw.githubusercontent.com/armedbear/abcl/36a4b5994227d768882ff6458b3df9f79caac664/contrib/jss/collections.lisp | lisp | Deprecated
XXX unclear what sort of list this would actually work on, as it
(what implements getNext())?
****************************************************************
But needing to remember is annoying
Here's a summary I gleaned:
java.util.Dictionary -> #"elements" yields java.util.Collections$3
java.uti... | (in-package :jss)
(defun set-to-list (set)
"Convert the java.util.Set named in SET to a Lisp list."
(declare (optimize (speed 3) (safety 0)))
(with-constant-signature ((iterator "iterator" t) (hasnext "hasNext") (next "next"))
(loop with iterator = (iterator set)
while (hasNext iterator)
for it... |
df8a841620fc19b654677aae67e2060f393d23c3769873e1872c52a209abcd5f | lem-project/lem | swank-trace-dialog.lisp | (defpackage :micros/contrib/trace-dialog
(:use :cl)
(:import-from :micros :defslimefun :from-string :to-string)
(:export #:clear-trace-tree
#:dialog-toggle-trace
#:dialog-trace
#:dialog-traced-p
#:dialog-untrace
#:dialog-untrace-all
#:inspect-trace... | null | https://raw.githubusercontent.com/lem-project/lem/c1c3d35905bfd0c6d1af1df4f7c6a7f415a1c7e9/lib/micros/contrib/swank-trace-dialog.lisp | lisp | `trace-entry' model
the current trace might have been wiped away if the
user cleared the tree in the meantime. no biggie,
don't do anything.
A special kind of trace call
Reporting to emacs
HACK: `micros::*inspector-history*' is unbound by default and needs
a reset in that case so that it won't error `micro... | (defpackage :micros/contrib/trace-dialog
(:use :cl)
(:import-from :micros :defslimefun :from-string :to-string)
(:export #:clear-trace-tree
#:dialog-toggle-trace
#:dialog-trace
#:dialog-traced-p
#:dialog-untrace
#:dialog-untrace-all
#:inspect-trace... |
b4af9b04f9ca60e48847dcf94495d30d0933f606ef431c6bf1c52ef4d011a0e2 | maxlapshin/nfs3 | rpc_clnt.erl | %%
%% rpc_clnt was generated by erpcgen (do not edit)
date : Dec 2 23:48:15 2012
%%
-module(rpc_clnt).
-include("rpc.hrl").
| null | https://raw.githubusercontent.com/maxlapshin/nfs3/a10fee483ec2203b1eb1d87b87d5b04c838f6ffa/src/rpc_clnt.erl | erlang |
rpc_clnt was generated by erpcgen (do not edit)
| date : Dec 2 23:48:15 2012
-module(rpc_clnt).
-include("rpc.hrl").
|
a6ed899d236326638a27b8e04a7a95e6400b874a7b3a8f101385862dd9860917 | realworldocaml/book | digest_tests.ml | open Stdune
let%expect_test "directory digest version" =
(* If this test fails with a new digest value, make sure to update to update
[directory_digest_version] in digest.ml.
The expected value is kept ouside of the expect block on purpose so that it
must be modified manually. *)
let expected = "a7... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/test/expect-tests/stdune/digest_tests.ml | ocaml | If this test fails with a new digest value, make sure to update to update
[directory_digest_version] in digest.ml.
The expected value is kept ouside of the expect block on purpose so that it
must be modified manually. | open Stdune
let%expect_test "directory digest version" =
let expected = "a743ec66ce913ff6587a3816a8acc6ea" in
let dir = Temp.create Dir ~prefix:"digest-tests" ~suffix:"" in
let stats = { Digest.Stats_for_digest.st_kind = S_DIR; st_perm = 1 } in
(match Digest.path_with_stats ~allow_dirs:true dir stats with
| ... |
a3d1a0d013bfb68728b376a1e417afab7d9c286a3a5686a0305ba4aa97090fa9 | akabe/ocaml-crf | test_prec.ml | open Format
open Slap.D
open Slap.Io
open Crf
open Test_common
let print_table title v1 v2 =
let get_el i = function
| 1 -> Vec.get_dyn v1 i
| 2 -> Vec.get_dyn v2 i
| 3 -> abs_float (Vec.get_dyn v1 i -. Vec.get_dyn v2 i)
| _ -> assert(false)
in
let head = [|"Naive"; "Sampling"; "Error"|] in
pri... | null | https://raw.githubusercontent.com/akabe/ocaml-crf/ced26bcce559b1eda307f7a8961ac9e52905882f/test/test_prec.ml | ocaml | Normalization coefficient
Means of feature vectors
The gradient of log likelihood | open Format
open Slap.D
open Slap.Io
open Crf
open Test_common
let print_table title v1 v2 =
let get_el i = function
| 1 -> Vec.get_dyn v1 i
| 2 -> Vec.get_dyn v2 i
| 3 -> abs_float (Vec.get_dyn v1 i -. Vec.get_dyn v2 i)
| _ -> assert(false)
in
let head = [|"Naive"; "Sampling"; "Error"|] in
pri... |
aae5f9ff3ad34fe6d2073db08a7316db849b961fcd59000d659b326a4928ae4d | binsec/binsec | dba.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/22ee39aad58219e8837b6ba15f150ba04a498b63/src/dba/dba.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
a8e788011673e0395691e707d3295d18b263f11055364adf7990adb41ba98ed4 | janherich/chisel | gcode_utils.cljc | (ns chisel.gcode-utils
"Gcode utility functions for layout, perimeters, etc."
(:require [chisel.protocols :as protocols]
[chisel.curves :as curves]
[chisel.coordinates :as c]
[chisel.utils :as u]))
(defn- offset-dimensions [{:keys [x+ x- y+ y-] :as offsets}]
(assoc offsets
... | null | https://raw.githubusercontent.com/janherich/chisel/9eb052ec226af5c47bb06992c902fda3c1f27921/src/chisel/gcode_utils.cljc | clojure | (ns chisel.gcode-utils
"Gcode utility functions for layout, perimeters, etc."
(:require [chisel.protocols :as protocols]
[chisel.curves :as curves]
[chisel.coordinates :as c]
[chisel.utils :as u]))
(defn- offset-dimensions [{:keys [x+ x- y+ y-] :as offsets}]
(assoc offsets
... | |
a3d64549a10e6e5486923f108046f6547fa2081ca01af5fda9b6b8e7ddf5678e | davidlazar/ocaml-semantics | seq01.ml | 1 ; 2
| null | https://raw.githubusercontent.com/davidlazar/ocaml-semantics/6f302c6b9cced0407d501d70ad25c2d2aefbb77d/tests/unit/seq01.ml | ocaml | 1 ; 2
| |
9eaffb51461c03bb903d0c8624c9020aa5dc2938a963aa1048c15ca171e646ae | ocaml/odoc | ocamlary.mli |
* Copyright ( c ) 2014 < >
* < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE ... | null | https://raw.githubusercontent.com/ocaml/odoc/45c73070c9f45d305d84fa6a9cbd73025b321944/src/ocamlary/ocamlary.mli | ocaml | *
You may find more information about this HTML documentation renderer
at {{:} github.com/dsheets/ocamlary }.
*
This is some verbatim text:
{v verbatim v}
*
This is some verbatim text:
{v [][df[]]}} v}
*
Here is an index table of [Empty] modules:
{!modules: Empty EmptyAlias}
*
Odoc... |
* Copyright ( c ) 2014 < >
* < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE ... |
bdb495bf7680945795678e45f16f196db9387c4d8c209a06aad0fccee132e1d6 | ghc/nofib | Main.hs | test performance of a mutable store represented as an Array of IORefs .
module Main where
import Store1
--import Store2
import Control.Monad
import System.Environment
main =
do [n] <- fmap (fmap read) getArgs
ss <- replicateM n mkStore
replicateM_ 5 (mapM_ testSequence ss)
testSequence :: Store -> IO (... | null | https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/gc/mutstore1/Main.hs | haskell | import Store2 | test performance of a mutable store represented as an Array of IORefs .
module Main where
import Store1
import Control.Monad
import System.Environment
main =
do [n] <- fmap (fmap read) getArgs
ss <- replicateM n mkStore
replicateM_ 5 (mapM_ testSequence ss)
testSequence :: Store -> IO ()
testSequence s... |
59ad569eee1feda35c897ca1f9948cc93fec6e8192496f1e0fdf222231a40ac7 | alpmestan/servant | Servant.hs | module Servant (
-- | This module and its submodules can be used to define servant APIs. Note
-- that these API definitions don't directly implement a server (or anything
-- else).
module Servant.API,
-- | For implementing servers for servant APIs.
module Servant.Server,
-- | Using your types in request p... | null | https://raw.githubusercontent.com/alpmestan/servant/d67b5e1f3e9af4b249f95ed72dcaebc4ce328a96/servant/src/Servant.hs | haskell | | This module and its submodules can be used to define servant APIs. Note
that these API definitions don't directly implement a server (or anything
else).
| For implementing servers for servant APIs.
| Using your types in request paths and query string parameters
| Utilities on top of the servant core
| Useful r... | module Servant (
module Servant.API,
module Servant.Server,
module Servant.Common.Text,
module Servant.QQ,
module Servant.Utils.Links,
module Servant.Utils.StaticFiles,
Proxy(..),
) where
import Data.Proxy
import Servant.API
import Servant.Common.Text
import Servant.Server
import Servant.QQ
import Serv... |
145b7244a7809c59371d032a1750dab8ab9e0593ba7cfb9d910c21040e3f32e2 | dinosaure/facteur | magic.ml | type mask =
| DEBUG
| SYMLINK
| COMPRESS
| DEVICES
| MIME_TYPE
| MIME_ENCODING
| CONTINUE
| CHECK
| PRESERVE_ATIME
| RAW
| ERROR
| NO_CHECK_APPTYPE
| NO_CHECK_ASCII
| NO_CHECK_COMPRESS
| NO_CHECK_ELF
| NO_CHECK_FORTRAN
| NO_CHECK_SOFT
| NO_CHECK_TAR
| NO_CHECK_TOKENS
| NO_CHECK_T... | null | https://raw.githubusercontent.com/dinosaure/facteur/d3f27e44107775cc699bfc62b209c2483e3675ac/lib/magic.ml | ocaml | / | type mask =
| DEBUG
| SYMLINK
| COMPRESS
| DEVICES
| MIME_TYPE
| MIME_ENCODING
| CONTINUE
| CHECK
| PRESERVE_ATIME
| RAW
| ERROR
| NO_CHECK_APPTYPE
| NO_CHECK_ASCII
| NO_CHECK_COMPRESS
| NO_CHECK_ELF
| NO_CHECK_FORTRAN
| NO_CHECK_SOFT
| NO_CHECK_TAR
| NO_CHECK_TOKENS
| NO_CHECK_T... |
5b7f3d9cea46d93a6f258a9d9d281d92b63cea1bb9d5d02b2e935b20b60f5c15 | fukamachi/clozure-cl | defsystem.lisp | -*-Mode : LISP ; Package : CCL -*-
;;;
Copyright ( C ) 2007 Clozure Associates
;;;
(in-package "CCL")
(eval-when (:compile-toplevel :load-toplevel :execute)
(use-interface-dir :cocoa))
;; These are used to communicate with ide-bundle, which must be loaded before objc-support.
;; They are defvar'ed so the calle... | null | https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/cocoa-ide/defsystem.lisp | lisp | Package : CCL -*-
These are used to communicate with ide-bundle, which must be loaded before objc-support.
They are defvar'ed so the caller can set them before loading us.
symbols defined here
Symbols that perhaps should be exported by ObjC support but aren't
"ide-bundle" - loaded by hand above
treated speciall... | Copyright ( C ) 2007 Clozure Associates
(in-package "CCL")
(eval-when (:compile-toplevel :load-toplevel :execute)
(use-interface-dir :cocoa))
(defvar *cocoa-ide-path* nil)
(defvar *cocoa-ide-copy-headers-p* nil)
(require "IDE-BUNDLE")
(require "OBJC-SUPPORT")
(defpackage "GUI"
(:use :common-lisp :ccl)
(:... |
f86dadeac1b0e003ed93d7d9ad5b8cd284d1108d961ef218704878d3081fe868 | massung/racket-canvas-list | info.rkt | #lang info
(define collection "canvas-list")
(define version "1.0.1")
(define pkg-authors '(""))
(define pkg-desc "Fast-rendering, single-selection, canvas control allowing custom drawing for a list of items.")
(define deps '("base" "draw-lib" "gui-lib" "draw-doc" "gui-doc" "racket-doc" "scribble-lib"))
(define scribb... | null | https://raw.githubusercontent.com/massung/racket-canvas-list/4f22186773730955e4786df078ad16fd4dfa927c/info.rkt | racket | #lang info
(define collection "canvas-list")
(define version "1.0.1")
(define pkg-authors '(""))
(define pkg-desc "Fast-rendering, single-selection, canvas control allowing custom drawing for a list of items.")
(define deps '("base" "draw-lib" "gui-lib" "draw-doc" "gui-doc" "racket-doc" "scribble-lib"))
(define scribb... | |
fe251d085c385a75c58dc4c0a01f2d94409dbbcc8fa957395360e5024d52fb3f | bmeurer/ocaml-experimental | jg_tk.ml | (*************************************************************************)
(* *)
(* Objective Caml LablTk library *)
(* *)
,... | null | https://raw.githubusercontent.com/bmeurer/ocaml-experimental/fe5c10cdb0499e43af4b08f35a3248e5c1a8b541/otherlibs/labltk/browser/jg_tk.ml | ocaml | ***********************************************************************
Objective Caml LablTk library
... | , Kyoto University RIMS
Copyright 1999 Institut National de Recherche en Informatique et
en Automatique and Kyoto University . All rights reserved .
This file is distributed under the terms of the GNU Library
$ Id$
open Tk
let tpos ?(modi=[]) ... |
246c9334ea93ee173dd672435cf7cce41d05faf1adede918c0aa9c1d8906f3b6 | hipsleek/hipsleek | lem_store.ml | #include "xdebug.cppo"
open Gen.Basic
open Gen.BList
open Cast
let lem_pr = ref (fun (c:Cast.coercion_decl) -> "lem_store printer has not been initialized")
let lem_pr_med = ref (fun (c:Cast.coercion_decl) -> "lem_store printer has not been initialized")
let ilem_pr = ref (fun (c:Iast.coercion_decl) -> "COERC printe... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/lem_store.ml | ocaml | y_binfo_pp "XXXX add_LEFT_coercion";
module COERC =
struct
type t = Iast.coercion_decl
let eq = Iast.eq_coercion
let string_of = !ilem_pr
end;;
struct
type t = Iast.coercion_decl_list
let string_of = !ilem_lst_pr
end;;
prt empty at this time
********************************************... | #include "xdebug.cppo"
open Gen.Basic
open Gen.BList
open Cast
let lem_pr = ref (fun (c:Cast.coercion_decl) -> "lem_store printer has not been initialized")
let lem_pr_med = ref (fun (c:Cast.coercion_decl) -> "lem_store printer has not been initialized")
let ilem_pr = ref (fun (c:Iast.coercion_decl) -> "COERC printe... |
027b1de5fbffc3821f92b8873a776675de08735c340dd2f3e56e92015eb76583 | jgertm/lang | reference.clj | (ns lang.parser.reference
(:refer-clojure :exclude [keyword type])
(:require [blancas.kern.core :refer :all]
[lang.parser.lexer :refer :all]))
(def module-name
(bind [name (sep-by1 (sym* \.) identifier)]
(return {:reference :module :name name})))
(def module
(lexeme module-name))
(def ^:priv... | null | https://raw.githubusercontent.com/jgertm/lang/cdd8b08cb23bfa07938b28f917971ee7e4927668/src/lang/parser/reference.clj | clojure | (ns lang.parser.reference
(:refer-clojure :exclude [keyword type])
(:require [blancas.kern.core :refer :all]
[lang.parser.lexer :refer :all]))
(def module-name
(bind [name (sep-by1 (sym* \.) identifier)]
(return {:reference :module :name name})))
(def module
(lexeme module-name))
(def ^:priv... | |
390bb6fea9edcab797238b3d65201a4438a757dd68a1f0efeee39cd78fd4b07f | sirherrbatka/clusters | package.lisp | (cl:defpackage #:clusters.clarans
(:use #:cl #:clusters.aux-package)
(:export
#:parameters))
| null | https://raw.githubusercontent.com/sirherrbatka/clusters/20b8b60005ac8e27d12d05d277b26d8b5ca5c238/source/clarans/package.lisp | lisp | (cl:defpackage #:clusters.clarans
(:use #:cl #:clusters.aux-package)
(:export
#:parameters))
| |
83737aa5f9158794aa78c60d646472d98323700be37112d51a77c78b37de073d | phoe/in-nomine | definers.lisp | ;;;; This file is a part of IN-NOMINE.
Copyright ( c ) 2015 ( ) ,
;;;; 2022 Michał "phoe" Herda ()
(in-package #:in-nomine)
;;; Minor forms
(defun make-proclamations (namespace)
(let* ((name (namespace-name namespace))
(name-type (namespace-name-type namespace))
(accessor (name... | null | https://raw.githubusercontent.com/phoe/in-nomine/73a3629c301213b9962cd91cda929d0ee5e3de77/src/definers.lisp | lisp | This file is a part of IN-NOMINE.
2022 Michał "phoe" Herda ()
Minor forms
Reader forms
Signals ~:*~S~] if the value is not found ~
Writer foms | Copyright ( c ) 2015 ( ) ,
(in-package #:in-nomine)
(defun make-proclamations (namespace)
(let* ((name (namespace-name namespace))
(name-type (namespace-name-type namespace))
(accessor (namespace-accessor namespace))
(boundp (namespace-boundp-symbol namespace))
(makunbound ... |
b810d9678b5f4e735878f13123c651e33428036def29aaa68c8e5a35079aea33 | cyga/real-world-haskell | csv2.hs | file : ch16 / csv2.hs
import Text.ParserCombinators.Parsec
csvFile = endBy line eol
line = sepBy cell (char ',')
cell = many (noneOf ",\n")
eol = char '\n'
parseCSV :: String -> Either ParseError [[String]]
parseCSV input = parse csvFile "(unknown)" input
| null | https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch16/csv2.hs | haskell | file : ch16 / csv2.hs
import Text.ParserCombinators.Parsec
csvFile = endBy line eol
line = sepBy cell (char ',')
cell = many (noneOf ",\n")
eol = char '\n'
parseCSV :: String -> Either ParseError [[String]]
parseCSV input = parse csvFile "(unknown)" input
| |
d64887afdf1df212d2e0f22ea991517db5489fd58a9c0dad75355bd17ca5af0c | fulcrologic/fulcro-template | middleware.clj | (ns app.server-components.middleware
(:require
[app.server-components.config :refer [config]]
[app.server-components.pathom :refer [parser]]
[mount.core :refer [defstate]]
[com.fulcrologic.fulcro.server.api-middleware :refer [handle-api-request
... | null | https://raw.githubusercontent.com/fulcrologic/fulcro-template/db259312050524ba677f0ed9a3de434d7913bc23/src/main/app/server_components/middleware.clj | clojure | ================================================================================
Dynamically generated HTML. We do this so we can safely embed the CSRF token
in a js var for use by the client.
================================================================================
=========================================... | (ns app.server-components.middleware
(:require
[app.server-components.config :refer [config]]
[app.server-components.pathom :refer [parser]]
[mount.core :refer [defstate]]
[com.fulcrologic.fulcro.server.api-middleware :refer [handle-api-request
... |
894e93fd79b097cc4935b5ca61a8dafb6e815138077a38b20432bf887333b2fe | timmc/feedback | project.clj | (defproject org.timmc/feedback "0.4.0-SNAPSHOT"
:description "Behavioral simulator utility for sequential logic circuits."
:url ""
:author "Tim McCormack"
:license [{:name "Eclipse Public License - v1.0"
:url "-v10.html"
:distribution :repo
:comments "same as Clojure"}]
... | null | https://raw.githubusercontent.com/timmc/feedback/884b60c723bab01e135d60a69d89423e0c6954aa/project.clj | clojure | (defproject org.timmc/feedback "0.4.0-SNAPSHOT"
:description "Behavioral simulator utility for sequential logic circuits."
:url ""
:author "Tim McCormack"
:license [{:name "Eclipse Public License - v1.0"
:url "-v10.html"
:distribution :repo
:comments "same as Clojure"}]
... | |
421e0315ce30431cf378be1f29c8ad48d066ff68f8845eb76634ab3066ad31ee | erlymon/erlymon | em_storage.erl | %%%-------------------------------------------------------------------
@author
( C ) 2015 , < >
%%% @doc
Erlymon is an open source GPS tracking system for various GPS tracking devices .
%%%
Copyright ( C ) 2015 , < > .
%%%
This file is part of Erlymon .
%%%
Erlymon is free software : yo... | null | https://raw.githubusercontent.com/erlymon/erlymon/2250619783d6da1e33a502911a8fa52ce016c094/apps/erlymon/src/em_storage/em_storage.erl | erlang | -------------------------------------------------------------------
@doc
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
along with this program. If not, see </>.
@end
-------------------------------------------------------... | @author
( C ) 2015 , < >
Erlymon is an open source GPS tracking system for various GPS tracking devices .
Copyright ( C ) 2015 , < > .
This file is part of Erlymon .
Erlymon is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Publ... |
f0564cd82bff7c6a43ca522fcdb901d3788c285430855ef00816dca2c3c7a8a0 | ijvcms/chuanqi_dev | charge_lib.erl | %%%-------------------------------------------------------------------
%%% @author tuhujia
( C ) 2016 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 26 . 一月 2016 14:44
%%%-------------------------------------------------------------------
-module(charge_lib).
-include("common.hrl").
-include("record.hrl").
-includ... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/charge/charge_lib.erl | erlang | -------------------------------------------------------------------
@author tuhujia
@doc
@end
-------------------------------------------------------------------
----------------------------------------------------------------------------
对外接口
---------------------------------------------------------------------... | ( C ) 2016 , < COMPANY >
Created : 26 . 一月 2016 14:44
-module(charge_lib).
-include("common.hrl").
-include("record.hrl").
-include("config.hrl").
-include("cache.hrl").
-include("db_record.hrl").
-include("proto.hrl").
-include("language_config.hrl").
-include("uid.hrl").
-include("log_type_config.hrl").
-includ... |
1beb4620f486311ffd8615019f5afe4e7a428730d52a267b6beed69f3e163ccb | thi-ng/demos | project.clj | (defproject thi.ng/ws-ldn-2 "0.1.0-SNAPSHOT"
:description "thi.ng workshop #2"
:url ""
:license {:name "Apache Software License 2.0"
:url "-2.0"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.170"]
[org.cloju... | null | https://raw.githubusercontent.com/thi-ng/demos/048cd131099a7db29be56b965c053908acad4166/ws-ldn-2/project.clj | clojure | default and assumes "resources"
default
watch and update CSS | (defproject thi.ng/ws-ldn-2 "0.1.0-SNAPSHOT"
:description "thi.ng workshop #2"
:url ""
:license {:name "Apache Software License 2.0"
:url "-2.0"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.170"]
[org.cloju... |
c6f837fbbb2ced9d09557d1a07a9d5493964e625af383eed51a4d566effb4e6a | qmuli/qmuli | CW.hs | {-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Qi.Config.AWS.CW where
import Control.Lens
import Control.Monad.Freer
import Data.Aeson
import Data.Aeson.Types (Options (..), SumEncoding (..),
... | null | https://raw.githubusercontent.com/qmuli/qmuli/6ca147f94642b81ab3978d502397efb60a50215b/library/Qi/Config/AWS/CW.hs | haskell | # LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedStrings #
{} | # LANGUAGE TemplateHaskell #
module Qi.Config.AWS.CW where
import Control.Lens
import Control.Monad.Freer
import Data.Aeson
import Data.Aeson.Types (Options (..), SumEncoding (..),
fieldLabelModifier, typeMismatch)
impor... |
aa5312d7dc45b8fc65685ad5d53be54c2b825137944036fe51db0111c2e61588 | deadpendency/deadpendency | SmokeJavaGradle.hs | module SR.Effect.RunSmokeTest.Backend.Smokes.SmokeJavaGradle (smokeJavaGradle) where
import Common.Model.Config.AppEnv
import Common.Model.Dependency.DependencyIdentifier
import Common.Model.Dependency.DependencyName
import Common.Model.Git.GitSha
import Common.Model.Git.QualifiedRepo
import Common.Model.Git.RepoHost
... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/script-runner/src/SR/Effect/RunSmokeTest/Backend/Smokes/SmokeJavaGradle.hs | haskell | module SR.Effect.RunSmokeTest.Backend.Smokes.SmokeJavaGradle (smokeJavaGradle) where
import Common.Model.Config.AppEnv
import Common.Model.Dependency.DependencyIdentifier
import Common.Model.Dependency.DependencyName
import Common.Model.Git.GitSha
import Common.Model.Git.QualifiedRepo
import Common.Model.Git.RepoHost
... | |
8ca1bf5d7f086857379e5270e55fa75a778b0d34f6f1474b52721240d87a6c0b | mstksg/inCode | WolfGoatCabbage.hs | import Control.Monad (guard)
import Control.Applicative ((<$>))
-- | Our types
data Character = Farmer | Wolf | Goat | Cabbage
deriving (Show, Eq, Enum)
newtype Move = MoveThe Character
deriving (Eq)
-- (just for debugging)
instance Show Move where
show (MoveThe Farmer) = "F"
show (MoveThe Wolf) ... | null | https://raw.githubusercontent.com/mstksg/inCode/e1f80a3dfd83eaa2b817dc922fd7f331cd1ece8a/code-samples/monad-plus/WolfGoatCabbage.hs | haskell | | Our types
(just for debugging)
| Starting plan
| The full journey
| Helper functions
| Main | import Control.Monad (guard)
import Control.Applicative ((<$>))
data Character = Farmer | Wolf | Goat | Cabbage
deriving (Show, Eq, Enum)
newtype Move = MoveThe Character
deriving (Eq)
instance Show Move where
show (MoveThe Farmer) = "F"
show (MoveThe Wolf) = "W"
show (MoveThe Goat) = "G"
... |
ed06b9338df6d5eaf5d7e76d87e8846fbd6ab60f136e42926582331fe5c9b5f3 | archimag/mongo-cl-driver | indexes.lisp | ;;;; indexes.lisp
;;;;
;;;; This file is part of the MONGO-CL-DRIVER library, released under Lisp-LGPL.
;;;; See file COPYING for details.
;;;;
Author : < >
(in-package #:mongo-cl-driver)
(defun make-name (keys)
(format nil "~{~A_~A~^_~}" (hash-table-plist keys)))
(defun index-collection (collection)
(colle... | null | https://raw.githubusercontent.com/archimag/mongo-cl-driver/300c10bd3d0b3ca3a82c8b32087bddbc7b6a86c3/driver/indexes.lisp | lisp | indexes.lisp
This file is part of the MONGO-CL-DRIVER library, released under Lisp-LGPL.
See file COPYING for details.
| Author : < >
(in-package #:mongo-cl-driver)
(defun make-name (keys)
(format nil "~{~A_~A~^_~}" (hash-table-plist keys)))
(defun index-collection (collection)
(collection (collection-database collection)
"system.indexes"))
(defun create-index (collection keys &optional (options ($)))
(let ((... |
88ccc78eeaa0c83d6a7b86e0fe4eec711d3d22ce458c509942defb261dcfd0b7 | jeffshrager/biobike | external-urls.lisp | -*- Package : bio ; mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
(in-package :bio)
;;; +=========================================================================+
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
;;; | |
;;; | ... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Biodefs/external-urls.lisp | lisp | mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
+=========================================================================+
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software and as... |
(in-package :bio)
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
| " Software " ) , to deal in the Software without restriction , including |
| distribute , sublicense , and/or sell copies of the Software , and to |
| permit persons to whom the Software is furnished to do so , subject to ... |
488c7f630ff384ba587410b52d1a3930bac9275314d77bb99a08859d8e71f196 | chrovis/cljam | vcf_indexer.clj | (ns cljam.algo.vcf-indexer
"Indexer of VCF/BCF."
(:require [cljam.io.csi :as csi]
[cljam.io.util :as io-util]
[cljam.io.vcf :as vcf]))
(defn create-index
"Creates a CSI index file from the VCF/BCF file."
[variant-file out-csi {:keys [shift depth] :or {shift 14 depth 5}}]
(with-open [r... | null | https://raw.githubusercontent.com/chrovis/cljam/2b8e7386765be8efdbbbb4f18dbc52447f4a08af/src/cljam/algo/vcf_indexer.clj | clojure | (ns cljam.algo.vcf-indexer
"Indexer of VCF/BCF."
(:require [cljam.io.csi :as csi]
[cljam.io.util :as io-util]
[cljam.io.vcf :as vcf]))
(defn create-index
"Creates a CSI index file from the VCF/BCF file."
[variant-file out-csi {:keys [shift depth] :or {shift 14 depth 5}}]
(with-open [r... | |
6d45cb33a1b96d6dbc12f60639593bf6ac8ea905d4440344a81fc608302808e8 | tweag/ormolu | operators-2-out.hs | foo n
| x
|| y && z
|| n ** x
|| x && n =
42
| null | https://raw.githubusercontent.com/tweag/ormolu/1f63136d047205f95b7d3c0f6aa34c34bb29ac7f/data/examples/declaration/value/function/operators-2-out.hs | haskell | foo n
| x
|| y && z
|| n ** x
|| x && n =
42
| |
451330310ff13d62c0b5d86b361f2164ebaab1a193da1d517d937143ef62c552 | AndrasKovacs/setoidtt | Inspection.hs |
# language TemplateHaskell , MagicHash #
module Main where
import Test.Inspection
import Data.Maybe
import GHC.Exts
import System.IO.Unsafe
import Inspection2 (foo)
lhs, rhs :: (a -> b) -> Maybe a -> Bool
lhs f x = isNothing (fmap f x)
rhs f Nothing = True
rhs f (Just _) = False
fac :: Int -> Int
fac 0 = 1
fac n =... | null | https://raw.githubusercontent.com/AndrasKovacs/setoidtt/621aef2c4ae5a6acb418fa1153575b21e2dc48d2/experiments/Inspection.hs | haskell | inspect $ coreOf 'testFac |
# language TemplateHaskell , MagicHash #
module Main where
import Test.Inspection
import Data.Maybe
import GHC.Exts
import System.IO.Unsafe
import Inspection2 (foo)
lhs, rhs :: (a -> b) -> Maybe a -> Bool
lhs f x = isNothing (fmap f x)
rhs f Nothing = True
rhs f (Just _) = False
fac :: Int -> Int
fac 0 = 1
fac n =... |
44823ff729ada591d8a97dd202498d5a72fb228c573484073877bb9adaabecc8 | baskeboler/cljs-karaoke-client | subs.cljs | (ns cljs-karaoke.http.subs
(:require [re-frame.core :as rf]))
| null | https://raw.githubusercontent.com/baskeboler/cljs-karaoke-client/bb6512435eaa436d35034886be99213625847ee0/src/main/cljs_karaoke/http/subs.cljs | clojure | (ns cljs-karaoke.http.subs
(:require [re-frame.core :as rf]))
| |
b4f9455c40b9707e4372f80c9b0e1826ab70d9694a1a2ac3d6942e9fda88b65d | UU-ComputerScience/js-asteroids | ReturnSelfShape.hs | # LANGUAGE CPP , MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances , DeriveDataTypeable , StandaloneDeriving , FlexibleContexts #
{-# OPTIONS -pgmP cpp #-}
module Examples.ReturnSelfShape where
#ifdef __UHC__
#include "../LightOOUHC.h"
#include "Typeable.h"
#else
#include "../LightOO.h"
#endif
import L... | null | https://raw.githubusercontent.com/UU-ComputerScience/js-asteroids/b7015d8ad4aa57ff30f2631e0945462f6e1ef47a/lightoo/src/Examples/ReturnSelfShape.hs | haskell | # OPTIONS -pgmP cpp # | # LANGUAGE CPP , MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances , DeriveDataTypeable , StandaloneDeriving , FlexibleContexts #
module Examples.ReturnSelfShape where
#ifdef __UHC__
#include "../LightOOUHC.h"
#include "Typeable.h"
#else
#include "../LightOO.h"
#endif
import LightOO
import Examples.Pri... |
e2e55b5807a0a2e8d76edbf5975dfa2ee5bc396ec17ea92d69b37428be7428d7 | s-expressionists/Eclector | package.lisp | (cl:defpackage #:eclector.readtable.test
(:use
#:common-lisp
#:fiveam)
(:export
#:run-tests))
(cl:in-package #:eclector.readtable.test)
(def-suite :eclector.readtable
:in :eclector)
(defun run-tests ()
(run! :eclector.readtable))
| null | https://raw.githubusercontent.com/s-expressionists/Eclector/07e314ec01944beb95a89e22b31a6b5e857330c4/test/readtable/package.lisp | lisp | (cl:defpackage #:eclector.readtable.test
(:use
#:common-lisp
#:fiveam)
(:export
#:run-tests))
(cl:in-package #:eclector.readtable.test)
(def-suite :eclector.readtable
:in :eclector)
(defun run-tests ()
(run! :eclector.readtable))
| |
def3a39e7b6f6a056b0485977584dd6e0be3b3de8cff96bcc26f5a4bbb654f2a | zotonic/zotonic | controller_oauth2_access_token.erl | @author < >
2021
%% @doc Exchange an authorization code for an access token.
Copyright 2021
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless... | null | https://raw.githubusercontent.com/zotonic/zotonic/35e443451b9c07cce4c184c19f8afdb3b7c0513d/apps/zotonic_mod_oauth2/src/controllers/controller_oauth2_access_token.erl | erlang | @doc Exchange an authorization code for an access token.
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.... | @author < >
2021
Copyright 2021
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(controller_oauth2_access_token).
-author("Marc Worrell <>").
-export([
service_available/1,
allowed_methods/1,
... |
19d5eef2f204ef2008b9e46123f44b63514b026569d3fe77238c468053cd95d9 | bhaskara/programmable-reinforcement-learning | prop-formula.lisp | (defpackage prop-logic
(:documentation "Package for representing formulas in propositional logic.
Formulas are representing using the [formula] type. Elementary propositions are represented by symbols, and t and nil represent the logical constants TRUE and FALSE. A propositional state, using the closed world as... | null | https://raw.githubusercontent.com/bhaskara/programmable-reinforcement-learning/8afc98116a8f78163b3f86076498d84b3f596217/lisp/data-struct/prop-logic/prop-formula.lisp | lisp |
basic creation and access
various basic types of formulae
general formulae
states
satisfaction
| (defpackage prop-logic
(:documentation "Package for representing formulas in propositional logic.
Formulas are representing using the [formula] type. Elementary propositions are represented by symbols, and t and nil represent the logical constants TRUE and FALSE. A propositional state, using the closed world as... |
ba4d5a55ecb73f44ce638be6e9e8a08c63007c858f5e8c81459e12052e45326e | travelping/eradius | eradius_config.erl | -module(eradius_config).
Eradius API 's :
-export([validate_new_config/0, validate_new_config/2, validate_config/1]).
% Config validating API functions:
-export([get_app_env/2, validate_ip/1, validate_port/1, validate_ports/1,
map_helper/3, map_helper/2, ok_error_helper/2, validate_secret/1,
validat... | null | https://raw.githubusercontent.com/travelping/eradius/70b26237c2a7bc1a46cb65a60a99ea4dc7a9be2a/src/eradius_config.erl | erlang | Config validating API functions:
------------------------------------------------------------------------------------------
-- config validation
--------------------------------------------------------------------------------------------------
-- direct validation function
----------------------------------------... | -module(eradius_config).
Eradius API 's :
-export([validate_new_config/0, validate_new_config/2, validate_config/1]).
-export([get_app_env/2, validate_ip/1, validate_port/1, validate_ports/1,
map_helper/3, map_helper/2, ok_error_helper/2, validate_secret/1,
validate_options/1, validate_socket_option... |
722329f2c6102abacb34ba5c44cc149c8ad721362b3a1da10a69a3d887092a96 | agda/agda | Pretty.hs | # OPTIONS_GHC -fno - warn - orphans #
{-| Pretty printer for the concrete syntax.
-}
module Agda.Syntax.Concrete.Pretty
( module Agda.Syntax.Concrete.Pretty
, module Agda.Syntax.Concrete.Glyph
) where
import Prelude hiding ( null )
import Data.Maybe
import qualified Data.Foldable as Fold
import qualified Dat... | null | https://raw.githubusercontent.com/agda/agda/6c7d9d08417d74b99a29af24ac787f979bae4f16/src/full/Agda/Syntax/Concrete/Pretty.hs | haskell | | Pretty printer for the concrete syntax.
@
{ d₁
; d₂
⋮
}
@
If the list is empty, then the notation @{}@ is used.
| @prettyHiding info visible doc@ puts the correct braces
@visible doc@ if the we deal with a visible thing.
| Show the attributes necessary to recover a modality, in long-form
(e.g. u... | # OPTIONS_GHC -fno - warn - orphans #
module Agda.Syntax.Concrete.Pretty
( module Agda.Syntax.Concrete.Pretty
, module Agda.Syntax.Concrete.Glyph
) where
import Prelude hiding ( null )
import Data.Maybe
import qualified Data.Foldable as Fold
import qualified Data.Semigroup as Semigroup
import qualified Data.... |
391b008d6f0979d6f70aa1989f2a0b035a59d12d73bb4e423f34422a97a1d194 | couchbase/couchdb | mochiweb_socket.erl | @copyright 2010 Mochi Media , Inc.
@doc MochiWeb socket - wrapper for plain and ssl sockets .
-module(mochiweb_socket).
-export([listen/4,
accept/1, transport_accept/1, finish_accept/1,
recv/3, send/2, close/1, port/1, peername/1,
setopts/2, getopts/2, type/1, exit_if_closed/1]).
-def... | null | https://raw.githubusercontent.com/couchbase/couchdb/4c553e32268a883d9a31bb9472eb162c7764b904/src/mochiweb/mochiweb_socket.erl | erlang | Provided for backwards compatibility only | @copyright 2010 Mochi Media , Inc.
@doc MochiWeb socket - wrapper for plain and ssl sockets .
-module(mochiweb_socket).
-export([listen/4,
accept/1, transport_accept/1, finish_accept/1,
recv/3, send/2, close/1, port/1, peername/1,
setopts/2, getopts/2, type/1, exit_if_closed/1]).
-def... |
e9dd932d9cf73d6589d7f13e4ceade6e555fe8441e37b58f31d4db617697b039 | pascal-knodel/haskell-craft | E'6'45.hs | --
--
--
-----------------
-- Exercise 6.45.
-----------------
--
--
--
module E'6'45 where
import B'C'6
(
Database
, BarCode
, Name
, Price
)
look :: Database -> BarCode -> (Name, Price)
look database indexBarCode
| searchResult == [] = ( "Unknown Item" , 0 )
| otherwise = head searchRes... | null | https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/_/links/E'6'45.hs | haskell |
---------------
Exercise 6.45.
---------------
| module E'6'45 where
import B'C'6
(
Database
, BarCode
, Name
, Price
)
look :: Database -> BarCode -> (Name, Price)
look database indexBarCode
| searchResult == [] = ( "Unknown Item" , 0 )
| otherwise = head searchResult
where
searchResult :: [ (Name, Price) ]
searchResult = [ (na... |
09f0c582d36169801a2e3c6c33d6142ccb4d56d3a3a192346ba8a310ffff7c81 | protz/mezzo | Fact.mli | (*****************************************************************************)
(* Mezzo, a programming language based on permissions *)
Copyright ( C ) 2011 , 2012 and
(* *)
(* This program is free softwar... | null | https://raw.githubusercontent.com/protz/mezzo/4e9d917558bd96067437116341b7a6ea02ab9c39/typing/Fact.mli | ocaml | ***************************************************************************
Mezzo, a programming language based on permissions
This program is free software: you can redistribute it and/or modify
(at your optio... | Copyright ( C ) 2011 , 2012 and
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
open Mode
type parameter =
int
... |
c787c763c33cbe8b1c713e72bc5559d5c71ce57279e0a6532e3ee5720a388067 | dongcarl/guix | libreoffice.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 < >
Copyright © 2015 < >
Copyright © 2016 , 2018 , 2019 , 2020 , 2021 < >
Copyright © 2017 < >
Copyright © 2017 < >
Copyright © 2017–2021 < >
Copyright © 2017 < >
Copyright © 2017 , 2018 , 2019 < >
Copyri... | null | https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/packages/libreoffice.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 © 2014 < >
Copyright © 2015 < >
Copyright © 2016 , 2018 , 2019 , 2020 , 2021 < >
Copyright © 2017 < >
Copyright © 2017 < >
Copyright © 2017–2021 < >
Copyright © 2017 < >
Copyright © 2017 , 2018 , 2019 < >
Copyright © 2017 , 2018 , 2019 < >
Copyright © 2017 < ... |
bd7d21ac8e3e1d94e6cd22cb834b13ab15c002bd2e61a3440a34f3edd114b776 | cedlemo/OCaml-GI-ctypes-bindings-generator | File_chooser_widget_private.ml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "File_chooser_widget_private"
| null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/File_chooser_widget_private.ml | ocaml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "File_chooser_widget_private"
| |
cc330e6a123f6d83ad8b7cb59d9fac497df2a2567f5e48f9005bff0f3f0c7e9c | eholk/harlan | M8.scm | (library
(harlan middle languages M8)
(export M8 unparse-M8 parse-M8)
(import (nanopass)
(rnrs)
(harlan middle languages M7))
;; after uglify-vectors
;;(define-language M7.2
;; (extends M7.1)
;;
;; )
;; after hoist-kernels
(define-language M8
(extends M7.1)
(entr... | null | https://raw.githubusercontent.com/eholk/harlan/3afd95b1c3ad02a354481774585e866857a687b8/harlan/middle/languages/M8.scm | scheme | after uglify-vectors
(define-language M7.2
(extends M7.1)
)
after hoist-kernels | (library
(harlan middle languages M8)
(export M8 unparse-M8 parse-M8)
(import (nanopass)
(rnrs)
(harlan middle languages M7))
(define-language M8
(extends M7.1)
(entry Module)
(Decl
(decl)
(+ (gpu-module k* ...)
(global x t e)
cdecl)
(- ... |
c98227b65a0f7fb25001da0f85b4d12117f66c45ffe3d9cfdbb73df27c1bfc50 | bjornbm/dimensional | Dimensional.hs | {-# OPTIONS_HADDOCK show-extensions #-}
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE PatternGuards #
{-# ... | null | https://raw.githubusercontent.com/bjornbm/dimensional/bb082832f338b78d4038d9810ab84059b0d68a2b/src/Numeric/Units/Dimensional.hs | haskell | # OPTIONS_HADDOCK show-extensions #
# LANGUAGE ConstraintKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE RankNTypes #
* Types
$types
* Physical Dimensions
$dimensions
** Dimension Arithmetic
$dimension-arithmetic
** Term Level Representation of Dimensions
$dimension-terms
* Dimensional Arithmetic
** Transc... |
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE PatternGuards #
# LANGUAGE RoleAnnotations #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFami... |
0f9141b556e1321438ae39ef5d6bc485c9d525b1ad739e2aa089c2ebbdc64428 | bracevac/corrl | Kind.hs | ------------------------------------------------------------------------------
Copyright 2012 Microsoft Corporation .
--
-- This is free software; you can redistribute it and/or modify it under the
terms of the Apache License , Version 2.0 . A copy of the License can be
found in the file " license.txt " at the ro... | null | https://raw.githubusercontent.com/bracevac/corrl/416cd107087ac070a6bcabf8e7937211b6f415bb/koka/src/Kind/Kind.hs | haskell | ----------------------------------------------------------------------------
This is free software; you can redistribute it and/or modify it under the
---------------------------------------------------------------------------
Definition of kinds and helper functions.
-------------------------------------------... | Copyright 2012 Microsoft Corporation .
terms of the Apache License , Version 2.0 . A copy of the License can be
found in the file " license.txt " at the root of this distribution .
Kind(..)
, KindCon
, kindStar, kindPred, kindEffect, kindArrow, kindScope, ki... |
de74b55f0ea0ef0bc1671cbab334cefecc5782c5329412ea8869eb1152d93e22 | trptcolin/reply | parsing_spec.clj | (ns reply.parsing-spec
(:use [speclj.core]
[reply.parsing]))
(describe "parsed-forms"
(with eof (Object.))
(with read-line-fn (fn [state] (read-line)))
(with options {:request-exit @eof :read-line-fn @read-line-fn})
(it "gets an eof when readLine says it's done"
(should= [@eof]
(wit... | null | https://raw.githubusercontent.com/trptcolin/reply/f0c730e7a6753494f9f90f02234bc040318da393/spec/reply/parsing_spec.clj | clojure | (ns reply.parsing-spec
(:use [speclj.core]
[reply.parsing]))
(describe "parsed-forms"
(with eof (Object.))
(with read-line-fn (fn [state] (read-line)))
(with options {:request-exit @eof :read-line-fn @read-line-fn})
(it "gets an eof when readLine says it's done"
(should= [@eof]
(wit... | |
3bcb0497bf4b86272fe56dff752eb6d60dacdbed983324ce55bd33730d4b4c3f | racket/web-server | defun.rkt | #lang racket/base
(require (for-template racket/base)
syntax/kerncase
racket/contract
web-server/lang/closure
(for-template web-server/lang/serial-lambda)
"util.rkt")
(provide/contract
[defun (syntax? . -> . syntax?)])
; make-new-clouse-label : (syntax -> syntax) syntax ->... | null | https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-lib/web-server/lang/defun.rkt | racket | make-new-clouse-label : (syntax -> syntax) syntax -> syntax
lift defun to list of syntaxes | #lang racket/base
(require (for-template racket/base)
syntax/kerncase
racket/contract
web-server/lang/closure
(for-template web-server/lang/serial-lambda)
"util.rkt")
(provide/contract
[defun (syntax? . -> . syntax?)])
(define (make-new-closure-label labeling stx)
(label... |
41942a7a52c9a432583506c7b736a6a24450afe999553462b0858557baf9aff5 | HumbleUI/HumbleUI | svg.clj | (ns io.github.humbleui.ui.svg
(:require
[io.github.humbleui.canvas :as canvas]
[io.github.humbleui.core :as core]
[io.github.humbleui.protocols :as protocols])
(:import
[io.github.humbleui.skija Canvas Data]
[io.github.humbleui.skija.svg SVGDOM SVGLength SVGPreserveAspectRatio SVGPreserveAspectR... | null | https://raw.githubusercontent.com/HumbleUI/HumbleUI/ab2ea41a97db6390e65357a79e5806af7052a308/src/io/github/humbleui/ui/svg.clj | clojure | (ns io.github.humbleui.ui.svg
(:require
[io.github.humbleui.canvas :as canvas]
[io.github.humbleui.core :as core]
[io.github.humbleui.protocols :as protocols])
(:import
[io.github.humbleui.skija Canvas Data]
[io.github.humbleui.skija.svg SVGDOM SVGLength SVGPreserveAspectRatio SVGPreserveAspectR... | |
f83340bc6c062c2f1a985366d7571337abb140abbc3781f4eede5301507bf86f | aryx/fork-efuns | store.mli | (*s: commons/store.mli *)
(*s: signature type [[Store.t]] *)
type t
(*e: signature type [[Store.t]] *)
s : signature function [ [ Store.new_store ] ]
(* constructor *)
val new_store : unit -> t
e : signature function [ [ Store.new_store ] ]
(*s: signature type [[Store.var]] *)
type 'a var
(*e: signature type [[Store.... | null | https://raw.githubusercontent.com/aryx/fork-efuns/8f2f8f66879d45e26ecdca0033f9c92aec2b783d/commons/store.mli | ocaml | s: commons/store.mli
s: signature type [[Store.t]]
e: signature type [[Store.t]]
constructor
s: signature type [[Store.var]]
e: signature type [[Store.var]]
s: signature functions [[Store.create_xxx]]
x: signature functions [[Store.create_xxx]]
e: signature functions [[Store.create_xxx]]
internal
s: signatu... |
type t
s : signature function [ [ Store.new_store ] ]
val new_store : unit -> t
e : signature function [ [ Store.new_store ] ]
type 'a var
val create_int : string -> int var
val create_string : string -> string var
val create_float : string -> float var
val create_abstr : string -> 'a var
val create : string -> ('a -... |
a630a1f2b19657d4068a419270ca0ed5f320a22fe203ac195155cf5ca5f24d0d | kadena-io/chainweaver | PactQueries.hs | # LANGUAGE ApplicativeDo #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE ExtendedDefaultRules #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternGu... | null | https://raw.githubusercontent.com/kadena-io/chainweaver/7c54bf9b47ed23660f505a0d7e1bce78fab9459c/frontend/src/Frontend/PactQueries.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE OverloadedStrings #
^ Which network we are on
^ Account on said chain to find | # LANGUAGE ApplicativeDo #
# LANGUAGE DataKinds #
# LANGUAGE ExtendedDefaultRules #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PatternGuards #
# LANGUAGE RecursiveDo #
# LANGUAGE ScopedTypeVariables #
# L... |
1a0eb81fc288cd849be4af000f8636ab71707d04642078a47b893b21cff55655 | basho-labs/riak_explorer | ret.erl | %% @doc Test helper functions.
-module(ret).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
-ifdef(integration_test).
fmt(S, Args) ->
lists:flatten(io_lib:format(S, Args)).
re_host() ->
case os:getenv("RE_HOST") of
false -> "localhost";
Host -> Host
end.
re_port() ->
... | null | https://raw.githubusercontent.com/basho-labs/riak_explorer/3d06ca2b14a57ed2850e56efc280d7e5b5f4bbbc/test/integration/ret.erl | erlang | @doc Test helper functions. | -module(ret).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
-ifdef(integration_test).
fmt(S, Args) ->
lists:flatten(io_lib:format(S, Args)).
re_host() ->
case os:getenv("RE_HOST") of
false -> "localhost";
Host -> Host
end.
re_port() ->
case os:getenv("RE_PORT") of
... |
429cc8c56a408ade7ff879cb97c157e41b790d4e59bb6ec23228747b44bf9e02 | coopernurse/cis194 | FibonacciSpec.hs | module Cis194.Hw.FibonacciSpec (main, spec) where
import Test.Hspec
import Cis194.Hw.Fibonacci
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "fib" $ do
it "should compute the nth Fibonacci number" $ do
fib 0 `shouldBe` 0
fib 1 `shouldBe` 1
fib 2 `shouldBe` 1
fib 14 `sh... | null | https://raw.githubusercontent.com/coopernurse/cis194/592f0ae06cf606d1c2fbe0d055a1e4b67dfc2d0f/test/Cis194/Hw/FibonacciSpec.hs | haskell | module Cis194.Hw.FibonacciSpec (main, spec) where
import Test.Hspec
import Cis194.Hw.Fibonacci
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "fib" $ do
it "should compute the nth Fibonacci number" $ do
fib 0 `shouldBe` 0
fib 1 `shouldBe` 1
fib 2 `shouldBe` 1
fib 14 `sh... | |
dbf96a1ccfb2a5e70df418fe3c58da3d6a46e0b2ce5a6f528b906ee65b2e9a0a | sph-mn/sph-lib | json.scm | (define-module (sph json))
(use-modules (sph) (sph hashtable) (sph vector))
(export scm->json scm->json-string sph-json-description)
(define sph-json-description "a rudimentary and incomplete but fast json writer")
(define (list->json a port) "list port ->"
(display "[" port)
(if (not (null? a))
(let (rest (ta... | null | https://raw.githubusercontent.com/sph-mn/sph-lib/c7daf74f42d6bd1304f49c2fef89dcd6dd94fdc9/modules/sph/json.scm | scheme | (define-module (sph json))
(use-modules (sph) (sph hashtable) (sph vector))
(export scm->json scm->json-string sph-json-description)
(define sph-json-description "a rudimentary and incomplete but fast json writer")
(define (list->json a port) "list port ->"
(display "[" port)
(if (not (null? a))
(let (rest (ta... | |
d0f8bae57b6aff572365ae68d364a8744e4418e2a6e235797db2550a63306e97 | chethan/SICP | SieveOfEratosthenes.hs | sieve [] = []
sieve (x:xs) = x : sieve (filter (\a -> not ((rem a x) == 0)) xs)
sieve_lazy xs = (\() -> sieve xs)
| null | https://raw.githubusercontent.com/chethan/SICP/ff83adc7e3e89e299c772080d32103f72ecf5dbf/Chapter3/SieveOfEratosthenes.hs | haskell | sieve [] = []
sieve (x:xs) = x : sieve (filter (\a -> not ((rem a x) == 0)) xs)
sieve_lazy xs = (\() -> sieve xs)
| |
916e6e52835f88605cd22157556a0b47c0353cb8864c2ff62cf09c5d620cd991 | tyehle/llvm-lambda | ANorm.hs | module ANorm where
import Control.Monad (zipWithM)
import Fresh
import qualified LowLevel as LL
data Prog = Prog [Def] Expr deriving (Eq, Show)
data Def = ClosureDef String String [String] Expr deriving (Eq, Show)
data AExpr = Ref String
| GetEnv String Integer
deriving (Eq, Show)
data BinOp... | null | https://raw.githubusercontent.com/tyehle/llvm-lambda/679a9e1cc1d288fc9731a6f43fc45714c455741b/src/ANorm.hs | haskell | module ANorm where
import Control.Monad (zipWithM)
import Fresh
import qualified LowLevel as LL
data Prog = Prog [Def] Expr deriving (Eq, Show)
data Def = ClosureDef String String [String] Expr deriving (Eq, Show)
data AExpr = Ref String
| GetEnv String Integer
deriving (Eq, Show)
data BinOp... | |
fa438237839085eb78e9bb5e78713ca0356d3f302bc7298ca313b181932f23cb | psibi/yesod-rest | StaticFiles.hs | module Settings.StaticFiles where
import Yesod.Static (staticFilesList)
-- This generates easy references to files in the static directory at compile time,
-- giving you compile-time verification that referenced files exist.
-- Warning: any files added to your static directory during run-time can't be
accessed this... | null | https://raw.githubusercontent.com/psibi/yesod-rest/6cf2a2584fb230933a8aa8831de32007459486dd/Settings/StaticFiles.hs | haskell | This generates easy references to files in the static directory at compile time,
giving you compile-time verification that referenced files exist.
Warning: any files added to your static directory during run-time can't be
For example, to refer to @static/js/script.js@ via an identifier, you'd use:
If the identi... | module Settings.StaticFiles where
import Yesod.Static (staticFilesList)
accessed this way . You 'll have to use their FilePath or URL to access them .
js_script_js
StaticFile [ " js " , " script.js " ] [ ]
( appStaticDir compileTimeAppSettings )
staticFilesList "static" ["css/bootstrap.css", "builds/... |
adc5f6eb447bde42785463f9c79a85fed6a699b4e07e993d76726c7f1bc0c151 | 2600hz/kazoo | kazoo_amqp_maintenance.erl | %%%-----------------------------------------------------------------------------
( C ) 2011 - 2020 , 2600Hz
%%% @doc
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%%
%%% @end
%%%--------... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_amqp/src/kazoo_amqp_maintenance.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
-----------------------------------------------------------------------------
------------------------------------------------------------------------------
@doc
@end
------------------------------------------------------------... | ( C ) 2011 - 2020 , 2600Hz
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(kazoo_amqp_maintenance).
-export([add_broker/1
,add_broker/2
]).
-export([remove_broker/1... |
f157fe3ec9b83bc45b3f36eb1f42f6b5dd5f01e980acd4101ebc4da314f77ceb | cheecheeo/haskell-cgi | Cookie.hs | -----------------------------------------------------------------------------
-- |
Module : Network . CGI.Cookie
Copyright : ( c ) 2004 - 2005
( c ) 2005
-- License : BSD-style
--
Maintainer : < >
-- Stability : experimental
-- Portability : portable
--
-- Genera... | null | https://raw.githubusercontent.com/cheecheeo/haskell-cgi/a49660abdc5b711fcc99989f121eb4404bbde66c/src/Network/CGI/Cookie.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style
Stability : experimental
Portability : portable
General server side HTTP cookie library.
Based on <>
* Update for RFC2109 <>
-------------------------------------------------------------------------... | Module : Network . CGI.Cookie
Copyright : ( c ) 2004 - 2005
( c ) 2005
Maintainer : < >
TODO
* Add client side stuff ( basically parsing Set - Cookie : value )
module Network.CGI.Cookie (
Cookie(..)
, newCookie
... |
2f2af50e9135d8fe12e8034408c6d47244ea8a44f4c8f89cb150f5f27001fa29 | cabol/gen_buffer | gen_buffer_worker.erl | %%%-------------------------------------------------------------------
%%% @doc
%%% gen_buffer worker.
%%% @end
%%%-------------------------------------------------------------------
-module(gen_buffer_worker).
-behaviour(gen_server).
%% API
-export([
start_link/1,
start_link/2,
eval/2,
send/2,
poll/1
]).
... | null | https://raw.githubusercontent.com/cabol/gen_buffer/35dbe556f84bc84e10527ecb0c98228815064d9d/src/gen_buffer_worker.erl | erlang | -------------------------------------------------------------------
@doc
gen_buffer worker.
@end
-------------------------------------------------------------------
API
gen_server callbacks
===================================================================
API
====================================================... | -module(gen_buffer_worker).
-behaviour(gen_server).
-export([
start_link/1,
start_link/2,
eval/2,
send/2,
poll/1
]).
-export([
init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2
]).
start_link(Opts) when is_map(Opts) ->
start_link(Opts, #{}).
-spec start_link(
Opts :... |
a97b3edf2b6dfae3406a76b44fac74bfebbf2c346d6d2d6c7f7c72b88f0595c1 | mikera/core.matrix | test_operators.clj | (ns clojure.core.matrix.test-operators
(:refer-clojure :exclude [* - + / == min max])
(:require clojure.core.matrix.impl.persistent-vector
[clojure.core.matrix :refer :all]
[clojure.core.matrix.operators :refer :all]
[clojure.test :refer :all]))
;; Tests for the clojure.core.mat... | null | https://raw.githubusercontent.com/mikera/core.matrix/0a35f6e3d6d2335cb56f6f3e5744bfa1dd0390aa/src/test/clojure/clojure/core/matrix/test_operators.clj | clojure | Tests for the clojure.core.matrix.operators namespace | (ns clojure.core.matrix.test-operators
(:refer-clojure :exclude [* - + / == min max])
(:require clojure.core.matrix.impl.persistent-vector
[clojure.core.matrix :refer :all]
[clojure.core.matrix.operators :refer :all]
[clojure.test :refer :all]))
(deftest test-multiply
(testin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.