_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 |
|---|---|---|---|---|---|---|---|---|
d4606a83e22211ea18f13da7812a965ea085bbafa795875d9fefdbdba7f0ae33 | huangjs/cl | generate-sys-proclaim.lisp | (load "../lisp-utils/defsystem.lisp")
(compiler::emit-fn t)
(mk::oos "maxima" :compile :verbose t)
(compiler::make-all-proclaims "*/*.fn" "*/*/*/*.fn") | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/src/generate-sys-proclaim.lisp | lisp | (load "../lisp-utils/defsystem.lisp")
(compiler::emit-fn t)
(mk::oos "maxima" :compile :verbose t)
(compiler::make-all-proclaims "*/*.fn" "*/*/*/*.fn") | |
c8162776b3f6ff4c34e36d22ec2662ac91512b7ac1a85851269d0472fb11fa12 | mathematical-systems/clml | dtpmv.lisp | ;;; Compiled by f2cl version:
( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:0... | null | https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/blas/dtpmv.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t)
(:relaxed-array-decls t) (:coerce-assigns :as-needed)
(:array-type ':array) (:array-slicing t)
(:declare-common nil) (:float-format double-float)) | ( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:03:25 rtoy Exp $ "
" $ I d :... |
cd314827c37753ba40b5fce08aa60567880eb52c8f0291a49f84cc6990d8be58 | pcalcado/rtfspec | must_not_fail_spec.clj | (use 'rtfspec)
(spec "2. MUST NOT This phrase, or the phrase 'SHALL NOT', mean that the
definition is an absolute prohibition of the specification."
(must-not "avoid failure if false"
(= true true))
(must-not "have trouble when ailing in multiple lines"
(or
false
true
false))) | null | https://raw.githubusercontent.com/pcalcado/rtfspec/c733f504031635316fdc401ec371e8f03c01f380/test/smoke/failure/must_not_fail_spec.clj | clojure | (use 'rtfspec)
(spec "2. MUST NOT This phrase, or the phrase 'SHALL NOT', mean that the
definition is an absolute prohibition of the specification."
(must-not "avoid failure if false"
(= true true))
(must-not "have trouble when ailing in multiple lines"
(or
false
true
false))) | |
203ee5b3b25ec6ab381dffb2387f0f7a332c98281cd97b4b529a5374a150ef32 | penpot/penpot | projects.clj | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.rpc.commands.projects
(:require
[app.common.spec :as us]
[app.db :as db]
[app.loggers.audit... | null | https://raw.githubusercontent.com/penpot/penpot/42e97f8be105af41757f8e896b93a99032a2b72a/backend/src/app/rpc/commands/projects.clj | clojure |
Copyright (c) KALEIDOS INC
--- Check Project Permissions
--- QUERY: Get projects
--- QUERY: Get all projects
")
--- QUERY: Get project
--- MUTATION: Rename Project
--- MUTATION: Delete Project
TODO: right now, we just don't allow delete default projects, in a
future we need to ensure raise a correct exception... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.rpc.commands.projects
(:require
[app.common.spec :as us]
[app.db :as db]
[app.loggers.audit :as-alias audit]
[app.loggers... |
46fd8250ba046ed048edcdcfa544231f31352a6a7c0045cc7cd0bd197830edeb | JacquesCarette/Drasil | Unicode.hs | -- | Special type for unicode characters.
module Language.Drasil.Unicode(Special(Circle), RenderSpecial(special)) where
-- | Special characters include partial derivatives and the degree circle.
data Special = Circle -- remove by refactoring how units are done
deriving (Eq, Ord)
-- | Class for rendering special c... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/93cb12d84e35a938aaa20d27da9c16504dc37f59/code/drasil-lang/lib/Language/Drasil/Unicode.hs | haskell | | Special type for unicode characters.
| Special characters include partial derivatives and the degree circle.
remove by refactoring how units are done
| Class for rendering special characters. | module Language.Drasil.Unicode(Special(Circle), RenderSpecial(special)) where
deriving (Eq, Ord)
class RenderSpecial r where
special :: Special -> r
|
385e3f540b2d6eaa576966abbd38d1eb55ae8b5e00ac069b53f0d2837455f704 | jjmeyer0/gt | grammar.mli | module Grammar :
sig
type highlights = string * (string * string list) list
type symbol = string * bool
type production =
Production of string * string * symbol list * symbol list list option
type lexclass = string * string
type grammar =
Grammar of string list option * string * st... | null | https://raw.githubusercontent.com/jjmeyer0/gt/c0c7febc2e3fd532d44617f663b224cc0b9c7cf2/src/grammar.mli | ocaml | module Grammar :
sig
type highlights = string * (string * string list) list
type symbol = string * bool
type production =
Production of string * string * symbol list * symbol list list option
type lexclass = string * string
type grammar =
Grammar of string list option * string * st... | |
02839845295ee9d4bbea8da278957ff0e5792742c373fd394bdfc66ff6c5329a | nuprl/gradual-typing-performance | speech-bubble.rkt | #lang racket/base
(provide speech-bubble)
(require racket/draw racket/runtime-path)
(define-runtime-path speech-bubble-img "speech-bubble.png")
(define speech-bubble (read-bitmap speech-bubble-img))
| null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/2htdp/planetcute/speech-bubble.rkt | racket | #lang racket/base
(provide speech-bubble)
(require racket/draw racket/runtime-path)
(define-runtime-path speech-bubble-img "speech-bubble.png")
(define speech-bubble (read-bitmap speech-bubble-img))
| |
6b908b7ec31008cd559305b88d48664b34de6ade15882c1d4409496ff001b4a4 | ml4tp/tcoq | arguments_renaming.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/pretyping/arguments_renaming.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* [Not_found] is raised if no names ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Globnames
ope... |
11ceea88fb7a52e5056727c0791094569ab6bc9f5572f408aae66fc7d1ebe1d0 | ProjectMAC/propagators | virtual-environments.scm | ;;; ----------------------------------------------------------------------
Copyright 2009 - 2010 .
;;; ----------------------------------------------------------------------
This file is part of Propagator Network Prototype .
;;;
Propagator Network Prototype is free software ; you can
;;; redistribute it and/o... | null | https://raw.githubusercontent.com/ProjectMAC/propagators/add671f009e62441e77735a88980b6b21fad7a79/extensions/virtual-environments.scm | scheme | ----------------------------------------------------------------------
----------------------------------------------------------------------
you can
redistribute it and/or modify it under the terms of the GNU
any later version.
will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of M... | Copyright 2009 - 2010 .
This file is part of Propagator Network Prototype .
General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at your option )
Propagator Network Prototype is distributed in the hope that it
You should have received a copy of the G... |
673cd778ec46334c7fba89fe19e8e6ccf395c91538e25cf3f783ba178cea3883 | helium/gateway-config | gateway_gatt_char_wifi_services.erl | -module(gateway_gatt_char_wifi_services).
-include("gateway_gatt.hrl").
-include("pb/gateway_gatt_char_wifi_services_pb.hrl").
-ifdef(TEST).
-include_lib("proper/include/proper.hrl").
-include_lib("eunit/include/eunit.hrl").
-endif.
-behavior(gatt_characteristic).
-export([
init/2,
uuid/1,
flags/1,
... | null | https://raw.githubusercontent.com/helium/gateway-config/5a98da0d2711a87f67c80ec6ea9f710dbed727ff/src/gateway_gatt_char_wifi_services.erl | erlang | Ensure we can read the characteristic
And that it decodes to the right list of names
Test the properties of how we encode a list of service ids
If the list encodes successfully
and there is no remaining service
ids, the encoded list must be the
right size.
and there are remaining service
remaining ones must pu... | -module(gateway_gatt_char_wifi_services).
-include("gateway_gatt.hrl").
-include("pb/gateway_gatt_char_wifi_services_pb.hrl").
-ifdef(TEST).
-include_lib("proper/include/proper.hrl").
-include_lib("eunit/include/eunit.hrl").
-endif.
-behavior(gatt_characteristic).
-export([
init/2,
uuid/1,
flags/1,
... |
a705e846fb07eb378bdf54e7800d3aba680302e6c961d561a59441defa2907e0 | rescript-lang/rescript-compiler | bsb_package_kind.ml | Copyright ( C ) 2020 - Hongbo Zhang , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) an... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/ef3420e05f1546d572162ea0ca3f5d35d2a07e26/jscomp/bsb/bsb_package_kind.ml | ocaml | This package specs comes from the toplevel to
override the current settings
| Copyright ( C ) 2020 - Hongbo Zhang , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) an... |
dd7e245b62731796761d0c98bb47c4cf6466bb63d26db0c0bc42ad550cb9a061 | ocsigen/eliom | ppx_eliom_server_ex.ml | open Ppx_eliom_server [@@warning "-33"]
let () = Ppxlib.Driver.run_as_ppx_rewriter ()
| null | https://raw.githubusercontent.com/ocsigen/eliom/c3e0eea5bef02e0af3942b6d27585add95d01d6c/src/ppx/ppx_eliom_server_ex.ml | ocaml | open Ppx_eliom_server [@@warning "-33"]
let () = Ppxlib.Driver.run_as_ppx_rewriter ()
| |
e828ceba8947281ccc80875d0151742b939b3479c33a196ae3ed9d32d1092314 | quil-lang/quilc | chip-table-tests.lisp | ;;;; tests/chip-library/chip-table-tests.lisp
;;;;
Author :
(in-package #:cl-quil.chip-library-tests)
(deftest default-chips ()
(is (equalp (call-chip-builder "8q") (q::build-8q-chip)))
(is (equalp (call-chip-builder "20Q") (q::build-skew-rectangular-chip 0 4 5))))
(deftest define-chip ()
;; Uses the non-s... | null | https://raw.githubusercontent.com/quil-lang/quilc/36f6ffb979bbd460efb85a0b4cd1277e5e673aab/tests/chip-library/chip-table-tests.lisp | lisp | tests/chip-library/chip-table-tests.lisp
Uses the non-sense name "" | Author :
(in-package #:cl-quil.chip-library-tests)
(deftest default-chips ()
(is (equalp (call-chip-builder "8q") (q::build-8q-chip)))
(is (equalp (call-chip-builder "20Q") (q::build-skew-rectangular-chip 0 4 5))))
(deftest define-chip ()
(install-chip-builder "" nil :no-warn t)
(is (not (install-chip-bu... |
1363f4ce00b4ce0aa5299af3a19f4beb76f6bd44f887301eb4140291b85019bc | khayyamsaleem/gradual-typing | caster.scm | ;; Cast
(load "pmatch.scm")
(load "types.scm")
;; Syntactic Extensions
(define-syntax fn-erase
(syntax-rules (:)
((_ (: v type))
'(v))
((_ ((: v type) v2 ...))
`(v ,@(fn-erase v2 ...)))))
(define-syntax fn
;; Can we avoid the use of eval here?
(syntax-rules (:)
((_ (: v type) (: return) b... | null | https://raw.githubusercontent.com/khayyamsaleem/gradual-typing/f647f4852addeb559264190de66daa81dc1f4891/caster.scm | scheme | Cast
Syntactic Extensions
Can we avoid the use of eval here?
Helpers
Type environments are hash tables now
Cast Judgements
/ is more readable than - at times
Dealing with casts
Returns a cast judgement
te/lookup returns #f if e not bound
(and (~ type (car items-types)) (all-equal? items-types))
(new-te (te/... |
(load "pmatch.scm")
(load "types.scm")
(define-syntax fn-erase
(syntax-rules (:)
((_ (: v type))
'(v))
((_ ((: v type) v2 ...))
`(v ,@(fn-erase v2 ...)))))
(define-syntax fn
(syntax-rules (:)
((_ (: v type) (: return) body ...)
(lambda (v) body ...))
((_ (: v type) body ...)
(... |
6ebba57d918096eac6cb91064ba4615f0a755e6a95d5da2fcb75dfa188bfaefc | arttuka/reagent-material-ui | on_device_training_rounded.cljs | (ns reagent-mui.icons.on-device-training-rounded
"Imports @mui/icons-material/OnDeviceTrainingRounded as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def on-dev... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/c7cd0d7c661ab9df5b0aed0213a6653a9a3f28ea/src/icons/reagent_mui/icons/on_device_training_rounded.cljs | clojure | (ns reagent-mui.icons.on-device-training-rounded
"Imports @mui/icons-material/OnDeviceTrainingRounded as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def on-dev... | |
541cf07e9d691ab2bf4725bdff85b37986743bc59cd5d3b007811071560c14c0 | bgusach/exercises-htdp2e | ex-249.rkt | #lang htdp/isl
(define (f x) x)
(cons f '())
(f f)
(cons f (cons 10 (cons (f 10) '())))
| null | https://raw.githubusercontent.com/bgusach/exercises-htdp2e/c4fd33f28fb0427862a2777a1fde8bf6432a7690/3-abstraction/ex-249.rkt | racket | #lang htdp/isl
(define (f x) x)
(cons f '())
(f f)
(cons f (cons 10 (cons (f 10) '())))
| |
c248980620bbca79a42ee80953664b889eeb7abb2918ccc5e1db5c01cec2905e | nominolo/lambdachine | UnpackCString.hs | # LANGUAGE MagicHash , NoImplicitPrelude , UnboxedTuples , BangPatterns #
module Bc.UnpackCString where
import GHC.Base
import GHC.List
test = length "foobarbarbeonuhnsaoehunsaoheunsoanuehaonsu" == 42
| null | https://raw.githubusercontent.com/nominolo/lambdachine/49d97cf7a367a650ab421f7aa19feb90bfe14731/tests/Bc/UnpackCString.hs | haskell | # LANGUAGE MagicHash , NoImplicitPrelude , UnboxedTuples , BangPatterns #
module Bc.UnpackCString where
import GHC.Base
import GHC.List
test = length "foobarbarbeonuhnsaoehunsaoheunsoanuehaonsu" == 42
| |
d121464032585356952d505df1c8afd552b561e69e17946cec84b3c8a288156b | csabahruska/jhc-components | UniqueMonad.hs | module Util.UniqueMonad(UniqT,Uniq, runUniq, runUniqT, execUniq1, execUniq, execUniqT, UniqueProducer(..)) where
import Control.Applicative
import Control.Monad.Identity
import Control.Monad.Reader
import Control.Monad.State
import Data.Unique
import GenUtil
instance UniqueProducer IO where
newUniq = do
u... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-common/src/Util/UniqueMonad.hs | haskell | | Run the transformer version of the unique int generator.
| Run the bare version of the unique int generator.
| Execute the bare unique int generator starting with the suplied number.
| Execute the transformer version of the unique int generator starting with the suplied number.
| Unique integer generator monad t... | module Util.UniqueMonad(UniqT,Uniq, runUniq, runUniqT, execUniq1, execUniq, execUniqT, UniqueProducer(..)) where
import Control.Applicative
import Control.Monad.Identity
import Control.Monad.Reader
import Control.Monad.State
import Data.Unique
import GenUtil
instance UniqueProducer IO where
newUniq = do
u... |
a99b0de8bfaadf2c8947af8413e093d28a8ddcda6fd17783b749177d397388cd | igorhvr/bedlam | test-cset.scm | ;; Test of the internal character-set API. This is here so we can switch
;; representation of csets more easily.
Some of these are based on SRFI 14 tests
(cond-expand
(chicken-5 (import test (chicken irregex)))
(else (use test extras utils irregex)))
(load "irregex.scm")
(define (vowel? c) (member c '(#\a... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/irregex/irregex-0.9.8/test-cset.scm | scheme | Test of the internal character-set API. This is here so we can switch
representation of csets more easily.
without the 'd' |
Some of these are based on SRFI 14 tests
(cond-expand
(chicken-5 (import test (chicken irregex)))
(else (use test extras utils irregex)))
(load "irregex.scm")
(define (vowel? c) (member c '(#\a #\e #\i #\o #\u)))
(test-begin)
(test-assert
(cset=? (plist->cset '(#\a #\a #\e #\e #\i #\i #\o #\o #\u #\u))
... |
edd400557b53f3ba115c37f4b70b2ec195e573ddacc21836e1b23fe9bd027179 | hjwylde/werewolf | Command.hs | |
Module : Game . Werewolf . Variant . NoRoleReveal . Command
Description : Suite of command messages used throughout the game .
Copyright : ( c ) , 2016
License : :
A ' Message ' is used to relay information back to either all players or a single player . This module
defines suite ... | null | https://raw.githubusercontent.com/hjwylde/werewolf/d22a941120a282127fc3e2db52e7c86b5d238344/app/Game/Werewolf/Variant/NoRoleReveal/Command.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes #
* Choose
* Quit
* Status | |
Module : Game . Werewolf . Variant . NoRoleReveal . Command
Description : Suite of command messages used throughout the game .
Copyright : ( c ) , 2016
License : :
A ' Message ' is used to relay information back to either all players or a single player . This module
defines suite ... |
33dbda0f441f53690f636829a915990ab6858e0befbb87e5594894984896d80e | dryewo/cyrus | authenticator.clj | (ns {{namespace}}.authenticator
(:require [mount.lite :as m]
[dovetail.core :as log]
[cyrus-config.core :as cfg]{{#swagger1st-oauth2}}
[fahrscheine-bitte.core :as oauth2]{{/swagger1st-oauth2}}{{#ui-oauth2}}
[cyrus-ui-oauth2.core :as ui-oauth2]{{/ui-oauth2}}))
(cfg/def... | null | https://raw.githubusercontent.com/dryewo/cyrus/880c842e0baa11887854ec3d912c044a2a500449/resources/leiningen/new/cyrus/src/_namespace_/authenticator.clj | clojure | Works as a security handler for io.sarnowski.swagger1st.core/protector
copy its client credentials here. | (ns {{namespace}}.authenticator
(:require [mount.lite :as m]
[dovetail.core :as log]
[cyrus-config.core :as cfg]{{#swagger1st-oauth2}}
[fahrscheine-bitte.core :as oauth2]{{/swagger1st-oauth2}}{{#ui-oauth2}}
[cyrus-ui-oauth2.core :as ui-oauth2]{{/ui-oauth2}}))
(cfg/def... |
820452559e2f9f9399833314d768326c764d4a4f3d8bcc0a9de34de9f8e25cb2 | gsakkas/rite | 20060420-11:57:34-64faf25cf828b203532860f001bbe336.seminal.ml |
exception Unimplemented
exception RuntimeTypeError
exception DoesNotTypecheck of string
(****** Syntax for our language, including types (do not change) *****)
type exp = Var of string
| Lam of string * typ * exp
| Apply of exp * exp
| Closure of string * exp * (env ref)
| Int of int
| Pl... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060420-11%3A57%3A34-64faf25cf828b203532860f001bbe336.seminal.ml | ocaml | ***** Syntax for our language, including types (do not change) ****
***** Interpreter for our language (do not change) ****
**** helper functions provided to you (do not change) ****
********* examples and testing ********** |
exception Unimplemented
exception RuntimeTypeError
exception DoesNotTypecheck of string
type exp = Var of string
| Lam of string * typ * exp
| Apply of exp * exp
| Closure of string * exp * (env ref)
| Int of int
| Plus of exp * exp
| If of exp * exp * exp
| RecordE of (string * exp)... |
0b67c0c3ebe3a60716e7718865227aabc99f48a0c2596eb8391ac299519fe64a | RichiH/git-annex | PreCommit.hs | git - annex command
-
- Copyright 2010 - 2014 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2010-2014 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
module Command.PreCommit where
import Command
import Config
import qualified Com... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Command/PreCommit.hs | haskell | update direct mode mappings for committed files
fix symlinks to files being committed
inject unlocked files into the annex
(not needed when repo version uses
unlocked pointer files)
committing changes to a view updates metadata
Takes exclusive lock; blocks until available. | git - annex command
-
- Copyright 2010 - 2014 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2010-2014 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
module Command.PreCommit where
import Command
import Config
import qualified Com... |
ea65a9fe0f537b05af2d6118c957057c91ee807a5bffe59b9ca8757377d7c53b | mstksg/inCode | Api.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE TypeInType #-}
# LANGUAGE TypeOperators #
{-# OPTIONS_GHC -Wall #-}
module Api where
import Data.Aeson
import Data.IntMap (IntMap)
import Data.IntSet (IntSet)
import Data.Proxy
import Data.Text (Text)
import GH... | null | https://raw.githubusercontent.com/mstksg/inCode/e1f80a3dfd83eaa2b817dc922fd7f331cd1ece8a/code-samples/servant-services/Api.hs | haskell | # LANGUAGE TypeInType #
# OPTIONS_GHC -Wall # | # LANGUAGE DeriveGeneric #
# LANGUAGE TypeOperators #
module Api where
import Data.Aeson
import Data.IntMap (IntMap)
import Data.IntSet (IntSet)
import Data.Proxy
import Data.Text (Text)
import GHC.Generics
import Servant.API
data Task = Task
... |
2841cacc9dd6487a8d57d6fe7bf59aab84f31d6c73ddfb16f02db6fd999d2d99 | lukexi/halive | Computation.hs | main = print [1..10] | null | https://raw.githubusercontent.com/lukexi/halive/cae5b327730bcea5ef25bb05e5a12a283eade97d/demo/Computation.hs | haskell | main = print [1..10] | |
bee7518e323edfe7bddd74dfc0d0723d4b47b29f5edd5f03f981e5fb7a0f984c | lisp-mirror/airship-scheme | package.lisp | ;;;; -*- mode: common-lisp; -*-
(cl:defpackage #:airship-scheme/tests
(:use #:airship-scheme
#:cl)
(:import-from #:5am
#:is)
(:export #:airship-scheme/tests)
(:local-nicknames (:scheme :airship-scheme)
(:f :float-features)))
| null | https://raw.githubusercontent.com/lisp-mirror/airship-scheme/12dbbb3b0fe7ea7cf82e44cbaf736729cc005469/tests/package.lisp | lisp | -*- mode: common-lisp; -*- |
(cl:defpackage #:airship-scheme/tests
(:use #:airship-scheme
#:cl)
(:import-from #:5am
#:is)
(:export #:airship-scheme/tests)
(:local-nicknames (:scheme :airship-scheme)
(:f :float-features)))
|
47e2f5ae1616bdb4542aefdeabf03d6c9d419a1cd5206119301e5ffc05a8f62a | clj-commons/iapetos | fn_test.clj | (ns iapetos.collector.fn-test
(:require [clojure.test :refer :all]
[clojure.test.check
[generators :as gen]
[properties :as prop]
[clojure-test :refer [defspec]]]
[iapetos.test.generators :as g]
[iapetos.core :as prometheus]
[iapet... | null | https://raw.githubusercontent.com/clj-commons/iapetos/0fecedaf8454e17e41b05e0e14754a311b9f4ce2/test/iapetos/collector/fn_test.clj | clojure | ## Tests | (ns iapetos.collector.fn-test
(:require [clojure.test :refer :all]
[clojure.test.check
[generators :as gen]
[properties :as prop]
[clojure-test :refer [defspec]]]
[iapetos.test.generators :as g]
[iapetos.core :as prometheus]
[iapet... |
8a2ce2944ca9381e66a061a56d950cf0a11538f6e289c8599103e88d2f1323d6 | HealthSamurai/us-npi | api_test.clj | (ns usnpi.api-test
(:require [clojure.test :refer :all]
[ring.mock.request :as mock]
[usnpi.util-test :refer [read-body]]
[usnpi.core :as usnpi]))
(deftest test-root-page
(testing "The root page returns the request map"
(let [req (mock/request :get "/")
res (usnpi/... | null | https://raw.githubusercontent.com/HealthSamurai/us-npi/a28a8ec8d45e19fadab0528791e7de78f19dc87e/test/usnpi/api_test.clj | clojure | (ns usnpi.api-test
(:require [clojure.test :refer :all]
[ring.mock.request :as mock]
[usnpi.util-test :refer [read-body]]
[usnpi.core :as usnpi]))
(deftest test-root-page
(testing "The root page returns the request map"
(let [req (mock/request :get "/")
res (usnpi/... | |
6b52b25c6b05eb03a6f65446ee0a93f39152a3cd244c832231bc2f217c8ab80b | fourmolu/fourmolu | operators-3-four-out.hs | foo =
op <> n
<+> colon
<+> prettySe
<+> text "="
<+> prettySe <> text sc
| null | https://raw.githubusercontent.com/fourmolu/fourmolu/1f8903a92c8d5001dc1ec8ecfd4a04a3b61c3283/data/examples/declaration/value/function/operators-3-four-out.hs | haskell | foo =
op <> n
<+> colon
<+> prettySe
<+> text "="
<+> prettySe <> text sc
| |
985311f12f47c4b65cf013654c9de4a12eed4d03b6e9112a6b9383af9a72dab1 | kind2-mc/kind2 | lustreAstHelpers.mli | This file is part of the Kind 2 model checker .
Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa
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 a... | null | https://raw.githubusercontent.com/kind2-mc/kind2/d34694b4461323322fdcc291aa3c3d9c453fc098/src/lustre/lustreAstHelpers.mli | ocaml | * Some helper functions on the surface level parsed AST
* {1 Helpers}
* Returns whether or not the expression is an Ident variant
* Returns whether or not the expression is a Bool Const variant with the True value
* Returns whether or not the expression is a Bool Const variant with the False value
* Returns the po... | This file is part of the Kind 2 model checker .
Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa
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 a... |
6a38e03f8c1ebaebcfe794e39047ac8f2a09aab5a599cb77de785f070ee5b30c | 47degrees/yin-yang-haskell-workshop | V2GreetSolution.hs | {-# language OverloadedStrings #-}
module V2GreetSolution where
import Network.Simple.TCP
main :: IO ()
main = serve (Host "127.0.0.1") "8080" $ \(socket, _) -> do
name <- recv socket 10000
case name of
Nothing -> return ()
Just nm -> do let greeting = "Hello, " <> nm
... | null | https://raw.githubusercontent.com/47degrees/yin-yang-haskell-workshop/dd9c3076fecf26cafd4f30c4906dd94e003ca651/2-simple-server/V2GreetSolution.hs | haskell | # language OverloadedStrings # | module V2GreetSolution where
import Network.Simple.TCP
main :: IO ()
main = serve (Host "127.0.0.1") "8080" $ \(socket, _) -> do
name <- recv socket 10000
case name of
Nothing -> return ()
Just nm -> do let greeting = "Hello, " <> nm
send socket greetin... |
86b28c4312f0e802d23ef0ef5cb28715f5c6d9cb77f86bf8ca353dec828b824a | hidaris/thinking-dumps | UnbalancedSet.rkt | #lang typed/racket
(require "Element.rkt")
(define-type Elem TT)
(define-type Tree
(U E
T))
(struct E ()
#:transparent)
(struct T ([u : Tree] [v : Elem] [w : Tree])
#:transparent)
(define-type-alias Set Tree)
(: empty : Set)
(define empty (E))
(: member : (Elem Set -> Boolean))
(define (member x s)
(... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/pfds/chap2/UnbalancedSet.rkt | racket | #lang typed/racket
(require "Element.rkt")
(define-type Elem TT)
(define-type Tree
(U E
T))
(struct E ()
#:transparent)
(struct T ([u : Tree] [v : Elem] [w : Tree])
#:transparent)
(define-type-alias Set Tree)
(: empty : Set)
(define empty (E))
(: member : (Elem Set -> Boolean))
(define (member x s)
(... | |
49376187d36c63d7fe8643625f065b8b7baf1c2f258c04b64c82202fcfb87037 | RedPRL/ocaml-bwd | Bwd.mli | type 'a bwd = 'a BwdDef.bwd =
| Emp
| Snoc of 'a bwd * 'a
(** This module is similar to {!module:List} but for backward lists. *)
module Bwd : module type of BwdNoLabels
(** This module is similar to {!module:ListLabels} but for backward lists. *)
module BwdLabels : module type of BwdLabels
(**/**)
* An alias o... | null | https://raw.githubusercontent.com/RedPRL/ocaml-bwd/14866f9bd38ec289a4a44779b8685ed83865820a/src/Bwd.mli | ocaml | * This module is similar to {!module:List} but for backward lists.
* This module is similar to {!module:ListLabels} but for backward lists.
*/* | type 'a bwd = 'a BwdDef.bwd =
| Emp
| Snoc of 'a bwd * 'a
module Bwd : module type of BwdNoLabels
module BwdLabels : module type of BwdLabels
* An alias of { ! module : . Notation } for infix notation .
module BwdNotation : module type of BwdNotation [@@ocaml.alert deprecated "Use Bwd.Infix instead"]
|
cd7ace91ba6e8a7671941f138ebdcb6a8aac1e63e5815fd2a92347a138c6da44 | nuvla/api-server | group_template.clj | (ns sixsq.nuvla.server.resources.group-template
"
Templates for creating a new `group`. The collection contains a single template
(group-template/generic) that serves as a placeholder. It is not needed for
creating a group and does not provide any useful defaults.
"
(:require
[clojure.tools.logging :as log]
... | null | https://raw.githubusercontent.com/nuvla/api-server/7095076ae6eff4b8f21b17e7673886854ba90e2d/code/src/sixsq/nuvla/server/resources/group_template.clj | clojure |
resource
atom to keep track of the group-template resources (only 1 for now)
multimethods for validation
CRUD operations
must override the default implementation so that the
data can be pulled from the atom rather than the database
FIXME: At least the paging options should be supported.
initialization:... | (ns sixsq.nuvla.server.resources.group-template
"
Templates for creating a new `group`. The collection contains a single template
(group-template/generic) that serves as a placeholder. It is not needed for
creating a group and does not provide any useful defaults.
"
(:require
[clojure.tools.logging :as log]
... |
d43c1080d5000f06ead2e731413349c62282526af6550ecd59cc82a80c599c98 | lokedhs/cl-gdata | atom.lisp | (in-package :cl-gdata-misc)
(alexandria:define-constant +ATOM-TAG-FEED+ "#feed" :test 'equal)
(alexandria:define-constant +ATOM-TAG-EDIT+ "edit" :test 'equal)
(alexandria:define-constant +ATOM-XML-MIME-TYPE+ "application/atom+xml" :test 'equal)
(defclass node-dom-mixin ()
((feeds :type list
:initar... | null | https://raw.githubusercontent.com/lokedhs/cl-gdata/3ca1ed63e358ccb4bfbbaa5f09755cc8ef980db6/src/atom.lisp | lisp |
Feed class
The subpath can either be a string designating an xpath that specified string data,
Loading of feeds
(dom:map-document (cxml:make-namespace-normalizer (cxml:make-character-stream-sink *standard-output*)) document) | (in-package :cl-gdata-misc)
(alexandria:define-constant +ATOM-TAG-FEED+ "#feed" :test 'equal)
(alexandria:define-constant +ATOM-TAG-EDIT+ "edit" :test 'equal)
(alexandria:define-constant +ATOM-XML-MIME-TYPE+ "application/atom+xml" :test 'equal)
(defclass node-dom-mixin ()
((feeds :type list
:initar... |
e22fd24287539eddf0c9e221699f97354b471626af0bdfcef2852ff070fed892 | fulcrologic/fulcro-rad-tutorial | client.cljs | (ns com.example.client
(:require
[com.example.ui :as ui :refer [Root]]
[com.example.ui.login-dialog :refer [LoginForm]]
[com.fulcrologic.fulcro.application :as app]
[com.fulcrologic.fulcro.mutations :as m]
[com.fulcrologic.rad.application :as rad-app]
[com.fulcrologic.rad.authorization :as aut... | null | https://raw.githubusercontent.com/fulcrologic/fulcro-rad-tutorial/809b8f8833363be7dc0c9a66307b1fa164da4d70/src/main/com/example/client.cljs | clojure | hot code reload of installed controls
a default tz until they log in | (ns com.example.client
(:require
[com.example.ui :as ui :refer [Root]]
[com.example.ui.login-dialog :refer [LoginForm]]
[com.fulcrologic.fulcro.application :as app]
[com.fulcrologic.fulcro.mutations :as m]
[com.fulcrologic.rad.application :as rad-app]
[com.fulcrologic.rad.authorization :as aut... |
0b06803c298d5902dba662e9eae5cbcc2a172dbb4089f1fcbe0a4f8d83e612a7 | coq/coq | declaremods.ml | (************************************************************************)
(* * 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/2be68bf1a3359c259a85dbb8e2b5d5075ba68f90/vernac/declaremods.ml | 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... |
c9212bad80ae157538c6fce2250d17e0d5b28f647678b8e3e9eebf56e0b4edab | ferd/erlpass | erlpass.erl | @author < > [ / ]
@doc is a simple wrapper library trying to abstract away common
%% password operations using safe algorithms, in this case, bcrypt.
-module(erlpass).
-export([hash/1, hash/2, match/2, change/3, change/4]).
-define(DEFAULT_WORK_FACTOR, 12).
-type password() :: iodata().
%% A password, supports... | null | https://raw.githubusercontent.com/ferd/erlpass/34bb7ca3dab46094893a5b31f0e6f2ffa60f2641/src/erlpass.erl | erlang | password operations using safe algorithms, in this case, bcrypt.
A password, supports valid unicode.
Work factor of the bcrypt algorithm.
The hashed password with a given work factor.
@doc Hashes a given {@link password(). <code>password</code>} with a given
a {@link hash(). hash} of the password to be stored by... | @author < > [ / ]
@doc is a simple wrapper library trying to abstract away common
-module(erlpass).
-export([hash/1, hash/2, match/2, change/3, change/4]).
-define(DEFAULT_WORK_FACTOR, 12).
-type password() :: iodata().
-type work_factor() :: 4..31.
-type hash() :: binary().
-export_type([password/0, work_f... |
f15cf7e8cb0175635f75951bc2decd79a126c99b9f3934bd08f4ffac355b828e | hammerlab/coclobas | client.ml | open Internal_pervasives
type t = {
base_url: string [@main];
} [@@deriving yojson, show, make]
let wrap_io d =
Deferred_result.wrap_deferred d
~on_exn:(fun e -> `Client (`IO_exn e))
let wrap_parsing d =
Deferred_result.wrap_deferred d
~on_exn:(fun e -> `Client (`Json_exn e))
let do_get uri =
wrap_i... | null | https://raw.githubusercontent.com/hammerlab/coclobas/5341ea53fdb5bcea0dfac3e4bd94213b34a48bb9/src/lib/client.ml | ocaml | Only for error values:
For describe or logs
Only for error values: | open Internal_pervasives
type t = {
base_url: string [@main];
} [@@deriving yojson, show, make]
let wrap_io d =
Deferred_result.wrap_deferred d
~on_exn:(fun e -> `Client (`IO_exn e))
let wrap_parsing d =
Deferred_result.wrap_deferred d
~on_exn:(fun e -> `Client (`Json_exn e))
let do_get uri =
wrap_i... |
8d8bb925757433b9c01d8a543bfce6ebb79bff537177bfad9b7ec8ffa18b160a | ghc/ghc | GenManyUbxSums.hs | #!/usr/bin/env runghc
# LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
# LANGUAGE UnboxedSums #
-- This little piece of code constructs a large set of functions
-- constructing and deconstructing unboxed tuples of various types.
module Main where
import GHC.Exts
import System.IO
import Data.List (intersperse)
inputs... | null | https://raw.githubusercontent.com/ghc/ghc/31462d98c31e3ef48af2f6c6f2d379d74ccc63f5/testsuite/tests/unboxedsums/GenManyUbxSums.hs | haskell | This little piece of code constructs a large set of functions
constructing and deconstructing unboxed tuples of various types.
["Addr#","Int#","Int8#","Int16#","Int32#","Int64#","Word#","Word8#","Word16#","Word32#","Word64#"]
given type tuples.
fun0 :: (# Addr# | I16# #) -> (# Addr# | I# #)
fun0 x = case x of
Ge... | #!/usr/bin/env runghc
# LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
# LANGUAGE UnboxedSums #
module Main where
import GHC.Exts
import System.IO
import Data.List (intersperse)
inputs = ["Int", "Word"]
sizes = ["","8","16","32","64"]
types = "Addr#" : do
r <- inputs
s <- sizes
return $ r++s++"#"
We ... |
d2244d81573d4ea61c4e770352cef3483b4469b19460cfe8c3433d3abc496765 | gsakkas/rite | 2111.ml |
type expr =
| VarX
| VarY
| Sine of expr
| Cosine of expr
| Average of expr* expr
| Times of expr* expr
| Thresh of expr* expr* expr* expr;;
let rec eval (e,x,y) =
match e with
| VarX -> x +. 0.0
| VarY -> y +. 0.0
| Average (a1,a2) -> (eval (VarX, a1, a2)) + (eval (VarY, a1, a2));;
fix
... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14/2111.ml | ocaml |
type expr =
| VarX
| VarY
| Sine of expr
| Cosine of expr
| Average of expr* expr
| Times of expr* expr
| Thresh of expr* expr* expr* expr;;
let rec eval (e,x,y) =
match e with
| VarX -> x +. 0.0
| VarY -> y +. 0.0
| Average (a1,a2) -> (eval (VarX, a1, a2)) + (eval (VarY, a1, a2));;
fix
... | |
2949c1828b94a1420bd75869666d1df7a1dc07b283dae7d623cd2de9fb3cfe58 | ocaml-ppx/ppx | test_ppx_bootstrap.mli | open! Ppx
val expr : Ppx_ast.expression
val pat : Ppx_ast.pattern
val type_ : Ppx_ast.core_type
val stri : Ppx_ast.structure_item
val str : Ppx_ast.structure
val sigi : Ppx_ast.signature_item
val sig_ : Ppx_ast.signature
val f_view : Ppx_ast.expression -> (Ppx_ast.expression * Ppx_ast.core_type) option
| null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/bootstrap/test/test_ppx_bootstrap.mli | ocaml | open! Ppx
val expr : Ppx_ast.expression
val pat : Ppx_ast.pattern
val type_ : Ppx_ast.core_type
val stri : Ppx_ast.structure_item
val str : Ppx_ast.structure
val sigi : Ppx_ast.signature_item
val sig_ : Ppx_ast.signature
val f_view : Ppx_ast.expression -> (Ppx_ast.expression * Ppx_ast.core_type) option
| |
e933b6e99a380bf858b976f72c2bd6b0fa679ec7be1ce9ce9ef71f62a0dcefd5 | contested-space/seer | seer_app.erl | -module(seer_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
seer_sup:start_link().
stop(_State) ->
ok.
| null | https://raw.githubusercontent.com/contested-space/seer/f9879bce8632375d07b20443e8e3d7d88964b230/src/seer_app.erl | erlang | -module(seer_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
seer_sup:start_link().
stop(_State) ->
ok.
| |
4c273ac1af75821d3e84df7da0f2b5e5799ccc11fe1bba55da9ca9f89129778b | helium/erlang-multiaddr | multiaddr_test.erl | -module(multiaddr_test).
-include_lib("eunit/include/eunit.hrl").
encode_success_test() ->
Cases = ["/ip4/1.2.3.4",
"/ip4/0.0.0.0",
"/ip6/::1",
"/ip6/2601:9:4f81:9700:803e:ca65:66e8:c21",
"/ip6/2601:9:4f81:9700:803e:ca65:66e8:c21/udp/1234/quic",
"/o... | null | https://raw.githubusercontent.com/helium/erlang-multiaddr/9bf236917a336800f953150568291f192603446c/test/multiaddr_test.erl | erlang | % " tcp " passes base58 : base58_check
from -to-hex-string-back-to-binary-in.html | -module(multiaddr_test).
-include_lib("eunit/include/eunit.hrl").
encode_success_test() ->
Cases = ["/ip4/1.2.3.4",
"/ip4/0.0.0.0",
"/ip6/::1",
"/ip6/2601:9:4f81:9700:803e:ca65:66e8:c21",
"/ip6/2601:9:4f81:9700:803e:ca65:66e8:c21/udp/1234/quic",
"/o... |
2f2c72268a571a86233373734c5bb155f33160cbb074f765b7bad93458706c43 | infinitelives/infinitelives.pixi | pixelfont.clj | (ns infinitelives.pixi.pixelfont
(:require [clojure.java.io :as io]
[clojure.string :as string])
(:import [javax.imageio ImageIO]))
(defn horizontal-strip [y x1 x2]
(for [x (range x1 x2)] [x y]))
(defn vertical-strip [x y1 y2]
(for [y (range y1 y2)] [x y]))
(defn alpha-at [image [x y]]
(-> imag... | null | https://raw.githubusercontent.com/infinitelives/infinitelives.pixi/877bd247f2bae327bc3a3bd70162a7880de9a0c7/src/clj/infinitelives/pixi/pixelfont.clj | clojure | <=>?@[\\]^_`{|}~")
(process-line 0 1000 89 96) | (ns infinitelives.pixi.pixelfont
(:require [clojure.java.io :as io]
[clojure.string :as string])
(:import [javax.imageio ImageIO]))
(defn horizontal-strip [y x1 x2]
(for [x (range x1 x2)] [x y]))
(defn vertical-strip [x y1 y2]
(for [y (range y1 y2)] [x y]))
(defn alpha-at [image [x y]]
(-> imag... |
0487d88456b8ab494f27d1d1e9243c8e524e1e921ddf6f8381674ad93c2a062d | bmeurer/ocamljit2 | ctype.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/typing/ctype.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
Operations on core types
op... |
86ab4bbf78a27cfd5c1fc29c101d6eef720112eab12da2be638a4b962335241e | plumatic/grab-bag | flushing_log_test.clj | (ns store.flushing-log-test
(:require
[plumbing.core :refer :all]
[plumbing.test :refer :all]
[plumbing.graph :as graph]
[plumbing.resource :as resource]
[store.bucket :as bucket]
[store.flushing-log :refer :all]
[clojure.test :refer :all]))
(deftest log!-test
(let [bucket (bucket/bucket {})]
... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/store/test/store/flushing_log_test.clj | clojure | (ns store.flushing-log-test
(:require
[plumbing.core :refer :all]
[plumbing.test :refer :all]
[plumbing.graph :as graph]
[plumbing.resource :as resource]
[store.bucket :as bucket]
[store.flushing-log :refer :all]
[clojure.test :refer :all]))
(deftest log!-test
(let [bucket (bucket/bucket {})]
... | |
76bb66ca403718ddffcf79ac4d4d51ca785b04eea6988f85ccdc84def92a845c | aelve/guide | Main.hs | {-# LANGUAGE FlexibleContexts #-}
-- | Description : The main module that starts the server.
module Guide.Main
(
-- * Main
main,
-- * All supported commands
runServer,
dryRun,
loadPublic,
apiDocs,
)
where
import Imports
-- Concurrent
import Control.Concurrent.Async
-- Monads and monad transformers... | null | https://raw.githubusercontent.com/aelve/guide/96a338d61976344d2405a16b11567e5464820a9e/back/src/Guide/Main.hs | haskell | # LANGUAGE FlexibleContexts #
| Description : The main module that starts the server.
* Main
* All supported commands
Concurrent
Monads and monad transformers
Web
Spock-digestive
Highlighting
acid-state
IO
Catching Ctrl-C and termination
--------------------------------------------------------------------... |
module Guide.Main
(
main,
runServer,
dryRun,
loadPublic,
apiDocs,
)
where
import Imports
import Control.Concurrent.Async
import Control.Monad.Morph
import Lucid hiding (for_)
import Network.Wai.Middleware.Static (addBase, staticPolicy)
import Web.Spock hiding (get, head, text)
import Web.Spock.Config
imp... |
8f41ce251d456d45bbaa523b1265da2a4f796c6ee1f22d45c2b327a5a6d13180 | wireapp/wire-server | Report.hs | # LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
-- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as p... | null | https://raw.githubusercontent.com/wireapp/wire-server/598c3c7b5c3c80a41c713a8fdb88e6658b2daba0/libs/api-bot/src/Network/Wire/Bot/Report.hs | haskell | # LANGUAGE OverloadedStrings #
This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANT... | # LANGUAGE GeneralizedNewtypeDeriving #
Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public Licens... |
556939b968b551b9e99f29038259088eef0857c4ef0485d21a8569c2182c926a | HaskellCNOrg/snap-web | ReplyForm.hs | {-# LANGUAGE OverloadedStrings #-}
module Views.ReplyForm where
import Data.Text (Text)
import qualified Data.Text as T
import Snap
import Text.Digestive
import Text.Digestive.FormExt
import Text.Digestive.Snap
------------------------------... | null | https://raw.githubusercontent.com/HaskellCNOrg/snap-web/f104fd9b8fc5ae74fc7b8002f0eb3f182a61529e/src/Views/ReplyForm.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------
Maybe Empty
----------------------------------------------------------
----------------------------------------------------------
|
---------------------------------------------------------- |
module Views.ReplyForm where
import Data.Text (Text)
import qualified Data.Text as T
import Snap
import Text.Digestive
import Text.Digestive.FormExt
import Text.Digestive.Snap
data ReplyVo = ReplyVo
{ replyToTopicId :: T.Text... |
12b8137cafab14d2d837d55f7360b27cff2be31741c349859c61845d6fc418de | nominolo/scion | Core.hs | # LANGUAGE ExistentialQuantification , DeriveDataTypeable #
module Scion.Types.Core (
* Generalised IO and Exception monads
module Exception,
MonadIO(..),
io, gcatches, HandlerM(..),
-- * Exception Types
ScionException(..), scionError,
-- * Logging
Verbosity, silent, normal, verbose, deafening,
LogM... | null | https://raw.githubusercontent.com/nominolo/scion/99b4589175665687181a932cd836850205625f71/src/Scion/Types/Core.hs | haskell | * Exception Types
* Logging
| A short name for 'liftIO'.
Example use:
> f = expr `gcatches` [HandlerM (\(ex :: ArithException) -> handleArith ex),
> HandlerM (\(ex :: IOException) -> handleIO ex)]
| You need this when using 'catches'.
| Utility function for throwing a 'ScionExcep... | # LANGUAGE ExistentialQuantification , DeriveDataTypeable #
module Scion.Types.Core (
* Generalised IO and Exception monads
module Exception,
MonadIO(..),
io, gcatches, HandlerM(..),
ScionException(..), scionError,
Verbosity, silent, normal, verbose, deafening,
LogMonad(..),
) where
from GHC
import Ex... |
11a0442e4a1816421d0d0bf2b2831625fcce91278e6a97ae0de80839481c6093 | clj-kondo/clj-kondo | unused_vars.cljs | #!/usr/bin/env plk -K
(ns script.unused-vars
(:require [cljs.reader :as edn]
[clojure.set :as set]
[clojure.string :as str]
[planck.shell :refer [sh]]))
(defn -main [& paths]
(let [out (:out (apply sh "clj-kondo" "--config" "{:output {:format :edn}, :analysis true}"
... | null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/d012ab5614e0824dd51da9946dc8708dee7f498d/analysis/script/unused_vars.cljs | clojure | #!/usr/bin/env plk -K
(ns script.unused-vars
(:require [cljs.reader :as edn]
[clojure.set :as set]
[clojure.string :as str]
[planck.shell :refer [sh]]))
(defn -main [& paths]
(let [out (:out (apply sh "clj-kondo" "--config" "{:output {:format :edn}, :analysis true}"
... | |
f7327b444c7f40daa0927139b5f89637f9ac74e7306a1f98fc9fbc30f3baaf8a | ghc/packages-directory | CopyFileWithMetadata.hs | # LANGUAGE CPP #
module CopyFileWithMetadata where
#include "util.inl"
import qualified Data.List as List
main :: TestEnv -> IO ()
main _t = (`finally` cleanup) $ do
-- prepare source file
writeFile "a" contents
writeFile "b" "To be replaced\n"
setModificationTime "a" mtime
modifyWritable False "a"
perm <... | null | https://raw.githubusercontent.com/ghc/packages-directory/75165a9d69bebba96e0e3a1e519ab481d1362dd2/tests/CopyFileWithMetadata.hs | haskell | prepare source file
sanity check
copy file
make sure we got the right results
needed to ensure the test runner can clean up our mess | # LANGUAGE CPP #
module CopyFileWithMetadata where
#include "util.inl"
import qualified Data.List as List
main :: TestEnv -> IO ()
main _t = (`finally` cleanup) $ do
writeFile "a" contents
writeFile "b" "To be replaced\n"
setModificationTime "a" mtime
modifyWritable False "a"
perm <- getPermissions "a"
T... |
b41f505294eab32e2c401564e2956832e87544f46808b8d2f53ba173f4ef00e2 | GaloisInc/macaw | AtomWrapper.hs | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
{-# LANGUAGE RankNTypes #-}
module Data.Macaw.AArch32.Symbolic.AtomWrapper (
AtomWrapper(..),
liftAtomMap,
liftAtomTrav,
liftAtomIn
) where
import Data.Kind ( Type )
import qualified Lang.Crucible.Types as C
import qualified Data.Macaw.Types as MT... | null | https://raw.githubusercontent.com/GaloisInc/macaw/ff894f9286f976d0ab131325bea902ef6275aad2/macaw-aarch32-symbolic/src/Data/Macaw/AArch32/Symbolic/AtomWrapper.hs | haskell | # LANGUAGE RankNTypes # | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
module Data.Macaw.AArch32.Symbolic.AtomWrapper (
AtomWrapper(..),
liftAtomMap,
liftAtomTrav,
liftAtomIn
) where
import Data.Kind ( Type )
import qualified Lang.Crucible.Types as C
import qualified Data.Macaw.Types as MT
import qualified Data.Macaw... |
2da4d061a4d29b66b93ca2d43f0c8aed70f065c4ba1b98b4107e681e891fade2 | WFP-VAM/RAMResourcesScripts | FES.sps | * Encoding: UTF-8.
********************************************************************************
* SPSS Syntax for the Food Expenditure Share (FES) indicator
*******************************************************************************
*Important note: the value of consumed in-kind assistance/gifts should be ... | null | https://raw.githubusercontent.com/WFP-VAM/RAMResourcesScripts/236e1a630f053d27161c73dfe01a9ef04b7ebdcc/Indicators/Food-expenditure-share/FES.sps | scheme | * Encoding: UTF-8.
********************************************************************************
* SPSS Syntax for the Food Expenditure Share (FES) indicator
*******************************************************************************
*Important note: the value of consumed in-kind assistance/gifts should be ... | |
7697025de6389dcec8bfd6fad375afc843145766f33b9a31771299f6818bac34 | keera-studios/haskellifi-trayicon | ProtectedModel.hs | -- |
Copyright : ( C ) trading as Keera Studios , 2012
-- License : BSD3
Maintainer :
module Model.ProtectedModel
( ProtectedModel
, onEvent
, waitFor
, module Exported
)
where
import Model.ProtectedModel.ProtectedModelInternals
import Model.ReactiveModel.ModelEvents as Exported
i... | null | https://raw.githubusercontent.com/keera-studios/haskellifi-trayicon/d148387bb362f7cdc959c2a07e981675b7e6bc29/src/Model/ProtectedModel.hs | haskell | |
License : BSD3 | Copyright : ( C ) trading as Keera Studios , 2012
Maintainer :
module Model.ProtectedModel
( ProtectedModel
, onEvent
, waitFor
, module Exported
)
where
import Model.ProtectedModel.ProtectedModelInternals
import Model.ReactiveModel.ModelEvents as Exported
import Model.ProtectedModel.... |
a4276dfd78859601b0cfd69411ce7d3bc674e69a13f2ea365817420667a66cc2 | iburzynski/EMURGO_71 | HOF-SOLUTION.hs | {-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
{-# HLINT ignore "Avoid lambda" #-}
# HLINT ignore " Eta reduce " #
{-# HLINT ignore "Use map" #-}
{-# HLINT ignore "Use or" #-}
{-# HLINT ignore "Use sum" #-}
{-# HLINT ignore "Use product" #-}
{-# HLINT ignore "Use foldr" #-}
{-# HLINT ignore "Use and" #-}
import Data.Li... | null | https://raw.githubusercontent.com/iburzynski/EMURGO_71/c529f1a5c717b7b8ff59bcff72d94f8198eeab89/HW_07-23/HOF-SOLUTION.hs | haskell | # OPTIONS_GHC -Wno-unrecognised-pragmas #
# HLINT ignore "Avoid lambda" #
# HLINT ignore "Use map" #
# HLINT ignore "Use or" #
# HLINT ignore "Use sum" #
# HLINT ignore "Use product" #
# HLINT ignore "Use foldr" #
# HLINT ignore "Use and" #
-------------------------------------------------------------------------------... | # HLINT ignore " Eta reduce " #
import Data.List (foldl')
myMap :: (a -> b) -> [a] -> [b]
myMap _ [] = []
myMap f (x : xs) = f x : myMap f xs
myFilter :: (a -> Bool) -> [a] -> [a]
myFilter _ [] = []
myFilter p (x : xs)
| p x = x : myFilter p xs
| otherwise = myFilter p xs
* * * Part II : Folds * * *
1 . W... |
11607ee754848e0e1a43181d334edf351d3f1458828f4548601b178b55260e6d | gvannest/piscine_OCaml | avl.ml | type 'a tree = Nil | Node of 'a * 'a tree * 'a tree
(* ********************* previous exercise 03 ***************************** *)
let is_bst (tree:int tree) =
let rec is_bst_left (tree_left:'a tree) maxValue (min:'a tree) (max:'a tree) = match tree_left with
| Nil -> true
| Node(v, l, r) when v >... | null | https://raw.githubusercontent.com/gvannest/piscine_OCaml/2533c6152cfb46c637d48a6d0718f7c7262b3ba6/d03/ex04/avl.ml | ocaml | ********************* previous exercise 03 *****************************
******************** To print tree **************
************************* *************** ***********************************
******************** insertion in avl **********************
******************** unit tests right_rotate ****... | type 'a tree = Nil | Node of 'a * 'a tree * 'a tree
let is_bst (tree:int tree) =
let rec is_bst_left (tree_left:'a tree) maxValue (min:'a tree) (max:'a tree) = match tree_left with
| Nil -> true
| Node(v, l, r) when v > maxValue -> false
| Node(v, l, r) -> match min with
| Nod... |
a4027b851a568584c4b0b9b99beae2f5ed3f8a9ced1645c02fcbf298e45f80b2 | kahua/Kahua | kahua-shell.scm | -*- mode : scheme ; coding : utf-8 -*-
;; Interactive shell script
;;
Copyright ( c ) 2003 - 2007 Scheme Arts , L.L.C. , All rights reserved .
Copyright ( c ) 2003 - 2007 Time Intermedia Corporation , All rights reserved .
;; See COPYING for terms and conditions of using this software
;;
(use srfi-1)
(use gau... | null | https://raw.githubusercontent.com/kahua/Kahua/18e28cd307e733ce281e74b2d574cbfc60a5d390/src/kahua-shell.scm | scheme | coding : utf-8 -*-
Interactive shell script
See COPYING for terms and conditions of using this software
Deal with login -----------------------------------
Deal with select workers ------------------------------------
Deal with worker command ------------------------------------
Utility ----------------------... | Copyright ( c ) 2003 - 2007 Scheme Arts , L.L.C. , All rights reserved .
Copyright ( c ) 2003 - 2007 Time Intermedia Corporation , All rights reserved .
(use srfi-1)
(use gauche.net)
(use gauche.parseopt)
(use util.list)
(use kahua)
(use gauche.process)
(use gauche.termios)
(use kahua.developer)
(define (login... |
d7d424c153ec77dce4992a2c424b35bd99ff02c970076aa1e7cda1bc62d2b535 | Opetushallitus/ataru | field_types.cljc | (ns ataru.application.field-types)
(def form-fields
["textField"
"textArea"
"dropdown"
"multipleChoice"
"singleChoice"
"attachment"
"hakukohteet"])
| null | https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/src/cljc/ataru/application/field_types.cljc | clojure | (ns ataru.application.field-types)
(def form-fields
["textField"
"textArea"
"dropdown"
"multipleChoice"
"singleChoice"
"attachment"
"hakukohteet"])
| |
a685ec2ba4a854be78d9f7e986be7b15e4407e3c00de05b31de91cbd40e36fc5 | jordwalke/rehp | ppx_deriving_json.mli | Js_of_ocaml library
* /
* Copyright Hugo Heuzard 2019
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the Licen... | null | https://raw.githubusercontent.com/jordwalke/rehp/f122b94f0a3f06410ddba59e3c9c603b33aadabf/ppx/ppx_deriving_json/lib/ppx_deriving_json.mli | ocaml | Js_of_ocaml library
* /
* Copyright Hugo Heuzard 2019
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the Licen... | |
67d0bcc2aeabaa3c05a42dd25b2a9d52ee45f0a7a1f4239d2f794f44db7adb19 | moby/vpnkit | packets.ml |
let icmp_echo_request ~id ~seq ~len =
let payload = Cstruct.create len in
let pattern = "plz reply i'm so lonely" in
for i = 0 to Cstruct.length payload - 1 do
Cstruct.set_char payload i pattern.[i mod (String.length pattern)]
done;
let req = Icmpv4_packet.({code = 0x00; ty = Icmpv4_wire.Echo_request;
... | null | https://raw.githubusercontent.com/moby/vpnkit/6dda85cda59e36875fcc6324205aaf0c7056ff0a/src/hostnet_test/packets.ml | ocaml |
let icmp_echo_request ~id ~seq ~len =
let payload = Cstruct.create len in
let pattern = "plz reply i'm so lonely" in
for i = 0 to Cstruct.length payload - 1 do
Cstruct.set_char payload i pattern.[i mod (String.length pattern)]
done;
let req = Icmpv4_packet.({code = 0x00; ty = Icmpv4_wire.Echo_request;
... | |
7321beee69d4a9a3ac940fbba98df6b196d7a63255c7f532bfbebf189b3969dc | eerohele/sigel | components.clj | (ns sigel.xslt.components
"A set of reusable XSLT components."
(:require [sigel.xslt.elements :as xsl])
(:refer-clojure :exclude [identity]))
(def identity
"An XSLT identity template."
(xsl/template
{:match "@* | node()"}
(xsl/copy
(xsl/apply-templates {:select "@* | node()"}))))
(defn xslt3... | null | https://raw.githubusercontent.com/eerohele/sigel/9c2c8e9526cccf7c3f980ef062ab404175f80da1/src/sigel/xslt/components.clj | clojure | (ns sigel.xslt.components
"A set of reusable XSLT components."
(:require [sigel.xslt.elements :as xsl])
(:refer-clojure :exclude [identity]))
(def identity
"An XSLT identity template."
(xsl/template
{:match "@* | node()"}
(xsl/copy
(xsl/apply-templates {:select "@* | node()"}))))
(defn xslt3... | |
3f831abcbd74037c69e05af99225e3d5cdab4f36638a37d9e30f3c4dda1267bb | thierry-martinez/traverse | traverse_tests.ml | open Traverse
let () =
let module List =
Primitives.List.Make (Applicative.Option (Applicative.Map)) in
assert (List.traverse (S O)
(fun x -> Some (x + 1)) [1; 2; 3] = Some [2; 3; 4])
let () =
let module List =
Primitives.List.Make (Applicative.Map) in
assert (List.traverse (S (S O))
(fun x y -... | null | https://raw.githubusercontent.com/thierry-martinez/traverse/9d03cf1e650dc70273b981b1178a16a4929987e6/tests/traverse_tests.ml | ocaml | open Traverse
let () =
let module List =
Primitives.List.Make (Applicative.Option (Applicative.Map)) in
assert (List.traverse (S O)
(fun x -> Some (x + 1)) [1; 2; 3] = Some [2; 3; 4])
let () =
let module List =
Primitives.List.Make (Applicative.Map) in
assert (List.traverse (S (S O))
(fun x y -... | |
6023ed6ce18c5f4c07c5bb7c7f753c83aa07ec0e46bbc6d5695235de0f62154c | flipstone/haskell-for-beginners | 2_files_and_streams_a.hs | Note : GHCI disables buffering on stdin , which produces
unexpected ( though correct ) results for and
-- friends. You can test your answers to the problems below
-- by changing main below to be whichever action you'd like
to run and using the runhaskell command at the shell prompt :
--
-- runhaskell <path to ... | null | https://raw.githubusercontent.com/flipstone/haskell-for-beginners/e586a1f3ef08f21d5181171fe7a7b27057391f0b/answers/chapter_09/2_files_and_streams_a.hs | haskell | friends. You can test your answers to the problems below
by changing main below to be whichever action you'd like
runhaskell <path to file>
yaks on each line. Verify that your action
prints out lines as they are typed in.
Redefine the action above using interact
and after each line prints the total number o... | Note : GHCI disables buffering on stdin , which produces
unexpected ( though correct ) results for and
to run and using the runhaskell command at the shell prompt :
main = yakkityYak
Define an action that uses to read
lines from stdin and prints out the number of
yakkityYak :: IO ()
yakkityYak = do
con... |
73a368442219d214ea71d7004443434d18bb26965a353d9fc6e9284e46d2718f | mainland/language-c-quote | Derive.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
-- |
-- Module : Derive
Copyright : ( c ) 2015 Drexel University
-- License : BSD-style
Maintainer :
module Derive (
deriveM,
deriveLocated,
deriveRelocatable
) where
import Dat... | null | https://raw.githubusercontent.com/mainland/language-c-quote/c7a1ad5833b5567e7d746f4640624b16d61d2d94/bin/Derive.hs | haskell | # LANGUAGE DeriveDataTypeable #
|
Module : Derive
License : BSD-style | # LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
Copyright : ( c ) 2015 Drexel University
Maintainer :
module Derive (
deriveM,
deriveLocated,
deriveRelocatable
) where
import Data.Generics
import Data.Loc
import Text.PrettyPrint.Mainland as PP
deriveM :: (a -> Doc) -> a ... |
365b48df4d37d88c587cc4b7df3f686742a4b69662a031f43f2817b9d4751994 | zotonic/zotonic | scomp_base_spinner.erl | @author < >
2009
%% @doc Show the spinner element
Copyright 2009
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law... | null | https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_base/src/scomps/scomp_base_spinner.erl | erlang | @doc Show the spinner element
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 s... | @author < >
2009
Copyright 2009
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(scomp_base_spinner).
-behaviour(zotonic_scomp).
-export([vary/2, render/3]).
-include_lib("zotonic_core/include/zotonic... |
1dccec60e42736a3ffb8fcca2212f84baf57b4672108c0078ac919c970ab9cc2 | haskell-trasa/trasa | Main.hs | # language
LambdaCase
, OverloadedStrings
, TemplateHaskell
#
LambdaCase
, OverloadedStrings
, TemplateHaskell
#-}
module Main (main) where
import Data.FileEmbed (embedStringFile)
import Data.Foldable (for_)
import Data.List (intercalate)
import System.Directory (createDirectoryIfMissing, with... | null | https://raw.githubusercontent.com/haskell-trasa/trasa/bfc23d4fd5b895493ba650a7f607b5fa034179d7/trasa-init/app/Main.hs | haskell | | Simple file system tree structure.
^ Name of directory (relative) and
its containing entries
^ File name (relative) and file content
^ library name | # language
LambdaCase
, OverloadedStrings
, TemplateHaskell
#
LambdaCase
, OverloadedStrings
, TemplateHaskell
#-}
module Main (main) where
import Data.FileEmbed (embedStringFile)
import Data.Foldable (for_)
import Data.List (intercalate)
import System.Directory (createDirectoryIfMissing, with... |
cd72ea43ee2bfcb7e81d248aeefb462c9b2ff519b21085840c353b5f5f9a1c2a | footprintanalytics/footprint-web | automagic_dashboards.clj | (ns metabase.api.automagic-dashboards
(:require [buddy.core.codecs :as codecs]
[cheshire.core :as json]
[compojure.core :refer [GET]]
[metabase.api.common :as api]
[metabase.automagic-dashboards.comparison :refer [comparison-dashboard]]
[metabase.automagic-d... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/api/automagic_dashboards.clj | clojure | ----------------------------------------- API Endpoints for viewing a transient dashboard ----------------
`:question` method instead
compared with entity `comparison-entity` with id
compared with entity | (ns metabase.api.automagic-dashboards
(:require [buddy.core.codecs :as codecs]
[cheshire.core :as json]
[compojure.core :refer [GET]]
[metabase.api.common :as api]
[metabase.automagic-dashboards.comparison :refer [comparison-dashboard]]
[metabase.automagic-d... |
7f1e3a7839433cd62778862f00a09984afd58c5c2f41d1ea7606cbcaa869872b | camlp5/camlp5 | odyl_main.mli | (* camlp5r *)
(* odyl_main.mli,v *)
exception Error of string and string;
value nolib : ref bool;
value initialized : ref bool;
value path : ref (list string);
value loadfile : string -> unit;
value directory : string -> unit;
value go : ref (unit -> unit);
value name : ref string;
| null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/odyl/odyl_main.mli | ocaml | camlp5r
odyl_main.mli,v |
exception Error of string and string;
value nolib : ref bool;
value initialized : ref bool;
value path : ref (list string);
value loadfile : string -> unit;
value directory : string -> unit;
value go : ref (unit -> unit);
value name : ref string;
|
6c4d60c485da335661fbc49f7f1ff806991e4db68be28addc4aedafe4bc4a9e3 | Vetd-Inc/vetd-app | cookies.cljs | (ns vetd-app.cookies
(:require [re-frame.core :as rf]
[vetd-app.util :as util]
goog.net.cookies))
(defn set-cookie!
"Sets a cookie, the following optional parameters may be passed in as a map:
:max-age - max-age for session cookie, defaults to -1
:path - path of the cookie, defaults t... | null | https://raw.githubusercontent.com/Vetd-Inc/vetd-app/9b33b1443b9d84d39305a63fc58119f8e014cf11/src/cljs/app/vetd_app/cookies.cljs | clojure | (ns vetd-app.cookies
(:require [re-frame.core :as rf]
[vetd-app.util :as util]
goog.net.cookies))
(defn set-cookie!
"Sets a cookie, the following optional parameters may be passed in as a map:
:max-age - max-age for session cookie, defaults to -1
:path - path of the cookie, defaults t... | |
d4cb166187c0cdf81cb34f8fdc6271e2e55bef2eaff8f55589fc32abff89b1b2 | nixeagle/cl-github | issues.lisp | (in-package :cl-github)
;;; Issues API
(defgeneric search-issues (username repository state term &key login token)
(:documentation "Search for TERM with STATE on USERNAME's REPOSITORY."))
(defgeneric show-issues (username repository state &key login token)
(:documentation "Show all issues with STATE on USERNAME's ... | null | https://raw.githubusercontent.com/nixeagle/cl-github/19ba2477ea65e52e74e166482407ea96bee8e395/issues.lisp | lisp | Issues API
This is not actually used at this time. | (in-package :cl-github)
(defgeneric search-issues (username repository state term &key login token)
(:documentation "Search for TERM with STATE on USERNAME's REPOSITORY."))
(defgeneric show-issues (username repository state &key login token)
(:documentation "Show all issues with STATE on USERNAME's REPOSITORY."))
... |
e1eebfd2375b4d6060ebc5956c6aabb2eadfc67b7e21d12e089b0d6f59ddb210 | greglook/merkledag-ledger | ledger.clj | (ns finance.format.ledger
"Code for working with text-based ledger files."
(:require
[clojure.java.io :as io]
[clojure.string :as str]
[finance.format.ledger.parse :as parse]
[finance.format.ledger.print :as print]))
;; TODO: implement standard format API
(defn parse-string
"Parse a string of... | null | https://raw.githubusercontent.com/greglook/merkledag-ledger/af938ba0c7e5e694e679d583a1cecf64f41452d8/src/finance/format/ledger.clj | clojure | TODO: implement standard format API | (ns finance.format.ledger
"Code for working with text-based ledger files."
(:require
[clojure.java.io :as io]
[clojure.string :as str]
[finance.format.ledger.parse :as parse]
[finance.format.ledger.print :as print]))
(defn parse-string
"Parse a string of ledger text into a vector of entity ma... |
bb4267c89c6ec4a4e50c4027fd26a1ad6a77a89eaee08eeae5fee757bf045688 | avsm/platform | opamStubs.mli | (**************************************************************************)
(* *)
Copyright 2018 MetaStack Solutions Ltd.
(* *)
(* All rights ... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/opam-client.2.0.5%2Bdune/src/core/opamStubs.mli | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2018 MetaStack Solutions Ltd.
GNU Lesser General Public License version 2.1 , with the special
* OS - specific functions requiring C code on at least one platform .
Most functions are Windows - specific and raise an exception on other
platforms .
... |
3b3fc1620e9141033cee080427f6f0b402498af579b4eac2a25919903b9d7854 | bsaleil/lc | print.scm | ;;---------------------------------------------------------------------------
;;
Copyright ( c ) 2015 , . All rights reserved .
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions are
;; met:
;; 1. Redistributions of so... | null | https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/unit-tests/print.scm | scheme | ---------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list ... | Copyright ( c ) 2015 , . All rights reserved .
THIS SOFTWARE IS PROVIDED ` ` AS IS '' AND ANY EXPRESS OR
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT
THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT
(println 0)
(println -0)
(println -000)
(println 1... |
84c6b7f339f9baf048dcb33b496ab51c33a0181bc63ee1a651bfbf01b7fd14f7 | melange-re/melange | map_test.ml |
open Mt
module Int = struct
type t = int
let compare (x : int) (y : int) = Pervasives.compare x y
end
module Int_map = Map.Make(Int)
module String_map = Map.Make(String)
let of_list kvs =
List.fold_left (fun acc (k,v) -> Int_map.add k v acc) Int_map.empty kvs
let int_map_suites = let open Mt in Int_map.[
... | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/map_test.ml | ocaml |
open Mt
module Int = struct
type t = int
let compare (x : int) (y : int) = Pervasives.compare x y
end
module Int_map = Map.Make(Int)
module String_map = Map.Make(String)
let of_list kvs =
List.fold_left (fun acc (k,v) -> Int_map.add k v acc) Int_map.empty kvs
let int_map_suites = let open Mt in Int_map.[
... | |
ec33064378098c98da7200d549c69ecc98cd5e72efcf278187a36ae843997ec7 | spectrum-finance/cardano-dex-contracts | Redeem.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
module ErgoDex.Contracts.Proxy.Redeem where
import PlutusLedgerApi.V1.Crypto (PubKeyHash)
import PlutusLedgerApi.V1.Value
import qualified PlutusTx
import PlutusTx.Builtins
data RedeemConfig = RedeemConfig
{ poolNft :: AssetClass
, poolX :: Ass... | null | https://raw.githubusercontent.com/spectrum-finance/cardano-dex-contracts/87bdbc26dbe9ae5f6c59e608d728330f8166f19c/cardano-dex-contracts-onchain/ErgoDex/Contracts/Proxy/Redeem.hs | haskell | # LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
module ErgoDex.Contracts.Proxy.Redeem where
import PlutusLedgerApi.V1.Crypto (PubKeyHash)
import PlutusLedgerApi.V1.Value
import qualified PlutusTx
import PlutusTx.Builtins
data RedeemConfig = RedeemConfig
{ poolNft :: AssetClass
, poolX :: Ass... | |
f29a38a7e44e5b0da067e778eb7f2b5fb09d0c0dd25140eff2e5a40f854165ce | ocaml/oasis-db | ODBCLIUpload.ml |
* ' upload ' subcommand handler
Upload a tarball which contains a _ oasis file .
@author
Upload a tarball which contains a _oasis file.
@author Sylvain Le Gall
*)
open SubCommand
open OASISUtils
open OASISTypes
open ODBGettext
open ODBCLICommon
open ODBRepository
open Lwt
o... | null | https://raw.githubusercontent.com/ocaml/oasis-db/f8b19d431102b5c5b7dced00a5242a5366ad263f/src/cli/ODBCLIUpload.ml | ocaml | Curl.set_failonerror curl true;
Login
TODO: login/password
Enabled in-memory cookie
Uploads |
* ' upload ' subcommand handler
Upload a tarball which contains a _ oasis file .
@author
Upload a tarball which contains a _oasis file.
@author Sylvain Le Gall
*)
open SubCommand
open OASISUtils
open OASISTypes
open ODBGettext
open ODBCLICommon
open ODBRepository
open Lwt
o... |
56318c16479f695a52bc97a47f43d707f0f8caf6ca61404183314078ae138f08 | pingles/curator | project.clj | (defproject curator "0.0.7"
:description "Clojurified Apache Curator"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.apache.curator/curator-recipes "3.2.1"]
[org.apache.curator/curator-framework "... | null | https://raw.githubusercontent.com/pingles/curator/f192b7df74066b3d84fadac4617e40834dd457e5/project.clj | clojure | (defproject curator "0.0.7"
:description "Clojurified Apache Curator"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.apache.curator/curator-recipes "3.2.1"]
[org.apache.curator/curator-framework "... | |
67d80ce0c37bd8d8e20c19cad02a649afac4d166bc2baaa5774d14424a55f9db | uwiger/gproc | gproc_bcast.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% --------------------------------------------------
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License a... | null | https://raw.githubusercontent.com/uwiger/gproc/3737f2b958a5908d7a3870046ae162c5b9bf971c/src/gproc_bcast.erl | erlang | --------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
... | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
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
@author < >... |
adbba56c8206403c0807bb7d2e8897acd0f76d3e4fc814f18d13284c0088725a | project-oak/hafnium-verification | SymOp.mli |
* Copyright ( c ) 2009 - 2013 , Monoidics ltd .
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) 2009-2013, Monoidics ltd.
* Copyright (c) Facebook, In... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/base/SymOp.mli | ocaml | * Symbolic Operations and Failures: the units in which analysis work is measured
* Internal state of the module
* if the wallclock alarm has expired, raise a timeout exception
* Return the time remaining before the wallclock alarm expires
* Restore the old state.
* Return the old state, and revert the current stat... |
* Copyright ( c ) 2009 - 2013 , Monoidics ltd .
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) 2009-2013, Monoidics ltd.
* Copyright (c) Facebook, In... |
3684b04c844ec6893e7ae99eb054171d15a305d66769ab4c2f588b0cf3911b29 | juhp/fbrnch | Commit.hs | module Cmd.Commit
( commitPkgs,
)
where
import Common
import Common.System
import Git
import Package
import Prompt
FIXME reject if nvr ahead of newer branch
FIXME use branches after all ?
FIXME handle multiline changelog entries with " -m description "
FIXME --undo last change : eg undo accidential --amen... | null | https://raw.githubusercontent.com/juhp/fbrnch/521d268e90801366f1fefba995257f18e125a10c/src/Cmd/Commit.hs | haskell | undo last change : eg undo accidential --amend
all if no stage | module Cmd.Commit
( commitPkgs,
)
where
import Common
import Common.System
import Git
import Package
import Prompt
FIXME reject if nvr ahead of newer branch
FIXME use branches after all ?
FIXME handle multiline changelog entries with " -m description "
commitPkgs :: Maybe CommitOpt -> Bool -> Bool -> [Strin... |
4f7acc266dbdc80ab8b1eb9ae48d47ca37649f3e93c0dee1cc816e592cdd3545 | dinosaure/pasteur | form.ml | open Tyxml.Html
let checkbox ~name ?label:(contents= [ txt name ]) ?(value= "on") ?(checked= false) () =
let checked = if checked then [ a_checked () ] else [] in
label
(input ~a:([ a_input_type `Checkbox
; a_name name
; a_value value ] @ checked) ()
:: contents)
let post_hr... | null | https://raw.githubusercontent.com/dinosaure/pasteur/9564c66ae53082bc53584737452ddf2a6b8c85e7/form.ml | ocaml | open Tyxml.Html
let checkbox ~name ?label:(contents= [ txt name ]) ?(value= "on") ?(checked= false) () =
let checked = if checked then [ a_checked () ] else [] in
label
(input ~a:([ a_input_type `Checkbox
; a_name name
; a_value value ] @ checked) ()
:: contents)
let post_hr... | |
7f974cc839a3d2a7567e72fcc8668456efd4612206008f010e7b874d01d8fa25 | gethop-dev/hop-cli | grafana.clj | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
;; file, You can obtain one at /
(ns hop-cli.bootstrap.profile.registry.bi.grafana
(:require [hop-cli.bootstrap.profile.registry :as registry]
[hop-cli.bootstrap.u... | null | https://raw.githubusercontent.com/gethop-dev/hop-cli/0b3240371fd2b7fbedf29d7420ce860619cc4f24/src/hop_cli/bootstrap/profile/registry/bi/grafana.clj | clojure | file, You can obtain one at /
Docker
General settings
Admin user
Database settings
OIDC
Single sign on | 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
(ns hop-cli.bootstrap.profile.registry.bi.grafana
(:require [hop-cli.bootstrap.profile.registry :as registry]
[hop-cli.bootstrap.util :as bp.util]))
(defn- dashbo... |
1af8854f75cf7bd6af0e848fb4943115c142280a05ae0e76eab2fffad1ca390b | silviucpp/erlxml | erlxml_nif.erl | -module(erlxml_nif).
-author("silviu.caragea").
-define(NOT_LOADED, not_loaded(?LINE)).
Maximum bytes passed to the NIF handler at once ( 20Kb )
-define(MAX_BYTES_TO_NIF, 20000).
-on_load(load_nif/0).
-export([
new_stream/1,
chunk_feed_stream/2,
reset_stream/1,
dom_parse/1,
to_binary/1
]).
%% ... | null | https://raw.githubusercontent.com/silviucpp/erlxml/caa7ed198f6e8569b6e058047394f3799a38fec7/src/erlxml_nif.erl | erlang | nif functions | -module(erlxml_nif).
-author("silviu.caragea").
-define(NOT_LOADED, not_loaded(?LINE)).
Maximum bytes passed to the NIF handler at once ( 20Kb )
-define(MAX_BYTES_TO_NIF, 20000).
-on_load(load_nif/0).
-export([
new_stream/1,
chunk_feed_stream/2,
reset_stream/1,
dom_parse/1,
to_binary/1
]).
lo... |
e5e5f4209f3fe598c3fd913c2c93808232ce291e3688ae4599e863b02da362ed | Helium4Haskell/helium | PropagateEq.hs | data A = A | B deriving Eq
f x y = x == y
main = f A B
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/correct/PropagateEq.hs | haskell | data A = A | B deriving Eq
f x y = x == y
main = f A B
| |
d5bf2b9de5d50f4738de0c02173ddda7e4d68e17d20506170a6747670682add1 | spell-music/csound-expression | ModArg.hs | # Language TypeFamilies , TypeSynonymInstances , MultiParamTypeClasses , FlexibleInstances , FlexibleContexts #
-- | Argument modifiers. Functions to transform arguments of the function with flexibility.
module Csound.Air.ModArg(
-- * Basic class
ModArg1(..), ModArg2(..), ModArg3(..), ModArg4(..),
-- ** Del... | null | https://raw.githubusercontent.com/spell-music/csound-expression/d80d1aaaa1930425672f28e9d5b9f82a3d82d4b8/csound-expression/src/Csound/Air/ModArg.hs | haskell | | Argument modifiers. Functions to transform arguments of the function with flexibility.
* Basic class
** Delayed
* Oscillators
** Random phase
** Delayed
** Delayed with Random phase
* Noise
** Delayed
* Envelopes
** Delayed
trumpet:
adsr mod
delayed adsr mod
expon adsr mod
delayed expon adsr mod
osci... | # Language TypeFamilies , TypeSynonymInstances , MultiParamTypeClasses , FlexibleInstances , FlexibleContexts #
module Csound.Air.ModArg(
ModArg1(..), ModArg2(..), ModArg3(..), ModArg4(..),
delModArg1, delModArg2, delModArg3, delModArg4,
oscArg1, oscArg2, oscArg3, oscArg4,
triArg1, triArg2, triArg3, tr... |
2b3805350e1c3f3e9a774e1223612c5dd8049d507c23ecf37244785c38ea73b7 | acl2/acl2 | exec-binary-strict-pure-lt.lisp | C Library
;
Copyright ( C ) 2023 Kestrel Institute ( )
Copyright ( C ) 2023 Kestrel Technology LLC ( )
;
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
;
Author : ( )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package "C")
(i... | null | https://raw.githubusercontent.com/acl2/acl2/44f76f208004466a9e6cdf3a07dac98b3799817d/books/kestrel/c/atc/symbolic-execution-rules/exec-binary-strict-pure-lt.lisp | lisp | C Library
Copyright ( C ) 2023 Kestrel Institute ( )
Copyright ( C ) 2023 Kestrel Technology LLC ( )
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
Author : ( )
(in-package "C")
(include-book "exec-binary-strict-pure-gen")
(local (include-book "exec-binary-strict-pu... | |
e0426474596a5dde0d7aa06e06e40b316376c2576f8a33a2425a2b3541de708b | gvolpe/haskell-book-exercises | palindrome.hs | import Control.Monad (forever)
import Data.Char
import System.Exit (exitSuccess)
isPalindrome :: String -> Bool
isPalindrome x = w == reverse w
where f = filter (\x -> x /= '\'' && x /= ',')
w = f $ concat $ words $ map toLower x
palindrome :: IO ()
palindrome = forever $ do
line1 <- getLine
case (line1... | null | https://raw.githubusercontent.com/gvolpe/haskell-book-exercises/5c1b9d8dc729ee5a90c8709b9c889cbacb30a2cb/chapter13/palindrome.hs | haskell | import Control.Monad (forever)
import Data.Char
import System.Exit (exitSuccess)
isPalindrome :: String -> Bool
isPalindrome x = w == reverse w
where f = filter (\x -> x /= '\'' && x /= ',')
w = f $ concat $ words $ map toLower x
palindrome :: IO ()
palindrome = forever $ do
line1 <- getLine
case (line1... | |
1ac26b01bc050e9c1e215affa17e506d6e2b123f4aede0af2043e306ac042ff8 | ndmitchell/supero | Convert.hs |
module Convert(convert, drop1mod) where
import Type
import Safe
import Yhc.Core
import Data.List
import Data.Play
import qualified Data.Map as Map
import qualified Data.Set as Set
convert :: Core -> Prog
convert core = Prog (Map.fromList [(funcName x, x) | x <- concat fs])
where
(n,fs) = mapAccumL conve... | null | https://raw.githubusercontent.com/ndmitchell/supero/a8b16ea90862e2c021bb139d7a7e9a83700b43b2/Dead/version1/Convert.hs | haskell | number the variables as appropriate
algorithm:
pass all free variables at that point |
module Convert(convert, drop1mod) where
import Type
import Safe
import Yhc.Core
import Data.List
import Data.Play
import qualified Data.Map as Map
import qualified Data.Set as Set
convert :: Core -> Prog
convert core = Prog (Map.fromList [(funcName x, x) | x <- concat fs])
where
(n,fs) = mapAccumL conve... |
82828e77e0b913d11c18b8213c19d4e87c373ca96f445c81908bdac343c2d16b | burz/Feval | EFAST.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE DeriveFunctor #
module FVL.EFAST
( Expr(..)
) where
import FVL.Algebra
data Expr a
= CInt Integer
| CBool Bool
| CVar String
| Add a a
| Sub a a
| Mul a a
| Div a a
| Mod a a
| And a a
| Or a a
| Not a
| Equal a a
| ... | null | https://raw.githubusercontent.com/burz/Feval/2e73b2bdc755ac103c0a3b97ad794a2d638986c5/FVL/EFAST.hs | haskell | # LANGUAGE FlexibleInstances #
# LANGUAGE DeriveFunctor #
module FVL.EFAST
( Expr(..)
) where
import FVL.Algebra
data Expr a
= CInt Integer
| CBool Bool
| CVar String
| Add a a
| Sub a a
| Mul a a
| Div a a
| Mod a a
| And a a
| Or a a
| Not a
| Equal a a
| ... | |
77b6f5d96b6d03fde15f427ee2661d134b439266ca2d47054e04cecbcb2ff9c6 | ocaml-flambda/ocaml-jst | user_error5.ml | TEST
ocamlc_byte_exit_status = " 2 "
* setup - ocamlc.byte - build - env
* * ocamlc.byte
* * * check - ocamlc.byte - output
ocamlc_byte_exit_status = "2"
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
What happens if the user tries to write one of the... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/b1f0cf9f9114128db609bdd5a1edfda1e3144a30/testsuite/tests/jst-modular-extensions/user_error5.ml | ocaml | TEST
ocamlc_byte_exit_status = " 2 "
* setup - ocamlc.byte - build - env
* * ocamlc.byte
* * * check - ocamlc.byte - output
ocamlc_byte_exit_status = "2"
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
What happens if the user tries to write one of the... | |
1ef7af6dd1f2ade2baf3931c2d4508745d9674e305c67eee9b9dd8fa3e917919 | locusmath/locus | object.clj | (ns locus.algebra.groupoid.element.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.copresheaf.structure.core.protocols :refer :all]
[locus.set.quiver... | null | https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/algebra/groupoid/element/object.clj | clojure | The difference between morphisms in a groupoid and morphisms in a more general
category is that groupoid morphisms always implement the invertible interface,
which takes a morphism in a groupoid to its corresponding inverse.
Ontology of morphism elements of groupoids | (ns locus.algebra.groupoid.element.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.copresheaf.structure.core.protocols :refer :all]
[locus.set.quiver... |
8885ecdb701e3e25b00c9e422d930c0685fd1ef0642147b08c171f69936775d0 | ocaml-gospel/gospel | PairingHeap.mli | (**************************************************************************)
(* *)
VOCaL -- A Verified OCaml Library
(* *)
Copyright ( ... | null | https://raw.githubusercontent.com/ocaml-gospel/gospel/bd213d7fdfaf224666acb413efc49f872251bca7/test/vocal/PairingHeap.mli | ocaml | ************************************************************************
(as described in file LICE... | VOCaL -- A Verified OCaml Library
Copyright ( c ) 2020 The VOCaL Project
This software is free software , distributed under the MIT license
module Make (X : sig
FIXME : use ComparableType . S instead
type t
val compare : t ->... |
07ba18dce601f8117bdebc517f424a2fc67ec092e7be0f97b2f65783c4434507 | minoki/haskell-floating-point | RoundToIntegralSpec.hs | module RoundToIntegralSpec where
import Data.Proxy
import Numeric.Floating.IEEE
import Numeric.Floating.IEEE.Internal
import Test.Hspec
import Test.Hspec.QuickCheck
import Test.QuickCheck hiding (classify)
import Util
prop_roundToIntegral :: (RealFl... | null | https://raw.githubusercontent.com/minoki/haskell-floating-point/7d7bb31bb2b07c637a5eaeda92fc622566e9b141/fp-ieee/test/RoundToIntegralSpec.hs | haskell | module RoundToIntegralSpec where
import Data.Proxy
import Numeric.Floating.IEEE
import Numeric.Floating.IEEE.Internal
import Test.Hspec
import Test.Hspec.QuickCheck
import Test.QuickCheck hiding (classify)
import Util
prop_roundToIntegral :: (RealFl... | |
240235642a13d7802d676c1cd2bb7544ecf767556a333adf8616615e220f1fcf | tamarin-prover/tamarin-prover | Definitions.hs | -- |
Copyright : ( c ) 2010 - 2012 ,
-- License : GPL v3 (see LICENSE)
--
Maintainer : < >
--
-- Term Equalities, Matching Problems, and Subterm Rules.
module Term.Rewriting.Definitions (
-- * Equalities
Equal (..)
, evalEqual
-- * Matching problems
, Match(..)
, flattenMa... | null | https://raw.githubusercontent.com/tamarin-prover/tamarin-prover/c78c7afd3b93b52dd4d2884952ec0fc273832a0d/lib/term/src/Term/Rewriting/Definitions.hs | haskell | |
License : GPL v3 (see LICENSE)
Term Equalities, Matching Problems, and Subterm Rules.
* Equalities
* Matching problems
* Rewriting rules
--------------------------------------------------------------------
Equalities, matching problems, and rewriting rules
------------------------------------------------... | Copyright : ( c ) 2010 - 2012 ,
Maintainer : < >
module Term.Rewriting.Definitions (
Equal (..)
, evalEqual
, Match(..)
, flattenMatch
, matchWith
, matchOnlyIf
, RRule(..)
) where
import Control.Arrow ( (***) )
import Control . Applicative
import Extens... |
4674102d0b2357b675f0ffe30ac995d12b45cc22304235daf24925aa3de740ab | borkdude/dynaload | dynaload.cljc | (ns borkdude.dynaload
#?(:cljs (:require-macros [borkdude.dynaload :refer [dynaload if-bb]])))
(defmacro if-bb
[then else]
(if #?(:clj (System/getProperty "babashka.version")
:cljs false)
then
else))
(if-bb
#?(:clj
(defn ->LazyVar [f _]
(let [cached (volatile! nil)]
... | null | https://raw.githubusercontent.com/borkdude/dynaload/71eb9281dd8716b48995fe69845753575fc25c39/src/borkdude/dynaload.cljc | clojure | for some reason not working yet in bb | (ns borkdude.dynaload
#?(:cljs (:require-macros [borkdude.dynaload :refer [dynaload if-bb]])))
(defmacro if-bb
[then else]
(if #?(:clj (System/getProperty "babashka.version")
:cljs false)
then
else))
(if-bb
#?(:clj
(defn ->LazyVar [f _]
(let [cached (volatile! nil)]
... |
7b8cd6a82b559ba957a5cd5fa78166d925acec56fd9f16f932f6fdea6c915352 | dbuenzli/brr | brr_ocaml_poke_ui.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2020 The brr programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2... | null | https://raw.githubusercontent.com/dbuenzli/brr/3d1a0edd964a1ddfbf2be515fc3a3803d27ad707/src/ocaml_poke_ui/brr_ocaml_poke_ui.mli | ocaml | * Interactive toplevel HTML interface for poke objects.
* The type for persistent storage.
* [store] is a store with given [get] and [set] functions.
* [local_store] is a store that uses {!Brr_io.Storage.local}, with
keys prefixed by [key_prefix] (defaults to ["ocaml-repl-"]).
* [get s k] is the value of key ... | ---------------------------------------------------------------------------
Copyright ( c ) 2020 The brr programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2... |
ba6853bc2772968da952f1ed293f80aab24822cf49c0c2c040159252b72fcfe2 | ghc/ghc | Types.hs |
{-# LANGUAGE DerivingStrategies #-}
# LANGUAGE ExistentialQuantification #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE PatternSynonyms #-}
( c ) The University of Glasgow 2006 - 2012
( c ) The GRASP Project , Glasgow University , 1992 - 200... | null | https://raw.githubusercontent.com/ghc/ghc/f70a0239490ebea25e50c61c01f945d8df41e92f/compiler/GHC/Tc/Types.hs | haskell | # LANGUAGE DerivingStrategies #
# LANGUAGE GADTs #
# LANGUAGE PatternSynonyms #
| Various types used during typechecking.
want to import it, instead of this module.
monad functions like a Reader monad in the way it passes the environment
around. This is done to allow the en... |
# LANGUAGE ExistentialQuantification #
# LANGUAGE GeneralizedNewtypeDeriving #
( c ) The University of Glasgow 2006 - 2012
( c ) The GRASP Project , Glasgow University , 1992 - 2002
(c) The University of Glasgow 2006-2012
(c) The GRASP Project, Glasgow University, 1992-2002
-}
Please see " . Utils . Mon... |
bf4053494a23e59c1e224af45e94b30fb26ee673da8346554c543189ab2e6fa8 | fragnix/fragnix | BaseOrphanInstances.hs | module BaseOrphanInstances where
f :: Double -> String
f = show
g :: [Double]
g = enumFromTo 0.0 1.0
| null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/quick/BaseOrphanInstances/BaseOrphanInstances.hs | haskell | module BaseOrphanInstances where
f :: Double -> String
f = show
g :: [Double]
g = enumFromTo 0.0 1.0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.