_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
1e229f05bb581d4e68db6327f045e9da7f4f4de90f8573d5951911dc8507b0d5
krisajenkins/petrol
messages.cljs
(ns petrol-examples.multicounters.messages) (defrecord UpdateCounter [counter-id message]) (defrecord AddCounter []) (defrecord DelCounter [counter-id])
null
https://raw.githubusercontent.com/krisajenkins/petrol/607166ab48cf6193b6ad00bcd63bd3ff7f3958f7/examples/src/petrol-examples/multicounters/messages.cljs
clojure
(ns petrol-examples.multicounters.messages) (defrecord UpdateCounter [counter-id message]) (defrecord AddCounter []) (defrecord DelCounter [counter-id])
3497d080ff7a7cf4659fa22edd681a0f3d817a78c75f8ddf02b2aeea73361435
Shirakumo/kandria
meta.lisp
(:identifier module :version module-v0) (:id "6632CE56-9F1B-6EB3-712D-CC0ED9083E62" :title "Hello World!" :author "Shinmera" :version "1.0.0" :description "Shows a hello world textbox when loaded.")
null
https://raw.githubusercontent.com/Shirakumo/kandria/0eafe60b5f50c18980a6acc977dc45987e8e26c1/mods/hello-world/meta.lisp
lisp
(:identifier module :version module-v0) (:id "6632CE56-9F1B-6EB3-712D-CC0ED9083E62" :title "Hello World!" :author "Shinmera" :version "1.0.0" :description "Shows a hello world textbox when loaded.")
8649645ada86e34687402cd05d0a4deba8e310b29f4cb992579f51f76a0c2d2a
cram2/cram
sort-vector-largest.lisp
Regression test SORT - VECTOR - LARGEST for GSLL , automatically generated ;; Copyright 2009 , 2011 , 2014 Distributed under the terms of the GNU General Public License ;; ;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/tests/sort-vector-largest.lisp
lisp
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Publi...
Regression test SORT - VECTOR - LARGEST for GSLL , automatically generated Copyright 2009 , 2011 , 2014 Distributed under the terms of the GNU General Public License it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or Yo...
b842bedb22e98d3ba0720e208b98a1134f6eb4f10ae3cbb02862e89ad66ceb9f
CATechnologiesTest/arete
order2.clj
(ns engine.order2 (:require [engine.core :refer :all])) (deforder (:with :x) (:without :y) :newest) (def inst-counter (atom 0)) (defn tally [rulekey] (insert! {:type rulekey :value (swap! inst-counter inc)})) (defrule rule1 [?x :x] => (tally :rule1)) (defrule rule2 [?x :x] [?y :y] => (tally :rule...
null
https://raw.githubusercontent.com/CATechnologiesTest/arete/1ccaa554abd3ee4499cbe2381af2ed2af33fb420/test/engine/order2.clj
clojure
(ns engine.order2 (:require [engine.core :refer :all])) (deforder (:with :x) (:without :y) :newest) (def inst-counter (atom 0)) (defn tally [rulekey] (insert! {:type rulekey :value (swap! inst-counter inc)})) (defrule rule1 [?x :x] => (tally :rule1)) (defrule rule2 [?x :x] [?y :y] => (tally :rule...
9db033bfa97f553154f3bdf457a8ca7aa85f119165ef2f68088e3aeeefc3574f
haskell-tools/haskell-tools
ExistingLocalDef.hs
module Refactor.ExtractBinding.ExistingLocalDef where f = 1 + 2 + 3 where
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/ExtractBinding/ExistingLocalDef.hs
haskell
module Refactor.ExtractBinding.ExistingLocalDef where f = 1 + 2 + 3 where
0297830e8fc9fad5c143c9368fafa00dee1354af687260dcffa47668a7b98e39
waddlaw/TAPL
Types.hs
module Language.Core.Types ( Strategy (..), Prelude, ) where import RIO type Prelude lang = Map Text lang data Strategy = FullBetaReduction | NormalOrder | CallByName | CallByValue deriving stock (Show, Read, Enum, Bounded)
null
https://raw.githubusercontent.com/waddlaw/TAPL/94576e46821aaf7abce6d1d828fc3ce6d05a40b8/subs/lambda-core/src/Language/Core/Types.hs
haskell
module Language.Core.Types ( Strategy (..), Prelude, ) where import RIO type Prelude lang = Map Text lang data Strategy = FullBetaReduction | NormalOrder | CallByName | CallByValue deriving stock (Show, Read, Enum, Bounded)
54ee205f8c7d4972a74ae14f173371a11e0891f9466caab1ee207248c67f331b
BrunoBonacci/1config
encoding_test.clj
(ns com.brunobonacci.oneconfig.encoding-test (:refer-clojure :exclude [find load list]) (:require [midje.sweet :refer :all] [com.brunobonacci.oneconfig.backend :refer :all] [com.brunobonacci.oneconfig.backends.encoding :refer [make-encoding-wrapper]] [com.brunob...
null
https://raw.githubusercontent.com/BrunoBonacci/1config/4cf8284b1b490253ac617bec9d2348c3234931e6/1config-core/test/com/brunobonacci/oneconfig/encoding_test.clj
clojure
(ns com.brunobonacci.oneconfig.encoding-test (:refer-clojure :exclude [find load list]) (:require [midje.sweet :refer :all] [com.brunobonacci.oneconfig.backend :refer :all] [com.brunobonacci.oneconfig.backends.encoding :refer [make-encoding-wrapper]] [com.brunob...
43a5b30d9e2aa140a0c4a1a9b5d2e61d3ca8c6d16ec6a21c9e5a8cc7948edc6e
ThoughtWorksInc/stonecutter
forgotten_password_confirmation.clj
(ns stonecutter.view.forgotten-password-confirmation (:require [stonecutter.view.view-helpers :as vh])) (defn forgotten-password-confirmation [request] (vh/load-template-with-lang "public/forgot-password-confirmation.html" request))
null
https://raw.githubusercontent.com/ThoughtWorksInc/stonecutter/37ed22dd276ac652176c4d880e0f1b0c1e27abfe/src/stonecutter/view/forgotten_password_confirmation.clj
clojure
(ns stonecutter.view.forgotten-password-confirmation (:require [stonecutter.view.view-helpers :as vh])) (defn forgotten-password-confirmation [request] (vh/load-template-with-lang "public/forgot-password-confirmation.html" request))
44efea3082bd69ecc5183daba2bddfd3ca9ad45cd030c11f5c656ee6fc2de345
GaloisInc/saw-core
Monad.hs
# LANGUAGE FlexibleInstances # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleContexts # {-# LANGUAGE RankNTypes #-} | Module : Verifier . SAW.Translation . Coq Copyright : Galois , Inc. 2018 License : : Stability : experimental Portability : portable Module : Verifier.SA...
null
https://raw.githubusercontent.com/GaloisInc/saw-core/ea914a9eea8e484189ee6e4c4dcdfc7db831d987/saw-core-coq/src/Verifier/SAW/Translation/Coq/Monad.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE RankNTypes # # OVERLAPPING # # OVERLAPPABLE # notations. Instead, we provide a mapping from the notation symbol to an identifier to use instead. ^ Whether to wrap everything in a free monad construction. - Advantage: fixpoints can be readily represented - Disadvantage: pure...
# LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # | Module : Verifier . SAW.Translation . Coq Copyright : Galois , Inc. 2018 License : : Stability : experimental Portability : portable Module : Verifier.SAW.Translation.Coq Copyright : Galois, Inc. 2018 License ...
25a0d057e8f66c59a64be796503123218af985462242a463f6471366084712d2
mbutterick/txexpr
main.rkt
#lang racket/base (define-syntax-rule (r+p MODNAME ...) (begin (begin (require MODNAME) (provide (all-from-out MODNAME)) (module+ safe (require (submod MODNAME safe)) (provide (all-from-out (submod MODNAME safe))))) ...)) (r+p "base.rkt" "stx.rkt" "check.rkt")
null
https://raw.githubusercontent.com/mbutterick/txexpr/435c6e6f36fd39065ae9d8a00285fda0e4e41fa1/txexpr/main.rkt
racket
#lang racket/base (define-syntax-rule (r+p MODNAME ...) (begin (begin (require MODNAME) (provide (all-from-out MODNAME)) (module+ safe (require (submod MODNAME safe)) (provide (all-from-out (submod MODNAME safe))))) ...)) (r+p "base.rkt" "stx.rkt" "check.rkt")
90ae94600f30edbd2bde5f3775b7d627978dd83ef740f9a786db592666c1e759
evolutics/haskell-formatter
Input.hs
root = root
null
https://raw.githubusercontent.com/evolutics/haskell-formatter/3919428e312db62b305de4dd1c84887e6cfa9478/testsuite/resources/source/comments/empty_lines/at_bounds_of_file/start/2/Input.hs
haskell
root = root
d014ea16e6e2792dac846c42fd623031d0d7f605ed11d916509dc5722b2d1756
unisonweb/unison
HTTP.hs
module Unison.Util.HTTP (addRequestMiddleware, setUserAgent, ucmUserAgent) where import qualified Data.Text.Encoding as Text import qualified Network.HTTP.Client as HTTP import Unison.Codebase.Editor.UCMVersion (UCMVersion) import Unison.Prelude addRequestMiddleware :: (HTTP.Request -> IO HTTP.Request) -> HTTP.Manage...
null
https://raw.githubusercontent.com/unisonweb/unison/0900eafaeac10be8e21c257a90c799fe3d58e8b2/unison-cli/src/Unison/Util/HTTP.hs
haskell
module Unison.Util.HTTP (addRequestMiddleware, setUserAgent, ucmUserAgent) where import qualified Data.Text.Encoding as Text import qualified Network.HTTP.Client as HTTP import Unison.Codebase.Editor.UCMVersion (UCMVersion) import Unison.Prelude addRequestMiddleware :: (HTTP.Request -> IO HTTP.Request) -> HTTP.Manage...
67a098083fe8f7f873fc17645444c377246237de56635d16e26c2f0750d4ca62
dedbox/racket-template
literals.rkt
Copyright 2020 < > ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -2.0 ;; ;; Unless required by applicable law or agreed to in writing, software distributed under t...
null
https://raw.githubusercontent.com/dedbox/racket-template/7e8cd438cdc168b74b1a23721d3410be330de209/tests/literals.rkt
racket
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing per...
Copyright 2020 < > distributed under the License is distributed on an " AS IS " BASIS , #lang racket/base (require template) (module+ test (require rackunit rackunit/text-ui) (provide (rename-out [literals the-tests])) (define (run-all-tests) (run-tests literals) (void)) (define-test-suite...
e26afe0e75343e142a2011d272903515f3db4dba7cfa21bf28a8737c1c256669
liqd/aula
Types.hs
{-# OPTIONS_GHC -Wall -Werror #-} module Types (module X) where import Data.Markdown as X import Types.Prelude as X import Types.Core as X import Types.Instances.Optics as X import Types.Instances.SafeCopy as X () import Types.Instances.JSON as X () import Types.Instances.SOP as X () import Types.Log as X import Typ...
null
https://raw.githubusercontent.com/liqd/aula/f96dbf85cd80d0b445e7d198c9b2866bed9c4e3d/src/Types.hs
haskell
# OPTIONS_GHC -Wall -Werror #
module Types (module X) where import Data.Markdown as X import Types.Prelude as X import Types.Core as X import Types.Instances.Optics as X import Types.Instances.SafeCopy as X () import Types.Instances.JSON as X () import Types.Instances.SOP as X () import Types.Log as X import Types.Util as X
9240a3d144700dc0bf931e7f2a7fb337b723824a4fbdf672b51b174d6070eb29
zippy/anansi
xmpp_bridge_out.clj
(ns #^{:author "Eric Harris-Braun" :doc "xmpp Out Bridge receptor"} anansi.streamscapes.channels.xmpp-bridge-out (:use [anansi.ceptr] [anansi.receptor.scape] [anansi.streamscapes.streamscapes] [anansi.streamscapes.channel] ) (:use [clj-time.core :only [now]])) (def xmpp-bridge-out-...
null
https://raw.githubusercontent.com/zippy/anansi/881aa279e5e7836f3002fc2ef7623f2ee1860c9a/src/anansi/streamscapes/channels/xmpp_bridge_out.clj
clojure
translation on sending worked out
(ns #^{:author "Eric Harris-Braun" :doc "xmpp Out Bridge receptor"} anansi.streamscapes.channels.xmpp-bridge-out (:use [anansi.ceptr] [anansi.receptor.scape] [anansi.streamscapes.streamscapes] [anansi.streamscapes.channel] ) (:use [clj-time.core :only [now]])) (def xmpp-bridge-out-...
109cc2487204220310ae9f02ff26a6913b196f976de676dd0e8bde840d35e1a9
CafeOBJ/cafeobj
print-object.lisp
-*- Mode : LISP ; Package : CHAOS ; ; Syntax : Common - lisp -*- ;;; Copyright ( c ) 2000 - 2018 , . 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 so...
null
https://raw.githubusercontent.com/CafeOBJ/cafeobj/261e3a50407f568272321378df370e5cf7492aaf/chaos/primitives/print-object.lisp
lisp
Package : CHAOS ; ; Syntax : Common - lisp -*- 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...
Copyright ( c ) 2000 - 2018 , . All rights reserved . DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , (in-package :chaos) #-:chaos-debug (declaim (optimize (speed 3) (safety 0) #-GCL (debug 0))) #+:chaos-debug (declaim (optim...
c3f89b737702fae8e7e02a597b327f0ca0126e541c8637b848d396547e0a5b5f
scalaris-team/scalaris
rdht_tx_add_del_on_list.erl
2013 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; % you may not use this file except in compliance with the License. % You may obtain a copy of the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software distribut...
null
https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/src/transactions/rdht_tx_add_del_on_list.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language gov...
2013 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > This " two - phase " operation uses to first read the value -module(rdht_tx_add_del_on_list). -author(''). -vsn('$Id...
e9f193a70bc99d6d0a477c5e6ec5965035fb5c8f9164bc2a84321b944aa956df
spell-music/csound-sampler
Ui.hs
{-# Language FlexibleContexts #-} -- | Graphical widgets for playing samples module Csound.Sam.Ui( freeSim, hfreeSim, freeSimWith, hfreeSimWith, freeTog, hfreeTog, sim, hsim, simWith, hsimWith, tog, htog, live, liveEf, mixSam, uiSam, addGain ) where import Data.List(transpose) import Control.Monad import Control...
null
https://raw.githubusercontent.com/spell-music/csound-sampler/dd5f2eeef186f42dc802e6a9737f123b205a7028/src/Csound/Sam/Ui.hs
haskell
# Language FlexibleContexts # | Graphical widgets for playing samples | A widget for playing several samples at the same time (aka `sim`ultaneously). The prefix `free` means no syncronization. the samples start to play when the button is pressed. | It's just like the function @freeSim@ but the visual representation...
module Csound.Sam.Ui( freeSim, hfreeSim, freeSimWith, hfreeSimWith, freeTog, hfreeTog, sim, hsim, simWith, hsimWith, tog, htog, live, liveEf, mixSam, uiSam, addGain ) where import Data.List(transpose) import Control.Monad import Control.Monad.Trans.Reader import Csound.Base import Csound.Sam.Core groupToggles ...
789af162ccff98ce2f51c876adf0fab1adf9e8cd13d5bb7a6caa1bbf1c9658b6
poroh/ersip
ersip_hdr_subscription_state_test.erl
%% Copyright ( c ) 2019 Dmitry Poroh %% All rights reserved. Distributed under the terms of the MIT License . See the LICENSE file . %% SIP Subscription - State tests %% -module(ersip_hdr_subscription_state_test). -include_lib("eunit/include/eunit.hrl"). %%======================================================...
null
https://raw.githubusercontent.com/poroh/ersip/f1b0d3c5713fb063a6cc327ea493f06cff6a6e5e/test/message/ersip_hdr_subscription_state_test.erl
erlang
All rights reserved. =================================================================== Cases =================================================================== =================================================================== Helpers ===================================================================
Copyright ( c ) 2019 Dmitry Poroh Distributed under the terms of the MIT License . See the LICENSE file . SIP Subscription - State tests -module(ersip_hdr_subscription_state_test). -include_lib("eunit/include/eunit.hrl"). -define(crlf, "\r\n"). rebuild_test() -> rebuild(<<"terminated;reason=noresource">>...
3f8fb89e99f7bdb7edccbef3439d652e0a3923ef34a516c256ebd0a35302c5ed
astrada/ocaml-extjs
ext_window_MessageBox.mli
* Utility class for generating different styles of m ... { % < p > Utility class for generating different styles of message boxes . The singleton instance , < a href="#!/api / Ext . MessageBox " rel="Ext . MessageBox " class="docClass">Ext . MessageBox</a > alias < code><a href="#!/api / Ext . MessageBox " r...
null
https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/ext_window_MessageBox.mli
ocaml
* {% <p>Specify as <code>true</code> to allow user resizing at each edge and corner of the window, false to disable resizing.</p> <p>This may also be specified as a config object to <a href="#!/api/Ext.resizer.Resizer" rel="Ext.resizer.Resizer" class="docClass">Ext.resizer.Resizer</a></p> %} Defaults to: [fal...
* Utility class for generating different styles of m ... { % < p > Utility class for generating different styles of message boxes . The singleton instance , < a href="#!/api / Ext . MessageBox " rel="Ext . MessageBox " class="docClass">Ext . MessageBox</a > alias < code><a href="#!/api / Ext . MessageBox " r...
14d182e3ecab7bba8450b0801f7430c3237c210d2f50ac6158c213f72d541461
cyverse-archive/DiscoveryEnvironmentBackend
status.clj
(ns donkey.services.filesystem.status (:require [clojure.tools.logging :as log] [clj-jargon.init :as init] [clj-jargon.item-info :as item] [clojure-commons.error-codes :as ce] [donkey.services.filesystem.icat :as icat])) (defn ^Boolean irods-running? "Determines whe...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/Donkey/src/donkey/services/filesystem/status.clj
clojure
(ns donkey.services.filesystem.status (:require [clojure.tools.logging :as log] [clj-jargon.init :as init] [clj-jargon.item-info :as item] [clojure-commons.error-codes :as ce] [donkey.services.filesystem.icat :as icat])) (defn ^Boolean irods-running? "Determines whe...
3293102cd6e08095bf6063e51f2f1116d9b324cb97630adf6157a269ba2f4c94
metabase/metabase
csv_test.clj
(ns metabase.query-processor.streaming.csv-test (:require [cheshire.core :as json] [clojure.data.csv :as csv] [clojure.test :refer :all] [metabase.driver :as driver] [metabase.query-processor :as qp] [metabase.query-processor.streaming.interface :as qp.si] [metabase.test :as mt] [metabase.test...
null
https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/test/metabase/query_processor/streaming/csv_test.clj
clojure
First row is the header
(ns metabase.query-processor.streaming.csv-test (:require [cheshire.core :as json] [clojure.data.csv :as csv] [clojure.test :refer :all] [metabase.driver :as driver] [metabase.query-processor :as qp] [metabase.query-processor.streaming.interface :as qp.si] [metabase.test :as mt] [metabase.test...
d680142b11ac533007b8ed2397c57784840d40f6623629b85fade556fcb1ad2c
anoma/juvix
Internal.hs
module Internal where import Base import Internal.Eval qualified as Eval allTests :: TestTree allTests = testGroup "Internal to Core tests" [Eval.allTests]
null
https://raw.githubusercontent.com/anoma/juvix/a3b2aa69400f2390146f09d6a4abbabbed23ca6e/test/Internal.hs
haskell
module Internal where import Base import Internal.Eval qualified as Eval allTests :: TestTree allTests = testGroup "Internal to Core tests" [Eval.allTests]
0b640a80d7d34312b9c0d82a72a7965b2df0183d54a563703dcbf5814e2ae6cb
brendanhay/gogol
Delete.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-youtube/gen/Gogol/YouTube/Videos/Delete.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Deletes a resource. /See:/ </ YouTube Data API v3 Reference> for @youtube.videos.delete@. * Resource ** Constructing a Request | A resource alias for @youtube.videos.delete@ method which the 'YouTubeVideosDelete' request con...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
b52c83ae16dc9f568c6836461e14c685a400701fb624af1d24718a875953e993
haskell-repa/repa
Main.hs
# LANGUAGE MagicHash , BangPatterns # module Main where import Data.Array.Repa.Series as R import Data.Array.Repa.Series.Series as S import Data.Array.Repa.Series.Vector as V import Data.Array.Repa.Series.Ref as Ref import qualified Data.Vector.Primitive as P import Data.Word import GHC.Exts ---...
null
https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/icebox/abandoned/repa-plugin/test/20-Vector/Main.hs
haskell
------------------------------------------------------------------- | Set the primitives used by the lowering transform. ------------------------------------------------------------------- rreduce rreduce2 Double reduce fusion. Computation of both reductions is interleaved. Double reduce fusion. Computation ...
# LANGUAGE MagicHash , BangPatterns # module Main where import Data.Array.Repa.Series as R import Data.Array.Repa.Series.Series as S import Data.Array.Repa.Series.Vector as V import Data.Array.Repa.Series.Ref as Ref import qualified Data.Vector.Primitive as P import Data.Word import GHC.Exts rep...
f6a0b7146134bd8b486ae63c92f0b489236af68ba52ecea6130b4647613ec2d3
rvirding/luerl
luerl_lib_math.erl
Copyright ( c ) 2013 - 2020 %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing, software distributed...
null
https://raw.githubusercontent.com/rvirding/luerl/725971c370f055b8336573768597dab688733a40/src/luerl_lib_math.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright ( c ) 2013 - 2020 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , Author : Purpose : The math library for Luerl . the first required ones of the right type and completely ignore the We keep atan2 ,...
6572c147c7f67fe23d920627cd938c4dd9c524c7fee1d52df8a27d979d275584
BillHallahan/G2
Prop_Drop_DropEnd.hs
module Prop_Drop_DropEnd (prop_drop_drop_end) where import Prelude hiding (head, tail, length, drop) @ prop_drop_drop_end : : n : { _ : Int | n > = 0 } - > { xs:[a ] | len xs > = n } - > { v : | v } @ prop_drop_drop_end :: Int -> [a] -> Bool prop_drop_drop_end n xs = length xs == length (drop n xs) + length (dro...
null
https://raw.githubusercontent.com/BillHallahan/G2/c16e7439f7637f9819c56b8842196187cd4e6b11/tests/LiquidInf/Paper/Eval/Prop_LIA_Invented/Prop_Drop_DropEnd.hs
haskell
@ die :: {v:String | false} -> a @
module Prop_Drop_DropEnd (prop_drop_drop_end) where import Prelude hiding (head, tail, length, drop) @ prop_drop_drop_end : : n : { _ : Int | n > = 0 } - > { xs:[a ] | len xs > = n } - > { v : | v } @ prop_drop_drop_end :: Int -> [a] -> Bool prop_drop_drop_end n xs = length xs == length (drop n xs) + length (dro...
e7153755abfba61ddf8802a6e54eea19b2b14ead1afd1484b76563b5c4a9a448
unisonweb/unison
Types.hs
| Types used by the UCM client during sync . module Unison.Share.Sync.Types ( CheckAndSetPushError (..), CodeserverTransportError (..), FastForwardPushError (..), GetCausalHashByPathError (..), PullError (..), SyncError (..), ) where import Data.Set.NonEmpty (NESet) import qualified Servant.C...
null
https://raw.githubusercontent.com/unisonweb/unison/bf0186aefb11ef2a9ec44d55adc70f356044f0c7/unison-cli/src/Unison/Share/Sync/Types.hs
haskell
Parent Child | An error occurred when getting causal hash by path. | The user does not have permission to read this path. | Generic Codeserver transport errors We try to catch permission failures in the endpoint's response type, but if any slip
| Types used by the UCM client during sync . module Unison.Share.Sync.Types ( CheckAndSetPushError (..), CodeserverTransportError (..), FastForwardPushError (..), GetCausalHashByPathError (..), PullError (..), SyncError (..), ) where import Data.Set.NonEmpty (NESet) import qualified Servant.C...
3a9ce8d3926fbb679f9952383d79ddf4190fc33cfd56b70b684c2e677b603f21
haskellfoundation/error-message-index
NotInScopeLambda.hs
module NotInScopeLambda where data Foo = A | B f :: Foo -> Foo f = \A -> A
null
https://raw.githubusercontent.com/haskellfoundation/error-message-index/6b80c2fe6d8d2941190bda587bcea6f775ded0a4/message-index/messages/GHC-76037/example1/after/NotInScopeLambda.hs
haskell
module NotInScopeLambda where data Foo = A | B f :: Foo -> Foo f = \A -> A
4c1a44499ecf3f1ffb76d031a15d7a6c4c2ff09cafb1b320acfd3d4c573960fa
dwayne/eopl3
store.rkt
#lang racket (provide initialize-store! newref deref setref! reference?) One store shared via a global variable . (define the-store 'uninitialized) (define (initialize-store!) (set! the-store (empty-store))) ;; Why is this needed? ;; ;; (define (get-store) ;; the-store) ;; The main Store API ;; ;; e...
null
https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/04-ch4/interpreters/racket/EXPLICIT-REFS-4.9/store.rkt
racket
Why is this needed? (define (get-store) the-store) The main Store API empty-store : () -> Store newref : ExpVal -> Ref setref : Ref x ExpVal -> Unspecified
#lang racket (provide initialize-store! newref deref setref! reference?) One store shared via a global variable . (define the-store 'uninitialized) (define (initialize-store!) (set! the-store (empty-store))) deref : Ref - > ExpVal (struct store (locations next-ref)) (define (empty-store) ...
479479d0b55ed6429444d2ffeffc8bb830d49af7a3612548f210c5bb604b1cb5
OlivierSohn/hamazed
Render.hs
# LANGUAGE NoImplicitPrelude # module Imj.Graphics.Render ( -- * Types for Draw and Render | ' Draw ' does not necessarily render to the screen , but ' Render ' makes the result of ' Draw ' method calls visible on the screen . Optimized instances of ' Draw ' and ' Render ' , for games and animations ...
null
https://raw.githubusercontent.com/OlivierSohn/hamazed/c0df1bb60a8538ac75e413d2f5bf0bf050e5bc37/imj-base/src/Imj/Graphics/Render.hs
haskell
* Types for Draw and Render * Use Scissor * Draw colored chars ** Render to the physical device
# LANGUAGE NoImplicitPrelude # module Imj.Graphics.Render ( | ' Draw ' does not necessarily render to the screen , but ' Render ' makes the result of ' Draw ' method calls visible on the screen . Optimized instances of ' Draw ' and ' Render ' , for games and animations drawing in the terminal , are ...
c8abf75d8fe0a35c0d8f842e455c4c56cd7e301ede2b2fda69738f81a6df1e36
ericlavigne/tic-tac-toe
gomoku_test.clj
(ns ai.gomoku-test (:require [clojure.test :refer :all] [ai.game :as game] [ai.gomoku :as gomoku])) (deftest tic-tac-toe-scripted (testing "Playing move makes it unavailable" (let [move [1 2] before-move (gomoku/empty-board 3 3) after-move (game/play before-move move...
null
https://raw.githubusercontent.com/ericlavigne/tic-tac-toe/7cf9c533618d2763e5d9d332da380b91cf460195/test/ai/gomoku_test.clj
clojure
(ns ai.gomoku-test (:require [clojure.test :refer :all] [ai.game :as game] [ai.gomoku :as gomoku])) (deftest tic-tac-toe-scripted (testing "Playing move makes it unavailable" (let [move [1 2] before-move (gomoku/empty-board 3 3) after-move (game/play before-move move...
0c6c29eac50c80a31bf9d7e00e124c62acb61c59bcb1ae16682148322242c893
haskell/haskell-language-server
GoldenSafeHead.hs
safeHead :: [x] -> Maybe x safeHead = _
null
https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/golden/GoldenSafeHead.hs
haskell
safeHead :: [x] -> Maybe x safeHead = _
b582056eda532ccdca86865336a4d920e63bb9fb2ad2e7fff6dbb0cf048cb4ed
DSiSc/why3
term.mli
(********************************************************************) (* *) The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University (* ...
null
https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/src/core/term.mli
ocaml
****************************************************************** This software is distributed under the terms of the GNU Lesser on linking described in file LICENSE. ...
The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University General Public License version 2.1 , with the special exception open Ident open Ty * { 1 Terms and Formulas } * { 2 Variable symbols } type vsymbol = private { vs_n...
ad33fdb5650aa0a84114d450d903ebeae32736408f7dcef14ca70405f139f44a
zouppen/sanuli-alkumuuvit
WordUtils.hs
-- |Somewhat generic functions for many kinds of word games. module WordUtils where import Data.List (sort, sortOn, group) import qualified Data.Map.Strict as M import qualified Data.Set as S import Data.Text (Text, unpack) import Combinatorics (cartesianProduct, project) type Letters = String -- ^Se...
null
https://raw.githubusercontent.com/zouppen/sanuli-alkumuuvit/5a5540e3db0b76f349f90d03ca31cc8973d7296f/src/WordUtils.hs
haskell
|Somewhat generic functions for many kinds of word games. ^Set of letters the word consists ^Set of words which are anagrams ^Character frequency map ^Map of all words (grouped by anagrams) |Group words into Map of anagrams. Anagrams are useful in optimizing the search space since it allows the words with the sa...
module WordUtils where import Data.List (sort, sortOn, group) import qualified Data.Map.Strict as M import qualified Data.Set as S import Data.Text (Text, unpack) import Combinatorics (cartesianProduct, project) toAnagramMap :: Foldable t => t Text -> WordMap toAnagramMap words = project toLetters words toLetters :...
796dca53c004ba11d41fbf928dd1d5d6cc197bb5a516e531dae5333fe8798793
xtdb/xtdb
remote_api_client_test.clj
(ns xtdb.remote-api-client-test (:require [clojure.test :as t] [xtdb.api :as xt] [xtdb.io :as xio] [xtdb.remote-api-client :as sut]) (:import clojure.lang.ExceptionInfo com.nimbusds.jose.crypto.ECDSASigner com.nimbusds.jose.jwk.gen.ECKeyGenerator ...
null
https://raw.githubusercontent.com/xtdb/xtdb/44303aa35ff5843b2e1130d1bb4a943bc3f8b3be/modules/http-client/test/xtdb/remote_api_client_test.clj
clojure
not expired yet, cache it
(ns xtdb.remote-api-client-test (:require [clojure.test :as t] [xtdb.api :as xt] [xtdb.io :as xio] [xtdb.remote-api-client :as sut]) (:import clojure.lang.ExceptionInfo com.nimbusds.jose.crypto.ECDSASigner com.nimbusds.jose.jwk.gen.ECKeyGenerator ...
fae60052bcffa0f3bb04eadd34b3898b4833200ec7549c6d6901fbcfe292d13b
huangz1990/SICP-answers
42-compose.scm
42-compose.scm (define (compose f g) (lambda (x) (f (g x))))
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp1/code/42-compose.scm
scheme
42-compose.scm (define (compose f g) (lambda (x) (f (g x))))
289137be81cda22f1093314cb1710431e820867cd37ab31d719eed30f0f6fbd2
hyperfiddle/electric
create_admin_1.cljc
(ns create-admin-1 (:require [clojure.spec.alpha :as s] [hyperfiddle.api :as hf] [hyperfiddle.photon :as p] [hyperfiddle.photon-dom :as dom])) (defn create-admin-query [admin name email] (tempid)) (s/fdef create-admin-query :args (s/cat :admin ref? :name string? :email string?)) ...
null
https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2022/hfql/create_admin_1.cljc
clojure
create admin
(ns create-admin-1 (:require [clojure.spec.alpha :as s] [hyperfiddle.api :as hf] [hyperfiddle.photon :as p] [hyperfiddle.photon-dom :as dom])) (defn create-admin-query [admin name email] (tempid)) (s/fdef create-admin-query :args (s/cat :admin ref? :name string? :email string?)) ...
ca1372f951f2fd64406f8b64fd3bb53bf83b719cb6d6696caa16f6c75cae225b
facebook/duckling
Corpus.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE OverloadedStrings #-} module Duckling.Duration.EN.Corpus ( corpus , negativeCorpus ) whe...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Duration/EN/Corpus.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE OverloadedStrings #
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.Duration.EN.Corpus ( corpus , negativeCorpus ) where import Prelude import Data.String import Duckling.Duration.Types import Duckling.Testing.Types import Duckling.TimeGrain.Types (Grain(..)) corpus :: Corpus corpus = (testContext, testOptio...
f1081f2d946e400a8651a8e3a9019e3895bca60b28b239ecd2f8db5ddd54605e
patrikja/AFPcourse
Render.hs
-- | Textual rendering of a 'Shape'. module Render where import Shape -- | A window specifies what part of the world to render and at which -- resolution. data Window = Window { bottomLeft :: Point , topRight :: Point , resolution :: (Int, Int) } defaultWindow :: Window defaultWindow = Window { b...
null
https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/L2/src/Render.hs
haskell
| Textual rendering of a 'Shape'. | A window specifies what part of the world to render and at which resolution. for larger terminal windows | Generate the matrix of points corresponding to the pixels of a window. | Render a shape in a given window.
module Render where import Shape data Window = Window { bottomLeft :: Point , topRight :: Point , resolution :: (Int, Int) } defaultWindow :: Window defaultWindow = Window { bottomLeft = point (-1.5) (-1.5) , topRight = point 1.5 1.5 , resolution = (40, 40) } | Generate a list of even...
d9eb14d2fa0a9c1f15c3dd2e1add08daaa1eb183790a33077d75adf7cb08dbbc
rickeyski/slack-api
TimerBot.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Concurrent import Control.Monad import Control.Monad.Trans.Class import Control.Monad.Trans.Maybe import Data.Maybe import Data.Monoid import qualified Data.Text as T import System.Environment import Web.Slack main :: IO () main = do conf <- mkC...
null
https://raw.githubusercontent.com/rickeyski/slack-api/5f6659e09bce19fe0ca9dfce8743bec7de518d77/example/TimerBot.hs
haskell
# LANGUAGE OverloadedStrings #
module Main where import Control.Concurrent import Control.Monad import Control.Monad.Trans.Class import Control.Monad.Trans.Maybe import Data.Maybe import Data.Monoid import qualified Data.Text as T import System.Environment import Web.Slack main :: IO () main = do conf <- mkConfig withSlackHandle conf time...
cc48615a3f2e3b75f48f9f1339be6a1d2ec5bc78c592f6fac21dbf629a76775c
cyverse-archive/DiscoveryEnvironmentBackend
status.clj
(ns metadata.routes.status (:use [common-swagger-api.schema] [metadata.routes.domain.status] [ring.util.http-response :only [ok]]) (:require [clojure-commons.service :as commons-svc] [metadata.util.config :as config])) (defroutes* status (context* "/" [] :tags ["service-info"] ...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/metadata/src/metadata/routes/status.clj
clojure
(ns metadata.routes.status (:use [common-swagger-api.schema] [metadata.routes.domain.status] [ring.util.http-response :only [ok]]) (:require [clojure-commons.service :as commons-svc] [metadata.util.config :as config])) (defroutes* status (context* "/" [] :tags ["service-info"] ...
966f2e2b86ae0e16ad6d414d2140e466278d3de54e024b62e75d88c8211ef1bd
clojure-finance/clojask
clojask_join.clj
(ns clojask.clojask-join (:require [clojask.join :as join] [clojure.set :as set] [onyx.peer.function :as function] [clojure.java.io :as io] [onyx.plugin.protocols :as p] [taoensso.timbre :refer [debug info] :as timbre]) (:import (java.io BufferedReader Fil...
null
https://raw.githubusercontent.com/clojure-finance/clojask/1a2c74b172bca532eff0b3260bb6061dffb332af/src/main/clojure/clojask/clojask_join.clj
clojure
a-map (.getKeyIndex (.col-info (deref a))) b-map (.getKeyIndex (.col-info (deref b))) b-format (.getFormatter (.col-info (deref b))) Map of lifecycle calls that are required to use this plugin. Users will generally always have to include these in their lifecycle calls when submitting the job. Nothing is required...
(ns clojask.clojask-join (:require [clojask.join :as join] [clojure.set :as set] [onyx.peer.function :as function] [clojure.java.io :as io] [onyx.plugin.protocols :as p] [taoensso.timbre :refer [debug info] :as timbre]) (:import (java.io BufferedReader Fil...
b837f9912942d7ce5138b05f2decb6a6639e4cb977307660cf7cb74a3fe1c0e9
ivanjovanovic/sicp
e-2.26.scm
Exercise 2.26 . Suppose we define x and y to be two lists : (define x (list 1 2 3)) (define y (list 4 5 6)) ; What result is printed by the interpreter in response to evaluating each of the following expressions: ; (append x y) ; (cons x y) ; (list x y) ; -------------------------------------- ; without calcu...
null
https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/2.2/e-2.26.scm
scheme
What result is printed by the interpreter in response to evaluating each of the following expressions: (append x y) (cons x y) (list x y) -------------------------------------- without calculation I suppose it should be and lets check if that is true
Exercise 2.26 . Suppose we define x and y to be two lists : (define x (list 1 2 3)) (define y (list 4 5 6)) 1 ) ( 1 2 3 4 5 6 ) 2 ) ( ( 1 2 3 ) 4 5 6 ) 3 ) ( ( 1 2 3 ) ( 4 5 6 ) ) (load "../helpers.scm") (output (append x y)) (output (cons x y)) (output (list x y))
ffc446a00a9bf69717eddfc76450c22b016382311a20c276baf361f4a849b3fe
VERIMAG-Polyhedra/VPL
PSplxExec.mli
(** This modules contains functions for executing the simplex algorithm on a parametric sumplex tableau. *) open PSplxBuild module Cs = Cstr.Rat (** Exception raised when a problem is unbounded. *) exception Unbounded_problem (** Exception raised when a problem is infeasible. *) exception Infeasible_problem module...
null
https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/ocaml/plp/PSplxExec.mli
ocaml
* This modules contains functions for executing the simplex algorithm on a parametric sumplex tableau. * Exception raised when a problem is unbounded. * Exception raised when a problem is infeasible. * Run the optimization process of the simplex algorithm. @param init_phase is true if this is the initializat...
open PSplxBuild module Cs = Cstr.Rat exception Unbounded_problem exception Infeasible_problem module Explore : sig val pivot : bool -> 'c PSplx.t -> int -> int -> unit val push : bool -> Cs.Vec.t -> 'c PSplx.t -> unit end module Init : sig val chooseBasicVar : int -> 'c PSplx.t -> bool val fin...
ffca0045297233641cacca99743053f7f85f8f6271a687e02304f1aef7983d36
ucsd-progsys/nate
str.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/otherlibs/str/str.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with $ I d : str.ml , v 1.20.6.1 2007/10/3...
977b6be4258ba8a334f086ea96893828ee4cd023a4a9e908499d90c49e3d940b
aeternity/aesophia
aeso_errors.erl
%%%------------------------------------------------------------------- ( C ) 2019 , Aeternity Anstalt @doc ADT for structured error messages + formatting . %%% %%% @end %%%------------------------------------------------------------------- -module(aeso_errors). -type src_file() :: no_file | iolist(). -record(...
null
https://raw.githubusercontent.com/aeternity/aesophia/51f9eaa934f096413c7fd2edba8a57e414b01ef8/src/aeso_errors.erl
erlang
------------------------------------------------------------------- @end -------------------------------------------------------------------
( C ) 2019 , Aeternity Anstalt @doc ADT for structured error messages + formatting . -module(aeso_errors). -type src_file() :: no_file | iolist(). -record(pos, { file = no_file :: src_file() , line = 0 :: non_neg_integer() , col = 0 :: non_neg_integer() }). ...
9ff97a6366172e86fb8ea6e1e9362e603f839862c9db880f0d98645d9962345f
let-def/ttx
context.mli
type ('a, 'b) eq = Refl : ('a, 'a) eq type ('a, 'b) type_ordering = Lt | Eq : ('a, 'a) type_ordering | Gt exception Error of string module type TYPE = sig type 'a t end module type NAMESPACE = sig include TYPE val to_string : _ t -> string val order : 'a t -> 'b t -> ('a, 'b) type_ordering end module type C...
null
https://raw.githubusercontent.com/let-def/ttx/0a50ba7253056d1202f108b67faf4d9cc78e020d/attic/abstract-manual/context.mli
ocaml
Creating new bindings
type ('a, 'b) eq = Refl : ('a, 'a) eq type ('a, 'b) type_ordering = Lt | Eq : ('a, 'a) type_ordering | Gt exception Error of string module type TYPE = sig type 'a t end module type NAMESPACE = sig include TYPE val to_string : _ t -> string val order : 'a t -> 'b t -> ('a, 'b) type_ordering end module type C...
268a62ffbefcae92b429a93a9c9105074bdc156363cbc34dc5928474ffdd984f
emhoracek/smooch
ControllerSpec.hs
{-# LANGUAGE OverloadedStrings #-} module Users.ControllerSpec (spec) where import Test.Hspec import Test.Hspec.Fn import Common import Users.Model spec :: Spec spec = fnTests $ do describe "/users" $ do it "should list all the users" $ do get "/users" >>= should2...
null
https://raw.githubusercontent.com/emhoracek/smooch/d08ceb7fc65e17c06fd6fc1d3b77fb2f9605cf87/app/tests/Users/ControllerSpec.hs
haskell
# LANGUAGE OverloadedStrings #
module Users.ControllerSpec (spec) where import Test.Hspec import Test.Hspec.Fn import Common import Users.Model spec :: Spec spec = fnTests $ do describe "/users" $ do it "should list all the users" $ do get "/users" >>= should200 describe "/users/create" $ do...
ab20b4d7d831f4e6a363bd5d986af974f5140f6a7839077c8a39c7973acc4101
backtracking/combine
test.ml
(**************************************************************************) (* *) (* Combine - an OCaml library for combinatorics *) (* *) Copyright...
null
https://raw.githubusercontent.com/backtracking/combine/d2d9276c99f6d09662900c348f062c618a1b4c95/tests/test.ml
ocaml
************************************************************************ Combine - an OCaml library for combinatorics ...
Copyright ( C ) 2012 - 2014 modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking open Combine open Z...
bee73db11ae04c43cf94fc8104133e40e01317e8009f59d4646af873e9a14288
bennn/iPoe
bad-extra3.rkt
#lang ipoe/sestina It raining on black coal and warm wet ashes. There are tyre-marks in the yard, Agnew's old lorry Has all its cribs down and Agnew the coalman With his Belfast accent's sweet-talking my mother. Would she ever go to a film in Magherafelt? But it's raining and he still has half the load To deliver far...
null
https://raw.githubusercontent.com/bennn/iPoe/4a988f6537fb738b4fe842c404f9d78f658ab76f/examples/sestina/bad-extra3.rkt
racket
#lang ipoe/sestina It raining on black coal and warm wet ashes. There are tyre-marks in the yard, Agnew's old lorry Has all its cribs down and Agnew the coalman With his Belfast accent's sweet-talking my mother. Would she ever go to a film in Magherafelt? But it's raining and he still has half the load To deliver far...
07a5ac1998dc10db758bd595dbf58127a6484c655a81c8865d6a8bda23bc9c02
letmaik/monadiccp
Misc.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE RankNTypes #-} module Control.Search.Combinator.Misc (dbs, lds, bbmin) where import Control.Search.Language import Control.Search.GeneratorInfo import Control.Search.Generator import Control.Search.Stat import Data.Int import Control.Monatron.IdT ldsLoop :: Monad m => Sta...
null
https://raw.githubusercontent.com/letmaik/monadiccp/fe4498e46a7b9d9e387fd5e4ed5d0749a89d0188/src/Control/Search/Combinator/Misc.hs
haskell
# LANGUAGE RankNTypes # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------
# LANGUAGE FlexibleContexts # module Control.Search.Combinator.Misc (dbs, lds, bbmin) where import Control.Search.Language import Control.Search.GeneratorInfo import Control.Search.Generator import Control.Search.Stat import Data.Int import Control.Monatron.IdT ldsLoop :: Monad m => Stat -> MkEval m ldsLoop limit ...
820e5c9ea8d0f0619c9918e84c8b161fb0263d140947f7c12df0c2ef03aa950f
camlp5/camlp5
o_lexer_test.ml
(* camlp5r *) o_lexer_test.ml , v Copyright ( c ) INRIA 2007 - 2017 open Pcaml ; Printf.printf "Syntax: %s\n%!" Pcaml.syntax_name.val ; EXTEND GLOBAL: expr ; expr: LEVEL "simple" [ [ "FOO" → <:expr< 1 >> ] ] ; END ; value expr_top s = s |> Stream.of_string |> Grammar.Entry.parse Pcaml...
null
https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/testsuite/o_lexer_test.ml
ocaml
camlp5r
o_lexer_test.ml , v Copyright ( c ) INRIA 2007 - 2017 open Pcaml ; Printf.printf "Syntax: %s\n%!" Pcaml.syntax_name.val ; EXTEND GLOBAL: expr ; expr: LEVEL "simple" [ [ "FOO" → <:expr< 1 >> ] ] ; END ; value expr_top s = s |> Stream.of_string |> Grammar.Entry.parse Pcaml.expr ; value...
a3ebea592d8cad57e55dc2a8981cc530b956e5d3440f09fcde69cf14bbc2ed19
aharisu/Gauche-CV
filter2d.scm
(use cv) (let* ([src (cv-load-image "data/image/fruits.jpg")] [dst (make-image (ref src 'width) (ref src 'height) (ref src 'depth) (ref src 'n-channels))] [kernel (make-cv-mat 1 21 CV_32FC1)]) (cv-set-data kernel #f32(2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1) CV_AUTO_STEP) (cv-normalize kernel kerne...
null
https://raw.githubusercontent.com/aharisu/Gauche-CV/5e4c51501431c72270765121ea4d92693f11d60b/sample/filter2d.scm
scheme
(use cv) (let* ([src (cv-load-image "data/image/fruits.jpg")] [dst (make-image (ref src 'width) (ref src 'height) (ref src 'depth) (ref src 'n-channels))] [kernel (make-cv-mat 1 21 CV_32FC1)]) (cv-set-data kernel #f32(2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1) CV_AUTO_STEP) (cv-normalize kernel kerne...
da1d71bb518e6a9ceb33c7040d9c5f8a8168fb5dd856ed4b8f6cfafc2ab9d35e
haskell-numerics/random-fu
Hist.hs
{- - ``Test/Hist'' - A bunch of ad-hoc stuff I use to test sampling functions. -} {-# LANGUAGE FlexibleContexts #-} module Test.Hist where import Prelude hiding (sum) import Data.Random import Data.Random.Source import Data.Random.Source.DevRandom import System.Random.Mersenne.Pure64 -- some conv...
null
https://raw.githubusercontent.com/haskell-numerics/random-fu/42c72183a65c429230ad9d006534f59a6b72a329/random-fu/src/Test/Hist.hs
haskell
- ``Test/Hist'' - A bunch of ad-hoc stuff I use to test sampling functions. # LANGUAGE FlexibleContexts # some convenient testing stuff cumulative histogram cumulative diff histogram probability density histogram cumulative probability histogram byte-count histogram (random source usage)
module Test.Hist where import Prelude hiding (sum) import Data.Random import Data.Random.Source import Data.Random.Source.DevRandom import System.Random.Mersenne.Pure64 import Data.List hiding (sum) import Control.Arrow import Text.Printf import Control.Monad import Data.StateRef import Control.Exception import Con...
2eae813577cc736cf7f625b0f92553c46c82cc3b95485d53c7eb38f0474a3c3c
hraberg/deuce
condition_case.clj
(ns deuce.test.condition-case (:use [deuce.test.common])) " 10.5.3.3 Writing Code to Handle Errors"[1 ] [ 1 ] -Errors.html (with-fresh-emacs) (repl example-1 (defun safe-divide (dividend divisor) (condition-case err (/ dividend divisor) (arith-error 1000000))) ...
null
https://raw.githubusercontent.com/hraberg/deuce/9d507adb6c68c0f5c19ad79fa6ded9593c082575/test/deuce/test/condition_case.clj
clojure
(ns deuce.test.condition-case (:use [deuce.test.common])) " 10.5.3.3 Writing Code to Handle Errors"[1 ] [ 1 ] -Errors.html (with-fresh-emacs) (repl example-1 (defun safe-divide (dividend divisor) (condition-case err (/ dividend divisor) (arith-error 1000000))) ...
aea0c639d1ca22c8804632fbdfae10480d809675a711f2761cb19bff84755011
skanev/playground
40-tests.scm
(require rackunit rackunit/text-ui) (load "helpers/compiler.scm") (load "../40.scm") (define (run exp) (let ((machine (make-explicit+compile-machine))) (compile-in-machine machine exp) (get-register-contents machine 'val))) (define sicp-5.40-tests (test-suite "Tests for SICP exercise 5.40" (test-...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/05/tests/40-tests.scm
scheme
(require rackunit rackunit/text-ui) (load "helpers/compiler.scm") (load "../40.scm") (define (run exp) (let ((machine (make-explicit+compile-machine))) (compile-in-machine machine exp) (get-register-contents machine 'val))) (define sicp-5.40-tests (test-suite "Tests for SICP exercise 5.40" (test-...
44edeb4d4c3f3383ea182e4d643688f6f1e75d0a981b648173b277adc00ee0e5
KenDickey/Crosstalk
st-stream-tests.scm
;;; IMPLEMENTS: Unit tests for st-stream.scm AUTHOR : DATE : 16 January 2017 ;; (require 'st-stream) (define (setup-st-stream) #f) (define (cleanup-st-stream) #f) (add-test-suite 'st-stream setup-st-stream cleanup-st-stream) (add-equal-test 'st-stream 'CharStream (perfo...
null
https://raw.githubusercontent.com/KenDickey/Crosstalk/c4a315baf039e714980e14f5b07860632b9bd0e6/st-stream-tests.scm
scheme
IMPLEMENTS: Unit tests for st-stream.scm (require 'st-stream) (ensure-exception-raised 'st-stream (perform: %%test-object 'glerph) "obj glerph -> doesNotUnderstand") --- E O F --- ;;;
AUTHOR : DATE : 16 January 2017 (define (setup-st-stream) #f) (define (cleanup-st-stream) #f) (add-test-suite 'st-stream setup-st-stream cleanup-st-stream) (add-equal-test 'st-stream 'CharStream (perform: (perform: (open-output-string) 'class) 'name) "Output-...
8ddfd3cd255f6c4a101469bc4c19b60624838e65f821dea5bcda9b5ae146c315
helium/plumtree
plumtree_peer_service_manager.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2014 Helium Systems , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain...
null
https://raw.githubusercontent.com/helium/plumtree/3ef02920bd1e31dd8d9b5d9ca88f49639036ad9b/src/plumtree_peer_service_manager.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 ) 2014 Helium Systems , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(plu...
32ab6ee0eee8b32e0884bfb3034cf7f8f9ba759f565441785fee97a9e18d5ac7
ivan-m/graphviz
Proxy.hs
# LANGUAGE KindSignatures # | Module : Data . GraphViz . Testing . Proxy Description : Proxy implementation Copyright : , License : Data . Proxy was added to base with GHC 7.8.1 , and we want to test for older versions than that . Module : Data.Grap...
null
https://raw.githubusercontent.com/ivan-m/graphviz/42dbb6312d7edf789d7055079de7b4fa099a4acc/tests/Data/GraphViz/Testing/Proxy.hs
haskell
------------------------------------------------------------------------------
# LANGUAGE KindSignatures # | Module : Data . GraphViz . Testing . Proxy Description : Proxy implementation Copyright : , License : Data . Proxy was added to base with GHC 7.8.1 , and we want to test for older versions than that . Module : Data.Grap...
72983594ba7c8c5cb252649a63dae2d1fe80def61e3c8a20f10e668da5dc2c8a
uw-unsat/leanette-popl22-artifact
indistinguishable.rkt
#lang rosette Copyright 2018 Amazon.com , Inc. or its affiliates . All Rights Reserved . ; Licensed under the Apache License , Version 2.0 ( the " License " ) . ; You may not use this file except in compliance with the License. A copy of the License is located at ; ; -2.0 ; ; or in the "license" file acco...
null
https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-3/quivela/src/backend/rosette/indistinguishable.rkt
racket
You may not use this file except in compliance with the License. -2.0 or in the "license" file accompanying this file. This file is distributed express or implied. See the License for the specific language governing permissions and limitations under the License. Havoc the locals of every object in the...
#lang rosette Copyright 2018 Amazon.com , Inc. or its affiliates . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) . A copy of the License is located at on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either (require rosette/lib/angelic racket/h...
0d8bb113deefe87e70d706690728cfdb0d1baa12ff632309c8cf060e3a7d029f
ocaml/opam
opamCudfSolver.mli
(**************************************************************************) (* *) Copyright 2017 - 2018 OCamlPro (* *) (* All right...
null
https://raw.githubusercontent.com/ocaml/opam/074df6b6d87d4114116ea41311892b342cfad3de/src/solver/opamCudfSolver.mli
ocaml
************************************************************************ All rights reserved. This file is distributed under the terms of the exception on linking descr...
Copyright 2017 - 2018 OCamlPro GNU Lesser General Public License version 2.1 , with the special * Various implementations of the low - level CUDF resolution , most of them relying on external solvers ( aspcud , etc . ) . Used for calling - back below D...
d622a9d4ac3786eced158e6dbfe6dccf60014515ee188180d1b712176222c806
purescript/purescript
AsMarkdown.hs
module Language.PureScript.Docs.AsMarkdown ( Docs , runDocs , moduleAsMarkdown , codeToString ) where import Prelude import Control.Monad (unless, zipWithM_) import Control.Monad.Writer (Writer, tell, execWriter) import Data.Foldable (for_) import Data.List (partition) import Data.Text (Text) import qualif...
null
https://raw.githubusercontent.com/purescript/purescript/02bd6ae60bcd18cbfa892f268ef6359d84ed7c9b/src/Language/PureScript/Docs/AsMarkdown.hs
haskell
roles aren't rendered in markdown fixityAsMarkdown :: P.Fixity -> Docs fixityAsMarkdown (P.Fixity associativity precedence) = tell' $ concat [ "_" , " / precedence " , show precedence , "_" ] where P.Infixl -> "left-associative" ...
module Language.PureScript.Docs.AsMarkdown ( Docs , runDocs , moduleAsMarkdown , codeToString ) where import Prelude import Control.Monad (unless, zipWithM_) import Control.Monad.Writer (Writer, tell, execWriter) import Data.Foldable (for_) import Data.List (partition) import Data.Text (Text) import qualif...
f731e40c743765621d532cb1a1664af603843582a06277814364c68a4d9247fb
aziem/binaryninja-ocaml
ffi_types_stubgen.ml
let () = print_endline ("#include " ^ Config.binaryninja_header_loc); Cstubs.Types.write_c Format.std_formatter (module Ffi_types.Enums)
null
https://raw.githubusercontent.com/aziem/binaryninja-ocaml/5773d791ebb717816b8c47863bce8122f39764b4/stubgen/ffi_types_stubgen.ml
ocaml
let () = print_endline ("#include " ^ Config.binaryninja_header_loc); Cstubs.Types.write_c Format.std_formatter (module Ffi_types.Enums)
5dcf7c58c8f2483e8a11a53280ad26621f0d2070f6d0a919311dbb3e4c0ffab8
janestreet/learn-ocaml-workshop
position.ml
open! Base type t = { col : int ; row : int } [@@deriving compare, sexp]
null
https://raw.githubusercontent.com/janestreet/learn-ocaml-workshop/1ba9576b48b48a892644eb20c201c2c4aa643c32/03-snake/lib/position.ml
ocaml
open! Base type t = { col : int ; row : int } [@@deriving compare, sexp]
0c650a769932b653d1ab91268aa6f0b71d8ee40fb5e5f21c2f1d274639c2bf57
albertoruiz/easyVision
Refine.hs
module Contours.Refine ( prepro, normalizedXORError, refineH, refineP, refinePB )where import Contours import Contours.CLK import Contours.CLKP import Vision.Ippe import Numeric.LinearAlgebra.HMatrix import Vision(cameraFromHomogZ0,kgen,refineNewton) import Util.Geometry(datMat,homog,segmentLength) import Cont...
null
https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/packages/contours/CLK/src/Contours/Refine.hs
haskell
or shapeGNP
module Contours.Refine ( prepro, normalizedXORError, refineH, refineP, refinePB )where import Contours import Contours.CLK import Contours.CLKP import Vision.Ippe import Numeric.LinearAlgebra.HMatrix import Vision(cameraFromHomogZ0,kgen,refineNewton) import Util.Geometry(datMat,homog,segmentLength) import Cont...
30dff80bde05b14c48b25cbe685194ae3a4f73bc22444f81dae5ea48888545e7
extend/goldrush
glc_code.erl
%% @doc Code generation functions. -module(glc_code). -export([ compile/2 ]). -define(erl, erl_syntax). -record(module, { 'query' :: term(), tables :: [{atom(), ets:tid()}], qtree :: term() }). -type syntaxTree() :: erl_syntax:syntaxTree(). -record(state, { event = undefined :: syntaxTree(), ...
null
https://raw.githubusercontent.com/extend/goldrush/468a05a47fb43a9306eaf783e5312bd1cd659bd9/src/glc_code.erl
erlang
@doc Code generation functions. abstract code geneation functions -module(Module) -export([ table/1 handle/1 ]). info(Name) -> Term. table(Name) -> ets:tid(). handle(Event) - entry function Transform Term -> Key to Key -> Term @private Return the clauses of the table/1 function. @private Return the origina...
-module(glc_code). -export([ compile/2 ]). -define(erl, erl_syntax). -record(module, { 'query' :: term(), tables :: [{atom(), ets:tid()}], qtree :: term() }). -type syntaxTree() :: erl_syntax:syntaxTree(). -record(state, { event = undefined :: syntaxTree(), fields = [] :: [{atom(), syntaxTr...
5555c4f0f6522bde31f291c822f581a84cb3b210dd9ee6a1267cfc5c7e0d8cc1
rmculpepper/crypto
b2.rkt
Copyright 2018 ;; ;; 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 , or ;; (at your option) any later version. ;; ;; This library is distributed in...
null
https://raw.githubusercontent.com/rmculpepper/crypto/fec745e8af7e3f4d5eaf83407dde2817de4c2eb0/crypto-lib/b2.rkt
racket
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 (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCH...
Copyright 2018 by the Free Software Foundation , either version 3 of the License , or GNU Lesser General Public License for more details . You should have received a copy of the GNU Lesser General Public License #lang racket/base (require "private/b2/factory.rkt") (provide b2-factory)
e2cc9b9c5454da52a1cbcd9c7c962bdd4ec219365dd80e0eda1e790e8ee226e5
brendanhay/gogol
List.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-shopping-content/gen/Gogol/ShoppingContent/Content/Accounts/List.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated * Resource ** Constructing a Request 'ContentAccountsList' request conforms to. /See:/ 'newContentAccountsList' smart constructor. | V1 error format. | OAuth access token. | If view is set to \"css\", only return accounts ...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
d4b2f0fa5f3b15a5344e70273ae0c8ed18102f80998c43e9613ee310cd37fe7e
arekinath/esaml
esaml_cowboy.erl
esaml - SAML for erlang %% Copyright ( c ) 2013 , and the University of Queensland %% All rights reserved. %% Distributed subject to the terms of the 2 - clause BSD license , see %% the LICENSE file in the root of the distribution. %% @doc Convenience functions for use with Cowboy handlers %% %% This module ma...
null
https://raw.githubusercontent.com/arekinath/esaml/bf52dcb449184dc94e4fb1ff8820b08cc1ceab09/src/esaml_cowboy.erl
erlang
All rights reserved. the LICENSE file in the root of the distribution. @doc Convenience functions for use with Cowboy handlers This module makes it easier to use esaml in your Cowboy-based web application, by providing easy wrappers around the functions in esaml_binding and esaml_sp. be returned verbatim wit...
esaml - SAML for erlang Copyright ( c ) 2013 , and the University of Queensland Distributed subject to the terms of the 2 - clause BSD license , see -module(esaml_cowboy). -include_lib("xmerl/include/xmerl.hrl"). -include("esaml.hrl"). -export([reply_with_authnreq/4, reply_with_metadata/2, reply_with_logoutr...
e861d3fffe4a5c212e89ff99f4d0c3414adefc62b24603c259e19fcb64d3e7d8
let-def/lrgrep
Option.mli
(******************************************************************************) (* *) (* Fix *) (* ...
null
https://raw.githubusercontent.com/let-def/lrgrep/29e64174dc9617bcd1871fd2e4fd712269568324/lib/fix/Option.mli
ocaml
**************************************************************************** Fix ...
, Paris . All rights reserved . This file is distributed under the terms of the GNU Library General Public License version 2 , with a open Sigs module Option (X : sig type t end) : PROPERTY with type property = X.t option
f8a7365716a008d997a16df4a5117ec91cfbab57f0594f108b1ea782ece7626b
rescript-lang/rescript-compiler
exn_error_pattern.ml
exception Stack_overflow exception Sys_blocked_io exception Sys_error of string (* let f = [%bs.error? (Not_found | Invalid_argument _)] let u = fun [@bs.exn] e -> match e with | *) let f = function [@bs.open] | Not_found -> 0 | ( Invalid_argument _ | Stack_overflow ) -> 1 | Sys_error _ -> 2 ty...
null
https://raw.githubusercontent.com/rescript-lang/rescript-compiler/2789454fc4d705ce020282cabf15b5b16fff3c8b/jscomp/test/exn_error_pattern.ml
ocaml
let f = [%bs.error? (Not_found | Invalid_argument _)] let u = fun [@bs.exn] e -> match e with | type v = A let f = function [@bs.open] | A -> 1 let f_m = fun match_ -> if Caml_exceptions.isCamlExceptionOrOpenVariant match_ then match Obj.magic match_ with | Not_found -> Some 0 ...
exception Stack_overflow exception Sys_blocked_io exception Sys_error of string let f = function [@bs.open] | Not_found -> 0 | ( Invalid_argument _ | Stack_overflow ) -> 1 | Sys_error _ -> 2 type exn += A of int type exn += B of int let g = function [@bs.open] | (Not_found | Invalid_argument...
4257bd632eeb8626b02f3e2de6f2417c2ccafa3d1c56fc6e0b4d08020870a3fb
AndrasKovacs/ELTE-func-lang
Ora8_Pre.hs
{-# OPTIONS_GHC -Wincomplete-patterns -Wmissing-methods #-} # LANGUAGE DeriveFunctor , DeriveFoldable , InstanceSigs # import Control.Applicative import Control.Monad import Data.Char import Data.List import Data.Foldable --- PARSER newtype Parser a = Parser { runParser :: String -> Maybe (String, a) } instance Fun...
null
https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/6800f0b0ac8af9157fbe0383bb602a0d74f27820/2022-23-1/gyak2/Ora8_Pre.hs
haskell
# OPTIONS_GHC -Wincomplete-patterns -Wmissing-methods # - PARSER satisfy (== c) - PARSER VÉGE pl choice [char 'c', string "a", char 'q'] == char 'c' <|> string "a" <|> char 'q' <|> empty char 'c' *> char 'a' *> char 'r' ≡ do char 'c' char 'a' char 'r' [A-Z]{10} \d+.*$ \d?alma.?banana a+b*c?d{4}e{5,}...
# LANGUAGE DeriveFunctor , DeriveFoldable , InstanceSigs # import Control.Applicative import Control.Monad import Data.Char import Data.List import Data.Foldable newtype Parser a = Parser { runParser :: String -> Maybe (String, a) } instance Functor Parser where fmap f (Parser p) = Parser $ \st -> case p st of ...
08bb7afeab632e87fc0de3cb87de15a90b38a332831a24672d40bd38f8801804
PacktWorkshops/The-Clojure-Workshop
exercise_4_04_test.clj
(ns packt-clj.exercise-4-04-test (:require [clojure.test :as t :refer [deftest is testing]] [packt-clj.chapter-4-tests.exercise-4-04 :as exo])) (deftest our-range (is (= [0 1 2 3 4] (exo/our-range 5))) (is (= [0 10 20 30 40] (map (fn [i] (print ".") (* i 10)) (exo/our-range 5)))))
null
https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter04/tests/packt-clj.chapter-4-tests/test/packt_clj/chapter_4_tests/exercise_4_04_test.clj
clojure
(ns packt-clj.exercise-4-04-test (:require [clojure.test :as t :refer [deftest is testing]] [packt-clj.chapter-4-tests.exercise-4-04 :as exo])) (deftest our-range (is (= [0 1 2 3 4] (exo/our-range 5))) (is (= [0 10 20 30 40] (map (fn [i] (print ".") (* i 10)) (exo/our-range 5)))))
53ea649d724c542801e76f9656324d6434c8d3af5f5e6b30e0215065c16796af
andrei-dubovik/centrality
log.lisp
Copyright ( c ) 2020 < > ;; Simple logging facilities (in-package :centrality) ;; *log* is set when the log process is started and it is used throughout the program (defvar *log*) (defclass logger () ((fd :initarg :fd :reader .fd))) (defun get-formatted-time () "Get current time in ISO format" (multiple...
null
https://raw.githubusercontent.com/andrei-dubovik/centrality/b2f86bc045fe3712b543ae28843127781ffee80f/src/log.lisp
lisp
Simple logging facilities *log* is set when the log process is started and it is used throughout the program Event loop (setq *log* nil) belongs elsewhere
Copyright ( c ) 2020 < > (in-package :centrality) (defvar *log*) (defclass logger () ((fd :initarg :fd :reader .fd))) (defun get-formatted-time () "Get current time in ISO format" (multiple-value-bind (second minute hour date month year day daylight-p zone) (get-decoded-time) (format nil "~4,'0d-~2,...
6f4f3f9d2e7a3f5f48e92c6a4b55144c1e31d1c47271ab7fd4e7d738521c8c45
lemmaandrew/CodingBatHaskell
inOrderEqual.hs
From Given three ints , a b c , return true if they are in strict increasing order , such as 2 5 11 , or 5 6 7 , but not 6 5 7 or 5 5 7 . However , with the exception that if \"equalOk\ " is true , equality is allowed , such as 5 5 7 or 5 5 5 . Given three ints, a b c, return true if they are in strict incre...
null
https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/Logic-1/inOrderEqual.hs
haskell
From Given three ints , a b c , return true if they are in strict increasing order , such as 2 5 11 , or 5 6 7 , but not 6 5 7 or 5 5 7 . However , with the exception that if \"equalOk\ " is true , equality is allowed , such as 5 5 7 or 5 5 5 . Given three ints, a b c, return true if they are in strict incre...
d687c850a474a381ec66ca98f7d6c43a73430af92c5b2620c20c22c8f6acb5d5
penpot/penpot
highlight.cljs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.main.data.workspace.highlight (:require [app.common.spec :as us] [clojure.set :as set] [pot...
null
https://raw.githubusercontent.com/penpot/penpot/cc18f84d620e37d8efafc5bed1bcdbe70ec23c1e/frontend/src/app/main/data/workspace/highlight.cljs
clojure
Copyright (c) KALEIDOS INC --- Manage shape's highlight status
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.main.data.workspace.highlight (:require [app.common.spec :as us] [clojure.set :as set] [potok.core :as ptk])) (defn highli...
61a4d3db84b3c86af873ac1093fed3bbee24aa08f24244ef8bc090f9f8e4f10a
votinginfoproject/data-processor
candidates_postgres_test.clj
(ns vip.data-processor.db.translations.v5-2.candidates-postgres-test (:require [clojure.test :refer :all] [vip.data-processor.test-helpers :refer :all] [vip.data-processor.db.postgres :as postgres] [vip.data-processor.db.translations.v5-2.candidates :as c] [vip.data-pro...
null
https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/test/vip/data_processor/db/translations/v5_2/candidates_postgres_test.clj
clojure
(ns vip.data-processor.db.translations.v5-2.candidates-postgres-test (:require [clojure.test :refer :all] [vip.data-processor.test-helpers :refer :all] [vip.data-processor.db.postgres :as postgres] [vip.data-processor.db.translations.v5-2.candidates :as c] [vip.data-pro...
7693b955f3333d7b479a78907838c618b122512b1e876c78a003ce034815cfa4
uw-unsat/leanette-popl22-artifact
simplify.rkt
#lang racket (require racket/require (filtered-in (lambda (n) (and (regexp-match? #rx"^node/" n) n)) "../lang/ast.rkt") (prefix-in ast/ "../lang/ast.rkt")) (provide simplify) ;; utility stuff --------------------------------------------------------------- (define ast-cache (make-hash)) (define (a...
null
https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-4/memsynth/ocelot/lib/simplify.rkt
racket
utility stuff --------------------------------------------------------------- canonicalize commutative operations to simplify equality checking ----------- simplify expressions -------------------------------------------------------- (<: s r) = tuples of r that start with x ∈ s (:> r s) = tuples of r that end with...
#lang racket (require racket/require (filtered-in (lambda (n) (and (regexp-match? #rx"^node/" n) n)) "../lang/ast.rkt") (prefix-in ast/ "../lang/ast.rkt")) (provide simplify) (define ast-cache (make-hash)) (define (ast<? a b) (< (hash-ref! ast-cache a (thunk (hash-count ast-cache))) (hash-...
644b22aba1d92ab250c2fddb29aee068e91e23825829ed6242d7348d5329997b
garrigue/lablgtk
custom_tree_generic.ml
(**************************************************************************) Lablgtk - Examples (* *) (* This code is in the public domain. *) (* You may f...
null
https://raw.githubusercontent.com/garrigue/lablgtk/504fac1257e900e6044c638025a4d6c5a321284c/examples/custom_tree_generic.ml
ocaml
************************************************************************ This code is in the public domain. You may freely copy parts of it in your application. ...
Lablgtk - Examples .. /src / lablgtk2 -localdir let debug = false let () = if debug then begin Gc.set { (Gc.get()) with Gc.verbose = 0x00d; space_overhead = 0 }; ignore (Gc.create_alarm (fun () -> let s = Gc.stat () in Format.printf "blocks=%d wo...
68a92c42c91d287242956e14e8bca77b7c86d575c2e2cdc745b45e96f34d430d
Eduap-com/WordMat
combin.lisp
-*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; The data in this file contains enhancments. ;;;;; ;;; ;;;;; ...
null
https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/src/combin.lisp
lisp
Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; The data in this file contains enhancments. ;;;;; ;;;;; ; ; ; ; All rights reserved ;;;;; ; ; minfactorial ...
(in-package :maxima) (macsyma-module combin) (declare-top (special *mfactl *factlist donel nn* dn* *ans* *var* $zerobern *n $cflength *a* *a $prevfib $next_lucas *infsumsimp *times *plus sum usum makef varlist genvar $sumsplitfact $ratfac $simpsum $prederror $listarith $ratpri...
f84b25aebe06f6e388910304d501deb70a264334ef53bd8beb97d03b70c27ce4
scrintal/heroicons-reagent
document_text.cljs
(ns com.scrintal.heroicons.outline.document-text) (defn render [] [:svg {:xmlns "" :fill "none" :viewBox "0 0 24 24" :strokeWidth "1.5" :stroke "currentColor" :aria-hidden "true"} [:path {:strokeLinecap "round" :strokeLinejoin "round" ...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/outline/document_text.cljs
clojure
(ns com.scrintal.heroicons.outline.document-text) (defn render [] [:svg {:xmlns "" :fill "none" :viewBox "0 0 24 24" :strokeWidth "1.5" :stroke "currentColor" :aria-hidden "true"} [:path {:strokeLinecap "round" :strokeLinejoin "round" ...
198c971145029686cf648ae31ee00b97df1567760f7c2edfb0aae08ce3bb6d1e
RedPRL/redtt
IAbs.ml
open RedBasis.Bwd open BwdNotation type atom = Name.t type 'a abs = {atoms : atom bwd; node : 'a} let pp ih fmt {atoms; node} = let pp_atoms fmt atoms = let pp_sep fmt () = Format.fprintf fmt " " in Format.pp_print_list ~pp_sep Name.pp fmt (Bwd.to_list atoms) in Format.fprintf fmt "@[<hv1><%a>@ %a@]" ...
null
https://raw.githubusercontent.com/RedPRL/redtt/50689559ff970e33013b8cf8a3bbc8be18ec4e09/src/core/IAbs.ml
ocaml
open RedBasis.Bwd open BwdNotation type atom = Name.t type 'a abs = {atoms : atom bwd; node : 'a} let pp ih fmt {atoms; node} = let pp_atoms fmt atoms = let pp_sep fmt () = Format.fprintf fmt " " in Format.pp_print_list ~pp_sep Name.pp fmt (Bwd.to_list atoms) in Format.fprintf fmt "@[<hv1><%a>@ %a@]" ...
c4227b5e8efee8e7cc29e6948bbb4a8f10d306dc6e6bcf0d2db03668f4806cd1
IvanMartinez/oauth2_webmachine
oauth2_webmachine_sup.erl
@author author < > YYYY author . %% @doc Supervisor for the oauth2_webmachine application. -module(oauth2_webmachine_sup). -author('author <>'). -behaviour(supervisor). %% External exports -export([start_link/0, upgrade/0]). %% supervisor callbacks -export([init/1]). ( ) - > ServerRet %% @doc API for st...
null
https://raw.githubusercontent.com/IvanMartinez/oauth2_webmachine/d4b358167bdb2129989a4bec71753ab75044ad69/src/oauth2_webmachine_sup.erl
erlang
@doc Supervisor for the oauth2_webmachine application. External exports supervisor callbacks @doc API for starting the supervisor. @doc Add processes if necessary. @doc supervisor callback. @doc return the priv dir
@author author < > YYYY author . -module(oauth2_webmachine_sup). -author('author <>'). -behaviour(supervisor). -export([start_link/0, upgrade/0]). -export([init/1]). ( ) - > ServerRet start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). @spec upgrade ( ) - > ok upgrade() -> {...
0c031b0aa08450e2a3ef426ba513a119b53d3d3c40aee85b552b13349fb4713b
waddlaw/TAPL
Ex22_3_10.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeApplications # # OPTIONS_GHC -Wno - incomplete - uni - patterns # module Language.Recon.Exercise.Ex22_3_10 where import RIO import qualified RIO.List as List import qualified RIO.Set as Set import qualified RIO.Text as Text data Ty = TyBool ...
null
https://raw.githubusercontent.com/waddlaw/TAPL/94576e46821aaf7abce6d1d828fc3ce6d05a40b8/subs/recon/src/Language/Recon/Exercise/Ex22_3_10.hs
haskell
# LANGUAGE OverloadedStrings # | TyId , fromList [ ) ] ) stream を捨てないと、結果を表示する際に計算が止まらなくなるので注意 フレッシュな変数を作るための引数が増えた examples
# LANGUAGE LambdaCase # # LANGUAGE TypeApplications # # OPTIONS_GHC -Wno - incomplete - uni - patterns # module Language.Recon.Exercise.Ex22_3_10 where import RIO import qualified RIO.List as List import qualified RIO.Set as Set import qualified RIO.Text as Text data Ty = TyBool | TyNat | TyArr Ty Ty TyVar...
e6609d8f3ad6644781cf273c004192976802f08437a1e861f2aea5c5ded20fda
erleans/vonnegut
vonnegut_app.erl
%%%------------------------------------------------------------------- %% @doc vonnegut public API %% @end %%%------------------------------------------------------------------- -module(vonnegut_app). -behaviour(application). %% Application callbacks -export([start/2, stop/1, swap_lager/1]). %%===...
null
https://raw.githubusercontent.com/erleans/vonnegut/88693f192a4fc3da88e7b359e38e72cee25b3d24/src/vonnegut_app.erl
erlang
------------------------------------------------------------------- @doc vonnegut public API @end ------------------------------------------------------------------- Application callbacks ==================================================================== API =======================================================...
-module(vonnegut_app). -behaviour(application). -export([start/2, stop/1, swap_lager/1]). start(_StartType, _StartArgs) -> init_tables(), vonnegut_sup:start_link(). stop(_State) -> ok. Internal functions init_tables() -> vg_log_segments:init_table(), vg_topics:init_table...
3599742136cd6a9e6725e5dde0de9ef63633dceea0ef86f3e0f7de9aa25a938b
LexiFi/menhir
TableFormat.ml
(******************************************************************************) (* *) (* *) ...
null
https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/lib/TableFormat.ml
ocaml
**************************************************************************** special ex...
, Paris , PPS , Université Paris Diderot . All rights reserved . This file is distributed under the terms of the GNU Library General Public License versio...
0499a659fe4a9cc0fd3bc1c96d461c0c5f54a3bf40688fc8cf9cdbae22d40ac9
exercism/scheme
test.scm
(load "test-util.ss") (define test-cases `((test-success "empty string" equal? transpose '(()) '()) (test-success "two characters in a row" equal? transpose '(((65 49))) '((65) (49))) (test-success "two characters in a column" equal? transpose '(((65) (49))) '((65 49))) (test-success "si...
null
https://raw.githubusercontent.com/exercism/scheme/2064dd5e5d5a03a06417d28c33c5349bec97dad7/exercises/practice/transpose/test.scm
scheme
(load "test-util.ss") (define test-cases `((test-success "empty string" equal? transpose '(()) '()) (test-success "two characters in a row" equal? transpose '(((65 49))) '((65) (49))) (test-success "two characters in a column" equal? transpose '(((65) (49))) '((65 49))) (test-success "si...
48c656442f4b2dda7b6dd32a3a7c7e67fe417e115065293920bad378f6489dbf
tlaplus/tlapm
fofunctions.ml
open Fotypes;; exception Illegal1;; exception Illegal2;; exception Illegal3;; exception Illegal4;; exception Illegal5;; exception Illegal6;; exception Illegal7;; exception NonMonodic;; (******************************************************************) (* DEBUGGING ...
null
https://raw.githubusercontent.com/tlaplus/tlapm/158386319f5b6cd299f95385a216ade2b85c9f72/translate/fofunctions.ml
ocaml
**************************************************************** DEBUGGING **************************************************************** choose either of the following definitions **************************************************************** ...
open Fotypes;; exception Illegal1;; exception Illegal2;; exception Illegal3;; exception Illegal4;; exception Illegal5;; exception Illegal6;; exception Illegal7;; exception NonMonodic;; let debug str = ( ) ; print_newline ( ) ; ; let debug str = ();; let isUpper = function | 'A' .. 'Z' -> true | _ -> false ...
4b2da285f9c70389994de639e6e7595403ebf8e1ffc7ec4efbaf88a6f923d357
granule-project/granule
Checker.hs
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE ImplicitParams # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE ViewPatterns # # LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} # options_ghc -fno - warn - incomplete - uni - patterns -Wno - dep...
null
https://raw.githubusercontent.com/granule-project/granule/c27c3a609ad05a5d623f0cf03115877319986682/frontend/src/Language/Granule/Checker/Checker.hs
haskell
# LANGUAGE GADTs # | Core type checker Checking (top-level) Add on any definitions computed by the type checker (derived) Synthing the type of a single expression in the context of an asy for top-level identifiers with their schemes Lookup in data constructors Or see if this is a kind constructors Lookup in def...
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE ImplicitParams # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE ViewPatterns # # LANGUAGE DataKinds # # options_ghc -fno - warn - incomplete - uni - patterns -Wno - deprecations # module Lan...
e639e9119603384aa67d178579051bf3a037416da70e9092180735016ad013e2
oakes/play-cljc-examples
start.clj
(ns basic-bird.start (:require [basic-bird.core :as c] [play-cljc.gl.core :as pc]) (:import [org.lwjgl.glfw GLFW Callbacks GLFWCursorPosCallbackI GLFWKeyCallbackI GLFWMouseButtonCallbackI GLFWCharCallbackI GLFWFramebufferSizeCallbackI GLFWWindowCloseCallbackI GLFW...
null
https://raw.githubusercontent.com/oakes/play-cljc-examples/dec348241c2f0a880ac3074c5d8f1b66d3159a70/basic-bird/src/basic_bird/start.clj
clojure
(ns basic-bird.start (:require [basic-bird.core :as c] [play-cljc.gl.core :as pc]) (:import [org.lwjgl.glfw GLFW Callbacks GLFWCursorPosCallbackI GLFWKeyCallbackI GLFWMouseButtonCallbackI GLFWCharCallbackI GLFWFramebufferSizeCallbackI GLFWWindowCloseCallbackI GLFW...
f481c971447a0416b8d31994a5831b60dd1e029a2cea9e6510634da8b36e3f45
sveri/closp
user.clj
(ns {{namespace}}.routes.user (:require [compojure.core :refer [routes GET POST]] [buddy.hashers :as hashers] [ring.util.response :as resp] [clojure.tools.logging :as log] [org.httpkit.client :as http] [{{namespace}}.views.user :as vh] [{{namespa...
null
https://raw.githubusercontent.com/sveri/closp/8bd82134f57b2b32e26ee091bb74a6f0eb2ddcdb/resources/clj/new/closp/src/clj/routes/user.clj
clojure
(ns {{namespace}}.routes.user (:require [compojure.core :refer [routes GET POST]] [buddy.hashers :as hashers] [ring.util.response :as resp] [clojure.tools.logging :as log] [org.httpkit.client :as http] [{{namespace}}.views.user :as vh] [{{namespa...
706229dc0bc0b539dae3b1e191adc12e0d37c1d5a7e66c243e0e8045f448dd1b
jyh/metaprl
czf_itt_cyclic_subgroup.mli
* Cyclic subgroup . * * ---------------------------------------------------------------- * * This file is part of MetaPRL , a modular , higher order * logical framework that provides a logical programming * environment for OCaml and other languages . * * See the file doc / htmlman / default.h...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/czf/czf_itt_cyclic_subgroup.mli
ocaml
*********************************************************************** * TERMS * *********************************************************************** *********************************************************************** * DEFINITIONS ...
* Cyclic subgroup . * * ---------------------------------------------------------------- * * This file is part of MetaPRL , a modular , higher order * logical framework that provides a logical programming * environment for OCaml and other languages . * * See the file doc / htmlman / default.h...
a347c57bd30fc0b3177150716160ce52e25521c7dd080d3c14ff023bd29a1ba2
onedata/op-worker
atm_ongoing_workflow_executions.erl
%%%------------------------------------------------------------------- @author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%%-------------------------------------------------------------------- %%% @doc %%% Module operating on collection of ongoing ...
null
https://raw.githubusercontent.com/onedata/op-worker/5cb17b2fbb812138b6c2750d0257a91ec9d97c6c/src/modules/automation/atm_ongoing_workflow_executions.erl
erlang
------------------------------------------------------------------- -------------------------------------------------------------------- @doc Module operating on collection of ongoing automation workflow executions. @end ------------------------------------------------------------------- API =======================...
@author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . -module(atm_ongoing_workflow_executions). -author("Bartosz Walkowicz"). -include("modules/automation/atm_wokflow_execution.hrl"). -export([list/2, add/1, delete/1]). -spec list(od_space:id(), ...
b5d602293436d6357dc4b6d57feaaad62bb13a053266e26cca0c1b4c3078561d
AstRonin/sgi
routes.erl
-module(routes). -author('Maxim Sokhatsky'). -include_lib("n2o/include/wf.hrl"). -export([init/2, finish/2]). %% U can use default dynamic routes or define custom static as this %% Just put needed module name to sys.config: %% {n2o, [{route,routes}]} %% Also with dynamic routes u must load all modules before starting ...
null
https://raw.githubusercontent.com/AstRonin/sgi/3854b62b6ce46ba71abd1e76e9cf5200dc0b1df3/samples/apps/review/src/routes.erl
erlang
U can use default dynamic routes or define custom static as this Just put needed module name to sys.config: {n2o, [{route,routes}]} Also with dynamic routes u must load all modules before starting Cowboy [code:ensure_loaded(M) || M <- [index, login, ... ]]
-module(routes). -author('Maxim Sokhatsky'). -include_lib("n2o/include/wf.hrl"). -export([init/2, finish/2]). finish(State, Ctx) -> {ok, State, Ctx}. init(State, Ctx) -> Path = wf:path(Ctx#cx.req), wf:info(?MODULE,"Route: ~p~n",[Path]), {ok, State, Ctx#cx{path=Path,module=route_prefix(Path)}}. route_pref...
a4b2e70c015afa35a09a79a4e78d050079a3ca599d4f4e8c3cb6b20abfd04b50
thi-ng/geom
intersect.cljc
(ns thi.ng.geom.utils.intersect #?(:cljs (:require-macros [thi.ng.math.macros :as mm])) (:require [thi.ng.geom.core :as g] [thi.ng.geom.utils :as gu] [thi.ng.geom.vector :as v :refer [vec2 vec3 V2 V3]] [thi.ng.math.core :as m :refer [*eps*]] #?(:clj [thi.ng.math.macros :as mm]))) (declare...
null
https://raw.githubusercontent.com/thi-ng/geom/85783a1f87670c5821473298fa0b491bd40c3028/src/thi/ng/geom/utils/intersect.cljc
clojure
Source: Graphics Gems 2 / SO: example usage /#!topic/comp.graphics.algorithms/M6lvyWC6PqU Source: -_intersect-2.html Source: -Moller/code/tribox3.txt Source: -Moller/code/tribox3.txt
(ns thi.ng.geom.utils.intersect #?(:cljs (:require-macros [thi.ng.math.macros :as mm])) (:require [thi.ng.geom.core :as g] [thi.ng.geom.utils :as gu] [thi.ng.geom.vector :as v :refer [vec2 vec3 V2 V3]] [thi.ng.math.core :as m :refer [*eps*]] #?(:clj [thi.ng.math.macros :as mm]))) (declare...
7c32e30705c51984a4fbd36199a728ace260727d7c5d8653f4c8fec27bd5435a
randomlurker/reframe-auth0
project.clj
(defproject reframe-auth0 "0.1.0-SNAPSHOT" :dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/clojurescript "1.9.229"] [reagent "0.6.0"] [re-frame "0.9.2"] [cljsjs/auth0-lock "10.16.0-0"]] :plugins [[lein-cljsbuild "1.1.4"]] :min-lein-ve...
null
https://raw.githubusercontent.com/randomlurker/reframe-auth0/f14ad3e3de7ae30958ad9925925a40cd36e48f54/project.clj
clojure
(defproject reframe-auth0 "0.1.0-SNAPSHOT" :dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/clojurescript "1.9.229"] [reagent "0.6.0"] [re-frame "0.9.2"] [cljsjs/auth0-lock "10.16.0-0"]] :plugins [[lein-cljsbuild "1.1.4"]] :min-lein-ve...
2cd1c99845dcb63159a37e1f384c564fb2121a81e15f85aefdc5a9ddb7cc212f
mirage/irmin
test.ml
* Copyright ( c ) 2013 - 2022 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND...
null
https://raw.githubusercontent.com/mirage/irmin/9bcce092a500e7e7e88dab3e0240091488e46abe/test/irmin-fs/test.ml
ocaml
* Copyright ( c ) 2013 - 2022 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND...
bff309d948ea3e20198b7ca3c4abd06be576eb6197da9d3d8526794ba0d7f1bb
spurious/chibi-scheme-mirror
interface.scm
;; interface.scm -- hash-table interface Copyright ( c ) 2009 - 2011 . All rights reserved . ;; BSD-style license: ;; the non-exported hash-table-cell is the heart of the implemenation (define (make-hash-table . o) (let* ((eq-fn (if (pair? o) (car o) equal?)) (hash-fn (if (and (pair? o) (pair? (cdr ...
null
https://raw.githubusercontent.com/spurious/chibi-scheme-mirror/49168ab073f64a95c834b5f584a9aaea3469594d/lib/srfi/69/interface.scm
scheme
interface.scm -- hash-table interface BSD-style license: the non-exported hash-table-cell is the heart of the implemenation
Copyright ( c ) 2009 - 2011 . All rights reserved . (define (make-hash-table . o) (let* ((eq-fn (if (pair? o) (car o) equal?)) (hash-fn (if (and (pair? o) (pair? (cdr o))) (car (cdr o)) (if (eq? eq? eq-fn) hash-by-identity hash)))) (cond ((not (pro...
d96ff617b4d93c85d914dba89b0727c14e0576077b1f844fec0d77a0ce72b4f0
zadean/xqerl
prod_EmptyOrderDecl_SUITE.erl
-module('prod_EmptyOrderDecl_SUITE'). -include_lib("common_test/include/ct.hrl"). -export([ all/0, groups/0, suite/0 ]). -export([ init_per_suite/1, init_per_group/2, end_per_group/2, end_per_suite/1 ]). -export(['emptyorderdecl-1'/1]). -export(['emptyorderdecl-2'/1]). -export(['emptyord...
null
https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/prod/prod_EmptyOrderDecl_SUITE.erl
erlang
-module('prod_EmptyOrderDecl_SUITE'). -include_lib("common_test/include/ct.hrl"). -export([ all/0, groups/0, suite/0 ]). -export([ init_per_suite/1, init_per_group/2, end_per_group/2, end_per_suite/1 ]). -export(['emptyorderdecl-1'/1]). -export(['emptyorderdecl-2'/1]). -export(['emptyord...