_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 |
|---|---|---|---|---|---|---|---|---|
a220456271d6dbfc0f866cdc20336809149ceff2a4c8795b88ad43901e609fa7 | annapawlicka/om-data-vis | core.cljs | (ns examples.lastfm-chart.core
(:require-macros [cljs.core.async.macros :refer [go go-loop]])
(:require [om.core :as om :include-macros true]
[cljs.core.async :refer [<! chan put! sliding-buffer]]
[ajax.core :refer (GET)]
[cljs.reader :as reader]
[om-data-vis.chart :... | null | https://raw.githubusercontent.com/annapawlicka/om-data-vis/4e0323cf4a58bc90e12f9ce99ed3b7cc21c0a5b6/examples/lastfm-chart/src/core.cljs | clojure | Entire Application View ;;;;;;;;;;;;; | (ns examples.lastfm-chart.core
(:require-macros [cljs.core.async.macros :refer [go go-loop]])
(:require [om.core :as om :include-macros true]
[cljs.core.async :refer [<! chan put! sliding-buffer]]
[ajax.core :refer (GET)]
[cljs.reader :as reader]
[om-data-vis.chart :... |
3131a3d1597578077971051ead6e1f401de0866801fc49341553943b5ed0e206 | purescript/purescript | LetPattern.hs | -- |
-- This module implements the desugaring pass which replaces patterns in let-in
-- expressions with appropriate case expressions.
--
module Language.PureScript.Sugar.LetPattern (desugarLetPatternModule) where
import Prelude
import Data.List (groupBy)
import Data.Function (on)
import Language.PureScript.AST
impo... | null | https://raw.githubusercontent.com/purescript/purescript/02bd6ae60bcd18cbfa892f268ef6359d84ed7c9b/src/Language/PureScript/Sugar/LetPattern.hs | haskell | |
This module implements the desugaring pass which replaces patterns in let-in
expressions with appropriate case expressions.
expressions.
^ Metadata about whether the let-in was a where clause
^ The original let-in result expression | module Language.PureScript.Sugar.LetPattern (desugarLetPatternModule) where
import Prelude
import Data.List (groupBy)
import Data.Function (on)
import Language.PureScript.AST
import Language.PureScript.Crash
| Replace every @BoundValueDeclaration@ in expressions with @Case@
desugarLetPatternModule :: Module -> M... |
c08b47dcbe430ff04b7cc31d636ee9637894a9b0989153dd148feed59d7df4c0 | Viasat/halite | prop_choco.clj | Copyright ( c ) 2022 Viasat , Inc.
Licensed under the MIT license
(ns com.viasat.halite.propagate.prop-choco
"Handles propagation for single specs that can be directly mapped to com.viasat.halite.choco-clj-opt.
Specifically: single specs with (possibly optional) boolean or integer variables,
and no refinemen... | null | https://raw.githubusercontent.com/Viasat/halite/5a434fa2276f5f2654c4d91045595ae5bbc6580e/src/com/viasat/halite/propagate/prop_choco.clj | clojure | Copyright ( c ) 2022 Viasat , Inc.
Licensed under the MIT license
(ns com.viasat.halite.propagate.prop-choco
"Handles propagation for single specs that can be directly mapped to com.viasat.halite.choco-clj-opt.
Specifically: single specs with (possibly optional) boolean or integer variables,
and no refinemen... | |
c1be4ed10f528a58f5cb7f76e8122abb421e7402024ea9de7708fde47d242fbc | mbenke/zpf2013 | Expr.hs | {-# LANGUAGE DeriveDataTypeable #-}
module Expr where
import Text.ParserCombinators.Parsec
import Data.Char(digitToInt)
import Data.Typeable
import Data.Data
import Control.Applicative((<$>),(*>),(<*))
data Exp = EInt Int
| EAdd Exp Exp
| ESub Exp Exp
| EMul Exp Exp
| EDiv Exp Exp
... | null | https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Code/TH/QQ/Expr.hs | haskell | # LANGUAGE DeriveDataTypeable # | module Expr where
import Text.ParserCombinators.Parsec
import Data.Char(digitToInt)
import Data.Typeable
import Data.Data
import Control.Applicative((<$>),(*>),(<*))
data Exp = EInt Int
| EAdd Exp Exp
| ESub Exp Exp
| EMul Exp Exp
| EDiv Exp Exp
deriving(Show,Typeable,Da... |
07dc0174ccbc897bfbe5ca135bd9dd114833c2209eed6e718c376b9fd0a26f00 | BU-CS320/Fall-2018 | WarmUp.hs | module WarmUp where
-- create a list that is never empty
data NonEmptyList a -- deriving Show
example :: NonEmptyList Bool
example = undefined
len :: NonEmptyList a -> Integer
len = undefined
-- we'll come back to this later
instance Eq a => Eq (NonEmptyList a) where
x == y = undefined
--... | null | https://raw.githubusercontent.com/BU-CS320/Fall-2018/beec3ca88be5c5a62271a45c8053fb1b092e0af1/assignments/week4/hw/src/WarmUp.hs | haskell | create a list that is never empty
deriving Show
we'll come back to this later
instance Show a => Show (NonEmptyList a) where
show x = undefined
Think about what rules should go along with each class
insult some types
| module WarmUp where
example :: NonEmptyList Bool
example = undefined
len :: NonEmptyList a -> Integer
len = undefined
instance Eq a => Eq (NonEmptyList a) where
x == y = undefined
class Insultable a where
insult :: a -> String
cheerUp :: a -> String
cheerUp x = (insult x) ++ ... |
59bff4e276ec293bec87a1a90e804595116c0d9dcceb9e2f04525b0e33719ef1 | xively/clj-mqtt | publish_test.clj | (ns mqtt.packets.publish-test
(:use clojure.test
mqtt.test-helpers
mqtt.decoder
mqtt.encoder
mqtt.packets.common
mqtt.packets.publish)
(:require [clojure.string :as string])
(:import [io.netty.buffer Unpooled ByteBuf]
[io.netty.handler.codec EncoderException]))
... | null | https://raw.githubusercontent.com/xively/clj-mqtt/74964112505da717ea88279b62f239146450528c/test/mqtt/packets/publish_test.clj | clojure | fixed header
topic
payload
fixed header
remaining length
topic
message-id
payload
fixed header
remaining length
topic
payload
fixed header
remaining length
topic
payload
fixed header
remaining length
topic
payload
fixed header
remaining length
topic
fixed header
remaining length
topic
payload... | (ns mqtt.packets.publish-test
(:use clojure.test
mqtt.test-helpers
mqtt.decoder
mqtt.encoder
mqtt.packets.common
mqtt.packets.publish)
(:require [clojure.string :as string])
(:import [io.netty.buffer Unpooled ByteBuf]
[io.netty.handler.codec EncoderException]))
... |
c432d60749721249e98e5546cd1e6d4f91a0a24e4398025404e243478c94a965 | michiakig/LispInSmallPieces | chap6dd.scm | $ I d : chap6dd.scm , v 4.0 1995/07/10 06:51:39 queinnec Exp $
;;;(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
;;; This file is part of the files that accompany the book:
LISP Implantation Semantique Programmation ( InterEditions , France )
By Christian Queinnec < >
;;; Newest v... | null | https://raw.githubusercontent.com/michiakig/LispInSmallPieces/0a2762d539a5f4c7488fffe95722790ac475c2ea/src/chap6dd.scm | scheme | (((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
This file is part of the files that accompany the book:
Newest version may be retrieved from:
Check the README file before using this file.
(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
Variant of chap6d.scm where ... | $ I d : chap6dd.scm , v 4.0 1995/07/10 06:51:39 queinnec Exp $
LISP Implantation Semantique Programmation ( InterEditions , France )
By Christian Queinnec < >
( IP 128.93.2.54 ) ftp.inria.fr : INRIA / Projects / icsla / Books / LiSP*.tar.gz
(define (FROM-RIGHT-STORE-ARGUMENT m m* rank)
(lambda ()
... |
3321c591bcf4722043d4e1b98de2caf893536995b11d57291ff8affad986fa08 | fp-works/2019-winter-Haskell-school | Golf.hs | module Golf
( skips
, localMaxima
, histogram
) where
import Data.List
import Data.List.Index
This problem has two parts :
Part 1 : select every n - th element from the given list
e.g. given ( a , b , c , d ) , the 2nd elements are ( b , d ) , computed by
> dropping the el... | null | https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week3/weining/src/Golf.hs | haskell | module Golf
( skips
, localMaxima
, histogram
) where
import Data.List
import Data.List.Index
This problem has two parts :
Part 1 : select every n - th element from the given list
e.g. given ( a , b , c , d ) , the 2nd elements are ( b , d ) , computed by
> dropping the el... | |
33df4c3f347df62ceaf73bd746fc4f560ca3bd654e9f1d993bbfae97f1fd01cf | AdaCore/why3 | eliminate_let.ml | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
(* ... | null | https://raw.githubusercontent.com/AdaCore/why3/4441127004d53cf2cb0f722fed4a930ccf040ee4/src/transform/eliminate_let.ml | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
General Public License version 2.1 , with the special exception
open Term
let rec elim_t func pred t = match t.t_node with
| Tlet (t1,tb) when (if t.t_ty = None then p... |
838c42cfb1b76088f15315b1f8dd71e957a1d3b01dc626ef009b4d1359a035e9 | kyleburton/sandbox | handler.clj | (ns lol-champquiz.handler
(:require [compojure.core :refer [GET defroutes]]
[compojure.route :refer [not-found resources]]
[hiccup.page :refer [include-js include-css html5]]
[lol-champquiz.middleware :refer [wrap-middleware]]
[config.core :refer [env]]))
(def mount-ta... | null | https://raw.githubusercontent.com/kyleburton/sandbox/cccbcc9a97026336691063a0a7eb59293a35c31a/examples/clojure/lol-champquiz/src/clj/lol_champquiz/handler.clj | clojure | (ns lol-champquiz.handler
(:require [compojure.core :refer [GET defroutes]]
[compojure.route :refer [not-found resources]]
[hiccup.page :refer [include-js include-css html5]]
[lol-champquiz.middleware :refer [wrap-middleware]]
[config.core :refer [env]]))
(def mount-ta... | |
df89854b5835f51d665cc509c421911307b01647f58aab87008fdc3236f0c0aa | expipiplus1/vulkan | XR_KHR_vulkan_swapchain_format_list.hs | {-# language CPP #-}
-- | = Name
--
-- XR_KHR_vulkan_swapchain_format_list - instance extension
--
-- = Specification
--
-- See
-- <#XR_KHR_vulkan_swapchain_format_list XR_KHR_vulkan_swapchain_format_list>
-- in the main specification for complete information.
--
-- = Registered Extension Number
--
15
--
-- = Revisi... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/openxr/src/OpenXR/Extensions/XR_KHR_vulkan_swapchain_format_list.hs | haskell | # language CPP #
| = Name
XR_KHR_vulkan_swapchain_format_list - instance extension
= Specification
See
<#XR_KHR_vulkan_swapchain_format_list XR_KHR_vulkan_swapchain_format_list>
in the main specification for complete information.
= Registered Extension Number
= Revision
= Extension and Version Depende... | 15
3
- Requires OpenXR 1.0
- Requires @XR_KHR_vulkan_enable@
< #XR_KHR_vulkan_swapchain_format_list OpenXR Specification >
module OpenXR.Extensions.XR_KHR_vulkan_swapchain_format_list ( VulkanSwapchainFormatListCreateInfoKHR(..)
, KHR_vulkan... |
2d7d3c5c93554fc3f68452f98724dd8d6bf6fe39e6eafd8931cb3fc8c496a612 | tweag/webauthn | UAF.hs | -- | Stability: experimental
Types related to the FIDO UAF Protocol as defined in the relevant
-- [(spec)](-uaf-v1.2-ps-20201020/fido-uaf-protocol-v1.2-ps-20201020.html)
module Crypto.WebAuthn.Metadata.UAF
( AAID (..),
KeyIdentifier (..),
Version (..),
)
where
import Crypto.WebAuthn.Internal.Utils (jsonE... | null | https://raw.githubusercontent.com/tweag/webauthn/349a2b408a79107d9f07c017b72b03c9c306e5fa/src/Crypto/WebAuthn/Metadata/UAF.hs | haskell | | Stability: experimental
[(spec)](-uaf-v1.2-ps-20201020/fido-uaf-protocol-v1.2-ps-20201020.html)
| [(spec)](-uaf-v1.2-ps-20201020/fido-uaf-protocol-v1.2-ps-20201020.html#authenticator-attestation-id-aaid-typedef)
| [(spec)](-uaf-v1.2-ps-20201020/fido-uaf-protocol-v1.2-ps-20201020.html#version-interface)
| [(spec)... | Types related to the FIDO UAF Protocol as defined in the relevant
module Crypto.WebAuthn.Metadata.UAF
( AAID (..),
KeyIdentifier (..),
Version (..),
)
where
import Crypto.WebAuthn.Internal.Utils (jsonEncodingOptions)
import qualified Crypto.WebAuthn.Metadata.WebIDL as IDL
import qualified Data.Aeson as A... |
ed1de030d2b66980a7d3defdb5f276233c8ceb9a694da2f694aafc0d4a3659ad | falsetru/htdp | 43.2.10.scm | #lang racket
(require "43.2.7.scm")
(define eq-node? eq?)
(define (route-exists? orig dest visited-list)
(cond
[(eq-node? orig dest) true]
[(not (false? (memq orig visited-list))) false]
[else (route-exists? (node-to orig) dest (cons orig visited-list))]))
(define (reachable-list orig visited-list)
... | null | https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/43/43.2.10.scm | scheme |
For test. | #lang racket
(require "43.2.7.scm")
(define eq-node? eq?)
(define (route-exists? orig dest visited-list)
(cond
[(eq-node? orig dest) true]
[(not (false? (memq orig visited-list))) false]
[else (route-exists? (node-to orig) dest (cons orig visited-list))]))
(define (reachable-list orig visited-list)
... |
ac21969149711ce0e5b993e66cb9929bc55dc2b915f27b09f3beb91a180d2cd9 | tfausak/exercism-solutions | grade-school_test.hs | import Test.HUnit (Assertion, (@=?), runTestTT, Test(..))
import Control.Monad (void)
import qualified School as S
import Data.List (foldl')
testCase :: String -> Assertion -> Test
testCase label assertion = TestLabel label (TestCase assertion)
main :: IO ()
main = void $ runTestTT $ TestList
[ TestList school... | null | https://raw.githubusercontent.com/tfausak/exercism-solutions/5e6f93979cc61ef5e3b48a09ca316dfd7fcd319c/haskell/grade-school/grade-school_test.hs | haskell | import Test.HUnit (Assertion, (@=?), runTestTT, Test(..))
import Control.Monad (void)
import qualified School as S
import Data.List (foldl')
testCase :: String -> Assertion -> Test
testCase label assertion = TestLabel label (TestCase assertion)
main :: IO ()
main = void $ runTestTT $ TestList
[ TestList school... | |
9d2ad0fd57d4946967cf37d715ea2fa2215ad3bb9249f3a9562daea5813b1aca | florence/cover | cover-internal.rkt | #lang racket
(require (for-syntax racket/base))
(require racket/dict
syntax/modcode
racket/function
syntax/modread
syntax/modresolve
syntax/parse
racket/bool
racket/runtime-path
racket/match
racket/path
racket/syntax
rac... | null | https://raw.githubusercontent.com/florence/cover/bc17e4e22d47b1da91ddaa5eafefe28f4675e85c/cover-test/cover/tests/cover-internal.rkt | racket | #lang racket
(require (for-syntax racket/base))
(require racket/dict
syntax/modcode
racket/function
syntax/modread
syntax/modresolve
syntax/parse
racket/bool
racket/runtime-path
racket/match
racket/path
racket/syntax
rac... | |
212f37ac6a2a58aaf50a37f4452a6f21a4e50a0b55db5c54c7e9afc37aeaf552 | 8c6794b6/haskell-sc-scratch | tree.hs | |
Copyright : 8c6794b6 , 2014
License : BSD3
Maintainer :
Stability : experimental
Portability : unknown
Example showing sequence of actions and declarative node routing with functions
from " Sound . SC3.Tree " module .
Copyright : 8c6794b6, 2014
License : BSD3
Maintainer : ... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/hsc3-tree/src/example/tree.hs | haskell | --------------------------------------------------------------------------
Interactions
--------------------------------------------------------------------------
| Printing the default setting done by 'reset'.
| Assuming that the synth nodes added with 'act02' are running.
| Assuming that the synth nodes trans... | |
Copyright : 8c6794b6 , 2014
License : BSD3
Maintainer :
Stability : experimental
Portability : unknown
Example showing sequence of actions and declarative node routing with functions
from " Sound . SC3.Tree " module .
Copyright : 8c6794b6, 2014
License : BSD3
Maintainer : ... |
30defa05c7d211ed93f5516ad0d74084273d46fe3fb47332df097364feba3ede | e-bigmoon/haskell-blog | DatabaseDrivenNavbar.hs | #!/usr/bin/env stack
stack repl --resolver lts-15.4
--package monad - logger
--package persistent - sqlite
--package text
--package time
--package yesod
--package monad-logger
--package persistent-sqlite
--package text
--package time
--package yesod
-}
{-# LANGUAGE ... | null | https://raw.githubusercontent.com/e-bigmoon/haskell-blog/5c9e7c25f31ea6856c5d333e8e991dbceab21c56/sample-code/yesod/ch13/DatabaseDrivenNavbar.hs | haskell | resolver lts-15.4
package monad - logger
package persistent - sqlite
package text
package time
package yesod
package monad-logger
package persistent-sqlite
package text
package time
package yesod
# LANGUAGE DerivingStrategies #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings ... | #!/usr/bin/env stack
-}
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
import Control.Monad.Logger (runNoLoggingT)
import Data.Text ... |
a46b847086916c9081735b08895e07a93b0205adbf50e287be8899ec2bb8484d | kazu-yamamoto/quic | Error.hs | # LANGUAGE PatternSynonyms #
module Network.QUIC.Types.Error where
import qualified Network.TLS as TLS
import Network.TLS.QUIC
import Text.Printf
-- | Transport errors of QUIC.
newtype TransportError = TransportError Int deriving (Eq)
pattern NoError :: TransportError
pattern NoError ... | null | https://raw.githubusercontent.com/kazu-yamamoto/quic/9dee8dd6f77d636c347ce755e01257d058fdd572/Network/QUIC/Types/Error.hs | haskell | | Transport errors of QUIC.
| Converting a TLS alert to a corresponding transport error.
| Application protocol errors of QUIC. | # LANGUAGE PatternSynonyms #
module Network.QUIC.Types.Error where
import qualified Network.TLS as TLS
import Network.TLS.QUIC
import Text.Printf
newtype TransportError = TransportError Int deriving (Eq)
pattern NoError :: TransportError
pattern NoError = TransportError 0x0
patter... |
843c65678c7e9772b92c86f5946b7980585a1508e046f9e1b84d0281f8b6a9e3 | GrammaTech/sel | forth.lisp | ;;; forth.lisp --- software representation of Forth code
(defpackage :software-evolution-library/software/forth
(:nicknames :sel/software/forth :sel/sw/forth)
(:use :gt/full
:software-evolution-library
:software-evolution-library/software/simple)
(:export :forth))
(in-package :software-evolution-l... | null | https://raw.githubusercontent.com/GrammaTech/sel/a4238945dfbf98b67b9d8a10b08924634544f9f8/software/forth.lisp | lisp | forth.lisp --- software representation of Forth code
asm software objects | (defpackage :software-evolution-library/software/forth
(:nicknames :sel/software/forth :sel/sw/forth)
(:use :gt/full
:software-evolution-library
:software-evolution-library/software/simple)
(:export :forth))
(in-package :software-evolution-library/software/forth)
(in-readtable :curry-compose-reade... |
5d3b194d3aadd7ed1423889adf40457550a800f4dcffa57d42b7701b9cc3af9f | pixlsus/registry.gimp.org_static | glass-selection.scm | ; glass-selection.scm
;
version 1.0 [ gimphelp.org ]
last modified / tested by
; 01/01/2010 on GIMP-2.6.8
;
; Create Glass Effect of Selection
based upon glass-text.scm by
;
; LICENSE
;
; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public ... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/glass-selection.scm | scheme | glass-selection.scm
01/01/2010 on GIMP-2.6.8
Create Glass Effect of Selection
LICENSE
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even t... | version 1.0 [ gimphelp.org ]
last modified / tested by
based upon glass-text.scm by
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(define ... |
48e60fc208f87f958b1e92dde3f15411ff30e72159c26d644307e7d272c2c2fd | fluree/json-ld | util.cljc | (ns fluree.json-ld.impl.util
(:require #?(:clj [clojure.java.io :as io])
#?(:clj [clojure.edn :as edn]))
#?(:cljs (:require-macros [fluree.json-ld.impl.util :refer [try-catchall if-cljs]])))
#?(:clj (set! *warn-on-reflection* true))
#?(:clj (defn cljs-env?
"Take the &env from a macro, and te... | null | https://raw.githubusercontent.com/fluree/json-ld/353e90d7fe3fb4452c70a6c873edb684df662a03/src/fluree/json_ld/impl/util.cljc | clojure | (ns fluree.json-ld.impl.util
(:require #?(:clj [clojure.java.io :as io])
#?(:clj [clojure.edn :as edn]))
#?(:cljs (:require-macros [fluree.json-ld.impl.util :refer [try-catchall if-cljs]])))
#?(:clj (set! *warn-on-reflection* true))
#?(:clj (defn cljs-env?
"Take the &env from a macro, and te... | |
95451004e781b08d905bfd3ba3a971b5bfddf5f438ff41814f18562dff994db0 | ghcjs/jsaddle-dom | SVGEllipseElement.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGEllipseElement
(getCx, getCy, getRx, getRy, SVGEllipseElement(..),
gTypeSVGEllipseElement)
where
... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/SVGEllipseElement.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGEllipseElement
(getCx, getCy, getRx, getRy, SVGEllipseElement(..),
gTypeSVGEllipseElement)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromInteg... |
92d22c1025c631ffe9ab51f43ab5edbe7df0ae44f9861a019655689f607f214c | slegrand45/mysql_protocol | test_reset_connection.ml | open OUnit
open Mysql_protocol
let test1 connection =
let () =
assert_equal ~msg:"Reset connection"
(())
(Mp_client.reset_connection ~connection:connection)
in
()
let test connection _ =
try
test1 connection
with
| Mp_client.Error err as e -> (
let () = prerr_endline (Mp_clien... | null | https://raw.githubusercontent.com/slegrand45/mysql_protocol/eb28d33dfbee7b12f88a7f798c2dbb40e1fb1bb0/test/test_reset_connection.ml | ocaml | open OUnit
open Mysql_protocol
let test1 connection =
let () =
assert_equal ~msg:"Reset connection"
(())
(Mp_client.reset_connection ~connection:connection)
in
()
let test connection _ =
try
test1 connection
with
| Mp_client.Error err as e -> (
let () = prerr_endline (Mp_clien... | |
b1b6dce7ab025be0a7a7ccbe9e0b812df19c2baa4dca95a6db24b545c070529c | footprintanalytics/footprint-web | permissions_test.clj | (ns metabase.models.permissions-test
(:require [clojure.test :refer :all]
[metabase.models.collection :as collection :refer [Collection]]
[metabase.models.database :refer [Database]]
[metabase.models.permissions :as perms :refer [Permissions]]
[metabase.models.permissio... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/models/permissions_test.clj | clojure | ----------------------------------------------- valid-path? -----------------------------------------------
block permissions
download permissions
data model permissions
db details permissions
full admin (everything) root permissions
COMPANY-NET/ should get escaped to COMPANY-NET\/
my\\schema should get escaped... | (ns metabase.models.permissions-test
(:require [clojure.test :refer :all]
[metabase.models.collection :as collection :refer [Collection]]
[metabase.models.database :refer [Database]]
[metabase.models.permissions :as perms :refer [Permissions]]
[metabase.models.permissio... |
b7e1b710117d2c2d549ce5d288b24fea74297b871789968d5678a4205b8103f1 | dm3/sicp | e2_46_to_51.clj | (ns e2-46-to-51
(:use clojure.test))
2.46
;
; data abstraction definitions
(defn make-vect [x y]
[x y])
(defn xcor-vect [v]
(first v))
(defn ycor-vect [v]
(second v))
(deftest test-make-vect
(let [zo (make-vect 0 1)]
(is (= 0 (xcor-vect zo)))
(is (= 1 (ycor-vect zo)))))
; test data - should be ... | null | https://raw.githubusercontent.com/dm3/sicp/14f0361cbd0cce817d93e38dcc895f3e845515b1/src/main/clojure/e2_46_to_51.clj | clojure |
data abstraction definitions
test data - should be using quickcheck for testing operations
operations
test-data
This is a degenerate abstraction for frames - the `e2` part becomes the tail
of a list created by `(cons e1 e2)`.
Another exercise in abstraction and concept layering...
This was hard
a) Paints... | (ns e2-46-to-51
(:use clojure.test))
2.46
(defn make-vect [x y]
[x y])
(defn xcor-vect [v]
(first v))
(defn ycor-vect [v]
(second v))
(deftest test-make-vect
(let [zo (make-vect 0 1)]
(is (= 0 (xcor-vect zo)))
(is (= 1 (ycor-vect zo)))))
(def a {:data [(make-vect 0 0) (make-vect 1 1)] :add (mak... |
4015b4eda8400fbfd42f9a36719325b6100c1d71e2967978300937bc9a554c8c | 8c6794b6/haskell-sc-scratch | Scratch01.hs | {-# LANGUAGE Rank2Types #-}
|
Module : $ Header$
License : :
Stability : unstable
Portability : non - portable
Scratch written while reading web pages about rank n types .
Module : $Header$
License : BSD3
Maintainer :
Stability : unstable
Portability : non-portable
Scratch... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/LangExt/RankNTypes/Scratch01.hs | haskell | # LANGUAGE Rank2Types #
From: <>
> > foo id
> ('c',True)
---------------------------------------------------------------------------
From:
<-type-extensions.html>
| When adding {-# LANGUAGE GADTs #-} on top of the code, this data type will
Not working?
> f a1 == (3,'c') | |
Module : $ Header$
License : :
Stability : unstable
Portability : non - portable
Scratch written while reading web pages about rank n types .
Module : $Header$
License : BSD3
Maintainer :
Stability : unstable
Portability : non-portable
Scratch written while reading web p... |
bf9e7c34d3e48ae5b25d4c3d78abc10135bf0222654c2dbf6c7a68b0ec51116e | vernemq/vernemq | vmq_diversity_plugin.erl | Copyright 2018 Erlio GmbH Basel Switzerland ( )
%%
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, sof... | null | https://raw.githubusercontent.com/vernemq/vernemq/234d253250cb5371b97ebb588622076fdabc6a5f/apps/vmq_diversity/src/vmq_diversity_plugin.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 perm... | Copyright 2018 Erlio GmbH Basel Switzerland ( )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(vmq_diversity_plugin).
-include_lib("vernemq_dev/include/vernemq_dev.hrl").
-behaviour(gen_server).
-behaviour(auth... |
1e78bf28a4a83080e45718879d3e67bcb0d57f8bf616ae6fbc43dddf2eafa3eb | LeastAuthority/haskell-spake2 | Util.hs | {-|
Module: Crypto.Spake2.Util
Description: Miscellany. Mostly to do with serialization.
-}
module Crypto.Spake2.Util
( expandData
, expandArbitraryElementSeed
, bytesToNumber
, numberToBytes
, unsafeNumberToBytes
) where
import Protolude
import Crypto.Hash.Algorithms (SHA256)
import Crypto.Number.Seriali... | null | https://raw.githubusercontent.com/LeastAuthority/haskell-spake2/c191b9b8bcc38e2f6f8b3acb054418b8e363918e/src/Crypto/Spake2/Util.hs | haskell | |
Module: Crypto.Spake2.Util
Description: Miscellany. Mostly to do with serialization.
| Take an arbitrary sequence of bytes and expand it to be the given number
of bytes. Do this by extracting a pseudo-random key and expanding it using
XXX: I'm no crypto expert, but hard-coding an empty string as a salt
seems kin... | module Crypto.Spake2.Util
( expandData
, expandArbitraryElementSeed
, bytesToNumber
, numberToBytes
, unsafeNumberToBytes
) where
import Protolude
import Crypto.Hash.Algorithms (SHA256)
import Crypto.Number.Serialize (os2ip, i2ospOf, i2ospOf_)
import qualified Crypto.KDF.HKDF as HKDF
import Data.ByteArray... |
5e03adfa0b621416d99ea4ca0f8170d3f7b1e44708a26621253a6ec3e6a15627 | MLanguage/mlang | bir_roundops.mli | Copyright ( C ) 2019 - 2021 Inria , contributor :
< >
This program is free software : you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at your option ) any later
... | null | https://raw.githubusercontent.com/MLanguage/mlang/e6df03f8945380d3fc974f351509dcaabb61805f/src/mlang/backend_ir/bir_roundops.mli | ocaml | * Rounding operations to use in the interpreter
* The actual implementation of rounding operations depends on the chosen
representation of numbers, hence we need a functor
* Default rounding operations: those used in the PC/single-thread context | Copyright ( C ) 2019 - 2021 Inria , contributor :
< >
This program is free software : you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at your option ) any later
... |
6f34d0d91fa082414af66c722ce1f13aa94d8f70b7400bf7d5831fe4e04fafd4 | cartazio/tlaps | error.mli |
* error.mli --- errors
*
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* error.mli --- errors
*
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
(** Errors *)
type error (** The abstract type of errors *)
type t = error ... | null | https://raw.githubusercontent.com/cartazio/tlaps/562a34c066b636da7b921ae30fc5eacf83608280/src/pars/error.mli | ocaml | * Errors
* The abstract type of errors
* convenience
* Construct an error from the extents of a given dummy object.
* Add a new explanatory message.
* Add a new internal error message.
* Add a new "expecting" message.
* Set the "unexpected" message (adding one if it doesn't exist)
* Print the error on a given o... |
* error.mli --- errors
*
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* error.mli --- errors
*
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
val error : Loc.locus -> error
val err_combine : error -> error -> error
* unite two errors into a combined error
v... |
59a365cada30cded8fe083c34d848586814bcf52f4908b1e68f8004ac69bd2b6 | Armael/pixels | mini.ml | TODO : à modifier par l'addresse IP donnée le jour du TP
let ip = "127.0.0.1"
[ draw_pixel sock addr x y r g b ] envoie une commande serveur :
- [ sock ] , [ addr ] : le socket et addresse sur lesquels envoyer ( plus bas )
- [ x ] , [ y ] : les coordonnées du pixel à dessiner
- [ r ] , [ g... | null | https://raw.githubusercontent.com/Armael/pixels/fb724bf9891ffd78c8bea1838cbf15ba9fb3c1be/client/mini.ml | ocaml | TODO : à modifier par l'addresse IP donnée le jour du TP
let ip = "127.0.0.1"
[ draw_pixel sock addr x y r g b ] envoie une commande serveur :
- [ sock ] , [ addr ] : le socket et addresse sur lesquels envoyer ( plus bas )
- [ x ] , [ y ] : les coordonnées du pixel à dessiner
- [ r ] , [ g... | |
2411d69a72340d2e042617b69f9f1af8f7b62acc77f9aa17747d210cc14152ab | gebi/jungerl | erlmerge.erl | %%%----------------------------------------------------------------------
%%% File : erlmerge.erl
Created : 16 Mar 2005 by < >
Purpose : Installation tool for Erlang applications .
%%%----------------------------------------------------------------------
-module(erlmerge).
%% External exports
-export([run/0]... | null | https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/erlmerge/src/erlmerge.erl | erlang | ----------------------------------------------------------------------
File : erlmerge.erl
----------------------------------------------------------------------
External exports
name of application: atom()
description: string()
version number: string()
included modules: list_of_atoms()
registered names: list... | Created : 16 Mar 2005 by < >
Purpose : Installation tool for Erlang applications .
-module(erlmerge).
-export([run/0]).
-export([url/2]).
-export([get_all_app_files/0, parse_app_info/2]).
-define(elog(F,A), error_logger:info_msg("~p(~w): "++F, [?MODULE, ?LINE | A])).
-define(IS_BOOL(B), B == true ; B == fal... |
07486f27bd89a24f803519927141a7ff757aee3aa07efbc19ca444f72f54d209 | telekons/one-more-re-nightmare | sets.lisp | (in-package :one-more-re-nightmare)
isum.lisp
;; MAKE-TEST-FORM
;; To support large character sets, we need an implemention of a set of
;; characters. Traditional scanner generators would at some place just
enumerate the alphabet \Sigma , which is not feasible with large character
sets like Unicode .
;; We... | null | https://raw.githubusercontent.com/telekons/one-more-re-nightmare/c27f2e96ece56dc5689db0d5d3909e6f8a3744ef/Code/DFA-construction/sets.lisp | lisp | MAKE-TEST-FORM
To support large character sets, we need an implemention of a set of
characters. Traditional scanner generators would at some place just
We handle all transitions in the automaton as a set of of the codes of
the idea:
() is the empty set
(a b) is the set [a, b)
(a b c... | (in-package :one-more-re-nightmare)
isum.lisp
enumerate the alphabet \Sigma , which is not feasible with large character
sets like Unicode .
characters , expressed by an ISUM . The representation of such a set is
best defined by the ISUM - MEMBER function , but here is an overview to get
An ISUM is... |
be8707bd8cd90287d9501cba0cc24174167b7815e0665195de285d8079e38db3 | josephwilk/functions-as-patterns | project.clj | (defproject functions-as-patterns "0.1.0-SNAPSHOT"
:description "Exploring understanding functions through patterns"
:url "-as-patterns"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[net.mikera/imagez "0.12.0"]
... | null | https://raw.githubusercontent.com/josephwilk/functions-as-patterns/a0ef526b2f8b44755d49dd252c78afef67d5c282/project.clj | clojure | (defproject functions-as-patterns "0.1.0-SNAPSHOT"
:description "Exploring understanding functions through patterns"
:url "-as-patterns"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[net.mikera/imagez "0.12.0"]
... | |
04803a89b664da47dea8f03c912271dafbf976c43fb3c54468436a4d8d6328dd | DavidAlphaFox/RabbitMQ | sockjs_http.erl | -module(sockjs_http).
-export([path/1, method/1, body/1, body_qs/1, header/2, jsessionid/1,
callback/1, peername/1, sockname/1]).
-export([reply/4, chunk_start/3, chunk/2, chunk_end/1]).
-export([hook_tcp_close/1, unhook_tcp_close/1, abruptly_kill/1]).
-include("sockjs_internal.hrl").
%% --------------------... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/sockjs-erlang-wrapper/sockjs-erlang-git/src/sockjs_http.erl | erlang | --------------------------------------------------------------------------
-spec path(req()) -> {string(), req()}.
-spec body(req()) -> {binary(), req()}.
By default assume application/x-www-form-urlencoded
-spec header(atom(), req()) -> {nonempty_string() | undefined, req()}.
-spec callback(req()) -> {nonempty_s... | -module(sockjs_http).
-export([path/1, method/1, body/1, body_qs/1, header/2, jsessionid/1,
callback/1, peername/1, sockname/1]).
-export([reply/4, chunk_start/3, chunk/2, chunk_end/1]).
-export([hook_tcp_close/1, unhook_tcp_close/1, abruptly_kill/1]).
-include("sockjs_internal.hrl").
path({cowboy, Req}) ... |
cea38387c22126896aed011015900c18e7fabf0e6a21b76c9f38c9a622752ee6 | futurice/haskell-mega-repo | Ctx.hs | module Futurice.App.HoursMock.Ctx where
import Control.Concurrent.STM (TVar, newTVarIO)
import Prelude ()
import Futurice.Prelude
import Futurice.App.HoursMock.World
newtype Ctx = Ctx (TVar World)
newCtx :: IO Ctx
newCtx = do
now <- currentTime
let world = cleanWorld now
worldTVar <- newTVarIO world
... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/hours-api/src/Futurice/App/HoursMock/Ctx.hs | haskell | module Futurice.App.HoursMock.Ctx where
import Control.Concurrent.STM (TVar, newTVarIO)
import Prelude ()
import Futurice.Prelude
import Futurice.App.HoursMock.World
newtype Ctx = Ctx (TVar World)
newCtx :: IO Ctx
newCtx = do
now <- currentTime
let world = cleanWorld now
worldTVar <- newTVarIO world
... | |
439bfae2fbff6da46a3d002764da76f3840f75b1fa86b5b8943f4c0c66c7ffbc | wireless-net/erlang-nommu | wxImageList.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2013 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Publi... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/src/gen/wxImageList.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitatio... | Copyright Ericsson AB 2008 - 2013 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(wxImageList).
-include("wxe.hrl")... |
35e95ea4868154e79d98c3bb3a0ba77821e234bfb39b95490ae981ffb5640b13 | gafiatulin/codewars | Power.hs | By the Power Set of Castle Grayskull
-- /
module Power where
power :: [a] -> [[a]]
power [] = [[]]
power (x:xs) = map (x:) (power xs) ++ power xs
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/5%20kyu/Power.hs | haskell | / | By the Power Set of Castle Grayskull
module Power where
power :: [a] -> [[a]]
power [] = [[]]
power (x:xs) = map (x:) (power xs) ++ power xs
|
dd69ec39230c1f65fd033638a819506e111be34849da43c4471ac7ef74ad2c94 | BillHallahan/G2 | Concat.hs | module Concat where
@ measure size : : List a - > Int
size ( Emp ) = 0
size ( (: + :) x xs ) = 1 + size xs
@
size (Emp) = 0
size ((:+:) x xs) = 1 + size xs
@-}
{-@ invariant {v:List a | 0 <= size v} @-}
@ measure sizeXs : : List ( List a ) - > Int
sizeX... | null | https://raw.githubusercontent.com/BillHallahan/G2/21c648d38c380041a9036d0e375ec1d54120f6b4/tests_lh/Liquid/Tests/Concat.hs | haskell | @ invariant {v:List a | 0 <= size v} @
@ concat :: xss: { xss : List (List a) | sizeXs xss > 0 }
-> { xs : List a | size xs = sizeXs xss } @ | module Concat where
@ measure size : : List a - > Int
size ( Emp ) = 0
size ( (: + :) x xs ) = 1 + size xs
@
size (Emp) = 0
size ((:+:) x xs) = 1 + size xs
@-}
@ measure sizeXs : : List ( List a ) - > Int
sizeXs ( Emp ) = 0
sizeXs ( (:... |
4c53e616720fb13b4a359eb872be23bbf9b163db1d7b2ac8a76984a7ce24d72c | mhuebert/chia | perf.cljc | (ns chia.util.perf
(:refer-clojure :exclude [str identical? array aget])
(:require [clojure.core :as core]
[chia.util.macros :as m]
#?(:cljs [applied-science.js-interop :as j]))
#?(:cljs (:require-macros [chia.util.perf])))
(m/defmacro str
[x y]
(m/case :cljs `(let [x# ~x
... | null | https://raw.githubusercontent.com/mhuebert/chia/74ee3ee9f86efbdf81d8829ab4f0a44d619c73d3/util/src/chia/util/perf.cljc | clojure | (ns chia.util.perf
(:refer-clojure :exclude [str identical? array aget])
(:require [clojure.core :as core]
[chia.util.macros :as m]
#?(:cljs [applied-science.js-interop :as j]))
#?(:cljs (:require-macros [chia.util.perf])))
(m/defmacro str
[x y]
(m/case :cljs `(let [x# ~x
... | |
b4cc9445f01891a13bf399da39ebaa831b19785305bcf8199252c5f5ca824708 | argp/bap | nonnegative.ml | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
(* ... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocamlgraph/src/nonnegative.ml | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
open Sig... |
5a83e29a176687b2b2c25d037c90315e0aec5250eb162b7211f42e01c6b5215e | KestrelInstitute/Specware | env-utils.lisp | for simplicity , use the same package that GatherComponents.lisp uses
(defpackage :Distribution)
(in-package :Distribution")
(eval-when (compile eval load)
#+Allegro (require "dist-utils")
# -Allegro ( load " dist - utils " )
)
Utilities for environment vars
(defun generic-getenv (varname)
#+allegro... | null | https://raw.githubusercontent.com/KestrelInstitute/Specware/2be6411c55f26432bf5c9e2f7778128898220c24/Release/LispUtilities/env-utils.lisp | lisp | ? | for simplicity , use the same package that GatherComponents.lisp uses
(defpackage :Distribution)
(in-package :Distribution")
(eval-when (compile eval load)
#+Allegro (require "dist-utils")
# -Allegro ( load " dist - utils " )
)
Utilities for environment vars
(defun generic-getenv (varname)
#+allegro... |
d4f51f3b33e31b2973d5166f9e517013497eb0c0d525439d917fbdabe697c05e | cedlemo/OCaml-GI-ctypes-bindings-generator | VSeparator.ml | open Ctypes
open Foreign
type t = unit ptr
let t_typ : t typ = ptr void
let create =
foreign "gtk_vseparator_new" (void @-> returning (ptr Widget.t_typ))
| null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/VSeparator.ml | ocaml | open Ctypes
open Foreign
type t = unit ptr
let t_typ : t typ = ptr void
let create =
foreign "gtk_vseparator_new" (void @-> returning (ptr Widget.t_typ))
| |
dad9978025806841226ce940b0d5ce2e55165d1ba267fdc3260404b05d9bc2d0 | dbuenzli/useri | test_tsdl_lwt.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/dbuenzli/useri/4646a7b8f3c0d6ce34b1c3f789eebe56cb75b9d2/test/test_tsdl_lwt.ml | ocaml | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | |
3a0608144c30a1524dec590d3f96326ada1ed017a696da66f692c9ad11d47edd | newque/newque | zmq_prot.ml | open Core
open Lwt
module Logger = Log.Make (struct let section = "Zmq" end)
type worker = {
accept: unit Lwt.t;
socket: [`Dealer] Lwt_zmq.Socket.t;
}
type t = {
generic : Config_t.config_listener;
specific : Config_t.config_zmq_settings;
inproc: string;
inbound: string;
frontend: [`Router] ZMQ.Socket.... | null | https://raw.githubusercontent.com/newque/newque/dee73e2cb7be8700847f9e5cf900731cc20b1b8c/src/server/protocols/zmq_prot.ml | ocaml | Catch errors that bubbled up from the backend | open Core
open Lwt
module Logger = Log.Make (struct let section = "Zmq" end)
type worker = {
accept: unit Lwt.t;
socket: [`Dealer] Lwt_zmq.Socket.t;
}
type t = {
generic : Config_t.config_listener;
specific : Config_t.config_zmq_settings;
inproc: string;
inbound: string;
frontend: [`Router] ZMQ.Socket.... |
39ee6d07df9a5ac58c01e0619ca449149e142ab6d32beeac86ac76563fe8d553 | input-output-hk/plutus-apps | Types.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeOperators #-}
# LANGUAGE Undecidabl... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/813d18f755a75b348251345d8ce2d9659a712e35/marconi-chain-index/json-rpc/src/Network/JsonRpc/Server/Types.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE LambdaCase #
# LANGUAGE RankNTypes #
# LANGUAGE TypeOperators #
|
This module provides support for writing handlers for JSON-RPC endpoints
| The entire JSON RPC api is collapsed to a single endpoint.
Therefore, we need a type that may or ma... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Network.JsonRpc.Server.Types where
import Data.Aeson (FromJSON (parseJSON), ToJSON (toJSON),... |
ed1b993943ab2f68875ee50e754bba39fe910753cbc2acee2cfda4103459e6e7 | zxymike93/SICP | 364.rkt | #lang sicp
(define (memorize proc)
(let ([run? #f] [result #f])
(lambda ()
(if (not run?)
(begin (set! result (proc))
(set! run? #t)
result)
result))))
;; promise
(define-syntax delay-stream
(syntax-rules ()
[(delay-stream s) (memorize (lambda ()... | null | https://raw.githubusercontent.com/zxymike93/SICP/9d8e84d6a185bf4d7f28c414fc3359741384beb5/chapter3/364.rkt | racket | promise
stm
num -> stm
遍历一个流并比较相邻的两个元素之间的差,将差小于 tolerance 的后一个元素返回
stm num -> num
求 x 的平方根,允许误差为 tolerance
num num -> num
tests | #lang sicp
(define (memorize proc)
(let ([run? #f] [result #f])
(lambda ()
(if (not run?)
(begin (set! result (proc))
(set! run? #t)
result)
result))))
(define-syntax delay-stream
(syntax-rules ()
[(delay-stream s) (memorize (lambda () s))]))
(d... |
64154ba774846c11cf73625b12e72e47b1314154b028f71c0441c182e7259379 | cardmagic/lucash | pty.scm | ;;; Pseudo terminals
Copyright ( c ) 1995 by .
;;; (fork-pty-session thunk)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Fork the process with stdio ( fd 's 0 , 1 , & 2 and also the current i / o ports )
bound to a tty device . In the parent process , returns four values :
;;... | null | https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scsh/pty.scm | scheme | Pseudo terminals
(fork-pty-session thunk)
[process pty-inport pty-outport ttyname]
- PROCESS is a process object for the child.
device. PTY-OUTPORT is unbuffered.
- TTYNAME is the name of the child's tty, e.g. "/dev/ttyk4".
The subprocess is placed in its own session, and the tty device
becomes the con... | Copyright ( c ) 1995 by .
Fork the process with stdio ( fd 's 0 , 1 , & 2 and also the current i / o ports )
bound to a tty device . In the parent process , returns four values :
- PTY-{IN , OUT}PORT are input and output ports open on the controlling pty
(define (fork-pty-session thunk)
(receive (pty-in t... |
c5e8581ec21047c904a74aada92bc4e7c071db206e8e7da1ade3e7f4bbd8ca52 | ingesolvoll/kee-frame | api_test.cljc | (ns kee-frame.api-test
(:require [clojure.test :refer [deftest testing is]]
[kee-frame.core :as kf]
[re-frame.core :as rf]
[day8.re-frame.test :as rf-test]
[re-chain.core :as chain]
[kee-frame.router :as router]))
(rf/reg-fx
:http-xhrio
(fn [opts]
(... | null | https://raw.githubusercontent.com/ingesolvoll/kee-frame/44e83629634c8e92d02d3c5a19e382f6f50eecc9/test/kee_frame/api_test.cljc | clojure | (ns kee-frame.api-test
(:require [clojure.test :refer [deftest testing is]]
[kee-frame.core :as kf]
[re-frame.core :as rf]
[day8.re-frame.test :as rf-test]
[re-chain.core :as chain]
[kee-frame.router :as router]))
(rf/reg-fx
:http-xhrio
(fn [opts]
(... | |
e058f00516c63ae9ca6b40ddf966fd86161352b53829e60686201f82af1582a6 | tweag/ormolu | op-chain-r-lt-colon-1-out.hs | Right chain , : case , 2 operators with p (: ) < p(b )
j :: Int
j =
1
: 2
: 3
: 4
^^ 5
: 6
: 7
: 8
| null | https://raw.githubusercontent.com/tweag/ormolu/1f63136d047205f95b7d3c0f6aa34c34bb29ac7f/data/examples/declaration/value/function/infix/op-chain-r-lt-colon-1-out.hs | haskell | Right chain , : case , 2 operators with p (: ) < p(b )
j :: Int
j =
1
: 2
: 3
: 4
^^ 5
: 6
: 7
: 8
| |
0015c7ff5634c295c2c8f97f27b143c276417eaba73c1e6564aee4d891a2479a | fluree/ledger | core_test.clj | (ns fluree.db.ledger.transact.core-test
(:require [clojure.test :refer :all]
[clojure.core.async :as async]
[fluree.db.ledger.memorydb :as memorydb]
[fluree.db.ledger.transact.core :as tx-core]
[fluree.db.api :as fdb])
(:import (java.time Instant)))
TODO - some spe... | null | https://raw.githubusercontent.com/fluree/ledger/254a5a6e03291f81db1837e2a8b13e447d6342ce/test/fluree/db/ledger/transact/core_test.clj | clojure | - many of those current tests will likely cover the below, but may not cover all of them... and sometimes the
- underlying issue is difficult to discern.
test these things:
tag is properly resolved (add a new _predicate - the 'type' is a tag and can be compared with its repective const/$... value
- tempi... | (ns fluree.db.ledger.transact.core-test
(:require [clojure.test :refer :all]
[clojure.core.async :as async]
[fluree.db.ledger.memorydb :as memorydb]
[fluree.db.ledger.transact.core :as tx-core]
[fluree.db.api :as fdb])
(:import (java.time Instant)))
TODO - some spe... |
b2a70eb7659aae1d6d355c7b655eb1865229114410f56173e523e94a388ed0d1 | Sudha247/ocaml5-tutorial-icfp-22 | nqueens.ml | module T = Domainslib.Task
let rec ok i j k xs =
match xs with
| [] -> true
| h::t -> h<>i && h<>j && h<>k && ok i (j+1) (k-1) t
let rec nqueens pool n j xs =
match n with
| n when n = j -> 1
| _ -> begin
let rec enqueue i ps =
if i == n then ps
else if ok i (i+1) (i-1) xs then
... | null | https://raw.githubusercontent.com/Sudha247/ocaml5-tutorial-icfp-22/7f04991a10270e5f5be0d2b1b6d931b242f4d3a2/code/parallel/solved/nqueens.ml | ocaml | module T = Domainslib.Task
let rec ok i j k xs =
match xs with
| [] -> true
| h::t -> h<>i && h<>j && h<>k && ok i (j+1) (k-1) t
let rec nqueens pool n j xs =
match n with
| n when n = j -> 1
| _ -> begin
let rec enqueue i ps =
if i == n then ps
else if ok i (i+1) (i-1) xs then
... | |
b966812170318ca412d18b2e8a89bacd79a72f269285a16993dea71cdddb4883 | sirherrbatka/statistical-learning | promotions.lisp | (cl:in-package #:cl-user)
(ql:quickload '(:vellum :vellum-csv :statistical-learning))
(defpackage #:promotions-example
(:use #:cl #:statistical-learning.aux-package))
(cl:in-package #:promotions-example)
(defvar *data*
(~> (vellum:copy-from :csv (~>> (asdf:system-source-directory :statistical-learning)
... | null | https://raw.githubusercontent.com/sirherrbatka/statistical-learning/305188c3fe92c66daacdfc5154251bb15ce59685/examples/promotions.lisp | lisp | file has yes or no as values
who cares about id? | (cl:in-package #:cl-user)
(ql:quickload '(:vellum :vellum-csv :statistical-learning))
(defpackage #:promotions-example
(:use #:cl #:statistical-learning.aux-package))
(cl:in-package #:promotions-example)
(defvar *data*
(~> (vellum:copy-from :csv (~>> (asdf:system-source-directory :statistical-learning)
... |
af9477b3a4931c9d2e905925fbebabd786dfcc36173569ed849d325a89f83730 | yziquel/OCaml-R | listing.ml | class virtual listing = object (self)
inherit R.s3
method names = R.strings_of_t (self#attribute "names")
end
| null | https://raw.githubusercontent.com/yziquel/OCaml-R/4690dd0ede4858d7048f573d75519e4643a40532/src/r-base/listing.ml | ocaml | class virtual listing = object (self)
inherit R.s3
method names = R.strings_of_t (self#attribute "names")
end
| |
f6007342b9f23e89209a444633546d266cbc57658f94029e80630104d8155c17 | kbaird/consensus | webster_sainte_lague_test.erl | -module('webster_sainte_lague_test').
-author('Kevin C. Baird').
-include_lib("eunit/include/eunit.hrl").
webster_sainte_lague_setup() -> ok.
webster_sainte_lague_teardown(_) -> ok.
% -Lagu%C3%AB_method#Description_of_the_method
webster_sainte_lague_test_() ->
{setup, fun webster_sainte_lague_setup/0,
... | null | https://raw.githubusercontent.com/kbaird/consensus/d96eaca6bd33467154e101ec00aa6e758b111d03/test/webster_sainte_lague_test.erl | erlang | -Lagu%C3%AB_method#Description_of_the_method
Not checking percentages, because I think they removed smaller totals from the reported results
C3%BCrttemberg_state_election
-Palatinate_state_election
-Anhalt_state_election
I think that's throwing off the calculations. | -module('webster_sainte_lague_test').
-author('Kevin C. Baird').
-include_lib("eunit/include/eunit.hrl").
webster_sainte_lague_setup() -> ok.
webster_sainte_lague_teardown(_) -> ok.
webster_sainte_lague_test_() ->
{setup, fun webster_sainte_lague_setup/0,
fun webster_sainte_lague_teardown/1,
... |
7d190e7c2ac817f7600e20e996395a8f1945263262c158a1fb93de201b464460 | rfkm/zou | impl.clj | (ns zou.framework.bootstrap.impl
(:require [schema.core :as s]
[zou.component :as c]
[zou.framework.entrypoint.proto :as ep]))
(s/defrecord DefaultBootstrapSystem [entrypoint :- (s/protocol ep/EntryPoint)]
{s/Keyword s/Any}
c/Lifecycle
(start [this]
(s/validate (class this) this)
... | null | https://raw.githubusercontent.com/rfkm/zou/228feefae3e008f56806589cb8019511981f7b01/framework/src/zou/framework/bootstrap/impl.clj | clojure | (ns zou.framework.bootstrap.impl
(:require [schema.core :as s]
[zou.component :as c]
[zou.framework.entrypoint.proto :as ep]))
(s/defrecord DefaultBootstrapSystem [entrypoint :- (s/protocol ep/EntryPoint)]
{s/Keyword s/Any}
c/Lifecycle
(start [this]
(s/validate (class this) this)
... | |
f30c763c98f3f879588fffba16ce6a2d7a944086bb224d767b2db32421a3ff50 | logicmoo/logicmoo_nlu | finite.lsp | ;;; % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% Example code from the book " Natural Language Processing in LISP " %
% published by %
% Copyright ( c ) 1989 , . %
;;; % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %... | null | https://raw.githubusercontent.com/logicmoo/logicmoo_nlu/c066897f55b3ff45aa9155ebcf799fda9741bf74/ext/nlp_book/lisp/finite.lsp | lisp | % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
abbreviations
basic network accessing
returns the list of initial nodes
returns the list of final nodes
returns the list of transitions
the subcomponents of a t... | % Example code from the book " Natural Language Processing in LISP " %
% published by %
% Copyright ( c ) 1989 , . %
finite.lsp [ Chapter 2 ] utilities for finite state networks
(defvar abbreviations)
(defun initial_nodes (network)
(nth 1 (assoc 'Init... |
b587b29f124a2aa3e0f6b86fe13c62b9d7ce381504821733274a0886e591a2ad | nilenso/kulu-backend | 20150310152753658-add-organization-id-to-users.clj | ;; migrations/20150310152753658-add-organization-id-to-users.clj
(defn up []
["ALTER TABLE users ADD COLUMN organization_id UUID"
"ALTER TABLE users ADD FOREIGN KEY (organization_id) REFERENCES organizations (id)"])
(defn down []
["ALTER TABLE users DROP COLUMN organization_id"])
| null | https://raw.githubusercontent.com/nilenso/kulu-backend/0b404f76643e77219432dcbffa681172a61e591b/migrations/20150310152753658-add-organization-id-to-users.clj | clojure | migrations/20150310152753658-add-organization-id-to-users.clj |
(defn up []
["ALTER TABLE users ADD COLUMN organization_id UUID"
"ALTER TABLE users ADD FOREIGN KEY (organization_id) REFERENCES organizations (id)"])
(defn down []
["ALTER TABLE users DROP COLUMN organization_id"])
|
91e3abb8e2c70d27fc776b06707b3a6f8918b8ef2ba83aac84a29ba7d9cb80ec | wizardpb/functional-vaadin | validation.clj | ;;
Copyright 2016 Prajna Inc. All Rights Reserved .
;;
;; This work is licensed under the Eclipse Public License v1.0 - -v10.html
;; Distrubition and use must be done under the terms of this license
;;
(ns functional-vaadin.validation
"Interface to Vaadin validators and definition of a configurable, function-base ... | null | https://raw.githubusercontent.com/wizardpb/functional-vaadin/eccd121b1a4c28ec73ad452fa3d1ce3c6e78d401/src/functional_vaadin/validation.clj | clojure |
This work is licensed under the Eclipse Public License v1.0 - -v10.html
Distrubition and use must be done under the terms of this license
| Copyright 2016 Prajna Inc. All Rights Reserved .
(ns functional-vaadin.validation
"Interface to Vaadin validators and definition of a configurable, function-base validator"
(:require [clojure.string :as str]
[functional-vaadin.utils :refer :all])
(:import (com.vaadin.data Validator Validator$Invali... |
6adfb634f56c3bb95ef60728dca8dfb04a1b8f65c7ee58657dd28ef1f0bb9ac6 | csabahruska/jhc-components | Directory.hs | module Directory (
Permissions( .. ),
createDirectory, removeDirectory, removeFile,
renameDirectory, renameFile, getDirectoryContents,
getCurrentDirectory, setCurrentDirectory,
doesFileExist, doesDirectoryExist,
getPermissions, setPermissions,
getModificationTime
) where
import System.Dir... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-compat/haskell98/Directory.hs | haskell | module Directory (
Permissions( .. ),
createDirectory, removeDirectory, removeFile,
renameDirectory, renameFile, getDirectoryContents,
getCurrentDirectory, setCurrentDirectory,
doesFileExist, doesDirectoryExist,
getPermissions, setPermissions,
getModificationTime
) where
import System.Dir... | |
7cb6e5f5cfb27212642aae9538793cc0c7ff9e459b6aa216e36b3ea904066b37 | oskardrums/ebpf | prop_ebpf.erl | -module(prop_ebpf).
-include_lib("proper/include/proper.hrl").
-include("ebpf_kern.hrl").
%%%%%%%%%%%%%%%%%%
%%% Properties %%%
%%%%%%%%%%%%%%%%%%
prop_disassemble_assemble_symmetry() ->
?FORALL(
Instructions,
bpf_sequence(),
begin
Instructions = ebpf_asm:disassemble(ebpf_asm:... | null | https://raw.githubusercontent.com/oskardrums/ebpf/59ac92eb537f609c7f1473e20359012f4748885b/test/prop_ebpf.erl | erlang |
Properties %%%
Helpers %%%
Generators %%%
| -module(prop_ebpf).
-include_lib("proper/include/proper.hrl").
-include("ebpf_kern.hrl").
prop_disassemble_assemble_symmetry() ->
?FORALL(
Instructions,
bpf_sequence(),
begin
Instructions = ebpf_asm:disassemble(ebpf_asm:assemble(Instructions)),
true
end
... |
0e58b481254691f620be6e4ce5c7267f880f32b8bd6fc9f5e4d550284ac12842 | tmattio/js-bindings | vscode_languageclient_configuration.mli | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"]]
open Es5
(* import { StaticFeature, BaseLanguageClient } from './client'; *)
import { ClientCapabilities , ConfigurationRequest } from
' vscode - languageserver - protocol ' ;
'vscode-languageserver-protocol'; *)
module ... | null | https://raw.githubusercontent.com/tmattio/js-bindings/ca3bd6a12db519c8de7f41b303f14cf70cfd4c5f/lib/vscode-languageclient/vscode_languageclient_configuration.mli | ocaml | import { StaticFeature, BaseLanguageClient } from './client';
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
TODO: Move me | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"]]
open Es5
import { ClientCapabilities , ConfigurationRequest } from
' vscode - languageserver - protocol ' ;
'vscode-languageserver-protocol'; *)
module ConfigurationWorkspaceMiddleware : sig
type t
val t_to_js : t -... |
83093c6065f8915d56dac9b00ca7ef3600e1cf0765cb8d485d1992995d7db26a | samrushing/irken-tdfa | charset.scm | ;; -*- Mode: Irken -*-
(include "lib/basis.scm")
;; this needs to go into core.scm
(define assert
#t -> #u
#f -> (error "assertion failed.")
)
;; this is tricky: I prefer a datatype that is incapable of
;; representing an invalid charset. Can this be done with
;; a range-based representation? re2 uses a "b... | null | https://raw.githubusercontent.com/samrushing/irken-tdfa/ff56945e371ba7afec884f98a17f291cab083637/charset.scm | scheme | -*- Mode: Irken -*-
this needs to go into core.scm
this is tricky: I prefer a datatype that is incapable of
representing an invalid charset. Can this be done with
a range-based representation? re2 uses a "balanced binary
tree of ranges" in order to handle unicode. Can we represent
a canonical charset like... |
(include "lib/basis.scm")
(define assert
#t -> #u
#f -> (error "assertion failed.")
)
Note : as written , this assumes 8 - bit characters . Supporting wider
charsets should be trivial ( simply replace the occurrences of " 256 " below ) .
(define printable-chars
(define printable-map
(let ((chars... |
bfeb892c9bcd8edaa1502637abc7efcdd1b155a208ed59218019279ff7c5602a | onaio/milia | submissions.cljc | (ns milia.api.submissions
(:require [milia.api.http :refer [parse-http]]
[milia.utils.remote :refer [make-url]]))
(defn get-stats
"Int String String -> Channel containing HttpResponse"
[dataset-id group-by name]
(parse-http
:get
(make-url "stats/submissions"
(str dataset-id ".jso... | null | https://raw.githubusercontent.com/onaio/milia/c68b612bd640aa2499e4ac2f907a7ef793d0820a/src/milia/api/submissions.cljc | clojure | (ns milia.api.submissions
(:require [milia.api.http :refer [parse-http]]
[milia.utils.remote :refer [make-url]]))
(defn get-stats
"Int String String -> Channel containing HttpResponse"
[dataset-id group-by name]
(parse-http
:get
(make-url "stats/submissions"
(str dataset-id ".jso... | |
9c373520fdd7f391676af87f392f52e75ea16c528b7db25d6a866b9aa337233d | schibsted/spid-tech-docs | generate.clj | (ns spid-docs.sample-responses.generate
(:require [spid-docs.content :as content]
[spid-docs.sample-responses.defsample :refer [sample-responses]]
[spid-docs.sample-responses.definitions]
[spid-docs.sample-responses :refer [generate-sample-responses]]
[spid-docs.validat... | null | https://raw.githubusercontent.com/schibsted/spid-tech-docs/ee6a4394e9732572e97fc3a55506b2d6b9a9fe2b/src/spid_docs/sample_responses/generate.clj | clojure | (ns spid-docs.sample-responses.generate
(:require [spid-docs.content :as content]
[spid-docs.sample-responses.defsample :refer [sample-responses]]
[spid-docs.sample-responses.definitions]
[spid-docs.sample-responses :refer [generate-sample-responses]]
[spid-docs.validat... | |
7c36ced95957b8213e80f8cb36615c0d1bf9cb189b2f95a57b6f86388ea76292 | yeller/bolth | project.clj | (defproject bolth "0.2.0-SNAPSHOT"
:description "a better test runner for clojure.test"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[io.aviso/pretty "0.1.17"]
[org.clojure/tools.namespace "0.2.7"]])... | null | https://raw.githubusercontent.com/yeller/bolth/c3cd235a51266b1153631a062bed6383b52c5132/project.clj | clojure | (defproject bolth "0.2.0-SNAPSHOT"
:description "a better test runner for clojure.test"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[io.aviso/pretty "0.1.17"]
[org.clojure/tools.namespace "0.2.7"]])... | |
6a2f3fa6946bc74741d27925812353c5fc88db006472d2cddc1512d93eb2f17c | icicle-lang/icicle-ambiata | Alpha.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
{-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - missing - signatures #
module Icicle.Test.Core.Exp.Alpha where
import Icicle.Test.Arbitrary
import Icicle.Core.Eval.Exp
import Icicle.Common.Base
import Ici... | null | https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-compiler/test/Icicle/Test/Core/Exp/Alpha.hs | haskell | # LANGUAGE OverloadedStrings #
Anything is alpha equivalent to itself
=====================
Any CLOSED expression is alpha equivalent to itself after prefixing
=====================
We can rename anything that isn't free
=====================
=====================
It should follow from the above, but why not so... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - missing - signatures #
module Icicle.Test.Core.Exp.Alpha where
import Icicle.Test.Arbitrary
import Icicle.Core.Eval.Exp
import Icicle.Common.Base
import Icicle.Common.Exp
import qualified Da... |
68f80158ee62c06b6b42a94af55da31fbc5444d530b622b1c362be20a7c02b68 | adatario/guix-tarides | irmin.scm | SPDX - FileCopyrightText : 2022 Tarides < >
;
SPDX - License - Identifier : GPL-3.0 - or - later
(define-module (tarides packages irmin)
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (guix build-system dune)
#:use-module (guix build-system ocaml)
#:use-module ((guix licenses... | null | https://raw.githubusercontent.com/adatario/guix-tarides/70fe3872b75755a5e3e9d0928ec9abd0204501e8/tarides/packages/irmin.scm | scheme |
Tests are fixed in an unreleased commit ()
stop package transformations when it's not an OCaml package
requires irmin-watcher
ocaml-irmin-watcher | SPDX - FileCopyrightText : 2022 Tarides < >
SPDX - License - Identifier : GPL-3.0 - or - later
(define-module (tarides packages irmin)
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (guix build-system dune)
#:use-module (guix build-system ocaml)
#:use-module ((guix licenses) ... |
3242ec2a6cdfc7a5ebf9ae525a08343a77fd454ed8dba067a169453ed0e9c196 | processone/cache_tab | ets_cache.erl | %%%-------------------------------------------------------------------
@author < >
Created : 12 Apr 2017 by < >
%%%
%%%
Copyright ( C ) 2002 - 2021 ProcessOne , SARL . All Rights Reserved .
%%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%% you may not use this file except in co... | null | https://raw.githubusercontent.com/processone/cache_tab/98040207c4e674f325e52d47fb5d9091acff0b89/src/ets_cache.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... | @author < >
Created : 12 Apr 2017 by < >
Copyright ( C ) 2002 - 2021 ProcessOne , SARL . 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(ets_cache).
-behaviour(gen_server).
-export([... |
0dbb123f3dbe35416698572e4df9cf3fee0b3fe5f74549526376853ed59442d4 | azimut/shiny | snow-world.lisp | (in-package :shiny)
;;
(all-piano 0)
(fp 1 20 0)
(fp 2 20 0)
(fp 3 20 0)
(fp 4 20 0)
(fp 1 30 0)
(fp 2 30 0)
(fp 3 20 0)
(fp 4 20 0)
(fp 22 0)
(defparameter *triggered* (trigger-once))
(defparameter *triggered2* (trigger-once))
(defun ff ())
(defun ff (time)
(let* ((c (make-chord 60 80 3 (scale 0 'phrygian)))... | null | https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/compositions/snow-world.lisp | lisp | (in-package :shiny)
(all-piano 0)
(fp 1 20 0)
(fp 2 20 0)
(fp 3 20 0)
(fp 4 20 0)
(fp 1 30 0)
(fp 2 30 0)
(fp 3 20 0)
(fp 4 20 0)
(fp 22 0)
(defparameter *triggered* (trigger-once))
(defparameter *triggered2* (trigger-once))
(defun ff ())
(defun ff (time)
(let* ((c (make-chord 60 80 3 (scale 0 'phrygian)))
... | |
40b8e995aecf938ef75e2a285b683670ef12116ef1f4d98db6df36e241cfaf52 | afronski/bferl | tokenizer_properties_SUITE.erl | -module(tokenizer_properties_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-export([ all/0 ]).
-export([ tokenizer_should_exclude_superfluous_tokens_for_brainfuck/1,
tokenizer_should_exclude_superfluous_tokens_for_brainfork/1,
tokenizer_should_use_whi... | null | https://raw.githubusercontent.com/afronski/bferl/18d3482c71cdb0e39bde090d436245a2a9531f49/test/tokenizer_properties_SUITE.erl | erlang | -module(tokenizer_properties_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-export([ all/0 ]).
-export([ tokenizer_should_exclude_superfluous_tokens_for_brainfuck/1,
tokenizer_should_exclude_superfluous_tokens_for_brainfork/1,
tokenizer_should_use_whi... | |
cd48e302a15755b25bf8d2fa8d658f7e146135a939cd1c181518a8d02966df5b | nuttycom/aftok | Events.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes #
module Aftok.Database.PostgreSQL.Events
( storeEvent,
storeEvent',
createEvent,
findEvent,
findEvents,
amendEvent,
readWorkIndex,
)
where
import qualified Aftok.Billing as B
impo... | null | https://raw.githubusercontent.com/nuttycom/aftok/58feefe675cea908cf10619cc88ca4770152e82e/lib/Aftok/Database/PostgreSQL/Events.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes #
module Aftok.Database.PostgreSQL.Events
( storeEvent,
storeEvent',
createEvent,
findEvent,
findEvents,
amendEvent,
readWorkIndex,
)
where
import qualified Aftok.Billing as B
import Aftok.Database
( D... |
12f29cdae1dfd92601ebf4c0776e1caadd6854a97f8ee327ce0b4b0c4dd27ead | kit-clj/kit | kit_clj.clj | (ns leiningen.new.io.github.kit-clj
(:require
[leiningen.new.templates
:refer [name-to-path sanitize-ns project-name ->files]]
[leiningen.new.io.github.kit-clj.options.base :as base]
[leiningen.new.io.github.kit-clj.options.helpers :as helpers]
[leiningen.new.io.github.kit-clj.options.sql :as sql... | null | https://raw.githubusercontent.com/kit-clj/kit/943bee95c9a81e049b8b35cc7ac8c1985d0ae08a/libs/lein-template/src/leiningen/new/io/github/kit_clj.clj | clojure |
Files & Data for Template
SQL data coercion
SQL libs
Check Options
sql variants
sql data coercion
Main | (ns leiningen.new.io.github.kit-clj
(:require
[leiningen.new.templates
:refer [name-to-path sanitize-ns project-name ->files]]
[leiningen.new.io.github.kit-clj.options.base :as base]
[leiningen.new.io.github.kit-clj.options.helpers :as helpers]
[leiningen.new.io.github.kit-clj.options.sql :as sql... |
e326dc365ee06254e3d3ded5dfb49410bab2deb5ba4a299b1fbd80728d4aa7a6 | well-typed-lightbulbs/ocaml-esp32 | config.ml | let foo = "foo"
let bar = "bar"
| null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/lib-dynlink-pr6950/config.ml | ocaml | let foo = "foo"
let bar = "bar"
| |
7ffb82d582d49bc15b9f36ea22c79c66fd93debd622e1a29e0e6478d50cc677c | erlang/otp | odbc_data_type_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2002 - 2022 . 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 License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/eccc556e79f315d1f87c10fb46f2c4af50a63f20/lib/odbc/test/odbc_data_type_SUITE.erl | erlang |
%CopyrightBegin%
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 lan... | Copyright Ericsson AB 2002 - 2022 . 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(odbc_data_type_SUITE).
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
-include_lib("st... |
a0392c234c65f4eae854325826f0bfa3e5631e3db259bd914ad6cd10a146501b | xu-hao/QueryArrow | UDS.hs | # LANGUAGE OverloadedStrings , TypeFamilies #
module QueryArrow.RPC.Service.Service.UDS where
import QueryArrow.DB.DB
import Control.Monad.Trans.Resource
import Control.Monad.Except
import System.Log.Logger
import QueryArrow.Control.Monad.Logger.HSLogger ()
import Control.Concurrent
import System.IO (IOMode(..))
impo... | null | https://raw.githubusercontent.com/xu-hao/QueryArrow/4dd5b8a22c8ed2d24818de5b8bcaa9abc456ef0d/QueryArrow-rpc-socket/src/QueryArrow/RPC/Service/Service/UDS.hs | haskell | # LANGUAGE OverloadedStrings , TypeFamilies #
module QueryArrow.RPC.Service.Service.UDS where
import QueryArrow.DB.DB
import Control.Monad.Trans.Resource
import Control.Monad.Except
import System.Log.Logger
import QueryArrow.Control.Monad.Logger.HSLogger ()
import Control.Concurrent
import System.IO (IOMode(..))
impo... | |
a36e720a563561426c57cd9e0c2c6dffa3829ed2e92447bd28f15989872a9878 | mbutterick/typesetting | quad-passes.rkt | #lang debug racket/base
(require "pipeline.rkt"
"quad.rkt")
(provide (all-defined-out))
(define (quad-with-attrs? x)
(and (quad? x) (quad-attrs x)))
(define-pass (install-default-attrs qs)
;; make sure attrs are not #false
#:pre (list-of quad?)
#:post (list-of quad-with-attrs?)
(for ([q (in-list qs... | null | https://raw.githubusercontent.com/mbutterick/typesetting/4297717f25d2a75689bd2252225fd62a413ce922/quad2/quad-passes.rkt | racket | make sure attrs are not #false | #lang debug racket/base
(require "pipeline.rkt"
"quad.rkt")
(provide (all-defined-out))
(define (quad-with-attrs? x)
(and (quad? x) (quad-attrs x)))
(define-pass (install-default-attrs qs)
#:pre (list-of quad?)
#:post (list-of quad-with-attrs?)
(for ([q (in-list qs)]
#:unless (quad-attrs q))
... |
319373f12c287f0e71d2aa0b3e277cb72e9b88fac88175191fe8020073d93a13 | synduce/Synduce | list_sum_basic.ml | This is a simple example where the target type is not really recursive ,
but it shows you can simply use it to desribe a different computation for
the recursion skeleton .
In this case , the list zipper is just a pair of two lists , the first list
is reversed and the second list is the rest of the... | null | https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/benchmarks/zippers/list_sum_basic.ml | ocaml | The type of cons-lists
Representation function: reconstructing a list from a zipper.
Reference function: the sum on lists. | This is a simple example where the target type is not really recursive ,
but it shows you can simply use it to desribe a different computation for
the recursion skeleton .
In this case , the list zipper is just a pair of two lists , the first list
is reversed and the second list is the rest of the... |
f25e34981611ff273b91b90dca5374b56d54601b80e1b7f10589a9fcf05a2e73 | qiao/sicp-solutions | 3.34.scm | ;; When setting the value of b, you can not get the value of a, since
for the multiplier , only ` ` product '' is set and neither ` ` m1 '' nor
;; ``m2'' is set.
| null | https://raw.githubusercontent.com/qiao/sicp-solutions/a2fe069ba6909710a0867bdb705b2e58b2a281af/chapter3/3.34.scm | scheme | When setting the value of b, you can not get the value of a, since
``m2'' is set. | for the multiplier , only ` ` product '' is set and neither ` ` m1 '' nor
|
704c1c10575be4c27b7f4d27b98b28231fcde302d55e206a74a04f25c83c1658 | ucsd-progsys/dsolve | liquid.ml |
* Copyright © 2008 The Regents of the University of California . All rights reserved .
*
* Permission is hereby granted , without written agreement and without
* license or royalty fees , to use , copy , modify , and distribute this
* software and its documentation for any purpose , provided that the
... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/liquid/liquid.ml | ocaml | odd things may happen if multiple files are run through here |
* Copyright © 2008 The Regents of the University of California . All rights reserved .
*
* Permission is hereby granted , without written agreement and without
* license or royalty fees , to use , copy , modify , and distribute this
* software and its documentation for any purpose , provided that the
... |
c74cca79beaf6f5579d8313a760c823aa91934d3b70baa014bc1cecaf1e2ed5d | yuriy-chumak/ol | srfi-170.scm | (define-library (scheme srfi-170)
(import (scheme core) (srfi 170))
(export
(exports (srfi 170))) )
| null | https://raw.githubusercontent.com/yuriy-chumak/ol/0a38b3f9dbb720aa3fbc3e8219429ebe240c86bf/libraries/scheme/srfi-170.scm | scheme | (define-library (scheme srfi-170)
(import (scheme core) (srfi 170))
(export
(exports (srfi 170))) )
| |
c3a23dec3cf860248cb7a5ddfe4b2d14652e4939fb7653f965934ae7c8c054da | pbrisbin/tee-io | Foundation.hs | module Foundation where
import Import.NoFoundation
import Database.Persist.Sql (ConnectionPool, runSqlPool)
import Text.Hamlet (hamletFile)
import Text.Jasmine (minifym)
import Yesod.Core.Types (Logger)
import Yesod.Default.Util (addStaticContentExternal)
import qualified Network.AWS as AWS
import qualified Yesod.Co... | null | https://raw.githubusercontent.com/pbrisbin/tee-io/7940eb6e71532e4764b3855b5b74e74dd15cfdef/src/Foundation.hs | haskell | module Foundation where
import Import.NoFoundation
import Database.Persist.Sql (ConnectionPool, runSqlPool)
import Text.Hamlet (hamletFile)
import Text.Jasmine (minifym)
import Yesod.Core.Types (Logger)
import Yesod.Default.Util (addStaticContentExternal)
import qualified Network.AWS as AWS
import qualified Yesod.Co... | |
5801d6ae9f5a24a72368e78fcaae87ddae4c743aca649909fefa196127d09c52 | hipsleek/hipsleek | sleekUtils.ml | #include "xdebug.cppo"
open VarGen
(*
The frontend engine of SLEEK.
*)
open Globals
open Wrapper
open Others
open Sleekcommons
open Gen.Basic
open . ETABLE_NFLOW
open Exc.GTable
open Perm
open Label_only
let process_selective_iview_decls is_all iprog iviews =
let iviews = if is_all then iprog.I.prog_view_decls... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/sleekUtils.ml | ocaml |
The frontend engine of SLEEK.
TO CHECK: h or p
iprog.I.prog_view_decls <- (iprog.I.prog_view_decls @ iviews)
collect immutable info for splitting view params
let all_mutrec_vnames = (List.concat ls_mut_rec_views) in
let nview = Astsimp.trans_view iprog mutrec_vnames
transed_views [] view in
... | #include "xdebug.cppo"
open VarGen
open Globals
open Wrapper
open Others
open Sleekcommons
open Gen.Basic
open . ETABLE_NFLOW
open Exc.GTable
open Perm
open Label_only
let process_selective_iview_decls is_all iprog iviews =
let iviews = if is_all then iprog.I.prog_view_decls else iviews in
let tmp_views = List... |
bf1584d7119e8542e8595a55a5efba27cf8e6ca6175350acbcab4644cb939aeb | richhickey/clojure-contrib | test_shell.clj | (ns clojure.contrib.test-shell
(:use clojure.test
clojure.contrib.shell)
(:import (java.io File)))
workaroung to access private parse - args . Better way ?
(def parse-args ((ns-interns 'clojure.contrib.shell) 'parse-args))
(def as-file ((ns-interns 'clojure.contrib.shell) 'as-file))
(def as-env-string ((ns-inte... | null | https://raw.githubusercontent.com/richhickey/clojure-contrib/40b960bba41ba02811ef0e2c632d721eb199649f/src/test/clojure/clojure/contrib/test_shell.clj | clojure | (ns clojure.contrib.test-shell
(:use clojure.test
clojure.contrib.shell)
(:import (java.io File)))
workaroung to access private parse - args . Better way ?
(def parse-args ((ns-interns 'clojure.contrib.shell) 'parse-args))
(def as-file ((ns-interns 'clojure.contrib.shell) 'as-file))
(def as-env-string ((ns-inte... | |
4ff5ec5f5b3849c3fc63ff68b0349771c7d729d0a3add989579eb9f97fee8240 | yomimono/chamelon | dir.mli | (** [hard_tail_links t] returns the blockpair [t] points at
* if [t] is a hard tail entry *)
val hard_tail_links : Tag.t * Cstruct.t -> (int64 * int64) option
val hard_tail_at : (int64 * int64) -> Entry0.t
* [ of_entry t ] returns the blockpair on which the directory contents start
* if [ t ] is a directory struc... | null | https://raw.githubusercontent.com/yomimono/chamelon/2041c05fff43897126868c83be36442cc2164859/lib/dir.mli | ocaml | * [hard_tail_links t] returns the blockpair [t] points at
* if [t] is a hard tail entry
* [name str id] makes an entry linking [id] with [name]. | val hard_tail_links : Tag.t * Cstruct.t -> (int64 * int64) option
val hard_tail_at : (int64 * int64) -> Entry0.t
* [ of_entry t ] returns the blockpair on which the directory contents start
* if [ t ] is a directory structure entry
* if [t] is a directory structure entry *)
val of_entry : Entry0.t -> (int64 * int... |
4cb5c82bed8f064a1c69169136a54326d4289e196d270ca741d6401ac0b3bbc0 | bpoweski/athena-tools | lambda.clj | (ns athena.lambda
(:require [amazonica.aws.s3 :as s3]
[athena.tools :as tools]
[cheshire.core :as json]
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.reader.edn :as edn]
[orca.core :as orca]
[taoensso.timbre :as tim... | null | https://raw.githubusercontent.com/bpoweski/athena-tools/9b54e4a49815d97b94b1031ca37097822f6b8460/src/athena/lambda.clj | clojure | (ns athena.lambda
(:require [amazonica.aws.s3 :as s3]
[athena.tools :as tools]
[cheshire.core :as json]
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.reader.edn :as edn]
[orca.core :as orca]
[taoensso.timbre :as tim... | |
135ead7776cafbeb58d20970c975e474ff946109fdb13ef2da296d947f3b0fa7 | exercism/babashka | example.clj | (ns all-your-base)
(defn- digits->decimal
"Converts a sequence of digits given in input-base into decimal format."
[input-base digits]
(loop [sum 0
[num & nums] digits]
(if num
(recur (+ (* sum input-base) num) nums)
sum)))
(defn- decimal->digits
"Converts a decimal number into a sequ... | null | https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/practice/all-your-base/.meta/src/example.clj | clojure | (ns all-your-base)
(defn- digits->decimal
"Converts a sequence of digits given in input-base into decimal format."
[input-base digits]
(loop [sum 0
[num & nums] digits]
(if num
(recur (+ (* sum input-base) num) nums)
sum)))
(defn- decimal->digits
"Converts a decimal number into a sequ... | |
6353e31acc28fe92f44f65ef03a6bd0beabd98967829aedfc94adccc44a6df0c | jesperes/aoc_erlang | aoc2015_day18.erl | -module(aoc2015_day18).
-behavior(aoc_puzzle).
-export([parse/1, solve1/1, solve2/1, info/0]).
-include("aoc_puzzle.hrl").
-spec info() -> aoc_puzzle().
info() ->
#aoc_puzzle{module = ?MODULE,
year = 2015,
day = 18,
name = "Like a GIF For Your Yard",
... | null | https://raw.githubusercontent.com/jesperes/aoc_erlang/ec0786088fb9ab886ee57e17ea0149ba3e91810a/src/2015/aoc2015_day18.erl | erlang | -module(aoc2015_day18).
-behavior(aoc_puzzle).
-export([parse/1, solve1/1, solve2/1, info/0]).
-include("aoc_puzzle.hrl").
-spec info() -> aoc_puzzle().
info() ->
#aoc_puzzle{module = ?MODULE,
year = 2015,
day = 18,
name = "Like a GIF For Your Yard",
... | |
4d32c75db30e377b702409c95427a3b20497bc1dcc4f6bc9c68c32875453e650 | nukep/doom-calculator | logic.clj | (ns doomcalc.logic
(:require [doomcalc.tree :as t :refer [mkvar]]))
(defn make-and [a b r]
(a (r 0)
(b (r 0) (r 1))))
(defn make-nand [a b r]
(a (r 1)
(b (r 1) (r 0))))
(defn make-xor [a b r]
(a (b (r 0) (r 1))
(b (r 1) (r 0))))
(defn make-half-adder [a b s cout]
[(make-and a b cout)
... | null | https://raw.githubusercontent.com/nukep/doom-calculator/624e2f0abd791528828728d1203b333d5e03ac39/src/doomcalc/logic.clj | clojure | Sum bit
Carry bit
zc + z3*z2 + z3*z1
i.e. if cout=1, then (z3..z1)+3 -> s3..s1
| (ns doomcalc.logic
(:require [doomcalc.tree :as t :refer [mkvar]]))
(defn make-and [a b r]
(a (r 0)
(b (r 0) (r 1))))
(defn make-nand [a b r]
(a (r 1)
(b (r 1) (r 0))))
(defn make-xor [a b r]
(a (b (r 0) (r 1))
(b (r 1) (r 0))))
(defn make-half-adder [a b s cout]
[(make-and a b cout)
... |
dff53e525dceb0fd3438c6d342df0c45b10dd0f98b002bcf42d8119688caea76 | brendanhay/gogol | Updatelabels.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-shopping-content/gen/Gogol/ShoppingContent/Content/Csses/Updatelabels.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Updates labels that are assigned to a CSS domain by its CSS group.
* Resource
** Constructing a Request
'ContentCssesUpdatelabels' request conforms to.
| Updates labels that are assigned to a CSS domain by its CSS group.
/S... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
223ca66da54c133db9aad739822208f651d5af2763c71ef31bab225b1be71867 | geoffder/dometyl-keyboard | caps.ml | open OCADml
open OSCADml
let path n = Printf.sprintf "%s/stls/caps/%s" Util.imports n
let color = Scad.color Color.DarkSlateBlue
module SA = struct
(* Generated with *)
let path n = path (Printf.sprintf "KeyV2_SA/SA-%s.stl" n)
let r0 = Scad.import3 (path "R0") |> color
let r2 = Scad.import3 (path "R2") |> co... | null | https://raw.githubusercontent.com/geoffder/dometyl-keyboard/5efa847361e0ceb80de5b03dd28a702d6b42412d/lib/caps.ml | ocaml | Generated with
Reproduction by darryldh, found at :4564253
Generated with
Generated with
Generated with
Generated with | open OCADml
open OSCADml
let path n = Printf.sprintf "%s/stls/caps/%s" Util.imports n
let color = Scad.color Color.DarkSlateBlue
module SA = struct
let path n = path (Printf.sprintf "KeyV2_SA/SA-%s.stl" n)
let r0 = Scad.import3 (path "R0") |> color
let r2 = Scad.import3 (path "R2") |> color
let r3 = Scad.impo... |
88e139765f49e70b88f00502e2a2e0d36e0cdac4f49e1d333a0beaabd13e476e | denistakeda/re-posh | db.cljc | (ns re-posh.db
(:require
[posh.reagent :as p]))
;; Basic store. This atom stores another atom
- datascript connection
;; @@store - datascript database
(def store (atom nil))
(defn connect! [conn]
"Connect DataScript store to the re-frame event system"
(p/posh! conn)
(reset! store conn))
| null | https://raw.githubusercontent.com/denistakeda/re-posh/f17ed7b05e930af97dd39ea0555915edac836177/src/re_posh/db.cljc | clojure | Basic store. This atom stores another atom
@@store - datascript database | (ns re-posh.db
(:require
[posh.reagent :as p]))
- datascript connection
(def store (atom nil))
(defn connect! [conn]
"Connect DataScript store to the re-frame event system"
(p/posh! conn)
(reset! store conn))
|
212e5a4e4608fa4eb40829019067dd2406dc77d1b70c782a052c2da616765fde | sfahlman/scone | scone-loader.lisp | ;;; -*- Mode:Lisp -*-
;;; ***************************************************************************
Scone Knowledge Representation System
Load the Scone engine files and the bootstrap knowledge .
;;;
Author & Maintainer :
;;; ***************************************************************************
Copyr... | null | https://raw.githubusercontent.com/sfahlman/scone/f519dba45882a201edaa3bf6bb80f52e4940f3ec/scone-loader.lisp | lisp | -*- Mode:Lisp -*-
***************************************************************************
***************************************************************************
distributed with the software. The license can also be found at
-2.0.
Unless required by applicable law or agreed to in writing,
IS" BASIS... | Scone Knowledge Representation System
Load the Scone engine files and the bootstrap knowledge .
Author & Maintainer :
Copyright ( C ) 2003 - 2014 , Carnegie Mellon University .
The software is made available to the public under the
Apache 2.0 open source license . A copy of this license is
software ... |
66093cdb00254ba12b4423a7e402a275cc11162213fa271bad28f9aeb84086a0 | weavejester/hiccup | core.clj | (ns hiccup2.core
"Library for rendering a tree of vectors into HTML. Pre-compiles where
possible for performance. Strings are automatically escaped."
{:added "2.0"}
(:require [hiccup.compiler :as compiler]
[hiccup.util :as util]))
(defmacro html
"Render Clojure data structures to a compiled repre... | null | https://raw.githubusercontent.com/weavejester/hiccup/80e48352dd2bce5277ccdd06334cfb9be915afb4/src/hiccup2/core.clj | clojure | (ns hiccup2.core
"Library for rendering a tree of vectors into HTML. Pre-compiles where
possible for performance. Strings are automatically escaped."
{:added "2.0"}
(:require [hiccup.compiler :as compiler]
[hiccup.util :as util]))
(defmacro html
"Render Clojure data structures to a compiled repre... | |
9a0639dd9ffe1092004263f81e54ac3eb5885aa513b5c920a8ea5773628ac830 | rroohhh/guix_system | home_new.scm | (use-modules (gnu home)
(gnu home services)
(gnu home services shells)
(gnu services)
(gnu packages admin)
(guix gexp)
(home packages)
(home programs))
(home-environment
(packages full-packages)
(services
(list
(service h... | null | https://raw.githubusercontent.com/rroohhh/guix_system/3c363db76c0a4afe5dffa69973adec959e545f3b/home/home_new.scm | scheme | (use-modules (gnu home)
(gnu home services)
(gnu home services shells)
(gnu services)
(gnu packages admin)
(guix gexp)
(home packages)
(home programs))
(home-environment
(packages full-packages)
(services
(list
(service h... | |
37260b0631ff63eaff409cc064eed347e90b2c6ed8b606ab913f5a83f8ce4887 | m4b/rdr | SymbolMap.ml |
TODO :
( -2 ): Add meta data to marshalled symbolmap / tol
( -1 ): /usr / lib / libmcheck.a with magic : --- why does the .a file have an elf magic number ?
( 0 ) : Fix the suffix problem ; does n't work very well with linux , and osx frameworks wo n't get recognized either ...
( 1 ) : add this offset / p... | null | https://raw.githubusercontent.com/m4b/rdr/2bf1f73fc317cd74f8c7cacd542889df729bd003/lib/SymbolMap.ml | ocaml | also implement .a i guess
--- ios will have a lot of those, burned into the binary, fun fun
sees symbolic links
add the / if missing, as a convenience to the user
lstat can see symbolic links
if (has_libraryish_suffix base) then
ignore symbolic links and other file types
probably surpress thi... |
TODO :
( -2 ): Add meta data to marshalled symbolmap / tol
( -1 ): /usr / lib / libmcheck.a with magic : --- why does the .a file have an elf magic number ?
( 0 ) : Fix the suffix problem ; does n't work very well with linux , and osx frameworks wo n't get recognized either ...
( 1 ) : add this offset / p... |
420cfda1093bc4e2fbd318420e9e29e207d7eadc891f1f3341f15391d10d1500 | berberman/nvfetcher | FetchRustGitDepsSpec.hs | # LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
module FetchRustGitDepsSpec where
import Control.Monad.Trans.Reader
import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as HMap
import Data.Maybe (fromJust)
import Data.Text (Text)
import NvFetcher.FetchRustGitDeps
import NvFetcher.NixFet... | null | https://raw.githubusercontent.com/berberman/nvfetcher/9763ad40d59a044e90726653d9253efaeeb053b2/test/FetchRustGitDepsSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
module FetchRustGitDepsSpec where
import Control.Monad.Trans.Reader
import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as HMap
import Data.Maybe (fromJust)
import Data.Text (Text)
import NvFetcher.FetchRustGitDeps
import NvFetcher.NixFetcher
import NvFetcher.Types
import ... |
da2ea9becc6713803ad0a72b48c40ae4277b68bce59a02c9b0a727e4397dc61d | runtimeverification/haskell-backend | Pattern.hs | module Test.Kore.Simplify.Pattern (
test_Pattern_simplify,
test_Pattern_simplifyAndRemoveTopExists,
test_Pattern_simplify_equalityterm,
) where
import Data.Maybe (fromJust)
import Data.Set qualified as Set
import Kore.Internal.Condition qualified as Condition
import Kore.Internal.From
import Kore.Internal.... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/ab81b694639281db05cb746055925c5c6f78a500/kore/test/Test/Kore/Simplify/Pattern.hs | haskell | | Lifting disjunction to the top would duplicate terms. | module Test.Kore.Simplify.Pattern (
test_Pattern_simplify,
test_Pattern_simplifyAndRemoveTopExists,
test_Pattern_simplify_equalityterm,
) where
import Data.Maybe (fromJust)
import Data.Set qualified as Set
import Kore.Internal.Condition qualified as Condition
import Kore.Internal.From
import Kore.Internal.... |
6518670aa4881df992726fd5bf772d2a52032921f546dd24355198027ba9f9a5 | oshyshko/adventofcode | XYZ.hs | module Geom.XYZ where
import Geom.Point
data XYZ = XYZ X Y Z deriving (Eq, Ord)
type X = Int
type Y = Int
type Z = Int
type WHD = XYZ
type W = Int
type H = Int
type D = Int
instance Show XYZ where
show (XYZ x y z) =
if x == y && y == z
then show x
else "(" <> show x <> ... | null | https://raw.githubusercontent.com/oshyshko/adventofcode/95b6bb4d514cf02680ba1a62de5a5dca2bf9e92d/src/Geom/XYZ.hs | haskell | module Geom.XYZ where
import Geom.Point
data XYZ = XYZ X Y Z deriving (Eq, Ord)
type X = Int
type Y = Int
type Z = Int
type WHD = XYZ
type W = Int
type H = Int
type D = Int
instance Show XYZ where
show (XYZ x y z) =
if x == y && y == z
then show x
else "(" <> show x <> ... | |
62d71e48bca3a1f7ea578d3a7dd4459714fa63f54e76771281b308ba23981200 | gregr/racket-misc | generator-eff.rkt | #lang racket/base
(provide
eff-gen
(struct-out gen-choice-state)
gen-try
next
next-try
send
send-try
)
(require
"choice-eff.rkt"
"eff.rkt"
"generator.rkt"
"match.rkt"
"record.rkt"
"state-eff.rkt"
racket/function
racket/match
)
(module+ test
(require
"either.rkt"
"sugar.rkt"... | null | https://raw.githubusercontent.com/gregr/racket-misc/0a5c9d4875288795e209d06982b82848c989d08b/generator-eff.rkt | racket | #lang racket/base
(provide
eff-gen
(struct-out gen-choice-state)
gen-try
next
next-try
send
send-try
)
(require
"choice-eff.rkt"
"eff.rkt"
"generator.rkt"
"match.rkt"
"record.rkt"
"state-eff.rkt"
racket/function
racket/match
)
(module+ test
(require
"either.rkt"
"sugar.rkt"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.