_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 |
|---|---|---|---|---|---|---|---|---|
331114f0441b826fc2181f9f9b91aad359c6441c334be3309d0a4156d861c8fe | input-output-hk/plutus | LMachine.hs | -- editorconfig-checker-disable-file
{-# LANGUAGE OverloadedStrings #-}
-- | The L machine
A lazy machine based on the L machine of Friedman et al . [ Improving the Lazy Krivine Machine ]
For more details see the document in plutus / docs / fomega / lazy - machine
The code here 's closely based on the CEK machin... | null | https://raw.githubusercontent.com/input-output-hk/plutus/1af96af28f45030c94e11138a2f13869e9e63b79/doc/notes/fomega/cek-cps-experiments/src/LMachine.hs | haskell | editorconfig-checker-disable-file
# LANGUAGE OverloadedStrings #
| The L machine
## Things to fix soon.
# Generalise the machine return type so that we can return extra information,
like the environment and/or heap. These are just discarded at the moment.
# Deal properly with dynamic builtins.
# Remove th... |
A lazy machine based on the L machine of Friedman et al . [ Improving the Lazy Krivine Machine ]
For more details see the document in plutus / docs / fomega / lazy - machine
The code here 's closely based on the CEK machine implementation .
# Monadify some things ( heap , dbnms )
's new infrastructure ... |
5575d3c6bb43731963823a3c111da94921db4fb8c59100dc4027fb5abd0accf5 | qfpl/reflex-workshop | Workflow.hs | |
Copyright : ( c ) 2018 , Commonwealth Scientific and Industrial Research Organisation
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) 2018, Commonwealth Scientific and Industrial Research Organisation
License : BSD3
Maintainer :
Stability : experi... | null | https://raw.githubusercontent.com/qfpl/reflex-workshop/244ef13fb4b2e884f455eccc50072e98d1668c9e/src/Workshop/DOM/Switching/Workflow.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE GADTs # | |
Copyright : ( c ) 2018 , Commonwealth Scientific and Industrial Research Organisation
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) 2018, Commonwealth Scientific and Industrial Research Organisation
License : BSD3
Maintainer :
Stability : experi... |
83ce2d65d3a8a1276771ca7841d11ba40abfce23d80d9dd82f242010e12e9a8d | AccelerateHS/accelerate | Sugar.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE BangPatterns #
{-# LANGUAGE CPP #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiPara... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate/63e53be22aef32cd0b3b6f108e637716a92b72dc/icebox/Sugar.hs | haskell | # LANGUAGE CPP #
# LANGUAGE ConstraintKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators #
# OPTIONS_HADDOCK hide #
|
Module ... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE BangPatterns #
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances ... |
de700f498e9c136cead78b297656feae0da6ff88f0ee4a5be266aa6e27cc305a | stylewarning/cl-permutation | misc.lisp | ;;;; examples/misc.lisp
;;;;
Copyright ( c ) 2018
(in-package #:cl-permutation-examples)
;;; Is there a name for this group?
;;;
;;; 1 4
;;; <=>
2 3 5 6
;;;
(defun make-bicycle (n)
(let ((left-wheel (alexandria:iota n :start 1))
(right-wheel (alexandria:iota n :start (... | null | https://raw.githubusercontent.com/stylewarning/cl-permutation/631b17541ad9fb5e2fbf89b09bc0d5a98d718e1c/examples/misc.lisp | lisp | examples/misc.lisp
Is there a name for this group?
1 4
<=>
| Copyright ( c ) 2018
(in-package #:cl-permutation-examples)
2 3 5 6
(defun make-bicycle (n)
(let ((left-wheel (alexandria:iota n :start 1))
(right-wheel (alexandria:iota n :start (1+ n))))
(group-from-cycles
(list
(list (apply #'make-cycle left-wheel))
(list (apply #'... |
0331af35313a36152406b9363893816edeffbd9c40e534e413bf6a4a08cb4372 | qnikst/imagemagick | tilt_shift.hs | {-# LANGUAGE OverloadedStrings #-}
Implement Anthony 's tilt - shift example from /#tilt_shift
NOTE that I use the -function version - not the linear one
convert beijing_md.jpg -sigmoidal - contrast 15x30 % \
\ ( + clone -sparse - color ' 0,0 black 0,%[fx : h-1 ] gray80 ' \
-functio... | null | https://raw.githubusercontent.com/qnikst/imagemagick/bc9e7ac85749f42a87901b722c5d36a8bed07d5c/examples/tilt_shift.hs | haskell | # LANGUAGE OverloadedStrings #
arguments for MagickSparseColorImage
Note that the colours are stored as separate *normalized* RGB components
RGB black
RGB white
arglist[6] = ; --TODO
Do the polynomial function |
Implement Anthony 's tilt - shift example from /#tilt_shift
NOTE that I use the -function version - not the linear one
convert beijing_md.jpg -sigmoidal - contrast 15x30 % \
\ ( + clone -sparse - color ' 0,0 black 0,%[fx : h-1 ] gray80 ' \
-function polynomial 4,-4,1 \ ) \
... |
67d23d59ad59606b3ccc9ea9adadb5123f726920101ee40e3bcad526375d439e | racket/slideshow | widescreen.rkt | #lang racket
(require "widescreen/base.rkt"
"pict.rkt")
(provide (except-out (all-from-out racket
"widescreen/base.rkt"
"pict.rkt")
printable<%>))
(module reader syntax/module-reader
slideshow/widescreen)
| null | https://raw.githubusercontent.com/racket/slideshow/4588507e83e9aa859c6841e655b98417d46987e6/slideshow-lib/slideshow/widescreen.rkt | racket | #lang racket
(require "widescreen/base.rkt"
"pict.rkt")
(provide (except-out (all-from-out racket
"widescreen/base.rkt"
"pict.rkt")
printable<%>))
(module reader syntax/module-reader
slideshow/widescreen)
| |
ba2853c0f8e2c6af6434c6665a8c7f9ad1ea7cbb4d3a1458c6861eb47b8b3f96 | mransan/ocaml-protoc | test19_ml.ml | module T = Test19_types
module Pb = Test19_pb
module Pp = Test19_pp
let decode_ref_data () =
let hash = Hashtbl.create 3 in
Hashtbl.add hash "one" "1";
Hashtbl.add hash "two" "2";
Hashtbl.add hash "three" "3";
let m = T.default_hash () in
m.T.t <- hash;
m
let test_contain_data { T.t } =
assert (Hasht... | null | https://raw.githubusercontent.com/mransan/ocaml-protoc/e43b509b9c4a06e419edba92a0d3f8e26b0a89ba/src/tests/integration-tests/test19_ml.ml | ocaml | module T = Test19_types
module Pb = Test19_pb
module Pp = Test19_pp
let decode_ref_data () =
let hash = Hashtbl.create 3 in
Hashtbl.add hash "one" "1";
Hashtbl.add hash "two" "2";
Hashtbl.add hash "three" "3";
let m = T.default_hash () in
m.T.t <- hash;
m
let test_contain_data { T.t } =
assert (Hasht... | |
f972d573d667cda10fa240b53c0ed361e26ba37d2eda5a9342c87268317ddcef | TheClimateCorporation/mandoline | dataset.clj | (ns io.mandoline.dataset
(:require
[io.mandoline
[variable :as variable]
[utils :as utils]]))
;; Assertions ;;
(defn- valid-type? [type]
"Checks if the string is in the list of supported types"
(let [supported #{"byte" "char" "short" "int" "long" "float" "double"}]
(contains? supported type)))... | null | https://raw.githubusercontent.com/TheClimateCorporation/mandoline/fa26162ef0349ecb71be9d27a46652206f5c1b99/src/io/mandoline/dataset.clj | clojure | Assertions ;;
failed Y".
Token construction/modification ;;
Allow the introduction of new variables (i.e. don't attempt to
check variables in 'child' that didn't exist in 'parent').
copy chunk dimensions from the parent if not defined in the child
set up the child's parent pointer
TODO: define equilateral chunk... | (ns io.mandoline.dataset
(:require
[io.mandoline
[variable :as variable]
[utils :as utils]]))
(defn- valid-type? [type]
"Checks if the string is in the list of supported types"
(let [supported #{"byte" "char" "short" "int" "long" "float" "double"}]
(contains? supported type)))
(defn- valid-fi... |
32b240f6ed7c4311979e4acd654b915e635386ae913e43c9cdcd4c36b8799c49 | jaredly/reason-language-server | main_args.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet... | null | https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/402/main_args.ml | ocaml | *********************************************************************
OCaml
... | , projet Para , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
let mk_a f =
"-a", Arg.Unit f, " Build ... |
d29d039b12148c6a552889334ee38000f91a4f4a3dee53176acedec43f39e79f | AndrasKovacs/ELTE-func-lang | Lesson01_after.hs | # options_ghc -Wincomplete - patterns #
-- {-# LANGUAGE NoImplicitPrelude #-}
ghci commands :
- : l(oad ) file
- : r(eload )
- : bro(wse )
- : t(ype ) expression
- : i(nfo ) definition
examples :
- : load - : t foo
- : i ( + )
ghci commands:
- :l(oad) file
... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/88d41930999d6056bdd7bfaa85761a527cce4113/2020-21-2/gyak_3/Lesson01_after.hs | haskell | {-# LANGUAGE NoImplicitPrelude #-}
Bool
Pair
List
data List a = Empty | a :-: (List a) deriving (Show)
l = True :-: False :-: True :-: Empty
Tree
·
/ \
· ·
/ \
· ·
·
/ \
· ·
/ \
· ·
/ \
· ·
Functions
xor :: Bool -> Bool -> Bool
xor False b = b
xor ... | # options_ghc -Wincomplete - patterns #
ghci commands :
- : l(oad ) file
- : r(eload )
- : bro(wse )
- : t(ype ) expression
- : i(nfo ) definition
examples :
- : load - : t foo
- : i ( + )
ghci commands:
- :l(oad) file
- :r(eload)
- :bro(wse)
- :... |
dcaf83fcde35c684dfc3a9b09c75092ece3cffe80c1ddaad694b34ef96aa0271 | Clozure/ccl-tests | hash-table-count.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Fri Nov 28 05:14:25 2003
;;;; Contains: Tests of HASH-TABLE-COUNT
(in-package :cl-test)
(deftest hash-table-count.1
(hash-table-count (make-hash-table))
0)
(deftest hash-table-count.2
(hash-table-count (make-hash-table :test 'eq))
0)
(deftest hash-table-... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/hash-table-count.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of HASH-TABLE-COUNT
This function is mostly tested by calls to test-hash-table-1 | Author :
Created : Fri Nov 28 05:14:25 2003
(in-package :cl-test)
(deftest hash-table-count.1
(hash-table-count (make-hash-table))
0)
(deftest hash-table-count.2
(hash-table-count (make-hash-table :test 'eq))
0)
(deftest hash-table-count.3
(hash-table-count (make-hash-table :test 'eql))
0)
(... |
62a2b11dc30923b5a0184e4e3f2594e00490d3aa77237264eec4f8de752e14c8 | pixlsus/registry.gimp.org_static | image-check.scm | ; 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 version.
;
; This program is distributed in the hope that it wil... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/image-check.scm | scheme | This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GN... | it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
Author :
Date : 26 - 12 - 2013
Version : 1.0
Required : Gimp 2.8
(define (script-fu-image-check img drawa merged)
(let* (... |
ae02868d2335084955abc67cb839018a6210f0c74dce12f6ba94258c53090253 | ekmett/ekmett.github.com | BiKleisli.hs | # OPTIONS_GHC -cpp #
-------------------------------------------------------------------------------------------
-- |
Module : Control . Arrow .
Copyright : 2008
-- License : BSD3
--
Maintainer : < >
-- Stability : experimental
-- Portability : portable
--
---------------------------------------------... | null | https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/category-extras-backup/src/Control/Arrow/BiKleisli.hs | haskell | -----------------------------------------------------------------------------------------
|
License : BSD3
Stability : experimental
Portability : portable
----------------------------------------------------------------------------------------- | # OPTIONS_GHC -cpp #
Module : Control . Arrow .
Copyright : 2008
Maintainer : < >
module Control.Arrow.BiKleisli
( BiKleisli(..)
) where
#if __GLASGOW_HASKELL__ >= 609
import Prelude hiding (id,(.))
import Control.Category
#endif
import Control.Monad (liftM)
import Control.Comonad
import Control.A... |
be1391f9be3f97038e6af4f77a7300035cccfcc676794fb162235c03786bd222 | raaz-crypto/raaz | Types.hs | # LANGUAGE RecordWildCards #
module Benchmark.Types
( RaazBench
, toBenchmarkable
, nBytes
, nRuns
, runRaazBench
, header
) where
import Criterion.Measurement
import Criterion.Measurement.Types hiding (measure)
import Data.Int
import Text.PrettyPrint
import Raaz.Cor... | null | https://raw.githubusercontent.com/raaz-crypto/raaz/3afeac6688e15e815edbe5e5825efe81064c6a33/benchmarks/internal/Benchmark/Types.hs | haskell | | The total data processed in each benchmark.
| How many times to run each benchmark
| Execute a benchmark and writeout the results.
---------------------- Helper functions ------------------------
time
cycles
rate
secs/byte
cycles/byte
| Humanise the output units.
| @Unit prefix n@ gives proper prefix every ... | # LANGUAGE RecordWildCards #
module Benchmark.Types
( RaazBench
, toBenchmarkable
, nBytes
, nRuns
, runRaazBench
, header
) where
import Criterion.Measurement
import Criterion.Measurement.Types hiding (measure)
import Data.Int
import Text.PrettyPrint
import Raaz.Cor... |
cb978b2b51cf1c2fca8595416ba53305cb2be1f5f16d67ce1a4dccccb9bf7c3b | zliu41/min-max-pqueue | IntMinMaxQueue.hs | {-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TupleSections #
-----------------------------------------------------------------------------
-- |
-- Module : Data.IntMinMaxQueue
Maintainer : < >
--
-- Double-ended priority queues where priority values are integers, allowing
-... | null | https://raw.githubusercontent.com/zliu41/min-max-pqueue/62fefaf495334a3238787980eb1e463b3bfb8be2/src/Data/IntMinMaxQueue.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE RankNTypes #
---------------------------------------------------------------------------
|
Module : Data.IntMinMaxQueue
Double-ended priority queues where priority values are integers, allowing
efficient retrieval and removel from both ends of the queue.
A queue c... | # LANGUAGE TupleSections #
Maintainer : < >
The implementation is backed by an @'IntMap ' ( ' NonEmpty ' a)@. This means
In a pure language like , a
If you only access one end of the queue ( i.e. , you need a regular
if performance is important ; in my experience wins , even for
module Data.IntMinM... |
ffbb421fad93c02ba39f36f8fd12b0d5bc5dae483555e6531e2a24a7c9c878a2 | trainline/optimus | api.clj | Copyright ( c ) Trainline Limited , 2017 . All rights reserved .
See LICENSE.txt in the project root for license information
(ns optimus.loader.api
"This namespace contains functions that call the optimus
api."
(:require [clojure.tools.logging :as log]
;;[aleph.http :as http]
[clj-http... | null | https://raw.githubusercontent.com/trainline/optimus/caf4d065f40d5edef87eeb60d767b8379465501e/loader/src/optimus/loader/api.clj | clojure | [aleph.http :as http]
TODO: must be warn sometimes, error sometimes, check this. | Copyright ( c ) Trainline Limited , 2017 . All rights reserved .
See LICENSE.txt in the project root for license information
(ns optimus.loader.api
"This namespace contains functions that call the optimus
api."
(:require [clojure.tools.logging :as log]
[clj-http.client :as http]
[taoen... |
d124dee29ded473558f4135a11e37100127731057263247469431834a2440263 | jhidding/r6rs-monads | monads.scm | (library (monads)
(export
;;; syntax
define-monad define-context <-
;;; failure
failure? make-failure failure-trace failure-exception *failure*)
(import (rnrs (6))
(monads failure)
(monads syntax))
)
| null | https://raw.githubusercontent.com/jhidding/r6rs-monads/76e857c54ee71203fc556420133414b145113b13/lib/monads.scm | scheme | syntax
failure | (library (monads)
(export
define-monad define-context <-
failure? make-failure failure-trace failure-exception *failure*)
(import (rnrs (6))
(monads failure)
(monads syntax))
)
|
68e629cbfe2ee471a57ccfd6e5815812bcf959225dfe334eff7bf6513eca4e47 | godotclj/godotclj | strings.clj | (ns godotclj.strings
(:require [clojure.string :as str]))
(defn interp
[s m]
(str/replace s #"[{][{]([^}]+)[}][}]"
(fn [match]
(str (get m (keyword (second match)))))))
| null | https://raw.githubusercontent.com/godotclj/godotclj/23e9c62e7083f7be9aff8bb205d2a270dd5b5e39/src/clojure/godotclj/strings.clj | clojure | (ns godotclj.strings
(:require [clojure.string :as str]))
(defn interp
[s m]
(str/replace s #"[{][{]([^}]+)[}][}]"
(fn [match]
(str (get m (keyword (second match)))))))
| |
e5a8f9f696a74b8af63cee4395ee46c6d12dca84ab433e563dcc25b5598253b8 | typedclojure/typedclojure | core__defn.clj | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/514f2a46ae0145f34bef0400495079ba3292b82b/typed/lib.clojure/src/typed/clj/ext/clojure/core__defn.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns ^:no-doc typed.clj.ext.clojure.core__defn
"Typing rules for clojure.core/defn"
(:require [clojure.core.typed.internal :as internal]
[typed.clj.checker.check :as chk]
[typed.cljc.analyzer :as ana2]
[typed.cljc.checker.check.unanalyz... |
9b196392014386bf7380b36d06efd57b6f36c540dc13133f7dace81318f41a78 | esl/MongooseIM | mongoose_graphql_default.erl | -module(mongoose_graphql_default).
-export([execute/4]).
-ignore_xref([execute/4]).
%% Assume we are given a map(). Look up the field in the map. If not
%% present, return the value null.
execute(_Ctx, Obj, Field, _Args) ->
{ok, maps:get(Field, Obj, null)}.
| null | https://raw.githubusercontent.com/esl/MongooseIM/891f7ab9ca5e7b41be5da9550152fec1590b0b22/src/graphql/mongoose_graphql_default.erl | erlang | Assume we are given a map(). Look up the field in the map. If not
present, return the value null. | -module(mongoose_graphql_default).
-export([execute/4]).
-ignore_xref([execute/4]).
execute(_Ctx, Obj, Field, _Args) ->
{ok, maps:get(Field, Obj, null)}.
|
414a938aae73e8d40a5507a456b5640e0aa1c840949abf7398e8a9203c6db36d | yetibot/core | alias.clj | (ns yetibot.core.db.alias
(:require
[yetibot.core.db.util :as db.util]))
(def schema {:schema/table "alias"
:schema/specs (into [[:user-id :text "NOT NULL"]
[:cmd-name :text "NOT NULL"]
[:cmd :text "NOT NULL"]]
... | null | https://raw.githubusercontent.com/yetibot/core/e35cc772622e91aec3ad7f411a99fff09acbd3f9/src/yetibot/core/db/alias.clj | clojure | (ns yetibot.core.db.alias
(:require
[yetibot.core.db.util :as db.util]))
(def schema {:schema/table "alias"
:schema/specs (into [[:user-id :text "NOT NULL"]
[:cmd-name :text "NOT NULL"]
[:cmd :text "NOT NULL"]]
... | |
cb3e6c733a1e70692aea960b639c1abc4ea5fcb14ec711654fb9c1d2c60bc092 | rowangithub/DOrder | rulemine.mli | exception MINEFAIL
val naive_mine_assoc:
(int list list) -> Predicate.t list -> Env.t -> Frame.t -> (Predicate.t * float * int) list
val manual_mine_assoc:
(int list list) -> Predicate.t list -> Env.t -> Frame.t -> (string, Path.t) Hashtbl.t -> (Predicate.t) list
val mine_template: bool ->
(string list * string lis... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/liquid/rulemine.mli | ocaml | exception MINEFAIL
val naive_mine_assoc:
(int list list) -> Predicate.t list -> Env.t -> Frame.t -> (Predicate.t * float * int) list
val manual_mine_assoc:
(int list list) -> Predicate.t list -> Env.t -> Frame.t -> (string, Path.t) Hashtbl.t -> (Predicate.t) list
val mine_template: bool ->
(string list * string lis... | |
ea4525b0f14083adf36a52adc8c95208b0573093f09e3fed10f87a2115b4d146 | serokell/qtah | HMargins.hs | This file is part of Qtah .
--
Copyright 2015 - 2018 The Qtah Authors .
--
-- 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) ... | null | https://raw.githubusercontent.com/serokell/qtah/abb4932248c82dc5c662a20d8f177acbc7cfa722/qtah/src/Graphics/UI/Qtah/Core/HMargins.hs | haskell |
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
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MER... | This file is part of Qtah .
Copyright 2015 - 2018 The Qtah Authors .
the Free Software Foundation , either version 3 of the License , or
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
module Graphics.UI.Qtah.Core.HMargins (
HMar... |
6cc6dc95d54c3786953c8e842ad6a33fee9fd995a0cf6826acbef6bae6e9ce2c | samrushing/irken-compiler | t_llk.scm | ;; -*- Mode: Irken -*-
(datatype list
(:nil)
(:cons 'a (list 'a))
)
(define (^llvm-x) '("thing1" "thing2"))
(^llvm-x)
| null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/llvm/t_llk.scm | scheme | -*- Mode: Irken -*- |
(datatype list
(:nil)
(:cons 'a (list 'a))
)
(define (^llvm-x) '("thing1" "thing2"))
(^llvm-x)
|
dad85f983617738936204ddec08c336bc0a02efa8f0a914716057243fd360f98 | realworldocaml/book | stanza.mli | (** Stanza in dune/jbuild files *)
open! Stdune
open Dune_sexp
type t = ..
val latest_version : Syntax.Version.t
module Parser : sig
(** Type of stanza parser.
Each stanza in a configuration file might produce several values of type
[t], hence the [t list] here. *)
type nonrec t = string * t list D... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_lang/stanza.mli | ocaml | * Stanza in dune/jbuild files
* Type of stanza parser.
Each stanza in a configuration file might produce several values of type
[t], hence the [t list] here. |
open! Stdune
open Dune_sexp
type t = ..
val latest_version : Syntax.Version.t
module Parser : sig
type nonrec t = string * t list Decoder.t
end
* Syntax identifier for the Dune language . [ ( 0 , X ) ] correspond to the Jbuild
language while versions from [ ( 1 , 0 ) ] correspond to the Dune one .
lang... |
7f45921f611516deefbaa3d8ed44f634a5816520701c544734cd687830eb0dd5 | yandex/minishard | minishard_allocator.erl | Minishard allocator
%%%
%%% This module is a callback module for gen_leader (well, local version of it)
%%% which tracks other members status and decides who runs which shard.
%%%
%%% Leader tracks the cluster status in a map. Each cluster node has a key in the map,
%%% corresponding value is its status. Possible sta... | null | https://raw.githubusercontent.com/yandex/minishard/bf07eb0da61f583b4d5f66e433edf991fb137d66/src/minishard_allocator.erl | erlang |
This module is a callback module for gen_leader (well, local version of it)
which tracks other members status and decides who runs which shard.
Leader tracks the cluster status in a map. Each cluster node has a key in the map,
corresponding value is its status. Possible statuses are:
* down -- alloc... | Minishard allocator
-module(minishard_allocator).
-define(GEN_LEADER, minishard_gen_leader).
-behavior(?GEN_LEADER).
-export([name/1]).
-export([start_link/2, cluster_status/1, shard_map/1]).
-export([bind/1]).
-export([get_manager/2, get_node/2]).
-export([seed_state/3, set_hacks/2, leader/1]).
-export([
in... |
d5a5afc65c86b306bfa1c51f0e849591755b0e99f99df54e6f18bdfa9bad5606 | piotr-yuxuan/slava | conversions.clj | ✔ (ns piotr-yuxuan.slava.conversions
? "FIXME add cljdoc"
? (:require [piotr-yuxuan.slava.duration :as duration])
? (:import (org.apache.avro Conversions$DecimalConversion Conversions$UUIDConversion Schema)
? (org.apache.avro.data TimeConversions$DateConversion TimeConversions$TimeMillisConversion Time... | null | https://raw.githubusercontent.com/piotr-yuxuan/slava/303d49b5baf0be658246c7da3c88f0ca1f3bb3c1/doc/code-coverage/piotr_yuxuan/slava/conversions.clj | clojure | ✔ (ns piotr-yuxuan.slava.conversions
? "FIXME add cljdoc"
? (:require [piotr-yuxuan.slava.duration :as duration])
? (:import (org.apache.avro Conversions$DecimalConversion Conversions$UUIDConversion Schema)
? (org.apache.avro.data TimeConversions$DateConversion TimeConversions$TimeMillisConversion Time... | |
c849f46f96d33146e19e4824fb818452d5a752a2b6603965a81ec49268cc2b5d | BranchTaken/Hemlock | test_ops.ml | open! Basis.Rudiments
open! Basis
open! Hmc
open Realer
let test () =
let cmp_opt_pp cmp_opt formatter = begin
match cmp_opt with
| None -> formatter |> Fmt.fmt "NA"
| Some rel -> formatter |> Cmp.pp rel
end in
let cmp_opt t0 t1 = begin
match is_nan t0 || (is_nan t1) with
| true -> None
|... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/f3604ceda4f75cf18b6ee2b1c2f3c5759ad495a5/bootstrap/test/hmc/realer/test_ops.ml | ocaml | open! Basis.Rudiments
open! Basis
open! Hmc
open Realer
let test () =
let cmp_opt_pp cmp_opt formatter = begin
match cmp_opt with
| None -> formatter |> Fmt.fmt "NA"
| Some rel -> formatter |> Cmp.pp rel
end in
let cmp_opt t0 t1 = begin
match is_nan t0 || (is_nan t1) with
| true -> None
|... | |
7dd9324a7478fdf1c67254972251c4dca9d487076318f04e4e63b7fd8b71d90f | coq/coq | vernac.ml | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/309a71cd105eee9c6f2ba380fe6f6005ff7afeb8/toplevel/vernac.ml | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
d1412f5a06487548b5a143f4131891965e95480ac10dbbebbdbfd4d570319432 | tail-reversion/elle | keyword.rkt | #lang elle/private/prebase
{reprovide racket/base #:exposing keyword? keyword<? string->keyword #:as text→keyword}
{reprovide rebellion/base/immutable-string #:exposing keyword->immutable-string #:as keyword→text}
| null | https://raw.githubusercontent.com/tail-reversion/elle/ed113df48d37c0481d2e6d068635e4699ea33d65/elle-lib/private/keyword.rkt | racket | #lang elle/private/prebase
{reprovide racket/base #:exposing keyword? keyword<? string->keyword #:as text→keyword}
{reprovide rebellion/base/immutable-string #:exposing keyword->immutable-string #:as keyword→text}
| |
05bc72197bdcd57724a733cc817a06e014dfbe407bd079f3102383a5ed3fa801 | jeromesimeon/Galax | physical_util.mli | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/physicaldm/physical_util.mli | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : physical_util.mli , v 1.22 2007/02/01 22:08:51 simeon Exp $
Module : Physical_util
Description :
This module supports utility functions on the abstract
implementation of XQuery 1.0 and XPath 2.0 data model sequenc... |
c21e84115c4bd99a496866c3f3b306727454d1c8b015f90b768ba2ae6c67c24d | pikatchu/LinearML | stastOfTast.ml |
Copyright ( c ) 2011 ,
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are
met :
1 . Redistributions of source code must retain the above copyright
notice , this list of conditions and the foll... | null | https://raw.githubusercontent.com/pikatchu/LinearML/76da04134b9eb3a9ca4252e9cb41d412b50a072a/compiler/stastOfTast.ml | ocaml |
Copyright ( c ) 2011 ,
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are
met :
1 . Redistributions of source code must retain the above copyright
notice , this list of conditions and the foll... | |
45c83e71916e930f6e6dcb799cd8b9cc92d95db59316304dc69f294bcff3d30b | ahf/ircd-scylla | log.mli |
* Copyright ( c ) 2015 . All rights reserved .
* Use of this source code is governed by a BSD - style
* license that can be found in the LICENSE file .
* Copyright (c) 2015 Alexander Færøy. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICE... | null | https://raw.githubusercontent.com/ahf/ircd-scylla/d06bfa61cd75a44c4f5493f316fba23143c32a78/log.mli | ocaml |
* Copyright ( c ) 2015 . All rights reserved .
* Use of this source code is governed by a BSD - style
* license that can be found in the LICENSE file .
* Copyright (c) 2015 Alexander Færøy. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICE... | |
1ef78eebb0e0e3c77768516a88661d4e28fc4c7f4304a4a1ea972bf6eedba3bf | hyperfiddle/electric | photon_transfer_bug.cljc | (ns dustin.y2022.photon-transfer-bug
(:require [hyperfiddle.photon :as p]
[hyperfiddle.rcf :refer [tests tap % with]]
[hyperfiddle.photon-impl.compiler :refer [analyze]]
[hyperfiddle.photon-impl.runtime :as r :refer [emit]]
[missionary.core :as m]))
;m/signal! = a cont... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2022/photon/photon_transfer_bug.cljc | clojure | m/signal! = a continuous flow that has an identity
"continuous flow" = a recipe for an effect
"signal"
(m/signal!)
(m/stream!)
(m/bind!)
(m/malloc!)
(m/subject!)
(p/defn View [db] ~@(prn db))
View is a flow and it's instantiated on the other peer
instantiated -> new
the signal "View" is a constant, the value of... | (ns dustin.y2022.photon-transfer-bug
(:require [hyperfiddle.photon :as p]
[hyperfiddle.rcf :refer [tests tap % with]]
[hyperfiddle.photon-impl.compiler :refer [analyze]]
[hyperfiddle.photon-impl.runtime :as r :refer [emit]]
[missionary.core :as m]))
(hyperfiddle.rcf/... |
6115a2f13ff36f26c459e41e87c7515f61bfff27b643b78dbfa46dfd5454355e | rollacaster/sketches | koch_curve.cljs | (ns sketches.nature-of-code.fractals.koch-curve
(:require [quil.core :as q :include-macros true]
[quil.middleware :as md]
[sketches.vector :as v]))
(defn setup-koch-line [a b]
{:start a :end b})
(defn update-koch-line [lines]
(reduce (fn [lines {:keys [start end]}]
(let [a st... | null | https://raw.githubusercontent.com/rollacaster/sketches/ba79fccf2a37139de9193ed2ea7a6cc04b63fad0/src/sketches/nature_of_code/fractals/koch_curve.cljs | clojure | (ns sketches.nature-of-code.fractals.koch-curve
(:require [quil.core :as q :include-macros true]
[quil.middleware :as md]
[sketches.vector :as v]))
(defn setup-koch-line [a b]
{:start a :end b})
(defn update-koch-line [lines]
(reduce (fn [lines {:keys [start end]}]
(let [a st... | |
60ed07a8c9b653533901c7ee65733fc2fdaea836dd6c30ae817f12e42b0ae784 | rd--/hsc3 | mul.help.hs | -- mul
sinOsc ar 440 0 * 0.15
-- mul ; creates a beating effect (subaudio rate)
fSinOsc kr 10 0 * pinkNoiseId 'α' ar * 0.1
-- mul ; ring modulation
let p = sinOsc ar (xLine kr 100 1001 10 DoNothing) 0
q = syncSaw ar 100 200
in p * q * 0.25
-- mul ; optimises identity
sinOsc ar 440 0 * 1 / 10
-- mul ; optimises ... | null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/mul.help.hs | haskell | mul
mul ; creates a beating effect (subaudio rate)
mul ; ring modulation
mul ; optimises identity
mul ; optimises identity
mul ; gate ; control | sinOsc ar 440 0 * 0.15
fSinOsc kr 10 0 * pinkNoiseId 'α' ar * 0.1
let p = sinOsc ar (xLine kr 100 1001 10 DoNothing) 0
q = syncSaw ar 100 200
in p * q * 0.25
sinOsc ar 440 0 * 1 / 10
1 * sinOsc ar 440 0 / 10
let freq = control_m kr "freq" 220 (55,880,"exp")
amp = control_m kr "amp" 0.1 (0,1,"amp")
gate... |
fd6af4d8099f04d990617d0c335d47aa7f5853befc52e0a6c3ce4b9651d04493 | OrgPad-com/volcano | dev.cljs | (ns volcano.dev
(:require [reagent.core :as r]
[accountant.core :as accountant]
[bidi.bidi :as b]
[volcano.hiccup :as volcano-hiccup]
[reagent.dom :as r-dom]))
(defonce current-route (r/atom nil))
(defn- update-route
"Updates the current route according to the path.... | null | https://raw.githubusercontent.com/OrgPad-com/volcano/fb1529e9ef07dd2883b4fe17f39da77970d4f687/src/volcano/dev.cljs | clojure | (ns volcano.dev
(:require [reagent.core :as r]
[accountant.core :as accountant]
[bidi.bidi :as b]
[volcano.hiccup :as volcano-hiccup]
[reagent.dom :as r-dom]))
(defonce current-route (r/atom nil))
(defn- update-route
"Updates the current route according to the path.... | |
b2eeebe92e3ce8d033cd04269b3f65bf792f47a9a7b78f15f368fa9033efe4fe | c-cube/ocaml-containers | ccparse_irclogs_real.cond.ml | parse IRC logs
type datetime = {
year: int;
month: int;
day: int;
hour: int;
min: int;
sec: int;
}
let pp_datetime out d =
let { year; month; day; hour; min; sec } = d in
CCFormat.(
fprintf out "{y=%d;M=%d;d=%d;h=%d;m=%d;s=%d}" year month day hour min sec)
type msg = { timestamp: datetime; user... | null | https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/examples/ccparse_irclogs_real.cond.ml | ocaml | parse IRC logs
type datetime = {
year: int;
month: int;
day: int;
hour: int;
min: int;
sec: int;
}
let pp_datetime out d =
let { year; month; day; hour; min; sec } = d in
CCFormat.(
fprintf out "{y=%d;M=%d;d=%d;h=%d;m=%d;s=%d}" year month day hour min sec)
type msg = { timestamp: datetime; user... | |
52b864cded75a937a780daf9589019fc41dbb7adf5abe3e65c3483a48571a080 | ucsd-progsys/nate | table.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/lex/table.ml | ocaml | *********************************************************************
Objective Caml
... | , projet , INRIA Rocquencourt
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
type 'a t = {mutable next : int ; mutable data... |
d9d223bb5e9192c61e03ebe8678cc07a93e039a655f069935b30fbbc67cf11e8 | andreaslyn/mini-yu | PatternUnify.hs | {-# LANGUAGE BangPatterns #-}
module TypeCheck.PatternUnify
( PatUnifError (..)
, PatUnifResult
, tcPatternUnify
, patternUnify2
, patternUnify2NoNormalize
, tcMergePatUnifMaps
)
where
import Str (quote)
import Loc
import TypeCheck.Env as Env
import TypeCheck.TypeCheckIO
import TypeCheck.Term
import Typ... | null | https://raw.githubusercontent.com/andreaslyn/mini-yu/b4c5ef2ac24c6e9519d79ee378e39e9c22ee873d/src/TypeCheck/PatternUnify.hs | haskell | # LANGUAGE BangPatterns #
To allow empty subst map
when the terms are equal. |
module TypeCheck.PatternUnify
( PatUnifError (..)
, PatUnifResult
, tcPatternUnify
, patternUnify2
, patternUnify2NoNormalize
, tcMergePatUnifMaps
)
where
import Str (quote)
import Loc
import TypeCheck.Env as Env
import TypeCheck.TypeCheckIO
import TypeCheck.Term
import TypeCheck.TermEnv
import TypeChec... |
1ab9a49e84ef19ac9d27e10647e90aa2abe59bde22e7520c417e8607e63bd8da | racket/web-server | dispatch-files-test.rkt | #lang racket
(require rackunit
(only-in mzlib/file
file-name-from-path
make-temporary-file)
net/url
mzlib/list
xml/xml
web-server/http
web-server/private/util
web-server/dispatchers/dispatch
(prefix-in files: web... | null | https://raw.githubusercontent.com/racket/web-server/af505e34cea47f1b58f0c4d509d30db3522c1098/web-server-test/tests/web-server/dispatchers/dispatch-files-test.rkt | racket | #lang racket
(require rackunit
(only-in mzlib/file
file-name-from-path
make-temporary-file)
net/url
mzlib/list
xml/xml
web-server/http
web-server/private/util
web-server/dispatchers/dispatch
(prefix-in files: web... | |
519f5f61426c504e3c8f9d634a87ec9be115890335aa9d6c4117207ea7cbdf29 | krestenkrab/triq | triq_statem.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% ex: ts=4 sw=4 et
%%
This file is part of Triq - Trifork QuickCheck
%%
Copyright ( c ) 2011 - 2013 by
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% ... | null | https://raw.githubusercontent.com/krestenkrab/triq/c7306b8eaea133d52140cb828817efb5e50a3d52/src/triq_statem.erl | erlang | ex: ts=4 sw=4 et
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 lan... | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
This file is part of Triq - Trifork QuickCheck
Copyright ( c ) 2011 - 2013 by
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(triq_statem).
-def... |
ce080dc034de42f546ddd0bf16e945c8131c9c63beac6511bb790e91b908f7f8 | tonyg/kali-scheme | weak.scm | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
(define (make-weak-pointer x) (cons '<weak> x))
(define weak-pointer-ref cdr)
(define (weak-pointer? x)
(and (pair? x) (eq? (car x) '<weak>)))
| null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/alt/weak.scm | scheme | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
(define (make-weak-pointer x) (cons '<weak> x))
(define weak-pointer-ref cdr)
(define (weak-pointer? x)
(and (pair? x) (eq? (car x) '<weak>)))
| |
74dfec2aa6c92b8ec64db9d3b0d563c9f1ccc7d56b26bde8a873670648bb39a5 | c-cube/frog-utils | Plot.ml |
(* This file is free software, part of frog-utils. See file "license" for more details. *)
open Frog
open Frog_server
module A = Archimedes
module Conf = Config
(* Colors *)
exception Unknown_color
let to_color s =
match CCString.lowercase_ascii s with
| "black" -> A.Color.black
| "red" -> A.Color.red
| "g... | null | https://raw.githubusercontent.com/c-cube/frog-utils/3f68c606a7abe702f9e22a0606080191a2952b18/src/plot/Plot.ml | ocaml | This file is free software, part of frog-utils. See file "license" for more details.
Colors
Styles
Options for drawing graph
Misc functions
split [l] after [n] elements
TODO: comment
* Available drawers |
open Frog
open Frog_server
module A = Archimedes
module Conf = Config
exception Unknown_color
let to_color s =
match CCString.lowercase_ascii s with
| "black" -> A.Color.black
| "red" -> A.Color.red
| "green" -> A.Color.green
| "blue" -> A.Color.blue
| "yellow" -> A.Color.yellow
| "magenta" -> A.Colo... |
723fb4e843241303e6226784925f842dd80c1c38c8af799e946c62eaf125f97e | rd--/hsc3 | obxdFilter.help.hs | -- obxdFilter
let cutoff = mouseX kr 110.0 (110.0 * 16) Exponential 0.2
resonance = 0.0
in X.obxdFilter (pinkNoiseId 'α' ar * 0.5) cutoff resonance 0.0 0.0 0.0
-- obxdFilter
let cutoff = mouseX kr 110.0 (110.0 * 16) Exponential 0.2
resonance = mouseY kr 0.0 1.10 Linear 0.2
in X.obxdFilter (pinkNoiseId 'α' ar *... | null | https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Ugen/obxdFilter.help.hs | haskell | obxdFilter
obxdFilter
obxdFilter ; controls
; obxdFilter ; set controls
- RObxdFilter | let cutoff = mouseX kr 110.0 (110.0 * 16) Exponential 0.2
resonance = 0.0
in X.obxdFilter (pinkNoiseId 'α' ar * 0.5) cutoff resonance 0.0 0.0 0.0
let cutoff = mouseX kr 110.0 (110.0 * 16) Exponential 0.2
resonance = mouseY kr 0.0 1.10 Linear 0.2
in X.obxdFilter (pinkNoiseId 'α' ar * 0.5) cutoff resonance 0.5 0... |
aa3176779a913fc53db1bef98ac2a1a5e707bbbbb04555028a69ec67123644f5 | brendanhay/amazonka | IdentityProviderSummary.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
Derived fr... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-workspaces-web/gen/Amazonka/WorkSpacesWeb/Types/IdentityProviderSummary.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Module : Amazonka.WorkSpacesWeb.Types.IdentityProviderSummary
Stability : auto-generated
| The summary of the identity provider.
/See:/ 'newIdentityProviderSummary' smart constructor.
| The identity provider name.
| The identity provider type.
|
... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
Derived from AWS service descriptions , licensed under Apache 2.0 .
Co... |
dc95dc607d8c5a1353f7a1e64b211ff462019464e86ad6977cb2594a8a67132a | johnwhitington/ocamli | printexc.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/stdlib/printexc.ml | ocaml | ************************************************************************
OCaml
... | , 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 Printf
let printers = ref []
let locfmt = format_of_string "File \"%s\", line %d, characters %d-%d... |
6ec9a041a159f00134bf02304a7f4bd094a8fbbb1bd967033132985b99bca057 | erdos/sphere | lang.cljc | (ns erdos.lenart.lang
(:require [erdos.lenart.geo :as geo]
[clojure.string :refer [join]])
#?(:cljs (:require-macros [erdos.lenart.macros :refer [match-seq]])
:clj (:require [erdos.lenart.macros :refer [match-seq]])))
(defn topsort
"Creates a processing order in the map"
[deps m]
(let [k->... | null | https://raw.githubusercontent.com/erdos/sphere/8de04d3e7c2b18430cff5d3f05933c8243919523/src/erdos/lenart/lang.cljc | clojure | default style maybe??
color
stroke width | (ns erdos.lenart.lang
(:require [erdos.lenart.geo :as geo]
[clojure.string :refer [join]])
#?(:cljs (:require-macros [erdos.lenart.macros :refer [match-seq]])
:clj (:require [erdos.lenart.macros :refer [match-seq]])))
(defn topsort
"Creates a processing order in the map"
[deps m]
(let [k->... |
c8a44604648282e5aef732101d914672dfa3b9f2b69640555323ab0cfda9280c | kupl/LearnML | original.ml | type lambda = V of var | P of (var * lambda) | C of (lambda * lambda)
and var = string
let rec test (lam : lambda) : (string * string) list =
match lam with
| V x -> [ ("v", x) ]
| P (x, l) ->
let lst : (string * string) list = test l in
[ ("p", x) ] @ lst
| C (l1, l2) ->
let lst1 : (string ... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/lambda/sub126/original.ml | ocaml | type lambda = V of var | P of (var * lambda) | C of (lambda * lambda)
and var = string
let rec test (lam : lambda) : (string * string) list =
match lam with
| V x -> [ ("v", x) ]
| P (x, l) ->
let lst : (string * string) list = test l in
[ ("p", x) ] @ lst
| C (l1, l2) ->
let lst1 : (string ... | |
9029c1e34356ccd2ac8da1f5f674158b37ba630071ba4de506fbfc6b6f072c96 | jeapostrophe/exp | struct-intro.rkt | #lang racket/base
(require racket/list)
(struct posn (x y) #:transparent)
(struct 3posn posn (z) #:transparent #:mutable)
(define (dynamic-duplicate s)
(define-values (s-type skipped?) (struct-info s))
(when (or (not s-type) skipped?)
(error 'dynamic-duplicate
"Can't duplicate... structure not open... | null | https://raw.githubusercontent.com/jeapostrophe/exp/43615110fd0439d2ef940c42629fcdc054c370f9/struct-intro.rkt | racket | #lang racket/base
(require racket/list)
(struct posn (x y) #:transparent)
(struct 3posn posn (z) #:transparent #:mutable)
(define (dynamic-duplicate s)
(define-values (s-type skipped?) (struct-info s))
(when (or (not s-type) skipped?)
(error 'dynamic-duplicate
"Can't duplicate... structure not open... | |
5d3e4dad062a69cfeb3e42fde3dd11d95aaef5ddfc31b27834e1414f39cf51c1 | jfacorro/fp-interpreter-in-lisp | fp-evaluator.lisp | (in-package :com.facorro.fp.evaluator)
;;----------------------------------------
;; Evaluates the FP tree
;;----------------------------------------
(defun evaluate (node)
(cond
((null node) nil)
(t
(let* ((data (datum node))
(childs (children node))
(fn (get-function data)))
(debu... | null | https://raw.githubusercontent.com/jfacorro/fp-interpreter-in-lisp/b0c520593e98cce83b571939a22d7efd7926c711/src/fp-evaluator.lisp | lisp | ----------------------------------------
Evaluates the FP tree
----------------------------------------
----------------------------------------
---------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
Ev... | (in-package :com.facorro.fp.evaluator)
(defun evaluate (node)
(cond
((null node) nil)
(t
(let* ((data (datum node))
(childs (children node))
(fn (get-function data)))
(debug-msg :com.facorro.fp.evaluator "(evaluate)~%")
(debug-msg :com.facorro.fp.evaluator " data: ~a~%" data)
... |
16c96871fdf9e1b4ce404c46a99eb9af004ea43ee2941cd44b744bbbcc1c7882 | cojna/iota | BinarySearch.hs | {-# LANGUAGE BangPatterns #-}
module Algorithm.BinarySearch where
import Control.Monad
import Data.Bool
import Data.Functor.Identity
import My.Prelude (unsafeShiftRL)
-- | assert (p high)
lowerBoundM :: (Monad m) => Int -> Int -> (Int -> m Bool) -> m Int
lowerBoundM low0 high0 p = go low0 high0
where
go !low ... | null | https://raw.githubusercontent.com/cojna/iota/6d2ad5b71b1b50bca9136d6ed84f80a0b7713d7c/src/Algorithm/BinarySearch.hs | haskell | # LANGUAGE BangPatterns #
| assert (p high)
| assert (p low)
| assert (p high)
| assert (p low)
| assert (p high)
| assert (p low) |
module Algorithm.BinarySearch where
import Control.Monad
import Data.Bool
import Data.Functor.Identity
import My.Prelude (unsafeShiftRL)
lowerBoundM :: (Monad m) => Int -> Int -> (Int -> m Bool) -> m Int
lowerBoundM low0 high0 p = go low0 high0
where
go !low !high
| high <= low = return high
| oth... |
d83cad51fcf2d0629803fa232619e227814bf583fed6c90539781f12ef160fe3 | GregorySchwartz/too-many-cells | ClusterPeaks.hs | TooManyCells . MakeTree . ClusterPeaks
Collects functions pertaining to printing cluster fragments and obtaining peaks
per cluster .
Gregory W. Schwartz
Collects functions pertaining to printing cluster fragments and obtaining peaks
per cluster.
-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedSt... | null | https://raw.githubusercontent.com/GregorySchwartz/too-many-cells/34b9c9ee5695504824169f44e01d8c3ea2d55546/src/TooManyCells/Peaks/ClusterPeaks.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
Remote
Local
| External sort fragment file.
| External sort compressed fragment file.
| Get cluster fragment sizes from a split stream.
| Get the genome coverage bedgraph.
Removing as sorting ruins track line
normalization.
Fragment file
per million
... | TooManyCells . MakeTree . ClusterPeaks
Collects functions pertaining to printing cluster fragments and obtaining peaks
per cluster .
Gregory W. Schwartz
Collects functions pertaining to printing cluster fragments and obtaining peaks
per cluster.
-}
# LANGUAGE TupleSections #
module TooManyCells.Peaks.C... |
0996615a35ff18942bdf7561ae5eaea24faab55749a94d6daa4f90c7dbe2b91a | rd--/hsc3 | sin.help.hs | ---- ; Drawings
Sound.Sc3.is_unary Sound.Sc3.Common.Base.CS "Sin"
Sound.Sc3.Plot.plot_fn_r1_ln sin (0,2 * pi)
| null | https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Ugen/sin.help.hs | haskell | -- ; Drawings | Sound.Sc3.is_unary Sound.Sc3.Common.Base.CS "Sin"
Sound.Sc3.Plot.plot_fn_r1_ln sin (0,2 * pi)
|
80490e58fa107a7f69b12c34c80d14fcd0913c54d6317398dfffafc67864f1f7 | BinaryAnalysisPlatform/bap | regular_cache.mli | open Core_kernel[@@warning "-D"]
open Regular_data_intf
open Format
type 'a t
val create :
load:(digest -> 'a option) ->
save:(digest -> 'a -> unit) -> 'a t
val digest : namespace:string -> ('a,formatter,unit,digest) format4 -> 'a
val load : 'a t -> digest -> 'a option
val save : 'a t -> digest -> 'a -> unit
... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/regular/regular_cache.mli | ocaml | open Core_kernel[@@warning "-D"]
open Regular_data_intf
open Format
type 'a t
val create :
load:(digest -> 'a option) ->
save:(digest -> 'a -> unit) -> 'a t
val digest : namespace:string -> ('a,formatter,unit,digest) format4 -> 'a
val load : 'a t -> digest -> 'a option
val save : 'a t -> digest -> 'a -> unit
... | |
5124aace0c087ecb1ea207c61a75e91b79e5bc7c5a4d3ac6497cd8ab005c6f23 | lasp-lang/lasp | lasp_delta_based_synchronization_backend.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2016 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the... | null | https://raw.githubusercontent.com/lasp-lang/lasp/1701c8af77e193738dfc4ef4a5a703d205da41a1/src/lasp_delta_based_synchronization_backend.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2016 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(lasp_delta_based_syn... |
99c85a14c103f18302a94a46defc5902a02f8a74fc1565e24cc2b4c105596045 | Stratus3D/programming_erlang_exercises | packet_to_term.erl | -module(packet_to_term).
-export([packet_to_term/1]).
8 ( byte ) * 4
packet_to_term(Packet) ->
% Extract the length from the head of the binary
<<Length:?LENGTH_HEADER/integer, BinTerm:Length/binary>> = Packet,
% Take the packet payload portion of the binary and convert it back to an
Erlang term
... | null | https://raw.githubusercontent.com/Stratus3D/programming_erlang_exercises/e4fd01024812059d338facc20f551e7dff4dac7e/chapter_7/exercise_3/packet_to_term.erl | erlang | Extract the length from the head of the binary
Take the packet payload portion of the binary and convert it back to an | -module(packet_to_term).
-export([packet_to_term/1]).
8 ( byte ) * 4
packet_to_term(Packet) ->
<<Length:?LENGTH_HEADER/integer, BinTerm:Length/binary>> = Packet,
Erlang term
binary_to_term(BinTerm).
|
35e6a8c59c4b7334a0eba195f03802a369a8c6d1482b3316fd0b0953f1851937 | zxymike93/SICP | 331.rkt | 为什么 ( add - action ! ) 需要先调用一次 ( new - action ) ?
;; 请通过解释 sample 的具体调用过程来说明。
#lang sicp
(define (make-wire)
(let ((signal 0)
(actions '()))
;; ...
(define (accept-procs! new-action)
(set! actions (cons new-action actions))
(new-action))
(define (dispatch m)
(cond ((eq? m 'ad... | null | https://raw.githubusercontent.com/zxymike93/SICP/9d8e84d6a185bf4d7f28c414fc3359741384beb5/chapter3/331.rkt | racket | 请通过解释 sample 的具体调用过程来说明。
...
...
Sample
ok
ok
ok
Answer
(probe 'sum sum)
(add-action! sum (lambda () ...))
((sum 'add-action) (lambda () ...))
(accept-procs! (lambda () ...))
(set! actions (cons (lambda () ...) '()))
((lambda () ...))
(probe 'carry carry) 同上 | 为什么 ( add - action ! ) 需要先调用一次 ( new - action ) ?
#lang sicp
(define (make-wire)
(let ((signal 0)
(actions '()))
(define (accept-procs! new-action)
(set! actions (cons new-action actions))
(new-action))
(define (dispatch m)
(cond ((eq? m 'add-action!) accept-procs!)
)... |
137491716b032515392f5517c4634a8c567d28a1711ada016f86b2024381eed7 | fossas/fossa-cli | BinarySpec.hs | # LANGUAGE CPP #
# LANGUAGE QuasiQuotes #
#ifndef mingw32_HOST_OS
# LANGUAGE TemplateHaskell #
#endif
module App.Fossa.VSI.DynLinked.Internal.BinarySpec (spec) where
import Test.Hspec qualified as Hspec
Windows is n't happy with our ` / ` shaped abs paths , which are built at compile time with TH .
Since Window... | null | https://raw.githubusercontent.com/fossas/fossa-cli/f25758ce3af7dd2992edd4cdd19ff84edd9b6c86/test/App/Fossa/VSI/DynLinked/Internal/BinarySpec.hs | haskell | # LANGUAGE CPP #
# LANGUAGE QuasiQuotes #
#ifndef mingw32_HOST_OS
# LANGUAGE TemplateHaskell #
#endif
module App.Fossa.VSI.DynLinked.Internal.BinarySpec (spec) where
import Test.Hspec qualified as Hspec
Windows is n't happy with our ` / ` shaped abs paths , which are built at compile time with TH .
Since Window... | |
edad93b17f60aaaf21f321c8189f9d40ffc42038fd6dfc01aae9132c15886baa | jwiegley/linearscan-hoopl | Exhaustion.hs | module Programs.Exhaustion where
import Assembly
import LinearScan.Hoopl.DSL
exhaustion1 :: Program (Node IRVar)
exhaustion1 = do
label "entry" $ do
lc v206
move pr1 v4
move pr2 v5
move pr3 v6
alloc Nothing pr0
move v4 v1
move v5 v2
move v6 v3
... | null | https://raw.githubusercontent.com/jwiegley/linearscan-hoopl/f654adf64cba4b3af1f42f06112c9225b1369c74/test/Programs/Exhaustion.hs | haskell | module Programs.Exhaustion where
import Assembly
import LinearScan.Hoopl.DSL
exhaustion1 :: Program (Node IRVar)
exhaustion1 = do
label "entry" $ do
lc v206
move pr1 v4
move pr2 v5
move pr3 v6
alloc Nothing pr0
move v4 v1
move v5 v2
move v6 v3
... | |
2977233a45662d4b29afc35b2ffd81fc33c7e0c094f0f837a2c94ede07df79b6 | silky/myth | rtree.ml | open Core
open Consts
open Lang
type rtree =
{ t : typ
; mutable sz : int
; mutable lambdas : int
; g : Ctx.t
; vs : evidence list
; mutable timed_out : bool
; mutable es : exp list
; alts : rnode list
; mutable matches : r... | null | https://raw.githubusercontent.com/silky/myth/b631edefb2a27a1d731daa6654517d91ca660b95/src/rtree.ml | ocaml | **** Pretty printing {{{ ****
**** }}} ****
**** Refinement tree construction {{{ ****
**** Split graph construction helpers {{{ ****
Splits the evidence as input-output (function) examples
Splits the evidence as (same-head) constructor examples
Evaluates the given expression to a constructor value
Extracts the ... | open Core
open Consts
open Lang
type rtree =
{ t : typ
; mutable sz : int
; mutable lambdas : int
; g : Ctx.t
; vs : evidence list
; mutable timed_out : bool
; mutable es : exp list
; alts : rnode list
; mutable matches : r... |
51a9cab965779d4fc831ef1a58a97da3c83cc9b34061dd0265e83a77c0e95a66 | earl-ducaine/cl-garnet | motif-trill-device.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : GARNET - GADGETS ; Base : 10 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
The Garnet User Interface Development Environment . ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; This code ... | null | https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/src/gadgets/motif-trill-device.lisp | lisp | Syntax : Common - Lisp ; Package : GARNET - GADGETS ; Base : 10 -*-
; ;
This code was written as part of the Garnet project at ;;;
; ;
; ;
please contact to be put on the mailing list. ;;;
Basically, the motif-trill-device is just a motif-h-scroll-bar
with some feedback-text sitting in its cent... | Device
interactor for that text . Unlike the GARNET trill - device , this
1 ) Click the left mouse button on the arrows to change
2 ) Text inside the scrollbar changes to reflect the current value .
3 ) Left click on the value to edit it .
4 ) The top level : value slot is the curr... |
2ec4525d86f0ad259486f095e3c0776b6bce1f49ccc059049af64ab505aa810c | alex-hhh/ActivityLog2 | fit-test.rkt | #lang racket/base
;; This file is part of ActivityLog2, an fitness activity tracker
Copyright ( C ) 2018 , 2019 , 2020 , 2021 , 2022 , 2023 < >
;;
;; 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 Foun... | null | https://raw.githubusercontent.com/alex-hhh/ActivityLog2/05e7422f43835c2d1b6a0d0d72e9e99adf94ae66/test/fit-test.rkt | racket | This file is part of ActivityLog2, an fitness activity tracker
This program is free software: you can redistribute it and/or modify it
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR P... | #lang racket/base
Copyright ( C ) 2018 , 2019 , 2020 , 2021 , 2022 , 2023 < >
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 )
This code tests that the application can import correctly a variety of FIT
... |
037543af4512c644430920f41b4eb0f1d16e7150edce9179e6b9484f0567cd98 | google/codeworld | Trivial.hs |
Copyright 2020 The CodeWorld Authors . All rights reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to ... | null | https://raw.githubusercontent.com/google/codeworld/77b0863075be12e3bc5f182a53fcc38b038c3e16/codeworld-prediction/src/CodeWorld/Prediction/Trivial.hs | haskell | |
This module encapsulates the logics behind the prediction code in the
multi-player setup. It is the “trivially correct” version.
All we do with events is to apply them to the state. So let's just store the
function that does that.
A state and an event only make sense together with a time.
| Invariants about th... |
Copyright 2020 The CodeWorld Authors . All rights reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to ... |
3ab5aa040944be30433795d957b00ce004cb18cc64ffa69cf0b7e0b73f5bdbe1 | conscell/hugs-android | Functions.hs | -----------------------------------------------------------------------------
-- |
-- Module : Text.Show.Functions
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : provisional
-- Portability : portab... | null | https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/packages/base/Text/Show/Functions.hs | haskell | ---------------------------------------------------------------------------
|
Module : Text.Show.Functions
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : provisional
Portability : portable
Optional instance of 'Text.Show.Show' for functions:
> instance S... | Copyright : ( c ) The University of Glasgow 2001
> showsPrec _ _ = "
module Text.Show.Functions () where
import Prelude
instance Show (a -> b) where
showsPrec _ _ = showString "<function>"
|
ddc92a9e31ec31c8a0a204cc63854e76213aec0f3f2f4013d1f083b900ea3b85 | SHoltzen/dice | CoreGrammar.mli | (** Defines the core internal dice grammar *)
type expr =
| And of expr * expr
| Or of expr * expr
| Eq of expr * expr
| Xor of expr * expr
| Not of expr
| Ident of String.t
| Sample of expr
| Fst of expr
| Snd of expr
| Tup of expr * expr
| Ite of expr * expr * expr
| True
| False
| Flip... | null | https://raw.githubusercontent.com/SHoltzen/dice/83a52ead59f6c7c13c5c0f79dbd89eeb4e4e581a/lib/CoreGrammar.mli | ocaml | * Defines the core internal dice grammar
* A function argument
* Core function
* Core program
* type environment |
type expr =
| And of expr * expr
| Or of expr * expr
| Eq of expr * expr
| Xor of expr * expr
| Not of expr
| Ident of String.t
| Sample of expr
| Fst of expr
| Snd of expr
| Tup of expr * expr
| Ite of expr * expr * expr
| True
| False
| Flip of Bignum.t
| Let of String.t * expr * expr... |
adc4186c6dc833cbb90bc7938a3183f75d4972168318de9b0523367090c37e87 | onyx-platform/onyx | base_decoder.clj | (ns ^{:no-doc true} onyx.messaging.serializers.base-decoder
(:import [org.agrona.concurrent UnsafeBuffer]))
(defprotocol PDecoder
(offset [this])
(length [this])
(get-type [this])
(get-replica-version [this])
(get-payload-length [this])
(get-dest-id [this])
(wrap [this buffer offset]))
Layout
1 by... | null | https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/src/onyx/messaging/serializers/base_decoder.clj | clojure | (ns ^{:no-doc true} onyx.messaging.serializers.base-decoder
(:import [org.agrona.concurrent UnsafeBuffer]))
(defprotocol PDecoder
(offset [this])
(length [this])
(get-type [this])
(get-replica-version [this])
(get-payload-length [this])
(get-dest-id [this])
(wrap [this buffer offset]))
Layout
1 by... | |
f64be4e6c39ad10e358ae8ee8f8e17ebee3a65af3e5c560d72b02bf4a48ce215 | jepsen-io/voltdb | single_test.clj | (ns jepsen.voltdb.single-test
(:require [clojure.test :refer :all]
[jepsen.voltdb-test :refer [tarball]]
[jepsen.voltdb.single :refer :all]
[jepsen.core :as jepsen]))
(defn run [t]
(is (:valid? (:results (jepsen/run! t)))))
(deftest normal-reads-test
(loop []
(when (run (... | null | https://raw.githubusercontent.com/jepsen-io/voltdb/7c29d0d6caa29b85143d6942e078d7c0bdb82e35/test/jepsen/voltdb/single_test.clj | clojure | (ns jepsen.voltdb.single-test
(:require [clojure.test :refer :all]
[jepsen.voltdb-test :refer [tarball]]
[jepsen.voltdb.single :refer :all]
[jepsen.core :as jepsen]))
(defn run [t]
(is (:valid? (:results (jepsen/run! t)))))
(deftest normal-reads-test
(loop []
(when (run (... | |
793a5ab25fcc481078aa0f05a7ef5d085fa86d6a398d1c71362963a850613dc0 | wilbowma/cur | Poly-pairs.rkt | #lang cur
(require cur/stdlib/sugar
cur/stdlib/equality
cur/ntac/base
cur/ntac/standard
cur/ntac/rewrite
rackunit/turnstile+
"../rackunit-ntac.rkt")
part 2 of 3 of Software Foundations Poly.v chapter
(define-datatype bool : Type
(true : bool)
(false : bool))... | null | https://raw.githubusercontent.com/wilbowma/cur/e039c98941b3d272c6e462387df22846e10b0128/cur-test/cur/tests/ntac/software-foundations/Poly-pairs.rkt | racket | letter capital "O"
* = "full" version; as opposed to hidden-arg version
pairs --------------------
NOTE: totality can't handle cons* alias.
TODO: unify polymorphic and concrete fn args
TODO: This test causes an error... sometimes, depending on how this
file is executed. In racket-mode, it errors.
If the rest of... | #lang cur
(require cur/stdlib/sugar
cur/stdlib/equality
cur/ntac/base
cur/ntac/standard
cur/ntac/rewrite
rackunit/turnstile+
"../rackunit-ntac.rkt")
part 2 of 3 of Software Foundations Poly.v chapter
(define-datatype bool : Type
(true : bool)
(false : bool))... |
1e7f1c836c52f9451d09b932f9bf28ab914aaa95bd5906aa97412fa1973fc1b8 | klutometis/clrs | 10.1-4.scm | (require-extension syntax-case check)
(require '../util/util)
(require '../10.1/section)
(import* section-10.1
make-queue
enqueue!
dequeue!)
(import* util
except?)
(let ((queue (make-queue (make-vector 2) 0 0)))
(check (except? (lambda () (dequeue! queue))) => #t)
(enqueue! queue... | null | https://raw.githubusercontent.com/klutometis/clrs/f85a8f0036f0946c9e64dde3259a19acc62b74a1/10.1/10.1-4.scm | scheme | (require-extension syntax-case check)
(require '../util/util)
(require '../10.1/section)
(import* section-10.1
make-queue
enqueue!
dequeue!)
(import* util
except?)
(let ((queue (make-queue (make-vector 2) 0 0)))
(check (except? (lambda () (dequeue! queue))) => #t)
(enqueue! queue... | |
805b717c5023cd3de7d0e1f80634f556669472bf8fe0b36a25e69b866f7e33b8 | reborg/clojure-essential-reference | 10.clj | < 1 >
Execution time mean : 1.139211 ms
< 2 >
Execution time mean : 1.171993 ms | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/Vectors/mapv/10.clj | clojure | < 1 >
Execution time mean : 1.139211 ms
< 2 >
Execution time mean : 1.171993 ms | |
ed10ad76d72b72fa3533cc7989d30314965d412316d9303628e1dcf8e8f555d6 | janestreet/core | hash_queue.ml | open! Import
open Hash_queue_intf
module type Key = Key
module type S_backend = S_backend
module Make_backend (Table : Hashtbl_intf.Hashtbl) : S_backend = struct
module type Backend =
S1
with type 'key create_arg := 'key Hashtbl.Hashable.t
with type 'key create_key := 'key
module Backend : Backend = ... | null | https://raw.githubusercontent.com/janestreet/core/f382131ccdcb4a8cd21ebf9a49fa42dcf8183de6/core/src/hash_queue.ml | ocaml | Look at each element in the queue, checking:
* - every element in the queue is in the hash table
* - there are no duplicate keys
Note that this is the tail-recursive Core_list.map
Performance hack: we implement this version separately to avoid allocation from the
option.
Return the... | open! Import
open Hash_queue_intf
module type Key = Key
module type S_backend = S_backend
module Make_backend (Table : Hashtbl_intf.Hashtbl) : S_backend = struct
module type Backend =
S1
with type 'key create_arg := 'key Hashtbl.Hashable.t
with type 'key create_key := 'key
module Backend : Backend = ... |
3567a98be7b134b37d33251af0ac832bfb9def1a15d7537afb5927fb9f48f77b | imdea-software/leap | Debug.mli |
(***********************************************************************)
(* *)
LEAP
(* *)
, IMDEA ... | null | https://raw.githubusercontent.com/imdea-software/leap/5f946163c0f80ff9162db605a75b7ce2e27926ef/src/misc/Debug.mli | ocaml | *********************************************************************
... |
LEAP
, IMDEA Software Institute
Copyright 2011 IMDEA Software Institute
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compl... |
3b6ec230c2a49aa8dd1e678a883ec3927d3afa2d2b6fe699d16aff2f86752c43 | phaul/chess | Private.hs | module Data.BitBoard.Values.Private
( rankBB
, fileBB
, neighbourRanksBB'
, neighbourFilesBB'
, largeNeighbourFilesBB'
, aheadBB'
, knightAttackBB'
, kingAttackBB'
, pawnAttackBB'
, lineBB'
, pseudoAttackBB'
) where
import D... | null | https://raw.githubusercontent.com/phaul/chess/b9c71a0389ed44360caed4b830208ce346211cb8/Data/BitBoard/Values/Private.hs | haskell | module Data.BitBoard.Values.Private
( rankBB
, fileBB
, neighbourRanksBB'
, neighbourFilesBB'
, largeNeighbourFilesBB'
, aheadBB'
, knightAttackBB'
, kingAttackBB'
, pawnAttackBB'
, lineBB'
, pseudoAttackBB'
) where
import D... | |
d22f3e09e7380319468d17fe742405defd9adaad18f11326581d3acdfaa248c7 | aisamanra/s-cargot | SCargotQC.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fno - warn - orphans #
module Main where
import Data.SCargot
import Data.SCargot.Comments
import Data.SCargot.Repr
import Data.Monoid ((<>))
import Data.Text (Text)
import qualified Data.Text as T
import ... | null | https://raw.githubusercontent.com/aisamanra/s-cargot/71d2ec896f50877110df8622de3efdccfa6b8d59/test/SCargotQC.hs | haskell | # LANGUAGE OverloadedStrings #
Sometimes we generate really huge test cases, which can take a really
long time to process---especially when we're modifying the whitespace
to produce weird anomalous S-expressions. So, we make the size parameter
a bit smaller for good measure. | # LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fno - warn - orphans #
module Main where
import Data.SCargot
import Data.SCargot.Comments
import Data.SCargot.Repr
import Data.Monoid ((<>))
import Data.Text (Text)
import qualified Data.Text as T
import Test.QuickCheck
import Te... |
e9f2b74da10006fae8f6bf7c051c678031ece852c712906ae79ba07c597b1ffb | rikvdkleij/quicksort | Quicksort.hs | module Quicksort(quicksort, blabla, kk) where
quicksort :: (Ord t) => [t] -> [t]
quicksort [] = []
quicksort (x:xs) = quicksort smallerOrEqual ++ [x] ++ quicksort larger
where smallerOrEqual = [y | y <- xs, y <= x]
larger = [y | y <- xs, y > x]
vvv = [(x,y)| x<-[1..2], y<-[x..3], let z = x+y, odd z]
... | null | https://raw.githubusercontent.com/rikvdkleij/quicksort/1ee61db7f2f43cc417d38cc21a8125c2b1ac1626/src/Quicksort.hs | haskell | blabla f = fmap f [1,2] | module Quicksort(quicksort, blabla, kk) where
quicksort :: (Ord t) => [t] -> [t]
quicksort [] = []
quicksort (x:xs) = quicksort smallerOrEqual ++ [x] ++ quicksort larger
where smallerOrEqual = [y | y <- xs, y <= x]
larger = [y | y <- xs, y > x]
vvv = [(x,y)| x<-[1..2], y<-[x..3], let z = x+y, odd z]
... |
23d8e5331d936fa85b640d25ef4c51c07c25ccf540aca0a8a1e5981cb907a69f | marigold-dev/chusai | test_mtm.ml | open Quickcheck_tests
open Example_tests
let () =
let open Alcotest in
run
"MerkleTreeMap"
[ "to_list", [ test_case "to_list empty equals empty list" `Quick test_empty ]
; ( "from_list"
, [ test_case "to_list from_list []" `Quick test_from_empty_list
; test_case "to_list from_list one-ele... | null | https://raw.githubusercontent.com/marigold-dev/chusai/09f798c585121d3b02bf3fed0f52f15c3bdc79a1/layer2/lib/chusai_merkle_tree_map/test/test_mtm.ml | ocaml | open Quickcheck_tests
open Example_tests
let () =
let open Alcotest in
run
"MerkleTreeMap"
[ "to_list", [ test_case "to_list empty equals empty list" `Quick test_empty ]
; ( "from_list"
, [ test_case "to_list from_list []" `Quick test_from_empty_list
; test_case "to_list from_list one-ele... | |
c62c440985de4eef774339e741d435aec91335d7db7cf34adc0c7637235b411b | fugue/fregot | Repl.hs | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
-}
# LANGUAGE Derive... | null | https://raw.githubusercontent.com/fugue/fregot/abee55eb1feaf7ce5b8579dc22528154d65fcf77/lib/Fregot/Repl.hs | haskell | # LANGUAGE OverloadedStrings #
| We can resume from this, or go back to this suspend at a later point.
| Currently open package.
| Current mode; either debugging or regular evaluation.
| Stored because we need to watch this for changes.
| Evaluate this after file changes.
NOTE(jaspervdj): This does not work well ... | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
-}
# LANGUAGE Derive... |
870f94a0bfb20dc5d0290d4b45fe915ba6013863ea9a81c84ce9f86b28e3432f | danr/hipspec | PropT29.hs | module PropT29 where
import Prelude(Bool(..))
import Zeno
-- Definitions
True && x = x
_ && _ = False
False || x = x
_ || _ = True
not True = False
not False = True
-- Nats
data Nat = S Nat | Z
(+) :: Nat -> Nat -> Nat
Z + y = y
(S x) + y = S (x + y)
(*) :: Nat -> Nat -> Nat
Z * _ = Z
(S x) * y = y + (x... | null | https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/testsuite/prod/zeno_version/PropT29.hs | haskell | Definitions
Nats
Lists
Theorem | module PropT29 where
import Prelude(Bool(..))
import Zeno
True && x = x
_ && _ = False
False || x = x
_ || _ = True
not True = False
not False = True
data Nat = S Nat | Z
(+) :: Nat -> Nat -> Nat
Z + y = y
(S x) + y = S (x + y)
(*) :: Nat -> Nat -> Nat
Z * _ = Z
(S x) * y = y + (x * y)
(==),(/=) :: Nat... |
6190570f1488c3453b5b8e61526481dc3d612f946741fef6d3e33c1a3a9f01bc | erdos/stencil | errors.clj | (ns stencil.errors
(:import [io.github.erdos.stencil.exceptions ParsingException EvalException])
(:require [stencil.types :refer :all]
[stencil.integration :refer [test-fails]]
[clojure.test :refer [deftest is are testing]]
[stencil.model :as model]))
(defn- test-prepare [xml-s... | null | https://raw.githubusercontent.com/erdos/stencil/92a7dab98affd26ac7c32ab7c4ba5477f5ad1633/test/stencil/errors.clj | clojure | integration tests
TODO: invoke fn with wrong types | (ns stencil.errors
(:import [io.github.erdos.stencil.exceptions ParsingException EvalException])
(:require [stencil.types :refer :all]
[stencil.integration :refer [test-fails]]
[clojure.test :refer [deftest is are testing]]
[stencil.model :as model]))
(defn- test-prepare [xml-s... |
117a7280baee1c2435153c72acef090d75a24cfcec276a4f4a132c29bda428c3 | runtimeverification/haskell-backend | DebugUnification.hs | # LANGUAGE NoStrict #
# LANGUAGE NoStrictData #
|
Copyright : ( c ) Runtime Verification , 2020 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2020-2021
License : BSD-3-Clause
-}
module Kore.Log.DebugUnification (
DebugUnification (..),
WhileDebugUnification (..),
... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/c86e9d2c0a2d7800a3cb49443d962463f88175d1/kore/src/Kore/Log/DebugUnification.hs | haskell | | @WhileDebugUnification@ encloses the context of unification log entries.
| @UnificationUnsolved@ represents an unsolved unification problem.
| @UnificationSolved@ represents the solution of a unification problem. | # LANGUAGE NoStrict #
# LANGUAGE NoStrictData #
|
Copyright : ( c ) Runtime Verification , 2020 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2020-2021
License : BSD-3-Clause
-}
module Kore.Log.DebugUnification (
DebugUnification (..),
WhileDebugUnification (..),
... |
33c7f034a6e3a9c09bcaa6a38ef2360d016303cf0677cd0750350c7f43d8af12 | re-xyr/hina | Context.hs | module Hina.Tyck.Context where
import Control.Monad.Freer (Eff, Member, Members)
import Control.Monad.Freer.Error (Error)
import Control.Monad.Freer.State (State, get, modify)
import qualified Data.IntMap.Strict as Map
import Hina.Concrete (Expr)
import ... | null | https://raw.githubusercontent.com/re-xyr/hina/5224b98fb4405d8aa54e1ee1668072844aa80dac/src/Hina/Tyck/Context.hs | haskell | module Hina.Tyck.Context where
import Control.Monad.Freer (Eff, Member, Members)
import Control.Monad.Freer.Error (Error)
import Control.Monad.Freer.State (State, get, modify)
import qualified Data.IntMap.Strict as Map
import Hina.Concrete (Expr)
import ... | |
b84def47fa90b9bffe4cb7b3f3ea968e3b12875cbbaf554663274612e896ae87 | rudymatela/speculate | arith-negate-abs.hs | import Test.QuickSpec
type I = Int
main =
quickSpec
[ ["x", "y", "z"] `vars` (undefined :: I)
, "0" `fun0` (0 :: I)
, "1" `fun0` (1 :: I)
, "+" `fun2` ((+) :: I -> I -> I)
, "*" `fun2` ((*) :: I -> I -> I)
, "id" `fun1` (id :: I -> I)
, "abs" `fun1` (abs :: I -> I)
... | null | https://raw.githubusercontent.com/rudymatela/speculate/8ec39747d03033db4349d554467d4b78bb72935d/bench/qs1/arith-negate-abs.hs | haskell | import Test.QuickSpec
type I = Int
main =
quickSpec
[ ["x", "y", "z"] `vars` (undefined :: I)
, "0" `fun0` (0 :: I)
, "1" `fun0` (1 :: I)
, "+" `fun2` ((+) :: I -> I -> I)
, "*" `fun2` ((*) :: I -> I -> I)
, "id" `fun1` (id :: I -> I)
, "abs" `fun1` (abs :: I -> I)
... | |
ee747a8691d9dbe714c62e4716ef71fce6d25a8ff55ea0f138ed9a51188cd2f6 | filhodanuvem/clojure-twitter-api | handlers.clj | (ns twitter-api.handlers
(:require [org.httpkit.server :as server]
[compojure.core :refer :all]
[compojure.route :as route]
[ring.middleware.defaults :refer :all]
[clojure.pprint :as pp]
[clojure.string :as str]
[clojure.data.json :as json]
... | null | https://raw.githubusercontent.com/filhodanuvem/clojure-twitter-api/c06a828cf59e7d2e1969e523e0ef7c9c29504d0b/src/twitter_api/handlers.clj | clojure | (ns twitter-api.handlers
(:require [org.httpkit.server :as server]
[compojure.core :refer :all]
[compojure.route :as route]
[ring.middleware.defaults :refer :all]
[clojure.pprint :as pp]
[clojure.string :as str]
[clojure.data.json :as json]
... | |
65603084f07aea2bc4a28c1c5cee9680e0f2521e40fd844ed79a965c80be2bf6 | IBM/wcs-ocaml | ws_cond_continue.ml |
* This file is part of the Watson Conversation Service OCaml API project .
*
* Copyright 2016 - 2017 IBM Corporation
*
* 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... | null | https://raw.githubusercontent.com/IBM/wcs-ocaml/b237b7057f44caa09d36e466be015e2bc3173dd5/examples/rulebot/src/workspaces/ws_cond_continue.ml | ocaml |
* This file is part of the Watson Conversation Service OCaml API project .
*
* Copyright 2016 - 2017 IBM Corporation
*
* 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... | |
9f0f517f59cd16571f43603b75847b7393fa977da53234e0be4e6a314f00895c | LexiFi/lrt | matcher.ml | (******************************************************************************)
Copyright ( C ) 2020 by LexiFi .
(* *)
This source file is released under the terms of the MIT license as part ... | null | https://raw.githubusercontent.com/LexiFi/lrt/038ff963bd066c9d94cffb9896b04b6b8696f136/lib/matcher.ml | ocaml | ****************************************************************************
of the lrt package. Details can be found in the attached LICENSE file.
****************************************************************************
* Pattern ma... | Copyright ( C ) 2020 by LexiFi .
This source file is released under the terms of the MIT license as part
module type S = sig
type t
type 'a return
val empty : modulo_props:bool -> t
* The empty matcher without any registered pattern . The parameter
... |
4854a46580f2dac5f4c1542c9b8f6a66e91206619c2a8875155f2845fef5f502 | ocaml-flambda/flambda-backend | printcmm.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/712c57c247efe2c4fabb7fb270070d3d809c5076/backend/printcmm.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
Pretty - printing of C-- code
open Format
open Cmm
module V = Backend_var
module VP = Backend_var.Wit... |
64403b8a83e86b1c532bee3f4e4d01f0c4db113b0ee739f9c854d0e62c32c525 | deadpendency/deadpendency | GHAppId.hs | module Common.Model.GitHub.GHAppId
( GHAppId (..),
)
where
import Common.Aeson.Aeson
import Data.Aeson
newtype GHAppId = GHAppId
{ _ntInt :: Int
}
deriving stock (Eq, Show, Generic)
instance ToJSON GHAppId where
toJSON = genericToJSON cleanJSONOptions
toEncoding = genericToEncoding cleanJSONOptions
in... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/Model/GitHub/GHAppId.hs | haskell | module Common.Model.GitHub.GHAppId
( GHAppId (..),
)
where
import Common.Aeson.Aeson
import Data.Aeson
newtype GHAppId = GHAppId
{ _ntInt :: Int
}
deriving stock (Eq, Show, Generic)
instance ToJSON GHAppId where
toJSON = genericToJSON cleanJSONOptions
toEncoding = genericToEncoding cleanJSONOptions
in... | |
9361e6b4a2eca09b78975480647d036439c6229b6b8e910f2b9137061d9f715b | chenyukang/eopl | 27.scm | (load-relative "../libs/init.scm")
(load-relative "./base/environments.scm")
(define the-lexical-spec
'((whitespace (whitespace) skip)
(comment ("%" (arbno (not #\newline))) skip)
(identifier
(letter (arbno (or letter digit "_" "-" "?")))
symbol)
(number (digit (arbno digit)) number)
(numbe... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch3/27.scm | scheme | sllgen boilerplate ;;;;;;;;;;;;;;;;
; ;
proc? : SchemeVal -> Bool
procedure : Var * Exp * Env -> Proc
an expressed value is either a number, a boolean or a procval.
extractors:
expval->num : ExpVal -> Int
expval->bool : ExpVal -> Bool
expval->proc : ExpVal -> Proc
the interpreter ;;;;;;;;;;;;;;;; | (load-relative "../libs/init.scm")
(load-relative "./base/environments.scm")
(define the-lexical-spec
'((whitespace (whitespace) skip)
(comment ("%" (arbno (not #\newline))) skip)
(identifier
(letter (arbno (or letter digit "_" "-" "?")))
symbol)
(number (digit (arbno digit)) number)
(numbe... |
eb49e06903ffb0cd5a22345c175826ffd0f3bfc746cb34d5ef34d218816708f0 | chpatrick/servant-generic | Basic.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE CPP #
import Data.Monoid
import Servant
import Servant.Generic
import qualified Data.Text as T
import Data.Text (Text)
import Network.Wai.Handler.... | null | https://raw.githubusercontent.com/chpatrick/servant-generic/3f452375b3085fa950d4cd45b1dcaa32ff159577/examples/Basic.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE DeriveGeneric #
# LANGUAGE CPP #
import Data.Monoid
import Servant
import Servant.Generic
import qualified Data.Text as T
import Data.Text (Text)
import Network.Wai.Handler.Warp (run)
import System.... |
581c8d3ca477de9ebad3a8f389b7ee46f64e3146b26a7c103a4ffa229a576912 | AccelerateHS/accelerate | Real.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MonoLocalBinds #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - missing - methods #
# OPTIONS_GHC -fno - warn - orphans #
-- |
-- Module : Data.Array.Accelerate.Clas... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate/63e53be22aef32cd0b3b6f108e637716a92b72dc/src/Data/Array/Accelerate/Classes/Real.hs | haskell | # LANGUAGE ConstraintKinds #
|
Module : Data.Array.Accelerate.Classes.Real
License : BSD3
Stability : experimental
Instances of 'Real' don't make sense in Accelerate at the moment. These are
only provided to fulfil superclass constraints; e.g. Integral.
computations.
| # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MonoLocalBinds #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - missing - methods #
# OPTIONS_GHC -fno - warn - orphans #
Copyright : [ 2016 .. 2020 ] The Accelerate Team
Maintainer : < >
Porta... |
a65cad616a9ed5d173bdf8a3842b5ca59e624ee1a41d50f3d52a977f08f4c15e | bitonic/tog | Timing.hs | # LANGUAGE ForeignFunctionInterface #
module Tog.Instrumentation.Timing (timingInit, timingBracket, timingReport) where
import Data.IORef (IORef, newIORef, writeIORef, readIORef, modifyIORef)
import qualified Data.HashTable.IO as HT
import System.IO.Unsafe ... | null | https://raw.githubusercontent.com/bitonic/tog/0da3b6ec82ac1fa3ce91d7f9b683a8ddedfd732f/src/Tog/Instrumentation/Timing.hs | haskell | TODO sadly we can't use bracket here -- because of MonadIO. Shall we
use lifted-base?
----------------------------------------------------------------------
Timing functions ripped from criterion.
| Return the amount of elapsed CPU time, combining user and kernel
(system) time into a single measure.
| Set up tim... | # LANGUAGE ForeignFunctionInterface #
module Tog.Instrumentation.Timing (timingInit, timingBracket, timingReport) where
import Data.IORef (IORef, newIORef, writeIORef, readIORef, modifyIORef)
import qualified Data.HashTable.IO as HT
import System.IO.Unsafe ... |
e35ba08f64ea990251a84ea2b01e1c187e16f5cc2c47c8e983b54d8c70cb1e86 | timgilbert/haunting-refrain-posh | playlist.cljs | (ns haunting-refrain.fx.playlist
(:require [re-frame.core :refer [reg-event-fx reg-event-db reg-sub]]
[haunting-refrain.datascript.playlist :as ds]
[shodan.console :as console]
[datascript.core :as d]
[reagent.ratom :refer [reaction]]
[posh.reagent :as posh]... | null | https://raw.githubusercontent.com/timgilbert/haunting-refrain-posh/99a7daafe54c5905a3d1b0eff691b5c602ad6d8d/src/cljs/haunting_refrain/fx/playlist.cljs | clojure | Subscription for the big list of checkins that forms a playlist | (ns haunting-refrain.fx.playlist
(:require [re-frame.core :refer [reg-event-fx reg-event-db reg-sub]]
[haunting-refrain.datascript.playlist :as ds]
[shodan.console :as console]
[datascript.core :as d]
[reagent.ratom :refer [reaction]]
[posh.reagent :as posh]... |
1722b039f5c974d012b9c40f1a56d23a41649801603c86af567e5c6491d5ec79 | release-project/benchmarks | client_db.erl | %%%--------------------------------------------------------------------
%%% CLIENT_DB MODULE
%%%
@author : upon a design by
( C ) 2014 , RELEASE project
%%% @doc
%%% Client_DB module for the Distributed Erlang instant messenger
( IM ) application developed as a real benchmark for the Scalable
Distribu... | null | https://raw.githubusercontent.com/release-project/benchmarks/55f042dca3a2c680e2967c59edc9636456047bd5/IM/RD-IM/client_db.erl | erlang | --------------------------------------------------------------------
CLIENT_DB MODULE
@doc
Client_DB module for the Distributed Erlang instant messenger
This module implementes the functionality for the database that
stores the cients that are loggen in at a given time in a system
@end
------------------------... | @author : upon a design by
( C ) 2014 , RELEASE project
( IM ) application developed as a real benchmark for the Scalable
Distributed Erlang extension of the Erlang / OTP language .
similar to the system described in the Section 2 of the document
" Instant Messenger Architectures Design Pr... |
f0db101866cdec82aa2bd40cd5cd01a8c2a05f8092f3c9ddc505ac98576b616b | RRethy/nvim-treesitter-textsubjects | textsubjects-smart.scm | ((comment) @_start @_end
(#make-range! "range" @_start @_end))
TODO This query does n't work for comment groups at the start and end of a
; file
; See -sitter/tree-sitter/issues/1138
(((_) @head . (comment) @_start . (comment)+ @_end (_) @tail)
(#not-has-type? @tail "comment")
(#not-has-type? @head "com... | null | https://raw.githubusercontent.com/RRethy/nvim-treesitter-textsubjects/1f3bb70be0415d9252fe7bd0dbf8e0809d565efd/queries/julia/textsubjects-smart.scm | scheme | file
See -sitter/tree-sitter/issues/1138 | ((comment) @_start @_end
(#make-range! "range" @_start @_end))
TODO This query does n't work for comment groups at the start and end of a
(((_) @head . (comment) @_start . (comment)+ @_end (_) @tail)
(#not-has-type? @tail "comment")
(#not-has-type? @head "comment")
(#make-range! "range" @_start @_en... |
01cde9b413576e31eb307c79a61798ce209b29e67b0afb7389dd77138a4cba61 | Convex-Dev/convex.cljc | shell.clj | (ns convex.shell
"CONVEX SHELL
Convex Virtual Machine extended with side-effects.
For using as a terminal application, see [[-main]].
For using as a library, see [[transact]].
Assumes knowledge of `:module/cvm`."
{:author "Adam Helinski"}
(:gen-class)
(:import (convex.core.init Init))
(:r... | null | https://raw.githubusercontent.com/Convex-Dev/convex.cljc/15af6c035384f0e8d56a3488065e0bd869ebea0c/module/shell/src/main/clj/convex/shell.clj | clojure | Main
Each ctx must have its own thread.
| (ns convex.shell
"CONVEX SHELL
Convex Virtual Machine extended with side-effects.
For using as a terminal application, see [[-main]].
For using as a library, see [[transact]].
Assumes knowledge of `:module/cvm`."
{:author "Adam Helinski"}
(:gen-class)
(:import (convex.core.init Init))
(:r... |
008ae236fdccdcf0986326c61e419206050eafaa93abf3a2941d225c557d34f3 | haskell-suite/haskell-src-exts | ClassInstType.hs | module ClassInstType where
class Dir d where
localDir :: d -> IO FilePath
instance Dir Directory where
localDir (Local f) = return f
localDir (Darcs {url=url,darcsVersion=Patch patch,subDirectory=subDir}) = do
tmp <- createTempDir 0 "haskelld"
darcsOut <- runDarcsCommand tmp "get" ["--lazy","--to-match... | null | https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/ClassInstType.hs | haskell | module ClassInstType where
class Dir d where
localDir :: d -> IO FilePath
instance Dir Directory where
localDir (Local f) = return f
localDir (Darcs {url=url,darcsVersion=Patch patch,subDirectory=subDir}) = do
tmp <- createTempDir 0 "haskelld"
darcsOut <- runDarcsCommand tmp "get" ["--lazy","--to-match... | |
13f3aae37421729d8b7923cdf562b9b7e716fc002661dca7a9f5ce3150ddd1e0 | leo-project/leo_object_storage | leo_object_storage_msg_collector.erl | %%======================================================================
%%
LeoStorage
%%
Copyright ( c ) 2012 - 2018 Rakuten , Inc.
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a ... | null | https://raw.githubusercontent.com/leo-project/leo_object_storage/139a3d8f174e334aaf54f4e53d2f4fb8db04fc83/src/leo_object_storage_msg_collector.erl | erlang | ======================================================================
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permis... | LeoStorage
Copyright ( c ) 2012 - 2018 Rakuten , Inc.
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
@doc Leo Storage 's M... |
2ac09500b6d516bee50a4b1e22e487463ab0c0b4b5940df9d0949021443628ef | gigamonkey/monkeylib-binary-data | binary-data.lisp | ;;
Copyright ( c ) 2005 , Gigamonkeys Consulting All rights reserved .
;;
(in-package :com.gigamonkeys.binary-data)
(defvar *in-progress-objects* nil)
(defconstant +null+ (code-char 0))
(defgeneric read-value (type stream &key)
(:documentation "Read a value of the given type from the stream."))
(defgeneric wri... | null | https://raw.githubusercontent.com/gigamonkey/monkeylib-binary-data/22e908976d7f3e2318b7168909f911b4a00963ee/binary-data.lisp | lisp |
Binary types
Enumerations
Binary classes
scheme is that when you instantiate an instance of a tagged class
you need to manually fill in the tag slots. This is because the
dispatching at the moment is asymmetric--we read values and then
use them to determine the type but there's no reverse mapping, from
the ty... | Copyright ( c ) 2005 , Gigamonkeys Consulting All rights reserved .
(in-package :com.gigamonkeys.binary-data)
(defvar *in-progress-objects* nil)
(defconstant +null+ (code-char 0))
(defgeneric read-value (type stream &key)
(:documentation "Read a value of the given type from the stream."))
(defgeneric write-val... |
5d28b615c92fe617dca9341d89c50c4809c0b368810986fe9b11d84748b6aeaa | kmi/irs | upo-1-4-20080109.lisp | Mode : Lisp ; Package :
File created in WebOnto
(in-package "OCML")
(in-ontology upo-1-4-20080109)
| null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/upo-1-4-20080109/upo-1-4-20080109.lisp | lisp | Package : |
File created in WebOnto
(in-package "OCML")
(in-ontology upo-1-4-20080109)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.