_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 |
|---|---|---|---|---|---|---|---|---|
32b6813f152da72a6e65965e1b8911c919242546f1a8bcfafe7398c03c421875 | vmchale/kempe | Module.hs | -- | Pretty easy since doesn't need renaming.
--
-- Just thread lexer state through, remove duplicates.
module Kempe.Module ( parseProcess
) where
import Control.Exception (Exception, throwIO)
import qualified Data.ByteString.Lazy as BSL
import qualified Data.ByteString.Laz... | null | https://raw.githubusercontent.com/vmchale/kempe/071272d18ab6bccd4bb2c4a40aa6a0eda7ebec91/src/Kempe/Module.hs | haskell | | Pretty easy since doesn't need renaming.
Just thread lexer state through, remove duplicates.
# SCC "dedup" # | module Kempe.Module ( parseProcess
) where
import Control.Exception (Exception, throwIO)
import qualified Data.ByteString.Lazy as BSL
import qualified Data.ByteString.Lazy.Char8 as ASCII
import qualified Data.Set as S
import Data.Tuple.Ext ... |
0ad9fb4f80a70931a3bde8ca76c203deb26e29eee29941dbe46e36207a3e21f7 | input-output-hk/cardano-wallet | Internal.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
HLINT ignore " Use camelCase "
-- |
Copyright : © 2022 IOHK
-- License: Apache-2.0
--
-- Computing minimum UTxO values: internal interface.
--
module Cardano.Wallet.Shelley.MinimumUTxO.Internal
( computeMinimumCoinForUTxO_CardanoApi
, computeMinimumCoinForUTxO... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/18bc22ad0932e4e8b1b6eafee5edf99ac57126af/lib/wallet/src/Cardano/Wallet/Shelley/MinimumUTxO/Internal.hs | haskell | # LANGUAGE GADTs #
|
License: Apache-2.0
Computing minimum UTxO values: internal interface.
Caution:
result.
with no other assets. If this assumption is violated, we have no
way to continue, and must raise an error:
an error if a required protocol parameter is missing.
can only be constructed by supplyin... | # LANGUAGE LambdaCase #
HLINT ignore " Use camelCase "
Copyright : © 2022 IOHK
module Cardano.Wallet.Shelley.MinimumUTxO.Internal
( computeMinimumCoinForUTxO_CardanoApi
, computeMinimumCoinForUTxO_CardanoLedger
) where
import Prelude
import Cardano.Ledger.Shelley.API.Wallet
( evaluateMinLovelaceO... |
473db2161a023bb47b95693ec06c98d5f129771de492283287044bef8d6902f8 | ghcjs/ghcjs-dom | FocusEvent.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.FocusEvent
(js_newFocusEvent, newFocusEvent, js_getRelatedTarget,
getRelatedTar... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/FocusEvent.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/FocusEvent Mozilla FocusEvent documentation>
| <-US/docs/Web/API/FocusEvent.relatedTarget Mozilla FocusEvent.relatedTarget documentation>
| <-US/docs/Web/API/FocusEvent.relatedTarget Mozilla FocusEvent.... | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.FocusEvent
(js_newFocusEvent, newFocusEvent, js_getRelatedTarget,
getRelatedTarget, getRelatedTargetUnsafe,
getRelatedTargetUnchecked, FocusEvent(..), gTypeFocusEvent)
... |
7166a51f41eea071f6fb1f43803d4f7846ba3bbd31127fa55598d698462b45de | dlowe-net/orcabot | brain.lisp | (category ("are you very *" what)
(reduce "are you *" what))
(category ("are you smart")
(say "I like to think I'm quite intelligent."))
(category ("are you alive")
(say "That's one of those philosophical questions, isn't it?"))
(category ("are you * person")
(randomly
(say "I like to think so.")
(say ... | null | https://raw.githubusercontent.com/dlowe-net/orcabot/bf3c799337531e6b16086e8105906cc9f8808313/data/brain.lisp | lisp | (category ("are you very *" what)
(reduce "are you *" what))
(category ("are you smart")
(say "I like to think I'm quite intelligent."))
(category ("are you alive")
(say "That's one of those philosophical questions, isn't it?"))
(category ("are you * person")
(randomly
(say "I like to think so.")
(say ... | |
01975e2e488c3c496bb6ffc6cb0d6993044c0aea51d09562042657d231f5eda3 | discoproject/odisco | pipeline.ml | module J = Json
module JC = Json_conv
module U = Utils
type label = int
type stage = string
type grouping =
| Split
| Group_label
| Group_node
| Group_node_label
| Group_all
type pipeline = (stage * grouping) list
type pipeline_error =
| Invalid_grouping of string
| Invalid_pipeline_json of J.t
| ... | null | https://raw.githubusercontent.com/discoproject/odisco/1dda9b921625a7c6af442a33938279afdc2a8600/lib/pipeline.ml | ocaml | error printing utilities
pipeline utilities
task input utilities | module J = Json
module JC = Json_conv
module U = Utils
type label = int
type stage = string
type grouping =
| Split
| Group_label
| Group_node
| Group_node_label
| Group_all
type pipeline = (stage * grouping) list
type pipeline_error =
| Invalid_grouping of string
| Invalid_pipeline_json of J.t
| ... |
47c53c43230ee212dacb866d1759a5cd540b64798cc151dfc5ab73819b7d13be | echeran/clj-thamil | மொழியியல்.cljc | (ns clj-thamil.மொழியியல்
(:require [clj-thamil.format :as fmt])
#?(:clj
(:use clj-thamil.core)
:cljs
(:use-macros [clj-thamil.core :only [வரையறு விவரி மீதி வரையறு-செயல்கூறு பெறு எதாவது பூலியன் என்னும்போது
வைத்துக்கொள் கடைசி பொறுத்து எண்ணு முதல் இரண்டாம் தொடை
... | null | https://raw.githubusercontent.com/echeran/clj-thamil/692a6d94329bb14cb58fb39b875792e5d774d2c4/src/clj_thamil/%E0%AE%AE%E0%AF%8A%E0%AE%B4%E0%AE%BF%E0%AE%AF%E0%AE%BF%E0%AE%AF%E0%AE%B2%E0%AF%8D.cljc | clojure |
letters
அசை
syllables
phonemes
விகுதி
suffixes
பன்மை
plurals
சந்தி (விதிகள்)
(rules for) joining words/suffixes
வேற்றுமை
noun cases | (ns clj-thamil.மொழியியல்
(:require [clj-thamil.format :as fmt])
#?(:clj
(:use clj-thamil.core)
:cljs
(:use-macros [clj-thamil.core :only [வரையறு விவரி மீதி வரையறு-செயல்கூறு பெறு எதாவது பூலியன் என்னும்போது
வைத்துக்கொள் கடைசி பொறுத்து எண்ணு முதல் இரண்டாம் தொடை
... |
415749022aa47b066e296c632bca82e4bcc4256feca35b5c97f6e6825bfec54c | jtdaugherty/tracy | Phong.hs | module Tracy.Materials.Phong
( phongFromColor
, phong
, reflective
, glossyReflective
)
where
import Control.Lens
import Linear
import Data.Colour
import Tracy.Types
import Tracy.BRDF.GlossySpecular
import Tracy.BRDF.PerfectSpecular
import Tracy.BRDF.Lambertian
phong :: BRDF -> BRDF -> BRDF -> Material
... | null | https://raw.githubusercontent.com/jtdaugherty/tracy/ad36ea16a3b9cda5071ca72374d6e1c1b415d520/src/Tracy/Materials/Phong.hs | haskell | module Tracy.Materials.Phong
( phongFromColor
, phong
, reflective
, glossyReflective
)
where
import Control.Lens
import Linear
import Data.Colour
import Tracy.Types
import Tracy.BRDF.GlossySpecular
import Tracy.BRDF.PerfectSpecular
import Tracy.BRDF.Lambertian
phong :: BRDF -> BRDF -> BRDF -> Material
... | |
0e4e65bd173232f57dd5a5d1d449b9372914c235f35593a19febf1e91cfe7ca4 | MercuryTechnologies/slack-web | cli.hs | # LANGUAGE LambdaCase #
# LANGUAGE TypeApplications #
-- base
import Control.Exception (throwIO)
import Control.Monad.IO.Class (liftIO)
-- butcher
-- bytestring
-- monad-loops
import Control.Monad.Loops (iterateUntil)
mtl
import Control.Monad.Reader (runReaderT)
import Data.ByteString.Lazy.Char8 qualified as BL
im... | null | https://raw.githubusercontent.com/MercuryTechnologies/slack-web/9b0d819b5a6feb8b419418fdbbaea78a42d78137/main/cli.hs | haskell | base
butcher
bytestring
monad-loops
pretty-simple
slack-web
text
time
servant-client-core | # LANGUAGE LambdaCase #
# LANGUAGE TypeApplications #
import Control.Exception (throwIO)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Loops (iterateUntil)
mtl
import Control.Monad.Reader (runReaderT)
import Data.ByteString.Lazy.Char8 qualified as BL
import Data.Functor (void)
import Data.Text qual... |
0d10975422bb783aa02f1b506cd7938317f0cf76de993f25919da859f923f876 | janestreet/lwt-async | lwt_bytes.ml | Lightweight thread library for
* Module Lwt_unix
* Copyright ( C ) 2010
* 2010
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation , with link... | null | https://raw.githubusercontent.com/janestreet/lwt-async/c738e6202c1c7409e079e513c7bdf469f7f9984c/src/unix/lwt_bytes.ml | ocaml | +-----------------------------------------------------------------+
| Blitting |
+-----------------------------------------------------------------+
+-----------------------------------------------------------------+
| IOs ... | Lightweight thread library for
* Module Lwt_unix
* Copyright ( C ) 2010
* 2010
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation , with link... |
8d8a4bd2b579827e883128c8d8cf7cd380b73debb6188f4c9615ce7c2321167f | wdebeaum/step | ambiguous.lisp | ;;;;
;;;; w::ambiguous
;;;;
(define-words :pos W::adj
:templ CENTRAL-ADJ-TEMPL
:words (
(w::ambiguous
(senses
((lf-parent ont::ambiguous-val)
(example "he provided ambiguous instructions")
)
))
))
| null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/ambiguous.lisp | lisp |
w::ambiguous
|
(define-words :pos W::adj
:templ CENTRAL-ADJ-TEMPL
:words (
(w::ambiguous
(senses
((lf-parent ont::ambiguous-val)
(example "he provided ambiguous instructions")
)
))
))
|
d50a954143ca92323a1c14acf71e81e93d45294349150d2d0e047bf12dc59797 | mwand/eopl3 | data-structures.scm | (module data-structures (lib "eopl.ss" "eopl")
data structures for LEXADDR language
(require "lang.scm") ; for expression?
(provide (all-defined-out)) ; too many things to list
;;;;;;;;;;;;;;;; expressed values ;;;;;;;;;;;;;;;;
;;; an expressed value is either a number, a boole... | null | https://raw.githubusercontent.com/mwand/eopl3/b50e015be7f021d94c1af5f0e3a05d40dd2b0cbf/chapter3/lexaddr-lang/data-structures.scm | scheme | for expression?
too many things to list
expressed values ;;;;;;;;;;;;;;;;
an expressed value is either a number, a boolean or a procval.
extractors:
expval->num : ExpVal -> Int
expval->bool : ExpVal -> Bool
expval->proc : ExpVal -> Proc
procedures ;;;;;;;;;;;;;;;;
proc? : SchemeVal -> Bool
procedure : Exp * ... | (module data-structures (lib "eopl.ss" "eopl")
data structures for LEXADDR language
(define-datatype expval expval?
(num-val
(value number?))
(bool-val
(boolean boolean?))
(proc-val
(proc proc?)))
(define expval->num
(lambda (v)
(cases expval v
(num-val (num) num)... |
f311c1d5178ae0d0dcc5f7ae88e8e92286c201459de5588a65b26fbfc9575349 | schibsted/spid-tech-docs | wash_test.clj | (ns spid-docs.sample-responses.wash-test
(:require [spid-docs.sample-responses.wash :refer :all]
[midje.sweet :refer :all]))
(fact "It reduces lists of data to a manageable amount"
(wash-data [{:id 1} {:id 2} {:id 3}]) => [{:id 1}])
(fact "It reduces list-like maps to a manageable amount"
(w... | null | https://raw.githubusercontent.com/schibsted/spid-tech-docs/ee6a4394e9732572e97fc3a55506b2d6b9a9fe2b/test/spid_docs/sample_responses/wash_test.clj | clojure | (ns spid-docs.sample-responses.wash-test
(:require [spid-docs.sample-responses.wash :refer :all]
[midje.sweet :refer :all]))
(fact "It reduces lists of data to a manageable amount"
(wash-data [{:id 1} {:id 2} {:id 3}]) => [{:id 1}])
(fact "It reduces list-like maps to a manageable amount"
(w... | |
bf3ddc348cf6af7ed785fbe9393b0ca8613f12a9780d62bccafa0c6ada845aea | owlbarn/owl_ode | damped.ml | open Owl_ode
open Owl_ode.Types
open Owl_plplot
let damped_noforcing a (xs, ps) _ : Owl.Mat.mat =
Owl.Mat.((xs *$ -1.0) + (ps *$ (-1.0 *. a)))
let a = 1.0
let dt = 0.1
let plot_sol fname t sol1 sol2 sol3 =
let open Owl in
let h = Plot.create fname in
let open Plot in
set_foreground_color h 0 0 0;
set_ba... | null | https://raw.githubusercontent.com/owlbarn/owl_ode/5d934fbff87eea9f060d6c949bf78467024d8791/examples/damped.ml | ocaml | XXX: I could not figure out how to make the legend black instead of red
XXX: I'd prefer t to be already an Owl array as well | open Owl_ode
open Owl_ode.Types
open Owl_plplot
let damped_noforcing a (xs, ps) _ : Owl.Mat.mat =
Owl.Mat.((xs *$ -1.0) + (ps *$ (-1.0 *. a)))
let a = 1.0
let dt = 0.1
let plot_sol fname t sol1 sol2 sol3 =
let open Owl in
let h = Plot.create fname in
let open Plot in
set_foreground_color h 0 0 0;
set_ba... |
45abc58fea11e4c08a542835e4d607197c8ad3bf6b2e563d637ae4df0185c22e | basho/riak_test | replication2_ssl.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2012 - 2015 Basho Technologies , Inc.
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of... | null | https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/replication2_ssl.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2012 - 2015 Basho Technologies , Inc.
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(replication2_ssl)... |
0acb43daf463fa2140a4790f101a9810b3b237a416c999bc08723b95d433c137 | haskell-opengl/OpenGLRaw | PixelTexture.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.SGIS.PixelTexture
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
------------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/SGIS/PixelTexture.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.SGIS.PixelTexture
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enums
* Functions | # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.SGIS.PixelTexture (
glGetSGISPixelTexture,
gl_SGIS_pixel_texture,
pattern GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS,
pattern GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS,
pattern GL_PIXEL_GROUP_COLOR_SGIS,
pattern GL_P... |
0a08749d6e1baf8a5c383e6d8f14e4f7c5f492ed65d1c39706a6a5cff1d3d804 | dym/movitz | scratch.lisp | ------------------ - mode : t -*--------------------------
;;;;
Copyright ( C ) 2007 ,
;;;;
;;;; Filename: scratch.lisp
;;;; Description: Misc. testing code etc.
Author : < >
;;;; Distribution: See the accompanying file COPYING.
;;;;
$ I d : , v 1.3 2008/02/23 22:28:... | null | https://raw.githubusercontent.com/dym/movitz/56176e1ebe3eabc15c768df92eca7df3c197cb3d/losp/scratch.lisp | lisp |
Filename: scratch.lisp
Description: Misc. testing code etc.
Distribution: See the accompanying file COPYING.
------------------------------------------------------------------
(b c b)
b)
to initialize the controller and spin the drive up.
to turn the drive and co... | ------------------ - mode : t -*--------------------------
Copyright ( C ) 2007 ,
Author : < >
$ I d : , v 1.3 2008/02/23 22:28:55 ffjeld Exp $
(provide :scratch)
(in-package los0)
#+ignore
(defun set.2 ()
(let ((*var-used-in-set-tests* 'a)
(var '*var-used-in-set-tests*))
(declare (... |
d5ff5198f42381b6dfce73eb34d495b0ddd9f63957850705655a1819a9ccfa83 | mu-chaco/ReWire | Annotate.hs | # LANGUAGE ScopedTypeVariables #
{-# LANGUAGE Safe #-}
module ReWire.Crust.Annotate
( annotate
, Annote
) where
import ReWire.Annotation (Annote (..), toSrcSpanInfo)
import ReWire.SYB
import ReWire.HaskellSyntaxOrphans ()
import Control.Monad.Identity (Identity (..))
import Data.Data (Data (..), cas... | null | https://raw.githubusercontent.com/mu-chaco/ReWire/b04686a4cd6cb36ca9976a4b6c42bc195ce69462/src/ReWire/Crust/Annotate.hs | haskell | # LANGUAGE Safe # | # LANGUAGE ScopedTypeVariables #
module ReWire.Crust.Annotate
( annotate
, Annote
) where
import ReWire.Annotation (Annote (..), toSrcSpanInfo)
import ReWire.SYB
import ReWire.HaskellSyntaxOrphans ()
import Control.Monad.Identity (Identity (..))
import Data.Data (Data (..), cast)
import Data.Maybe (... |
228a99fb5f127db5d7b4e2ede5d973503a3bc5c09608d446706f52edfe44e8ad | FlowForwarding/lincx | linc_logic.erl | %%------------------------------------------------------------------------------
Copyright 2012 FlowForwarding.org
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%... | null | https://raw.githubusercontent.com/FlowForwarding/lincx/7795923b51fa1e680511669f4a27404b2ed1f1dc/apps/linc/src/linc_logic.erl | erlang | ------------------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, eithe... | Copyright 2012 FlowForwarding.org
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author Erlang Solutions Ltd. < >
2012 FlowForwarding.org
-module(linc_logic).
-behaviour(gen_server).
-export([send_to_controllers/... |
957ba14d8f246c58f4b71a216e6d5d635061b8e734751a277819166a5383f037 | OCamlPro/alt-ergo | myDynlink.mli | (******************************************************************************)
(* *)
Alt - Ergo : The SMT Solver For Software Verification
Copyright ( C ) 2013 - 2018
(* ... | null | https://raw.githubusercontent.com/OCamlPro/alt-ergo/291523151417f4cd112744d740b58ab1e8a630b4/src/lib/util/myDynlink.mli | ocaml | ****************************************************************************
This file is distributed under the terms of the license indicated
in the ... | Alt - Ergo : The SMT Solver For Software Verification
Copyright ( C ) 2013 - 2018
* Dynlink wrapper
A wrapper of the Dynlink module : we use Dynlink except when we want to
generate a static ( native ) binary *
A wrapper of the Dynlink... |
6de1dee530c5d4a6cc63924d8b88c8c203909754bbe70c8a2ec11e4a7f20cd4b | Oblosys/proxima | Code.hs |
UUAGC 0.9.10 ( Code.ag )
module Code where
import Pretty
import Patterns
import Data.List(partition)
import Data.Set(Set)
import qualified Data.Set as Set
import Data.Map(Map)
import qualified Data.Map as Map
-- Unboxed tuples
-- unbox Whether unboxed tuples are wanted or not
-- inh The inherited attribut... | null | https://raw.githubusercontent.com/Oblosys/proxima/f154dff2ccb8afe00eeb325d9d06f5e2a5ee7589/uuagc/src-derived/Code.hs | haskell | Unboxed tuples
unbox Whether unboxed tuples are wanted or not
inh The inherited attributes.
If there are none, no unboxing can take place,
because in that case the semantic function (a top-level identifier) would have an unboxed type.
---------------------------------------------------
... |
UUAGC 0.9.10 ( Code.ag )
module Code where
import Pretty
import Patterns
import Data.List(partition)
import Data.Set(Set)
import qualified Data.Set as Set
import Data.Map(Map)
import qualified Data.Map as Map
Of course we ca n't have an unboxed 1 - tuple
mkTupleExpr :: Bool -> Bool -> Exprs -> Expr
mkTupleExpr ... |
5a294bb57be0b6abbba50d9b252bdd7958d04e096543b7f2ed21495bd1794ba5 | haskell-suite/haskell-src-exts | Unicode2.hs | # LANGUAGE UnicodeSyntax #
lengthOP n (⊜) = 0 ⊜ n
| null | https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/Unicode2.hs | haskell | # LANGUAGE UnicodeSyntax #
lengthOP n (⊜) = 0 ⊜ n
| |
e306b2b8796b5a3e10cd50298b52e0b0e06b8935a42ccfd585a3b53c1ea0bfb3 | ryanpbrewster/haskell | P102.hs | module TestData.P102 (txt) where
txt :: [[Int]]
txt =
[ [ -340,495,-153,-910,835,-947]
, [ -175,41,-421,-714,574,-645]
, [ -547,712,-352,579,951,-786]
, [ 419,-864,-83,650,-399,171]
, [ -429,-89,-357,-930,296,-29]
, [ -734,-702,823,-745,-684,-62]
, [ -971,762,925,-776,-663,-157]
, [ 162,570,628,485,-80... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/tests/TestData/P102.hs | haskell | module TestData.P102 (txt) where
txt :: [[Int]]
txt =
[ [ -340,495,-153,-910,835,-947]
, [ -175,41,-421,-714,574,-645]
, [ -547,712,-352,579,951,-786]
, [ 419,-864,-83,650,-399,171]
, [ -429,-89,-357,-930,296,-29]
, [ -734,-702,823,-745,-684,-62]
, [ -971,762,925,-776,-663,-157]
, [ 162,570,628,485,-80... | |
38cccd6a43f4b09bb3cf68d0b32015c33aece38739de3d4a5494a6981ff11b95 | 8c6794b6/haskell-sc-scratch | Nameplate.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE TypeOperators #
# LANGUAGE MultiParamTypeClasses #
------------------------------------------------------------------------------
-- |
-- Module : $Header$
-- License : BSD3
Maintainer :
-- Stability : unstable
-- Portability : non-portable
--
module Pearl.... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/Pearl/Nameplate.hs | haskell | # LANGUAGE DeriveDataTypeable #
----------------------------------------------------------------------------
|
Module : $Header$
License : BSD3
Stability : unstable
Portability : non-portable
| # LANGUAGE TypeOperators #
# LANGUAGE MultiParamTypeClasses #
Maintainer :
module Pearl.Nameplate where
import Control.Monad.State
import Data.Data
import Data.Generics.Uniplate.Data
data Name = Name String (Maybe Int)
deriving (Eq, Show)
class Nom a where
(==@) :: a -> a -> Bool
data a :\\ b = a :\\ b
ins... |
6d8a927a4deed77b712ecac6e160be70dadec009b37496ccb5a16e55174e959b | sellout/haskerwaul | ColaxDistributive.hs | module Haskerwaul.Category.Rig.ColaxDistributive
( module Haskerwaul.Category.Rig.ColaxDistributive
-- * extended modules
, module Haskerwaul.Category.Rig.ColaxDistributive.Left
, module Haskerwaul.Category.Rig.ColaxDistributive.Right
) where
import Haskerwaul.Category.Rig.ColaxDistributive.Left
import Haske... | null | https://raw.githubusercontent.com/sellout/haskerwaul/cf54bd7ce5bf4f3d1fd0d9d991dc733785b66a73/src/Haskerwaul/Category/Rig/ColaxDistributive.hs | haskell | * extended modules
|
= references
- [nLab](-distributive+rig+category) | module Haskerwaul.Category.Rig.ColaxDistributive
( module Haskerwaul.Category.Rig.ColaxDistributive
, module Haskerwaul.Category.Rig.ColaxDistributive.Left
, module Haskerwaul.Category.Rig.ColaxDistributive.Right
) where
import Haskerwaul.Category.Rig.ColaxDistributive.Left
import Haskerwaul.Category.Rig.Colax... |
8bc1b3849d6670fdd816190c50be87d74eb47ab93cbd3fec3e08399d71e77169 | kmi/irs | arthritis.lisp | ;;; FILE: arthritis-ontology.lisp
;;; **************************************************************************
Based on : , , Complete Family Health Encyclopedia
and CYC ontology
;;;
Author :
Date : 2.2002
(in-package ocml)
(in-ontology arthritis)
(def-class medical-condition ()
((has-technical-nam... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/arthritis/arthritis.lisp | lisp | FILE: arthritis-ontology.lisp
**************************************************************************
virus/bacterium etc.
e.g. gradual
rare-common
injury/wear-and-tear etc.
virus/bacterium etc.
aerosol, touch, etc.
days
Arthritis ;;;;;;;;;;
osteoarthritis ;;;;;;
outgrowths new bone
joint replacement ... | Based on : , , Complete Family Health Encyclopedia
and CYC ontology
Author :
Date : 2.2002
(in-package ocml)
(in-ontology arthritis)
(def-class medical-condition ()
((has-technical-name :type string)
(has-short-name :type string)
(has-alternative-name :type string)
(susceptible-groups :type p... |
2a513618b4b20637b02c00fdd235fd70f1c69cdfd8223cc0b67ce84e6b50a8bc | liquidz/build.edn | version.clj | (ns build-edn.version
(:require
[clojure.string :as str]
[malli.core :as m]
[malli.experimental :as mx]))
(def ^:private ?parsed-version
[:map {:closed true}
[:version/major 'string?]
[:version/minor 'string?]
[:version/patch 'string?]
[:version/snapshot? 'boolean?]])
(def ^:private ?version-... | null | https://raw.githubusercontent.com/liquidz/build.edn/206383012a36f8009d6dc7b1b677c9ff67f8d521/src/build_edn/version.clj | clojure | (ns build-edn.version
(:require
[clojure.string :as str]
[malli.core :as m]
[malli.experimental :as mx]))
(def ^:private ?parsed-version
[:map {:closed true}
[:version/major 'string?]
[:version/minor 'string?]
[:version/patch 'string?]
[:version/snapshot? 'boolean?]])
(def ^:private ?version-... | |
969869d4e887661bef642ce1a784e444fe7059164607966c72c0eeadc500cb4c | ocaml/odoc | markup.mli | * examples .
* The OCaml manual gives a
{ { : #ss:ocamldoc-placement}comprehensive example }
of comment placement . This has been replicated in the module below to
show how this is rendered by [ odoc ] .
{{:#ss:ocamldoc-placement}comprehensive example}
of comment placement. This has been replicated in the modu... | null | https://raw.githubusercontent.com/ocaml/odoc/37196b0066c0382619676cecd335d332b8cc9022/doc/examples/markup.mli | ocaml | * Special comments can be placed between elements and are kept
by the OCamldoc tool, but are not associated to any element.
[@]-tags in these comments are ignored.
*****************************************************************
* The comment for function f.
* The continuation of the comment for function f.
... | * examples .
* The OCaml manual gives a
{ { : #ss:ocamldoc-placement}comprehensive example }
of comment placement . This has been replicated in the module below to
show how this is rendered by [ odoc ] .
{{:#ss:ocamldoc-placement}comprehensive example}
of comment placement. This has been replicated in the modu... |
59f47095f23d09990da1924e19ceef0a4f1cd92cb05122dcd2479ceffffe4f77 | racket/drracket | get-defs.rkt | #lang racket/base
(require racket/class
racket/function
racket/list
racket/contract
string-constants)
(provide (struct-out defn)
get-definitions
get-define-popup-info
(struct-out define-popup-info))
;; defn = (make-defn number string number number)
(defi... | null | https://raw.githubusercontent.com/racket/drracket/2d7c2cded99e630a69f05fb135d1bf7543096a23/drracket/drracket/private/get-defs.rkt | racket | defn = (make-defn number string number number)
get-define-popup-info :
valid-configurations-as-specified-in-the-drscheme:defined-popup-docs
-> (or/c (non-empty-listof define-popup-info) #f)
latest positions are where we found each of these strings in the last go;
with a #f on the one we actually returned as t... | #lang racket/base
(require racket/class
racket/function
racket/list
racket/contract
string-constants)
(provide (struct-out defn)
get-definitions
get-define-popup-info
(struct-out define-popup-info))
(define-struct defn (indent name start-pos end-pos)
#... |
d76c6cd234c1aa5ad435dea125d327dd13bea6736ebc45dbf9152a468202ba39 | 8c6794b6/guile-tjit | ra.scm | ;;;; Assign resiters to IR
Copyright ( C ) 2015 , 2016 Free Software Foundation , Inc.
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 3 of the License , o... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/language/trace/ra.scm | scheme | Assign resiters to IR
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A P... |
Copyright ( C ) 2015 , 2016 Free Software Foundation , Inc.
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , MA
02110 - 1301 USA
Assign registers to ANF IR ,... |
7725568e0646b22e49a3b97844cd673450cbe02ff44515121a4c94e8055be4c9 | FranklinChen/learn-you-some-erlang | pq_enemy.erl | %% Gives random enemies
-module(pq_enemy).
-export([fetch/0]).
fetch() ->
L = enemies(),
lists:nth(random:uniform(length(L)), L).
enemies() ->
[{<<"Ant">>, [{drop, {<<"Ant Egg">>, 1}}, {experience, 1}]},
{<<"Wildcat">>, [{drop, {<<"Pelt">>, 1}}, {experience, 1}]},
{<<"Pig">>, [{drop, {<<"Bacon">... | null | https://raw.githubusercontent.com/FranklinChen/learn-you-some-erlang/878c8bc2011a12862fe72dd7fdc6c921348c79d6/processquest/apps/processquest-1.0.0/src/pq_enemy.erl | erlang | Gives random enemies | -module(pq_enemy).
-export([fetch/0]).
fetch() ->
L = enemies(),
lists:nth(random:uniform(length(L)), L).
enemies() ->
[{<<"Ant">>, [{drop, {<<"Ant Egg">>, 1}}, {experience, 1}]},
{<<"Wildcat">>, [{drop, {<<"Pelt">>, 1}}, {experience, 1}]},
{<<"Pig">>, [{drop, {<<"Bacon">>, 1}}, {experience, 1}]... |
d6e8e84bb22d47ee43cb1c41d1cd756b99443989fbf2c6b39f63aebbf51be005 | biocom-uib/vpf-tools | SingleProcess.hs | # language DeriveGeneric #
# language NoPolyKinds #
# language StaticPointers #
{-# language Strict #-}
# language TemplateHaskell #
{-# language UndecidableInstances #-}
module Control.Carrier.Distributed.SingleProcess
( SingleProcessT
, runSingleProcessT
, LocalWorker
) where
import GHC.Generics (Generic)
i... | null | https://raw.githubusercontent.com/biocom-uib/vpf-tools/dd88a543f28eb339cf0dcb89f34479c84b3a8056/src/Control/Carrier/Distributed/SingleProcess.hs | haskell | # language Strict #
# language UndecidableInstances # | # language DeriveGeneric #
# language NoPolyKinds #
# language StaticPointers #
# language TemplateHaskell #
module Control.Carrier.Distributed.SingleProcess
( SingleProcessT
, runSingleProcessT
, LocalWorker
) where
import GHC.Generics (Generic)
import Control.Carrier.MTL.TH (deriveMonadTrans, deriveAlgebra)... |
9a7076b793c0da714846e972a2fb7b48f97ef02e510525f22088d2286120b857 | cj1128/sicp-review | 2.37.scm | (load "accumulate.scm")
(load "accumulate-n.scm")
(define (dot-product v w)
(accumulate + 0 (map * v w)))
(define (matrix-*-vector m v)
(map (lambda (m-row)
(dot-product m-row v))
m))
(define (transpose mat)
(accumulate-n cons '() mat))
(define (matrix-*-matrix m n)
(let ((cols (transpose n)... | null | https://raw.githubusercontent.com/cj1128/sicp-review/efaa2f863b7f03c51641c22d701bac97e398a050/chapter-2/2.2/2.37.scm | scheme | (load "accumulate.scm")
(load "accumulate-n.scm")
(define (dot-product v w)
(accumulate + 0 (map * v w)))
(define (matrix-*-vector m v)
(map (lambda (m-row)
(dot-product m-row v))
m))
(define (transpose mat)
(accumulate-n cons '() mat))
(define (matrix-*-matrix m n)
(let ((cols (transpose n)... | |
b3fb13b312d44010813fbc4fa6687d5a54b823f77d47c23abf7b16ac87af3bf6 | dparis/gen-phzr | distance_constraint.cljs | (ns phzr.impl.accessors.physics.p2.distance-constraint)
(def distance-constraint-get-properties
{:game "game"
:world "world"})
(def distance-constraint-set-properties
{:game "game"
:world "world"}) | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/impl/accessors/physics/p2/distance_constraint.cljs | clojure | (ns phzr.impl.accessors.physics.p2.distance-constraint)
(def distance-constraint-get-properties
{:game "game"
:world "world"})
(def distance-constraint-set-properties
{:game "game"
:world "world"}) | |
562095023815c0d1c6945c3d820b5a085c0a373552bb7cd3cfc7f580b5eb134a | styx/Raincat | Rain.hs | module Rain.Rain
(updateRain,
drawRain,
rainRect,
rainPoly) where
import System.Random
import Graphics.Rendering.OpenGL
import World.World
import Panels.MainPanel
import Nxt.Types
import Items.Items
import Level.Level
import Settings.RainSettings as RainSettings
import Settings.WorldSettings as Worl... | null | https://raw.githubusercontent.com/styx/Raincat/49b688c73335c9a4090708bc75f6af9575a65670/src/Rain/Rain.hs | haskell | updateRain
createNewRain
fallRain
drawRain
raindropVertices
rainPoly
collideRainPoly
rainRect
collideRainRect | module Rain.Rain
(updateRain,
drawRain,
rainRect,
rainPoly) where
import System.Random
import Graphics.Rendering.OpenGL
import World.World
import Panels.MainPanel
import Nxt.Types
import Items.Items
import Level.Level
import Settings.RainSettings as RainSettings
import Settings.WorldSettings as Worl... |
26d796e2d8d04f2d2b2a15170f60b310e681afc68db8ada7d91ab85462c594b8 | ndmitchell/catch | CaseCheck.hs |
module Graph.CaseCheck(graphCaseCheck) where
import Graph.Type
import Graph.Create
import Graph.Solve
import IO
import Hite
graphCaseCheck :: String -> Handle -> Hite -> IO Bool
graphCaseCheck file hndl hite =
do
let graph = createGraph hite
putStrLn "Checking graph"
res <... | null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/src/Graph/CaseCheck.hs | haskell |
module Graph.CaseCheck(graphCaseCheck) where
import Graph.Type
import Graph.Create
import Graph.Solve
import IO
import Hite
graphCaseCheck :: String -> Handle -> Hite -> IO Bool
graphCaseCheck file hndl hite =
do
let graph = createGraph hite
putStrLn "Checking graph"
res <... | |
5ea95c8ca6c7b1823540f746bf46c42cdfb5927468701c82a36c6254d3092634 | wireapp/wire-server | V17.hs | -- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License... | null | https://raw.githubusercontent.com/wireapp/wire-server/f72b09756102a5c66169cca0343aa7b7e6e54491/services/spar/schema/src/V17.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module V17
( migration,
)
wh... |
9bf836293f9972b12e755026da7cb99b32e7415d52eaa63ee1ebe5cee55e7a3b | jaredly/belt | belt_internalMapString.ml | # 2 "../others/internal_map.cppo.ml"
type key = string
# 9 "../others/internal_map.cppo.ml"
module N = Belt_internalAVLtree
module A = Belt_Array
module S = Belt_SortArray
type 'a t = (key,'a) N.t
let rec add t (x : key) (data : _) =
match N.toOpt t with
| None ->
N.singleton x data
| Some n ->
... | null | https://raw.githubusercontent.com/jaredly/belt/4d07f859403fdbd3fbfc5a9547c6066d657a2131/belt_src/belt_internalMapString.ml | ocaml | Node (l2, v2, d2, r2, h2)
end
let c = (Belt_Cmp.getCmpInternal cmp) x k [@bs] in | # 2 "../others/internal_map.cppo.ml"
type key = string
# 9 "../others/internal_map.cppo.ml"
module N = Belt_internalAVLtree
module A = Belt_Array
module S = Belt_SortArray
type 'a t = (key,'a) N.t
let rec add t (x : key) (data : _) =
match N.toOpt t with
| None ->
N.singleton x data
| Some n ->
... |
3fe2bcb1a1f13fbae75c633e87c7ae9cffdf58173fdc92843af303b9af54b96d | leksah/leksah | Trace.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE LambdaCase #
-----------------------------------------------------------------... | null | https://raw.githubusercontent.com/leksah/leksah/ec95f33af27fea09cba140d7cddd010935a2cf52/src-gtk/IDE/Pane/Trace.hs | haskell | # LANGUAGE TypeSynonymInstances #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
---------------------------------------------------------------------------
Module : IDE.Pane.Trace
License : GPL
Maintainer :
Stability : provisional
Portability :
|
-----------------------------... | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE LambdaCase #
Copyright : 2007 - 2011 ,
module IDE.Pane.Trace (
IDETrace
, TraceState
, showTrace
, fillTraceList
) where
import Prelude ()
import Prelude.Compat
i... |
c0ef434058c22510b2323c77261dca37641cb240a77bf9fd81d3ea98c6ed461e | NorfairKing/validity | VectorSpec.hs | # LANGUAGE TypeApplications #
module Test.Validity.VectorSpec where
import Data.GenValidity.Vector ()
import qualified Data.Vector as V
import qualified Data.Vector.Storable as SV
import Test.Hspec
import Test.Validity.GenValidity
spec :: Spec
spec = do
genValidSpec @(V.Vector Int)
genValidSpec @(V.Vector Ration... | null | https://raw.githubusercontent.com/NorfairKing/validity/35bc8d45b27e6c21429e4b681b16e46ccd541b3b/genvalidity-vector/test/Test/Validity/VectorSpec.hs | haskell | # LANGUAGE TypeApplications #
module Test.Validity.VectorSpec where
import Data.GenValidity.Vector ()
import qualified Data.Vector as V
import qualified Data.Vector.Storable as SV
import Test.Hspec
import Test.Validity.GenValidity
spec :: Spec
spec = do
genValidSpec @(V.Vector Int)
genValidSpec @(V.Vector Ration... | |
c049c826395ba4cc0d121a9759c0f733edb663baabdadaa60bd88cd724689977 | scarf-sh/tie | Name.hs | # LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Tie.Name
( PackageName,
ApiName,
Name,
fromText,
cabalFileName,
toDataTypeName,
toOneOfDataTypeName,
toOneOfConstructorName,
toFunctionName,
toConstructorName,
to... | null | https://raw.githubusercontent.com/scarf-sh/tie/61a154f14d729ad79136f71f28763f7fd9fe7ce7/src/Tie/Name.hs | haskell | # LANGUAGE OverloadedStrings #
| Name of the API to generate code for
| Returns the name as written, should be used within quotes only.
Filter away '\0' to support the weird cookie trick
(see test/golden/weird-cookie-trick.yaml)
| Constructs a name for an object defined inline. Based on the containing data
type a... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
module Tie.Name
( PackageName,
ApiName,
Name,
fromText,
cabalFileName,
toDataTypeName,
toOneOfDataTypeName,
toOneOfConstructorName,
toFunctionName,
toConstructorName,
toFieldName,
toJsonFieldName,
... |
c5c1f8cbd29dd4ccb47d1cfbdc1a7fbff667827a8e68842f42b896e55f961fde | mzp/coq-ide-for-ios | flags.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/lib/flags.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Compatibility mode
Silent / Verbo... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : flags.ml 13436 2010... |
f5b6248fc8bafc59d0b6b962cd82058d836b97f48ea75287005683016e7cf166 | tommaisey/aeon | latch.help.scm | (hear (mul (blip ar (mul-add (latch (white-noise ar) (impulse ar 9 0)) 400 500) 4) 0.2))
The above is just meant as example . lf - noise0 is a faster way to
;; generate random steps :
(hear (mul (blip ar (mul-add (lf-noise0 kr 9) 400 500) 4) 0.2))
;; -users/2006-December/029991.html
(hear
(let* ((n0 (mul-add (lf... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/controls/latch.help.scm | scheme | generate random steps :
-users/2006-December/029991.html | (hear (mul (blip ar (mul-add (latch (white-noise ar) (impulse ar 9 0)) 400 500) 4) 0.2))
The above is just meant as example . lf - noise0 is a faster way to
(hear (mul (blip ar (mul-add (lf-noise0 kr 9) 400 500) 4) 0.2))
(hear
(let* ((n0 (mul-add (lf-noise2 kr 8) 200 300))
(n1 (mul-add (lf-noise2 kr 3) 1... |
a94e2f94cbd6a53bd43a9f8ec5c5b7af0cdc8a5afc5a5a689cff156a35d76785 | input-output-hk/marlowe-cardano | Local.hs | # LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE StrictData #-}
module Test.Integration.Cardano.Local
( Delegator(..)
, LocalTestnet(..)
, LocalTestnetOptions(..)
, Network(..)
, PaymentKeyPair(..)
, SpoNode(..)
, StakingKeyPair(..)
, TestnetException(..)
, defaultOptions... | null | https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/d6e5e401b5bcd033ed7b37f7f7a3d79447b29b06/cardano-integration/src/Test/Integration/Cardano/Local.hs | haskell | # LANGUAGE StrictData #
| Run a test script in the context of a local testnet using default options.
| A version of @@withLocalTestnet@@ that accepts custom options.
| Whenever an exception occurs, this function will decorate it with
information about the local testnet.
prevent workspace from being cleaned up for ... | # LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
module Test.Integration.Cardano.Local
( Delegator(..)
, LocalTestnet(..)
, LocalTestnetOptions(..)
, Network(..)
, PaymentKeyPair(..)
, SpoNode(..)
, StakingKeyPair(..)
, TestnetException(..)
, defaultOptions
, withLocalTestnet
, wi... |
e16b5435ef80c47f887a9a937d691a4d9eb46d98bcb579176a525de1690cf042 | fyquah/hardcaml_zprize | test_ec_fpn_mixed_add_with_montgomery_mult.ml | open Core
open Elliptic_curve_lib
open Test_ec_fpn_mixed_add
let config = Config_presets.For_bls12_377.ec_fpn_ops_with_montgomery_reduction
let latency = Ec_fpn_mixed_add.latency config
let%expect_test "latency" =
Stdio.printf "latency = %d\n" latency;
[%expect {| latency = 283 |}]
;;
let%expect_test "Test on so... | null | https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/libs/elliptic_curve/test/test_ec_fpn_mixed_add_with_montgomery_mult.ml | ocaml | Handcrafted test cases.
Randomly generated test cases of points added to the generator. | open Core
open Elliptic_curve_lib
open Test_ec_fpn_mixed_add
let config = Config_presets.For_bls12_377.ec_fpn_ops_with_montgomery_reduction
let latency = Ec_fpn_mixed_add.latency config
let%expect_test "latency" =
Stdio.printf "latency = %d\n" latency;
[%expect {| latency = 283 |}]
;;
let%expect_test "Test on so... |
612334f4c623b053f540680e98193124a74781214e1a04535d3d4a4c567d4e4a | BitGameEN/bitgamex | data_autogen_usr.erl | %%%--------------------------------------------------------
%%% @Module : data_autogen_usr
@Description : 连接usr库获取表结构,自动生成数据访问代码
%%%--------------------------------------------------------
-module(data_autogen_usr).
-export([run/0]).
-define(DB, bg_mysql_usr).
-define(DB_HOST, "localhost").
-define(DB_PORT,... | null | https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/aux_scripts/codegen/data_autogen_usr.erl | erlang | --------------------------------------------------------
@Module : data_autogen_usr
--------------------------------------------------------
取出查询结果中的所有行
1 - id通过id_gen生成
[F1_, F2_]
[f1, f2]
<<"{x, y}">>
<<"x, y">>
| @Description : 连接usr库获取表结构,自动生成数据访问代码
-module(data_autogen_usr).
-export([run/0]).
-define(DB, bg_mysql_usr).
-define(DB_HOST, "localhost").
-define(DB_PORT, 3306).
-define(DB_USER, "bitgame").
-define(DB_PASS, "bitgame123").
-define(DB_NAME, "bitgame_usr").
-define(DB_ENCODE, utf8).
init_db() ->
my... |
bfad5a6b71c7c2ffe07b3d5c92e17a5bf9e3225c10f2ce17893d4d43c2c4fcfc | CryptoKami/cryptokami-core | Misc.hs | -- | Interface for the Misc DB
module Pos.Update.DB.Misc
( isUpdateInstalled
, affirmUpdateInstalled
) where
import Universum
import Formatting (sformat)
import Pos.Binary.Class (Raw)
import Pos.Crypto (Hash, hashHexF)
import Pos.DB.Class (Monad... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/update/Pos/Update/DB/Misc.hs | haskell | | Interface for the Misc DB |
module Pos.Update.DB.Misc
( isUpdateInstalled
, affirmUpdateInstalled
) where
import Universum
import Formatting (sformat)
import Pos.Binary.Class (Raw)
import Pos.Crypto (Hash, hashHexF)
import Pos.DB.Class (MonadDB)
import Pos.DB.Mis... |
53923f4c68d2f56139bce22db2360f965caa4fbe58abc35c2fd6d2f29555ef06 | ghcjs/ghcjs-dom | Debug.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module GHCJS.DOM.Debug (
DomHasCallStack
, debugEnabled
, getElementStack
, addDebugMenu
, addDebugMenu'
) where
import Control.Arrow (Arrow(..))
import ... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom/src/GHCJS/DOM/Debug.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE OverloadedStrings # | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE RecordWildCards #
module GHCJS.DOM.Debug (
DomHasCallStack
, debugEnabled
, getElementStack
, addDebugMenu
, addDebugMenu'
) where
import Control.Arrow (Arrow(..))
import Control.Monad.IO.Class (MonadIO(..))
import Data.Char (toLower)
imp... |
ed49113dbbbf403a83e535c95acfb5f98896b3235fe91fca9b033c1c6a0e51c4 | Zilliqa/scilla | StateIPCIdl.ml |
This file is part of scilla .
Copyright ( c ) 2018 - present Zilliqa Research Pvt . Ltd.
scilla 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 y... | null | https://raw.githubusercontent.com/Zilliqa/scilla/011323ac5da48ee16890b71424e057ffbc4216da/src/eval/StateIPCIdl.ml | ocaml | TODO: [@warning "-32"] doesn't seem to work for "unused" types.
defines `typ_of__fetch_ret_t`
This is a utility to test the testsuite server with JSON data.
* It isn't part of the Zilliqa<->Scilla IPC protocol. |
This file is part of scilla .
Copyright ( c ) 2018 - present Zilliqa Research Pvt . Ltd.
scilla 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 y... |
cf421e374c07adfcf68c3d0064062d99ca9a40057de6910206c59cbd3ff8564d | rizo/snowflake-os | translcore.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/plugins/ocamlopt.opt/bytecomp/translcore.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
open Asttypes
open Types
open... |
2272c0ae5a6340d82414bf8e7f20381bd03dc948ddf803196aea47e38657c5bc | andersfugmann/ppx_protocol_conv | unittest.ml | module Driver = struct
let name = "yaml"
let serialize t = Yaml.to_string_exn t
let deserialize t = Yaml.of_string_exn t
include Protocol_conv_yaml.Yaml
let of_driver_exn = of_yaml_exn
let of_driver = of_yaml
let to_driver = to_yaml
let sexp_of_t : t -> Sexplib.Sexp.t = fun t ->
Sexplib.Std.sexp_of_... | null | https://raw.githubusercontent.com/andersfugmann/ppx_protocol_conv/e93eb01ca8ba8c7dd734070316cd281a199dee0d/drivers/yaml/test/unittest.ml | ocaml | module Driver = struct
let name = "yaml"
let serialize t = Yaml.to_string_exn t
let deserialize t = Yaml.of_string_exn t
include Protocol_conv_yaml.Yaml
let of_driver_exn = of_yaml_exn
let of_driver = of_yaml
let to_driver = to_yaml
let sexp_of_t : t -> Sexplib.Sexp.t = fun t ->
Sexplib.Std.sexp_of_... | |
bc4dbcf01d5c192ae500a69f7d75b9b18909f615433287cf76b8da0b9afe7559 | arbor/antiope | Messages.hs | # LANGUAGE DeriveGeneric #
module Antiope.SNS.Messages
( SnsMessage (..)
) where
import Data.Aeson as Aeson
import Data.Text (Text)
import Data.Time.Clock (UTCTime)
import GHC.Generics (Generic)
import qualified Data.Aeson.Types as Aeson
import qualified Data.ByteString.Lazy as LBS
import quali... | null | https://raw.githubusercontent.com/arbor/antiope/86ad3df07b8d3fd5d2c8bef4111a73b85850e1ba/antiope-sns/src/Antiope/SNS/Messages.hs | haskell | # LANGUAGE DeriveGeneric #
module Antiope.SNS.Messages
( SnsMessage (..)
) where
import Data.Aeson as Aeson
import Data.Text (Text)
import Data.Time.Clock (UTCTime)
import GHC.Generics (Generic)
import qualified Data.Aeson.Types as Aeson
import qualified Data.ByteString.Lazy as LBS
import quali... | |
c9967cf93726b553ddc81b6317186d5b47e7bdaaf5270375c600783e8aef9a7e | gsdlab/clafer | GetURL.hs | ( c ) 2011 , see the file LICENSE for copying terms .
-- Simple wrapper around HTTP, allowing proxy use
module GetURL (getURL) where
import Network.HTTP
import Network.Browser
import Network.URI
getURL :: String -> IO String
getURL url = do
Network.Browser.browse $ do
setCheckForProxy True
setDebugLog... | null | https://raw.githubusercontent.com/gsdlab/clafer/a30a645ae1e4fc793851e53446d220924038873a/src/GetURL.hs | haskell | Simple wrapper around HTTP, allowing proxy use | ( c ) 2011 , see the file LICENSE for copying terms .
module GetURL (getURL) where
import Network.HTTP
import Network.Browser
import Network.URI
getURL :: String -> IO String
getURL url = do
Network.Browser.browse $ do
setCheckForProxy True
setDebugLog Nothing
setOutHandler (const (return ()))
... |
1169783e1fc8cde13e8db063b09913d8ba964697a3ca894f6d0d519a6d7e2815 | argp/bap | test_num.ml | open OUnit
open BatNum
let tests = "Num" >::: [
"of_float" >::: [
"zero" >:: begin function () ->
assert_equal ~cmp:(=) ~printer:to_string zero (of_float 0.)
end;
"numbers" >:: begin function () ->
Array.iter begin function f ->
assert_equal ~printer:BatFloat.to_string f
(... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/testsuite/test_num.ml | ocaml | f is float, n/d are expected nominator and denominator
expect error
expect result
values to test
allow null denominator
disallow null denominator | open OUnit
open BatNum
let tests = "Num" >::: [
"of_float" >::: [
"zero" >:: begin function () ->
assert_equal ~cmp:(=) ~printer:to_string zero (of_float 0.)
end;
"numbers" >:: begin function () ->
Array.iter begin function f ->
assert_equal ~printer:BatFloat.to_string f
(... |
aece476c5e63b32ca5bfbe1170cd8eaa9e3a7c24bab158985999d2af984c0f73 | clash-lang/clash-compiler | Tags.hs | -----------------------------------------------------------------------------
--
GHCi 's : ctags and : commands
--
( c ) The GHC Team 2005 - 2007
--
-----------------------------------------------------------------------------
# OPTIONS_GHC -fno - warn - name - shadowing #
module Clash.GHCi.UI.Tags (
createCTa... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/clash-ghc/src-bin-881/Clash/GHCi/UI/Tags.hs | haskell | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
---------------------------------------------------------------------------
create tags file for currently loaded modules.
- remove restriction that all modul... | GHCi 's : ctags and : commands
( c ) The GHC Team 2005 - 2007
# OPTIONS_GHC -fno - warn - name - shadowing #
module Clash.GHCi.UI.Tags (
createCTagsWithLineNumbersCmd,
createCTagsWithRegExesCmd,
createETagsFileCmd
) where
import Exception
import GHC
import Clash.GHCi.UI.Monad
import Outputable
ToDo : f... |
37affc30c40998ca9b52d2bfe8049cabaa1db74560dffa469a75772a66acdff3 | alexandergunnarson/quantum | nondeterministic.cljc | (ns quantum.untyped.core.nondeterministic
(:require
[clojure.core :as core]
[quantum.untyped.core.error
:refer [TODO]])
#?(:clj
(:import
java.security.SecureRandom)))
#?(:clj (defonce ^SecureRandom secure-random-generator
(SecureRandom/getInstance "SHA1PRNG")))
(defn #?(:clj ^java.util... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src-untyped/quantum/untyped/core/nondeterministic.cljc | clojure | (ns quantum.untyped.core.nondeterministic
(:require
[clojure.core :as core]
[quantum.untyped.core.error
:refer [TODO]])
#?(:clj
(:import
java.security.SecureRandom)))
#?(:clj (defonce ^SecureRandom secure-random-generator
(SecureRandom/getInstance "SHA1PRNG")))
(defn #?(:clj ^java.util... | |
f20079b8054db22c3e0b80ee011b5737d625125b772b3d5256f0af0e4ff0299f | ocaml-flambda/ocaml-jst | consistbl.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/1bb6c797df7c63ddae1fc2e6f403a0ee9896cc8e/utils/consistbl.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2002 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
Consistency tables : for checking consistency of module CRCs
open Misc
module Make (Module_name : sig... |
a09a3e48c5a0467b7d9929370b4185339dfe6b1d252a4d72fe057e2c4989d945 | ghc/testsuite | rnfail019.hs | module ShouldFail where
-- !!! Section with with a bad precedence
f x y = (x:y:)
GHC 4.04 ( as released ) let this by , but it 's a precedence error .
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/rename/should_fail/rnfail019.hs | haskell | !!! Section with with a bad precedence | module ShouldFail where
f x y = (x:y:)
GHC 4.04 ( as released ) let this by , but it 's a precedence error .
|
63375bbe2f0ff28e615fbd420b277f3d06efab965ef128341daf9211badb6f7d | janestreet/bonsai | search_bar.ml | open! Core
open! Import
module Search_container = [%css stylesheet {|
.class_ {
position: relative;
}
|}]
module Search_icon =
[%css
stylesheet {|
.class_ {
position: absolute;
left: 16px;
top: 8px;
}
|}]
module Search_bar =
[%css
stylesheet
{|
.class_ {
width: 100%;
height: 40px;
fon... | null | https://raw.githubusercontent.com/janestreet/bonsai/8643e8b3717b035386ac36f2bcfa4a05bca0d64f/examples/feather_icons/search_bar.ml | ocaml | open! Core
open! Import
module Search_container = [%css stylesheet {|
.class_ {
position: relative;
}
|}]
module Search_icon =
[%css
stylesheet {|
.class_ {
position: absolute;
left: 16px;
top: 8px;
}
|}]
module Search_bar =
[%css
stylesheet
{|
.class_ {
width: 100%;
height: 40px;
fon... | |
a90200c08a183c5c40e61d89c73258700e184c85e3bee6c0b7151fad390f3f96 | ds-wizard/engine-backend | AppConfigSM.hs | module Wizard.Api.Resource.Config.AppConfigSM where
import Data.Swagger
import Shared.Api.Resource.Package.PackagePatternSM ()
import Shared.Util.Swagger
import Wizard.Api.Resource.Config.AppConfigJM ()
import Wizard.Api.Resource.Config.SimpleFeatureSM ()
import Wizard.Api.Resource.Questionnaire.QuestionnaireSharingS... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/8f2fadd4a0dae84eb1f5f09230c4c5b58ac3e18d/engine-wizard/src/Wizard/Api/Resource/Config/AppConfigSM.hs | haskell | module Wizard.Api.Resource.Config.AppConfigSM where
import Data.Swagger
import Shared.Api.Resource.Package.PackagePatternSM ()
import Shared.Util.Swagger
import Wizard.Api.Resource.Config.AppConfigJM ()
import Wizard.Api.Resource.Config.SimpleFeatureSM ()
import Wizard.Api.Resource.Questionnaire.QuestionnaireSharingS... | |
a688ce86e86c285755363700888e825caa0d1556448e7e6b825b06ee8f0c2a16 | heliaxdev/extensible-data | DerivBase.hs | module DerivBase where
import Extensible
extensible [d|
data A a = A (B a) Int deriving Eq
data B a = B a deriving Eq
|]
| null | https://raw.githubusercontent.com/heliaxdev/extensible-data/d11dee6006169cb537e95af28c3541a24194dea8/examples/deriv/DerivBase.hs | haskell | module DerivBase where
import Extensible
extensible [d|
data A a = A (B a) Int deriving Eq
data B a = B a deriving Eq
|]
| |
372a104e46c03f02d3aa5a585964a0bdaba4d3e3dd00983a19b1d0a550a12476 | weblocks-framework/weblocks | company-presenter.lisp | (in-package :employer-employee)
(defwidget company-presenter (composite)
((data
:reader company-presenter-data
:initform nil
:initarg :data
:documentation
"Company data object rendered and modified by this widget.")
(data-class
:accessor company-presenter-data-class
:i... | null | https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/contrib/yarek/examples/employer-employee/src/widgets/company-presenter.lisp | lisp | note: we're setting the slot directly instead of
using the accessor to avoid setting
data on the editor (the dfw) - see method | (in-package :employer-employee)
(defwidget company-presenter (composite)
((data
:reader company-presenter-data
:initform nil
:initarg :data
:documentation
"Company data object rendered and modified by this widget.")
(data-class
:accessor company-presenter-data-class
:i... |
4e437203b0d37b4b312874a4313eb94e9a1990d3eb1a21e010c394949f0d43ea | bobot/FetedelascienceINRIAsaclay | a_star.ml | File : a_star.ml
Copyright ( C ) 2008
< >
< >
WWW : /
This library is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2.1 or
later as published by the Free Software Foundation , with the special
... | null | https://raw.githubusercontent.com/bobot/FetedelascienceINRIAsaclay/87765db9f9c7211a26a09eb93e9c92f99a49b0bc/2010/robot/examples_mindstorm_lab/rubik/a_star.ml | ocaml | * Functor using a [Phase] module to develop some strategies to find a
sequence of moves to get into a goal state.
* [search_seq_to_goal p in_goal] returns a list of moves that lead
to the a permutation [q] (such that [in_goal q] is true) from
the permutation [p].
[opened] is the set of all pending ca... | File : a_star.ml
Copyright ( C ) 2008
< >
< >
WWW : /
This library is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2.1 or
later as published by the Free Software Foundation , with the special
... |
d2d1fdecd94352bec48b95baf61d77528b9c1265c0f99dd8382e5c319774038d | ollef/sixten | Compile.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Backend.Compile where
import Protolude hiding (moduleName, (<.>))
import Data.Char
import Data.List(dropWhile, dropWhileEnd)
import Data.String
import qualified Data.Text.IO as Text
import Data.Version
import System.Directory... | null | https://raw.githubusercontent.com/ollef/sixten/60d46eee20abd62599badea85774a9365c81af45/src/Backend/Compile.hs | haskell | # LANGUAGE OverloadedStrings #
See -new-versioning-scheme.html
to be supported.
We enable @-fLTO@ in @assemble@ to perform link time optimizations.
however clang will automatically pass static MSVCRT to linker. | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
module Backend.Compile where
import Protolude hiding (moduleName, (<.>))
import Data.Char
import Data.List(dropWhile, dropWhileEnd)
import Data.String
import qualified Data.Text.IO as Text
import Data.Version
import System.Directory
import System.FilePath
import Syst... |
92870d1e635d93394ead83e95a4c2dedbe76db1758258a77347312d6efe4ebda | skanev/playground | 44.scm | EOPL exercise 3.44
;
; In the preceding example, the only use of f is as a known procedure.
; Therefore the procedure built by the expression proc (y) -(y, x) is never
; used. Modify the translator so that such a procedure is never constructred.
; We base this on the previous exercise. We just need to modify how let... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/03/44.scm | scheme |
In the preceding example, the only use of f is as a known procedure.
Therefore the procedure built by the expression proc (y) -(y, x) is never
used. Modify the translator so that such a procedure is never constructred.
We base this on the previous exercise. We just need to modify how let treats
its value-exp. If ... | EOPL exercise 3.44
(define (empty-kenv)
'())
(define (apply-kenv kenv var)
(let ((pair (assoc var kenv)))
(if pair
(cadr pair)
(eopl:error 'apply-kenv "Unknown variable: ~a" var))))
(define (kenv-defines? kenv var)
(if (assoc var kenv)
#t
#f))
(define (extend-kenv kenv var... |
615bbe7570f820f16ba0d9cfa46e6a6b1cbd5f6b2f027db5c5f31d06db74a6f6 | zadean/xqerl | xqerl_module.erl | Copyright ( c ) 2019 - 2020 .
SPDX - FileCopyrightText : 2022
%
SPDX - License - Identifier : Apache-2.0
-module(xqerl_module).
-include("xqerl_parser.hrl").
%% ====================================================================
%% API functions
%% ===================================================... | null | https://raw.githubusercontent.com/zadean/xqerl/06c651ec832d0ac2b77bef92c1b4ab14d8da8883/src/xqerl_module.erl | erlang |
====================================================================
API functions
====================================================================
====================================================================
====================================================================
When given a list of {U... | Copyright ( c ) 2019 - 2020 .
SPDX - FileCopyrightText : 2022
SPDX - License - Identifier : Apache-2.0
-module(xqerl_module).
-include("xqerl_parser.hrl").
-export([
merge_library_trees/1,
expand_imports/1,
module_namespace/2
]).
Internal functions
Returns : [ { , ImportedAstList }... |
dd09456e0905d04a5743d9f901f2d79329d2417ac38edb7f0bb2a14850df73c2 | ympbyc/Carrot | Compiler.scm | S - expression to SECD instruction Compiler ; ; ; ;
2012 Minori Yamashita < > ; ; add your name here
;;;
;;; reference:
;;;
;;;
(load "./SECD.scm")
;;; Helpers ;;;
(define (atom? x)
(cond
[(string? x) #t]
[(number? x) #t]
[(boolean? x) #t]
[(char? x) #t]
[else #f]))
;;uncurry funct... | null | https://raw.githubusercontent.com/ympbyc/Carrot/5ce3969b3833bcf1b466d808a74d0a03653ef6ab/old/Compiler.scm | scheme | ; ; ;
; add your name here
reference:
Helpers ;;;
uncurry function applications
stack all the arguments to the primitive procedure
and apply the procedure
compile :: Lisp -> SECD
compile- :: Lisp -> code -> code
(print (format "exp : ~S" exp))
(print (format "code: ~S" code))
(newline)
(stack-constant const)
... |
(load "./SECD.scm")
(define (atom? x)
(cond
[(string? x) #t]
[(number? x) #t]
[(boolean? x) #t]
[(char? x) #t]
[else #f]))
(define (complis exp code)
(if (null? exp)
code
(compile- `(delay ,(car exp)) (complis (cdr exp) code))))
(define (primitive-compile args prim)
(if (null?... |
740a704e815ec94ba431f6e46978e061f02926e9c568f0a4d23b95f06011b454 | HIPERFIT/accelerate-opencl | Fold_Test.hs | module Fold_Test (tests) where
import Data.Array.Accelerate (Acc, Exp, Elt, Z(..), (:.)(..))
import qualified Data.Array.Accelerate as Acc
import qualified Data.Array.Accelerate.Smart as Acc
import qualified Data.Array.Accelerate.OpenCL as Acc
import Test.Framework (testGroup)
import Test.Framework.Providers.QuickChe... | null | https://raw.githubusercontent.com/HIPERFIT/accelerate-opencl/7ec05ba9d4d5461ffcf952bed6d0dcc4b1915099/tests/unit/Fold_Test.hs | haskell | Convert seconds to milliseconds
Make problems larger, and limit the time used on solving each problem
Simultaneous addition of tuples
fold tests --
We do not want to test whether fold on empty list here
Tests the empty list case
| Generic fold1 test
Supply it with a regular function and an Accelerate function... | module Fold_Test (tests) where
import Data.Array.Accelerate (Acc, Exp, Elt, Z(..), (:.)(..))
import qualified Data.Array.Accelerate as Acc
import qualified Data.Array.Accelerate.Smart as Acc
import qualified Data.Array.Accelerate.OpenCL as Acc
import Test.Framework (testGroup)
import Test.Framework.Providers.QuickChe... |
9f70ec64fabe1cccf4deedd7c2662f0b20c5088c1772ab23adaa3fc45a34c410 | gildor478/ocaml-gettext | bench.ml | (**************************************************************************)
(* ocaml-gettext: a library to translate messages *)
(* *)
Copyright ( C ) 2003 - 2008 < >
(* ... | null | https://raw.githubusercontent.com/gildor478/ocaml-gettext/9b7afc702bccace9a544b8efa2a28bc2b13371ed/test/bench/bench.ml | ocaml | ************************************************************************
ocaml-gettext: a library to translate messages
This library is free softw... | Copyright ( C ) 2003 - 2008 < >
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later version ;
You should have received a copy of the GNU Lesser General Public
License along with this library ; if not ,... |
26e5c8d0fb1ccfc2d67ef6ab8fbc9776781bc9a65e7a3adbcb71c7ceff768692 | caradoc-org/caradoc | mapkey.ml | (*****************************************************************************)
(* Caradoc: a PDF parser and validator *)
Copyright ( C ) 2015 ANSSI
Copyright ( C ) 2015 - 2017
(* ... | null | https://raw.githubusercontent.com/caradoc-org/caradoc/100f53bc55ef682049e10fabf24869bc019dc6ce/src/util/mapkey.ml | ocaml | ***************************************************************************
Caradoc: a PDF parser and validator
This program is free software; you can redistribute it and/or modify
... | Copyright ( C ) 2015 ANSSI
Copyright ( C ) 2015 - 2017
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation .
You should have rece... |
5348156b0532c3b6661d1589597baaf853ea1671ca23c14447e03c8634b95ff7 | sicmutils/sicmutils | pendulum_test.cljc | #_"SPDX-License-Identifier: GPL-3.0"
(ns sicmutils.examples.pendulum-test
(:require [clojure.test :refer [is deftest use-fixtures]]
[sicmutils.env :refer [up simplify]]
[sicmutils.examples.pendulum :as p]
[sicmutils.simplify :refer [hermetic-simplify-fixture]]
[sicmuti... | null | https://raw.githubusercontent.com/sicmutils/sicmutils/ce763b31153eb9253f165bd5b4e4e6a6087bf730/test/sicmutils/examples/pendulum_test.cljc | clojure | #_"SPDX-License-Identifier: GPL-3.0"
(ns sicmutils.examples.pendulum-test
(:require [clojure.test :refer [is deftest use-fixtures]]
[sicmutils.env :refer [up simplify]]
[sicmutils.examples.pendulum :as p]
[sicmutils.simplify :refer [hermetic-simplify-fixture]]
[sicmuti... | |
5a39b5d9233ea76d69108765ab8743467d80aa0bb33dfb3f5ca66d4966d8d97a | axelarge/advent-of-code | day10_test.clj | (ns advent-of-code.y2015.day10-test
(:require [clojure.test :refer :all]
[advent-of-code.y2015.day10 :refer :all]))
(deftest test-solve1
(is (= (solve1 input) 329356)))
(deftest ^:slow test-solve2
(is (= (solve2 input) 4666278)))
| null | https://raw.githubusercontent.com/axelarge/advent-of-code/4c62a53ef71605780a22cf8219029453d8e1b977/test/advent_of_code/y2015/day10_test.clj | clojure | (ns advent-of-code.y2015.day10-test
(:require [clojure.test :refer :all]
[advent-of-code.y2015.day10 :refer :all]))
(deftest test-solve1
(is (= (solve1 input) 329356)))
(deftest ^:slow test-solve2
(is (= (solve2 input) 4666278)))
| |
4438b639d1419e3537d59fdb3062d3fa3084987ced40a61d31d5d338b9ea1c6e | davidhmartin/mcache | spy.clj | (ns mcache.spy
"Memcache protocol implementation extending net.spy.memcached.MemcachedClient"
(:use [mcache.core]
[mcache.util :only (cache-update-multi)]))
(extend-type net.spy.memcached.MemcachedClient
Memcache
(default-exp [mc] DEFAULT-EXP)
(put-if-absent
([mc key value]
(put-if-abse... | null | https://raw.githubusercontent.com/davidhmartin/mcache/0df952207cef1ed10b5d81c58edc94873a11fdeb/src/mcache/spy.clj | clojure | (ns mcache.spy
"Memcache protocol implementation extending net.spy.memcached.MemcachedClient"
(:use [mcache.core]
[mcache.util :only (cache-update-multi)]))
(extend-type net.spy.memcached.MemcachedClient
Memcache
(default-exp [mc] DEFAULT-EXP)
(put-if-absent
([mc key value]
(put-if-abse... | |
8ce7032a750f4bc19fc7bca20c2f2094449430141a22500d6dfc7a39215ccf70 | janestreet/core_profiler | offline.ml | open Core
open Core_profiler_disabled
module Profiler = struct
let is_enabled = true
let safe_to_delay () =
Common.maybe_do_slow_tasks Common.Offline_profiler ~reluctance:1;
Protocol.Buffer.ensure_free 2048
let dump_stats () =
Protocol.Writer.dump_stats ()
let configure
?don't_require_core_p... | null | https://raw.githubusercontent.com/janestreet/core_profiler/3d1c0e61df848f5f25f78d64beea92b619b6d5d9/src/offline.ml | ocaml | Note! sources : Point.t array = Point_id.t array
stateless Delta_probe does not support pausing | open Core
open Core_profiler_disabled
module Profiler = struct
let is_enabled = true
let safe_to_delay () =
Common.maybe_do_slow_tasks Common.Offline_profiler ~reluctance:1;
Protocol.Buffer.ensure_free 2048
let dump_stats () =
Protocol.Writer.dump_stats ()
let configure
?don't_require_core_p... |
558d87680a973aef630b01a177ec4c273ab7193a6d0e9b8f7d149634ac8e1c0a | tschady/advent-of-code | d15_test.clj | (ns aoc.2021.d15-test
(:require [aoc.2021.d15 :as sut]
[clojure.test :refer :all]))
(def ex ["1163751742"
"1381373672"
"2136511328"
"3694931569"
"7463417111"
"1319128137"
"1359912421"
"3125421639"
"1293138521"
"2311944581"])... | null | https://raw.githubusercontent.com/tschady/advent-of-code/72ee3771da0bab9b5c590268b92fed3d137a6c99/test/aoc/2021/d15_test.clj | clojure | (ns aoc.2021.d15-test
(:require [aoc.2021.d15 :as sut]
[clojure.test :refer :all]))
(def ex ["1163751742"
"1381373672"
"2136511328"
"3694931569"
"7463417111"
"1319128137"
"1359912421"
"3125421639"
"1293138521"
"2311944581"])... | |
8061acee6b0081802d879c6a2b0b6a6141db4fa5e1e626394ef98fb97612e220 | obsidiansystems/obelisk | Deploy.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE ViewPatterns #
module Obelisk.Command.Deploy where
import Control.Applicative (liftA2)
import Control.Lens
import Control.Monad
import... | null | https://raw.githubusercontent.com/obsidiansystems/obelisk/d779d5ab007d8ee5c3cd3400473453e1d106f5f1/lib/command/src/Obelisk/Command/Deploy.hs | haskell | # LANGUAGE OverloadedStrings #
make sure that hostname is present
Note: we can't use a spinner here as this function will prompt the user.
IMPORTANT: We cannot copy config directory from the development project to
the deployment directory. If we do, it's very likely someone will
accidentally create a production depl... | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE ViewPatterns #
module Obelisk.Command.Deploy where
import Control.Applicative (liftA2)
import Control.Lens
import Control.Monad
import Control.Monad.Catch (Exception (di... |
42afc83497ea5e472e770e19178c99a8ce5c8971e338b516bf114685690df267 | directrix1/DuplicateBridgeTeamSteele | replace.lisp | (include-book "utilities")
; chrs [characters] :: list of characters to be scanned
; so-far string :: string seen so far
; div character :: character to split at
;
; returns a list [string (characters)]
; split at div, return a list where string is the chrs->str of the
; character seen before div and (charac... | null | https://raw.githubusercontent.com/directrix1/DuplicateBridgeTeamSteele/0f0d0312569fb1d26d568e2b87d66ac160ac60c3/timpl/dropbox/psp%2B%2B/replace.lisp | lisp | chrs [characters] :: list of characters to be scanned
so-far string :: string seen so far
div character :: character to split at
returns a list [string (characters)]
split at div, return a list where string is the chrs->str of the
character seen before div and (characters) is the remaining
characters ... | (include-book "utilities")
(defun split2 (chrs so-far div)
(if (consp chrs)
(if (equal (first chrs) div)
(list (reverse (chrs->str so-far)) (rest chrs))
(split2 (rest chrs)
(cons (first chrs) so-far)
div))
(list (reverse (chrs->str so-far)... |
50fba6d920e2236feb5c6739b4bdcd0a6de0950d802c58dc1bbfaf4379c4c88c | haskell/time | LocalTime.hs | {-# LANGUAGE Safe #-}
module Data.Time.LocalTime (
-- * Time zones
TimeZone (..),
timeZoneOffsetString,
timeZoneOffsetString',
minutesToTimeZone,
hoursToTimeZone,
utc,
-- getting the locale time zone
getTimeZone,
getCurrentTimeZone,
module Data.Time.LocalTime.Internal.TimeOf... | null | https://raw.githubusercontent.com/haskell/time/dba6302b244a7b991ee7cac0d16461fddd222965/lib/Data/Time/LocalTime.hs | haskell | # LANGUAGE Safe #
* Time zones
getting the locale time zone |
module Data.Time.LocalTime (
TimeZone (..),
timeZoneOffsetString,
timeZoneOffsetString',
minutesToTimeZone,
hoursToTimeZone,
utc,
getTimeZone,
getCurrentTimeZone,
module Data.Time.LocalTime.Internal.TimeOfDay,
module Data.Time.LocalTime.Internal.CalendarDiffTime,
module Data... |
bee8dc435d2b01e20c4ab1b0f97f200c0384273b582a6391bcb5f97cf17c10e2 | xvw/preface | freer_monad_print_read_or_fail.mli | val cases : (string * unit Alcotest.test_case list) list
| null | https://raw.githubusercontent.com/xvw/preface/ee5934395476c3e44451e3effffa0fc7db68b83e/test/preface_examples_test/freer_monad_print_read_or_fail.mli | ocaml | val cases : (string * unit Alcotest.test_case list) list
| |
f766caa8f3241fb99e8155cd555b6d9d984b8274c4f2a7e159ec9d06b62cfeab | solomon-b/HowardLang | Typechecker.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module HowardLang.Typechecker where
import Control.Monad.Except
import Control.Monad.Identity
import Control.Monad.Reader
import Data.Functor.Foldable
import Data.Maybe (mapMaybe)
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as M
import Da... | null | https://raw.githubusercontent.com/solomon-b/HowardLang/b7af7ea2e47d7477d33637406ebb04f6e9b55f9d/src/HowardLang/Typechecker.hs | haskell | TODO: Make this safer
TODO: Improve error reporting!!!!
TODO: How would I write this as a recursion scheme?
TODO: Improve this error, it does not reference the sum type.
-----------------------
- Type Substitution ---
-----------------------
----------------------------------------------------------
---- TODO: IMPR... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module HowardLang.Typechecker where
import Control.Monad.Except
import Control.Monad.Identity
import Control.Monad.Reader
import Data.Functor.Foldable
import Data.Maybe (mapMaybe)
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as M
import Da... |
dcebf5b23eef4e1bbaad1942e0f21c44810fe64b34d80f36309654f5bc45489a | open-telemetry/opentelemetry-erlang | otel_simple_processor.erl | %%%------------------------------------------------------------------------
Copyright 2021 , OpenTelemetry Authors
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
%%
%% Unl... | null | https://raw.githubusercontent.com/open-telemetry/opentelemetry-erlang/2ff5849d01f77fc143c83aa13f1d64fe2a7e5c48/apps/opentelemetry/src/otel_simple_processor.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 o... | Copyright 2021 , OpenTelemetry Authors
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@doc This Span Processor synchronously exports each ended Span .
Use this processor if ending a Span should block until it has been
... |
b88af5a89a9ff08077050a8272b535e9cab60a21b4a19eb5309e22aa0822fb3f | facebook/pyre-check | sharedMemoryKeys.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/98b8362ffa5c715c708676c1a37a52647ce79fe0/source/analysis/sharedMemoryKeys.ml | ocaml | TODO(T132410158) Add a module-level doc comment. |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
e093f23d78e7aeb6f736c60c252cb76d0c38384a2030032681bf60fd4569e53b | crategus/cl-cffi-gtk | text-view-attributes.lisp | Text View Attributes ( 2021 - 6 - 4 )
(in-package :gtk-example)
(defun example-text-view-attributes ()
(within-main-loop
(let* ((window (make-instance 'gtk-window
:type :toplevel
:title "Example Text View Attributes"
... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/b613a266a5f8e7f477b66a33d4df84fbed3dc7bc/demo/gtk-example/text-view-attributes.lisp | lisp | Change left margin throughout the widget
Change top margin
Change default font and color throughout the widget
}")
Use a tag to change the color for just one part of the widget
Apply the tag to a region of the text in the buffer
Add the text view to the window and show all | Text View Attributes ( 2021 - 6 - 4 )
(in-package :gtk-example)
(defun example-text-view-attributes ()
(within-main-loop
(let* ((window (make-instance 'gtk-window
:type :toplevel
:title "Example Text View Attributes"
... |
ee8d51f58326aa9aa290461c5b6ff32d692f21ff9ce7f8f602855d30785c7fed | tdammers/ginger | AST.hs | # LANGUAGE DeriveFunctor #
-- | Implements Ginger's Abstract Syntax Tree.
module Text.Ginger.AST
where
import Data.Text (Text)
import qualified Data.Text as Text
import Text.Ginger.Html
import Data.Scientific (Scientific)
import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as HashMap
-- | A con... | null | https://raw.githubusercontent.com/tdammers/ginger/bd8cb39c1853d4fb4f663c4c201884575906acea/src/Text/Ginger/AST.hs | haskell | | Implements Ginger's Abstract Syntax Tree.
| A context variable name.
| Top-level data structure, representing a fully parsed template.
| A macro definition ( @{% macro %}@ )
| A block definition ( @{% block %}@ )
TODO: scoped blocks
| Ginger statements.
^ A sequence of multiple statements
^ Run wrapped state... | # LANGUAGE DeriveFunctor #
module Text.Ginger.AST
where
import Data.Text (Text)
import qualified Data.Text as Text
import Text.Ginger.Html
import Data.Scientific (Scientific)
import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as HashMap
type VarName = Text
data Template a
= Template
... |
c7963881c44ef341d3d6cf8f6f1d54bb3fcadad329e65e6904ec4ac1842296df | ocaml-toml/To.ml | types_test.ml | let () =
let key = Toml.Types.Table.Key.of_string "a-b-c" in
assert (String.compare "a-b-c" (Toml.Types.Table.Key.to_string key) = 0)
| null | https://raw.githubusercontent.com/ocaml-toml/To.ml/c0ae79c2589ab4c82f4528b53ad711287140c7dd/tests/types_test.ml | ocaml | let () =
let key = Toml.Types.Table.Key.of_string "a-b-c" in
assert (String.compare "a-b-c" (Toml.Types.Table.Key.to_string key) = 0)
| |
90bc31a8caadeb6507a186603cc1053c9dc9ec9ff9eb9c72f4093c7bf84523f1 | abarbu/schemetex | schemetex-type-inference.scm | (module schemetex-type-inference *
(import chicken scheme srfi-1 extras data-structures ports files foreign)
(begin-for-syntax (require 'traversal))
(import-for-syntax traversal)
(use traversal nondeterminism define-structure linear-algebra irregex AD
srfi-13 srfi-69 shell ssax scheme2c-compatibility nlopt
sc... | null | https://raw.githubusercontent.com/abarbu/schemetex/0bc3f5b8e72ede52225a842b6554baafaf370712/schemetex-type-inference.scm | scheme | n inexact
i exact
l list
v vector
m matrix
ground vs generic types
handle the return type
arguments
below and its position in the tree
below and variable above
At the moment there is no way to specify it. This alaways happens when you use multiple references into a matrix.
debugging | (module schemetex-type-inference *
(import chicken scheme srfi-1 extras data-structures ports files foreign)
(begin-for-syntax (require 'traversal))
(import-for-syntax traversal)
(use traversal nondeterminism define-structure linear-algebra irregex AD
srfi-13 srfi-69 shell ssax scheme2c-compatibility nlopt
sc... |
fe7f22664da2e4920f57c12240a7aac41e2574f9f399714e3acbda678ed99ad3 | backtracking/ocamlgraph | gmap.mli | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
(* ... | null | https://raw.githubusercontent.com/backtracking/ocamlgraph/1c028af097339ca8bc379436f7bd9477fa3a49cd/src/gmap.mli | 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
* { 2 Ma... |
28501d6235523158dc2ba7352eca3f1b06fea196bdb2e3b3c5e6d0fea1c7cf58 | tmfg/mmtis-national-access-point | front_page.cljs | (ns ote.style.front-page
"Front page styles related to hero images and other front page components"
(:require
[stylefy.core :as stylefy :refer [use-style use-sub-style]]
[ote.theme.screen-sizes :refer [width-xxs width-xs width-sm width-md width-l width-xl]]
[ote.theme.colors :as colors]))
(def hero-img... | null | https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/4e3eb5cbdabab58e1b439c90afd4ce35ff57ee6f/ote/src/cljs/ote/style/front_page.cljs | clojure | Old flex standard
Old flex standard
Old flex standard
Old flex standard
Old flex standard
Old flex standard
Old flex standard
Old flex standard
Old flex standard
Old flex standard
Old flex standard
Old flex standard
Old flex standard
Old flex standard
Required by IE11 for some odd reason (here be dragons... | (ns ote.style.front-page
"Front page styles related to hero images and other front page components"
(:require
[stylefy.core :as stylefy :refer [use-style use-sub-style]]
[ote.theme.screen-sizes :refer [width-xxs width-xs width-sm width-md width-l width-xl]]
[ote.theme.colors :as colors]))
(def hero-img... |
7d6385af09e5f184701e369e93a6fc865dee8d6434ddbee357bc4fc108e44987 | liqd/thentos | SimpleSpec.hs | # LANGUAGE DataKinds #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ImplicitParams #-}
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses ... | null | https://raw.githubusercontent.com/liqd/thentos/f7d53d8e9d11956d2cc83efb5f5149876109b098/thentos-adhocracy/tests/Thentos/Adhocracy3/Backend/Api/SimpleSpec.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE ImplicitParams #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeSynonymInstances #
# LANGUAGE ViewPatterns #
The returned path is now just a dummy that use... | # LANGUAGE DataKinds #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TupleSections #
# OPTIONS_GHC -fno - warn - orphans ... |
a5b715bfe5601636770546eebcd4b228ed6254ee4e3735486576b0c8130ebe1e | yrashk/evfs | evfs_file_server.erl | -module(evfs_file_server).
-behaviour(gen_server).
-include("internal.hrl").
-export([start_link/1]).
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-define(EVFS_HANDLERS_TABLE, evfs_handlers).
-type handler() :: {module(), term()}.
-r... | null | https://raw.githubusercontent.com/yrashk/evfs/88ae0bfe2344c8d9a042fc8f787cbf694a027fd5/src/evfs_file_server.erl | erlang | gen_server callbacks
Filename API
| -module(evfs_file_server).
-behaviour(gen_server).
-include("internal.hrl").
-export([start_link/1]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-define(EVFS_HANDLERS_TABLE, evfs_handlers).
-type handler() :: {module(), term()}.
-record(state,
{
... |
b002f70913348698bdb8f16f6c57df99bff0c98766f9f5f8784a59a1eb86aacf | RDTK/generator | analysis.lisp | analysis.lisp ---
;;;;
Copyright ( C ) 2012 - 2019 Jan Moringen
;;;;
Author : < >
(cl:in-package #:build-generator.analysis)
(defun guess-project-natures (directory)
(or (append
(when (or (directory (merge-pathnames "configure" directory))
(directory (merge-pathnames "configure.in" ... | null | https://raw.githubusercontent.com/RDTK/generator/8d9e6e47776f2ccb7b5ed934337d2db50ecbe2f5/src/analysis/analysis.lisp | lisp |
URI methods
Pathname methods
with nature~*~:P ~ | analysis.lisp ---
Copyright ( C ) 2012 - 2019 Jan Moringen
Author : < >
(cl:in-package #:build-generator.analysis)
(defun guess-project-natures (directory)
(or (append
(when (or (directory (merge-pathnames "configure" directory))
(directory (merge-pathnames "configure.in" directory)... |
bab1e084501f7c76e4e55db485f22aabef929c682b57798f386aa87e4d25c0dc | AccelerateHS/accelerate-llvm | Async.hs | # LANGUAGE RecordWildCards #
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS -fno-warn-orphans #-}
-- |
Module : Data . Array . Accelerate . . Execute . Async
Copyright : [ 2014 .. 2015 ] The Accelerate Team
-- License : BSD3
--
Maintainer : < >
-- Stability : experimental
Portability : non -... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-llvm/cf081587fecec23a19f68bfbd31334166868405e/icebox/accelerate-llvm-multidev/Data/Array/Accelerate/LLVM/Multi/Execute/Async.hs | haskell | # LANGUAGE TypeFamilies #
# OPTIONS -fno-warn-orphans #
|
License : BSD3
Stability : experimental
accelerate-llvm
standard library
The Multi-device backend does everything synchronously.
# INLINE streaming # | # LANGUAGE RecordWildCards #
Module : Data . Array . Accelerate . . Execute . Async
Copyright : [ 2014 .. 2015 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extensions )
module Data.Array.Accelerate.LLVM.Multi.Execute.Async (
Async, Stream,
A.wait, A.after, A.st... |
87c1ff1691812adf67195495b361c920ab92f2a09e07c70fc1667e88594ea236 | heraldry/heraldicon | layout.cljs | (ns heraldicon.frontend.layout
(:require
[heraldicon.frontend.element.submenu :as submenu]
[re-frame.core :as rf]))
(defn three-columns [left middle right & {:keys [banner]}]
[:<>
banner
[:div {:style {:display "grid"
:grid-gap "10px"
:grid-template-columns "[start] ... | null | https://raw.githubusercontent.com/heraldry/heraldicon/18b50856176c3d072e9ffc11505b47e32b6f0ee9/src/heraldicon/frontend/layout.cljs | clojure | (ns heraldicon.frontend.layout
(:require
[heraldicon.frontend.element.submenu :as submenu]
[re-frame.core :as rf]))
(defn three-columns [left middle right & {:keys [banner]}]
[:<>
banner
[:div {:style {:display "grid"
:grid-gap "10px"
:grid-template-columns "[start] ... | |
638afe44478870919ba4cf0682df9960c2c789081f3c98f373b552985b3a6d27 | schell/steeloverseer | TemplateSpec.hs | module Sos.TemplateSpec where
import Sos.Exception
import Sos.Template
import Test.Hspec
spec :: Spec
spec = do
describe "parseTemplate" $ do
it "fails on the empty string" $
parseTemplate "" `shouldThrow` anySosException
it "parses templates" $ do
parseTemplate "hi" `shouldReturn` [Right... | null | https://raw.githubusercontent.com/schell/steeloverseer/dcc694460ac9713b4a9a2462a3eecc8b38ca9fa3/test/Sos/TemplateSpec.hs | haskell | module Sos.TemplateSpec where
import Sos.Exception
import Sos.Template
import Test.Hspec
spec :: Spec
spec = do
describe "parseTemplate" $ do
it "fails on the empty string" $
parseTemplate "" `shouldThrow` anySosException
it "parses templates" $ do
parseTemplate "hi" `shouldReturn` [Right... | |
2eb14b155bfa1ef6767744b9ec39d56f0109f309d1e55377428ebd725a7f7ba0 | andrewberls/predis | zsets_test.clj | (ns predis.zsets-test
(:require [clojure.test :refer :all]
[clojure.test.check :as tc]
(clojure.test.check
[clojure-test :refer [defspec]]
[generators :as gen]
[properties :as prop])
[taoensso.carmine :as carmine]
(predis
... | null | https://raw.githubusercontent.com/andrewberls/predis/9479323a757dc73ee5101c4904b6bd7ef742aed6/test/predis/zsets_test.clj | clojure | (zinterstore [this dest numkeys ks weights])
(zrangebylex [this k min-val max-val opts?])
TODO: limit, offset
(zremrangebylex [this k min-val max-val]) | (ns predis.zsets-test
(:require [clojure.test :refer :all]
[clojure.test.check :as tc]
(clojure.test.check
[clojure-test :refer [defspec]]
[generators :as gen]
[properties :as prop])
[taoensso.carmine :as carmine]
(predis
... |
70c0fdc59967f99405dd55ee12e4c392843eb2b6360bccc3886a20927582e59a | tomsmalley/semantic-reflex | Icon.hs | # LANGUAGE TemplateHaskell #
-- | Semantic-UI Icon elements
--
-- <-ui.com/elements/icon.html>
module Reflex.Dom.SemanticUI.Icon where
import Control.Lens.TH (makeLensesWith, lensRules, simpleLenses)
import Control.Monad (void)
import Data.Default
import Data.Semigroup ((<>))
import Data.Text (Text)
import Reflex.Do... | null | https://raw.githubusercontent.com/tomsmalley/semantic-reflex/5a973390fae1facbc4351b75ea59210d6756b8e5/semantic-reflex/src/Reflex/Dom/SemanticUI/Icon.hs | haskell | | Semantic-UI Icon elements
<-ui.com/elements/icon.html>
| Icons can be mirrored around an axis
| Icons can be put into a corner of an 'icons' group
| Config for 'icon's.
^ (default: 'False') Icons can be disabled
^ (default: 'False') Icons can be "loading" (spinning)
^ (default: 'False') Icons can be fitted (... | # LANGUAGE TemplateHaskell #
module Reflex.Dom.SemanticUI.Icon where
import Control.Lens.TH (makeLensesWith, lensRules, simpleLenses)
import Control.Monad (void)
import Data.Default
import Data.Semigroup ((<>))
import Data.Text (Text)
import Reflex.Dom.Core
import Reflex.Active
import Reflex.Dom.SemanticUI.Common
i... |
df79f9dfa63b562be67448c8a29b1e06a125b43e3c48f0c3a09d53cc8805668e | tnelson/Forge | client.rkt | #lang racket/base
(require "url.rkt")
(require "conn-api.rkt")
(require "hybi00/client.rkt")
(require "rfc6455/client.rkt")
(provide (all-from-out "url.rkt")
ws-connect)
(define (ws-connect u
#:headers [headers '()]
#:protocol [protocol 'rfc6455])
(case protocol
[(rfc6455) (rfc6455-connect u head... | null | https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/racket-rfc6455/net/rfc6455/client.rkt | racket | #lang racket/base
(require "url.rkt")
(require "conn-api.rkt")
(require "hybi00/client.rkt")
(require "rfc6455/client.rkt")
(provide (all-from-out "url.rkt")
ws-connect)
(define (ws-connect u
#:headers [headers '()]
#:protocol [protocol 'rfc6455])
(case protocol
[(rfc6455) (rfc6455-connect u head... | |
a10964bfb095f23fb3138ce4c966081cc951b099ceb3685de6f156569010ac73 | documented/Clex | project.clj | (defproject cljex "1.0.0"
:description "cljex provides examples for clojure's existing core api documentation"
:repositories [["scala-tools" "-tools.org/repo-releases"]]
:dependencies [[org.clojure/clojure "1.1.0-master-SNAPSHOT"]
[org.clojure/clojure-contrib "1.0-SNAPSHOT"]
[org... | null | https://raw.githubusercontent.com/documented/Clex/3eeec8669cb7ae3898600a8ba472f150bba98d8d/project.clj | clojure | (defproject cljex "1.0.0"
:description "cljex provides examples for clojure's existing core api documentation"
:repositories [["scala-tools" "-tools.org/repo-releases"]]
:dependencies [[org.clojure/clojure "1.1.0-master-SNAPSHOT"]
[org.clojure/clojure-contrib "1.0-SNAPSHOT"]
[org... | |
5399fdc9eee49a9dca692542a0e430271d15af481ed5f876284f74dc42938edc | clj-kondo/clj-kondo | project.clj | ;; GENERATED by script/update-project.clj, DO NOT EDIT
To change dependencies , update deps.edn and run script / update - project.clj .
;; To change other things, edit project.template.clj and run script/update-project.clj.
(defproject clj-kondo "2023.02.18-SNAPSHOT"
:description "A linter for Clojure that sparks ... | null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/494909f149159d79ae3e97bb9a3d6edad060ffdd/project.clj | clojure | GENERATED by script/update-project.clj, DO NOT EDIT
To change other things, edit project.template.clj and run script/update-project.clj.
:global-vars {*print-namespace-maps* false} | To change dependencies , update deps.edn and run script / update - project.clj .
(defproject clj-kondo "2023.02.18-SNAPSHOT"
:description "A linter for Clojure that sparks joy."
:url "-kondo/clj-kondo"
:scm {:name "git"
:url "-kondo/clj-kondo"}
:license {:name "Eclipse Public License 1.0"
... |
d6608f1cadea7ac45eed1c0bc37da360261944d397a5adcfb0990289f5f2f271 | nuprl/gradual-typing-performance | view-controller.rkt | #lang racket/unit
;; this module implements the UI side of the stepper; it
;; opens a window, starts the stepper thread running,
;; and handles the resulting calls to 'break'.
;; this module lies outside of the "testing boundary"
;; of through-tests; it is not tested automatically at all.
;; this version of the vi... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/stepper/private/view-controller.rkt | racket | this module implements the UI side of the stepper; it
opens a window, starts the stepper thread running,
and handles the resulting calls to 'break'.
this module lies outside of the "testing boundary"
of through-tests; it is not tested automatically at all.
this version of the view-controller just collects the s... | #lang racket/unit
(require racket/class
racket/match
racket/list
drracket/tool
mred
string-constants
racket/async-channel
(prefix-in model: "model.rkt")
(prefix-in x: "mred-extensions.rkt")
"shared.rkt"
"model-settings.rkt"
... |
b8e0c7ce3978d45fd69fe1fcd1222a34abb8bd25db527afa921773a9bdbf8662 | cram-code/cram_core | unify.lisp | ;;;
Copyright ( c ) 2009 , < >
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this li... | null | https://raw.githubusercontent.com/cram-code/cram_core/984046abe2ec9e25b63e52007ed3b857c3d9a13c/cram_reasoning/tests/unify.lisp | lisp |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Re... | Copyright ( c ) 2009 , < >
* Neither the name of Willow Garage , Inc. nor the names of its
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.