_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
cdd95da455f16080260037a24337118c0f742466a35a084888f53f5f71522c0b
binaryage/clearcut
utils.clj
(ns clearcut.circus.utils (:require [clojure.java.io :as io] [clojure.string :as string] [cuerdas.core :as cuerdas] [clansi] [clojure.java.shell :as shell] [clojure.tools.logging :as log] [clojure.pprint :refer [pprint]] [clearcut.too...
null
https://raw.githubusercontent.com/binaryage/clearcut/7f44705cd8743f8679199cb78a215487eb411ed4/test/src/circus/clearcut/circus/utils.clj
clojure
black on black background should be displayed as gray we want to be compatible with "copy transcript!" button which copies to clipboard with extra new-line taken from: -tools/blob/dcc9853514756f2f4fc3bfdfdba45abffd94c5dd/src/clojure/tools/file_utils.clj#L83
(ns clearcut.circus.utils (:require [clojure.java.io :as io] [clojure.string :as string] [cuerdas.core :as cuerdas] [clansi] [clojure.java.shell :as shell] [clojure.tools.logging :as log] [clojure.pprint :refer [pprint]] [clearcut.too...
504266b400bea9cae69259e8112c3c81bc2aaa406804d17993733c9c8317195f
mpickering/apply-refact
Naming3.hs
data Yes = Foo {bar_cap :: Int}
null
https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Naming3.hs
haskell
data Yes = Foo {bar_cap :: Int}
0589e6addd9ee7524d3aff9f5bfdc2bb02e52bdc894e768460658dd4d745607f
shmookey/solpb
StructsSpec.hs
{-# LANGUAGE OverloadedStrings #-} module Spec.Proto.StructsSpec where import Prelude hiding (fail) import Data.Text (Text, pack, unpack) import Data.Semigroup ((<>)) import Data.Foldable (toList) import Data.Sequence (fromList) import Text.ProtocolBuffers.Basic (uFromString, uToString) import qualified Data.Sequence...
null
https://raw.githubusercontent.com/shmookey/solpb/4263050f9436e0a1d541ac99ab52970e9c2132c6/test/Spec/Proto/StructsSpec.hs
haskell
# LANGUAGE OverloadedStrings #
module Spec.Proto.StructsSpec where import Prelude hiding (fail) import Data.Text (Text, pack, unpack) import Data.Semigroup ((<>)) import Data.Foldable (toList) import Data.Sequence (fromList) import Text.ProtocolBuffers.Basic (uFromString, uToString) import qualified Data.Sequence as Seq import qualified Data.ByteS...
2735069fc27bdfacba9995f3d213199bc008d91a3785e0a40ddf472417e39bbb
MinaProtocol/mina
persistent_frontier.ml
open Async_kernel open Core open Mina_base open Mina_state open Mina_block open Frontier_base module Database = Database module type CONTEXT = sig val logger : Logger.t val precomputed_values : Precomputed_values.t val constraint_constants : Genesis_constants.Constraint_constants.t val consensus_constants :...
null
https://raw.githubusercontent.com/MinaProtocol/mina/57e2ea1b87fe1a24517e1c62f51cc59fe9bc87cd/src/lib/transition_frontier/persistent_frontier/persistent_frontier.ml
ocaml
If the target hash is already the root hash, no fast forward required, but we should check the frontier hash. we explicitly re-validate the genesis protocol state here to prevent X-version bugs read basic information from the database construct the root staged ledger in memory initialize the new in memory fron...
open Async_kernel open Core open Mina_base open Mina_state open Mina_block open Frontier_base module Database = Database module type CONTEXT = sig val logger : Logger.t val precomputed_values : Precomputed_values.t val constraint_constants : Genesis_constants.Constraint_constants.t val consensus_constants :...
f5a7281953c94ae91636774b0996173770f72fc8bf2101a29d1f65d151c7c083
scicloj/notespace
nrepl.clj
(ns scicloj.notespace.v4.nrepl (:require [nrepl.core :as nrepl] [nrepl.middleware :as middleware] [nrepl.middleware.print :as print] [nrepl.transport :as transport] [clojure.core.async :as async] [scicloj.notespace.v4.events.pipeline :as v4.pipeline] ...
null
https://raw.githubusercontent.com/scicloj/notespace/e8e583eb064412da32683bc8d18f97a43bdc9184/src/scicloj/notespace/v4/nrepl.clj
clojure
(ns scicloj.notespace.v4.nrepl (:require [nrepl.core :as nrepl] [nrepl.middleware :as middleware] [nrepl.middleware.print :as print] [nrepl.transport :as transport] [clojure.core.async :as async] [scicloj.notespace.v4.events.pipeline :as v4.pipeline] ...
0c5aa8133af37a470af3f0d1e57406ed1052e4ac4ecf41c020b9d7873aa37551
oakes/Lightmod
dev.clj
(require '[nightlight.core :as nightlight] '[figwheel.main :as figwheel] '[[[name]].server :refer [-main]]) (let [server (-main) port (-> server meta :local-port) url (str ":" port "/index.html")] (println "Started app on" url) (nightlight/start {:port 4000 :url url}) (figwheel/-main "--build" ...
null
https://raw.githubusercontent.com/oakes/Lightmod/141d1671d485326ef1f37b057c4116a2618dd948/resources/templates/export/dev.clj
clojure
(require '[nightlight.core :as nightlight] '[figwheel.main :as figwheel] '[[[name]].server :refer [-main]]) (let [server (-main) port (-> server meta :local-port) url (str ":" port "/index.html")] (println "Started app on" url) (nightlight/start {:port 4000 :url url}) (figwheel/-main "--build" ...
1eafe11bb641d86bf5972e3d063d503727d375b316084053dd1d1960fb5ab2f1
ygrek/mldonkey
commonServer.ml
Copyright 2001 , 2002 b8_bavard , b8_fee_carabine , This server is part of mldonkey . mldonkey is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ...
null
https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/daemon/common/commonServer.ml
ocaml
op_server_print = (fun _ _ -> ni_ok network "server_print");
Copyright 2001 , 2002 b8_bavard , b8_fee_carabine , This server is part of mldonkey . mldonkey is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ...
7026fa165e387c2869d61ccee46750e624d97928d20a7ef7b9f09416811c2bc2
ucsd-progsys/elsa
Eval.hs
# LANGUAGE OverloadedStrings , BangPatterns # module Language.Elsa.Eval (elsa, elsaOn) where import qualified Data.HashMap.Strict as M import qualified Data.HashMap.Lazy as ML import qualified Data.HashSet as S import qualified Data.List as L import Control.Monad.State import qualifie...
null
https://raw.githubusercontent.com/ucsd-progsys/elsa/040aa85d4c63ae837d839fd7e5a2b85bd90c1289/src/Language/Elsa/Eval.hs
haskell
(isJust, maybeToList) ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------...
# LANGUAGE OverloadedStrings , BangPatterns # module Language.Elsa.Eval (elsa, elsaOn) where import qualified Data.HashMap.Strict as M import qualified Data.HashMap.Lazy as ML import qualified Data.HashSet as S import qualified Data.List as L import Control.Monad.State import ...
3dfaeaefe86c11160d73884c5f4c889c4c55d38f42a2c6e7b49fa9f504d035c3
lortabac/ariel
Types.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE TemplateHaskell # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # module Ariel.Core.Types where import Ariel.Common.Types import A...
null
https://raw.githubusercontent.com/lortabac/ariel/80b89d52e089bb2589a6c3272300fa4897f6072d/src/Ariel/Core/Types.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE OverloadedStrings # | Convenience constructor for vars | Convenience operator for lambdas | Convenience operator for applications
# LANGUAGE TemplateHaskell # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PatternSynonyms # module Ariel.Core.Types where import Ariel.Common.Types import Ariel.Prelude import Control.Lens (Plated, children, transformM, makeLen...
2bb5710390f3f88589b318e8a8bc93f3e42c82c7194a5e3725ae0ad4fb90e533
UnNetHack/pinobot
Bot.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} # OPTIONS_GHC -fno - warn - name - shadowing # module Bot ( message, ) where import Control.Applicative hiding ( many, (<|>), ) import Control.Monad hiding (mapM_) import Control.Monad.Trans.Writer import Data.Foldable import Data.Maybe impo...
null
https://raw.githubusercontent.com/UnNetHack/pinobot/34666dab1b7ea07c605f5110c96945bdd4d35f74/monsterdb/Bot.hs
haskell
# LANGUAGE OverloadedStrings # Add variants here. first one is used by default /~lloyd/tildeStrings/Alignment/92.IPL.html upper diagonals lower diagonals suppresses warnings Returns the most similar monster name along with its levenshtein distance. Returns the most similar monster name but only if parameters a...
# LANGUAGE FlexibleContexts # # OPTIONS_GHC -fno - warn - name - shadowing # module Bot ( message, ) where import Control.Applicative hiding ( many, (<|>), ) import Control.Monad hiding (mapM_) import Control.Monad.Trans.Writer import Data.Foldable import Data.Maybe import Data.Monoid import qualified Dat...
1cfeea064ae40f36196bd8e31eb0bc86491f68a16967ea135d50e80936a715e0
brendanhay/terrafomo
Settings.hs
-- This module is auto-generated. # LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - unused - imports # -- | Module : . PostgreSQL.Settings Copyright : ( c ) 2017 - 2018 License ...
null
https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-postgresql/gen/Terrafomo/PostgreSQL/Settings.hs
haskell
This module is auto-generated. | Stability : auto-generated * SchemaPolicy | The @policy@ nested settings definition. ^ @create@ - (Default __@false@__) If true, allow the specified ROLEs to CREATE new objects within the schema(s) - (Default __@false@__) If true, allow the specified ROLEs to CREATE new ob...
# LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - unused - imports # Module : . PostgreSQL.Settings Copyright : ( c ) 2017 - 2018 License : Mozilla Public License , v. 2.0 . M...
be8e442e46a208b827bdd9a9515378955a0251826f6ea12731ad4ee7e284abdb
ChrisPenner/Candor
Primitives.hs
# LANGUAGE OverloadedLists # module Primitives where import AST import RIO import Types import qualified Data.Map as M primitives :: Bindings primitives = Builtin <$> M.fromSet id (M.keysSet primitiveTypes) primitiveTypes :: M.Map String Monotype primitiveTypes = [ ("+", TFunc intT (TFunc intT intT)) , ("-", T...
null
https://raw.githubusercontent.com/ChrisPenner/Candor/2cf2c3d8ff50aa63b29d21ec8538cf438961aa2e/src/Primitives.hs
haskell
# LANGUAGE OverloadedLists # module Primitives where import AST import RIO import Types import qualified Data.Map as M primitives :: Bindings primitives = Builtin <$> M.fromSet id (M.keysSet primitiveTypes) primitiveTypes :: M.Map String Monotype primitiveTypes = [ ("+", TFunc intT (TFunc intT intT)) , ("-", T...
48de0c726ab4936f2850fd80a349c028dd4bd5736fdd0945ec88ee9cc2ed34c5
fujita-y/ypsilon
program.scm
Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited . ;;; See LICENSE file for terms and conditions of use. (define expand-top-level-program (lambda (form env) (define permute-env (lambda (ht) (let loop ((lst (core-hashtable->alist ht)) (bounds '()) (unbounds '())) ...
null
https://raw.githubusercontent.com/fujita-y/ypsilon/8b9cea4b59651e4bfd187db9d2e9ec68e2590e2d/heap/boot/macro/program.scm
scheme
See LICENSE file for terms and conditions of use.
Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited . (define expand-top-level-program (lambda (form env) (define permute-env (lambda (ht) (let loop ((lst (core-hashtable->alist ht)) (bounds '()) (unbounds '())) (cond ((null? lst) (append bounds unbounds)) ...
aedb752110f990b36b961fa3b123ae0046dcde31b5d6d9a4d3b2d5ea8ab417ba
coccinelle/coccinelle
spgen_test.ml
* This file is part of Coccinelle , lincensed under the terms of the GPL v2 . * See copyright.txt in the Coccinelle source code for more information . * The Coccinelle source code can be obtained at * This file is part of Coccinelle, lincensed under the terms of the GPL v2. * See copyright.txt in the Coc...
null
https://raw.githubusercontent.com/coccinelle/coccinelle/57cbff0c5768e22bb2d8c20e8dae74294515c6b3/tools/spgen/source/spgen_test.ml
ocaml
------------------------------------------------------------------------- ------------------------------------------------------------------------- some common functions Printf.sprintf Common.pr2 Common.pr_no_nl hardcoded values; timeout for testing + extension names marshalling format used by Common -...
* This file is part of Coccinelle , lincensed under the terms of the GPL v2 . * See copyright.txt in the Coccinelle source code for more information . * The Coccinelle source code can be obtained at * This file is part of Coccinelle, lincensed under the terms of the GPL v2. * See copyright.txt in the Coc...
cac8466168ac612d98c9a63d45d83474863874b4e205a6a00788291fa28a8a40
S8A/htdp-exercises
ex213.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex213) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "univers...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex213.rkt
racket
about the language level of this file in a form that our tools can easily process. A Word is one of: – '() or – (cons 1String Word) - '() - (cons Word List-of-words) A Dictionary is a List-of-strings. – "a" – ... – "z" or, equivalently, a member? of this list: Word -> List-of-words finds all rearrangemen...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex213) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp") (lib "itunes.rkt"...
0270a531b691b6d02f8cf4399f1f6afc59fc3a71a02ad4f4040b751e05880d4e
gadfly361/rid3
container.cljs
(ns rid3.container (:require [cljsjs.d3] [rid3.util :as util])) (defn piece-did-mount [piece opts prev-classes] (let [{:keys [id ratom]} opts {:keys [class did-mount] :or {did-mount (fn [node ratom] node)}} piece ...
null
https://raw.githubusercontent.com/gadfly361/rid3/cae79fdbee3b5aba45e29b589425f9a17ef8613b/src/main/rid3/container.cljs
clojure
sane-fallback
(ns rid3.container (:require [cljsjs.d3] [rid3.util :as util])) (defn piece-did-mount [piece opts prev-classes] (let [{:keys [id ratom]} opts {:keys [class did-mount] :or {did-mount (fn [node ratom] node)}} piece ...
1181be2169fd80514be20efd3a210e10c3d1ad39dd416b6fc25b50aada9072d8
sarabander/p2pu-sicp
Ex1.22.scm
Needs the procedures of 1.21 ;; Racket needs this (define (runtime) (current-milliseconds)) (define (timed-prime-test n) (start-prime-test n (runtime))) ;; The procedures differ from book originals (define (start-prime-test n start-time) (if (prime? n) (report-prime n (- (runtime) start-time)) fals...
null
https://raw.githubusercontent.com/sarabander/p2pu-sicp/fbc49b67dac717da1487629fb2d7a7d86dfdbe32/1.2/Ex1.22.scm
scheme
Racket needs this The procedures differ from book originals search finishes faster than the runtime granularity (1 ms) need to use larger numbers: Seems to support the proportionality of number of steps and time.
Needs the procedures of 1.21 (define (runtime) (current-milliseconds)) (define (timed-prime-test n) (start-prime-test n (runtime))) (define (start-prime-test n start-time) (if (prime? n) (report-prime n (- (runtime) start-time)) false)) (define (report-prime n elapsed-time) (newline) (display ...
bbfe5359b1b62324019edc578a189d6d07be6cb2c53ef86073ae777271bac2ca
RefactoringTools/HaRe
QualClient.hs
module Renaming.QualClient where foo is imported qualified as in QualClient . Renaming should preserve the qualification there preserve the qualification there -} import qualified Renaming.QualServer as QS baz :: String baz = QS.foo : "hello"
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/Renaming/QualClient.hs
haskell
module Renaming.QualClient where foo is imported qualified as in QualClient . Renaming should preserve the qualification there preserve the qualification there -} import qualified Renaming.QualServer as QS baz :: String baz = QS.foo : "hello"
7deccde62628be9eec59d83885e4c39004c450c4ca0b256a627f1586026cd361
shirok/Gauche
test.scm
;; ;; testing file.util ;; (use gauche.test) (use scheme.list) (use srfi.13) (use gauche.uvector) (test-start "file.*") (test-section "file.util") (use file.util) (cond-expand [gauche.os.windows (test-module 'file.util :allow-undefined '(sys-symlink))] [else (test-module 'file.util)]) ;; shorthand of normaliz...
null
https://raw.githubusercontent.com/shirok/Gauche/95af59561eaca4bc9814a2623da8ef4f2dea9e24/ext/file/test.scm
scheme
testing file.util shorthand of normalizing pathname. this doesn't do anything on different installations. mingw doesn't have fully compatible permissions as unix. this procedure compensates it. ===================================================================== find-file-in-paths is tested after diretory uti...
(use gauche.test) (use scheme.list) (use srfi.13) (use gauche.uvector) (test-start "file.*") (test-section "file.util") (use file.util) (cond-expand [gauche.os.windows (test-module 'file.util :allow-undefined '(sys-symlink))] [else (test-module 'file.util)]) unix , but on Windows the separator in PATHNAME i...
28d8059c9683196031cf81411e8b5a4a5cd4c9b134bace3d65c5da1610c823fa
squaresLab/footpatch
serialization.mli
* Copyright ( c ) 2009 - 2013 Monoidics ltd . * Copyright ( c ) 2013 - 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 . An additional grant * of patent rights can be f...
null
https://raw.githubusercontent.com/squaresLab/footpatch/8b79c1964d89b833179aed7ed4fde0638a435782/infer/src/backend/serialization.mli
ocaml
* Serialization of data stuctures * Generic serializer * Serialization key, used to distinguish versions of serializers and avoid assert faults * current key for an analysis results value * current key for proc attributes * current key for a cfg * current key for a call graph * create a serializer from a file na...
* Copyright ( c ) 2009 - 2013 Monoidics ltd . * Copyright ( c ) 2013 - 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 . An additional grant * of patent rights can be f...
e78235c79958424e5de4457913fb961bf246a44082b9b467ba67691f06ea26e9
danidiaz/tailfile-hinotify
Streaming.hs
| Tail files in Unix , using types from the @streaming@ package . -} {-# LANGUAGE RankNTypes #-} module System.IO.TailFile.Streaming where import Data.ByteString (ByteString) import Streaming import Streaming.Eversion import qualified System.IO.TailFile.Foldl {-| Tail a fi...
null
https://raw.githubusercontent.com/danidiaz/tailfile-hinotify/14397104511664e786aeedcda76469faf172acdf/lib/System/IO/TailFile/Streaming.hs
haskell
# LANGUAGE RankNTypes # | Tail a file with a function that consumes a 'Stream'. ^ Scary type, but any reasonably polymorphic (say, over 'MonadIO') function that consumes a 'Stream' can go here.
| Tail files in Unix , using types from the @streaming@ package . -} module System.IO.TailFile.Streaming where import Data.ByteString (ByteString) import Streaming import Streaming.Eversion import qualified System.IO.TailFile.Foldl tailFile :: FilePath -> IO void ...
1e7ee4bc9129800ea210dfc11657487ac2ed1599d1e3161a06a17a944a2abfcd
GlideAngle/flare-timing
Arrival.hs
# LANGUAGE DuplicateRecordFields # | Module : Flight . Track . Mask . Arrrival Copyright : ( c ) Block Scope Limited 2017 License : MPL-2.0 Maintainer : Stability : experimental Tracks masked with task control zones . Module : Flight.Track.Mask.Arrrival Copyright : (c) Block S...
null
https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/comp/library/Flight/Track/Mask/Arrival.hs
haskell
| For each task, the masking for arrival for that task.
# LANGUAGE DuplicateRecordFields # | Module : Flight . Track . Mask . Arrrival Copyright : ( c ) Block Scope Limited 2017 License : MPL-2.0 Maintainer : Stability : experimental Tracks masked with task control zones . Module : Flight.Track.Mask.Arrrival Copyright : (c) Block S...
22f92f6472274649e276ffa4e99e5e30987b428d6ad3e0e23b266cc3afbc96ea
shaolang/fan-fiction
project.clj
(defproject fan-fiction "0.2.0-SNAPSHOT" :description "Write Storybook in ClojureScript with ease" :url "-fiction" :license {:name "MIT License" :url "-license.org"} :min-lein-version "2.7.1" :source-paths ["src"] :profiles {:dev {:dependencies [[org.clojure/clojurescript "1.10.844" ...
null
https://raw.githubusercontent.com/shaolang/fan-fiction/8cec5756e54774d3063199e70366130e8b67c0d5/project.clj
clojure
(defproject fan-fiction "0.2.0-SNAPSHOT" :description "Write Storybook in ClojureScript with ease" :url "-fiction" :license {:name "MIT License" :url "-license.org"} :min-lein-version "2.7.1" :source-paths ["src"] :profiles {:dev {:dependencies [[org.clojure/clojurescript "1.10.844" ...
17b61bcfd405460c5ef2f95c86268924792a5a26fbca521e71abc40c3bad0466
ronxin/stolzen
ex3.52.scm
#lang scheme (require "streams.scm") (define sum 0) (define (accum x) (set! sum (+ x sum)) (display "Accum being processed, input param: ") (display x) (display " sum: ") (display sum) (newline) sum ) sum (define seq (stream-map accum (stream-enumerate-interval 1 20))) sum seq...
null
https://raw.githubusercontent.com/ronxin/stolzen/bb13d0a7deea53b65253bb4b61aaf2abe4467f0d/sicp/chapter3/3.5/ex3.52.scm
scheme
What is the value of sum after each of the above expressions is evaluated? What is the printed response to evaluating the stream-ref and display-stream expressions? Would these responses differ if we had implemented (delay <exp>) simply as (lambda () <exp>) without using the optimization provided by memo- proc...
#lang scheme (require "streams.scm") (define sum 0) (define (accum x) (set! sum (+ x sum)) (display "Accum being processed, input param: ") (display x) (display " sum: ") (display sum) (newline) sum ) sum (define seq (stream-map accum (stream-enumerate-interval 1 20))) sum seq...
1b5c27c8def06eb2cb99b2b7134c331784f98b5e216d725b4ef5cc0b2ee31e74
ssor/erlangDemos
test.erl
-module(test). -export([add_msg_radio/3]). -export([test1/0, test2/0, test3/0]). test3() -> case file:consult("config.dat") of {error, enoent} -> io:format("The file does not exist~n"); {ok, Config} -> Func = fun({Term1, Configs}) -> case term1 == Term1 of true -> io:format("-> ~p~n", [Configs...
null
https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/msg_transfer_via_udp/src/test.erl
erlang
-module(test). -export([add_msg_radio/3]). -export([test1/0, test2/0, test3/0]). test3() -> case file:consult("config.dat") of {error, enoent} -> io:format("The file does not exist~n"); {ok, Config} -> Func = fun({Term1, Configs}) -> case term1 == Term1 of true -> io:format("-> ~p~n", [Configs...
2078eb892172d1fcb0231a7e0d23cae199f33b948f56921d71ff6155009b5715
RefactoringTools/HaRe
PArr.hs
# LANGUAGE ParallelListComp # module Layout.PArr where blah xs ys = [ (x, y) | x <- xs | y <- ys ] bar = [: 1 , 2 .. 3 :] -- entry point for desugaring a parallel array comprehension = [ : e | qss :] = < < [: e | qss :] > > ( ) [ :() :] ary = let toP [ 1 .. 10 ] arr2 = toP [ 1 .. 10 ] ...
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/Layout/PArr.hs
haskell
entry point for desugaring a parallel array comprehension
# LANGUAGE ParallelListComp # module Layout.PArr where blah xs ys = [ (x, y) | x <- xs | y <- ys ] bar = [: 1 , 2 .. 3 :] = [ : e | qss :] = < < [: e | qss :] > > ( ) [ :() :] ary = let toP [ 1 .. 10 ] arr2 = toP [ 1 .. 10 ] f = [: i1 + i2 | i1 < - arr1 | i2 < - arr2 :] ...
f187ed400bfe561e4fe0f7d63584355c73d4d00c32efe1c3e48d71963b47fcb6
ocaml-omake/omake
lm_map.mli
(* Map module based on red-black trees *) open Lm_map_sig module Make (Ord : OrderedType) : (S with type key = Ord.t) module LmMake (Ord : OrderedType) : (LmMap with type key = Ord.t) module LmMakeList (Ord : OrderedType) : (LmMapList with type key = Ord.t) (* * This version includes a sharing...
null
https://raw.githubusercontent.com/ocaml-omake/omake/08b2a83fb558f6eb6847566cbe1a562230da2b14/src/libmojave/lm_map.mli
ocaml
Map module based on red-black trees * This version includes a sharing constraint so that maps can * be used in recursive definitions. This exposes the internal * representation, should you should avoid using it unless * absolutely necessary (like in a recursive type definition).
open Lm_map_sig module Make (Ord : OrderedType) : (S with type key = Ord.t) module LmMake (Ord : OrderedType) : (LmMap with type key = Ord.t) module LmMakeList (Ord : OrderedType) : (LmMapList with type key = Ord.t) type ('key, 'value) tree module LmMakeRec (Ord : OrderedType) : (LmMap with...
8a75dac6f371d0bc5fec9e7fbd58465782ff223e897be04f86604f25d1726157
phadej/cabal-extras
Parse.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternGuards #-} -- This module is derivative of -- Copyright ( c ) 2009 - 2018 < > -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal in the Soft...
null
https://raw.githubusercontent.com/phadej/cabal-extras/378cac5495b829794d67f243b27a9317eeed0858/cabal-docspec/src/CabalDocspec/Doctest/Parse.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE PatternGuards # This module is derivative of Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or...
Copyright ( c ) 2009 - 2018 < > in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPR...
e49f2714f77c13374272bfb755245e53cff20a488adb4f2ddfc27a784633e157
iamFIREcracker/adventofcode
day25.lisp
(defpackage :aoc/2015/25 #.cl-user::*aoc-use*) (in-package :aoc/2015/25) (defun parse-target-position (lines) (cl-ppcre:register-groups-bind ((#'parse-integer row col)) ("row (\\d+), column (\\d+)" (first lines)) (list row col))) (defun next-grid-position (&optional prev) (if (not prev) (list 1 1) ...
null
https://raw.githubusercontent.com/iamFIREcracker/adventofcode/c395df5e15657f0b9be6ec555e68dc777b0eb7ab/src/2015/day25.lisp
lisp
(defpackage :aoc/2015/25 #.cl-user::*aoc-use*) (in-package :aoc/2015/25) (defun parse-target-position (lines) (cl-ppcre:register-groups-bind ((#'parse-integer row col)) ("row (\\d+), column (\\d+)" (first lines)) (list row col))) (defun next-grid-position (&optional prev) (if (not prev) (list 1 1) ...
10328b8fed26090acc2bb05ceba039067be9fccf0f1d1fe6d0147ae4ce63dbff
baskeboler/cljs-karaoke-client
core.cljs
(ns cljs-karaoke.http.core (:require [cljs-karaoke.http.events :as events] [cljs-karaoke.http.subs :as sub] [cljs-karaoke.http.views :as views]))
null
https://raw.githubusercontent.com/baskeboler/cljs-karaoke-client/bb6512435eaa436d35034886be99213625847ee0/src/main/cljs_karaoke/http/core.cljs
clojure
(ns cljs-karaoke.http.core (:require [cljs-karaoke.http.events :as events] [cljs-karaoke.http.subs :as sub] [cljs-karaoke.http.views :as views]))
63f30dc3d1b2629d46ad9ff13b7c06e0db1cb2228ecfaeae5c516b518a96224b
kierangrant/cl-qt-example
package.lisp
-*- Mode : Lisp ; Syntax : COMMON - LISP ; Base : 10 -*- releases this code in the Public Domain File : package.lisp ;; Description: Core Package File (defpackage :cl-qt-example (:use :cl :cffi) (:export #:run-app))
null
https://raw.githubusercontent.com/kierangrant/cl-qt-example/47ce65e1b0375c5716284a1f957cc70e083f52d7/package.lisp
lisp
Syntax : COMMON - LISP ; Base : 10 -*- Description: Core Package File
releases this code in the Public Domain File : package.lisp (defpackage :cl-qt-example (:use :cl :cffi) (:export #:run-app))
68fbfcfc9abf18801122c5baa8f80b3f850cfce5e3ac01cf54add0f7de37f281
gafiatulin/codewars
Stockbroker.hs
Ease the StockBroker -- / module Codewars.G964.Stockbroker where import Data.Char (isDigit, isSpace) import Data.Either (partitionEithers) import Data.List (elemIndices, partition, groupBy) import Data.List.Split (split, dropDelims, dropBlanks, oneOf) balanceStatements "" = "Buy: 0 Sell: 0" balanceStatements s = f...
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/6%20kyu/Stockbroker.hs
haskell
/
Ease the StockBroker module Codewars.G964.Stockbroker where import Data.Char (isDigit, isSpace) import Data.Either (partitionEithers) import Data.List (elemIndices, partition, groupBy) import Data.List.Split (split, dropDelims, dropBlanks, oneOf) balanceStatements "" = "Buy: 0 Sell: 0" balanceStatements s = f corr...
e0b9dbf8e300cc1ec5e6c8589cf7ad780e357439c091fc418155530a4e4157b8
bsaleil/lc
diviter.scm.scm
;;------------------------------------------------------------------------------ Macros (##define-macro (def-macro form . body) `(##define-macro ,form (let () ,@body))) (def-macro (FLOATvector-const . lst) `',(list->vector lst)) (def-macro (FLOATvector? x) `(vector? ,x)) (def-macro (FLOATvector . lst...
null
https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/tools/benchtimes/resultVMIL-lc-gsc-lc/LC5/diviter.scm.scm
scheme
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Gabriel benchmarks C benchmarks Other benchmarks
Macros (##define-macro (def-macro form . body) `(##define-macro ,form (let () ,@body))) (def-macro (FLOATvector-const . lst) `',(list->vector lst)) (def-macro (FLOATvector? x) `(vector? ,x)) (def-macro (FLOATvector . lst) `(vector ,@lst)) (def-macro (FLOATmake-vector n . init) `(make-vector ,...
dd760b2fd8ee8ec85b44fa07ad8b82d73d71c3e1ca78fe7eae3b275ea65d52e7
jbclements/portaudio
test-stream-playback.rkt
#lang racket (require "../portaudio.rkt" "../callback-support.rkt" "helpers.rkt" "../devices.rkt" ffi/vector ffi/unsafe rackunit rackunit/text-ui math/statistics) ;(pa-maybe-initialize) ;(display-device-table) ( set - output - device ! 5 ) (defi...
null
https://raw.githubusercontent.com/jbclements/portaudio/77a03c86054a5d7a26ed0082215b61162eb8b651/portaudio/test/test-stream-playback.rkt
racket
(pa-maybe-initialize) (display-device-table) input channels output channels sample format sample rate frames-per-buffer -- let the system decide callback (NULL means just wait for data) (printf "frames to write: ~s\n" frames) (printf "pointer to write at: ~a\n" (printf "write up to: ~a\n" map 0<rads<2...
#lang racket (require "../portaudio.rkt" "../callback-support.rkt" "helpers.rkt" "../devices.rkt" ffi/vector ffi/unsafe rackunit rackunit/text-ui math/statistics) ( set - output - device ! 5 ) (define twopi (* 2 pi)) (define (ptr->string ptr) ...
1500fa5523783bf2841f0ff9c10053f47125aa72d6f60ced3a3cc56e6e6cf068
isovector/ld52
World.hs
module Game.World where import Data.Set (Set) import Engine.Types drawWorld :: Set LevelLayer -> World -> Renderable drawWorld layers = foldMap (drawLevel layers) . toList . w_levels drawLevel :: Set LevelLayer -> Level -> Renderable drawLevel layers lv = mconcat [ -- drawBackgroundColor $ l_bgcolor lv flip fo...
null
https://raw.githubusercontent.com/isovector/ld52/157ee1f1eff8295e6e96c5b90539a5956b3a20a3/src/Game/World.hs
haskell
drawBackgroundColor $ l_bgcolor lv
module Game.World where import Data.Set (Set) import Engine.Types drawWorld :: Set LevelLayer -> World -> Renderable drawWorld layers = foldMap (drawLevel layers) . toList . w_levels drawLevel :: Set LevelLayer -> Level -> Renderable drawLevel layers lv = mconcat flip foldMap layers $ \l -> l_tiles lv l ] til...
faf983b572cc81aa87fb071d227f34e76f145e6db6801841737016fd6901f660
kana-sama/sicp
1.30 - iter sum.scm
(define (sum fn next a b) (let loop ((i a) (result 0)) (cond ((> i b) result) (else (loop (next i) (+ result (fn i)))))))
null
https://raw.githubusercontent.com/kana-sama/sicp/fc637d4b057cfcae1bae3d72ebc08e1af52e619d/1/1.30%20-%20iter%20sum.scm
scheme
(define (sum fn next a b) (let loop ((i a) (result 0)) (cond ((> i b) result) (else (loop (next i) (+ result (fn i)))))))
a788a3a85aefa476cc4618b08b1b07bc4017678b69ea59dd7cd1b0baed7f82d6
adoptingerlang/service_discovery
service_discovery_storage.erl
-module(service_discovery_storage). -export([]). -callback create(service_discovery:service()) -> binary() | {error, term()}. -callback read(unicode:unicode_binary()) -> service_discovery:service() | {error, term()}. -callback read_endpoints(unicode:unicode_binary()) -> [service_discovery:endpoint()] | {error, term()...
null
https://raw.githubusercontent.com/adoptingerlang/service_discovery/03bed070048e70ce267fa4a585fa157bbc883425/apps/service_discovery_storage/src/service_discovery_storage.erl
erlang
-module(service_discovery_storage). -export([]). -callback create(service_discovery:service()) -> binary() | {error, term()}. -callback read(unicode:unicode_binary()) -> service_discovery:service() | {error, term()}. -callback read_endpoints(unicode:unicode_binary()) -> [service_discovery:endpoint()] | {error, term()...
7cac3bf95e235ad39dcf549fa4400ebcd2c3d27574c1e477d10787c8cf265567
returntocorp/ocaml-tree-sitter-core
Missing_node.ml
(* Ensure that the tree-sitter gives us a node in the CST for every node in the grammar. Patterns (regexps) and token() constructs have no name and tree-sitter will produce no node in the CST unless a name is somehow assigned. We use the alias() construct to assign names to grammar nodes that don't have ...
null
https://raw.githubusercontent.com/returntocorp/ocaml-tree-sitter-core/66fbeabb8c3fec69a30a2e7f3eec41bc2d112d40/src/gen/lib/Missing_node.ml
ocaml
Ensure that the tree-sitter gives us a node in the CST for every node in the grammar. Patterns (regexps) and token() constructs have no name and tree-sitter will produce no node in the CST unless a name is somehow assigned. We use the alias() construct to assign names to grammar nodes that don't have on...
open Printf open Tree_sitter_t type token_node_name = | Literal of string | Name of string let get_token_node_name (token_contents : rule_body) : token_node_name option = let rec get (x : rule_body) = match x with | SYMBOL name -> Some (Name name) | STRING name -> Some (Literal name) | BLANK ->...
4d80e592a3d77d7f0ff4f84402b0ef87548576108ea22b1ecf03d05044448d44
cabol/erlbus
ebus_ps_local_SUITE.erl
-module(ebus_ps_local_SUITE). %% Common Test -export([ all/0, init_per_suite/1, end_per_suite/1 ]). %% Tests -export([ t_subscribe/1, t_unsubscribe/1, t_unsubscribe2/1, t_pid_removed_when_down/1, t_subscriber_demonitored/1 ]). %%%=================================================================== %%%...
null
https://raw.githubusercontent.com/cabol/erlbus/050cb728ef09a0ad51c9297281602e362b5e233d/test/ebus_ps_local_SUITE.erl
erlang
Common Test Tests =================================================================== Common Test =================================================================== =================================================================== Exported Tests Functions =========================================================...
-module(ebus_ps_local_SUITE). -export([ all/0, init_per_suite/1, end_per_suite/1 ]). -export([ t_subscribe/1, t_unsubscribe/1, t_unsubscribe2/1, t_pid_removed_when_down/1, t_subscriber_demonitored/1 ]). all() -> [ t_subscribe, t_unsubscribe, t_unsubscribe2, t_pid_removed_when_down, t_subsc...
3bfce3366b8e098c5131d38aff1d9e34a60608414059e28a22b2a7404da62d40
chetmurthy/ensemble
arrayf.ml
(**************************************************************) ARRAYF.ML : functional arrays Author : , 4/95 (**************************************************************) type 'a t = 'a Arraye.t (**************************************************************) let append = Arraye.append let bool_to_string ...
null
https://raw.githubusercontent.com/chetmurthy/ensemble/8266a89e68be24a4aaa5d594662e211eeaa6dc89/ensemble/server/util/arrayf.ml
ocaml
************************************************************ ************************************************************ ************************************************************ ************************************************************ If already ordered, then return input array. ****************************...
ARRAYF.ML : functional arrays Author : , 4/95 type 'a t = 'a Arraye.t let append = Arraye.append let bool_to_string = Arraye.bool_to_string let combine = Arraye.combine let concat = Arraye.concat let copy = Arraye.copy let create = Arraye.create let doubleton = Arraye.doubleton let empty = Arraye.empty let fil...
1ec1980422c489cb61d54dad4bb7516868738faff3e08457c788d57f9f0a68d1
fulcrologic/fulcro-inspect
helpers.cljs
(ns com.wsscode.oge.ui.helpers (:require [clojure.string :as str] [goog.object :as gobj] [cljs.spec.alpha :as s])) (defn js-get-in [x path] (gobj/getValueByKeys x (clj->js path))) (s/fdef js-get-in :args (s/cat :x any? :path vector?) :ret any?) (defn html-attr-merge [a b] (cond ...
null
https://raw.githubusercontent.com/fulcrologic/fulcro-inspect/a03b61cbd95384c0f03aa936368bcf5cf573fa32/src/ui/com/wsscode/oge/ui/helpers.cljs
clojure
(ns com.wsscode.oge.ui.helpers (:require [clojure.string :as str] [goog.object :as gobj] [cljs.spec.alpha :as s])) (defn js-get-in [x path] (gobj/getValueByKeys x (clj->js path))) (s/fdef js-get-in :args (s/cat :x any? :path vector?) :ret any?) (defn html-attr-merge [a b] (cond ...
12be87465b0eccafa0deab2d5bb35c1f431fc5d1eb4acbdffa4c33ed3f6dfa26
mariari/Misc-ML-Scripts
Parsing.hs
{-# LANGUAGE DeriveTraversable #-} # LANGUAGE FunctionalDependencies # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # -- | -- Hardening S-expressions into a more readable form. Here we use a -- mixture of record structures and aliases. Each cover a form that we -- wish to ...
null
https://raw.githubusercontent.com/mariari/Misc-ML-Scripts/376a7d55b565bf9205e697c5c3b78e1d6b6aedcd/Haskell/Sexp/src/Data/Sexp/Structure/Parsing.hs
haskell
# LANGUAGE DeriveTraversable # | Hardening S-expressions into a more readable form. Here we use a mixture of record structures and aliases. Each cover a form that we wish to talk about rather than just match away at - _The form for transformation follows this structure_ -- the data type data Form = ... deri...
# LANGUAGE FunctionalDependencies # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # + begin_src haskell is < Form > : : Sexp . T - > Bool to < Form > : : Sexp . T - > Maybe < Form > # + end_src ∀ s : Sexp . is < Form > s = True ⟷ is - just ( to < ...
b4e02b22da2a55f5112a7df5ca49571e754823023ee7c400c7c4f832b93edc73
c-cube/ocaml-containers
t_bq.ml
module Test = (val Containers_testlib.make ~__FILE__ ()) open Test open CCBlockingQueue;; t @@ fun () -> let q = create 1 in let t1 = CCThread.spawn (fun () -> push q 1; push q 2) in let t2 = CCThread.spawn (fun () -> push q 3; push q 4) in let l = CCLock.create [] in let t3 = CCThread.sp...
null
https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/tests/thread/t_bq.ml
ocaml
test push_list
module Test = (val Containers_testlib.make ~__FILE__ ()) open Test open CCBlockingQueue;; t @@ fun () -> let q = create 1 in let t1 = CCThread.spawn (fun () -> push q 1; push q 2) in let t2 = CCThread.spawn (fun () -> push q 3; push q 4) in let l = CCLock.create [] in let t3 = CCThread.sp...
f83cd12fced6d88ab2f12e32cf01bd809ab3a8e394d7354394bf3101395cb69c
aantron/hyper
connect.mli
This file is part of Hyper , released under the MIT license . See LICENSE.md for details , or visit . Copyright 2022 for details, or visit . Copyright 2022 Anton Bachin *) type 'a promise = 'a Dream_pure.Message.promise type request = Dream_pure.Message.request type response = Dream_pure.Messa...
null
https://raw.githubusercontent.com/aantron/hyper/d4f41825bd25b0da48cb75f127257204b46ce76a/src/http/connect.mli
ocaml
val send : request -> response promise Used for testing.
This file is part of Hyper , released under the MIT license . See LICENSE.md for details , or visit . Copyright 2022 for details, or visit . Copyright 2022 Anton Bachin *) type 'a promise = 'a Dream_pure.Message.promise type request = Dream_pure.Message.request type response = Dream_pure.Messa...
5f20721ce02fcc6b73aa7cbd64a4d5bd661e0c917326e251fd30e606ec616c81
ekmett/linear
Plucker.hs
module Plucker (tests) where import Linear import Linear.Plucker import Linear.Plucker.Coincides import Test.HUnit ln2,ln3,ln4,ln5,ln6,ln7,ln8,ln9 :: Plucker Float ln2 = plucker3D (V3 1 3 0) (V3 1 3 (-2)) -- starting line ln3 = plucker3D (V3 2 3 0) (V3 2 3 (-2)) -- parallel ln4 = plucker3D (V3 2 4 0) (V3 1 4 (-2...
null
https://raw.githubusercontent.com/ekmett/linear/9bb5d69d25f96dd338769f81927d5101b90663af/tests/Plucker.hs
haskell
starting line parallel ccw cw intersect reversed through origin not a 3D line
module Plucker (tests) where import Linear import Linear.Plucker import Linear.Plucker.Coincides import Test.HUnit ln2,ln3,ln4,ln5,ln6,ln7,ln8,ln9 :: Plucker Float tests :: Test tests = test [ "parallel" ~: parallel ln2 ln3 ~?= True , "CCW" ~: passes ln2 ln4 ~?= Counterclockwise , "CW" ~: p...
960565b66b185e902386f977737dff117a65537fa1f21b83a5be8c98b79cf52d
simon-katz/lein-nomis-ns-graph
graph_test.clj
(ns leiningen.nomis-ns-graph.p200-graphing.graph-test (:require [clojure.java.io :as io] [leiningen.lein-test-utils :as ltu] [leiningen.nomis-ns-graph.p200-graphing.graph :as subject :refer :all] [midje.sweet :refer :all])) ;;;; ____________________________________________________...
null
https://raw.githubusercontent.com/simon-katz/lein-nomis-ns-graph/e30d8af3022ee1d9b1c49571847925c45617e66b/test/leiningen/nomis_ns_graph/p200_graphing/graph_test.clj
clojure
___________________________________________________________________________ ___________________________________________________________________________ Take care to only do this when necessary, so that diff tools don't show unnecessary diffs in file timestamps.
(ns leiningen.nomis-ns-graph.p200-graphing.graph-test (:require [clojure.java.io :as io] [leiningen.lein-test-utils :as ltu] [leiningen.nomis-ns-graph.p200-graphing.graph :as subject :refer :all] [midje.sweet :refer :all])) (fact "`nsn->pieces` works" (#'subject/nsn->pieces "a....
0b1c12ef134d26bb63665440073494df54f237da030af8a62532ac8060e21f22
xh4/web-toolkit
file.lisp
(in-package :http-test) (in-suite :http-test) (test file-size (it (with-static-files (root "abc") (with-open-file (stream (merge-pathnames "abc" root) :direction :output :element-type '(unsigned-byte 8) :if-exists :s...
null
https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/test/http/file.lisp
lisp
(in-package :http-test) (in-suite :http-test) (test file-size (it (with-static-files (root "abc") (with-open-file (stream (merge-pathnames "abc" root) :direction :output :element-type '(unsigned-byte 8) :if-exists :s...
33355df0760ff730d0e071113376a78ced9aa2d09842470701fe8fbfe8e3d0d6
mstksg/advent-of-code-2021
Day16.hs
-- | Module : AOC.Challenge . -- License : BSD3 -- -- Stability : experimental -- Portability : non-portable -- Day 16 . See " AOC.Solver " for the types used in this module ! module AOC.Challenge.Day16 ( day16a , day16b ) where import AOC.Common (TokStream(..), digi...
null
https://raw.githubusercontent.com/mstksg/advent-of-code-2021/0b934c388d1757ab1be056f33dc2b1d56d45a2ad/src/AOC/Challenge/Day16.hs
haskell
| License : BSD3 Stability : experimental Portability : non-portable includes the length of items parsed
Module : AOC.Challenge . Day 16 . See " AOC.Solver " for the types used in this module ! module AOC.Challenge.Day16 ( day16a , day16b ) where import AOC.Common (TokStream(..), digitToIntSafe, parseBinary, toBinaryFixed) import AOC.Solver ((:~>)(..))...
e820c31b8ae04db7dca25f03974e0f8e9c5ba408e3f137d6b312a3f691e03ac8
TrustInSoft/tis-interpreter
initial_state.mli
Modified by TrustInSoft (**************************************************************************) (* *) This file is part of Frama - C. (* ...
null
https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/value/legacy/initial_state.mli
ocaml
************************************************************************ alternatives) ...
Modified by TrustInSoft This file is part of Frama - C. Copyright ( C ) 2007 - 2015 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Softwa...
3d932a787b72cbbf707878481ab4468ebef747ad325609a10dc8f65310335328
dizengrong/erlang_game
util_math.erl
@author dzR < > %% @doc 和数学运算相关的方法 -module (util_math). -export([ceil/1, floor/1, ceil_div/2]). %% @doc 向上取整 ceil(N) -> T = trunc(N), case N == T of true -> T; false -> 1 + T end. @doc 向下取整 floor(X) -> T = trunc(X), case (X < T) of true -> T - 1; _ -> T ...
null
https://raw.githubusercontent.com/dizengrong/erlang_game/4598f97daa9ca5eecff292ac401dd8f903eea867/gerl/src/util/util_math.erl
erlang
@doc 和数学运算相关的方法 @doc 向上取整 @doc 对A除以B的商向上取整
@author dzR < > -module (util_math). -export([ceil/1, floor/1, ceil_div/2]). ceil(N) -> T = trunc(N), case N == T of true -> T; false -> 1 + T end. @doc 向下取整 floor(X) -> T = trunc(X), case (X < T) of true -> T - 1; _ -> T end. ceil_div(A, B) -> C = A d...
108a1f4b1d63a1ec8ab7b4072ccdbcc65298db66ff0326e4fbc7d1c211c9e6ee
ulricha/dsh
Common.hs
module Database.DSH.VSL.Opt.Properties.Common where import Control.Monad import Database.DSH.VSL.Opt.Properties.Types unpack :: Show a => String -> VectorProp a -> Either String a unpack _ (VProp b) = Right b unpack moduleName p = Left $ "no single vector in " ++ moduleName ++ " " ++ (show p) mapUnpack :: Show a =...
null
https://raw.githubusercontent.com/ulricha/dsh/e6cd5c6bea575e62a381e89bfc4cc7cb97485106/src/Database/DSH/VSL/Opt/Properties/Common.hs
haskell
module Database.DSH.VSL.Opt.Properties.Common where import Control.Monad import Database.DSH.VSL.Opt.Properties.Types unpack :: Show a => String -> VectorProp a -> Either String a unpack _ (VProp b) = Right b unpack moduleName p = Left $ "no single vector in " ++ moduleName ++ " " ++ (show p) mapUnpack :: Show a =...
80d7c12e5578769030887017692f9beb175c868b96897e0c62162475e9a26608
Quid2/zm
K306f1981b41c.hs
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} module Test.ZM.ADT.Bool.K306f1981b41c (Bool(..)) where import qualified Prelude(Eq,Ord,Show) import qualified GHC.Generics import qualified Flat import qualified Data.Model data Bool = False | True deriving (Prelude.Eq, Prelude.Ord, Prelud...
null
https://raw.githubusercontent.com/Quid2/zm/02c0514777a75ac054bfd6251edd884372faddea/test/Test/ZM/ADT/Bool/K306f1981b41c.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE DeriveGeneric #
module Test.ZM.ADT.Bool.K306f1981b41c (Bool(..)) where import qualified Prelude(Eq,Ord,Show) import qualified GHC.Generics import qualified Flat import qualified Data.Model data Bool = False | True deriving (Prelude.Eq, Prelude.Ord, Prelude.Show, GHC.Generics.Generic, Flat.Flat) instance Data.Model.Mod...
98cba1ba0f9b6558c1b31822c5c6f45daee6f90cc7a5f6b267addb02f75840b6
input-output-hk/iohk-monitoring-framework
IOManager.hs
-- -- copied from -output-hk/ouroboros-network -- # LANGUAGE CPP # {-# LANGUAGE RankNTypes #-} | A shim layer for ` Win32 - network ` 's ` IOManager ` -- module Cardano.BM.IOManager ( module X ) where import System.IOManager as X
null
https://raw.githubusercontent.com/input-output-hk/iohk-monitoring-framework/21e00a449029fc7e864869d1b1aecd2834157083/iohk-monitoring/src/Cardano/BM/IOManager.hs
haskell
copied from -output-hk/ouroboros-network # LANGUAGE RankNTypes #
# LANGUAGE CPP # | A shim layer for ` Win32 - network ` 's ` IOManager ` module Cardano.BM.IOManager ( module X ) where import System.IOManager as X
58cdf16776bd9476b3f05885cce399c82c88de60635dc4def145c5dc256be06e
biokoda/actordb_core
actordb_tunnel.erl
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 /. -module(actordb_tunnel). -behaviour(gen_server). -export([start/0,stop/0, init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code...
null
https://raw.githubusercontent.com/biokoda/actordb_core/8dcd08a0897055af89c3ce20d99ed5e64d0c33eb/src/actordb_tunnel.erl
erlang
Every write thread in actordb_driver uses a TCP "tunnel" to replicate data. Generated pages during writes get sent over to nodes in cluster. Write threads are dumb what this data is. The receiving node has a circuit breaker (actordb_util:actor_ae_stream) for every actor. If the receiver does not want the data (r...
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 /. -module(actordb_tunnel). -behaviour(gen_server). -export([start/0,stop/0, init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code...
ba9921550e8cc40dd348f4ca315f8f2f41e3f1359937dd013008726ba7352cb1
ulrikstrid/ocaml-oidc
Internal.ml
open Utils let to_string_body (res : Piaf.Response.t) = Piaf.Body.to_string res.body let read_registration ~http_client ~client_id ~(discovery : Oidc.Discover.t) = match discovery.registration_endpoint with | Some endpoint -> ( let open Lwt_result.Infix in let registration_path = endpoint |> Uri.path in ...
null
https://raw.githubusercontent.com/ulrikstrid/ocaml-oidc/5e295f86fc6090815caf3a4acb555fccd62b8d2b/oidc-client/Internal.ml
ocaml
TODO: Move to oidc lib
open Utils let to_string_body (res : Piaf.Response.t) = Piaf.Body.to_string res.body let read_registration ~http_client ~client_id ~(discovery : Oidc.Discover.t) = match discovery.registration_endpoint with | Some endpoint -> ( let open Lwt_result.Infix in let registration_path = endpoint |> Uri.path in ...
2b6f72ac1620334be7fe38e855bee91c913e02543a09a15e732e220580c45c45
abella-prover/abella
test_prover.ml
open OUnit open Test_helper open Term open Metaterm open Prover let assert_n_subgoals n = if n <> 1 + List.length !subgoals then assert_failure ("Expected " ^ (string_of_int n) ^ " subgoal(s), " ^ "but current proof state is,\n\n" ^ get_display ()) let assert_proof proof_function = try ...
null
https://raw.githubusercontent.com/abella-prover/abella/d3a2d56b750cab84c3bee46ab041d37ad5f8addd/test/test_prover.ml
ocaml
open OUnit open Test_helper open Term open Metaterm open Prover let assert_n_subgoals n = if n <> 1 + List.length !subgoals then assert_failure ("Expected " ^ (string_of_int n) ^ " subgoal(s), " ^ "but current proof state is,\n\n" ^ get_display ()) let assert_proof proof_function = try ...
c14d27e518e8833c30cd9908b2737b8986827081dd0a6b4f11d87a8dc0aa0fee
Eduap-com/WordMat
c1f4kb.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $...
null
https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/fftpack5/lisp/c1f4kb.lisp
lisp
Compiled by f2cl version: Using Lisp CMU Common Lisp snapshot-2020-04 (21D Unicode) Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format single-float))
( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl6.l , v 1d5cbacbb9...
87f3d24f4b767b9e532a724f7218d8d82c5a7b9779d07bc3d1a25cd6b50f02e2
Kappa-Dev/KappaTools
ode_loggers_sig.ml
type ode_var_id = int let int_of_ode_var_id i = i type variable = | Expr of int | Init of int | Initbis of int | Concentration of int | Deriv of int | Obs of int | Jacobian of int * int | Jacobian_var of int * int | Tinit | Tend | InitialStep | MaxStep | RelTol | AbsTol | Period_t_points...
null
https://raw.githubusercontent.com/Kappa-Dev/KappaTools/7ebbae0b0387144292b8e25dd8be6b7c9a1f6c75/core/odes/ode_loggers_sig.ml
ocaml
type ode_var_id = int let int_of_ode_var_id i = i type variable = | Expr of int | Init of int | Initbis of int | Concentration of int | Deriv of int | Obs of int | Jacobian of int * int | Jacobian_var of int * int | Tinit | Tend | InitialStep | MaxStep | RelTol | AbsTol | Period_t_points...
ad350622674f215fcd6f55f65d312df0ea4f0cdbe55f744510cd26eda43ae4a9
agda/fix-whitespace
QuickCheck.hs
# LANGUAGE TemplateHaskell # -- | Test 'dropWhileEnd1'. module Main where import Data.Maybe ( isJust ) import Test.QuickCheck.All ( allProperties ) import Test.Tasty ( defaultMain ) import Test.Tasty.QuickCheck ( testProperties ) import Data.List.Extra.Drop ( dropWhile1, dropWhileEnd1 ) ...
null
https://raw.githubusercontent.com/agda/fix-whitespace/37220b71a7058c64f4dd7401c9755af1003f931d/test/QuickCheck.hs
haskell
| Test 'dropWhileEnd1'. Example: predicate 'not' holds only for 'False'. | If the predicate is *not* a singleton, this relation does not hold. Just True Just False
# LANGUAGE TemplateHaskell # module Main where import Data.Maybe ( isJust ) import Test.QuickCheck.All ( allProperties ) import Test.Tasty ( defaultMain ) import Test.Tasty.QuickCheck ( testProperties ) import Data.List.Extra.Drop ( dropWhile1, dropWhileEnd1 ) | If the predicate is true...
0995a57e9ef4a35c5517ac9c1c51cba6bca94ef490005288de4ca3d486be142b
chetmurthy/ensemble
appl_handle.mli
(**************************************************************) (* APPL_HANDLE.MLI *) Author : , 10/97 (**************************************************************) open Trans open Util (**************************************************************) BUG : handle and handle_gen should be opaque . *) type...
null
https://raw.githubusercontent.com/chetmurthy/ensemble/8266a89e68be24a4aaa5d594662e211eeaa6dc89/ensemble/server/type/appl_handle.mli
ocaml
************************************************************ APPL_HANDLE.MLI ************************************************************ ************************************************************ ************************************************************ **********************************************************...
Author : , 10/97 open Trans open Util BUG : handle and handle_gen should be opaque . *) type handle = { mutable endpt : Endpt.id ; mutable rank : int } type origin = handle type rank = handle type dests = handle array type handle_gen = unit type ('cast_msg, 'send_msg) action = | Cast of 'cast...
9975a714391f215b38f3c11270264746476e033a416c664552e63eb4e9f7eccc
cyverse-archive/DiscoveryEnvironmentBackend
project.clj
(use '[clojure.java.shell :only (sh)]) (require '[clojure.string :as string]) (defn git-ref [] (or (System/getenv "GIT_COMMIT") (string/trim (:out (sh "git" "rev-parse" "HEAD"))) "")) (defproject template-mover "5.0.0" :description "Utility to copy metadata templates to their new database." :url "...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/tools/template-mover/project.clj
clojure
(use '[clojure.java.shell :only (sh)]) (require '[clojure.string :as string]) (defn git-ref [] (or (System/getenv "GIT_COMMIT") (string/trim (:out (sh "git" "rev-parse" "HEAD"))) "")) (defproject template-mover "5.0.0" :description "Utility to copy metadata templates to their new database." :url "...
8fcc9ead61e8990ab2e09fc352e08ae91bb1f112af3be83d391c38d8ab8ff7a1
expipiplus1/vulkan
VK_KHR_external_semaphore_win32.hs
{-# language CPP #-} -- | = Name -- -- VK_KHR_external_semaphore_win32 - device extension -- -- == VK_KHR_external_semaphore_win32 -- -- [__Name String__] -- @VK_KHR_external_semaphore_win32@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 79 -- -- [__Revision__] ...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/ebc0dde0bcd9cf251f18538de6524eb4f2ab3e9d/src/Vulkan/Extensions/VK_KHR_external_semaphore_win32.hs
haskell
# language CPP # | = Name VK_KHR_external_semaphore_win32 - device extension == VK_KHR_external_semaphore_win32 [__Name String__] @VK_KHR_external_semaphore_win32@ [__Extension Type__] Device extension [__Registered Extension Number__] 79 [__Revision__] [__Extension and Version Dependencie...
1 - Requires support for Vulkan 1.0 - 2016 - 10 - 21 - , NVIDIA - , NVIDIA - , NVIDIA export semaphore payload to and import semaphore payload from Windows - ' SemaphoreGetWin32HandleInfoKHR ' - Extending ' Vulkan . Core10.QueueSemaphore . ' ...
262ad2867a237744be9fbf141d14c794a46b9706ff949ff20b48f72edda289fd
clash-lang/clash-compiler
WarnAlways.hs
# LANGUAGE DataKinds # {-# LANGUAGE OverloadedStrings #-} module WarnAlways where import Clash.Prelude hiding (Text) import Clash.Annotations.Primitive (warnAlways) import Clash.Netlist.Types (BlackBox(BBTemplate)) import Clash.Netlist.BlackBox.Types (BlackBoxFunction, emptyBlackBoxMeta, Element(ArgGen,Text)) import ...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/PrimitiveGuards/WarnAlways.hs
haskell
# LANGUAGE OverloadedStrings # # ANN primitive (InlinePrimitive [VHDL] "[ { \"BlackBoxHaskell\" : { \"name\" : \"WarnAlways.primitive\", \"templateFunction\" : \"WarnAlways.primitiveTF\"}} ]") #
# LANGUAGE DataKinds # module WarnAlways where import Clash.Prelude hiding (Text) import Clash.Annotations.Primitive (warnAlways) import Clash.Netlist.Types (BlackBox(BBTemplate)) import Clash.Netlist.BlackBox.Types (BlackBoxFunction, emptyBlackBoxMeta, Element(ArgGen,Text)) import Clash.Annotations.Primitive (Primit...
2aa7ea341273a3e157d92f535308400bd3f0543b6270bf9c72fb3d5d2c10c224
2600hz-archive/whistle
riak_core_apl.erl
%% ------------------------------------------------------------------- %% riak_core : Core Active Preference Lists %% Copyright ( c ) 2007 - 2010 Basho Technologies , 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 ...
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/riak_core-0.14.0/src/riak_core_apl.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 permissi...
riak_core : Core Active Preference Lists Copyright ( c ) 2007 - 2010 Basho Technologies , 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 ...
68e3429d11f333147ba3548fa72152551c86a505db39bc0bd334e757d62d7d79
mythical-linux/rktfetch
logo.rkt
#!/usr/bin/env racket #lang racket/base (require "helpers/logos.rkt" (only-in "helpers/string.rkt" string-remove) (only-in racket/string string-contains?) ) (provide get-logo) (define (get-logo os distro) (let ( [dist (string-remove (string-downcase distro) "linux")] ;; initial logo ...
null
https://raw.githubusercontent.com/mythical-linux/rktfetch/b4e7aa6030b09d32e6e8dbee1ad5197b73a8139b/rktfetch/private/get/logo.rkt
racket
initial logo
#!/usr/bin/env racket #lang racket/base (require "helpers/logos.rkt" (only-in "helpers/string.rkt" string-remove) (only-in racket/string string-contains?) ) (provide get-logo) (define (get-logo os distro) (let ( [dist (string-remove (string-downcase distro) "linux")] [logo (if (string-co...
e10b92697c3777ed787f5383262a873cd248c1dff9ae4e27644ec13151d3b674
screenshotbot/screenshotbot-oss
object.lisp
MOP based object subsystem for the BKNR datastore Internal slots should have a different slot descriptor class , ( setf ;; slot-value-using-class) should only be defined for ;; application-defined slots, not internal slots (like ID, maybe ;; others). ;; get-internal-real-time, get-internal-run-time, get-universal...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/3eaa883800031a1b041cc81ee58f1f2ca8c40bde/third-party/bknr.datastore/src/data/object.lisp
lisp
slot-value-using-class) should only be defined for application-defined slots, not internal slots (like ID, maybe others). get-internal-real-time, get-internal-run-time, get-universal-time need to be shadowed and disallowed. class ~A has been changed. To ensure correct schema ~ It might be better to do the error ...
MOP based object subsystem for the BKNR datastore Internal slots should have a different slot descriptor class , ( setf (in-package :bknr.datastore) (define-condition inconsistent-slot-persistence-definition (store-error) ((class :initarg :class) (slot-name :initarg :slot-name)) (:report (lambda (e strea...
ebe9ac9a244f458fbc1d146ec2ac3a6c462ba29aca7ab0ddc193dc5343d7794b
SRI-CSL/f3d
lcl-pkg.lisp
(in-package :cl-user) The minimal package definition for : LCL to support QFFI (defpackage :lcl (:use #+sbcl :common-lisp #-sbcl :lisp) (:import-from :asdf asdf::getenv) #+cmu (:import-from :ext memq assq) #+sbcl (:import-from :SB-INT memq assq) #+allegro (:import-from excl memq assq) ) (in...
null
https://raw.githubusercontent.com/SRI-CSL/f3d/93285f582198bfbab33ca96ff71efda539b1bec7/f3d-core/lcl/lcl-pkg.lisp
lisp
(in-package :cl-user) The minimal package definition for : LCL to support QFFI (defpackage :lcl (:use #+sbcl :common-lisp #-sbcl :lisp) (:import-from :asdf asdf::getenv) #+cmu (:import-from :ext memq assq) #+sbcl (:import-from :SB-INT memq assq) #+allegro (:import-from excl memq assq) ) (in...
ac48b59e309fdea9475db7ee13252aaff96b0f2657a591b1fcb6f1d4c885ad9f
ucsd-progsys/liquidhaskell
Vector0a.hs
{-@ LIQUID "--expect-any-error" @-} module Vector0a () where import Language.Haskell.Liquid.Prelude import Data.Vector hiding(map, concat, zipWith, filter, foldl, foldr, (++)) xs = [1,2,3,4] :: [Int] vs = fromList xs prop0 = liquidAssertB ( x > = 0 ) where x = Prelude.head xs -- prop1 = liquidAssertB ( n...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/Vector0a.hs
haskell
@ LIQUID "--expect-any-error" @ where n = Prelude.length xs
module Vector0a () where import Language.Haskell.Liquid.Prelude import Data.Vector hiding(map, concat, zipWith, filter, foldl, foldr, (++)) xs = [1,2,3,4] :: [Int] vs = fromList xs prop0 = liquidAssertB ( x > = 0 ) where x = Prelude.head xs prop1 = liquidAssertB ( n > 0 ) prop2 = liquidAssertB ( Data.Vec...
0004ba8bb7e85ea80c163e1ad3c47dafa3d66d3303e3f69b712b81d1bc7a3398
ruhler/smten
Char.hs
module Smten.Base.GHC.Char (chr) where import GHC.Base TODO : Bounds check this like does . chr :: Int -> Char chr = unsafeChr
null
https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-base/Smten/Base/GHC/Char.hs
haskell
module Smten.Base.GHC.Char (chr) where import GHC.Base TODO : Bounds check this like does . chr :: Int -> Char chr = unsafeChr
3809ab28a2838b431db7e482e5af52d9d3e9d99ff78d66c6ce76219f12b7c798
arthur-adjedj/proof_assistant
parser_read.ml
module MenhirBasics = struct exception Error type token = | RPAREN | REDUC | ORG | ORD | OR | NOTG | NOTD | NOT | NAME of ( # 6 "C:\Users\aarth\IdeaProjects\Theorem_prover\pr_assistant\proof_read\parser_read.mly" (string) # 19 "C:\Users\aarth\IdeaProjects\T...
null
https://raw.githubusercontent.com/arthur-adjedj/proof_assistant/a47ae2e1012e77ed810de0f8c99a957571ad5c27/pr_assistant/proof_read/parser_read.ml
ocaml
module MenhirBasics = struct exception Error type token = | RPAREN | REDUC | ORG | ORD | OR | NOTG | NOTD | NOT | NAME of ( # 6 "C:\Users\aarth\IdeaProjects\Theorem_prover\pr_assistant\proof_read\parser_read.mly" (string) # 19 "C:\Users\aarth\IdeaProjects\T...
a76892436ddf2f586777bb323d8d9eeb61d6e7eeb6133bb13524055b60ddb711
cloojure/tupelo
snip.cljc
(ns tst.tupelo.core.snip (:use tupelo.core tupelo.test) (:require [clojure.pprint :as pprint] [tupelo.core :as t] ) #?(:clj (:require [flatland.ordered.map :as omap] [flatland.ordered.set :as oset] ))) #?(:clj (do (verify (let [r10 (range 10) ...
null
https://raw.githubusercontent.com/cloojure/tupelo/dbb4b12fd6f379803a74a6bdcf54726597ec0fdf/test/cljc/tst/tupelo/core/snip.cljc
clojure
--------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------- ***** must use `spyx-pretty` or `pprint` to avoid `#ordered-map (...)` syntax ***** ***** Enable debug code to see def...
(ns tst.tupelo.core.snip (:use tupelo.core tupelo.test) (:require [clojure.pprint :as pprint] [tupelo.core :as t] ) #?(:clj (:require [flatland.ordered.map :as omap] [flatland.ordered.set :as oset] ))) #?(:clj (do (verify (let [r10 (range 10) ...
79774cbfaafb960beb8c246b02e0a0060da870eb0d7830e8bbf5b31994264a4f
nd/sicp
5.9.scm
(define (make-operation-exp exp machine labels operations) (let ((op (lookup-prim (operation-exp-op exp) operations)) (aprocs (map (lambda (e) (if (label-exp? e) (error "Label as argument to operation -- make-operation-exp" e) (make-...
null
https://raw.githubusercontent.com/nd/sicp/d8587a0403d95af7c7bcf59b812f98c4f8550afd/ch05/5.9.scm
scheme
(define (make-operation-exp exp machine labels operations) (let ((op (lookup-prim (operation-exp-op exp) operations)) (aprocs (map (lambda (e) (if (label-exp? e) (error "Label as argument to operation -- make-operation-exp" e) (make-...
da9cd89bac360d61a5f6b3a72177e98e5ce5e0173997782878605ef4e0d374a3
roterski/syncrate-fulcro
post_form.cljs
(ns app.posts.ui.post-form (:require [app.posts.validations] [app.routing :refer [route-to!]] [app.ui.components :refer [field]] [clojure.set :refer [intersection subset?]] [com.fulcrologic.fulcro.dom :as dom :refer [div ul li p h1 h3 button]] [com.fulcrologic.fulcro.dom.events :as evt] [c...
null
https://raw.githubusercontent.com/roterski/syncrate-fulcro/3fda40b12973e64c7ff976174498ec512b411323/src/main/app/posts/ui/post_form.cljs
clojure
(ns app.posts.ui.post-form (:require [app.posts.validations] [app.routing :refer [route-to!]] [app.ui.components :refer [field]] [clojure.set :refer [intersection subset?]] [com.fulcrologic.fulcro.dom :as dom :refer [div ul li p h1 h3 button]] [com.fulcrologic.fulcro.dom.events :as evt] [c...
5283b74427aa11e90f17d97245967923dfbe1cd3846dfea39af6a59936a2da2f
garipovroma/hi
Action.hs
# LANGUAGE DeriveFunctor # module HW3.Action (HiPermission(..), PermissionException(..), HIO(..)) where import Control.Exception (Exception, throwIO) import Control.Monad (ap) import Data.ByteString (readFile, writeFile) import Data.Sequence (fromList) import Data.Set (Set, member) import Data.Text (pack, unpa...
null
https://raw.githubusercontent.com/garipovroma/hi/8fd0db19afa260083c6c3b39a622ff491c32013a/hw3/src/HW3/Action.hs
haskell
# LANGUAGE DeriveFunctor # module HW3.Action (HiPermission(..), PermissionException(..), HIO(..)) where import Control.Exception (Exception, throwIO) import Control.Monad (ap) import Data.ByteString (readFile, writeFile) import Data.Sequence (fromList) import Data.Set (Set, member) import Data.Text (pack, unpa...
62ef6379de27c46767ad2439ab2bff4fc3cfab1c202452a29a471ee48b658898
google/rysim
parsers.erl
%%%------------------------------------------------------------------- Copyright 2014 The RySim Authors . All rights reserved . %%% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %%% you may not use this file except in compliance with the License. %%% You may obtain a copy of the License at %...
null
https://raw.githubusercontent.com/google/rysim/afe19cea6415eb9d17e97f2f67280cf0b92eaa6e/erlang/rysim_des_actor_smp/src/parsers.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 im...
Copyright 2014 The RySim Authors . All rights reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(parsers). -export([init/0, process_experiment/1, process_model/1]). @spec init ( ) - > ok init() -> a...
c1c1c1d13637ad065ec821a9492779b6e6789243eec7ada8aa550c41dcb5f918
lpeterse/haskell-ssh
Client.hs
{-# LANGUAGE OverloadedStrings #-} module Spec.Client ( tests ) where import Test.Tasty tests :: TestTree tests = testGroup "Network.SSH.Client" []
null
https://raw.githubusercontent.com/lpeterse/haskell-ssh/d1a614b6bf30c4932ee5a66efcae6e71680b4819/test/Spec/Client.hs
haskell
# LANGUAGE OverloadedStrings #
module Spec.Client ( tests ) where import Test.Tasty tests :: TestTree tests = testGroup "Network.SSH.Client" []
5302f058675e2656dc0877d6f83ec5f2de4e5b9885b247c9c7ae6df285c74b6b
3b/3bgl-misc
test-shader.lisp
(cl:defpackage #:scenegraph-test-shaders (:use :3bgl-glsl/cl)) (cl:in-package #:scenegraph-test-shaders) (input position :vec4 :location 0) (input normal :vec3 :location 1) (input color :vec4 :location 2) ;; final output (output out-color :vec4 :stage :fragment) (uniform mv :mat4) (uniform mvp :mat4) (interface ...
null
https://raw.githubusercontent.com/3b/3bgl-misc/e3bf2781d603feb6b44e5c4ec20f06225648ffd9/scenegraph/test-shader.lisp
lisp
final output
(cl:defpackage #:scenegraph-test-shaders (:use :3bgl-glsl/cl)) (cl:in-package #:scenegraph-test-shaders) (input position :vec4 :location 0) (input normal :vec3 :location 1) (input color :vec4 :location 2) (output out-color :vec4 :stage :fragment) (uniform mv :mat4) (uniform mvp :mat4) (interface varyings (:out (...
376beab80d6c37ad85b7ef683d9c28229df1925ae2a4880283f6cf8c0534ecc0
ocaml/ocaml-re
posix.mli
RE - A regular expression library Copyright ( C ) 2001 email : 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 , with linking exception ; either version ...
null
https://raw.githubusercontent.com/ocaml/ocaml-re/55f9478e64cb65ce583e586f2ed3837677530ddb/lib/posix.mli
ocaml
parse a line groups can be obtained directly by index within [substrings] regex didn't match XXX Character classes * Errors that can be raised during the parsing of the regular expression * [compile r] is defined as [Core.compile (Core.longest r)]
RE - A regular expression library Copyright ( C ) 2001 email : 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 , with linking exception ; either version ...
37a717983ecc47160a0899e8043dae3d0cdbd273dbb5dc0664ed9653558fd1c3
c-cube/tiny_httpd
Tiny_httpd_buf.mli
* Simple buffer . These buffers are used to avoid allocating too many byte arrays when processing streams and parsing requests . @since 0.12 These buffers are used to avoid allocating too many byte arrays when processing streams and parsing requests. @since 0.12 *) type t val size ...
null
https://raw.githubusercontent.com/c-cube/tiny_httpd/211d40a4b76a10a3d827fd11b2fa6db5dcc05772/src/Tiny_httpd_buf.mli
ocaml
* Simple buffer . These buffers are used to avoid allocating too many byte arrays when processing streams and parsing requests . @since 0.12 These buffers are used to avoid allocating too many byte arrays when processing streams and parsing requests. @since 0.12 *) type t val size ...
ade04fe39fbecef02afde996a3462ce5aba1db16df7ad8ac36462ad5531e3fc6
roterski/syncrate-fulcro
post_show_page.cljs
(ns app.posts.ui.post-show-page (:require [app.posts.ui.post :refer [Post ui-post]] [app.profiles.ui.profile :refer [Profile]] [app.auth.ui.session :refer [Session]] [app.comments.ui.new-comment-button :refer [ui-new-comment-button]] [app.comments.ui.comment :refer [ui-comment Comment]] [app.comment...
null
https://raw.githubusercontent.com/roterski/syncrate-fulcro/3fda40b12973e64c7ff976174498ec512b411323/src/main/app/posts/ui/post_show_page.cljs
clojure
(ns app.posts.ui.post-show-page (:require [app.posts.ui.post :refer [Post ui-post]] [app.profiles.ui.profile :refer [Profile]] [app.auth.ui.session :refer [Session]] [app.comments.ui.new-comment-button :refer [ui-new-comment-button]] [app.comments.ui.comment :refer [ui-comment Comment]] [app.comment...
df53f61914bd8b5e58065d43a701cdd39483ecf0bfa797828f72dd747b69390b
haskell-opengl/OpenGLRaw
Subtexture.hs
-------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.EXT.Subtexture Copyright : ( c ) 2019 -- License : BSD3 -- Maintainer : < > -- Stability : stable -- Portability : portable -- --------------------------------------------------...
null
https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/EXT/Subtexture.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.GL.EXT.Subtexture License : BSD3 Stability : stable Portability : portable ------------------------------------------------------------------------------ * Extension Support * Functions
Copyright : ( c ) 2019 Maintainer : < > module Graphics.GL.EXT.Subtexture ( glGetEXTSubtexture, gl_EXT_subtexture, glTexSubImage1DEXT, glTexSubImage2DEXT ) where import Graphics.GL.ExtensionPredicates import Graphics.GL.Functions
9b100ea0f2f3d9d6e474dca56a3f513de2dce93246f6982557810bacfc4c00f9
janestreet/memtrace_viewer_with_deps
unit.ml
module Stable = struct open Base.Export open Bin_prot.Std module V1 = struct module T = struct type t = unit [@@deriving bin_io, compare, sexp] end include T include Comparator.Stable.V1.Make (T) let%expect_test _ = print_endline [%bin_digest: t]; [%expect {| 86ba5df747eec...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/core_kernel/src/unit.ml
ocaml
module Stable = struct open Base.Export open Bin_prot.Std module V1 = struct module T = struct type t = unit [@@deriving bin_io, compare, sexp] end include T include Comparator.Stable.V1.Make (T) let%expect_test _ = print_endline [%bin_digest: t]; [%expect {| 86ba5df747eec...
b6f0f9efa6c19cd11069ac843f9e7e1e588e197d0853de1ece494ba371f89a0c
yminer/libml
check.ml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * [ LibML - Machine Learning Library ] Copyright ( C ) 2002 - 2003 LAGACHERIE This program is free software ; you can redistribute it and/or modify it under the te...
null
https://raw.githubusercontent.com/yminer/libml/1475dd87c2c16983366fab62124e8bbfbbf2161b/src/nn/propagate/check.ml
ocaml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * [ LibML - Machine Learning Library ] Copyright ( C ) 2002 - 2003 LAGACHERIE This program is free software ; you can redistribute it and/or modify it under the te...
804f0df1521b3fb206f84b799636acd7c899d126e7fa30bd8606d706a2f58b82
vseloved/cl-nlp
math.lisp
( c ) 2013 - 2017 Vsevolod Dyomkin (in-package #:nlp.util) (named-readtables:in-readtable rutilsx-readtable) (defparameter +inf most-positive-fixnum) (defun argmax (fn vals &key (test #'>) (key #'identity) (min (- most-positive-fixnum))) "Return the val from VALS which is the argument for maxi...
null
https://raw.githubusercontent.com/vseloved/cl-nlp/f180b6c3c0b9a3614ae43f53a11bc500767307d0/src/util/math.lisp
lisp
( c ) 2013 - 2017 Vsevolod Dyomkin (in-package #:nlp.util) (named-readtables:in-readtable rutilsx-readtable) (defparameter +inf most-positive-fixnum) (defun argmax (fn vals &key (test #'>) (key #'identity) (min (- most-positive-fixnum))) "Return the val from VALS which is the argument for maxi...
af847ed1a1963c30c9e610d1c01e75d880a5bd20366ff1a56859dcfc276b5f8e
mark-watson/loving-common-lisp
package.lisp
(defpackage #:wolfram (:use #:cl #:uiop) (:export #:wolfram #:cleanup-lists #:find-answer-in-text #:entities))
null
https://raw.githubusercontent.com/mark-watson/loving-common-lisp/32f6abf3d2e500baeffd15c085a502b03399a074/src/wolfram/package.lisp
lisp
(defpackage #:wolfram (:use #:cl #:uiop) (:export #:wolfram #:cleanup-lists #:find-answer-in-text #:entities))
b78994b3eca1ba9812fcb15cef8a93e8849ff2ce1e5f3dfd8c62aca1c358a34d
NB-Iot/emqx-hw-coap
emqx_hw_coap_resource.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2016 - 2017 EMQ Enterprise , 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 %% %% ...
null
https://raw.githubusercontent.com/NB-Iot/emqx-hw-coap/76436492a22eaa0cd6560b4f135275ecf16245d0/src/emqx_hw_coap_resource.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2016 - 2017 EMQ Enterprise , Inc. ( ) Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_hw_coap_resource). -behaviour(lwm2m_coap_resource). -include("emqx_hw_coap.hrl"). -include_lib("lwm2m_c...
05706bf29ecf3cb9b85989210044fef6007f39a6622e4e0f5b7a1782176b564e
ocsigen/js_of_ocaml
intersectionObserver.mli
(** The Intersection Observer API provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport. -US/docs/Web/API/Intersection_Observer_API *) class type intersectionObserverEntry = object method target : Dom...
null
https://raw.githubusercontent.com/ocsigen/js_of_ocaml/58210fabc947c4839b6e71ffbbf353a4ede0dbb7/lib/js_of_ocaml/intersectionObserver.mli
ocaml
* The Intersection Observer API provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport. -US/docs/Web/API/Intersection_Observer_API
class type intersectionObserverEntry = object method target : Dom.node Js.t Js.readonly_prop method boundingClientRect : Dom_html.clientRect Js.t Js.readonly_prop method rootBounds : Dom_html.clientRect Js.t Js.opt Js.readonly_prop method intersectionRect : Dom_html.clientRect Js.t Js.readonly_pro...
31f58c60edd33ff2cd57da63c919787be94da90f712ce8ac8679390d4c0e15ea
mirage/irmin
schema.mli
* Copyright ( c ) 2018 - 2022 Tarides < > * * 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...
null
https://raw.githubusercontent.com/mirage/irmin/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/src/irmin-tezos/schema.mli
ocaml
* Copyright ( c ) 2018 - 2022 Tarides < > * * 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...
f39e6b5147d3bad8c0f7509ec5cde5025986cc38ddc4269fabd6b36296295b75
pfdietz/ansi-test
format-goto.lsp
;-*- Mode: Lisp -*- Author : Created : Tue Aug 24 06:56:13 2004 ;;;; Contains: Tests of the ~* format directive ;;; ~* (def-format-test format.*.1 "~A~*~A" (1 2 3) "13") (def-format-test format.*.2 "~A~0*~A" (1 2 3) "12" 1) (def-format-test format.*.3 "~A~v*~A" (1 0 2) "12") (def-format-te...
null
https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/printer/format/format-goto.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of the ~* format directive ~* ~:* ~@*
Author : Created : Tue Aug 24 06:56:13 2004 (def-format-test format.*.1 "~A~*~A" (1 2 3) "13") (def-format-test format.*.2 "~A~0*~A" (1 2 3) "12" 1) (def-format-test format.*.3 "~A~v*~A" (1 0 2) "12") (def-format-test format.*.4 "~A~v*~A" (1 1 2 3) "13") (def-format-test format.*.5 "~A~v*...
ee7e416a435104584805a08c735bb34a3916e9dae2b2afad40a5b58c42804022
PowerMeMobile/smppload
smppload_lazy_messages.erl
-module(smppload_lazy_messages). -export([ init/2, deinit/1, get_next/1 ]). -include("smppload_lazy_messages.hrl"). -include("message.hrl"). -export([behaviour_info/1]). -spec behaviour_info(atom()) -> [{atom(), arity()}] | undefined. behaviour_info(callbacks) -> [{init, 1}, {deinit, 1}, {get_next, 1...
null
https://raw.githubusercontent.com/PowerMeMobile/smppload/3130eaa95ed1e69ace551dc7be9c9509d05fde2a/src/smppload_lazy_messages.erl
erlang
-module(smppload_lazy_messages). -export([ init/2, deinit/1, get_next/1 ]). -include("smppload_lazy_messages.hrl"). -include("message.hrl"). -export([behaviour_info/1]). -spec behaviour_info(atom()) -> [{atom(), arity()}] | undefined. behaviour_info(callbacks) -> [{init, 1}, {deinit, 1}, {get_next, 1...
4d205b1e24a0745e8dc7dfde4ecd39afc817c4de0fe78b127bc762c968f9aa2e
dmjio/miso
Element.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE NoImplicitPrelude # ----------------------------------------------------------------------------- -- | Module : Miso . . Element Copyright : ( C ) 2016 - 2018 -- License : BSD3-style (see the file LICENSE) Maintainer : < > -- Stability ...
null
https://raw.githubusercontent.com/dmjio/miso/339505587fd8576c7f89484d3a4244732a9f00e6/src/Miso/Mathml/Element.hs
haskell
# LANGUAGE OverloadedStrings # --------------------------------------------------------------------------- | License : BSD3-style (see the file LICENSE) Stability : experimental Portability : non-portable -------------------------------------------------------------------------- * Construct an Element | ...
# LANGUAGE NoImplicitPrelude # Module : Miso . . Element Copyright : ( C ) 2016 - 2018 Maintainer : < > module Miso.Mathml.Element nodeMathml ) where import Miso.Html.Types import Miso.String (MisoString) import qualified Prelude as P nodeMathml ::...
17fddd88ef0a76a1ece6b78ffb8752e0f9b973b88b8f27daed6d2ce890971ce0
tek/polysemy-log
DataLog.hs
{-# options_haddock prune #-} -- |Description: Internal module Polysemy.Log.Effect.DataLog where import Polysemy.Time (GhcTime) import Prelude hiding (local) import Polysemy.Log.Data.LogEntry (LogEntry, annotate) import Polysemy.Log.Data.LogMessage (LogMessage (LogMessage)) import Polysemy.Log.Data.Severity (Severit...
null
https://raw.githubusercontent.com/tek/polysemy-log/e4a8b494a88809b60b8298b3a345382f750a6ed4/packages/polysemy-log/lib/Polysemy/Log/Effect/DataLog.hs
haskell
# options_haddock prune # |Description: Internal Can also be used on its own, or reinterpreted into an effect like those from /co-log/ or /di/. |Schedule an arbitrary value for logging. |Stores the provided function in the interpreter and applies it to all log messages emitted within the higher-order |Log a text ...
module Polysemy.Log.Effect.DataLog where import Polysemy.Time (GhcTime) import Prelude hiding (local) import Polysemy.Log.Data.LogEntry (LogEntry, annotate) import Polysemy.Log.Data.LogMessage (LogMessage (LogMessage)) import Polysemy.Log.Data.Severity (Severity (Crit, Debug, Error, Info, Trace, Warn)) |Structura...
c2b92c85dde2337b344d03ab141396d4c6a76c7678afce679d5441072c0d23b6
xvw/ocamlectron
Size.mli
(** Describe a Size *) open Js_of_ocaml open Js class type size = object method width : int readonly_prop method height : int readonly_prop end type t = size Js.t
null
https://raw.githubusercontent.com/xvw/ocamlectron/3e0cb9575975e69ab34cb7e0e3549d31c07141c2/lib/electron_plumbing/Size.mli
ocaml
* Describe a Size
open Js_of_ocaml open Js class type size = object method width : int readonly_prop method height : int readonly_prop end type t = size Js.t
afad2458ce0351c30159b0540fbd0aa275e8eb488cc4feb030f281f34cef1cd2
AbstractMachinesLab/caramel
mconfig.ml
open Std (** {1 OCaml commandline parsing} *) let {Logger. log} = Logger.for_section "Mconfig" type ocaml = { include_dirs : string list; no_std_include : bool; unsafe : bool; classic : bool; principal : bool; real_paths : bool; threads ...
null
https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/src/kernel/mconfig.ml
ocaml
* {1 OCaml commandline parsing} * Some paths can be resolved relative to a current working directory * {1 Merlin high-level settings}
open Std let {Logger. log} = Logger.for_section "Mconfig" type ocaml = { include_dirs : string list; no_std_include : bool; unsafe : bool; classic : bool; principal : bool; real_paths : bool; threads : [ `None | `Threads | `Vmth...
ba4fc5da81a5bd945dbbfae55f31386b0eb1db0f9ea80e41529f0fd9caccd51b
district0x/district-registry
page.cljs
(ns district-registry.ui.home.page (:require [bignumber.core :as bn] [cljs-web3.core :as web3] [district-registry.ui.components.app-layout :refer [app-layout]] [district-registry.ui.components.nav :as nav] [district-registry.ui.components.stake :as stake] [district-registry.ui.contract.distric...
null
https://raw.githubusercontent.com/district0x/district-registry/c2dcf7978d2243a773165b18e7a76632d8ad724e/src/district_registry/ui/home/page.cljs
clojure
[:img.blob.spacer {:src "/images/svg/loader-blob.svg"}]
(ns district-registry.ui.home.page (:require [bignumber.core :as bn] [cljs-web3.core :as web3] [district-registry.ui.components.app-layout :refer [app-layout]] [district-registry.ui.components.nav :as nav] [district-registry.ui.components.stake :as stake] [district-registry.ui.contract.distric...
84b03472c5036cdd8c78475339c881a60f217a8435cf3369120c5082f8f65c59
VictorCMiraldo/generics-mrsop
Metadata.hs
# LANGUAGE UndecidableInstances # {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE GADTs #-} {-# LANGUAGE DataKinds #-} # LANGUAGE Po...
null
https://raw.githubusercontent.com/VictorCMiraldo/generics-mrsop/b66bb6c651297cdb71655663e34ab35812b38f72/src/Generics/MRSOP/Base/Metadata.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE RankNTypes # # LANGUAGE GADTs # # LANGUAGE DataKinds # # LANGUAGE StandaloneDeriving # |Metadata maintenance; usefull for pretty-printing values. |Since we only handled fully saturated datatypes, a 'DatatypeName' needs to r...
# LANGUAGE UndecidableInstances # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PolyKinds # module Generics.MRSOP.Base.Metadata where import Data.Proxy import Data.SOP.Constraint import Generics.MRSOP.Util import Generics.MRSO...
7d0257168d2e5ec104866145512290ab4334dc489d148f3352c48b1e4fec07bc
snoyberg/conduit
Fusion.hs
# LANGUAGE ExistentialQuantification # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE BangPatterns #-} # LANGUAGE DeriveFunctor # # LANGUAGE Trustworthy # # LANGUAGE ScopedTypeVariables # module Data.Conduit.Internal.Fusion ( -- ** Types Step (..) , Stream (..) , ConduitWithStream , StreamConduitT ,...
null
https://raw.githubusercontent.com/snoyberg/conduit/1771780ff4b606296924a28bf5d4433ae6a916f3/conduit/src/Data/Conduit/Internal/Fusion.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE BangPatterns # ** Types ** Functions | This is the same as stream fusion\'s Step. Constructors are renamed to avoid confusion with conduit names. # INLINE [0] unstream # # RULES "conduit: fuseStream (.|)" forall left right. unstream left .| unstream right = unstream (fuseS...
# LANGUAGE ExistentialQuantification # # LANGUAGE DeriveFunctor # # LANGUAGE Trustworthy # # LANGUAGE ScopedTypeVariables # module Data.Conduit.Internal.Fusion Step (..) , Stream (..) , ConduitWithStream , StreamConduitT , StreamConduit , StreamSource , StreamProducer , StreamSink ...
16bbefff330d7b5e6bc09ce4c76a7a40a2160857c679f32801eb57a954fa423f
herd/herdtools7
myLib.mli
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/lib/myLib.mli
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2013 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...
e6ed5a347185a60a9793c42dd80655d40ea13a73610bc98fde258a30a73e0ea1
cse-bristol/110-thermos-ui
tile.cljs
This file is part of THERMOS , copyright © Centre for Sustainable Energy , 2017 - 2021 Licensed under the Reciprocal Public License v1.5 . See LICENSE for licensing details . (ns thermos-frontend.tile (:require [reagent.core :as reagent] [leaflet :as leaflet] [thermos-frontend.operations ...
null
https://raw.githubusercontent.com/cse-bristol/110-thermos-ui/e13b96329f3c95e5a10bae431e8ae9bccdb475f4/src/thermos_frontend/tile.cljs
clojure
most of the work is in here - how to paint an individual tile onto the map if there is a solution we probably want to show the solution cleanly Render order: non-selected buildings, selected building shadows, selected buildings, non-selected paths, selected path shadows, selected paths clamp mm-over-...
This file is part of THERMOS , copyright © Centre for Sustainable Energy , 2017 - 2021 Licensed under the Reciprocal Public License v1.5 . See LICENSE for licensing details . (ns thermos-frontend.tile (:require [reagent.core :as reagent] [leaflet :as leaflet] [thermos-frontend.operations ...
425831073be132e4c90e1594a68e0b145ea43e7b31001bd13c40643cec04be90
jgm/gitit
Github.hs
# LANGUAGE CPP , OverloadedStrings , ScopedTypeVariables # module Network.Gitit.Authentication.Github ( loginGithubUser , getGithubUser , GithubCallbackPars , GithubLoginError ...
null
https://raw.githubusercontent.com/jgm/gitit/fe36cd6074dfe27c7b30d65b49b593482943bc95/src/Network/Gitit/Authentication/Github.hs
haskell
^ Oauth2 configuration (client secret) ^ Authentication code gained after authorization ^ user email and name (password 'none')
# LANGUAGE CPP , OverloadedStrings , ScopedTypeVariables # module Network.Gitit.Authentication.Github ( loginGithubUser , getGithubUser , GithubCallbackPars , GithubLoginError ...