_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 |
|---|---|---|---|---|---|---|---|---|
5b4460377ab58a1b71b9fc7b1452b0e200c52470e33594be1ff29bffa5af6a39 | arttuka/reagent-material-ui | groups_3_rounded.cljs | (ns reagent-mui.icons.groups-3-rounded
"Imports @mui/icons-material/Groups3Rounded 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 groups-3-rounded (create-... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/icons/reagent_mui/icons/groups_3_rounded.cljs | clojure | (ns reagent-mui.icons.groups-3-rounded
"Imports @mui/icons-material/Groups3Rounded 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 groups-3-rounded (create-... | |
6c30d87306f00dacbbd42d855811bf2c8f16f04316b11c95beec9d5226169f81 | maybevoid/casimir | CoOp.hs |
module Casimir.Free.CoOp
( EffCoOp (..)
)
where
import Data.Kind
| An effect specification is consist of a dummy datatype @sig@ , an operation
type and a co - operation type associated with the @sig@ type . The class
-- 'EffCoOp' represents the effect co-operation with an injective type family
-- 'CoOperatio... | null | https://raw.githubusercontent.com/maybevoid/casimir/ebbfa403739d6f258e6ac6793549006a0e8bff42/casimir/src/lib/Casimir/Free/CoOp.hs | haskell | 'EffCoOp' represents the effect co-operation with an injective type family
'CoOperation.
they perform effect operations under a free monad, and is used by
effect interpreters such as 'Casimir.Free.CoOpHandler'
to interpret effect operations from a free monad.
@'CoOperation sig'@ must be a functor so that we can u... |
module Casimir.Free.CoOp
( EffCoOp (..)
)
where
import Data.Kind
| An effect specification is consist of a dummy datatype @sig@ , an operation
type and a co - operation type associated with the @sig@ type . The class
class EffCoOp ops where
| The co - operation type for @sig@ is produced by computations wh... |
40ac5a0f7350131334d7875f3dc9f1a7914ceb7f4c94550d174f4b17f6fc4818 | moby/datakit | cI_cache.ml | open CI_s
open CI_utils
open CI_utils.Infix
open! Astring
open Lwt.Infix
module Metrics = struct
open Prometheus
let namespace = "DataKitCI"
let subsystem = "cache"
let builds_started_total =
let help = "Total number of builds started" in
Counter.v_label ~help ~label_name:"name" ~namespace ~subsyste... | null | https://raw.githubusercontent.com/moby/datakit/e047e55a2dfa3aaec02398d7d7699f4f7afd2b47/ci/src/cI_cache.ml | ocaml | Each entry in the cache has a branch in the database:
- /log contains the build log
- /failure (if present) indicates that the build failed and contains the error
- /value may contain extra artifacts/data (depending on the builder)
- /rebuild-requested (if present) indicates that the current result... | open CI_s
open CI_utils
open CI_utils.Infix
open! Astring
open Lwt.Infix
module Metrics = struct
open Prometheus
let namespace = "DataKitCI"
let subsystem = "cache"
let builds_started_total =
let help = "Total number of builds started" in
Counter.v_label ~help ~label_name:"name" ~namespace ~subsyste... |
8623328a9f0035793b8f811afac2a44bc66a03528dd24324fe948e3a9e74d61c | GrammaTech/cl-utils | shell.lisp | shell.lisp --- Shell and system command helpers
;;;;
Copyright ( C ) 2020 GrammaTech , Inc.
;;;;
This code is licensed under the MIT license . See the LICENSE.txt
;;;; file in the project root for license terms.
;;;;
This project is sponsored by the Office of Naval Research , One
Liberty Center , 875 N. Rando... | null | https://raw.githubusercontent.com/GrammaTech/cl-utils/d93312b9e7ddedcb3a44c1b7a4c1c791529b4047/shell.lisp | lisp |
file in the project root for license terms.
not necessarily reflect the position or policy of the Government
and no official endorsement should be inferred.
Wrappers for evaluating shell commands and returning the STDOUT,
variable which may be set to non-nil to dump all system and shell
executions and result... | shell.lisp --- Shell and system command helpers
Copyright ( C ) 2020 GrammaTech , Inc.
This code is licensed under the MIT license . See the LICENSE.txt
This project is sponsored by the Office of Naval Research , One
Liberty Center , 875 N. Randolph Street , Arlington , VA 22203 under
contract # N68335 - 17... |
a1e30454d0fcb7294c64caca7fb9147190e05cde430a90ad44bf2fe4bc22a8af | djblue/portal | edn.cljs | (ns portal.ui.viewer.edn
(:require [portal.runtime.edn :as edn]
[portal.ui.inspector :as ins]))
(defn read-string [edn-string]
(try (edn/read-string edn-string)
(catch :default e (ins/error->data e))))
(defn edn? [value] (string? value))
(defn inspect-edn [edn-string]
[ins/tabs
{:portal.v... | null | https://raw.githubusercontent.com/djblue/portal/28ce39007dee47cff6246f28ae4bb80398da80db/src/portal/ui/viewer/edn.cljs | clojure | (ns portal.ui.viewer.edn
(:require [portal.runtime.edn :as edn]
[portal.ui.inspector :as ins]))
(defn read-string [edn-string]
(try (edn/read-string edn-string)
(catch :default e (ins/error->data e))))
(defn edn? [value] (string? value))
(defn inspect-edn [edn-string]
[ins/tabs
{:portal.v... | |
234c15873dea877d7666f152b1e6f52b3619669cb448aaeb41bbfb22d203ce49 | avh4/elm-format | PublicAST.hs | module ElmFormat.AST.PublicAST
( module ElmFormat.AST.PublicAST.Core
, module ElmFormat.AST.PublicAST.Config
, module ElmFormat.AST.PublicAST.Module
) where
import ElmFormat.AST.PublicAST.Core (ToPublicAST(..), FromPublicAST(..))
import ElmFormat.AST.PublicAST.Config
import ElmFormat.AST.PublicAST.Modu... | null | https://raw.githubusercontent.com/avh4/elm-format/57f77ee0a667869ceed3a61a0f4eeaca56a3964f/elm-format-lib/src/ElmFormat/AST/PublicAST.hs | haskell | module ElmFormat.AST.PublicAST
( module ElmFormat.AST.PublicAST.Core
, module ElmFormat.AST.PublicAST.Config
, module ElmFormat.AST.PublicAST.Module
) where
import ElmFormat.AST.PublicAST.Core (ToPublicAST(..), FromPublicAST(..))
import ElmFormat.AST.PublicAST.Config
import ElmFormat.AST.PublicAST.Modu... | |
f9f2ebab095b2fcd4c4db92ca7872dc8793181cc50c4e36fad2ba78b95a37492 | andrenth/routemachine | rtm_fsm.erl | -module(rtm_fsm).
-behaviour(gen_fsm).
-include_lib("bgp.hrl").
-include_lib("route.hrl").
-include_lib("session.hrl").
-export([start_link/1]).
-export([init/1]).
% API
-export([trigger/2, state/1]).
BGP FSM states .
-export([idle/2, connect/2, active/2, open_sent/2, open_confirm/2,
established/2]).
% ... | null | https://raw.githubusercontent.com/andrenth/routemachine/97fbc4997ac9bbe7d14c2b174aa84bc4a2fd5d20/src/rtm_fsm.erl | erlang | API
Exports for gen_fsm.
API
Idle state.
Active state.
OpenSent state
Going into established; join the process group, start the updater
process and send our installed routes to the peer.
Established state.
gen_fsm callbacks.
| -module(rtm_fsm).
-behaviour(gen_fsm).
-include_lib("bgp.hrl").
-include_lib("route.hrl").
-include_lib("session.hrl").
-export([start_link/1]).
-export([init/1]).
-export([trigger/2, state/1]).
BGP FSM states .
-export([idle/2, connect/2, active/2, open_sent/2, open_confirm/2,
established/2]).
-export(... |
8c5a12cc2e13ce1903db1e84f9bae79195e018f9d9f4437842003be56e629f7e | 8c6794b6/haskell-sc-scratch | Applause.hs | ------------------------------------------------------------------------------
-- |
-- Module : $Header$
CopyRight : ( c ) 8c6794b6
-- License : BSD3
Maintainer :
-- Stability : unstable
-- Portability : non-portable
--
-- From:
--
-- <>
--
-- Try:
--
-- > > withSC3 playClap
--
-- /TODO/:
--
-- * A... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/pssd/src/Pssd/Monster/Applause.hs | haskell | ----------------------------------------------------------------------------
|
Module : $Header$
License : BSD3
Stability : unstable
Portability : non-portable
From:
<>
Try:
> > withSC3 playClap
/TODO/:
* Add fading control to graph.
| Play clapping sound.
| For controlling amplitude of w... | CopyRight : ( c ) 8c6794b6
Maintainer :
module Pssd.Monster.Applause where
import Control.Monad (forever)
import Sound.OpenSoundControl
import Sound.SC3
import Sound.SC3.ID
import Sound.SC3.Lepton
import Pssd.Util
playClap :: (Transport t) => t -> IO ()
playClap fd = do
let sineEnv = out outBus (val * a... |
487667fc8eb1e1d0758b5410f963b3bb9d303b5d9f38fefe8e920c59b2747e75 | yetanalytics/testomic | project.clj | (defproject com.yetanalytics/testomic "0.1.3"
:description "Testing utilities and macros for use with datomic."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[com.datomic/datomic-free "0.9.5554"
:exc... | null | https://raw.githubusercontent.com/yetanalytics/testomic/9d85fb72f79c239503cebdb8bf7e20e08ce09318/project.clj | clojure | (defproject com.yetanalytics/testomic "0.1.3"
:description "Testing utilities and macros for use with datomic."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[com.datomic/datomic-free "0.9.5554"
:exc... | |
69c4776047a9ab090ef5a274111b69fc94bdb220506c5c1381010612e1e96eb4 | wireapp/wire-server | Crypto.hs | {-# 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 published by the Free
Software Foundati... | null | https://raw.githubusercontent.com/wireapp/wire-server/e03f7219210019ae5be50739f594dc667e669168/libs/api-bot/src/Network/Wire/Bot/Crypto.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... |
Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module Network.Wire.Bot.Crypto
... |
003238b9e7038ac662e1ea2dab6a249ca2efff2c07ea455ab458f1fa2b0f59b3 | xapi-project/xen-api | iO.ml |
* Copyright ( c ) 2012 Citrix Inc
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND TH... | null | https://raw.githubusercontent.com/xapi-project/xen-api/ad2f11bc6837bfda1700b67865ce8d11bc954014/ocaml/vhd-tool/src/iO.ml | ocaml |
* Copyright ( c ) 2012 Citrix Inc
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND TH... | |
5c4be233081069b41fe0cd0f41ed552bb584315b243f4caffb7ba62b360e1b11 | juspay/atlas | Cancel.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/app-backend/src/Product/Cancel.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | |
cca30171546dbf62e88d4f3500e2da4f1348e2a70035590057e41f2594c05b0e | MBcode/LispUtils | univ-tester-multi.lisp | ;;;; Changes to universal tester to handle multi-concept problems where
;;;; each example is to be classified into the correct category for several
;;;; different concepts, such a sentence having a value for agent, patient,
;;;; instrument, etc. Coordinates building a separate classifier for each concept
;;;; and comp... | null | https://raw.githubusercontent.com/MBcode/LispUtils/8c9d09aa732fca1c7c5b42b6c5067b89de98cb49/stat/ml-progs/ml/univ-tester-multi.lisp | lisp | Changes to universal tester to handle multi-concept problems where
each example is to be classified into the correct category for several
different concepts, such a sentence having a value for agent, patient,
instrument, etc. Coordinates building a separate classifier for each concept
and computes both average ac... | of each example ( in the first of the list ) is a list of categories , one
by constructing one data structure for all concepts ( e.g. backprop ) .
funciton to return a LIST of categories ( one per concept ) .
Copyright ( c ) 1991 by . This program may be freely copied , used , or
(eval-when (compile load ... |
80a99d826868c795c1fd3f17828078e3f45dae6509b79122a8ac272017926795 | jmlowenthal/staged-streams.agda | Internal.hs | # LANGUAGE ScopedTypeVariables #
--
-- Test the new list implementation for internal properties
--
import Prelude (($),(.),(&&),(||),(+),Int,(==),Bool(..),not,flip,uncurry)
import Properties.Utils
import System.IO
import Data.Maybe
import qualified Data.List.Stream as T
---------------------------------------------... | null | https://raw.githubusercontent.com/jmlowenthal/staged-streams.agda/3ac5fbff18808a505185c88000a817046de35d0d/lib/stream-fusion-0.1.2.5/tests/Properties/Internal.hs | haskell |
Test the new list implementation for internal properties
----------------------------------------------------------------------
* Basic interface
map fusion
----------------------------------------------------------------------
* List transformations
---------------------------------------------------------------... | # LANGUAGE ScopedTypeVariables #
import Prelude (($),(.),(&&),(||),(+),Int,(==),Bool(..),not,flip,uncurry)
import Properties.Utils
import System.IO
import Data.Maybe
import qualified Data.List.Stream as T
prop_mapmap = (\(f :: B -> C)
(g :: A -> B)
(xs) -> T.map f . T.map g $ xs) ... |
7289df008c1fcb38b7be589b21620bfab40c48b3de15ec1d497b8a50b13b0fd1 | jcfaracco/lispvirt | lispvirsh.lisp | ;;;-------------------------------------------------------------------------
Lispvirt - Common LISP bindings for Libvirt .
;;;
Copyright ( C ) 2015
;;;
lispvirsh.lisp is part of Lispvirt .
;;;
Lispvirt is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public Lic... | null | https://raw.githubusercontent.com/jcfaracco/lispvirt/568495b00bb19b46a40f4669b8b21395e5f5fe74/examples/lispvirsh.lisp | lisp | -------------------------------------------------------------------------
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-------------------------------... | Lispvirt - Common LISP bindings for Libvirt .
Copyright ( C ) 2015
lispvirsh.lisp is part of Lispvirt .
Lispvirt is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , o... |
277e6a063d343d1a60c7de2a9a40ee24cd17639aff6e4468466c271f02fad244 | mirage/irmin | value_intf.ml |
* Copyright ( c ) 2013 - 2022 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... | null | https://raw.githubusercontent.com/mirage/irmin/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/src/irmin-git/value_intf.ml | ocaml |
* Copyright ( c ) 2013 - 2022 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... | |
a26f0a35a9dccf5fcacbff65db330b116c98e287c2ce4cf102adbf05e85cd4d3 | maximedenes/native-coq | undo_lablgtk_ge212.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/ide/undo_lablgtk_ge212.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
An undoable view class | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
class undoable_view : ([> Gt... |
328965ce327d403ecebe8fd8b9b1fd4eb2ec7fb836ce64519a84971099e4d0f1 | tgass/macbeth | SeekMsgParsers.hs | module Macbeth.Fics.Parsers.SeekMsgParsers (
clearSeek,
newSeek,
removeSeeks,
seekNotAvailable
) where
import Macbeth.Fics.Message
import Macbeth.Fics.Api.OngoingGame
import Macbeth.Fics.Api.Rating
import Macbeth.Fics.Api.Seek
import Macbeth.Fics.Utils.Bitmask
import Control.Applicative
import Data.Attoparsec... | null | https://raw.githubusercontent.com/tgass/macbeth/c64b3cc9b641444688b14a2838ee554932f0e9e6/macbeth-fics/src/Macbeth/Fics/Parsers/SeekMsgParsers.hs | haskell | module Macbeth.Fics.Parsers.SeekMsgParsers (
clearSeek,
newSeek,
removeSeeks,
seekNotAvailable
) where
import Macbeth.Fics.Message
import Macbeth.Fics.Api.OngoingGame
import Macbeth.Fics.Api.Rating
import Macbeth.Fics.Api.Seek
import Macbeth.Fics.Utils.Bitmask
import Control.Applicative
import Data.Attoparsec... | |
1a4fea1c44f01000a470199ce91a8ba5922adcf18df8b100d83d4069d2859fcf | zellige/hastile | Routes.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeOperators #
module Hastile.Routes where
import qualified Data.ByteString as ByteString
import qualified Data.Geometry.Types.Geography as GeometryTypesGeography
import qualified Data.Proxy as Proxy
import qualified D... | null | https://raw.githubusercontent.com/zellige/hastile/4dabe66bd997e91128ab4136b6f40da51c204a2b/src/Hastile/Routes.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeOperators #
module Hastile.Routes where
import qualified Data.ByteString as ByteString
import qualified Data.Geometry.Types.Geography as GeometryTypesGeography
import qualified Data.Proxy as Proxy
import qualified D... | |
8fe94efb76d4c0d690bf757b60a8e677a3888173ddfb259f3236ae80fd0c5bcc | ghc/packages-Cabal | CreatePipe.hs | module UnitTests.Distribution.Compat.CreatePipe (tests) where
import Control.Concurrent.Async (async, wait)
import Control.DeepSeq (force)
import Control.Exception (evaluate)
import System.IO (hClose, hGetContents, hPutStr, hSetEncoding, localeEncoding)
import Test.Tasty (T... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/Cabal/tests/UnitTests/Distribution/Compat/CreatePipe.hs | haskell | module UnitTests.Distribution.Compat.CreatePipe (tests) where
import Control.Concurrent.Async (async, wait)
import Control.DeepSeq (force)
import Control.Exception (evaluate)
import System.IO (hClose, hGetContents, hPutStr, hSetEncoding, localeEncoding)
import Test.Tasty (T... | |
2d76c8297e6108d662fc29cf37e7be42b99eb93b21a0a989ffcf6138fc7505dc | OCamlPro/ocplib-simplex | polys.mli | (******************************************************************************)
(* ocplib-simplex *)
(* *)
(* Copyright (C) --- OCamlPro --- See README.md for information and licensing... | null | https://raw.githubusercontent.com/OCamlPro/ocplib-simplex/f90e43982ee7a71bc9b628517e1b798d0d6b62f1/src/polys.mli | ocaml | ****************************************************************************
ocplib-simplex
Copyright (C) --- OCamlPro --- See README.md for information and licensing
************... |
open ExtSigs
module type SIG = sig
module Var : Variables
module R : Rationals
type t
type var_status = New | Exists | Removed
val empty : t
val is_polynomial : t -> bool
val is_empty : t -> bool
val replace : Var.t -> R.t -> t -> t * var_status
val accumulate : Var.t -> R.t -> t -> t * var_st... |
c6b928a199ca53742ac4d8434865851e0dedd960d10757832fb2b1df4c35f53c | jchavarri/rebind | parse_error.ml | *
* Copyright ( c ) 2013 - present , Facebook , Inc.
* All rights reserved .
*
* This source code is licensed under the BSD - style license found in the
* LICENSE file in the " flow " directory of this source tree . An additional grant
* of patent rights can be found in the PATENTS file in the same di... | null | https://raw.githubusercontent.com/jchavarri/rebind/ccfa1725ff5b16574daf4d0044c49dbf719aa105/vendor/flow/parse_error.ml | ocaml | *
* Copyright ( c ) 2013 - present , Facebook , Inc.
* All rights reserved .
*
* This source code is licensed under the BSD - style license found in the
* LICENSE file in the " flow " directory of this source tree . An additional grant
* of patent rights can be found in the PATENTS file in the same di... | |
286eddb94c463a3e64fe9d13783a2485f28803fe8d2e10b0165fcd97a735fcfd | JacquesCarette/Drasil | State.hs | # LANGUAGE TemplateHaskell , TupleSections #
module GOOL.Drasil.State (
-- Types
GS, GOOLState(..), FS, CS, MS, VS,
-- Lenses
lensFStoGS, lensGStoFS, lensMStoGS, lensFStoCS, lensFStoMS, lensFStoVS,
lensCStoMS, lensMStoCS, lensCStoVS, lensMStoFS, lensMStoVS, lensVStoFS,
lensVStoMS, lensCStoFS, headers, s... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/ba99df20c97e1a830ce0ab518459cc47f7b01485/code/drasil-gool/lib/GOOL/Drasil/State.hs | haskell | Types
Lenses
Initial states
mod file path (needed in Makefile generation)
Used to determine whether an import is
Method to exceptions thrown
Method to other methods it calls
to add code so Strings can be used as Errors
to avoid duplicating that code
Used by fileDoc to insert the module name in the
method e... | # LANGUAGE TemplateHaskell , TupleSections #
module GOOL.Drasil.State (
GS, GOOLState(..), FS, CS, MS, VS,
lensFStoGS, lensGStoFS, lensMStoGS, lensFStoCS, lensFStoMS, lensFStoVS,
lensCStoMS, lensMStoCS, lensCStoVS, lensMStoFS, lensMStoVS, lensVStoFS,
lensVStoMS, lensCStoFS, headers, sources, mainMod, currMa... |
c26fcd8a6de72bf70f3ba5edc5768e8b67643fd07f5c8ddc955d6bcbc24c977d | sbcl/sbcl | step.pure.lisp | ;;;; This file is for testing the single-stepper.
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch after the fork
from CMU CL .
;;;;
;;;; This softwar... | null | https://raw.githubusercontent.com/sbcl/sbcl/95513aefc379bcab2d7dd67b3fb71c08ba109f4c/tests/step.pure.lisp | lisp | This file is for testing the single-stepper.
more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS files for
more information.
No stepper support on some platforms.
These t... |
This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
#+(or interpreter riscv) (invoke-restart 'run-tests::skip-file)
#+immobile-code (setq sb-c::*compile-to-memory-space* :immobile)
(defun fib (x)
(declare (optimize ... |
58bb128dcd133aa6039c73d254ea5ba16ec2fb2b7af6fb833452ecd019474249 | sirlensalot/fadno-xml | EmitXml.hs | # LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE GADTs #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
| Emit an xml - like AST with renderers to and ' Element ' .
-- Intended for use with generated code.
module Fadno.Xml.EmitXml
(
-- * Rendering functions
... | null | https://raw.githubusercontent.com/sirlensalot/fadno-xml/ee456e415b124a275e0930cfaf1f7c1ac1f4566d/src/Fadno/Xml/EmitXml.hs | haskell | # LANGUAGE GADTs #
Intended for use with generated code.
* Rendering functions
* API types
| QName type.
| XML AST.
| Emit AST.
# OVERLAPPING #
# OVERLAPPABLE #
| render AST to String.
| render AST to Element. | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
| Emit an xml - like AST with renderers to and ' Element ' .
module Fadno.Xml.EmitXml
(
renderString
,renderElement
,renderFile
,EmitXml (..)
,XmlRep (..)
,Q... |
d735d965445cb41493959d4d10f53e2cc9fab272c3e7c4c424d5ddf4fe730c7c | clckwrks/clckwrks | URL.hs | # LANGUAGE DeriveDataTypeable , DeriveGeneric , FlexibleInstances , TemplateHaskell , TypeFamilies #
module Clckwrks.Authenticate.URL
( AuthURL(..)
)
where
import Data.Data (Data, Typeable)
import GHC.Generics (Generic)
import Happstack.Authenticate.Core (Authentic... | null | https://raw.githubusercontent.com/clckwrks/clckwrks/521d89b57b690fcfcf009c541ed367c557318010/Clckwrks/Authenticate/URL.hs | haskell | # LANGUAGE DeriveDataTypeable , DeriveGeneric , FlexibleInstances , TemplateHaskell , TypeFamilies #
module Clckwrks.Authenticate.URL
( AuthURL(..)
)
where
import Data.Data (Data, Typeable)
import GHC.Generics (Generic)
import Happstack.Authenticate.Core (Authentic... | |
9c678687e04d4522823fda1292848ea6ab9602c51027328d025c238ebad03cc0 | mvr/at | SGrp.hs | # LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
-- | Simplicial Group
module Math.Topology.SGrp where
import Control.Category.Constrained
import Prelude hiding (fmap, id, return, (.))
import qualified Math.Algebra.ChainComplex as CC (UMorphism (..))
import Math.Algebra.ChainComplex.Algebra
import Ma... | null | https://raw.githubusercontent.com/mvr/at/06ad6b0fb12b685290e73e01115b2301bab1de4d/src/Math/Topology/SGrp.hs | haskell | | Simplicial Group
The identity map is always just picking out a 0-simplex, so we
can assume a is pointed.
TODO: this does more normalising/unnormalising than necessary,
some rewrite rules might fix that.
| The set of /all/ \(n\)-simplices in a simplicial group forms an ordinary group. | # LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
module Math.Topology.SGrp where
import Control.Category.Constrained
import Prelude hiding (fmap, id, return, (.))
import qualified Math.Algebra.ChainComplex as CC (UMorphism (..))
import Math.Algebra.ChainComplex.Algebra
import Math.Algebra.ChainComple... |
a1954a9172efdf0c5e52bb1e349d9265940ea1575acb9436fc56706059bbbb6a | anoma/juvix | DependencyBuilder.hs | module Juvix.Compiler.Abstract.Extra.DependencyBuilder (buildDependencyInfo, ExportsTable) where
import Data.HashMap.Strict qualified as HashMap
import Data.HashSet qualified as HashSet
import Juvix.Compiler.Abstract.Data.NameDependencyInfo
import Juvix.Compiler.Abstract.Extra.Functions
import Juvix.Compiler.Abstract.... | null | https://raw.githubusercontent.com/anoma/juvix/58a0f196da301ccf56e280ca4bd28abd35e0a75a/src/Juvix/Compiler/Abstract/Extra/DependencyBuilder.hs | haskell | adjacency set representation
declarations in a module depend on the module, not the other way round (a
constructors of an inductive type depend on the inductive type, not the other
way round; an inductive type depends on the types of its constructors | module Juvix.Compiler.Abstract.Extra.DependencyBuilder (buildDependencyInfo, ExportsTable) where
import Data.HashMap.Strict qualified as HashMap
import Data.HashSet qualified as HashSet
import Juvix.Compiler.Abstract.Data.NameDependencyInfo
import Juvix.Compiler.Abstract.Extra.Functions
import Juvix.Compiler.Abstract.... |
93f642107e5af4d1a41465727cea5c0f557e11cbe820eaa665426c473a300ecc | anuragsoni/shuttle | tcp_channel.mli | open! Core
open! Async
* [ listen ] is a wrapper for [ Async . . ] . It uses async to setup a tcp
server , and creates a new [ Input_channel ] and [ Output_channel ] to forward to the user
provided tcp handler . [ listen ] will shutdown the server socket either if the handler
raises an exception , ... | null | https://raw.githubusercontent.com/anuragsoni/shuttle/4b6b477cc9cc811ad717e9ac663b4c4e7346f4b6/http11/src/tcp_channel.mli | ocaml | * [with_connection] is a wrapper for [Async.Tcp.connect_sock]. It uses async to setup a
tcp client, and creates a new [Input_channel] and [Output_channel] to forward to the
user provided handler. | open! Core
open! Async
* [ listen ] is a wrapper for [ Async . . ] . It uses async to setup a tcp
server , and creates a new [ Input_channel ] and [ Output_channel ] to forward to the user
provided tcp handler . [ listen ] will shutdown the server socket either if the handler
raises an exception , ... |
b86aa7879324a374038f9d2e4bf4d02fce6ed6f00e3b5a32ba98772d37b351be | ocaml-sf/learn-ocaml-corpus | sort_OTrue.ml | let pigeonhole_sort (bound : int) (kvs : (int * 'v) list) : 'v list =
(* Create an array of buckets, each of which is initially empty. *)
assert (0 <= bound);
let bucket : 'v list array = Array.make bound [] in
(* Place every value into an appropriate bucket, according to its key. *)
List.iter (fun (k, v) ->
... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/generic_sorting/wrong/sort_OTrue.ml | ocaml | Create an array of buckets, each of which is initially empty.
Place every value into an appropriate bucket, according to its key.
Reverse the list stored in every bucket, so as to have a stable sort.
Concatenate all buckets.
Just for the sake of *not* being stable, reverse the list.
The keys are integers. Us... | let pigeonhole_sort (bound : int) (kvs : (int * 'v) list) : 'v list =
assert (0 <= bound);
let bucket : 'v list array = Array.make bound [] in
List.iter (fun (k, v) ->
assert (0 <= k && k < bound);
bucket.(k) <- v :: bucket.(k)
) kvs;
for k = 0 to bound - 1 do
bucket.(k) <- List.rev bucket.(k)
d... |
17bbf172b38d1c3e6927f14ebcf6b88a94cf0e7fd3c6abe5b65596552b2b3982 | rabbitmq/rabbitmq-web-stomp | rabbit_web_stomp_connection_sup.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_web_stomp_connection_sup).
-behav... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-web-stomp/412150d1256f79de65fc6d6898c0e1c96974dfe3/src/rabbit_web_stomp_connection_sup.erl | erlang |
----------------------------------------------------------------------------
then have the middleware rabbit_web_mqtt_middleware place it
in the initial handler state.
---------------------------------------------------------------------------- | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_web_stomp_connection_sup).
-behaviour(s... |
7dda9d57ae4151c803f13c2354882ede84b8692f634576ec2a8cabb1de8a9282 | grin-compiler/grin | Result.hs | # LANGUAGE TemplateHaskell , GeneralizedNewtypeDeriving , RecordWildCards #
module AbstractInterpretation.ExtendedSyntax.Sharing.Result where
import Data.Set (Set)
import Data.Map (Map)
import qualified Data.Set as Set
import qualified Data.Map as Map
import Lens.Micro.Platform
import Grin.ExtendedSyntax.Grin... | null | https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/src/AbstractInterpretation/ExtendedSyntax/Sharing/Result.hs | haskell | # LANGUAGE TemplateHaskell , GeneralizedNewtypeDeriving , RecordWildCards #
module AbstractInterpretation.ExtendedSyntax.Sharing.Result where
import Data.Set (Set)
import Data.Map (Map)
import qualified Data.Set as Set
import qualified Data.Map as Map
import Lens.Micro.Platform
import Grin.ExtendedSyntax.Grin... | |
023799b3888c0bf2238949a9d7ee7f861c004f5613aa5a7897927ce550ce9110 | dimitri/pgloader | csv-guess.lisp | ;;;
;;; Automatic guess the CSV format parameters
;;;
(in-package #:pgloader.source.csv)
# \| # \% # \^ # \ ! # \$ )
"Common CSV separators to try when guessing file parameters.")
(defparameter *escape-quotes* '("\"\"" "\\\"")
"Common CSV quotes to try when guessing file parameters.")
(defun get-file-sample (f... | null | https://raw.githubusercontent.com/dimitri/pgloader/3047c9afe141763e9e7ec05b7f2a6aa97cf06801/src/sources/csv/csv-guess.lisp | lisp |
Automatic guess the CSV format parameters
we just ignore files that don't exist | (in-package #:pgloader.source.csv)
# \| # \% # \^ # \ ! # \$ )
"Common CSV separators to try when guessing file parameters.")
(defparameter *escape-quotes* '("\"\"" "\\\"")
"Common CSV quotes to try when guessing file parameters.")
(defun get-file-sample (filename &key (sample-size 10))
"Return the first SAM... |
764f898a9782d3d3b041b83b4d34119b3abc4656bf5662883030509dc2dfe01c | fortytools/holumbus | JSON.hs | -- ----------------------------------------------------------------------------
|
Module : . JSON
Copyright : Copyright ( C ) 2010
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.1
Rendering a Hayoo ! search result ... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/searchengine/examples/hayoo/source/Hayoo/JSON.hs | haskell | ----------------------------------------------------------------------------
---------------------------------------------------------------------------- |
|
Module : . JSON
Copyright : Copyright ( C ) 2010
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.1
Rendering a Hayoo ! search result into a JSON string .
Module : Hayoo.JSON
Copyright : Copyright (C) 2... |
fb2e3b86579b6acbd99daadeea56e9bec54012394c7925aa3d4003e1fa3aebea | soupi/yh | DecorationObject.hs | # LANGUAGE ExistentialQuantification #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE FunctionalDependencies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
module DecorationObject where
import qualified SDL
import Play.Engine.Utils
import Play.Engine.Input
import Play.En... | null | https://raw.githubusercontent.com/soupi/yh/4cfbcc7da6f3ca5e330b7fd7d4adeacee7e2dff4/app/DecorationObject.hs | haskell | # LANGUAGE RankNTypes # | # LANGUAGE ExistentialQuantification #
# LANGUAGE FunctionalDependencies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
module DecorationObject where
import qualified SDL
import Play.Engine.Utils
import Play.Engine.Input
import Play.Engine.Settings
import Control... |
0e923477f626919457534477c3c59b11cad4722fd57440f8ded228f28278d024 | exercism/haskell | GuessingGame.hs | module GuessingGame (reply) where
reply :: Int -> String
reply 41 = "So close"
reply 42 = "Correct"
reply 43 = "So close"
reply guess
| guess < 41 = "Too low"
| otherwise = "Too high"
| null | https://raw.githubusercontent.com/exercism/haskell/a4ac6996aa9db65494289b8f4e4837a099bf987c/exercises/concept/guessing-game/.meta/exemplar/src/GuessingGame.hs | haskell | module GuessingGame (reply) where
reply :: Int -> String
reply 41 = "So close"
reply 42 = "Correct"
reply 43 = "So close"
reply guess
| guess < 41 = "Too low"
| otherwise = "Too high"
| |
44e01f63ac7372001705afe8a43f1160b9e738b048a63654d3e6f2e584be1005 | zotonic/zotonic | m_facebook.erl | @author < >
2011
%%
%% @doc Model for accessing facebook data via the graph api.
Copyright 2011
%%
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
%%... | null | https://raw.githubusercontent.com/zotonic/zotonic/1bb4aa8a0688d007dd8ec8ba271546f658312da8/apps/zotonic_mod_facebook/src/models/m_facebook.erl | erlang |
@doc Model for accessing facebook data via the graph api.
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 implie... | @author < >
2011
Copyright 2011
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(m_facebook).
-author("Maas-Maarten Zeeman <").
-behaviour(zotonic_model).
-export([
m_get/3,
search/3,
... |
6b49f2d66cc22d47f5f5df7758bfc96b4825bc2fd4bcd1ce39a5ddde4a3627b6 | magthe/sandi | Base32HexTest.hs | # LANGUAGE TemplateHaskell #
Copyright : ( c ) , 2013
License : BSD3 , found in the LICENSE file
module Codec.Binary.Base32HexTest where
import Codec.TestUtils
import qualified Codec.Binary.Base32Hex as B32H
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as BSC
import Data.Word (... | null | https://raw.githubusercontent.com/magthe/sandi/a8ef86ec3798a640d86342421a7fa7fa97bdedd4/sandi/test-src/Codec/Binary/Base32HexTest.hs | haskell | illegal char
full block
too short | # LANGUAGE TemplateHaskell #
Copyright : ( c ) , 2013
License : BSD3 , found in the LICENSE file
module Codec.Binary.Base32HexTest where
import Codec.TestUtils
import qualified Codec.Binary.Base32Hex as B32H
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as BSC
import Data.Word (... |
21169e2fbc5fc4c84be9edbc7b6ae8b68228c5b1ff13c0f382861ee5e05b8c9e | ralph-schleicher/rs-colors | ciergb.lisp | ;;; ciergb.lisp --- CIE RGB color space.
Copyright ( C ) 2014
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions
;; are met:
;;
;; * Redistributions of source code must retain the above copyright
;; notice, this list ... | null | https://raw.githubusercontent.com/ralph-schleicher/rs-colors/0604867895fab0ea9b8a6bb0ac4a08d452c53c59/ciergb.lisp | lisp | ciergb.lisp --- CIE RGB color space.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer... |
Copyright ( C ) 2014
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
COPYRIGHT HOLDER OR FOR ANY DIRECT , INDIRECT ,
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING ,
CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT
(in-package :rs-col... |
324d16b19eb510153bd8e16379e6bab7d0af0edffb16c7d7cfde019a5721b5a3 | ocaml-omake/omake | lm_filename_util.mli |
(*
* Search for the index after the drive letter.
*)
type root =
| NullRoot
| DriveRoot of char
type 'a path =
| RelativePath of 'a
| AbsolutePath of root * 'a
(** Pathname separator chars. *)
val separators : string
val pathsep : string
(*
* Remove quotations from a string that represents a filename.
... | null | https://raw.githubusercontent.com/ocaml-omake/omake/08b2a83fb558f6eb6847566cbe1a562230da2b14/src/libmojave/lm_filename_util.mli | ocaml |
* Search for the index after the drive letter.
* Pathname separator chars.
* Remove quotations from a string that represents a filename.
* A null root directory.
* Get the root string.
* Skip the drive letter if it exists.
* Is this an absolute filename?
* Split into root, suffix.
* Get ... |
type root =
| NullRoot
| DriveRoot of char
type 'a path =
| RelativePath of 'a
| AbsolutePath of root * 'a
val separators : string
val pathsep : string
val unescape_string : string -> string
* Normalize function will give the canonical
* lowercase name on Windows . It is a nop on
* Unix .
... |
32250d7fd992c702ada07393e7a58d97da5af434db4f0898ca80bda371abe221 | CryptoKami/cryptokami-core | GeneratedSecrets.hs | {-# LANGUAGE Rank2Types #-}
module Pos.Core.Configuration.GeneratedSecrets
( HasGeneratedSecrets
, withGeneratedSecrets
, generatedSecrets
, genesisSecretsRich
, genesisSecretsPoor
, genesisSecretKeys
, genesisSecretKeysRich
, genesisSecretKeysPoor
) where... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/core/Pos/Core/Configuration/GeneratedSecrets.hs | haskell | # LANGUAGE Rank2Types #
'TestnetInitializer' is used to specify genesis. That's why we have
`Maybe` here. |
module Pos.Core.Configuration.GeneratedSecrets
( HasGeneratedSecrets
, withGeneratedSecrets
, generatedSecrets
, genesisSecretsRich
, genesisSecretsPoor
, genesisSecretKeys
, genesisSecretKeysRich
, genesisSecretKeysPoor
) where
import Universum... |
ffa1f0d68436a79ed2699d44c2e7c9be1897eb43e2cfa0fa7c1f50c9c8b6c748 | clojure-lsp/clojure-lsp | shared.clj | (ns clojure-lsp.shared
(:require
[babashka.fs :as fs]
[clojure-lsp.logger :as logger]
[clojure.core.async :refer [<! >! alts! chan go-loop timeout]]
[clojure.java.io :as io]
[clojure.set :as set]
[clojure.string :as string]
[lsp4clj.lsp.responses :as lsp.responses])
(:import
[java.net
Ja... | null | https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/a0c2970be12425030dae95906b74516d90e40f7b/lib/src/clojure_lsp/shared.clj | clojure | else
Technically jar:file is not a valid URI scheme. It's a Jar URL and must be
treated as such.
unescape %3a%3a to ::
normalize scheme:/some/path to scheme | (ns clojure-lsp.shared
(:require
[babashka.fs :as fs]
[clojure-lsp.logger :as logger]
[clojure.core.async :refer [<! >! alts! chan go-loop timeout]]
[clojure.java.io :as io]
[clojure.set :as set]
[clojure.string :as string]
[lsp4clj.lsp.responses :as lsp.responses])
(:import
[java.net
Ja... |
8b42afa792e762d91abd146693323858c30de71d6f184643a949b88b01c01cd6 | roddyyaga/quests | request.mli | (** Various types to do with HTTP requests. *)
(** Represents data about a request. *)
type t = { url: string; headers: Cohttp.Header.t }
val pp : Format.formatter -> t -> unit [@@ocaml.toplevel_printer]
val show : t -> string
(** Represents the kind of payloads that can be used in queries. *)
type payload =
| Js... | null | https://raw.githubusercontent.com/roddyyaga/quests/72395040b5da1f02a6fe3a0fe0d1e96e9f8d50cd/lib/request.mli | ocaml | * Various types to do with HTTP requests.
* Represents data about a request.
* Represents the kind of payloads that can be used in queries.
* Represents supported authentication methods. |
type t = { url: string; headers: Cohttp.Header.t }
val pp : Format.formatter -> t -> unit [@@ocaml.toplevel_printer]
val show : t -> string
type payload =
| Json of Yojson.t
| Form of (string * string) list
| Raw of string
type authentication = Basic of string * string | Bearer of string
|
93a0e5db716e2f24b4d7db83f6481171a348a610129c4bdbeb57747a0df00669 | sbcl/sbcl | gc.impure.lisp | ;;;; gc tests
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch after the fork
from CMU CL .
;;;
;;;; This software is in the public domain and is prov... | null | https://raw.githubusercontent.com/sbcl/sbcl/913b99d64c45bea71277194664ed750771d3f388/tests/gc.impure.lisp | lisp | gc tests
more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absoluely no warranty. See the COPYING and CREDITS files for
more information.
Leave all the values below the stack pointer for
scrub-control-stack to work
cell... |
This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
(in-package :cl-user)
(defvar *weak-vect* (make-weak-vector 8))
(with-test (:name :weak-vector)
(let ((a *weak-vect*)
(random-symbol (make-symbol "FRED")))
... |
cce0e97562e1137cacc07747ee63898d4e27a9d8a7e6021cfdae33ff065b395e | snapframework/io-streams | Network.hs | # LANGUAGE CPP #
module System.IO.Streams.Internal.Network
( socketToStreams
, socketToStreamsWithBufferSize
, socketToStreamsWithBufferSizeImpl
) where
------------------------------------------------------------------------------
import Control.Exception (catch)
import qualified Data.Byt... | null | https://raw.githubusercontent.com/snapframework/io-streams/ae692fee732adea9fe843fb3efe0dd43a6993844/src/System/IO/Streams/Internal/Network.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
'OutputStre... | # LANGUAGE CPP #
module System.IO.Streams.Internal.Network
( socketToStreams
, socketToStreamsWithBufferSize
, socketToStreamsWithBufferSizeImpl
) where
import Control.Exception (catch)
import qualified Data.ByteString.Char8 as S
import qualified Data.ByteString.Internal as S
import... |
5c49c13aa516685c5831718dd26891c93b62c4d98d395054494c943c02194b77 | PacktPublishing/Haskell-High-Performance-Programming | spawn.hs | import Control.Monad.Par
type A = Int
type B = Int
type C = Int
type D = Int
computation :: A -> (A -> B) -> (A -> C) -> (B -> C -> D) -> Par D
computation fa fb fc fd = do
( 1 )
( 2 )
return $ fb a
( 3 )
return $ fc a
( 4 )
c <- get cv
( 5 )
| null | https://raw.githubusercontent.com/PacktPublishing/Haskell-High-Performance-Programming/2b1bfdb8102129be41e8d79c7e9caf12100c5556/Chapter05/spawn.hs | haskell | import Control.Monad.Par
type A = Int
type B = Int
type C = Int
type D = Int
computation :: A -> (A -> B) -> (A -> C) -> (B -> C -> D) -> Par D
computation fa fb fc fd = do
( 1 )
( 2 )
return $ fb a
( 3 )
return $ fc a
( 4 )
c <- get cv
( 5 )
| |
97c021ed3f4969aff32bc78e1b353fc8527d430b0fdf64889a5aedc2428ea46a | GaloisInc/what4 | ReadDecimal.hs |
Module : What4.Utils . ReadDecimal
Description : Parsing for decimal values
Copyright : ( c ) Galois , Inc 2014 - 2020
License : < >
Provides a function for reading decimal numbers returned
by Z3 or Yices .
Module : What4.Utils.ReadDecimal
Description ... | null | https://raw.githubusercontent.com/GaloisInc/what4/91200aa39565c156226cec6a9409a692e4022501/what4/src/What4/Protocol/ReadDecimal.hs | haskell | | Read decimal number, returning rational and rest of string, or a failure
A decimal number has the form (-)([0..9])+([0..9])+'.'([0.9]'*('?')?
^ Value so far
^ String so far
^ Value to divide next digit by. |
Module : What4.Utils . ReadDecimal
Description : Parsing for decimal values
Copyright : ( c ) Galois , Inc 2014 - 2020
License : < >
Provides a function for reading decimal numbers returned
by Z3 or Yices .
Module : What4.Utils.ReadDecimal
Description ... |
00e5917a644927c3bbf725fb54c4208694206f9cc17d9fe3ee90d81e9a1a2342 | dparis/gen-phzr | reset.cljs | (ns phzr.component.reset
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser]))
(defn ->Reset
"The Reset component allows a Game Object to be reset and repositioned to a new location."
([]
(js/Phaser.Component.Reset.)))
(defn rese... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/component/reset.cljs | clojure | (ns phzr.component.reset
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser]))
(defn ->Reset
"The Reset component allows a Game Object to be reset and repositioned to a new location."
([]
(js/Phaser.Component.Reset.)))
(defn rese... | |
50e56a3761d3578fa6268d95f194b6eaed3f3ba989d1f4758bfbf7d13827f592 | philoskim/debux | dbgn.clj | (ns examples.dbgn
(:require [clojure.core.async :refer [<! go-loop timeout]]))
(use 'debux.core)
;;;; dbgn examples
;;; simple example
(dbgn (defn foo [a b & [c]]
(if c
(* a b c)
(* a b 100))))
(foo 2 3)
(foo 2 3 10)
(dbgn (defn bar [a b & [c]]
(if c
(* a b c)
... | null | https://raw.githubusercontent.com/philoskim/debux/24c0641499c21ad86eb43f6b7ca7b7164df8ea37/examples/src/clj/examples/dbgn.clj | clojure | dbgn examples
simple example
:def-type example
:defn-type example
defns with attr-map and prepost-map
:fn-type example
:let-type
:for-type example
:case-type example
:skip-arg-1-type example
:skip-arg-2-type example
:skip-form-itself-type example
:dot-type example
the form which includes recur
Registerin... | (ns examples.dbgn
(:require [clojure.core.async :refer [<! go-loop timeout]]))
(use 'debux.core)
(dbgn (defn foo [a b & [c]]
(if c
(* a b c)
(* a b 100))))
(foo 2 3)
(foo 2 3 10)
(dbgn (defn bar [a b & [c]]
(if c
(* a b c)
(* a b 100))) :dup)
(bar 2 3)
... |
5ec29b1568453b2c90aba163748ffbc2961d9a0141ef51b6481c57c6d1eb4e6e | camlp5/camlp5 | pp_MLast.mli | (* camlp5r *)
(* camlp5r *)
(* pp_MLast.mli,v *)
value ref_show_longid : ref (MLast.longid → string);
value ref_show_longid_lident : ref (MLast.longid_lident → string);
value ref_show_expr : ref (MLast.expr → string);
value ref_show_ctyp : ref (MLast.ctyp → string);
value ref_show_patt : ref (MLast.patt → string);
de... | null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/ppxprint/pp_MLast.mli | ocaml | camlp5r
camlp5r
pp_MLast.mli,v |
value ref_show_longid : ref (MLast.longid → string);
value ref_show_longid_lident : ref (MLast.longid_lident → string);
value ref_show_expr : ref (MLast.expr → string);
value ref_show_ctyp : ref (MLast.ctyp → string);
value ref_show_patt : ref (MLast.patt → string);
declare end;
value show_longid : MLast.longid → st... |
20b736c9c95498bee78efd8451c66a3fee70118d44c68abe8355a9826ed7d5e7 | hammerlab/secotrec | ketrew_server.ml |
open Common
type t = {
auth_token: string;
db: Postgres.t;
image: string [@default "hammerlab/keredofi:coclobas-gke-biokepi-default"];
nfs_mounts: Nfs.Mount.t list;
after_mounts: unit Genspio.EDSL.t [@default Genspio.EDSL.nop];
port: int [@default 8080 ];
local_volumes: (string * string) list;
opam_p... | null | https://raw.githubusercontent.com/hammerlab/secotrec/c801a43fdb0feea98da6d3636145f948aed4e7be/src/lib/ketrew_server.ml | ocaml | (exec ["which"; "colobas-ketrew"] |> output_as_string);
"DB_URI", Postgres.to_uri t.db |> Uri.to_string;
~raw_json:[
"privileged", `Bool true;
] |
open Common
type t = {
auth_token: string;
db: Postgres.t;
image: string [@default "hammerlab/keredofi:coclobas-gke-biokepi-default"];
nfs_mounts: Nfs.Mount.t list;
after_mounts: unit Genspio.EDSL.t [@default Genspio.EDSL.nop];
port: int [@default 8080 ];
local_volumes: (string * string) list;
opam_p... |
ae087887cc154ed703e344a976dbae869c6a3305bba22a27629e299f755c9df7 | leifp/spec-play | spec.clj | (ns spec.clojure.spec
(:require [clojure.spec :as s]))
(use 'clojure.repl)
(alias 'c 'clojure.core)
;;;; spec examples
;;; define, a predicate or set is a spec
(s/def ::date inst?)
(s/def ::suit #{:club :diamond :heart :spade})
;;; combinators: and, or
(s/def ::big-even (s/and integer? even? #(> % 1000)))
(s/def... | null | https://raw.githubusercontent.com/leifp/spec-play/0bfefe78673029dbaa36eb6e7834b0a60ecc137e/src/spec/clojure/spec.clj | clojure | spec examples
define, a predicate or set is a spec
combinators: and, or
combinators: regex
side constraints
maps
multi-spec
collections
macros
extended example
spec spec
(s/fdef s/keys
:args ::s/keys--args
:ret ::s/any)
(s/unstrument #'clojure.spec/keys) | (ns spec.clojure.spec
(:require [clojure.spec :as s]))
(use 'clojure.repl)
(alias 'c 'clojure.core)
(s/def ::date inst?)
(s/def ::suit #{:club :diamond :heart :spade})
(s/def ::big-even (s/and integer? even? #(> % 1000)))
(s/def ::name-or-id (s/or :name string?
:id integer?))
(s/def... |
85ff37adadb62b5eafedf840ea27ee3348d8d4011a1d1c4305b09e017c9709c3 | puppetlabs/puppetdb | time_test.clj | (ns puppetlabs.puppetdb.time-test
(:require
[clojure.test :refer :all]
[puppetlabs.puppetdb.time
:refer [days
format-period
hours
minutes
parse-period
periods-equal?
seconds
to-days
to-hours
to-millis... | null | https://raw.githubusercontent.com/puppetlabs/puppetdb/b3d6d10555561657150fa70b6d1e609fba9c0eda/test/puppetlabs/puppetdb/time_test.clj | clojure | (ns puppetlabs.puppetdb.time-test
(:require
[clojure.test :refer :all]
[puppetlabs.puppetdb.time
:refer [days
format-period
hours
minutes
parse-period
periods-equal?
seconds
to-days
to-hours
to-millis... | |
39921ba4a471cc3d2e4e6059b3df5a728886c556dbbd26da3f20c12c05f26a61 | thegeez/w3a | edn.clj | (ns net.thegeez.w3a.edn
(:require [io.pedestal.interceptor :as interceptor]))
(defn for-edn
[template-fn]
(interceptor/interceptor
{:name ::for-edn
:leave (fn [context]
(if (and (.contains ^String (get-in context [:request :headers "accept"] "") "application/edn")
(not= ... | null | https://raw.githubusercontent.com/thegeez/w3a/186e507389628f20381d155d91058a1804d421e3/src/net/thegeez/w3a/edn.clj | clojure | (ns net.thegeez.w3a.edn
(:require [io.pedestal.interceptor :as interceptor]))
(defn for-edn
[template-fn]
(interceptor/interceptor
{:name ::for-edn
:leave (fn [context]
(if (and (.contains ^String (get-in context [:request :headers "accept"] "") "application/edn")
(not= ... | |
51dd27609c0310c0297a2a8b683336c7475c0f30a8ef3ff827168a2feb9d2558 | rpt/eenum | eenum_tests.erl | %%------------------------------------------------------------------------------
Copyright 2012
%%
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 requir... | null | https://raw.githubusercontent.com/rpt/eenum/b1a2f7a7802db9742b8e04390a0e915be4832440/test/eenum_tests.erl | erlang | ------------------------------------------------------------------------------
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, eithe... | Copyright 2012
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
2012
@doc Eunit test suite for eenum .
@private
-module(eenum_tests).
-compile({parse_transform, eenum}).
-include_lib("eunit/inc... |
221514b49f1f6b2f2d4bd9081fc118542d6003baa9a894510a6384b8ce1337de | treeowl/compact-sequences | Internal.hs | {-# language DeriveTraversable #-}
{-# language ScopedTypeVariables #-}
# language BangPatterns #
# language MagicHash #
# language UnboxedTuples #
# language PatternSynonyms #
# language ViewPatterns #
{-# language Trustworthy #-}
{-# language TypeFamilies #-}
{-# language FlexibleContexts #-}
# language LambdaCase #
... | null | https://raw.githubusercontent.com/treeowl/compact-sequences/85224a71428f230bec1bbb1bce0c0bcf3c65a9fc/src/Data/CompactSequence/Deque/Simple/Internal.hs | haskell | # language DeriveTraversable #
# language ScopedTypeVariables #
# language Trustworthy #
# language TypeFamilies #
# language FlexibleContexts #
OPTIONS_GHC -Wall #
OPTIONS_GHC -ddump-simpl #
, take
| A deque.
| The empty deque.
| Enqueue an element at the front of a deque.
| Enqueue an element at the rear of a... | # language BangPatterns #
# language MagicHash #
# language UnboxedTuples #
# language PatternSynonyms #
# language ViewPatterns #
# language LambdaCase #
|
Space - efficient deques with amortized \ ( O(\log n ) \ ) operations . These
directly use an underlying array - based implementation , without doing any ... |
9b0b0a25688e320b4aa2730464a460d1e33163941dd4bde54a0b8fe7373585ba | senapk/funcional_arcade | solver.hs | final qtd = reverse . take qtd . reverse | null | https://raw.githubusercontent.com/senapk/funcional_arcade/70fa04b4799d5a8c7e5add39d9f217f38f418600/base/005/solver.hs | haskell | final qtd = reverse . take qtd . reverse | |
0f381402723fd83bcb394f409f8c0865d4499bb7e09eab8c83f8da421f4f4c52 | essiene/smpp34 | smpp34_hbeat.erl | -module(smpp34_hbeat).
-include_lib("smpp34pdu/include/smpp34pdu.hrl").
-include("../util.hrl").
-behaviour(gen_fsm).
-export([start_link/3,stop/1, enquire_link_resp/2]).
-export([init/1,
handle_sync_event/4,
handle_event/3,
handle_info/3,
terminate/3,
code_change/4]).
-export... | null | https://raw.githubusercontent.com/essiene/smpp34/9206b1d270dc77d65a64a539cbca41b8b003956a/src/mod/smpp34_hbeat.erl | erlang | convert to milliseconds from microseconds
convert to milliseconds from microseconds | -module(smpp34_hbeat).
-include_lib("smpp34pdu/include/smpp34pdu.hrl").
-include("../util.hrl").
-behaviour(gen_fsm).
-export([start_link/3,stop/1, enquire_link_resp/2]).
-export([init/1,
handle_sync_event/4,
handle_event/3,
handle_info/3,
terminate/3,
code_change/4]).
-export... |
c37eb311f7513ef6b35e3e7abf8343cc96a32fa972adacc196e29a0977992fa0 | charlieg/Sparser | style.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1993,1994 -- all rights reserved
;;;
;;; File: "style"
;;; Module: "drivers;articles:"
Version : 0.1 September 1994
initialized 12/27/93 v2.1
0.1 ( 9/1/94 ) brought into sync with upgraded Do - article
( 9/15 ) ... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/drivers/articles/style.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "style"
Module: "drivers;articles:"
Sets up per-article operations, interrogating the style object associated
with the *current-document-stream* if there is one.
-------------------------------------------------------------------------
deliber... | copyright ( c ) 1993,1994 -- all rights reserved
Version : 0.1 September 1994
initialized 12/27/93 v2.1
0.1 ( 9/1/94 ) brought into sync with upgraded Do - article
( 9/15 ) adding explicit setup
(in-package :sparser)
(defun setup-explicit-style (style)
(if style
Initialize - by - curren... |
7579103aae7b7584f99643543d3cb2aa1cc7d78add32c1f5e86f777b9414b462 | zcaudate/hara | raise_test.clj | (ns hara.event.condition.raise-test
(:use hara.test)
(:require [hara.event.condition.raise :refer :all]))
^{:refer hara.event.condition.raise/default-unhandled-fn :added "3.0"}
(fact "raises an unhandled exception")
^{:refer hara.event.condition.raise/raise-catch :added "3.0"}
(fact "raises a catch exception")
^... | null | https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/test/hara/event/condition/raise_test.clj | clojure | (ns hara.event.condition.raise-test
(:use hara.test)
(:require [hara.event.condition.raise :refer :all]))
^{:refer hara.event.condition.raise/default-unhandled-fn :added "3.0"}
(fact "raises an unhandled exception")
^{:refer hara.event.condition.raise/raise-catch :added "3.0"}
(fact "raises a catch exception")
^... | |
5e241721a2fc933e1daf895364112635a3f203696af0082ced8aea847a7b9d2d | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | LegalEntityCompanyVerificationDocument.hs | {-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
-- | Contains the types generated from the schema LegalEntityCompanyVerificationDocument
module StripeAPI.Types.LegalEntityCo... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/LegalEntityCompanyVerificationDocument.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains the types generated from the schema LegalEntityCompanyVerificationDocument
# SOURCE #
| back: The back of a document returned by a [file upload](https:\/\/stripe.com\/docs\/api\#create_file) with a \`purpose\` value of \`additional_verification\`.
| d... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module StripeAPI.Types.LegalEntityCompanyVerificationDocument where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Inte... |
49ce797f1d535c7c056d2519d7218bc2387cfcd714987ccfca9abcd56e6ea848 | johnlawrenceaspden/hobby-code | pgm.clj | ;; Probabilistic Graphical Models
A->B->C , all Y / N
(def phi1
{{:A :Y} 0.5,
{:A :N} 0.5})
(def phi2
{{:B :Y :A :Y} 0.6
{:B :Y :A :N} 0.4
{:B :N :A :N} 0.6
{:B :N :A :Y} 0.4})
(def phi3
{{:B :Y :C :Y} 0.6
{:B :Y :C :N} 0.4
{:B :N :C :N} 0.6
{:B :N :C :Y} 0.4})
(defn variables [factor]... | null | https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/pgm.clj | clojure | Probabilistic Graphical Models
(#{:A} #{:A :B} #{:C :B})
{:A #{:Y :N}}
{:A #{:Y :N}, :B #{:Y :N}}
{:C #{:Y :N}, :B #{:Y :N}}
{:C #{:Y :N}, :B #{:Y :N}, :A #{:Y :N}}
([:C #{:Y :N}] [:B #{:Y :N}] [:A #{:Y :N}])
()
(((:A :Y)) ((:A :N))) |
A->B->C , all Y / N
(def phi1
{{:A :Y} 0.5,
{:A :N} 0.5})
(def phi2
{{:B :Y :A :Y} 0.6
{:B :Y :A :N} 0.4
{:B :N :A :N} 0.6
{:B :N :A :Y} 0.4})
(def phi3
{{:B :Y :C :Y} 0.6
{:B :Y :C :N} 0.4
{:B :N :C :N} 0.6
{:B :N :C :Y} 0.4})
(defn variables [factor]
(set (mapcat keys (keys factor... |
0f1c5a867f0288f14c2cb5c0785dff947f5596bc8e361eeb52460015726a1380 | ghc/packages-dph | Segmented.hs | # LANGUAGE CPP #
#include "fusion-phases.h"
-- | Parallel combinators for segmented unboxed arrays
module Data.Array.Parallel.Unlifted.Parallel.Segmented
( replicateRSUP
, appendSUP
, appendSUP_old
, appendSUPV
, foldRUP
, sumRUP)
where
import Data.Array.Parallel.Unlifte... | null | https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-prim-par/Data/Array/Parallel/Unlifted/Parallel/Segmented.hs | haskell | | Parallel combinators for segmented unboxed arrays
for unboxed primops
replicate ------------------------------------------------------------------
| Segmented replication.
Each element in the vector is replicated the given number of times.
Append -------------------------------------------------------------... | # LANGUAGE CPP #
#include "fusion-phases.h"
module Data.Array.Parallel.Unlifted.Parallel.Segmented
( replicateRSUP
, appendSUP
, appendSUP_old
, appendSUPV
, foldRUP
, sumRUP)
where
import Data.Array.Parallel.Unlifted.Distributed
import Data.Array.Parallel.Unlifted.Distr... |
28166a6c0ce802d5d6622f61f2a041914035ec01b76a2ca70800a8611f6fc45e | danieljharvey/mimsa | NumberVars.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fno - warn - orphans #
module Test.Typechecker.NumberVars
( spec,
)
where
import Data.Either
import qualified Data.List.NonEmpty as NE
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as M
import qualified Data.Set as ... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/e6b177dd2c38e8a67d6e27063ca600406b3e6b56/compiler/test/Test/Typechecker/NumberVars.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fno - warn - orphans #
module Test.Typechecker.NumberVars
( spec,
)
where
import Data.Either
import qualified Data.List.NonEmpty as NE
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as M
import qualified Data.Set as S
import Language.Mimsa.Core
import... |
6c9b03c1676f5e8cdf0b7a214b1e4859f190c4cca0fcf8949a955508b8abe6e9 | achirkin/vulkan | VK_KHR_maintenance2.hs | # OPTIONS_GHC -fno - warn - missing - pattern - synonym - signatures #
# OPTIONS_HADDOCK not - home #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE MagicHash #-}
# LANGUAGE PatternSynonyms #
{-# LANGUAGE Strict #-}
{-# LANGUAGE ViewPatterns #-}
module Graphics.Vulkan.Ext.VK_KHR_maintenance2
* Vulkan... | null | https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_KHR_maintenance2.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE MagicHash #
# LANGUAGE Strict #
# LANGUAGE ViewPatterns #
|
supported: @vulkan@
author: @KHR@
type: @device@
Extension number: @118@ | # OPTIONS_GHC -fno - warn - missing - pattern - synonym - signatures #
# OPTIONS_HADDOCK not - home #
# LANGUAGE PatternSynonyms #
module Graphics.Vulkan.Ext.VK_KHR_maintenance2
* Vulkan extension : @VK_KHR_maintenance2@
contact : @michaelworcester@
VkImageViewUsageCreateInfoKHR,
VkInputAttachment... |
3f86fc0a40043dc74d3de3c9ab2c3c504c4caeafedbb4d3c55cc963b5f27f3ff | elastic/eui-cljs | beacon.cljs | (ns eui.beacon
(:require ["@elastic/eui/lib/components/beacon/beacon.js" :as eui]))
(def EuiBeacon eui/EuiBeacon)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/beacon.cljs | clojure | (ns eui.beacon
(:require ["@elastic/eui/lib/components/beacon/beacon.js" :as eui]))
(def EuiBeacon eui/EuiBeacon)
| |
1202f418693ff7ad83f3b8c1fa1d4ca6d0a2e59d37a209b1a43fb49747952aa6 | bobzhang/ocaml-book | open_in.ml | open Ocamlbuild_plugin;;
open Command;;
dispatch begin function
| After_rules ->
(* Add pa_openin.cmo to the ocaml pre-processor when use_opening is set *)
flag ["ocaml"; "pp"; "use_openin"] (A"pa_openin.cmo");
Running ocamldep on ocaml code that is tagged with will require
the cmo . Note ... | null | https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/code/ocamlbuild/open_in.ml | ocaml | Add pa_openin.cmo to the ocaml pre-processor when use_opening is set | open Ocamlbuild_plugin;;
open Command;;
dispatch begin function
| After_rules ->
flag ["ocaml"; "pp"; "use_openin"] (A"pa_openin.cmo");
Running ocamldep on ocaml code that is tagged with will require
the cmo . Note that you only need this declaration when the syntax extension
is part of the ... |
bc9b763b54128f010c805ccec9f7e4946957e474d5762f30f3166c698ed027b5 | ariesteam/aries | carbon_vt.clj | Copyright 2011 The ARIES Consortium (
;;;
;;; This file is part of ARIES.
;;;
;;; ARIES is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;;; (at your option) any later v... | null | https://raw.githubusercontent.com/ariesteam/aries/b3fafd4640f4e7950fff3791bc4ea4c06ee4dcdf/plugins/org.integratedmodelling.aries.core/models/carbon_vt.clj | clojure |
This file is part of ARIES.
ARIES is free software: you can redistribute it and/or modify it
(at your option) any later version.
ARIES is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ... | Copyright 2011 The ARIES Consortium (
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
Carbon model for Vermont agricultural land
(ns core.models.carbon-vt
... |
0babcaa3afd7591e1dbee6c9e3aca0c9ee205191324db74b3dbb2bb81fc1491d | panglesd/hockmd | hockmd_api_test.ml | open Alcotest
(* let test_hello_with_name name () = *)
(* let greeting = Hockmd_api.greet name in *)
(* let expected = "Hello " ^ name ^ "!" in *)
(* check string "same string" greeting expected *)
(* let suite = *)
[ " can greet " , ` Quick , test_hello_with_name " "
; " can greet " , ` Quick , te... | null | https://raw.githubusercontent.com/panglesd/hockmd/8f819a6f082c37287ed9c2ae16b77a7020419e7d/test/hockmd_api_test.ml | ocaml | let test_hello_with_name name () =
let greeting = Hockmd_api.greet name in
let expected = "Hello " ^ name ^ "!" in
check string "same string" greeting expected
let suite =
]
let () = | open Alcotest
[ " can greet " , ` Quick , test_hello_with_name " "
; " can greet " , ` Quick , test_hello_with_name " "
Alcotest.run " hockmd - api " [ " Hockmd_api " , suite ]
|
c815968200cfb9dc1f502ab96ad3d9dffe32a7f36d54a142cb820329e14d3c00 | snowleopard/hadrian | Ar.hs | -----------------------------------------------------------------------------
-- |
Module : . Builder . Ar
Copyright : ( c ) 2014 - 2017
License : MIT ( see the file LICENSE )
-- Maintainer :
-- Stability : experimental
--
-- Support for invoking the archiving utility @ar@. We take care not to exc... | null | https://raw.githubusercontent.com/snowleopard/hadrian/b9a3f9521b315942e1dabb006688ee7c9902f5fe/src/Hadrian/Builder/Ar.hs | haskell | ---------------------------------------------------------------------------
|
Maintainer :
Stability : experimental
Support for invoking the archiving utility @ar@. We take care not to exceed
the limit on command line length, which differs across supported operating
command line length we pass the list of file... | Module : . Builder . Ar
Copyright : ( c ) 2014 - 2017
License : MIT ( see the file LICENSE )
systems ( see ' cmdLineLengthLimit ' ) . We need to handle in a special way
because we sometimes archive _ _ a lot _ _ of files ( in the Cabal library , for
example , command line length can reach 2 M... |
505116883c9e9b8913ff6ca5b4560fc01d66d36c7d6e737b5fb0d374e126b637 | Octachron/codept | a.mli | type t = Z.t
type w = int
val x : K.t
| null | https://raw.githubusercontent.com/Octachron/codept/2d2a95fde3f67cdd0f5a1b68d8b8b47aefef9290/tests/complex/deep-eps/a.mli | ocaml | type t = Z.t
type w = int
val x : K.t
| |
2c76067a24d6b59a60c27a2542774af8cfc9de021614cdfbf44c562d7663577c | GlideAngle/flare-timing | Forbes.hs | # OPTIONS_GHC -fno - warn - missing - signatures #
module Ellipsoid.FsAndoyer.Forbes (units) where
import Test.Tasty (TestTree, TestName, testGroup)
import Data.UnitsOfMeasure (u)
import Data.UnitsOfMeasure.Internal (Quantity(..))
import Flight.Units ()
import Flight.Distance (QTaskDistance)
import Flight.Zone (Zone... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/earth/test-suite-forbes/Ellipsoid/FsAndoyer/Forbes.hs | haskell | # OPTIONS_GHC -fno - warn - missing - signatures #
module Ellipsoid.FsAndoyer.Forbes (units) where
import Test.Tasty (TestTree, TestName, testGroup)
import Data.UnitsOfMeasure (u)
import Data.UnitsOfMeasure.Internal (Quantity(..))
import Flight.Units ()
import Flight.Distance (QTaskDistance)
import Flight.Zone (Zone... | |
e571302b072eabdc2701e503f1c64d2c8c42791f95e7b3bf798d9bf29194f131 | emezeske/lein-cljsbuild | jar.clj | (ns leiningen.cljsbuild.jar
"Utilities for the cljsbuild jar hook."
(:require
[clojure.java.io :as io]
[fs.core :as fs]
[leiningen.cljsbuild.config :as config]
[leiningen.cljsbuild.util :as util]))
(defn file-bytes
"Reads a file into a byte array"
[filename]
(let [file (io/file filename)]
... | null | https://raw.githubusercontent.com/emezeske/lein-cljsbuild/089193c74e362c143d30dfca21a21e95c7ca112a/plugin/src/leiningen/cljsbuild/jar.clj | clojure | specifying a file's destination path inside the jar and is contents
independently. Obviously this presents issues if there are any very | (ns leiningen.cljsbuild.jar
"Utilities for the cljsbuild jar hook."
(:require
[clojure.java.io :as io]
[fs.core :as fs]
[leiningen.cljsbuild.config :as config]
[leiningen.cljsbuild.util :as util]))
(defn file-bytes
"Reads a file into a byte array"
[filename]
(let [file (io/file filename)]
... |
b0e21f89d5c8271481e8a62c652f2a11328ee96e0f81a9bf1c461653a42b8fef | WormBase/wormbase_rest | history.clj | (ns rest-api.classes.gene.widgets.history
(:require
[clojure.string :as str]
[datomic.api :as d]
[pseudoace.utils :as pace-utils]
[rest-api.classes.generic-fields :as generic]
[rest-api.formatters.date :as dates]
[rest-api.formatters.object :refer [pack-obj]]))
(defn history-events [gene]
(let [d... | null | https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/gene/widgets/history.clj | clojure | (ns rest-api.classes.gene.widgets.history
(:require
[clojure.string :as str]
[datomic.api :as d]
[pseudoace.utils :as pace-utils]
[rest-api.classes.generic-fields :as generic]
[rest-api.formatters.date :as dates]
[rest-api.formatters.object :refer [pack-obj]]))
(defn history-events [gene]
(let [d... | |
6a0d28657eedb0089924d2a07ebb817bf6e37ad09bb8aceb231d61249497810e | craigl64/clim-ccl | text-formatting.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*-
;; See the file LICENSE for the full license governing this code.
;;
(in-package :clim-internals)
" Copyright ( c ) 1990 , 1991 Symbolics , Inc. All rights reserved . "
;;; Filling output
(defclass fil... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/clim/text-formatting.lisp | lisp | Syntax : ANSI - Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*-
See the file LICENSE for the full license governing this code.
Filling output
XXX: is whitespace-char-p the right thing to ask for? what about
other break characters?
from youngest buffer entry to the oldest (i.e. right ... |
(in-package :clim-internals)
" Copyright ( c ) 1990 , 1991 Symbolics , Inc. All rights reserved . "
(defclass filling-stream (standard-encapsulating-stream)
(fill-width
break-characters
prefix
prefix-width
current-width
old-buffers
on-fresh-line
(buffer :initarg :buf... |
fed37f831e8111b30a8d62bfa15eaa658906aaff00de0829e3092dd3449fa47f | khafatech/rsc3 | system.rkt | #lang racket
(provide (all-defined-out))
(define (sc-running/unix?)
(system "ps -e | grep scsynth | grep -v grep > /dev/null"))
(define (get-scsynth-path/osx)
(define path1 "/Applications/SuperCollider/SuperCollider.app/Contents/Resources/scsynth")
(define path2 "/Volumes/SuperCollider/SuperCollider/SuperCo... | null | https://raw.githubusercontent.com/khafatech/rsc3/a25985dab29ad951893cd7afa6d86a9371315871/oregano/system.rkt | racket | run scsynth
(display "in run-super-collider\n")
(display "in run-super-collider\n") | #lang racket
(provide (all-defined-out))
(define (sc-running/unix?)
(system "ps -e | grep scsynth | grep -v grep > /dev/null"))
(define (get-scsynth-path/osx)
(define path1 "/Applications/SuperCollider/SuperCollider.app/Contents/Resources/scsynth")
(define path2 "/Volumes/SuperCollider/SuperCollider/SuperCo... |
54e6bce225da4c655c1e93929cc5c89c5ab27675b7a92d3580212f30bd19c6e3 | janestreet/krb | config.mli | include Config_gen_intf.S
| null | https://raw.githubusercontent.com/janestreet/krb/1105ba1e8b836f80f09e663bc1b4233cf2607e7b/internal/config.mli | ocaml | include Config_gen_intf.S
| |
4371954c689cbba4a14fa3c8ebbb0ea93d4d55d2ddd3d7592c412eb8179e1ddc | chrisnc/hvx | HuberTestSpec.hs | # OPTIONS_GHC -fno - warn - missing - signatures #
module HVX.BlackBoxTests.HuberTestSpec where
import Test.Hspec
import Numeric.LinearAlgebra
import HVX
import HVX.Internal.TestUtil
-- Problem definition.
n = 4
a = EConst $ (n><n)
([0.5377 , 0.3188 , 3.5784 , 0.7254
, 1.8339 , -1.3077 , 2.7694 , -0.06... | null | https://raw.githubusercontent.com/chrisnc/hvx/4256e83d265c7b6bf9336533c15eae9fecce9a6d/test/HVX/BlackBoxTests/HuberTestSpec.hs | haskell | Problem definition. | # OPTIONS_GHC -fno - warn - missing - signatures #
module HVX.BlackBoxTests.HuberTestSpec where
import Test.Hspec
import Numeric.LinearAlgebra
import HVX
import HVX.Internal.TestUtil
n = 4
a = EConst $ (n><n)
([0.5377 , 0.3188 , 3.5784 , 0.7254
, 1.8339 , -1.3077 , 2.7694 , -0.0631
, -2.2588 , -0.4... |
780afce1fa805a3cf40dc37e12140ba0db2437ed68be2145470ba92ff4eb6c41 | rinconjc/rester | utils_test.clj | (ns rester.utils-test
(:require [clojure.test :refer :all]
[rester.utils :refer :all])
(:import clojure.lang.ExceptionInfo
java.text.SimpleDateFormat
java.util.Date))
(defn some-like [x xs]
(some #(when (like x %) %) xs))
(deftest test-str->map
(testing "simple pairs"
(is... | null | https://raw.githubusercontent.com/rinconjc/rester/2970bfd351c8e2263260657620c62fedaa9ca90e/test/rester/utils_test.clj | clojure | (ns rester.utils-test
(:require [clojure.test :refer :all]
[rester.utils :refer :all])
(:import clojure.lang.ExceptionInfo
java.text.SimpleDateFormat
java.util.Date))
(defn some-like [x xs]
(some #(when (like x %) %) xs))
(deftest test-str->map
(testing "simple pairs"
(is... | |
29b80c459f779a9a002a6a2595159ca673c71cc773b6b17509592020467e7f72 | dQuadrant/kuber | WalletUtil.hs | # LANGUAGE ScopedTypeVariables #
module Cardano.Kuber.Utility.WalletUtil where
import Cardano.Api (SigningKey, PaymentKey, TxBody, BabbageEra, Tx, makeSignedTransaction, makeShelleyKeyWitness, ShelleyWitnessSigningKey (WitnessPaymentKey))
import qualified Data.Text as T
import qualified Data.Text.IO as TextIO
import Sy... | null | https://raw.githubusercontent.com/dQuadrant/kuber/d542807f5338e42f256d7c74851364398d7e9eac/src/Cardano/Kuber/Utility/WalletUtil.hs | haskell | readSignKey relative to CARDANO_HOME path
this funciton can throw errors
the file contains the filename of the which is to be read. | # LANGUAGE ScopedTypeVariables #
module Cardano.Kuber.Utility.WalletUtil where
import Cardano.Api (SigningKey, PaymentKey, TxBody, BabbageEra, Tx, makeSignedTransaction, makeShelleyKeyWitness, ShelleyWitnessSigningKey (WitnessPaymentKey))
import qualified Data.Text as T
import qualified Data.Text.IO as TextIO
import Sy... |
2df1e07794b463912785b3d180d02d4118bee26a2499df1e15db35584d7c58b4 | benoitc/couchapp-ng | couchapp_ng_util.erl | %%% -*- erlang -*-
%%%
This file is part of released under the MIT license .
%%% See the NOTICE for more information.
-module(couchapp_ng_util).
-export([normalize_path/1,
remove_trailing_slash/1,
quote_plus/1,
join_url_path/2,
to_atom/1
]).
%% @doc normalize path.
normalize_path(... | null | https://raw.githubusercontent.com/benoitc/couchapp-ng/f6324c1a608e9c4efb5504a2397b473f09939b8d/src/couchapp_ng_util.erl | erlang | -*- erlang -*-
See the NOTICE for more information.
@doc normalize path. | This file is part of released under the MIT license .
-module(couchapp_ng_util).
-export([normalize_path/1,
remove_trailing_slash/1,
quote_plus/1,
join_url_path/2,
to_atom/1
]).
normalize_path(Path) ->
string:join(normalize_path1(string:tokens(Path,
"/"), []),... |
9bfe06e5b289a619a1eddf92aa7c5049bc76856cdf73fa9b20e175bc6598ffb3 | bonkf/trackerscraper | net.ml | open Core
open Lwt
open Lwt_unix
open Printf
type connection = {
hash : string;
socket : Lwt_unix.file_descr;
mutable cid : [`Active of string | `Inactive | `Closed]; (* connection_id *)
local_port : int;
peer_id : string; (* the peer_id we used *)
address : string (* human readable address for logging (IP... | null | https://raw.githubusercontent.com/bonkf/trackerscraper/973600c0589d58f680a93b78e495726ad5ff1330/src/net.ml | ocaml | connection_id
the peer_id we used
human readable address for logging (IPv4:Port)
only passed to write syscall
return the connection_id the tracker provided
apparently we do not need to keep a pointer to the invalidating thread
constants are action = announce, downloaded, left, uploaded, IP address = 0
co... | open Core
open Lwt
open Lwt_unix
open Printf
type connection = {
hash : string;
socket : Lwt_unix.file_descr;
local_port : int;
}
type scrape_result = {
leechers : int;
seeders : int;
peers : (Unix.Inet_addr.t * int) list
}
type action =
| Connect
| Announce
| Scrape
| Err
exception Tracker_erro... |
07a13a8d18172cf62ad0e032f932dee18219d7e3f013b140c1a32615caf0da56 | yokolet/clementine | compiler.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/yokolet/clementine/b26c2318625e49606b5cc3b95cc9e1f5085ac309/ext/clojure-clojurescript-bef56a7/src/clj/cljs/compiler.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(set! *warn-on-reflection* true)
(ns cljs.compiler
(:refer-clojure :exclude [munge macroexpand-1])
(:require [clojure.java.io :as io]
[clojure.string :as string]
[cljs.tagged-literals :as tags]
[cljs.analyzer :as ana])
(:import ja... |
aa5ea73e7f38f5d710e4f9c48634fc7b9cd2cd787540711fe4c6a11320b3629b | esengie/fpl-exploration-tool | Exprs.hs | module CodeGen.RightSide.Exprs(
conniveMeta,
trimMeta,
buildTermExp,
buildTermPat,
buildCheckExps,
buildInferExps,
genCheckStability,
buildStabilityExp,
) where
import Control.Monad.Except (throwError, lift)
import Control.Lens hiding (op)
import Language.Haskell.Exts.Simple
import qualified Data.Map ... | null | https://raw.githubusercontent.com/esengie/fpl-exploration-tool/bf655e65d215da4d7cae703dda7a7fde1a180b43/src/langGenerator/CodeGen/RightSide/Exprs.hs | haskell | but it's types
consCtxes ["x","y","z"] -> consCtx z (consCtx y (consCtx x ctx))
ctx, ctx, ctx, a = b >> infer cxzzczc
x, y |- infer (consCtx y (consCtx x))
we take a metavar + its' term and transform it into a metavar in different ctx
and return the transformation (it's context manipulation xzy.T -> yxz.T)
this ... | module CodeGen.RightSide.Exprs(
conniveMeta,
trimMeta,
buildTermExp,
buildTermPat,
buildCheckExps,
buildInferExps,
genCheckStability,
buildStabilityExp,
) where
import Control.Monad.Except (throwError, lift)
import Control.Lens hiding (op)
import Language.Haskell.Exts.Simple
import qualified Data.Map ... |
4a20c53f12f8b67ca67e980842b3f14d9271f8dedfd89779a33d97fd4381ea3f | softlab-ntua/bencherl | ets_test.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public Lice... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/bench/ets_test/src/ets_test.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitat... | Copyright Ericsson AB 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
Author : < >
Created : 27 Mar 2008 by ... |
7ea2d5b239eaa6a02049ddabc12a2625d59cb947351ba14742c3d992b7f1aa37 | ymilky/franzy | cluster_tests.clj | (ns franzy.clients.cluster-tests
(:require [midje.sweet :refer :all]
[franzy.common.models.types :as mt]
[franzy.clients.cluster :as cluster]
[schema.core :as s]
[franzy.common.models.schema :as fs])
(:import (org.apache.kafka.common Cluster)))
(def mock-node-count 5... | null | https://raw.githubusercontent.com/ymilky/franzy/460eb00a6ffdcc993722cb3e1f6e25beb55a6929/test/franzy/clients/cluster_tests.clj | clojure | (ns franzy.clients.cluster-tests
(:require [midje.sweet :refer :all]
[franzy.common.models.types :as mt]
[franzy.clients.cluster :as cluster]
[schema.core :as s]
[franzy.common.models.schema :as fs])
(:import (org.apache.kafka.common Cluster)))
(def mock-node-count 5... | |
fb81f07ed99becefe4cdb83af1ea930719ee086181385b365e8ed288d145e01b | ekmett/coda | Test.hs | {-# language CPP #-}
# language ViewPatterns #
# language GADTs #
# language ParallelListComp #
# language BangPatterns #
-- |
--
-- Well-Quasi-Orders
--
-- Based on < Termination Combinators Forever>
by Bolingbroke et al .
module Termination.Test where
import Termination.History
import Termination.Pair
import Con... | null | https://raw.githubusercontent.com/ekmett/coda/bca7e36ab00036f92d94eb86298712ab1dbf9b8d/src/termination/Termination/Test.hs | haskell | # language CPP #
|
Well-Quasi-Orders
Based on < Termination Combinators Forever>
| A well quasi-order: A reflexive, transitive relation such that
returns both x <= y and y <= x simultaneously, and uses a function
for more efficient prep
side-condition: needs 'a' to be finitely enumerable
symmetric
side-condi... | # language ViewPatterns #
# language GADTs #
# language ParallelListComp #
# language BangPatterns #
by Bolingbroke et al .
module Termination.Test where
import Termination.History
import Termination.Pair
import Control.Arrow
import Data.Functor.Contravariant
import Data.Functor.Contravariant.Divisible
#if __GLASG... |
5f5730f76e12351af817beb0fd235abc28d38f57ecf3832be99e5f1c38b8aaf9 | cyverse-archive/DiscoveryEnvironmentBackend | filetypes.clj | (ns data-info.routes.filetypes
(:use [common-swagger-api.schema]
[data-info.routes.domain.common]
[data-info.routes.domain.filetypes])
(:require [data-info.services.filetypes :as filetypes]
[data-info.util.service :as svc]))
(defroutes* filetypes-operations
(GET* "/file-types" [:as {u... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/data-info/src/data_info/routes/filetypes.clj | clojure | (ns data-info.routes.filetypes
(:use [common-swagger-api.schema]
[data-info.routes.domain.common]
[data-info.routes.domain.filetypes])
(:require [data-info.services.filetypes :as filetypes]
[data-info.util.service :as svc]))
(defroutes* filetypes-operations
(GET* "/file-types" [:as {u... | |
829b1f3245bcd1211146daf7ddf7d3244686dc1850b0739b5dca0e32d3e57b5b | brendanhay/amazonka | Data.hs | # LANGUAGE ApplicativeDo #
module Gen.AST.Data
( serviceData,
operationData,
shapeData,
waiterData,
)
where
import qualified Control.Lens as Lens
import qualified Control.Monad.Trans.State as State
import qualified Data.ByteString.Char8 as ByteString.Char8
import qualified Data.Char as Char
import qua... | null | https://raw.githubusercontent.com/brendanhay/amazonka/c12026c7683ada2caf6e754ed178e065cf46ad0a/gen/src/Gen/AST/Data.hs | haskell | Sometimes the values share a name with a type, so we prime the
data constructor to avoid clashes.
Instance declarations for instances we derive in the real .hs file.
Inst halfway through generation.
FIXME: dirty hack to render smart ctor parameter haddock comments. | # LANGUAGE ApplicativeDo #
module Gen.AST.Data
( serviceData,
operationData,
shapeData,
waiterData,
)
where
import qualified Control.Lens as Lens
import qualified Control.Monad.Trans.State as State
import qualified Data.ByteString.Char8 as ByteString.Char8
import qualified Data.Char as Char
import qua... |
bf9db6256bce533e0aa28505473bbdb6297520ff958b4d61dd8fb253e0542e13 | fredlund/JavaErlang | java_erlang_sup.erl | %%%-------------------------------------------------------------------
%% @doc java_erlang top level supervisor.
%% @end
%%%-------------------------------------------------------------------
-module(java_erlang_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).... | null | https://raw.githubusercontent.com/fredlund/JavaErlang/29f5a9e54bdf750688048d621e67abc9e79de146/src/java_erlang_sup.erl | erlang | -------------------------------------------------------------------
@doc java_erlang top level supervisor.
@end
-------------------------------------------------------------------
API
Supervisor callbacks
====================================================================
API functions
===========================... |
-module(java_erlang_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
Child : : { Id , StartFunc , Restart , Shutdown , Type , Modules }
init([]) ->
{ok, { {one_for_all, 0, 1}, []} ... |
5063c1856e3ed0d7beb09fc1c3d835cbeb3ac75495ff08bad9fd524774012513 | pascal-knodel/haskell-craft | E'13'14.hs | --
--
--
------------------
Exercise 13.14 .
------------------
--
--
--
FIXME , BAD DAY
import Prelude hiding
(
(<)
, (>)
)
Note : Chapter 4 > cabal install
import B'C'4
(
Move ( Rock , Paper , Scissors )
)
class NonEnum a where
(<) :: a -> a -> Bool
(>) :: a -> a -> Bool
(<) _ _ ... | null | https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/Chapter%C2%A013/E'13'14.hs | haskell |
----------------
----------------
GHCi>
Rock < Rock
Rock > Rock
False
False
Other examples: constant 'things' | Exercise 13.14 .
FIXME , BAD DAY
import Prelude hiding
(
(<)
, (>)
)
Note : Chapter 4 > cabal install
import B'C'4
(
Move ( Rock , Paper , Scissors )
)
class NonEnum a where
(<) :: a -> a -> Bool
(>) :: a -> a -> Bool
(<) _ _ = False
(>) _ _ = False
instance NonEnum Move whe... |
3bf43a4d312f9cca22328aabab53503a8b1af5593f77d727b05c4018833b1cc7 | dyzsr/ocaml-selectml | subst.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/typing/subst.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Types
type t
Substitutions are used to translate a type from one context to
another . ... |
a3ffb496567a9580029945c3a260532f0d1b6571d71e58fdebd591325637ad53 | plumatic/grab-bag | manager.clj | (ns domain.interests.manager
(:use plumbing.core)
(:require
[schema.core :as s]
[plumbing.error :as err]
[plumbing.index :as index]
[plumbing.logging :as log]
[domain.interests.core :as interests]
[domain.interests.indexer :as indexer]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/domain/src/domain/interests/manager.clj | clojure |
Private fields and schema
Order here should not change!
this is the current line where we're only saving off stuff from above here
Private Protocol for interest types (for use by InterestManager) | (ns domain.interests.manager
(:use plumbing.core)
(:require
[schema.core :as s]
[plumbing.error :as err]
[plumbing.index :as index]
[plumbing.logging :as log]
[domain.interests.core :as interests]
[domain.interests.indexer :as indexer]))
(def +type-list+
[:topic
:feed
:activity
:grabb... |
243cf8e0113a1483ad07a744de0154664c79b918cfdaa5af1e7631f00c4435ff | scheme/scsh | ccp.scm | ;;; Char->char partial maps -*- Scheme -*-
Copyright ( C ) 1998 by .
;;; CCPs are an efficient data structure for doing simple string transforms,
;;; similar to the kinds of things you would do with the tr(1) program.
;;;
This code is tuned for a 7- or 8 - bit character type . Large , 16 - bit
;;; character ... | null | https://raw.githubusercontent.com/scheme/scsh/114432435e4eadd54334df6b37fcae505079b49f/scheme/lib/ccp.scm | scheme | Char->char partial maps -*- Scheme -*-
CCPs are an efficient data structure for doing simple string transforms,
similar to the kinds of things you would do with the tr(1) program.
character types would need a more sophisticated data structure, tuned
for sparseness. I would suggest something like this:
d... | Copyright ( C ) 1998 by .
This code is tuned for a 7- or 8 - bit character type . Large , 16 - bit
( define - record ccp
sequence of L chars beginning with ( in the sequence of the underlying
char type representation ) , where L is the length of STRING . These MAP elements
are sorted by , so that b... |
a02ec4da08aa37a5d0ffca6f8e73e0c1d495dd77184c4d9fc9438442fcb69fe5 | zalora/sproxy | Server.hs | module Sproxy.Server
( server
) where
import Control.Concurrent (forkIO)
import Control.Exception (bracketOnError)
import Control.Monad (void, when)
import Data.ByteString.Char8 (pack)
import Data.HashMap.Strict as HM (fromList, lookup, toList)
import Data.Maybe (fromMaybe)
import Data.Text (Text)
import Data.Word... | null | https://raw.githubusercontent.com/zalora/sproxy/41112cddb49ad4d967d3b400936ed18c2a4f4197/src/Sproxy/Server.hs | haskell | module Sproxy.Server
( server
) where
import Control.Concurrent (forkIO)
import Control.Exception (bracketOnError)
import Control.Monad (void, when)
import Data.ByteString.Char8 (pack)
import Data.HashMap.Strict as HM (fromList, lookup, toList)
import Data.Maybe (fromMaybe)
import Data.Text (Text)
import Data.Word... | |
5d751dd32a9056da7697cad55408ec43dded1dda73ce2f762e939edb467603b1 | nasa/Common-Metadata-Repository | launchpad_token_validation.clj | (ns cmr.common-app.api.launchpad-token-validation
"Validate Launchpad token."
(:require
[cheshire.core :as json]
[clojure.data.codec.base64 :as base64]
[clojure.string :as string]
[cmr.common-app.config :as config]
[cmr.common.services.errors :as errors]
[cmr.common.util :as common-util]
[cmr.t... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/ada7e5e9179f210967a7db18268993322897ca10/common-app-lib/src/cmr/common_app/api/launchpad_token_validation.clj | clojure | Note: Similar code exists at gov.nasa.echo.kernel.service.authentication
note: ordered from least expensive to most | (ns cmr.common-app.api.launchpad-token-validation
"Validate Launchpad token."
(:require
[cheshire.core :as json]
[clojure.data.codec.base64 :as base64]
[clojure.string :as string]
[cmr.common-app.config :as config]
[cmr.common.services.errors :as errors]
[cmr.common.util :as common-util]
[cmr.t... |
caa53c62043ed59f9c1909c895ab831b7691e80b3ad4158aac05cbcdcbade0ea | coccinelle/coccinelle | uchar.mli | type t[@@immediate ]
val min : t
val max : t
val bom : t
val rep : t
val succ : t -> t
val pred : t -> t
val is_valid : int -> bool
val of_int : int -> t
val unsafe_of_int : int -> t
val to_int : t -> int
val is_char : t -> bool
val of_char : char -> t
val to_char : t -> char
val unsafe_to_char : t -> char
val equal : ... | null | https://raw.githubusercontent.com/coccinelle/coccinelle/5448bb2bd03491ffec356bf7bd6ddcdbf4d36bc9/bundles/stdcompat/stdcompat-current/interfaces/4.14/uchar.mli | ocaml | type t[@@immediate ]
val min : t
val max : t
val bom : t
val rep : t
val succ : t -> t
val pred : t -> t
val is_valid : int -> bool
val of_int : int -> t
val unsafe_of_int : int -> t
val to_int : t -> int
val is_char : t -> bool
val of_char : char -> t
val to_char : t -> char
val unsafe_to_char : t -> char
val equal : ... | |
a43d1c48d9490083de0d563aeff8ba07f72922e2fb63bf65f6309ab469f9ec30 | octaspace/orc | orc_gpu.erl | -module(orc_gpu).
-export([info/1]).
-export([parse_output/2]).
-include_lib("kernel/include/logger.hrl").
info(nvidia) -> gpu_info("cuda-gpu-info");
info(amd) -> gpu_info("clinfo --json").
gpu_info(FileName) ->
ExecPath = filename:join([orc:env(cwd), FileName]),
case orc_shell:exec(ExecPath) of
{0,... | null | https://raw.githubusercontent.com/octaspace/orc/28da406f851e8113bff75a75b15ccb63bc5baee0/src/orc_gpu.erl | erlang | CL_DEVICE_GLOBAL_MEM_SIZE in bytes | -module(orc_gpu).
-export([info/1]).
-export([parse_output/2]).
-include_lib("kernel/include/logger.hrl").
info(nvidia) -> gpu_info("cuda-gpu-info");
info(amd) -> gpu_info("clinfo --json").
gpu_info(FileName) ->
ExecPath = filename:join([orc:env(cwd), FileName]),
case orc_shell:exec(ExecPath) of
{0,... |
8b34d7b92e01548e082f7fff5a73279539f8045989a7706f598584398d585033 | inhabitedtype/ocaml-aws | describeLoadBalancerPolicyTypes.ml | open Types
open Aws
type input = DescribeLoadBalancerPolicyTypesInput.t
type output = DescribeLoadBalancerPolicyTypesOutput.t
type error = Errors_internal.t
let service = "elasticloadbalancing"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_s... | null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/elasticloadbalancing/lib/describeLoadBalancerPolicyTypes.ml | ocaml | open Types
open Aws
type input = DescribeLoadBalancerPolicyTypesInput.t
type output = DescribeLoadBalancerPolicyTypesOutput.t
type error = Errors_internal.t
let service = "elasticloadbalancing"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_s... | |
e4766e8fc5fdbd16be167cfcfe1aef4ce2f900d8907a5fc5a3821f1ff4a1150d | ActaFi/cardano-staking-smart-contract | Deposit.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
|
Module : Tests . Attacks . Deposit
Description : A new off - chain code to test an attack the deposit ... | null | https://raw.githubusercontent.com/ActaFi/cardano-staking-smart-contract/1548ba69b6cc6f2706668aee103e36c8c0bac19e/test/Tests/Attacks/Deposit.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
^ Endpoints
Third-party libraries libraries.
Schema.
Off-chain code. | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
|
Module : Tests . Attacks . Deposit
Description : A new off - chain code to test an attack the deposit validator .
Copyright : P2P Solutions Ltd.
License : GPL-3
Maintainer :
Stability : devel... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.