_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 |
|---|---|---|---|---|---|---|---|---|
e2084757e154a57e387003940385c6e5e1c86cac30921c50e0ad8eedfd484ea5 | ekmett/guanxi | Relational.hs | {-# language TypeFamilies #-}
# language LambdaCase #
# language BangPatterns #
# language FlexibleInstances #
# language MultiParamTypeClasses #
module Domain.Relational where
import Control.Lens
import Control.Monad
import Control.Monad.Primitive
import Ref
-- Use path compression, union by size, with a big relati... | null | https://raw.githubusercontent.com/ekmett/guanxi/e267f4210a9c10d0091371ea9b028b7d6fa8b9f3/src/Domain/Relational.hs | haskell | # language TypeFamilies #
Use path compression, union by size, with a big relational blob at the center
# unpack #
# unpack #
# unpack #
merge disjoint relational domains
TODO: build rational octagons out of these parts? | # language LambdaCase #
# language BangPatterns #
# language FlexibleInstances #
# language MultiParamTypeClasses #
module Domain.Relational where
import Control.Lens
import Control.Monad
import Control.Monad.Primitive
import Ref
data Content s a
newtype Rel s a = Rel
{ domainReference :: Ref s (Content s a)
} ... |
ff300a5fd805c99d7952e8cafd76bc0fe18c5f0b907cb1a0b378c5a6e0a10749 | grin-compiler/ghc-wpc-sample-programs | BufferType.hs | {-# LANGUAGE TypeSynonymInstances #-}
-----------------------------------------------------------------------------
-- |
Module : Network . BufferType
-- Description : Abstract representation of request and response buffer types.
-- Copyright : See LICENSE file
License : BSD
--
-- Maintainer : ... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/HTTP-4000.3.14/Network/BufferType.hs | haskell | # LANGUAGE TypeSynonymInstances #
---------------------------------------------------------------------------
|
Description : Abstract representation of request and response buffer types.
Copyright : See LICENSE file
Maintainer : Ganesh Sittampalam <>
Stability : experimental
Portability : non-portable... | Module : Network . BufferType
License : BSD
these internally . The " Network . BufferType " module provides this , defining
the ' BufferType ' class and its ad - hoc representation of buffer operations
module Network.BufferType
(
BufferType(..)
, BufferOp(..)
, str... |
96c7dc6fe7aef15ec84924263e29c53b79a771126d27f1a3ec11e8c11e16318d | byteally/webapi | SwaggerGen.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE DataKinds #-}
# LANGUAGE CPP #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE QuasiQuotes... | null | https://raw.githubusercontent.com/byteally/webapi/8d712d0ae786475b177beacee32dc40db320af4c/webapi-swagger/src/SwaggerGen.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveGeneric #
# LANGUAGE DataKinds #
# LANGUAGE QuasiQuotes #
# LANGUAGE TypeSynonymInstances #
import qualified Dhall.Core as D
import qualified Data.Text.Encoding as T
NOTE: "{foo}..{bar}" would be represented a... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE CPP #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleInstances #
# LANGUAGE BangPatterns #
module SwaggerGen where
import C... |
f094706a2e5cdfd2cad1e91c945bd9697acf169eed9e1fc6328ebae5d3694310 | eglaysher/rldev | binarray.mli |
Binarray : bigarray wrapper for byte twiddling
Copyright ( C ) 2006 Haeleth
This program is free software ; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation ; either version 2 of the License , or ( at your o... | null | https://raw.githubusercontent.com/eglaysher/rldev/e59103b165e1c20bd940942405b2eee767933c96/src/common/binarray.mli | ocaml | Functions similar to the usual IO thingies
Writes the string data 'as is'
Writes the string data, pads to end of slice with zeroes
Other functions |
Binarray : bigarray wrapper for byte twiddling
Copyright ( C ) 2006 Haeleth
This program is free software ; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation ; either version 2 of the License , or ( at your o... |
89407508e2e4ac727afddffb1f6152b83e146b3e86b8d775144778a51b3816df | draperlaboratory/VIBES | utils.mli | (***************************************************************************)
(* *)
Copyright ( C ) 2022/2023 The Charles Stark Draper Laboratory , Inc.
(* *)
(* This... | null | https://raw.githubusercontent.com/draperlaboratory/VIBES/7f978d66d0b022d1a9262fdfc608b7a2b7c95dff/tools/vibes-minizinc/lib/utils.mli | ocaml | *************************************************************************
This file is provided under the license found in the LICENSE file in
the top-level director... | Copyright ( C ) 2022/2023 The Charles Stark Draper Laboratory , Inc.
This research was developed with funding from the Defense Advanced
Research Projects Agency ( DARPA ) .
open Bap_core_theory
val build_constraints_file :
string ->
model_filepath:string -... |
2811a1fef7689a3cb47b39ac0c2a0a3cfbe91afb69862288bfce59a7a8da7d29 | district0x/cljs-web3-next | evm.cljs | (ns cljs-web3-next.evm
"Functions that can be used to control testrpc behaviour. Can ONLY (!) be used
with testrpc.
See for more information."
(:require [cljs-web3-next.utils :refer [callback-js->clj js->cljkk]]))
(defn- jsonrpc-callback->clj
[callback]
(callback-js->clj (fn [err res]
(cond
er... | null | https://raw.githubusercontent.com/district0x/cljs-web3-next/57fcc66b87ddfb5d098074ab4ebcf44385123bd7/src/cljs_web3_next/evm.cljs | clojure | (ns cljs-web3-next.evm
"Functions that can be used to control testrpc behaviour. Can ONLY (!) be used
with testrpc.
See for more information."
(:require [cljs-web3-next.utils :refer [callback-js->clj js->cljkk]]))
(defn- jsonrpc-callback->clj
[callback]
(callback-js->clj (fn [err res]
(cond
er... | |
9ed8b1a6d45b13b3bc7fa0c522fd9aa4f8042da9cae9b03920056deabfe64a3e | iijlab/postgresql-pure | SpecificDB.hs | module SpecificDB where
import Database.HDBC
import Database.HDBC.PostgreSQL.Pure
import Test.HUnit
import Data.Default.Class(Default(def))
import Data.Maybe(fromMaybe)
import System.Environment(lookupEnv)
connectDB =
handleSqlError (do host <- getEnvDef "PURE_HOST" "127.0.0.1"
port <- getE... | null | https://raw.githubusercontent.com/iijlab/postgresql-pure/2a640f102f3e3540aedbcf4cfb5d1ed10310f773/test-hdbc-postgresql/SpecificDB.hs | haskell | module SpecificDB where
import Database.HDBC
import Database.HDBC.PostgreSQL.Pure
import Test.HUnit
import Data.Default.Class(Default(def))
import Data.Maybe(fromMaybe)
import System.Environment(lookupEnv)
connectDB =
handleSqlError (do host <- getEnvDef "PURE_HOST" "127.0.0.1"
port <- getE... | |
b83103e7f09ce3fd2c14505f59c3f9587d1383741a3753d77f6c84b5080db371 | input-output-hk/cardano-base | StringConstants.hs |
# LANGUAGE TypeApplications #
module Test.Crypto.Vector.StringConstants
( invalidEcdsaSigLengthError,
invalidSchnorrVerKeyLengthError,
invalidEcdsaVerKeyLengthError,
invalidSchnorrSigLengthError,
cannotDecodeVerificationKeyError,
unexpectedDecodingError,
)
where
import Data.Data (Proxy (Proxy... | null | https://raw.githubusercontent.com/input-output-hk/cardano-base/b403b76ba1f70df1a6c9f861591d9e2a332abb13/cardano-crypto-tests/src/Test/Crypto/Vector/StringConstants.hs | haskell |
# LANGUAGE TypeApplications #
module Test.Crypto.Vector.StringConstants
( invalidEcdsaSigLengthError,
invalidSchnorrVerKeyLengthError,
invalidEcdsaVerKeyLengthError,
invalidSchnorrSigLengthError,
cannotDecodeVerificationKeyError,
unexpectedDecodingError,
)
where
import Data.Data (Proxy (Proxy... | |
1e6f15e0bed14c7fbb0c6f79025f1da3e212d5a323e8579fc13103d2c3fd47b5 | smee/binary | matlab5.clj | (ns org.clojars.smee.binary.demo.matlab5
"Implementation for MATLAB 5 binary files. Currently read only, because creating headers requires
knowing the number of bytes written. Since we do not know these size beforehand, we currently can't write
a consistent header.
Implementation according to
CAUTION: This implemen... | null | https://raw.githubusercontent.com/smee/binary/4b23bdd8de1667bc991478739690068b484420d6/src/org/clojars/smee/binary/demo/matlab5.clj | clojure | constants ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
header for each subelement ;;;;;;;;;;;;;;;;;;;;;;;;
should be hdr, but in my tests the type always says 'ubyte' although the value is an integer
matrices ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
codecs for different data types / elements ;;;;;;;;;;;;;;;;;;;
overall structure ;;;;;... | (ns org.clojars.smee.binary.demo.matlab5
"Implementation for MATLAB 5 binary files. Currently read only, because creating headers requires
knowing the number of bytes written. Since we do not know these size beforehand, we currently can't write
a consistent header.
Implementation according to
CAUTION: This implemen... |
54adbf1b2a71a136f876ba3c3469206b3c93eaa0ff0891db738938ef1f61a1fe | MichaelXavier/Angel | CompliantJob.hs | module Main (main) where
import GHC.IO.Handle
import System.IO (stdout)
import Control.Concurrent.MVar (newEmptyMVar, putMVar, takeMVar)
import System.Exit (exitWith, ExitCode(ExitSuccess))
import System.Posix.Signals (installHandler, sigTERM, Handler(Catch))
main :: IO ()
main = do
hSetBuffering stdout NoBuffering... | null | https://raw.githubusercontent.com/MichaelXavier/Angel/2d5a2f9ee50ad6755960398e3bb8a35f484eca0f/test/test_jobs/CompliantJob.hs | haskell | module Main (main) where
import GHC.IO.Handle
import System.IO (stdout)
import Control.Concurrent.MVar (newEmptyMVar, putMVar, takeMVar)
import System.Exit (exitWith, ExitCode(ExitSuccess))
import System.Posix.Signals (installHandler, sigTERM, Handler(Catch))
main :: IO ()
main = do
hSetBuffering stdout NoBuffering... | |
20fbbc083a3feaa71218eab9b433547f23fec000dae65c114afa89a2db408187 | kaznum/programming_in_ocaml_exercise | list_of_alist.ml | let rec list_of_alist alist =
let rec val_list als =
match als with
`Nil -> []
| `Cons (x, y) -> x :: val_list y
| `App (x, y) -> val_list x @ val_list y in
let rec list_of_vals vals =
match vals with
[] -> `Nil
| x::xs -> `Cons(x, list_of_vals xs) in
list_of_vals (val_list alist);;
l... | null | https://raw.githubusercontent.com/kaznum/programming_in_ocaml_exercise/6f6a5d62a7a87a1c93561db88f08ae4e445b7d4e/ex14.2/list_of_alist.ml | ocaml | let rec list_of_alist alist =
let rec val_list als =
match als with
`Nil -> []
| `Cons (x, y) -> x :: val_list y
| `App (x, y) -> val_list x @ val_list y in
let rec list_of_vals vals =
match vals with
[] -> `Nil
| x::xs -> `Cons(x, list_of_vals xs) in
list_of_vals (val_list alist);;
l... | |
cc055a6ba48ee1634e37859c332dea259e36dca84ef89b507fea3805bd2ac616 | amnh/PCG | Version.hs | -----------------------------------------------------------------------------
-- |
Module : . Version
Copyright : ( c ) 2015 - 2021 Ward Wheeler
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
-- Provides the types for the \"Version\" comma... | null | https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/language/src/PCG/Command/Version.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
Provides the types for the \"Version\" command along with a semantic definition
to be consumed by the stream parser.
-----------------------... | Module : . Version
Copyright : ( c ) 2015 - 2021 Ward Wheeler
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE UnboxedSums #
module PCG.Command.Version
( VersionCommand (..)
, versionCommandSpecification
) where
import Data.Functor (($>))
import PC... |
c48e7252e79a477d6780f6a1ff9e35d993033f7ba2e06f046eb7e26db91f76b9 | thi-ng/geom | bloom.cljc | (ns thi.ng.geom.gl.fx.bloom
(:require
[thi.ng.dstruct.core :as d]
[thi.ng.geom.rect :as r]
[thi.ng.geom.gl.fx :as fx]
[thi.ng.glsl.core :as glsl :include-macros true]
[thi.ng.glsl.color :as col]
[thi.ng.glsl.texture :as tex]))
Bloom filter FX pipeline preset
;; Threshold pass
(def threshold-sha... | null | https://raw.githubusercontent.com/thi-ng/geom/85783a1f87670c5821473298fa0b491bd40c3028/src/thi/ng/geom/gl/fx/bloom.cljc | clojure | Threshold pass
Composite pass
| (ns thi.ng.geom.gl.fx.bloom
(:require
[thi.ng.dstruct.core :as d]
[thi.ng.geom.rect :as r]
[thi.ng.geom.gl.fx :as fx]
[thi.ng.glsl.core :as glsl :include-macros true]
[thi.ng.glsl.color :as col]
[thi.ng.glsl.texture :as tex]))
Bloom filter FX pipeline preset
(def threshold-shader-spec
(d/merg... |
bac1cf568baaa5aa8ac157123f8162e24c036f1edf897677624598a6a7ef5a33 | elastic/eui-cljs | icon_email.cljs | (ns eui.icon-email
(:require ["@elastic/eui/lib/components/icon/assets/email.js" :as eui]))
(def email eui/icon)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_email.cljs | clojure | (ns eui.icon-email
(:require ["@elastic/eui/lib/components/icon/assets/email.js" :as eui]))
(def email eui/icon)
| |
6bb680ecb69739db17ffa8c794b8b2bbb294c51c2bb6223734f45a424838a950 | daypack-dev/daypack-lib | task_inst_id_map_utils.ml | include Map_utils.Make (Task_inst_id_map)
module Int64_bucketed = Map_utils.Make_bucketed (Task_inst_id_map) (Int64_set)
module Int64_int64_option_bucketed =
Map_utils.Make_bucketed (Task_inst_id_map) (Int64_int64_option_set)
| null | https://raw.githubusercontent.com/daypack-dev/daypack-lib/63fa5d85007eca73aa6c51874a839636dd0403d3/src/task_inst_id_map_utils.ml | ocaml | include Map_utils.Make (Task_inst_id_map)
module Int64_bucketed = Map_utils.Make_bucketed (Task_inst_id_map) (Int64_set)
module Int64_int64_option_bucketed =
Map_utils.Make_bucketed (Task_inst_id_map) (Int64_int64_option_set)
| |
85bbfd0f58a10f1ed42af6b629ba0a45a2a1a39795bfa80f93a8082dfebc620d | HaskellEmbedded/data-stm32 | Main.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
module Main where
import Turtle
import Prelude hiding (log, FilePath)
import Control.Monad
import qualified Control.Foldl as Fold
import Data.Char (toUpper)
import qualified Data.Set as S
import qualified Data.Text as T
impo... | null | https://raw.githubusercontent.com/HaskellEmbedded/data-stm32/204aff53eaae422d30516039719a6ec7522a6ab7/app/genstm/Main.hs | haskell | # LANGUAGE OverloadedStrings #
cabal file and support files
memMap
interrupts
toplevel
generate peripheral definitions (src/Ivory/BSP/STM32/Peripheral/
for all supportedPeriphs
base non-versioned peripherals on this devices svd
Driver
alternate functions
generate stripped down version of MCU Map
to be bundle... | # LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
module Main where
import Turtle
import Prelude hiding (log, FilePath)
import Control.Monad
import qualified Control.Foldl as Fold
import Data.Char (toUpper)
import qualified Data.Set as S
import qualified Data.Text as T
import qualified Data.Text.IO as TIO
im... |
e32cf6cd6257aff91ff72565b963298f9598c56d594bc3f2fdd8fb9dd1c6aca5 | ndpar/erlang | db2.erl | Author :
Created : Nov 7 , 2009
%% Description: Simple DB (See "Erlang Programming", p.83)
-module(db2).
-export([new/0, destroy/1, write/3, read/2, match/2, delete/2]).
%%
%% Returns the list of keys for which Element is stored in the database
match(Element , Db ) - > lists : map(fun({Key , _ } ) - > Key end... | null | https://raw.githubusercontent.com/ndpar/erlang/e215841a1d370e0fc5eb6b9ff40ea7ae78fc8763/src/db2.erl | erlang | Description: Simple DB (See "Erlang Programming", p.83)
Returns the list of keys for which Element is stored in the database
Deletes Element with specified Key from datase Db
Writes tuple {Key, Element} into database Db
Drops the database
Creates new database
Db = db2:new().
db2:read(ola, Db3).
db... | Author :
Created : Nov 7 , 2009
-module(db2).
-export([new/0, destroy/1, write/3, read/2, match/2, delete/2]).
match(Element , Db ) - > lists : map(fun({Key , _ } ) - > Key end , ( lists : filter(fun(X ) - > { _ , E } = X , E = = Element end , Db ) ) ) .
match(Element, Db) -> [Key || {Key, E} <- Db, E == Eleme... |
2e7f64888d937d5ed4af206efb60b8af8dd7d62fd692655c1321a443489ce1de | softwarelanguageslab/maf | R5RS_scp1_find-cycles-1.scm | ; Changes:
* removed : 1
* added : 0
* swaps : 0
; * negated predicates: 0
* swapped branches : 1
* calls to i d fun : 1
(letrec ((ret4 (let ((last (cons 'c ())))
(cons last (cons 'b last))))
(ret7 (let* ((last (cons 'c ()))
(middle (cons last last)))
... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_find-cycles-1.scm | scheme | Changes:
* negated predicates: 0 | * removed : 1
* added : 0
* swaps : 0
* swapped branches : 1
* calls to i d fun : 1
(letrec ((ret4 (let ((last (cons 'c ())))
(cons last (cons 'b last))))
(ret7 (let* ((last (cons 'c ()))
(middle (cons last last)))
(cons middle middle)))
... |
b6f892f51e06f528229e6d964d3aa8bacdc8d69580b7f544df37c1dd801142f8 | fwcd/curry-language-server | Completion.hs | # LANGUAGE OverloadedStrings , FlexibleInstances , ViewPatterns , MultiWayIf #
module Curry.LanguageServer.Handlers.Completion (completionHandler) where
Curry Compiler Libraries + Dependencies
import qualified Curry.Syntax as CS
import qualified Base.Types as CT
import Control.Lens ((^.))
import Control.Monad (join... | null | https://raw.githubusercontent.com/fwcd/curry-language-server/d84aa20a6fefe7103bd18be69a2569727c63f9f3/src/Curry/LanguageServer/Handlers/Completion.hs | haskell | The index symbol
The, possibly aliased, module name. Nothing means that the symbol is available unqualified.
Import edits to apply after the completion has been selected. Nothing means that the symbol does not require an import.
| Turns an index symbol into completion symbols by analyzing the module's imports.
| T... | # LANGUAGE OverloadedStrings , FlexibleInstances , ViewPatterns , MultiWayIf #
module Curry.LanguageServer.Handlers.Completion (completionHandler) where
Curry Compiler Libraries + Dependencies
import qualified Curry.Syntax as CS
import qualified Base.Types as CT
import Control.Lens ((^.))
import Control.Monad (join... |
f7e6fe2d1642c5929a356a59370b40e41893d052f3e3de4f88c1155ed578e702 | toschoo/mom | Types.hs | {-# LANGUAGE DeriveDataTypeable,RankNTypes #-}
-------------------------------------------------------------------------------
-- |
Module : Network / Mom / Patterns / Types.hs
Copyright : ( c )
-- License : LGPL
-- Stability : experimental
-- Portability: non-portable
--
-- Fundamental streaming type... | null | https://raw.githubusercontent.com/toschoo/mom/b58ca23d05c98ab50d9e981bd4ad2cdb76846399/src/patterns/src/Network/Mom/Patterns/Types.hs | haskell | # LANGUAGE DeriveDataTypeable,RankNTypes #
-----------------------------------------------------------------------------
|
License : LGPL
Stability : experimental
Portability: non-portable
Fundamental streaming types
-----------------------------------------------------------------------------
-------------... | Module : Network / Mom / Patterns / Types.hs
Copyright : ( c )
module Network.Mom.Patterns.Types
where
import Prelude hiding (catch)
import Control.Exception (Exception, SomeException)
import Data.Typeable (Typeable)
import qualified Data.Conduit as C
impo... |
e46c3250dbf9f956fd26912735e3ebaf014a296801ff98d9b688bda5e08341cf | mitsuji/mssql-simple | TokenStreamParser.hs | # LANGUAGE CPP #
module Database.MSSQLServer.Query.TokenStreamParser ( Parser(..)
, parse
, item
, satisfy
, sa... | null | https://raw.githubusercontent.com/mitsuji/mssql-simple/3426b972a756b295b2a729571cb67b28bd9842d7/src/Database/MSSQLServer/Query/TokenStreamParser.hs | haskell | [MEMO] 0x01 more bit | # LANGUAGE CPP #
module Database.MSSQLServer.Query.TokenStreamParser ( Parser(..)
, parse
, item
, satisfy
, sa... |
cb1e7a166a9befec860278a5623c7cc471ac2ac230dfe015332a8d162d8e39c1 | hspec/hspec-expectations | Matcher.hs | module Test.Hspec.Expectations.Matcher (matchList) where
import Prelude hiding (showList)
import Data.List
matchList :: (Show a, Eq a) => [a] -> [a] -> Maybe String
xs `matchList` ys
| null extra && null missing = Nothing
| otherwise = Just (err "")
where
extra = xs \\ ys
missing =... | null | https://raw.githubusercontent.com/hspec/hspec-expectations/55f00d0fd98421cf67c4726e8272ec1d33f2c6f2/src/Test/Hspec/Expectations/Matcher.hs | haskell | module Test.Hspec.Expectations.Matcher (matchList) where
import Prelude hiding (showList)
import Data.List
matchList :: (Show a, Eq a) => [a] -> [a] -> Maybe String
xs `matchList` ys
| null extra && null missing = Nothing
| otherwise = Just (err "")
where
extra = xs \\ ys
missing =... | |
eca48570e5eb76a4ba6df18ee381dadd96c610d6e62334ef99b4a3a6f637f1fb | dgiot/dgiot | dgiot_bacnet_sup.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 DGIOT Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the... | null | https://raw.githubusercontent.com/dgiot/dgiot/a6b816a094b1c9bd024ce40b8142375a0f0289d8/apps/dgiot_bacnet/src/dgiot_bacnet_sup.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, either express ... | Copyright ( c ) 2020 DGIOT Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(dgiot_bacnet_sup).
-include("dgiot_bacnet.hrl").
-behaviour(supervisor).
-export([start_link... |
2813de971761886dcf3770090b4dc082b01c59acb4ae8fc0b2a80fe2429e6e9f | stchang/macrotypes | lin3-tests.rkt | #lang s-exp turnstile/examples/linear/lin3
(require "rackunit-lin.rkt")
;; very basic tests -------------------------------------------------
1 ) unused : err
(typecheck-fail (λ ([x : Bool]) #t) #:with-msg "linear vars unused: \\(x\\)")
2 ) used once : ok
(check-type (λ ([x : Bool]) x) : (→ Bool Bool))
3 ) us... | null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-test/tests/turnstile/linear/lin3-tests.rkt | racket | very basic tests -------------------------------------------------
other examples from atapl ----------------------------------------
but actual example from book demonstrates subtlety of allowing mixed
restricted/unrestricted vals:
- unrestricted data structures may not contain restricted vals
function should no... | #lang s-exp turnstile/examples/linear/lin3
(require "rackunit-lin.rkt")
1 ) unused : err
(typecheck-fail (λ ([x : Bool]) #t) #:with-msg "linear vars unused: \\(x\\)")
2 ) used once : ok
(check-type (λ ([x : Bool]) x) : (→ Bool Bool))
3 ) used twice : err
(typecheck-fail (λ ([x : Bool]) (pair x x))
#:with-msg... |
4f5ff6574744f91d8587193ee47f7484b5e3817acb6913e994354c0d507d8485 | dinosaure/hxd | hxd.mli | * HeXDump library for OCaml .
The library provides the most abstract way to serialize
something to a human - readable { i hexdump } . It allows the
transmission of binary data in a ` mail - safe ' ASCII
representation and it can handle colors if the given
[ Format.formatter ] supports it ... | null | https://raw.githubusercontent.com/dinosaure/hxd/d9f7eb438874d6449b3d046a8736d3b62044fcfd/lib/hxd.mli | ocaml | * [set_style_renderer ppf mode] sets the style renderer of [ppf] to [mode].
* [lowercase c style] sets lowercase ASCII values to the style [style].
* [uppercase c style] sets uppercase ASCII values to the style [style].
* [digit c style] sets digit ASCII values to the style [style].
* [code c code style] sets a spe... | * HeXDump library for OCaml .
The library provides the most abstract way to serialize
something to a human - readable { i hexdump } . It allows the
transmission of binary data in a ` mail - safe ' ASCII
representation and it can handle colors if the given
[ Format.formatter ] supports it ... |
ddb77a847ad887b082656a4cff35ef8fe7e393e15ac37875ff2f14acabc67b56 | esl/MongooseIM | amp.erl | %% @doc Models and business logic for XEP-0079: Advanced Message Processing
This work was sponsored by Grindr LLC
< a href=" / extensions / xep-0079.html">XEP-0079</a >
@author < >
2014 Erlang Solutions , Ltd.
-module(amp).
-include("amp.hrl").
-include("mongoose.hrl").
-include("jlib.hrl").
-export([extr... | null | https://raw.githubusercontent.com/esl/MongooseIM/481774b6449215a70a99555a913e7e0c87bc40ce/src/amp.erl | erlang | @doc Models and business logic for XEP-0079: Advanced Message Processing
Value is binary here!
The lists are guaranteed to be non-empty and of equal
length by make_error_message/4
@doc We want to keep `client->server' AMPed messages,
but filter out `server->client' AMPed responses.
We can distinguish ... | This work was sponsored by Grindr LLC
< a href=" / extensions / xep-0079.html">XEP-0079</a >
@author < >
2014 Erlang Solutions , Ltd.
-module(amp).
-include("amp.hrl").
-include("mongoose.hrl").
-include("jlib.hrl").
-export([extract_requested_rules/1,
make_response/3,
make_error_response... |
c2d9e11823f43bb7ad7a8542d05818fcbc36f151aeb82baf6950e4a697fb41f9 | ephemient/aoc2018 | Day17Spec.hs | module Day17Spec (spec) where
import Day17 (day17a, day17b)
import Test.Hspec (Spec, describe, it, shouldBe)
spec :: Spec
spec = do
describe "part 1" $
it "examples" $
day17a sample `shouldBe` Just 57
describe "part 2" $
it "examples" $
day17b sample `shouldBe` Just 29
... | null | https://raw.githubusercontent.com/ephemient/aoc2018/eb0d04193ccb6ad98ed8ad2253faeb3d503a5938/test/Day17Spec.hs | haskell | module Day17Spec (spec) where
import Day17 (day17a, day17b)
import Test.Hspec (Spec, describe, it, shouldBe)
spec :: Spec
spec = do
describe "part 1" $
it "examples" $
day17a sample `shouldBe` Just 57
describe "part 2" $
it "examples" $
day17b sample `shouldBe` Just 29
... | |
5a428100a971de4f79fe39bbfd0835678764c0631b754380fa17426e10399a11 | hunt-framework/hunt | Utility.hs | # LANGUAGE BangPatterns #
{-# LANGUAGE EmptyDataDecls #-}
-- ----------------------------------------------------------------------------
{- |
General utitlity functions.
-}
-- ----------------------------------------------------------------------------
module Hunt.Utility
(
-- * Function Composition
(... | null | https://raw.githubusercontent.com/hunt-framework/hunt/d692aae756b7bdfb4c99f5a3951aec12893649a8/hunt-searchengine/src/Hunt/Utility.hs | haskell | # LANGUAGE EmptyDataDecls #
----------------------------------------------------------------------------
|
General utitlity functions.
----------------------------------------------------------------------------
* Function Composition
* Safe / Total Functions
* Strict Functions
* Monadic Functions
* Maybe He... | # LANGUAGE BangPatterns #
module Hunt.Utility
(
(.::), (.:::)
, head'
, foldM'
, foldlWithKeyM, foldrWithKeyM
, whenM
, catMaybesSet
, isLeft, isRight
, fromLeft, fromRight
, unbox, unboxM, isSingleton
, split
, partitionListByLength, partitionListByCount
, descending
, strip, ... |
9fb9e7f664b601cd0632b26a3e1ed5cb1c9afc31bfd5c2890a341799305008a1 | gadfly361/soda-ash | macros.clj | (ns soda-ash.macros)
(def semantic-ui-react-tags
'[Accordion
AccordionAccordion
AccordionContent
AccordionPanel
AccordionTitle
Advertisement
Breadcrumb
BreadcrumbDivider
BreadcrumbSection
Button
ButtonContent
ButtonGroup
ButtonOr
Card
CardContent
CardDescr... | null | https://raw.githubusercontent.com/gadfly361/soda-ash/0f8ad324eecb95b27aa0152d8117ab7646a51d77/src/soda_ash/macros.clj | clojure | ref (don't include) | (ns soda-ash.macros)
(def semantic-ui-react-tags
'[Accordion
AccordionAccordion
AccordionContent
AccordionPanel
AccordionTitle
Advertisement
Breadcrumb
BreadcrumbDivider
BreadcrumbSection
Button
ButtonContent
ButtonGroup
ButtonOr
Card
CardContent
CardDescr... |
c90ca4a29b955696bc667ef1fc89062f28dc332154d4303f5bb5e76500be2072 | con-kitty/categorifier-c | Class.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
| A toolkit like " " that is aware of C language representation issues .
--
... | null | https://raw.githubusercontent.com/con-kitty/categorifier-c/a34ff2603529b4da7ad6ffe681dad095f102d1b9/Categorifier/C/CTypes/CGeneric/Class.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE RankNTypes #
This module is intended to be imported qualified, e.g. as @CG@.
* Generic representation of types that can be generated to C code
** Primitive types
** Arrays
** Enumerations
** Providing field names
* Tools for instance-writers
** Implementing primitive in... | # LANGUAGE DataKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE PolyKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
| A toolkit like " " that is aware of C language representation issues .
For an example of how to use this toolkit to operate generically... |
b8ff367133c5820870c8317615a1be5a9e6f515e81e6b4ca220de3384ecf2e4c | ndmitchell/supero | Church.hs |
We want to church encode everything but Int / Integer
Primitives such as EQ_W return though , so we introduce :
bool _ x f t = case x of
True - > t
False - > f
We want to church encode everything but Int/Integer
Primitives such as EQ_W return Bool though, so we introd... | null | https://raw.githubusercontent.com/ndmitchell/supero/a8b16ea90862e2c021bb139d7a7e9a83700b43b2/Dead/Church.hs | haskell |
We want to church encode everything but Int / Integer
Primitives such as EQ_W return though , so we introduce :
bool _ x f t = case x of
True - > t
False - > f
We want to church encode everything but Int/Integer
Primitives such as EQ_W return Bool though, so we introd... | |
647e1d63136d7ddfd1df3212a0d9751edf74608cec9278db9f80c758281bae09 | GrammaticalFramework/gf-core | Commands2.hs | # LANGUAGE FlexibleInstances , UndecidableInstances #
module GF.Command.Commands2 (
PGFEnv,HasPGFEnv(..),pgf,concs,pgfEnv,emptyPGFEnv,pgfCommands,
options, flags,
) where
GHC 8.4.1 clash with Text . PrettyPrint
import PGF2
import qualified PGF as H
import GF.Compile.ToAPI(exprToAPI)
import GF.Infra.UseIO(write... | null | https://raw.githubusercontent.com/GrammaticalFramework/gf-core/9b4f2dd18b64b770aaebfa1885085e8e3447f119/src/compiler/GF/Command/Commands2.hs | haskell | ("probs","file with biased probabilities for generation")
["gfo", "src", "no-cpu", "cpu", "quiet", "verbose"]
("src", "force compilation from source"),
("v", "be verbose - show intermediate status information")
pgf
("pt", emptyCommandInfo {
longname = "put_tree",
syntax = "pt OPT? TREE... | # LANGUAGE FlexibleInstances , UndecidableInstances #
module GF.Command.Commands2 (
PGFEnv,HasPGFEnv(..),pgf,concs,pgfEnv,emptyPGFEnv,pgfCommands,
options, flags,
) where
GHC 8.4.1 clash with Text . PrettyPrint
import PGF2
import qualified PGF as H
import GF.Compile.ToAPI(exprToAPI)
import GF.Infra.UseIO(write... |
ab08c6b07c59e2a3c8457d7788101d8e5d098bc9036a2fc21795099664dd911e | GaloisInc/macaw | Panic.hs | # LANGUAGE TemplateHaskell #
module Data.Macaw.ARM.Panic (
P.panic
, Component(..)
) where
import qualified Panic as P
data Component = AArch32Eval
deriving (Show)
instance P.PanicComponent Component where
panicComponentName = show
panicComponentIssues _ = ""
panicComponentRevision = $(P.useGitRevisi... | null | https://raw.githubusercontent.com/GaloisInc/macaw/9ce3d43188f42937593155a6c6fd26bdba0c6cc0/macaw-aarch32/src/Data/Macaw/ARM/Panic.hs | haskell | # LANGUAGE TemplateHaskell #
module Data.Macaw.ARM.Panic (
P.panic
, Component(..)
) where
import qualified Panic as P
data Component = AArch32Eval
deriving (Show)
instance P.PanicComponent Component where
panicComponentName = show
panicComponentIssues _ = ""
panicComponentRevision = $(P.useGitRevisi... | |
e804e8719681ac94fdb8f316a07ac80af148d4f35d6704b15340b7d51f72c587 | nitrogen/NitrogenProject.com | demos_mobile_collapsibles.erl | % vim: ts=4 sw=4 et
-module (demos_mobile_collapsibles).
-include_lib ("nitrogen_core/include/wf.hrl").
-compile(export_all).
main() -> #template { file="./templates/demosmobile.html" }.
title() -> "Mobile Collapsibles".
headline() -> "Mobile Collapsibles".
body() ->
[
"
<p>
Collapsible... | null | https://raw.githubusercontent.com/nitrogen/NitrogenProject.com/b4b3a0dbe17394608d2ee6eaa089e3ece1285075/src/demos/demos_mobile_collapsibles.erl | erlang | vim: ts=4 sw=4 et | -module (demos_mobile_collapsibles).
-include_lib ("nitrogen_core/include/wf.hrl").
-compile(export_all).
main() -> #template { file="./templates/demosmobile.html" }.
title() -> "Mobile Collapsibles".
headline() -> "Mobile Collapsibles".
body() ->
[
"
<p>
Collapsibles allow us to add to... |
4e9637bc4efb2d3db07e0bc9d4abd80a09775d0b3a83b836acc31742193c5626 | immutant/immutant | coercions_test.clj | Copyright 2014 - 2017 Red Hat , Inc , and individual contributors .
;;
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 ... | null | https://raw.githubusercontent.com/immutant/immutant/6ff8fa03acf73929f61f2ca75446cb559ddfc1ef/core/test/immutant/coercions_test.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permiss... | Copyright 2014 - 2017 Red Hat , Inc , and individual contributors .
distributed under the License is distributed on an " AS IS " BASIS ,
(ns immutant.coercions-test
(:require [clojure.test :refer :all]
[immutant.coercions :refer :all])
(:import [java.util Date Calendar]))
(def since-epoch 13687794... |
47f930146d21533db7cf18d648fac3420bfd13b05ff9f3339ca06ebd81fd208a | nuprl/gradual-typing-performance | info.rkt | #lang info
(define compile-omit-files '("tests"))
| null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/scribble-lib/help/info.rkt | racket | #lang info
(define compile-omit-files '("tests"))
| |
9419d017508f1a8a09eca8c8a1af0b12b789faef0cf9b6197a07d52083c130c8 | ocsigen/js_of_ocaml | bdd.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocsigen/js_of_ocaml/58210fabc947c4839b6e71ffbbf353a4ede0dbb7/benchmarks/sources/ml/bdd.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : bdd.ml 7017 2005 - 08 - 12 09... |
bc7265314c540fd069c7e9765e5f18b0da8ddd7e5e986bfeaf98aa54252cfb2c | RefactoringTools/wrangler | edoc_args.erl | %% =====================================================================
%% This library is free software; you can redistribute it and/or modify
%% it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation ; either version 2 of the
%% License, or (at your option) any lat... | null | https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/src/behaviour_extraction/edoc_args.erl | erlang | =====================================================================
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, ... | published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307
USA
The Initial Developer of the Original Code is
Portions created by are Copyright 2003 - 2006 ... |
e5bec04a76c6994be031a2c475136bcc05258c36b9c3f3e5fc2ccf4c47b7533f | sjshuck/hs-pcre2 | TH.hs | {-# LANGUAGE TemplateHaskellQuotes #-}
module Text.Regex.Pcre2.Foreign.TH where
import Foreign (Ptr)
import Language.Haskell.TH
{-
For example,
constant ''CInt "ERROR_NOMATCH"
will produce
foreign import capi unsafe "pcre2.h value PCRE2_ERROR_NOMATCH"
pcre2_ERROR_NOMATCH :: CInt
-}
constant :... | null | https://raw.githubusercontent.com/sjshuck/hs-pcre2/b6785626740b683e317ebf5d92191d564fec1108/src/hs/Text/Regex/Pcre2/Foreign/TH.hs | haskell | # LANGUAGE TemplateHaskellQuotes #
For example,
constant ''CInt "ERROR_NOMATCH"
will produce
foreign import capi unsafe "pcre2.h value PCRE2_ERROR_NOMATCH"
pcre2_ERROR_NOMATCH :: CInt
For example,
getter "callout_block" [t| CUInt |] "version"
will produce
foreign import capi unsafe "getters.h" pc... |
module Text.Regex.Pcre2.Foreign.TH where
import Foreign (Ptr)
import Language.Haskell.TH
constant :: Name -> String -> DecsQ
constant typeName suffix = return [dec] where
dec = ForeignD $ ImportF CApi Unsafe str name ty
str = "pcre2.h value PCRE2_" ++ suffix
name = mkName $ "pcre2_" ++ suffix... |
79724c4570286e02fad38016da944b7612797a2fe79cce6f6f155862f4e0e52f | EvoLogics/evins | mod_sdm.erl | Copyright ( c ) 2016 , < >
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions
%% are met:
1 . Redistributions of source code must retain the above copyright
%% notice, this list of conditions and the following disc... | null | https://raw.githubusercontent.com/EvoLogics/evins/80401c36601425e302f68f189d9d2e344c7598a7/src/mod_sdm.erl | erlang |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer in the
documentation and/or othe... | Copyright ( c ) 2016 , < >
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . The name of the author may not be used to endorse or promote products
GNU General Public License ( " GPL " ) version 2 as published by the ... |
731a4f342b09d797c3255d0ae915633a663f96751e9955b89a6e35682b76bfcf | re-ops/re-core | provider.clj | (ns lxc.provider
"LXC provider for re-core"
(:require
[taoensso.timbre :as timbre]
[lxc.client :as lxc]
[lxc.sync :refer (sync-node)]
[re-core.model :refer (vconstruct hypervisor* hypervisor sconstruct)]
[re-core.provider :refer (selections mappings transform wait-for-ssh os->template into-mb into-de... | null | https://raw.githubusercontent.com/re-ops/re-core/e13490aedd6d34ff01f11b28adf359beb5c0bb5b/src/lxc/provider.clj | clojure | (ns lxc.provider
"LXC provider for re-core"
(:require
[taoensso.timbre :as timbre]
[lxc.client :as lxc]
[lxc.sync :refer (sync-node)]
[re-core.model :refer (vconstruct hypervisor* hypervisor sconstruct)]
[re-core.provider :refer (selections mappings transform wait-for-ssh os->template into-mb into-de... | |
38e4f42a45b51fd66471d1a0ccd990fffed3fbc64bdd6ed18dfe041616c5fcac | plewto/Cadejo | undo_stack.clj | (ns cadejo.ui.util.undo-stack
"Provides undo/redo stack with associated JButton"
(:require [seesaw.core :as ss])
(:require [cadejo.util.user-message :as umsg])
(:require [cadejo.ui.util.lnf :as lnf])
(:require [cadejo.config])
(:import javax.swing.SwingConstants))
(defprotocol UndoStack
(max-depth
... | null | https://raw.githubusercontent.com/plewto/Cadejo/2a98610ce1f5fe01dce5f28d986a38c86677fd67/src/cadejo/ui/util/undo_stack.clj | clojure | (ns cadejo.ui.util.undo-stack
"Provides undo/redo stack with associated JButton"
(:require [seesaw.core :as ss])
(:require [cadejo.util.user-message :as umsg])
(:require [cadejo.ui.util.lnf :as lnf])
(:require [cadejo.config])
(:import javax.swing.SwingConstants))
(defprotocol UndoStack
(max-depth
... | |
9d9528656be8f3139ef2224b3f85fe3055cb9737186c6cacbdfa4efdf7642be9 | donaldsonjw/bigloo | object.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / comptime / Expand / object.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Expand/object.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* The Object expanders */
*===========================... | * serrano / prgm / project / bigloo / comptime / Expand / object.scm * /
* Author : * /
* Creation : Fri May 3 10:13:58 1996 * /
* Last change : Sat Nov 7 09:39:05 2015 ( serrano ) * /
* Co... |
9e3ab2b99cff0fd784029c8fbd42ef1a916a035de179f4d63bae3f3b5547abc6 | eproxus/meck | meck.erl | %%%============================================================================
Copyright 2010 - 2017 , 2010 - 2011 Erlang Solutions 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 L... | null | https://raw.githubusercontent.com/eproxus/meck/3efce27e01fcb442f0ec7dc3af587745510fdc19/src/meck.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, either expr... | Copyright 2010 - 2017 , 2010 - 2011 Erlang Solutions Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
2010 - 2017 , 2010 - 2011 Erlang Solutions Ltd
@doc Module mocking library for Erlang .
-m... |
1826b478685ff1a689a0fafdaacf4ba93c7613c05b005f38d71f58977cfcc241 | nasser/magic | delays.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/nasser/magic/7a46f773bc7785c82d9527d52c1a8c28ac16e195/tests/clojure/test_clojure/delays.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns clojure.test-clojure.delays
(:use clojure.test)
DM : Added
Copied from reducers.clj , modified compile - if to compile - when
(defmacro ^:private compile-when
[exp & body]
(when (try (eval exp)
`(do ~@body)))
(deftest calls-once
(let [a (atom 0)
... |
3f305ae4b6942650e9b092fec4963cc2695b9f3a595accc0fb916c9e329fe5f0 | linkfluence/inventory | common.clj | (ns com.linkfluence.inventory.ovh.common
(:require [clj-time.core :as t]
[chime :refer [chime-at]]
[clj-time.periodic :refer [periodic-seq]]
[clojure.string :as str]
[clojure.tools.logging :as log]
[com.linkfluence.utils :as u]
[ovh.core :as ovh]... | null | https://raw.githubusercontent.com/linkfluence/inventory/b69110494f8db210d14cc7093834c441440cd4e8/src/clj/com/linkfluence/inventory/ovh/common.clj | clojure | init | (ns com.linkfluence.inventory.ovh.common
(:require [clj-time.core :as t]
[chime :refer [chime-at]]
[clj-time.periodic :refer [periodic-seq]]
[clojure.string :as str]
[clojure.tools.logging :as log]
[com.linkfluence.utils :as u]
[ovh.core :as ovh]... |
284d877092d01f58769fe59d232fe27bf94d5c3aa7e83351b0d8147102eb073d | theodormoroianu/SecondYearCourses | HaskellChurch_20210415163525.hs | {-# LANGUAGE RankNTypes #-}
module HaskellChurch where
A boolean is any way to choose between two alternatives
newtype CBool = CBool {cIf :: forall t. t -> t -> t}
An instance to show as regular Booleans
instance Show CBool where
show b = "cBool " <> show (cIf b True False)
The boolean constant true always ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurch_20210415163525.hs | haskell | # LANGUAGE RankNTypes #
The boolean negation switches the alternatives
The boolean conjunction can be built as a conditional
The boolean disjunction can be built as a conditional
a pair is a way to compute something based on the values
contained within the pair.
a function to be applied on the values, it will apply i... | module HaskellChurch where
A boolean is any way to choose between two alternatives
newtype CBool = CBool {cIf :: forall t. t -> t -> t}
An instance to show as regular Booleans
instance Show CBool where
show b = "cBool " <> show (cIf b True False)
The boolean constant true always chooses the first alternativ... |
ee1a3f07675362778cf31272c1e63ad615c920b72d3a5b165278e906d4fbde18 | nuprl/gradual-typing-performance | graph-traversal.rkt | #lang racket
(provide
;; Image
;; connected graph
the-graph
the-cyclic
simple-graph)
(require "ysupport.rkt" slideshow)
(def/dots A B C D E F G)
(define width 600)
(define height 200)
(define Yhigh 10)
(define Ylow (- height (pict-height A) 10))
(define X0 10)
(define Xdelt... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/htdp/base/Images/graph-traversal.rkt | racket | Image
connected graph
| #lang racket
(provide
the-graph
the-cyclic
simple-graph)
(require "ysupport.rkt" slideshow)
(def/dots A B C D E F G)
(define width 600)
(define height 200)
(define Yhigh 10)
(define Ylow (- height (pict-height A) 10))
(define X0 10)
(define Xdelta 180)
(define arr-wgt 10)
(de... |
c135d82ae36319133ce8e3bb698dc52a64ee35b499b7497d49511ac9c19337bf | krukow/calabash-script | convert.cljs | (ns calabash-script.convert)
(defn point->map
[rect]
(if-let [point (.-origin rect)]
{:x (.-x point) :y (.-y point)}
{}
))
(defn size->map
[rect]
(if-let [size (.-size rect)]
{:width (.-width size) :height (.-height size)}
{}))
(defn uia->map
[uia-el]
(let [rect (if-let [rect (.rect u... | null | https://raw.githubusercontent.com/krukow/calabash-script/7e54beab5aa83087c7b52a55eca3d1828d2d0f36/src/cljs/calabash_script/convert.cljs | clojure | (ns calabash-script.convert)
(defn point->map
[rect]
(if-let [point (.-origin rect)]
{:x (.-x point) :y (.-y point)}
{}
))
(defn size->map
[rect]
(if-let [size (.-size rect)]
{:width (.-width size) :height (.-height size)}
{}))
(defn uia->map
[uia-el]
(let [rect (if-let [rect (.rect u... | |
bc5977460d32faaea7ce4777a53b93738599e03a995bd1701695780a1e4993b5 | wdebeaum/step | validate.lisp | ;;;;
;;;; W::validate
;;;;
(define-words :pos W::v
:words (
(W::validate
(wordfeats (W::morph (:forms (-vb) :nom w::validation)))
(SENSES
((meta-data :origin calo :entry-date 20031230 :change-date nil :comments html-purchasing-corpus)
(LF-PARENT ONT::evaluate) ;scrutiny)
(SEM (F::Aspect F::unbo... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/validate.lisp | lisp |
W::validate
scrutiny) |
(define-words :pos W::v
:words (
(W::validate
(wordfeats (W::morph (:forms (-vb) :nom w::validation)))
(SENSES
((meta-data :origin calo :entry-date 20031230 :change-date nil :comments html-purchasing-corpus)
(SEM (F::Aspect F::unbounded) (F::Time-span F::extended))
(TEMPL agent-neutral-xp-templ... |
48253417d154ef3d17816151a81b28627b04f02bf87b3c3a39f8d68495b7ac08 | cosmos72/hyperluminal-mem | int.lisp | ;; -*- lisp -*-
;; This file is part of Hyperluminal-mem.
Copyright ( c ) 2013 - 2015
;;
;; This library is free software: you can redistribute it and/or
modify it under the terms of the Lisp Lesser General Public License
;; (), known as the LLGPL.
;;
;; This library is distributed in the hope that it will be us... | null | https://raw.githubusercontent.com/cosmos72/hyperluminal-mem/29c23361260e3a94fb1e09f3fdeab469b035504d/mem/int.lisp | lisp | -*- lisp -*-
This file is part of Hyperluminal-mem.
This library is free software: you can redistribute it and/or
(), known as the LLGPL.
This library 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 PU... |
Copyright ( c ) 2013 - 2015
modify it under the terms of the Lisp Lesser General Public License
(in-package :hyperluminal-mem)
(enable-#?-syntax)
(deftype mem-int () `( signed-byte ,+mem-int/bits+))
(deftype mem-uint () `(unsigned-byte ,+mem-int/value-bits+))
deferred from fast-mem.lisp , it nee... |
00df3cd0fadfdd2fe77d13ef14a435a263578d8a3171e33c4edc9413844ae8e1 | art-w/ocaml-webdriver | webdriver_sig.ml | module type HTTP_CLIENT = sig
type 'a t
val return : 'a -> 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val bind : ('a -> 'b t) -> 'a t -> 'b t
(** Interactions may raise exceptions: *)
val fail : exn -> 'a t
val catch : (unit -> 'a t) -> (exn -> 'a t) -> 'a t
(** The following HTTP methods are requir... | null | https://raw.githubusercontent.com/art-w/ocaml-webdriver/653193288647a87aadeb01de7ddbae4e400c041c/src/webdriver_sig.ml | ocaml | * Interactions may raise exceptions:
* The following HTTP methods are required:
* [get url] returns the body of the response.
* [post url body] returns the body of the response.
The [Content-Type] header should be [application/json].
* [delete url] returns the body of the response.
* browser specific failure... | module type HTTP_CLIENT = sig
type 'a t
val return : 'a -> 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val bind : ('a -> 'b t) -> 'a t -> 'b t
val fail : exn -> 'a t
val catch : (unit -> 'a t) -> (exn -> 'a t) -> 'a t
val get : string -> string t
val post : string -> string -> string t
val delet... |
34ce5007c465c89ccaa6ab7e391409ce89f93f30286ef76fb6d17ea24afbfe8f | clj-commons/aleph | project.clj | you 'll need to run the script at ` deps / lein - to - deps ` after changing any dependencies
(def netty-version "4.1.89.Final")
(defproject aleph (or (System/getenv "PROJECT_VERSION") "0.6.1")
:description "A framework for asynchronous communication"
:url "-commons/aleph"
:license {:name "MIT License"}
:dep... | null | https://raw.githubusercontent.com/clj-commons/aleph/5e85f591a1dd55a1bef537fa369a0e92d08f0f14/project.clj | clojure | This is for self-generating certs for testing ONLY: | you 'll need to run the script at ` deps / lein - to - deps ` after changing any dependencies
(def netty-version "4.1.89.Final")
(defproject aleph (or (System/getenv "PROJECT_VERSION") "0.6.1")
:description "A framework for asynchronous communication"
:url "-commons/aleph"
:license {:name "MIT License"}
:dep... |
7006027edb35aa76f140aa730c3c3d7279c172f8d39e6c48a3948b640dcfdf29 | careercup/CtCI-6th-Edition-Clojure | core.clj | (ns lib.core)
(defn map-all [f c1 c2]
"like 3-arity map, but continues to consume until all are exhausted. nil's are passed for exhausted lists."
(lazy-seq
(let [s1 (seq c1) s2 (seq c2)]
(when (or s1 s2)
(cons (f (first s1) (first s2))
(map-all f (rest s1) (rest s2)))))))
| null | https://raw.githubusercontent.com/careercup/CtCI-6th-Edition-Clojure/ef151b94978af82fb3e0b1b0cd084d910870c52a/src/lib/core.clj | clojure | (ns lib.core)
(defn map-all [f c1 c2]
"like 3-arity map, but continues to consume until all are exhausted. nil's are passed for exhausted lists."
(lazy-seq
(let [s1 (seq c1) s2 (seq c2)]
(when (or s1 s2)
(cons (f (first s1) (first s2))
(map-all f (rest s1) (rest s2)))))))
| |
b7b173a057de3e7235374a3976e5d890bfcdc69ba1a37423d68c6423c2762345 | Bogdanp/racket-http-easy | logger.rkt | #lang racket/base
(provide
http-easy-logger
log-http-easy-debug
log-http-easy-info
log-http-easy-warning
log-http-easy-error)
(define-logger http-easy)
| null | https://raw.githubusercontent.com/Bogdanp/racket-http-easy/630a982a282a51fd7fd85dc5e2f3f581c564b5e4/http-easy-lib/http-easy/private/logger.rkt | racket | #lang racket/base
(provide
http-easy-logger
log-http-easy-debug
log-http-easy-info
log-http-easy-warning
log-http-easy-error)
(define-logger http-easy)
| |
e453421702a95e8f789d965c52e07c8ce0863df5fb61f6894c766dacc81c9543 | okeuday/erlbench | string_key.erl | -*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*-
ex : set utf-8 sts=4 ts=4 sw=4 et :
% Data Structures For String (List of Integers) Keys
% rbdict/aadict taken from:
%
% trie taken from:
%
% run:
% erlc rbdict.erl
% erlc aadict.erl
% erlc trie.erl
% erlc string_... | null | https://raw.githubusercontent.com/okeuday/erlbench/9fc02a2e748b287b85f6e9641db6b2ca68791fa4/src/string_key.erl | erlang | Data Structures For String (List of Integers) Keys
rbdict/aadict taken from:
trie taken from:
run:
erlc rbdict.erl
erlc aadict.erl
erlc trie.erl
erlc string_key.erl
erl -noshell -s string_key test -s init stop
data10(N) ->
hasht:new(N).
data11(N) ->
hashtl2:new(N).
data12(N) ->
data13(N) ->
orddict... | -*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*-
ex : set utf-8 sts=4 ts=4 sw=4 et :
-module(string_key).
-export([test/0, test/1, get/3, get_concurrent/2, set/3]).
-include("erlbench.hrl").
-define(WORDLIST, "data/words").
data1(_) ->
gb_trees:empty().
... |
04fedf3935ef9d051a7284108d204379bdc87986de93a7a0cf9319dcdd5cda6d | jeapostrophe/exp | mame.rkt | #!/usr/bin/env racket
#lang racket/base
(require racket/file
racket/match
racket/system
racket/list)
(define mame-dir "/Users/jay/Downloads/Video Games/Arcade/mame0201-64bit")
(define roms-dir (build-path mame-dir "roms"))
(define last-path (build-path mame-dir "last.rktd"))
(define games
... | null | https://raw.githubusercontent.com/jeapostrophe/exp/43615110fd0439d2ef940c42629fcdc054c370f9/bin/mame.rkt | racket | "ddpdfk" | #!/usr/bin/env racket
#lang racket/base
(require racket/file
racket/match
racket/system
racket/list)
(define mame-dir "/Users/jay/Downloads/Video Games/Arcade/mame0201-64bit")
(define roms-dir (build-path mame-dir "roms"))
(define last-path (build-path mame-dir "last.rktd"))
(define games
... |
3326e7d038cff39286b517337bd5bc3470736cbeda3208b7ceb103b101b0a8b1 | FreeProving/free-compiler | Descriptors.hs | -- | This module contains descriptors for the command line options that are
-- understood by the command line option parser
-- (see "FreeC.Application.Options.Parser").
module FreeC.Application.Options.Descriptors where
import System.Console.GetOpt
import FreeC.Application.Options
import ... | null | https://raw.githubusercontent.com/FreeProving/free-compiler/6931b9ca652a185a92dd824373f092823aea4ea9/src/exe/FreeC/Application/Options/Descriptors.hs | haskell | | This module contains descriptors for the command line options that are
understood by the command line option parser
(see "FreeC.Application.Options.Parser").
command line options understood by the command line option parser. | module FreeC.Application.Options.Descriptors where
import System.Console.GetOpt
import FreeC.Application.Options
import FreeC.Backend
import FreeC.Frontend
| The command line option descriptors from the @GetOpt@ library for the
optionDescriptors :: [OptDescr (Options -> Opti... |
afe8e4a85f3fba614ed4786a1242ded0b1e17760596e9a5045933427f9ff15e1 | askvortsov1/nittany_market | rating.mli | module Rating: sig
type t = {
buyer_email : string;
seller_email : string;
date : string;
rating : int;
rating_desc : string;
}
type fields = (string * string * string * int) * string
include Model_intf.Model with type t := t and type fields := fields
end
modu... | null | https://raw.githubusercontent.com/askvortsov1/nittany_market/08ffcad2bb2ead9aaeb85b22b88aa2af879e36ad/lib/models/rating.mli | ocaml | module Rating: sig
type t = {
buyer_email : string;
seller_email : string;
date : string;
rating : int;
rating_desc : string;
}
type fields = (string * string * string * int) * string
include Model_intf.Model with type t := t and type fields := fields
end
modu... | |
e37673ecc63a129036f4b6ca54562cf60c3c1782f0cac72c48e10911ea42b1a6 | elizabethsiegle/reddit-slack-bot | Call.hs | # LANGUAGE MultiParamTypeClasses #
{-#LANGUAGE OverloadedStrings #-}
# LANGUAGE ViewPatterns #
module Twilio.Call
( -- * Resource
Call(..)
, CallSID
, Twilio.Call.get
-- * Types
, AnsweredBy(..)
, CallDirection(..)
, CallStatus(..)
) where
import Control.Applicative
import Control.Error.Safe
imp... | null | https://raw.githubusercontent.com/elizabethsiegle/reddit-slack-bot/a52ab60dcaae8e16bee8cdba22fce627157a42d8/twilio-haskell-move-to-stack/src/Twilio/Call.hs | haskell | #LANGUAGE OverloadedStrings #
* Resource
* Types
"date_created" is initially null
"date_updated" is initially null
"start_time" is initially null
| Get a 'Call' by 'CallSID'.
Types | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE ViewPatterns #
module Twilio.Call
Call(..)
, CallSID
, Twilio.Call.get
, AnsweredBy(..)
, CallDirection(..)
, CallStatus(..)
) where
import Control.Applicative
import Control.Error.Safe
import Control.Monad
import Control.Monad.Catch
import Data.Aeson
impo... |
b180cad2039f4db35537bb22f69c4e24e7e80d35c0fefc8671f15c8994d1e24c | clojure-interop/google-cloud-clients | InstanceAdminSettings$Builder.clj | (ns com.google.cloud.spanner.admin.instance.v1.InstanceAdminSettings$Builder
"Builder for InstanceAdminSettings."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.spanner.admin.instance.v1 InstanceAdminSettings$Builder]))
(defn delete-instance-settings
"Returns the builder for the se... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.spanner/src/com/google/cloud/spanner/admin/instance/v1/InstanceAdminSettings%24Builder.clj | clojure | (ns com.google.cloud.spanner.admin.instance.v1.InstanceAdminSettings$Builder
"Builder for InstanceAdminSettings."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.spanner.admin.instance.v1 InstanceAdminSettings$Builder]))
(defn delete-instance-settings
"Returns the builder for the se... | |
7edfdac0a31e931508f0e0341bea0dc2fca17244cfcdb9522062e4c644d874a3 | bnoordhuis/chicken-core | srfi-13.import.scm | srfi-13.import.scm - import library for " srfi-13 " module
;
Copyright ( c ) 2008 - 2013 , The Chicken Team
; All rights reserved.
;
; 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... | null | https://raw.githubusercontent.com/bnoordhuis/chicken-core/56d30e3be095b6abe1bddcfe10505fa726a43bb5/srfi-13.import.scm | scheme |
All rights reserved.
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.
Redistributio... | srfi-13.import.scm - import library for " srfi-13 " module
Copyright ( c ) 2008 - 2013 , The Chicken Team
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS
CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
CONSEQUENTIAL DAMAGES... |
ca8555314a9862836e4714dfaf2de2d4cb5f318ddcb7de3e872fef8dca5924c2 | input-output-hk/cardano-sl | TCP.hs | -- | Convenient TCP transport acquire and release with common configuration
-- options.
module Pos.Infra.Diffusion.Transport.TCP
( bracketTransportTCP
) where
import Universum hiding (bracket)
import Control.Exception (bracket, throwIO)
import Data.Time.Units (Microsecond)
impor... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/infra/src/Pos/Infra/Diffusion/Transport/TCP.hs | haskell | | Convenient TCP transport acquire and release with common configuration
options.
| Bracket a TCP transport with
- Given connection timeout in us
- Given address (possibly unaddressable)
- A fair QDisc
- Optionally check the peer host against resolved host, which prevents easy
denial-of-service att... |
module Pos.Infra.Diffusion.Transport.TCP
( bracketTransportTCP
) where
import Universum hiding (bracket)
import Control.Exception (bracket, throwIO)
import Data.Time.Units (Microsecond)
import Formatting (sformat, shown, (%))
import Network.QDisc.Fair (fairQ... |
d50a0bacd40e1e364cc5ac1ac5e36eea0ab5aa5be54b961b6c150271be23ca9c | oliyh/re-partee | cards.cljs | (ns re-partee.cards
(:require
[devcards.core]
[clojure.spec.test.alpha :as st]
[re-partee.all-tests]))
(st/instrument)
(devcards.core/start-devcard-ui!)
| null | https://raw.githubusercontent.com/oliyh/re-partee/8ab2b4301c518ee9448157f4249e33ad09ff2fc7/test/re_partee/cards.cljs | clojure | (ns re-partee.cards
(:require
[devcards.core]
[clojure.spec.test.alpha :as st]
[re-partee.all-tests]))
(st/instrument)
(devcards.core/start-devcard-ui!)
| |
6c237280c1f48205ba41330a2a86f25d93ceb17fc5d922928b690dc03c28b71d | basho/machi | file0.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2014 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You... | null | https://raw.githubusercontent.com/basho/machi/e87bd59a9777d805b00f9e9981467eb28e28390c/prototype/demo-day-hack/file0.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2007 - 2014 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
71521ad9e22151fbeec3e6b1d8768a67338a34cf66af6adb0ecdf7c1d9bdd44e | aggieben/weblocks | gen-doc.lisp |
(in-package :weblocks-scripts)
(export '(document-weblocks))
(defun compute-documentation-path ()
"Computes the directory where generated documentation should
reside."
(merge-pathnames
(make-pathname :directory '(:relative "docs" "gen"))
(make-pathname :directory
(pathname-directory (truename (asdf:sys... | null | https://raw.githubusercontent.com/aggieben/weblocks/8d86be6a4fff8dde0b94181ba60d0dca2cbd9e25/scripts/gen-doc.lisp | lisp | lazily load necessary systems
dynamically invoke 'document-system' (since reader has no access to tinaa) |
(in-package :weblocks-scripts)
(export '(document-weblocks))
(defun compute-documentation-path ()
"Computes the directory where generated documentation should
reside."
(merge-pathnames
(make-pathname :directory '(:relative "docs" "gen"))
(make-pathname :directory
(pathname-directory (truename (asdf:sys... |
0be6bf0d0124c4190c12dd3fcded0a66cda1a6329de6fddcfd0666a62cd6c2bb | DalekBaldwin/check-it | deterministic-tests.lisp | (in-package :check-it-test)
(in-root-suite)
(defsuite* deterministic-tests)
(deftest test-int-shrink ()
(loop for int in (list 5 20 100 300)
do
(is (= (shrink int #'int-tester) 5))))
(deftest test-list-shrink ()
(loop for size in (list 5 20 50 100)
do
(is (equal (shrink (make-list size... | null | https://raw.githubusercontent.com/DalekBaldwin/check-it/b79c9103665be3976915b56b570038f03486e62f/test/deterministic-tests.lisp | lisp | (in-package :check-it-test)
(in-root-suite)
(defsuite* deterministic-tests)
(deftest test-int-shrink ()
(loop for int in (list 5 20 100 300)
do
(is (= (shrink int #'int-tester) 5))))
(deftest test-list-shrink ()
(loop for size in (list 5 20 50 100)
do
(is (equal (shrink (make-list size... | |
f4a9f4ffccfc4600882f3702d7912185320a512865dfe1bb0f7b400a60aae7bc | CodyReichert/qi | lexenv.lisp | ;;;; -*- lisp -*-
(in-package :it.bese.arnesi)
;;;; * Portable lexical environment access
(defgeneric environment-p (environment)
(:documentation "Returns T if ENVIRONMENT is a lexical
environment object (something suitable for passing to
macroexpand-1 or similar)"))
(defgeneric lexical-variables (environment... | null | https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/arnesi-master/src/lexenv.lisp | lisp | -*- lisp -*-
* Portable lexical environment access
** OpenMCL
we now weed out all symbol-macros and ignored variables
ccl::var-name is a macro, se we can't do #'ccl::var-name directly
we now weed out all symbol-macros and ignored variables
convert the function name to a "real" function name
weed out all the mac... |
(in-package :it.bese.arnesi)
(defgeneric environment-p (environment)
(:documentation "Returns T if ENVIRONMENT is a lexical
environment object (something suitable for passing to
macroexpand-1 or similar)"))
(defgeneric lexical-variables (environment)
(:documentation "Return the names of all the local variab... |
e60df8faa4511a63c3503b8859ace7ad0b0d7f47154d1ceb9a0db9576d46a18b | mfikes/coal-mine | problem_144.cljc | (ns coal-mine.problem-144
(:require [coal-mine.checks :refer [defcheck-144] :rename {defcheck-144 defcheck}]
[clojure.test]))
(defn run-tests []
(clojure.test/run-tests 'coal-mine.problem-144))
(defn -main []
(run-tests))
#?(:cljs (set! *main-cli-fn* -main))
| null | https://raw.githubusercontent.com/mfikes/coal-mine/0961d085b37f4e59489a8cf6a2b8fef0a698d8fb/src/coal_mine/problem_144.cljc | clojure | (ns coal-mine.problem-144
(:require [coal-mine.checks :refer [defcheck-144] :rename {defcheck-144 defcheck}]
[clojure.test]))
(defn run-tests []
(clojure.test/run-tests 'coal-mine.problem-144))
(defn -main []
(run-tests))
#?(:cljs (set! *main-cli-fn* -main))
| |
22fed685c3a768c6209363d18e2f5d2a38e2aff7a6509b4ae8cd74b0c8e93dd0 | CodyReichert/qi | cffi-sbcl.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
cffi-sbcl.lisp --- CFFI - SYS implementation for SBCL .
;;;
Copyright ( C ) 2005 - 2006 , < >
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , ... | null | https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/cffi-master/src/cffi-sbcl.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
furnished to... | cffi-sbcl.lisp --- CFFI - SYS implementation for SBCL .
Copyright ( C ) 2005 - 2006 , < >
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDE... |
b5a7d75543c349fc6d6cee09d76e4264fa1b89e65fb24efdafe06f7bad0cf233 | xtdb/core2 | kd_tree.clj | (ns core2.temporal.kd-tree
(:require [core2.types :as t]
[core2.util :as util])
(:import core2.BitUtil
[java.io Closeable]
java.lang.ref.Cleaner
[java.util ArrayDeque List Queue]
java.util.concurrent.LinkedBlockingQueue
[java.util.function LongBinar... | null | https://raw.githubusercontent.com/xtdb/core2/3adeb391ca4dd73a3f79faba8024289376597d23/core/src/main/clojure/core2/temporal/kd_tree.clj | clojure | all of the implementations seem to take a defensive copy, rather than just incrementing the ref-counter. | (ns core2.temporal.kd-tree
(:require [core2.types :as t]
[core2.util :as util])
(:import core2.BitUtil
[java.io Closeable]
java.lang.ref.Cleaner
[java.util ArrayDeque List Queue]
java.util.concurrent.LinkedBlockingQueue
[java.util.function LongBinar... |
51837584c168945397e24f6908baa975dd1fc5af360732497230ecda94713d1d | RolfRolles/PandemicML | PEStructures.mli | exception Unimplemented of string
type mz_header =
{
+00 " MZ " or " ZM "
e_magic: int32;
+02 Count of Bytes in Last 512 - byte Page ( CBLP )
e_cblp: int32;
+04 Count of 512 - byte Pages ( CP )
e_cp: int32;
+06 Count of ReLoCation entries ( CRLC )
e_crlc: int32;
+08 Count of in HeaDeR ( CPARHDR... | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/PE32/Attic/PEStructures.mli | ocaml | +10 Initial SP (SP)
+14 Initial IP (IP)
+16 Initial CS (CS)
+18 Location (FAR) of ReLoCation table (LFARLC)
+1A OVerlay Number (OVNO)
+3C Location (Far) of NEW executable header (e_lfanew)
Need to look up OCaml's virtual method syntax
Specifically for an on-disk file
Returns as a *string*
+00
+08
... | exception Unimplemented of string
type mz_header =
{
+00 " MZ " or " ZM "
e_magic: int32;
+02 Count of Bytes in Last 512 - byte Page ( CBLP )
e_cblp: int32;
+04 Count of 512 - byte Pages ( CP )
e_cp: int32;
+06 Count of ReLoCation entries ( CRLC )
e_crlc: int32;
+08 Count of in HeaDeR ( CPARHDR... |
a11c34e71b8f61530126f7bc51db76ab1b3caf74bee648c4b5940abb7f17de1d | apibot-org/apibot | router.cljs | (ns apibot.router
"Implements a simple non-url based router, because the friggin
accountant/secretary crap doesn't work on electron.
The model is very simple. Every 'page' is represented as with a simbol
and a function. The symbol identifies the function. The function can have
any number of arguments (althou... | null | https://raw.githubusercontent.com/apibot-org/apibot/26c77c688980549a8deceeeb39f01108be016435/src/cljs/apibot/router.cljs | clojure | ---- Routes ----
---- History ----
---- Route Helpers ---- | (ns apibot.router
"Implements a simple non-url based router, because the friggin
accountant/secretary crap doesn't work on electron.
The model is very simple. Every 'page' is represented as with a simbol
and a function. The symbol identifies the function. The function can have
any number of arguments (althou... |
8d4574d09426f3440aac46c4618b35fbdbae9d6f4a65a40fb2f5a40f3ec5e64c | ryanpbrewster/haskell | sudoku.hs | -- sudoku.hs
- Sudoku is a number - based logic puzzle . It typically comprises of a 9 * 9 grid
- with digits so that each column , each row and each of the nine 3 * 3 sub - grids
- that compose the grid contains all the digits from 1 to 9 . For this
- challenge , you will be given an N*N grid populated wit... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/CodeEval/sudoku.hs | haskell | sudoku.hs |
- Sudoku is a number - based logic puzzle . It typically comprises of a 9 * 9 grid
- with digits so that each column , each row and each of the nine 3 * 3 sub - grids
- that compose the grid contains all the digits from 1 to 9 . For this
- challenge , you will be given an N*N grid populated with numbers fro... |
d23ec32a0aa72e4d628043c31a1c4943b8eddfb93ec61bfbb08b5a7072c6d4b9 | BU-CS320/Fall-2018 | Lang2Test.hs | module Lang2Test where
import Test.Tasty (testGroup)
import Test.Tasty.HUnit (assertEqual, assertBool, testCase)
import Test.Tasty.QuickCheck
import Lang2(Ast(AstInt,Plus,Separator,Print), eval)
import Lang2Parser(unsafeParser, parser)
-- note: probly could be better
instance Arbitrary Ast where
arb... | null | https://raw.githubusercontent.com/BU-CS320/Fall-2018/beec3ca88be5c5a62271a45c8053fb1b092e0af1/assignments/week7/hw/tests/Lang2Test.hs | haskell | note: probly could be better
TODO: your tests here
TODO: you should always be able to parse show
| module Lang2Test where
import Test.Tasty (testGroup)
import Test.Tasty.HUnit (assertEqual, assertBool, testCase)
import Test.Tasty.QuickCheck
import Lang2(Ast(AstInt,Plus,Separator,Print), eval)
import Lang2Parser(unsafeParser, parser)
instance Arbitrary Ast where
arbitrary = sized arbitrarySizedAst
... |
7f1e992d766c1238c5855defb3a86f996468304e996b3a8fe47890b6df9fba53 | helvm/helma | Expression.hs | module HelVM.HelMA.Automata.Zot.Expression where
import HelVM.HelIO.Control.Safe
import HelVM.HelIO.Containers.Extra
import HelVM.HelIO.Digit.Digitable
import HelVM.HelIO.Digit.ToDigit
import Control.Monad.Writer.Lazy
import qualified Data.DList as... | null | https://raw.githubusercontent.com/helvm/helma/36287506200d330cd6013a5517a8124380af5e97/hs/src/HelVM/HelMA/Automata/Zot/Expression.hs | haskell | | Types | module HelVM.HelMA.Automata.Zot.Expression where
import HelVM.HelIO.Control.Safe
import HelVM.HelIO.Containers.Extra
import HelVM.HelIO.Digit.Digitable
import HelVM.HelIO.Digit.ToDigit
import Control.Monad.Writer.Lazy
import qualified Data.DList as... |
b6407c83aec26ddddd055f6599e4375fb29d9cb656d6b8c23c01223fb7e8282b | huangz1990/SICP-answers | p48-average-damp.scm | p48-average-damp.scm
(load "p15-average.scm")
(define (average-damp f)
(lambda (x)
(average x
(f x))))
| null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp1/code/p48-average-damp.scm | scheme | p48-average-damp.scm
(load "p15-average.scm")
(define (average-damp f)
(lambda (x)
(average x
(f x))))
| |
d3d6acac774be9dc52295bb4fc2a07d3ce9234ad86fa3431013410b88fac56f5 | samth/tr-tutorial | 7.rkt | #lang typed/racket
;; A dice-rolling command-line utility
(command-line
#:args (#{dice : String} #{sides : String})
(for ([i (in-range (assert (string->number dice) exact-integer?))])
(displayln
(+ 1 (random (assert (string->number sides) exact-integer?)))))) | null | https://raw.githubusercontent.com/samth/tr-tutorial/3457df465921274f410bfa0ec0a623410fb22b47/7.rkt | racket | A dice-rolling command-line utility | #lang typed/racket
(command-line
#:args (#{dice : String} #{sides : String})
(for ([i (in-range (assert (string->number dice) exact-integer?))])
(displayln
(+ 1 (random (assert (string->number sides) exact-integer?)))))) |
20d6966b040619b408155b0535dc0177e1fb9e24d5ef47995f8d7abc03d8cfc5 | rosejn/Peer | presence.clj | (ns peer.presence
(:use [peer config]
[plasma util]
[lamina core]
[aleph udp]))
(def listeners* (ref {}))
(defn broadcast-addr
[]
"255.255.255.255")
(defn presence-channel
"Returns a channel that will receive all presence messages broadcast
on the local network."
([] (presence-cha... | null | https://raw.githubusercontent.com/rosejn/Peer/f79c39f5155def9de224207922658587fa576e2a/src/peer/presence.clj | clojure | (ns peer.presence
(:use [peer config]
[plasma util]
[lamina core]
[aleph udp]))
(def listeners* (ref {}))
(defn broadcast-addr
[]
"255.255.255.255")
(defn presence-channel
"Returns a channel that will receive all presence messages broadcast
on the local network."
([] (presence-cha... | |
a4d82ce0df36f518e2e988536ec505ee4eb425e44777530c0a1d1af898d76ff8 | madvas/emojillionaire | utils.cljs | (ns emojillionaire.utils
(:require
[ajax.core :refer [GET]]
[bidi.bidi :as bidi]
[cljs-time.coerce :refer [to-date-time to-long to-local-date-time]]
[cljs-time.core :refer [date-time to-default-time-zone]]
[cljs-time.format :as time-format]
[cljs-web3.core :as web3]
[cljs-web3.eth :as web3... | null | https://raw.githubusercontent.com/madvas/emojillionaire/ee47e874db0c88b91985b6f9e72221f12d3010ff/src/cljs/emojillionaire/utils.cljs | clojure | (ns emojillionaire.utils
(:require
[ajax.core :refer [GET]]
[bidi.bidi :as bidi]
[cljs-time.coerce :refer [to-date-time to-long to-local-date-time]]
[cljs-time.core :refer [date-time to-default-time-zone]]
[cljs-time.format :as time-format]
[cljs-web3.core :as web3]
[cljs-web3.eth :as web3... | |
27483feeac4e48c600e39e58bdc6d63bd16936c71901d282a0f70cf46e48aa8d | lindig/lua-ml | luacamllib.mli | module Make (TV : Lua.Lib.TYPEVIEW with type 'a t = 'a Luaiolib.t)
: Lua.Lib.USERCODE with type 'a userdata' = 'a TV.combined
| null | https://raw.githubusercontent.com/lindig/lua-ml/f79726b92f2822994207a83dbfed7ab140804de2/src/luacamllib.mli | ocaml | module Make (TV : Lua.Lib.TYPEVIEW with type 'a t = 'a Luaiolib.t)
: Lua.Lib.USERCODE with type 'a userdata' = 'a TV.combined
| |
9f8675bd1964d1092535ad3a86342a1da631b1a50d58af603b385d6b3c2a4bbc | zkessin/testing-erlang-book | never_match.erl | -module(never_match).
-compile(export_all).
-type component_id() ::binary().
-spec(get_component(component_id()) -> {ok,jsx:json_term()} | {error, not_found}).
get_component(Guid) ->
{ok, [{<<"test">>, <<"test">>}]}.
-spec(get_json_from_guid(component_id()) -> {ok,jsx:json_text()} | {error, not_found}).
get_json... | null | https://raw.githubusercontent.com/zkessin/testing-erlang-book/926d4d2766b2adf18a187b25cfb38a45093bb309/examples/src/never_match.erl | erlang | -module(never_match).
-compile(export_all).
-type component_id() ::binary().
-spec(get_component(component_id()) -> {ok,jsx:json_term()} | {error, not_found}).
get_component(Guid) ->
{ok, [{<<"test">>, <<"test">>}]}.
-spec(get_json_from_guid(component_id()) -> {ok,jsx:json_text()} | {error, not_found}).
get_json... | |
a92494d97f32333ac3155cce12f4e4cf4216d7621a348ab04430354f70eeaafe | chetmurthy/pa_ppx | test_self_import.ml | (* camlp5o *)
type t = [%import: Test_self_import.t]
module type S = [%import: (module Test_self_import.S)]
let validate_option = function
| `OptionA -> assert true
| `OptionB -> assert true
| _ -> assert false
let validate_module_type m =
let module M = (val m : S) in
assert (M.test () = "test")
| null | https://raw.githubusercontent.com/chetmurthy/pa_ppx/7c662fcf4897c978ae8a5ea230af0e8b2fa5858b/tests-ounit2/test_self_import.ml | ocaml | camlp5o |
type t = [%import: Test_self_import.t]
module type S = [%import: (module Test_self_import.S)]
let validate_option = function
| `OptionA -> assert true
| `OptionB -> assert true
| _ -> assert false
let validate_module_type m =
let module M = (val m : S) in
assert (M.test () = "test")
|
30bb078339a4e9730dd5efaea91bc8f0af74f3ce576231ae20174a8956267c0d | Viasat/halite | data_spec_bnf.clj | Copyright ( c ) 2022 Viasat , Inc.
Licensed under the MIT license
(ns com.viasat.halite.doc.data-spec-bnf)
(set! *warn-on-reflection* true)
(def type-bnf-vector
['fixed-decimal-scale {:bnf "0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18"}
'fixed-decimal-type {:bnf "'[' ':... | null | https://raw.githubusercontent.com/Viasat/halite/1145fdf49b5148acb389dd5100059b0d2ef959e1/src/com/viasat/halite/doc/data_spec_bnf.clj | clojure | Copyright ( c ) 2022 Viasat , Inc.
Licensed under the MIT license
(ns com.viasat.halite.doc.data-spec-bnf)
(set! *warn-on-reflection* true)
(def type-bnf-vector
['fixed-decimal-scale {:bnf "0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18"}
'fixed-decimal-type {:bnf "'[' ':... | |
b2b3d90316e1ab05c40588d8a0c1288e49175867ca00683e639282882b938b11 | acieroid/overscore | musicxml_test.clj | (ns overscore.musicxml-test
(:use clojure.test
overscore.musicxml))
(deftest test-note-descr
(is (= :C4
(note-descr
{:tag :note
:content [{:tag :pitch
:content [{:tag :step :content ["C"]}
{:tag :octave :content ["4"]}]}]})... | null | https://raw.githubusercontent.com/acieroid/overscore/71649b37c415482b6c4ab150290ef0719649d359/test/overscore/musicxml_test.clj | clojure | (ns overscore.musicxml-test
(:use clojure.test
overscore.musicxml))
(deftest test-note-descr
(is (= :C4
(note-descr
{:tag :note
:content [{:tag :pitch
:content [{:tag :step :content ["C"]}
{:tag :octave :content ["4"]}]}]})... | |
9dfc78c374705f5b8268c35a65fb784c12345023808e5c077528a8f91ab1aed2 | jacobstanley/hadoop-tools | Hdfs.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
module Data.Hadoop.Protobuf.Hdfs where
import Data.ByteString (ByteString)
import Data.ProtocolBuffers
import Data.ProtocolBuffers.Orphans ()
import Data.Text (Text)
import Data.Word (Word32, Word64)
import GHC.Generics (Generic)
import Data.Hadoop.Protobuf.Security
... | null | https://raw.githubusercontent.com/jacobstanley/hadoop-tools/8adc178a599d28f4ee3baedd34397e566f7b3fa6/hadoop-rpc/src/Data/Hadoop/Protobuf/Hdfs.hs | haskell | ----------------------------------------------------------------------
| Summary of a file or directory
----------------------------------------------------------------------
| Directory listing.
----------------------------------------------------------------------
| Status of a file, directory or symbolic link. Op... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
module Data.Hadoop.Protobuf.Hdfs where
import Data.ByteString (ByteString)
import Data.ProtocolBuffers
import Data.ProtocolBuffers.Orphans ()
import Data.Text (Text)
import Data.Word (Word32, Word64)
import GHC.Generics (Generic)
import Data.Hadoop.Protobuf.Security
... |
435a55a2c105419dc14de603ac45d9ee1d74dd28f73669f9062c25a00c5ab63b | freizl/dive-into-haskell | Fibonacci.hs | module Number.Fibonacci where
-- |
-- FROM:
import Data.List
-- | O(n) solution
fib1 n = fibs !! n
fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
-- | matrix solution
fib2 n = head (apply (Matrix [[0,1], [1,1]] ^ n) [0,1])
newtype Matrix a = Matrix [[a]] deriving (Eq, Show)
instance Num a => Num (Matrix a) where... | null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/codes/mylib/src/Number/Fibonacci.hs | haskell | |
FROM:
| O(n) solution
| matrix solution | module Number.Fibonacci where
import Data.List
fib1 n = fibs !! n
fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
fib2 n = head (apply (Matrix [[0,1], [1,1]] ^ n) [0,1])
newtype Matrix a = Matrix [[a]] deriving (Eq, Show)
instance Num a => Num (Matrix a) where
Matrix as + Matrix bs = Matrix (zipWith (zipWith (... |
be06ec5d7d56966dcf522fa837a9f8a809d25594f5ef44d1402aed47b0d6a141 | smahood/re-frame-conj-2016 | step10.cljs | (ns show.steps.step10
(:require
[reagent.core :as reagent]
[re-frame.core :as re-frame]
[re-frisk.core :as re-frisk]
[cljs.spec :as s]
[show.slides.views :as views]))
(declare slides)
(def initial-state
{:slideshow/current-slide 0})
(re-frame/reg-event-fx
:slideshow/next-slide
(fn [contex... | null | https://raw.githubusercontent.com/smahood/re-frame-conj-2016/51fe544a5f4e95f28c26995c11d64301ba9a2142/show/src/show/steps/step10.cljs | clojure | (ns show.steps.step10
(:require
[reagent.core :as reagent]
[re-frame.core :as re-frame]
[re-frisk.core :as re-frisk]
[cljs.spec :as s]
[show.slides.views :as views]))
(declare slides)
(def initial-state
{:slideshow/current-slide 0})
(re-frame/reg-event-fx
:slideshow/next-slide
(fn [contex... | |
8f95e196607cef2d4141078be5358c2c2cf498fc498019f782a5e64ef1403a6c | BranchTaken/Hemlock | option.mli | (** Option type.
The {!type:option} type is useful when a value may or may not be present; [Some value] or
[None], respectively. *)
* { 1 Type }
Our option type must be an alias of 's , lest optional function arguments * be incompatible
* with our option type .
* with our option type. *)
type 'a t = '... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/25a3fce449caa06ad46db351efcfb428f423184d/bootstrap/src/basis/option.mli | ocaml | * Option type.
The {!type:option} type is useful when a value may or may not be present; [Some value] or
[None], respectively.
* [hash_fold hash_fold_a t state] incorporates the hash of [t] into [state] and returns the
resulting state. [Some a] is hash-folded into the resulting state via [hash_fold_a]; [N... |
* { 1 Type }
Our option type must be an alias of 's , lest optional function arguments * be incompatible
* with our option type .
* with our option type. *)
type 'a t = 'a option =
| None
| Some of 'a
* { 1 Comparison }
val hash_fold: ('a -> Hash.State.t -> Hash.State.t) -> 'a t -> Hash.State.t -> Hash.S... |
93cc00eea04d9525d02adfd3e43fb6ce47fc465b33f393ff62da1c0d862f77c8 | typedclojure/typedclojure | alpha__def.clj | Copyright ( c ) , contributors .
;; 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/typedclojure/typedclojure/5fd7cdf7941c6e7d1dd5df88bf44474fa35e1fca/typed/lib.spec.alpha/src/typed/ext/clojure/spec/alpha__def.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 ) , contributors .
(ns ^:no-doc typed.ext.clojure.spec.alpha__def
"Typing rules for clojure.spec.alpha/def."
(:require [typed.cljc.checker.check-below :as below]
[typed.cljc.checker.filter-ops :as fo]
[typed.cljc.checker.filter-rep :as fl]
[typed.cljc.ch... |
7adb71245b2ffae852588906622fc1e9550355a2ba7eb6e42a448f23db829fd5 | hexlet-codebattle/battle_asserts | shorten_string.clj | (ns battle-asserts.issues.shorten-string
(:require [clojure.test.check.generators :as gen]
[faker.generate :as faker]))
(def level :elementary)
(def tags ["strings"])
(def description
{:en "Provide the word in the form of an acronym composed of the first letter,
the number of letters in the w... | null | https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/94dbb426bf8b97921e7c6f50f177c5b7369ced1d/src/battle_asserts/issues/shorten_string.clj | clojure | (ns battle-asserts.issues.shorten-string
(:require [clojure.test.check.generators :as gen]
[faker.generate :as faker]))
(def level :elementary)
(def tags ["strings"])
(def description
{:en "Provide the word in the form of an acronym composed of the first letter,
the number of letters in the w... | |
f02e3be5471fa1c357b209f99e09057a5468659eb1001776e0ae86992ad13543 | wdebeaum/DeepSemLex | trader.lisp | ;;;;
;;;; W::trader
;;;;
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::trader
(SENSES
((meta-data :origin calo-ontology :entry-date 20060714 :change-date nil :wn ("trader%1:18:00") :comment caloy3)
(LF-PARENT ONT::seller-trader) ;professional)
(example "he is a trader on wall street... | null | https://raw.githubusercontent.com/wdebeaum/DeepSemLex/ce0e7523dd2b1ebd42b9e88ffbcfdb0fd339aaee/trips/src/LexiconManager/Data/new/trader.lisp | lisp |
W::trader
professional) |
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::trader
(SENSES
((meta-data :origin calo-ontology :entry-date 20060714 :change-date nil :wn ("trader%1:18:00") :comment caloy3)
(example "he is a trader on wall street")
)
)
)
))
|
879ef83d151f393b6a3a53db633ece557194467abf68f7c620ee323972abf29f | ekmett/monoids | Monad.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , GeneralizedNewtypeDeriving , FlexibleContexts , TypeOperators #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Monoid.Applicative
Copyright : ( c ) 2009
-- License : BSD-style
-- Maintainer ... | null | https://raw.githubusercontent.com/ekmett/monoids/711963df750ba3417f464fbc0c6c726f3a0c9c8c/Data/Monoid/Monad.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Monoid.Applicative
License : BSD-style
Maintainer :
Stability : experimental
Portability : non-portable (MPTCs)
'Monoid' instances for working with a 'Monad'
-------------------------------------------... | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , GeneralizedNewtypeDeriving , FlexibleContexts , TypeOperators #
Copyright : ( c ) 2009
module Data.Monoid.Monad
(
Action(Action,getAction)
, snocAction
, MonadSum(MonadSum, getMonadSum)
, Mon(Mon,getMon)
) where
import Contro... |
e61b41ae59df648e7e420810f98ea130bf2b0a43e3a5964e6c20cb98e1836080 | mcorbin/meuse | user_test.clj | (ns meuse.api.meuse.user-test
(:require [meuse.api.meuse.http :refer :all]
[meuse.api.meuse.user :refer :all]
[meuse.auth.password :as password]
[meuse.db :refer [database]]
[meuse.db.actions.user :as user-db]
[meuse.db.actions.role :as role-db]
... | null | https://raw.githubusercontent.com/mcorbin/meuse/d2b74543fce37c8cde770ae6f6097cabb509a804/test/meuse/api/meuse/user_test.clj | clojure | does not work | (ns meuse.api.meuse.user-test
(:require [meuse.api.meuse.http :refer :all]
[meuse.api.meuse.user :refer :all]
[meuse.auth.password :as password]
[meuse.db :refer [database]]
[meuse.db.actions.user :as user-db]
[meuse.db.actions.role :as role-db]
... |
08f78f1b291a9c80d565b7111064efa67b3d022739972c61252e4083c6a5c93a | JunSuzukiJapan/cl-reex | skip-while-test.lisp | (defpackage skip-while-test
(:use :cl
:cl-reex
:cl-reex-test.logger
:prove)
(:shadowing-import-from :cl-reex :skip))
(in-package :skip-while-test)
NOTE : To run this test file , execute ` ( asdf : test - system : cl - reex ) ' in your Lisp .
(plan 2)
;; blah blah blah.
(defparameter logger (make-i... | null | https://raw.githubusercontent.com/JunSuzukiJapan/cl-reex/94928c7949c235b41902138d9e4a5654b92d67eb/tests/skip-while-test.lisp | lisp | blah blah blah. | (defpackage skip-while-test
(:use :cl
:cl-reex
:cl-reex-test.logger
:prove)
(:shadowing-import-from :cl-reex :skip))
(in-package :skip-while-test)
NOTE : To run this test file , execute ` ( asdf : test - system : cl - reex ) ' in your Lisp .
(plan 2)
(defparameter logger (make-instance 'logger))
... |
447331a7c97773c40be85449da05b333056383df835b5d845f6cc00d29a6d392 | janestreet/universe | expect_test_config_types.mli | include Expect_test_config_types_intf.Expect_test_config_types
| null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/ppx_expect/config/types/expect_test_config_types.mli | ocaml | include Expect_test_config_types_intf.Expect_test_config_types
| |
ec566c26ef171dfa012f5e0612ad220461b3299ff3d3c1107d4a7771dc5d0efc | gafiatulin/codewars | Perimeter.hs | Perimeter of squares in a rectangle
/
module Codewars.Kata.Perimeter where
perimeter :: Integer -> Integer
perimeter = (*4) . pred . (fib !!) . (+2) . fromIntegral
where fib = 1:1: zipWith (+) fib (tail fib)
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/5%20kyu/Perimeter.hs | haskell | Perimeter of squares in a rectangle
/
module Codewars.Kata.Perimeter where
perimeter :: Integer -> Integer
perimeter = (*4) . pred . (fib !!) . (+2) . fromIntegral
where fib = 1:1: zipWith (+) fib (tail fib)
| |
e086da33b636801267f1ebbd41500e505d7f43862f1b915af9f3ea800c82888f | hstreamdb/hstream | Stats.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE CPP #
{-# LANGUAGE MagicHash #-}
# OPTIONS_GHC -pgmPcpphs -optP -- cpp -Werror = unused - top - binds #
To dump CPP output , do
--
> cabal exec -- ghc -E common / stats / HStream / Stats.hs
--
-- And then you can @cat common/stats/HStream/Stats.hspp@
#define C... | null | https://raw.githubusercontent.com/hstreamdb/hstream/2d57ea42fdba2af19330e1ba06ef30235f5e6a6f/common/stats/HStream/Stats.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE MagicHash #
cpp -Werror = unused - top - binds #
ghc -E common / stats / HStream / Stats.hs
And then you can @cat common/stats/HStream/Stats.hspp@
* StatsHolder
* PerStreamStats
** Counters
** Time series
* PerSubscriptionStats
** Counters
** Time series
* PerHandleS... | # LANGUAGE CPP #
To dump CPP output , do
#define CounterExports(cat, name) \
cat##_stat_add_##name, cat##_stat_get_##name, cat##_stat_getall_##name
module HStream.Stats
Stats
, StatsHolder
, newStatsHolder
, newServerStatsHolder
, newAggregateStats
, printStatsHolder
, resetStatsHolde... |
15a0401b4e2898c00145fb754416a3bbb11669419cf787f4204e3cc65784932c | input-output-hk/cardano-sl | Sqlite.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE RankNTypes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TupleSections #
# OPTIONS_GHC -fno - warn - orphans #
| Sqlite database for the ' TxMeta ' portion of the wallet kernel .
module Cardano.Wallet.Kernel.DB.Sqlite (
-- * Resource creation and acquisi... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/wallet/src/Cardano/Wallet/Kernel/DB/Sqlite.hs | haskell | * Resource creation and acquisition
* Clear all entries
* Basic API
* Unsafe functions
* testing
| A type modelling the underlying SQL database.
----------+----------------+--------------------+------------------+---------------------+-----------------+-----------------
----------+----------------+--------------... | # LANGUAGE DeriveGeneric #
# LANGUAGE RankNTypes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TupleSections #
# OPTIONS_GHC -fno - warn - orphans #
| Sqlite database for the ' TxMeta ' portion of the wallet kernel .
module Cardano.Wallet.Kernel.DB.Sqlite (
newConnection
, closeMetaDB
... |
c7c6b7691664fba98038dfb38efbcbeb060d06d79744e3d6b9e0be54d7ca9fc9 | tomjridge/imp_fs | util_main.ml | let argv = Sys.argv |> Array.to_list |> List.tl
let _ =
match argv with
| ["print_trace";dirname] ->
Test_blk_dev.print_trace ~dirname
| ["test";"file_impl_v2"] ->
let module X = File_impl_v2.Test() in
Lwt_main.run (X.run () |> With_lwt.to_lwt)
| ["test";"sqlite_dir"] ->
let module X = Sqli... | null | https://raw.githubusercontent.com/tomjridge/imp_fs/dae69505130073747f37ecab845fe3b6c495e66a/bin/util_main.ml | ocaml | let argv = Sys.argv |> Array.to_list |> List.tl
let _ =
match argv with
| ["print_trace";dirname] ->
Test_blk_dev.print_trace ~dirname
| ["test";"file_impl_v2"] ->
let module X = File_impl_v2.Test() in
Lwt_main.run (X.run () |> With_lwt.to_lwt)
| ["test";"sqlite_dir"] ->
let module X = Sqli... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.