_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 |
|---|---|---|---|---|---|---|---|---|
d768b0500fe34390dc39113cb278df5e688cba26879ec874ae6c7ade2f98add6 | blamario/grampa | RepMin.hs | # Language FlexibleContexts , FlexibleInstances , MultiParamTypeClasses , RankNTypes , StandaloneDeriving ,
TypeFamilies , UndecidableInstances #
TypeFamilies, UndecidableInstances #-}
| The RepMin example - replicate a binary tree with all leaves replaced by the minimal leaf value .
modu... | null | https://raw.githubusercontent.com/blamario/grampa/3ed158b91f686996d8eb1fbf00763285e7bd0e4a/deep-transformations/test/RepMin.hs | haskell | | tree data type
| tree root
| The transformation type
| Inherited attributes' type
| Synthesized attributes' type
| The semantics of the primitive 'Int' type must be defined manually.
* Helper functions
| The example tree
|
>>> Rank2.apply (Full.fmap RepMin $ Identity exampleTree) (Inherited ()) | # Language FlexibleContexts , FlexibleInstances , MultiParamTypeClasses , RankNTypes , StandaloneDeriving ,
TypeFamilies , UndecidableInstances #
TypeFamilies, UndecidableInstances #-}
| The RepMin example - replicate a binary tree with all leaves replaced by the minimal leaf value .
modu... |
2ddd005742b000f5aa31e1730c2ae8ca8c74bf382b8bc0f96f2ef4b94d79be86 | kmi/irs | load.lisp | Mode : Lisp ; Package :
File created in WebOnto
(in-package "OCML")
(def-ontology fulfillment
:includes (cobra)
:namespace-uri "-super.org/etel/bpel/Fulfilment/Fulfilment#"
:namespaces (("COBRA" cobra))
:type :domain
:files ("fulfillment")
:author "dong" )
| null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/fulfillment/load.lisp | lisp | Package : |
File created in WebOnto
(in-package "OCML")
(def-ontology fulfillment
:includes (cobra)
:namespace-uri "-super.org/etel/bpel/Fulfilment/Fulfilment#"
:namespaces (("COBRA" cobra))
:type :domain
:files ("fulfillment")
:author "dong" )
|
92bdf34e70238b2377e3469adfc1ebd913c77f28a2375490a8fe09306f481c87 | lambe-lang/nethra | t00_tests.ml | let () =
Alcotest.(
run "Compiler Test"
[
T01_basic.cases
; T02_function.cases
; T03_product.cases
; T04_sum.cases
; T05_equal.cases
; T06_record.cases
; T07_gadt.cases
] )
| null | https://raw.githubusercontent.com/lambe-lang/nethra/42e04f741264c01de60e2a6ff890c117d01b55fa/test/nethra/toy/s00_compiler/t00_tests.ml | ocaml | let () =
Alcotest.(
run "Compiler Test"
[
T01_basic.cases
; T02_function.cases
; T03_product.cases
; T04_sum.cases
; T05_equal.cases
; T06_record.cases
; T07_gadt.cases
] )
| |
4f335cf5a1947bf2e4f66fdfe11d726af57d245e194ee24a346b3b1f57aba284 | dvv/stable | cowboy_ua.erl | %%
%% @doc Simple user-agent determination
%%
%% NB: Apply after cowboy_router middleware
%%
-module(cowboy_ua).
-author('Vladimir Dronnikov <>').
-behaviour(cowboy_middleware).
-export([execute/2]).
-export([agent/1, platform/1]).
-spec agent(binary()) -> undefined | atom().
agent(Header) ->
lookup(cowboy_... | null | https://raw.githubusercontent.com/dvv/stable/4897e4abeec7d3c0cc65f7cfe1e5586c428babc7/src/cowboy_ua.erl | erlang |
@doc Simple user-agent determination
NB: Apply after cowboy_router middleware
|
-module(cowboy_ua).
-author('Vladimir Dronnikov <>').
-behaviour(cowboy_middleware).
-export([execute/2]).
-export([agent/1, platform/1]).
-spec agent(binary()) -> undefined | atom().
agent(Header) ->
lookup(cowboy_bstr:to_lower(Header), [
{<<"msie">>, ie},
{<<"chrome">>, chrome},
{<<"f... |
4333fdd14363ddb3851f636fd63fbb90aa8227b564d4fa740ac77113f3987803 | Gbury/archsat | logic.mli | This file is free software , part of Archsat . See file " LICENSE " for more details .
(** Base Tactics for logic.
This module defines a good quantity of base tactics
(i.e functions that operate on proof positions) related
to propositional logic. *)
open Proof
* { 2 Convenience functions }
val extrac... | null | https://raw.githubusercontent.com/Gbury/archsat/322fbefa4a58023ddafb3fa1a51f8199c25cde3d/src/proof/logic.mli | ocaml | * Base Tactics for logic.
This module defines a good quantity of base tactics
(i.e functions that operate on proof positions) related
to propositional logic.
* Extract the sequent from an open proof position.
* {2 Preludes}
* The prelude requiring classical logic
* The term proving [true].
* Some wrap... | This file is free software , part of Archsat . See file " LICENSE " for more details .
open Proof
* { 2 Convenience functions }
val extract_open : Proof.pos -> Proof.sequent
val classical : Prelude.t
* { 2 Some terms and matching functions }
val true_proof : Term.t
val match_not : Term.t -> Term.t option
va... |
03026fb437ff83ecab59a08746d741c573a775f84b696656655f36b34703bb2e | kayceesrk/river | meta.ml |
* Copyright ( c ) 2014 , OCaml.org project
* Copyright ( c ) 2015 < >
*
* 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 .
*
*... | null | https://raw.githubusercontent.com/kayceesrk/river/a43623c461ce4282900e1692f97d23b892497d9d/lib/meta.ml | ocaml | * This module determines an image to be used as preview of a website.
It does this by following the same logic Google+ and other websites use, and
described in this article:
-are-Facebook-and-Google-creating-link-previews |
* Copyright ( c ) 2014 , OCaml.org project
* Copyright ( c ) 2015 < >
*
* 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 .
*
*... |
521544f755387b7784a2e42911ceb712a9de3f3125c645f99bb0764f34ee1ebe | nick8325/jukebox | Parsec.hs | # LANGUAGE RankNTypes , BangPatterns , MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances , UndecidableInstances , TypeFamilies , CPP #
{-# OPTIONS_GHC -funfolding-creation-threshold=10000 -funfolding-use-threshold=10000 #-}
module Jukebox.TPTP.Parsec where
import Control.Applicative
import Control.Mon... | null | https://raw.githubusercontent.com/nick8325/jukebox/52c3206d7def50c8ebcc0128c442fa6c2bd4e074/src/Jukebox/TPTP/Parsec.hs | haskell | # OPTIONS_GHC -funfolding-creation-threshold=10000 -funfolding-use-threshold=10000 #
ok: success
err: backtracking failure
# INLINE (>>=) #
# INLINE (<*>) #
# INLINE (*>) #
# INLINE (<*) #
# INLINE empty #
# INLINE (<|>) #
Stack overflow-avoiding version:
many p = liftM reverse (p' [])
Basic combinators
# INLINE (... | # LANGUAGE RankNTypes , BangPatterns , MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances , UndecidableInstances , TypeFamilies , CPP #
module Jukebox.TPTP.Parsec where
import Control.Applicative
import Control.Monad
import Data.List
import Control.Monad.Fail
Parser type and monad instances
newtype... |
c31b327887dd507d4aed248890273789e70b8951762404af7d7702e33d28e4f6 | haskell-opengl/GLUT | Double.hs |
Double.hs ( adapted from double.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2018 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
This is a simple double buffered program .
Pressing the left mouse... | null | https://raw.githubusercontent.com/haskell-opengl/GLUT/36207fa51e4c1ea1e5512aeaa373198a4a56cad0/examples/RedBook4/Double.hs | haskell | Request double buffer display mode.
Register mouse input callback functions |
Double.hs ( adapted from double.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2018 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
This is a simple double buffered program .
Pressing the left mouse... |
1339f7b71957652ffd4ed2011e8d4ab94869792f41972c218308424f458eca01 | icicle-lang/icicle-ambiata | MeltPrim.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternGuards #
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - missing - signatures #
module Icicle.Test.Avalanche.MeltPrim where
import qualified Icicle.Test.Gen.Core.Prim as CoreGenPrim
import qualified Te... | null | https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-compiler/test/Icicle/Test/Avalanche/MeltPrim.hs | haskell | # LANGUAGE OverloadedStrings #
TODO: add more? | # LANGUAGE NoImplicitPrelude #
# LANGUAGE PatternGuards #
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - missing - signatures #
module Icicle.Test.Avalanche.MeltPrim where
import qualified Icicle.Test.Gen.Core.Prim as CoreGenPrim
import qualified Test.QuickCheck.Hedgehog as Qc
impor... |
6627c1ab5c2042cd4c3526e5aed4cfa7f17c45578625436026faedca3f4c4cf8 | db48x/xe2 | void.lisp | ;;; void.lisp --- a micro anti-shmup in common lisp
Copyright ( C ) 2009
Author : < >
;; Keywords: games
;; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the L... | null | https://raw.githubusercontent.com/db48x/xe2/7896fcc69f5c6e28eaf6f6abb7966d6663370a66/void/void.lisp | lisp | void.lisp --- a micro anti-shmup in common lisp
Keywords: games
This program is free software; you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY o... |
Copyright ( C ) 2009
Author : < >
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
(defpackage :void
(:documentation "Void Tactics: A sci-f... |
db50b82a21bd2f8525b1abaa184949494ea342f2e675ea431ca58da01d8c4329 | ekmett/hkd | Unsafe.hs | # LANGUAGE Unsafe #
module Data.HKD.Profunctor.Unsafe
( FProfunctor(..)
) where
import Data.Coerce
import Data.Kind
import Data.HKD.Classes
class (forall c. FFunctor (p c)) => FProfunctor (p :: (i -> Type) -> (j -> Type) -> Type) where
fdimap :: (a ~> b) -> (c ~> d) -> p b c -> p a d
fdimap = \f g -> flmap f . fr... | null | https://raw.githubusercontent.com/ekmett/hkd/89c72af6aa3fcac6adba8ac1cf15de0a35cfaf45/src/Data/HKD/Profunctor/Unsafe.hs | haskell | # LANGUAGE Unsafe #
module Data.HKD.Profunctor.Unsafe
( FProfunctor(..)
) where
import Data.Coerce
import Data.Kind
import Data.HKD.Classes
class (forall c. FFunctor (p c)) => FProfunctor (p :: (i -> Type) -> (j -> Type) -> Type) where
fdimap :: (a ~> b) -> (c ~> d) -> p b c -> p a d
fdimap = \f g -> flmap f . fr... | |
e9f18c13a8b48f152ee35296ccd88b3b3a62e94b18cf5a23080279ec9a1e4275 | GrammaticalFramework/gf-core | Print.hs | {-# OPTIONS_GHC -fglasgow-exts #-}
module GFCC.Print where
pretty - printer generated by the BNF converter
import GFCC.Abs
import Data.Char
import Data.List (intersperse)
-- the top-level printing method
printTree :: Print a => a -> String
printTree = render . prt 0
type Doc = [ShowS] -> [ShowS]
doc :: ShowS -> ... | null | https://raw.githubusercontent.com/GrammaticalFramework/gf-core/9b4f2dd18b64b770aaebfa1885085e8e3447f119/src/tools/c/GFCC/Print.hs | haskell | # OPTIONS_GHC -fglasgow-exts #
the top-level printing method
the printer class does the job | module GFCC.Print where
pretty - printer generated by the BNF converter
import GFCC.Abs
import Data.Char
import Data.List (intersperse)
printTree :: Print a => a -> String
printTree = render . prt 0
type Doc = [ShowS] -> [ShowS]
doc :: ShowS -> Doc
doc = (:)
render :: Doc -> String
render d = rend 0 (map ($ "")... |
5d76641500afd579edca0878f153e0613b939331ffa6f3a179d2d6ec273f7780 | SamirTalwar/advent-of-code | AOC_17_1.hs | {-# OPTIONS -Wall #-}
import qualified Data.List as List
import qualified Data.Maybe as Maybe
import Data.Text (Text)
import Helpers.Function
import Helpers.Numbers
import Helpers.Parse
import Helpers.Point (Point (..))
import qualified Helpers.Point as Point
import Text.Parsec
data TargetArea = TargetArea Point Poin... | null | https://raw.githubusercontent.com/SamirTalwar/advent-of-code/c949ac6061b27b953e39c05ca0864a20ec499dae/2021/AOC_17_1.hs | haskell | # OPTIONS -Wall # |
import qualified Data.List as List
import qualified Data.Maybe as Maybe
import Data.Text (Text)
import Helpers.Function
import Helpers.Numbers
import Helpers.Parse
import Helpers.Point (Point (..))
import qualified Helpers.Point as Point
import Text.Parsec
data TargetArea = TargetArea Point Point
main :: IO ()
main ... |
117b14b77b0263c60613bcf4a21f2f65aa23ee99d4efc0a900558c3148106069 | input-output-hk/cardano-ledger | Json.hs | # LANGUAGE TemplateHaskell #
module Test.Cardano.Crypto.Json (
tests,
)
where
import Cardano.Prelude
import GetDataFileName ((<:<))
import Hedgehog (Property)
import qualified Hedgehog as H
import Test.Cardano.Crypto.Example (
exampleProtocolMagic3,
exampleProtocolMagic4,
)
import Test.Cardano.Prelude
-------... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/eras/byron/crypto/test/Test/Cardano/Crypto/Json.hs | haskell | ------------------------------------------------------------------------------
ProtocolMagic
------------------------------------------------------------------------------
Legacy JSON encoding where requiresNetworkMagic was
encoded as "NMMustBeNothing" or "NMMustBeJust" | # LANGUAGE TemplateHaskell #
module Test.Cardano.Crypto.Json (
tests,
)
where
import Cardano.Prelude
import GetDataFileName ((<:<))
import Hedgehog (Property)
import qualified Hedgehog as H
import Test.Cardano.Crypto.Example (
exampleProtocolMagic3,
exampleProtocolMagic4,
)
import Test.Cardano.Prelude
golde... |
e94aa0b5942c3a077d4f059a4891bb20b1d7dbcadfd04c61d7eddc865ebe9025 | returntocorp/semgrep | Network.mli | val get : Uri.t -> string
| null | https://raw.githubusercontent.com/returntocorp/semgrep/855abad9ada6ea5fd72d437fd69ff2e5fa42c1f1/src/osemgrep/networking/Network.mli | ocaml | val get : Uri.t -> string
| |
23b634e8deabdc1e63a01911d7bf712d050cbf12cb434700d8eacc66931e266e | kelamg/HtDP2e-workthrough | ex523.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex523) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Accumulators/ex523.rkt | racket | about the language level of this file in a form that our tools can easily process.
or null to represent the initial state
(make-bank N N)
interp. miss is the number of missionaries and
cann is the number of cannibals
- 'left
- 'right
N -> [List-of Vector]
produces a list of vectors wh... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex523) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define BOAT-MAXCAP 2)
A Vector is ( list N N )
(d... |
65e000ca09efbc76494478d518e78e7757d64f0ec4f5401911f2a6e522f1a51d | janestreet/rpc_parallel | sum_worker.ml | open Core
open Async
(* A bare bones use case of the [Rpc_parallel] library. This demonstrates
how to define a simple worker type that implements some functions. The master then
spawns a worker of this type and calls a function to run on this worker *)
module T = struct
(* A [Sum_worker.worker] implements a s... | null | https://raw.githubusercontent.com/janestreet/rpc_parallel/28bffcaa8a9fb73c321a616e724cf88efd38870f/expect_test/sum_worker.ml | ocaml | A bare bones use case of the [Rpc_parallel] library. This demonstrates
how to define a simple worker type that implements some functions. The master then
spawns a worker of this type and calls a function to run on this worker
A [Sum_worker.worker] implements a single function [sum : int -> int]. Because this
... | open Core
open Async
module T = struct
type 'worker functions = { sum : ('worker, int, int) Rpc_parallel.Function.t }
module Worker_state = struct
type init_arg = unit [@@deriving bin_io]
type t = unit
end
module Connection_state = struct
type init_arg = unit [@@deriving bin_io]
type t = uni... |
b09f7e061410e23c25f4642a1f4809fc2b0d41f7ac0499705bbc8519b44da234 | haroldcarr/learn-haskell-coq-ml-etc | Init.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE RankNTypes #-}
module Init where
------------------------------------------------------------------------------
import NoBlockChan
import Types
------------------------------------------------------------------------------
import qualified Co... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/network/zeromq/src/Init.hs | haskell | # LANGUAGE RankNTypes #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
listen address
logErr
logInfo | # LANGUAGE NoImplicitPrelude #
module Init where
import NoBlockChan
import Types
import qualified Control.Concurrent.Chan.Unagi as U
import Protolude hiding (async, newChan, readChan,
to)
initialize
:: forall chanT... |
85fea436fa7407b9c7089c16fc2f94f5df100b69d415453e5753a3523b033f55 | ramsay-t/mu2 | mu2_if_mutations.erl | -module(mu2_if_mutations).
-export([all/0, if_mutations/0]).
-include("../include/mutations.hrl").
all() ->
if_mutations().
if_mutations() ->
[{swap_if_order,?MUTATION_MATCH("if Guards@@@ -> Body@@@ end"),
?MUTATION("if Guards@@@ -> Body@@@ end",
begin
A = random:uniform(length(Guards@@@)),
... | null | https://raw.githubusercontent.com/ramsay-t/mu2/fd84a1966e81921f08f510e8876e6ad9b6eb89b1/src/mu2_if_mutations.erl | erlang | -module(mu2_if_mutations).
-export([all/0, if_mutations/0]).
-include("../include/mutations.hrl").
all() ->
if_mutations().
if_mutations() ->
[{swap_if_order,?MUTATION_MATCH("if Guards@@@ -> Body@@@ end"),
?MUTATION("if Guards@@@ -> Body@@@ end",
begin
A = random:uniform(length(Guards@@@)),
... | |
4b698031e31f2eaf82fa8898baf874fe82b5467e6521d0e7eb75bb8c20623935 | smeruelo/mooc-ocaml | w3_3.1_symbolic_arithmetic.ml | type exp =
| EInt of int
| EAdd of exp * exp
| EMul of exp * exp;;
let example =
EAdd (EInt 1, EMul (EInt 2, EInt 3));;
let my_example =
EAdd (EMul (EInt 2, EInt 2), EMul (EInt 3, EInt 3));;
let rec eval e =
match e with
| EInt x -> x
| EAdd (e1, e2) -> eval e1 + eval e2
| EMul (e1, e2) -> eval e... | null | https://raw.githubusercontent.com/smeruelo/mooc-ocaml/8e2efb1632ec9dd381489a08465d5341a6c727c9/week3/w3_3.1_symbolic_arithmetic.ml | ocaml | type exp =
| EInt of int
| EAdd of exp * exp
| EMul of exp * exp;;
let example =
EAdd (EInt 1, EMul (EInt 2, EInt 3));;
let my_example =
EAdd (EMul (EInt 2, EInt 2), EMul (EInt 3, EInt 3));;
let rec eval e =
match e with
| EInt x -> x
| EAdd (e1, e2) -> eval e1 + eval e2
| EMul (e1, e2) -> eval e... | |
54b257f53677ceb4945ec2a70eb7e28a34ff80683fd80ea1e92c1fac4427b0d4 | Quid2/flat | Run.hs | {-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
-- |Encoding and decoding functions
module Flat.Run (
flat,
flatRaw,
unflat,
unflatWith,
unflatRaw,
unflatRawWith,
unflatRawWithOffset,
) wher... | null | https://raw.githubusercontent.com/Quid2/flat/6a07e4004bb6d415710a98cebdac4aadc1bf59d5/src/Flat/Run.hs | haskell | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
|Encoding and decoding functions
|Encode padded value.
|Decode padded value.
|Decode padded value, using the provided unpadded decoder.
|Decode unpadded value.
|Unflat unpadded value, using provided decoder
unflatRawWith :: AsByteString b => G... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
module Flat.Run (
flat,
flatRaw,
unflat,
unflatWith,
unflatRaw,
unflatRawWith,
unflatRawWithOffset,
) where
import qualified Data.ByteString as B
import Data.ByteString.Convert (AsByteString (..))
impo... |
eff0aaac88470854d9fc2b74800334fce411681f6517343cf9cbde9347d79deb | ralsei/graphite | histogram.rkt | #lang racket/base
(require fancy-app
pict
plot/no-gui
plot/utils
racket/contract/base
racket/math
"aes.rkt"
"renderer.rkt"
"util.rkt")
(provide
(contract-out [histogram (->* ()
(#:x-min (or/c rational? #f)
... | null | https://raw.githubusercontent.com/ralsei/graphite/2e353be9d3c7e727b6f28597e0f6d64a7c42ee63/graphite-lib/histogram.rkt | racket | #lang racket/base
(require fancy-app
pict
plot/no-gui
plot/utils
racket/contract/base
racket/math
"aes.rkt"
"renderer.rkt"
"util.rkt")
(provide
(contract-out [histogram (->* ()
(#:x-min (or/c rational? #f)
... | |
2f12552ff2deb751badfdfa5764e49e86f3c7bd2df8253dfa5149d69f89b8bf8 | facet-lang/facet | Semiring.hs | # LANGUAGE FunctionalDependencies #
module Facet.Semiring
( -- * Semiring classes
Semiring(..)
, Unital(..)
, zero
-- * Module classes
, LeftModule(..)
, scaleDefault
-- * Semiring datatypes
, Few(..)
, Tropical(..)
) where
-- Semiring classes
| Semirings extend ' Semigroup 's with an ' > < ' ( multiplication... | null | https://raw.githubusercontent.com/facet-lang/facet/4626eed1395cd91acc2d38910f27809ad6e753fa/src/Facet/Semiring.hs | haskell | * Semiring classes
* Module classes
* Semiring datatypes
Semiring classes
Associativity:
@
a >< (b >< c) ≡ (a >< b) >< c
@
Left-distributivity:
@
a >< (b <> c) ≡ (a >< b) <> (a >< c)
@
Right-distributivity:
@
(a <> b) >< c ≡ (a >< c) <> (b >< c)
@
Contrary to many presentations, we do not requir... | # LANGUAGE FunctionalDependencies #
module Facet.Semiring
Semiring(..)
, Unital(..)
, zero
, LeftModule(..)
, scaleDefault
, Few(..)
, Tropical(..)
) where
| Semirings extend ' Semigroup 's with an ' > < ' ( multiplication ) operation satisfying :
zero > < a ≡ zero
a > < zero ≡ zero
where ' zero ' is a syno... |
688af29bacc557f412607ebc704e46eff03564b176a47dfc095171bae95b9c61 | kawakami-o3/yaLispy | lisp.hs | module Main(toString, main, read_from, atom) where
import System.IO (hFlush, stdout)
import Debug.Trace
import Control.Exception
import Prelude hiding (catch)
data Expr = LispInt Int |
LispSymbol String |
LispProc ([Expr]->Expr) |
LispLambda [Expr] |
LispList [Expr]
in... | null | https://raw.githubusercontent.com/kawakami-o3/yaLispy/d6a5752a8a1367a4b55024fe99c223bd033fdc8b/Haskell/lisp.hs | haskell | procNot (lispFalse:xs) = lispTrue
ここには来ないはず | module Main(toString, main, read_from, atom) where
import System.IO (hFlush, stdout)
import Debug.Trace
import Control.Exception
import Prelude hiding (catch)
data Expr = LispInt Int |
LispSymbol String |
LispProc ([Expr]->Expr) |
LispLambda [Expr] |
LispList [Expr]
in... |
197e36cd353bae2d3c08d58c645aae8d9043094549f4e668096b5a9bb1aafdc5 | helvm/helms | Option.hs | module HelVM.HelMS.Repl.Option where
import HelVM.HelMS.Repl.Types
import HelVM.Common.Util
import qualified Data.Text as Text
import UnliftIO.Process
holidaysAction :: Action
holidaysAction "" = putStrLn "Enter a holiday."
holidaysAction xs = putStrLn $ "Happy " <> xs <>... | null | https://raw.githubusercontent.com/helvm/helms/7925ec1c07c6454f8524507100e5572990eda67f/hs/src/HelVM/HelMS/Repl/Option.hs | haskell | | Options
| Accessors
| Types | module HelVM.HelMS.Repl.Option where
import HelVM.HelMS.Repl.Types
import HelVM.Common.Util
import qualified Data.Text as Text
import UnliftIO.Process
holidaysAction :: Action
holidaysAction "" = putStrLn "Enter a holiday."
holidaysAction xs = putStrLn $ "Happy " <> xs <>... |
39d2586bc7a8a614c333994a0668b6c8c5044c117c0f5d1ce61a0fc066bf114d | alphaHeavy/shake-install | BuildDictionary.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -fno - warn - orphans #
module Development.Shake.Install.BuildDictionary
( BuildDictionary(..)
, findCabalFile
, findSourceDirectory
) where
import Control.D... | null | https://raw.githubusercontent.com/alphaHeavy/shake-install/411132995d47e3979ec33866971f40d8503b0277/Development/Shake/Install/BuildDictionary.hs | haskell | # LANGUAGE DeriveDataTypeable # | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -fno - warn - orphans #
module Development.Shake.Install.BuildDictionary
( BuildDictionary(..)
, findCabalFile
, findSourceDirectory
) where
import Control.DeepSeq
import Data.Binary
import Dat... |
3694f103de054d2f48f4b9b814d4dc208d350535449b44ebbf8c7f6460846140 | ragkousism/Guix-on-Hurd | system.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 , 2014 , 2015 , 2016 , 2017 < >
Copyright © 2015 < >
Copyright © 2015 , 2016 < >
Copyright © 2016 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the ter... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/system.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 , 2014 , 2015 , 2016 , 2017 < >
Copyright © 2015 < >
Copyright © 2015 , 2016 < >
Copyright © 2016 < >
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 < / > .
... |
544ee1f170378e22382a6e581e0c3b11bf05f6a86894d528e072937aa3efa908 | pauleve/pint | ph2thomas.ml |
Copyright or © or Copr . , ( 2012 )
This software is a computer program whose purpose is to provide Process
Hitting related tools .
This software is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software . You can use ,
modify and/ or redis... | null | https://raw.githubusercontent.com/pauleve/pint/7cf943ec60afcf285c368950925fd45f59f66f4a/ph2thomas.ml | ocaml | predecessors components |
Copyright or © or Copr . , ( 2012 )
This software is a computer program whose purpose is to provide Process
Hitting related tools .
This software is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software . You can use ,
modify and/ or redis... |
865d3d7cb58822113af27897561cdfdd2fad541d38c2a5d3bb2208cc72c67295 | rfkm/zou | bidi_test.clj | (ns zou.web.routing.bidi-test
(:require [bidi.bidi :as bidi]
[clojure.test :as t]
[midje.sweet :refer :all]
[ring.mock.request :as mock]
[zou.component :as c]
[zou.web.routing.bidi :as sut]
[zou.web.routing.proto :as rproto]))
(t/deftest bidi-r... | null | https://raw.githubusercontent.com/rfkm/zou/228feefae3e008f56806589cb8019511981f7b01/web/test/zou/web/routing/bidi_test.clj | clojure | (ns zou.web.routing.bidi-test
(:require [bidi.bidi :as bidi]
[clojure.test :as t]
[midje.sweet :refer :all]
[ring.mock.request :as mock]
[zou.component :as c]
[zou.web.routing.bidi :as sut]
[zou.web.routing.proto :as rproto]))
(t/deftest bidi-r... | |
1745ef3d0df3108f93aa0dc27927a59cf6817120efb8683f5662421d5f8dcdc4 | aggieben/weblocks | init-session.lisp |
(in-package :weblocks-clsql-demo)
;; Define our application
(defwebapp 'weblocks-clsql-demo
:description "A web application based on Weblocks")
;; Application dependencies
(setf *application-public-dependencies*
(append (public-files-relative-paths
'(:stylesheet . "suggest"))
*application-pu... | null | https://raw.githubusercontent.com/aggieben/weblocks/8d86be6a4fff8dde0b94181ba60d0dca2cbd9e25/examples/weblocks-clsql-demo/src/init-session.lisp | lisp | Define our application
Application dependencies
Define callback function to initialize new sessions. The function
sets up a continuation flow, and renders the initial page.
seen on all pages (similar behavior could be accomplished by
placing this function into the layout made by MAKE-MAIN-PAGE, but
this would p... |
(in-package :weblocks-clsql-demo)
(defwebapp 'weblocks-clsql-demo
:description "A web application based on Weblocks")
(setf *application-public-dependencies*
(append (public-files-relative-paths
'(:stylesheet . "suggest"))
*application-public-dependencies*))
After the initial page answers... |
b33fe35c0b5b0cf21c83ba8349280576fc5404317d81568769d3cdf1e65e23ac | juxt/shop | api_test.clj | Copyright © 2016 , JUXT LTD .
(ns edge.api-test
"Testing the API"
)
| null | https://raw.githubusercontent.com/juxt/shop/c23fc55bca1852bfbabb681a72debc12373c3a36/examples/main/test/edge/api_test.clj | clojure | Copyright © 2016 , JUXT LTD .
(ns edge.api-test
"Testing the API"
)
| |
cd47c43bef5f7b9f4015c26614b0fe53ffbc338a5187f3285d712e1a4af4be6e | containium/containium | standalone.clj | 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 /.
(ns containium.standalone
(:require [containium.systems :refer (with-systems)]
[containium.systems.config :refer (map-config)]
... | null | https://raw.githubusercontent.com/containium/containium/dede4098de928bed9ce8fccfc0a3891655ee162e/src/containium/standalone.clj | clojure | 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 /.
(ns containium.standalone
(:require [containium.systems :refer (with-systems)]
[containium.systems.config :refer (map-config)]
... | |
11c8c5e8a946a07961468dba2579f8e0d03f9016addb14adee7ba70247ae5aca | savonet/ocaml-taglib | read_tags.ml | let () =
let fname = Sys.argv.(1) in
let f = Taglib.File.open_file `Autodetect fname in
let t fn f = try fn f with _ -> "(none)" in
let td fn f = try string_of_int (fn f) with _ -> "(none)" in
Taglib.(
Printf.printf
"Track: %s, Artist: %s, Title: %s, Album: %s, Comment: %s, Genre: %s, \
Year:... | null | https://raw.githubusercontent.com/savonet/ocaml-taglib/deef16226ec6cce8675c36ab8a764bd65eb893d5/examples/read_tags.ml | ocaml | let () =
let fname = Sys.argv.(1) in
let f = Taglib.File.open_file `Autodetect fname in
let t fn f = try fn f with _ -> "(none)" in
let td fn f = try string_of_int (fn f) with _ -> "(none)" in
Taglib.(
Printf.printf
"Track: %s, Artist: %s, Title: %s, Album: %s, Comment: %s, Genre: %s, \
Year:... | |
3496360b07ad1a3ad3010a01365502e26131cdcf2e799ecc754a951799ec317c | anwarmamat/cmsc330spring18-public | types.ml | type value =
| Int_Val of int
| Bool_Val of bool
type data_type =
| Int_Type
| Bool_Type
(* Expressions have values *)
type expr =
| ID of string
| Int of int
| Bool of bool
| Add of expr * expr
| Sub of expr * expr
| Mult of expr * expr
| Div of expr * expr
| Pow of expr * expr
| Greater o... | null | https://raw.githubusercontent.com/anwarmamat/cmsc330spring18-public/b401e5157c05c7f47ee2d0ec1b21c7b142316031/p3b/types.ml | ocaml | Expressions have values
Statements don't have values
For parser termination
True sequencing instead of lists
Here the expr must be an id but students don't know polymorphic variants
Print the result of an expression | type value =
| Int_Val of int
| Bool_Val of bool
type data_type =
| Int_Type
| Bool_Type
type expr =
| ID of string
| Int of int
| Bool of bool
| Add of expr * expr
| Sub of expr * expr
| Mult of expr * expr
| Div of expr * expr
| Pow of expr * expr
| Greater of expr * expr
| Less of expr... |
803adba68c07562b4144755b53e6cd4ead346a0f20e7fa5de1ef4a58036a80eb | facebookarchive/pfff | highlight_html.ml |
*
* Copyright ( C ) 2011 Facebook
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file licens... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_html/analyze/highlight_html.ml | ocaml | ***************************************************************************
Prelude
***************************************************************************
***************************************************************************
Helpers
************************************************************************... |
*
* Copyright ( C ) 2011 Facebook
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file licens... |
e285697bc3512c953d45068ed245222000a0d2a15cbfe05c432efc1bc05a2821 | aesiniath/unbeliever | External.hs | # OPTIONS_HADDOCK not - home #
{- |
Re-exports of dependencies from various external libraries.
-}
module Core.System.External
(
) where
| null | https://raw.githubusercontent.com/aesiniath/unbeliever/a315a894c580b72ca32b3157518c6ba4653d9381/core-program/lib/Core/System/External.hs | haskell | |
Re-exports of dependencies from various external libraries.
| # OPTIONS_HADDOCK not - home #
module Core.System.External
(
) where
|
0c0750f8314e1f815a1355c020c4e844d9bd9a0def0bdca3759d5777fe63f64a | brendanhay/gogol | List.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-run/gen/Gogol/Run/Projects/Locations/Services/List.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
* Resource
** Constructing a Request
| A resource alias for @run.projects.locations.services.list@ method which the
| List Services.
/See:/ 'newRunProjectsLocationsServicesList' smart constructor.
| V1 error format.
| OAut... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
844d064601107cb9867a52ca5f79596f16df0cc14316d1b94be6330943d3c470 | awslabs/s2n-bignum | bignum_odd.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/x86/proofs/bignum_odd.ml | ocaml | =========================================================================
Deduce if a bignum is odd or even.
=========================================================================
*** print_literal_from_elf "x86/generic/bignum_odd.o";;
***
XOR (% rax) (% rax)
TEST (% ... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
let bignum_odd_mc = define_assert_from_elf "bignum_odd_mc" "x86/ge... |
af732ee8e9a6037243cbca145793e69a2af19eaa160c76f08cd652ef08cb4e20 | privet-kitty/cl-competitive | lp.lisp | (defpackage :cp/test/lp
(:use :cl :fiveam :cp/lp :cp/csc)
(:import-from :cp/test/base #:base-suite)
(:import-from :cp/lp #:to-standard-ab #:to-standard-c))
(in-package :cp/test/lp)
(in-suite base-suite)
(defun to-standard-form (problem)
(multiple-value-bind (a b) (to-standard-ab problem)
(multiple-value-bi... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/204fa3ae679e090eb6feb6ce83589ef2f3b26a1b/module/test/lp.lisp | lisp | empty problem
2x1-x2 <= 0,
-2 <= x1, | (defpackage :cp/test/lp
(:use :cl :fiveam :cp/lp :cp/csc)
(:import-from :cp/test/base #:base-suite)
(:import-from :cp/lp #:to-standard-ab #:to-standard-c))
(in-package :cp/test/lp)
(in-suite base-suite)
(defun to-standard-form (problem)
(multiple-value-bind (a b) (to-standard-ab problem)
(multiple-value-bi... |
a68d26fc66c2a3f3d8927c60fc76ff1d94cfe149fd2cac93d69bac7ad01774b2 | Clozure/ccl | l1-aprims.lisp | -*-Mode : LISP ; Package : CCL -*-
;;;
Copyright 1994 - 2009 Clozure Associates
;;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;;; you may not use this file except in compliance with the License.
;;; You may obtain a copy of the License at
;;;
;;; -2.0
;;;
;;; Unless required by appli... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/level-1/l1-aprims.lisp | lisp | Package : CCL -*-
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific la... | Copyright 1994 - 2009 Clozure Associates
distributed under the License is distributed on an " AS IS " BASIS ,
(in-package "CCL")
(let* ((standard-initial-bindings ())
(standard-initial-bindings-lock (make-read-write-lock)))
(defun standard-initial-bindings ()
(with-read-lock (standard-initial-bin... |
2221abc0a7cda1f21dd739731ff9da45f2c671be342402653ff058a3c071946c | alesaccoia/festival_flinger | ogi_span_mx_phones.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<--CSLU-->;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
Center for Spoken Language Understanding ; ;
Oregon Graduate Institute of Science & Technology ; ;
... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/ogi/ogi_spanish/ogi_span_mx_phones.scm | scheme | <--CSLU-->;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;
;
;
;
;;
;
release of the Festival TTS system. ;;
... |
Mexican Spanish synthesizer by , UDLA
(defPhoneSet
span_mx
(vc + -)
vowel length : short long dipthong schwa
(vlng s l d a 0)
(vheight 1 2 3 -)
(vfront 1 2 3 -)
(vrnd + -)
(ctype s f a n l 0)
(cplace l a p b d v 0)
(cvox + -)
)
(
(pau - 0 - - - 0 0 -)
(a + s 2 2 - 0 0 ... |
c3b29c511971db141148dd84ad7f11109d4389455aa92cdea23f941ef3bd7486 | tomjaguarpaw/haskell-opaleye | TypeFamilies.hs | module Opaleye.TypeFamilies {-# DEPRECATED "No longer supported" #-}
( TF.TableRecordField
, TF.RecordField
, (TF.:<*>)
, (TF.:<$>)
, TF.Id
, TF.Pure
, TF.IMap
, TF.F
, TF.O
, TF.H
, TF.W
, TF.N
, TF.NN
, TF.Opt
, TF.Req
, TF.Nulls
) where
import Opaleye.Internal.TypeFamilies as TF
| null | https://raw.githubusercontent.com/tomjaguarpaw/haskell-opaleye/456191c2a452c1d3fca7761ec303e22694a192d3/src/Opaleye/TypeFamilies.hs | haskell | # DEPRECATED "No longer supported" # | ( TF.TableRecordField
, TF.RecordField
, (TF.:<*>)
, (TF.:<$>)
, TF.Id
, TF.Pure
, TF.IMap
, TF.F
, TF.O
, TF.H
, TF.W
, TF.N
, TF.NN
, TF.Opt
, TF.Req
, TF.Nulls
) where
import Opaleye.Internal.TypeFamilies as TF
|
8f5811154461acc7e47b1f1ccac2ddc7d057d910a39e7dc27a26cdf6d1f3b6d1 | Vaguery/klapaucius | optional_keyed_arg_plus_arbitrary.clj | (ns design-spikes.optional-keyed-arg-plus-arbitrary
(:use midje.sweet))
;; trying to learn how to do some fancy destructuring
(defn foo
[always & many]
(str always "," many))
(fact "no optional"
(foo 88) => "88,")
(fact "with an optional"
(foo 88 99) => "88,(99)")
(fact "with stuff"
(foo 88 99 111 2... | null | https://raw.githubusercontent.com/Vaguery/klapaucius/17b55eb76feaa520a85d4df93597cccffe6bdba4/test/design_spikes/optional_keyed_arg_plus_arbitrary.clj | clojure | trying to learn how to do some fancy destructuring | (ns design-spikes.optional-keyed-arg-plus-arbitrary
(:use midje.sweet))
(defn foo
[always & many]
(str always "," many))
(fact "no optional"
(foo 88) => "88,")
(fact "with an optional"
(foo 88 99) => "88,(99)")
(fact "with stuff"
(foo 88 99 111 222) => "88,(99 111 222)")
(fact "keywords?"
(foo 8... |
038353b9877cf61fd9b3e2b9e2b5054f7da7f14e97910c7b733c292c31b638c9 | thierry-martinez/stdcompat | printf.mli | val fprintf : out_channel -> ('a, out_channel, unit) format -> 'a
val printf : ('a, out_channel, unit) format -> 'a
val eprintf : ('a, out_channel, unit) format -> 'a
val sprintf : ('a, unit, string) format -> 'a
val bprintf : Buffer.t -> ('a, Buffer.t, unit) format -> 'a
val ifprintf : 'a -> ('b, 'a, unit) format -> '... | null | https://raw.githubusercontent.com/thierry-martinez/stdcompat/83d786cdb17fae0caadf5c342e283c3dcfee2279/interfaces/4.02/printf.mli | ocaml | val fprintf : out_channel -> ('a, out_channel, unit) format -> 'a
val printf : ('a, out_channel, unit) format -> 'a
val eprintf : ('a, out_channel, unit) format -> 'a
val sprintf : ('a, unit, string) format -> 'a
val bprintf : Buffer.t -> ('a, Buffer.t, unit) format -> 'a
val ifprintf : 'a -> ('b, 'a, unit) format -> '... | |
02bcec148b4a65e7502d139d87fd21af948ed9d6693000e6c061c4289ef10a95 | willtim/Atavachron | Garbage.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
-- | Garbage collection and chunk check/repair procedures.
--
module Atavachron.Garbage where
import Prelude ... | null | https://raw.githubusercontent.com/willtim/Atavachron/bbf9a93eac0e096ee4595e23067c912af865601e/src/Atavachron/Garbage.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
| Garbage collection and chunk check/repair procedures.
| Find and collect garbage using the the entire set of snapshots
for the repository. The deleted snapshots parameter is optional, if
it is provided an incremental garbage collection is performed which
conside... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
module Atavachron.Garbage where
import Prelude hiding (concatMap)
import Control.Monad
import Control.Monad.Catch
import Control.Monad.IO.Class
import Control.Monad.Mo... |
ea51f9e6aeb62ce90a72ed47840ec057f0d20fc94c614e026c9410397f5f939c | RedPRL/yuujinchou | Scope.mli | See for documentation .
module type Param = ScopeSigs.Param
module type Perform = ScopeSigs.Perform
module type S = ScopeSigs.S with module Language := Language
module Make (Param : Param) (Modifier : Modifier.S with module Param := Param)
: S with module Param := Param
| null | https://raw.githubusercontent.com/RedPRL/yuujinchou/256b5e726575d0912c28a1165ce49d9f6851dfda/src/Scope.mli | ocaml | See for documentation .
module type Param = ScopeSigs.Param
module type Perform = ScopeSigs.Perform
module type S = ScopeSigs.S with module Language := Language
module Make (Param : Param) (Modifier : Modifier.S with module Param := Param)
: S with module Param := Param
| |
c1cf5efe121326b4e3433ce27cfcc0e58b73bad9453585d69dd5117797cf592f | vbmithr/ocaml-fix | fixtypes.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2019 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2019 Vincent Bernar... | null | https://raw.githubusercontent.com/vbmithr/ocaml-fix/8394d397428b7c7832934462969347c1ebb43e8d/src/fixtypes.mli | ocaml | ---------------------------------------------------------------------------
Copyright ( c ) 2019 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2019 Vincent Bernar... | |
a5e921809582ed383a6b98dc3f636841e0fb3069656efd0abc7690a5de1f14e9 | amnh/PCG | Fitch.hs | -----------------------------------------------------------------------------
-- |
-- Module : Bio.Character.Decoration.Fitch
Copyright : ( c ) 2015 - 2021 Ward Wheeler
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
----------------------------... | null | https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/core/data-structures/src/Bio/Character/Decoration/Fitch.hs | haskell | ---------------------------------------------------------------------------
|
Module : Bio.Character.Decoration.Fitch
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
* Lenses | Copyright : ( c ) 2015 - 2021 Ward Wheeler
module Bio.Character.Decoration.Fitch
( DiscreteCharacterDecoration()
, DiscreteCharacterMetadata()
, DiscreteExtensionFitchDecoration(..)
, FitchCharacterDecoration()
, FitchOptimizationDecoration(FitchOptimizationDecoration)
, GeneralCharacterMetadata()
... |
04c0a07d1700642bf826751594d963f6d6aefb0711381d2a86d8a7dad8615498 | LeventErkok/sbv | Function.hs | -----------------------------------------------------------------------------
-- |
Module : Documentation . SBV.Examples . Uninterpreted . Function
Copyright : ( c )
-- License : BSD3
-- Maintainer:
-- Stability : experimental
--
-- Demonstrates function counter-examples
-----------------------------------... | null | https://raw.githubusercontent.com/LeventErkok/sbv/0d791d9f4d1de6bd915b6d7d3f9a550385cb27a5/Documentation/SBV/Examples/Uninterpreted/Function.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD3
Maintainer:
Stability : experimental
Demonstrates function counter-examples
---------------------------------------------------------------------------
# OPTIONS_GHC -Wall -Werror #
$setup
>>> -- For doctest purposes... | Module : Documentation . SBV.Examples . Uninterpreted . Function
Copyright : ( c )
module Documentation.SBV.Examples.Uninterpreted.Function where
import Data.SBV
f :: SWord8 -> SWord8 -> SWord16
f = uninterpret "f"
| Asserts that @f x z = = f ( y+2 ) z@ whenever @x = = y+2@. Naturally correct :
Q.E.... |
7979434a33348dc5e402bf85e4603bc80051672d04273c83831fcbb54bd470f6 | ocsigen/js_of_ocaml | intl.mli | Js_of_ocaml library
* /
* Copyright ( C ) 2018
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , ... | null | https://raw.githubusercontent.com/ocsigen/js_of_ocaml/5b6201c4094fe3c6dab81a75c609bd70924df6fb/lib/js_of_ocaml/intl.mli | ocaml | Note: the exact output may be browser-dependent
Results below assume UTC timezone - your results may vary | Js_of_ocaml library
* /
* Copyright ( C ) 2018
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , ... |
422bfb3ba6a54134b7083b17261a7e36a9c89196e9ce97147e891505ce494cad | quil-lang/quilc | compilation-tests.lisp | ;;;; src/discrete/parse-tests.lisp
;;;;
Author :
(in-package #:cl-quil.discrete-tests)
(deftest parse-tolerance ()
(cl-quil:parse-quil "PRAGMA TOLERANCE \"0.1234\"")
(is (<= (- cl-quil.discrete::*tolerance* 0.1234) 1d-16))
(cl-quil:parse-quil "PRAGMA TOLERANCE \"2.0e-2\"")
(is (<= (- cl-quil.discrete::*to... | null | https://raw.githubusercontent.com/quil-lang/quilc/e04c4d3fb9b7b1028ab7faaff1a3bf692dcb3d44/tests/discrete/compilation-tests.lisp | lisp | src/discrete/parse-tests.lisp
While nothing is done with this result,
It at the very least assures it runs without errors. | Author :
(in-package #:cl-quil.discrete-tests)
(deftest parse-tolerance ()
(cl-quil:parse-quil "PRAGMA TOLERANCE \"0.1234\"")
(is (<= (- cl-quil.discrete::*tolerance* 0.1234) 1d-16))
(cl-quil:parse-quil "PRAGMA TOLERANCE \"2.0e-2\"")
(is (<= (- cl-quil.discrete::*tolerance* 2.0d-2) 1d-16))
(signals type... |
ad144c68f9bf271c2da89d12cec246bf51871def3055576bf3c7992c4f81598e | SumitPadhiyar/confuzz | lwt_react.mli | This file is part of Lwt , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
(** React utilities *)
(** This module is an overlay for the [React] module. You can open it
instead of the [React] module in order to get all of [React]'s functions
plus Lwt... | null | https://raw.githubusercontent.com/SumitPadhiyar/confuzz/7d6b2af51d7135025f9ed1e013a9ae0940f3663e/src/react/lwt_react.mli | ocaml | * React utilities
* This module is an overlay for the [React] module. You can open it
instead of the [React] module in order to get all of [React]'s functions
plus Lwt ones.
This module is provided by OPAM package [lwt_react]. Link with ocamlfind
package [lwt_react].
* Type of events.
* Type of sign... | This file is part of Lwt , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
type 'a event = 'a React.event
type 'a signal = 'a React.signal
module E : sig
include module type of React.E
* { 2 Lwt - specific utilities }
val with_finaliser : (unit -> ... |
519dc50ba62280dbdf1f6307321a2190aa3ed31789bce408d79e0f5bfd72b334 | reflex-frp/patch | hlint.hs | module Main where
import Control.Monad
import Language.Haskell.HLint (hlint)
import System.Directory
import System.Exit (exitFailure, exitSuccess)
import System.FilePath
import System.FilePath.Find
main :: IO ()
main = do
pwd <- getCurrentDirectory
let runHlint f = hlint $ f:
[ "--ignore=Redundant do"
... | null | https://raw.githubusercontent.com/reflex-frp/patch/064a0e8d839b4302e4cac041051aee04614ccc8a/test/hlint.hs | haskell | TODO: Someday fix all hints in tests, etc. | module Main where
import Control.Monad
import Language.Haskell.HLint (hlint)
import System.Directory
import System.Exit (exitFailure, exitSuccess)
import System.FilePath
import System.FilePath.Find
main :: IO ()
main = do
pwd <- getCurrentDirectory
let runHlint f = hlint $ f:
[ "--ignore=Redundant do"
... |
f5591f472dd99c6fb48611c7f3af632d3c0d6c0cdeed19d01754d447505b89cf | antoniogarrote/jobim | philosophers.clj | (ns jobim.examples.philosophers
(:use [jobim]))
;;;;;;;;;;;;;
Forks
;;;;;;;;;;;;
(defn do-forks
([forks-list]
(loop [forks-list forks-list]
(let [{:keys [key left right] :as msg} (receive)]
(condp = key
:grab-forks (recur (filter (fn [fork] (and (not= fork left)
... | null | https://raw.githubusercontent.com/antoniogarrote/jobim/f041331d2c02cf38741e8604263bd08a3a1f11a5/jobim-core/src/jobim/examples/philosophers.clj | clojure |
Public forks API
Waiter
Public waiter API
Philospher
Run it
Runs the algorithm in a distributed set of nodes | (ns jobim.examples.philosophers
(:use [jobim]))
Forks
(defn do-forks
([forks-list]
(loop [forks-list forks-list]
(let [{:keys [key left right] :as msg} (receive)]
(condp = key
:grab-forks (recur (filter (fn [fork] (and (not= fork left)
... |
66ce4a7b4a33656c8e0a6b845502cac9483d04e54caff191be44a0c8c7525b5e | rootmos/silly-joy | Main.hs | # LANGUAGE ApplicativeDo #
module Main where
import UI (runRepl, runTui)
import Options.Applicative
import Data.Semigroup ((<>))
data Config = MkConfig { tui :: Bool }
config :: Parser Config
config = do
s <- switch ( long "tui" <> short 't' <> help "Run with terminal UI")
return $ MkConfig s
parser :: Par... | null | https://raw.githubusercontent.com/rootmos/silly-joy/e9e716482229a1e27cb93e21ab76a58be47e5c7a/app/Main.hs | haskell | # LANGUAGE ApplicativeDo #
module Main where
import UI (runRepl, runTui)
import Options.Applicative
import Data.Semigroup ((<>))
data Config = MkConfig { tui :: Bool }
config :: Parser Config
config = do
s <- switch ( long "tui" <> short 't' <> help "Run with terminal UI")
return $ MkConfig s
parser :: Par... | |
72ab1de4bb183f208540d18a673553d82ef358627386eacbcfc0f238746ddd2d | astrada/ocaml-extjs | ext_dom_Element_Fly.ml | class type t =
object('self)
inherit Ext_dom_Element.t
method isFly : bool Js.t Js.prop
end
class type configs =
object('self)
inherit Ext_dom_Element.configs
end
class type events =
object
inherit Ext_dom_Element.events
end
class type statics =
object
inherit Ext_dom_Element.statics
... | null | https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/ext_dom_Element_Fly.ml | ocaml | class type t =
object('self)
inherit Ext_dom_Element.t
method isFly : bool Js.t Js.prop
end
class type configs =
object('self)
inherit Ext_dom_Element.configs
end
class type events =
object
inherit Ext_dom_Element.events
end
class type statics =
object
inherit Ext_dom_Element.statics
... | |
4f9904b827be88fad6a106ca17821e6b1f59b6f52e8d0312f3a02a9bf9c6720b | djblue/portal | socket.clj | (ns ^:no-doc portal.runtime.remote.socket
"Fork of "
(:require [clojure.java.io :as io]
[clojure.string :as str]
;[cheshire.core :as json]
;[clojure.edn :as edn]
)
(:refer-clojure :exclude [eval load load-file])
(:import (java.net Socket)))
(defn- create-socket
... | null | https://raw.githubusercontent.com/djblue/portal/1ee145277b572e572bc3fd88ad0553c9cc15d7be/src/portal/runtime/remote/socket.clj | clojure | [cheshire.core :as json]
[clojure.edn :as edn]
message (-> message json/parse-string pr-str)
edn/read-string json/generate-string | (ns ^:no-doc portal.runtime.remote.socket
"Fork of "
(:require [clojure.java.io :as io]
[clojure.string :as str]
)
(:refer-clojure :exclude [eval load load-file])
(:import (java.net Socket)))
(defn- create-socket
^Socket [{:keys [options]}]
(Socket.
^String (get-in options [:run... |
60fde488e6d081396d49ced9e7ca95e4ef2275aafedb2ac917fcebb21d5f8091 | craigfe/progress | interject.ml | let bar ~total =
let open Progress.Line in
list
[ spinner ~color:(Progress.Color.ansi `green) ()
; bar total
; count_to total
]
let run () =
let total = 100 in
Progress.with_reporter (bar ~total) (fun f ->
for i = 1 to total do
f 1;
if i mod 10 = 0 then
Progress.... | null | https://raw.githubusercontent.com/craigfe/progress/d7129b772d05c5589b8807630031155a6aeb27f0/examples/interject.ml | ocaml | let bar ~total =
let open Progress.Line in
list
[ spinner ~color:(Progress.Color.ansi `green) ()
; bar total
; count_to total
]
let run () =
let total = 100 in
Progress.with_reporter (bar ~total) (fun f ->
for i = 1 to total do
f 1;
if i mod 10 = 0 then
Progress.... | |
a440aa5a82c83ebabed69449365fa6a8b07d00223143bb6f99a3ab074b68d58e | supki/libjenkins | Internal.hs | # LANGUAGE CPP #
# LANGUAGE DataKinds #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE StandaloneDeriving #
{-# OPTIONS_HADDOCK hide #-}
-- | Jen... | null | https://raw.githubusercontent.com/supki/libjenkins/2f3dfd8a5dff3a15250c0fe096e251f1aa9a98b0/src/Jenkins/Rest/Method/Internal.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# OPTIONS_HADDOCK hide #
| Jenkins REST API method construction
$setup
>>> :set -XOverloadedStrings
| Only to support numeric literals
| Method types
| Response formats
| 'Formatter's know how to append the ... | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE StandaloneDeriving #
module Jenkins.Rest.Method.Internal where
import Control.Applicative
import Data.ByteString (ByteString)
import Data.Data (Data,... |
ab65a2fb9a7b63359a8d8bbe4649819036f60dffb390d678c7edf37f5d90d2e0 | geneweb/geneweb | util.ml | Copyright ( c ) 1998 - 2007 INRIA
open Config
open Def
open Gwdb
let escape_aux count blit str =
let strlen = String.length str in
let rec loop acc i =
if i < strlen then loop (acc + count (String.unsafe_get str i)) (i + 1)
else if acc = strlen then str
else
let buf = Bytes.create acc in
... | null | https://raw.githubusercontent.com/geneweb/geneweb/5848a65d82f1e3a81a1013800f6bfc81cc0a8468/lib/util.ml | ocaml | * [escape_html str] replaces '&', '"', '<' and '>'
with their corresponding character entities (using entity number)
* [escape_attribute str] only escapes double quote and ampersand.
Since we will return normalized HTML, ['"'] should be the only
dangerous character here.
Internationalization
[aa|bb]
... | Copyright ( c ) 1998 - 2007 INRIA
open Config
open Def
open Gwdb
let escape_aux count blit str =
let strlen = String.length str in
let rec loop acc i =
if i < strlen then loop (acc + count (String.unsafe_get str i)) (i + 1)
else if acc = strlen then str
else
let buf = Bytes.create acc in
... |
b081b24b4c94e0b7f5d28881c636d1316af347df73520b00f7366fd588818fa6 | active-group/active-clojure | match_test.clj | (ns active.clojure.match-test
(:require [active.clojure.match :as p]
[active.clojure.functions :as f]
[clojure.core.match.regex]
[clojure.test :as t]))
(t/deftest valid-symbol?-test
(t/is (true? (p/valid-symbol? 'symbol)))
(t/is (false? (p/valid-symbol? '?)))
(t/is (false? (... | null | https://raw.githubusercontent.com/active-group/active-clojure/44050a1292fa610dde732d5fbfc42c37ad976d3a/test/active/clojure/match_test.clj | clojure | What about "regular" anonymous functions?
Testing Macro
compiler exception: not a valid pattern
(t/is (= [] ((p/map-matcher [] []) {:a "a"})))
compiler exception: Wrong number of args (0) passed to: active.clojure.match/deep-merge
(t/is (= [] ((p/map-matcher [()] []) {:a "a"})))
compiler exception: class clojure... | (ns active.clojure.match-test
(:require [active.clojure.match :as p]
[active.clojure.functions :as f]
[clojure.core.match.regex]
[clojure.test :as t]))
(t/deftest valid-symbol?-test
(t/is (true? (p/valid-symbol? 'symbol)))
(t/is (false? (p/valid-symbol? '?)))
(t/is (false? (... |
4891974adde22ba4b87bc9f603ee21b005eb728ebba27a1c9807db629ef8b76b | trskop/command-wrapper | Environment.hs | -- |
-- Module: $Header$
-- Description: Data type representing environment variable.
Copyright : ( c ) 2018 - 2020
License : BSD3
--
-- Maintainer:
-- Stability: experimental
Portability : GHC specific language extensions .
--
-- Data type representing environment variable.
module CommandWrapp... | null | https://raw.githubusercontent.com/trskop/command-wrapper/4f2e2e1f63a3296ccfad9f216d75a708969890ed/command-wrapper-core/src/CommandWrapper/Core/Config/Environment.hs | haskell | |
Module: $Header$
Description: Data type representing environment variable.
Maintainer:
Stability: experimental
Data type representing environment variable.
| Represents environment variable @name=value@.
For example @FOO=bar@ would be:
@
{ 'name' = \"FOO\"
}
@
Encoded into Dhall (with... | Copyright : ( c ) 2018 - 2020
License : BSD3
Portability : GHC specific language extensions .
module CommandWrapper.Core.Config.Environment
( EnvironmentVariable(..)
, toTuple
, fromTuple
)
where
import GHC.Generics (Generic)
import Text.Show (Show)
import Dhall (FromDhall, ToDhall)
... |
a87cdbb1b390b3bce8ac45d6d7b700748089eabf15487db5b7b5071076fe5d0f | lambe-lang/nethra | t11_infer_pair.ml | open Common
open Preface.Option.Functor
open Nethra.Lang.Ast.Term.Construct
open Nethra.Lang.Ast.Proof
open Nethra.Lang.Ast.Proof.Destruct
open Nethra.Lang.Ast.Hypothesis.Construct
open Nethra.Lang.Ast.Hypothesis.Access
open Nethra.Lang.System.Type
module Theory = struct
let type_in_type = true
end
module rec TypeI... | null | https://raw.githubusercontent.com/lambe-lang/nethra/892b84deb9475021b95bfa6274dc8b70cb3e44ea/test/nethra/lang/system/s03_typer/t11_infer_pair.ml | ocaml | open Common
open Preface.Option.Functor
open Nethra.Lang.Ast.Term.Construct
open Nethra.Lang.Ast.Proof
open Nethra.Lang.Ast.Proof.Destruct
open Nethra.Lang.Ast.Hypothesis.Construct
open Nethra.Lang.Ast.Hypothesis.Access
open Nethra.Lang.System.Type
module Theory = struct
let type_in_type = true
end
module rec TypeI... | |
18976bd43110c5500428dd3ec48ab5b302379070c42ddc9fbf652cd46a21000f | eronalves/foodship-restaurant | filter_restaurants.clj | (ns foodship-restaurant.domain.domain-functions.filter-restaurants
(:require [clojure.string :as s]))
(defn- deaccent [str]
"Remove accent from string"
(let [normalized (java.text.Normalizer/normalize str java.text.Normalizer$Form/NFD)]
(clojure.string/replace normalized #"\p{InCombiningDiacriticalMarks}+" "... | null | https://raw.githubusercontent.com/eronalves/foodship-restaurant/6a30c48013a618c2cef34e7e29b200e5d45e8623/src/foodship_restaurant/domain/domain_functions/filter_restaurants.clj | clojure | (ns foodship-restaurant.domain.domain-functions.filter-restaurants
(:require [clojure.string :as s]))
(defn- deaccent [str]
"Remove accent from string"
(let [normalized (java.text.Normalizer/normalize str java.text.Normalizer$Form/NFD)]
(clojure.string/replace normalized #"\p{InCombiningDiacriticalMarks}+" "... | |
1c94bd197d05f0de10c7543d18d57650b70e881cc1189d548e714833c3ab8242 | roehst/tapl-implementations | syntax.mli | module Syntax : syntax trees and associated support functions
open Support.Pervasive
open Support.Error
(* Data type definitions *)
type ty =
TyBool
| TyNat
type term =
TmTrue of info
| TmFalse of info
| TmIf of info * term * term * term
| TmZero of info
| TmSucc of info * term
| TmPred of info... | null | https://raw.githubusercontent.com/roehst/tapl-implementations/23c0dc505a8c0b0a797201a7e4e3e5b939dd8fdb/tyarith/syntax.mli | ocaml | Data type definitions
Printing
Misc | module Syntax : syntax trees and associated support functions
open Support.Pervasive
open Support.Error
type ty =
TyBool
| TyNat
type term =
TmTrue of info
| TmFalse of info
| TmIf of info * term * term * term
| TmZero of info
| TmSucc of info * term
| TmPred of info * term
| TmIsZero of info... |
865e410c3ecda32f9badd16fae47b4571711c1422dfd7e7026765a8f3e7dec25 | haroldcarr/learn-haskell-coq-ml-etc | FP06ForComp.hs |
Created : 2013 Oct 07 ( Mon ) 14:41:15 by .
Last Modified : 2014 Mar 06 ( Thu ) 13:27:59 by .
Created : 2013 Oct 07 (Mon) 14:41:15 by carr.
Last Modified : 2014 Mar 06 (Thu) 13:27:59 by Harold Carr.
-}
module FP06ForComp where
import Data.Char (toLower)
import Data.Func... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/course/2013-11-coursera-fp-odersky-but-in-haskell/FP06ForComp.hs | haskell | -equivalent-to-scalas-groupby
End of file. |
Created : 2013 Oct 07 ( Mon ) 14:41:15 by .
Last Modified : 2014 Mar 06 ( Thu ) 13:27:59 by .
Created : 2013 Oct 07 (Mon) 14:41:15 by carr.
Last Modified : 2014 Mar 06 (Thu) 13:27:59 by Harold Carr.
-}
module FP06ForComp where
import Data.Char (toLower)
import Data.Func... |
777cd33b7dbde4bf626ef4a233420fae96647796d714ea99f52246a63b8d04fe | SKS-Keyserver/sks-keyserver | reconPTreeDb.ml | (***********************************************************************)
(* reconPTreeDb.ml *)
(* *)
Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 ,
2... | null | https://raw.githubusercontent.com/SKS-Keyserver/sks-keyserver/a4e5267d817cddbdfee13d07a7fb38a9b94b3eee/reconPTreeDb.ml | ocaml | *********************************************************************
reconPTreeDb.ml
redistribute it and/or modify it under ... | Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 ,
2011 , 2012 , 2013 and Contributors
This file is part of SKS . SKS is free software ; you can
Public License as published by the Free Software Foundation ; either
version 2 of the License , or... |
00eb010a2856cb380abfc64da05970a994473746644a11d046944683b8e78c1a | brendanhay/amazonka | GetLoggingConfiguration.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused -... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-waf/gen/Amazonka/WAF/GetLoggingConfiguration.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
This is __AWS WAF Classic__ documentation. For more information, see
in the developer guide.
__For the latest version of AWS WAF__, use the AWS WAFV2 API and see the
<-chapter.html AWS WAF Developer Guide>.
With the latest ve... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
De... |
034099fc8e693bb596a64d1d92dd3e508c5e0a193854501e6fbb9fe225f83ef3 | codinuum/volt | configurationOld.mli |
* This file is part of Bolt .
* Copyright ( C ) 2009 - 2012 .
*
* Bolt 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/codinuum/volt/546207693ef102a2f02c85af935f64a8f16882e6/src/library/configurationOld.mli | ocaml | * This module provides the function loading a configuration from a
file in "old" format.
The file format is as follows:
- the format is line-oriented;
- comments start with the '#' character and end at the end of the
line;
- sections start with a line of the form "[a.b.c]", "a.b.c" being the
... |
* This file is part of Bolt .
* Copyright ( C ) 2009 - 2012 .
*
* Bolt 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 ) ... |
f496505cc66960e8fbd3619ea2f8fd93f782f60b7083570ececc5c38197431a7 | byulparan/sc-extensions | pc.lisp | (in-package :pc)
(defvar *diatonic-major*
'((:i . (0 . :^))
(:i6 . (0 . :^6))
(:i64 . (0 . :^64))
(:i7 . (0 . :^7))
(:i- . (0 . :-))
(:i-7 . (0 . :-7))
neopolitan
neopolitan
(:ii . (2 . :-))
(:ii6 . (2 . :-6))
(:ii7 . (2 . :-7))
(:ii9 . (2 . :-9))
(:ii^ . (2 . :... | null | https://raw.githubusercontent.com/byulparan/sc-extensions/7fbcc54bcb147519c3c332821a6811646dc48a97/pc.lisp | lisp | ;; retrograde list
(define ivl:retrograde reverse) | (in-package :pc)
(defvar *diatonic-major*
'((:i . (0 . :^))
(:i6 . (0 . :^6))
(:i64 . (0 . :^64))
(:i7 . (0 . :^7))
(:i- . (0 . :-))
(:i-7 . (0 . :-7))
neopolitan
neopolitan
(:ii . (2 . :-))
(:ii6 . (2 . :-6))
(:ii7 . (2 . :-7))
(:ii9 . (2 . :-9))
(:ii^ . (2 . :... |
730178d0064410d99ad665c9a0dc692875e86ec80c17f9c41a473548aebccb27 | byron-network/byron-dex | API.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
module Faucet.API (app, FaucetService(..)) where
import ... | null | https://raw.githubusercontent.com/byron-network/byron-dex/e8d541deb106e14142183f18844bb328c5cfbd40/faucet/faucet-backend/src/Faucet/API.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators # | # LANGUAGE GeneralizedNewtypeDeriving #
module Faucet.API (app, FaucetService(..)) where
import Cardano.Api
import qualified Colog as Log
import Control.Exception (Exception, try)
import Control.Monad.Except (ExceptT (ExceptT), MonadIO (liftIO),
... |
5f7698cd183d2457b9e22ac4c193c8a1a9ae55d20d09e38081766b8590538d9f | marick/fp-oo | add-and-make-1b.clj | (def add
(fn [this other]
(shift this (x other) (y other))))
(prn (add (Point 1 2) (Point 3 4)))
| null | https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/solutions/pieces/add-and-make-1b.clj | clojure | (def add
(fn [this other]
(shift this (x other) (y other))))
(prn (add (Point 1 2) (Point 3 4)))
| |
dbec57256ed54da1ec117b3a9bee0b069c4e93e3c6d4c5b6788b8e3d65ad00b8 | anmonteiro/aws-lambda-ocaml-runtime | basic.ml | let my_handler evt _context =
Logs.app (fun m -> m "Hello from the async handler");
Ok evt
let setup_log ?style_renderer level =
Fmt_tty.setup_std_outputs ?style_renderer ();
Logs.set_level level;
Logs.set_reporter (Logs_fmt.reporter ());
()
let () =
setup_log (Some Logs.Debug);
Lambda_runtime.Json.la... | null | https://raw.githubusercontent.com/anmonteiro/aws-lambda-ocaml-runtime/5d3210e0c6683f390cb5870efe7f774420ad4b22/examples/asynchronous-handler/basic.ml | ocaml | let my_handler evt _context =
Logs.app (fun m -> m "Hello from the async handler");
Ok evt
let setup_log ?style_renderer level =
Fmt_tty.setup_std_outputs ?style_renderer ();
Logs.set_level level;
Logs.set_reporter (Logs_fmt.reporter ());
()
let () =
setup_log (Some Logs.Debug);
Lambda_runtime.Json.la... | |
a151fa02c1b0fe2b2bed1decdb6560bb9e7a72dc0d3026db19a8d40ce2130a4b | clj-kondo/clj-kondo | lint_as_for.clj | (ns lint-as-for
{:clj-kondo/config '{;; TODO: setting the level doesn't yet work in ns local
configs , see # 430 , so we have to set it in our tests
:linters {:unresolved-symbol {:level :warning}}
:lint-as {plumbing.core/for-map clojure.core/for
... | null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/626978461cbf113c376634cdf034d7262deb429f/corpus/lint_as_for.clj | clojure | TODO: setting the level doesn't yet work in ns local | (ns lint-as-for
configs , see # 430 , so we have to set it in our tests
:linters {:unresolved-symbol {:level :warning}}
:lint-as {plumbing.core/for-map clojure.core/for
clojure.java.jdbc/with-db-transaction clojure.core/let}}})
(require '... |
055a14d4cdc55fc7b01bec0568f1444a66228bb220490f12acd7fc9e1891d07a | basho/riak_cs | riak_cs_dummy_reader.erl | %% ---------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . Y... | null | https://raw.githubusercontent.com/basho/riak_cs/c0c1012d1c9c691c74c8c5d9f69d388f5047bcd2/test/riak_cs_dummy_reader.erl | erlang | ---------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permiss... | Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
bc348c4005bf12d9438eb4a19551161624657076b1fa28c952e0a1ac2b4ada6c | bondy-io/bondy | bondy_wamp_ws_connection_handler.erl | %% =============================================================================
%% bondy_wamp_ws_connection_handler.erl -
%%
Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance w... | null | https://raw.githubusercontent.com/bondy-io/bondy/97d66aaf26b9691e20ef5d4d4d44367b6265e55a/apps/bondy/src/bondy_wamp_ws_connection_handler.erl | erlang | =============================================================================
bondy_wamp_ws_connection_handler.erl -
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
WITHO... | Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
* binary * and use the message serialization .
-module(bondy_wamp_ws_connection_handler).
-include_lib("wa... |
06b0eb9822d9bfe3e6265290a3dc53aa17247edca8a8d7568075db4e3c6e0387 | mkoppmann/eselsohr | UnlockLink.hs | module Lib.Ui.Web.Page.ViewModel.UnlockLink
( UnlockLinkVm (..)
, fromDomain
) where
import qualified Lib.Ui.Web.Page.ViewModel.Capability as CapabilityVm
import Lib.Domain.Capability (Capability)
import Lib.Domain.Collection (Collection)
import Lib.Domain.Id (Id)
import Lib.Ui.Dto.Accesstoken
( Acces... | null | https://raw.githubusercontent.com/mkoppmann/eselsohr/3bb8609199c1dfda94935e6dde0c46fc429de84e/src/Lib/Ui/Web/Page/ViewModel/UnlockLink.hs | haskell | module Lib.Ui.Web.Page.ViewModel.UnlockLink
( UnlockLinkVm (..)
, fromDomain
) where
import qualified Lib.Ui.Web.Page.ViewModel.Capability as CapabilityVm
import Lib.Domain.Capability (Capability)
import Lib.Domain.Collection (Collection)
import Lib.Domain.Id (Id)
import Lib.Ui.Dto.Accesstoken
( Acces... | |
fc25ae2709e8902feec1503bce0d863d3e50a61500bbc84e3222630265654cf8 | tsloughter/docker_compose_cth | docker_compose_cth_SUITE.erl | -module(docker_compose_cth_SUITE).
-compile(export_all).
-include_lib("stdlib/include/assert.hrl").
-include_lib("common_test/include/ct.hrl").
all() ->
[check_service].
suite() ->
[{ct_hooks, [docker_compose_cth]}].
init_per_suite(Config) ->
Config.
end_per_suite(_Config) ->
ok.
check_service(_C... | null | https://raw.githubusercontent.com/tsloughter/docker_compose_cth/2e1519d244b2ae87f44f2b59560f28d2e9d1bc42/test/docker_compose_cth_SUITE.erl | erlang | -module(docker_compose_cth_SUITE).
-compile(export_all).
-include_lib("stdlib/include/assert.hrl").
-include_lib("common_test/include/ct.hrl").
all() ->
[check_service].
suite() ->
[{ct_hooks, [docker_compose_cth]}].
init_per_suite(Config) ->
Config.
end_per_suite(_Config) ->
ok.
check_service(_C... | |
2ebfe4e6cae385c081987f2499e4d4ee4f30c6509e27dea2c48959253491c587 | fukamachi/clozure-cl | ppc-linux-syscalls.lisp | -*-Mode : LISP ; Package : CCL -*-
;;;
Copyright ( C ) 2001 - 2009 Clozure Associates
This file is part of Clozure CL .
;;;
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure CL as the
;;; file "LICENSE". The LLGPL consists... | null | https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/library/ppc-linux-syscalls.lisp | lisp | Package : CCL -*-
file "LICENSE". The LLGPL consists of a preamble and the LGPL,
conflict, the preamble takes precedence.
Clozure CL is referenced in the preamble as the "LIBRARY."
The LLGPL is also available online at
| Copyright ( C ) 2001 - 2009 Clozure Associates
This file is part of Clozure CL .
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure CL as the
which is distributed with Clozure CL as the file " LGPL " . Where these
(in-p... |
b0171c2d87463f5a826d523dcf123cdd13682da4913ca8a5c8cd5e60c449e462 | emilaxelsson/ag-graph | Internal.hs | # LANGUAGE ImplicitParams #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE TypeOperators #-}
--------------------------------------------------------------------------------
-- |
-- Module : PAG.Internal
Copyright : ( c ) 2014 ,
-- License : ... | null | https://raw.githubusercontent.com/emilaxelsson/ag-graph/50fb1ebb819e1ed0bd3b97e8a9f82bb9310e782f/src/PAG/Internal.hs | haskell | # LANGUAGE Rank2Types #
# LANGUAGE TypeOperators #
------------------------------------------------------------------------------
|
Module : PAG.Internal
License : BSD3
Stability : experimental
This module defines the types for parametric attribute grammars
along with some utilit... | # LANGUAGE ImplicitParams #
# LANGUAGE MultiParamTypeClasses #
Copyright : ( c ) 2014 ,
Maintainer : < >
Portability : non - portable ( GHC Extensions )
module PAG.Internal
( module PAG.Internal
, module I
) where
import Mapping
import Tree
import PAG.Projection
import ... |
d3e6253736bd580024b965a4c55c43bba9b7f38f9ef90cdc1483f82adb854fcc | tonyday567/chart-unit | gallery.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE MonoLocalBinds #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeApplications #
# LANGUAGE RebindableSyntax #
# OPTIONS_GHC -Wall #
import Chart
import Lens.Micro
import Control.Monad.Primitive (PrimState)
import Data.List ((!!), head, zipWith3)
import Data.Ti... | null | https://raw.githubusercontent.com/tonyday567/chart-unit/5c0aefee55383b7f2dc3d0745dc92f0bd9b0f24a/chart-unit-examples/examples/gallery.hs | haskell | # LANGUAGE RankNTypes #
* example data generation
This generates n V2 random variates where the x and y parts are correlated.
* a grid
* dealing with time
* scatter chart
* haskell survey example
* comparing histograms
* clipping
| chop a chart extent into a double list of Rects
* schoolbook | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE MonoLocalBinds #
# LANGUAGE TypeApplications #
# LANGUAGE RebindableSyntax #
# OPTIONS_GHC -Wall #
import Chart
import Lens.Micro
import Control.Monad.Primitive (PrimState)
import Data.List ((!!), head, zipWith3)
import Data.Time
import Data.Time.Calendar... |
f0eb6877fc8a6113e3786ea7eb4eb13a6aa096c427a612a20785166a513827ed | masaomi-yamaguchi/synbit | GenExp.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
-- {-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
{-# OPTIONS_GHC -Wunused-imports #-}
module Synthesis.GenExp where
import Control.Applicative (Alternative((<|>), empty))
import Control.Monad (guard, ... | null | https://raw.githubusercontent.com/masaomi-yamaguchi/synbit/4553ae090dfcda4965a16b09130c1d6874b5a849/src/Synthesis/GenExp.hs | haskell | {-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
# OPTIONS_GHC -Wunused-imports #
import Debug.Trace
, cased :: m (List m (MExp m))
strEnv_
cased_
, cased = cased_
test
genExpTest3
:: TP.TyEnv -> TP.Synonyms -> DataEnv -> UniqSupply -> T.Ty -> IO [P.Exp]
genExpTest3 tyenv syn denv ref ty = do
putStr... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
module Synthesis.GenExp where
import Control.Applicative (Alternative((<|>), empty))
import Control.Monad (guard, MonadPlus(mzero))
import Control.Monad.Fail (MonadFail)
import Cont... |
d7cee17542b5d7c2bfcffcbc7e77ef568273b86fc6c71acf00ffe058f390a3bb | UBTECH-Walker/WalkerSimulationFor2020WAIC | _package_SetUwbAnchor.lisp | (cl:in-package cruiser_msgs-srv)
(cl:export '(ANCHOR-VAL
ANCHOR
SUCCESS-VAL
SUCCESS
)) | null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_16.04_v1.2_20200616/walker_install/share/common-lisp/ros/cruiser_msgs/srv/_package_SetUwbAnchor.lisp | lisp | (cl:in-package cruiser_msgs-srv)
(cl:export '(ANCHOR-VAL
ANCHOR
SUCCESS-VAL
SUCCESS
)) | |
2031af2da21258c8cf7a3a230a78e471a6f21a0285fac9da113529eeee0ed4ae | liarokapisv/danac | SourceSpan.hs | # LANGUAGE DeriveFunctor #
module Danac.Util.SourceSpan where
import Text.Megaparsec.Pos
data SourceSpan = SS SourcePos SourcePos
instance Show SourceSpan where
show (SS (SourcePos {sourceLine = ll, sourceColumn = lc}) (SourcePos {sourceLine = rl, sourceColumn = rc})) =
show (unPos ll) <> ":" <> show (... | null | https://raw.githubusercontent.com/liarokapisv/danac/662408790ea1bd18ef2462dce45b947e3b8efa74/src/Danac/Util/SourceSpan.hs | haskell | # LANGUAGE DeriveFunctor #
module Danac.Util.SourceSpan where
import Text.Megaparsec.Pos
data SourceSpan = SS SourcePos SourcePos
instance Show SourceSpan where
show (SS (SourcePos {sourceLine = ll, sourceColumn = lc}) (SourcePos {sourceLine = rl, sourceColumn = rc})) =
show (unPos ll) <> ":" <> show (... | |
4a9ea43fc120332b71c0c9a1d54b3b31dfad0534f0b2877446cbc6edae93afd4 | gasin/OCallo | command.ml | open Color
type wl = Win | Lose | Tie
type move = Mv of int * int | Pass | GiveUp
let string_of_move = function
| Pass -> "PASS"
| GiveUp -> "GIVEUP"
| Mv (i,j) ->
let open Bytes in
let ci = char_of_int (i + int_of_char 'A' - 1) in
let cj = char_of_int (j + int_of_char '1' - 1) in
let ... | null | https://raw.githubusercontent.com/gasin/OCallo/baba23488c8492fe7532ed4cd265a7277d6c1d2c/command.ml | ocaml | player name
result, your stones, opponent's stones, reason
color, oppnent's name, assinged time (in ms)
updated assigned time (in ms) | open Color
type wl = Win | Lose | Tie
type move = Mv of int * int | Pass | GiveUp
let string_of_move = function
| Pass -> "PASS"
| GiveUp -> "GIVEUP"
| Mv (i,j) ->
let open Bytes in
let ci = char_of_int (i + int_of_char 'A' - 1) in
let cj = char_of_int (j + int_of_char '1' - 1) in
let ... |
f9a80423ebb4c6466047a96b88b3fefab6ad7cd0537ff616b533660747c90abb | bcc32/projecteuler-ocaml | sol_323.ml | open! Core
open! Import
let word_size = 32
probability of transitioning from [ a ] 1 bits to [ b ] 1 bits
let p_transition a b =
assert (a <= b);
assert (a < 32);
assert (b <= 32);
let zero_bits = word_size - a in
let diff = b - a in
float (Number_theory.Int.binomial zero_bits diff) /. (2. ** float zero... | null | https://raw.githubusercontent.com/bcc32/projecteuler-ocaml/712f85902c70adc1ec13dcbbee456c8bfa8450b2/sol/sol_323.ml | ocaml | 0.166ms | open! Core
open! Import
let word_size = 32
probability of transitioning from [ a ] 1 bits to [ b ] 1 bits
let p_transition a b =
assert (a <= b);
assert (a < 32);
assert (b <= 32);
let zero_bits = word_size - a in
let diff = b - a in
float (Number_theory.Int.binomial zero_bits diff) /. (2. ** float zero... |
8622777fd9bb8b0458c9f80dc499f726432e77d53bd79f71d9c51705868aa97e | Elzair/nazghul | road.scm | ;;----------------------------------------------------------------------------
;; unused - takes 1.5s to load for some strange reason
;;----------------------------------------------------------------------------
;; The 'init signal is sent after the instance is created. This is our chance
to initialize fields to n... | null | https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.001/road.scm | scheme | ----------------------------------------------------------------------------
unused - takes 1.5s to load for some strange reason
----------------------------------------------------------------------------
The 'init signal is sent after the instance is created. This is our chance
defined in game.scm.
Define the int... |
to initialize fields to non - default values . Note : all the pclass values are
(define (road-init kroad)
(kern-obj-set-pclass kroad pclass-road))
(define road-ifc
(ifc '()
(method 'init road-init)))
(define road-sections
(list
(list 'TF_road_3x3_nw s_trail_0)
(list 'TF_road_3x3_n s_trail_1)... |
273fedccfab9059c36d12ee0253f98dd3380b103a434fff74fb3b630a9e9059b | egri-nagy/kigen | psubsgps.clj | (use '[kigen.multab :as multab])
(use '[kigen.transf :as t])
(use '[taoensso.timbre :as timbre])
(def mtS
(multab/multab (t/sgp-by-gens (t/pts-gens 3))
t/mul))
(timbre/merge-config! {:level :info})
(defn psubsgps-timing [mt task-size]
(println "Task size: " task-size)
(binding [orbit.extensi... | null | https://raw.githubusercontent.com/egri-nagy/kigen/5248499fab9d8af05d7d0b07626d0676dfe580c9/experiments/REDUCERS/psubsgps.clj | clojure | (use '[kigen.multab :as multab])
(use '[kigen.transf :as t])
(use '[taoensso.timbre :as timbre])
(def mtS
(multab/multab (t/sgp-by-gens (t/pts-gens 3))
t/mul))
(timbre/merge-config! {:level :info})
(defn psubsgps-timing [mt task-size]
(println "Task size: " task-size)
(binding [orbit.extensi... | |
b0d98986879fb1750ee52d9fa1285bf9efa7522d6bff5112b318a4587ea52cf1 | nitrogen/simple_bridge | sbw.erl | % vim: ts=4 sw=4 et
% Simple Bridge
Copyright ( c ) 2008 - 2010
Copyright ( c ) 2013
See MIT - LICENSE for licensing information .
-module (sbw).
-include("simple_bridge.hrl").
%% REQUEST BRIDGE EXPORTS
-export([
new/2,
set_multipart/3,
set_error/2,
cache_post_params/1,
protocol/1,
h... | null | https://raw.githubusercontent.com/nitrogen/simple_bridge/0b33e15759b23050c151912374a68e18f2a3b83d/src/sbw.erl | erlang | vim: ts=4 sw=4 et
Simple Bridge
REQUEST BRIDGE EXPORTS
RESPONSE BRIDGE EXPORTS
retained for backwards compatibility
REQUEST WRAPPERS
We don't cache the Post params here because the multipart parser might
PRECACHING HEADERS, POST PARAMS AND QUERY PARAMS
So we don't have to convert to and from binary/lists/atom ... | Copyright ( c ) 2008 - 2010
Copyright ( c ) 2013
See MIT - LICENSE for licensing information .
-module (sbw).
-include("simple_bridge.hrl").
-export([
new/2,
set_multipart/3,
set_error/2,
cache_post_params/1,
protocol/1,
host/1,
path/1,
uri/1,
peer_ip/1,
peer_port/1,
... |
98beef0441b1c5cb19c7896bcbd737af2778f0b01769ac9d7ae7c712a5b9cc08 | alanzplus/EOPL | parenthec.rkt | #lang racket
(module help racket
(provide pc-err
**pc-func-name-table**
pc-add-func-name!
pc-func-name-exists?
pc-error-check:define-label
**pc-union-type-table**
pc-add-union-type!
pc-union-type-exists?
pc-check-set-of-vars
... | null | https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/Indiana-CS311/a9-ParentheC.Interpreter/parenthec.rkt | racket | Table needed for define-label
Table needed for define-union
*************************************************************************************
*************************************************************************************
Syntax: define-label,
mount-trampoline,
dismount-trampoline,
... | #lang racket
(module help racket
(provide pc-err
**pc-func-name-table**
pc-add-func-name!
pc-func-name-exists?
pc-error-check:define-label
**pc-union-type-table**
pc-add-union-type!
pc-union-type-exists?
pc-check-set-of-vars
... |
abfb0470f7f324083e740768578786b5183db4280840104e0d4a04b50cd659f8 | 5outh/textlunky | Show.hs | # LANGUAGE TemplateHaskell #
module Control.Process.Show(
showP,
putStrLnP
) where
import Types
import Control.Process.Class
import Control.Monad.Trans
import Control.Monad.Trans.State
import Control.Lens
import Control.Monad
import Control.Monad.Trans.Free
import qualified Data.Map as M
makeLenses ''GameState
m... | null | https://raw.githubusercontent.com/5outh/textlunky/8dd4d975ed86b761262e3026dd4c22a36b532104/src/Control/Process/Show.hs | haskell | | Print a string with a prompt token prefix
process handling showing user commands
TODO: Make sure we can actually pick up the things we're picking up...
stuff in the current room
| TODO: Can place bomb "near the middle wall" right now...
still need to validate if Gold Chest is even in the room. | # LANGUAGE TemplateHaskell #
module Control.Process.Show(
showP,
putStrLnP
) where
import Types
import Control.Process.Class
import Control.Monad.Trans
import Control.Monad.Trans.State
import Control.Lens
import Control.Monad
import Control.Monad.Trans.Free
import qualified Data.Map as M
makeLenses ''GameState
m... |
0043e7e373b08f4a9ecc2ca752e7e4f77937bf169e150a7ecc8e42bb16fce091 | abcdw/rde | install.scm | (define-module (rde system install)
#:use-module (gnu)
#:use-module (gnu system)
#:use-module (gnu system install)
#:use-module (rde features)
#:use-module (rde features system)
#:use-module (rde features base)
#:export (guix-with-substitute-mirror
live-os))
(define guix-with-substitute-mirro... | null | https://raw.githubusercontent.com/abcdw/rde/5b8605f421d0b8a9569e43cb6f7e651e7a8f7218/src/rde/system/install.scm | scheme | user-preferences | (define-module (rde system install)
#:use-module (gnu)
#:use-module (gnu system)
#:use-module (gnu system install)
#:use-module (rde features)
#:use-module (rde features system)
#:use-module (rde features base)
#:export (guix-with-substitute-mirror
live-os))
(define guix-with-substitute-mirro... |
e88b653b63e7caa7f12d78bf9b9fd054de5927779b500d92973b3d2919eeb484 | quil-lang/quilc | chip-cache.lisp | ;;;; chip-cache.lisp
;;;;
;;;; Chip caching for faster compilation requests
;;;;
Author :
;;;;
(in-package #:quilc)
(defclass cached-chip ()
((last-accessed
:initarg :last-accessed
:type real
:accessor cached-chip-last-accessed)
(chip
:initarg :chip
:type chip-specification
:accessor ... | null | https://raw.githubusercontent.com/quil-lang/quilc/6c9d20892cfc71d8814af0526b78b8215365b512/app/src/chip-cache.lisp | lisp | chip-cache.lisp
Chip caching for faster compilation requests
| Author :
(in-package #:quilc)
(defclass cached-chip ()
((last-accessed
:initarg :last-accessed
:type real
:accessor cached-chip-last-accessed)
(chip
:initarg :chip
:type chip-specification
:accessor cached-chip-chip)
(addresser-state
:initarg :addresser-state
:type cl-quil:... |
436bc9cbaf29c58c1f55eff0c3a96cb045cf74c063dd51acfeff08c4db6b8064 | comby-tools/comby | rewrite.mli | open Match
* if [ fresh ] is set , then substitute the pattern : [ i d ( ) ] starting at 1 , and
incrementing subsequent IDs . If [ fresh ] is unset , then by default substitute
the pattern : [ i d ( ) ] starting at 1 , and increment for each occurence of
: [ i d ( ) ] , left to right .
increment... | null | https://raw.githubusercontent.com/comby-tools/comby/22b732fbe734364cdd7498eb7b36b3d6f45031fe/lib/kernel/matchers/rewrite.mli | ocaml | * substitute returns the result of substituting env in template
* if [source] is given, substitute in-place. If not,
emit result separated by newlines | open Match
* if [ fresh ] is set , then substitute the pattern : [ i d ( ) ] starting at 1 , and
incrementing subsequent IDs . If [ fresh ] is unset , then by default substitute
the pattern : [ i d ( ) ] starting at 1 , and increment for each occurence of
: [ i d ( ) ] , left to right .
increment... |
b02970d642398eaabda0bbbdd810688e6eecef4ac44e46ff28d1e8032ad8227f | seth/pooler | fake_metrics.erl | %% @doc This stub module mimics part of folsom's API. It allows us to
%% test the metrics instrumentation of pooler without introducing a
%% dependency on folsom or another metrics application.
%%
-module(fake_metrics).
-behaviour(gen_server).
-define(SERVER, ?MODULE).
-include_lib("eunit/include/eunit.hrl").
%% -----... | null | https://raw.githubusercontent.com/seth/pooler/9c28fb479f9329e2a1644565a632bc222780f1b7/test/fake_metrics.erl | erlang | @doc This stub module mimics part of folsom's API. It allows us to
test the metrics instrumentation of pooler without introducing a
dependency on folsom or another metrics application.
------------------------------------------------------------------
API Function Exports
----------------------------------------... | -module(fake_metrics).
-behaviour(gen_server).
-define(SERVER, ?MODULE).
-include_lib("eunit/include/eunit.hrl").
-export([start_link/0,
notify/3,
get_metrics/0,
reset_metrics/0,
stop/0
]).
gen_server Function Exports
-export([init/1, handle_call/3, handle_cast/2, handl... |
c38f391541aee1f7db3bde6e839291bb985ebea526af03243c2d5b8710a4d5bf | commsor/titanoboa | rmq_join_test.clj | Copyright ( c ) Commsor Inc. All rights reserved .
; The use and distribution terms for this software are covered by the
; GNU Affero General Public License v3.0 (/#AGPL)
; which can be found in the LICENSE at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; th... | null | https://raw.githubusercontent.com/commsor/titanoboa/ffe3e1e58f89169092d7b6a3a45e1707a0ecc9ee/test/rmq_join_test.clj | clojure | The use and distribution terms for this software are covered by the
GNU Affero General Public License v3.0 (/#AGPL)
which can be found in the LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice,... | Copyright ( c ) Commsor Inc. All rights reserved .
(ns rmq-join-test
(:use clojure.test)
(:require [titanoboa.exp :as exp]
[titanoboa.system.local]))
(def steps (atom []))
(defn fib-nth
([n id]
(if (< n 2)
(swap! steps conj {:id (str "Fib " n " " id)
:type :custom
... |
ac7cfc7871bf04f8eb8b33dcfbb5724188e56c40b86d277e4e4c18d4b523ad76 | junjihashimoto/sixel | Main.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
import Graphics.Vega.VegaLite
import qualified Data.Text as T
import qualified Data.Text.Lazy as LT
import Data.Aeson.Text (encodeToLazyText)
import Data.Aeson (encodeFile)
import Data.String (fromString)
import Data.Sixel
import Data.OSC1337
import Codec.Pict... | null | https://raw.githubusercontent.com/junjihashimoto/sixel/da9c1dbc08820e49ff7570c16d5051b9cab4f6fb/examples/hvega/Main.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE LambdaCase #
import Graphics.Vega.VegaLite
import qualified Data.Text as T
import qualified Data.Text.Lazy as LT
import Data.Aeson.Text (encodeToLazyText)
import Data.Aeson (encodeFile)
import Data.String (fromString)
import Data.Sixel
import Data.OSC1337
import Codec.Picture
import System.IO.Temp (withSyst... |
598b7bdc3327f49ce4ebb99df6b694b55f06b22c8fab6e2e1c92ce4694b8736d | jayrbolton/coursework | Subset.hs | {-# LANGUAGE EmptyDataDecls
, ExistentialQuantification
, ScopedTypeVariables
, NoMonomorphismRestriction
#-}
module MAlonzo.Data.Fin.Subset where
import qualified Unsafe.Coerce
import qualified MAlonzo.Data.Fin
import qualified MAlonzo.Data.Nat
import qualified MAlonzo.Data.Product
i... | null | https://raw.githubusercontent.com/jayrbolton/coursework/f0da276527d42a6751fb8d29c76de35ce358fe65/computability_and_formal_languages/project__/agda/MAlonzo/Data/Fin/Subset.hs | haskell | # LANGUAGE EmptyDataDecls
, ExistentialQuantification
, ScopedTypeVariables
, NoMonomorphismRestriction
# | module MAlonzo.Data.Fin.Subset where
import qualified Unsafe.Coerce
import qualified MAlonzo.Data.Fin
import qualified MAlonzo.Data.Nat
import qualified MAlonzo.Data.Product
import qualified MAlonzo.Data.Vec
import qualified MAlonzo.Relation.Binary.PropositionalEquality
import qualified MAlonzo.Relation.Nullary
import ... |
bf34ae9643b2dc40abd22bc1443249baa3186987a8b7dc47d5fa917adfb762b9 | nickzuber/lets-make-a-compiler | assembler.ml | open Ast
open Polyfill
type items = string list
(* All the vectors to write in the assembly. *)
let vectors : ((string, items) Hashtbl.t) = Hashtbl.create 53
(* All the top level functions to write. *)
let defines : ((string, define) Hashtbl.t) = Hashtbl.create 53
(* Holds the actual assembly definitions. *)
let fun... | null | https://raw.githubusercontent.com/nickzuber/lets-make-a-compiler/ee2337b116f07c1357f7b70bd09f1503e39fdc88/utils/assembler.ml | ocaml | All the vectors to write in the assembly.
All the top level functions to write.
Holds the actual assembly definitions.
let defines_strings = Hashtbl.fold (fun k v acc -> acc ^ (create_define_assembly k v)) defines "" in | open Ast
open Polyfill
type items = string list
let vectors : ((string, items) Hashtbl.t) = Hashtbl.create 53
let defines : ((string, define) Hashtbl.t) = Hashtbl.create 53
let function_definitions : ((string, string) Hashtbl.t) = Hashtbl.create 53
let create_vector_assembly (name : string) (items : string list) =
... |
01748633a840f2bd43b3684b0e3372d9d0d58236faae5d9c89f782897b7faa44 | yitzchak/common-lisp-jupyter | style.lisp | (in-package #:jupyter/widgets)
(defwidget style (widget)
()
(:default-initargs :%model-module +controls-module+
:%model-module-version +controls-module-version+
:%view-name "StyleView"
:%view-module +base-module+
:%view-module-version +base-module-version+))
(defwidget background-style... | null | https://raw.githubusercontent.com/yitzchak/common-lisp-jupyter/7c9e0cccda6848b854a7e8d292307645f0eaae3d/src/widgets/style.lisp | lisp | (in-package #:jupyter/widgets)
(defwidget style (widget)
()
(:default-initargs :%model-module +controls-module+
:%model-module-version +controls-module-version+
:%view-name "StyleView"
:%view-module +base-module+
:%view-module-version +base-module-version+))
(defwidget background-style... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.