_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
419a4d3fec9eba428811b46f03ecdd61377806758108942ebf7077f81141f65a
portnov/libssh2-hs
WaitSocket.hs
# LANGUAGE CPP , ForeignFunctionInterface # -- | Block until a read or write operation on a socket would succeed -- On most platforms this uses ' Control . Concurrent.threadWaitRead ' or ' Conctrol . Concurrent.threadWaitWrite ' , but on Windows we need to do -- something different. -- -- See <>. module Network.SS...
null
https://raw.githubusercontent.com/portnov/libssh2-hs/d8a20f072f99aa2c415748734dac8225c74b45cc/libssh2/src/Network/SSH/Client/LibSSH2/WaitSocket.hs
haskell
| Block until a read or write operation on a socket would succeed something different. See <>. | Block the current thread until data is available to read on the while this thread was blocked. To safely close a file descriptor that has been used with 'threadWaitRead', use 'GHC.Conc.closeFdWith'. separate th...
# LANGUAGE CPP , ForeignFunctionInterface # On most platforms this uses ' Control . Concurrent.threadWaitRead ' or ' Conctrol . Concurrent.threadWaitWrite ' , but on Windows we need to do module Network.SSH.Client.LibSSH2.WaitSocket ( threadWaitRead , threadWaitWrite ) where import Network.Socket(Socket) #i...
d054cf2dde572692fe590793fc9f5cb3d009f49d50e4edf4532c70af2d452da6
zcaudate/hara
key.clj
(ns hara.security.base.key (:require [hara.core.base.encode :as encode] [hara.security.base.provider :as provider]) (:import (java.io Writer) (java.security Key KeyFactory KeyPair KeyPairGenerator PrivateKey PublicKey SecureRandom) (java.security.spec AlgorithmParameterSpec PKCS8En...
null
https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/src/hara/security/base/key.clj
clojure
=> #key {:type \"AES\", :mode :secret, :format \"RAW\", :encoded \"AQgv8l+vJNfnEWuhHs55wg==\"} => #key {:type \"HmacSHA224\", :mode :secret, :format \"RAW\", :encoded \"0qQkmic=\"} => [#key {:type \"RSA\", :mode :public, :format \"X.509\", ...
(ns hara.security.base.key (:require [hara.core.base.encode :as encode] [hara.security.base.provider :as provider]) (:import (java.io Writer) (java.security Key KeyFactory KeyPair KeyPairGenerator PrivateKey PublicKey SecureRandom) (java.security.spec AlgorithmParameterSpec PKCS8En...
34c80663f683ee597a15c1eb3a70f4cf51dfeb378599dba3ed5e7e63291b152f
appleshan/cl-http
tcp-conditions.lisp
(in-package :www-utils) This is the condition hierarchy , based on the one . ;;; network-error ;;; domain-resolver-error ;;; local-network-error ;;; network-resources-exhausted ;;; unknown-address ;;; unknown-host-name ;;; remote-network-error ;;; bad-connection-state ;;; connection-clos...
null
https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/contrib/kpoeck/port-template/allegro/tcp-conditions.lisp
lisp
network-error domain-resolver-error local-network-error network-resources-exhausted unknown-address unknown-host-name remote-network-error bad-connection-state connection-closed connection-lost host-stopped-responding connection-error connection-refused ...
(in-package :www-utils) This is the condition hierarchy , based on the one . (define-condition DOMAIN-RESOLVER-ERROR (network-error)()) (define-condition local-network-error (network-error)()) (define-condition unknown-host-name (network-error)()) (define-condition remote-network-error (network-error)()) (define-...
929dc651474f75b402c32a340a39bb8c37d78b15c70c4e7bd31e340bb43297a1
static-analysis-engineering/codehawk
jCHBytecode.ml
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Java Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) ...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchlib/jCHBytecode.ml
ocaml
chutil jchlib Conversion TBD Conversion Conversion Arithmetic
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Java Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) ...
b0c0110121cf65fea950b06b305e7b71c711aa849f176535fff850793883f5af
dhleong/spade
project.clj
(defproject net.dhleong/spade "1.2.0-SNAPSHOT" :description "A nice tool to use in the Garden" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :min-lein-version "2.9.1" :dependencies [[org.clojure/clojure "1.10.0"] [org.clojure/clojurescript "1.10.520"] ...
null
https://raw.githubusercontent.com/dhleong/spade/d77c2adcf451aa9c0b55bd0a835d53f95c7becf4/project.clj
clojure
The presence of a :figwheel configuration here will cause figwheel to inject the figwheel client into your build :open-urls will pop open your application started and compiled your application. Comment this out once it no longer serves you. -devtools This next build is a compressed minified build for productio...
(defproject net.dhleong/spade "1.2.0-SNAPSHOT" :description "A nice tool to use in the Garden" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :min-lein-version "2.9.1" :dependencies [[org.clojure/clojure "1.10.0"] [org.clojure/clojurescript "1.10.520"] ...
59af4dc2c63b50b57ad1250645d996af5b972d879af1171a653eecc640794381
jmgimeno/okasaki-clojure
batched_deque.clj
(ns okasaki.batched-deque (:refer-clojure :exclude [cons empty? last split-at]) (:use datatype.core okasaki.list)) Solution to exercise 5.1 (defdatatype ::Deque (Quad cfront front crear rear)) (def Empty (->Quad 0 Nil 0 Nil)) (defun empty? ;;[queue] [[Quad 0 Nil 0 Nil]] true ...
null
https://raw.githubusercontent.com/jmgimeno/okasaki-clojure/f3e8031d490f5505b74f4a7593f0f9e2e5fe79f3/src/okasaki/batched_deque.clj
clojure
[queue] [queue] [elem deque] [queue] [queue] [elem queue] [queue] [queue]
(ns okasaki.batched-deque (:refer-clojure :exclude [cons empty? last split-at]) (:use datatype.core okasaki.list)) Solution to exercise 5.1 (defdatatype ::Deque (Quad cfront front crear rear)) (def Empty (->Quad 0 Nil 0 Nil)) (defun empty? [[Quad 0 Nil 0 Nil]] true :else ...
36f50323897b43186b4377261e73c0528a907c29bf5d6689368b2115a8c7c7f7
crclark/foundationdb-haskell
Error.hs
module FoundationDB.Layer.Directory.Internal.Error where import Control.Monad.Error.Class (MonadError (..)) import FoundationDB.Error (DirLayerUserError, Error (..), FDBHsError (..)) import FoundationDB.Transaction (Transaction) throwDirInternalError :: String -> Transaction a throwDirInternalError = throwError . Err...
null
https://raw.githubusercontent.com/crclark/foundationdb-haskell/c8c9527ffa02dd2d08c15e23b09dd982a0b2a0ec/src/FoundationDB/Layer/Directory/Internal/Error.hs
haskell
module FoundationDB.Layer.Directory.Internal.Error where import Control.Monad.Error.Class (MonadError (..)) import FoundationDB.Error (DirLayerUserError, Error (..), FDBHsError (..)) import FoundationDB.Transaction (Transaction) throwDirInternalError :: String -> Transaction a throwDirInternalError = throwError . Err...
7bbdffd41ab478b16bea08625e0a52612cad398febda4105dea87988ba60ab6f
quark-lang/quark
Remover.hs
module Core.Import.Remover where import Core.Parser.AST import Data.Maybe removeImport :: Expression -> Maybe Expression removeImport (Node (Identifier "import") _) = Nothing removeImport x = Just x runImportRemover :: [Expression] -> [Expression] runImportRemover = mapMaybe removeImport
null
https://raw.githubusercontent.com/quark-lang/quark/e3dc7fff4e4dfba3e5c9ab71f10ede8bc5a30a44/app/Core/Import/Remover.hs
haskell
module Core.Import.Remover where import Core.Parser.AST import Data.Maybe removeImport :: Expression -> Maybe Expression removeImport (Node (Identifier "import") _) = Nothing removeImport x = Just x runImportRemover :: [Expression] -> [Expression] runImportRemover = mapMaybe removeImport
33c117e218225a07ad66fbab543b81be7692897f7c10e1e0ae85d92a4b5200ac
janestreet/async_js
async_js.ml
module Rpc = Rpc module Http = Http module Debug = Debug module Persistent_connection = Persistent_connection include Async_js0 let log_s = Debug.log_s let log_s_as_string = Debug.log_s_as_string
null
https://raw.githubusercontent.com/janestreet/async_js/d0cff4bd7bababd2480d6e4bd9609ab5453cbb10/src/async_js.ml
ocaml
module Rpc = Rpc module Http = Http module Debug = Debug module Persistent_connection = Persistent_connection include Async_js0 let log_s = Debug.log_s let log_s_as_string = Debug.log_s_as_string
7c3f1cd9ab341ee374044727d938f69506f2bfb3d34fb39b918e6eb7ddbe847b
diogob/pasta
Spec.hs
import Test.Hspec import Pasta import Protolude hiding ((&)) import Lens.Micro main :: IO () main = hspec $ do describe "selectFrom" $ it "should build select command" $ toSQL (selectFrom "some_table") `shouldBe` "SELECT * FROM \"some_table\" \"some_table\" WHERE true" describe "select" $ do ...
null
https://raw.githubusercontent.com/diogob/pasta/08646a9755b840364bdc38ddc86394cf7dac24f6/test/Spec.hs
haskell
import Test.Hspec import Pasta import Protolude hiding ((&)) import Lens.Micro main :: IO () main = hspec $ do describe "selectFrom" $ it "should build select command" $ toSQL (selectFrom "some_table") `shouldBe` "SELECT * FROM \"some_table\" \"some_table\" WHERE true" describe "select" $ do ...
2689054a1f310664829c174366cf87baa98195f952c08767826de3abad1fe01d
haskell-game/tiny-games-hs
fifteen.hs
#!/usr/bin/env -S runghc -XPatternSynonyms -XLambdaCase pattern N='\n';pattern S=' ';r g@(S:N:_)=g;r(S:x:y)=x:S:y;r(a:y)=a:r y;r[]=[] l g@(N:S:_)=g;l(x:S:y)=S:x:y;l(a:y)=a:l y;l[]=[];o(S:a:b:c:N:d:y)=d:a:b:c:N:S:y o(S:a:b:N:c:d:y)=d:a:b:N:c:S:y;o(S:a:N:b:c:d:y)=d:a:N:b:c:S:y o(S:N:a:b:c:d:y)=d:N:a:b:c:S:y;o(a:y)=a:o y;...
null
https://raw.githubusercontent.com/haskell-game/tiny-games-hs/e56b1c6e6d994631a4ab5cf0bfb5ab5c62d1fa86/prelude/fifteen/fifteen.hs
haskell
^10 ------------------------------------------------------------------ 80> --
#!/usr/bin/env -S runghc -XPatternSynonyms -XLambdaCase pattern N='\n';pattern S=' ';r g@(S:N:_)=g;r(S:x:y)=x:S:y;r(a:y)=a:r y;r[]=[] l g@(N:S:_)=g;l(x:S:y)=S:x:y;l(a:y)=a:l y;l[]=[];o(S:a:b:c:N:d:y)=d:a:b:c:N:S:y o(S:a:b:N:c:d:y)=d:a:b:N:c:S:y;o(S:a:N:b:c:d:y)=d:a:N:b:c:S:y o(S:N:a:b:c:d:y)=d:N:a:b:c:S:y;o(a:y)=a:o y;...
5e12bcfd5c7d8b41b8f8be557143a8beb547d69abc4b1617ac1b048701c4ea94
j-mie6/ParsleyHaskell
Queue.hs
# OPTIONS_GHC -Wno - orphans # | Module : Parsley . Internal . Common . Queue Description : Queue operations . License : BSD-3 - Clause Maintainer : : experimental Exposes the instance of ` QueueLike ` for ` Queue ` . @since 1.5.0.0 Module : Parsley.Internal.Common.Queue Descrip...
null
https://raw.githubusercontent.com/j-mie6/ParsleyHaskell/0386a7a8a9bbad3b2bca688a882755a568bd9beb/parsley-core/src/ghc/Parsley/Internal/Common/Queue.hs
haskell
# OPTIONS_GHC -Wno - orphans # | Module : Parsley . Internal . Common . Queue Description : Queue operations . License : BSD-3 - Clause Maintainer : : experimental Exposes the instance of ` QueueLike ` for ` Queue ` . @since 1.5.0.0 Module : Parsley.Internal.Common.Queue Descrip...
58de210ac14f810dc4b29024cc2f196dfca96875cbf06b01d6b7a98f54705a65
facebook/duckling
Rules.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.PhoneNumber.Rules ( rules ) whe...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/PhoneNumber/Rules.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE GADTs # # LANGUAGE OverloadedStrings # otherwise due to backtracking the regexp will take very long time or run out of stack for some inputs. area code nu...
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.PhoneNumber.Rules ( rules ) where import qualified Data.Text as Text import Prelude import Data.String import Duckling.Dimensions.Types import Duckling.Numeral.Helpers (parseInt) import Duckling.PhoneNumber.Types (PhoneNumberData(..)) import qual...
91571c9fb9fa20cd99abed76e3eda049b93d2560b513040cbeb0aebddabed566
anchpop/wise_mans_haskell
squares.hs
squares :: (Num a) => [a] -> [a] squares [] = [] squares (x:xs) = (x^2):(squares xs)
null
https://raw.githubusercontent.com/anchpop/wise_mans_haskell/021ca3f3d96ebc0ecf2daf1a802fc33d067e24cc/haskelltests/should_compile/squares.hs
haskell
squares :: (Num a) => [a] -> [a] squares [] = [] squares (x:xs) = (x^2):(squares xs)
9670bede1ab741cf1b3012a046f2518b1af4ff83133d0a61f408bc89d6397b0a
bmeurer/ocamljit2
ocamlbuild_where.mli
(***********************************************************************) (* ocamlbuild *) (* *) , , projet Gallium , INRIA Rocquencourt (* ...
null
https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/ocamlbuild/ocamlbuild_where.mli
ocaml
********************************************************************* ocamlbuild ...
, , projet Gallium , INRIA Rocquencourt Copyright 2007 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 . Original author : val bindir : string ref val l...
a034f0a4744c687dca3608b7fe4566ab0ad2748bdb0dbdef68b06b85b9b77aa5
TrustInSoft/tis-kernel
state_import.mli
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/value/utils/state_import.mli
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 This file is part of Frama - C. Copyright ( C ) 2007 - 2015 ...
60f196d8d1c1d066935146829a4c1b6fcc394957a7aab014a7f94d8447728948
sinelaw/infernu
Log.hs
{-# LANGUAGE CPP #-} # LANGUAGE TupleSections # {-# LANGUAGE BangPatterns #-} module Infernu.Log (trace, tracePretty, traceLog, traceLogVal) where import Infernu.Prelude import Text.PrettyPrint.ANSI.Leijen (Pretty(..), (<+>), Doc) #if TRACE import Debug.Trace ...
null
https://raw.githubusercontent.com/sinelaw/infernu/e8b7aff6ea628c9099fb82aa011eb5c12aca36ba/src/Infernu/Log.hs
haskell
# LANGUAGE CPP # # LANGUAGE BangPatterns #
# LANGUAGE TupleSections # module Infernu.Log (trace, tracePretty, traceLog, traceLogVal) where import Infernu.Prelude import Text.PrettyPrint.ANSI.Leijen (Pretty(..), (<+>), Doc) #if TRACE import Debug.Trace (trace) #else trace :: a -> b -> b trace _ y = y #endif ...
e62965cf8d9f598f66341cd9399974f0a0d1cee62ca2c7d680d5699195511978
zotonic/zotonic
z_tags.erl
@author < > 2009 < > %% Based on code Copyright ( c ) 2008 - 2009 Original author < > %% %% @doc Generate a XHTML element with attributes, correctly escape all attributes. -module (z_tags). -include("zotonic.hrl"). -export([render_tag/2, render_tag/3, render_tag/4]). -export([optional_escape_prop...
null
https://raw.githubusercontent.com/zotonic/zotonic/fea95db5d66344e98ea089b5cfbe3818ecd8f84f/apps/zotonic_core/src/support/z_tags.erl
erlang
@doc Generate a XHTML element with attributes, correctly escape all attributes. @doc Render a tag with properties, return the tag text. div has special handling as <div/> is not allowed. @doc Render a tag into the context Tags with child content %%% Property display functions %%% @doc Correct data_xxxx attribut...
@author < > 2009 < > Based on code Copyright ( c ) 2008 - 2009 Original author < > -module (z_tags). -include("zotonic.hrl"). -export([render_tag/2, render_tag/3, render_tag/4]). -export([optional_escape_property/1]). render_tag("div", Props) -> render_tag(<<"div">>, Props); render_tag(<<"di...
1f522fa4576c2f4080d6146bb5e3afe559e5aed98cecf13b72b512db3de1dd75
shortishly/tansu
tansu_log.erl
Copyright ( c ) 2016 < > %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing, software distributed under...
null
https://raw.githubusercontent.com/shortishly/tansu/154811fff81855419de9af380c81c7ae14e435d0/src/tansu_log.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 or implied. See the License for the specific language governing permissi...
Copyright ( c ) 2016 < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(tansu_log). -export([append_entries/3]). -export([commit_index/0]). -export([create_table/0]). -export([do_clear_table/0]). -export([do_d...
af250785bdc49118cee293db9fb359c1d78d260355897a08af070433dd19d5ce
anmonteiro/ocaml-h2
types.ml
---------------------------------------------------------------------------- * Copyright ( c ) 2019 * * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are met : * * 1...
null
https://raw.githubusercontent.com/anmonteiro/ocaml-h2/66d92f1694b488ea638aa5073c796e164d5fbd9e/hpack/src/types.ml
ocaml
---------------------------------------------------------------------------- * Copyright ( c ) 2019 * * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are met : * * 1...
fcbd5b5324717653d208b82957bc0639b672a81dccc186d4448ab3fdd2b27823
vyorkin/tiger
ex2.ml
open Base open Stdio open Straightline let eval x op y = match op with | Plus -> x + y | Minus -> x - y | Times -> x * y | Div -> x / y let rec interp_stm stm env = let print env0 exp = let (v, env1) = interp_exp exp env0 in print_endline (Int.to_string v); env1 in match stm with | Pr...
null
https://raw.githubusercontent.com/vyorkin/tiger/54dd179c1cd291df42f7894abce3ee9064e18def/chapter1/ex2.ml
ocaml
open Base open Stdio open Straightline let eval x op y = match op with | Plus -> x + y | Minus -> x - y | Times -> x * y | Div -> x / y let rec interp_stm stm env = let print env0 exp = let (v, env1) = interp_exp exp env0 in print_endline (Int.to_string v); env1 in match stm with | Pr...
41250311e1c65f017044368161381ab6a22316c544383526fab2f867cb422cf3
input-output-hk/cardano-benchmarking
Benchmark.hs
HLINT ignore " Move brackets to avoid $ " # LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE RecordWildCards # # OPTIONS_GHC -Wno - all - missed - specialisations # # OPTIONS_GHC -Wno - unticked - promoted - constructors # # OPTIONS_GHC -fno - warn - orphans # module Cardano.Benchmarking.GeneratorTx.Benc...
null
https://raw.githubusercontent.com/input-output-hk/cardano-benchmarking/af05b42df27e2cc7305475cf5c4efa81e7f97540/cardano-tx-generator/src/Cardano/Benchmarking/GeneratorTx/Benchmark.hs
haskell
Node API imports Node imports | Specification for a benchmark run. /@jonathangfischoff/the-partial-options-monoid-pattern-31914a71fc67 | Return an error if the @Last@ option is incomplete.
HLINT ignore " Move brackets to avoid $ " # LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE RecordWildCards # # OPTIONS_GHC -Wno - all - missed - specialisations # # OPTIONS_GHC -Wno - unticked - promoted - constructors # # OPTIONS_GHC -fno - warn - orphans # module Cardano.Benchmarking.GeneratorTx.Benc...
14e5f1dbf4e2715b039ec54c1ca1cfe77cd5e2ecc8cc073c724d747c3a6e2930
jimcrayne/jhc
HsErrors.hs
-- Routines to check for several error and warning conditions which can be -- locally determined from syntax. module FrontEnd.HsErrors( hsType, hsDeclTopLevel, preTypecheckChecks, hsDeclLocal ) where import Control.Monad.Writer import FrontEnd.HsSyn import FrontEnd.Syn.Traverse import FrontEnd.Warn...
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/src/FrontEnd/HsErrors.hs
haskell
Routines to check for several error and warning conditions which can be locally determined from syntax.
module FrontEnd.HsErrors( hsType, hsDeclTopLevel, preTypecheckChecks, hsDeclLocal ) where import Control.Monad.Writer import FrontEnd.HsSyn import FrontEnd.Syn.Traverse import FrontEnd.Warning import GenUtil(hasRepeatUnder) import Name.Names import Util.Std hsType :: (Applicative m,MonadSrcLoc m, ...
5506b2eae2d36d65108c2ec12d61c33380e93b8189d557d323d8578f450ae831
sebastiaanvisser/fclabels
Total.hs
{-| Default lenses for simple total getters and total possibly polymorphic, updates. Useful for creating accessor labels for single constructor datatypes. Also useful field labels that are shared between all the constructors of a multi constructor datatypes. -} # LANGUAGE CPP , TypeOperators # module Data.Label.Total...
null
https://raw.githubusercontent.com/sebastiaanvisser/fclabels/5592f40af5a3a8af4afa45abf1035ce6495d7442/src/Data/Label/Total.hs
haskell
| Default lenses for simple total getters and total possibly polymorphic, updates. Useful for creating accessor labels for single constructor datatypes. Also useful field labels that are shared between all the constructors of a multi constructor datatypes. * Working in contexts. # INLINE lens # # INLINE get # # ...
# LANGUAGE CPP , TypeOperators # module Data.Label.Total ( (:->) , Total , lens , get , modify , set , traverse , lifted ) where #if MIN_VERSION_base(4,8,0) import Prelude hiding (traverse) #endif import Control.Monad ((<=<), liftM) import Data.Label.Poly (Lens) import Data.Label.Point (Total) import qualified Dat...
18e9f8d90bc5ac54dc29ba986792b1475edcac26312edc85f90596698bfae21d
guicho271828/alien
ncase.lisp
;;;; NCASE - optimise CASE to a jump table $ I d : ncase.lisp , v 1.1 2003/10/12 10:41:30 tfb Exp $ ;;; This is an example of using macros to do some fairly low-level ;;; optimisation. NCASE is like CASE, but in suitable cases it will ;;; compile a jump-table instead of lots of tests. This is actually ;;; not a re...
null
https://raw.githubusercontent.com/guicho271828/alien/6987d034426b8928adf67f498dc6cb06fd7f923e/check/ncase.lisp
lisp
NCASE - optimise CASE to a jump table This is an example of using macros to do some fairly low-level optimisation. NCASE is like CASE, but in suitable cases it will compile a jump-table instead of lots of tests. This is actually not a really good example because the compiler is likely to be able to do a better ...
$ I d : ncase.lisp , v 1.1 2003/10/12 10:41:30 tfb Exp $ (defvar *ncase-length-threshold* 10) (defvar *ncase-density-threshold* 0.2) (defvar *ncase-predicate* #'(lambda (keys) (let ((l (length keys)) (r (- (reduce #'max keys) (reduce #'min keys)))) (and (>= l *ncase...
1daaf8baec7af4abc6f9798217e12f2487b36c9b17f5d28a74faa78e6d7e2002
slepher/lenses
profunctor.erl
%%%------------------------------------------------------------------- @author < > ( C ) 2017 , %%% @doc %%% %%% @end Created : 19 Oct 2017 by < > %%%------------------------------------------------------------------- -module(profunctor). -superclass([]). -export_type([p/3]). -type p(_P, _A, _B) :: an...
null
https://raw.githubusercontent.com/slepher/lenses/3f979746e2c570d4808cce7106ac8b2110eed5c1/src/profunctor.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API =================================================================== API =================================================================== -------------------------...
@author < > ( C ) 2017 , Created : 19 Oct 2017 by < > -module(profunctor). -superclass([]). -export_type([p/3]). -type p(_P, _A, _B) :: any(). -callback dimap((fun((A) -> B)), fun((C) -> D), P) -> fun((profunctor:p(P, B, C)) -> profunctor:p(P, A, D)). -callback lmap(fun((A) -> B), P) -> fun((profunct...
45704b8b4b5a09844d363562a415b0f3b2e94b50bd9bd25ad10510a230d65b30
dextroamphetamine/nuko
Expr.hs
# OPTIONS_GHC -Wno - missing - export - lists # module Nuko.Tree.Expr where import Relude import Nuko.Names (ConsName, TyName, ValName) import Pretty.Tree (PrettyTree (prettyTree), Tree (..)) data NoExt = NoExt deriving Show instance PrettyTree NoExt where prettyTree _ = Node "NoExt" [] [] data RecordBinder val x...
null
https://raw.githubusercontent.com/dextroamphetamine/nuko/1b6f960eeeebbfcbfb5700279c39758f82e7df28/src/Nuko/Tree/Expr.hs
haskell
Abstract Syntax Tree We dont have a CST because i dont like new infix operators that much.
# OPTIONS_GHC -Wno - missing - export - lists # module Nuko.Tree.Expr where import Relude import Nuko.Names (ConsName, TyName, ValName) import Pretty.Tree (PrettyTree (prettyTree), Tree (..)) data NoExt = NoExt deriving Show instance PrettyTree NoExt where prettyTree _ = Node "NoExt" [] [] data RecordBinder val x...
972995c2cce641bd51c7e197fa78d88efdb17db4e6f783d4494c40bb7150cb46
yogthos/memory-hole
effects.cljs
(ns memory-hole.effects (:require [re-frame.core :as rf :refer [dispatch reg-fx reg-event-fx]] [accountant.core :as accountant])) (reg-fx :http (fn [{:keys [method url success-event error-event ignore-response-body ajax-map] :...
null
https://raw.githubusercontent.com/yogthos/memory-hole/925e399b0002d59998d10bd6f54ff3464a4b4ddb/src/cljs/memory_hole/effects.cljs
clojure
(ns memory-hole.effects (:require [re-frame.core :as rf :refer [dispatch reg-fx reg-event-fx]] [accountant.core :as accountant])) (reg-fx :http (fn [{:keys [method url success-event error-event ignore-response-body ajax-map] :...
b9d7979bd5c5fb954d2b94558d69affee3e3bfde8fcb85c7a13b3114ede4fc23
soarlab/FPTaylor
interval.ml
include Interval2 let zero_I = zero_interval let one_I = one_interval let fprintf_I fp format i = Printf.fprintf fp "[%s, %s]" (Printf.sprintf format i.low) (Printf.sprintf format i.high) let sprintf_I format i = Printf.sprintf "[%s, %s]" (Printf.sprintf format i.low) (Printf.sprintf format i.high)...
null
https://raw.githubusercontent.com/soarlab/FPTaylor/efbbc83970fe3c9f4cb33fafbbe1050dd18749cd/simple_interval/interval.ml
ocaml
include Interval2 let zero_I = zero_interval let one_I = one_interval let fprintf_I fp format i = Printf.fprintf fp "[%s, %s]" (Printf.sprintf format i.low) (Printf.sprintf format i.high) let sprintf_I format i = Printf.sprintf "[%s, %s]" (Printf.sprintf format i.low) (Printf.sprintf format i.high)...
d325741bf3adea1f8f6967b5cf9c9c7fb691b2369c85ddb5e1fe166780783838
huangz1990/SICP-answers
test-3-bigger-and-smaller.scm
(load "test-manager/load.scm") (load "3-bigger-and-smaller.scm") (define-test (test-bigger) (check (= 3 (bigger 2 3))) (check (= 6 (bigger 6 3))) ) (define-test (test-smaller) (check (= 1 (smaller 1 3))) (check (= 7 (smaller 7 10))) ) (run-regi...
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp1/code/test-3-bigger-and-smaller.scm
scheme
(load "test-manager/load.scm") (load "3-bigger-and-smaller.scm") (define-test (test-bigger) (check (= 3 (bigger 2 3))) (check (= 6 (bigger 6 3))) ) (define-test (test-smaller) (check (= 1 (smaller 1 3))) (check (= 7 (smaller 7 10))) ) (run-regi...
9b506272c28021d56460b25c77c4c17905828de57e7682ee8aeeb918848d6343
haroldcarr/plutus-pioneer-program-3
NFT.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE FlexibleContexts #-} # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # L...
null
https://raw.githubusercontent.com/haroldcarr/plutus-pioneer-program-3/b66f285d4bb5457ced740c50adb490b50aa0ed74/Lecture-05/NFT.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DeriveAnyClass # # LANGUAGE FlexibleContexts # # LANGUAGE OverloadedStrings # # LANGUAGE TypeOperators # ---------------------------------------------------------------------------- on chain # INLINABLE mkPolicy # v v ...
# LANGUAGE DeriveGeneric # # LANGUAGE NoImplicitPrelude # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Week05.NFT where import Control.Monad hiding (fmap) import Data.Aeson ...
84b87916a00658b97f677f498dd80bd91aa03b621f7442281a659e973ab3aebb
input-output-hk/cardano-sl
Seed.hs
{-# LANGUAGE RecordWildCards #-} # LANGUAGE ScopedTypeVariables # -- | Calculate shared seed using info sent by nodes participating in the -- protocol. module Pos.Chain.Ssc.Seed ( calculateSeed ) where import Universum hiding (id) import Control.Lens (_Left) import qualified Dat...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/chain/src/Pos/Chain/Ssc/Seed.hs
haskell
# LANGUAGE RecordWildCards # | Calculate shared seed using info sent by nodes participating in the protocol. nodes generate together and agree on. because the shares don't carry any IDs or anything. Thus we need to impose some arbitrary order on them. I chose to order the shares by stakeholder's VSS key, whi...
# LANGUAGE ScopedTypeVariables # module Pos.Chain.Ssc.Seed ( calculateSeed ) where import Universum hiding (id) import Control.Lens (_Left) import qualified Data.HashMap.Strict as HM import qualified Data.HashSet as HS import Pos.Binary.Class (AsBinary, fromBinary) import...
c6b74fa891e9f984d91aa398619cf8f5b06386ea71410cd77b4d12a7b41dd853
ghcjs/jsaddle-dom
SQLStatementCallback.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.SQLStatementCallback (newSQLStatementCallback, newSQLStatementCallbackSync, newSQLStatementCallbackAsync, S...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/SQLStatementCallback.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | <-US/docs/Web/API/SQLStatementCallback Mozilla SQLStatementCallback documentation> | <-US/docs/Web/API/SQLStatementCallback Mozilla SQLStatementCallback documentation> | <-US/docs/Web/API/SQLStatementCallback Mozilla SQL...
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.SQLStatementCallback (newSQLStatementCallback, newSQLStatementCallbackSync, newSQLStatementCallbackAsync, SQLStatementCallback) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double,...
079db1c52801b7afe81c4b34f65dfa29b0eb743f59cb5ebdaf143c6849982fd2
gbour/wave
wave_mod_freemobile.erl
%% Wave - MQTT Broker Copyright ( C ) 2014 - 2016 - %% %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , version 3 of the License . %% %% This program is distribut...
null
https://raw.githubusercontent.com/gbour/wave/fe5b78408a7c6e723b19cd454068958058e5e072/apps/wave/src/modules/wave_mod_freemobile.erl
erlang
This program is free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the along with this program. If not, see ...
Wave - MQTT Broker Copyright ( C ) 2014 - 2016 - it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , version 3 of the License . GNU Affero General Public License for more details . You should have received a copy of the GNU Affero Ge...
f60d7ac9cedf5337d11d912cfd0478ee8b1d449355e022c70ce3b1dd10cc9525
draperlaboratory/VIBES
patch_c.mli
(***************************************************************************) (* *) Copyright ( C ) 2022/2023 The Charles Stark Draper Laboratory , Inc. (* *) (* This...
null
https://raw.githubusercontent.com/draperlaboratory/VIBES/7f978d66d0b022d1a9262fdfc608b7a2b7c95dff/tools/vibes-c-toolkit/lib/patch_c.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 ) . * This module implements PatchC , which is a subset of the FrontC abstract represe...
d2092b1610cd61d666148fd3eb719da525c42413b869bae0db94c05c77ec7c7e
clojure/core.typed
field.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/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/src/clojure/core/typed/checker/check/jvm/field.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 clojure.core.typed.checker.check.jvm.field (:require [clojure.core.typed.checker.check-below :as below] [clojure.core.typed.checker.check.utils :as cu] [clojure.core.typed.checker.type-rep :as r] [clojure.core.typed.checker.utils :as...
369b2856417a08d1d9a13044598f862c8f7abf4ec8c46048fcfa4e9a09eb59cb
eugeneia/athens
parse.lisp
;;; parse.lisp ;;; ;;; This file is part of the cl-libxml2 library, released under Lisp-LGPL. ;;; See file COPYING for details. ;;; Author : < > (in-package #:libxml2.tree) xmlParserOption (defbitfield %xmlParserOption (:xml-parse-recover 1) ;; recover on errors (:xml-parse-noent 2) ;; subs...
null
https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/cl-libxml2-20130615-git/tree/parse.lisp
lisp
parse.lisp This file is part of the cl-libxml2 library, released under Lisp-LGPL. See file COPYING for details. recover on errors substitute entities load the external subset suppress error reports suppress warning reports pedantic error reporting remove blank nodes Implement XInclude substitition Forbid ...
Author : < > (in-package #:libxml2.tree) xmlParserOption (defbitfield %xmlParserOption default DTD attributes validate with the DTD use the SAX1 interface internally merge CDATA as text nodes parse using XML-1.0 before update 5 ) (defun parse-options (&rest options) (foreign-bitfield-value '%xmlP...
bdc43838ead3941066b6927f0568a3240caefcddb6ef8dc2bd4a6a0c0386aad5
realworldocaml/examples
prog.mli
val prog:(Lexing.lexbuf -> token) -> Lexing.lexbuf -> Json.value option
null
https://raw.githubusercontent.com/realworldocaml/examples/32ea926861a0b728813a29b0e4cf20dd15eb486e/code/parsing/prog.mli
ocaml
val prog:(Lexing.lexbuf -> token) -> Lexing.lexbuf -> Json.value option
99ccaadd4a90710c2d9ea68ccc8535f4971b37c9d806c2ac070d4bc310c82a19
ddssff/refact-global-hse
GHC.hs
-- | A type that can be turned into a small subset of the command line options for the ghc command . # LANGUAGE RecordWildCards # module GHC ( GHCOpts(..) , ghcProcessArgs , extensionsForHSEParser ) where import CPP (defaultCpphsOptions) import Data.Default (Default(def)) import Data.List (intercal...
null
https://raw.githubusercontent.com/ddssff/refact-global-hse/519a017009cae8aa1a3db1b46eb560d76bd9895d/tests/input/rgh/GHC.hs
haskell
| A type that can be turned into a small subset of the command line fold3c and others fail. Maybe we should parse the headers and then use the options there? There are functions to do this.
options for the ghc command . # LANGUAGE RecordWildCards # module GHC ( GHCOpts(..) , ghcProcessArgs , extensionsForHSEParser ) where import CPP (defaultCpphsOptions) import Data.Default (Default(def)) import Data.List (intercalate) import Data.Monoid ((<>)) import Language.Haskell.Exts.Extension (...
315e9367851579487a666935832c6e3417724f448d197f0f422b7e94eb2007e2
cbd/edis
edis_listener_sup.erl
%%%------------------------------------------------------------------- @author < > @author < > ( C ) 2011 InakaLabs SRL %%% @doc Edis TCP listener supervisor %%% @end %%%------------------------------------------------------------------- -module(edis_listener_sup). -author('Fernando Benavides <>'). -author...
null
https://raw.githubusercontent.com/cbd/edis/aad89352f25a7f3737242ddc9bc913def75a517a/src/edis_listener_sup.erl
erlang
------------------------------------------------------------------- @doc Edis TCP listener supervisor @end ------------------------------------------------------------------- ==================================================================== External functions ====================================================...
@author < > @author < > ( C ) 2011 InakaLabs SRL -module(edis_listener_sup). -author('Fernando Benavides <>'). -author('Chad DePue <>'). -include("edis.hrl"). -behaviour(supervisor). -export([start_link/0, init/1, reload/0]). -spec start_link() -> ignore | {error, term()} | {ok, pid()}. start_link() ->...
60cc6ef8a230cb071b5cf83f059d1b27babe190a38612ee2128302973cffd4d5
HealthSamurai/us-npi
npi_test.clj
(ns usnpi.npi-test (:require [clojure.test :refer :all] [clojure.java.io :as io] [clojure.string :as str] [usnpi.util-test :refer [read-body]] [ring.mock.request :as mock] [usnpi.db :as db] [usnpi.core :as usnpi] [usnpi.models :as mod...
null
https://raw.githubusercontent.com/HealthSamurai/us-npi/a28a8ec8d45e19fadab0528791e7de78f19dc87e/test/usnpi/npi_test.clj
clojure
(ns usnpi.npi-test (:require [clojure.test :refer :all] [clojure.java.io :as io] [clojure.string :as str] [usnpi.util-test :refer [read-body]] [ring.mock.request :as mock] [usnpi.db :as db] [usnpi.core :as usnpi] [usnpi.models :as mod...
2df6a395878173d137cc107a742c570f7b78a257acbec9c8d5fb36a019d353e3
ghcjs/ghcjs
t9339.hs
-- Tests that `last` successfully fuses. main :: IO () main = print $ last $ filter odd $ [1::Int ..10000000]
null
https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/perf/t9339.hs
haskell
Tests that `last` successfully fuses.
main :: IO () main = print $ last $ filter odd $ [1::Int ..10000000]
40449d6ae4d277c21b80e1b8bf1e569a957fb5d7dc924cd2b64e427f253672a5
scheme/edwin48
key-test.scm
(define equivalent-keys-alist (list (list (kbd a) (kbd #\a)) (list (kbd backspace) (kbd #\backspace)) (list (kbd space) (kbd #\space)) (list (kbd return) (kbd #\return)) (list (kbd abc) (kbd "abc")))) (for-each (lambda (key-pair) (display (apply key=? key-pair)) (newl...
null
https://raw.githubusercontent.com/scheme/edwin48/fbe3c7ca14f1418eafddebd35f78ad12e42ea851/edwin48/scsh/key-test.scm
scheme
(define equivalent-keys-alist (list (list (kbd a) (kbd #\a)) (list (kbd backspace) (kbd #\backspace)) (list (kbd space) (kbd #\space)) (list (kbd return) (kbd #\return)) (list (kbd abc) (kbd "abc")))) (for-each (lambda (key-pair) (display (apply key=? key-pair)) (newl...
425bda0986cab1190f754dfb82f56f0ea9780d9db084108e5a6239993978abee
penpot/penpot
link.cljs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.main.ui.components.link (:require [app.util.keyboard :as kbd] [rumext.v2 :as mf])) (mf/defc l...
null
https://raw.githubusercontent.com/penpot/penpot/ac7cb3c8c735106efedc8352dcafc631fd922102/frontend/src/app/main/ui/components/link.cljs
clojure
Copyright (c) KALEIDOS INC
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.main.ui.components.link (:require [app.util.keyboard :as kbd] [rumext.v2 :as mf])) (mf/defc link [{:keys [action klass data-te...
4cdaecd2f5aa1ecfbdc97eb8e738fd688fc99c4d75a6900acd3b96a337f24ffa
mtolly/onyxite-customs
Ark.hs
# LANGUAGE DuplicateRecordFields # {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoFieldSelectors #-} {-# LANGUAGE OverloadedRecordDot #-} # LANGUAGE OverloadedStrings # # LANGUAGE RecordWildCards # {-# LANGUAGE StrictData #-} module Onyx.Harmonix.Ark where import Control....
null
https://raw.githubusercontent.com/mtolly/onyxite-customs/0c8acd6248fe92ea0d994b18b551973816adf85b/haskell/packages/onyx-lib/src/Onyx/Harmonix/Ark.hs
haskell
# LANGUAGE LambdaCase # # LANGUAGE NoFieldSelectors # # LANGUAGE OverloadedRecordDot # # LANGUAGE StrictData # inflated size, or 0 if not gzipped in v5 and up sizes (+ maybe paths) of each ark (or Nothing if no separate hdr/ark) Read a .hdr, or an .ark for old games with no .hdr new in...
# LANGUAGE DuplicateRecordFields # # LANGUAGE OverloadedStrings # # LANGUAGE RecordWildCards # module Onyx.Harmonix.Ark where import Control.Monad (forM, replicateM, when) import Control.Monad.IO.Class (MonadIO, liftIO) import Data.Bifunctor (first) import ...
41e3d8478059c76430cb0ca26a5dfd9be534ffae5f32231be79c11871e74b5d1
wavejumper/boonmee
node_test.clj
(ns boonmee.integration.node-test (:require [clojure.test :refer :all] [clojure.java.io :as io] [clojure.spec.alpha :as s] [boonmee.test-util :refer [with-client request! response!]] [boonmee.protocol])) (def process-resp {:command "completionInfo" :data {:...
null
https://raw.githubusercontent.com/wavejumper/boonmee/fc0946568bfc53830717d2b68982872972bd532d/test/boonmee/integration/node_test.clj
clojure
(ns boonmee.integration.node-test (:require [clojure.test :refer :all] [clojure.java.io :as io] [clojure.spec.alpha :as s] [boonmee.test-util :refer [with-client request! response!]] [boonmee.protocol])) (def process-resp {:command "completionInfo" :data {:...
81cd3045edf2406b276f36532dd78cca95775632d09d251648cced3b85c3acfe
alexandroid000/improv
Arrow.hs
# LANGUAGE FlexibleInstances # |The TopicArrow type and wrappers for Topic operations . -- -- This module provide an arrow interface for Topic computations -- alternatively monadic inteface @Ros.Topic@. -- -- /Note/: Many of these operations have the same names as similar operations in the " Prelude " and @Ros . To...
null
https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/roshask/src/Ros/Topic/Arrow.hs
haskell
This module provide an arrow interface for Topic computations alternatively monadic inteface @Ros.Topic@. /Note/: Many of these operations have the same names as similar A@), an explicit import list, or a @hiding@ clause. |A @TopicArrow@ type is a map of Topic. |@TopicArrow@ is a category |@TopicArrow@ is an a...
# LANGUAGE FlexibleInstances # |The TopicArrow type and wrappers for Topic operations . operations in the " Prelude " and @Ros . Topic@. The ambiguity may be resolved using either qualification ( e.g. @import qualified . Topic . Arrow as module Ros.Topic.Arrow where import Ros.Internal.RosBinary (RosBinary) imp...
f388b30952b9d44df7583e2c2384fe3f1efee0c9bf56e31d4a62d0c0208ce5f4
ocsigen/obrowser
marshal.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/ocsigen/obrowser/977c09029ea1e4fde4fb0bf92b4d893835bd9504/rt/caml/marshal.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1997 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with $ I d : marshal.ml 7164 2005 - 10 - 2...
8b5e2b5f3c639dc3246578bdd13bd33ab55fac2817fa694ae58bfb281010d7d5
Twinside/Juicy.Pixels
Jpg.hs
# LANGUAGE TupleSections # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleInstances # {-# LANGUAGE BangPatterns #-} # LANGUAGE TypeFamilies # # LANGUAGE CPP # # OPTIONS_GHC -fspec - constr - count=5 # -- | Module used for JPEG file loading and writing. module Codec.Picture.Jpg( deco...
null
https://raw.githubusercontent.com/Twinside/Juicy.Pixels/74d93ed1f3e32aa111100f13c2d3e96cb1af51d2/src/Codec/Picture/Jpg.hs
haskell
# LANGUAGE BangPatterns # | Module used for JPEG file loading and writing. rounded integer division | Assume the macro block is initialized with zeroes | Decompress a macroblock from a bitstream given the current configuration from the frame. ^ Tree used for Ac coefficient ^ Current quantization table ^ ...
# LANGUAGE TupleSections # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleInstances # # LANGUAGE TypeFamilies # # LANGUAGE CPP # # OPTIONS_GHC -fspec - constr - count=5 # module Codec.Picture.Jpg( decodeJpeg , decodeJpegWithMetadata , ...
ff1aae7ff79b7c480e1a2f83a52137e04fd1ec0b64e73719f8a3b97a492ed638
dsheets/codoc
opamDoc.ml
* Copyright ( c ) 2015 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
null
https://raw.githubusercontent.com/dsheets/codoc/382077cf3e7e20e478bd97cc0b348e0b2ec926db/opam-doc/opamDoc.ml
ocaml
never TODO: fix error handling
* Copyright ( c ) 2015 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
ec414ed427249c5dfb07447f5fe09d7f9df1a614bfe15af9bd1d0f0ce012b5a2
tiensonqin/lymchat
core_test.clj
(ns lymchat.core-test (:require [clojure.test :refer :all] [lymchat.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
null
https://raw.githubusercontent.com/tiensonqin/lymchat/824026607d30c12bc50afb06f677d1fa95ff1f2f/test/lymchat/core_test.clj
clojure
(ns lymchat.core-test (:require [clojure.test :refer :all] [lymchat.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
03c7b1e2faa20cf97b49b85678a15ce046022c8f292548e39eb7449fcf15fe2f
uim/sigscheme
test-let.scm
;; Filename : test-let.scm About : unit test for R5RS let ;; Copyright ( C ) 2005 - 2006 YAMAMOTO Kengo < yamaken AT > Copyright ( c ) 2007 - 2008 SigScheme Project < uim - en AT googlegroups.com > ;; ;; All rights reserved. ;; ;; Redistribution and use in source and binary forms, with or without ;; m...
null
https://raw.githubusercontent.com/uim/sigscheme/ccf1f92d6c2a0f45c15d93da82e399c2a78fe5f3/test/test-let.scm
scheme
Filename : test-let.scm All rights reserved. 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 follow...
About : unit test for R5RS let Copyright ( C ) 2005 - 2006 YAMAMOTO Kengo < yamaken AT > Copyright ( c ) 2007 - 2008 SigScheme Project < uim - en AT googlegroups.com > 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyr...
18ec8c775b576cd26a2a01e204d71a2ea6f4ca6edbc731c4aba790a11c550ddf
oscaro/tools-io
user.clj
(ns user (:refer-clojure :rename {slurp core-slurp spit core-spit}) (:require [clojure.tools.namespace.repl :refer [refresh refresh-all]] [clojure.java.javadoc :refer [javadoc]] [clojure.pprint :refer [pprint]] [clojure.reflect :refer [reflect]] ...
null
https://raw.githubusercontent.com/oscaro/tools-io/faa015cd7eb67c41d81768360eff565bbc7d9639/dev/user.clj
clojure
(ns user (:refer-clojure :rename {slurp core-slurp spit core-spit}) (:require [clojure.tools.namespace.repl :refer [refresh refresh-all]] [clojure.java.javadoc :refer [javadoc]] [clojure.pprint :refer [pprint]] [clojure.reflect :refer [reflect]] ...
f8b8a8b61771b2b586e5b440ba91baa2b044965b4ec8341638376004ea4c64b1
EligiusSantori/L2Apf
login.scm
(module logic racket/base (require racket/contract (relative-in "../." "system/structure.scm" "system/connection.scm" (only-in "packet/packet.scm" get-packet-id) "packet/login/client/login_auth.scm" "packet/login/server/login_fail.scm" "packet/login/server/login_ok.scm" "packet/login/client/se...
null
https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/api/login.scm
scheme
(module logic racket/base (require racket/contract (relative-in "../." "system/structure.scm" "system/connection.scm" (only-in "packet/packet.scm" get-packet-id) "packet/login/client/login_auth.scm" "packet/login/server/login_fail.scm" "packet/login/server/login_ok.scm" "packet/login/client/se...
78e8f3d18cc66132aa0cec3b45b6d658daa15e06d22479bbb400a644af04ca8d
SKA-ScienceDataProcessor/RC
Maps.hs
# LANGUAGE ExistentialQuantification # {-# LANGUAGE BangPatterns #-} {- | Common data structures for naive interpreter -} module Flow.Run.Maps where import Control.Monad import Data.Binary import qualified Data.IntMap as IM import qualified Data.IntSet as IS import qualified Data.Map.Strict as Map import Flow.Inter...
null
https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS5/dna/flow/Flow/Run/Maps.hs
haskell
# LANGUAGE BangPatterns # | Common data structures for naive interpreter | Set of kernels This is used in interpretation for reasoning about data dependencies. Note that kernels are synonymous with their output data, so this also identifies a set of buffers we expect to be alive. | Set of domains Domain depe...
# LANGUAGE ExistentialQuantification # module Flow.Run.Maps where import Control.Monad import Data.Binary import qualified Data.IntMap as IM import qualified Data.IntSet as IS import qualified Data.Map.Strict as Map import Flow.Internal type KernelSet = IS.IntSet type DomainSet = IS.IntSet type DataMap = IM.IntM...
4fe0cad14924e603b42869822bf6ee277b33a1a78ec40706782eed02bf78659b
alt-romes/ghengin
Noise.hs
# LANGUAGE ViewPatterns # # LANGUAGE TypeFamilies # # LANGUAGE OverloadedLists # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} module Noise where import Data.List (foldl') import GHC.Float import Data.IORef import Control.Monad.IO.Class import Ghengin hiding (get) import Ghengin.Utils import Ghengin.Comp...
null
https://raw.githubusercontent.com/alt-romes/ghengin/a2305d781ed3548f94bee9f032f15564fae0936b/planets/Noise.hs
haskell
# LANGUAGE OverloadedStrings # pure $ or ([b1,b2,b3,b4,b5,b6,b7,b8,b9] :: [Bool]) Accumulator is noiseValue, frequency, and amplitude, and get updated for each layer >1 roughness will increase roughness as the layer increases Accumulator is noiseValue, frequency, amplitude, and weight, and get updated for each laye...
# LANGUAGE ViewPatterns # # LANGUAGE TypeFamilies # # LANGUAGE OverloadedLists # # LANGUAGE LambdaCase # module Noise where import Data.List (foldl') import GHC.Float import Data.IORef import Control.Monad.IO.Class import Ghengin hiding (get) import Ghengin.Utils import Ghengin.Component.UI import Numeric.Noise hidi...
67becd55034dd0d00cbdf33f30ca028bad038151ba7b1e0a511c41b600f738db
sealchain-project/sealchain
Yaml.hs
{-# LANGUAGE RankNTypes #-} # LANGUAGE RecordWildCards # # OPTIONS_GHC -fno - warn - orphans # -- | Infrastructure for parsing the .yaml network topology file module Pos.Infra.Network.Yaml ( Topology(..) , AllStaticallyKnownPeers(..) , DnsDomains(..) , KademliaParams(..) ...
null
https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/infra/src/Pos/Infra/Network/Yaml.hs
haskell
# LANGUAGE RankNTypes # | Infrastructure for parsing the .yaml network topology file opaque opaque opaque | Description of the network topology in a Yaml file This differs from 'Pos.Infra.Network.Types.Topology' because for static nodes this describes the entire network topology (all statically known nodes...
# LANGUAGE RecordWildCards # # OPTIONS_GHC -fno - warn - orphans # module Pos.Infra.Network.Yaml ( Topology(..) , AllStaticallyKnownPeers(..) , DnsDomains(..) , KademliaParams(..) , KademliaId(..) , KademliaAddress(..) , NodeRegion(..) , NodeRoutes(..)...
0722776a2f21f6dd6dacf94c08b87d1a836e0a2a4366707598fb7b44866e86c0
privet-kitty/cl-competitive
topological-sort.lisp
(defpackage :cp/topological-sort (:use :cl) (:export #:cycle-detected-error #:topological-sort) (:documentation "Provides topological sorting based on DFS. Reference: #Depth-first_search")) (in-package :cp/topological-sort) (define-condition cycle-detected-error (error) ((graph :initarg :graph :reader cycle-d...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/1c5e3f95e4ab91eee6f77c96139e7a8879a5a0c1/module/topological-sort.lisp
lisp
I don't introduce dynamic-extent here just because the compiler notes in
(defpackage :cp/topological-sort (:use :cl) (:export #:cycle-detected-error #:topological-sort) (:documentation "Provides topological sorting based on DFS. Reference: #Depth-first_search")) (in-package :cp/topological-sort) (define-condition cycle-detected-error (error) ((graph :initarg :graph :reader cycle-d...
64b2391ef6583ad92cfa0f2b2fc63e4726c846c87bd861f0bc87d97f88c4c77b
emqx/emqx
emqx_gateway_api_listeners_proto_v1.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2022 - 2023 EMQ 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 o...
null
https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_gateway/src/proto/emqx_gateway_api_listeners_proto_v1.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 ) 2022 - 2023 EMQ 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(emqx_gateway_api_listeners_proto_v1). -behaviour(emqx_bpapi). -export([ introduced...
f2c480d9f0c19bbde7aefbe5251fb33ff4ecc52f45c772f432e613d33e558ae6
danieljharvey/mimsa
Inliner.hs
# LANGUAGE FlexibleContexts # module Language.Mimsa.Transform.Inliner ( inlineInternal, InlineState (..), inline, storeExprInState, howTrivial, shouldInline, ) where import Control.Monad.Reader import Control.Monad.State import qualified Data.List.NonEmpty as NE import Data.Map.Strict (Map) im...
null
https://raw.githubusercontent.com/danieljharvey/mimsa/e6b177dd2c38e8a67d6e27063ca600406b3e6b56/compiler/src/Language/Mimsa/Transform/Inliner.hs
haskell
item that can be inlined, we can add useful info here to help our choices as we traverse the expression we learn shit static info we can use | should we inline this expression? item is recursive, never inline it item is used once, always inline it item is not within a lambda, and is trivial, move it | complexit...
# LANGUAGE FlexibleContexts # module Language.Mimsa.Transform.Inliner ( inlineInternal, InlineState (..), inline, storeExprInState, howTrivial, shouldInline, ) where import Control.Monad.Reader import Control.Monad.State import qualified Data.List.NonEmpty as NE import Data.Map.Strict (Map) im...
6976ae51c74336df05a6a5c953c2c542dae1795188daf3c19a15bb0782c409ee
mbj/mhs
AWS.hs
module StackDeploy.AWS (listResource) where import Data.Conduit (ConduitT, (.|)) import Data.Conduit.Combinators (concatMap) import Network . AWS.Types as Exports import StackDeploy.Prelude import qualified Amazonka import qualified MRIO.Amazonka as AWS listResource :: (AWS.Env env, Amazonka.AWSPager a) => a ...
null
https://raw.githubusercontent.com/mbj/mhs/38bd5e387ec7f1ac23c9d5d807c0e8bb69bb751a/stack-deploy/src/StackDeploy/AWS.hs
haskell
module StackDeploy.AWS (listResource) where import Data.Conduit (ConduitT, (.|)) import Data.Conduit.Combinators (concatMap) import Network . AWS.Types as Exports import StackDeploy.Prelude import qualified Amazonka import qualified MRIO.Amazonka as AWS listResource :: (AWS.Env env, Amazonka.AWSPager a) => a ...
2d669d52fee6528057ac60b6b295c9d1b8245effd98d798bc031dc871838ebf6
cs136/seashell
crypto.rkt
#lang racket (require rackunit seashell/seashell-config seashell/crypto) (define/provide-test-suite crypto-suite (test-suite "Crypto Tests" (test-case "Encrypt and decrypt" (define enc (let-values ([(a b c) (seashell-encrypt #"Kaleb is cool!!!" #"bababooey" #"hey")]) (lis...
null
https://raw.githubusercontent.com/cs136/seashell/17cc2b0a6d2cdac270d7168e03aa5fed88f9eb02/src/tests/tests/crypto.rkt
racket
#lang racket (require rackunit seashell/seashell-config seashell/crypto) (define/provide-test-suite crypto-suite (test-suite "Crypto Tests" (test-case "Encrypt and decrypt" (define enc (let-values ([(a b c) (seashell-encrypt #"Kaleb is cool!!!" #"bababooey" #"hey")]) (lis...
af38eebc6e22c9116c93090250c169bb714c379d85ef38ba3453fe94397f4f2a
aryx/lfs
id.ml
(** Ensures property df by using identifiers. *) open Logic module type PARAM = sig val toks_any : Syntax.t_list val toks_this : Syntax.t_list end module Make (Param : PARAM) (L : T) = struct include Default let props = fixpoint (fun () -> let l = L.props () in {(no_props "Id") wi...
null
https://raw.githubusercontent.com/aryx/lfs/b931530c7132b77dfaf3c99d452dc044fce37589/logfun/src/id.ml
ocaml
* Ensures property df by using identifiers. counter for producing unique descriptors
open Logic module type PARAM = sig val toks_any : Syntax.t_list val toks_this : Syntax.t_list end module Make (Param : PARAM) (L : T) = struct include Default let props = fixpoint (fun () -> let l = L.props () in {(no_props "Id") with df = isok; st = l.st; st' = l.st';...
4c76073ac7e144b32aa50f21293168a7a035e96895453a0c2cd43ad33210deda
pmundkur/flowcaml
transl_typeexpr.ml
(**************************************************************************) (* *) (* *) , Projet C...
null
https://raw.githubusercontent.com/pmundkur/flowcaml/ddfa8a37e1cb60f42650bed8030036ac313e048a/src-flowcaml/typing/transl_typeexpr.ml
ocaml
************************************************************************ et en Automatique. All ri...
, Projet Cristal , INRIA Rocquencourt Copyright 2002 , 2003 Institut National de Recherche en Informatique under the terms of the Q Public License version 1.0 . $ I d : transl_typeexpr.ml , v 1.5 2003...
a537ce295de12c23960ab0a0802a2863dc9c7ba911da2a8e0961d81d06a73cf6
haskoin/haskoin-core
AddressSpec.hs
{-# LANGUAGE OverloadedStrings #-} module Haskoin.AddressSpec (spec) where import Data.ByteString (ByteString) import qualified Data.ByteString as BS (append, empty, pack) import Data.Maybe (fromJust, isJust) import Data.Text (Text) import qualified Data.Text as T import Haskoin.Address import Haskoin.Constants impor...
null
https://raw.githubusercontent.com/haskoin/haskoin-core/d155f8803ce73f1211b4f7456e63d27ea9a48b96/test/Haskoin/AddressSpec.hs
haskell
# LANGUAGE OverloadedStrings # Test vectors from: Test vectors from:
module Haskoin.AddressSpec (spec) where import Data.ByteString (ByteString) import qualified Data.ByteString as BS (append, empty, pack) import Data.Maybe (fromJust, isJust) import Data.Text (Text) import qualified Data.Text as T import Haskoin.Address import Haskoin.Constants import Haskoin.Data import Haskoin.Keys ...
8f98be5c5c2dd5dc8f608777e5e52db72307c19113291ca60e21f6bfef90ac77
jphmrst/bps
ATMSTests.hs
| Description : Testing assumption - based truth maintenance systems ( ATMSes ) Copyright : ( c ) , 2022 , and Xerox Corporation , 1986 - 1993 License : AllRightsReserved Maintainer : Stability : experimental Portability : POSIX Testing the translation of Forbus and...
null
https://raw.githubusercontent.com/jphmrst/bps/7a050b8bbc84114434f58f0e2f8b751ee41e889a/src/test/haskell/ATMSTests.hs
haskell
| Description : Testing assumption - based truth maintenance systems ( ATMSes ) Copyright : ( c ) , 2022 , and Xerox Corporation , 1986 - 1993 License : AllRightsReserved Maintainer : Stability : experimental Portability : POSIX Testing the translation of Forbus and...
3e97c615733f93bce9535c62835a0d26e8d16e29b3904a06dc793ba7c1145fd7
earl-ducaine/cl-garnet
xomax-xo-ul.lisp
Xoanon OS user interface language . ;;The
null
https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/src/contrib/garnet-desktop-lab/xomax-xo-ul.lisp
lisp
The
Xoanon OS user interface language .
706a80fc47658511bbf3f1ea27f0d510bb5a96f9c31c7a00d25ce53a961d1f51
skeuchel/needle
TermEnv.hs
module KnotCore.Elaboration.TermEnv where import Control.Applicative import Control.Monad import Coq.Syntax import KnotCore.Syntax import KnotCore.Elaboration.Core eEnvDecl :: Elab m => EnvDecl -> m Sentence eEnvDecl (EnvDecl etn _ ctors) = localNames $ do ev <- freshEnvVariable etn ctors <- for ctors $ \cn ...
null
https://raw.githubusercontent.com/skeuchel/needle/25f46005d37571c1585805487a47950dcd588269/src/KnotCore/Elaboration/TermEnv.hs
haskell
module KnotCore.Elaboration.TermEnv where import Control.Applicative import Control.Monad import Coq.Syntax import KnotCore.Syntax import KnotCore.Elaboration.Core eEnvDecl :: Elab m => EnvDecl -> m Sentence eEnvDecl (EnvDecl etn _ ctors) = localNames $ do ev <- freshEnvVariable etn ctors <- for ctors $ \cn ...
d8c86192527c4cfbeca6a53338ac884a292588a0ab5515da8795abb73eac2edd
Wavenet/http_proxy
http_transfer.erl
%%% http_transfer.erl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @author < > 2013 - 2015 Global Wavenet ( Pty ) Ltd %%% @end Licensed under the Apache License , Version 2.0 ( the " License " ) ; %%% you may not use this file except in compliance with the License. %%% You may...
null
https://raw.githubusercontent.com/Wavenet/http_proxy/a66bbf5607fd8610a66355467378c171f8f65ce8/test/http_transfer.erl
erlang
http_transfer.erl @end 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 speci...
@author < > 2013 - 2015 Global Wavenet ( Pty ) Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(http_transfer). -export([te/3]). -define(CHUNKSIZE, 512). te(SessionID, Env, Input)-> Headers = "Content-...
f32182df0f485276c4e8f090fc68e2266a0404c4294b3fb24dc222ee475df559
finnishtransportagency/harja
tietyoilmoitukset.clj
(ns harja.palvelin.palvelut.tietyoilmoitukset (:require [clj-time.coerce :as c :refer [from-sql-time]] [clojure.core.async :as async] [clojure.spec.alpha :as s] [clojure.string :as clj-str] [com.stuartsierra.component :as component] [slingshot.slingshot :refer [throw+ try+]] [specql.core :...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/9e9e2e75ce8384d2f2705407d6fc2cc68948c1cb/src/clj/harja/palvelin/palvelut/tietyoilmoitukset.clj
clojure
(ns harja.palvelin.palvelut.tietyoilmoitukset (:require [clj-time.coerce :as c :refer [from-sql-time]] [clojure.core.async :as async] [clojure.spec.alpha :as s] [clojure.string :as clj-str] [com.stuartsierra.component :as component] [slingshot.slingshot :refer [throw+ try+]] [specql.core :...
19e40e683b67c28aa377ca67591fb3c005794517c9f3e04d65932474573be3ce
MinaProtocol/ppx_optcomp
interpreter.ml
open Base open Ppxlib open Ast_builder.Default module Filename = Caml.Filename module Parsing = Caml.Parsing module Type = struct type t = | Var of string | Bool | Int | Char | String | Tuple of t list let rec to_core_type loc t = let constr x = ptyp_constr ~loc {txt= lident x; loc} ...
null
https://raw.githubusercontent.com/MinaProtocol/ppx_optcomp/2dfcf8104b1afee1a9ed0393d1f9f734c707e5c5/src/interpreter.ml
ocaml
* Location at which it was defined/undefined +-----------------------------------------------------------------+ | Expression evaluation | +-----------------------------------------------------------------+ Let-binding Pattern matching +---------------------------...
open Base open Ppxlib open Ast_builder.Default module Filename = Caml.Filename module Parsing = Caml.Parsing module Type = struct type t = | Var of string | Bool | Int | Char | String | Tuple of t list let rec to_core_type loc t = let constr x = ptyp_constr ~loc {txt= lident x; loc} ...
b8b1d01b527b4f07679a7eeb82aa15d81e32012fde3a35628277423b799e23f4
racket/web-server
dispatch-files.rkt
#lang racket/base (require net/url racket/match racket/list racket/contract racket/bool) (require web-server/dispatchers/dispatch web-server/private/util web-server/http web-server/http/response web-server/dispatchers/filesystem-map) (provide/con...
null
https://raw.githubusercontent.com/racket/web-server/6894bf2b9f62ec7378b3c07c10cab0aeb613aa0b/web-server-lib/web-server/dispatchers/dispatch-files.rkt
racket
looks-like-directory : str -> bool to determine if is url style path looks like it refers to a directory path? -> boolean? Returns a list of pairs of the byte offsets specified in an HTTP Range header, or #f if the header is missing or malformed. The HTTP spec for the Range header can be found here: -sec1...
#lang racket/base (require net/url racket/match racket/list racket/contract racket/bool) (require web-server/dispatchers/dispatch web-server/private/util web-server/http web-server/http/response web-server/dispatchers/filesystem-map) (provide/con...
554aa7aef68133fac01829288aab1e759a2095ccd633e762e92050e971b50be1
graninas/Hydra
AstroObject.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DuplicateRecordFields # module Astro.Domain.AstroObject where import Hydra.Prelude import Astro.Domain.Types type AstroObjectId = Int32 data AstroObject = AstroObject { astroObjectId :: AstroObjectId , name :: Maybe Text , objectCass ...
null
https://raw.githubusercontent.com/graninas/Hydra/7ce16e705c2ce166f954dcca3910f258ae9b950c/app/astro/src/Astro/Domain/AstroObject.hs
haskell
# LANGUAGE DeriveAnyClass #
# LANGUAGE DuplicateRecordFields # module Astro.Domain.AstroObject where import Hydra.Prelude import Astro.Domain.Types type AstroObjectId = Int32 data AstroObject = AstroObject { astroObjectId :: AstroObjectId , name :: Maybe Text , objectCass :: Text , code :: T...
158e74c88fd121f6ca89211e9d2b579ef7487565b9c75d8071285d2bcc5db5b9
Phaetec/pogo-cruncher
main.cljs
(ns cruncher.communication.main (:require [ajax.core :refer [GET POST]] [cruncher.communication.utils :as clib] [cruncher.config :as config] [cruncher.utils.lib :as lib])) Generic helpers (defn something-went-wrong? "Given a status message from the API, show an error message. ...
null
https://raw.githubusercontent.com/Phaetec/pogo-cruncher/a93bd16cc4d118d2ec57c2a641bd1b11be0d133d/frontend/src/cruncher/communication/main.cljs
clojure
Handlers Requests Routes
(ns cruncher.communication.main (:require [ajax.core :refer [GET POST]] [cruncher.communication.utils :as clib] [cruncher.config :as config] [cruncher.utils.lib :as lib])) Generic helpers (defn something-went-wrong? "Given a status message from the API, show an error message. ...
4e8ee590116021c014f2aa45fc0bf42844a1b70f77ad720838275246c9eea40a
fetburner/Coq2SML
term_typing.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/kernel/term_typing.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 **********************************************************************
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Term open Uni...
83abcd55bb97cb476fa910ee7743acc925ec8c65e06b2725d7b97697fd012d2e
K2InformaticsGmbH/egambo
egambo_session_sup.erl
-module(egambo_session_sup). -behaviour(supervisor). -include("egambo.hrl"). %% API -export([ start_link/0, start_session/2, start_session/3, close_session/1, list_sessions/0 ]). %% Supervisor callbacks -export([init/1]). %% Helper macro for declaring children of supervisor -define(CHILD(I), {I,...
null
https://raw.githubusercontent.com/K2InformaticsGmbH/egambo/e8bdf971f188a2139db52712ab5b9d87b2f11520/src/egambo_session_sup.erl
erlang
API Supervisor callbacks Helper macro for declaring children of supervisor =================================================================== API functions =================================================================== From tcp there is no xsrf token. ======================================================...
-module(egambo_session_sup). -behaviour(supervisor). -include("egambo.hrl"). -export([ start_link/0, start_session/2, start_session/3, close_session/1, list_sessions/0 ]). -export([init/1]). -define(CHILD(I), {I, {I, start_link, []}, temporary, 5000, worker, [I]}). -spec start_link() -> ignore ...
4fc265ce787b2e56f36f0f8fa6daafe35a0635b947b313073af35fbb9624d64e
graninas/Hydra
Algorithms.hs
{-| Functions used for assessment of cell space occupation or player options with regard to cell space limitations. -} module Labyrinth.Algorithms where import qualified Data.Map as Map import qualified Data.Set as Set import Labyrinth.Prelude import Labyrinth.Domain emptyLabyrinthInfo :: LabyrinthInfo emptyLaby...
null
https://raw.githubusercontent.com/graninas/Hydra/60d591b1300528f5ffd93efa205012eebdd0286c/app/labyrinth/src/Labyrinth/Algorithms.hs
haskell
| Functions used for assessment of cell space occupation or player options with regard to cell space limitations.
module Labyrinth.Algorithms where import qualified Data.Map as Map import qualified Data.Set as Set import Labyrinth.Prelude import Labyrinth.Domain emptyLabyrinthInfo :: LabyrinthInfo emptyLabyrinthInfo = LabyrinthInfo ( 0 , 0 ) Map.empty Set.empty Nothing Nothing Map.empty emptyLabyrinthInfo = LabyrinthInfo ...
d9810caf64f30323b29033967db57c85a8dbca689b09255194bd14c1573c4c16
hiredman/clojurebot
edit.clj
(ns hiredman.clojurebot.edit (:require [hiredman.clojurebot.core :as core])) (core/defresponder ::edit 0 (core/dfn (and (:addressed? (meta msg)) (re-find #"^.* = s/.*/.*/" (core/extract-message bot msg)))) ;; (let [m (core/extract-message bot msg) [_ original replacement] (.split (re-f...
null
https://raw.githubusercontent.com/hiredman/clojurebot/1e8bde92f2dd45bb7928d4db17de8ec48557ead1/src/hiredman/clojurebot/edit.clj
clojure
(ns hiredman.clojurebot.edit (:require [hiredman.clojurebot.core :as core])) (core/defresponder ::edit 0 (core/dfn (and (:addressed? (meta msg)) (let [m (core/extract-message bot msg) [_ original replacement] (.split (re-find #"s/.*/.*/" m) "/")] (prn [original replacement]))) (core/remove-dispatch...
c35268eb1e0f37d019ca8a95deadbfd6edebc715a1ae798ea369bee18ad55793
cirodrig/triolet
Eval.hs
module Type.Eval (reduceToWhnf, normalize, -- * Computing and checking types typeKind, typeBaseKind, typeCheckType, typeOfTypeApp, typeOfApp, -- * Deconstructing types deconVarAppType, deconFunType, deconAllType, d...
null
https://raw.githubusercontent.com/cirodrig/triolet/e515a1dc0d6b3e546320eac7b71fb36cea5b53d0/src/program/Type/Eval.hs
haskell
* Computing and checking types * Deconstructing types * Other functions | Evaluate a type as much as possible. The type is assumed to be well-kinded. | Get the type of a type, as a base kind. Minimal error checking is performed. | Get the type of a type. Minimal error checking is performed. Assume the a...
module Type.Eval (reduceToWhnf, normalize, typeKind, typeBaseKind, typeCheckType, typeOfTypeApp, typeOfApp, deconVarAppType, deconFunType, deconAllType, deconUniversalType, deconFunctionType, deconForallFunType, ...
41741532ce62663f6f01e8ccf8dc69104eb8b98798688a2cf5b44409e02e925e
mirleft/ocaml-x509
general_name.ml
type _ k = | Other : Asn.oid -> string list k | Rfc_822 : string list k | DNS : string list k | X400_address : unit k | Directory : Distinguished_name.t list k | EDI_party : (string option * string) list k | URI : string list k | IP : Cstruct.t list k | Registered_id : Asn.oid list k module K = struc...
null
https://raw.githubusercontent.com/mirleft/ocaml-x509/13eda5db42d6a68c6f5ad1e59a0878a2c57b77e6/lib/general_name.ml
ocaml
GeneralName is also pretty pervasive. Horrible crap, need to fill it. Everybody uses this as explicit, contrary to x509 (?)
type _ k = | Other : Asn.oid -> string list k | Rfc_822 : string list k | DNS : string list k | X400_address : unit k | Directory : Distinguished_name.t list k | EDI_party : (string option * string) list k | URI : string list k | IP : Cstruct.t list k | Registered_id : Asn.oid list k module K = struc...
976583b92677f306f56552f8e09e67e124d360e4165f63a100abe3d954444beb
triffon/fp-2022-23
07.count-p.rkt
#lang racket (require rackunit) (require rackunit/text-ui) (require "common.03.rkt") # # # Зад 7 , ` pred ? ` сред ` a ` , ` ( next a ) ` , ` ( next ( next a ) ) ` , ... , ` b ` . (define (count-p pred? a b next) 'тук) (run-tests (test-suite "count-p tests" (check-eq? (count-p number? 1 5 1+) ...
null
https://raw.githubusercontent.com/triffon/fp-2022-23/8032ec7a176f0e087bf38323ab087826ced40a3a/exercises/cs2/03.scheme.hof-accumulate/07.count-p.rkt
racket
#lang racket (require rackunit) (require rackunit/text-ui) (require "common.03.rkt") # # # Зад 7 , ` pred ? ` сред ` a ` , ` ( next a ) ` , ` ( next ( next a ) ) ` , ... , ` b ` . (define (count-p pred? a b next) 'тук) (run-tests (test-suite "count-p tests" (check-eq? (count-p number? 1 5 1+) ...
38bc1e9cd7d7aba327a7eb3823fa34f47e80144c19901fb43fbe27fe4787d5e9
anik545/OwlPPL
test_helpers.ml
(* Unit tests for the helpers module *) open Ppl open Core let l_to_prob = List.map ~f:(fun (x, p) -> (x, Prob.of_float p)) let l_of_prob = List.map ~f:(fun (x, p) -> (x, Prob.to_float p)) let test_normalise_sum_to_1 = QCheck_alcotest.to_alcotest @@ QCheck.Test.make ~count:1000 ~name:"test normalisation" ...
null
https://raw.githubusercontent.com/anik545/OwlPPL/ad650219769d5f32564cc771d63c9a52289043a5/ppl/test/unit_tests/test_helpers.ml
ocaml
Unit tests for the helpers module input, expected output ("sums to 0", [ ('a', 0.) ], ['a', -.nan]); let f = time (fun () -> ()) [ test_normalise_sum_to_1 ] @
open Ppl open Core let l_to_prob = List.map ~f:(fun (x, p) -> (x, Prob.of_float p)) let l_of_prob = List.map ~f:(fun (x, p) -> (x, Prob.to_float p)) let test_normalise_sum_to_1 = QCheck_alcotest.to_alcotest @@ QCheck.Test.make ~count:1000 ~name:"test normalisation" QCheck.(list (pair int float)) Fl...
9b09beba6358c457878a6a82544dcb889a83dcac6e7c533bc6630b153ab6d9ab
vii/teepeedee2
html.lisp
(in-package #:tpd2.ml) (define-dtd :teepeedee2.ml.html (:nicknames #:tpd2.ml.html) These tag definitions were obtained from XEmacs ' PSGML from the HTML 4 Strict (object :attributes (id class style title lang dir onclick ondblclick onmousedown onmouseup onmouseover onmousemove onmouseout onkeypress onkeydown on...
null
https://raw.githubusercontent.com/vii/teepeedee2/a2ed78c51d782993591c3284562daeed3aba3d40/src/ml/html.lisp
lisp
(in-package #:tpd2.ml) (define-dtd :teepeedee2.ml.html (:nicknames #:tpd2.ml.html) These tag definitions were obtained from XEmacs ' PSGML from the HTML 4 Strict (object :attributes (id class style title lang dir onclick ondblclick onmousedown onmouseup onmouseover onmousemove onmouseout onkeypress onkeydown on...
183d5a6f9cfea22bf72243109941ed045d53e2324ec4cba42d3b545a5641082e
ktakashi/sagittarius-scheme
hmac_sha3_256_test.scm
(test-hmac "hmac_sha3_256_test" :algorithm "HMACSHA3-256" :key-size 256 :tag-size 256 :tests '(#(1 "empty message" #vu8(30 34 92 175 185 3 57 187 161 178 64 118 212 32 108 62 121 195 85 128 93 133 22 130 188 129 139 170 79 90 119 121) #vu8() #vu8(163 197 132 112 175 168 131 93 ...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/e4187eaa8221fad00d7e340019c30429e8824694/ext/crypto/tests/testvectors/hmac/hmac_sha3_256_test.scm
scheme
(test-hmac "hmac_sha3_256_test" :algorithm "HMACSHA3-256" :key-size 256 :tag-size 256 :tests '(#(1 "empty message" #vu8(30 34 92 175 185 3 57 187 161 178 64 118 212 32 108 62 121 195 85 128 93 133 22 130 188 129 139 170 79 90 119 121) #vu8() #vu8(163 197 132 112 175 168 131 93 ...
61380d12a236bd937a332c051b54ea4c245871b694d469fea47efbffded7ba07
haskell-foundation/foundation
Block.hs
-- | -- Module : Basement.Sized.Block -- License : BSD-style Maintainer : Haskell Foundation -- -- A Nat-sized version of Block # LANGUAGE AllowAmbiguousTypes # # LANGUAGE CPP # {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} # LANGUAG...
null
https://raw.githubusercontent.com/haskell-foundation/foundation/58568e9f5368170d272000ecf16ef64fb91d0732/basement/Basement/Sized/Block.hs
haskell
| Module : Basement.Sized.Block License : BSD-style A Nat-sized version of Block # LANGUAGE ConstraintKinds # # LANGUAGE DataKinds # # LANGUAGE TypeOperators # | Sized version of 'Block' | Create a new unpinned mutable block of a specific N size of 'ty' elements...
Maintainer : Haskell Foundation # LANGUAGE AllowAmbiguousTypes # # LANGUAGE CPP # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # #if __GLASGOW_HASKELL__ >= 806 # LANGUAGE NoStarIsType # #endif ...
110d9ee9fc734d9a13a1dd111eecf978402836a77adff5703c2e861580708f4d
kupl/FixML
sub67.ml
type aexp = | Const of int | Var of string | Power of string * int | Times of aexp list | Sum of aexp list let rec calcPower : aexp * string -> aexp = fun (power, var) -> match power, var with |Power (variable, exponent), diffVar -> if variable = diffVar then Times [Const(exponent); Power(vari...
null
https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/differentiate/diff1/submissions/sub67.ml
ocaml
type aexp = | Const of int | Var of string | Power of string * int | Times of aexp list | Sum of aexp list let rec calcPower : aexp * string -> aexp = fun (power, var) -> match power, var with |Power (variable, exponent), diffVar -> if variable = diffVar then Times [Const(exponent); Power(vari...
23781433fa3db77e7a6f4daf555e5b10cbc6fb4eae8755a53ffa6bd2a7a43813
clj-commons/rewrite-clj
transform_test.cljc
(ns rewrite-clj.transform-test (:require [clojure.string :as string] [clojure.test :refer [deftest testing is]] [rewrite-clj.zip :as z])) (deftest t-transform (let [data-string (str ";; This is a Project File.\n" "(defproject my-project \"0.1.0-SNAPSHOT\"\n" ...
null
https://raw.githubusercontent.com/clj-commons/rewrite-clj/7621126caae5f21dc5150d52a6c9b747dc0aeeff/test/rewrite_clj/transform_test.cljc
clojure
(ns rewrite-clj.transform-test (:require [clojure.string :as string] [clojure.test :refer [deftest testing is]] [rewrite-clj.zip :as z])) (deftest t-transform (let [data-string (str ";; This is a Project File.\n" "(defproject my-project \"0.1.0-SNAPSHOT\"\n" ...
d589df70c8ae239177828c5879f6cbd862cb32d08b8dcb756d292caff026872e
hamidreza-s/Tnesia
tnesia_tql_formatter_SUITE.erl
-module(tnesia_tql_formatter_SUITE). -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). -include("tnesia.hrl"). -compile(export_all). %%==================================================================== %% CT Callbacks %%===========================================================...
null
https://raw.githubusercontent.com/hamidreza-s/Tnesia/52a3a88a52b423fbc5959978c0bba61654166d47/test/tnesia_tql_formatter_SUITE.erl
erlang
==================================================================== CT Callbacks ==================================================================== -------------------------------------------------------------------- suite | groups | all -------------------------------------------------------------------- --------...
-module(tnesia_tql_formatter_SUITE). -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). -include("tnesia.hrl"). -compile(export_all). suite() -> [{timetrap, {seconds, 20}}]. groups() -> []. all() -> [ {exports, Functions} | _ ] = ?MODULE:module_info(), [ FName || {FName,...
c077edc21fee3fcc85d52a03c4904f17ab77432992e4d02d250d13f03fe09f97
tweag/servant-template
Config.hs
# LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE NamedFieldPuns # module API.Config where import Control.Monad.IO.Class (MonadIO) import Data.ByteString.Char8 (ByteString, pack) import Data.Text (Text, unpack) import Toml (TomlCodec, decodeFileExact, diwrap, int, table, text, (.=)) ...
null
https://raw.githubusercontent.com/tweag/servant-template/b5598af43ff69160c6d8a59d5e4a1f23358b6410/src/API/Config.hs
haskell
| The whole config needed by the application | The configuration parameters needed to expose the API | The configuration parameters needed to connect to a database | | Compute the connection string given a 'DatabaseConfig' | A bidirectional codec for 'DatabaseConfig' | A bidirectional codec for 'ApiConfig'...
# LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE NamedFieldPuns # module API.Config where import Control.Monad.IO.Class (MonadIO) import Data.ByteString.Char8 (ByteString, pack) import Data.Text (Text, unpack) import Toml (TomlCodec, decodeFileExact, diwrap, int, table, text, (.=)) ...
0de870e1486493349cab1358917ec5def67330faad31ad9ef9cec06a10bf6696
foggynight/typewriter
file.lisp
(in-package #:typewriter) (defun read-page-from-file (filename) "Create a new page with its text buffer filled with the contents of the file named filename." (let ((page (make-instance 'page))) (with-open-file (stream filename :if-does-not-exist nil) (if stream (setf (text-buffer page) ...
null
https://raw.githubusercontent.com/foggynight/typewriter/36f4e91d39401f39f194fa8e427c3917de929685/src/file.lisp
lisp
Remove trailing empty lines Remove trailing whitespace
(in-package #:typewriter) (defun read-page-from-file (filename) "Create a new page with its text buffer filled with the contents of the file named filename." (let ((page (make-instance 'page))) (with-open-file (stream filename :if-does-not-exist nil) (if stream (setf (text-buffer page) ...
84dd527ba79f6f071dbe8bfc59847ccb425c83f7f92f6b47a2155e35969e1a6f
kappelmann/engaging-large-scale-functional-programming
Exercise06.hs
module Exercise06 where data Colour = Gold | RustyBrown | TurtleGreen type Number = Int data Card = Card Colour Number tweedledumTweedledee :: [Either Colour Number] -> Integer tweedledumTweedledee [] = 0 tweedledumTweedledee ((Left Gold):xs) = 1 + tweedledumTweedledee xs tweedledumTweedledee ((Left _):xs) = tweedled...
null
https://raw.githubusercontent.com/kappelmann/engaging-large-scale-functional-programming/8ed2c056fbd611f1531230648497cb5436d489e4/resources/contest/example_data/06/uploads/foobar/Exercise06.hs
haskell
module Exercise06 where data Colour = Gold | RustyBrown | TurtleGreen type Number = Int data Card = Card Colour Number tweedledumTweedledee :: [Either Colour Number] -> Integer tweedledumTweedledee [] = 0 tweedledumTweedledee ((Left Gold):xs) = 1 + tweedledumTweedledee xs tweedledumTweedledee ((Left _):xs) = tweedled...
3f2cdcc82b4cf6c6827f07c1b37e3d1fc952ed05a0939fabe47a60cbd3610dd6
typeable/compaREST
SecurityScheme.hs
# OPTIONS_GHC -Wno - orphans # module Data.OpenApi.Compare.Validate.SecurityScheme ( ) where import Control.Monad import Data.OpenApi import Data.OpenApi.Compare.Behavior import Data.OpenApi.Compare.Orphans () import Data.OpenApi.Compare.Subtree import Data.OpenApi.Compare.Validate.OAuth2Flows instance Subtree S...
null
https://raw.githubusercontent.com/typeable/compaREST/6d8a67339c0e7b20a6c721eec7a2db093a0311fc/src/Data/OpenApi/Compare/Validate/SecurityScheme.hs
haskell
# OPTIONS_GHC -Wno - orphans # module Data.OpenApi.Compare.Validate.SecurityScheme ( ) where import Control.Monad import Data.OpenApi import Data.OpenApi.Compare.Behavior import Data.OpenApi.Compare.Orphans () import Data.OpenApi.Compare.Subtree import Data.OpenApi.Compare.Validate.OAuth2Flows instance Subtree S...
622054c2911b24377d7c1d607ec9f44ab1ecae12384a98cb65c340b5c1758b77
tochicool/bitcoin-dca
ScheduledBuys.hs
# LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE DataKinds # module BitcoinDCA.Test.Strategy.ScheduledBuys where import BitcoinDCA.Test.Types import BitcoinDCA.Common import BitcoinDCA.Strategy.ScheduledBuys import Data.Function import Data.Monoid import ...
null
https://raw.githubusercontent.com/tochicool/bitcoin-dca/642016f54595194127fcbd24ff11e0d7b358b011/test/BitcoinDCA/Test/Strategy/ScheduledBuys.hs
haskell
# LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE DataKinds # module BitcoinDCA.Test.Strategy.ScheduledBuys where import BitcoinDCA.Test.Types import BitcoinDCA.Common import BitcoinDCA.Strategy.ScheduledBuys import Data.Function import Data.Monoid import ...
fa3345ca58ad4445640f77f69b194e5d860cbe7f0179489119f5dc8d087e4602
puppetlabs/puppetdb
dashboard.clj
(ns puppetlabs.puppetdb.dashboard (:require [clojure.tools.logging :as log] [puppetlabs.puppetdb.middleware :as mid] [puppetlabs.puppetdb.utils :refer [call-unless-shutting-down]] [puppetlabs.trapperkeeper.core :refer [defservice]] [ring.util.response :as rr] ...
null
https://raw.githubusercontent.com/puppetlabs/puppetdb/b3d6d10555561657150fa70b6d1e609fba9c0eda/src/puppetlabs/puppetdb/dashboard.clj
clojure
Dashboard data endpoint Dashboard redirect
(ns puppetlabs.puppetdb.dashboard (:require [clojure.tools.logging :as log] [puppetlabs.puppetdb.middleware :as mid] [puppetlabs.puppetdb.utils :refer [call-unless-shutting-down]] [puppetlabs.trapperkeeper.core :refer [defservice]] [ring.util.response :as rr] ...
017c48840e1a8cacccc7d64f646a2e2b19300532a34a6c51691e455b585026e6
nyampass/conceit
assert.clj
(ns conceit.commons.test.assert (use conceit.commons conceit.commons.test clojure.test)) (deftest* assert-multi-test (nil? (assert-multi "hello")) (nil? (assert-multi "hello" "world")) (nil? (assert-multi (= 10 (+ 1 2 3 4)) (= 20 (* 4 5)))) (nil? (assert-multi)) (thrown? AssertionError (asser...
null
https://raw.githubusercontent.com/nyampass/conceit/2b8ba8cc3d732fe2f58d320e2aa4ecdd6f3f3be5/conceit-commons/test/conceit/commons/test/assert.clj
clojure
(run-tests)
(ns conceit.commons.test.assert (use conceit.commons conceit.commons.test clojure.test)) (deftest* assert-multi-test (nil? (assert-multi "hello")) (nil? (assert-multi "hello" "world")) (nil? (assert-multi (= 10 (+ 1 2 3 4)) (= 20 (* 4 5)))) (nil? (assert-multi)) (thrown? AssertionError (asser...
b8f7b5eb2d338326b6b60fb58650667b8f1f946285675a7bbaa0f8c4d5bf163e
zellige/zellige
PolygonSutherlandHodgman.hs
# LANGUAGE FlexibleContexts # -- TODO Change to linear ring. module Data.Geometry.Clip.Internal.PolygonSutherlandHodgman ( clipPolygonSh , clipPolygonsSh , clipPolygonMapSh , clipPolygonsMapSh ) where import qualified Data.Aeson as Aeson import qualified Data.Foldable ...
null
https://raw.githubusercontent.com/zellige/zellige/87e6dab11ac4c1843009043580f14422a1d83ebf/src/Data/Geometry/Clip/Internal/PolygonSutherlandHodgman.hs
haskell
TODO Change to linear ring.
# LANGUAGE FlexibleContexts # module Data.Geometry.Clip.Internal.PolygonSutherlandHodgman ( clipPolygonSh , clipPolygonsSh , clipPolygonMapSh , clipPolygonsMapSh ) where import qualified Data.Aeson as Aeson import qualified Data.Foldable as Foldable import qualified D...
74372af811cb84da690dc05bcfa55a9769619ea5a147efdcd4d0dc9a0b9a27f1
bsansouci/bsb-native
vivi2.ml
(***********************************************************************) (* *) (* ocamlbuild *) (* *) , , projet Galliu...
null
https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/ocamlbuild/test/test2/vivi2.ml
ocaml
********************************************************************* ocamlbuild ...
, , projet Gallium , INRIA Rocquencourt Copyright 2007 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 . let rec p i = [< '1; '2; p (i + 1) >] let vivi = [|3|]...
b7f40ce6217cd753a33ec644b8f7be24459b45f354e0639a87b6fd71d1fd9e5f
gator1/jepsen
project.clj
(defproject jepsen.etcd "0.1.0-SNAPSHOT" :description "A Jepsen test for etcd" :license {:name "Eclipse Public License" :url "-v10.html"} :main jepsen.etcd :dependencies [[org.clojure/clojure "1.8.0"] [ jepsen " 0.1.4 " ] [jepsen "0.1.6-SNAPSHOT"] [verschlimmbesser...
null
https://raw.githubusercontent.com/gator1/jepsen/1932cbd72cbc1f6c2a27abe0fe347ea989f0cfbb/etcd/project.clj
clojure
(defproject jepsen.etcd "0.1.0-SNAPSHOT" :description "A Jepsen test for etcd" :license {:name "Eclipse Public License" :url "-v10.html"} :main jepsen.etcd :dependencies [[org.clojure/clojure "1.8.0"] [ jepsen " 0.1.4 " ] [jepsen "0.1.6-SNAPSHOT"] [verschlimmbesser...
644a399e02059dc06da826ca9c3b78f7e235e0b396793bec9254c1353904afa5
IvanIvanov/fp2013
const-difference.scm
(define (const-difference list1 list2) (cond ((null? list1) #t) ((null? (cdr list1)) #t) ((= (- (car list1) (car list2)) (- (cadr list1) (cadr list2))) (const-difference (cdr list1) (cdr list2))) (else #f))) (const-difference '(1 2 3) '(1 2 3)) ; #t (const-difference '(1 ...
null
https://raw.githubusercontent.com/IvanIvanov/fp2013/2ac1bb1102cb65e0ecbfa8d2fb3ca69953ae4ecf/lab1/homework7/const-difference.scm
scheme
#t #t #f
(define (const-difference list1 list2) (cond ((null? list1) #t) ((null? (cdr list1)) #t) ((= (- (car list1) (car list2)) (- (cadr list1) (cadr list2))) (const-difference (cdr list1) (cdr list2))) (else #f)))
6c484767763aba715d00f446e1bc194c957e7fa420268c0c572fb96fcd4d0bf0
den1k/vimsical
fixture.clj
(ns vimsical.backend.components.delta-store.fixture (:require [clojure.test :as t] [com.stuartsierra.component :as cp] [vimsical.backend.adapters.cassandra.fixture :as cassandra] [vimsical.backend.components.delta-store :as delta-store])) ;; ;; * State ;; (def ^:dynamic *delta-store* nil) ;; ;; * Helpe...
null
https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/test/backend/vimsical/backend/components/delta_store/fixture.clj
clojure
* State * Helpers * Fixtures
(ns vimsical.backend.components.delta-store.fixture (:require [clojure.test :as t] [com.stuartsierra.component :as cp] [vimsical.backend.adapters.cassandra.fixture :as cassandra] [vimsical.backend.components.delta-store :as delta-store])) (def ^:dynamic *delta-store* nil) (defn- ->delta-store [] (->...