_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 |
|---|---|---|---|---|---|---|---|---|
3da0dcd9321a6d56dc0584e0c13481bd94b411a597ad5b37b84232972fecff00 | ceramic/remote-js | remote-js.lisp | (in-package :cl-user)
(defpackage remote-js-test
(:use :cl :fiveam)
(:export :run-tests))
(in-package :remote-js-test)
(def-suite tests
:description "remote-js tests.")
(in-suite tests)
(test context
(let ((received nil)
(ctx)
(file (asdf:system-relative-pathname :remote-js #p"t/test.html")))
... | null | https://raw.githubusercontent.com/ceramic/remote-js/148d8a6818a746ef3feeec207a23c6e09a0447cf/t/remote-js.lisp | lisp | (in-package :cl-user)
(defpackage remote-js-test
(:use :cl :fiveam)
(:export :run-tests))
(in-package :remote-js-test)
(def-suite tests
:description "remote-js tests.")
(in-suite tests)
(test context
(let ((received nil)
(ctx)
(file (asdf:system-relative-pathname :remote-js #p"t/test.html")))
... | |
fc6209e79cb54cfe12c884a1c2f077a0c5a6afce4c19120de45e8a1fca85ffd2 | yogthos/reagent-dnd | runner.cljs | (ns react-dnd-test.runner
(:require
[doo.runner :refer-macros [doo-tests]]
[react-dnd-test.test-core]))
(doo-tests 'react-dnd-test.test-core)
| null | https://raw.githubusercontent.com/yogthos/reagent-dnd/9830e240b5f2e372c40a633432d0593288ec6682/test/react_dnd_test/runner.cljs | clojure | (ns react-dnd-test.runner
(:require
[doo.runner :refer-macros [doo-tests]]
[react-dnd-test.test-core]))
(doo-tests 'react-dnd-test.test-core)
| |
38526ea35b3fcfcc5e04182b19eaaee07d6fe0ec92d654a32dcfd35e60100d88 | OCamlPro/techelson | make.ml | open Base
open Base.Common
(** Creates an interpreter from a base stack module and a contract environment module.
This functor contains the code actually interpreting the instructions. *)
module Interpreter (
S : Stack.Sigs.StackBase
) : Sigs.Interpreter with module Theory = S.Theory
= struct
module Stack... | null | https://raw.githubusercontent.com/OCamlPro/techelson/932fbf08675cd13d34a07e3b3d77234bdafcf5bc/src/6_interpreter/make.ml | ocaml | * Creates an interpreter from a base stack module and a contract environment module.
This functor contains the code actually interpreting the instructions.
Represents the end of a runtime block of instruction.
Read end of the body of an iteration.
# Arguments
- type of the elements
- ... | open Base
open Base.Common
module Interpreter (
S : Stack.Sigs.StackBase
) : Sigs.Interpreter with module Theory = S.Theory
= struct
module Stack = Stack.Make.Stack (S)
module Theory = Stack.Theory
module Env = Stack.Env
module Src = struct
module Theory = Theory
type transfer_inf... |
0302c929a8b26e138a0bfb49ca77532f8eabbb50e857d82926d39156ecec97cb | avsm/platform | tyxml_ppx.ml | TyXML
*
* Copyright ( C ) 2016
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your op... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/tyxml.4.3.0/ppx/tyxml_ppx.ml | ocaml | * Returns the real (OCaml) location of the content of a string, taking
delimiters into account.
[source] is a byte stream created from the string list, which calls
[!starting_a_string] each time it moves on to a new string in the
list.
* Antiquotations
We replace antiquotations expressions b... | TyXML
*
* Copyright ( C ) 2016
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your op... |
715c4c92258c74506ee73eb17f07f097f6db8bff5ce83e880ff4bb67ecf587d6 | bluemont/kria | object.clj | (ns kria.object
(:refer-clojure :exclude [get])
(:require
[kria.conversions :refer [byte-string?]]
[kria.core :refer [call]]
[kria.pb.object.delete :refer [DeleteReq->bytes]]
[kria.pb.object.get :refer [GetReq->bytes bytes->GetResp]]
[kria.pb.object.put :refer [PutReq->bytes bytes->PutResp]]))
(set!... | null | https://raw.githubusercontent.com/bluemont/kria/8ed7fb1ebda8bfa1a2a6d7a3acf05e2255fcf0f0/src/clojure/kria/object.clj | clojure | (ns kria.object
(:refer-clojure :exclude [get])
(:require
[kria.conversions :refer [byte-string?]]
[kria.core :refer [call]]
[kria.pb.object.delete :refer [DeleteReq->bytes]]
[kria.pb.object.get :refer [GetReq->bytes bytes->GetResp]]
[kria.pb.object.put :refer [PutReq->bytes bytes->PutResp]]))
(set!... | |
ff76ed12b4747bc8e58f8e0a2382eb9f846b6982442b08cf00a3278c746cd484 | Odie/gd-edit | batch.clj | (ns gd-edit.commands.batch
(:require [clojure.java.io :as io]
[clojure.string :as str]
[jansi-clj.core :refer [green red yellow]]
[gd-edit.commands.choose-character :as choose-character]
[gd-edit.commands.write :as write]
[gd-edit.utils :as u]
[g... | null | https://raw.githubusercontent.com/Odie/gd-edit/651d3367dc083f0d678dffe9608c9b5cc12038ad/src/gd_edit/commands/batch.clj | clojure | Sanity check
Do not setup the handler multiple times
Create a new handler for the INT signal
When the signal is detected...
Set a flag in the context atom
We're going to pick up the signal elsewhere
in the code
Hook in the new handler
Store away the old handler so it can be restored later
Store both handlers ... | (ns gd-edit.commands.batch
(:require [clojure.java.io :as io]
[clojure.string :as str]
[jansi-clj.core :refer [green red yellow]]
[gd-edit.commands.choose-character :as choose-character]
[gd-edit.commands.write :as write]
[gd-edit.utils :as u]
[g... |
affa4024445691555d6168315b907d73b75e517ee2c2ab4c4927bd5a91787fa2 | dmjio/stripe | Client.hs | {-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module : Web.Stripe.Client
Copyright : ( c ) , 2014
-- Maintainer :
-- Stability : experimental
-- Portability : POSIX
module Web.Stripe.Client
( module Web.Stripe.StripeRequest
, module Web.Stripe.Error
, module... | null | https://raw.githubusercontent.com/dmjio/stripe/967334629933fcb55247eb3270c7801c05d6bf61/stripe-core/src/Web/Stripe/Client.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
|
Module : Web.Stripe.Client
Maintainer :
Stability : experimental
Portability : POSIX
----------------------------------------------------------------------------
| Stripe secret key
---------------------------------------------------------... | Copyright : ( c ) , 2014
module Web.Stripe.Client
( module Web.Stripe.StripeRequest
, module Web.Stripe.Error
, module Web.Stripe.Util
, handleStream
, parseFail
, attemptDecode
, unknownCode
, defaultEndpoint
, Endpoint (..)
, Protocol (..)
, StripeConfig (... |
4736c70718a7d6039b6683c29246bff893a3a25d1aa3f0142a918ebcf3583088 | faylang/fay | ExportList_C.hs | module ExportList_C where
c = 42
| null | https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/tests/ExportList_C.hs | haskell | module ExportList_C where
c = 42
| |
e57deedbe370fd011bddca1216c49f24c3a93d85651ffc06fb3d0e6a05ecd9e0 | haskus/packages | Put.hs | -- | Put monad
--
FIXME : PutM uses slow ByteString builder ... We need to replace it with a
fast one
module Haskus.Binary.Put
( Put
, PutM
, runPut
, runPutM
-- * Put
, putBuffer
, putByteString
, putPadding
, putPaddingAlign
, putWord8
, putWord16le
, putWord16be
, putWord32... | null | https://raw.githubusercontent.com/haskus/packages/40ea6101cea84e2c1466bc55cdb22bed92f642a2/haskus-binary/src/lib/Haskus/Binary/Put.hs | haskell | | Put monad
* Put
| Execute Put
| Execute PutM
| Put a buffer
| Put null bytes
| Put a Word8
| Put a Word64 little-endian
| Put a Word64 big-endian | FIXME : PutM uses slow ByteString builder ... We need to replace it with a
fast one
module Haskus.Binary.Put
( Put
, PutM
, runPut
, runPutM
, putBuffer
, putByteString
, putPadding
, putPaddingAlign
, putWord8
, putWord16le
, putWord16be
, putWord32le
, putWord32be
, putWo... |
4fa481347fbb446432cedfc77facd2374d2a6e479f8d198ed3938e201a8dc1f2 | kappelmann/engaging-large-scale-functional-programming | Interface.hs | module Interface (E.Rule(..), E.LSystem(..), E.findRule,E.expandLSystem,E.execute,E.update) where
import qualified Exercise10 as E
| null | https://raw.githubusercontent.com/kappelmann/engaging-large-scale-functional-programming/99d8b76902320fd8f2d0999bbc9b2a82da09bc72/resources/turtle_graphics/test/Interface.hs | haskell | module Interface (E.Rule(..), E.LSystem(..), E.findRule,E.expandLSystem,E.execute,E.update) where
import qualified Exercise10 as E
| |
831e2470a67f5a8125a206c8fe12b0c7c4f08b8c536a69fa2b874e1e8940cf09 | paf31/dovetail | REPL.hs | # LANGUAGE BlockArguments #
# LANGUAGE ImportQualifiedPost #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Dovetail.REPL (defaultMain) where
import Control.Monad... | null | https://raw.githubusercontent.com/paf31/dovetail/60e00e247b643ad9c05e4137396ffddedcd8bcb6/dovetail/src/Dovetail/REPL.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
| Starts a minimal interactive debugger (REPL) session.
It is more likely that you will want to use the 'Dovetail.repl' function to
start a REPL session from within an 'Dovetail.InterpretT' block.
^ The default module, whose members will be ava... | # LANGUAGE BlockArguments #
# LANGUAGE ImportQualifiedPost #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
module Dovetail.REPL (defaultMain) where
import Control.Monad.Trans.Class (lift)
import Data.Set qualified as Set
import Data.Text qualifie... |
676061ad229c1f8242c119b8433cccae88edc341fc94661d0af722e03ddbbefc | subttle/regular | EFA.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ExistentialQuantification #
{-# OPTIONS_GHC -Wall #-}
module EFA where
import Data.Functor.Contravariant (Contravariant (..))
import qualified Data.List ... | null | https://raw.githubusercontent.com/subttle/regular/1a9e71cb1c43cb3215b9331efa98d4dcf21fbf9c/src/EFA.hs | haskell | # OPTIONS_GHC -Wall #
δ : Q × (Σ ∪ {ε}) → P(Q)
The initial state
The final states
TODO Coend? /~ross/papers/Constructors.pdf
N.B. this doesn't take the ε-closure.
δ★ : Q × (Σ ∪ {ε})★ → P(Q)
"Extended delta"
Extend the δ function to accept strings of symbols
TODO random untested/unclear design ... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ExistentialQuantification #
module EFA where
import Data.Functor.Contravariant (Contravariant (..))
import qualified Data.List as List
import qualified Data.List.NonEm... |
880f1899b9b66aa818fb6bea67124fc6db091c2b567b1c5a76c1b04c54488272 | janestreet/noise-wireguard-ocaml | generator.mli | open Core
type t
val init : Crypto.Public.key -> t Or_error.t
val consume_reply :
t:t -> msg:Messages.Cookie_reply.t_cstruct -> unit Core.Or_error.t
val add_macs : t:t -> msg:Messages.mac_message -> unit Core.Or_error.t
| null | https://raw.githubusercontent.com/janestreet/noise-wireguard-ocaml/4ec7a34d1778ab5c8ec16a6129277d4f77406616/cookies/generator.mli | ocaml | open Core
type t
val init : Crypto.Public.key -> t Or_error.t
val consume_reply :
t:t -> msg:Messages.Cookie_reply.t_cstruct -> unit Core.Or_error.t
val add_macs : t:t -> msg:Messages.mac_message -> unit Core.Or_error.t
| |
638543517936efca97717a7a3da4654d81f38f465704f9a499c30f5eda48d9ea | tov/shcaml | pkg.ml | #!/usr/bin/env ocaml
#use "topfind"
#require "topkg"
open Topkg
let codename = "Shmaltz"
shlock shmendrick shmegegge
shmutzik shnorrer shtik shtetl shtunk
shvitz
Used :
0.1.0 shmatta
0.1.1 shmooz
0.1.3 shmeer
0.2.0 shmaltz
shlemiel shlep shmendrick shmegegge
... | null | https://raw.githubusercontent.com/tov/shcaml/43ae852a00e3a11520f90f2451baa71863409774/pkg/pkg.ml | ocaml | #!/usr/bin/env ocaml
#use "topfind"
#require "topkg"
open Topkg
let codename = "Shmaltz"
shlock shmendrick shmegegge
shmutzik shnorrer shtik shtetl shtunk
shvitz
Used :
0.1.0 shmatta
0.1.1 shmooz
0.1.3 shmeer
0.2.0 shmaltz
shlemiel shlep shmendrick shmegegge
... | |
c80dd197fad0b0fcc0fbd4f4d6d3b3828e5739d4b8e89046acef6a60b2aef279 | snapframework/snap-server | Benchmark.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
# LANGUAGE ScopedTypeVariables #
module Snap.Internal.Http.Parser.Benchmark
( benchmarks )
where
import Control.Monad
import qualified Criterion.Main as C
import qualified Dat... | null | https://raw.githubusercontent.com/snapframework/snap-server/f9c6e00630a8a78705aceafa0ac046ae70e1310e/benchmark/Snap/Internal/Http/Parser/Benchmark.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
# LANGUAGE PackageImports # | # LANGUAGE ScopedTypeVariables #
module Snap.Internal.Http.Parser.Benchmark
( benchmarks )
where
import Control.Monad
import qualified Criterion.Main as C
import qualified Data.ByteString as S
import Snap.Internal.Http.Parser.Data
import Snap.Intern... |
65f16c0650c01c344f104e23aa641da436e6b6e0c6ba32f367a2bfc725bbfcff | openvstorage/alba | alba_client_download.ml |
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
open Slice
open Alba_statistics
open Alba_client_errors
open Lwt.Infix
let... | null | https://raw.githubusercontent.com/openvstorage/alba/459bd459335138d6b282d332fcff53a1b4300c29/ocaml/src/alba_client_download.ml | ocaml | consumers of this method are responsible for freeing
* the returned fragment bigstring
consumers of this method are responsible for freeing
* the returned fragment bigstring
only cache data fragments
consumers of this method are responsible for freeing
* the returned fragment bigstring
consumers of this ... |
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
open Slice
open Alba_statistics
open Alba_client_errors
open Lwt.Infix
let... |
5356e235a341b51bbf1b588a349b685174b4ff9a5efb83fd5280f36c502f0a5a | haskell/critbit | Benchmarks.hs | # LANGUAGE CPP , , ScopedTypeVariables , OverloadedStrings #
module Main (main) where
import Control.Applicative ((<$>))
import Control.Arrow (first)
import Control.DeepSeq (NFData(..))
import Control.Monad (when)
import Control.Monad.Trans (liftIO)
import Criterion.Main (bench, bgroup, defaultMain, nf, whnf)
import ... | null | https://raw.githubusercontent.com/haskell/critbit/91b02f5f91cb50c84041edc10afecf859ee118bf/benchmarks/Benchmarks.hs | haskell | The Map implementation immediately returns a tuple with lazy values,
so we need to force it to evaluate the update. | # LANGUAGE CPP , , ScopedTypeVariables , OverloadedStrings #
module Main (main) where
import Control.Applicative ((<$>))
import Control.Arrow (first)
import Control.DeepSeq (NFData(..))
import Control.Monad (when)
import Control.Monad.Trans (liftIO)
import Criterion.Main (bench, bgroup, defaultMain, nf, whnf)
import ... |
8634ee431222bc2ea93c4e852cac6fda1bf6c8409f80bd7dd5491c82192f1539 | LPCIC/matita | matitaGui.mli | Copyright ( C ) 2004 - 2005 , HELM Team .
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* is free software ; you can redistribute it and/or
* modify it under the terms of ... | null | https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/matita/matitaGui.mli | ocaml | * for debugging only | Copyright ( C ) 2004 - 2005 , HELM Team .
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* is free software ; you can redistribute it and/or
* modify it under the terms of ... |
8763eab925b80df8ec30f0f77cc0c0a7929bf53c724a32268e2a601bce281a1d | rjnw/sham | info.rkt | #lang info
(define pkg-desc "sam: scrap all macros")
(define collection 'multi)
| null | https://raw.githubusercontent.com/rjnw/sham/6e0524b1eb01bcda83ae7a5be6339da4257c6781/sham-sam/info.rkt | racket | #lang info
(define pkg-desc "sam: scrap all macros")
(define collection 'multi)
| |
dd0baa659685c47ac220fe8b7a25efc6d0526113386cc64eec92bfc4bbad7387 | restyled-io/restyler | Prelude.hs | module Restyler.Prelude
( module X
, module Restyler.Prelude
) where
import Relude as X hiding (exitSuccess, readFile, readFileBS, writeFile)
import Blammo.Logging as X
import Control.Error.Util as X (hush, note)
import Control.Monad.Extra as X (eitherM, fromMaybeM, maybeM)
import Control.Monad.IO.Unlift ... | null | https://raw.githubusercontent.com/restyled-io/restyler/e8d189400da25a273cee86e0c25ec7e360674f8b/src/Restyler/Prelude.hs | haskell | | Ignore an exception, warning about it
| Ignore an exception, warning about it and returning the given result | module Restyler.Prelude
( module X
, module Restyler.Prelude
) where
import Relude as X hiding (exitSuccess, readFile, readFileBS, writeFile)
import Blammo.Logging as X
import Control.Error.Util as X (hush, note)
import Control.Monad.Extra as X (eitherM, fromMaybeM, maybeM)
import Control.Monad.IO.Unlift ... |
6d7d0e73fe68ca58b068c214bbcd163d5f0d8ceeb2fb6db7c3c1b59877466a1b | hurricane/hurricane | hurricane_message_delegate.erl | %%% Provides multiplexing with multiple messages. The delegate applies
%%% common logic to all messaging and provides a way for each message
%%% to perform blocking operations in its own process. The most obvious
%%% need is the ability to wait for messages while applying timeout
%%% logic.
-module(hurricane_message_d... | null | https://raw.githubusercontent.com/hurricane/hurricane/be15b78952b9ae21aeca84a408ee0df82c018aa0/erl_modules/hurricane_message_delegate.erl | erlang | Provides multiplexing with multiple messages. The delegate applies
common logic to all messaging and provides a way for each message
to perform blocking operations in its own process. The most obvious
need is the ability to wait for messages while applying timeout
logic.
Takes a message, optionally applies a defa... |
-module(hurricane_message_delegate).
-export([send/2]).
send(Source, {MessageType, Destination, MessageTag, Message}) ->
Timeout = 10000,
send(Source, MessageType, Destination, MessageTag, Message, Timeout);
send(Source, {MessageType, Destination, MessageTag, Message, Timeout}) ->
send(Source, MessageTyp... |
a029da920ef4040b61f607481125fe59dab3edbc74f0e8e31500be6d992614dc | metabase/metabase | card_test.clj | (ns metabase-enterprise.sandbox.api.card-test
(:require
[clojure.test :refer :all]
[metabase-enterprise.test :as met]
[metabase.api.card-test :as api.card-test]
[metabase.models :refer [Card Collection Database PermissionsGroup PermissionsGroupMembership Table]]
[metabase.models.permissions :as perms]
... | null | https://raw.githubusercontent.com/metabase/metabase/dad3d414e5bec482c15d826dcc97772412c98652/enterprise/backend/test/metabase_enterprise/sandbox/api/card_test.clj | clojure | returns much more if not sandboxed
return BBQ if not sandboxed | (ns metabase-enterprise.sandbox.api.card-test
(:require
[clojure.test :refer :all]
[metabase-enterprise.test :as met]
[metabase.api.card-test :as api.card-test]
[metabase.models :refer [Card Collection Database PermissionsGroup PermissionsGroupMembership Table]]
[metabase.models.permissions :as perms]
... |
a011f29b6e0551b4319398204617427bf02742e81db327ed21c3d0f013b1f02d | mbj/stratosphere | CsvProperty.hs | module Stratosphere.SageMaker.MonitoringSchedule.CsvProperty (
CsvProperty(..), mkCsvProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CsvProperty
= CsvPro... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sagemaker/gen/Stratosphere/SageMaker/MonitoringSchedule/CsvProperty.hs | haskell | module Stratosphere.SageMaker.MonitoringSchedule.CsvProperty (
CsvProperty(..), mkCsvProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CsvProperty
= CsvPro... | |
75887080bf3b14af93a7d2a1c073fd8f959e5e4c277bc326bce1c6fe2d80bf16 | day8/re-frame-10x | subs.cljs | (ns day8.re-frame-10x.panels.traces.subs
(:require
[clojure.string :as string]
[day8.re-frame-10x.inlined-deps.re-frame.v1v1v2.re-frame.core :as rf]
[day8.re-frame-10x.tools.metamorphic :as metam]
[day8.re-frame-10x.navigation.epoc... | null | https://raw.githubusercontent.com/day8/re-frame-10x/199a9e6369e760b36d19b01c9fbbdd6266d0cf1b/src/day8/re_frame_10x/panels/traces/subs.cljs | clojure | Filter out view namespaces we don't care about.
Remove cached subscriptions. Could add this back in as a setting later
loop over traces, retain traces that match any of the queries
loop over traces and find events, then remove any events in `ignored events` | (ns day8.re-frame-10x.panels.traces.subs
(:require
[clojure.string :as string]
[day8.re-frame-10x.inlined-deps.re-frame.v1v1v2.re-frame.core :as rf]
[day8.re-frame-10x.tools.metamorphic :as metam]
[day8.re-frame-10x.navigation.epoc... |
a8e2e4d06352f7bfc2d6ddf8332a04af8561519de1a0fd1fe03705ba35230f9c | AndrasKovacs/ELTE-func-lang | Notes01_pre.hs |
- követelmény :
- gyak : minimum : 13 pont
- órai eleji kisfeladat : 0 - 2 pont ( 10 perc )
- nagy házi : félév során 3 darab , 4 - 4 pontért
- első hf félév közepén van kiírva
- mindegyik határideje : vizsgaidőszak eleje
- canvas - ra egy .hs :
- jegy ebből szárm... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/14e988192fe185d662ef89ee15788910ed0a755a/2022-23-1/gyak1/Notes01_pre.hs | haskell | # options_ghc -Wincomplete-patterns #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
vagy Prelude-ből standard függvényt.
" case "
xor' :: Bool -> Bool -> Bool
xor' x y = case x of
True -> _
False ... |
- követelmény :
- gyak : minimum : 13 pont
- órai eleji kisfeladat : 0 - 2 pont ( 10 perc )
- nagy házi : félév során 3 darab , 4 - 4 pontért
- első hf félév közepén van kiírva
- mindegyik határideje : vizsgaidőszak eleje
- canvas - ra egy .hs :
- jegy ebből szárm... |
7bc1b3f2da03c686688570f84c0e6c0f908f22ee9a00068b23317b48fb95ac81 | fakedata-haskell/fakedata | EsMxTextSpec.hs | # LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
module EsMxTextSpec where
import Data.Text (Text)
import qualified Data.Text as T
import Faker hiding (defaultFakerSettings)
import qualified Faker.Address as FA
import Faker.Combinators (listOf)
import qualified Faker.Company as CO
import qualified ... | null | https://raw.githubusercontent.com/fakedata-haskell/fakedata/e6fbc16cfa27b2d17aa449ea8140788196ca135b/test/EsMxTextSpec.hs | haskell | # LANGUAGE OverloadedStrings #
, PH.formats
, PH.cellPhoneFormat | # LANGUAGE ScopedTypeVariables #
module EsMxTextSpec where
import Data.Text (Text)
import qualified Data.Text as T
import Faker hiding (defaultFakerSettings)
import qualified Faker.Address as FA
import Faker.Combinators (listOf)
import qualified Faker.Company as CO
import qualified Faker.Internet as IN
import qualifi... |
0e1f92b799cc307a86978731e3407c9df4bac85acf7ec51406f9ef3c60412e28 | facebook/duckling | Corpus.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Quantity.MN.Corpus
( corpus
) where
import Data.Str... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Quantity/MN/Corpus.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Quantity.MN.Corpus
( corpus
) where
import Data.String
import Prelude
import Duckling.Locale
import Duckling.Resolve
import Duckling.Quantity.Types
import Duckling.Testing.Types
corpus :: Corpus
corpus = (testContext {locale = makeLocale MN No... |
53de0f49be4c60e4cdb005b08a8a36b35c015c54abaa1d33de452684f638d2fb | sbcl/sbcl | gc.lisp | ;;;; garbage collection and allocation-related code
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the pub... | null | https://raw.githubusercontent.com/sbcl/sbcl/d0784e17115e54ebffece8ecc5e6e542feb323f9/src/code/gc.lisp | lisp | garbage collection and allocation-related code
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
DYNAMIC-USAGE and friends
GET-BYTES-CONSED
the total number of bytes freed so far (including ... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB-KERNEL")
(declaim (inline dynamic-usage))
(defun dynamic-usage ()
#+gencgc
(extern-alien "bytes_alloca... |
e3f15fc3287d48b1e1ee9ebfa99b3d8c40508f71fad31971c997728960d8a60e | liebke/avout | mongo.clj | (ns avout.mongo
(:use avout.core)
(:require [avout.refs :as refs]
[avout.atoms :as atoms]
avout.refs.mongo
avout.atoms.mongo
[somnium.congomongo :as mongo]))
(defn mongo-ref
([zk-client mongo-conn name init-value & {:keys [validator]}]
(let [r (doto (mongo-ref... | null | https://raw.githubusercontent.com/liebke/avout/06f3e00d63f487ebd01581343302e96b915f5b03/plugins/avout-mongo/src/avout/mongo.clj | clojure |
mongo-atom examples
mongo-atom examples | (ns avout.mongo
(:use avout.core)
(:require [avout.refs :as refs]
[avout.atoms :as atoms]
avout.refs.mongo
avout.atoms.mongo
[somnium.congomongo :as mongo]))
(defn mongo-ref
([zk-client mongo-conn name init-value & {:keys [validator]}]
(let [r (doto (mongo-ref... |
95a5bf5fa5c547ac19f57d8f29288fd6026bfecd4d4b6a7584ba5e985365ae78 | sharplispers/montezuma | compound-file-io.lisp | (in-package #:montezuma)
(defclass compound-file-reader-file-entry ()
((offset :initarg :offset :reader offset)
(size :accessor size)))
(defclass compound-file-reader (directory)
((directory :initarg :directory)
(file-name :initarg :file-name)
(stream)
(entries :initform (make-table :test #'equal))))... | null | https://raw.githubusercontent.com/sharplispers/montezuma/ee2129eece7065760de4ebbaeffaadcb27644738/src/index/compound-file-io.lisp | lisp | what does that do ? | (in-package #:montezuma)
(defclass compound-file-reader-file-entry ()
((offset :initarg :offset :reader offset)
(size :accessor size)))
(defclass compound-file-reader (directory)
((directory :initarg :directory)
(file-name :initarg :file-name)
(stream)
(entries :initform (make-table :test #'equal))))... |
c6e512af4c6a8249a0f466b16ffc0553bf78f7a0a00958c6222173d617c9d903 | appleshan/cl-http | sysdcl.lisp | -*- Syntax : Ansi - Common - Lisp ; Base : 10 ; Mode : lisp ; Package : common - lisp - user -*-
;;;
Copyright 1997 , .
;;; All rights reserved.
;;;-------------------------------------------------------------------
;;;
;;; SYSTEM DEFINITION FOR HTML-PARSER
(in-package :cl-user)
(setf (logical-pathname-tr... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/mcl/html-parser/sysdcl.lisp | lisp | Base : 10 ; Mode : lisp ; Package : common - lisp - user -*-
All rights reserved.
-------------------------------------------------------------------
SYSTEM DEFINITION FOR HTML-PARSER
parser code | Copyright 1997 , .
(in-package :cl-user)
(setf (logical-pathname-translations "html-parser")
`(("*.*" ,(merge-pathnames "*.*" (truename (pathname "http:html-parser;v8;"))))))
(define-system
(html-parser)
(:load :compile)
"html-parser:packages"
"html-parser:defs"
"html-parser:patmatch... |
44f2beca8124adbb265031b04f5c400fcf6839f07a73b64e94778519b833c086 | green-coder/girouette | animation.cljc | (ns ^:no-doc girouette.tw.animation
(:require [garden.stylesheet :as gs]
[girouette.tw.common :refer [value-unit->css]]))
(def components
[{:id :transition-property
:since-version [:tw 2]
:rules "
transition-property = <'transition'> (<'-'> ('none' | 'all' | 'colors' |
... | null | https://raw.githubusercontent.com/green-coder/girouette/07ccd507170d49b3c31a7a6129de107f6c60808d/lib/girouette/src/girouette/tw/animation.cljc | clojure | TODO: keyframes should be expressed outside of any prefix's scope
It is time to introduce grammar component's dependencies | (ns ^:no-doc girouette.tw.animation
(:require [garden.stylesheet :as gs]
[girouette.tw.common :refer [value-unit->css]]))
(def components
[{:id :transition-property
:since-version [:tw 2]
:rules "
transition-property = <'transition'> (<'-'> ('none' | 'all' | 'colors' |
... |
b2602340109975ebef4434a9a142cd997ce90ef7bfe6a3725b103c11d6fc9296 | rizo/snowflake-os | callback.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/libraries/stdlib/callback.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
* Registering Caml values with the C r... |
1446247e5b2d02659bf68ff23b333b3599d17a166d1c664d34ef643d0fb2f89d | Psi-Prod/Razzia | response.ml | type 'stream t =
| Input of { sensitive : bool; prompt : string }
| Success of 'stream body
| Redirect of [ `Temp | `Perm ] * string
| TempFailure of
[ `Msg | `ServerUnavailable | `CGIError | `ProxyError | `SlowDown ]
* string
| PermFailure of
[ `Msg | `NotFound | `Gone | `ProxyRequestRefuse... | null | https://raw.githubusercontent.com/Psi-Prod/Razzia/19b7dc7f7c828dd1857994577cfd3daa54c4cdb2/razzia/response.ml | ocaml | type 'stream t =
| Input of { sensitive : bool; prompt : string }
| Success of 'stream body
| Redirect of [ `Temp | `Perm ] * string
| TempFailure of
[ `Msg | `ServerUnavailable | `CGIError | `ProxyError | `SlowDown ]
* string
| PermFailure of
[ `Msg | `NotFound | `Gone | `ProxyRequestRefuse... | |
3037e087e7a95bcd9cb63ad339b4e24a5cfad6ad82bd2c879bee4f685dbddc3d | synduce/Synduce | Specifications.mli | open Term
(** Reinitialize the state of the specifiications. *)
val reinit : ctx:Context.t -> unit -> unit
(** An empty spec with no ensures clause and no requires clause. *)
val empty_spec : spec
val get_ensures : ctx:Context.t -> variable -> term option
val get_requires : ctx:Context.t -> variable -> term option
v... | null | https://raw.githubusercontent.com/synduce/Synduce/11e9eb1d420113ae85ec63399dd493034c51a354/src/lang/Specifications.mli | ocaml | * Reinitialize the state of the specifiications.
* An empty spec with no ensures clause and no requires clause. | open Term
val reinit : ctx:Context.t -> unit -> unit
val empty_spec : spec
val get_ensures : ctx:Context.t -> variable -> term option
val get_requires : ctx:Context.t -> variable -> term option
val get_spec : ctx:Context.t -> variable -> spec option
val set_spec : ctx:Context.t -> variable -> spec -> unit
val set_en... |
606e07187c951850279342740e7d9c44f3dcbcfe050bb4242e736f6f9a4b7c98 | mentat-collective/MathBox.cljs | hooks.cljs | (ns mathbox.hooks
"Collection of hooks used to configure the [[mathbox/MathBox]] component."
(:require [goog.object :as o]
[mathbox.types :as t]
["react" :as react]))
(defn ^:no-doc split-map [m ks]
(let [with (select-keys m ks)
without (apply dissoc m ks)]
[with without]))... | null | https://raw.githubusercontent.com/mentat-collective/MathBox.cljs/281fc373ca2e2e05de7b789f0c1764ab5a66ea05/src/mathbox/hooks.cljs | clojure |
The following hooks are used by [[mathbox/MathBox]] to configure mutable
settings on some of the internal properties that can't be configured
declaratively.
NOTE that these are reactive, but you could easily set them on the
don't do that.
If I want to set a bunch at once, this is probably the way:
-deep-compa... | (ns mathbox.hooks
"Collection of hooks used to configure the [[mathbox/MathBox]] component."
(:require [goog.object :as o]
[mathbox.types :as t]
["react" :as react]))
(defn ^:no-doc split-map [m ks]
(let [with (select-keys m ks)
without (apply dissoc m ks)]
[with without]))... |
5a91515907394b6699575a8a6d0df1fac9c64edeac34684f43f4aa8088a5a1f5 | realworldocaml/book | make_typename.mli | open Std_internal
(*
Typerep.Named generation helpers
*)
module Make0 (X : Named_intf.S0) : sig
val named : X.t Typerep.Named.t
val typename_of_t : X.t Typename.t
end
module Make1 (X : Named_intf.S1) : sig
val named : 'a Typerep.t -> 'a X.t Typerep.Named.t
val typename_of_t : 'a Typename.t -> 'a X.t Typen... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/typerep/lib/make_typename.mli | ocaml |
Typerep.Named generation helpers
| open Std_internal
module Make0 (X : Named_intf.S0) : sig
val named : X.t Typerep.Named.t
val typename_of_t : X.t Typename.t
end
module Make1 (X : Named_intf.S1) : sig
val named : 'a Typerep.t -> 'a X.t Typerep.Named.t
val typename_of_t : 'a Typename.t -> 'a X.t Typename.t
end
module Make2 (X : Named_intf.S2... |
a45813ae7116c0602461577215f0ad294aaf02fec34d927521ecca8c8f27c354 | tezos-checker/checker | common.mli | (* OPERATIONS ON int *)
val int_zero : Ligo.int
val min_int : Ligo.int -> Ligo.int -> Ligo.int
val max_int : Ligo.int -> Ligo.int -> Ligo.int
val neg_int : Ligo.int -> Ligo.int
val pow_int_nat : Ligo.int -> Ligo.nat -> Ligo.int
val cdiv_int_int : Ligo.int -> Ligo.int -> Ligo.int
val fdiv_int_int : Ligo.int -> Ligo.... | null | https://raw.githubusercontent.com/tezos-checker/checker/32dcc6135ebec83a96edd3ee221bebbb0f01a42c/src/common.mli | ocaml | OPERATIONS ON int
OPERATIONS ON tez
BEGIN_OCAML
END_OCAML | val int_zero : Ligo.int
val min_int : Ligo.int -> Ligo.int -> Ligo.int
val max_int : Ligo.int -> Ligo.int -> Ligo.int
val neg_int : Ligo.int -> Ligo.int
val pow_int_nat : Ligo.int -> Ligo.nat -> Ligo.int
val cdiv_int_int : Ligo.int -> Ligo.int -> Ligo.int
val fdiv_int_int : Ligo.int -> Ligo.int -> Ligo.int
val cla... |
6c2d51ae43c2d047b684552a548541203e2fababafc0c20d394aadb7088bde1e | oxidizing/sihl | sihl_queue.ml | include Sihl.Contract.Queue
let log_src = Logs.Src.create ("sihl.service." ^ Sihl.Contract.Queue.name)
module Logs = (val Logs.src_log log_src : Logs.LOG)
let create_instance ?(ctx = []) input delay now (job : 'a job) =
let input = job.encode input in
let name = job.name in
let next_run_at =
match delay wi... | null | https://raw.githubusercontent.com/oxidizing/sihl/d0fb1e0bff4964453d22c2b1d28aa8f9eb2969cb/sihl-queue/src/sihl_queue.ml | ocaml | At some point we might want to have a different ctx for the job
dispatch and the actual job handling.
This function runs every second, the request context gets created here
with each tick | include Sihl.Contract.Queue
let log_src = Logs.Src.create ("sihl.service." ^ Sihl.Contract.Queue.name)
module Logs = (val Logs.src_log log_src : Logs.LOG)
let create_instance ?(ctx = []) input delay now (job : 'a job) =
let input = job.encode input in
let name = job.name in
let next_run_at =
match delay wi... |
955512d551d281f225cfd0187fc50dba46d3e31450782f3c0bc7e6282f32f352 | ostera/serde.ml | visitor.ml | module type Intf = Intf.Visitor_intf
type 'value t = (module Intf with type value = 'value)
type ('value, 'tag) with_tag =
(module Intf with type value = 'value and type tag = 'tag)
module Unimplemented = struct
let visit_bool : bool -> ('value, 'error Error.de_error) result =
fun _ -> Error.unimplemented "vi... | null | https://raw.githubusercontent.com/ostera/serde.ml/1b0d46a361f2a152eb52eeeec10db8458129793c/serde/de/visitor.ml | ocaml | module type Intf = Intf.Visitor_intf
type 'value t = (module Intf with type value = 'value)
type ('value, 'tag) with_tag =
(module Intf with type value = 'value and type tag = 'tag)
module Unimplemented = struct
let visit_bool : bool -> ('value, 'error Error.de_error) result =
fun _ -> Error.unimplemented "vi... | |
00c8afac429f504261bf94aeaa6be21513fe2fdcf13091c80f29106eeb1be8a0 | unisonweb/unison | Names.hs | module Unison.UnisonFile.Names where
import Data.Bifunctor (second)
import qualified Data.Map as Map
import qualified Data.Set as Set
import qualified Unison.ABT as ABT
import Unison.DataDeclaration (DataDeclaration, EffectDeclaration (..))
import qualified Unison.DataDeclaration as DD
import qualified Unison.DataDecl... | null | https://raw.githubusercontent.com/unisonweb/unison/cf278f9fb66ccb9436bf8a2eb4ab03fc7a92021d/parser-typechecker/src/Unison/UnisonFile/Names.hs | haskell | Substitutes free type and term variables occurring in the terms of this
`UnisonFile` using `externalNames`.
Hash-qualified names are substituted during parsing, but non-HQ names are
substituted at the end of parsing, since they can be locally bound. Example, in
`x -> x + math.sqrt 2`, we don't know if `math.sqrt`... | module Unison.UnisonFile.Names where
import Data.Bifunctor (second)
import qualified Data.Map as Map
import qualified Data.Set as Set
import qualified Unison.ABT as ABT
import Unison.DataDeclaration (DataDeclaration, EffectDeclaration (..))
import qualified Unison.DataDeclaration as DD
import qualified Unison.DataDecl... |
87b8b4707ed35a5c0e1f1e33cbc6823a2992557738bd6e70ebecde4ddd64b393 | onyx-platform/onyx | aggregation_grouping_test.clj | (ns onyx.windowing.aggregation-grouping-test
(:require [clojure.core.async :refer [chan >!! <!! close! sliding-buffer]]
[clojure.test :refer [deftest is]]
[onyx.plugin.core-async :refer [take-segments!]]
[taoensso.timbre :refer [info]]
[onyx.static.uuid :refer [random-u... | null | https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/test/onyx/windowing/aggregation_grouping_test.clj | clojure | (ns onyx.windowing.aggregation-grouping-test
(:require [clojure.core.async :refer [chan >!! <!! close! sliding-buffer]]
[clojure.test :refer [deftest is]]
[onyx.plugin.core-async :refer [take-segments!]]
[taoensso.timbre :refer [info]]
[onyx.static.uuid :refer [random-u... | |
1bdaa6d270113d7fd9f66dd1fa5620a153c2a19677bcde6aabecda94b9ea2ac6 | IGJoshua/farolero | farolero.clj | (ns ^:no-doc hooks.farolero
(:require
[clj-kondo.hooks-api :as api]))
(defn restart-and-handler-case
[{:keys [node]}]
(let [[expr & bindings] (rest (:children node))
bindings (mapcat (fn [{[name bindings & body] :children}]
[name
(api/list-node
... | null | https://raw.githubusercontent.com/IGJoshua/farolero/9bb82a1c9b10cdc82629d672431f11ebf6c17b1d/resources/clj-kondo.exports/org.suskalo/farolero/hooks/farolero.clj | clojure | (ns ^:no-doc hooks.farolero
(:require
[clj-kondo.hooks-api :as api]))
(defn restart-and-handler-case
[{:keys [node]}]
(let [[expr & bindings] (rest (:children node))
bindings (mapcat (fn [{[name bindings & body] :children}]
[name
(api/list-node
... | |
4df68684b0766eb42bae4b6a249bf945a5bdc1f418f4541cc5a666a79b1a4600 | boxer-project/boxer-sunrise | draw-low-opengl330.lisp | ;;;; Boxer
Copyright 1985 - 2022 Andrea A. diSessa and the Estate of Edward H. Lay
;;;;
Portions of this code may be copyright 1982 - 1985 Massachusetts Institute of Technology . Those portions may be
used for any purpose , including commercial ones , providing that notice of MIT copyright is ... | null | https://raw.githubusercontent.com/boxer-project/boxer-sunrise/535fc1b2a35b4462f6931133a86953c78bed26b1/src/draw-low-opengl330/draw-low-opengl330.lisp | lisp | Boxer
Licensed under the 3-Clause BSD license. You may not use this file except in compliance with this license.
-3-Clause
+-Data--+
This file is part of the | BOXER | system
+-------+
OpenGL Drawi... | Copyright 1985 - 2022 Andrea A. diSessa and the Estate of Edward H. Lay
Portions of this code may be copyright 1982 - 1985 Massachusetts Institute of Technology . Those portions may be
used for any purpose , including commercial ones , providing that notice of MIT copyright is retained .
This i... |
84af604ba8cbbddeff3ead4fee434f672a874be34b6920e61a8fbc9cfd381228 | melange-re/melange | bsb_db_encode.ml | Copyright ( C ) 2019 - Present , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any l... | null | https://raw.githubusercontent.com/melange-re/melange/bcaf468572532f255262999d78af80585f25ecc0/mel/bsb_db_encode.ml | ocaml | IDEAS:
Pros:
- could be even shortened to a single byte
Cons:
- decode would allocate
- code too verbose
- not readable
Make sure [tmp_buf1] and [tmp_buf2] is cleared ,
they are only used to control the order.
Strictly speaking, [tmp_buf1] is not needed
module name section
directo... | Copyright ( C ) 2019 - Present , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any l... |
bb5ab1bbc8191ef86882038d22216129d3167d48aafc500fc70794ba1e497468 | dradtke/Lisp-Text-Editor | gobject.foreign-gobject-subclassing.lisp | (in-package :gobject)
(defvar *registered-types* (make-hash-table :test 'equal))
(defstruct object-type name class parent interfaces properties)
(defun instance-init (instance class)
(log-for :subclass "(instance-init ~A ~A)~%" instance class)
(log-for :subclass "Initializing instance ~A for type ~A (creating ~A... | null | https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/cl-gtk2/glib/gobject.foreign-gobject-subclassing.lisp | lisp | (in-package :gobject)
(defvar *registered-types* (make-hash-table :test 'equal))
(defstruct object-type name class parent interfaces properties)
(defun instance-init (instance class)
(log-for :subclass "(instance-init ~A ~A)~%" instance class)
(log-for :subclass "Initializing instance ~A for type ~A (creating ~A... | |
8a441394e0edbcb5ec8d218e75a80c472a41371c7222a3bb1526f8fc29d9e128 | yuriy-chumak/ol | call_a_function.scm | ; #Ol
; note: sign "==>" indicates expected output
;;; Calling a function that requires no arguments
(define (no-args-function)
(print "ok."))
(no-args-function)
; ==> ok.
;;; Calling a function with a fixed number of arguments
(define (two-args-function a b)
(print "a: " a)
(print "b: " b))
(two-args-fu... | null | https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/tests/rosettacode/call_a_function.scm | scheme | #Ol
note: sign "==>" indicates expected output
Calling a function that requires no arguments
==> ok.
Calling a function with a fixed number of arguments
Calling a function with optional arguments
etc...
==> no optional arguments
Calling a function with a variable number of arguments
/same as optional argument... |
(define (no-args-function)
(print "ok."))
(no-args-function)
(define (two-args-function a b)
(print "a: " a)
(print "b: " b))
(two-args-function 8 13)
= = > a : 8
= = > b : 13
(define (optional-args-function a . args)
(print "a: " a)
(if (null? args)
(print "no optional arguments"))
... |
41355f3b2fd309ebe6f9fb8db0b652966c220a1fcd01e72afac476a880f98388 | broom-lang/broom | Const.ml | type t =
| Unit
| Int of int
| String of string
let int = PIso.piso (fun n -> Some (Int n)) (function
| Int n -> Some n
| _ -> None)
let string = PIso.piso (fun s -> Some (String s)) (function
| String s -> Some s
| _ -> None)
let grammar =
let open Grammar.Infix in
let strings =
... | null | https://raw.githubusercontent.com/broom-lang/broom/62cfc08fdd1409f6b1c3a45018ec7d9c351cd59b/compiler/lib/IRCommon/Const.ml | ocaml | type t =
| Unit
| Int of int
| String of string
let int = PIso.piso (fun n -> Some (Int n)) (function
| Int n -> Some n
| _ -> None)
let string = PIso.piso (fun s -> Some (String s)) (function
| String s -> Some s
| _ -> None)
let grammar =
let open Grammar.Infix in
let strings =
... | |
b9c4bf70185463e34c4bd7d7fde05659e17e2f033b84af28a6880e29a17fee84 | jeffshrager/biobike | df-t-w-doc.lisp | -*- Package : bbi ; mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
(in-package :bbi)
;;; +=========================================================================+
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
;;; | |
;;; | Permission is hereby granted, free of charge, to any person obtaining |
;;; ... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Doc/bbldf/df-t-w-doc.lisp | lisp | mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
+=========================================================================+
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software and associated documentation files (the |
| without limitation the rights to us... |
(in-package :bbi)
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
| " Software " ) , to deal in the Software without restriction , including |
| distribute , sublicense , and/or sell copies of the Software , and to |
| permit persons to whom the Software is furnished to do so , subject to |
| in all copi... |
35f81d9afa71762f62c39d3ffd67a36cbfcb583f94174299da93201ef4aebbb3 | HunterYIboHu/htdp2-solution | ex245-function-equal.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-intermediate-reader.ss" "lang")((modname ex245-function-equal) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor re... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter3-Abstraction/Section14-Similarities-Everywhere/ex245-function-equal.rkt | racket | about the language level of this file in a form that our tools can easily process.
main functions
Function Function -> Boolean
auxiliary functions
Number -> Number
Questions
functions from numbers to numbers are equal?
A: No. Now we could explore the function's body, so it's unable to prove
the equality by pro... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-reader.ss" "lang")((modname ex245-function-equal) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
consume two functions which are from numbers ... |
d3e57eaf566de75f94b2a262071351cf212403ca683e0096b536fa5effb81764 | stathissideris/dali | batik_test.clj | (ns dali.batik-test
(:require [clojure.test :refer :all]
[dali.batik :as batik]
[dali.batik :refer :all]
[dali.io :as io]
[dali.layout :as layout]
[dali.syntax :as syntax]
[dali.svg-context :as ctx]))
(comment
(deftest test-outline
(testing ... | null | https://raw.githubusercontent.com/stathissideris/dali/97ebf43527fe76e838d7b6bb98a953db2747824d/test/dali/batik_test.clj | clojure | (ns dali.batik-test
(:require [clojure.test :refer :all]
[dali.batik :as batik]
[dali.batik :refer :all]
[dali.io :as io]
[dali.layout :as layout]
[dali.syntax :as syntax]
[dali.svg-context :as ctx]))
(comment
(deftest test-outline
(testing ... | |
d2db1910b11ca3a24ac127b2282f33ed5a42a61102af9a7d770425b9c788c499 | wireapp/wire-server | Connection.hs | # OPTIONS_GHC -Wno - incomplete - uni - patterns #
-- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
S... | null | https://raw.githubusercontent.com/wireapp/wire-server/72a03a776d4a8607b0a9c3e622003467be914894/services/brig/test/integration/API/User/Connection.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | # OPTIONS_GHC -Wno - incomplete - uni - patterns #
Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Pu... |
2a072662a57997a6871b1cb7f76a3d33c2d07de47071a45e999cf0125cbcff68 | Plutonomicon/plutarch-core | Prelude.hs | module Plutarch.Prelude (
type (/$),
type ($),
($$),
PHasRepr (..),
PConstructable,
IsPType,
PReprNewtype,
PForall1 (..),
PSome1 (..),
PUnit (..),
type (#->) (..),
type (#=>) (..),
Term,
pcon,
pmatch,
Generic,
plam,
(#),
PHs,
PType,
PTypeF,
Constraint,
Type,
PPType,
IsP... | null | https://raw.githubusercontent.com/Plutonomicon/plutarch-core/6befe9f205fd3a9f1b6697f09e7162331029dde0/Plutarch/Prelude.hs | haskell | module Plutarch.Prelude (
type (/$),
type ($),
($$),
PHasRepr (..),
PConstructable,
IsPType,
PReprNewtype,
PForall1 (..),
PSome1 (..),
PUnit (..),
type (#->) (..),
type (#=>) (..),
Term,
pcon,
pmatch,
Generic,
plam,
(#),
PHs,
PType,
PTypeF,
Constraint,
Type,
PPType,
IsP... | |
d861832eda1096c30b8070d1c2e6219f3f7c110ed6326006e67863f53a596394 | haskell/text-format | Internal.hs | {-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving #-}
-- |
-- Module : Data.Text.Format.Types.Internal
Copyright : ( c ) 2011 MailRank , Inc.
--
-- License : BSD-style
-- Maintainer :
-- Stability : experimental
Portability : GHC
--
-- Types for text mangling.
module Data.Text.Format.Typ... | null | https://raw.githubusercontent.com/haskell/text-format/abc3862f893bfcd0841c2cda9100acdc89a15614/Data/Text/Format/Types/Internal.hs | haskell | # LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving #
|
Module : Data.Text.Format.Types.Internal
License : BSD-style
Maintainer :
Stability : experimental
Types for text mangling.
* Integer format control
| A format string. This is intentionally incompatible with other
string types, to mak... |
Copyright : ( c ) 2011 MailRank , Inc.
Portability : GHC
module Data.Text.Format.Types.Internal
(
Format(..)
, Only(..)
, Shown(..)
, Hex(..)
) where
import Data.Monoid (Monoid(..))
import Data.String (IsString(..))
import Data.Text (Text)
import Data.Typeable (Typeable)
This type... |
2724dc415b8c64943b5ca240300130c202cddcb2812867dc9df35db9bad27df7 | ghcjs/ghcjs-dom | CustomEvent.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.CustomEvent
(js_newCustomEvent, newCustomEvent, js_initCustomEvent,
initCustomE... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/CustomEvent.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.CustomEvent
(js_newCustomEvent, newCustomEvent, js_initCustomEvent,
initCustomEvent, js_getDetail, getDetail, CustomEvent(..),
gTypeCustomEvent)
where
import Prelu... |
a7e93df3c051ecb97a00b21775423c1f7f736538b7f2d2862af4042d463b433c | killme2008/clojure-control | core.clj | (ns control.core
#^{ :doc "Clojure control core"
:author " Dennis Zhuang <>"}
(:use [clojure.java.io :only [reader]]
[clojure.java.shell :only [sh]]
[clojure.string :only [join blank? split]]
[clojure.walk :only [walk postwalk]]))
(def ^:dynamic *enable-color* true)
;;Error mode,:exit ... | null | https://raw.githubusercontent.com/killme2008/clojure-control/997078234d618c9e61bc9812330828ba62a4026e/src/control/core.clj | clojure | Error mode,:exit or :exception.
All tasks defined in control file
All clusters defined in control file
commands that already run.
if task is nil,exit
check task arguments count | (ns control.core
#^{ :doc "Clojure control core"
:author " Dennis Zhuang <>"}
(:use [clojure.java.io :only [reader]]
[clojure.java.shell :only [sh]]
[clojure.string :only [join blank? split]]
[clojure.walk :only [walk postwalk]]))
(def ^:dynamic *enable-color* true)
(def ^:dynamic *err... |
86919305baf1d355a8c20ca3718d2c5c4fbb5aaff85fa02565291289b2787273 | mpickering/gitlab-triage | Tickets.hs | # LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE DataKinds #
# LANGUAGE ViewPatterns #
# LANGUAGE DeriveGeneric #
module GitLab.Tickets where
import Control.Monad
import qualified Data.Text as T
... | null | https://raw.githubusercontent.com/mpickering/gitlab-triage/3586b1d62b7775282bd95775f1114084cd29ae4f/src/GitLab/Tickets.hs | haskell | # LANGUAGE OverloadedStrings #
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
createIssue
--------------------------------------------------------------------
... | # LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE RecordWildCards #
# LANGUAGE DataKinds #
# LANGUAGE ViewPatterns #
# LANGUAGE DeriveGeneric #
module GitLab.Tickets where
import Control.Monad
import qualified Data.Text as T
import qualified Data.Set as S
impo... |
53869bad16a8cdea18ce5e7b49efbbf52fb2381a366ac5a01c03845f7b22f108 | samrushing/irken-compiler | t_hmac0.scm | ;; -*- Mode: Irken -*-
(include "lib/basis.scm")
(include "lib/map.scm")
(include "lib/crypto/sodium.scm")
(include "lib/codecs/hex.scm")
(include "lib/crypto/hmac.scm")
(defmacro hexcat
(hexcat a ...) -> (hex->string (string-concat (list a ...)))
)
(define (t0)
(let ((hmac (hmac/sha512.make "frobnicator")))
... | null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t_hmac0.scm | scheme | -*- Mode: Irken -*-
test vectors from rfc4231 |
(include "lib/basis.scm")
(include "lib/map.scm")
(include "lib/crypto/sodium.scm")
(include "lib/codecs/hex.scm")
(include "lib/crypto/hmac.scm")
(defmacro hexcat
(hexcat a ...) -> (hex->string (string-concat (list a ...)))
)
(define (t0)
(let ((hmac (hmac/sha512.make "frobnicator")))
(hmac.update "the qu... |
2064dbe481e9138eec49127593e0c8757f0134863d6c492682ccbef287bbe3db | eugeneia/athens | special-operators.lisp | (in-package #:parenscript)
(in-readtable :parenscript)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; arithmetic and logic
(define-trivial-special-ops
+ ps-js:+
- ps-js:-
* ps-js:*
rem ps-js:%
and ps-js:&&
or ps-js:\|\|
logand ps-js:&
logio... | null | https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/Parenscript-2.6/src/special-operators.lisp | lisp |
arithmetic and logic
for n>2, /= is finding duplicates in an array of numbers (ie -
not not → identity
not equal → !=
blocks and control flow
multiple value return?
for backwards-compatibility
poor man's codewalker
fail
ignore empty binding list
non-local exit
implicit progn forms
this will go away somed... | (in-package #:parenscript)
(in-readtable :parenscript)
(define-trivial-special-ops
+ ps-js:+
- ps-js:-
* ps-js:*
rem ps-js:%
and ps-js:&&
or ps-js:\|\|
logand ps-js:&
logior ps-js:\|
logxor ps-js:^
lognot ps-js:~
aref ps-js... |
920ff2ec46e0a92cd2ce0663929cb671c034dded8395b787564738a5ac7339e2 | layerware/pgqueue | taker.clj | (ns pgqueue.example.taker
(:require [pgqueue.core :as pgq]
[clojure.java.io :as io]
[clojure.tools.reader.edn :as edn]))
(defn -main []
(let [p (System/getenv "PGQUEUE_CONFIG")
c (edn/read-string (slurp (io/file p)))
q (pgq/queue :example c)]
(loop []
(let [i (pgq/... | null | https://raw.githubusercontent.com/layerware/pgqueue/2af3f578338d25332e48ee30d9aea2c83eaf05c8/example/src/pgqueue/example/taker.clj | clojure | if q was empty, sleep a bit before checking again | (ns pgqueue.example.taker
(:require [pgqueue.core :as pgq]
[clojure.java.io :as io]
[clojure.tools.reader.edn :as edn]))
(defn -main []
(let [p (System/getenv "PGQUEUE_CONFIG")
c (edn/read-string (slurp (io/file p)))
q (pgq/queue :example c)]
(loop []
(let [i (pgq/... |
3d904526b75588558c016fb3c4a0a0cbbc6044a693480f9e12fa3bb891acdf8d | MLanguage/mlang | bir_roundops.ml | Copyright ( C ) 2019 - 2021 Inria , contributor :
< >
This program is free software : you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at your option ) any later
... | null | https://raw.githubusercontent.com/MLanguage/mlang/e6df03f8945380d3fc974f351509dcaabb61805f/src/mlang/backend_ir/bir_roundops.ml | ocaml | Copyright ( C ) 2019 - 2021 Inria , contributor :
< >
This program is free software : you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at your option ) any later
... | |
f7ad7c4a2064e321a8fb3d92dbd0e9884a8d1ffe824e46c6e103e54148d7df82 | locusmath/locus | composable_path.clj | (ns locus.algebra.category.path.composable-path
(:require [locus.set.logic.core.set :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.copresheaf.structure.core.protocols :refer :all]
[locus.set.... | null | https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/algebra/category/path/composable_path.clj | clojure | A composable path in a category is a pair of morphisms g : A -> B and f : B -> C
such that the composition f*g exists. In the copresheaf formulation of categories,
which form the domain of the composition function of the category.
Convert something in to a composable path
Get the morphism components of a path as c... | (ns locus.algebra.category.path.composable-path
(:require [locus.set.logic.core.set :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.copresheaf.structure.core.protocols :refer :all]
[locus.set.... |
d8b0f3f80a188e3270ddf9eb6ccc84713dc7905b35229d7d4afe88e34f1858c2 | nakkaya/clodiuno | project.clj | (defproject clodiuno "0.0.4-SNAPSHOT"
:description "Clojure API for Arduino."
:dependencies [[org.clojure/clojure "1.3.0"]
[rxtx22 "1.0.6"]])
| null | https://raw.githubusercontent.com/nakkaya/clodiuno/07baa0f05ff830d9e58be0017cde0013e32aefc8/project.clj | clojure | (defproject clodiuno "0.0.4-SNAPSHOT"
:description "Clojure API for Arduino."
:dependencies [[org.clojure/clojure "1.3.0"]
[rxtx22 "1.0.6"]])
| |
1fcd6cb2e89f8fdd432c9416642ed3e2e60d16cbc4434d99ce4080531e281992 | awakesecurity/grpc-mqtt | TH.hs | {-# LANGUAGE TemplateHaskellQuotes #-}
# LANGUAGE ImplicitPrelude #
-- Module : Proto3.Wire.Types.Extra.TH
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see COPYING
--
-- Stability : stable
Portability : non - portable ( GHC extensions )
--
Template haske... | null | https://raw.githubusercontent.com/awakesecurity/grpc-mqtt/fbde6f3fe90e82260469bab922c5ebb9f0b40e95/src/Proto3/Wire/Types/Extra/TH.hs | haskell | # LANGUAGE TemplateHaskellQuotes #
Module : Proto3.Wire.Types.Extra.TH
Stability : stable
@since 1.0.0
* Template Haskell Extensions
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-----------... | # LANGUAGE ImplicitPrelude #
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see COPYING
Portability : non - portable ( GHC extensions )
Template haskell extensions to type exported by the - wire package .
module Proto3.Wire.Types.Extra.TH
liftFieldNumber,
... |
4b3956959f705b18cc79eaaa36fe26a72646b9eae6ac0e705312d541a971babb | well-typed/large-records | Source.hs | # LANGUAGE CPP #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE RecordWildCards #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
module Data.Record.Anon.Internal.Plugin.Source (sourcePlugin) where
import Control.Monad
import Control.Monad.Tr... | null | https://raw.githubusercontent.com/well-typed/large-records/fb983aa136c2602499c2421323bd52b6a54b7c9a/large-anon/src/Data/Record/Anon/Internal/Plugin/Source.hs | haskell | # LANGUAGE RecordWildCards #
------------------------------------------------------------------------------
Top-level
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Main translation
-------------------... | # LANGUAGE CPP #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
module Data.Record.Anon.Internal.Plugin.Source (sourcePlugin) where
import Control.Monad
import Control.Monad.Trans
import Data.Generics (everywhereM... |
c6306daa78bea83d04463f2834e99d95a33dc3b8cf73b2d08fb47e6c89fc019a | Clozure/ccl | nxenv.lisp | -*- Mode : Lisp ; Package : CCL -*-
;;;
Copyright 1994 - 2009 Clozure Associates
;;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;;; you may not use this file except in compliance with the License.
;;; You may obtain a copy of the License at
;;;
;;; -2.0
;;;
;;; Unless required by ap... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/compiler/nxenv.lisp | lisp | Package : CCL -*-
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific la... | Copyright 1994 - 2009 Clozure Associates
distributed under the License is distributed on an " AS IS " BASIS ,
(in-package "CCL")
(eval-when (:execute :compile-toplevel)
(require'backquote)
(require 'lispequ)
)
(def-accessors (acode) %svref
NIL or type specifier .
cons of " walked " marker ,
)
(d... |
eaa5b7ac2679e4169cda7159247811624bc4829b0a77692641acc0a1d35677c2 | ssor/erlangDemos | msg_transfer_via_http.erl | %% Feel free to use, reuse and abuse the code in this file.
-module(msg_transfer_via_http).
%% API.
-export([start/0]).
%% API.
start() ->
ok = application:start(cowboy),
ok = application:start(echo_get).
| null | https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/msg_transfer_via_http/src/msg_transfer_via_http.erl | erlang | Feel free to use, reuse and abuse the code in this file.
API.
API. |
-module(msg_transfer_via_http).
-export([start/0]).
start() ->
ok = application:start(cowboy),
ok = application:start(echo_get).
|
869affc1de3f4c4776d16ebb1cbf24d6e91f88bc6a189644b8849fd2ab248d63 | LeifAndersen/racket-compiler2 | info.rkt | #lang info
(define collection "compiler2")
(define deps '("base"
"rackunit-lib"
"nanopass"
"zo-lib"
"compiler-lib"))
(define build-deps '("scribble-lib" "racket-doc"))
(define scribblings '(("scribblings/compiler2.scrbl" ())))
(define pkg-desc "Description Her... | null | https://raw.githubusercontent.com/LeifAndersen/racket-compiler2/ebd40c81621f6e4012fc72c838cd8e4ad1d8a266/info.rkt | racket | #lang info
(define collection "compiler2")
(define deps '("base"
"rackunit-lib"
"nanopass"
"zo-lib"
"compiler-lib"))
(define build-deps '("scribble-lib" "racket-doc"))
(define scribblings '(("scribblings/compiler2.scrbl" ())))
(define pkg-desc "Description Her... | |
cb4bbec6f7f4c981e7c2731cd0bdb87e491241505dd2ef5f667935a95389ce0d | parenthesin/microservice-boilerplate-malli | adapters_test.clj | (ns unit.microservice-boilerplate.adapters-test
(:require [clojure.test :refer [deftest is testing use-fixtures]]
[clojure.test.check.clojure-test :refer [defspec]]
[clojure.test.check.properties :as properties]
[malli.core :as m]
[malli.generator :as mg]
[m... | null | https://raw.githubusercontent.com/parenthesin/microservice-boilerplate-malli/b4bd9fa95f3457dfac47b7b64e00e4f14ba7060c/test/unit/microservice_boilerplate/adapters_test.clj | clojure | (ns unit.microservice-boilerplate.adapters-test
(:require [clojure.test :refer [deftest is testing use-fixtures]]
[clojure.test.check.clojure-test :refer [defspec]]
[clojure.test.check.properties :as properties]
[malli.core :as m]
[malli.generator :as mg]
[m... | |
e4e3cb8fe3590e6ecdc16fbf7ca611816c1abfaf9240ed73ad9063d2aaa5c336 | haskell-mafia/mismi | bench.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Catch
import Criterion.Main
import qualified Data.Text as T
import Mismi.S3
import P
import Syste... | null | https://raw.githubusercontent.com/haskell-mafia/mismi/f6df07a52c6c8b1cf195b58d20ef109e390be014/mismi-s3/test/bench.hs | haskell | # LANGUAGE OverloadedStrings #
- 100 mb - | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Catch
import Criterion.Main
import qualified Data.Text as T
import Mismi.S3
import P
import System.IO
import System.IO.Err... |
6bc13dcdf2edd177f39f064ac85470ec2b50758087cdeace152fd008b6bfbea3 | Deducteam/Logipedia | sttfadk.ml | open Kernel.Basic
module Term = Kernel.Term
let sttfa_module = mk_mident "sttfa"
let sttfa_type = mk_ident "type"
let sttfa_ptype = mk_ident "ptype"
let sttfa_eta = mk_ident "eta"
let sttfa_etap = mk_ident "etap"
let sttfa_p = mk_ident "p"
let sttfa_arrow = mk_ident "arrow"
let sttfa_forall = mk_ident "forall"
let stt... | null | https://raw.githubusercontent.com/Deducteam/Logipedia/09797a35ae36ab671e40e615fcdc09a7bba69134/src/sttfa/sttfadk.ml | ocaml | open Kernel.Basic
module Term = Kernel.Term
let sttfa_module = mk_mident "sttfa"
let sttfa_type = mk_ident "type"
let sttfa_ptype = mk_ident "ptype"
let sttfa_eta = mk_ident "eta"
let sttfa_etap = mk_ident "etap"
let sttfa_p = mk_ident "p"
let sttfa_arrow = mk_ident "arrow"
let sttfa_forall = mk_ident "forall"
let stt... | |
8d21d19d605ce99e8fb9d782ff796021c0d788aa4d80c30972f179bd5b3a9b39 | gebi/jungerl | gterm.erl | %%% File : gterm.erl
Author : < >
%%% Description : Terminal example
Created : 8 Mar 2001 by < >
-module(gterm).
-include_lib("erlgtk/include/gtk.hrl").
-include_lib("erlgtk/include/gdk.hrl").
-include_lib("erlgtk/include/gdk_keysyms.hrl").
-import(lists, [reverse/1, foldl/3, map/2, foreach/2,
sub... | null | https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/sl/src/gterm.erl | erlang | File : gterm.erl
Description : Terminal example
emacs mode workaround.
semi graphics
attributes: vt100 etc
00 = none (off)
01 = bold
color codes:
0=black
1=red
2=green
3=yellow
4=blue
5=magenta
6=cyan
7=white
2x = ??? used by slang check it
3x = forground color
4x = backgrou... | Author : < >
Created : 8 Mar 2001 by < >
-module(gterm).
-include_lib("erlgtk/include/gtk.hrl").
-include_lib("erlgtk/include/gdk.hrl").
-include_lib("erlgtk/include/gdk_keysyms.hrl").
-import(lists, [reverse/1, foldl/3, map/2, foreach/2,
sublist/2, duplicate/2]).
-compile(export_all).
-define(LB, ... |
919eedbef8c940106a892216059fce8f06efa385b0db0d63392237369b19bb51 | blamario/grampa | TH.hs | | This module exports the templates for automatic instance deriving of " Transformation . Deep " type classes . The most
-- common way to use it would be
--
-- > import qualified Transformation.Deep.TH
> data MyDataType f ' f = ...
-- > $(Transformation.Deep.TH.deriveFunctor ''MyDataType)
--
# Language CPP , Templ... | null | https://raw.githubusercontent.com/blamario/grampa/f15612ca7ce94229b81dc1f0a36a21ff9bf1c751/deep-transformations/src/Transformation/Deep/TH.hs | haskell | common way to use it would be
> import qualified Transformation.Deep.TH
> $(Transformation.Deep.TH.deriveFunctor ''MyDataType)
Adapted from | | This module exports the templates for automatic instance deriving of " Transformation . Deep " type classes . The most
> data MyDataType f ' f = ...
# Language CPP , TemplateHaskell #
module Transformation.Deep.TH (deriveAll, deriveFunctor, deriveTraversable)
where
import Control.Applicative (liftA2)
import Co... |
6a73dc0e38b85dc4b6acdcf6ed8fd6cec480cf32f4b43ea62b9b7f0b26270f23 | racket/draw | xp.rkt | #lang racket/base
(require ffi/unsafe
ffi/winapi)
;; Unfortunately, we sometimes need to do something different
under Windows XP
(provide xp?)
(define xp?
(and (eq? 'windows (system-type))
(let* ([GetVersion (get-ffi-obj 'GetVersion
(ffi-lib "kernel32.dll")
(_fun #:abi win... | null | https://raw.githubusercontent.com/racket/draw/a6558bdc18438e784c23d452ffd877dac867a7fd/draw-lib/racket/draw/private/xp.rkt | racket | Unfortunately, we sometimes need to do something different | #lang racket/base
(require ffi/unsafe
ffi/winapi)
under Windows XP
(provide xp?)
(define xp?
(and (eq? 'windows (system-type))
(let* ([GetVersion (get-ffi-obj 'GetVersion
(ffi-lib "kernel32.dll")
(_fun #:abi winapi -> _int32))])
(= 5 (bitwise-and #xFF (GetVersion))))))
|
382a5c7a937de8ffa8aaa27d094785b0a0effd85dad2e5c4d6e20b57a0786a4d | jtdaugherty/tart | V2.hs | module Tart.Format.V2
( version2Format
, encodeVersion2
)
where
import Control.Monad (when)
import Data.Int (Int32)
import qualified Data.Binary as B
import qualified Data.Text as T
import Tart.Canvas
import Tart.Format.Types
data TartFileDataV2 =
TartFileDataV2 { tartFileDataV2CanvasData :: [CanvasData]
... | null | https://raw.githubusercontent.com/jtdaugherty/tart/03d2bb8c3a01f3249c6a442b42aa319dc3a4f5de/src/Tart/Format/V2.hs | haskell | module Tart.Format.V2
( version2Format
, encodeVersion2
)
where
import Control.Monad (when)
import Data.Int (Int32)
import qualified Data.Binary as B
import qualified Data.Text as T
import Tart.Canvas
import Tart.Format.Types
data TartFileDataV2 =
TartFileDataV2 { tartFileDataV2CanvasData :: [CanvasData]
... | |
25ba7addfd31aa3352b90490a399420428349e6888bf339dc1014b8d1c17afe0 | gheber/kenzo | ls-twisted-products-test.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 - *
(in-package :kenzo-test-8)
(in-suite :kenzo-8)
(test absm-loopabsm
(let ((cmpr (cat-8:cmpr (cat-8:deltab))))
(cat-8:absm-loopabsm cmpr 3 (cat-8:absm 4 7) (cat-8:absm 7 cat-8:+null-loop+))
(cat-8:absm-loopabsm cmpr 3 (cat-8:absm ... | null | https://raw.githubusercontent.com/gheber/kenzo/48e2ea398b80f39d3b5954157a7df57e07a362d7/test/kenzo-8/ls-twisted-products-test.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 - *
in principle illegal but works |
(in-package :kenzo-test-8)
(in-suite :kenzo-8)
(test absm-loopabsm
(let ((cmpr (cat-8:cmpr (cat-8:deltab))))
(cat-8:absm-loopabsm cmpr 3 (cat-8:absm 4 7) (cat-8:absm 7 cat-8:+null-loop+))
(cat-8:absm-loopabsm cmpr 3 (cat-8:absm 0 15) (cat-8:absm 7 cat-8:+null-loop+))
(cat-8:absm-loopab... |
33681f4383aaeb3a0934eb7b9c8198630699596013c7e888c9a8d5dd6a97d44a | wtfleming/clojurescript-examples | handler.clj | (ns om-hello-world.core.handler
(:require [compojure.core :refer :all]
[compojure.route :as route]
[compojure.response :refer [render]]
[clojure.java.io :as io]
[ring.middleware.defaults :refer [wrap-defaults site-defaults]]))
(defn home
[req]
(render (io/resource ... | null | https://raw.githubusercontent.com/wtfleming/clojurescript-examples/6f878f431a2cba405b6ae715199f776a19dda6f7/om-hello-world/src/clj/om_hello_world/core/handler.clj | clojure | (ns om-hello-world.core.handler
(:require [compojure.core :refer :all]
[compojure.route :as route]
[compojure.response :refer [render]]
[clojure.java.io :as io]
[ring.middleware.defaults :refer [wrap-defaults site-defaults]]))
(defn home
[req]
(render (io/resource ... | |
7110ebd667d7e937b7b3e7f7bc6a4db42a5be316ef5e9475da15e30bdd5b711d | sharplispers/cxml | xmlconf.lisp | (defpackage xmlconf
(:use :cl :runes)
(:export #:run-all-tests))
(in-package :xmlconf)
(defun get-attribute (element name)
(rod-string (dom:get-attribute element name)))
(defparameter *bad-tests*
'(;; TS14
;; -xml-testsuite/2002Mar/0001.html
"ibm-valid-P28-ibm28v02.xml"
"ibm-valid-P29-ibm2... | null | https://raw.githubusercontent.com/sharplispers/cxml/8701da08ba4aac30891b8d2005edb018c1d3d796/test/xmlconf.lisp | lisp | TS14
-xml-testsuite/2002Mar/0001.html
XXX
not supported
XXX someone found it funny to include invalid URIs in the
test suite. And no, in "invalid" not "not-wf".
If we got here, parsing worked. Let's try to serialize the same
document. (We do the same thing in canonical mode below to check the
content model o... | (defpackage xmlconf
(:use :cl :runes)
(:export #:run-all-tests))
(in-package :xmlconf)
(defun get-attribute (element name)
(rod-string (dom:get-attribute element name)))
(defparameter *bad-tests*
"ibm-valid-P28-ibm28v02.xml"
"ibm-valid-P29-ibm29v01.xml"
"ibm-valid-P29-ibm29v02.xml"))
(defun t... |
e5cbfa8a4d44cfc37744cfd726b67f0531fdeaf27d0857f03320b818273ba70b | hipsleek/hipsleek | terminf.ml | #include "xdebug.cppo"
open VarGen
open Template
open Cpure
open Globals
open Gen
open Tlutils
module TP = Tpdispatcher
(***************************)
LEXICOGRAPHIC INFERENCE
(***************************)
exception Lex_Infer_Failure of string
e1 > e2 -- > e1 > = 0
let trans_dec_to_bnd_constr (f: formula) =
let... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/bef_indent/terminf.ml | ocaml | *************************
*************************
e1 > e2 --> e1 >= e2
TODO: Backtracking here
***********************************
CONDITIONAL TERMINATION INFERENCE
***********************************
Simplification of trans_ctx
TP.simplify
Search for related transitions of the strengthened dst loop conds ... | #include "xdebug.cppo"
open VarGen
open Template
open Cpure
open Globals
open Gen
open Tlutils
module TP = Tpdispatcher
LEXICOGRAPHIC INFERENCE
exception Lex_Infer_Failure of string
e1 > e2 -- > e1 > = 0
let trans_dec_to_bnd_constr (f: formula) =
let f_b b =
let (p, _) = b in match p with
| Gt (e1, e... |
6d965f0b16228c02f279acd8a2c85b4693565762edd02249262799bdf0f7c051 | stepcut/plugins | ArithmeticExpressionParser.hs | module ArithmeticExpressionParser where
import Text.ParserCombinators.Parsec
import Text.ParserCombinators.Parsec.Expr
resource :: String -> IO String
resource text = do
parsedText <- mapM parseString (lines text)
return (unlines parsedText)
parseString s = do
case (parse expr "" s) of
Left err -> return (... | null | https://raw.githubusercontent.com/stepcut/plugins/52c660b5bc71182627d14c1d333d0234050cac01/testsuite/objc/expression_parser/ArithmeticExpressionParser.hs | haskell | module ArithmeticExpressionParser where
import Text.ParserCombinators.Parsec
import Text.ParserCombinators.Parsec.Expr
resource :: String -> IO String
resource text = do
parsedText <- mapM parseString (lines text)
return (unlines parsedText)
parseString s = do
case (parse expr "" s) of
Left err -> return (... | |
7bd5f62d1edaf0815242a095eade456792d95d7b4b8ad921db3ad43353a9d811 | c4-project/c4f | output.ml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/fuzz/src/output.ml | ocaml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | |
f716925b32c2695f5a4f73a9229ec7dbc2fee3856e89ea80c15169f27123a95e | racket/racket7 | whitespace.rkt | #lang racket/base
(require "../common/struct-star.rkt"
"config.rkt"
"special.rkt"
"readtable.rkt"
"consume.rkt"
"error.rkt"
"location.rkt"
"special.rkt"
"special-comment.rkt")
(provide read-char/skip-whitespace-and-comments)
;; Skip whitespace, i... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/read/whitespace.rkt | racket | Skip whitespace, including non-character values that are
`special-comment?`s --- but return a special comment (always
`special`-wrapped) if `(read-config-keep-comment? config)`. The
result is a character that has been consumed.
(peek-char/special in config 0 source)))
)
For returning a comment as a result:
Skips... | #lang racket/base
(require "../common/struct-star.rkt"
"config.rkt"
"special.rkt"
"readtable.rkt"
"consume.rkt"
"error.rkt"
"location.rkt"
"special.rkt"
"special-comment.rkt")
(provide read-char/skip-whitespace-and-comments)
(define (read-char/sk... |
a6b4b7417bf9af1bbc8f5eb33d2768d91a44ceaf0adc1c71b18fb4b73cc85635 | pietervdvn/ALGT | AsLatexPt.hs | module SyntaxHighlighting.AsLatexPt where
import Utils.Utils
import Data.Char
import TypeSystem
import SyntaxHighlighting.Coloring
import SyntaxHighlighting.Renderer
import Text.PrettyPrint.ANSI.Leijen
data LatexRenderer = LatexRenderer FullColoring SyntaxStyle
instance Renderer LatexRenderer where
create = Lat... | null | https://raw.githubusercontent.com/pietervdvn/ALGT/43a2811931be6daf1362f37cb16f99375ca4999e/src/SyntaxHighlighting/AsLatexPt.hs | haskell | module SyntaxHighlighting.AsLatexPt where
import Utils.Utils
import Data.Char
import TypeSystem
import SyntaxHighlighting.Coloring
import SyntaxHighlighting.Renderer
import Text.PrettyPrint.ANSI.Leijen
data LatexRenderer = LatexRenderer FullColoring SyntaxStyle
instance Renderer LatexRenderer where
create = Lat... | |
fb01e7bc78515597b1b48501b93e6b13fc54e20ed41ad013a9f6ca801184988b | TorXakis/TorXakis | TestConstraint.hs |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
{-# LANGUAGE OverloadedStrings #-}
modul... | null | https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/solve/test/TestConstraint.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
---------------------------------------------------
Helper function
---------------------------------------------------
-------------------------------------------------------------------------
Tests
---------... |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
module TestConstraint
(
testConstraintLi... |
132e07cc187449096b83d7879bd7796dee6d0719ba2ef207789ab099ba017765 | jaredly/reason-language-server | printtyp.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
and ,... | null | https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/407/printtyp.ml | ocaml | ************************************************************************
OCaml
... | and , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Misc
open Ctype
open Format
open Longident
open Path
open Asttypes
open Types
open Btype
open Outcometree
let r... |
22de0b419277f6b412ac0a7111be474b22fd8a712eec3892b51b7f02c34998f6 | graninas/Functional-Design-and-Architecture | DeviceControl.hs | module Andromeda.Hardware.Impl.Interpreters.DeviceControl where
import qualified Andromeda.Hardware.Language.DeviceControl as L
import qualified Andromeda.Hardware.Common as T
import qualified Andromeda.Hardware.Domain as T
import qualified Andromeda.Hardware.Impl.Service as SImpl
import qualified Andromeda.Hardware... | null | https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/faee58404e7d766c6c21f1ffdf9a2e792aebb4cb/Second-Edition-Manning-Publications/BookSamples/CH06/Section6p1p1/src/Andromeda/Hardware/Impl/Interpreters/DeviceControl.hs | haskell | TODO: dummy | module Andromeda.Hardware.Impl.Interpreters.DeviceControl where
import qualified Andromeda.Hardware.Language.DeviceControl as L
import qualified Andromeda.Hardware.Common as T
import qualified Andromeda.Hardware.Domain as T
import qualified Andromeda.Hardware.Impl.Service as SImpl
import qualified Andromeda.Hardware... |
4a03ce4e616c1d5c4f10b01fed6e36884c32a2cd55a67bb28a760270b220eae3 | imrehg/ypsilon | list.scm | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gdk list)
(export gdk_list_visuals)
(import (rnrs) (ypsilon ffi))
(define lib-name
(cond (on-linux "libgdk-x11-2.0.so.0")
... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/gdk/list.scm | scheme | GList* gdk_list_visuals (void)
[end] | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gdk list)
(export gdk_list_visuals)
(import (rnrs) (ypsilon ffi))
(define lib-name
(cond (on-linux "libgdk-x11-2.0.so.0")
... |
8d73296a725ef40030a1902a95d0d26f79d0ca596bd9ead79f6c253f9b4d6e72 | dancrossnyc/multics | infoton100.ctl.lisp | ;;; ***********************************************************
;;; * *
* Copyright , ( C ) Honeywell Information Systems Inc. , 1982 *
;;; * *
* Copyright ( c ) 1978 by Massachusetts Institute of ... | null | https://raw.githubusercontent.com/dancrossnyc/multics/dc291689edf955c660e57236da694630e2217151/library_dir_dir/system_library_unbundled/source/bound_emacs_ctls_.s.archive/infoton100.ctl.lisp | lisp | ***********************************************************
* *
* *
* *
***********************************************************
-*-LISP-*-
... | * Copyright , ( C ) Honeywell Information Systems Inc. , 1982 *
* Copyright ( c ) 1978 by Massachusetts Institute of *
* Technology and Honeywell Information Systems , Inc. *
I100 control package
CWH 3/5/79 from VT52ctl
BSG 3/21/78 from DD4000ctl
1 ) change(86 - 04 - 23,Margolin ) , appr... |
3b6510e0ef0702dbee5ade7b10eac79fe00d185055251c234066bb22220df4d1 | yzh44yzh/practical_erlang | user_handler.erl | -module(user_handler).
-export([init/2]).
init(Req0, State) ->
Bindings = cowboy_req:bindings(Req0),
UserId = maps:get(user_id, Bindings, <<"0">>),
Info = get_user_info(UserId),
Tpl = tpl_manager:get_template("user"),
Body = bbmustache:render(Tpl, Info),
Headers = #{
<<"content-type"... | null | https://raw.githubusercontent.com/yzh44yzh/practical_erlang/c9eec8cf44e152bf50d9bc6d5cb87fee4764f609/17_web_server/ws/apps/ws/src/handlers/user_handler.erl | erlang | -module(user_handler).
-export([init/2]).
init(Req0, State) ->
Bindings = cowboy_req:bindings(Req0),
UserId = maps:get(user_id, Bindings, <<"0">>),
Info = get_user_info(UserId),
Tpl = tpl_manager:get_template("user"),
Body = bbmustache:render(Tpl, Info),
Headers = #{
<<"content-type"... | |
34986fe98c6bbc19ad954979bcb7ef2b361abe0136bbebec275936d40e3e964f | aryx/xix | virtual_draw.ml | open Common
open Device
module F = File
module W = Window
The ancestor of rio ( 8 1/2 ) was serving a virtual /dev / draw ,
* which was more elegant but also more inefficient than the
* /dev / winname ( and associated /dev / draw / x/ ) approach used by rio .
*
* alt : we could also pass the information... | null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/windows/virtual_draw.ml | ocaml | open Common
open Device
module F = File
module W = Window
The ancestor of rio ( 8 1/2 ) was serving a virtual /dev / draw ,
* which was more elegant but also more inefficient than the
* /dev / winname ( and associated /dev / draw / x/ ) approach used by rio .
*
* alt : we could also pass the information... | |
f5352be0c42e5f05ef2377acc2fbee6325ebb8d232dd788cca46bab359225b73 | jiesoul/soul-talk | core.clj | (ns soul-talk.spec.core
(:require [clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen]
[clojure.string :as str]
[spec-tools.core :as st]
[spec-tools.data-spec :as ds])
(:import (java.util UUID)))
(def ^:private email-regex #"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.... | null | https://raw.githubusercontent.com/jiesoul/soul-talk/630de08c6549b206d59023764d5f2576d97d1030/api/src/soul_talk/spec/core.clj | clojure | (gen/string-alphanumeric)) | (ns soul-talk.spec.core
(:require [clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen]
[clojure.string :as str]
[spec-tools.core :as st]
[spec-tools.data-spec :as ds])
(:import (java.util UUID)))
(def ^:private email-regex #"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.... |
c4f935f0303f8f6b48647982ca6b0f861aeb6f2dd11e3799b9f48d3e6936d77a | fluree/json-ld | normalize_test.cljc | (ns fluree.json-ld.impl.normalize-test
(:require [clojure.test :refer [deftest is testing]]
[fluree.json-ld.impl.normalize :as normalize]
[clojure.string :as str]))
;; basic normalization per JSON Canonicalization Scheme
;; following tests come from examples at -json-canonicalization.html
(... | null | https://raw.githubusercontent.com/fluree/json-ld/a4b2eaf847604bea26fa3f0b69d1d37017e6d5a9/test/fluree/json_ld/impl/normalize_test.cljc | clojure | basic normalization per JSON Canonicalization Scheme
following tests come from examples at -json-canonicalization.html
Note below fails but should not. Most unicode control set characters (< \u000f) should remain as is
but with lower case hex. Below, \u000F gets parsed but should instead output \u000f
remove lead... | (ns fluree.json-ld.impl.normalize-test
(:require [clojure.test :refer [deftest is testing]]
[fluree.json-ld.impl.normalize :as normalize]
[clojure.string :as str]))
(deftest data-as-map
(testing "Map with some non-standard characters"
(let [data {"peach" "This sorting order",
... |
7f355c9270f79e0e1b8104ad85e34b49b8f4f6a89282e9360591f04633d21d6a | nd/bird | 10.1.8.hs | import System.IO
import Data.Char
import IO
getCh :: IO Char
getCh = do
hSetEcho stdin False
c <- getChar
hSetEcho stdin True
return c
hangman :: IO ()
hangman = do putStrLn "Think of a word: "
word <- silentReadln
putStrLn "Now try to guess it!"
guess word
silentReadl... | null | https://raw.githubusercontent.com/nd/bird/06dba97af7cfb11f558eaeb31a75bd04cacf7201/ch10/10.1.8.hs | haskell | import System.IO
import Data.Char
import IO
getCh :: IO Char
getCh = do
hSetEcho stdin False
c <- getChar
hSetEcho stdin True
return c
hangman :: IO ()
hangman = do putStrLn "Think of a word: "
word <- silentReadln
putStrLn "Now try to guess it!"
guess word
silentReadl... | |
46e6bf08ff5792971806ee04a9092a622a4d47c089fe0a9c0ed78108e2ea0572 | naxels/youtube-channel-data | config.clj | (ns youtube-channel-data.youtube.config
(:require [clojure.edn :as edn]))
(set! *warn-on-reflection* true)
Read API key from env or config.edn , return nil if none found
(defn read-key
[]
(try
(or
(System/getenv "GOOGLE_API_KEY")
(-> "resources/config.edn"
(slurp)
(edn/read-str... | null | https://raw.githubusercontent.com/naxels/youtube-channel-data/fd0534b26b9b131968332109fb94a35d53149d1f/src/youtube_channel_data/youtube/config.clj | clojure | Turn API key to map, using "" when nil found | (ns youtube-channel-data.youtube.config
(:require [clojure.edn :as edn]))
(set! *warn-on-reflection* true)
Read API key from env or config.edn , return nil if none found
(defn read-key
[]
(try
(or
(System/getenv "GOOGLE_API_KEY")
(-> "resources/config.edn"
(slurp)
(edn/read-str... |
894e994d1a214fe327ee9cedf707e88fd38bb978a5683cbb698900c080314eae | OCamlPro/ocamlexc | parsing.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/OCamlPro/ocamlexc/a9ddcfff6f376f5dd6c5fcc3211b8f89e36f79fe/stdlib/parsing.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
$ I d : parsing.ml , v 1.3 1999/03/04 11:05:56 pessaux Exp $
Internal interface to the parsing engine
typ... |
d318687b04735f4e199f0dd9f3852731a117f7c87af768f563e5c90f5caf45a3 | haskell-github/github | Repos.hs | -----------------------------------------------------------------------------
-- |
-- License : BSD-3-Clause
Maintainer : < >
--
The Github Repos API , as documented at
-- </>
module GitHub.Endpoints.Repos (
-- * Querying repositories
currentUserReposR,
userReposR,
organizationReposR,
... | null | https://raw.githubusercontent.com/haskell-github/github/16d5350a57a5b9917dac7ee42f00c3473bf8e75e/src/GitHub/Endpoints/Repos.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-3-Clause
</>
* Querying repositories
** Create
** Edit
** Delete
* Data
| List your repositories.
See <#list-repositories-for-the-authenticated-user>
| List user repositories.
See <#list-repositories-for-a-user... | Maintainer : < >
The Github Repos API , as documented at
module GitHub.Endpoints.Repos (
currentUserReposR,
userReposR,
organizationReposR,
repositoryR,
contributorsR,
languagesForR,
tagsForR,
branchesForR,
createRepoR,
createOrganizationRepoR,
forkExistingRepoR,
... |
8e2a22a15fba742e42dad4481047ed126256690b667ff66a488ff846cdf37066 | fission-codes/fission | Types.hs | module Fission.Web.Server.Heroku.Password.Types (Password (..)) where
import Fission.Prelude
| Heroku add - on password ( from @addon - manifest.json@ )
newtype Password = Password { getPassword :: ByteString }
deriving (Eq, Show)
deriving newtype IsString
| null | https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-web-server/library/Fission/Web/Server/Heroku/Password/Types.hs | haskell | module Fission.Web.Server.Heroku.Password.Types (Password (..)) where
import Fission.Prelude
| Heroku add - on password ( from @addon - manifest.json@ )
newtype Password = Password { getPassword :: ByteString }
deriving (Eq, Show)
deriving newtype IsString
| |
490a092f7f1c2c0af58cf526964066a900d87cd41897205fad7fd4ef66945b27 | EveryTian/Haskell-Codewars | lagrange-interpolation.hs | -- -interpolation
module Codewars.Jacobb.Lagrange where
lagrange :: (Eq a, Fractional a) => [(a, a)] -> a -> a
lagrange points x = sum [y1 * product [(x - x2) / (x1 - x2) | point2@(x2, y2) <- points, point1 /= point2] | point1@(x1, y1) <- points]
| null | https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/5kyu/lagrange-interpolation.hs | haskell | -interpolation |
module Codewars.Jacobb.Lagrange where
lagrange :: (Eq a, Fractional a) => [(a, a)] -> a -> a
lagrange points x = sum [y1 * product [(x - x2) / (x1 - x2) | point2@(x2, y2) <- points, point1 /= point2] | point1@(x1, y1) <- points]
|
7751cc7aee9c8edb26323317ac986cd5b42f34b10deae6bdc76c953c9a1fe03d | janestreet/core_profiler | reader.ml | open Core
open Poly
open Core_profiler
open Core_profiler_disabled
module Unix = Core_unix
module Time_ns = Time_ns_unix
module Header = struct
module Item = struct
type single =
{ name : string
; spec : Probe_type.t
}
type group =
{ name : string
; points_spec : Probe_type.t
... | null | https://raw.githubusercontent.com/janestreet/core_profiler/30c12c4fb350ef2a9f7d14d8fc7ce2c96ac5b4ff/offline_tool/lib/reader.ml | ocaml | fields common to read_timer, probe and group_reset | open Core
open Poly
open Core_profiler
open Core_profiler_disabled
module Unix = Core_unix
module Time_ns = Time_ns_unix
module Header = struct
module Item = struct
type single =
{ name : string
; spec : Probe_type.t
}
type group =
{ name : string
; points_spec : Probe_type.t
... |
74ccec3e8f4ae0fce7c56fafb669d0fdd5bbbb4617bf002d1696f4c6d405c262 | OlivierNicole/haskell-chess | ChessRules.hs | module ChessRules (
legal,
doMove,
possibleMoves,
gameTree) where
import ChessBoard
import Move
import Tree
import GameTree
import Color
import Position
import Data.Maybe (isNothing)
import CartesianProduct
import Data.Bifunctor (bimap)
-- | Decide whether a move is legal.
-- TODO: implement for special m... | null | https://raw.githubusercontent.com/OlivierNicole/haskell-chess/3b76bbc39a6a43d6be9e22e4a68613eba2d2898d/ChessRules.hs | haskell | | Decide whether a move is legal.
TODO: implement for special moves.
| Perform a move. 'doMove' does not check the validity of the move,
so illegal or absurd moves may be performed with this function.
TODO: implement for special moves.
| Generate all legal, regular moves starting from a given square.
TODO: forbi... | module ChessRules (
legal,
doMove,
possibleMoves,
gameTree) where
import ChessBoard
import Move
import Tree
import GameTree
import Color
import Position
import Data.Maybe (isNothing)
import CartesianProduct
import Data.Bifunctor (bimap)
legal :: ChessBoard -> Move -> Bool
legal cb m@(Move dep arr) = case ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.