_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 |
|---|---|---|---|---|---|---|---|---|
6d9e9f97cbfe9a6783e14e3ba35cced5a0b21d16c422a9ab9394e129206fd46d | startling/partly | Setup.hs | #!/usr/bin/env runhaskell
import Distribution.Simple
main = defaultMain | null | https://raw.githubusercontent.com/startling/partly/d23b27910084eede0828bc421d7c1923660826b2/Setup.hs | haskell | #!/usr/bin/env runhaskell
import Distribution.Simple
main = defaultMain | |
ae924c9ef1338e083e7edb736b7ed24844dccbb1e62a959e284f77775462fe44 | overtone/overtone | io.clj | (ns overtone.sc.cgens.io
(:use [overtone.sc.defaults]
[overtone.sc.defcgen]
[overtone.sc.ugens]
[overtone.helpers.seq]))
(defcgen sound-in
"read audio from hardware inputs"
[bus {:default 0 :doc "the channel (or array of channels) to read in. These start at 0, which will correspond to the... | null | https://raw.githubusercontent.com/overtone/overtone/9afb513297662716860a4010bc76a0e73c65ca37/src/overtone/sc/cgens/io.clj | clojure | (ns overtone.sc.cgens.io
(:use [overtone.sc.defaults]
[overtone.sc.defcgen]
[overtone.sc.ugens]
[overtone.helpers.seq]))
(defcgen sound-in
"read audio from hardware inputs"
[bus {:default 0 :doc "the channel (or array of channels) to read in. These start at 0, which will correspond to the... | |
bc7264fc9d132effe06dc8bad435ddfe7189992b9450a129b2aa703a5c941ef7 | spurious/chibi-scheme-mirror | srfi-38-tests.scm |
(cond-expand
(chibi (import (chibi) (chibi test) (srfi 1) (srfi 38)))
(chicken (use chicken test srfi-38)))
(test-begin "read/write")
(define (read-from-string str)
(call-with-input-string str
(lambda (in) (read/ss in))))
(define (write-to-string x . o)
(call-with-output-string
(lambda (out) (apply wr... | null | https://raw.githubusercontent.com/spurious/chibi-scheme-mirror/49168ab073f64a95c834b5f584a9aaea3469594d/tests/srfi-38-tests.scm | scheme |
(cond-expand
(chibi (import (chibi) (chibi test) (srfi 1) (srfi 38)))
(chicken (use chicken test srfi-38)))
(test-begin "read/write")
(define (read-from-string str)
(call-with-input-string str
(lambda (in) (read/ss in))))
(define (write-to-string x . o)
(call-with-output-string
(lambda (out) (apply wr... | |
024155506e03efd209bc1ee29f18917611fe53c5b85352b5fe3151e4adca6a4a | mokus0/junkbox | Underscore.hs | # LANGUAGE TemplateHaskell #
module Underscore where
import Language.Haskell.TH
import Language.Haskell.TH.Quote
underscore = QuasiQuoter
{ quoteExp = underscoreE
, quotePat = const [p| _ |]
, quoteType = const underscoreT
, quoteDec = undefined
}
underscoreE msg = [| error msg |]
underscoreT = d... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/Template%20Haskell/Underscore.hs | haskell | # LANGUAGE TemplateHaskell #
module Underscore where
import Language.Haskell.TH
import Language.Haskell.TH.Quote
underscore = QuasiQuoter
{ quoteExp = underscoreE
, quotePat = const [p| _ |]
, quoteType = const underscoreT
, quoteDec = undefined
}
underscoreE msg = [| error msg |]
underscoreT = d... | |
4b5f1c096f54b198b5c8ff91549e6bda2c2d91afadfd3c57f1b00e9785886159 | BillHallahan/G2 | M44.hs | {-@ LIQUID "--no-termination" @-}
module M44 (main) where
@ main : : Int - > Int - > { b : | b } @
main :: Int -> Int -> Bool
main k flag =
case while (cond k) (loop flag (if flag == 1 then 1 else 2) k) (0, 0) of
(i', j') -> if flag == 1 then j' == i' else True
while :: (a -> Bool) -> (a -> a) -> a -> a
wh... | null | https://raw.githubusercontent.com/BillHallahan/G2/f2584eb2ec211aed73b3ccd88c6e232c3cf4386d/tests/LiquidInf/Paper/Eval/CompareVerified/M44.hs | haskell | @ LIQUID "--no-termination" @
@ cond :: Int -> (Int, Int) -> Bool @ |
module M44 (main) where
@ main : : Int - > Int - > { b : | b } @
main :: Int -> Int -> Bool
main k flag =
case while (cond k) (loop flag (if flag == 1 then 1 else 2) k) (0, 0) of
(i', j') -> if flag == 1 then j' == i' else True
while :: (a -> Bool) -> (a -> a) -> a -> a
while pred body x = if pred x then w... |
97683d0c44bc40af06909bf6e8cfc5bd2975dda6962be81fb172d0708b2bf773 | UBTECH-Walker/WalkerSimulationFor2020WAIC | EcatGetPVT.lisp | ; Auto-generated. Do not edit!
(cl:in-package servo_ctrl-srv)
// ! \htmlinclude
(cl:defclass <EcatGetPVT-request> (roslisp-msg-protocol:ros-message)
((servo
:reader servo
:initarg :servo
:type cl:string
:initform ""))
)
(cl:defclass EcatGetPVT-request (<EcatGetPVT-request>)
())
(cl:defmethod... | null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_16.04_v1.2_20200616/walker_install/share/common-lisp/ros/servo_ctrl/srv/EcatGetPVT.lisp | lisp | Auto-generated. Do not edit!
//! \htmlinclude EcatGetPVT-response.msg.html |
(cl:in-package servo_ctrl-srv)
// ! \htmlinclude
(cl:defclass <EcatGetPVT-request> (roslisp-msg-protocol:ros-message)
((servo
:reader servo
:initarg :servo
:type cl:string
:initform ""))
)
(cl:defclass EcatGetPVT-request (<EcatGetPVT-request>)
())
(cl:defmethod cl:initialize-instance :after ... |
9cae1ec7fe7ba90871fa0b43c954d4eb7c6d52009d8b912bdb203686c87ee419 | TerrorJack/ghc-alter | PrimopWrappers.hs | {-# LANGUAGE MagicHash, NoImplicitPrelude, UnboxedTuples #-}
module GHC.PrimopWrappers where
import qualified GHC.Prim
import GHC.Tuple ()
import GHC.Prim (Char#, Int#, Word#, Float#, Double#, State#, MutableArray#, Array#, SmallMutableArray#, SmallArray#, MutableByteArray#, ByteArray#, Addr#, StablePtr#, MutableArrayA... | null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/ghc-prim/GHC/PrimopWrappers.hs | haskell | # LANGUAGE MagicHash, NoImplicitPrelude, UnboxedTuples #
# NOINLINE geChar# #
# NOINLINE neChar# #
# NOINLINE (*#) #
# NOINLINE (==#) #
# NOINLINE (/=#) #
# NOINLINE uncheckedIShiftL# #
# NOINLINE timesWord# #
# NOINLINE quotRemWord# #
# NOINLINE popCnt16# #
# NOINLINE (==##) #
# NOINLINE (/=##) #
# NOINLINE double2Flo... | module GHC.PrimopWrappers where
import qualified GHC.Prim
import GHC.Tuple ()
import GHC.Prim (Char#, Int#, Word#, Float#, Double#, State#, MutableArray#, Array#, SmallMutableArray#, SmallArray#, MutableByteArray#, ByteArray#, Addr#, StablePtr#, MutableArrayArray#, ArrayArray#, MutVar#, RealWorld, TVar#, MVar#, ThreadI... |
c023c88bab15159e1780af7859c65452c664319ad8171378dcc9afc6a55d3661 | ocurrent/mirage-ci | website.ml | module Git = Current_git
module Github = Current_github
module Website_description = struct
open Tyxml_html
let extra_routes = []
module Output = struct
type t = unit
let marshal () = ""
let unmarshal _ = ()
open Tyxml_html
let render_inline () = txt ""
end
module Node = struct
... | null | https://raw.githubusercontent.com/ocurrent/mirage-ci/b83807d40c802663df50340c0e1ba1dc694df055/src/website/website.ml | ocaml | the exposed metadata | module Git = Current_git
module Github = Current_github
module Website_description = struct
open Tyxml_html
let extra_routes = []
module Output = struct
type t = unit
let marshal () = ""
let unmarshal _ = ()
open Tyxml_html
let render_inline () = txt ""
end
module Node = struct
... |
0d79f658d24b1b4610bdaa84c15945f770b63130053373ace2fa4df16ed93b19 | adamwalker/clash-utils | FieldExtractSpec.hs | module FieldExtractSpec where
import qualified Clash.Prelude as Clash
import Clash.Prelude (Signal, Vec(..), BitVector, Index, Signed, Unsigned, SFixed, Bit, SNat(..),
simulate, simulate_lazy, listToVecTH, KnownNat, pack, unpack, (++#), mealy, mux, bundle, unbundle,
HiddenC... | null | https://raw.githubusercontent.com/adamwalker/clash-utils/375c61131e21e9a239b80bdb929ae77f156d056f/tests/FieldExtractSpec.hs | haskell | module FieldExtractSpec where
import qualified Clash.Prelude as Clash
import Clash.Prelude (Signal, Vec(..), BitVector, Index, Signed, Unsigned, SFixed, Bit, SNat(..),
simulate, simulate_lazy, listToVecTH, KnownNat, pack, unpack, (++#), mealy, mux, bundle, unbundle,
HiddenC... | |
1dfecf0d70631b1098b907500d82992b73de556408a8f80ecb5f0236102f73a6 | haskell-works/hw-xml | Types.hs | module HaskellWorks.Data.Xml.Token.Types (XmlToken(..)) where
data XmlToken s d
= XmlTokenBraceL
| XmlTokenBraceR
| XmlTokenBracketL
| XmlTokenBracketR
| XmlTokenComma
| XmlTokenColon
| XmlTokenWhitespace
| XmlTokenString s
| XmlTokenBoolean Bool
| XmlTokenNumber d
| XmlTokenNull
deriving (Eq, ... | null | https://raw.githubusercontent.com/haskell-works/hw-xml/e30a4cd8e6dc7451263a3d45c1ae28b3f35d0079/src/HaskellWorks/Data/Xml/Token/Types.hs | haskell | module HaskellWorks.Data.Xml.Token.Types (XmlToken(..)) where
data XmlToken s d
= XmlTokenBraceL
| XmlTokenBraceR
| XmlTokenBracketL
| XmlTokenBracketR
| XmlTokenComma
| XmlTokenColon
| XmlTokenWhitespace
| XmlTokenString s
| XmlTokenBoolean Bool
| XmlTokenNumber d
| XmlTokenNull
deriving (Eq, ... | |
61ecec41586d9ceeef108e14cba7e6866e4ccf2aac7cf49d7ceba316b8c27b2d | input-output-hk/plutus | BasicPlutusTx.hs | -- BLOCK1
-- Necessary language extensions for the Plutus Tx compiler to work.
{-# LANGUAGE DataKinds #-}
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module BasicPlutusTx where
import PlutusCore.Default qualified as PLC
-- Main Plutus Tx module.
import... | null | https://raw.githubusercontent.com/input-output-hk/plutus/bb9b5a18c26476fbf6b2f446ab267706426fec3a/doc/read-the-docs-site/tutorials/BasicPlutusTx.hs | haskell | BLOCK1
Necessary language extensions for the Plutus Tx compiler to work.
# LANGUAGE DataKinds #
Main Plutus Tx module.
Additional support for lifting.
Setup for doctest examples.
$setup
>>> import Data.Text.Prettyprint.Doc
BLOCK2
|
>>> pretty $ getPlc integerIdentity
(program 1.0.0
(lam ds (con int... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module BasicPlutusTx where
import PlutusCore.Default qualified as PLC
import PlutusTx
import PlutusTx.Lift
Builtin functions .
import PlutusTx.Builtins
The Plutus Tx Prelude , discussed further below .
import Plutu... |
157843ee5b8fedae709d88197e895213e57ca92ff42641c191417cfaaa8498b9 | haskell-waargonaut/waargonaut | Test.hs | {-# LANGUAGE RankNTypes #-}
-- | Helper functions for testing your 'Decoder' and 'Encoder' functions.
--
module Waargonaut.Test
( roundTripSimple
) where
import Data.Text (Text)
import qualified Data.Text.Lazy as TextL
import Text.Parser.Char (CharParsing)
impor... | null | https://raw.githubusercontent.com/haskell-waargonaut/waargonaut/ba1dbbc170c2279749ea29bc8aaf375bdb659ad2/src/Waargonaut/Test.hs | haskell | # LANGUAGE RankNTypes #
| Helper functions for testing your 'Decoder' and 'Encoder' functions.
| Test a 'Encoder' and 'Decoder' pair are able to maintain the "round trip"
property. That is, if you encode a given value, and then decode it, you should
have the exact same value that you started with. | module Waargonaut.Test
( roundTripSimple
) where
import Data.Text (Text)
import qualified Data.Text.Lazy as TextL
import Text.Parser.Char (CharParsing)
import Waargonaut.Encode (Encoder)
import qualified Waargonaut.Encode as E
import ... |
db59ea4b2b559ea73622244dfa2c3a1deb1977bdd9eb8c604ea7bfa2f833c12a | haskell-opengl/OpenGL | DisplayLists.hs | --------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.DisplayLists
Copyright : ( c ) 2002 - 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
This module corresponds to... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGL/f7af8fe04b0f19c260a85c9ebcad612737cd7c8c/src/Graphics/Rendering/OpenGL/GL/DisplayLists.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.Rendering.OpenGL.GL.DisplayLists
License : BSD3
Stability : stable
Portability : portable
specs.
------------------------------------------------------------------------------
* Defining Display L... | Copyright : ( c ) 2002 - 2019
Maintainer : < >
This module corresponds to section 5.4 ( Display Lists ) of the OpenGL 2.1
module Graphics.Rendering.OpenGL.GL.DisplayLists (
DisplayList(DisplayList), ListMode(..), defineList, defineNewList, listIndex,
listMode, maxListNesting,
callList, ca... |
2a706c551bbb80e40edaa92f4116584dba0e2de1e876290bbe18f78fa7c53e03 | facebook/duckling | Rules.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
module Duckling.AmountOfM... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/AmountOfMoney/KA/Rules.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
# LANGUAGE LambdaCase #
module Duckling.AmountOfMoney.KA.Rules
( rules
) where
import Data.Maybe
import Data.String
import Prelude
import qualified Data.Text as Text
import Duckling.AmountOfMoney.Helpers
import Duckling.AmountOfMoney.Types (Currency(..), Amoun... |
955be4e1cfa9ddefaaed4819e56ce1e12675997251410ff53d1ead24426cf094 | ocamllabs/vscode-ocaml-platform | platform.ml | open Import
type t =
| Win32
| Darwin
| Linux
| Other
let of_string = function
| "win32" -> Win32
| "darwin" -> Darwin
| "linux" -> Linux
| _ -> Other
let t = of_string Process.platform
module Map = struct
type 'a t =
{ win32 : 'a
; darwin : 'a
; linux : 'a
; other : 'a
}
le... | null | https://raw.githubusercontent.com/ocamllabs/vscode-ocaml-platform/300e2be30839a05c79218af4d7e4a87818fb368e/src/platform.ml | ocaml | open Import
type t =
| Win32
| Darwin
| Linux
| Other
let of_string = function
| "win32" -> Win32
| "darwin" -> Darwin
| "linux" -> Linux
| _ -> Other
let t = of_string Process.platform
module Map = struct
type 'a t =
{ win32 : 'a
; darwin : 'a
; linux : 'a
; other : 'a
}
le... | |
152f5962e1e62e0d7ed6b9adbf274a31a4e7feca018a118af8095ed775c156e7 | janestreet/async_smtp | test_helper.mli | open! Core
open! Async
open Async_smtp_types
(** This module provides helpers for writing expect tests for testing
[Async_smtp] and [Async_smtp.Server] plugins.
*)
type 'a smtp_flags =
?tls:bool
* [ tls ] pretends that START_TLS was negotiated successfully ( default : false )
-> 'a
type 'a server_flags =
?... | null | https://raw.githubusercontent.com/janestreet/async_smtp/c2c1f8b7b27f571a99d2f21e8a31ce150fbd6ced/src/test_helper.mli | ocaml | * This module provides helpers for writing expect tests for testing
[Async_smtp] and [Async_smtp.Server] plugins.
* [max_message_size] limits the size of messages accepted by the server.
(default: no practical limit)
* [malformed_emails] indicates how a malformed email should be handled.
(default: [`R... | open! Core
open! Async
open Async_smtp_types
type 'a smtp_flags =
?tls:bool
* [ tls ] pretends that START_TLS was negotiated successfully ( default : false )
-> 'a
type 'a server_flags =
?max_message_size:Byte_units.t
-> ?malformed_emails:[ `Reject | `Wrap ]
-> ?server_log:[ Log.Level.t | `None ]
* [ ] co... |
90cc749385173479e8f001108795383baf8b38e00a0d9372b664c88292b515f0 | luminus-framework/luminus-template | auth_jwe.clj | (ns leiningen.new.auth-jwe
(:require [leiningen.new.common :refer :all]))
(defn auth-jwe-features [[assets options :as state]]
(if (some #{"+auth-jwe"} (:features options))
[assets
(-> options
(append-formatted :auth-jwe
[['buddy.auth.backends.token :refer ['jw... | null | https://raw.githubusercontent.com/luminus-framework/luminus-template/3278aa727cef0a173ed3ca722dfd6afa6b4bbc8f/src/leiningen/new/auth_jwe.clj | clojure | (ns leiningen.new.auth-jwe
(:require [leiningen.new.common :refer :all]))
(defn auth-jwe-features [[assets options :as state]]
(if (some #{"+auth-jwe"} (:features options))
[assets
(-> options
(append-formatted :auth-jwe
[['buddy.auth.backends.token :refer ['jw... | |
24929333e282175966cbf8f7f3db727860d32379021d95d8979988eef1553360 | TrustInSoft/tis-interpreter | oneret.ml | Modified by TrustInSoft
(****************************************************************************)
(* *)
Copyright ( C ) 2001 - 2003
< >
(* Scott M... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/kernel_internals/typing/oneret.ml | ocaml | **************************************************************************
Scott McPeak <>
All rights reserved.
... | Modified by TrustInSoft
Copyright ( C ) 2001 - 2003
< >
< >
< >
1 . Redistributions of source code must retain the above copyright ... |
020c4f2e49bb4c7c7a9e6a2c2b3c2125732528740e7f0c147faf621925e81431 | PDP-10/panda | extstr.lsp | EXTSTR -*-Mode : Lisp;Package : SI;Lowercase : T-*-
;;; ****************************************************************
* * * * * * * EXTended datatype scheme , basic STRuctures * * * *
;;; ****************************************************************
* * ( c ) Copyright 1981 Massachusett... | null | https://raw.githubusercontent.com/PDP-10/panda/522301975c062914ea3d630a1daefde261ddf590/files/maclisp/extstr.lsp | lisp | Package : SI;Lowercase : T-*-
****************************************************************
****************************************************************
****************************************************************
Wherein we build HUNKs for each class that will be directly pointed to
will su... | * * * * * * * EXTended datatype scheme , basic STRuctures * * * *
* * ( c ) Copyright 1981 Massachusetts Institute of Technology * * * *
(herald EXTSTR /91)
(eval-when (eval compile)
(load '((lisp) subload))
(subload EXTBAS)
(subload EXTMAC)
This would like to be a SUBLOAD of VECTOR , but ... |
21e8f51bf27ef8ae5290e24689a95f19cf746f96f81555d364be8d437762b3d4 | bcc32/advent-of-code | points.ml | open! Core
open! Async
open! Import
type t = Point.t list
let step = List.map ~f:Point.step
let span_exn (t : t) =
match t with
| [] -> invalid_arg "span_exn"
| hd :: tl ->
List.fold
tl
~init:((hd.x, hd.y), (hd.x, hd.y))
~f:(fun ((min_x, min_y), (max_x, max_y)) { x; y; _ } ->
(Int... | null | https://raw.githubusercontent.com/bcc32/advent-of-code/653c0f130e2fb2f599d4e76804e02af54c9bb19f/2018/10/points.ml | ocaml | x and y inverted | open! Core
open! Async
open! Import
type t = Point.t list
let step = List.map ~f:Point.step
let span_exn (t : t) =
match t with
| [] -> invalid_arg "span_exn"
| hd :: tl ->
List.fold
tl
~init:((hd.x, hd.y), (hd.x, hd.y))
~f:(fun ((min_x, min_y), (max_x, max_y)) { x; y; _ } ->
(Int... |
69cd448360f0139364dbde6ee51793f2cd00d8073457d00f0bcd6998d28f4583 | deadcode/Learning-CL--David-Touretzky | 7.21.lisp | ;;; Not-all-odd == true even if a single number is not odd
;;; Better defined as any-even
(defun not-all-odd (x)
(find-if
#'(lambda (n) (not (oddp n)))
x))
(let ((foo '(not-all-odd '(1 3 5 -3 7 11)))
(bar '(not-all-odd '(1 3 0 5 7 9 11))))
(format t "~s = ~s~%" foo (eval foo))
(format t "... | null | https://raw.githubusercontent.com/deadcode/Learning-CL--David-Touretzky/b4557c33f58e382f765369971e6a4747c27ca692/Chapter%207/7.21.lisp | lisp | Not-all-odd == true even if a single number is not odd
Better defined as any-even
| (defun not-all-odd (x)
(find-if
#'(lambda (n) (not (oddp n)))
x))
(let ((foo '(not-all-odd '(1 3 5 -3 7 11)))
(bar '(not-all-odd '(1 3 0 5 7 9 11))))
(format t "~s = ~s~%" foo (eval foo))
(format t "~s = ~s~%" bar (eval bar)))
|
0e5fe3c824673eb63ccb8b6b9ccb5e7a7ee73ffe90fd1bdce9c41395fc02b717 | pfdietz/ansi-test | phase.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Sep 6 21:15:54 2003
;;;; Contains: Tests of PHASE
(deftest phase.error.1
(signals-error (phase) program-error)
t)
(deftest phase.error.2
(signals-error (phase 0 0) program-error)
t)
(deftest phase.error.3
(check-type-error #'phase #'numberp)
n... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/numbers/phase.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of PHASE
Negative zeros | Author :
Created : Sat Sep 6 21:15:54 2003
(deftest phase.error.1
(signals-error (phase) program-error)
t)
(deftest phase.error.2
(signals-error (phase 0 0) program-error)
t)
(deftest phase.error.3
(check-type-error #'phase #'numberp)
nil)
(deftest phase.1
(eqlt (phase 0) 0.0f0)
t)
(... |
98ce7acfec5397e529adb7d3dfafc4508ba69571bf51aeeb171bd5d6411e0b05 | silverpond/hat | relationships_test.clj | (ns hat.relationships-test
(:require [clojure.test :refer :all]
[hat.controllers :refer [the-intermediate-step]]
[hat.descriptions :refer [generate-description]]
[hat.relationships :refer [one-to-many]]))
(def hosts-description
(generate-description
{:singular-name ... | null | https://raw.githubusercontent.com/silverpond/hat/4e4a5dd89cac29c0a0cf68e4f02b76523e096276/test/hat/relationships_test.clj | clojure | (ns hat.relationships-test
(:require [clojure.test :refer :all]
[hat.controllers :refer [the-intermediate-step]]
[hat.descriptions :refer [generate-description]]
[hat.relationships :refer [one-to-many]]))
(def hosts-description
(generate-description
{:singular-name ... | |
648bd109f39b9363f019dafabe006e5c6d6738cf1f66ea5aad5397483ab6d4b9 | aeternity/aeternity | aec_next_nonce.erl | -module(aec_next_nonce).
-export([pick_for_account/1,
pick_for_account/2]).
-include("blocks.hrl").
%% It assumes that in order to pick a nonce for a transaction
%% account has to be present in state tree.
It implies that user can not pick a nonce to create a transaction ( e.g. spend tx )
%% to put it int... | null | https://raw.githubusercontent.com/aeternity/aeternity/e8ffe6822bcd651e99798057511c8764f09a79b1/apps/aecore/src/aec_next_nonce.erl | erlang | It assumes that in order to pick a nonce for a transaction
account has to be present in state tree.
to put it into the mempool until either
- some funds are transferred to user's account
or
- user mined a block, which was already added to the chain.
prepend the account nonce this relies on it being
smallest num... | -module(aec_next_nonce).
-export([pick_for_account/1,
pick_for_account/2]).
-include("blocks.hrl").
It implies that user can not pick a nonce to create a transaction ( e.g. spend tx )
-spec pick_for_account(aec_keys:pubkey()) -> {ok, non_neg_integer()} |
{error, account... |
f11806da4193e051075de797efc619f8bdc6470a4dbef3b4d1d30a5d423bec44 | hlship/cli-tools | impl.clj | (ns ^:no-doc net.lewisship.cli-tools.impl
"Private namespace for implementation details for new.lewisship.cli-tools, subject to change."
(:require [clojure.string :as str]
[io.aviso.ansi :as ansi]
[clojure.tools.cli :as cli]
[clj-fuzzy.metrics :as m]
[clojure.java.io ... | null | https://raw.githubusercontent.com/hlship/cli-tools/9441c1e0711c1aa4b1c606584c01844d3875eb75/src/net/lewisship/cli_tools/impl.clj | clojure | If in testing mode ...
better-cond has some dependencies
Standard case
There's always at least -h/--help:
For indentation
The label is required, then it's the optional documentation string
:id is actually set from the local symbol
Do some validation before returning the seq of positional specs (each a map)
Use... | (ns ^:no-doc net.lewisship.cli-tools.impl
"Private namespace for implementation details for new.lewisship.cli-tools, subject to change."
(:require [clojure.string :as str]
[io.aviso.ansi :as ansi]
[clojure.tools.cli :as cli]
[clj-fuzzy.metrics :as m]
[clojure.java.io ... |
69c78cb32527fadd70dfcd59c3d32a89021781e72de966d3ab89ccfa5dba1de6 | alexwl/haskell-code-explorer | FileAfterPreprocessor.hs | 1 File.hs
2 File.hs
3 File.hs
4 File.hs
5 File.hs
6 File.hs
7 File.hs
# 1 "File1.hs" 1
1 File1.hs
2 File1.hs
# 14 "File1.hs"
# 1 "File2.hs" 1
1 File2.hs
2 File2.hs
3 File2.hs
4 File2.hs
5 File2.hs
# 15 "File1.hs" 2
15 File1.hs
16 File1.hs
# 9 "File.hs" 2
9 File.hs
# 18 "File.hs"
18 File.hs
19 File.hs
# 1 "File3.hs" 1
1... | null | https://raw.githubusercontent.com/alexwl/haskell-code-explorer/2f1c2a4c87ebd55b8a335bc4670eec875af8b4c4/test/data/FileAfterPreprocessor.hs | haskell | 1 File.hs
2 File.hs
3 File.hs
4 File.hs
5 File.hs
6 File.hs
7 File.hs
# 1 "File1.hs" 1
1 File1.hs
2 File1.hs
# 14 "File1.hs"
# 1 "File2.hs" 1
1 File2.hs
2 File2.hs
3 File2.hs
4 File2.hs
5 File2.hs
# 15 "File1.hs" 2
15 File1.hs
16 File1.hs
# 9 "File.hs" 2
9 File.hs
# 18 "File.hs"
18 File.hs
19 File.hs
# 1 "File3.hs" 1
1... | |
e5082c10ac31f4781b598cb5b594aff7a73dc72457c6270ed44e0a97d59f03d5 | ZHaskell/stdio | Checked.hs | # LANGUAGE TypeFamilies #
# LANGUAGE UnboxedTuples #
|
Module : Std . Data . Array . Checked
Description : Bounded checked boxed and unboxed arrays
Copyright : ( c ) , 2017 - 2019
License : BSD
Maintainer :
Stability : experimental
Portability : non - portable
This module provi... | null | https://raw.githubusercontent.com/ZHaskell/stdio/7887b9413dc9feb957ddcbea96184f904cf37c12/std-data/Std/Data/Array/Checked.hs | haskell | * Bound checked array operations
* No bound checked operations
* Boxed array type
* Primitive array type
* Bound checked primitive array operations
* No bound checked primitive array operations
* Unlifted array type
* The 'ArrayException' type
# INLINE check #
# INLINE indexArr' #
| New size should be >= 0, an... | # LANGUAGE TypeFamilies #
# LANGUAGE UnboxedTuples #
|
Module : Std . Data . Array . Checked
Description : Bounded checked boxed and unboxed arrays
Copyright : ( c ) , 2017 - 2019
License : BSD
Maintainer :
Stability : experimental
Portability : non - portable
This module provi... |
07421d7cd7bb2cd4ccb7bd3473db3d135eac6affa404cb8d4409bf6b1b9a3483 | aligusnet/astro | SunInternalsTest.hs | module Data.Astro.Sun.SunInternalsTest
(
tests
)
where
import Test.Framework (testGroup)
import Test.Framework.Providers.HUnit
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.HUnit
import Test.HUnit.Approx
import Test.QuickCheck
import Data.Astro.Utils (reduceToZeroRange)
import Data.Astro.S... | null | https://raw.githubusercontent.com/aligusnet/astro/a8c951885061ccef98299af053fdc1a1cc808f17/test/Data/Astro/Sun/SunInternalsTest.hs | haskell | module Data.Astro.Sun.SunInternalsTest
(
tests
)
where
import Test.Framework (testGroup)
import Test.Framework.Providers.HUnit
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.HUnit
import Test.HUnit.Approx
import Test.QuickCheck
import Data.Astro.Utils (reduceToZeroRange)
import Data.Astro.S... | |
e82cfbf55a9a5618b4b2c772d322fb4b4d7152b7099ec45bca79e5ca847c6662 | formal-land/coq-of-ocaml | gadts_record.ml | type 'a term =
| T_Int : int -> int term
| T_String : string -> string term
| T_Pair : 'a term * 'b term -> ('a * 'b) term
| T_Rec : { x : 'a term; y : 'b } -> ('a * 'b) term
[@@coq_tag_gadt]
let rec interp : type a. a term -> a = function
| T_Int n -> n
| T_String s -> s
| T_Pair (p1, p2) -> (interp p1,... | null | https://raw.githubusercontent.com/formal-land/coq-of-ocaml/c9c86b08eb19d7fd023f48029cc5f9bf53f6a11c/tests/gadts_record.ml | ocaml | type 'a term =
| T_Int : int -> int term
| T_String : string -> string term
| T_Pair : 'a term * 'b term -> ('a * 'b) term
| T_Rec : { x : 'a term; y : 'b } -> ('a * 'b) term
[@@coq_tag_gadt]
let rec interp : type a. a term -> a = function
| T_Int n -> n
| T_String s -> s
| T_Pair (p1, p2) -> (interp p1,... | |
2e0cbaf9041aaf992ab61194fa7e9dd1868f04efa158841667b1b3db1e73b14f | cblp/python5 | Control.hs |
Python5 — a hypothetic language
Copyright ( C ) 2015 -
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) ... | null | https://raw.githubusercontent.com/cblp/python5/897b7bbb7b522fa5653eff10b9ae616a4e01b6ff/python5/tests/Control.hs | haskell |
Python5 — a hypothetic language
Copyright ( C ) 2015 -
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) ... | |
0d815588b32e0d63aa6946130d41a5051d5a23e8951cb65e49272d09edd80774 | justinmeiners/exercises | 2_42.scm | (use srfi-1)
(define (enumerate-interval start end)
(if (> start end)
'()
(cons start (enumerate-interval (+ 1 start) end))))
(define (flatmap proc seq)
(fold-right append '() (map proc seq)))
(define empty-board '())
(define (adjoin-position row column positions)
(cons (cons row column)... | null | https://raw.githubusercontent.com/justinmeiners/exercises/9491bc16925eae12e048ccd3f424b870ebdc73aa/sicp/2/2_42.scm | scheme | append to front
I slightly modified this from the excercise
k is unnecessary since the one to test is at the front | (use srfi-1)
(define (enumerate-interval start end)
(if (> start end)
'()
(cons start (enumerate-interval (+ 1 start) end))))
(define (flatmap proc seq)
(fold-right append '() (map proc seq)))
(define empty-board '())
(define (adjoin-position row column positions)
(define (collides-row? pos... |
85bc53ad1f312984ee3b1bc4c7d7eab3c3629fc2b7e11409f389e638f19abe42 | racket/rhombus-prototype | and_meta.rkt | #lang racket/base
(require "../private/bounce.rkt")
(bounce "../static.rkt"
"meta.rkt")
(module reader syntax/module-reader
#:language 'rhombus/static/and_meta
#:read (lambda (in) (list (syntax->datum (parse-all in))))
#:read-syntax (lambda (src in) (list (parse-all in #:source src)))
#:info rhombus:g... | null | https://raw.githubusercontent.com/racket/rhombus-prototype/692dfda43c0d6c5a2bb0298cc5f0445125f3c567/rhombus/static/and_meta.rkt | racket | #lang racket/base
(require "../private/bounce.rkt")
(bounce "../static.rkt"
"meta.rkt")
(module reader syntax/module-reader
#:language 'rhombus/static/and_meta
#:read (lambda (in) (list (syntax->datum (parse-all in))))
#:read-syntax (lambda (src in) (list (parse-all in #:source src)))
#:info rhombus:g... | |
fd90acb6a2583b254e3fc9ed040cdfc5f70d74d7a65aa61006befd1c78307e6c | juspay/atlas | Time.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/atlas-transport/test/src/Fixtures/Time.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | |
a889ce734e130d4c1cee10aaa532cc0dc4963ff138d3e9afdeebb5016d1d1e86 | fiddlerwoaroof/alimenta | alimenta.lisp | alimenta.lisp -*- tab - width : 8 ; -*-
( declaim ( optimize ( speed 0 ) ( safety 3 ) ( debug 3 ) ) )
(in-package #:alimenta)
(defclass feed-entity ()
((title :initarg :title :initform nil :accessor title)
(link :initarg :link :initform nil :accessor link)
(doc :initarg :doc :initform nil :accessor doc)... | null | https://raw.githubusercontent.com/fiddlerwoaroof/alimenta/2806d56a06a59bfc9d76286a871b170fa1126a72/alimenta.lisp | lisp | -*-
(defun generate-xml (feed &key (feed-type :rss))
(%generate-xml feed feed-type))
(with-accessors ((items items)) feed
(loop for item across (get-items xml-dom type)
do (push (make-item xml-dom type) items)
finally (return items)))) | ( declaim ( optimize ( speed 0 ) ( safety 3 ) ( debug 3 ) ) )
(in-package #:alimenta)
(defclass feed-entity ()
((title :initarg :title :initform nil :accessor title)
(link :initarg :link :initform nil :accessor link)
(doc :initarg :doc :initform nil :accessor doc)))
(defgeneric belongs-to (feed-entity)
... |
e0903cbb386c817413ab5415bf27bf8d4e51f1f8a466d0e833b8ef50929eab92 | infi-nl/alibi | task.clj | (ns alibi.domain.task
(:refer-clojure :exclude [get])
(:require
[alibi.domain.billing-method :refer [billing-method?]]
[clojure.set :refer [rename-keys]]))
(defrecord Task [task-id billing-method name project-id])
(defn hydrate-task
[{:keys [task-id billing-method] :as cmd}]
{:pre [(integer? task-id)
... | null | https://raw.githubusercontent.com/infi-nl/alibi/00e97340ebff483f0ecbb3eef929a4052adbc78b/src/alibi/domain/task.clj | clojure | (ns alibi.domain.task
(:refer-clojure :exclude [get])
(:require
[alibi.domain.billing-method :refer [billing-method?]]
[clojure.set :refer [rename-keys]]))
(defrecord Task [task-id billing-method name project-id])
(defn hydrate-task
[{:keys [task-id billing-method] :as cmd}]
{:pre [(integer? task-id)
... | |
c82a5c8c918124bab3b4a7e7f28b8606ca353b638f16e972b1f21cbfe3e2162d | oakes/Paravim | scroll.cljc | (ns paravim.scroll
(:require [paravim.constants :as constants]
[play-cljc.transforms :as t]
#?(:clj [play-cljc.macros-java :refer [math]]
:cljs [play-cljc.macros-js :refer-macros [math]])))
(def ^:const scroll-speed 40)
(def ^:const scroll-limit 10) ;; per scroll, not cumulati... | null | https://raw.githubusercontent.com/oakes/Paravim/871b9adf4e9819a7b9f2c63466c55640f0f8c280/src/paravim/scroll.cljc | clojure | per scroll, not cumulative limit
make the left edge "sticky" so it doesn't move unintentionally
restrict the offsets to discard excessive values
flip the sign because the camera must go the opposite direction | (ns paravim.scroll
(:require [paravim.constants :as constants]
[play-cljc.transforms :as t]
#?(:clj [play-cljc.macros-java :refer [math]]
:cljs [play-cljc.macros-js :refer-macros [math]])))
(def ^:const scroll-speed 40)
(def ^:const min-scroll-speed 5)
(def ^:const deceleratio... |
95418cb57e97cdcce28bb7010778fb6f7f27ee3fc8bfd6698cfb54acfbedee05 | johnwhitington/ocamli | example07.ml | type 'a sequence = Nil | Cons of 'a * 'a sequence
let rec length s =
match s with
Nil -> 0
| Cons (_, t) -> 1 + length t
let rec append a b =
match a with
Nil -> b
| Cons (h, t) -> Cons (h, append t b)
| null | https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/OCaml%20from%20the%20Very%20Beginning/Chapter%2010/example07.ml | ocaml | type 'a sequence = Nil | Cons of 'a * 'a sequence
let rec length s =
match s with
Nil -> 0
| Cons (_, t) -> 1 + length t
let rec append a b =
match a with
Nil -> b
| Cons (h, t) -> Cons (h, append t b)
| |
8e0ff18683e79ffdaad3b8e9d52b145b20ba49015fe4e70b0c85e072a398bb6b | ptol/oczor | CodeGenAst.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
module Oczor.Converter.CodeGenAst (module Oczor.Converter.CodeGenAst) where
import Data.Functor.Foldable.TH
import Data.Functor.Foldable
import ClassyPrelude
import Oczor.Utl
type Name = String
data Lits =
LitNull |
LitBool Bool |
LitChar Char |
LitDoub... | null | https://raw.githubusercontent.com/ptol/oczor/77255e3c1b3decb956d53754cd3f2ac0ae746c67/src/Oczor/Converter/CodeGenAst.hs | haskell | pattern Scope x <- Function _ x | # LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
module Oczor.Converter.CodeGenAst (module Oczor.Converter.CodeGenAst) where
import Data.Functor.Foldable.TH
import Data.Functor.Foldable
import ClassyPrelude
import Oczor.Utl
type Name = String
data Lits =
LitNull |
LitBool Bool |
LitChar Char |
LitDoub... |
33aeb3945804671b8f5ff841d9f1f2d53aea840612191650447fd0f958f8bf63 | KingoftheHomeless/in-other-words | Cont.hs | # OPTIONS_HADDOCK not - home #
module Control.Effect.Internal.Cont where
import Data.Coerce
import Control.Monad.Trans
import Control.Monad.Base
import qualified Control.Monad.Fail as Fail
import Control.Effect
import Control.Effect.Carrier
import Control.Effect.Internal.Utils
import Control.Monad.Trans.Free.Churc... | null | https://raw.githubusercontent.com/KingoftheHomeless/in-other-words/9c864c81beb4fdf71d363b6962db5c90275c57ef/src/Control/Effect/Internal/Cont.hs | haskell | | An effect for abortive continuations.
| An effect for non-abortive continuations of a program
This isn't quite as powerful as proper delimited continuations,
as this doesn't provide any equivalent of the @reset@ operator.
This can be useful as a helper effect.
| 'ContThreads' accepts the following primitive e... | # OPTIONS_HADDOCK not - home #
module Control.Effect.Internal.Cont where
import Data.Coerce
import Control.Monad.Trans
import Control.Monad.Base
import qualified Control.Monad.Fail as Fail
import Control.Effect
import Control.Effect.Carrier
import Control.Effect.Internal.Utils
import Control.Monad.Trans.Free.Churc... |
f75ca6b203e130ecceb27664c9f87e00722efff03fdfc8bba51a304a075ad75d | janestreet/merlin-jst | mreader_parser.ml | { { { COPYING * (
This file is part of Merlin , an helper for ocaml editors
Copyright ( C ) 2013 - 2015 < frederic.bour(_)lakaban.net >
refis.thomas(_)gmail.com >
< simon.castellan(_)iuwt.fr >
Permission is hereby granted , free... | null | https://raw.githubusercontent.com/janestreet/merlin-jst/0152b4e8ef1b7cd0ddee2873aa1860a971585391/src/kernel/mreader_parser.ml | ocaml | | MLL | MLY | { { { COPYING * (
This file is part of Merlin , an helper for ocaml editors
Copyright ( C ) 2013 - 2015 < frederic.bour(_)lakaban.net >
refis.thomas(_)gmail.com >
< simon.castellan(_)iuwt.fr >
Permission is hereby granted , free... |
fbdf00879f073719a44b01461ff3211ebb40f25bfdae808743a987895e08ce72 | haskell/haskell-language-server | RunMetaprogramSpec.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
module CodeAction.RunMetaprogramSpec where
import Utils
import Test.Hspec
import Wingman.Types
spec :: Spec
spec = do
let metaTest l c f =
goldenTest RunMetaprogram "" l c f
describe "beginMetaprogram" $ do
goldenTest BeginMetapr... | null | https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/CodeAction/RunMetaprogramSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE CPP #
module CodeAction.RunMetaprogramSpec where
import Utils
import Test.Hspec
import Wingman.Types
spec :: Spec
spec = do
let metaTest l c f =
goldenTest RunMetaprogram "" l c f
describe "beginMetaprogram" $ do
goldenTest BeginMetaprogram "" 1 7 "MetaBegin"
gold... |
8ddb279d508d1fce83668b4c112a77dbabdb9c28c1c0f6eaf280628802ebe902 | gusbicalho/haskell-todo | User.hs | |
Description : Db actions for dealing with Users
This defines a typeclass ' UserDb ' , listing all actions one can use to deal with
' User 's in a database . This module also defines an instance of such class for
the ' SQLiteAction ' type : in other words , an implementation of ' UserDb ' methods
returning ... | null | https://raw.githubusercontent.com/gusbicalho/haskell-todo/f28b0d05ddb72764cf01d29fa978457ac455ac81/src/HaskellTodo/Db/User.hs | haskell | |
Description : Db actions for dealing with Users
This defines a typeclass ' UserDb ' , listing all actions one can use to deal with
' User 's in a database . This module also defines an instance of such class for
the ' SQLiteAction ' type : in other words , an implementation of ' UserDb ' methods
returning ... | |
4ada4360b9faa4cd866edc93957fc4413f3014b2e8cf0a5e12c50c8e8f0dde80 | mfelleisen/7GUI | info.rkt | #lang info
(define collection "7GUI")
(define deps
'(
"base"
"racket/gui"
"gui-lib"
"at-exp-lib"
"htdp-lib"
"typed-racket-lib"
"typed-racket-more"
"rackunit-lib"
"gregor"
"rackunit-lib"
))
;; -expander
(define pkg-desc "Sources for 7GUI")
(define pkg-authors '(matthias)... | null | https://raw.githubusercontent.com/mfelleisen/7GUI/e3631e78ab12306ad81b560443913afa4b156dec/info.rkt | racket | -expander | #lang info
(define collection "7GUI")
(define deps
'(
"base"
"racket/gui"
"gui-lib"
"at-exp-lib"
"htdp-lib"
"typed-racket-lib"
"typed-racket-more"
"rackunit-lib"
"gregor"
"rackunit-lib"
))
(define pkg-desc "Sources for 7GUI")
(define pkg-authors '(matthias))
|
36528f92809b9ef9b1377d246dd916db2a2eafd31b255328f48cf75f9bee0943 | fyquah/hardcaml_zprize | with_shift.ml | open Core
open Hardcaml
open Signal
type t =
{ x : Signal.t
; shift : int
}
let width t = Signal.width t.x + t.shift
let no_shift x = { x; shift = 0 }
let create ~shift x = { x; shift }
let sll t ~by = { x = t.x; shift = t.shift + by }
let map ~f t = { x = f t.x; shift = t.shift }
let uresize t new_width =
{... | null | https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/libs/field_ops/src/with_shift.ml | ocaml | open Core
open Hardcaml
open Signal
type t =
{ x : Signal.t
; shift : int
}
let width t = Signal.width t.x + t.shift
let no_shift x = { x; shift = 0 }
let create ~shift x = { x; shift }
let sll t ~by = { x = t.x; shift = t.shift + by }
let map ~f t = { x = f t.x; shift = t.shift }
let uresize t new_width =
{... | |
0a84ab6d16ac663e13da7e0376067904aac36bfb6c89fe36873720f76b21af23 | donaldsonjw/bigloo | exit.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / comptime / Ast / exit.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Ast/exit.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* The `set-exit' and `jmp-exit' management. */
*===========================... | * serrano / prgm / project / bigloo / comptime / Ast / exit.scm * /
* Author : * /
* Creation : Fri Apr 21 14:19:17 1995 * /
* Last change : We d Mar 30 15:50:38 2011 ( serrano ) * /
(module ... |
13947220246062a6150f082d5a5a2c8bbda7b203bc7fd6679b740b7c7969d086 | synduce/Synduce | interval_intersection.ml | * @synduce -NB --no - lifting
type list =
| Cons of int * int * list
| Elt of int * int
let rec sorted_by_start = function
| Elt (x, y) -> true
| Cons (a, b, l) -> a < b && a < head l && sorted_by_start l
and head = function
| Elt (a, b) -> a
| Cons (a, b, l) -> a
;;
let rec spec = function
| Elt (a... | null | https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/benchmarks/constraints/sortedlist/interval_intersection.ml | ocaml | * @synduce -NB --no - lifting
type list =
| Cons of int * int * list
| Elt of int * int
let rec sorted_by_start = function
| Elt (x, y) -> true
| Cons (a, b, l) -> a < b && a < head l && sorted_by_start l
and head = function
| Elt (a, b) -> a
| Cons (a, b, l) -> a
;;
let rec spec = function
| Elt (a... | |
91a132143acf628dace97df63d0ae00345cebbc26e4392ca20c46d31d1569858 | exercism/common-lisp | pizza-pi-test.lisp | ;; Ensures that pizza-pi.lisp and the testing library are always loaded
(eval-when (:compile-toplevel :load-toplevel :execute)
(load "pizza-pi")
(ql:quickload :fiveam))
;; Defines the testing package with symbols from pizza-pi and FiveAM in scope
;; The `run-tests` function is exported for use by both the user and... | null | https://raw.githubusercontent.com/exercism/common-lisp/71929e8d8fb4f81a891b742ac1aa2e2372770951/exercises/concept/pizza-pi/pizza-pi-test.lisp | lisp | Ensures that pizza-pi.lisp and the testing library are always loaded
Defines the testing package with symbols from pizza-pi and FiveAM in scope
The `run-tests` function is exported for use by both the user and test-runner
Enter the testing package
Define and enter a new FiveAM test-suite | (eval-when (:compile-toplevel :load-toplevel :execute)
(load "pizza-pi")
(ql:quickload :fiveam))
(defpackage :pizza-pi-test
(:use :cl :fiveam :pizza-pi)
(:export :run-tests))
(in-package :pizza-pi-test)
(def-suite pizza-pi-suite)
(in-suite pizza-pi-suite)
(test dough-ratio "Calculate the grams of dough need... |
689da5e8b7f2715e98cc3b8025e3fb7cbbe4442f6079db98aa17ab9d9383f2b9 | semmons99/clojure-euler | prob-055.clj | problem 055 ; ; ; ; ; ; ; ; ; ;
(defn palindrome? [n]
(= (str n) (str (reverse-num n))))
(defn reverse-num [n]
(bigint (str (.reverse (StringBuffer. (str n))))))
(defn reverse-add [n]
(+ n (reverse-num n)))
(defn lychrel?
([n] (lychrel? n 1))
([n i]
(if (> i 50)
true
(let [ra (reverse-... | null | https://raw.githubusercontent.com/semmons99/clojure-euler/3480bc313b9df7f282dadf6e0b48d96230f1bfc1/prob-055.clj | clojure | ; ; ; ; ; ; ; ; ; | (defn palindrome? [n]
(= (str n) (str (reverse-num n))))
(defn reverse-num [n]
(bigint (str (.reverse (StringBuffer. (str n))))))
(defn reverse-add [n]
(+ n (reverse-num n)))
(defn lychrel?
([n] (lychrel? n 1))
([n i]
(if (> i 50)
true
(let [ra (reverse-add n)]
(if (palindrome? ... |
ff5e675b0af2d5572464c3e3855397ede3489d759b68b6d1080a4fca0fe51432 | thoughtpolice/claap | Disassembler.hs | -- |
-- Module : AAP.Sim.Test.Disassembler
Copyright : ( c ) 2016
License : BSD3 - style ( see LICENSE.txt )
--
-- Maintainer :
-- Stability : experimental
Portability : non - portable ( GHC extensions )
--
-- Test suite harness for the disassembler, when running CLaSH simulations.
--
module AA... | null | https://raw.githubusercontent.com/thoughtpolice/claap/4944b6c4ad6aff4097f8ef66231ce7d7a59f5ee7/src/aap/AAP/Sim/Test/Disassembler.hs | haskell | |
Module : AAP.Sim.Test.Disassembler
Maintainer :
Stability : experimental
Test suite harness for the disassembler, when running CLaSH simulations.
@[\"add\", \"$r0\", \"$r0\", \"$r0\"]@.
set of bytes to disassemble, and the expected output tokens.
| Strip comments and whitespace from a test file.
... | Copyright : ( c ) 2016
License : BSD3 - style ( see LICENSE.txt )
Portability : non - portable ( GHC extensions )
module AAP.Sim.Test.Disassembler
( checkFile
) where
import CLaSH.Prelude
import qualified Prelude as P
import Data.Char ( isSpace )
import Data.List ( isPrefixOf )
import D... |
63dc6bed6ae8119322a12eda49f86f590aabd404849b7930a037e1802bdb62e5 | camfort/camfort | Prim.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE GADTs #
# LANGUAGE KindSignatures #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTy... | null | https://raw.githubusercontent.com/camfort/camfort/861646ae5af61a41d1519049cfeda60ac82f3d98/src/Language/Fortran/Model/Repr/Prim.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wall #
------------------------------------------------------------------------------
* T... | # LANGUAGE GADTs #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
|
= Handling primitive Fortran values symbolically .
There are a few challenges that this module attempts to solve :
uses fixed - width machine integers and floating... |
434eaeb0a58a8ca31ed045eb3d15146bc3b7dc2d636962d301ae6c3348d69d10 | UChicago-PL/smyth | list2.ml | open Pervasives2
let pure_bind xs f =
List.map f xs
let pure x =
[x]
let bind xs f =
List.map f xs
|> List.concat
let concat_map f xs =
bind xs f
let maximum =
function
| [] ->
None
| head :: tail ->
Some (List.fold_left max head tail)
let repeat n x =
let rec helper k acc... | null | https://raw.githubusercontent.com/UChicago-PL/smyth/08fea281f70d3ee604fde9dde140c8a570d6905d/lib/stdlib2/list2.ml | ocaml | Source: | open Pervasives2
let pure_bind xs f =
List.map f xs
let pure x =
[x]
let bind xs f =
List.map f xs
|> List.concat
let concat_map f xs =
bind xs f
let maximum =
function
| [] ->
None
| head :: tail ->
Some (List.fold_left max head tail)
let repeat n x =
let rec helper k acc... |
05a5f6be60ff32e31d02b2b0903e2383c91ba0f94dc99499dbd0f944cc069e5a | darrenldl/ocaml-SeqBox | progress_report.mli | type silence_level = L0 | L1 | L2
type silence_settings
type ('a, 'b, 'c) progress_print_functions =
{ print_progress :
start_time_src:'a ->
units_so_far_src:'b ->
total_units_src:'c ->
unit
; print_newline_if_not_done :
start_time_src:'a ->
units_so_far_src:'b ... | null | https://raw.githubusercontent.com/darrenldl/ocaml-SeqBox/658c623db8745ae1d804c75880b29fb53435860f/src/progress_report.mli | ocaml | type silence_level = L0 | L1 | L2
type silence_settings
type ('a, 'b, 'c) progress_print_functions =
{ print_progress :
start_time_src:'a ->
units_so_far_src:'b ->
total_units_src:'c ->
unit
; print_newline_if_not_done :
start_time_src:'a ->
units_so_far_src:'b ... | |
5ff22d68aca0384292ace4743c7312a2c53cd7ac57ad33935e08fe4f9b80bd8c | marigold-dev/chusai | tez.ml | type t = int64
let of_int amount = Int64.(mul 1_000_000L (of_int amount))
let of_mutez_int = Int64.of_int
let zero = 0L
let one = of_int 1
let mutez_int64 t = t
let of_z amount = amount |> Z.to_int |> of_int
let to_string amount =
let mult_int = 1_000_000L in
let rec left amount =
let d, r = Int64.(div amount... | null | https://raw.githubusercontent.com/marigold-dev/chusai/09f798c585121d3b02bf3fed0f52f15c3bdc79a1/tezt/lib/tez.ml | ocaml | type t = int64
let of_int amount = Int64.(mul 1_000_000L (of_int amount))
let of_mutez_int = Int64.of_int
let zero = 0L
let one = of_int 1
let mutez_int64 t = t
let of_z amount = amount |> Z.to_int |> of_int
let to_string amount =
let mult_int = 1_000_000L in
let rec left amount =
let d, r = Int64.(div amount... | |
3427fdc84e800123de292ea2401ccf190298d38a12d1d22c605df6c0d2a22f4d | Carnap/Carnap | Qualitative.hs | module Filter.Qualitative (makeQualitativeProblems) where
import Carnap.GHCJS.SharedFunctions (simpleHash, simpleCipher)
import Text.Pandoc
import Filter.Util (numof, contentOf, intoChunks,formatChunk, unlines', exerciseWrapper, sanitizeHtml)
import Data.Map (fromList, toList, unions)
import qualified Data.Text as T
i... | null | https://raw.githubusercontent.com/Carnap/Carnap/a2b314474db803f31ee228f23ad7406c10a5c85a/Carnap-Server/Filter/Qualitative.hs | haskell | right.
right. | module Filter.Qualitative (makeQualitativeProblems) where
import Carnap.GHCJS.SharedFunctions (simpleHash, simpleCipher)
import Text.Pandoc
import Filter.Util (numof, contentOf, intoChunks,formatChunk, unlines', exerciseWrapper, sanitizeHtml)
import Data.Map (fromList, toList, unions)
import qualified Data.Text as T
i... |
debecc2fd101908e030ceb4e7963641218ba966aef5a775eeeeb557d6affc40c | backtracking/bibtex2html | main.ml | (**************************************************************************)
(* bibtex2html - A BibTeX to HTML translator *)
Copyright ( C ) 1997 - 2014 and
(* *)
(* This software is free software; you can r... | null | https://raw.githubusercontent.com/backtracking/bibtex2html/7c9547da79a13c3accffc9947c846df96a6edd68/main.ml | ocaml | ************************************************************************
bibtex2html - A BibTeX to HTML translator
This software is free software; you can redistribute it and/or
... | Copyright ( C ) 1997 - 2014 and
modify it under the terms of the GNU General Public
License version 2 , as published by the Free Software Foundation .
See the GNU General Public License version 2 for more details
s Main module of bibtex2html .
open Printf
open Tr... |
a31dc5a025e19b5cf215aa9ee2b40ef076e58f8903dae143b6829cd0f02b18d7 | ruhler/smten | Formula.hs |
| Representation of SMT formulas which may contain _ | _ in subterms .
module Smten.Runtime.Formula (
module Smten.Runtime.Formula.BoolF,
module Smten.Runtime.Formula.IntegerF,
module Smten.Runtime.Formula.BitF,
) where
import Smten.Runtime.Formula.BoolF
import Smten.Runtime.Formula.IntegerF
import ... | null | https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-base/Smten/Runtime/Formula.hs | haskell |
| Representation of SMT formulas which may contain _ | _ in subterms .
module Smten.Runtime.Formula (
module Smten.Runtime.Formula.BoolF,
module Smten.Runtime.Formula.IntegerF,
module Smten.Runtime.Formula.BitF,
) where
import Smten.Runtime.Formula.BoolF
import Smten.Runtime.Formula.IntegerF
import ... | |
ded79130c685e41305d30d745789525ddee2d022ab8d96fed0b4c5a94fe9dd4c | inaka/elvis_core | fail_no_nested_try_catch.erl | -module(fail_no_nested_try_catch).
-ignore_xref({perhaps, throw, 1}).
-ignore_xref({a_function, that_deals, 2}).
-dialyzer({nowarn_function, bad2/0}).
-export([
bad1/0,
bad2/0,
good1/0,
good2/0
]).
bad1() ->
try
perhaps:throw(exception1),
try
perhaps:throw... | null | https://raw.githubusercontent.com/inaka/elvis_core/7567abc13db13bfdb4a666ff0f095385f3574fdb/test/examples/fail_no_nested_try_catch.erl | erlang | -module(fail_no_nested_try_catch).
-ignore_xref({perhaps, throw, 1}).
-ignore_xref({a_function, that_deals, 2}).
-dialyzer({nowarn_function, bad2/0}).
-export([
bad1/0,
bad2/0,
good1/0,
good2/0
]).
bad1() ->
try
perhaps:throw(exception1),
try
perhaps:throw... | |
72014a6b091ef32ce6ce074e9e845ab0a126050e97ee69b73b44ad9421dd4bcc | OCamlPro/alt-ergo | formatshims.ml | (******************************************************************************)
(* *)
Alt - Ergo : The SMT Solver For Software Verification
Copyright ( C ) 2018 - 2020
(* ... | null | https://raw.githubusercontent.com/OCamlPro/alt-ergo/291523151417f4cd112744d740b58ab1e8a630b4/src/lib/util/formatshims.ml | ocaml | ****************************************************************************
This file is distributed under the terms of the license indicated
in the ... | Alt - Ergo : The SMT Solver For Software Verification
Copyright ( C ) 2018 - 2020
-cube/ocaml-containers/blob/master/src/core/mkshims.ml
Thanks to
module C = Configurator.V1
let write_file f s ... |
05e6349483726e688a009549433f4baad765de31e403387fb08dbe84296e54e1 | huangz1990/real-world-haskell-cn | Mutable.hs | new :: (a -> [Word32]) -> Word32 -> ST s (MutBloom s a)
new hash numBits = MB hash `liftM` newArray (0,numBits-1) False
insert :: MutBloom s a -> a -> ST s ()
insert filt elt = indices filt elt >>=
mapM_ (\bit -> writeArray (mutArray filt) bit True)
indices :: MutBloom s a -> a -> ST s [Word32]
indices filt elt =... | null | https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/code/ch26/BloomFilter/Mutable.hs | haskell | new :: (a -> [Word32]) -> Word32 -> ST s (MutBloom s a)
new hash numBits = MB hash `liftM` newArray (0,numBits-1) False
insert :: MutBloom s a -> a -> ST s ()
insert filt elt = indices filt elt >>=
mapM_ (\bit -> writeArray (mutArray filt) bit True)
indices :: MutBloom s a -> a -> ST s [Word32]
indices filt elt =... | |
2e0432e9adc1d0ad4a21796478531bc52a3245a789368fad2d88f41e2fb8e05a | justinethier/cyclone | nqueens-cyclone-cps.scm | ; loading nqueens-cyclone-cps.scm ...
((define nqueens
(lambda (k$30 n$4)
((lambda (dec-to$10 ok?$9 try$8)
((lambda (dec-to$13 try$12 ok?$11)
((lambda (r$67)
((lambda (r$31)
((lambda (r$50)
((lambda (r$32)
((lambda (r$3... | null | https://raw.githubusercontent.com/justinethier/cyclone/a1c2a8f282f37ce180a5921ae26a5deb04768269/tests/debug/compilation/nqueens-cyclone-cps.scm | scheme | loading nqueens-cyclone-cps.scm ... | ((define nqueens
(lambda (k$30 n$4)
((lambda (dec-to$10 ok?$9 try$8)
((lambda (dec-to$13 try$12 ok?$11)
((lambda (r$67)
((lambda (r$31)
((lambda (r$50)
((lambda (r$32)
((lambda (r$37)
((lambda ... |
9d257ed412dd8db1b58d12799ba0e7ed45c633d14e5df73033d4ad9c42566657 | ucla-pls/jreduce | Logic.hs | # LANGUAGE LambdaCase #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE ApplicativeDo #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell #
# LANGUAGE EmptyCase #
# LANGUAGE ViewPatterns #
{-# LANGUAGE OverloadedStrings #-}
# LAN... | null | https://raw.githubusercontent.com/ucla-pls/jreduce/8f25f355e2b70681464bdbcc1d03198a07b81573/src/JReduce/Logic.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeSynonymInstances #
# LANGUAGE RankNTypes #
lens
containers
vector
base
jvmhs
containers
directory
nfdata
jvm-binary
filepath
text
reduce-util
unorderd-containers
jreduce
| MethodThrows AbsMethodId ClassName
MethodThrows m cn -... | # LANGUAGE LambdaCase #
# LANGUAGE DeriveGeneric #
# LANGUAGE ApplicativeDo #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell #
# LANGUAGE EmptyCase #
# LANGUAGE ViewPatterns #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
# LANGUAGE Bloc... |
d6d28b4a8c69c4efb32bbdb1078aa10a909afccf784f0a5ddc31624150e2714e | exercism/erlang | nth_prime.erl | -module(nth_prime).
-export([prime/1]).
prime(_N) -> undefined.
| null | https://raw.githubusercontent.com/exercism/erlang/57ac2707dae643682950715e74eb271f732e2100/exercises/practice/nth-prime/src/nth_prime.erl | erlang | -module(nth_prime).
-export([prime/1]).
prime(_N) -> undefined.
| |
fc1847bbad9358b97db33ce7e7b378ef5117e1b112298171555a424274bbab0f | hhucn/decide3 | moderator_tab.cljs | (ns decide.ui.process.moderator-tab
(:require
[com.fulcrologic.fulcro-i18n.i18n :as i18n]
[com.fulcrologic.fulcro.algorithms.data-targeting :as targeting]
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[com.fulcrologic.fulcro.data-fetch :as df]
[com.fulcrologic.fulcro.dom :as dom]
[com.... | null | https://raw.githubusercontent.com/hhucn/decide3/bd32079c7ca801197cb685fdbffd8755cf002134/src/main/decide/ui/process/moderator_tab.cljs | clojure | can't remove yourself from moderators
calculate diff ;; NOTE have a look at clojure.data/diff
TODO Move somewhere sensible
combine loads of same entity into one. | (ns decide.ui.process.moderator-tab
(:require
[com.fulcrologic.fulcro-i18n.i18n :as i18n]
[com.fulcrologic.fulcro.algorithms.data-targeting :as targeting]
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[com.fulcrologic.fulcro.data-fetch :as df]
[com.fulcrologic.fulcro.dom :as dom]
[com.... |
f63eea0c27120c1d66cc57ef8f6f40b321c25d47cbadf2e554d6118378cfaa0e | chrislomaxjones/part-ii-project | message.ml | (* message.ml *)
open Types
open Capnp_rpc_lwt
open Lwt.Infix
exception DeserializationError
let sturdy_refs = Hashtbl.create 10
let serialize_phase1_response acceptor_id ballot_num accepted : Yojson.Basic.json =
let acceptor_id = ("acceptor_id", `String (Types.string_of_id acceptor_id)) in
let ballot_json ... | null | https://raw.githubusercontent.com/chrislomaxjones/part-ii-project/fb638a6d9759717a610ff8cf2fe985b94f003648/src/message.ml | ocaml | message.ml
Exception arising from the wrong kind of response being received
Pull out all the necessary data from the params
Call a callback to notify client
Release capabilities, doesn't matter for us
Return an empty response
Pull out all the slot number from params
Get an API reader for the command, sin... |
open Types
open Capnp_rpc_lwt
open Lwt.Infix
exception DeserializationError
let sturdy_refs = Hashtbl.create 10
let serialize_phase1_response acceptor_id ballot_num accepted : Yojson.Basic.json =
let acceptor_id = ("acceptor_id", `String (Types.string_of_id acceptor_id)) in
let ballot_json = Yojson.Basic.Ut... |
4efbbcd1c5d12775ab1231ba7f9f858d37581772adbed516ddc53c1704800fe8 | gebi/jungerl | xmerl_scan.erl | The contents of this file are subject to the Erlang Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
%%% compliance with the License. You may obtain a copy of the License at
%%%
%%%
Software distributed under the License is distributed on an " AS IS "
%%% basis, WITHOUT WA... | null | https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/xmerl/src/xmerl_scan.erl | erlang | compliance with the License. You may obtain a copy of the License at
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
Contributor(s):
-----------------------------------------------------------------... | The contents of this file are subject to the Erlang Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
The Original Code is xmerl-0.15
The Initial Developer of the Original Code is Ericsson Telecom
AB... |
8b41a4bd104851e72c4bb4b7e93c846b7ddcfc53fffe9a8a776123d46f33fd14 | snowleopard/hadrian | Flavour.hs | module Flavour (Flavour (..)) where
import Expression
Please update doc/{flavours.md , user-settings.md } when changing this file .
| ' Flavour ' is a collection of build settings that fully define a GHC build .
-- Note the following type semantics:
* @Bool@ : a plain Boolean flag whose value is known at compil... | null | https://raw.githubusercontent.com/snowleopard/hadrian/b9a3f9521b315942e1dabb006688ee7c9902f5fe/src/Flavour.hs | haskell | Note the following type semantics:
* @Action Bool@: a flag whose value can depend on the build environment.
* @Predicate@: a flag whose value can depend on the build environment and
on the current build target.
| Use these command line arguments.
| Build these packages.
| Either 'integerGmp' or 'integerSimple'.
... | module Flavour (Flavour (..)) where
import Expression
Please update doc/{flavours.md , user-settings.md } when changing this file .
| ' Flavour ' is a collection of build settings that fully define a GHC build .
* @Bool@ : a plain Boolean flag whose value is known at compile time .
data Flavour = Flavour {
| ... |
591038f5b17a405eec9adc255a0c4b56b03993a67d65547159792741e8ecebb0 | Ericson2314/lighthouse | Transitional.hs | -- | Produces XHTML 1.0 Transitional.
module Text.XHtml.Transitional (
-- * Data types
Html, HtmlAttr,
-- * Classes
HTML(..), ADDATTRS(..),
-- * Primitives and basic combinators
(<<), concatHtml, (+++),
noHtml, isNoHtml, tag, itag,
emptyAttr, intAttr, strAttr, htmlAttr,
pri... | null | https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/xhtml/Text/XHtml/Transitional.hs | haskell | | Produces XHTML 1.0 Transitional.
* Data types
* Classes
* Primitives and basic combinators
* Rendering
| Output the HTML without adding newlines or spaces within the markup.
This should be the most time and space efficient way to
render HTML, though the ouput is quite unreadable.
| Outputs indented HTML.... | module Text.XHtml.Transitional (
Html, HtmlAttr,
HTML(..), ADDATTRS(..),
(<<), concatHtml, (+++),
noHtml, isNoHtml, tag, itag,
emptyAttr, intAttr, strAttr, htmlAttr,
primHtml,
showHtml, renderHtml, prettyHtml,
showHtmlFragment, renderHtmlFragment, prettyHtmlFragment,
modu... |
8724d204d8c94261c11bb1d47112210d3c64958781b1797ae5112c1b789b4d30 | bhaskara/programmable-reinforcement-learning | rbe-tabular-features.lisp | (defpackage rbe-tabular-features
(:documentation
"Tabular features for calisp resource balance program")
(:use
cl
rbe-prog
calisp-features
rbe
utils)
(:export
make-tabular-featurizer))
(in-package rbe-tabular-features)
(defun make-tabular-featurizer (wm)
(lambda... | null | https://raw.githubusercontent.com/bhaskara/programmable-reinforcement-learning/8afc98116a8f78163b3f86076498d84b3f596217/lisp/calisp-examples/res-balance/rbe-tabular-features.lisp | lisp | (defpackage rbe-tabular-features
(:documentation
"Tabular features for calisp resource balance program")
(:use
cl
rbe-prog
calisp-features
rbe
utils)
(:export
make-tabular-featurizer))
(in-package rbe-tabular-features)
(defun make-tabular-featurizer (wm)
(lambda... | |
c3ce47afbe846b7328b0a3eaf6f373239ecab1a251410423d1c4024be0dc076b | exoscale/clojure-kubernetes-client | extensions_v1beta1_deployment_condition.clj | (ns clojure-kubernetes-client.specs.extensions-v1beta1-deployment-condition
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare extensions-v1beta1-deployment-condition-data extensions-v1beta1-deployment-condition)
(def extensions-v1beta1-... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/extensions_v1beta1_deployment_condition.clj | clojure | (ns clojure-kubernetes-client.specs.extensions-v1beta1-deployment-condition
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare extensions-v1beta1-deployment-condition-data extensions-v1beta1-deployment-condition)
(def extensions-v1beta1-... | |
df641d176b838b14635b8af4656dcd7028e158186f0c34eadd6a5c3ac667d035 | rabbitmq/rabbitmq-common | rabbit_auth_backend_dummy.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_auth_backend_dummy).
-include("rab... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-common/67c4397ffa9f51d87f994aa4db4a68e8e95326ab/src/rabbit_auth_backend_dummy.erl | erlang |
A user to be used by the direct client when permission checks are
Implementation of rabbit_auth_backend | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_auth_backend_dummy).
-include("rabbit.hr... |
b0760c744152f95be4eed6e88e35d8559a849f539a36ee0b304d4572bf4a79f5 | cambium-clojure/cambium.core | nested_test.clj | Copyright ( c ) . 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 LICENSE at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the ... | null | https://raw.githubusercontent.com/cambium-clojure/cambium.core/4ae72905436eae63e8e5b852dd6de25b4a16ca1e/test/cambium/nested_test.clj | clojure | 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 LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this ... | Copyright ( c ) . All rights reserved .
(ns cambium.nested-test
(:require
[clojure.test :refer :all]
[cambium.codec :as codec]
[cambium.codec.util :as ccu]
[cambium.core :as c]
[cambium.test-util :as tu]))
(deftest type-safe-encoding
(testing "type-safe encoding"
(let [... |
a112b6799a7aac27d90e6a830fa77dacf36546d9d75d6739f241cfc63f20b12f | amir-sabbaghi/proxy | Main.hs | module Main where
import System.Environment
import qualified Server as S
import qualified Network.Socket as S
import HTTPWorker
import Proxy
import ProxyAuth
import Data.Default.Class
import Data.Maybe
import System.Exit
import Control.Monad
data Settings = Settings { bindAddress :: String
... | null | https://raw.githubusercontent.com/amir-sabbaghi/proxy/9dadd56e7b365eb2e70759da10d3a517c07783df/app/Main.hs | haskell | module Main where
import System.Environment
import qualified Server as S
import qualified Network.Socket as S
import HTTPWorker
import Proxy
import ProxyAuth
import Data.Default.Class
import Data.Maybe
import System.Exit
import Control.Monad
data Settings = Settings { bindAddress :: String
... | |
0fb1827efc953936588c7458c2d3daa7651d86411a7bd1c6cab4cbd37e0a3485 | kamek-pf/ntfd | Helpers.hs | module Spec.Helpers where
import Data.ByteString.Char8 (pack)
import Data.Maybe (fromJust)
import Data.Time.Clock (secondsToNominalDiffTime)
import System.Environment (lookupEnv)
import Config (Config(..))
import Config.Mpd (MpdConfig(..))
import Config.Github (GithubConfig(..))
import Config.Weather (WeatherConfig(.... | null | https://raw.githubusercontent.com/kamek-pf/ntfd/d297a59339b3310a62341ffa9c378180c578dbce/test/Spec/Helpers.hs | haskell | Spelling error in celsius on purpose ;/ | module Spec.Helpers where
import Data.ByteString.Char8 (pack)
import Data.Maybe (fromJust)
import Data.Time.Clock (secondsToNominalDiffTime)
import System.Environment (lookupEnv)
import Config (Config(..))
import Config.Mpd (MpdConfig(..))
import Config.Github (GithubConfig(..))
import Config.Weather (WeatherConfig(.... |
6131ef52b5ea60b47d52ee7bf03a1b9714557e07561bc0efca4a75a5b66021b0 | green-labs/ppx_ts | str_partial.ml | open Ppxlib
open Parsetree
open Ast_helper
open Utils
(* partial attribute mapper *)
let make_structure_items name loc manifest kind suffix =
match (manifest, kind) with
(* type t *)
| None, Ptype_abstract -> fail loc "Can't handle the unspecified type"
| None, Ptype_record decls ->
let decls =
[... | null | https://raw.githubusercontent.com/green-labs/ppx_ts/e7e7190b47a698a0ef6428af53bd4c62254a052a/src/str_partial.ml | ocaml | partial attribute mapper
type t
partial extension mapper
type t | open Ppxlib
open Parsetree
open Ast_helper
open Utils
let make_structure_items name loc manifest kind suffix =
match (manifest, kind) with
| None, Ptype_abstract -> fail loc "Can't handle the unspecified type"
| None, Ptype_record decls ->
let decls =
[
Str.type_ Recursive
[
... |
3ef571eacb80078b885dc432c53fa0e1217803b2b9ca733c3557cbeec04b91c0 | kazu-yamamoto/hhp | Info.hs | # LANGUAGE TupleSections , FlexibleInstances , Rank2Types #
module Hhp.Info (
infoExpr
, info
, typeExpr
, types
) where
import GHC (Ghc, TypecheckedModule(..), SrcSpan, Type, GenLocated(L), ModSummary, mgModSummaries, mg_ext, LHsBind, Type, LPat, LHsExpr)
import qualified GHC as G
import GHC.Core.Type (m... | null | https://raw.githubusercontent.com/kazu-yamamoto/hhp/6982aace9280daa7990782b645d9242685038c1f/lib/Hhp/Info.hs | haskell | --------------------------------------------------------------
| Obtaining information of a target expression. (GHCi's info:)
^ A target file.
| Obtaining information of a target expression. (GHCi's info:)
^ A target file.
--------------------------------------------------------------
| Obtaining type of a target ... | # LANGUAGE TupleSections , FlexibleInstances , Rank2Types #
module Hhp.Info (
infoExpr
, info
, typeExpr
, types
) where
import GHC (Ghc, TypecheckedModule(..), SrcSpan, Type, GenLocated(L), ModSummary, mgModSummaries, mg_ext, LHsBind, Type, LPat, LHsExpr)
import qualified GHC as G
import GHC.Core.Type (m... |
d38beb5188dd70e1ae3f51ab1e831f2a63ed08e475918a91512b4beef390c8a0 | fumieval/mason | Fast.hs | # LANGUAGE CPP #
{-# OPTIONS_GHC -ddump-simpl -ddump-to-file -dsuppress-all #-}
#define LIB Data.ByteString.FastBuilder
#define NAME Fast
#include "template.hs"
encodeUtf8Builder :: T.Text -> Builder
encodeUtf8Builder = byteString . T.encodeUtf8
| null | https://raw.githubusercontent.com/fumieval/mason/09e3d6aab64ded54380270be2af3db31b432bcc1/benchmarks/aeson/Fast.hs | haskell | # OPTIONS_GHC -ddump-simpl -ddump-to-file -dsuppress-all # | # LANGUAGE CPP #
#define LIB Data.ByteString.FastBuilder
#define NAME Fast
#include "template.hs"
encodeUtf8Builder :: T.Text -> Builder
encodeUtf8Builder = byteString . T.encodeUtf8
|
177274f544a0761e195449859e27c217011eac1ace9d815a3d21103842460203 | devaspot/games | lucky_sup.erl | -module(lucky_sup).
-behaviour(supervisor).
-include_lib("db/include/config.hrl").
-export([start_link/0]).
-export([init/1]).
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
RestartStrategy = one_for_... | null | https://raw.githubusercontent.com/devaspot/games/a1f7c3169c53d31e56049e90e0094a3f309603ae/apps/server/src/sup/lucky_sup.erl | erlang | Common table for several real players
Common table for several real players | -module(lucky_sup).
-behaviour(supervisor).
-include_lib("db/include/config.hrl").
-export([start_link/0]).
-export([init/1]).
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
RestartStrategy = one_for_... |
1c37edfb109caf3047f4595bc1c94b5fcd8d707bc3ddcb2a57c756bd22498999 | pdarragh/camlrack | camlrack.ml | include Errors
include Sexp
include SexpPatterns
module Tokenize = Tokenize
module Parse = Parse
module Match = Match
module ListConvenienceFunctions = Match.ListConvenienceFunctions
let sexps_of_string (s : string) : (sexp list, Parse.parse_error) result = Parse.parse_many s
let sexps_of_string_exn (s : string) : s... | null | https://raw.githubusercontent.com/pdarragh/camlrack/b80f35a973529f029c0715b83ce64c1de4e8467d/camlrack/src/camlrack.ml | ocaml | include Errors
include Sexp
include SexpPatterns
module Tokenize = Tokenize
module Parse = Parse
module Match = Match
module ListConvenienceFunctions = Match.ListConvenienceFunctions
let sexps_of_string (s : string) : (sexp list, Parse.parse_error) result = Parse.parse_many s
let sexps_of_string_exn (s : string) : s... | |
3ecf71ac495363e2f9eaf3a6f9ac9d8f4e28d986aa19768efa18b64552b7f1a1 | billstclair/Lisplog | captcha.lisp | ; -*- mode: lisp -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
Captcha logic
;;;
(in-package :lisplog)
(defstruct (captcha (:constructor %make-captcha))
query-explanation
query-html
response-size
hidden-value)
(defun captcha-values (captcha)
(values (captcha-query-explan... | null | https://raw.githubusercontent.com/billstclair/Lisplog/827e737062b4873ecf86c255649d44aca4b4f48f/src/captcha.lisp | lisp | -*- mode: lisp -*-
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 specif... |
Captcha logic
(in-package :lisplog)
(defstruct (captcha (:constructor %make-captcha))
query-explanation
query-html
response-size
hidden-value)
(defun captcha-values (captcha)
(values (captcha-query-explanation captcha)
(captcha-query-html captcha)
(captcha-response-size captcha)
... |
0d3104e68cace913bf622be411ad271038f29b621047cc7d247fde78f50ef6db | lilyball/projecteuler-ocaml | prob9.ml |
A Pythagorean triplet is a set of three natural numbers , a b c , for which ,
a² + b² = c²
For example , 3² + 4² = 9 + 16 = 25 = 5² .
There exists exactly one Pythagorean triplet for which a + b + c = 1000 .
Find the product abc .
A Pythagorean triplet is a set of three natural numbers, a ... | null | https://raw.githubusercontent.com/lilyball/projecteuler-ocaml/a88ed8355b565ad0726cfcac4916d2b80512da7a/prob9.ml | ocaml | this is extremely brute-force. It doesn't even try and calculate c from a and b. |
A Pythagorean triplet is a set of three natural numbers , a b c , for which ,
a² + b² = c²
For example , 3² + 4² = 9 + 16 = 25 = 5² .
There exists exactly one Pythagorean triplet for which a + b + c = 1000 .
Find the product abc .
A Pythagorean triplet is a set of three natural numbers, a ... |
26193fbd51405662b98fb891fca416c687bf1ad8a4c3955b901906e710707209 | ku-fpg/sized-types | Matrix.hs | -- | Sized matrixes.
--
Copyright : ( c ) 2013 University of Kansas
-- License: BSD3
--
Maintainer : < >
-- Stability: unstable
Portability : ghc
# LANGUAGE TypeFamilies , RankNTypes , FlexibleInstances , ScopedTypeVariables ,
UndecidableInstances , MultiParamTypeClasses , TypeOperators , DataKinds , Flex... | null | https://raw.githubusercontent.com/ku-fpg/sized-types/77e8931d1758085ae76d67e9054549e8e75bd595/Data/Sized/Matrix.hs | haskell | | Sized matrixes.
License: BSD3
Stability: unstable
| A 'Matrix' is an array with the size determined uniquely by the
/type/ of the index type, 'ix', with every type in 'ix' used.
| A 'Vector' is a 1D Matrix, using a TypeNat to define its length.
possible because we are a fixed size
Also why use use newtype h... | Copyright : ( c ) 2013 University of Kansas
Maintainer : < >
Portability : ghc
# LANGUAGE TypeFamilies , RankNTypes , FlexibleInstances , ScopedTypeVariables ,
UndecidableInstances , MultiParamTypeClasses , TypeOperators , DataKinds , FlexibleContexts , DeriveDataTypeable #
UndecidableInstances, MultiPa... |
8489eb53aed7ddc16fd7cc7eb7648d8be5e3abd1f243718203ee00676b0bf761 | spell-music/csound-expression | Ref.hs | {-# Language ScopedTypeVariables, FlexibleContexts #-}
module Csound.Typed.Control.Ref(
Ref(..), writeRef, readRef, newRef, mixRef, modifyRef, sensorsSE, newGlobalRef,
concatRef, concatRef3, concatRef4, concatRef5,
newCtrlRef, newGlobalCtrlRef,
globalSensorsSE, newClearableGlobalRef, newTab, newGlobalTa... | null | https://raw.githubusercontent.com/spell-music/csound-expression/e384b7e3f69345bbe236730dee2fb0864d575259/csound-expression-typed/src/Csound/Typed/Control/Ref.hs | haskell | # Language ScopedTypeVariables, FlexibleContexts #
conditionals
| It describes a reference to mutable values.
{ writeRef :: a -> SE ()
, readRef :: SE a }
| Allocates a new local (it is visible within the instrument) mutable value and initializes it with value.
A reference can contain a tuple of variable... | module Csound.Typed.Control.Ref(
Ref(..), writeRef, readRef, newRef, mixRef, modifyRef, sensorsSE, newGlobalRef,
concatRef, concatRef3, concatRef4, concatRef5,
newCtrlRef, newGlobalCtrlRef,
globalSensorsSE, newClearableGlobalRef, newTab, newGlobalTab,
whileRef, whileRefD
) where
import Data.Boolean... |
bcb440bdc4c0af1074a41b2f531c0a2068a874257db5a6a990e503908e8e8354 | Ucombinator/parsing-with-zippers | pwZ_WorklistWithLookahead.ml | (* Simple type aliases.
* Fig 1. *)
type lab = string (* token and sequence labels *)
type tag = int (* token tag, used for lookahead and token comparison *)
type pos = int (* token position in input *)
type tok = lab * tag (* token *)
(* An exception when a match fails. Should never appear... | null | https://raw.githubusercontent.com/Ucombinator/parsing-with-zippers/168252c3598f7e704b8484bb469b37aa1a9b0313/pwZ_WorklistWithLookahead.ml | ocaml | Simple type aliases.
* Fig 1.
token and sequence labels
token tag, used for lookahead and token comparison
token position in input
token
An exception when a match fails. Should never appear.
* This is primarily to suppress warnings in a safe manner.
A global worklist. This is used for keeping track of wh... |
exception FailedMatch
Additional types necessary for using zippers without memoization tables .
* Fig 19 .
* The implementation of m_0 required the definition of a new ` undefined ` value ,
* which is given here . It is essentially a placeholder to be discarded .
* Fig 19.
* The implementation of m_0 req... |
566edd29d7056d754b988761ea3e863c3ee4181f7f0d932e877f90f00b99e419 | resttime/cl-liballegro | video-streaming.lisp | (in-package #:cl-liballegro)
(defcfun ("al_init_video_addon" init-video-addon) :bool)
(defcfun ("al_is_video_addon_initialized" is-init-video-addon-initialized) :bool)
(defcfun ("al_shutdown_video_addon" shutdown-video-addon) :void)
(defcfun ("al_get_allegro_video_version" get-allegro-video-version) :uint32)
(defcfun ... | null | https://raw.githubusercontent.com/resttime/cl-liballegro/4f0797db464aaef32e4bf6d87c2baf3ca71534c4/src/ffi-functions/addons/video-streaming.lisp | lisp | (in-package #:cl-liballegro)
(defcfun ("al_init_video_addon" init-video-addon) :bool)
(defcfun ("al_is_video_addon_initialized" is-init-video-addon-initialized) :bool)
(defcfun ("al_shutdown_video_addon" shutdown-video-addon) :void)
(defcfun ("al_get_allegro_video_version" get-allegro-video-version) :uint32)
(defcfun ... | |
e82c10df9a49b281c6c3e1c0c55db99a3e3f4474a706bc883eb3602944096f0b | eugeneia/erlangen | mailbox.lisp | Mailbox FIFO queue implementation based on JPL - QUEUES .
(in-package :erlangen.mailbox)
(defstruct (mailbox (:constructor make-mailbox%))
"Mailbox structure."
(queue (error "QUEUE must be supplied.") :type bounded-fifo-queue)
(priority (error "PRIORITY must be supplied.") :type unbounded-fifo-queue)
(open?... | null | https://raw.githubusercontent.com/eugeneia/erlangen/204166b33833c49841617bbc6ecfaf4dd77cf6d8/mailbox.lisp | lisp | Mailbox FIFO queue implementation based on JPL - QUEUES .
(in-package :erlangen.mailbox)
(defstruct (mailbox (:constructor make-mailbox%))
"Mailbox structure."
(queue (error "QUEUE must be supplied.") :type bounded-fifo-queue)
(priority (error "PRIORITY must be supplied.") :type unbounded-fifo-queue)
(open?... | |
e905d763c50405aa91dca5ad4118f03e23450762cf3f894df4c3b0f346e6bae1 | IndecisionTree/adventofcode2022 | Day10.hs | module Days.Day10 (day10) where
import AOC (Solution (..))
import qualified Data.Text as T
day10 :: Solution
day10 = Solution parseInput part1 part2
parseInput :: T.Text -> a
parseInput = error "parseInput not defined for day 10"
part1 :: a -> Int
part1 = error "part1 not defined for day 10"
part2 :: a -> Int
part... | null | https://raw.githubusercontent.com/IndecisionTree/adventofcode2022/9fce98a2cd0b18d26d2d369f8933b9abba0109ba/solutions/Days/Day10.hs | haskell | module Days.Day10 (day10) where
import AOC (Solution (..))
import qualified Data.Text as T
day10 :: Solution
day10 = Solution parseInput part1 part2
parseInput :: T.Text -> a
parseInput = error "parseInput not defined for day 10"
part1 :: a -> Int
part1 = error "part1 not defined for day 10"
part2 :: a -> Int
part... | |
66f095e3267872947b1b6af7a9f92683853a69c57a74ff74ab100f3221362246 | samrocketman/home | klawiter-sepia-toning.scm | ;
; The GIMP -- an image manipulation program
Copyright ( C ) 1995 and
;
Sepia toning script for GIMP 2.4
by 05.2007 - 11.2007
;
Tags : photo , colcor , old ,
;
; Author statement:
; just to learn how all it works ;-)
this is a copy of Sepia Toning tutorial
; /
by
;
; ---------------------------... | null | https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/klawiter-sepia-toning.scm | scheme |
The GIMP -- an image manipulation program
Author statement:
just to learn how all it works ;-)
/
--------------------------------------------------------------------
--------------------------------------------------------------------
- Changelog -
-------------------------------------------------------... | Copyright ( C ) 1995 and
Sepia toning script for GIMP 2.4
by 05.2007 - 11.2007
Tags : photo , colcor , old ,
this is a copy of Sepia Toning tutorial
by
Distributed by Gimp FX Foundry project
it under the terms of the GNU General Public License as published by
You should have received a cop... |
e52574a0afd26029833fbc5bbbcc0e206ae3d94d07fe8499524e45c4e6cdfb2c | auser/alice | permissions.erl | -module (permissions).
-include ("alice.hrl").
-export ([get/1, post/2, put/2, delete/2]).
% set_permissions [-p <VHostPath>] <UserName> <Regexp> <Regexp> <Regexp>
% clear_permissions [-p <VHostPath>] <UserName>
% list_permissions [-p <VHostPath>]
% list_user_permissions <UserName>
% TODO: Complete
get([]) ->
... | null | https://raw.githubusercontent.com/auser/alice/e0f867071ede99f451d09053608bd6719c72d1c9/src/rest/controllers/permissions.erl | erlang | set_permissions [-p <VHostPath>] <UserName> <Regexp> <Regexp> <Regexp>
clear_permissions [-p <VHostPath>] <UserName>
list_permissions [-p <VHostPath>]
list_user_permissions <UserName>
TODO: Complete
?MODULE:get(["vhost", "/"]);
PRIVATE
Now aggregate their data
ConfigurePerm, WritePerm, ReadPerm
====... | -module (permissions).
-include ("alice.hrl").
-export ([get/1, post/2, put/2, delete/2]).
get([]) ->
VhostListing = [ erlang:binary_to_list(V) || V <- vhosts:get_all_vhosts()],
Vhosts = lists:map(fun(V) ->
get_vhost_perms(V)
end, VhostListing),
{?MODULE,
{struct, [
{vhosts, [ Q || Q <- ... |
cd7e399956cc6759a82a95c93708a7386626fc944137b19f117c75e5a7180085 | onedata/op-worker | atm_workflow_execution_garbage_collector.erl | %%%-------------------------------------------------------------------
@author
( C ) 2022 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% Module responsible for:
%%% - disc... | null | https://raw.githubusercontent.com/onedata/op-worker/171b05ac629acb4fc337b7dc2f5bf7c433d2c23f/src/modules/automation/workflow/garbage_collector/atm_workflow_execution_garbage_collector.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
Module responsible for:
- discarding expired atm workflow executions
- purging discarded atm workflow executions
@end
--------------------------------------------------... | @author
( C ) 2022 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(atm_workflow_execution_garbage_collector).
-author("Bartosz Walkowicz").
-behaviour(gen_server).
-include("modules/automation/atm_execution.hrl").
-include("modules/fslogic/fslogic_common.... |
f314cc784cf980689bafade7431bba5d31d2ec8baa83fe2cf36ad5fe5440d03f | clojure/core.match | regex.clj | Copyright ( c ) . 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 bound by
; ... | null | https://raw.githubusercontent.com/clojure/core.match/1a57329c01507d3eb479a4f5461e012edaa6e4de/src/test/clojure/clojure/core/match/test/regex.clj | clojure | 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 bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns clojure.core.match.test.regex
(:use [clojure.core.match :only [match]])
(:use clojure.core.match.regex)
(:use clojure.test))
(deftest basic-regex
(is (= (match ["asdf"]
[#"asdf"] 1
:else 2)
1... |
6cb8b3d7eaefc73109d64fe292fb4850751e2b24289be6d33d2ba5fff2e4fdae | rbkmoney/erlang_capi_v2 | capi_client_geo.erl | -module(capi_client_geo).
-export([get_location_names/2]).
-type context() :: capi_client_lib:context().
-type query_string() :: map().
-spec get_location_names(context(), query_string()) -> {ok, term()} | {error, term()}.
get_location_names(Context, Query) ->
Params = #{
qs_val => Query
},
{Url,... | null | https://raw.githubusercontent.com/rbkmoney/erlang_capi_v2/438d0a603475c57dddade8c419f0d70fdf86438d/apps/capi_client/src/capi_client_geo.erl | erlang | -module(capi_client_geo).
-export([get_location_names/2]).
-type context() :: capi_client_lib:context().
-type query_string() :: map().
-spec get_location_names(context(), query_string()) -> {ok, term()} | {error, term()}.
get_location_names(Context, Query) ->
Params = #{
qs_val => Query
},
{Url,... | |
c16245abffcaeaf5f09ea672d6bae0190fe6ec512a9989c4b898fd3831898a72 | coq/coq | control.mli | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/110921a449fcb830ec2a1cd07e3acc32319feae6/lib/control.mli | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
05d9642688f3562990e11fcf0de8ce745abf5327916c7c64016ef940af716bd5 | wlitwin/graphv | path.ml | type t = {
mutable first : int;
mutable count : int;
mutable closed : bool;
mutable nbevel : int;
mutable fill : VertexBuffer.Sub.t;
mutable stroke : VertexBuffer.Sub.t;
mutable winding : Winding.t;
mutable convex : bool;
}
let empty_sub = VertexBuffer.Sub.create()
let create () = {
... | null | https://raw.githubusercontent.com/wlitwin/graphv/d0a09575c5ff5ee3727c222dd6130d22e4cf62d9/webgl2/core/path.ml | ocaml | type t = {
mutable first : int;
mutable count : int;
mutable closed : bool;
mutable nbevel : int;
mutable fill : VertexBuffer.Sub.t;
mutable stroke : VertexBuffer.Sub.t;
mutable winding : Winding.t;
mutable convex : bool;
}
let empty_sub = VertexBuffer.Sub.create()
let create () = {
... | |
9854782b20f5ae2c855c3ab5c9ce98162ef69f626f42c95a0661127572414e10 | 8c6794b6/guile-tjit | evil.scm | ;;; examples/safe/evil.scm -- Evil Scheme file to be run in a safe
;;; environment.
;;; Commentary:
;;; This is an example file to be evaluated by the `safe' program in
;;; this directory. This program, unlike the `untrusted.scm' (which
;;; is untrusted, but a really nice fellow though), tries to do evil
;;; things ... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/examples/safe/evil.scm | scheme | examples/safe/evil.scm -- Evil Scheme file to be run in a safe
environment.
Commentary:
This is an example file to be evaluated by the `safe' program in
this directory. This program, unlike the `untrusted.scm' (which
is untrusted, but a really nice fellow though), tries to do evil
things and will thus break in ... |
Author :
Date : 2001 - 05 - 30
(define passwd (open-input-file "/etc/passwd"))
(let lp ((ch (read-char passwd)))
(if (not (eof-object? ch))
(lp (read-char passwd))))
|
87b25cae1c6aa142328584bc3da8246ad08d13af71113fd5024b460bda06fb82 | anoma/juvix | Options.hs | module Juvix.Compiler.Backend.Html.Data.Options where
import Juvix.Prelude
data HtmlOptions = HtmlOptions
{ _htmlOptionsKind :: HtmlKind,
_htmlOptionsAssetsPrefix :: Text,
_htmlOptionsUrlPrefix :: Text,
_htmlOptionsOutputDir :: Path Abs Dir,
_htmlOptionsParamBase :: Text,
_htmlOptionsTheme :: Th... | null | https://raw.githubusercontent.com/anoma/juvix/22027f137c96845cb91c08d510e63fa4bc3f06e2/src/Juvix/Compiler/Backend/Html/Data/Options.hs | haskell | module Juvix.Compiler.Backend.Html.Data.Options where
import Juvix.Prelude
data HtmlOptions = HtmlOptions
{ _htmlOptionsKind :: HtmlKind,
_htmlOptionsAssetsPrefix :: Text,
_htmlOptionsUrlPrefix :: Text,
_htmlOptionsOutputDir :: Path Abs Dir,
_htmlOptionsParamBase :: Text,
_htmlOptionsTheme :: Th... | |
ae572a471b2d2f0f598ce99aecd9d449f6e3101373b2c6f6b66bba0237102fed | basho/riak_kv | riak_kv_mrc_sink.erl | %% -------------------------------------------------------------------
%%
%% riak_kv_mrc_sink: A simple process to act as a Pipe sink for
%% MapReduce queries
%%
Copyright ( c ) 2012 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "Lic... | null | https://raw.githubusercontent.com/basho/riak_kv/aeef1591704d32230b773d952a2f1543cbfa1889/src/riak_kv_mrc_sink.erl | erlang | -------------------------------------------------------------------
riak_kv_mrc_sink: A simple process to act as a Pipe sink for
MapReduce queries
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either e... | Copyright ( c ) 2012 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
@doc ... |
facf57eb9a6db20f831b68e1f04a46b96a181fa9c1f82878f13dbb193b708991 | cfpb/qu | cache.clj | (ns qu.test.cache
(:refer-clojure :exclude [sort])
(:require [clojure.test :refer :all]
[qu.query :as q]
[qu.cache :refer :all]))
(deftest test-query-to-key
(let [query1 (q/map->Query {:select "state_id, county_id, MAX(tax_returns)" :group "state_id, county_id" :metadata {:database "test"... | null | https://raw.githubusercontent.com/cfpb/qu/f460d9ab2f05ac22f6d68a98a9641daf0f7c7ba4/test/qu/test/cache.clj | clojure | (run-tests) | (ns qu.test.cache
(:refer-clojure :exclude [sort])
(:require [clojure.test :refer :all]
[qu.query :as q]
[qu.cache :refer :all]))
(deftest test-query-to-key
(let [query1 (q/map->Query {:select "state_id, county_id, MAX(tax_returns)" :group "state_id, county_id" :metadata {:database "test"... |
e18a56ad478ebb52be4b1d513bdd048de6c7e4c002d6bb562944c7dcd1fa4f80 | JoelSanchez/ventas | images.clj | (ns ventas.utils.images
(:require
[clojure.java.io :as io]
[slingshot.slingshot :refer [throw+]]
[ventas.utils.files :as utils.files])
(:import [javax.imageio ImageIO]
[net.coobird.thumbnailator Thumbnails]
[java.awt.image BufferedImage]
[net.coobird.thumbnailator.resizers.... | null | https://raw.githubusercontent.com/JoelSanchez/ventas/dc8fc8ff9f63dfc8558ecdaacfc4983903b8e9a1/src/clj/ventas/utils/images.clj | clojure | these functions make this way easier to test | (ns ventas.utils.images
(:require
[clojure.java.io :as io]
[slingshot.slingshot :refer [throw+]]
[ventas.utils.files :as utils.files])
(:import [javax.imageio ImageIO]
[net.coobird.thumbnailator Thumbnails]
[java.awt.image BufferedImage]
[net.coobird.thumbnailator.resizers.... |
948e7b5ebb9a7f256e69d307100158de3efa96aba008faa94ed3f71161634926 | yesodweb/persistent | Types.hs | module Database.Persist.Sql.Types
( module Database.Persist.Sql.Types
, SqlBackend, SqlReadBackend (..), SqlWriteBackend (..)
, Statement (..), LogFunc, InsertSqlResult (..)
, readToUnknown, readToWrite, writeToUnknown
, SqlBackendCanRead, SqlBackendCanWrite, SqlReadT, SqlWriteT, IsSqlBackend
, ... | null | https://raw.githubusercontent.com/yesodweb/persistent/d7a67f0fea5e07f6f6562a54c0838de23c51d387/persistent/Database/Persist/Sql/Types.hs | haskell | | This value specifies how a field references another table.
@since 2.11.0.0
^ The table name that the
@since 2.11.0.0
^ The name of the foreign key constraint.
@since 2.11.0.0
^ Whether or not updates/deletions to the referenced table cascade
to this table.
@since 2.11.0.0
| Values to configure a pool of... | module Database.Persist.Sql.Types
( module Database.Persist.Sql.Types
, SqlBackend, SqlReadBackend (..), SqlWriteBackend (..)
, Statement (..), LogFunc, InsertSqlResult (..)
, readToUnknown, readToWrite, writeToUnknown
, SqlBackendCanRead, SqlBackendCanWrite, SqlReadT, SqlWriteT, IsSqlBackend
, ... |
02627240505840662ab26005a90c73cd6fe60735f2865c959d9d1986395720a3 | rudymatela/express | listable.hs | Copyright ( c ) 2017 - 2021 .
-- Distributed under the 3-Clause BSD licence (see the file LICENSE).
import Test
main :: IO ()
main = mainTest tests 5040
tests :: Int -> [Bool]
tests n =
[ True
only produces well - typed expressions
, holds n $ isJust . toDynamic
, holds n $ isJust . mtyp
only prod... | null | https://raw.githubusercontent.com/rudymatela/express/24193a8ea5e238404808a8ef196b0973d0383c21/test/listable.hs | haskell | Distributed under the 3-Clause BSD licence (see the file LICENSE).
counter-examples are of the right type | Copyright ( c ) 2017 - 2021 .
import Test
main :: IO ()
main = mainTest tests 5040
tests :: Int -> [Bool]
tests n =
[ True
only produces well - typed expressions
, holds n $ isJust . toDynamic
, holds n $ isJust . mtyp
only produces ill - typed expressions
, holds n $ isNothing . toDynamic . unI... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.