_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 |
|---|---|---|---|---|---|---|---|---|
65961d59c2d6daabdb3a4ed1a4011fd966426a67b32ea22fbd81e158949ba972 | CloudI/cloudi_core | cloudi_core_i_services_internal_init.erl | -*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*-
ex : set utf-8 sts=4 ts=4 sw=4 et nomod :
%%%
%%%------------------------------------------------------------------------
%%% @doc
= = CloudI Internal Service Init Process==
A separate Erlang process that exists as ... | null | https://raw.githubusercontent.com/CloudI/cloudi_core/1b6c6d2aeb3565a7fd2265185a892b20b8aeccec/src/cloudi_core_i_services_internal_init.erl | erlang |
------------------------------------------------------------------------
@doc
Dispatcher process while still allowing the internal service init function
@end
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
the r... | -*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*-
ex : set utf-8 sts=4 ts=4 sw=4 et nomod :
= = CloudI Internal Service Init Process==
A separate Erlang process that exists as a Dispatcher proxy . Using this
Erlang process as a type of bootstrap process prevent... |
11bf93c2e2a9d260e8728e6d48fc10af01486aa0c3ab2faeb44e3db8eab26855 | haroldcarr/learn-haskell-coq-ml-etc | Part4.hs | module Part4 where
-to-singletons-4.html
Introduction to Singletons ( Part 4 )
Monday October 22 , 2018
functional programming at the type level .
GHC 8.6.1
nightly-2018 - 09 - 29 ( singletons-2.5 )
Review
View full source
$ ( singletons [ d|
data DoorState = Opened | Closed | Locked
... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/344eedbe0e9625bd6a43619ab9c60b3aaa817443/haskell/topic/type-level/2017-12-2018-10-justin-le-intro-to-singletons-parts-1-4/src/Part4.hs | haskell | Alternatively , taking advantage of the derived instance :
^ end of the hallway , a stretch with no
doors
^ A door connected to a hallway is a new
hallway , and we track the door 's state
in the list of hallway door states
^ the identity of mergeState
^ the identity of mergeState
also generat... | module Part4 where
-to-singletons-4.html
Introduction to Singletons ( Part 4 )
Monday October 22 , 2018
functional programming at the type level .
GHC 8.6.1
nightly-2018 - 09 - 29 ( singletons-2.5 )
Review
View full source
$ ( singletons [ d|
data DoorState = Opened | Closed | Locked
... |
d27614716437eb1837588e280874f40c843ff322c62760d543bb27ba7c7cd7c6 | ghc/packages-dph | Vectorised.hs | -- Vectorised "all closest pairs":
-- This was
{-# LANGUAGE ParallelArrays #-}
{-# OPTIONS -fvectorise #-}
{-# OPTIONS -fno-spec-constr-count #-}
module Vectorised (closestPA, closeststupidPA) where
import Points2D.Types
import Data.Array.Parallel
import Data.Array.Parallel.Prelude.Double as D
import qualified ... | null | https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-examples/examples/spectral/ClosestPairs/dph/Vectorised.hs | haskell | Vectorised "all closest pairs":
This was
# LANGUAGE ParallelArrays #
# OPTIONS -fvectorise #
# OPTIONS -fno-spec-constr-count #
------- dph-lifted-copy implementations
These functions are in -copy but not in -vseg.
I've tried to implement them but got a vectorisation error:
"Can't vectorise expression GHC.Prim.In... |
module Vectorised (closestPA, closeststupidPA) where
import Points2D.Types
import Data.Array.Parallel
import Data.Array.Parallel.Prelude.Double as D
import qualified Data.Array.Parallel.Prelude.Int as I
import qualified Prelude as P
bpermuteP :: [:a:] -> [:Int:] -> [:a:]
bpermuteP as is = mapP (\i -> as !: i) ... |
8c3ab47f5241cb15d81d06b2ffa8f9d04ccf33bb702d1147c13b8ab6f23d6866 | justinethier/nugget | cmd-line-husk.scm | #! /usr/bin/env huski
;
This is the example code from SRFI-22
; -22/srfi-22.html
;
; A clone of the UNIX cat command, written in scheme.
; To run from the command line:
;
; ./cat.scm filename
;
(define (main arguments)
(for-each display-file (cdr arguments))
0)
(define (display-file filename)
(call-with-inp... | null | https://raw.githubusercontent.com/justinethier/nugget/0c4e3e9944684ea83191671d58b5c8c342f64343/cyclone/examples/cmd-line-husk.scm | scheme |
-22/srfi-22.html
A clone of the UNIX cat command, written in scheme.
To run from the command line:
./cat.scm filename
| #! /usr/bin/env huski
This is the example code from SRFI-22
(define (main arguments)
(for-each display-file (cdr arguments))
0)
(define (display-file filename)
(call-with-input-file filename
(lambda (port)
(let loop ()
(let ((thing (read-char port)))
(if (not (eof-object? thing))
... |
3987ed24faa37d54436282d1a3d3185a801b574bf3b0345e1d9b4f399bd62488 | BekaValentine/SimpleFP-v2 | Program.hs | {-# OPTIONS -Wall #-}
-- | This module defines what it means to be a program in the dependently
-- typed lambda calculus.
module Modular.Core.Program where
import Utils.Plicity
import Utils.Pretty
import Modular.Core.ConSig
import Modular.Core.DeclArg
import Modular.Core.Term
import Data.List (intercalate)
... | null | https://raw.githubusercontent.com/BekaValentine/SimpleFP-v2/ae00ec809caefcd13664395b0ae2fc66145f6a74/src/Modular/Core/Program.hs | haskell | # OPTIONS -Wall #
| This module defines what it means to be a program in the dependently
typed lambda calculus.
| A term can be declared either with a simple equality, as in
> let not : Bool -> Bool
> = \b -> case b of
> | True -> False
> | False -> True
> end
> end
or with a... |
module Modular.Core.Program where
import Utils.Plicity
import Utils.Pretty
import Modular.Core.ConSig
import Modular.Core.DeclArg
import Modular.Core.Term
import Data.List (intercalate)
| A ' Statement ' is either a ' TypeDeclaration ' or a ' TermDeclaration ' .
data Statement
= TyDecl TypeDeclara... |
cc9c1fc7f13b38e47437e41c6dfa9d06fc460064828ae21228683f326845df71 | hopbit/sonic-pi-snippets | mel_list.sps | # key: mel list
# point_line: 0
# point_index: 0
# --
# cdur - gama C Dur
# cj - coco jumbo
# nem - nothing else matters
# scom - sweet child o' mine
# soy - shape of you
# * rfiy - river flows in you
| null | https://raw.githubusercontent.com/hopbit/sonic-pi-snippets/2232854ac9587fc2f9f684ba04d7476e2dbaa288/melodies/mel_list.sps | scheme | # key: mel list
# point_line: 0
# point_index: 0
# --
# cdur - gama C Dur
# cj - coco jumbo
# nem - nothing else matters
# scom - sweet child o' mine
# soy - shape of you
# * rfiy - river flows in you
| |
845f52a495b85a78bb1287350d487262414fdc5ff77e874cff8f5eedab05d078 | vascokk/rivus_cep | event4.erl | -module(event4).
-behaviour(event_behaviour).
-export([get_param_by_name/2, get_param_names/0]).
get_param_by_name(Event, ParamName) ->
case ParamName of
name -> element(1, Event);
attr1 -> element(2, Event);
attr2 -> element(3, Event);
qttr3 -> element(4, Event);
attr4 -> element(5, Event)
end... | null | https://raw.githubusercontent.com/vascokk/rivus_cep/e9fe6ed79201d852065f7fb2a24a880414031d27/test/event4.erl | erlang | -module(event4).
-behaviour(event_behaviour).
-export([get_param_by_name/2, get_param_names/0]).
get_param_by_name(Event, ParamName) ->
case ParamName of
name -> element(1, Event);
attr1 -> element(2, Event);
attr2 -> element(3, Event);
qttr3 -> element(4, Event);
attr4 -> element(5, Event)
end... | |
5ca0335a8e2ed3e309a8672ea62bf95cec684557537f4371e179e0488871e22e | burtonsamograd/med | redisplay.lisp | (in-package :med)
(defun redraw-screen ()
"Redraw the whole screen. For use when the display is corrupted."
;; Flush the current screen and line cache.
(setf (editor-current-screen *editor*) nil
(display-line-cache *editor*) '()))
(defun pane-top-line (buffer)
(let ((top-line (buffer-property buffer '... | null | https://raw.githubusercontent.com/burtonsamograd/med/667c45032f60831447ad0eafd4d5c9a9748b4366/redisplay.lisp | lisp | Flush the current screen and line cache.
Lines are currently fixed-height.
Same line.
Invert the point.
Underline the region.
(when in-region
(if at-point
background
f... | (in-package :med)
(defun redraw-screen ()
"Redraw the whole screen. For use when the display is corrupted."
(setf (editor-current-screen *editor*) nil
(display-line-cache *editor*) '()))
(defun pane-top-line (buffer)
(let ((top-line (buffer-property buffer 'pane-top-line)))
(when (not top-line)
... |
e9d01a02e36a401bae02704628aa7ac68eacf491b862daff0814505f62ab1a19 | wireapp/wire-server | Scope.hs | {-# LANGUAGE StrictData #-}
-- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , ei... | null | https://raw.githubusercontent.com/wireapp/wire-server/97286de4e9745b89e0146c0cb556b1f90e660133/services/galley/src/Galley/Data/Scope.hs | haskell | # LANGUAGE StrictData #
This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY... |
Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module Galley.Data.Scope where
... |
d3078ee94caff3c36e62e8fe72dafe0cbd06e8fc4c1116d45a79ae084024e100 | dinosaure/prettym | enclosure.ml | [@@@warning "-32"]
module type V = sig
type t
val pp : t Fmt.t
val sentinel : t
val weight : t -> int
val merge : t -> t -> t option
end
module RBQ (V : V) = struct
module Queue = Ke.Fke.Weighted
type t = {
a : V.t array;
c : int;
m : int;
q : (int, Bigarray.int_elt) Queue.t;
}
XXX... | null | https://raw.githubusercontent.com/dinosaure/prettym/8b0832d7fa70c918ae5660dbc20f9e5ff53a07f6/lib/enclosure.ml | ocaml | [@@@warning "-32"]
module type V = sig
type t
val pp : t Fmt.t
val sentinel : t
val weight : t -> int
val merge : t -> t -> t option
end
module RBQ (V : V) = struct
module Queue = Ke.Fke.Weighted
type t = {
a : V.t array;
c : int;
m : int;
q : (int, Bigarray.int_elt) Queue.t;
}
XXX... | |
cdf7611fd9f0c5b61ecc018c1e2836e875691c76f5e4ca5f92d1453b675a4571 | DaiF1/Oditor | display.ml |
file : display.ml
dependencies : editor.ml colors.ml
Editor display functions
file: display.ml
dependencies: editor.ml colors.ml
Editor display functions
*)
open Editor;;
open Colors;;
(* Draw text on editor, tildes if buffer empty *)
let draw_rows () =
(* Oditor text description. ... | null | https://raw.githubusercontent.com/DaiF1/Oditor/9f49ce05281f3253c166475b21c282a1e36c99f7/editor/display.ml | ocaml | Draw text on editor, tildes if buffer empty
Oditor text description. Visible only with empty buffer
Oditor version text. Visible only with empty buffer
Bottom status bar string
Current file name
Editor mode
Current lign and completion
the '+11' is to nullify the escape codes for formatting text
Cut lig... |
file : display.ml
dependencies : editor.ml colors.ml
Editor display functions
file: display.ml
dependencies: editor.ml colors.ml
Editor display functions
*)
open Editor;;
open Colors;;
let draw_rows () =
let welcome_text =
let text = "Oditor -- An editor for OCaml, in OCaml... |
ab3053e12e72a86c0f5f1465ec23564aeb50c2df6935432285a779e0d7854b6b | heroku/logplex | tcp_proxy_sup.erl | Copyright ( c ) 2011 < >
%%
%% Permission is hereby granted, free of charge, to any person
%% obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
%% restriction, including without limitation the rights to use,
%% copy, modify, merge, publish... | null | https://raw.githubusercontent.com/heroku/logplex/fc520c44cf4687726d5d51464d3264ddc6abb0ba/src/tcp_proxy_sup.erl | erlang |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
Software is furnished to do so, subject to the following
condit... | Copyright ( c ) 2011 < >
files ( the " Software " ) , to deal in the Software without
copies of the Software , and to permit persons to whom the
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
-module(tcp_proxy_sup).
-beha... |
37d9649a900da6891231ff15a22455dcb344b294ac53deb95587e10515db65bb | aharisu/vise | vim-function.scm | '(
abs
append
argv
atan2
bufexists
bufname
byte2line
ceil
cindent
complete
confirm
cosh
cursor
did_filetype
empty
eventhandler
exp
extend
filewritable
findfile
fmod
foldclosed
foldtext
function
getbufline
getcharmod
getcmdtype
getfperm
getftype
getmatches
getqflist
gettabvar
getwinposy
globpath
haslocaldir
histdel
hlex... | null | https://raw.githubusercontent.com/aharisu/vise/6d0f54b0fe28e7d2c3b2b91cb3ef5ff847a11484/autoload/vgen/vim-function.scm | scheme | '(
abs
append
argv
atan2
bufexists
bufname
byte2line
ceil
cindent
complete
confirm
cosh
cursor
did_filetype
empty
eventhandler
exp
extend
filewritable
findfile
fmod
foldclosed
foldtext
function
getbufline
getcharmod
getcmdtype
getfperm
getftype
getmatches
getqflist
gettabvar
getwinposy
globpath
haslocaldir
histdel
hlex... | |
51e7883ad754fb3f5eb5ed4c935ffc3e28981552d89495ab77b41a867382ad80 | YoungTurks/hackerdict | auth.clj | (ns hackerdict.rest.auth
(:require [compojure.core :refer [defroutes GET]]
[hackerdict.helpers.auth :as auth]
[hackerdict.helpers.user :as user-helper]
[hackerdict.util.rest :as rest]))
(defroutes auth-routes
(GET "/login" {session :session}
(if-let [token (:token session)]
... | null | https://raw.githubusercontent.com/YoungTurks/hackerdict/44e5c285b3195718c4d5bc9cb4423623f22d3da3/src/hackerdict/rest/auth.clj | clojure | (ns hackerdict.rest.auth
(:require [compojure.core :refer [defroutes GET]]
[hackerdict.helpers.auth :as auth]
[hackerdict.helpers.user :as user-helper]
[hackerdict.util.rest :as rest]))
(defroutes auth-routes
(GET "/login" {session :session}
(if-let [token (:token session)]
... | |
95f2c65e8d7d37176c59bf82b494ea1a533a3c620b76caf4d98cb6d364ef5557 | liquidz/misaki | _config.clj | {
;; directory setting
:public-dir "public/"
:template-dir "template/"
;; clojurescript compile options
;; src-dir base is `:template-dir`
;; output-dir base is `:public-dir`
:cljs {:optimizations :advanced}
:compiler ["cljs"]
}
| null | https://raw.githubusercontent.com/liquidz/misaki/b8104e632058e3b3da4487513d10e666e5914ec9/test/files/compiler/cljs/core/_config.clj | clojure | directory setting
clojurescript compile options
src-dir base is `:template-dir`
output-dir base is `:public-dir` | {
:public-dir "public/"
:template-dir "template/"
:cljs {:optimizations :advanced}
:compiler ["cljs"]
}
|
146ec57e02e3c7af083e4632e29d34c0f7295c2c3102308ac7dc88f14a41b6fa | baskeboler/cljs-karaoke-client | subs.cljs | (ns cljs-karaoke.editor.subs
(:require [re-frame.core :as rf]
[clojure.string :as cstr]
[cljs-karaoke.protocols :as p]
[cljs-karaoke.subs.audio :as audio-subs]))
(rf/reg-sub
::editor-state
(fn [db _]
(:editor-state db)))
(rf/reg-sub
::current-frame
:<- [::editor-state]
(fn... | null | https://raw.githubusercontent.com/baskeboler/cljs-karaoke-client/bb6512435eaa436d35034886be99213625847ee0/src/main/cljs_karaoke/editor/subs.cljs | clojure | (rf/reg-sub
::frame-count
:<- [::frames]
(fn [frames _]
(count frames))) | (ns cljs-karaoke.editor.subs
(:require [re-frame.core :as rf]
[clojure.string :as cstr]
[cljs-karaoke.protocols :as p]
[cljs-karaoke.subs.audio :as audio-subs]))
(rf/reg-sub
::editor-state
(fn [db _]
(:editor-state db)))
(rf/reg-sub
::current-frame
:<- [::editor-state]
(fn... |
5c1e5fd9c1fb9f46abdf3ef5d1c150054e4a6a7449121041b992942db0b5b981 | LeastAuthority/wormhole-client | App.hs | -- | Description: a file-transfer monad transformer
# LANGUAGE GeneralizedNewtypeDeriving #
module Transit.Internal.App
( Env(..)
, App
, prepareAppEnv
, app
, runApp
, send
, receive
)
where
import Protolude hiding (toS)
import Protolude.Conv (toS)
import qualified Data.Text as Text
import qualified ... | null | https://raw.githubusercontent.com/LeastAuthority/wormhole-client/d00200e0f49a154688da1a882f8aef1df6469ba7/src/Transit/Internal/App.hs | haskell | | Description: a file-transfer monad transformer
| Magic Wormhole transit app environment
^ configuration like relay and transit url
^ List of nameplates identifiers on the server
^ PGP Odd words
^ PGP Even words
^ Number of PGP words used in wormhole code
| Take an input code from the user with code completion... | # LANGUAGE GeneralizedNewtypeDeriving #
module Transit.Internal.App
( Env(..)
, App
, prepareAppEnv
, app
, runApp
, send
, receive
)
where
import Protolude hiding (toS)
import Protolude.Conv (toS)
import qualified Data.Text as Text
import qualified Data.Text.IO as TIO
import qualified MagicWormhole
i... |
e7b40e0066586ed4e223fa00f9189f7b794045237937de956f9684bf802ae9e4 | herd/herdtools7 | toolsConstant.mli | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/b22ec02af1300a45e2b646cce4253ecd4fa7f250/tools/toolsConstant.mli | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2017 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
34f96d9503d9446bf5e694d6590f0b81f71be4724c164ea501d34cefcb323021 | ocamllabs/ocaml-modular-implicits | stypes.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ,... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/typing/stypes.mli | ocaml | *********************************************************************
OCaml
... | , projet , INRIA Rocquencourt
Copyright 2003 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
must be true
open Typedtree;;
type annotat... |
5616978db6a2776025fbcd13534d043a6cd090b2e6bd0190067e09b9f3f05951 | locusmath/locus | impl.clj | (ns locus.order.galois.mapping.impl
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.logic.sequence.object :refer :all]
[locus.con.core.setpart :refer :all]
... | null | https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/order/galois/mapping/impl.clj | clojure | adjoint of this Galois connection is a residuated mapping and the upper adjoint is a
coresiduated mapping, and either of these objects presented by themselves is enough
to reconstruct the entire adjunction. A residuated mapping is also defined as a
monotone map that reflects principal idelas.
The dual concept of ... | (ns locus.order.galois.mapping.impl
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.logic.sequence.object :refer :all]
[locus.con.core.setpart :refer :all]
... |
28de82a640d1ba70af7fe0078aa39f4e13b3bdca9f3e95908c6153962154f199 | gilith/hol-light | printer.ml | (* ========================================================================= *)
(* Simplistic HOL Light prettyprinter, using the OCaml "Format" library. *)
(* *)
, University of Cambridge Computer Laboratory
(* ... | null | https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/printer.ml | ocaml | =========================================================================
Simplistic HOL Light prettyprinter, using the OCaml "Format" library.
===============... | , University of Cambridge Computer Laboratory
( c ) Copyright , University of Cambridge 1998
( c ) Copyright , 1998 - 2007
( c ) Copyright , 2017
( c ) Copyright , , 2017 -... |
f3f700fbbcbb60d24bec837fe42aacade8bef22fa54f8c0f7676bff37cf822e9 | unnohideyuki/bunny | sample210.hs | a `myeq` b = case (a, b) of
(LT, LT) -> True
(EQ, EQ) -> True
(GT, GT) -> True
(_ , _ ) -> False
main = do print $ LT `myeq` LT
print $ EQ `myeq` GT
| null | https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample210.hs | haskell | a `myeq` b = case (a, b) of
(LT, LT) -> True
(EQ, EQ) -> True
(GT, GT) -> True
(_ , _ ) -> False
main = do print $ LT `myeq` LT
print $ EQ `myeq` GT
| |
46d4003a756563a5837b339c8b0ebaf9d5d89e37078ce57dce16dd13652916b5 | janestreet/toplevel_expect_test | toplevel_expect_test_types.mli | module Chunk : sig
type t =
{ ocaml_code : string
; toplevel_response : string
}
[@@deriving sexp]
end
module Part : sig
type t =
{ name : string
; chunks : Chunk.t list
}
[@@deriving sexp]
end
module Document : sig
type t =
{ parts : Part.t list
; matched : bool (... | null | https://raw.githubusercontent.com/janestreet/toplevel_expect_test/b30b2ced87ab3742942f6e5aedfe2b243c80e10d/types/toplevel_expect_test_types.mli | ocaml | * Whether the actual output matched the expectations | module Chunk : sig
type t =
{ ocaml_code : string
; toplevel_response : string
}
[@@deriving sexp]
end
module Part : sig
type t =
{ name : string
; chunks : Chunk.t list
}
[@@deriving sexp]
end
module Document : sig
type t =
{ parts : Part.t list
}
[@@deriving se... |
867b75b28599370119b3de9d85bb0729039a32a5834d3f5af58f3c3912ff31d5 | esengie/fpl-exploration-tool | Infer.hs | module CodeGen.Infer (
genInfer
) where
import Control.Monad.Reader
import Control.Monad.State
import Control.Monad.Except (throwError, lift)
import Language.Haskell.Exts.Simple
import Control.Lens
import Debug.Trace
import qualified Data.Set as Set
import qualified Data.Map as Map
import SortCheck
import AST hidi... | null | https://raw.githubusercontent.com/esengie/fpl-exploration-tool/bf655e65d215da4d7cae703dda7a7fde1a180b43/src/langGenerator/CodeGen/Infer.hs | haskell | ------------------------------------------------------------------------
- Var work
----
- Errors of type ty(*) = *
----
We've checked our lang, can unJust
- Gather and build a resulting function
- | module CodeGen.Infer (
genInfer
) where
import Control.Monad.Reader
import Control.Monad.State
import Control.Monad.Except (throwError, lift)
import Language.Haskell.Exts.Simple
import Control.Lens
import Debug.Trace
import qualified Data.Set as Set
import qualified Data.Map as Map
import SortCheck
import AST hidi... |
4d6ee5eca62b5b5c0ab49b03e2f326ce6aad376eade5823a65ce8f7f710f777e | charlieg/Sparser | percentages1.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
copyright ( c ) 1992 - 1998 -- all rights reserved
;;;
;;; File: "percentages"
;;; Module: "grammar;model:core:numbers:"
Version : 1.3 July 1998
1.1 ( 7/16/92 v2.3 ) pilot instances of the new representation regime
1.2 ( 1/10/... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/grammar/model/core/numbers/percentages1.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
File: "percentages"
Module: "grammar;model:core:numbers:"
referenced by percent before it's loaded itself, so we supply a stub
--------
object
-------- | copyright ( c ) 1992 - 1998 -- all rights reserved
Version : 1.3 July 1998
1.1 ( 7/16/92 v2.3 ) pilot instances of the new representation regime
1.2 ( 1/10/94 ) stubbed measurement to get around load - order paradox
( ) added string printer
1.3 ( 7/5/98 ) redone with a schematic realization ... |
42c8bf4ad81c9240763d51896d42597892e18777739c46a07e8b49d767a136ec | hexlet-codebattle/battle_asserts | check_phone_number.clj | (ns battle-asserts.issues.check-phone-number
(:require [clojure.test.check.generators :as gen]
[clojure.string :as s]))
(def level :medium)
(def tags ["strings"])
(def description
{:en "Write a function to validate some strings that could potentially represent phone numbers."
:ru "Напишите функцию... | null | https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/253dfe65e08336818321a19eacd7b8e07516e7d4/src/battle_asserts/issues/check_phone_number.clj | clojure | (ns battle-asserts.issues.check-phone-number
(:require [clojure.test.check.generators :as gen]
[clojure.string :as s]))
(def level :medium)
(def tags ["strings"])
(def description
{:en "Write a function to validate some strings that could potentially represent phone numbers."
:ru "Напишите функцию... | |
02ba38a17b29294b57c60843a2caffe364c704c2812485511871aa40615e87e6 | anmonteiro/lumo | build_api_tests.cljs | (ns ^{:doc "For importing a new test make sure that:
- you get rid of all the io/file, in lumo you can pass the string path directly
- you transform .getAbsolutePath to path/resolve
- you transform .delete to fs/unlinkSync"}
lumo.build-api-tests
(:require-macros [cljs.env.macros :as env]
[cl... | null | https://raw.githubusercontent.com/anmonteiro/lumo/6709c9f1b7b342c8108e6ed6e034e19dc786f00b/src/test/lumo/lumo/build_api_tests.cljs | clojure | backup and restore package.json cause we are executing these in the lumo
folder.
basic
linear
graph
(let [out (.getPath (io/file (test/tmp-dir) "loader-test-out"))
srcs "samples/hello/src"
[common-tmp app-tmp] (mapv #(File/createTempFile % ".js")
["common" "app... | (ns ^{:doc "For importing a new test make sure that:
- you get rid of all the io/file, in lumo you can pass the string path directly
- you transform .getAbsolutePath to path/resolve
- you transform .delete to fs/unlinkSync"}
lumo.build-api-tests
(:require-macros [cljs.env.macros :as env]
[cl... |
4d311648a197759264c7f84d799e788c97dd6565d47ae1f1ab66febe65e73780 | rufoa/ring-middleware-accept | accept_test.clj | (ns ring.middleware.accept-test
(:require ring.middleware.accept)
(:use midje.sweet))
(tabular
(fact
(get-in ((ring.middleware.accept/wrap-accept identity {?key ?offered}) {:headers ?accept}) [:accept ?key]) => ?expected)
?key ?accept ?offered ?expected
:encodin... | null | https://raw.githubusercontent.com/rufoa/ring-middleware-accept/67e2500db793c487b6bcc151bdfcfb5b8964af46/test/ring/middleware/accept_test.clj | clojure | (ns ring.middleware.accept-test
(:require ring.middleware.accept)
(:use midje.sweet))
(tabular
(fact
(get-in ((ring.middleware.accept/wrap-accept identity {?key ?offered}) {:headers ?accept}) [:accept ?key]) => ?expected)
?key ?accept ?offered ?expected
:encodin... | |
383e552ae205bcc8b960d4ffac340f98009b3cd49fc102da8a0e6446b5c00ab4 | jwiegley/notes | Runner.hs | newtype ByteString64 = ByteString64 { unByteString64 :: ByteString }
deriving (Eq, Read, Show, Data, Typeable,
#ifndef FAY
Ord, Serialize, Generic, Hashable
#endif
)
| null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/8924109/Runner.hs | haskell | newtype ByteString64 = ByteString64 { unByteString64 :: ByteString }
deriving (Eq, Read, Show, Data, Typeable,
#ifndef FAY
Ord, Serialize, Generic, Hashable
#endif
)
| |
cb55812e2840a5c5fd02ffc69c3702b7a84f900149d94fb606c0c78f460731a0 | bmeurer/ocaml-experimental | graphics.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-experimental/fe5c10cdb0499e43af4b08f35a3248e5c1a8b541/otherlibs/graph/graphics.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ Id$
exception Graphic_failure of s... |
30f01dc071bf9288451cd85051c0f8429ad2944ec42e6c97be7d505d7c55b344 | vikram/lisplibraries | widget.lisp |
(in-package :weblocks)
(export '(defwidget widget widget-name
widget-propagate-dirty widget-rendered-p widget-continuation
widget-parent widget-prefix-fn widget-suffix-fn
with-widget-header
render-widget-body widget-css-classes render-widget mark-dirty
widget-dirty-p ... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/weblocks-stable/src/widgets/widget/widget.lisp | lisp | Process the :name initarg and set the dom-id accordingly. Note that
it is possible to pass :name nil, which simply means that objects
will render without id in generated HTML.
(unless it's setting parent to nil)
Define widget-rendered-p for objects that don't derive from
'widget'
Define widget-parent for objects... |
(in-package :weblocks)
(export '(defwidget widget widget-name
widget-propagate-dirty widget-rendered-p widget-continuation
widget-parent widget-prefix-fn widget-suffix-fn
with-widget-header
render-widget-body widget-css-classes render-widget mark-dirty
widget-dirty-p ... |
b51618d1359b822a24d42ffa31d77e4ac97e7913de943bba9167e351e79d7612 | haskell/text-icu | Properties.hs | -- Tester beware!
--
-- Many of the tests below are "weak", i.e. they ensure that functions
-- return results, without checking whether the results are correct.
-- Weak tests are described as such.
# LANGUAGE CPP #
# LANGUAGE OverloadedStrings , LambdaCase #
# OPTIONS_GHC -fno - warn - missing - signatures #
module Pr... | null | https://raw.githubusercontent.com/haskell/text-icu/5e0914e8c0cac72eedad05c820d1d700cdf79d39/tests/Properties.hs | haskell | Tester beware!
Many of the tests below are "weak", i.e. they ensure that functions
return results, without checking whether the results are correct.
Weak tests are described as such.
Case mapping
These tests are all fairly weak.
Iteration
Normalization
Collation
Unicode character database
These tests are we... |
# LANGUAGE CPP #
# LANGUAGE OverloadedStrings , LambdaCase #
# OPTIONS_GHC -fno - warn - missing - signatures #
module Properties (propertyTests, testCases) where
import Control.DeepSeq (NFData(..))
import Data.Function (on)
import Data.Maybe (fromMaybe)
import Data.Text (Text)
import Data.Text.ICU (LocaleName(..), P... |
1628a9660b3534d4b666a370c2b4744eb8eb1aa87e9abab23b339af49d68a43c | ktakashi/sagittarius-scheme | json-object.scm | (import (rnrs)
(text json object-builder)
(text json)
(srfi :64 testing))
(test-begin "JSON object")
(define-record-type location
(fields precision latitude longitude address city state zip country))
(test-assert (json:builder? (json-object-builder
(@ list
(make-location
"precision"
"Latit... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/44e49b4ed45ac3a715bbe93624a068ba13c20b68/test/tests/text/json-object.scm | scheme | other tests | (import (rnrs)
(text json object-builder)
(text json)
(srfi :64 testing))
(test-begin "JSON object")
(define-record-type location
(fields precision latitude longitude address city state zip country))
(test-assert (json:builder? (json-object-builder
(@ list
(make-location
"precision"
"Latit... |
ad9c61d3a6835fc31fc6171654616b31e83193a476d464ee67dd19468c6dd247 | PLTools/GT | test807showT.ml |
let i d x = x
let show_typed_string = Printf.sprintf " \"%s\ " "
module AL : sig
type ( ' a,'b ) alist = Nil | Cons of ' a * ' b
[ @@deriving gt ~options:{show_typed ; } ]
end = struct
type ( ' a,'b ) alist = Nil | Cons of ' a * ' b
[ @@deriving gt ~options:{show_typed ; } ]
end
let ( ... | null | https://raw.githubusercontent.com/PLTools/GT/62d1a424a3336f2317ba67e447a9ff09d179b583/regression/test807showT.ml | ocaml | enhancing a class to print a type for constructor Var
Now let's try show_typed for mutal recursion |
let i d x = x
let show_typed_string = Printf.sprintf " \"%s\ " "
module AL : sig
type ( ' a,'b ) alist = Nil | Cons of ' a * ' b
[ @@deriving gt ~options:{show_typed ; } ]
end = struct
type ( ' a,'b ) alist = Nil | Cons of ' a * ' b
[ @@deriving gt ~options:{show_typed ; } ]
end
let ( ... |
55325defa0290235a2d8aa5fbcfe2deb0f040f0b1aa5a5a5ba7f5122e4a31f25 | contivero/hasmin | BasicShape.hs | # LANGUAGE OverloadedStrings , FlexibleInstances , FlexibleContexts ,
StandaloneDeriving , DeriveFunctor , ,
DeriveTraversable #
StandaloneDeriving, DeriveFunctor, DeriveFoldable,
DeriveTraversable #-}
-------------------------------------------------------------... | null | https://raw.githubusercontent.com/contivero/hasmin/2a7604159b51e69c5e9c564dce53cb3ab09ae22b/src/Hasmin/Types/BasicShape.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD3
Stability : experimental
Portability : unknown
---------------------------------------------------------------------------
| CSS <-shapes/#basic-shape-functions \<basic-shape\>> data type.
inset( <shape-arg>{1,4} [... | # LANGUAGE OverloadedStrings , FlexibleInstances , FlexibleContexts ,
StandaloneDeriving , DeriveFunctor , ,
DeriveTraversable #
StandaloneDeriving, DeriveFunctor, DeriveFoldable,
DeriveTraversable #-}
Module : Hasmin . Types . BasicShape
Copyright :... |
a2f50fd384b465ec52fcfe206118890688561f140128f0bd35f81ed4c51ae1e7 | shaunlebron/t3tr0s-bare | board.cljs | (ns game.board)
;;------------------------------------------------------------
;; Pieces.
;;------------------------------------------------------------
; The available pieces resemble letters I,L,J,S,Z,O,T.
; Each piece structure is stored in :coords as [x y a].
; The "a" component of :coords stands for adjacency,
... | null | https://raw.githubusercontent.com/shaunlebron/t3tr0s-bare/b11628da985101b4fdaaf987c615d50e2808338d/src/game/board.cljs | clojure | ------------------------------------------------------------
Pieces.
------------------------------------------------------------
The available pieces resemble letters I,L,J,S,Z,O,T.
Each piece structure is stored in :coords as [x y a].
The "a" component of :coords stands for adjacency,
For example, the coords for... | (ns game.board)
which is a number with bit flags UP , RIGHT , DOWN , LEFT .
Adjacency codes are 4 - bit numbers ( for good reason ) ,
- X - - 0010 2
X X - - 0011 3 < -- shown in above example
- - - X 1000 8 < -... |
e0f605e71d82dbe70ab00c3d45dec0a27830e483e1b702f878497740cc361651 | ktakashi/sagittarius-scheme | cipher.scm | -*- mode : scheme ; coding : utf-8 -*-
;;;
;;; cipher.scm Cryptographic library
;;;
#!deprecated
#!nounbound
(library (crypto cipher)
(export crypto-object?
cipher-keysize
cipher-blocksize
cipher-iv
cipher-update-aad!
cipher-tag! cipher-tag
cipher-max-tag-size
(rename (legacy-ci... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/ed1d5e34e3df5e6f1c1240b190ab959de5041455/ext/crypto/crypto/cipher.scm | scheme | coding : utf-8 -*-
cipher.scm Cryptographic library
parameters
signing
supported algorithms
supported modes
for backward compatibility
This is why we want to replace lagacy library...
should we add nonce?
kinda silly but for now
make-builtin-cipher-spi requires it.
TODO better construction
reuse
with a... | #!deprecated
#!nounbound
(library (crypto cipher)
(export crypto-object?
cipher-keysize
cipher-blocksize
cipher-iv
cipher-update-aad!
cipher-tag! cipher-tag
cipher-max-tag-size
(rename (legacy-cipher? cipher?))
make-cipher
cipher-encrypt
cipher-decrypt
cipher-s... |
0cea48db483308a0cd4f47a062f6bb54c6c27651ee333ff2aa61116839a3d87e | esmolanka/sexp-grammar | Generic.hs | {-# LANGUAGE Safe #-}
module Language.SexpGrammar.Generic
( -- * GHC.Generics helpers
with
, match
, Coproduct (..)
) where
import Data.InvertibleGrammar.Generic
| null | https://raw.githubusercontent.com/esmolanka/sexp-grammar/ec5a2af94ebe403a5fab882af36ee9bbd12b3783/sexp-grammar/src/Language/SexpGrammar/Generic.hs | haskell | # LANGUAGE Safe #
* GHC.Generics helpers |
module Language.SexpGrammar.Generic
with
, match
, Coproduct (..)
) where
import Data.InvertibleGrammar.Generic
|
30c48652689c611e092a73c031020850dc388bcf82ad4916f7c180db76aeaa9f | juxt/jig | shared.clj | Copyright © 2013 , JUXT LTD . All Rights Reserved .
;;
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;;
;; By using this software in any fashion, you are agreeing to be b... | null | https://raw.githubusercontent.com/juxt/jig/3997887e5a56faadb1b48eccecbc7034b3d31e41/extensions/cljs-builder/src/jig/cljs/shared.clj | clojure |
The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html 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, or any other, from this software. | Copyright © 2013 , JUXT LTD . All Rights Reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns jig.cljs.shared
(:require
[clojure.tools.namespace.find :as ns-find]
[clojure.tools.namespace.file :as ns-file]))
(def ^:dynamic *shared-metadata* :shared)
(defn ns-marked-as-shared?
"Is the namespace of the... |
0549916a2c147445705e95dba77046764805e984ab8be4ceb86a41e4ed7a374d | rickeyski/slack-api | Id.hs | # LANGUAGE DataKinds , KindSignatures , TemplateHaskell , DeriveGeneric #
module Web.Slack.Types.Id
( UserId,
BotId,
ChannelId,
FileId,
CommentId,
IMId,
TeamId,
SubteamId,
Id(..),
getId
) where
import Data.Aeson
import Data.Text (Text)
import Control.Lens.TH
import Data.Hashable... | null | https://raw.githubusercontent.com/rickeyski/slack-api/5f6659e09bce19fe0ca9dfce8743bec7de518d77/src/Web/Slack/Types/Id.hs | haskell | # LANGUAGE DataKinds , KindSignatures , TemplateHaskell , DeriveGeneric #
module Web.Slack.Types.Id
( UserId,
BotId,
ChannelId,
FileId,
CommentId,
IMId,
TeamId,
SubteamId,
Id(..),
getId
) where
import Data.Aeson
import Data.Text (Text)
import Control.Lens.TH
import Data.Hashable... | |
28eb111a6b57d5bec8e4d5fcd180cfbe7b61c63617962ccfc316dbb688862761 | Reisen/pixel | HKD.hs | module Pixel.HKD ( HKD ) where
import Protolude
--------------------------------------------------------------------------------
Higher - Kinded Data ( HKD ) , or Functor Functors is a way of modeling data as a
-- collection of Functor data:
--
-- ```
-- data Example' f = Example
-- { _exampleField1 :: HKD f... | null | https://raw.githubusercontent.com/Reisen/pixel/9096cc2c5b909049cdca6d14856ffc1fc99d81b5/src/lib/Pixel/HKD.hs | haskell | ------------------------------------------------------------------------------
collection of Functor data:
```
data Example' f = Example
{ _exampleField1 :: HKD f Text
, _exampleField2 :: HKD f Int
}
```
for specific purposes, a validatable Example:
```
type Example = Example' Id... | module Pixel.HKD ( HKD ) where
import Protolude
Higher - Kinded Data ( HKD ) , or Functor Functors is a way of modeling data as a
This allows defining ad - hoc structures on the fly by substituting the ` f `
type UnvalidatedExample = Example ' Maybe
validateExample : : UnvalidatedExample - > Example
wo... |
537bdf9fad2fcd00980a185167ec2513991252bfad57dbaf8934d0ba42ba3176 | AndrasKovacs/ELTE-func-lang | Lesson11_pre.hs | module Lesson11 where
import Control.Monad
import Control.Applicative
import Data.Char
import Debug.Trace
PARSER LIBRARY
--------------------------------------------------------------------------------
newtype Parser a = Parser { runParser :: String -> Maybe (a, String) }
instance Functor Parser where
fmap ::... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/b459dc8e50900bfc4474a1864819da3d50915f6c/2021-22-2/gyak_2/Lesson11_pre.hs | haskell | ------------------------------------------------------------------------------
g :: String -> Maybe (a, String)
f :: String -> Maybe (a -> b, String)
g :: String -> Maybe (a, String)
olvassunk egy tetszőleges karaktert
char c = () <$ satisfy (== c)
olvassunk egy konkrét String-et
Control.Applicative-ból:
0 - sz... | module Lesson11 where
import Control.Monad
import Control.Applicative
import Data.Char
import Debug.Trace
PARSER LIBRARY
newtype Parser a = Parser { runParser :: String -> Maybe (a, String) }
instance Functor Parser where
fmap :: (a -> b) -> Parser a -> Parser b
fmap f (Parser g) = Parser $ \str -> case g... |
a80f6f703d54be4807abae00221340ec568785b87fc8497958a62dcadbd18d62 | alpacaaa/quad-ci | Github.hs | module Github where
import Core
import Data.Aeson ((.:))
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.Types as Aeson.Types
import qualified Data.Yaml as Yaml
import qualified Docker
import qualified JobHandler
import qualified Network.HTTP.Simple as HTTP
import RIO
import qualified RIO.NonEmpty.Par... | null | https://raw.githubusercontent.com/alpacaaa/quad-ci/99175d3d0da5c03de22e3b20ae3b6ded79e40b57/src/Github.hs | haskell | module Github where
import Core
import Data.Aeson ((.:))
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.Types as Aeson.Types
import qualified Data.Yaml as Yaml
import qualified Docker
import qualified JobHandler
import qualified Network.HTTP.Simple as HTTP
import RIO
import qualified RIO.NonEmpty.Par... | |
51b1233658bbc6a0c12d9a6fc03b66f73515f29ba9a4e1f66c44cde1a12831ec | zlatozar/study-paip | exercises.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CH12 - EXERCISES ; Base : 10 -*-
;;;; File exercises.lisp
(in-package #:ch12-exercises)
;;; ____________________________________________________________________________
(def-prolog-compiler-macro and (goal body cont bindings)
(compile-body (append (args goal... | null | https://raw.githubusercontent.com/zlatozar/study-paip/dfa1ca6118f718f5d47d8c63cbb7b4cad23671e1/ch12/exercises.lisp | lisp | Syntax : COMMON - LISP ; Package : CH12 - EXERCISES ; Base : 10 -*-
File exercises.lisp
____________________________________________________________________________
when a goal succeeds, we call the continuation
when a goal fails, we ignore the continuation |
(in-package #:ch12-exercises)
(def-prolog-compiler-macro and (goal body cont bindings)
(compile-body (append (args goal) body) cont bindings))
(def-prolog-compiler-macro or (goal body cont bindings)
(let ((disjuncts (args goal)))
(case (length disjuncts)
(0 fail)
(1 (compile-body (cons (first ... |
e132c06f86397de7a42a24076d0854eedcc7c8897207415cab8b6d03e6cd8a1b | yurug/ocaml-crontab | io.ml | open Cron
let _announce =
Random.self_init ();
let out = Printf.sprintf "crontab.backup-%d" (Random.bits ()) in
Printf.printf "Saving the local crontab in %s.\n" out;
Sys.command (Printf.sprintf "crontab -l > %s" out)
let saved = crontab_get ()
let entry1 = make_entry "true"
let entry2 = make_entry ~minute:... | null | https://raw.githubusercontent.com/yurug/ocaml-crontab/59b0d84bfe3d7f2a9ee1e00c6f6733dba2765c55/tests/io.ml | ocaml | open Cron
let _announce =
Random.self_init ();
let out = Printf.sprintf "crontab.backup-%d" (Random.bits ()) in
Printf.printf "Saving the local crontab in %s.\n" out;
Sys.command (Printf.sprintf "crontab -l > %s" out)
let saved = crontab_get ()
let entry1 = make_entry "true"
let entry2 = make_entry ~minute:... | |
a944a2d8d84f8e669c7d0912a07e2f7b9cdf05af224197adccce9774f5a0fc23 | ocaml/oasis | OASISFormat.ml | (******************************************************************************)
OASIS : architecture for building OCaml libraries and applications
(* *)
Copyright ( C ) 2011 - 2016 ,
Copyrig... | null | https://raw.githubusercontent.com/ocaml/oasis/3d1a9421db92a0882ebc58c5df219b18c1e5681d/src/oasis/OASISFormat.ml | ocaml | ****************************************************************************
This library is free software; you can redistribute it and/or modify it
under the t... | OASIS : architecture for building OCaml libraries and applications
Copyright ( C ) 2011 - 2016 ,
Copyright ( C ) 2008 - 2011 , OCamlCore SARL
the Free Software Foundation ; either version 2.1 of the License , or ( at
You s... |
1940843e7dd6a18a64e0f892aa165bfa2022caa26cb0d7243205c8738624a008 | well-typed/optics | Passthrough.hs | module Optics.Passthrough where
import Optics.Internal.Optic
import Optics.AffineTraversal
import Optics.Lens
import Optics.Prism
import Optics.Traversal
import Optics.View
class (Is k A_Traversal, ViewableOptic k r) => PermeableOptic k r where
| Modify the target of an ' Optic ' returning extra information of type... | null | https://raw.githubusercontent.com/well-typed/optics/7cc3f9c334cdf69feaf10f58b11d3dbe2f98812c/optics-extra/src/Optics/Passthrough.hs | haskell | module Optics.Passthrough where
import Optics.Internal.Optic
import Optics.AffineTraversal
import Optics.Lens
import Optics.Prism
import Optics.Traversal
import Optics.View
class (Is k A_Traversal, ViewableOptic k r) => PermeableOptic k r where
| Modify the target of an ' Optic ' returning extra information of type... | |
4dd4f84e5740e68a43ea6596dbb13ee4d26af35695cbdca22810e89b501e1f5d | Beluga-lang/Beluga | fun.mli | include module type of Stdlib.Fun
(** [f ++ g] is the function composition of [f] and [g], such that
[(f ++ g) x] is [f (g x)]. *)
val ( ++ ) : ('b -> 'c) -> ('a -> 'b) -> 'a -> 'c
(** [f >> g] is the function composition of [f] and [g], such that
[x |> (f >> g)] is [g (f x)]. *)
val ( >> ) : ('a -> 'b) -> ('... | null | https://raw.githubusercontent.com/Beluga-lang/Beluga/0b27be6d78ab917fdb7a18dd8e3b74c90e979950/src/support/fun.mli | ocaml | * [f ++ g] is the function composition of [f] and [g], such that
[(f ++ g) x] is [f (g x)].
* [f >> g] is the function composition of [f] and [g], such that
[x |> (f >> g)] is [g (f x)].
* [apply x f] is [f x]. This is useful when a function pipeline ends in a
call to the generated function.
* [flip f x ... | include module type of Stdlib.Fun
val ( ++ ) : ('b -> 'c) -> ('a -> 'b) -> 'a -> 'c
val ( >> ) : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c
val apply : 'a -> ('a -> 'b) -> 'b
val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c
val until : (unit -> bool) -> unit
val through : ('a -> unit) -> 'a -> 'a
val after : (unit -> uni... |
7c4a093dcb27accb70b1d217a675761b5b9db1025a9c7a5a946a3663e8ecf13b | docker-in-aws/docker-in-aws | form_ports.cljs | (ns swarmpit.component.service.form-ports
(:require [material.component :as comp]
[material.component.form :as form]
[material.component.list-table-form :as list]
[swarmpit.component.state :as state]
[swarmpit.component.parser :refer [parse-int]]
[swarmpit.a... | null | https://raw.githubusercontent.com/docker-in-aws/docker-in-aws/bfc7e82ac82ea158bfb03445da6aec167b1a14a3/ch16/swarmpit/src/cljs/swarmpit/component/service/form_ports.cljs | clojure | (ns swarmpit.component.service.form-ports
(:require [material.component :as comp]
[material.component.form :as form]
[material.component.list-table-form :as list]
[swarmpit.component.state :as state]
[swarmpit.component.parser :refer [parse-int]]
[swarmpit.a... | |
6a98fa74992effd3165119864ed06ef79e32365764a8591845214e40335677cd | hidaris/thinking-dumps | 06_cond.rkt | #lang racket
;; (provide (all-defined-out))
(define (sum3 xs)
(cond [(null? xs) 0]
[(number? (car xs)) (+ (car xs) (sum3 (cdr xs)))]
[(list? (car xs)) (+ (sum3 (car xs)) (sum3 (cdr xs)))]
[#t (sum3 (cdr xs))]))
(sum3 '("hi"))
(define (count-falses xs)
(cond [(null? xs) 0]
[(car xs... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/cse341/racket/06_cond.rkt | racket | (provide (all-defined-out)) | #lang racket
(define (sum3 xs)
(cond [(null? xs) 0]
[(number? (car xs)) (+ (car xs) (sum3 (cdr xs)))]
[(list? (car xs)) (+ (sum3 (car xs)) (sum3 (cdr xs)))]
[#t (sum3 (cdr xs))]))
(sum3 '("hi"))
(define (count-falses xs)
(cond [(null? xs) 0]
[(car xs) (count-falses (cdr xs))]
... |
f435a5352ade12b66e673c7d5ca21a78b62bff9bfe38fbe506f5e949723bc53e | roburio/caldav | webdav_api.mli | type tree = Webdav_xml.tree
type content_type = string
open Webdav_config
module type S =
sig
type state
val mkcol : state -> config -> path:string -> user:string -> Cohttp.Code.meth -> Ptime.t -> data:string ->
(unit, [ `Bad_request | `Conflict | `Forbidden of string ]) result Lwt.t
val propfind : state -... | null | https://raw.githubusercontent.com/roburio/caldav/3914aef28175f22983772b67be3d366a9d2d9e4e/src/webdav_api.mli | ocaml | type tree = Webdav_xml.tree
type content_type = string
open Webdav_config
module type S =
sig
type state
val mkcol : state -> config -> path:string -> user:string -> Cohttp.Code.meth -> Ptime.t -> data:string ->
(unit, [ `Bad_request | `Conflict | `Forbidden of string ]) result Lwt.t
val propfind : state -... | |
d7ca13d1db5155f3dab3a2e344c0f288a59e70962421a9b54a7d18450b245c71 | buildsome/buildsome | par_exec.hs | import Control.Concurrent.Async (asyncOn, wait)
threadHandler n = readFile $ "after_sleep." ++ show n
main = do
-- To get actual concurrency we need to use different POSIX threads,
because otherwise the user - threads share the same buildsome
-- client, which will re-serialize them
a <- asyncOn 0 $ threadHand... | null | https://raw.githubusercontent.com/buildsome/buildsome/479b92bb74a474a5f0c3292b79202cc850bd8653/test/overpar/par_exec.hs | haskell | To get actual concurrency we need to use different POSIX threads,
client, which will re-serialize them | import Control.Concurrent.Async (asyncOn, wait)
threadHandler n = readFile $ "after_sleep." ++ show n
main = do
because otherwise the user - threads share the same buildsome
a <- asyncOn 0 $ threadHandler 1
b <- asyncOn 1 $ threadHandler 2
wait a
wait b
|
9feed6c1bcbce6376fae98ca9bf9bdd41f27a37bfe0cb471d8c06f53e519aef1 | LightTable/Clojure | light_nrepl_test.clj | (ns leiningen.light-nrepl-test
(:require [leiningen.light-nrepl :as repl]
[clojure.test :refer [is deftest testing]]))
(deftest at-least-version-test
(testing "Smaller versions return false"
(is (false? (repl/at-least-version? "1.4.1" {:major 1 :minor 5 :patch 1})))
(is (false? (repl/at-least-v... | null | https://raw.githubusercontent.com/LightTable/Clojure/6f335ff3bec841b24a0b8ad7ca0dc126b3352a15/runner/test/leiningen/light_nrepl_test.clj | clojure | (ns leiningen.light-nrepl-test
(:require [leiningen.light-nrepl :as repl]
[clojure.test :refer [is deftest testing]]))
(deftest at-least-version-test
(testing "Smaller versions return false"
(is (false? (repl/at-least-version? "1.4.1" {:major 1 :minor 5 :patch 1})))
(is (false? (repl/at-least-v... | |
841b3111a34fe11e7dc7e2fd5edc98741610eec6efab1673894637e9afcc0159 | dalvescb/LearningHaskell_Exercises | Spec.hs | # LANGUAGE ExistentialQuantification #
|
Module : HaskellExercises07.Spec
Copyright : ( c ) 2020
License : GPL ( see the LICENSE file )
Maintainer : none
Stability : experimental
Portability : portable
Description :
Contains Quickcheck tests for Exercises07 and a main f... | null | https://raw.githubusercontent.com/dalvescb/LearningHaskell_Exercises/7ee9f651c897b4c6a70d1fc180eb1a5060d0e6b0/HaskellExercises07/test/Spec.hs | haskell | -----------------------------------------------------------------------------------------
* QuickCheck Tests
| Arbitrary instance for Tree
NOTE always generates a binary tree
generate an arbitrary sized left tree
generate an arbitrary sized right tree
| Arbitrary instance for Tree
NOTE always generates a binary ... | # LANGUAGE ExistentialQuantification #
|
Module : HaskellExercises07.Spec
Copyright : ( c ) 2020
License : GPL ( see the LICENSE file )
Maintainer : none
Stability : experimental
Portability : portable
Description :
Contains Quickcheck tests for Exercises07 and a main f... |
439c838adb00114394f46ac440733301fc7957ee131283cfe62c1088c601d59e | LonoCloud/step.async | step_schedule.clj | (ns lonocloud.step.async.step-schedule
"Algorithms for scheduling what to run next in a step machine"
(:require [lonocloud.step.async.pschema :as s]
[lonocloud.step.async.step-model :refer [ThreadId ChannelId PendingPutChoices]])
(:import [java.util Random]))
(def ^:private max-seed 100000000)
(s/de... | null | https://raw.githubusercontent.com/LonoCloud/step.async/31dc58f72cb9719a11a97dc36992c67cf3efb766/src/lonocloud/step/async/step_schedule.clj | clojure | (ns lonocloud.step.async.step-schedule
"Algorithms for scheduling what to run next in a step machine"
(:require [lonocloud.step.async.pschema :as s]
[lonocloud.step.async.step-model :refer [ThreadId ChannelId PendingPutChoices]])
(:import [java.util Random]))
(def ^:private max-seed 100000000)
(s/de... | |
e7e32aca5a6d2c87d4022562101ae68123d5332f93c22fcd10b37a9e9b5e2800 | sdiehl/elliptic-curve | SECP256K1.hs | module Data.Curve.Weierstrass.SECP256K1
( module Data.Curve.Weierstrass
, Point(..)
-- * SECP256K1 curve
, module Data.Curve.Weierstrass.SECP256K1
) where
import Protolude
import Data.Field.Galois
import GHC.Natural (Natural)
import Data.Curve.Weierstrass
--------------------------------------------------... | null | https://raw.githubusercontent.com/sdiehl/elliptic-curve/445e196a550e36e0f25bd4d9d6a38676b4cf2be8/src/Data/Curve/Weierstrass/SECP256K1.hs | haskell | * SECP256K1 curve
-----------------------------------------------------------------------------
Types
-----------------------------------------------------------------------------
| SECP256K1 curve.
| Field of points of SECP256K1 curve.
| Field of coefficients of SECP256K1 curve.
# INLINABLE a_ #
# INLINABLE h_ #
... | module Data.Curve.Weierstrass.SECP256K1
( module Data.Curve.Weierstrass
, Point(..)
, module Data.Curve.Weierstrass.SECP256K1
) where
import Protolude
import Data.Field.Galois
import GHC.Natural (Natural)
import Data.Curve.Weierstrass
data SECP256K1
type Fq = Prime Q
type Q = 0xfffffffffffffffffffffffffff... |
da1d05a490bc842ee0be958a6b8bf288c31c7e10c5ff0ea824124da1e19b9e63 | agda/agda | Warnings.hs |
module Agda.Interaction.Options.Warnings
(
WarningMode (..)
, warningSet
, warn2Error
, defaultWarningSet
, allWarnings
, usualWarnings
, noWarnings
, unsolvedWarnings
, incompleteMatchWarnings
, errorWarnings
, defaultWarningMode
... | null | https://raw.githubusercontent.com/agda/agda/db92582d2ea632d25c1fc2cb2179a8aabe2d5205/src/full/Agda/Interaction/Options/Warnings.hs | haskell | and a flag stating whether warnings should be turned into fatal errors.
| The @defaultWarningMode@ is a curated set of warnings covering non-fatal
errors and disabling style-related ones
| Some warnings are errors and cannot be turned off.
| @warningModeUpdate str@ computes the action of @str@ over the current
@W... |
module Agda.Interaction.Options.Warnings
(
WarningMode (..)
, warningSet
, warn2Error
, defaultWarningSet
, allWarnings
, usualWarnings
, noWarnings
, unsolvedWarnings
, incompleteMatchWarnings
, errorWarnings
, defaultWarningMode
... |
bb59774c18a17cd8abb283a421fb629ee9e1b4ae607f4954ee66c34c8fcc781a | ssor/erlangDemos | ti_app.erl | -module(ti_app).
-behaviour(application).
-export([start/2, stop/1]).
-define(DEFAULT_PORT, 1155).
start(_StartType, _StartArgs) ->
Port = case application:get_env(tcp_interface, port) of
{ok, P} -> P;
undefined -> ?DEFAULT_PORT
end,
{ok, LSock} = gen_tcp:listen(Port... | null | https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/erlware-Erlang-and-OTP-in-Action-Source/chapter_11/tcp_interface/src/ti_app.erl | erlang | -module(ti_app).
-behaviour(application).
-export([start/2, stop/1]).
-define(DEFAULT_PORT, 1155).
start(_StartType, _StartArgs) ->
Port = case application:get_env(tcp_interface, port) of
{ok, P} -> P;
undefined -> ?DEFAULT_PORT
end,
{ok, LSock} = gen_tcp:listen(Port... | |
0aee2a378eacbdd24d34d7952569c8212644c46efaef2d49999520a8639fdb69 | collaborativetrust/WikiTrust | read_robots.ml |
Copyright ( c ) 2009 .
All rights reserved .
Authors :
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
1 . Redistributions of source code must retain the above copyright notice ,
this list of condit... | null | https://raw.githubusercontent.com/collaborativetrust/WikiTrust/9dd056e65c37a22f67d600dd1e87753aa0ec9e2c/analysis/read_robots.ml | ocaml | Until we get an End_of_file.
Extracts the robot name |
Copyright ( c ) 2009 .
All rights reserved .
Authors :
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
1 . Redistributions of source code must retain the above copyright notice ,
this list of condit... |
91ee9b47f5b00c9649d6a41b394fcd59d52b235032fae65be1ffd433b9ff72dc | mokus0/junkbox | M1M2.hs | module M1M2 where
{-# NOINLINE m1 #-}
m1 = ((filter odd [1..]) !!)
{-# NOINLINE m2 #-}
m2 n = ((filter odd [1..]) !! n)
{-# NOINLINE m3 #-}
m3 :: Int -> Integer
m3 n = ((filter odd [1..]) !! n)
| null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/Benchmarks/M1M2.hs | haskell | # NOINLINE m1 #
# NOINLINE m2 #
# NOINLINE m3 # | module M1M2 where
m1 = ((filter odd [1..]) !!)
m2 n = ((filter odd [1..]) !! n)
m3 :: Int -> Integer
m3 n = ((filter odd [1..]) !! n)
|
ab1dfe8ee5919bb26a8f6ecec6fb0f81134a4cb1dd1f472d0a2a491b2b3a331b | exercism/haskell | SumOfMultiples.hs | module SumOfMultiples (sumOfMultiples) where
sumOfMultiples :: [Int] -> Int -> Int
sumOfMultiples targets upperBound = sum (filter f [1..upperBound-1])
where f n = any ((==0) . mod n) (filter (/= 0) targets)
| null | https://raw.githubusercontent.com/exercism/haskell/ae17e9fc5ca736a228db6dda5e3f3b057fa6f3d0/exercises/practice/sum-of-multiples/.meta/examples/success-standard/src/SumOfMultiples.hs | haskell | module SumOfMultiples (sumOfMultiples) where
sumOfMultiples :: [Int] -> Int -> Int
sumOfMultiples targets upperBound = sum (filter f [1..upperBound-1])
where f n = any ((==0) . mod n) (filter (/= 0) targets)
| |
33543f6ba98f6da4cd96395f534596fe45619bc7df38ef1975468a6c0097f528 | tud-fop/vanda-haskell | FastNub.hs | -------------------------------------------------------------------------------
-- |
Copyright : ( c ) 2010
-- License : BSD-style
Maintainer : < >
--
-- Stability : unknown
-- Portability : portable
-------------------------------------------------------------------------------
module Vanda... | null | https://raw.githubusercontent.com/tud-fop/vanda-haskell/3214966361b6dbf178155950c94423eee7f9453e/library/Vanda/Algorithms/Earley/FastNub.hs | haskell | -----------------------------------------------------------------------------
|
License : BSD-style
Stability : unknown
Portability : portable
-----------------------------------------------------------------------------
this would not be lazy | Copyright : ( c ) 2010
Maintainer : < >
module Vanda.Algorithms.Earley.FastNub(nub) where
import qualified Data.Set as Set
| Removes duplicate elements from a list by exploiting the ' ' relation .
In particular , it keeps only the first occurrence of each element .
nub :: (Ord a) => [a] -> [a... |
bd855bd73b694f071ee47cce0f806987f9b9dcf0df226ac284a0f22befbaa40d | input-output-hk/plutus-apps | API.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/006f4ae4461094d3e9405a445b0c9cf48727fa81/plutus-contract/src/Wallet/API.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
|
Mock wallet implementation
* Slot ranges
* Error handling
| Transfer some funds to an address, returning the trans... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -Wno - orphans #
# OPTIONS_GHC -fno - omit - interface - pragmas #
# OPTIONS_GHC -fno - ignore - interf... |
087e1282c87d9c33e8fbd72d5d11227cb9d2e018c034419d6f29b056aa78ad1d | haroldcarr/learn-haskell-coq-ml-etc | FP01RecFunTest.hs |
Created : 2013 Sep 28 ( Sat ) 09:01:51 by .
Last Modified : 2014 Mar 05 ( We d ) 12:59:38 by .
Created : 2013 Sep 28 (Sat) 09:01:51 by carr.
Last Modified : 2014 Mar 05 (Wed) 12:59:38 by Harold Carr.
-}
import FP01RecFun
import Test.HUnit
import Test.HUnit.Util
test... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/course/2013-11-coursera-fp-odersky-but-in-haskell/FP01RecFunTest.hs | haskell | BALANCE
COUNT CHANGE
End of file. |
Created : 2013 Sep 28 ( Sat ) 09:01:51 by .
Last Modified : 2014 Mar 05 ( We d ) 12:59:38 by .
Created : 2013 Sep 28 (Sat) 09:01:51 by carr.
Last Modified : 2014 Mar 05 (Wed) 12:59:38 by Harold Carr.
-}
import FP01RecFun
import Test.HUnit
import Test.HUnit.Util
test... |
d6d6b858b9eb2a74f7f3971b6ab533b1ef84299b7e402a5321e6ae72979d6956 | input-output-hk/plutus-apps | Graph.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# OPTIONS_GHC -fno - warn - incomplete - uni - patterns #
-- | Support for visualisation of a blockchain as a graph.
module Wallet.Graph
( txnFlows
, graph
, FlowGraph
, FlowLin... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/e8688b8f86a92b285e7d93eb418ccc314ad41bf9/plutus-contract/src/Wallet/Graph.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings #
| Support for visualisation of a blockchain as a graph.
| The owner of an unspent transaction output.
^ Funds owned by a known public key.
^ Funds locked by script.
^ All other funds (that is, funds owned by a public key we are not interested in).
| Gi... | # LANGUAGE DeriveGeneric #
# LANGUAGE RecordWildCards #
# OPTIONS_GHC -fno - warn - incomplete - uni - patterns #
module Wallet.Graph
( txnFlows
, graph
, FlowGraph
, FlowLink
, TxRef
, UtxOwner
, UtxoLocation
) where
import Data.Aeson.Types (ToJSON, toJSON)
import Data.List (nub)
import Data.... |
5c65617ea816ec4d80d74a4ac0c58ffd0be876f87883ad9033c32f13bd4111b9 | fyquah/hardcaml_zprize | ark_bls12_377_g1.ml | open Core
open Ctypes
open Foreign
let sexp_of_z z = Sexp.Atom ("0x" ^ Z.format "x" z)
module External = struct
let potential_dl_filenames =
(* The more principled thing to do is to figure out the build-target and
* use .so or .dylib.. but this works well enough.
* *)
let%bind.List extension = [ "... | null | https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/libs/ark_bls12_377_g1/src/ark_bls12_377_g1.ml | ocaml | The more principled thing to do is to figure out the build-target and
* use .so or .dylib.. but this works well enough.
* | open Core
open Ctypes
open Foreign
let sexp_of_z z = Sexp.Atom ("0x" ^ Z.format "x" z)
module External = struct
let potential_dl_filenames =
let%bind.List extension = [ "so"; "dylib" ] in
let%bind.List dir =
CR - someday : This is getting out of hand ! refactor to keep
* looking until root and t... |
fc824c4746d1d3d9b3ded0e3bc36f4d8f558fe65386fac13d5eb32e74cc38cd9 | tmfg/mmtis-national-access-point | detection_test_days.clj | (ns ote.transit-changes.detection-test-days
(:require [ote.transit-changes.detection :as detection]
[clojure.test :as t :refer [deftest testing is]]
[clojure.spec.test.alpha :as spec-test]
[ote.transit-changes :as transit-changes]
[ote.transit-changes.detection-test-uti... | null | https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/a86cc890ffa1fe4f773083be5d2556e87a93d975/ote/test/clj/ote/transit_changes/detection_test_days.clj | clojure | (ns ote.transit-changes.detection-test-days
(:require [ote.transit-changes.detection :as detection]
[clojure.test :as t :refer [deftest testing is]]
[clojure.spec.test.alpha :as spec-test]
[ote.transit-changes :as transit-changes]
[ote.transit-changes.detection-test-uti... | |
4ec72a08c4fe52d54a7e34f882839c67b68301cf8e90a24fd15681d3d07c433e | nikivazou/verified_string_matching | shiftNewIndices.hs | #ifdef IncludedmakeNewIndicesNullLeft
#else
#include "../AutoProofs/makeNewIndicesNullLeft.hs"
#endif
#ifdef IncludedmakeNewIndicesNullRight
#else
#include "../AutoProofs/makeNewIndicesNullRight.hs"
#endif
#ifdef IncludedmapShiftZero
#else
#include "../AutoProofs/mapShiftZero.hs"
#endif
#ifdef Include... | null | https://raw.githubusercontent.com/nikivazou/verified_string_matching/abdd611a0758467f776c59c3d6c9e4705d36a3a0/src/AutoProofs/shiftNewIndices.hs | haskell | -----------------------------------------------------------------------------
------ Lemmata on Shifting Indices ---------------------------------------
----------------------------------------------------------------------------- | #ifdef IncludedmakeNewIndicesNullLeft
#else
#include "../AutoProofs/makeNewIndicesNullLeft.hs"
#endif
#ifdef IncludedmakeNewIndicesNullRight
#else
#include "../AutoProofs/makeNewIndicesNullRight.hs"
#endif
#ifdef IncludedmapShiftZero
#else
#include "../AutoProofs/mapShiftZero.hs"
#endif
#ifdef Include... |
518f325936ad7054f2edd3ab8273ef47aec33d869b00daea98c124dbcd0aa256 | Nibre/BlamScript-Research | floodzone_mission.lisp | ;========== GLOBALS ==========================================================================
(global boolean debug 1)
(global boolean dialogue 1)
(global boolean g_play_cinematics 1)
(global boolean g_fact_ent_sen_spawn 0)
(global short g_fact_ent_sen_count 0)
(global short g_fact_ent_sen_index 10)
(global ... | null | https://raw.githubusercontent.com/Nibre/BlamScript-Research/dd17538dcbdc78f391effb341846fbaf9a1f8643/h2v/06b_floodzone/floodzone_mission.lisp | lisp | ========== GLOBALS ==========================================================================
===== !!!! MUSIC !!!! ===========================================================================
(sleep_until (not g_music_06b_01))
(sleep_until (not g_music_06b_04))
(sound_looping_stop scenarios\solo\06b_floodzone\... | (global boolean debug 1)
(global boolean dialogue 1)
(global boolean g_play_cinematics 1)
(global boolean g_fact_ent_sen_spawn 0)
(global short g_fact_ent_sen_count 0)
(global short g_fact_ent_sen_index 10)
(global short g_fact_ent_enf_count 0)
(global short g_fact_ent_enf_index 3)
(script stub void x07 (... |
bd67e7c75dd03873164159e2b513f33369d4c6184b78eebd233993324f111a16 | Lisp-Stat/lisp-stat | disasters.lisp | -*- Mode : LISP ; Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : LS - USER -*-
(in-package #:ls-user)
(defdf disasters (read-csv vega:disasters))
(set-properties disasters :label '(:year "Year of disaster"
:deaths "Number of deaths"))
This data set has a bare year value , e.g. ' 1900 ' , that Vega... | null | https://raw.githubusercontent.com/Lisp-Stat/lisp-stat/a95bbd3e45c944fc8711721a042f5b1705bfea82/data/disasters.lisp | lisp | Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : LS - USER -*-
format.
Categorical variables cannot be automatically determined | (in-package #:ls-user)
(defdf disasters (read-csv vega:disasters))
(set-properties disasters :label '(:year "Year of disaster"
:deaths "Number of deaths"))
This data set has a bare year value , e.g. ' 1900 ' , that Vega - Lite
interprets as an integer . Transform the column to an ISO-8601
(replace-colu... |
a8f93b347c3a5ebe039a4dfef6c1a476f18bcd12d25672041c804e2cef9d8461 | vmchale/atspkg | Build.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
-- | This module holds various functions for turning a package into a set of rules
-- or an 'IO ()'.
module Language.ATS.Package.Build ( mkPkg
, build
,... | null | https://raw.githubusercontent.com/vmchale/atspkg/45be7ece6b9e9b09a7151efe53ff7e278112e84d/ats-pkg/src/Language/ATS/Package/Build.hs | haskell | # LANGUAGE OverloadedStrings #
| This module holds various functions for turning a package into a set of rules
or an 'IO ()'.
| Build in current directory or indicated directory
^ Directory
^ Target triple
^ Debug build?
^ Targets
| Build a set of targets
^ Debug?
^ Targets
^ Optional target triple
^ Option... | # LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
module Language.ATS.Package.Build ( mkPkg
, build
, buildAll
, check
) where
import qualified Data.ByteString ... |
8bf5b44481517a423b7207811ab615474bef2b0b070118c539e13a25f8cdbfed | cgohla/pureshell | Pretty.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE GADTs #
{-# LANGUAGE KindSignatures #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Data.Permutation.Pretty where
import Data.Permutation
import Data.Nat
import Data.Singletons
import ... | null | https://raw.githubusercontent.com/cgohla/pureshell/ddaa9956dd4eb04a68eee39ae65395aaeeeb0b50/pureshell/Data/Permutation/Pretty.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
| prints
| ╳
| | | | # LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Data.Permutation.Pretty where
import Data.Permutation
import Data.Nat
import Data.Singletons
import Text.PrettyPrint.ANSI.Leijen
natReplicate :: Nat -> a -> [a]
natRepli... |
1b273aeedacd5c593f9509d34e178e469004a09ded605a79161f6abbc17ce279 | YoEight/lambda-database-experiment | Operation.hs | --------------------------------------------------------------------------------
-- |
-- Module : Lambda.Client.Operation
Copyright : ( C ) 2017
-- License : (see the file LICENSE)
Maintainer : < >
-- Stability : experimental
-- Portability: non-portable
--
Operation manager . It prepares request... | null | https://raw.githubusercontent.com/YoEight/lambda-database-experiment/da4fab8bd358fb8fb78412c805d6f5bc05854432/lambda-client/library/Lambda/Client/Operation.hs | haskell | ------------------------------------------------------------------------------
|
Module : Lambda.Client.Operation
License : (see the file LICENSE)
Stability : experimental
Portability: non-portable
from the database server. It also manages operations timeout.
---------------------------------------------... | Copyright : ( C ) 2017
Maintainer : < >
Operation manager . It prepares requests from the user and handle responses
module Lambda.Client.Operation where
import Numeric.Natural
import Lambda.Bus
import Lambda.Prelude
import Lambda.Prelude.Stopwatch
import Protocol.Message
import Protocol.Operation
impor... |
fc3f5fad1bffa30f35a14d58e3d3523aabc0abb2380ce4159e69fe7ddbe30621 | skanev/playground | 78-tests.scm | (require rackunit rackunit/text-ui)
(load "../78.scm")
(load-relative "../showcase/query/database.scm")
(define (matches-of query)
(let ((processed-query (query-syntax-process query)))
(map (lambda (frame)
(instantiate-exp processed-query frame (lambda (v f) (contract-question-mark v))))
(amb-... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/04/tests/78-tests.scm | scheme | (require rackunit rackunit/text-ui)
(load "../78.scm")
(load-relative "../showcase/query/database.scm")
(define (matches-of query)
(let ((processed-query (query-syntax-process query)))
(map (lambda (frame)
(instantiate-exp processed-query frame (lambda (v f) (contract-question-mark v))))
(amb-... | |
76e2f780e6d31f1578da18fae2e641b5e3b165659e23b47a41def702ce536335 | Rober-t/apxr_run | neuron.erl | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright ( C ) 2009 by , DXNN Research Group ,
%%%
%%%
%%% The original release of this source code was introduced and explained
in a book ( available for purchase on Amazon ) by :
%%%
Handbook of Neuroevolution Thro... | null | https://raw.githubusercontent.com/Rober-t/apxr_run/9c62ab028af7ff3768ffe3f27b8eef1799540f05/src/agent_mgr/neuron.erl | erlang |
The original release of this source code was introduced and explained
The original release of this source code was introduced and explained
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 a... | Copyright ( C ) 2009 by , DXNN Research Group ,
in a book ( available for purchase on Amazon ) by :
Handbook of Neuroevolution Through Erlang . Springer 2012 ,
print ISBN : 978 - 1 - 4614 - 4462 - 6 ebook ISBN : 978 - 1 - 4614 - 4463 - 6 .
in a book ( available for purchase on Amazon ) by ... |
1c9a4275bb00ad37f8855ce638cdb88b472bfd6daf082753966ca09b62fe97f5 | rtoy/ansi-cl-tests | get-internal-time.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun May 8 20:28:21 2005
Contains : Tests of GET - INTERNAL - REAL - TIME , GET - INTERNAL - RUN - TIME
(in-package :cl-test)
(deftest get-internal-real-time.1
(notnot-mv (typep (multiple-value-list (get-internal-real-time)) '(cons unsigned-byte null)))
t)
... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/get-internal-time.lsp | lisp | -*- Mode: Lisp -*-
| Author :
Created : Sun May 8 20:28:21 2005
Contains : Tests of GET - INTERNAL - REAL - TIME , GET - INTERNAL - RUN - TIME
(in-package :cl-test)
(deftest get-internal-real-time.1
(notnot-mv (typep (multiple-value-list (get-internal-real-time)) '(cons unsigned-byte null)))
t)
(deftest get-internal-r... |
4043ccbd803896497f4b2ad34a8dff4ca0c77e3b72c839884951f20feff4ebe3 | shonfeder/um-abt | abt.mli | Copyright ( c ) 2021 Shon Feder
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rights
to use , copy , modify , ... | null | https://raw.githubusercontent.com/shonfeder/um-abt/2b3860b8f9217b04e7cb0645ede7726988c3735b/lib/abt.mli | ocaml | Define the usual operators, but without the variables, since we get those free
Generate the syntax, which will include a type [t] of the ABTs over the operators *
Define some constructors to ensure correct construction
["x" #. scope] binds all free variables named "x" in the [scope]
No other terms can be evalua... | Copyright ( c ) 2021 Shon Feder
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rights
to use , copy , modify , ... |
db52332812d81831ae65a7e73f30dda58c7a111536d7da712b89cd9316810ba8 | lilactown/lilac.town | visual_spec.clj | (ns lilactown.site.projects.visual-spec
(:require [garden.core :as garden]
[garden.stylesheet :refer [at-media]]
[garden.units :refer [px]]
[lilactown.client.core :as client]))
(def styles
[[:* {:box-sizing "border-box"}]
[:body {:font-family "Roboto Condensed, sans-serif"
... | null | https://raw.githubusercontent.com/lilactown/lilac.town/295669e4511e79877da14232457dea26f098acd8/src/lilactown/site/projects/visual_spec.clj | clojure | (ns lilactown.site.projects.visual-spec
(:require [garden.core :as garden]
[garden.stylesheet :refer [at-media]]
[garden.units :refer [px]]
[lilactown.client.core :as client]))
(def styles
[[:* {:box-sizing "border-box"}]
[:body {:font-family "Roboto Condensed, sans-serif"
... | |
a3021d37a16749bfb46760fd8035054984d5db68f0efb5e6726dc3638b12f77b | sonowz/advent-of-code-haskell | Day06.hs | module Y2021.Day06 where
import Data.Text (split)
import qualified Data.Vector as V
import qualified Data.Vector.Mutable as MV
import Lib.IO
import Lib.Types
import Relude
import Relude.Extra.Bifunctor
import Relude.Extra.Foldable1
import Relude.Extra.Map
import Relude.Extra.Newtype
import Relude.Extra.Tuple
import Re... | null | https://raw.githubusercontent.com/sonowz/advent-of-code-haskell/b1231172ea4e11720e498ae8dc5c93f2e6d2f3f7/src/Y2021/Day06.hs | haskell | ---------------------
Type declarations --
---------------------
----------
Part 1 --
----------
Exhaustive pattern matching, using Maybe monad
----------
----------
------------------
------------------
Stateful creation | module Y2021.Day06 where
import Data.Text (split)
import qualified Data.Vector as V
import qualified Data.Vector.Mutable as MV
import Lib.IO
import Lib.Types
import Relude
import Relude.Extra.Bifunctor
import Relude.Extra.Foldable1
import Relude.Extra.Map
import Relude.Extra.Newtype
import Relude.Extra.Tuple
import Re... |
7691660149ea9dbdd359d9babe3f381d4efc4c5c73c0ade431790a5182b1a69c | thephoeron/quipper-language | PhaseTest.hs | This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the
-- file COPYRIGHT for a list of authors, copyright holders, licensing,
-- and other details. All rights reserved.
--
-- ======================================================================
-- $ Test whether the quantum simulator works cor... | null | https://raw.githubusercontent.com/thephoeron/quipper-language/15e555343a15c07b9aa97aced1ada22414f04af6/tests/PhaseTest.hs | haskell | file COPYRIGHT for a list of authors, copyright holders, licensing,
and other details. All rights reserved.
======================================================================
$ Test whether the quantum simulator works correctly on a global
phase gate.
| This function should compute a Not gate. | This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the
import Quipper
import QuipperLib.Simulation
testcirc :: Qubit -> Circ Qubit
testcirc a = do
hadamard_at a
global_phase 1.0 `controlled` a
hadamard_at a
return a
main = do
b <- run_generic_io d testcirc False
putStrLn ("testc... |
3e9cf54d0fd9e60fe512980e1b2d6507fb85c40c6ec70618e3073e2d64689a3f | Shopify/kubepacity | Main.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Kube
import Objects
import Data.Aeson (decodeStrict, ToJSON, FromJSON)
import Turtle
import Data.Text (Text)
import Data.Text.Encoding (encodeUtf8)
import GHC.Generics
-- Used to decode JSON... | null | https://raw.githubusercontent.com/Shopify/kubepacity/96e04a9f2327ff0436cb5059ca36795b17a8b469/app/Main.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings #
Used to decode JSON list of pods. | # LANGUAGE DeriveGeneric #
module Main where
import Kube
import Objects
import Data.Aeson (decodeStrict, ToJSON, FromJSON)
import Turtle
import Data.Text (Text)
import Data.Text.Encoding (encodeUtf8)
import GHC.Generics
newtype PodSet = PodSet { items :: [Pod] }
deriving (Show, Eq, Generic, FromJSON)
parser ... |
d4998e136b674ee125eb475439d9423b3be9cf4c8a860e887f2da7d2531a25b6 | reddit-archive/reddit1.0 | cookiehash.lisp | ;;;; Copyright 2018 Reddit, Inc.
;;;;
;;;; Permission is hereby granted, free of charge, to any person obtaining a copy of
;;;; this software and associated documentation files (the "Software"), to deal in
the Software without restriction , including without limitation the rights to
;;;; use, copy, modify, merge, pu... | null | https://raw.githubusercontent.com/reddit-archive/reddit1.0/bb4fbdb5871a32709df30540685cf44c637bf203/cookiehash.lisp | lisp | Copyright 2018 Reddit, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
so, subject to the following conditions:
The a... | the Software without restriction , including without limitation the rights to
of the Software , and to permit persons to whom the Software is furnished to do
copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
20b8f751f402a47cac2850d05d39db269dc58e294c693472fb43beab80bee57c | erlanglab/elab | elab_procs.erl | -module(elab_procs).
-export([parse/1,
info/0]).
-define(RE_RUN_OPTION, [{capture, all_names, binary}]).
-define(RE_PATTERN, <<"\\((?<MFA>.*) \\+ ">>).
info() ->
parse(erlang:system_info(procs)).
parse(ProcsBin) ->
{ok, MP} = re:compile(?RE_PATTERN),
parse_dump(binary:split(ProcsBin, <<"\n"... | null | https://raw.githubusercontent.com/erlanglab/elab/a9b2513f37a22bf74dad0607dcac234bba2b8da6/src/elab_procs.erl | erlang | -------------------------
Example of a process dump
-------------------------
=proc:<0.0.0>
Name: init
Spawned as: erl_init:start/2
Spawned by: []
BinVHeap: 0
OldBinVHeap: 0
Last scheduled in for: module1:stack_test3/1">>
arity = 0
0x00007f73e3840220 []
----------------------
Example of a port dump
... | -module(elab_procs).
-export([parse/1,
info/0]).
-define(RE_RUN_OPTION, [{capture, all_names, binary}]).
-define(RE_PATTERN, <<"\\((?<MFA>.*) \\+ ">>).
info() ->
parse(erlang:system_info(procs)).
parse(ProcsBin) ->
{ok, MP} = re:compile(?RE_PATTERN),
parse_dump(binary:split(ProcsBin, <<"\n"... |
b7a6e74ed4470b6b636a8c9cf98b01d665e3da191d58bde9ce59fb7359694e62 | typeclasses/haskell-phrasebook | test-file-handles.hs | main = propertyMain $ withTests 1 $ property do
x <- exeStdout $ phrasebook "file-handles"
strLines x === [ "hello", "False", "world", "True" ]
| null | https://raw.githubusercontent.com/typeclasses/haskell-phrasebook/2b0aa44ef6f6e9745c51ed47b4e59ff704346c87/tests/test-file-handles.hs | haskell | main = propertyMain $ withTests 1 $ property do
x <- exeStdout $ phrasebook "file-handles"
strLines x === [ "hello", "False", "world", "True" ]
| |
d4ba3f690904a01fd345931b7a550040ed4f0b29878cb79a88026d70162b58e7 | yogthos/components-example | core.clj | (ns components-example.core
(:require [components-example.handler :as handler]
[luminus.repl-server :as repl]
[luminus.http-server :as http]
[components-example.config :refer [env]]
[clojure.tools.cli :refer [parse-opts]]
[clojure.tools.logging :as log]
... | null | https://raw.githubusercontent.com/yogthos/components-example/c369bde7916b6d15cb6a8b4ab05c562e16755b2a/src/clj/components_example/core.clj | clojure | (ns components-example.core
(:require [components-example.handler :as handler]
[luminus.repl-server :as repl]
[luminus.http-server :as http]
[components-example.config :refer [env]]
[clojure.tools.cli :refer [parse-opts]]
[clojure.tools.logging :as log]
... | |
4f6c9271aeeb84ce1a02a56b2f54487d72f146c7776a46ded8c970ac98bb5ce4 | ragkousism/Guix-on-Hurd | make-bootstrap.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 , 2014 , 2015 , 2016 < >
Copyright © 2017 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the F... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/make-bootstrap.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 © 2012 , 2013 , 2014 , 2015 , 2016 < >
Copyright © 2017 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages make-bootstrap)
#:use-module ... |
9b9e5066f2372d641aac86ca89bb46c8536834e81ed570a970e4ed38881aab49 | RutledgePaulV/datalogger | provider_test.clj | (ns datalogger.impl.provider-test
(:require [clojure.test :refer :all])
(:import [datalogger.impl provider]))
(deftest getRequestedApiVersion-test
(is (string? (.getRequestedApiVersion (new provider)))))
| null | https://raw.githubusercontent.com/RutledgePaulV/datalogger/2bd99d7bac4f69583c49f98acdfe4aa16de6926d/test/datalogger/impl/provider_test.clj | clojure | (ns datalogger.impl.provider-test
(:require [clojure.test :refer :all])
(:import [datalogger.impl provider]))
(deftest getRequestedApiVersion-test
(is (string? (.getRequestedApiVersion (new provider)))))
| |
ceb5a8f4a021392eb5823ed6e39ddcc2321e4f9861995d38ab1df3065853515a | Cognician/datomic-doc | service.clj | (ns cognician.datomic-doc.service
(:require [cognician.datomic-doc :as dd]
[cognician.datomic-doc.ring :as ring]
[org.httpkit.server :as http]
[ring.util.response :as response]))
(def db-uri
"Fill in your own database uri here, or if you just want to demo,
follow the steps at ... | null | https://raw.githubusercontent.com/Cognician/datomic-doc/93b52e5778a1e1083c4f7b333518bfc8c344a725/src/cognician/datomic_doc/service.clj | clojure |
Web server | (ns cognician.datomic-doc.service
(:require [cognician.datomic-doc :as dd]
[cognician.datomic-doc.ring :as ring]
[org.httpkit.server :as http]
[ring.util.response :as response]))
(def db-uri
"Fill in your own database uri here, or if you just want to demo,
follow the steps at ... |
f76da4beb73d9ba9579c022e9b2e59e0442e3868b2d784955eb3c352f321232e | chiroptical/book-of-monads | FreeStyle.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE DeriveFunctor #
# LANGUAGE TypeOperators #
module FreeStyle where
import Free
data FSF r =
WriteFile FilePath String (Either IOError () -> r)
| ReadFile FilePath (Either IOError String -> r)
d... | null | https://raw.githubusercontent.com/chiroptical/book-of-monads/c2eff1c67a8958b28cfd2001d652f8b68e7c84df/chapter14/src/FreeStyle.hs | haskell | Free r, r :k: * -> * (:k: reads "with kind")
interpret = foldFree interpret'
where
interpret' :: (f :+: g) a -> {M} a
interpret' = _a | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE DeriveFunctor #
# LANGUAGE TypeOperators #
module FreeStyle where
import Free
data FSF r =
WriteFile FilePath String (Either IOError () -> r)
| ReadFile FilePath (Either IOError String -> r)
d... |
58336e267fafecd8c2417be17fcc72cffd71ee65497170eb8984907bea24bb4d | metabase/metabase | cron.clj | (ns metabase.util.cron
"Utility functions for converting frontend schedule dictionaries to cron strings and vice versa.
See -scheduler.org/documentation/quartz-2.x/tutorials/crontrigger.html#format for details on cron
format."
(:require
[clojure.string :as str]
[metabase.util.i18n :as i18n]
[metabase... | null | https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/src/metabase/util/cron.clj | clojure | +----------------------------------------------------------------------------------------------------------------+
| SCHEDULE MAP -> CRON STRING |
+--------------------------------------------------------------------------------------... | (ns metabase.util.cron
"Utility functions for converting frontend schedule dictionaries to cron strings and vice versa.
See -scheduler.org/documentation/quartz-2.x/tutorials/crontrigger.html#format for details on cron
format."
(:require
[clojure.string :as str]
[metabase.util.i18n :as i18n]
[metabase... |
a67694a75f01fdef39b9327b376d151250f89590cae9984fafca838280854175 | travelping/hello | hello_http_client.erl | Copyright 2012 , Travelping GmbH < >
% Permission is hereby granted, free of charge, to any person obtaining a
% copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction , including without limitation
% the rights to use, copy, modify, merge, publish, ... | null | https://raw.githubusercontent.com/travelping/hello/b2697428efe777e8be657d31ca22d80378041d7c/src/transports/hello_http_client.erl | erlang | Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
the rights to use, copy, modify, merge, publish, distribute, sublicense,
Software is furnished to do so, subject to the following conditions:
The above copyright notice... | Copyright 2012 , Travelping GmbH < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EX... |
1fb0b00659df5ae08d8ae9c6383440d001e704e6f8866aad78fd6d902e55f491 | SimulaVR/godot-haskell | InputEventMagnifyGesture.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.InputEventMagnifyGesture
(Godot.Core.InputEventMagni... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/InputEventMagnifyGesture.hs | haskell | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.InputEventMagnifyGesture
(Godot.Core.InputEventMagni... | |
dc2f235e4226a178ecfd30a1b112fa7d53a2227e2710b41c9862e1b9e953ca20 | granule-project/granule | Compiler.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE ApplicativeDo #
{-# LANGUAGE PackageImports #-}
# LANGUAGE TypeApplications #
# LANGUAGE NamedFieldPuns #
module Language.Granule.Compiler where
import Control.Exception (SomeException, displayException, try)
import Control.Monad ((<=<), forM_, when)
import Development.GitRev
im... | null | https://raw.githubusercontent.com/granule-project/granule/aa869e0522ad961f6627e827055700c5fcabfc75/compiler/app/Language/Granule/Compiler.hs | haskell | # LANGUAGE PackageImports #
update globals with extensions
Print to terminal when in debugging mode:
Check and evaluate | # LANGUAGE TemplateHaskell #
# LANGUAGE ApplicativeDo #
# LANGUAGE TypeApplications #
# LANGUAGE NamedFieldPuns #
module Language.Granule.Compiler where
import Control.Exception (SomeException, displayException, try)
import Control.Monad ((<=<), forM_, when)
import Development.GitRev
import Data.Char (isSpace)
import ... |
9319ed4c0f0800d6056dd78d191cd56909e63c3f109747d666f1b0bb658ad9b5 | j-mie6/ParsleyHaskell | CombinatorAST.hs | {-# LANGUAGE OverloadedStrings #-}
module Parsley.Internal.Core.CombinatorAST (module Parsley.Internal.Core.CombinatorAST) where
import Data.Kind (Type)
import Parsley.Internal.Common (IFunctor(..), Fix, Const1(..), cata, intercalateDiff, (:+:))
import Parsley.Internal.Core.Identifier... | null | https://raw.githubusercontent.com/j-mie6/ParsleyHaskell/0386a7a8a9bbad3b2bca688a882755a568bd9beb/parsley-core/src/ghc/Parsley/Internal/Core/CombinatorAST.hs | haskell | # LANGUAGE OverloadedStrings #
| After this combinator exits, a cut has happened
| This combinator requires a cut from below to respect parsec semantics
| This combinator denotes that within its scope, cut semantics are not enforced
@since 1.6.0.0
Instances | module Parsley.Internal.Core.CombinatorAST (module Parsley.Internal.Core.CombinatorAST) where
import Data.Kind (Type)
import Parsley.Internal.Common (IFunctor(..), Fix, Const1(..), cata, intercalateDiff, (:+:))
import Parsley.Internal.Core.Identifiers (MVar, ΣVar)
import Parsley.Inter... |
ad0c5b120529929ccbc1eb3f5aed285c7d1662d703c54baea0569808f833af15 | spawnfest/eep49ers | wxStaticBoxSizer.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2020 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxStaticBoxSizer.erl | erlang |
%CopyrightBegin%
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 lan... | Copyright Ericsson AB 2008 - 2020 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(wxStaticBoxSizer).
-include("wxe.hrl").
-export([destroy/1,getStaticBox/1,new/2,new/3]).
-export([add/2,add... |
3b9c3de553758e9f856ddaf15f22f9fd43448d60c84b749d71c7d28284aeb6e3 | lilactown/helix-todo-mvc | lib.cljc | (ns todo-mvc.lib
#?(:clj (:require [helix.core :as helix]))
#?(:cljs (:require-macros [todo-mvc.lib])))
#?(:clj
(defmacro defnc [type params & body]
(let [opts? (map? (first body)) ;; whether an opts map was passed in
opts (if opts?
(first body)
{})
... | null | https://raw.githubusercontent.com/lilactown/helix-todo-mvc/bd1be0be6388264b70329817348c6cda616b6fdd/src/todo_mvc/lib.cljc | clojure | whether an opts map was passed in
feature flags to enable by default
we use `merge` here to allow indidivual consumers to override feature
flags in special cases | (ns todo-mvc.lib
#?(:clj (:require [helix.core :as helix]))
#?(:cljs (:require-macros [todo-mvc.lib])))
#?(:clj
(defmacro defnc [type params & body]
opts (if opts?
(first body)
{})
body (if opts?
(rest body)
body)
... |
7c5bbc45613a8217f3ab297251f9da87fe77213175677badc63d848dc64fefca | schibsted/spid-tech-docs | definitions.clj | (ns spid-docs.sample-responses.definitions
(:require [clojure.data.codec.base64 :as base64]
[clojure.data.json :as json]
[spid-client-clojure.core :as spid]
[spid-docs.config :as config]
[spid-docs.sample-responses.defsample :refer [defsample]]))
(defn base64-encode [s... | null | https://raw.githubusercontent.com/schibsted/spid-tech-docs/ee6a4394e9732572e97fc3a55506b2d6b9a9fe2b/src/spid_docs/sample_responses/definitions.clj | clojure | Once the user is created, it must also be verified. Unfortunately, this
cannot be done through the API. If the user is not verified, certain API
endpoint that expects a verified user will crash. Before attempting the
generated email. If you want to regenerate the email to find it more easily
in the logs, use GET /... | (ns spid-docs.sample-responses.definitions
(:require [clojure.data.codec.base64 :as base64]
[clojure.data.json :as json]
[spid-client-clojure.core :as spid]
[spid-docs.config :as config]
[spid-docs.sample-responses.defsample :refer [defsample]]))
(defn base64-encode [s... |
f971696bc9e1ef78d4efc5b52abeee23f14aa64aceae1516b8af8128213f6706 | klutometis/clrs | quantiles.scm | (define (quantile-statistics A p r k)
(let* ((n (vector-length A))
(statistics (map (lambda (quantile)
(exact-floor (/ (* quantile n) k)))
(iota (- k 1) 1))))
(filter (lambda (statistic)
(and (>= statistic p)
(<= stati... | null | https://raw.githubusercontent.com/klutometis/clrs/f85a8f0036f0946c9e64dde3259a19acc62b74a1/9.3/quantiles.scm | scheme | (define (quantile-statistics A p r k)
(let* ((n (vector-length A))
(statistics (map (lambda (quantile)
(exact-floor (/ (* quantile n) k)))
(iota (- k 1) 1))))
(filter (lambda (statistic)
(and (>= statistic p)
(<= stati... | |
b80cfe62f1bab7a381e6bb7da24668c78bf1f3ac0f2b091abc2b09b3922f7157 | OCamlPro/liquidity | liquidDot.mli | (****************************************************************************)
(* Liquidity *)
(* *)
Copyright ( C ) 2017 - 2020 OCamlPro SAS
(* ... | null | https://raw.githubusercontent.com/OCamlPro/liquidity/3578de34cf751f54b9e4c001a95625d2041b2962/tools/liquidity/liquidDot.mli | ocaml | **************************************************************************
Liquidity
... | Copyright ( C ) 2017 - 2020 OCamlPro SAS
it under the terms of the GNU General Public License as published by
... |
3f11145c8203d50d2496531999d002efb9bd683d875e9d176daf16a9749d4ad1 | zadean/xqerl | xqerl_mod_db.erl | Copyright ( c ) 2019 - 2020 .
SPDX - FileCopyrightText : 2022
%
SPDX - License - Identifier : Apache-2.0
@doc Implements namespace
-module(xqerl_mod_db).
-include("xqerl.hrl").
-define(NS, <<"">>).
-define(PX, <<"db">>).
-define(XL, <<"">>).
-define(ND, <<"updating">>).
-'module-namespace'({?NS... | null | https://raw.githubusercontent.com/zadean/xqerl/06c651ec832d0ac2b77bef92c1b4ab14d8da8883/src/xqerl_mod_db.erl | erlang |
====================================================================
API functions
==================================================================== | Copyright ( c ) 2019 - 2020 .
SPDX - FileCopyrightText : 2022
SPDX - License - Identifier : Apache-2.0
@doc Implements namespace
-module(xqerl_mod_db).
-include("xqerl.hrl").
-define(NS, <<"">>).
-define(PX, <<"db">>).
-define(XL, <<"">>).
-define(ND, <<"updating">>).
-'module-namespace'({?NS, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.