_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 |
|---|---|---|---|---|---|---|---|---|
02fc5a50640403f824cf007161d14a74286071b41da668c9e8945bc57bf001e2 | cedlemo/OCaml-libmpdclient | mpd_lwt_status.ml |
* Copyright 2018 ,
* This file is part of .
*
* OCaml - libmpdclient 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
* any later version .
... | null | https://raw.githubusercontent.com/cedlemo/OCaml-libmpdclient/49922f4fa0c1471324c613301675ffc06ff3147c/samples/mpd_lwt_status.ml | ocaml |
* Copyright 2018 ,
* This file is part of .
*
* OCaml - libmpdclient 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
* any later version .
... | |
a433d4f96a619a5b762535f61eccab96863e76b148808bb2f06307f72a2342ba | elastic/eui-cljs | panel.cljs | (ns eui.panel
(:require ["@elastic/eui/lib/components/panel/panel.js" :as eui]))
(def EuiPanel eui/EuiPanel)
(def SIZES eui/SIZES)
(def BORDER_RADII eui/BORDER_RADII)
(def COLORS eui/COLORS)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/panel.cljs | clojure | (ns eui.panel
(:require ["@elastic/eui/lib/components/panel/panel.js" :as eui]))
(def EuiPanel eui/EuiPanel)
(def SIZES eui/SIZES)
(def BORDER_RADII eui/BORDER_RADII)
(def COLORS eui/COLORS)
| |
8170b8cd6cf0a19d0a4818c37dcb939972cbb8e6319ff8ba2392bd4b91112cad | tsloughter/erlangdc2013 | estatsd_sup.erl | @author < >
2011
%% @doc The EStatsD main supervisor module.
-module (estatsd_sup).
This is an OPT supervisor .
-behaviour (supervisor).
%% Client API.
-export ([
start_link/0
]).
OTP supervisor callbacks .
-export ([
init/1
]).
= = = = = = = = = = = = = = = = = = = = = = \/ CLIENT API = = = = ... | null | https://raw.githubusercontent.com/tsloughter/erlangdc2013/d08198526f903cf081f81cacef1cc82ee9e8575b/apps/estatsd/src/estatsd_sup.erl | erlang | @doc The EStatsD main supervisor module.
Client API.
@doc Starts EStatsD's main supervisor.
Registers a process named `estatsd_sup`.
====================== /\ CLIENT API =========================================
@doc Builds the supervisor and child-spec.
Server handling metrics.
RestartTimeframe seconds, t... | @author < >
2011
-module (estatsd_sup).
This is an OPT supervisor .
-behaviour (supervisor).
-export ([
start_link/0
]).
OTP supervisor callbacks .
-export ([
init/1
]).
= = = = = = = = = = = = = = = = = = = = = = \/ CLIENT API = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =... |
a6c90aac0bb2595ef1c47d3e94a26edf9ba15a8dbc068a816ddaff2c72fb328f | TheLortex/mirage-monorepo | driver.ml |
* Copyright ( c ) 2014 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2014 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
(* Stub generation driver for... | null | https://raw.githubusercontent.com/TheLortex/mirage-monorepo/b557005dfe5a51fc50f0597d82c450291cfe8a2a/duniverse/ocaml-ctypes/tests/test-callback_lifetime/stub-generator/driver.ml | ocaml | Stub generation driver for the callback lifetime tests. |
* Copyright ( c ) 2014 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2014 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
let () = Tests_common.run Sy... |
18f17ecd0958aeea0e3de045bf7588c43cae5bb65d339922b83b945786fa57c7 | robert-strandh/SICL | rewrite.lisp | (cl:in-package #:cleavir-path-replication)
;;; This rewrite rule is used as a preparation for moving INSTRUCTION
;;; past its predecessors, because in order to do that, INSTRUCTION
;;; must have a single predecessor. This function replicates
;;; INSTRUCTION for each predecessor P. It does that by creating a
;;; repl... | null | https://raw.githubusercontent.com/robert-strandh/SICL/98dc580e961292ee0a6ad175c4b6ef30ec6ba3a7/Code/Cleavir/Path-replication/rewrite.lisp | lisp | This rewrite rule is used as a preparation for moving INSTRUCTION
past its predecessors, because in order to do that, INSTRUCTION
must have a single predecessor. This function replicates
INSTRUCTION for each predecessor P. It does that by creating a
replica RP of INSTRUCTION, then it replaces INSTRUCTION with RP... | (cl:in-package #:cleavir-path-replication)
(defun replicate-instruction (instruction)
(let ((copies
(loop for predecessor in (cleavir-ir:predecessors instruction)
for successors = (cleavir-ir:successors predecessor)
for copy = (make-instance (class-of instruction)
... |
34e113aa1d3c627666c3f60226a607d2c919f9c8e50ae54b2c00768125b73c8a | composewell/streamly | Zip.hs | # LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - deprecations #
-- |
Module : Streamly . Internal . Data . Stream . Zip
Copyright : ( c ) 2017 Composewell Technologies
--
-- License : BSD3
-- Maintainer :
-- Stability : experimental
Portability : GHC
--
-- To run examples in this module:
-... | null | https://raw.githubusercontent.com/composewell/streamly/8629a0e806f5eea87d23650c540aa04176f25c43/src/Streamly/Internal/Data/Stream/Zip.hs | haskell | |
License : BSD3
Maintainer :
Stability : experimental
To run examples in this module:
* Deprecated
$setup
>>> import Control.Concurrent (threadDelay)
>>> :{
delay n = do
sleep for n seconds
print " n sec "
return n -- IO Int
:}
----------------------------------------... | # LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - deprecations #
Module : Streamly . Internal . Data . Stream . Zip
Copyright : ( c ) 2017 Composewell Technologies
Portability : GHC
> > > import qualified Streamly . Prelude as Stream
module Streamly.Internal.Data.Stream.Zip
(
ZipSerialM... |
3c2adb34415ea9a462afa5994c8726400ae7796688bd78ced8bd50a32eae9327 | janestreet/universe | sexp_of.ml | module type S = sig
type t [@@deriving sexp_of]
end
module type S1 = sig
type 'a t [@@deriving sexp_of]
end
module type S2 = sig
type ('a, 'b) t [@@deriving sexp_of]
end
| null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/incremental/src/sexp_of.ml | ocaml | module type S = sig
type t [@@deriving sexp_of]
end
module type S1 = sig
type 'a t [@@deriving sexp_of]
end
module type S2 = sig
type ('a, 'b) t [@@deriving sexp_of]
end
| |
e1108e9d99d7140cfc2dbedaf97d593b6e4f83806ae7b69ea0c5e9253245a540 | GaloisInc/saw-script | CacheTests.hs |
Copyright : Galois , Inc. 2019
License : :
Stability : experimental
Portability : portable
Copyright : Galois, Inc. 2019
License : BSD3
Maintainer :
Stability : experimental
Portability : portable
-}
module Tests.CacheTests
( cacheTests
)
where
import Control.Monad
import Cont... | null | https://raw.githubusercontent.com/GaloisInc/saw-script/fdb8987f09999439833d5cb573f69197bdf2cb7f/saw-core/tests/src/Tests/CacheTests.hs | haskell | | Tests that a normal cache map can be used that will memoize
| Tests that a normal cache map can be used that will memoize
| Tests that a normal cache map can be used that will memoize
will cache the keyvals
Verify a value can be added, and once it is added, it does not
need to be recomputed (i.e. it is memoized... |
Copyright : Galois , Inc. 2019
License : :
Stability : experimental
Portability : portable
Copyright : Galois, Inc. 2019
License : BSD3
Maintainer :
Stability : experimental
Portability : portable
-}
module Tests.CacheTests
( cacheTests
)
where
import Control.Monad
import Cont... |
c87a8d692f92f9aa8e9d4d026cdb268426d44b2ce4003b185101e01a63132363 | gvannest/piscine_OCaml | gardening.ml | type 'a tree = Nil | Node of 'a * 'a tree * 'a tree
let rec size (tree:'a tree) = match tree with
| Nil -> 0
| Node (_, l, r) -> 1 + (size l) + (size r)
let height (tree:'a tree) =
let rec height_aux current_node height_acc = match current_node with
| Nil -> height_acc
| Node (v, l, r) -> ... | null | https://raw.githubusercontent.com/gvannest/piscine_OCaml/2533c6152cfb46c637d48a6d0718f7c7262b3ba6/d03/ex01/gardening.ml | ocaml | type 'a tree = Nil | Node of 'a * 'a tree * 'a tree
let rec size (tree:'a tree) = match tree with
| Nil -> 0
| Node (_, l, r) -> 1 + (size l) + (size r)
let height (tree:'a tree) =
let rec height_aux current_node height_acc = match current_node with
| Nil -> height_acc
| Node (v, l, r) -> ... | |
ec10bd9acd1420da35eb430782bf3a6441efdcca377605ab84f76926e7c121ea | roryk/bcbio.rnaseq | simulate.clj | (ns bcbio.rnaseq.simulate
(:require [bcbio.rnaseq.compare :refer [compare-callers]]
[bcbio.rnaseq.simulator :as sim]
[bcbio.rnaseq.templates :as templates]
[bcbio.rnaseq.util :refer :all]
[clojure.java.shell :refer [sh]]
[clojure.string :as string]
... | null | https://raw.githubusercontent.com/roryk/bcbio.rnaseq/66c629eb737c9a0096082d6683657bf9d89eb271/src/bcbio/rnaseq/simulate.clj | clojure | (ns bcbio.rnaseq.simulate
(:require [bcbio.rnaseq.compare :refer [compare-callers]]
[bcbio.rnaseq.simulator :as sim]
[bcbio.rnaseq.templates :as templates]
[bcbio.rnaseq.util :refer :all]
[clojure.java.shell :refer [sh]]
[clojure.string :as string]
... | |
ddb49a054d21650728d520378c28258a519c22d8b2ed7810360f6fd635b63914 | aws-beam/aws-erlang | aws_cloudhsm.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
%% @doc AWS CloudHSM Service
%%
This is documentation for AWS CloudHSM Classic .
%%
For more information , see AWS CloudHSM Classic FAQs , the AWS CloudHSM
Classic User Guide , and the AWS CloudHSM Classic API Reference .
%%... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_cloudhsm.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
@doc AWS CloudHSM Service
For information about the current version of AWS CloudHSM, see AWS
CloudHSM, the AWS CloudHSM User Guide, and the AWS CloudHSM API Reference.
====================================================================
API
============================... | See -beam/aws-codegen for more details .
This is documentation for AWS CloudHSM Classic .
For more information , see AWS CloudHSM Classic FAQs , the AWS CloudHSM
Classic User Guide , and the AWS CloudHSM Classic API Reference .
-module(aws_cloudhsm).
-export([add_tags_to_resource/2,
add_tags_to_resou... |
42a563a59ae3a738e7ef7334e00735afb66a7a3f2f204f515a02213920a5f0c9 | racket/math | mpfr-ffi-call-vs-racket.rkt | #lang racket/base
(require ffi/unsafe
tests/stress
math/private/bigfloat/mpfr)
(define mpfr-get-exp (get-mpfr-fun 'mpfr_get_exp (_fun _mpfr-pointer -> _exp_t)))
(define mpfr-get-prec (get-mpfr-fun 'mpfr_get_prec (_fun _mpfr-pointer -> _prec_t)))
(define mpfr-get-signbit (get-mpfr-fun 'mpfr_signbit (... | null | https://raw.githubusercontent.com/racket/math/dcd2ea1893dc5b45b26c8312997917a15fcd1c4a/math-test/math/tests/stress/mpfr-ffi-call-vs-racket.rkt | racket | #lang racket/base
(require ffi/unsafe
tests/stress
math/private/bigfloat/mpfr)
(define mpfr-get-exp (get-mpfr-fun 'mpfr_get_exp (_fun _mpfr-pointer -> _exp_t)))
(define mpfr-get-prec (get-mpfr-fun 'mpfr_get_prec (_fun _mpfr-pointer -> _prec_t)))
(define mpfr-get-signbit (get-mpfr-fun 'mpfr_signbit (... | |
35aed930a1904ea911fcb3cd2349a8468e7047798bd83a2e4e4aa86934e3de6f | padsproj/pads-haskell | GenPretty.hs | # LANGUAGE TypeSynonymInstances , TemplateHaskell , QuasiQuotes , MultiParamTypeClasses
, FlexibleInstances , DeriveDataTypeable , NamedFieldPuns , ScopedTypeVariables #
, FlexibleInstances, DeriveDataTypeable, NamedFieldPuns, ScopedTypeVariables #-}
{-# OPTIONS_HADDOCK prune #-}
|
Modul... | null | https://raw.githubusercontent.com/padsproj/pads-haskell/8dce6b2b28bf7d98028e67f6faa2be753a6ad691/src/Language/Pads/GenPretty.hs | haskell | # OPTIONS_HADDOCK prune #
| Recursively reify types to get all the named types referenced by the given
name
| Helper for 'getNamedTys'
| All the base types supported by Pads
| Recursively make the pretty printing instance for a given named type by
also making instances for all nested types.
| Helper for 'mkPrett... | # LANGUAGE TypeSynonymInstances , TemplateHaskell , QuasiQuotes , MultiParamTypeClasses
, FlexibleInstances , DeriveDataTypeable , NamedFieldPuns , ScopedTypeVariables #
, FlexibleInstances, DeriveDataTypeable, NamedFieldPuns, ScopedTypeVariables #-}
|
Module : Language . Pads . Ge... |
1e2e4cf7a49270e4880412507145b8d4e84ea8faac8e6c049f08c5a11418a03a | kazu-yamamoto/http2 | HuffmanSpec.hs | # LANGUAGE OverloadedStrings , CPP #
module HPACK.HuffmanSpec where
#if __GLASGOW_HASKELL__ < 709
import Control.Applicative ((<$>))
#endif
import Data.ByteString (ByteString)
import qualified Data.ByteString.Base16 as B16
import qualified Data.ByteString.Char8 as BS
import Data.Char (toLower)
import Network.HPACK
im... | null | https://raw.githubusercontent.com/kazu-yamamoto/http2/3c29763be147a3d482eff28f427ad80f1d4df706/test/HPACK/HuffmanSpec.hs | haskell | # LANGUAGE OverloadedStrings , CPP #
module HPACK.HuffmanSpec where
#if __GLASGOW_HASKELL__ < 709
import Control.Applicative ((<$>))
#endif
import Data.ByteString (ByteString)
import qualified Data.ByteString.Base16 as B16
import qualified Data.ByteString.Char8 as BS
import Data.Char (toLower)
import Network.HPACK
im... | |
6c1898c4bbc2af501f73e71062359a1f7ca4ad295ff9f4866f35ac5eb4d7c1f9 | gethop-dev/hydrogen.duct-template | root.clj | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
;; file, You can obtain one at /
{{=<< >>=}}
(ns <<namespace>>.ssr.root
(:require [cognitect.transit :as transit]
[compojure.core :refer [context wrap-routes GET r... | null | https://raw.githubusercontent.com/gethop-dev/hydrogen.duct-template/34d56aa499af1e673d9587b7da0cca2b126ff106/resources/ssr/ssr/root.clj | clojure | file, You can obtain one at /
(defn- handle-route*
[app-db]
(let [db-id (util/uuid)
result (with-bindings {#'re-frame.db/app-db-id db-id}
(swap! rf.db/db-atoms* assoc db-id app-db)
(gen-html app-db))]
(re-frame.db/clear-app-db db-id)
result))
Look at the solution ... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
{{=<< >>=}}
(ns <<namespace>>.ssr.root
(:require [cognitect.transit :as transit]
[compojure.core :refer [context wrap-routes GET routes]]
[hiccup.util ... |
6c39cd1dcb39c38a227de3125ca3eacee39604994eca711c9ddb9d56b8cd0dbd | johnlawrenceaspden/hobby-code | threads.clj | (import '(java.util.concurrent Executors))
(defn test-stm [nitems nthreads niters]
(let [refs (map ref (replicate nitems 0))
pool (Executors/newFixedThreadPool nthreads)
tasks (map (fn [t]
(fn []
(dotimes [n niters]
(dosync
... | null | https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/threads.clj | clojure | (import '(java.util.concurrent Executors))
(defn test-stm [nitems nthreads niters]
(let [refs (map ref (replicate nitems 0))
pool (Executors/newFixedThreadPool nthreads)
tasks (map (fn [t]
(fn []
(dotimes [n niters]
(dosync
... | |
a6edb44534bbbd25a03532e359187f758caac3ed560ac86c5ef133bb0abdcbb4 | 0xd34df00d/can-i-haz | Common.hs | # LANGUAGE DeriveGeneric , DeriveAnyClass #
{-# LANGUAGE Strict #-}
module Common where
import Control.DeepSeq
import GHC.Generics
import Control.Monad.Except.CoHas
import Control.Monad.Reader.Has
data FooEnv = FooEnv
{ fooInt :: Int
, fooStr :: String
} deriving (Eq, Ord, Show, Generic, NFData)
data BarEnv ... | null | https://raw.githubusercontent.com/0xd34df00d/can-i-haz/da27c09b1380ee10b859152d542489bcb6296fed/test/Common.hs | haskell | # LANGUAGE Strict # | # LANGUAGE DeriveGeneric , DeriveAnyClass #
module Common where
import Control.DeepSeq
import GHC.Generics
import Control.Monad.Except.CoHas
import Control.Monad.Reader.Has
data FooEnv = FooEnv
{ fooInt :: Int
, fooStr :: String
} deriving (Eq, Ord, Show, Generic, NFData)
data BarEnv = BarEnv
{ barDouble :... |
d3f7737e68919c68515aae4bd4a382a6f3efe3a6c58fdb260400b53a40a599ca | ijp/guildhall | limited-write.scm | #!r6rs
(library (guildhall ext trc-testing limited-write)
(export limited-write)
(import (rnrs))
(define (write-string s port)
(put-string port s))
Code below taken from scheme48 1.8 , Copyright ( c ) 1993 - 2008
and . Licensed under the new - style BSD license .
(define (limited-write obj port max-de... | null | https://raw.githubusercontent.com/ijp/guildhall/2fe2cc539f4b811bbcd69e58738db03eb5a2b778/guildhall/ext/trc-testing/limited-write.scm | scheme | #!r6rs
(library (guildhall ext trc-testing limited-write)
(export limited-write)
(import (rnrs))
(define (write-string s port)
(put-string port s))
Code below taken from scheme48 1.8 , Copyright ( c ) 1993 - 2008
and . Licensed under the new - style BSD license .
(define (limited-write obj port max-de... | |
cdb4c67e2c027101ee684c1902bfef31075263e59752ebbc7f8570f9b2b038b7 | umutisik/mathvas | AboutSpec.hs | module Handler.AboutSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $ do
describe "getAboutR" $ do
error "Spec not implemented: getAboutR"
| null | https://raw.githubusercontent.com/umutisik/mathvas/9f764cd4d54370262c70c7ec3eadae076a1eb489/test/Handler/AboutSpec.hs | haskell | module Handler.AboutSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $ do
describe "getAboutR" $ do
error "Spec not implemented: getAboutR"
| |
8a59a48b5433db48b97a2bd1b591214b02f85b076694f189b8a9fcde0749d73d | CryptoKami/cryptokami-core | Message.hs | # LANGUAGE DataKinds #
| Messages used for communication in SSC .
module Pos.Ssc.Message
( MCCommitment (..)
, MCOpening (..)
, MCShares (..)
, MCVssCertificate (..)
, _MCCommitment
, _MCOpening
, _MCShares
, _MCVssCertificate
, HasSscTag (..)
, ... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/ssc/Pos/Ssc/Message.hs | haskell | TODO: someone who knows networking should take a look because this really
doesn't look like something that anyone should ever have to write | # LANGUAGE DataKinds #
| Messages used for communication in SSC .
module Pos.Ssc.Message
( MCCommitment (..)
, MCOpening (..)
, MCShares (..)
, MCVssCertificate (..)
, _MCCommitment
, _MCOpening
, _MCShares
, _MCVssCertificate
, HasSscTag (..)
, ... |
9d67f0fa580b29e52c1b5951256f7d2f2fdf0700c318c8eb6ee7de54fd959401 | mlabs-haskell/bot-plutus-interface | Main.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE TemplateHaskell #
module Main (main) where
import BotPlutusInterface qualified
import BotPlutusInterface.Config qualified as BotPlutusInterface
import BotPlutusInterface.Types (
HasDefinitions (..),
SomeBuiltin (..),
endpointsToSchemas,
)
import Cardano.PlutusExample.... | null | https://raw.githubusercontent.com/mlabs-haskell/bot-plutus-interface/1ab405a131c4dea2fbc85873da38f85b7a08e229/examples/plutus-nft/app/Main.hs | haskell | # LANGUAGE DeriveAnyClass # | # LANGUAGE TemplateHaskell #
module Main (main) where
import BotPlutusInterface qualified
import BotPlutusInterface.Config qualified as BotPlutusInterface
import BotPlutusInterface.Types (
HasDefinitions (..),
SomeBuiltin (..),
endpointsToSchemas,
)
import Cardano.PlutusExample.NFT
import Data.Aeson.TH (defaul... |
2de546a966563b557125e80c4243a819cc12ea73497af27e9e414ad3ac3cd1e1 | sharplispers/montezuma | tc-multiple-term-doc-pos-enum.lisp | (in-package #:montezuma)
(deftestfixture multiple-term-doc-pos-enum
(:vars ir dir)
(:setup
(let* ((dir (make-instance 'ram-directory))
(iw (make-instance 'index-writer
:directory dir
:analyzer (make-instance 'whitespace-analyzer)
:create-if-missing-p T))
(documents (index-test-help... | null | https://raw.githubusercontent.com/sharplispers/montezuma/ee2129eece7065760de4ebbaeffaadcb27644738/tests/unit/index/tc-multiple-term-doc-pos-enum.lisp | lisp | (in-package #:montezuma)
(deftestfixture multiple-term-doc-pos-enum
(:vars ir dir)
(:setup
(let* ((dir (make-instance 'ram-directory))
(iw (make-instance 'index-writer
:directory dir
:analyzer (make-instance 'whitespace-analyzer)
:create-if-missing-p T))
(documents (index-test-help... | |
6bffb44188df9db26774787fcc4bd3ed35d948501a423c64b9acef7e9a66c065 | kelsey-sorrels/robinson | renderutil.clj | ;; Utility functions for rendering state
(ns robinson.renderutil
(:require
[taoensso.timbre :as log]
[robinson.random :as rr]
[robinson.math :as rmath]
[robinson.color :as rcolor]))
(def items
{:knife [\)]
:obsidian-knife [\)]
:obsidian-axe [\)]
... | null | https://raw.githubusercontent.com/kelsey-sorrels/robinson/337fd2646882708331257d1f3db78a3074ccc67a/src/robinson/renderutil.clj | clojure | Utility functions for rendering state
ruined temple items | (ns robinson.renderutil
(:require
[taoensso.timbre :as log]
[robinson.random :as rr]
[robinson.math :as rmath]
[robinson.color :as rcolor]))
(def items
{:knife [\)]
:obsidian-knife [\)]
:obsidian-axe [\)]
:obsidian-spear [\)]
:flint-knife ... |
637ddeb82ae8f29088b5bfde75f522f83639b3c97fa96b2a2cc4884009b9f1dd | scrintal/heroicons-reagent | folder_open.cljs | (ns com.scrintal.heroicons.solid.folder-open)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:d "M19.906 9c.382 0 .749.057 1.094.162V9a3 3 0 00-3-3h-3.879a.75.75 0 01-.53-.22L11.47 3.66A2.25 2.25 0 009.879 3H6a3 3... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/folder_open.cljs | clojure | (ns com.scrintal.heroicons.solid.folder-open)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:d "M19.906 9c.382 0 .749.057 1.094.162V9a3 3 0 00-3-3h-3.879a.75.75 0 01-.53-.22L11.47 3.66A2.25 2.25 0 009.879 3H6a3 3... | |
cd3795dee0f064cff2a8533e7fe63171508778ab86a027989778d5511a8ec116 | imandra-ai/catapult | catapult.ml | * - based tracing .
A nice profiling format based on json , useful for visualizing what goes on .
This library is the instrumentation part ; see catapult - client , catapult - file ,
or use a custom { ! BACKEND } to actually record traces .
If a trace is obtained in , say , the file " trace.j... | null | https://raw.githubusercontent.com/imandra-ai/catapult/4bc5444a8471c5d0d7cb9a376a5a895c0ab042e6/src/core/catapult.ml | ocaml | */*
*/* | * - based tracing .
A nice profiling format based on json , useful for visualizing what goes on .
This library is the instrumentation part ; see catapult - client , catapult - file ,
or use a custom { ! BACKEND } to actually record traces .
If a trace is obtained in , say , the file " trace.j... |
613d3c714ab4c6bd6a84aa2b3d41eb05be2114909afd447cfc5f7907ce270aeb | Denommus/monadic | result.mli | module MakeT : functor
(Wrapped : Monad.MONAD)
(E : sig
type t
end)
-> sig
type e = E.t
include
Monad.MAKE_T
with type 'a wrapped := 'a Wrapped.t
with type 'a actual_t := ('a, e) result Wrapped.t
val error : e -> 'a t
val ok : 'a -> 'a t
end
with type 'a t = ('a, E.t) result Wrap... | null | https://raw.githubusercontent.com/Denommus/monadic/7cbf9b309800303665a6712a9b57c1d9c66e75b8/library/result.mli | ocaml | module MakeT : functor
(Wrapped : Monad.MONAD)
(E : sig
type t
end)
-> sig
type e = E.t
include
Monad.MAKE_T
with type 'a wrapped := 'a Wrapped.t
with type 'a actual_t := ('a, e) result Wrapped.t
val error : e -> 'a t
val ok : 'a -> 'a t
end
with type 'a t = ('a, E.t) result Wrap... | |
93e5e83e17cdbb2d09cbcc2d14957810da2d1010afaec5869240c525eb84289e | anik545/OwlPPL | eval_complexity.ml | open Ppl
open Core
let root_dir = "/home/anik/Files/work/project/diss/data/perf/by_datasize"
let string_of_float f = sprintf "%.15f" f
let print_2d arr =
Array.iter
~f:(fun r ->
Array.iter ~f:(printf "%f,") r;
printf "\n")
arr
(* save a string matrix (2d array) as a csv file *)
let write_to_cs... | null | https://raw.githubusercontent.com/anik545/OwlPPL/ad650219769d5f32564cc771d63c9a52289043a5/ppl/test/eval_complexity.ml | ocaml | save a string matrix (2d array) as a csv file
generate data to condition on, memoise to ensure same lists are used
lengths of data
generate data to condition on, memoise to ensure same lists are used
lengths of data
generate data to condition on, memoise to ensure same lists are used
lengths of data
gene... | open Ppl
open Core
let root_dir = "/home/anik/Files/work/project/diss/data/perf/by_datasize"
let string_of_float f = sprintf "%.15f" f
let print_2d arr =
Array.iter
~f:(fun r ->
Array.iter ~f:(printf "%f,") r;
printf "\n")
arr
let write_to_csv ~fname data =
let oc = Out_channel.create (sprin... |
088972f78daac745062e2f0871fba1f27087fc9b72e17d958b0ae34cfcd348b7 | jmtd/hwadtools | Util.hs | module Util(clean,pad,getHandle) where
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as C
import System.IO (stdin, IOMode(..), hSetBinaryMode, openFile, Handle)
import System.Environment (getArgs)
clean :: B.ByteString -> String
clean bs = clean' bs 8 where
clean' _ 0 = ""
clean... | null | https://raw.githubusercontent.com/jmtd/hwadtools/e5639a068edf8d88f3e560cbc3708593223e3109/Util.hs | haskell | module Util(clean,pad,getHandle) where
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as C
import System.IO (stdin, IOMode(..), hSetBinaryMode, openFile, Handle)
import System.Environment (getArgs)
clean :: B.ByteString -> String
clean bs = clean' bs 8 where
clean' _ 0 = ""
clean... | |
6272c4ac3f8a6bbdb364794abfb8332146e153e74c6c2a38fbd5e976b1a4c527 | c-cube/ocaml-chord | mixtbl.mli | (* This source code is released into the Public Domain *)
type 'a t
(** A hash table containing values of different types.
The type parameter ['a] represents the type of the keys. *)
and ('a, 'b) injection
val create : int -> 'a t
(** [create n] creates a hash table of initial size [n]. *)
val access : uni... | null | https://raw.githubusercontent.com/c-cube/ocaml-chord/74b25d2d5574291b7c37dc7f4c4f569c7bc4ccf4/src/mixtbl.mli | ocaml | This source code is released into the Public Domain
* A hash table containing values of different types.
The type parameter ['a] represents the type of the keys.
* [create n] creates a hash table of initial size [n].
*
Return a value that works for a given type of values.
This function is normally c... |
type 'a t
and ('a, 'b) injection
val create : int -> 'a t
val access : unit -> ('a, 'b) injection
val get : inj:('a, 'b) injection -> 'a t -> 'a -> 'b option
val set : inj:('a, 'b) injection -> 'a t -> 'a -> 'b -> unit
val length : 'a t -> int
val clear : 'a t -> unit
val remove : 'a t -> 'a -> unit
val copy ... |
bd09f566b6d4609427eae7380739eb5203613f3b0ec2a6a5216f1e78950cfc81 | Beyamor/ruin | helpers.cljs | (ns demo.helpers
(:require [ruin.scene :as s]
[ruin.level :as l]
[ruin.entities :as es]
[demo.tiles :as ts]))
(defn is-empty-floor?
[{:keys [level entities]} x y]
(and (= ts/floor-tile (l/get-tile level x y))
(not (es/at-position? entities x y))))
(defn kill
([{:keys... | null | https://raw.githubusercontent.com/Beyamor/ruin/50a6977430dcbbceecccadbf732298462165b049/src/demo/helpers.cljs | clojure | (ns demo.helpers
(:require [ruin.scene :as s]
[ruin.level :as l]
[ruin.entities :as es]
[demo.tiles :as ts]))
(defn is-empty-floor?
[{:keys [level entities]} x y]
(and (= ts/floor-tile (l/get-tile level x y))
(not (es/at-position? entities x y))))
(defn kill
([{:keys... | |
5a1db744c8644c79c78ded0928308217d4155730d68d560470e0bc5213fdd470 | sanette/bogue | b_time.ml |
Warning : ( from the SDL wiki )
SDL_GetTicks
This function is not recommended as of SDL 2.0.18 ; use SDL_GetTicks64 ( ) instead , where the value does n't wrap every ~49 days . There are places in SDL where we provide a 32 - bit timestamp that can not change without breaking binary compatibility , though , so ... | null | https://raw.githubusercontent.com/sanette/bogue/1c572bc7f49a2af3cafa96dcc643c43406b990f7/lib/b_time.ml | ocaml | Do not use ! it is NOT nice to other threads
we use this instead
only for debugging
the start function
the main function
theoric time after this number of frames
this can also happen when the animation was stopped; we reset
the counter
set lower? |
Warning : ( from the SDL wiki )
SDL_GetTicks
This function is not recommended as of SDL 2.0.18 ; use SDL_GetTicks64 ( ) instead , where the value does n't wrap every ~49 days . There are places in SDL where we provide a 32 - bit timestamp that can not change without breaking binary compatibility , though , so ... |
377e2420aa6f1a33323c9437ed2480cbd6339ac4ddfe5595263fb79050d1ee92 | OCADml/OCADml | polyHoles.mli | val partition
: ?rev:bool
-> ?lift:(V2.t -> V3.t)
-> holes:V2.t list list
-> V2.t list
-> V3.t list * int list list
| null | https://raw.githubusercontent.com/OCADml/OCADml/ceed2bfce640667580f7286b46864a69cdc1d4d7/lib/polyHoles.mli | ocaml | val partition
: ?rev:bool
-> ?lift:(V2.t -> V3.t)
-> holes:V2.t list list
-> V2.t list
-> V3.t list * int list list
| |
742e83f7464a96a4df6f4bc624e4cb1c86c3eea7757d75e107df277873ba9050 | gebi/jungerl | edit_eval.erl | %%%----------------------------------------------------------------------
%%% File : edit_eval.erl
Author : < >
%%% Purpose : Erlang code evaluation
Created : 21 Jan 2001 by < >
%%%----------------------------------------------------------------------
-module(edit_eval).
-author('').
-include_lib("erma... | null | https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/ermacs/src/edit_eval.erl | erlang | ----------------------------------------------------------------------
File : edit_eval.erl
Purpose : Erlang code evaluation
----------------------------------------------------------------------
-export([Function/Arity, ...]).
safe ?
safe ?
----------------------------------------------------------------------... | Author : < >
Created : 21 Jan 2001 by < >
-module(edit_eval).
-author('').
-include_lib("ermacs/include/edit.hrl").
-compile({parse_transform, edit_transform}).
-import(edit_lib, [buffer/1]).
-compile(export_all).
-define(history, erlang_interaction_history).
eval_buffer(State) ->
B = buffer(Stat... |
ba7ff370064368c1540d63566337d97106ea03fa4be1fccf4171dc8ae12839c1 | wdebeaum/step | brand.lisp | ;;;;
W::BRAND
;;;;
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::BRAND
(SENSES
((LF-PARENT ONT::name) (TEMPL gen-part-of-reln-TEMPL)
(META-DATA :ORIGIN CALO :ENTRY-DATE 20040204 :CHANGE-DATE NIL :wn ("brand%1:10:00")
:COMMENTS HTML-PURCHASING-CORPUS))))
))
(define-words :pos W::V... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/brand.lisp | lisp |
(TEMPL AGENT-NEUTRAL-FORMAL-2-XP-3-XP2-NP-OPTIONAL-TEMPL) ; like name
like label | W::BRAND
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::BRAND
(SENSES
((LF-PARENT ONT::name) (TEMPL gen-part-of-reln-TEMPL)
(META-DATA :ORIGIN CALO :ENTRY-DATE 20040204 :CHANGE-DATE NIL :wn ("brand%1:10:00")
:COMMENTS HTML-PURCHASING-CORPUS))))
))
(define-words :pos W::V :TEMPL AG... |
6d690d84da5c6388f320e6c7bc7cf7af18275cce5e7376a199f31a67c8cf1635 | sgbj/MaximaSharp | idamax.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 2edcbd958861 2012/05/30 03:34:52 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 3fe93de3be82 2012/05/06 02:17:14 toy ... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/lapack/blas/idamax.lisp | lisp | Compiled by f2cl version:
Using Lisp CMU Common Lisp 20d (20D Unicode)
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 2edcbd958861 2012/05/30 03:34:52 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 3fe93de3be82 2012/05/06 02:17:14 toy $ "
" f2cl6.l , v 1d5cbacbb... |
7f3af2c762baf90489d563a9b3381b7171c110ab0c549729bf3345e100a9e6fa | simmsb/calamity | Interaction.hs | # LANGUAGE TemplateHaskell #
{-# OPTIONS_GHC -Wno-partial-type-signatures #-}
-- | Interaction endpoints
module Calamity.HTTP.Interaction (
InteractionRequest (..),
InteractionCallbackMessageOptions (..),
InteractionCallbackAutocomplete (..),
InteractionCallbackAutocompleteChoice (..),
InteractionCallbackMod... | null | https://raw.githubusercontent.com/simmsb/calamity/be310255b446e87e7432673de1fbc67ef46de3ae/calamity/Calamity/HTTP/Interaction.hs | haskell | # OPTIONS_GHC -Wno-partial-type-signatures #
| Interaction endpoints
^ Either text or numeric
| Ack an interaction and defer the response
This route triggers the 'thinking' message
| Ephemeral
| Ack an interaction and defer the response
This route is only usable by component interactions, and doesn't trigger a... | # LANGUAGE TemplateHaskell #
module Calamity.HTTP.Interaction (
InteractionRequest (..),
InteractionCallbackMessageOptions (..),
InteractionCallbackAutocomplete (..),
InteractionCallbackAutocompleteChoice (..),
InteractionCallbackModal (..),
) where
import Calamity.HTTP.Channel (AllowedMentions, CreateMessa... |
eb89179ce4a7eee7d04585a58a8efcba58defaf721d8d262558af6c02ae6d01d | mbj/stratosphere | HealthCheck.hs | module Stratosphere.Route53.HealthCheck (
module Exports, HealthCheck(..), mkHealthCheck
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Route53.HealthCheck.HealthCheckConfigProperty as Exports
impor... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/route53/gen/Stratosphere/Route53/HealthCheck.hs | haskell | # SOURCE #
# SOURCE # | module Stratosphere.Route53.HealthCheck (
module Exports, HealthCheck(..), mkHealthCheck
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
data HealthCheck
= HealthCheck {healthCheckConfig :: Hea... |
8635ad90659fa3ba249b657a4a9a5bcc14730f93b8f254452a6c4c91e908c831 | wdebeaum/DeepSemLex | throw.lisp | ;;;;
;;;; W::throw
;;;;
(define-words :pos W::v :TEMPL AGENT-FORMAL-XP-TEMPL
:words (
(W::throw
(wordfeats (W::morph (:forms (-vb) :past W::threw :pastpart W::thrown :nom w::throw)))
(SENSES
((meta-data :origin "verbnet-2.0" :entry-date 20060315 :change-date 20090512 :comments nil :vn ("amuse-31.1") :wn (... | null | https://raw.githubusercontent.com/wdebeaum/DeepSemLex/ce0e7523dd2b1ebd42b9e88ffbcfdb0fd339aaee/trips/src/LexiconManager/Data/new/throw.lisp | lisp |
W::throw
|
(define-words :pos W::v :TEMPL AGENT-FORMAL-XP-TEMPL
:words (
(W::throw
(wordfeats (W::morph (:forms (-vb) :past W::threw :pastpart W::thrown :nom w::throw)))
(SENSES
((meta-data :origin "verbnet-2.0" :entry-date 20060315 :change-date 20090512 :comments nil :vn ("amuse-31.1") :wn ("throw%2:31:00" "throw%2... |
95f622c167981d9ffeeed9662d675317d147e604114df0ab7bb2d3abd7ad211d | privet-kitty/cl-competitive | mod-inverse.lisp | (defpackage :cp/mod-inverse
(:use :cl)
#+sbcl (:import-from #:sb-c #:defoptimizer #:lvar-type #:integer-type-numeric-bounds
#:derive-type #:flushable #:foldable)
#+sbcl (:import-from :sb-kernel #:specifier-type)
(:export #:mod-inverse))
(in-package :cp/mod-inverse)
#+sbcl
(eval-when (:co... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/9c91901c2288b5d0de0f53aa039f96abb9b441b2/module/mod-inverse.lisp | lisp | (defpackage :cp/mod-inverse
(:use :cl)
#+sbcl (:import-from #:sb-c #:defoptimizer #:lvar-type #:integer-type-numeric-bounds
#:derive-type #:flushable #:foldable)
#+sbcl (:import-from :sb-kernel #:specifier-type)
(:export #:mod-inverse))
(in-package :cp/mod-inverse)
#+sbcl
(eval-when (:co... | |
1cf42175645d8e60da073dabb4a284c73b43759d21df0a52d6d633544942f533 | probprog/anglican | bamc.cljc | (ns anglican.bamc
"Bayesian ascent Monte Carlo
Options:
:predict-candidates (false by default)
- output all samples rather than just those
with increasing log-weight"
(:refer-clojure :exclude [rand rand-int rand-nth])
(:require [anglican.state :refer [get-log-weight add-log-weight add-pred... | null | https://raw.githubusercontent.com/probprog/anglican/ab6111d7fa8f68f42ea046feab928ca3eedde1d7/src/anglican/bamc.cljc | clojure | Maximum a Posteriori Estimation through Sampling
Particle state
multi-armed bandits
random choices
counts of occurences of `sample's
last sample id
Mean reward belief
The current belief is converted to a prior belief
the mean and variance.
Bandit
of times the arm was randomly selected from the prior as new.
... | (ns anglican.bamc
"Bayesian ascent Monte Carlo
Options:
:predict-candidates (false by default)
- output all samples rather than just those
with increasing log-weight"
(:refer-clojure :exclude [rand rand-int rand-nth])
(:require [anglican.state :refer [get-log-weight add-log-weight add-pred... |
dcd07d4aaf79c87d8c5e704ec1e62cf61acff4fdc8b627396a1ddd69c9d04adb | mfp/extprot | conv.ml |
max_known , found
type ('a, 'hint, 'path) string_reader =
?hint:'hint -> ?level:int -> ?path:'path -> Reader.String_reader.t -> 'a
type ('a, 'hint, 'path) io_reader =
?hint:'hint -> ?level:int -> ?path:'path -> Reader.IO_reader.t -> 'a
type 'a writer = (Msg_buffer.t -> 'a -> unit)
let get_buf = function
... | null | https://raw.githubusercontent.com/mfp/extprot/c69eb66398e35b964c4232a7c3c85151fb5eddbe/runtime/conv.ml | ocaml |
max_known , found
type ('a, 'hint, 'path) string_reader =
?hint:'hint -> ?level:int -> ?path:'path -> Reader.String_reader.t -> 'a
type ('a, 'hint, 'path) io_reader =
?hint:'hint -> ?level:int -> ?path:'path -> Reader.IO_reader.t -> 'a
type 'a writer = (Msg_buffer.t -> 'a -> unit)
let get_buf = function
... | |
1468d96796deb2399c9d5ccff936c8737c0acf2d826cd50be36b2b80f5a98de8 | mstksg/tensor-ops | HMat.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE InstanceSigs #
{-# LANGUAGE KindSignatures #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeApplicatio... | null | https://raw.githubusercontent.com/mstksg/tensor-ops/1958642d60d879e311da14469c3dd09c186b5fda/src/TensorOps/BLAS/HMat.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE GADTs #
# LANGUAGE KindSignatures #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
| WARNING!! Functions should assume equal sized inputs and return
outputs of the same size! This is not checked!!... | # LANGUAGE FlexibleContexts #
# LANGUAGE InstanceSigs #
# LANGUAGE LambdaCase #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
module TensorOps.BLAS.HMat
( HMat
, HMatD
) where
import Control.DeepSeq
import Data.Kind
import Data.Single... |
42b51af6b2677d25664f83b1d793278020b1c63ba9f8f2817387cb2ff071a9aa | kayceesrk/Quelea | propTest.hs | import Codeec.Contract hiding (liftProp)
import qualified Codeec.Contract as C (liftProp)
liftProp :: Prop () -> Fol ()
liftProp = C.liftProp
tvis :: Fol ()
tvis = forall_ $ \a -> forall_ $ \b -> liftProp $ appRel ((^+) Vis) a b ⇒ vis a b
test :: Fol ()
test = forall_ $ \a -> forall_ $ \b -> forall_ $ \c -> liftProp... | null | https://raw.githubusercontent.com/kayceesrk/Quelea/73db79a5d5513b9aeeb475867a67bacb6a5313d0/scratch/propTest.hs | haskell | import Codeec.Contract hiding (liftProp)
import qualified Codeec.Contract as C (liftProp)
liftProp :: Prop () -> Fol ()
liftProp = C.liftProp
tvis :: Fol ()
tvis = forall_ $ \a -> forall_ $ \b -> liftProp $ appRel ((^+) Vis) a b ⇒ vis a b
test :: Fol ()
test = forall_ $ \a -> forall_ $ \b -> forall_ $ \c -> liftProp... | |
3c2a4381da2c08fa58e431b3e703592956ec51fef74eb180470acf10eeb9d1d1 | travelping/dike | dike_sup.erl | % __ __ _
% / /__________ __ _____ / /___ (_)___ ____ _
/ _ _ / _ _ _ / _ _ ` / | / / _ \/ / _ _ \/ / _ _ \/ _ _ ` /
% / /_/ / / /_/ /| |/ / __/ / /_/ / / / / / /_/ /
% \__/_/ \__,_/ |___/\___/_/ .___/_/_/ /_/\__, /
% /_/ /____/
%
Copyr... | null | https://raw.githubusercontent.com/travelping/dike/2849b9018b6fe5a4fa3f2df48ca9ed99204685ed/src/dike_sup.erl | erlang | __ __ _
/ /__________ __ _____ / /___ (_)___ ____ _
/ /_/ / / /_/ /| |/ / __/ / /_/ / / / / / /_/ /
\__/_/ \__,_/ |___/\___/_/ .___/_/_/ /_/\__, /
/_/ /____/
API
Supervisor callbacks
==================================================... | / _ _ / _ _ _ / _ _ ` / | / / _ \/ / _ _ \/ / _ _ \/ _ _ ` /
Copyright ( c ) Travelping GmbH < >
-module(dike_sup).
-behaviour(supervisor).
-export([start_link/1]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link(Masters) ->
supervisor:start_link({local, ?SERVER}, ?MODULE, [Masters]).
init([M... |
964b94fdff9dc7c8cd6958bc93b0ec481f6240039a76806771a508f9b7c5140c | facebook/pyre-check | locationTest.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/958943f953a2e4dbca69741de51a3cd594ad12c5/source/ast/test/locationTest.ml | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
d142bf08b89c81f166133147d1875a27c0a33f89247591a9cc50beb7bfe70442 | ericmoritz/wsdemo | wsdemo_bench_sup.erl |
-module(wsdemo_bench_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
%% Helper macro for declaring children of supervisor
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
%% =====================================================... | null | https://raw.githubusercontent.com/ericmoritz/wsdemo/4b242ff56e8dc1d2af78b695d23b8c7eeb884682/src/wsdemo_bench_sup.erl | erlang | API
Supervisor callbacks
Helper macro for declaring children of supervisor
===================================================================
API functions
===================================================================
===================================================================
Supervisor callback... |
-module(wsdemo_bench_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
{ok, { {one_for_one, 5, 60}, [
... |
e56d372b2e8f64a473119a0d7ea0cde777940ed444c98ec15ebbf4800445ce08 | awakesecurity/spectacle | Spectacle.hs | {-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Language.Spectacle.Syntax
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see LICENSE
--
-- Stability : stable
Portability : non - portable ( GHC extensions )
--
-- TODO: docs
--
-- @since 1.0.0
module ... | null | https://raw.githubusercontent.com/awakesecurity/spectacle/430680c28b26dabb50f466948180eb59ba72fc8e/src/Language/Spectacle.hs | haskell | # OPTIONS_HADDOCK show-extensions #
|
Module : Language.Spectacle.Syntax
Stability : stable
TODO: docs
@since 1.0.0
* CLI Interaction
* Model Checking
* Specification
* Syntax
** Variables
** Operators
** Logic
* Records
-------------------------------------------------------------------------... |
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see LICENSE
Portability : non - portable ( GHC extensions )
module Language.Spectacle
interaction,
modelcheck,
modeltrace,
Specification (Specification),
specInit,
specNext,
specProp,
Ac... |
b9ab0287b34da7293ecb0ce2d6d6f75e45ada023a468c39d21ff226f8d222c9b | plow-technologies/rescript-linter | rescript_linter_test.ml | open Rescript_parser
open Rescript_linter
module DisallowStringOfIntRule = DisallowedFunctionRule.Make (struct
type options = DisallowedFunctionRule.Options.options
let options =
{ DisallowedFunctionRule.Options.disallowed_function= "string_of_int"
; DisallowedFunctionRule.Options.suggested_function= Some... | null | https://raw.githubusercontent.com/plow-technologies/rescript-linter/8f7f144fb1b61f840a1269f2f55c5c6bd79706ad/test/rescript_linter_test.ml | ocaml | if you want to target the printer use: let mode = Res_parser.Default in
The tests
Run it | open Rescript_parser
open Rescript_linter
module DisallowStringOfIntRule = DisallowedFunctionRule.Make (struct
type options = DisallowedFunctionRule.Options.options
let options =
{ DisallowedFunctionRule.Options.disallowed_function= "string_of_int"
; DisallowedFunctionRule.Options.suggested_function= Some... |
989ca493ec5b901694e30be37c543405b3c829a078ab1834cedc122c77dd311a | stchang/macrotypes | samc-define-lang.rkt | #lang turnstile
(provide Int →
+ #%datum (rename-out [λ+ λ]) #%app
require define define/broken
#%module-begin)
Example by : Adds local ` define ` to λ in stlc
(define-base-type Int)
(define-type-constructor → #:arity >= 1
#:arg-variances (λ (stx)
(syntax-parse st... | null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-example/turnstile/examples/samc-define-lang.rkt | racket | to multiple definitions, such as define/memo
referece to memo table | #lang turnstile
(provide Int →
+ #%datum (rename-out [λ+ λ]) #%app
require define define/broken
#%module-begin)
Example by : Adds local ` define ` to λ in stlc
(define-base-type Int)
(define-type-constructor → #:arity >= 1
#:arg-variances (λ (stx)
(syntax-parse st... |
3642434992955254ffc45387b00d52f7b575e7ff4bdf219781bd20e5d64666bf | karen/haskell-book | OuterInner.hs | module OuterInner where
embedded :: MaybeT (ExceptT String (ReaderT () IO)) Int
embedded = return 1
embedded' :: MaybeT (ExceptT String (ReaderT () IO)) Int
embedded' = MaybeT $ ExceptT $ ReaderT $ const(return (Right (Just 1)))
| null | https://raw.githubusercontent.com/karen/haskell-book/90bb80ec3203fde68fc7fda1662d9fc8b509d179/src/ch26/OuterInner.hs | haskell | module OuterInner where
embedded :: MaybeT (ExceptT String (ReaderT () IO)) Int
embedded = return 1
embedded' :: MaybeT (ExceptT String (ReaderT () IO)) Int
embedded' = MaybeT $ ExceptT $ ReaderT $ const(return (Right (Just 1)))
| |
dd5fc211967ee4a9b4b824f2de8628e9816b396025457a6f43c0fab2fa0114ed | AvisoNovate/rook | gizmos.clj | (ns sample.gizmos
(:require [ring.util.response :refer [response]]))
(defn list-all
{:rook-route [:get ""]
:route-name ::index}
[]
(response []))
| null | https://raw.githubusercontent.com/AvisoNovate/rook/a752ce97f39a5c52301dd1866195f463817a1ed7/spec/sample/gizmos.clj | clojure | (ns sample.gizmos
(:require [ring.util.response :refer [response]]))
(defn list-all
{:rook-route [:get ""]
:route-name ::index}
[]
(response []))
| |
f0357c49200dd1162e4a84eeb3730def537d9899aed076da2f280d579c9617ca | cj1128/sicp-review | 3.67.scm | Exercise 3.67
;; Modify the pairs procedure so that (pairs integers integers) will procedure
;; the stream of all pairs of integers(i,j)(without the condition i <= j)
(load "../stream/utils.scm")
(define ints (integers-starting-from 1))
;; procedure (i, j) with i <= j
(define (pairs1 s t)
(cons-stream
(lis... | null | https://raw.githubusercontent.com/cj1128/sicp-review/efaa2f863b7f03c51641c22d701bac97e398a050/chapter-3/3.5/3.67.scm | scheme | Modify the pairs procedure so that (pairs integers integers) will procedure
the stream of all pairs of integers(i,j)(without the condition i <= j)
procedure (i, j) with i <= j
procedure (i, j) with i > j | Exercise 3.67
(load "../stream/utils.scm")
(define ints (integers-starting-from 1))
(define (pairs1 s t)
(cons-stream
(list (stream-car s) (stream-car t))
(interleave
(stream-map (lambda (x) (list (stream-car s) x))
(stream-cdr t))
(pairs1 (stream-cdr s) (stream-cdr t)))))... |
c0d10d9e630f8962319b0994ef8408c1ec94361f26a4ab7d4118e844554fa9ff | acieroid/scala-am | fringe.scm | (define (atom? x)
(not (pair? x)))
(define (fringe l)
(cond ((null? l) '())
((atom? l) (list l))
(else (append (fringe (car l))
(fringe (cdr l))))))
(equal? (fringe '((1) ((((2)))) (3 (4 5) 6) ((7) 8 9))) '(1 2 3 4 5 6 7 8 9))
| null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/scp1/fringe.scm | scheme | (define (atom? x)
(not (pair? x)))
(define (fringe l)
(cond ((null? l) '())
((atom? l) (list l))
(else (append (fringe (car l))
(fringe (cdr l))))))
(equal? (fringe '((1) ((((2)))) (3 (4 5) 6) ((7) 8 9))) '(1 2 3 4 5 6 7 8 9))
| |
ce34f980019120ed499a2d359d2fd7d716ed0fba8608583b7344af0549c0a39e | GaloisInc/lumberjack | ExampleLog.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad.Reader
import Data.Functor.Contravariant
import Data.Text as T
import qualified... | null | https://raw.githubusercontent.com/GaloisInc/lumberjack/47bfa2cafa62cdcc2fa09990c941c66f3fc137d5/example/ExampleLog.hs | haskell | # LANGUAGE OverloadedStrings #
--------------------------------------------------------------------
Base example:
monad itself, so it can really only support basic/default
operations which preclude some of the ancillary techniques such
desired.
This function represents the main code that logging output should
be ... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
module Main where
import Control.Monad.Reader
import Data.Functor.Contravariant
import Data.Text as T
import qualified Data.Text.IO as TIO
import qualifi... |
0c498f8031d95a09c1d172b75b97b47b06dcc2caaea0ac03ca9f846089abf727 | ocaml-obuild/obuild | gtk.ml | external gtk_true : unit -> bool = "stub_gtk_true"
let () =
Printf.printf "gtk_true(): %b\n" (gtk_true ())
| null | https://raw.githubusercontent.com/ocaml-obuild/obuild/28252e8cee836448e85bfbc9e09a44e7674dae39/tests/simple/gtk.ml | ocaml | external gtk_true : unit -> bool = "stub_gtk_true"
let () =
Printf.printf "gtk_true(): %b\n" (gtk_true ())
| |
2c102a21e1d6a97f487fa3fd9df62836f4fbb8148677d977473e13ac2a06b28f | Shirakumo/kandria | creator.lisp | (in-package #:org.shirakumo.fraf.kandria)
(defclass creator (alloy:dialog)
((entity :initform NIL :accessor entity))
(:default-initargs
:title "Create Entity"
:extent (alloy:size 400 500)))
(defmethod alloy:reject ((creator creator)))
(defmethod alloy:accept ((creator creator))
(let ((entity (entity crea... | null | https://raw.githubusercontent.com/Shirakumo/kandria/458e21adec1088483f238565979cff2d58bbc3fe/editor/creator.lisp | lisp | (in-package #:org.shirakumo.fraf.kandria)
(defclass creator (alloy:dialog)
((entity :initform NIL :accessor entity))
(:default-initargs
:title "Create Entity"
:extent (alloy:size 400 500)))
(defmethod alloy:reject ((creator creator)))
(defmethod alloy:accept ((creator creator))
(let ((entity (entity crea... | |
3b7a178765174ec5f2686c3885a8a51587776d52f85094789ceed4516083d83d | terezka/cherry-core | Array.hs |
|
Module : Array
Description : Fast immutable arrays . The elements in an array must have the same type .
License : BSD 3
Maintainer :
Stability : experimental
Portability : POSIX
Fast immutable arrays . The elements in an array must have the same type .
Module : Array
Descrip... | null | https://raw.githubusercontent.com/terezka/cherry-core/d9bd446e226fc9b04783532969fa670211a150c6/src/Array.hs | haskell | * Creation
* Query
* Manipulate
* Lists
* Transform
| An array.
| Return an empty array.
> length empty == 0
| Determine if an array is empty.
> isEmpty empty == True
| Create an array from a `List`.
INTERNAL
| Helper function to unwrap an array.
|
|
Module : Array
Description : Fast immutable arrays . The elements in an array must have the same type .
License : BSD 3
Maintainer :
Stability : experimental
Portability : POSIX
Fast immutable arrays . The elements in an array must have the same type .
Module : Array
Descrip... |
3c5d634eb163bdade7b0901419bcaa4ba84fbc2d4de4f5ac299633d014e7c3c8 | weavejester/cljfmt | diff.clj | (ns cljfmt.diff
(:import [difflib DiffUtils]
[java.io File]
[java.util.regex Pattern])
(:require [clojure.java.io :as io]
[clojure.string :as str]))
(defn- lines [s]
(str/split s #"\n"))
(defn- unlines [ss]
(str/join "\n" ss))
(defn to-absolute-path [filename]
(->> (str/sp... | null | https://raw.githubusercontent.com/weavejester/cljfmt/d419b3809fe21b9c81c61b0440eb137cfeaaedcc/cljfmt/src/cljfmt/diff.clj | clojure | (ns cljfmt.diff
(:import [difflib DiffUtils]
[java.io File]
[java.util.regex Pattern])
(:require [clojure.java.io :as io]
[clojure.string :as str]))
(defn- lines [s]
(str/split s #"\n"))
(defn- unlines [ss]
(str/join "\n" ss))
(defn to-absolute-path [filename]
(->> (str/sp... | |
b0415fccb530135f1078cbf9fd68fa7797ecb834c05161f3abdf9e4f79ded9ae | channable/icepeak | stress_test.hs | #!/usr/bin/env stack
-- stack --stack-yaml ../../client-haskell/stack.yaml runghc --package QuickCheck --package quickcheck-text --package icepeak-client
# OPTIONS_GHC -Wall #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
import Prelude hiding (fail)
import Data.Foldable (traverse_)
import Dat... | null | https://raw.githubusercontent.com/channable/icepeak/19674df79c5c2c191367a87dff3a10588515044b/server/integration-tests/stress_test.hs | haskell | stack --stack-yaml ../../client-haskell/stack.yaml runghc --package QuickCheck --package quickcheck-text --package icepeak-client
# LANGUAGE OverloadedStrings # | #!/usr/bin/env stack
# OPTIONS_GHC -Wall #
# LANGUAGE ScopedTypeVariables #
import Prelude hiding (fail)
import Data.Foldable (traverse_)
import Data.Text (Text)
import Data.Text.Arbitrary ()
import Icepeak.Client (Client (..), Config (..), setAtLeaf, doNotRetry)
import System.Environment (getArgs)
import System.Ex... |
4b8fb69a95c65903f64dc83e50d1fea0bf4ed3c2e5972d643d8b0a3c653318cd | input-output-hk/plutus-apps | AlwaysSucceeds.hs | # LANGUAGE DataKinds #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
module PlutusExample.PlutusVersion1.AlwaysSucceeds
( alwaysSucceedsScript
, alwaysSucceedsScriptShortBs
) where
import Prelude hiding (($))
import Cardano.Api.Shelley (PlutusScript (..), PlutusScriptV1)
import Codec... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/c1269a7ab8806957cda93448a4637c485352cda5/plutus-example/src/PlutusExample/PlutusVersion1/AlwaysSucceeds.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
module PlutusExample.PlutusVersion1.AlwaysSucceeds
( alwaysSucceedsScript
, alwaysSucceedsScriptShortBs
) where
import Prelude hiding (($))
import Cardano.Api.Shelley (PlutusScript (..), PlutusScriptV1)
import Codec... | |
97e7fce48fecacfaea159ca5ca26f0f1b682fcd5f228502f3e38ac92c59ccd5a | astrada/ocaml-extjs | ext_form_field_Text.ml | class type t =
object('self)
inherit Ext_form_field_Base.t
method afterComponentLayout : Js.number Js.t -> Js.number Js.t -> _ Js.t ->
_ Js.t -> unit Js.meth
method afterRender : unit Js.meth
method applyState : _ Js.t -> unit Js.meth
method autoSize : unit Js.meth
method beforeFocus : Ext_EventObjec... | null | https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/ext_form_field_Text.ml | ocaml | class type t =
object('self)
inherit Ext_form_field_Base.t
method afterComponentLayout : Js.number Js.t -> Js.number Js.t -> _ Js.t ->
_ Js.t -> unit Js.meth
method afterRender : unit Js.meth
method applyState : _ Js.t -> unit Js.meth
method autoSize : unit Js.meth
method beforeFocus : Ext_EventObjec... | |
6ca60fc088c54b0f5a2c689c99536d6acafc4d786b5f7d57ff151bd5409ac00a | bor0/soko-scheme | game.rkt | #lang racket
(define-struct posn (x y))
; Bounds checker
(define (bad-bounds? soko-map pos) (or (>= (posn-x pos) (length (car soko-map)))
(>= (posn-y pos) (length soko-map))
(< (posn-x pos) 0)
(< (posn-... | null | https://raw.githubusercontent.com/bor0/soko-scheme/2813fc1799be16e8f17ec9591cbd3aeb2ec2f3d2/src/game.rkt | racket | Bounds checker
Get a value from the map given position
Return a new updated map with new value at position
Calculate new position given a position and direction
Move box from a position to a new direction, maintaining beacon state
Move soko from a position to a new direction, maintaining beacon state
It's a win ... | #lang racket
(define-struct posn (x y))
(define (bad-bounds? soko-map pos) (or (>= (posn-x pos) (length (car soko-map)))
(>= (posn-y pos) (length soko-map))
(< (posn-x pos) 0)
(< (posn-y pos) 0)))
(def... |
6b408e192668825dcb873549fa29b673e1f59e2f98ed61f94e5c0f9f657b1b3b | kowainik/treap | Update.hs | module Test.Rand.Update
( updateSpec
) where
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Common (describedAs, with, smallTreap)
import qualified Treap
updateSpec :: Spec
updateSpec = describe "Modification operations tests" $ do
insertSpec
deleteSpec
insertSpec :: Spec
inser... | null | https://raw.githubusercontent.com/kowainik/treap/bd59f0ff0a938d7b67ebf5266427e100fce8e487/test/Test/Rand/Update.hs | haskell | module Test.Rand.Update
( updateSpec
) where
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Common (describedAs, with, smallTreap)
import qualified Treap
updateSpec :: Spec
updateSpec = describe "Modification operations tests" $ do
insertSpec
deleteSpec
insertSpec :: Spec
inser... | |
01d9af3e0f24831c40f30786e3164d45533af7823471f5c47ad513dab2f25f04 | agentultra/rosby | Response.hs | module Rosby.Protocol.Response where
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import Rosby.Protocol.Serial
data Result
= Ok
| Fail ByteString
deriving (Eq, Show)
data Response
= Response
{ result :: Result
}
deriving (Eq, Show)
toPrim :: Response -> Primitive
toPrim (... | null | https://raw.githubusercontent.com/agentultra/rosby/8e81794e44f38d6e8676ef022c6ec15611571fd7/rosby-core/src/Rosby/Protocol/Response.hs | haskell | module Rosby.Protocol.Response where
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import Rosby.Protocol.Serial
data Result
= Ok
| Fail ByteString
deriving (Eq, Show)
data Response
= Response
{ result :: Result
}
deriving (Eq, Show)
toPrim :: Response -> Primitive
toPrim (... | |
98451467f14e6d5239d1bf007ccf4b61b19e7535f67967aa30524d8b41c77d2a | ogri-la/strongbox | release_json_test.clj | (ns strongbox.release-json-test
(:require
[clojure.test :refer [deftest testing is use-fixtures]]
;;[taoensso.timbre :as log :refer [debug info warn error spy]]
[strongbox
[release-json :as release-json]
;;[test-helper :refer [fixture-path slurp-fixture]]
]
;;[clj-http.fake :refer [with-fake-r... | null | https://raw.githubusercontent.com/ogri-la/strongbox/6edf6d2501c059d66e63da3c9d4d0997027a7b11/test/strongbox/release_json_test.clj | clojure | [taoensso.timbre :as log :refer [debug info warn error spy]]
[test-helper :refer [fixture-path slurp-fixture]]
[clj-http.fake :refer [with-fake-routes-in-isolation]] | (ns strongbox.release-json-test
(:require
[clojure.test :refer [deftest testing is use-fixtures]]
[strongbox
[release-json :as release-json]
]
))
(deftest release-json-game-tracks
(let [cases [[[{:filename "Foo.zip" :metadata [{:flavor "bcc"}]}]
{"Foo.zip" [:classic-tbc]}]
... |
53b5125d5a7afb767d80b9ddc5010b54a845d07e9c68893e566b633a2a2a973a | jberryman/unagi-chan | Deadlocks.hs | module Deadlocks (deadlocksMain) where
import Control.Concurrent.MVar
import Control.Concurrent(getNumCapabilities,threadDelay,forkIO)
import Control.Exception
import Control.Monad
import Implementations
import qualified Control.Concurrent.Chan.Unagi.Bounded as UB
deadlocksMain :: IO ()
deadlocksMain = do
let t... | null | https://raw.githubusercontent.com/jberryman/unagi-chan/03f62bb6989fcfa3372a93925b7bc0294b51a65d/tests/Deadlocks.hs | haskell | ------
------
------
No real need to checkDeadlocksWriter for tryReadChan.
------
------
------
------
------
------
------
------
------
------
------
------
------
------
------
fragile bounds must be large enought to never be reached here:
-- Chan002.hs -- --
test for deadlocks caused by async ... | module Deadlocks (deadlocksMain) where
import Control.Concurrent.MVar
import Control.Concurrent(getNumCapabilities,threadDelay,forkIO)
import Control.Exception
import Control.Monad
import Implementations
import qualified Control.Concurrent.Chan.Unagi.Bounded as UB
deadlocksMain :: IO ()
deadlocksMain = do
let t... |
28d922942975ffa90cd015514e7ec569546f5ddd309a3c6c22d24b595b6a57e9 | hercules-ci/hercules-ci-agent | Pushed.hs | {-# LANGUAGE DeriveAnyClass #-}
module Hercules.API.Agent.Build.BuildEvent.Pushed where
import Hercules.API.Prelude
data Pushed = Pushed
{ cache :: Text
}
deriving (Generic, Show, Eq, NFData, ToJSON, FromJSON)
| null | https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/216a1d178d57471b05f60bf3e21ce46d3fdc5f94/hercules-ci-api-agent/src/Hercules/API/Agent/Build/BuildEvent/Pushed.hs | haskell | # LANGUAGE DeriveAnyClass # |
module Hercules.API.Agent.Build.BuildEvent.Pushed where
import Hercules.API.Prelude
data Pushed = Pushed
{ cache :: Text
}
deriving (Generic, Show, Eq, NFData, ToJSON, FromJSON)
|
5cbd280073d4cbd974e65ed487f423156da6c8ecd9d93af81ed18f4f5d2183a5 | avik-das/garlic | apply.scm | (display (apply + '(1 2 3))) (apply newline '())
(apply display '(1 " " 2 " " 3)) (apply newline '())
| null | https://raw.githubusercontent.com/avik-das/garlic/5545f5a70f33c2ff9ec449ef66e6acc7881419dc/test/success/apply.scm | scheme | (display (apply + '(1 2 3))) (apply newline '())
(apply display '(1 " " 2 " " 3)) (apply newline '())
| |
f95b243276cd35ee20bd80eced9dc5aabce4795ec3bafc2cdcc87de36a11240a | semaj/mini-tcp-haskell | 3700recv.hs | module Main where
import TCP
import Control.Monad (unless, when, forever, void, replicateM_)
import System.Exit
import System.IO
import Network.Socket
import Control.Exception
import System.Random
import Data.Time.Clock
import Data.List
import Control.Concurrent
import Data.Maybe
import System.Exit
import Data.List.Spl... | null | https://raw.githubusercontent.com/semaj/mini-tcp-haskell/55eb08bc536c2ce7e4765a0a5acdd23cf4bdca88/3700recv.hs | haskell | server state
what to print on next IO cycle
stored segments (can't print because they're out of order)
last sequence number printed
it's a duplicate if it's smaller than the last thing we printed (already printed)
or if we have it in the buffer
used for debug printing.
the lastSeq num is either the last receive... | module Main where
import TCP
import Control.Monad (unless, when, forever, void, replicateM_)
import System.Exit
import System.IO
import Network.Socket
import Control.Exception
import System.Random
import Data.Time.Clock
import Data.List
import Control.Concurrent
import Data.Maybe
import System.Exit
import Data.List.Spl... |
2545ee899433649d15821b07de2d1a386aad7f3f69158108afc3e3f37cf7a7fc | pflanze/chj-schemelib | transaction-cps.scm | Copyright 2010 , 2011 by < >
;;; This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
;;; (at your option) any later version.
(require mon... | null | https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/monad/transaction-cps.scm | scheme | This file is free software; you can redistribute it and/or modify
(at your option) any later version.
particular monad for use in transactions:
each monad (?ç) takes the commit (state) and a continuation, and
passes the new commit and a new continuation to the latter.
turn a normal expression into one that ... | Copyright 2010 , 2011 by < >
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
(require monad/syntax)
monads that return values first pass the value to the continuation
-- ç ehr , b ist monad ? son... |
8b2a617a034ce2fe4e6905479e01846c90ab44d1bbb539c87d6adbfd6c94c3b1 | jaspervdj/fugacious | Views.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Fugacious.Web.Views
( template
, index
, exception
, inbox
, mail
) where
import Control.Applicative ((<|>))
import Control.Monad (forM_)
import Data.Maybe ... | null | https://raw.githubusercontent.com/jaspervdj/fugacious/4e9c2d48174c852616fbfbf28bd9cc90812a1c95/lib/Fugacious/Web/Views.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE RecordWildCards #
module Fugacious.Web.Views
( template
, index
, exception
, inbox
, mail
) where
import Control.Applicative ((<|>))
import Control.Monad (forM_)
import Data.Maybe (listToMaybe)
import ... |
3527504ee911b906f2b5cc9482e5cdc652560085a9dbb28541bde953c8aff145 | ndmitchell/shake | Rebuild.hs |
module Test.Rebuild(main) where
import Development.Shake
import Test.Type
import Text.Read
import Data.List.Extra
import Control.Monad
import General.GetOpt
data Opt = Timestamp String | Pattern Pat
opts = [Option "" ["timestamp"] (ReqArg (Right . Timestamp) "VALUE") "Value used to detect what has rebuilt when"
... | null | https://raw.githubusercontent.com/ndmitchell/shake/99c5a7a4dc1d5a069b13ed5c1bc8e4bc7f13f4a6/src/Test/Rebuild.hs | haskell | check rebuild works
check skip works
check skip - forever works
currently it does not work properly
check skip-forever works
currently it does not work properly |
module Test.Rebuild(main) where
import Development.Shake
import Test.Type
import Text.Read
import Data.List.Extra
import Control.Monad
import General.GetOpt
data Opt = Timestamp String | Pattern Pat
opts = [Option "" ["timestamp"] (ReqArg (Right . Timestamp) "VALUE") "Value used to detect what has rebuilt when"
... |
61f5bbb974cdc7dcf8b37b814971dc86c0e17739d05236c089e483f8a67178ab | protz/mezzo | Driver.mli | (*****************************************************************************)
(* Mezzo, a programming language based on permissions *)
Copyright ( C ) 2011 , 2012 and
(* *)
(* This program is free softwar... | null | https://raw.githubusercontent.com/protz/mezzo/4e9d917558bd96067437116341b7a6ea02ab9c39/parsing/Driver.mli | ocaml | ***************************************************************************
Mezzo, a programming language based on permissions
This program is free software: you can redistribute it and/or modify
(at your optio... | Copyright ( C ) 2011 , 2012 and
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
type run_options = {
html_errors: b... |
f3e97788ee14a3a8f0690bc64c2fbdd2443418a7407cd0f88a47da6d02d734e6 | mirage/alcotest | test_source_code_position.ml |
* Copyright ( c ) 2022 >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AUT... | null | https://raw.githubusercontent.com/mirage/alcotest/838987da59f4e647d2286fdc18f445d30dc880ed/test/e2e/alcotest/source_code_position/test_source_code_position.ml | ocaml | A module with functions to test |
* Copyright ( c ) 2022 >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AUT... |
1c07adf0b7a5a90866d43c85ec5f745bad68c1a2c666241b4aa525f93f78e377 | AbstractMachinesLab/caramel | pid.mli | (** Process id's as returned by the Unix family of functions *)
type t
val to_dyn : t -> Dyn.t
val hash : t -> int
val equal : t -> t -> bool
val to_int : t -> int
(** Unsafe cast of integers to pids. Will be removed once we improve the API
further *)
val of_int : int -> t
| null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/vendor/stdune/pid.mli | ocaml | * Process id's as returned by the Unix family of functions
* Unsafe cast of integers to pids. Will be removed once we improve the API
further | type t
val to_dyn : t -> Dyn.t
val hash : t -> int
val equal : t -> t -> bool
val to_int : t -> int
val of_int : int -> t
|
33f19ebbad92b85c674f5cff3b53afec2f2bbe27edf293242caadb78afc10381 | roelvandijk/numerals | TestData.hs | |
[ @ISO639 - 1@ ] -
[ @ISO639 - 2B@ ] -
[ @ISO639 - 3@ ] nqm
[ @Native name@ ] -
[ @English name@ ]
[@ISO639-1@] -
[@ISO639-2B@] -
[@ISO639-3@] nqm
[@Native name@] -
[@English name@] Ndom
-}
module Text.Numeral.Language.NQM.TestData (card... | null | https://raw.githubusercontent.com/roelvandijk/numerals/b1e4121e0824ac0646a3230bd311818e159ec127/src-test/Text/Numeral/Language/NQM/TestData.hs | haskell | ------------------------------------------------------------------------------
Imports
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Test data
---------------------------------------------------------------... | |
[ @ISO639 - 1@ ] -
[ @ISO639 - 2B@ ] -
[ @ISO639 - 3@ ] nqm
[ @Native name@ ] -
[ @English name@ ]
[@ISO639-1@] -
[@ISO639-2B@] -
[@ISO639-3@] nqm
[@Native name@] -
[@English name@] Ndom
-}
module Text.Numeral.Language.NQM.TestData (card... |
4ee2d730abb1bf8d739e5eea8ac8cf958a23a2ec34d6a3a78e4bff08eed4f579 | privet-kitty/cl-competitive | read-digit.lisp | (defpackage :cp/read-digit
(:use :cl)
(:export #:read-digit))
(in-package :cp/read-digit)
(declaim (ftype (function * (values (integer 0 9) &optional)) read-digit))
(defun read-digit (&optional (in *standard-input*))
"Reads a non-negative one-digit integer."
(macrolet ((%read-byte ()
`(the (unsi... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/read-digit.lisp | lisp | #\Nul | (defpackage :cp/read-digit
(:use :cl)
(:export #:read-digit))
(in-package :cp/read-digit)
(declaim (ftype (function * (values (integer 0 9) &optional)) read-digit))
(defun read-digit (&optional (in *standard-input*))
"Reads a non-negative one-digit integer."
(macrolet ((%read-byte ()
`(the (unsi... |
dc2b5e33971dc838f7c115946f5f975c208004fcd4b3919a8a963bacd8312899 | cpeikert/Lol | PosBin.hs | |
Module : Crypto . Lol . PosBin
Description : Type - level positive naturals in and binary .
Copyright : ( c ) , 2011 - 2017
, 2011 - 2017
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
Positive naturals in and binary representat... | null | https://raw.githubusercontent.com/cpeikert/Lol/4416ac4f03b0bff08cb1115c72a45eed1fa48ec3/lol/Crypto/Lol/PosBin.hs | haskell | # LANGUAGE DataKinds # | |
Module : Crypto . Lol . PosBin
Description : Type - level positive naturals in and binary .
Copyright : ( c ) , 2011 - 2017
, 2011 - 2017
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
Positive naturals in and binary representat... |
1b93250677c66f502f8ecd2272819b422de8ed9b983409d9f2398b8dcd6e404d | scrintal/heroicons-reagent | document_arrow_up.cljs | (ns com.scrintal.heroicons.outline.document-arrow-up)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "roun... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/outline/document_arrow_up.cljs | clojure | (ns com.scrintal.heroicons.outline.document-arrow-up)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "roun... | |
55a3fdab4598f268fb8049b3fbaad6891759c91e668fc0acf6a3ba0ffcf22431 | ds-wizard/engine-backend | Number.hs | module Shared.Util.Number where
import System.Random
generateInt :: Int -> IO Int
generateInt max = do
number <- randomIO
return $ number `mod` max
generateIntInRange :: Int -> Int -> IO Int
generateIntInRange min max = randomRIO (min, max)
| null | https://raw.githubusercontent.com/ds-wizard/engine-backend/8f2fadd4a0dae84eb1f5f09230c4c5b58ac3e18d/engine-shared/src/Shared/Util/Number.hs | haskell | module Shared.Util.Number where
import System.Random
generateInt :: Int -> IO Int
generateInt max = do
number <- randomIO
return $ number `mod` max
generateIntInRange :: Int -> Int -> IO Int
generateIntInRange min max = randomRIO (min, max)
| |
9a4788a6083f62258042eaca79eee161b69670ff90d69c1e51f396992bc4bf7b | brendanhay/gogol | Product.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/8cbceeaaba36a3c08712b2e272606161500fbe91/lib/services/gogol-oslogin/gen/Gogol/OSLogin/Internal/Product.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
* Empty
* LoginProfile
* LoginProfile_SshPublicKeys
* PosixAccount
| Creates a value of 'Empty' with the minimum fields required to make a request.
/See:/ 'newImportSshPublicKeyResponse' smart constructor.
| Detailed inform... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
b273b1da72d29c5a74823f200dfef5859d1f7de33c2071131a1df67dd2716647 | 2600hz/kazoo | props_tests.erl | %%%-----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz
@doc Mostly a drop - in replacement and extension of the proplists module ,
%%% but using the lists module to implement
%%%
@author
@author
%%%
This Source Code Form is subject to the terms of the ... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_stdlib/test/props_tests.erl | erlang | -----------------------------------------------------------------------------
but using the lists module to implement
@end
-----------------------------------------------------------------------------
TODO: generate recursive proplists and key paths to test get/set on nested proplists | ( C ) 2010 - 2020 , 2600Hz
@doc Mostly a drop - in replacement and extension of the proplists module ,
@author
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(prop... |
4b494dc522e5b97b98f783df6c882e45b4cab2057b41b0d78a604cc1a05183b5 | mzp/coq-ruby | sos.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/contrib/micromega/sos.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
type vname = string;;
typ... |
91a3b8e624034e728a4fb5eb7bd0663550e3c263ba87ee69526839423ac6e7df | MLstate/opalang | pass_SimplifyMagic.ml |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/qmlpasses/pass_SimplifyMagic.ml | ocaml | depends
shorthands
--
we refuse polymorphic types for now
* or else we might create troubles with ei
should check that ty is an instance of general_type
* but since ty is monomorphic, checking the unifiability is equivalent |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... |
63650411dfff7cf55fbc41e4799e34ebba56b048abe76e26092361812fd417ef | linoscope/okasaki-book-ocaml | assoc_list.mli | open Okasaki_book
module Make (Key : Ordered_intf.S) : Finite_map_intf.S with type key = Key.t
| null | https://raw.githubusercontent.com/linoscope/okasaki-book-ocaml/04b299fb978c75a0c4da5991dc187fef2e91d9cb/test/ch10/assoc_list.mli | ocaml | open Okasaki_book
module Make (Key : Ordered_intf.S) : Finite_map_intf.S with type key = Key.t
| |
c57bdf078acc660c2c9c1cff512e549d7fb0001cf7ecdfa1b24bbbd6b82dd0a2 | puppetlabs/jruby-utils | slj4j_logger_test.clj | (ns puppetlabs.jruby-utils.slj4j-logger-test
(:require [clojure.test :refer :all]
[puppetlabs.trapperkeeper.testutils.logging :as logutils])
(:import (org.jruby.util.log LoggerFactory)))
(deftest slf4j-logger-test
(let [actual-logger-name "my-test-logger"
exception-message "exceptionally bad ... | null | https://raw.githubusercontent.com/puppetlabs/jruby-utils/7b53c3c6a0c61635362402313bcec809abf5a856/test/unit/puppetlabs/jruby_utils/slj4j_logger_test.clj | clojure | (ns puppetlabs.jruby-utils.slj4j-logger-test
(:require [clojure.test :refer :all]
[puppetlabs.trapperkeeper.testutils.logging :as logutils])
(:import (org.jruby.util.log LoggerFactory)))
(deftest slf4j-logger-test
(let [actual-logger-name "my-test-logger"
exception-message "exceptionally bad ... | |
aea410cc9358f53eea325ca819b6d5ba5017fa229e897007ae0b5f305c59cca4 | VisionsGlobalEmpowerment/webchange | layout_markup.cljc | (ns webchange.question.common.layout-markup
(:require
[webchange.question.common.params :as params]
[webchange.question.utils :as utils]))
(defn- get-layout-params
[]
(let [{template-width :width template-height :height} params/template-size
content-margin-horizontal 256
content-margin-ve... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/fe9738f5c1d32036e7cd8a3744ee3774bc8a5748/src/cljc/webchange/question/common/layout_markup.cljc | clojure | (ns webchange.question.common.layout-markup
(:require
[webchange.question.common.params :as params]
[webchange.question.utils :as utils]))
(defn- get-layout-params
[]
(let [{template-width :width template-height :height} params/template-size
content-margin-horizontal 256
content-margin-ve... | |
1747185f39d3176ee00aa4a8f51ebcc0d97640b34dda62c42ea710ce8405f6fd | default-kramer/plisqin | fragment.rkt | #lang racket
(provide fragment% fragment? >>
fragment-as-name fragment-nullability fragment-fallback)
(require "../token.rkt"
racket/struct)
(define fragment%
(class* token% (printable<%>)
(inherit-field type as-name nullability fallback)
(init-field kind
id
... | null | https://raw.githubusercontent.com/default-kramer/plisqin/26421c7c42656c873c4e0a4fc7f48c0a3ed7770f/plisqin-lib/private2/sql/fragment.rkt | racket | sql-token<%>
equal<%>
printable<%> | #lang racket
(provide fragment% fragment? >>
fragment-as-name fragment-nullability fragment-fallback)
(require "../token.rkt"
racket/struct)
(define fragment%
(class* token% (printable<%>)
(inherit-field type as-name nullability fallback)
(init-field kind
id
... |
948c191de7c4af6792a644a822c6b8048b1228f111269802f306e99bc0113826 | dnlkrgr/hsreduce | Contexts.hs | module Contexts where
arst :: (Eq a, Show a) => a -> a
arst = undefined
| null | https://raw.githubusercontent.com/dnlkrgr/hsreduce/8f66fdee036f8639053067572b55d9a64359d22c/test-cases/regressions/Contexts.hs | haskell | module Contexts where
arst :: (Eq a, Show a) => a -> a
arst = undefined
| |
57c75ac3dc4dd42eb9d809b6743caa9e56035ed77fc81229174b2ada0eab27e9 | jserot/lascar | fsm_expr.mli | (**********************************************************************)
(* *)
LASCAr
(* *)
Copyright ( c ) 2017 - prese... | null | https://raw.githubusercontent.com/jserot/lascar/79bd11cd0d47545bccfc3a3571f37af065915c83/src/lib/fsm_expr.mli | ocaml | ********************************************************************
This source code is licensed under the lic... | LASCAr
Copyright ( c ) 2017 - present , . All rights reserved .
* { 2 Simple expressions for FSMs }
module type T = sig
type ident = string [@@deriving show]
type value [@@deriving show]
type t =
[@@deriving show {with_path=false}]
... |
1de6c70ebf8a00e4c078d11f7e1b6f777d23edcc229172a4792b3c3804459f3f | google/proto-lens | Default.hs | -- | A compatibility layer for older code to create default protocol buffer messages.
--
In older versions of @proto - lens@ , messages could be constructed with
@Data . Default . Class.def@. However , for @proto - lens > = 0.4@ , that is
-- no longer the case and @Data.ProtoLens.defMessage@ should be used instea... | null | https://raw.githubusercontent.com/google/proto-lens/081815877430afc1db669ca5e4edde1558b5fd9d/proto-lens/src/Data/ProtoLens/Default.hs | haskell | | A compatibility layer for older code to create default protocol buffer messages.
no longer the case and @Data.ProtoLens.defMessage@ should be used instead.
This module provides a compatibility layer that may be used to upgrade
older code without substantial code changes.
| A message with all fields set to thei... | In older versions of @proto - lens@ , messages could be constructed with
@Data . Default . Class.def@. However , for @proto - lens > = 0.4@ , that is
module Data.ProtoLens.Default
( def
, Message
) where
import Data.ProtoLens.Message (Message(defMessage))
For new code , prefer ` defMessage ` .
def... |
e43c7a7dba7019c0791c3768baad05af40d86a73f626fe9f3aa54febb2b87b40 | part-cw/lambdanative | srfi-13-local.scm |
;;(include "../libs/gambit/myenv.sch")
;;(include "../libs/gambit/common.sch")
; Top-level cond-expand expanded automatically
(define (string-xcopy! target tstart s sfrom sto)
(do ((i sfrom (inc i)) (j tstart (inc j)))
((>= i sto))
(string-set! target j (string-ref s i))))
; procedure string-concatenate... | null | https://raw.githubusercontent.com/part-cw/lambdanative/74ec19dddf2f2ff787ee70ad677bc13b9dfafc29/modules/ssax/srfi-13-local.scm | scheme | (include "../libs/gambit/myenv.sch")
(include "../libs/gambit/common.sch")
Top-level cond-expand expanded automatically
procedure string-concatenate-reverse STRINGS FINAL END
string-concatenate/shared STRING-LIST -> STRING
string-concatenate-reverse/shared STRING-LIST [FINAL-STRING END] -> STRING
We do not use the... |
(define (string-xcopy! target tstart s sfrom sto)
(do ((i sfrom (inc i)) (j tstart (inc j)))
((>= i sto))
(string-set! target j (string-ref s i))))
(define (string-concatenate-reverse strs final end)
(if (null? strs) (substring final 0 end)
(let*
((total-len
(let loop ((len end) (lst strs)... |
f5fb4deb13a8477c7ba683dfaf25a90314b6947ca6cf2035073de7ae3c150d04 | xmonad/xmonad-contrib | CopyWindow.hs | # LANGUAGE PatternGuards #
# LANGUAGE RecordWildCards #
-----------------------------------------------------------------------------
-- |
Module : XMonad . Actions . CopyWindow
-- Description : Duplicate a window on multiple workspaces.
Copyright : ( c ) < > , < > , < >
-- License : BSD... | null | https://raw.githubusercontent.com/xmonad/xmonad-contrib/571d017b8259340971db1736eedc992a54e9022c/XMonad/Actions/CopyWindow.hs | haskell | ---------------------------------------------------------------------------
|
Description : Duplicate a window on multiple workspaces.
License : BSD3-style (see LICENSE)
Maintainer : ???
Stability : unstable
Portability : unportable
Provides bindings to duplicate a window on multiple workspaces,
p... | # LANGUAGE PatternGuards #
# LANGUAGE RecordWildCards #
Module : XMonad . Actions . CopyWindow
Copyright : ( c ) < > , < > , < >
module XMonad.Actions.CopyWindow (
copy, copyToAll, copyWindow, runOrCopy
, killAllOtherCopies, ki... |
08fcce79867dc28817295ce8927d1a721c02b13eb5fb30238bc782259b61625c | umutisik/mathvas | Snippet.hs | module Handler.Snippet where
import Import
import Model.Activity
import Model.Snippet
import Widget.Editor
import Widget.RunResult
import Text.Julius (rawJS)
import Database.Persist.Sql (fromSqlKey)
import Text.Blaze (text)
getSnippetR :: StoredSnippetId -> Handler Html
getSnippetR sId = do
userId <-... | null | https://raw.githubusercontent.com/umutisik/mathvas/9f764cd4d54370262c70c7ec3eadae076a1eb489/Handler/Snippet.hs | haskell | module Handler.Snippet where
import Import
import Model.Activity
import Model.Snippet
import Widget.Editor
import Widget.RunResult
import Text.Julius (rawJS)
import Database.Persist.Sql (fromSqlKey)
import Text.Blaze (text)
getSnippetR :: StoredSnippetId -> Handler Html
getSnippetR sId = do
userId <-... | |
c18726b87cb5af8fe139c3e7fbc842acd795dbb57ccbfec79b5bf8ac371a1abb | hcarty/msgpackaf | bench.ml | open Benchmark
module Msgpack = Msgpackaf.Easy
let () =
(* cases.mpac is a test data set from the C msgpack library repo *)
let cases_raw =
let file = "test/cases_compact.mpac" in
let ic = open_in_bin file in
let length = in_channel_length ic in
let content = really_input_string ic length in
cl... | null | https://raw.githubusercontent.com/hcarty/msgpackaf/7cc48b72d75a2ba74c1ff0672a5c64f094883b0d/benchmark/bench.ml | ocaml | cases.mpac is a test data set from the C msgpack library repo
Bigger messages
Really big message | open Benchmark
module Msgpack = Msgpackaf.Easy
let () =
let cases_raw =
let file = "test/cases_compact.mpac" in
let ic = open_in_bin file in
let length = in_channel_length ic in
let content = really_input_string ic length in
close_in ic;
Bigstringaf.of_string ~off:0 ~len:(String.length conten... |
6110b1145dc7cf0e74c9a2e6e69c427222471f2f6dfd02b83b98034b9e6f2054 | RiugaBachi/necrophagy | Necrophagy.hs | |
Copyright : ( c ) 2020 Riuga
SPDX - License - Identifier : BSD-3 - Clause
Maintainer : Riuga < >
A concise , type - level , statically - checked EDSL
for programming guitar tablature .
Copyright: (c) 2020 Riuga
SPDX-License-Identifier: BSD-3-Clause
Maintainer: Riuga <>
A concise, type-level, statica... | null | https://raw.githubusercontent.com/RiugaBachi/necrophagy/b68bf9bc5445db9196665ad92f6f0b2869aaf90c/src/Necrophagy.hs | haskell | * Tabs
* Tracks
* Compositions
** Playback
** Export
* Measures
* Poly-kinded sequences
* Durations
* Tuning
** Common Tunings
* Notes
** Combinators
** Dynamics
** Synonyms
** Modifiers
*** Bend curves
*** Custom
* Debugging
** Note values
** Parsing helpers
** Fractions
* Re-exports
* Tablature... | |
Copyright : ( c ) 2020 Riuga
SPDX - License - Identifier : BSD-3 - Clause
Maintainer : Riuga < >
A concise , type - level , statically - checked EDSL
for programming guitar tablature .
Copyright: (c) 2020 Riuga
SPDX-License-Identifier: BSD-3-Clause
Maintainer: Riuga <>
A concise, type-level, statica... |
0ed5f860774431ce9862e4f5eb434407f3358924682dbe8076760bb3dabb2766 | mstksg/backprop-learn | Regression.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ApplicativeDo #-}
# LANGUAGE
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE Flexib... | null | https://raw.githubusercontent.com/mstksg/backprop-learn/59aea530a0fad45de6d18b9a723914d1d66dc222/src/Backprop/Learn/Model/Regression.hs | haskell | # LANGUAGE ApplicativeDo #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE GADTs ... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications ... |
a305e9cae47b3b77e5be1fa80096f1fb6f4ab9e26189dfb3c0e6a394c0cd0ba8 | facebook/flow | parser_tests.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/f7d50bb772462888b27b5dbf9acf7d079eb1ff5f/src/parser/__tests__/parser_tests.ml | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
74d8f4b3dba24d571f6510f612610e1171a77e2625f2aad7b4da9b682a0997aa | LCBH/UKano | parsing_helper.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | null | https://raw.githubusercontent.com/LCBH/UKano/13c046ddaca48b45d3652c3ea08e21599e051527/proverif2.01/src/parsing_helper.mli | ocaml | String parsing | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... |
af06caf706f1bd0902708d2ae12aca9166f3b492a1c4a51464f72db36da3ed4e | ghcjs/jsaddle-dom | XPathExpression.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.XPathExpression
(evaluate, evaluate_, XPathExpression(..), gTypeXPathExpression)
where
import Prelude ((.), ... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/XPathExpression.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.XPathExpression
(evaluate, evaluate_, XPathExpression(..), gTypeXPathExpression)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, realToFra... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.