_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
f10c6855553aaad4739548725178b1c3839f37f323df5f2eb2859d3974594408
gelisam/hyzzy
F1.hs
{-# LANGUAGE OverloadedStrings #-} module Rooms.F1 where import Hyzzy.Command look :: Command look = "More foliage walls. This place is a maze..." north :: Command north = Command $ goToRoom "E1" south :: Command south = Command $ goToRoom "G1" -- 1 2 3 4 5 6 7 -- +-+-+ +-+-+-+-+ -- A| | | -- ...
null
https://raw.githubusercontent.com/gelisam/hyzzy/c5c861d5556ed3ca82fbb583d6928fac40d0d8df/games/maze/Rooms/F1.hs
haskell
# LANGUAGE OverloadedStrings # 1 2 3 4 5 6 7 +-+-+ +-+-+-+-+ A| | | + +-+-+-+-+-+ + B| | | | + + +-+-+ + +-+ + + +-+ +-+ + + D| | | | | + + + + + + + + E| | | | | | + + +-+ + +-+ + F|*| | | + +-+-+ +-+-+ + +-+-+-+-+-+-+-+
module Rooms.F1 where import Hyzzy.Command look :: Command look = "More foliage walls. This place is a maze..." north :: Command north = Command $ goToRoom "E1" south :: Command south = Command $ goToRoom "G1" C| | | | | |
e70dbc283f20edbfc71a3689ecbdf1b6e3dd3e0050647bd16056c5085938a8ce
csabahruska/jhc-components
Id.hs
module Name.Id( Id(), IdMap(), IdNameT(), IdSet(), anonymous, va1,va2,va3,va4,va5, addBoundNamesIdMap, addBoundNamesIdSet, addNamesIdSet, idMapToIdSet, anonymousIds, sillyId, etherealIds, isEtherealId, isInvalidId, isEmptyId, idSetToIdMap, mapMaybe...
null
https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-common/src/Name/Id.hs
haskell
| some convinience anonymous ids type instance GSet Id = IdSet instance GMapSet Id where | Name monad transformer. | Run the name monad transformer. | id isn't anonymous or atom-mapped | A occasionally useful random ethereal id | find some temporary ids that are not members of the set, useful for generating a sm...
module Name.Id( Id(), IdMap(), IdNameT(), IdSet(), anonymous, va1,va2,va3,va4,va5, addBoundNamesIdMap, addBoundNamesIdSet, addNamesIdSet, idMapToIdSet, anonymousIds, sillyId, etherealIds, isEtherealId, isInvalidId, isEmptyId, idSetToIdMap, mapMaybe...
e93315a4c64d3c8ed2cc2093177f565aeb3b2b86c9142d7d244d7136e8102a9b
inaka/erlang_guidelines
atoms.erl
-module(atoms). -export([bad/0, good/0]). bad() -> ['BAD', alsoBad, bad_AS_well]. good() -> [good, also_good, ''].
null
https://raw.githubusercontent.com/inaka/erlang_guidelines/7a802a23a08d120db7e94115b4600b26194dd242/src/atoms.erl
erlang
-module(atoms). -export([bad/0, good/0]). bad() -> ['BAD', alsoBad, bad_AS_well]. good() -> [good, also_good, ''].
084003180c417eb15097f3fa8dcc9fab3fcc3c8f96fb1ff074ae6afc28908161
unclebob/ubc-website
user_groups.clj
(ns ubc-website.interactors.user-groups (:require [ring.util.response :refer [redirect response]] [clojure.string :refer [trim blank? join]] [ubc-website.views.user-groups :as view] [ubc-website.interactors.sidebar :refer [get-sidebar-data]] [ubc-website.views.p...
null
https://raw.githubusercontent.com/unclebob/ubc-website/c1298df6db0759d77cc8bd4a1bad2de62de1cfcd/src/ubc_website/interactors/user_groups.clj
clojure
(ns ubc-website.interactors.user-groups (:require [ring.util.response :refer [redirect response]] [clojure.string :refer [trim blank? join]] [ubc-website.views.user-groups :as view] [ubc-website.interactors.sidebar :refer [get-sidebar-data]] [ubc-website.views.p...
074de4462e7bd97fe091d2acb8db70f44b8b7ed9e7c4cc296f97810adb97d58e
skanev/playground
simulator.scm
(load-relative "../../showcase/simulator/simulator.scm")
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/05/tests/helpers/simulator.scm
scheme
(load-relative "../../showcase/simulator/simulator.scm")
a795fcda359d507053049b1dc7e6ddf19068a401dcf23679ae346c747a7e54a1
Artish357/RelateJS
mk.scm
; Scope object. ; Used to determine whether a branch has occured between variable ; creation and unification to allow the set-var-val! optimization ; in subst-add. Both variables and substitutions will contain a ; scope. When a substitution flows through a conde it is assigned ; a new scope. ; Creates a new scope that...
null
https://raw.githubusercontent.com/Artish357/RelateJS/f27c5360c51e87acdd184599ad0a4310fc751c13/faster-miniKanren/mk.scm
scheme
Scope object. Used to determine whether a branch has occured between variable creation and unification to allow the set-var-val! optimization in subst-add. Both variables and substitutions will contain a scope. When a substitution flows through a conde it is assigned a new scope. Creates a new scope that is not ...
(define new-scope (lambda () (list 'scope))) (define nonlocal-scope (list 'non-local-scope)) (define scope-eq? eq?) idx - unique numeric index for the variable . Used by the (define unbound (list 'unbound)) (define var (let ((counter -1)) (lambda (scope) (set! counter (+ 1 counter)) ...
392c28e379819ac3c8308d096600a8c0f8560d025aed3d522764e1464fd20dfc
tebello-thejane/bitx.hs
Withdrawal.hs
{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- | -- Module : Network.Bitcoin.BitX.Private.Withdrawal Copyright : 2016 Tebello Thejane -- License : BSD3 -- -- Maintainer : Tebello Thejane <zyxoas+> -- Stability : Experimental ...
null
https://raw.githubusercontent.com/tebello-thejane/bitx.hs/d5b1211656192b90381732ee31ca631e5031041b/src/Network/Bitcoin/BitX/Private/Withdrawal.hs
haskell
# LANGUAGE OverloadedStrings # --------------------------------------------------------------------------- | Module : Network.Bitcoin.BitX.Private.Withdrawal License : BSD3 Maintainer : Tebello Thejane <zyxoas+> Stability : Experimental ------------------------------------------------------------...
Copyright : 2016 Tebello Thejane Portability : non - portable ( GHC Extensions ) module Network.Bitcoin.BitX.Private.Withdrawal ( getWithdrawalRequests, newWithdrawalRequest, getWithdrawalRequest cancelWithdrawalRequest ) where import Network.Bitcoin.BitX.Internal import Network.Bitcoin.BitX.Typ...
4e8e52675db60ab4e3d077406e52de0132cc79d5b1bbed7185e4bd45d2c3d0a9
nuprl/gradual-typing-performance
info.rkt
#lang info (define 2htdp-teachpacks 'all)
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/teachpack/2htdp/info.rkt
racket
#lang info (define 2htdp-teachpacks 'all)
ead15e7b13c1df2226e0d260eee7c32c024f57cee2f9fc9125de5310458b560c
michaelklishin/monger
lib_integration_test.clj
(ns monger.test.lib-integration-test (:import [org.joda.time DateTime DateMidnight LocalDate] org.bson.types.ObjectId com.mongodb.DBObject) (:require monger.json monger.joda-time [clj-time.core :as t] [cheshire.core :as json] [clojure.test :r...
null
https://raw.githubusercontent.com/michaelklishin/monger/9f3d192dffb16da011f805355b87ae172c584a69/test/monger/test/lib_integration_test.clj
clojure
java.util.Date counts from 0
(ns monger.test.lib-integration-test (:import [org.joda.time DateTime DateMidnight LocalDate] org.bson.types.ObjectId com.mongodb.DBObject) (:require monger.json monger.joda-time [clj-time.core :as t] [cheshire.core :as json] [clojure.test :r...
b437d0c09014b55d34febb93e39d79296be83ac3328c8b8b6edf82b737793f99
synrc/nitro
element_datetime.erl
-module(element_datetime). -author('Vladimir Galunshchikov'). -include_lib("nitro/include/nitro.hrl"). -include_lib("nitro/include/event.hrl"). -compile(export_all). render_element(Record) when Record#datetime.show_if==false -> [<<>>]; render_element(Record) -> Id = case Record#datetime.postback of [] -> R...
null
https://raw.githubusercontent.com/synrc/nitro/753b543626add2c014584546ec50870808a2eb90/src/elements/input/element_datetime.erl
erlang
global spec
-module(element_datetime). -author('Vladimir Galunshchikov'). -include_lib("nitro/include/nitro.hrl"). -include_lib("nitro/include/event.hrl"). -compile(export_all). render_element(Record) when Record#datetime.show_if==false -> [<<>>]; render_element(Record) -> Id = case Record#datetime.postback of [] -> R...
e1a2fcab8b6ee20bbf6132f82cb84528925a3fad22f973620c9c62e9cd447757
kalai-transpiler/kalai
langs.clj
(ns kalai.emit.langs) ;; all available target language values ;; language values are namespaced keywords, where namespace = this namespace (def TARGET-LANGS {::java "Java (5 and higher)" ::cpp "C++ (11 and higher)" ::rust "Rust" ::curlybrace "category that incl...
null
https://raw.githubusercontent.com/kalai-transpiler/kalai/347cc1213bdd1eab12a093bb6abab9153cd23035/src/kalai/emit/langs.clj
clojure
all available target language values language values are namespaced keywords, where namespace = this namespace keys are the string version of the target lang keyword vals are the target lang namespaced keyword only keep the target langs that a user would select, not any of the super-types (ex: curlybrace) useful ...
(ns kalai.emit.langs) (def TARGET-LANGS {::java "Java (5 and higher)" ::cpp "C++ (11 and higher)" ::rust "Rust" ::curlybrace "category that includes ::java and :cpp"}) (def USER-TARGET-LANG-NAMES (into {} (for [[k _] (dissoc TARGET-LANGS ::curlybrace...
204123e6eb2b1aaf91880ff6ffb9635c4f67312e9c6e5c36fea9830e2ae68e9e
elaforge/karya
Random.hs
Copyright 2013 -- This program is distributed under the terms of the GNU General Public -- License 3.0, see COPYING or -3.0.txt -- | Calls for randomized scores. module Derive.C.Prelude.Random where import qualified Data.List as List import qualified Data.List.NonEmpty as NonEmpty import qualified Util.Doc as Doc...
null
https://raw.githubusercontent.com/elaforge/karya/a6638f16da9f018686023977c1292d6ce5095e28/Derive/C/Prelude/Random.hs
haskell
This program is distributed under the terms of the GNU General Public License 3.0, see COPYING or -3.0.txt | Calls for randomized scores. or ? or -? move to an Alternate module? Debug.tracepM "breakpoints" (starts, zip real_starts alt_indices) Optimize a single breakpoint at the start. | Switch between note st...
Copyright 2013 module Derive.C.Prelude.Random where import qualified Data.List as List import qualified Data.List.NonEmpty as NonEmpty import qualified Util.Doc as Doc import qualified Util.Log as Log import qualified Util.Seq as Seq import qualified Derive.Args as Args import qualified Derive.Call as Call impor...
7698b1972ac8fd35377f4138597b4d4ef8b12bb3068f28c3da6bf5e1e9d57e3a
ddmcdonald/sparser
ns-unknown-rd-items-covid-2020-04-03-0403-com-pmc-801-900.lisp
(IN-PACKAGE :SP) (DEFPARAMETER |*NS-RD-covid-2020-04-03-0403-COM-PMC-801-900*| '("<0" "<0.0001" "<0.001" "<0.05" "<0.25" "<0.75" "<1" "<1%" "<10%" "<100" "<100-500" "<28" "<3" "<37.2°C" "<37°C" "<4,000" "<45" "<5" "<500" "<SE" "<q1" "<q2" ">0.05" ">0.31" ">0.75" ">1.5" ">10" ">106" ">11" ">14" ">20%" ">3" ">...
null
https://raw.githubusercontent.com/ddmcdonald/sparser/304bd02d0cf7337ca25c8f1d44b1d7912759460f/Sparser/code/s/tools/ns-stuff/ns-unknown-rd-items-covid-2020-04-03-0403-com-pmc-801-900.lisp
lisp
(IN-PACKAGE :SP) (DEFPARAMETER |*NS-RD-covid-2020-04-03-0403-COM-PMC-801-900*| '("<0" "<0.0001" "<0.001" "<0.05" "<0.25" "<0.75" "<1" "<1%" "<10%" "<100" "<100-500" "<28" "<3" "<37.2°C" "<37°C" "<4,000" "<45" "<5" "<500" "<SE" "<q1" "<q2" ">0.05" ">0.31" ">0.75" ">1.5" ">10" ">106" ">11" ">14" ">20%" ">3" ">...
354e8fce660e3474f0ebba5de952577dfeb3b97c20ec51d2ed48bd9871b2aa26
racketscript/racketscript-playground
colored-carpet.rkt
#lang racketscript/base (require racketscript/htdp/image racketscript/htdp/universe racketscript/browser racketscript/interop racket/match racket/list threading) # js * references global JS objects . (let ([jquery #js*.jQuery]) $ > chains JavaScript calls . ...
null
https://raw.githubusercontent.com/racketscript/racketscript-playground/cc5b7aaa49ac19d830a667f4334a7dbeb6aee98d/examples/colored-carpet.rkt
racket
Returns a single tile of carpet Creates a tile using colors and combines them to fill current viewport String FontSize -> Image -> Image -> Non-Negative-Integet -> Non-Negative-Integet
#lang racketscript/base (require racketscript/htdp/image racketscript/htdp/universe racketscript/browser racketscript/interop racket/match racket/list threading) # js * references global JS objects . (let ([jquery #js*.jQuery]) $ > chains JavaScript calls . ...
6e505e034b4d868844b6e5b05ed11e13bfee84b44f6404bcdb6cbfd0d46f686f
Arc-Compute/Mdev-GPU
Main.hs
| Module : Main Description : CLI Client to create MDevs . Copyright : ( c ) 2022 2666680 Ontario Inc. O\A Arc Compute License : GNU GPL v.2 Maintainer : Stability : experimental Portability : POSIX This is where the CLI client is stored in order to provide us access to creating arb...
null
https://raw.githubusercontent.com/Arc-Compute/Mdev-GPU/b55b976fbffabd3ce4fe21543ca9b812152140a5/app/Cli/Main.hs
haskell
| Module : Main Description : CLI Client to create MDevs . Copyright : ( c ) 2022 2666680 Ontario Inc. O\A Arc Compute License : GNU GPL v.2 Maintainer : Stability : experimental Portability : POSIX This is where the CLI client is stored in order to provide us access to creating arb...
fafbb59ea179d5331cd16a87d31ce88e62fe5dfae190ef3858983055e228d396
eareese/htdp-exercises
141-cat-list-of-strings.rkt
#lang htdp/bsl Exercise 141 . If you are asked to design the function cat , which consumes a list of strings and appends them all into one long string , you are guaranteed to end up with this partial definition : ; List-of-string -> String concatenate all strings in l into one long string ;; (check-expect (cat '(...
null
https://raw.githubusercontent.com/eareese/htdp-exercises/a85ff3111d459dda0e94d9b463d01a09accbf9bf/part02-arbitrarily-large-data/141-cat-list-of-strings.rkt
racket
List-of-string -> String (check-expect (cat '()) "") (check-expect (cat (cons "a" (cons "b" '()))) "ab") (check-expect (cat (cons "ab" (cons "cd" (cons "ef" '())))) "abcdef") (define (cat l) (cond [(empty? l) ""] ---------------------------------------------------------------- (cons "a" "a" ...
#lang htdp/bsl Exercise 141 . If you are asked to design the function cat , which consumes a list of strings and appends them all into one long string , you are guaranteed to end up with this partial definition : concatenate all strings in l into one long string [ else ( ... ( first l ) ... ( cat ( rest l )...
b8cf88c6f2f395d5b57323bd6df9cea3b756cde1d5d6e89808eaf5647a366c8c
yallop/metaocaml-letrec
even_odd.ml
* Copyright ( c ) 2017 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2017 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) type eo = Even | Odd let eve...
null
https://raw.githubusercontent.com/yallop/metaocaml-letrec/5e140aebf81840e55e04e3ffc65e1741454f6037/lib_test/even_odd.ml
ocaml
* Copyright ( c ) 2017 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2017 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) type eo = Even | Odd let eve...
c794833596da1cba0d9923fd709e7faedf9f109d0d3d415ec3ad5efd371e0680
DaMSL/K3
Core.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE EmptyDataDecls #-} # LANGUAGE StandaloneDeriving # module Language.K3.Codegen.CPP.Materialization.Core where import Control.DeepSeq import Data.Binary import Data.Serialize import Data.Hashable import Data.Tree import GHC.Generics (Generic...
null
https://raw.githubusercontent.com/DaMSL/K3/51749157844e76ae79dba619116fc5ad9d685643/src/Language/K3/Codegen/CPP/Materialization/Core.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE EmptyDataDecls #
# LANGUAGE DeriveGeneric # # LANGUAGE StandaloneDeriving # module Language.K3.Codegen.CPP.Materialization.Core where import Control.DeepSeq import Data.Binary import Data.Serialize import Data.Hashable import Data.Tree import GHC.Generics (Generic) import Text.Printf import Language.K3.Core.Annotation import Lan...
905bc08f99a3da052e458d2b71d77fd11f7750af5c5c2239bd6ac5d11fa67701
ocsigen/ocaml-indexeddb
idb_js_api.ml
Copyright ( C ) 2015 , . See the LICENSE file for details . details. *) * js_of_ocaml type declarations for the w3c IndexedDB spec : / Currently only covers the bits needed for CueKeeper . IndexedDB_lwt provides a more friendly API . / Currently only covers the bits needed for...
null
https://raw.githubusercontent.com/ocsigen/ocaml-indexeddb/87373b8bfa42b1e403d26aa44709d2c45a99d0da/lib/idb_js_api.ml
ocaml
Note: we currently assume all keys and values are strings. This will always be the case for entries added using this interface. Being a bit paranoid marking all these as optdef
Copyright ( C ) 2015 , . See the LICENSE file for details . details. *) * js_of_ocaml type declarations for the w3c IndexedDB spec : / Currently only covers the bits needed for CueKeeper . IndexedDB_lwt provides a more friendly API . / Currently only covers the bits needed for...
31ef3b48f3f34f6391fa76eb66d830182cd7e4863ad986ea00cc585e57633148
etarasov/iptadmin
Static.hs
# LANGUAGE TemplateHaskell # module IptAdmin.Static where import Control.Monad.Error hiding (lift) import qualified Data.ByteString as B import Data.FileEmbed import Happstack.Server.FileServe.BuildingBlocks import Happstack.Server.Types import Happstack.Server.SimpleHTTP import IptAdmin.Types import Language.Haskell...
null
https://raw.githubusercontent.com/etarasov/iptadmin/ceaca3424a0b2891da4d5d91eaf516a3566f2885/src/IptAdmin/Static.hs
haskell
| Get date and time of compilation
# LANGUAGE TemplateHaskell # module IptAdmin.Static where import Control.Monad.Error hiding (lift) import qualified Data.ByteString as B import Data.FileEmbed import Happstack.Server.FileServe.BuildingBlocks import Happstack.Server.Types import Happstack.Server.SimpleHTTP import IptAdmin.Types import Language.Haskell...
96081d666285e1889f53b7ac9a4245003022165c10f66c89bbc864e352780768
c4-project/c4f
string_table.mli
This file is part of c4f . Copyright ( c ) 2018 - 2022 C4 Project c4 t itself is licensed under the MIT License . See the LICENSE file in the project root for more information . Parts of c4 t are based on code from the Herdtools7 project ( ) : see the LICENSE.herd file in the project...
null
https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/utils/src/string_table.mli
ocaml
* Case-insentitive bidirectional string lookup table modules * [Table] is a signature containing the raw string table itself. * [table] is the string table, mapping each [t] to a string. * [S] is the signature of string tables built with [Make]. This lets us access the table directly. * [of_string str] tries to l...
This file is part of c4f . Copyright ( c ) 2018 - 2022 C4 Project c4 t itself is licensed under the MIT License . See the LICENSE file in the project root for more information . Parts of c4 t are based on code from the Herdtools7 project ( ) : see the LICENSE.herd file in the project...
34a58b40df2a391d60db6b6c901291486280c541e46cc6577703e9dfa3e46e95
TerrorJack/ghc-alter
list002.hs
! ! ! Test that is stable . import Data.List main = print (sortBy (\(a,b) (a',b')->compare a a') ([1,1,1,1,1,1,1,1,1,1]`zip`[1..10]))
null
https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/tests/list002.hs
haskell
! ! ! Test that is stable . import Data.List main = print (sortBy (\(a,b) (a',b')->compare a a') ([1,1,1,1,1,1,1,1,1,1]`zip`[1..10]))
66cd52b92f17b082c1a1bf1c0ab8df29ad7c0fd004229ed06ed689492907c402
larrychristensen/orcpub
security_test.clj
(ns orcpub.security-test (:require [clojure.test :refer [testing deftest is]] [clj-time.core :as t :refer [hours minutes seconds millis ago now]] [orcpub.security :as s] [clojure.set :as sets])) (defn attempts-set [attempts] (into (sorted-set-by s/compare-dates) attempts))...
null
https://raw.githubusercontent.com/larrychristensen/orcpub/e83995857f7e64af1798009a45a0b03abcd3a4be/test/clj/orcpub/security_test.clj
clojure
(ns orcpub.security-test (:require [clojure.test :refer [testing deftest is]] [clj-time.core :as t :refer [hours minutes seconds millis ago now]] [orcpub.security :as s] [clojure.set :as sets])) (defn attempts-set [attempts] (into (sorted-set-by s/compare-dates) attempts))...
90936982bfeca4aa24fc1f6ca4935fdb5eb4c192707ab1202c804849927e2388
dvingo/cljs-styled-components
cards.cljs
(ns cljs-styled-components.cards (:require [cljs-styled-components.reagent-cards] [cljs-styled-components.fulcro-cards] [devcards.core])) (devcards.core/start-devcard-ui!)
null
https://raw.githubusercontent.com/dvingo/cljs-styled-components/8c254138a28a089b35e75abd90b1619f9138cfd7/src/cards/cljs_styled_components/cards.cljs
clojure
(ns cljs-styled-components.cards (:require [cljs-styled-components.reagent-cards] [cljs-styled-components.fulcro-cards] [devcards.core])) (devcards.core/start-devcard-ui!)
34332acd09beb8a1cd22af72a9ad4c3bb90e82505d09dcfad32fc6f69b9abe90
janestreet/base_quickcheck
field_syntax_intf.ml
open! Import module type S = sig type ast type t val create : ast -> t (** location of the field declaration *) val location : t -> location (** type of the field's contents *) val core_type : t -> core_type (** constructing a pattern to match all fields of the type *) val pattern : t list -> loc...
null
https://raw.githubusercontent.com/janestreet/base_quickcheck/b3dc5bda5084253f62362293977e451a6c4257de/ppx_quickcheck/expander/field_syntax_intf.ml
ocaml
* location of the field declaration * type of the field's contents * constructing a pattern to match all fields of the type * constructing an expression filling in all fields of the type
open! Import module type S = sig type ast type t val create : ast -> t val location : t -> location val core_type : t -> core_type val pattern : t list -> loc:location -> pattern list -> pattern val expression : t list -> loc:location -> expression list -> expression end module type Field_syntax = ...
37a80c80617ea29c79d0f0bd16aa75b289b19eb2ae7d63fe352389a94ad4a9e8
locusmath/locus
morphism.clj
(ns locus.set.quiver.ternary.core.morphism (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.mapping.general.core.object...
null
https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/set/quiver/ternary/core/morphism.clj
clojure
The topos of ternary quivers is the topos of presheaves over the index category T_{2,3} consisting one between the objects of a pair of ternary quivers and another between the morphisms. Such a a number of topos theoretic operations like products and coproducts are also generalized to morphisms of ternary quivers. ...
(ns locus.set.quiver.ternary.core.morphism (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.mapping.general.core.object...
d92c77c179bb976b61c85ca841f69dadf247fb81520db7d8b44240b31e6fe47a
OCamlPro/directories
quick_start.ml
let () = let module App_id = struct let qualifier = "com" let organization = "YourCompany" let application = "yourapp" end in let module M = Directories.Project_dirs (App_id) in let option_value = function None -> "None" | Some v -> v in Format.printf "cache dir = `%s`@." (option_value M.cache_di...
null
https://raw.githubusercontent.com/OCamlPro/directories/408aa22b3a0a4b583eb80412cb235903239a4883/example/quick_start.ml
ocaml
let () = let module App_id = struct let qualifier = "com" let organization = "YourCompany" let application = "yourapp" end in let module M = Directories.Project_dirs (App_id) in let option_value = function None -> "None" | Some v -> v in Format.printf "cache dir = `%s`@." (option_value M.cache_di...
0b72918408b6bd4ee24b189a5aec358e15328c05dcc794c179f769a76c5e8bea
aligusnet/astro
GregorianCalendarTest.hs
module Data.Astro.Time.GregorianCalendarTest ( tests ) where import Test.Framework (testGroup) import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.HUnit import Test.QuickCheck import Data.Time.Calendar (fromGregorian, toGregorian) import Data.Astro.Time.Gre...
null
https://raw.githubusercontent.com/aligusnet/astro/a8c951885061ccef98299af053fdc1a1cc808f17/test/Data/Astro/Time/GregorianCalendarTest.hs
haskell
module Data.Astro.Time.GregorianCalendarTest ( tests ) where import Test.Framework (testGroup) import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.HUnit import Test.QuickCheck import Data.Time.Calendar (fromGregorian, toGregorian) import Data.Astro.Time.Gre...
fa9e45e284930ca72d7a8da393afbecb18febb2f9880c73e0ff484624975f9aa
YoshikuniJujo/test_haskell
Internal.hs
# OPTIONS_GHC -Wall -fno - warn - tabs # module Gpu.Vulkan.Component.Middle.Internal where import Gpu.Vulkan.Component.Enum import qualified Gpu.Vulkan.Component.Core as C data Mapping = Mapping { mappingR :: Swizzle, mappingG :: Swizzle, mappingB :: Swizzle, mappingA :: Swizzle } deriving Show mappingToCore ::...
null
https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/6ea44c1048805a62979669c185ab32ba9f4d2e02/themes/gui/vulkan/try-vulkan-middle/src/Gpu/Vulkan/Component/Middle/Internal.hs
haskell
# OPTIONS_GHC -Wall -fno - warn - tabs # module Gpu.Vulkan.Component.Middle.Internal where import Gpu.Vulkan.Component.Enum import qualified Gpu.Vulkan.Component.Core as C data Mapping = Mapping { mappingR :: Swizzle, mappingG :: Swizzle, mappingB :: Swizzle, mappingA :: Swizzle } deriving Show mappingToCore ::...
566b76c6a3c7fd6cbd95615436dab958c984fd5203cf67b5a3522960828d1e12
mooreryan/ocaml_python_bindgen
person_runner.ml
let () = Py.initialize () let hagrid = Person.__init__ ~name:"Hagrid" ~age:111 () let () = print_endline @@ Person.__str__ hagrid ()
null
https://raw.githubusercontent.com/mooreryan/ocaml_python_bindgen/2781f1c6adf5208c208266deb1b36f2eb01f541c/test/embed_source.t/person_runner.ml
ocaml
let () = Py.initialize () let hagrid = Person.__init__ ~name:"Hagrid" ~age:111 () let () = print_endline @@ Person.__str__ hagrid ()
e3d83fc14a1c7a22ea900b04b63c3778bb2d90379c072e6a1517deb1bc3c7587
mirage/charrua
dhcp_server.ml
* Copyright ( c ) 2015 - 2017 < > * * 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 " AN...
null
https://raw.githubusercontent.com/mirage/charrua/a9501d6df2f0965f31ed9ad15329621426732b43/server/dhcp_server.ml
ocaml
Check if fixed addresses make sense Try to ensure the user doesn't pass bad options XXX Implement server-name option. Lease (dhcp bindings) operations Database, collection of leases with sexp XXX who cares If this is a fixed address, it's good if mac matches ip. Build the frame header might be slow O...
* Copyright ( c ) 2015 - 2017 < > * * 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 " AN...
aab4f9e714b31c450b87a36187abfe6d1b2dd197d11e9076fefb064596277f08
rm-hull/project-euler
euler056.clj
EULER # 056 ;; ========== A googol ( 10 ^ 100 ) is a massive number : one followed by one - hundred zeros ; 100 ^ 100 is almost unimaginably large : one followed by two - hundred zeros . Despite their size , the sum of the digits in each number is only 1 . ;; Considering natural numbers of the form , a^b , ...
null
https://raw.githubusercontent.com/rm-hull/project-euler/04e689e87a1844cfd83229bb4628051e3ac6a325/src/euler056.clj
clojure
========== 100 ^ 100 is almost unimaginably large : one followed by two - hundred the maximum digital sum?
EULER # 056 A googol ( 10 ^ 100 ) is a massive number : one followed by one - hundred zeros . Despite their size , the sum of the digits in each number is only 1 . Considering natural numbers of the form , a^b , where a , b < 100 , what is (ns euler056 (:use [util.misc])) (defn sum-of-digits [n] (redu...
2664ce70a02b0544158faa9768d933ef8c2a5a01c04cb13e0b4f845998f3b74e
kit-ty-kate/labrys
nType.ml
Copyright ( c ) 2013 - 2017 The Labrys developers . (* See the LICENSE file at the top-level directory. *) open TypedEnv let rec normalize = function | Ty name -> NTy name | Eff _ | Abs _ -> assert false | Sum sum -> NSum (List.map normalize sum) | Fun (t1, e, t2) -> NFun (normalize t1, List.concat (List.ma...
null
https://raw.githubusercontent.com/kit-ty-kate/labrys/4a3e0c5dd45343b4de2e22051095b49d05772608/src/typing/nType.ml
ocaml
See the LICENSE file at the top-level directory.
Copyright ( c ) 2013 - 2017 The Labrys developers . open TypedEnv let rec normalize = function | Ty name -> NTy name | Eff _ | Abs _ -> assert false | Sum sum -> NSum (List.map normalize sum) | Fun (t1, e, t2) -> NFun (normalize t1, List.concat (List.map normalize_eff e), normalize t2) | Forall (name, k, ...
7b2bd0f465a776b425ee88bd05c1fd5e3adc02901bc0af1cd277be4a7937e1ab
rill-event-sourcing/rill
mysql_test.clj
(ns rill.event-store.mysql-test (:require [rill.event-store.mysql :refer [mysql-event-store]] [rill.event-store.mysql.tools :as tools] [jdbc.pool.c3p0 :as pool] [rill.event-store.generic-test-base :refer [test-store]] [clojure.test :refer :all])) (def config {:user ...
null
https://raw.githubusercontent.com/rill-event-sourcing/rill/711d08e52bd331cdc2255199069b2d0aca69e8b0/test/rill/event_store/mysql_test.clj
clojure
(ns rill.event-store.mysql-test (:require [rill.event-store.mysql :refer [mysql-event-store]] [rill.event-store.mysql.tools :as tools] [jdbc.pool.c3p0 :as pool] [rill.event-store.generic-test-base :refer [test-store]] [clojure.test :refer :all])) (def config {:user ...
68e97a1c44348d30660caaa6cf62a7618ea8ff0746bc551f6896f7e681da7404
DaMSL/K3
Annotation.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # | The K3 Annotation System . module Language.K3.Core.Annotation ( -- * Basic Infrastructure Annotation, AContainer(..), ACon...
null
https://raw.githubusercontent.com/DaMSL/K3/51749157844e76ae79dba619116fc5ad9d685643/src/Language/K3/Core/Annotation.hs
haskell
# LANGUAGE DeriveDataTypeable # * Basic Infrastructure | Every tag type defines the set of annotations that can be associated with that tag. | An annotation container is a generic container which supports a standard set of operations that one might want to perform on a set of annotations. There is, however, nothing...
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # | The K3 Annotation System . module Language.K3.Core.Annotation ( Annotation, AContainer(..), AConstruct(..), * K3 Instantiations (:@:)(..), K3, tre...
9005b255a2f77ad761f3978814d83b7c851576e1afc92c7f848e229c6850b177
abyala/advent-2021-clojure
day17_test.clj
(ns advent-2021-clojure.day17-test (:require [clojure.test :refer :all] [advent-2021-clojure.day17 :refer :all])) (def test-input "target area: x=20..30, y=-10..-5") (def puzzle-input "target area: x=70..125, y=-159..-121") (deftest progress-test (let [target [10 20, -15 -5]] (are [expected point]...
null
https://raw.githubusercontent.com/abyala/advent-2021-clojure/d7fec45275bcdd41861488535eac523f4a225da7/test/advent_2021_clojure/day17_test.clj
clojure
(ns advent-2021-clojure.day17-test (:require [clojure.test :refer :all] [advent-2021-clojure.day17 :refer :all])) (def test-input "target area: x=20..30, y=-10..-5") (def puzzle-input "target area: x=70..125, y=-159..-121") (deftest progress-test (let [target [10 20, -15 -5]] (are [expected point]...
9d2e3b2cedd755032041dc484e925f013f97a9036adaf39eea94f0a6535f6aa3
atolab/zenoh
discovery.ml
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * -2.0 , or the Apache License , Version 2.0 * which is available at -2.0 . * * SPDX - License - Ident...
null
https://raw.githubusercontent.com/atolab/zenoh/32e311aae6be93c001fd725b4d918b2fb4e9713d/src/zenoh-router/discovery.ml
ocaml
======================== ======== ===========================
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * -2.0 , or the Apache License , Version 2.0 * which is available at -2.0 . * * SPDX - License - Ident...
d139658ab177c65e58b012768d0688e7e3c2a827dd01e1bc636f2534d143dbe6
morpheusgraphql/morpheus-graphql
Scalars.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE NamedFieldPuns # # LANGUAGE TypeFamilies # module Feature.Input.Scalars ( api, ) where import Data.Morpheus.Server (interpreter) import Data.Morpheus.Server.Types ( GQLRequest, GQLResponse, GQLType, RootResolver (..), Undefine...
null
https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/0d7ec120df4ea3b1e030f64ed9820a8a66de7d6a/morpheus-graphql-server/test/Feature/Input/Scalars.hs
haskell
# LANGUAGE DeriveAnyClass # types & args query resolver
# LANGUAGE DeriveGeneric # # LANGUAGE NamedFieldPuns # # LANGUAGE TypeFamilies # module Feature.Input.Scalars ( api, ) where import Data.Morpheus.Server (interpreter) import Data.Morpheus.Server.Types ( GQLRequest, GQLResponse, GQLType, RootResolver (..), Undefined, defaultRootResolver, ) ...
2aaa89a2a4c9b831e5eba4a428de18f25530409adcdb02b53d891162102501d5
elaforge/karya
ShakeConfig.hs
-- | Local build config. This is re-exported by Local, courtesy of -- tools/setup-* module User.Elaforge.ShakeConfig where import qualified Shake.C as C import Shake.Config localConfig :: Config localConfig = defaultConfig { enableEkg = False , useCabalV2 = True , enableEventLog = True -- ...
null
https://raw.githubusercontent.com/elaforge/karya/b4a5700868f4409c8d4f246bf93a31fc81662341/User/Elaforge/ShakeConfig.hs
haskell
| Local build config. This is re-exported by Local, courtesy of tools/setup-* , extraDefines = ["-DHACKED_FLTK"] TODO: normally this would come out of NIX_CFLAGS and NIX_LDFLAGS, but I haven't migrated to consistently using tools/nix-enter yet.
module User.Elaforge.ShakeConfig where import qualified Shake.C as C import Shake.Config localConfig :: Config localConfig = defaultConfig { enableEkg = False , useCabalV2 = True , enableEventLog = True , fltkConfig = "/usr/local/src/fltk/fltk-config" , libsamplerate = C.ExternalLibrary...
89565b30a1ab786a8a6dd94cce39887b8f2ef48f82e07c69f90473a0b3930013
uwplse/rake
polymorphic.rkt
#lang racket (require "term.rkt" "union.rkt" "bool.rkt") (provide ite ite* ⊢ guarded guarded-test guarded-value =? generic-merge generic-merge* T*->T T*->boolean? sort/expression simplify*) ; A generic typing procedure for a lifted operator that takes N > 0 arguments of type T and returns a value of typ...
null
https://raw.githubusercontent.com/uwplse/rake/0fb9b46ae8ac64f95a4c0e89060ffdb043229a5b/rosette/rosette/base/core/polymorphic.rkt
racket
A generic typing procedure for a lifted operator that takes N > 0 arguments of type T Polymorphic operators and procedures that are shared by multiple primitive types. primitive type T. That is, (type-of v1 v2) = T for some pritimive type T. This operator is intended only for internal use and should not be ca...
#lang racket (require "term.rkt" "union.rkt" "bool.rkt") (provide ite ite* ⊢ guarded guarded-test guarded-value =? generic-merge generic-merge* T*->T T*->boolean? sort/expression simplify*) and returns a value of type T. Specifically , it assumes that at least one value passed to it is typed , and it ...
83e8e172022d18542ac6ba2fddf74b9ec18f404fb6b992162121ee41192a4c20
htm-community/comportex
repl.cljc
(ns org.nfrac.comportex.repl "Optional REPL tweaks" #?(:clj (:require [clojure.pprint :as pprint] [org.nfrac.comportex.layer] [org.nfrac.comportex.synapses]) :cljs (:require [org.nfrac.comportex.layer :refer [LayerOfCells LayerActiveState LayerDista...
null
https://raw.githubusercontent.com/htm-community/comportex/cd318492cf2e43cb7f25238b116b90b8195ec5aa/src/org/nfrac/comportex/repl.cljc
clojure
(ns org.nfrac.comportex.repl "Optional REPL tweaks" #?(:clj (:require [clojure.pprint :as pprint] [org.nfrac.comportex.layer] [org.nfrac.comportex.synapses]) :cljs (:require [org.nfrac.comportex.layer :refer [LayerOfCells LayerActiveState LayerDista...
887ecaf2667466ec726e5e748b85e79a6707f98b87a645d000f83dd23a111786
dyne/social-wallet-api
api_key.clj
Social Wallet REST API Copyright ( C ) 2018- Dyne.org foundation designed , written and maintained by < > This file is part of Social Wallet REST API . Social Wallet REST API is free software ; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as publi...
null
https://raw.githubusercontent.com/dyne/social-wallet-api/72cc18989382297e1315a0ab4aac50b9882aa374/test/social_wallet_api/test/api_key.clj
clojure
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 , or ( at your option ) any later version . without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See th...
Social Wallet REST API Copyright ( C ) 2018- Dyne.org foundation designed , written and maintained by < > This file is part of Social Wallet REST API . You should have received a copy of the GNU Affero General Public License along with this program . If not , see < / > . Additional permission u...
441d77d8cc880eccf65c0ac84f1a72b806d082231aeae05662fbe5cc022b153a
raaz-crypto/raaz
ByteString.hs
-- | -- -- Module : Raaz.Core.Util.ByteString Copyright : ( c ) , 2019 -- License : Apache-2.0 OR BSD-3-Clause -- Maintainer : Piyush P Kurur <> -- Stability : experimental -- # LANGUAGE FlexibleContexts # module Raaz.Core.Util.ByteString ( length, replicate , create, createFrom ...
null
https://raw.githubusercontent.com/raaz-crypto/raaz/1d17ead6d33c5441a59dbc4ff33197e2bd6eb6ec/core/Raaz/Core/Util/ByteString.hs
haskell
| Module : Raaz.Core.Util.ByteString License : Apache-2.0 OR BSD-3-Clause Maintainer : Piyush P Kurur <> Stability : experimental | A type safe version of replicate | Copy the bytestring to the crypto buffer. This operation leads to undefined behaviour if the crypto pointer points to an area small...
Copyright : ( c ) , 2019 # LANGUAGE FlexibleContexts # module Raaz.Core.Util.ByteString ( length, replicate , create, createFrom , withByteString , unsafeCopyToPointer , unsafeNCopyToPointer ) where import Prelude hiding (length, replicate) import...
726babb7eab91f216b969a9389521a07d09f5c7e0840507c0fe7ecc1cadff4e2
clash-lang/clash-compiler
NestedPrimitives.hs
module NestedPrimitives where import Clash.Prelude topEntity :: Vec 3 (Signed 16) topEntity = map resize o where o :: Vec 3 (Signed 32) o = replicate d3 (bit 31)
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/Basic/NestedPrimitives.hs
haskell
module NestedPrimitives where import Clash.Prelude topEntity :: Vec 3 (Signed 16) topEntity = map resize o where o :: Vec 3 (Signed 32) o = replicate d3 (bit 31)
7bbded9d1fd15211c492a05784541ec07b6d6a38b6c34cd5940ed4ddb4826c85
stefandevai/litterae
unit.lisp
;;;; ========================================================================================== ;;;; ;;;; unit.lisp ;;;; ;;;; ========================================================================================== ;;;; (in-package #:li...
null
https://raw.githubusercontent.com/stefandevai/litterae/cf85196d83963f934073bdb9edffb4a798016ae2/tests/unit.lisp
lisp
========================================================================================== ;;;; unit.lisp ;;;; ========================================================================================== ;;;;
(in-package #:litterae/tests) (defun alphabetical-list? (lst) "Returns t if strings in lst are in alphabetical order, otherwise returns nil." (let ((string-list (mapcar (lambda (e) (string (docparser:node-name e))) lst))) (every #'string-lessp string-list (cdr string-list)))) (defparameter *docparser-package...
90317ba610930298fc28d81a4cdbea3bdec81dcc804073b3f88635a5cf0001da
tschady/advent-of-code
coll_util.clj
(ns aoc.coll-util (:require clojure.set)) (defn idx-of-max "Return the index of the maximum value of the collection." [coll] (->> coll (map-indexed vector) (apply max-key second) first)) (defn submap? "Returns true if `m1` is a proper subset of `m2`, else false." [m1 m2] (clojure.se...
null
https://raw.githubusercontent.com/tschady/advent-of-code/4928cfac176a76292ae8c5823205dc6cb028200e/src/aoc/coll_util.clj
clojure
(ns aoc.coll-util (:require clojure.set)) (defn idx-of-max "Return the index of the maximum value of the collection." [coll] (->> coll (map-indexed vector) (apply max-key second) first)) (defn submap? "Returns true if `m1` is a proper subset of `m2`, else false." [m1 m2] (clojure.se...
23c61e743c4d17b9e71e2985326cf51fdf7f7d98dce82e74e9b149c6d39d256f
input-output-hk/project-icarus-importer
PingPong.hs
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} # LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecursiveDo #-} {-# LANGUAGE ScopedTy...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/networking/examples/PingPong.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveGeneric # # LANGUAGE RankNTypes # # LANGUAGE RecursiveDo # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # | Type for messages from the workers to the listeners. | Type for messages from the listeners to the workers...
# LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Main where import Control.Concurrent.Async (forConcurrently) import Control....
ac0dc631a801cea73cd58d466dc9195c13b0ecf057034ffcb68368c050d078a5
anwarmamat/cmsc330fall19public
eval.mli
exception TypeError of string exception DeclareError of string exception DivByZeroError open SmallCTypes val get_funcs: unit -> (string * func_def) list val reset_funcs: unit -> unit val eval_expr : environment -> expr -> value val eval_stmt : environment -> stmt -> environment val assoc_opt: string -> environment -...
null
https://raw.githubusercontent.com/anwarmamat/cmsc330fall19public/e3156c0438a4ccc78793a94cd62fe19d01688c0b/project5/src/eval.mli
ocaml
exception TypeError of string exception DeclareError of string exception DivByZeroError open SmallCTypes val get_funcs: unit -> (string * func_def) list val reset_funcs: unit -> unit val eval_expr : environment -> expr -> value val eval_stmt : environment -> stmt -> environment val assoc_opt: string -> environment -...
87dde48003440f96277d9642be248edd6a25c15341767c9c748b376a725d32a2
dradtke/Lisp-Text-Editor
cairo.lisp
(in-package #:cl-gtk2-cairo) (defcfun gdk-cairo-create :pointer (drawable (g-object drawable))) (defclass gdk-context (cl-cairo2:context) ()) (defun create-gdk-context (gdk-drawable) "creates an context to draw on a GTK widget, more precisely on the associated gdk-window. This should o...
null
https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/cl-gtk2/cairo/cairo.lisp
lisp
(in-package #:cl-gtk2-cairo) (defcfun gdk-cairo-create :pointer (drawable (g-object drawable))) (defclass gdk-context (cl-cairo2:context) ()) (defun create-gdk-context (gdk-drawable) "creates an context to draw on a GTK widget, more precisely on the associated gdk-window. This should o...
aa4c3795faa779fe3840c3e6892b49bce68a4ce74e8712cfe783211bdd67d6b1
zcaudate/hara
shadow.clj
(ns hara.io.project.shadow (:require [hara.io.file :as fs] [hara.io.project.common :as common])) (def ^:dynamic *shadow-file* "shadow-cljs.edn") (defn project "opens a shadow.edn file as the project (project \"../yin/shadow-cljs.edn\")" {:added "3.0"} ([] (project *shadow-file*)) ([shadow-f...
null
https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/src/hara/io/project/shadow.clj
clojure
(ns hara.io.project.shadow (:require [hara.io.file :as fs] [hara.io.project.common :as common])) (def ^:dynamic *shadow-file* "shadow-cljs.edn") (defn project "opens a shadow.edn file as the project (project \"../yin/shadow-cljs.edn\")" {:added "3.0"} ([] (project *shadow-file*)) ([shadow-f...
1e89b113a6f6d4d77b8ef404950c9b6e37a33992dff9ad631f9a805aa970cc3d
clojure-interop/google-cloud-clients
core.clj
(ns com.google.cloud.resourcemanager.core (:refer-clojure :only [require comment defn ->]) (:import )) (require '[com.google.cloud.resourcemanager.Project$Builder]) (require '[com.google.cloud.resourcemanager.Project]) (require '[com.google.cloud.resourcemanager.ProjectInfo$Builder]) (require '[com.google.cloud.re...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.resourcemanager/src/com/google/cloud/resourcemanager/core.clj
clojure
(ns com.google.cloud.resourcemanager.core (:refer-clojure :only [require comment defn ->]) (:import )) (require '[com.google.cloud.resourcemanager.Project$Builder]) (require '[com.google.cloud.resourcemanager.Project]) (require '[com.google.cloud.resourcemanager.ProjectInfo$Builder]) (require '[com.google.cloud.re...
7b95a4228960ae50874d7a9fd880706df8a45db353836541ac87735a178810ba
clash-lang/clash-compiler
T1796.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE TypeApplications # module T1796 where import Clash.Prelude import Clash.Explicit.Testbench topEntity :: Signal System Bool -> Signal System Bool topEntity = id {-# NOINLINE topEntity #-} tb :: Signal System Bool tb = done where testInput = stimuliGenerator clk ...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/1afe0084b16a0674fb58379d3d44585ff2b47720/tests/shouldwork/LoadModules/T1796.hs
haskell
# NOINLINE topEntity #
# LANGUAGE NoImplicitPrelude # # LANGUAGE TypeApplications # module T1796 where import Clash.Prelude import Clash.Explicit.Testbench topEntity :: Signal System Bool -> Signal System Bool topEntity = id tb :: Signal System Bool tb = done where testInput = stimuliGenerator clk rst (singleton True) ex...
0a8569033f5d388932cb04a85c1fde220cfd6e4ad995e44122183ff719b824fa
opencog/miner
2-conjunct.scm
;; Load the miner module (use-modules (opencog) (opencog miner)) ;; (use-modules (opencog logger)) ;; (cog-logger-set-level! (cog-ure-logger) "debug") ;; (cog-logger-set-level! "debug") ;; Setup the KB (define AB (Inheritance (Concept "A") (Concept "B"))) (define BC (Inheritance (Concept "B") (Co...
null
https://raw.githubusercontent.com/opencog/miner/aa8d2610eaccdb13fbb9efa7530cc2d6b65d3591/examples/miner/2-conjunct/2-conjunct.scm
scheme
Load the miner module (use-modules (opencog logger)) (cog-logger-set-level! (cog-ure-logger) "debug") (cog-logger-set-level! "debug") Setup the KB Expect to learn, among others, the following pattern (Lambda (Variable "$X") (Variable "$Y") (Variable "$Z")) (Present (Inheritance (V...
(use-modules (opencog) (opencog miner)) (define AB (Inheritance (Concept "A") (Concept "B"))) (define BC (Inheritance (Concept "B") (Concept "C"))) (define DE (Inheritance (Concept "D") (Concept "E"))) (define EF (Inheritance (Concept "E") (Concept "F"))) Call the pattern miner with a ...
7e0c944457df7d6771f2d7bc514a9b1f7bced10b627bc5ba89a16393e3c8c277
finnishtransportagency/harja
integraatioloki.clj
(ns harja.palvelin.palvelut.integraatioloki (:require [com.stuartsierra.component :as component] [taoensso.timbre :as log] [harja.palvelin.komponentit.http-palvelin :refer [julkaise-palvelu poista-palvelu]] [harja.kyselyt.integraatioloki :as q] [harja.kyselyt.konversio ...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/84721173a49bdfb4efafe2753d59137e5e010d2a/src/clj/harja/palvelin/palvelut/integraatioloki.clj
clojure
(ns harja.palvelin.palvelut.integraatioloki (:require [com.stuartsierra.component :as component] [taoensso.timbre :as log] [harja.palvelin.komponentit.http-palvelin :refer [julkaise-palvelu poista-palvelu]] [harja.kyselyt.integraatioloki :as q] [harja.kyselyt.konversio ...
570bdee56a971abb58addf92d2d2eb2f717abfa752b1ae76ac99d750924cc5cd
Factual/eliza
core.clj
(ns eliza.core (:require [eliza.register :refer [responders]] [eliza.responder.nonsense] [eliza.responder.sleeper] [eliza.responder.bored] [eliza.responder.reflector] [eliza.responder.delegator] [eliza.history :refer [add-to-history!]] ...
null
https://raw.githubusercontent.com/Factual/eliza/2b87c362322ceb9f2cf53f2866763e9c65d98a26/src/eliza/core.clj
clojure
(ns eliza.core (:require [eliza.register :refer [responders]] [eliza.responder.nonsense] [eliza.responder.sleeper] [eliza.responder.bored] [eliza.responder.reflector] [eliza.responder.delegator] [eliza.history :refer [add-to-history!]] ...
da8394bd29b414fa8603c9b0fbd36088a62114d72f01527dd1b7bcb4857ed8a5
GregoryTravis/rhythmr
Constants.hs
module Constants where bpm :: Int bpm = 96 meter :: Int meter = 4 toLoopLengthSeconds :: Int -> Double toLoopLengthSeconds bpm = (60.0 / fromIntegral bpm) * (fromIntegral meter) loopLengthSeconds :: Double loopLengthSeconds = toLoopLengthSeconds bpm standardSR :: Int standardSR = 44100 timeToFrame :: Float -> Int...
null
https://raw.githubusercontent.com/GregoryTravis/rhythmr/56210807e987ddd08f8bd2ba7c35564e991fec1f/src/Constants.hs
haskell
module Constants where bpm :: Int bpm = 96 meter :: Int meter = 4 toLoopLengthSeconds :: Int -> Double toLoopLengthSeconds bpm = (60.0 / fromIntegral bpm) * (fromIntegral meter) loopLengthSeconds :: Double loopLengthSeconds = toLoopLengthSeconds bpm standardSR :: Int standardSR = 44100 timeToFrame :: Float -> Int...
396bbdbcccbfea7577ae31c76602fb2c2c26f894f7bcbc309201f6c20f80f060
metabase/metabase
embed.clj
(ns metabase.api.embed "Various endpoints that use [JSON web tokens](/) to fetch Cards and Dashboards. The endpoints are the same as the ones in `api/public/`, and differ only in the way they are authorized. To use these endpoints: 1. Set the `embedding-secret-key` Setting to a hexadecimal-encoded 32-byt...
null
https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/src/metabase/api/embed.clj
clojure
------------------------------------------------- Param Checking ------------------------------------------------- disabled means a param is not allowed to be specified by either token or user TODO - maybe make this log/debug once embedding is wrapped up ok, everything checks out, now return the merged params map ...
(ns metabase.api.embed "Various endpoints that use [JSON web tokens](/) to fetch Cards and Dashboards. The endpoints are the same as the ones in `api/public/`, and differ only in the way they are authorized. To use these endpoints: 1. Set the `embedding-secret-key` Setting to a hexadecimal-encoded 32-byt...
9d6cbbf0719eb25844626691841f04874aba0be930d33c7c6eecfb9f50abcc4e
soranoba/erlup
erlup_state.erl
2016 All Rights Reserved . %% %% @doc erlup configure. -module(erlup_state). %%---------------------------------------------------------------------------------------------------------------------- %% Exported API %%--------------------------------------------------------------------------------------------------...
null
https://raw.githubusercontent.com/soranoba/erlup/c7d785eb8222b9f38d94b911c84a06b398b43f0f/src/erlup_state.erl
erlang
@doc erlup configure. ---------------------------------------------------------------------------------------------------------------------- Exported API ---------------------------------------------------------------------------------------------------------------------- --------------------------------------------...
2016 All Rights Reserved . -module(erlup_state). -export([ new/1, applies/2, mod_deps/1, extra/2, set_sedargs/3, get/2, get/3, put/3 ]). -export_type([ t/0 ]). Macros and Types -record(?MODULE, ...
e07687d4f36711a0a78a67df9cb3c1892a649b84876317e2755014e78e4a80f7
wireless-net/erlang-nommu
ex_canvas.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2009 - 2013 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/examples/demo/ex_canvas.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2009 - 2013 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(ex_canvas). -behaviour(wx_object)...
a1435178b72c4d200d5eafc0717602c1ea25cdfff81933661cc8c7dbf3d7b9e2
onedata/op-worker
qos_status_test_SUITE.erl
%%%------------------------------------------------------------------- @author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%------------------------------------------------------------------- %%% @doc This module contains tests of QoS st...
null
https://raw.githubusercontent.com/onedata/op-worker/1a720e5aa55aa02963e188c6bf06714e2eb755cc/test_distributed/suites/qos/qos_status_test_SUITE.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- =================================================================== Tests =======================...
@author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . This module contains tests of QoS status . -module(qos_status_test_SUITE). -author("Michal Stanisz"). -include("qos_tests_utils.hrl"). -include("onenv_test_utils.hrl"). -include_lib("ctool/includ...
a6895744a8531dc9207cd420f98617b9c0f810b680eb296c34be74edcb8db131
jeffshrager/biobike
test-utils.lisp
-*- Package : test - mechanism ; mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*- (in-package :test-mechanism) ;;; +=========================================================================+ | copyright ( c ) 2005 jp massar , , , | ;;; | ...
null
https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Testing/test-utils.lisp
lisp
mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*- +=========================================================================+ | | | permission is hereby granted, free of charge, to any person obtaining | | a copy of this software and as...
(in-package :test-mechanism) | copyright ( c ) 2005 jp massar , , , | #-:allegro (defmacro without-redefinition-warnings (&rest body) `(progn ,@body)) #+:allegro (defmacro without-redefinition-warnings (&rest body) `(excl::without-redefinition-warnings ,@body)) (defun keywordize (string) #+:web...
2fe4613fb5d95c3476eeeadd892f941d78619ddaca3a82a5134752f446ebc2b5
Clozure/ccl-tests
getf.lsp
;-*- Mode: Lisp -*- Author : Created : Sun Apr 20 07:37:41 2003 ;;;; Contains: Tests of GETF (in-package :cl-test) (compile-and-load "cons-aux.lsp") (deftest getf.1 (getf nil 'a) nil) (deftest getf.2 (getf nil 'a 'b) b) (deftest getf.3 (getf '(a b) 'a) b) (deftest getf.4 (getf '(a b) ...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/getf.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of GETF Must check that only a, b, c have properties Must check that only a, b have properties Must check that only a, b, c have properties Must check that only a, b have properties Must check that only a, b have properties Must check that only a, b, c have properties Must...
Author : Created : Sun Apr 20 07:37:41 2003 (in-package :cl-test) (compile-and-load "cons-aux.lsp") (deftest getf.1 (getf nil 'a) nil) (deftest getf.2 (getf nil 'a 'b) b) (deftest getf.3 (getf '(a b) 'a) b) (deftest getf.4 (getf '(a b) 'a 'c) b) (deftest getf.5 (let ((x 0)) (valu...
8e07b0ca63dbda81e5bef86c20f6338944ac165965ba04bec282398301474750
google/lisp-koans
basic-macros.lisp
Copyright 2013 Google Inc. ;;; 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 distrib...
null
https://raw.githubusercontent.com/google/lisp-koans/43158d8c0eca7e36857dfe8bb49f81881038a78d/koans/basic-macros.lisp
lisp
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 2013 Google Inc. distributed under the License is distributed on an " AS IS " BASIS , (define-test setf (let ((a 10) (b (list 1 20 30 40 50)) We use COPY - SEQ to create a copy of a string , because using SETF to (c (copy-seq "I am Tom."))) (setf a 1000) (assert-equal ____ a) ...
26547b606700a9425beac960b8398477dc2f8065ae553daac9f8effe10fec069
bcc32/advent-of-code
b.ml
open! Core open! Async open! Import let main () = let%bind carts = Carts.read () in with_return (fun { return } -> while true do Carts.tick carts ~on_collision:(fun ~row:_ ~col:_ -> ()); match Carts.lone_ranger carts with | None -> () | Some (row, col) -> printf "%d,%d\n" col ro...
null
https://raw.githubusercontent.com/bcc32/advent-of-code/86a9387c3d6be2afe07d2657a0607749217b1b77/2018/13/b.ml
ocaml
open! Core open! Async open! Import let main () = let%bind carts = Carts.read () in with_return (fun { return } -> while true do Carts.tick carts ~on_collision:(fun ~row:_ ~col:_ -> ()); match Carts.lone_ranger carts with | None -> () | Some (row, col) -> printf "%d,%d\n" col ro...
8f904392e65b093d7da7a1eea2957129f086221d55bf71c42dd4e9b5bc8be049
Kappa-Dev/KappaTools
compression_main.ml
* * compression_main.ml * * Creation : < 2011 - 10 - 19 16:52:55 > * Last modification : Time - stamp : < 2016 - 06 - 10 > * * Causal flow compression : a module for * , projet Antique , INRIA Paris - Rocquencourt * , Université Paris - Diderot , CNRS * ...
null
https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/cflow/compression_main.ml
ocaml
let called_from = Remanent_parameters_sig.Server in causal compression without any simplification (just partial order compression) this is very costly, and mainly for teaching purpose We use the grid to get the causal precedence (pred* ) of each observable Now causal compression, with detection of siphons & detec...
* * compression_main.ml * * Creation : < 2011 - 10 - 19 16:52:55 > * Last modification : Time - stamp : < 2016 - 06 - 10 > * * Causal flow compression : a module for * , projet Antique , INRIA Paris - Rocquencourt * , Université Paris - Diderot , CNRS * ...
3ef81d6b7a269512b60cbb4806e483760b51cf1b2446b6690139bf960a63ed36
xapi-project/xen-api-libs
nbd_lwt.mli
val global_id : int64 ref val global_mutex : Lwt_mutex.t val get_id : unit -> int64 Lwt.t val really_read_string : Lwt_unix.file_descr -> int -> string Lwt.t val bitstring_of_file_descr_max : Lwt_unix.file_descr -> int -> Bitstring.bitstring Lwt.t module NbdRpc : sig type transport = Lwt_unix.file_descr typ...
null
https://raw.githubusercontent.com/xapi-project/xen-api-libs/d603ee2b8456bc2aac99b0a4955f083e22f4f314/nbd/nbd_lwt.mli
ocaml
val global_id : int64 ref val global_mutex : Lwt_mutex.t val get_id : unit -> int64 Lwt.t val really_read_string : Lwt_unix.file_descr -> int -> string Lwt.t val bitstring_of_file_descr_max : Lwt_unix.file_descr -> int -> Bitstring.bitstring Lwt.t module NbdRpc : sig type transport = Lwt_unix.file_descr typ...
949d7220424db5f4cd3240e74bb3d0f84250784baf39057987057115248d0e0e
juspay/atlas
Types.hs
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # | Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by app...
null
https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/app-backend/src/ExternalAPI/Types.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # | Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by app...
843c555161ddd96c8402dd70f04835d8003162610d0129fd5e81fc77b4def802
uw-unsat/serval
and.rkt
#lang racket/base (require "lib.rkt") (define tests (x86-suite "AND" and-eax-imm32 and-rax-imm32 and-r/m32-imm32 and-r/m64-imm32 and-r/m32-imm8 and-r/m64-imm8 and-r/m32-r32 and-r/m64-r64 and-r32-r/m32 and-r64-r/m64 )) (module+ test (time (run-tests tests)))
null
https://raw.githubusercontent.com/uw-unsat/serval/be11ecccf03f81b8bd0557acf8385a6a5d4f51ed/test/x86/and.rkt
racket
#lang racket/base (require "lib.rkt") (define tests (x86-suite "AND" and-eax-imm32 and-rax-imm32 and-r/m32-imm32 and-r/m64-imm32 and-r/m32-imm8 and-r/m64-imm8 and-r/m32-r32 and-r/m64-r64 and-r32-r/m32 and-r64-r/m64 )) (module+ test (time (run-tests tests)))
551362a8ed178606379d2d7b4d650ceac0bbb5752faf8853ba7a40074ac4d48d
clojure-interop/aws-api
AbstractAWSMediaConvertAsync.clj
(ns com.amazonaws.services.mediaconvert.AbstractAWSMediaConvertAsync "Abstract implementation of AWSMediaConvertAsync. Convenient method forms pass through to the corresponding overload that takes a request object and an AsyncHandler, which throws an UnsupportedOperationException." (:refer-clojure :only [requir...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.mediaconvert/src/com/amazonaws/services/mediaconvert/AbstractAWSMediaConvertAsync.clj
clojure
(ns com.amazonaws.services.mediaconvert.AbstractAWSMediaConvertAsync "Abstract implementation of AWSMediaConvertAsync. Convenient method forms pass through to the corresponding overload that takes a request object and an AsyncHandler, which throws an UnsupportedOperationException." (:refer-clojure :only [requir...
ce525376245cb5e7db6fc22ea4e93fbbfcb210852dd1d8fb1787795c1bcc5a63
ocaml-flambda/flambda-backend
downwards_env.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/089504f86099bbf7402cbffeeb5e5295eae6d5f6/middle_end/flambda2/simplify/env/downwards_env.ml
ocaml
************************************************************************ OCaml ...
, OCamlPro and , Copyright 2014 - -2020 Jane Street Group LLC the GNU Lesser General Public License version 2.1 , with the open! Flambda.Import module CSE = Common_subexpression_elimination m...
212853f5eae62d2ec5c3ee23e967967814b53702080ac6f5791e9d13f22a0a33
ku-fpg/sunroof-compiler
String.hs
# LANGUAGE TypeFamilies # # LANGUAGE FlexibleInstances # # OPTIONS_GHC -fno - warn - orphans # -- | Strings in Javascript. module Language.Sunroof.JS.String ( JSString , string ) where import Data.Boolean ( BooleanOf, IfB(..), EqB(..) ) import Data.Semigroup ( Semigroup(..) ) import Data.Char ( isAscii, isCont...
null
https://raw.githubusercontent.com/ku-fpg/sunroof-compiler/5d8edafea515c4c2b4e7631799f35d8df977e289/Language/Sunroof/JS/String.hs
haskell
| Strings in Javascript. ------------------------------------------------------------- ------------------------------------------------------------- | Javascript string type. | Show the Javascript. | Semigroup under concatination. | Monoid under concatination and empty string. | Value equality. ---------------...
# LANGUAGE TypeFamilies # # LANGUAGE FlexibleInstances # # OPTIONS_GHC -fno - warn - orphans # module Language.Sunroof.JS.String ( JSString , string ) where import Data.Boolean ( BooleanOf, IfB(..), EqB(..) ) import Data.Semigroup ( Semigroup(..) ) import Data.Char ( isAscii, isControl, ord ) import Data.Strin...
7fb5187af83d7a468ffcbd166ebf1c2681214c2b19de08bb63588dc3b82945d5
scheme-live/live
live.gauche.scm
(define (adler32-accumulator) (let ((sum 1)) (lambda (bytevector) (unless (eof-object? bytevector) Gauche 's adler32 also takes strings , not only bytevectors . ;; What are the semantics -- does it use a predictable ;; character encoding? (typecheck-bytevector adler32-accumulator b...
null
https://raw.githubusercontent.com/scheme-live/live/4c7c9d80f2fcf80692614e10935fa66be69e3708/live/hash/adler32/live.gauche.scm
scheme
What are the semantics -- does it use a predictable character encoding?
(define (adler32-accumulator) (let ((sum 1)) (lambda (bytevector) (unless (eof-object? bytevector) Gauche 's adler32 also takes strings , not only bytevectors . (typecheck-bytevector adler32-accumulator bytevector) (set! sum (gauche-adler32 bytevector sum))) sum))) (define (adler32-...
85748030d6d536651a95fc64d5730c33ee52d6ce17736706d1d609768443e975
martijnbastiaan/doctest-parallel
Foo.hs
module Foo ( foo , bar ) where -- $foo named chunk foo -- $bar -- named chunk bar foo :: Int foo = 23 bar :: Int bar = 23
null
https://raw.githubusercontent.com/martijnbastiaan/doctest-parallel/f70d6a1c946cc0ada88571b90a39a7cd4d065452/test/extract/named-chunks/Foo.hs
haskell
$foo named chunk foo $bar named chunk bar
module Foo ( foo , bar ) where foo :: Int foo = 23 bar :: Int bar = 23
d99b4754688dfc3ec2249b5208abd264456f91f0e60128b34d5a7495cd3b2645
polymeris/cljs-aws
organizations.cljs
(ns cljs-aws.organizations (:require [cljs-aws.base.requests]) (:require-macros [cljs-aws.base.service :refer [defservice]])) (defservice "Organizations" "organizations-2016-11-28.min.json")
null
https://raw.githubusercontent.com/polymeris/cljs-aws/3326e7c4db4dfc36dcb80770610c14c8a7fd0d66/src/cljs_aws/organizations.cljs
clojure
(ns cljs-aws.organizations (:require [cljs-aws.base.requests]) (:require-macros [cljs-aws.base.service :refer [defservice]])) (defservice "Organizations" "organizations-2016-11-28.min.json")
789a9156d897b36bf7824ff2845767ffcf1b256688dcc0a64f0b3b323167554b
glguy/5puzzle
Coord.hs
module Coord ( -- * Coordinates Coord(C), up, down, left, right, origin , cardinalNeighbors , addCoord ) where data Coord = C !Int !Int deriving (Read, Show, Ord, Eq) up, down, left, right :: Coord -> Coord up (C x y) = C x (y-1) down (C x y) = C x (y+1) left (C x y) = C (x-1) y right (C x y) = C...
null
https://raw.githubusercontent.com/glguy/5puzzle/4d86cf9fad3ec3f70c57a167417adea6a3f9f30b/src/Coord.hs
haskell
* Coordinates
module Coord ( Coord(C), up, down, left, right, origin , cardinalNeighbors , addCoord ) where data Coord = C !Int !Int deriving (Read, Show, Ord, Eq) up, down, left, right :: Coord -> Coord up (C x y) = C x (y-1) down (C x y) = C x (y+1) left (C x y) = C (x-1) y right (C x y) = C (x+1) y origin ::...
f0ad7ce61379b506e587f3bd42781072949f629a6f14b833fc50dfc9d7a021f1
pguillebert/pravda
writer_test.clj
(ns pravda.writer-test (:require [clojure.test :refer :all] [pravda.writer :as writer] [pravda.datalog :as dlog])) (deftest writer-test (let [amap {:domain "dd" :type "ttt" :ts 687327217127 :data "sqsfqsf" :didi "ooo"} arecord (dlog/map->Datalog amap)] (writer/init...
null
https://raw.githubusercontent.com/pguillebert/pravda/e1d1db093143465cdcd48155155d17d9a45ae5fe/test/pravda/writer_test.clj
clojure
(core/close-all)
(ns pravda.writer-test (:require [clojure.test :refer :all] [pravda.writer :as writer] [pravda.datalog :as dlog])) (deftest writer-test (let [amap {:domain "dd" :type "ttt" :ts 687327217127 :data "sqsfqsf" :didi "ooo"} arecord (dlog/map->Datalog amap)] (writer/init...
e87600836e49af76c07a554ce880bfb8d874351832a061cbb792162f8f6a81e3
sebastiaanvisser/clay
Background.hs
# LANGUAGE OverloadedStrings , FlexibleInstances , GeneralizedNewtypeDeriving # OverloadedStrings , FlexibleInstances , GeneralizedNewtypeDeriving #-} module Clay.Background ( -- * Generic background property. Background (background) -- * The background-color. , backgroundColor -- * Th...
null
https://raw.githubusercontent.com/sebastiaanvisser/clay/16f55a5c6ab7fd98e39cedf852bd3400a02ac45f/src/Clay/Background.hs
haskell
* Generic background property. * The background-color. * The background-position. * The background-size. * The background-repeat. * The background-origin. * The background-clip. * The background-attachment. * The background-image. * Specifying sides. * Specifying directions and location. | We implement the ...
# LANGUAGE OverloadedStrings , FlexibleInstances , GeneralizedNewtypeDeriving # OverloadedStrings , FlexibleInstances , GeneralizedNewtypeDeriving #-} module Clay.Background ( Background (background) , backgroundColor , BackgroundPosition , backgroundPosition , backgroundPositions , p...
b79ebe7477375c1f88a93ea07b6770c056216c069a877110836ba04d7b6657ce
Smoltbob/Caml-Est-Belle
fid.ml
type t = string (* type l = string (* type for label *)*) let to_string x = x let genid = let counter = ref (-1) in fun () -> incr counter; Printf.sprintf "?v%d" !counter (* let genlabel = let counter = ref (-1) in fun () -> incr counter; Printf.sprintf "?v%d" !counter *)
null
https://raw.githubusercontent.com/Smoltbob/Caml-Est-Belle/3d6f53d4e8e01bbae57a0a402b7c0f02f4ed767c/compiler/fid.ml
ocaml
type l = string (* type for label let genlabel = let counter = ref (-1) in fun () -> incr counter; Printf.sprintf "?v%d" !counter
type t = string let to_string x = x let genid = let counter = ref (-1) in fun () -> incr counter; Printf.sprintf "?v%d" !counter
844979958904aa8d02f47a6d51293bff65cc53554b52aaf777a40c8cefa6a50d
ggreif/omega
finally-datatype.hs
# LANGUAGE DataKinds , KindSignatures , TypeOperators , PolyKinds , RecursiveDo , RankNTypes , FlexibleInstances # , PolyKinds, RecursiveDo, RankNTypes , FlexibleInstances #-} -- This is just a small playground which will (hopefully) be absorbed -- in finally-predicative...
null
https://raw.githubusercontent.com/ggreif/omega/016a3b48313ec2c68e8d8ad60147015bc38f2767/mosaic/finally-datatype.hs
haskell
This is just a small playground which will (hopefully) be absorbed in finally-predicative.hs as soon as it is sufficiently polished. Note: we could use pi-types here (or generalized lambdas), but I'd rather try to follow the "patterned type" idea. universe of patterns kind universe of types kind Morphism ...
# LANGUAGE DataKinds , KindSignatures , TypeOperators , PolyKinds , RecursiveDo , RankNTypes , FlexibleInstances # , PolyKinds, RecursiveDo, RankNTypes , FlexibleInstances #-} class Type (rep :: (Pa,Ty) -> *) where star :: rep '(C Star, Star) Morphism zero :: r...
0774c2a9904081f991fa8833c09129ecbdb435d82496fd3ccfe178bab52fae5e
facebook/infer
DotCfg.ml
* Copyright ( c ) 2009 - 2013 , Monoidics ltd . * Copyright ( c ) Facebook , Inc. and its 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) 2009-2013, Monoidics ltd. * Copyright (c) Facebook, In...
null
https://raw.githubusercontent.com/facebook/infer/4a64b54f6712f8ff51820ffca2062ca12f65a7fa/infer/src/IR/DotCfg.ml
ocaml
don't print exception edges to the exit node avoid phabricator thinking this file was generated by substituting substring with %s
* Copyright ( c ) 2009 - 2013 , Monoidics ltd . * Copyright ( c ) Facebook , Inc. and its 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) 2009-2013, Monoidics ltd. * Copyright (c) Facebook, In...
263693a9c7943159089206cc7a23bf590f27852a11c78395db3582c0dd903d05
jacquev6/General
List.ml
module OCSA = OCamlStandard.Array type 'a t = 'a list open Functions.Function1.O open Bool.O (* @feature Add a 'Small' module with the same interface but non-terminal-recursive implementations *) let empty = [] let singleton x = [x] let prepend x xs = x::xs let of_list = Functions.Function1.identity let to_list = F...
null
https://raw.githubusercontent.com/jacquev6/General/5237123668e939c0cb83aa3e1c4756473336bc7e/src/Foundations/List.ml
ocaml
@feature Add a 'Small' module with the same interface but non-terminal-recursive implementations @todo Test everything for stack overflow. Including to/of_array. @todo Remove @todo Make terminal recursive
module OCSA = OCamlStandard.Array type 'a t = 'a list open Functions.Function1.O open Bool.O let empty = [] let singleton x = [x] let prepend x xs = x::xs let of_list = Functions.Function1.identity let to_list = Functions.Function1.identity let of_array = OCSA.to_list let to_array = OCSA.of_list let is_empty = fun...
e1793db3e4dcd96720e1804f714190393ab139ee10d82682e202adc6c868e66a
magnars/cljs-styles
core_test.clj
(ns cljs-styles.core-test (:require [cljs-styles.core :as styles] [expectations :refer :all])) ;; does not touch all properties (expect {:backgroundColor "#fff"} (styles/prefix {:backgroundColor "#fff"})) ;; adds only needed prefixes (expect {:msTransition "all" :WebkitTransition "all...
null
https://raw.githubusercontent.com/magnars/cljs-styles/3173fbd6f8e6cea64ceb838e43b50a2c1a9b5f4b/test/cljs_styles/core_test.clj
clojure
does not touch all properties adds only needed prefixes doesn't mess up multiword properties optionally list what prefixes to include prefixes the transition/transform pair adds convenience `styles` macro. It passes only `:webkit`, since that's my usecase.
(ns cljs-styles.core-test (:require [cljs-styles.core :as styles] [expectations :refer :all])) (expect {:backgroundColor "#fff"} (styles/prefix {:backgroundColor "#fff"})) (expect {:msTransition "all" :WebkitTransition "all" :MozTransition "all" :transition "all"} ...
40f2b6fd05ab511b69a794fd5cb7dc4a0b96cb19ae951302001cfcdad0ed9113
dimitri/pgloader
db3-cast-rules.lisp
;;; ;;; Tools to handle MySQL data type casting rules ;;; (in-package :pgloader.source.db3) ;;; ;;; The default DB3 Type Casting Rules ;;; (defparameter *db3-default-cast-rules* `((:source (:type "C") :target (:type "text") :using pgloader.transforms::db3-trim-string) (:source (:type "N") :targe...
null
https://raw.githubusercontent.com/dimitri/pgloader/3047c9afe141763e9e7ec05b7f2a6aa97cf06801/src/sources/db3/db3-cast-rules.lisp
lisp
Tools to handle MySQL data type casting rules The default DB3 Type Casting Rules
(in-package :pgloader.source.db3) (defparameter *db3-default-cast-rules* `((:source (:type "C") :target (:type "text") :using pgloader.transforms::db3-trim-string) (:source (:type "N") :target (:type "numeric") :using pgloader.transforms::db3-numeric-to-pgsql-numeric) (:source (:type "...
767ab06db13c3e242afb73552625702c13c2e58f9151a18782b5d53837ed581f
UnixJunkie/cpmlib
TopKeeper.mli
type 'a t (** [create n] creates a ['a TopKeeper.t] that will keep up to [n] best scoring elements. [n] must be greater than 0. *) val create: int -> 'a t * [ add t score elt ] add [ elt ] with [ score ] to the top_keeper [ t ] ( if the score is good enough or if the top_keeper does n't hold enough e...
null
https://raw.githubusercontent.com/UnixJunkie/cpmlib/37e81c82448ecea6e651d05d0af892a9d7688ed8/src/TopKeeper.mli
ocaml
* [create n] creates a ['a TopKeeper.t] that will keep up to [n] best scoring elements. [n] must be greater than 0. * [high_scores_first t] retrieve the [n] best scores from [t] (with associated elements); scores are in decreasing order * [get_min_score t] return the current minimum score in [t] * [get_curr_...
type 'a t val create: int -> 'a t * [ add t score elt ] add [ elt ] with [ score ] to the top_keeper [ t ] ( if the score is good enough or if the top_keeper does n't hold enough elements yet ) (if the score is good enough or if the top_keeper doesn't hold enough elements yet) *) val add: 'a t ->...
09d8e5d3899595559ce972a597d30bdd8773e49b1e9f6172068884b005183c98
janestreet/ecaml
mode_line.ml
open! Core open! Import module Format = struct include Value.Make_subtype (struct let name = "mode-line-format" let here = [%here] let is_in_subtype _ = true end) let in_buffer = Buffer_local.Wrap.("mode-line-format" <: t) end let text = Funcall.Wrap.("format-mode-line" <: Format.t @-> retu...
null
https://raw.githubusercontent.com/janestreet/ecaml/7c16e5720ee1da04e0757cf185a074debf9088df/src/mode_line.ml
ocaml
open! Core open! Import module Format = struct include Value.Make_subtype (struct let name = "mode-line-format" let here = [%here] let is_in_subtype _ = true end) let in_buffer = Buffer_local.Wrap.("mode-line-format" <: t) end let text = Funcall.Wrap.("format-mode-line" <: Format.t @-> retu...
7757606903e64eed6f8be5daf73287d24f823b43b688cdd978f064a3e54c9091
sellout/haskerwaul
Yoneda.hs
module Haskerwaul.Embedding.Yoneda ( module Haskerwaul.Embedding.Yoneda , module Haskerwaul.Extension.Kan.Right ) where import Data.Functor.Identity (Identity) import Haskerwaul.Extension.Kan.Right -- | -- = references -- -- - [nLab](+embedding) -- - [Wikipedia]() type Yoneda c = RightKanExtension c ...
null
https://raw.githubusercontent.com/sellout/haskerwaul/cf54bd7ce5bf4f3d1fd0d9d991dc733785b66a73/src/Haskerwaul/Embedding/Yoneda.hs
haskell
| = references - [nLab](+embedding) - [Wikipedia]()
module Haskerwaul.Embedding.Yoneda ( module Haskerwaul.Embedding.Yoneda , module Haskerwaul.Extension.Kan.Right ) where import Data.Functor.Identity (Identity) import Haskerwaul.Extension.Kan.Right type Yoneda c = RightKanExtension c c Identity
648dd0fe49eaf857d4f23cce98b27b4bf9df3ef928e5370087b942dae4e98375
mirage/ocaml-git
index_pack.ml
open Rresult let ( <.> ) f g x = f (g x) let verbosef max ppf fmt = let counter = ref 0 in let mutex = Mutex.create () in fun () -> Mutex.lock mutex; Format.fprintf ppf fmt (!counter * 100 / max) !counter max; incr counter; Mutex.unlock mutex module Scheduler = Carton.Make (Fiber) open Schedule...
null
https://raw.githubusercontent.com/mirage/ocaml-git/37c9ef41944b5b19117c34eee83ca672bb63f482/bin/carton/index_pack.ml
ocaml
XXX(dinosaure): infinite loop on [Fiber] if [open_out] raises an exception.
open Rresult let ( <.> ) f g x = f (g x) let verbosef max ppf fmt = let counter = ref 0 in let mutex = Mutex.create () in fun () -> Mutex.lock mutex; Format.fprintf ppf fmt (!counter * 100 / max) !counter max; incr counter; Mutex.unlock mutex module Scheduler = Carton.Make (Fiber) open Schedule...
d2e15078b5991977e58f75285d296371d3a922f55518411c0c71d8ea444671c2
ndaniels/MRFy
HMMArby.hs
# LANGUAGE FlexibleInstances , TypeSynonymInstances # module HMMArby where import Control.Applicative import Control.Monad import qualified Data.Vector as V import qualified Data.Vector.Unboxed as U import System.Random import Test.QuickCheck import Test.QuickCheck.Arbitrary import Test.QuickCheck.Gen import Data . ...
null
https://raw.githubusercontent.com/ndaniels/MRFy/9b522d991a9bf98a6690f791dc92ad6fe675115c/HMMArby.hs
haskell
A random length is used here to essentially guarantee Is there a better way to do this? (Preferably without setting a maximum.) Make node numbers valid. I think that should be done in `Arbitrary (V.Vector HMMNode)`. Fix this so that only legal transitions are allowed. | Map a probability to a score possibly use...
# LANGUAGE FlexibleInstances , TypeSynonymInstances # module HMMArby where import Control.Applicative import Control.Monad import qualified Data.Vector as V import qualified Data.Vector.Unboxed as U import System.Random import Test.QuickCheck import Test.QuickCheck.Arbitrary import Test.QuickCheck.Gen import Data . ...
597177c5bf1faec718f8776edc60586485c19ebeed9d82ce171aa3f143204ee9
HaskellForCats/HaskellForCats
ch1Lists.hs
module Ch1Lists where import Data.Char import Test.QuickCheck -- keywords -- list-comprehension -- arrays -- guards -- quickCheck -- associativity -- Lists are the primary data structure in LISP like languages. Where as Arrays are the primary data collection in C derived languages like Java . examp1 = [x*x | x...
null
https://raw.githubusercontent.com/HaskellForCats/HaskellForCats/2d7a15c0cdaa262c157bbf37af6e72067bc279bc/MenaBeginning/Ch001/ch1Lists.hs
haskell
keywords -- list-comprehension -- arrays -- guards -- quickCheck -- associativity Lists are the primary data structure in LISP like languages. [1,4,9] [(1,False),(2,True),(3,False)] ----- notes ------------------------------- [x*x | x <- [1,2,3] ] is a list comprehension x <- [1,2,3] is a generator <...
module Ch1Lists where import Data.Char import Test.QuickCheck Where as Arrays are the primary data collection in C derived languages like Java . examp1 = [x*x | x <- [1,2,3] ] examp2 = [toLower c | c <- "Hello From Haskell"] " hello from " examp3 = [ (x, even x) | x <- [1,2,3] ] examp4 = [x|x <-[1..5], od...
87a5ae5fdb93e83403b19c77330fb9ef97b99955205d641c304804115adc1f07
camllight/camllight
TypeOfString.ml
(*************************************************************************) (* *) (* Projet Formel *) (* *) (* ...
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/search_isos/TypeOfString.ml
ocaml
*********************************************************************** Projet Formel CamlLi...
78150 Rocquencourt France TypeOfString.mlp Provide a parsing function that takes a string containing an ML type and returns an internal ...
000c46ea171969bcef1115ad53ceefaadb7809c5ae827c33f355b5537449c984
tisnik/clojure-examples
project.clj
; ( C ) Copyright 2016 , 2020 , 2021 ; ; All rights reserved. This program and the accompanying materials ; are made available under the terms of the Eclipse Public License v1.0 ; which accompanies this distribution, and is available at -v10.html ; ; Contributors: ; (defproject topic-constructor...
null
https://raw.githubusercontent.com/tisnik/clojure-examples/a9976a44f4cdc332bf4e0ed7d9fbbef1a4b74523/kafka-topic-constructor-10-partitions/project.clj
clojure
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at Contributors:
( C ) Copyright 2016 , 2020 , 2021 -v10.html (defproject topic-constructor "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "-2.0/"} :dependencies [[org.clojure/clojure "1.10.1"] ...
492300db8e11fb1f165ab10ef9c25f9e6b8e9a9caa5394a29282251c4a669d31
gelisam/hawk
Base.hs
| The fully - qualified HaskellExpr representation of some functions from base . module Data.HaskellExpr.Base where import Data.HaskellExpr eId :: HaskellExpr (a -> a) eId = qualified "Prelude" "id" eConst :: HaskellExpr (a -> b -> a) eConst = qualified "Prelude" "const" eFlip :: HaskellExpr ((a -> b -> c) -> b ...
null
https://raw.githubusercontent.com/gelisam/hawk/1775ab1cfea05e20d1b1a8c0a7b0fe6c4af4b7c5/src/Data/HaskellExpr/Base.hs
haskell
| The fully - qualified HaskellExpr representation of some functions from base . module Data.HaskellExpr.Base where import Data.HaskellExpr eId :: HaskellExpr (a -> a) eId = qualified "Prelude" "id" eConst :: HaskellExpr (a -> b -> a) eConst = qualified "Prelude" "const" eFlip :: HaskellExpr ((a -> b -> c) -> b ...
f8fb85133d6c0c23e3daf6d1c378434219f5e777586b01c0628f2c8721adc0ac
devinus/fresh
fresh_registry.erl
Fresh by < > -module(fresh_registry). -behavior(gen_server). -export([start/0, stop/0, handlers/0, add_handler/2, remove_handler/1, dispatch/3]). -export([init/1, handle_cast/2, handle_call/3, handle_info/2, terminate/2, code_change/3]). -include_lib("stdlib/include/qlc.hrl"). -record(handler...
null
https://raw.githubusercontent.com/devinus/fresh/fe694ef7b07b37dbeb12fcbaa762586a68a156af/src/fresh_registry.erl
erlang
Fresh by < > -module(fresh_registry). -behavior(gen_server). -export([start/0, stop/0, handlers/0, add_handler/2, remove_handler/1, dispatch/3]). -export([init/1, handle_cast/2, handle_call/3, handle_info/2, terminate/2, code_change/3]). -include_lib("stdlib/include/qlc.hrl"). -record(handler...
1c77f48120eb624ffef6c5102f3835459b32d50970a31a8122f844069b6492e1
Hakuyume/pandoc-filter-graphviz
GititPluginGraphviz.hs
module GititPluginGraphviz (plugin) where import Network.Gitit.Interface import GraphvizBlock plugin = mkPageTransformM $ liftIO . graphvizBlock (Just (Format "html"))
null
https://raw.githubusercontent.com/Hakuyume/pandoc-filter-graphviz/5e0ec28c3a9e7682e815078e41117cb4334b44e4/GititPluginGraphviz.hs
haskell
module GititPluginGraphviz (plugin) where import Network.Gitit.Interface import GraphvizBlock plugin = mkPageTransformM $ liftIO . graphvizBlock (Just (Format "html"))
5e2f61d5fa9edc92a15969a8305816066f450d50ce5c79c7b6667dc1f6bf07b2
yetanalytics/re-oidc
service.clj
(ns com.yetanalytics.pedestal-oidc.service (:require [io.pedestal.http :as http] [io.pedestal.http.route :as route] [io.pedestal.http.body-params :as body-params] [ring.util.response :as ring-resp] [com.yetanalytics.pedestal-oidc.interceptor :as i] [com.yeta...
null
https://raw.githubusercontent.com/yetanalytics/re-oidc/5ff1ba05d478068076905044a19eb82435539f8a/src/dev/com/yetanalytics/pedestal_oidc/service.clj
clojure
:8080/auth/realms/test/.well-known/openid-configuration Example API decoding claims How you retrieve/cache the config & keyset is up to you the interceptor gives this function the context in case you need access to something in there to get it the issuer Derive the config uri go get the config go get the keyse...
(ns com.yetanalytics.pedestal-oidc.service (:require [io.pedestal.http :as http] [io.pedestal.http.route :as route] [io.pedestal.http.body-params :as body-params] [ring.util.response :as ring-resp] [com.yetanalytics.pedestal-oidc.interceptor :as i] [com.yeta...
e0283ed9ce53d927881d92c16e1477be8762e7f5145ea983052e475a23761613
capnproto/capnp-ocaml
testEncoding.ml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * capnp - ocaml * * Copyright ( c ) 2013 - 2014 , * All rights reserved . * * Redistribution and use in source and binary forms , with or without ...
null
https://raw.githubusercontent.com/capnproto/capnp-ocaml/dda3d811aa7734110d7af051465011f1f823ffb9/src/tests/testEncoding.ml
ocaml
Inspired by encoding-test.c++, as found in the capnproto source. Provide a signature for the TestAllTypes module which we can implement using either a Reader or a Builder. Group 2 should not have been touched Note: the following code is pretty clumsy. Seems like a getter for a named union field could ju...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * capnp - ocaml * * Copyright ( c ) 2013 - 2014 , * All rights reserved . * * Redistribution and use in source and binary forms , with or without ...
d328705049592f1aba303f1e822a709b99544dfe71d5fd81a62a4ab1f7d81d83
kowainik/relude
IORef.hs
{-# LANGUAGE Safe #-} | Module : Relude . Lifted . IORef Copyright : ( c ) 2016 ( c ) 2016 - 2018 ( c ) 2018 - 2023 Kowainik SPDX - License - Identifier : MIT Maintainer : < > Stability : Stable Portability ...
null
https://raw.githubusercontent.com/kowainik/relude/e633cb33308d259d6e4ea058ef506eb496b12323/src/Relude/Lifted/IORef.hs
haskell
# LANGUAGE Safe # $setup | Lifted version of 'Ref.newIORef'. >>> ref <- newIORef False >>> :t ref ref :: IORef Bool # SPECIALIZE newIORef :: a -> IO (IORef a) # # SPECIALIZE writeIORef :: IORef a -> a -> IO () # # SPECIALIZE atomicModifyIORef :: IORef a -> (a -> (a, b)) -> IO b # # INLINE atomicModifyIORef' # # SP...
| Module : Relude . Lifted . IORef Copyright : ( c ) 2016 ( c ) 2016 - 2018 ( c ) 2018 - 2023 Kowainik SPDX - License - Identifier : MIT Maintainer : < > Stability : Stable Portability : Portable ...
f59a7910276accec5ea4e6c19421be2668af77bced65a9bc5a76a59d46ecd20f
imrehg/ypsilon
drawable.scm
#!nobacktrace Ypsilon Scheme System Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited . See license.txt for terms and conditions of use . (library (ypsilon gdk drawable) (export gdk_drawable_copy_to_image gdk_drawable_get_clip_region gdk_drawable_get_colormap gdk_...
null
https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/gdk/drawable.scm
scheme
[end]
#!nobacktrace Ypsilon Scheme System Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited . See license.txt for terms and conditions of use . (library (ypsilon gdk drawable) (export gdk_drawable_copy_to_image gdk_drawable_get_clip_region gdk_drawable_get_colormap gdk_...
ab61cddb0bff2385dcb48fc0c4c79036ee59cc95d9e9281f7f8e2bef51e15100
cndreisbach/clojure-web-dev-workshop
system.clj
(ns we-owe.system (:require [we-owe.handler :refer [create-handler]] [ring.adapter.jetty :refer [run-jetty]])) (defn system "Returns a new instance of the application." [] (let [db (atom {:debts []}) handler (create-handler db)] {:db db :handler handler :server-port 3005 ...
null
https://raw.githubusercontent.com/cndreisbach/clojure-web-dev-workshop/95d9fdf94b39f8a1e408b8bf75a81b92899ee7d9/code/05-liberator/src/we_owe/system.clj
clojure
(ns we-owe.system (:require [we-owe.handler :refer [create-handler]] [ring.adapter.jetty :refer [run-jetty]])) (defn system "Returns a new instance of the application." [] (let [db (atom {:debts []}) handler (create-handler db)] {:db db :handler handler :server-port 3005 ...
a55657e970859ae98fc2aaa1926d6f07b01eefa770b243c76fdfaf4d35f34320
webyrd/mediKanren
sql-schema-parse.rkt
#lang racket/base (require "mk.rkt" "mk-parse.rkt" ) Parse SQL schema (define delimiters '("," ")") ) (define delimiter (one-of delimiters)) (define (sq name) (seq "\'" (single name) "\'")) (define (dq name) (seq "\"" (single name) "\"")) (define (bq name) (seq "`" (single name) "`")) (define (paren p items)...
null
https://raw.githubusercontent.com/webyrd/mediKanren/a2b80ea94f66bcdd4305b9369ad4184c2afe9829/attic/pharos/sql-schema-parse.rkt
racket
#lang racket/base (require "mk.rkt" "mk-parse.rkt" ) Parse SQL schema (define delimiters '("," ")") ) (define delimiter (one-of delimiters)) (define (sq name) (seq "\'" (single name) "\'")) (define (dq name) (seq "\"" (single name) "\"")) (define (bq name) (seq "`" (single name) "`")) (define (paren p items)...