_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 |
|---|---|---|---|---|---|---|---|---|
d29e852399cf5bc2d03bd829218a700aca8db810b1685480bfadcca2211810c4 | Octachron/phantom_algebra | flat_array.ml | #if OCAML_MAJOR>=4 && OCAML_MINOR>=6
type elt = float
type t = floatarray
let len = Array.Floatarray.length
let get = Array.Floatarray.unsafe_get
let set = Array.Floatarray.unsafe_set
let create = Array.Floatarray.create
#else
type elt = float
type t = elt array
let len = Array.length
let get = Array.unsafe_get
let... | null | https://raw.githubusercontent.com/Octachron/phantom_algebra/9733dad74e010642bdd500afe987440558d5608b/src/flat_array.ml | ocaml | #if OCAML_MAJOR>=4 && OCAML_MINOR>=6
type elt = float
type t = floatarray
let len = Array.Floatarray.length
let get = Array.Floatarray.unsafe_get
let set = Array.Floatarray.unsafe_set
let create = Array.Floatarray.create
#else
type elt = float
type t = elt array
let len = Array.length
let get = Array.unsafe_get
let... | |
0c04f0becc5ab9ed75247da19aec3e2dbb27a3fbf92ceb01b80ac20762a65abe | michaelklishin/langohr | core.clj | This source code is dual - licensed under the Apache License , version
2.0 , and the Eclipse Public License , version 1.0 .
;;
;; The APL v2.0:
;;
;; ----------------------------------------------------------------------------------
Copyright ( c ) 2011 - 2020 , , and the ClojureWerkz Team
;;
Licensed unde... | null | https://raw.githubusercontent.com/michaelklishin/langohr/0c63ac3c6bc97d73e290ed366e9e97e07d39dedb/src/clojure/langohr/core.clj | clojure |
The APL v2.0:
----------------------------------------------------------------------------------
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 CONDIT... | This source code is dual - licensed under the Apache License , version
2.0 , and the Eclipse Public License , version 1.0 .
Copyright ( c ) 2011 - 2020 , , and the ClojureWerkz Team
distributed under the License is distributed on an " AS IS " BASIS ,
The EPL v1.0 :
Copyright ( c ) 2011 - 2020 , , ... |
4dc447948986fb9f9f68b6a911d1fd93381486f9862bd7d67f742a2817e2965a | jyh/metaprl | itt_hoas_bterm.ml | doc <:doc<
@module[Itt_hoas_bterm]
The @tt[Itt_hoas_bterm] module defines the inductive type <<BTerm>>
and establishes the appropriate induction rules for this type.
@docoff
----------------------------------------------------------------
@begin[license]
This file is part of MetaPRL, a modular, h... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/itt/reflection/experimental/itt_hoas_bterm.ml | ocaml | private
private
private
private
private
private
private
private
private
private
private
private
Optimization
private
private
{| squash |}
private
private
private
private
private
private
private
private
***
private
private
private
private
***********************************************************************
* Con... | doc <:doc<
@module[Itt_hoas_bterm]
The @tt[Itt_hoas_bterm] module defines the inductive type <<BTerm>>
and establishes the appropriate induction rules for this type.
@docoff
----------------------------------------------------------------
@begin[license]
This file is part of MetaPRL, a modular, h... |
05b2652f39b71d3a4b8ad163d49fc66746cb7410edb8a588d270ce6517c2de80 | zack-bitcoin/amoveo | blacklist_peer.erl | -module(blacklist_peer).
-behaviour(gen_server).
-export([start_link/0,code_change/3,handle_call/3,handle_cast/2,handle_info/2,init/1,terminate/2,
add/1, check/1, remove/1]).
-define(Limit, 300).
init(ok) -> {ok, dict:new()}.
start_link() -> gen_server:start_link({local, ?MODULE}, ?MODULE, ok, []).
code_change(_OldV... | null | https://raw.githubusercontent.com/zack-bitcoin/amoveo/257f3e8cc07f1bae9df1a7252b8bc67a0dad3262/apps/amoveo_http/src/blacklist_peer.erl | erlang | -module(blacklist_peer).
-behaviour(gen_server).
-export([start_link/0,code_change/3,handle_call/3,handle_cast/2,handle_info/2,init/1,terminate/2,
add/1, check/1, remove/1]).
-define(Limit, 300).
init(ok) -> {ok, dict:new()}.
start_link() -> gen_server:start_link({local, ?MODULE}, ?MODULE, ok, []).
code_change(_OldV... | |
e71123501f8b947c767ad283158c421894d38f202ca2bcbca677ffdc8dbf20cc | leo-project/leo_object_storage | leo_compact_fsm_worker.erl | %%======================================================================
%%
%% Leo Object Storage
%%
Copyright ( c ) 2012 - 2017 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 obt... | null | https://raw.githubusercontent.com/leo-project/leo_object_storage/139a3d8f174e334aaf54f4e53d2f4fb8db04fc83/src/leo_compact_fsm_worker.erl | erlang | ======================================================================
Leo Object Storage
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 langu... | Copyright ( c ) 2012 - 2017 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 FSM of the data - compaction ... |
edfb27a00e8a554534408459f7ebb38cf04d17595da598871e2000c30544d915 | antono/guix-debian | rsync.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU 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 t... | null | https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/gnu/packages/rsync.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 , 2013 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages rsync)
#:use-module (gnu packages)
#:use-module (gnu packages perl)
#:us... |
a1882598fe1a74120bc3cebde07c7678345c8d6a301953f4723637ec166e5b11 | clojure-interop/java-jdk | MultiPanelUI.clj | (ns javax.swing.plaf.multi.MultiPanelUI
"A multiplexing UI used to combine PanelUIs.
This file was automatically generated by AutoMulti."
(:refer-clojure :only [require comment defn ->])
(:import [javax.swing.plaf.multi MultiPanelUI]))
(defn ->multi-panel-ui
"Constructor."
(^MultiPanelUI []
(new Multi... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/plaf/multi/MultiPanelUI.clj | clojure | (ns javax.swing.plaf.multi.MultiPanelUI
"A multiplexing UI used to combine PanelUIs.
This file was automatically generated by AutoMulti."
(:refer-clojure :only [require comment defn ->])
(:import [javax.swing.plaf.multi MultiPanelUI]))
(defn ->multi-panel-ui
"Constructor."
(^MultiPanelUI []
(new Multi... | |
f54f0898af95f070bcbacae1e118502b1d7e0c7c12e77702f8165bb41dacf5f7 | haskell-tools/haskell-tools | CanCaptureVariable_res.hs | # LANGUAGE ScopedTypeVariables #
module Refactor.GenerateTypeSignature.CanCaptureVariable where
import qualified Data.Map as Map
insertMany :: forall k v . (Ord k) => (v -> v -> v) -> [(k,v)] -> Map.Map k v -> Map.Map k v
insertMany accf vs m = foldr f1 m vs
where f1 :: Ord k => (k, v) -> Map.Map k v -> Map.Map k v... | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/GenerateTypeSignature/CanCaptureVariable_res.hs | haskell | # LANGUAGE ScopedTypeVariables #
module Refactor.GenerateTypeSignature.CanCaptureVariable where
import qualified Data.Map as Map
insertMany :: forall k v . (Ord k) => (v -> v -> v) -> [(k,v)] -> Map.Map k v -> Map.Map k v
insertMany accf vs m = foldr f1 m vs
where f1 :: Ord k => (k, v) -> Map.Map k v -> Map.Map k v... | |
3d02e7d9df0973ed3c2a232efc2d5ade9d92eeb58a062223e17357ddebbd127c | composewell/streamly | MutArray.hs | -- |
Module : Streamly . Data . MutArray
Copyright : ( c ) 2022 Composewell Technologies
--
-- License : BSD3
-- Maintainer :
-- Stability : released
Portability : GHC
--
Mutable version of " Streamly . Data . Array " . Please refer to that module for
-- general documentation. The contents of m... | null | https://raw.githubusercontent.com/composewell/streamly/ba0d42aec0dffda628a4872063f63d90e6ccb1ad/core/src/Streamly/Data/MutArray.hs | haskell | |
License : BSD3
Maintainer :
Stability : released
general documentation. The contents of mutable ararys can be modified
in-place.
types i.e. not requiring the 'Unbox' constraint.
* Types
* Construction
Uninitialized Arrays
From containers
drop new
full buffer
writeLastN
* Appending elements
... | Module : Streamly . Data . MutArray
Copyright : ( c ) 2022 Composewell Technologies
Portability : GHC
Mutable version of " Streamly . Data . Array " . Please refer to that module for
See " Streamly . Data . MutArray . Generic " for mutable arrays that work for boxed
module Streamly.Data.MutArray
... |
23b52723c5dd8c6f09f158d0eea66c0a9f1f79b21a14e8e47383af90114912e1 | colis-anr/colis-language | mkdir.ml | open Format
open Colis_constraints
open SymbolicUtility.Mixed
let name = "mkdir"
let interp_mkdir1 cwd path_str =
let path = Path.strip_trailing_slashes path_str in
let p = Path.from_string path in
match Path.split_last p with
| None ->
specification_cases [
error_case ~descr:"mkdir: cannot create d... | null | https://raw.githubusercontent.com/colis-anr/colis-language/b4082a65302a6f164ab6f873a6da1206b6b6afd1/src/symbolic/utilities/mkdir.ml | ocaml | open Format
open Colis_constraints
open SymbolicUtility.Mixed
let name = "mkdir"
let interp_mkdir1 cwd path_str =
let path = Path.strip_trailing_slashes path_str in
let p = Path.from_string path in
match Path.split_last p with
| None ->
specification_cases [
error_case ~descr:"mkdir: cannot create d... | |
59b67dc8f85ae504aec10b5d2ea0bc0b90bcdf121e3a3dfefe3bb748c6a52f41 | hawkir/calispel | package.lisp | (in-package #:common-lisp-user)
(defpackage #:calispel
(:export ;; Basic functionality.
#:channel
#:?
#:!
#:fair-alt
#:pri-alt
#:otherwise
#:null-queue
#:+null-queue+
;; Provided for dynamic alternation.
#:operation-alternate
#:operation
#:direc... | null | https://raw.githubusercontent.com/hawkir/calispel/e9f2f9c1af97f4d7bb4c8ac25fb2a8f3e8fada7a/package.lisp | lisp | Basic functionality.
Provided for dynamic alternation.
Testing. | (in-package #:common-lisp-user)
(defpackage #:calispel
#:channel
#:?
#:!
#:fair-alt
#:pri-alt
#:otherwise
#:null-queue
#:+null-queue+
#:operation-alternate
#:operation
#:direction
#:value
#:send
#:receive
#:test-channel
#:test... |
26c5da67c127a046410bf434975a49129ea5d446d0bcce2489eef1940163958b | phantomics/seed | graph.garden-path.lisp | graph.garden-path.lisp
(in-package #:seed.generate)
(specify-media
media-spec-graph-garden-path
(graph-garden-path-content
(follows reagent graph-id)
`((set-branch-meta branch :change nil)
(cond ((eq :node (caar data))
(labels ((transcribe (target items)
(if (not items)
target (progn (set... | null | https://raw.githubusercontent.com/phantomics/seed/f128969c671c078543574395d6b23a1a5f2723f8/seed.media.graph.garden-path/graph.garden-path.lisp | lisp | (print (list :reg reagent ,point)) | graph.garden-path.lisp
(in-package #:seed.generate)
(specify-media
media-spec-graph-garden-path
(graph-garden-path-content
(follows reagent graph-id)
`((set-branch-meta branch :change nil)
(cond ((eq :node (caar data))
(labels ((transcribe (target items)
(if (not items)
target (progn (set... |
52612e8c482df5662cf18e0123bb90983216e1f640692680b1f7d4102dc17ab2 | jeromesimeon/Galax | print_type_core.mli | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/ast_printer/print_type_core.mli | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : print_type_core.mli , v 1.4 2007/02/01 22:08:45 simeon Exp $
val print_celem_decl : Format.formatter -> Xquery_type_core_ast.celem_declaration -> unit
val print_cattr_decl : Format.formatter -> Xquery_type_core_ast.cattr_declaration ... |
00a748bdb490c2af6526ec0b109bcb1da229dabfa7bf2eb0cc1b903bc1441088 | kronkltd/jiksnu | domain_actions_test.clj | (ns jiksnu.modules.core.actions.domain-actions-test
(:require [clj-factory.core :refer [factory fseq]]
[jiksnu.modules.core.actions.domain-actions :as actions.domain]
[jiksnu.mock :as mock]
[jiksnu.modules.core.model.domain :as model.domain]
[jiksnu.test-helper :as th]
... | null | https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/test/jiksnu/modules/core/actions/domain_actions_test.clj | clojure | There is no reason this shouldn't be a success
Returns the domain, if deleted
Should be deleted | (ns jiksnu.modules.core.actions.domain-actions-test
(:require [clj-factory.core :refer [factory fseq]]
[jiksnu.modules.core.actions.domain-actions :as actions.domain]
[jiksnu.mock :as mock]
[jiksnu.modules.core.model.domain :as model.domain]
[jiksnu.test-helper :as th]
... |
9e075070374ab0a0e1e7108c0390bca5cb213e48a83ed2ce0972cb45ddfddf00 | lem-project/lem | editor-variables.lisp | (in-package :lem-base)
(define-editor-variable tab-width +default-tab-size+)
| null | https://raw.githubusercontent.com/lem-project/lem/3b9b92690b48710135a946b1d3754f64d2bfdaf1/src/base/editor-variables.lisp | lisp | (in-package :lem-base)
(define-editor-variable tab-width +default-tab-size+)
| |
5f08eb0239c04b4654c00e8e0dfe1f219f83e0473c7c4c6bfcb213eac9e665b3 | clojure-interop/aws-api | AbstractAWSResourceGroupsTaggingAPI.clj | (ns com.amazonaws.services.resourcegroupstaggingapi.AbstractAWSResourceGroupsTaggingAPI
"Abstract implementation of AWSResourceGroupsTaggingAPI. Convenient method forms pass through to the
corresponding overload that takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [re... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.resourcegroupstaggingapi/src/com/amazonaws/services/resourcegroupstaggingapi/AbstractAWSResourceGroupsTaggingAPI.clj | clojure | (ns com.amazonaws.services.resourcegroupstaggingapi.AbstractAWSResourceGroupsTaggingAPI
"Abstract implementation of AWSResourceGroupsTaggingAPI. Convenient method forms pass through to the
corresponding overload that takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [re... | |
98b4e0250ec32be8a7813309f690c65516dfa470c4115bcea08d419c7e0ccbb0 | scheme/scsh | lib-dirs.scm | ;;; More imports for the new library-search facility:
;;; HANDLE: with-handler
;;; LIST-LIB: any
;;; SCSH-LEVEL-0: directory-files open-input-file file-directory?
SCSH - LEVEL-0 :
;;; SCSH-LEVEL-0: the file-name procs
(define default-lib-dirs '("/usr/local/lib/scsh/modules/"))
(define (set-defa... | null | https://raw.githubusercontent.com/scheme/scsh/114432435e4eadd54334df6b37fcae505079b49f/scheme/lib-dirs.scm | scheme | More imports for the new library-search facility:
HANDLE: with-handler
LIST-LIB: any
SCSH-LEVEL-0: directory-files open-input-file file-directory?
SCSH-LEVEL-0: the file-name procs
Resolve it.
Found it.
Search subdirs.
Ends in / means recursive search.
(in-any-event abort-exp body ...)
If *an... | SCSH - LEVEL-0 :
(define default-lib-dirs '("/usr/local/lib/scsh/modules/"))
(define (set-default-lib-dirs! path-list)
(set! default-lib-dirs path-list))
Search library dirs for FILE .
(define (find-library-file file lib-dirs script-file)
(letrec ((recur (lambda (dir)
( format ( error - output - ... |
0b56ec9124e65fa2317a0410e4493026021e7959e346e291d41f5556791a7c84 | janestreet/universe | grammar.ml | open Core
open Sexp_app
module S = Syntax
let atom x = S.Template.Atom x
let qcmds =
let etc = S.Quote (atom "...") in
let t = S.Quote (atom "xxx") in
let r = Re2.create_exn "R" in
let temp n = atom (sprintf "T[%d]" n) in
let sexp = Sexp.Atom "SEXP" in
let num = 999 in
List.map
~f:S.Query.sexp_of_t
... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/sexp/bin/grammar.ml | ocaml | open Core
open Sexp_app
module S = Syntax
let atom x = S.Template.Atom x
let qcmds =
let etc = S.Quote (atom "...") in
let t = S.Quote (atom "xxx") in
let r = Re2.create_exn "R" in
let temp n = atom (sprintf "T[%d]" n) in
let sexp = Sexp.Atom "SEXP" in
let num = 999 in
List.map
~f:S.Query.sexp_of_t
... | |
5434249853e8ee2e794d01ae78624049195036fba8660c31bfc29b1a73b9ebeb | ucsd-progsys/nate | frx_entry.mli | (***********************************************************************)
(* *)
MLTk , Tcl / Tk interface of Objective Caml
(* *)
, , and ... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/otherlibs/labltk/frx/frx_entry.mli | ocaml | *********************************************************************
described in file LICENSE found in the... | MLTk , Tcl / Tk interface of Objective Caml
, , and
projet Cristal , INRIA Rocquencourt
, Kyoto University RIMS
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique and... |
4c972cff4ec4cbd7f827e3610e2ae1b5040ba4f4e09447d786b4089bcfbf3f79 | argp/bap | piqic_ocaml_defaults.ml | pp camlp4o -I ` ocamlfind query piqi.syntax ` pa_labelscope.cmo pa_openin.cmo
Copyright 2009 , 2010 , 2011 , 2012 , 2013
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at ... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/libtracewrap/libtrace/piqi/piqi/piqic/piqic_ocaml_defaults.ml | ocaml | reuse several functions
need special handing for wire_type override
gen parsers for built-in types
fully-qualified field name
flag
field construction code
fully-qualified capitalized record name
field constructor list
fake_<record-name> function delcaration | pp camlp4o -I ` ocamlfind query piqi.syntax ` pa_labelscope.cmo pa_openin.cmo
Copyright 2009 , 2010 , 2011 , 2012 , 2013
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 ... |
c5bb74d7d78b718ac4b3720526193469e88c94dd69310f5e61f583eaadb7f463 | ahrefs/atd | test_classic_inline_record_t.expected.mli | (* Auto-generated from "test_classic_inline_record.atd" *)
[@@@ocaml.warning "-27-32-33-35-39"]
type foo = Foo of { x: int }
| null | https://raw.githubusercontent.com/ahrefs/atd/03386f2ffa5aea981ebd1c25346b157db78f986b/atdgen/test/test_classic_inline_record_t.expected.mli | ocaml | Auto-generated from "test_classic_inline_record.atd" | [@@@ocaml.warning "-27-32-33-35-39"]
type foo = Foo of { x: int }
|
aaf3eaa2b3050909e9d8cc5131ba57b41995624c9264d3a1cb6481e1459b2c71 | D00mch/DartClojure | build.clj | (ns build
(:require [clojure.string :as str]
[clojure.tools.build.api :as b]
[clojure.java.shell :refer [sh]]))
(def target "target")
(def class-dir (str target "/classes"))
(def basis (b/create-basis {:project "deps.edn"}))
(defn cmd! [cmd] (sh "sh" "-c" cmd))
(defn cmd-prn! [cmd] (println... | null | https://raw.githubusercontent.com/D00mch/DartClojure/07de92ea08f6bf44262e22c3d7d469f5bfbe284f/build.clj | clojure | # Versions
# Uberjar
\"")
# NPM
# All | (ns build
(:require [clojure.string :as str]
[clojure.tools.build.api :as b]
[clojure.java.shell :refer [sh]]))
(def target "target")
(def class-dir (str target "/classes"))
(def basis (b/create-basis {:project "deps.edn"}))
(defn cmd! [cmd] (sh "sh" "-c" cmd))
(defn cmd-prn! [cmd] (println... |
1e6f2da9e5150e1526451892c870b11ed5ef4f35637b5bc2d8a715bd5c7afd41 | katydid/katydid-haskell | UserDefinedFuncs.hs | module UserDefinedFuncs
( userLib
, incExpr
, concatExpr
, isPrimeExpr
)
where
import qualified Data.Text
import Data.Numbers.Primes ( isPrime )
import Data.Katydid.Relapse.Expr
-- |
-- userLib is a library of user defined functions that can be passed to the parser.
userLib ... | null | https://raw.githubusercontent.com/katydid/katydid-haskell/4588cd8676628cd15c671d61b65bdc2f3a199a38/test/UserDefinedFuncs.hs | haskell | |
userLib is a library of user defined functions that can be passed to the parser.
|
This function is used by the Relapse parser to insert your user defined expression into the expression tree.
|
This function is also useful if we want to build up our own well typed expression tree,
bypassing the Relapse parser... | module UserDefinedFuncs
( userLib
, incExpr
, concatExpr
, isPrimeExpr
)
where
import qualified Data.Text
import Data.Numbers.Primes ( isPrime )
import Data.Katydid.Relapse.Expr
userLib :: String -> [AnyExpr] -> Either String AnyExpr
userLib "inc" args = mkIncExpr args
u... |
16ad0328a1f7032767ee6bad82d433fbadc6811f2d098add4fccacf9601721e3 | well-typed/large-records | R100.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE PatternSynonyms #
{-# LANGUAGE ViewPatterns #-}
#if __GLASGOW_HASKELL__ >= 902
# LANGUAGE NoFieldSelectors #
#endif
#if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -d... | null | https://raw.githubusercontent.com/well-typed/large-records/c6c2b51af11e90f30822543d7ce4d1cb28cee294/large-records-benchmarks/bench/experiments/Experiment/PatternSynonym_NFS/Sized/R100.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE ViewPatterns #
# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings # | # LANGUAGE PatternSynonyms #
#if __GLASGOW_HASKELL__ >= 902
# LANGUAGE NoFieldSelectors #
#endif
#if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
module Experiment.PatternSynonym_NFS.Sized.R100 where
import Bench.Types
data R
viewR :: R -> (
(T 00, T 01, T 02, T 03, T 04, T 05, T 06, T 07, T 08, T 09)
... |
67e92f3d17d855d85105ad94a91a29a68b85ca7bdfe8b53a740e41fe9a01b6b6 | hiroshi-unno/coar | problem.ml | open Core
open Common.Ext
open Ast
type logic_type = Any | Lia | BV | Reals | Arrays
let logic_type_of_str = function
| "LIA" | "SAT" -> Lia | "BV" -> BV | "Reals" -> Reals | "Arrays" -> Arrays | _ -> Any
type symbol = string
type sort = symbol * Logic.Sort.t
module type TermType = sig
val logic_of: unit -> log... | null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/SyGuS/problem.ml | ocaml | constructor
constructor | open Core
open Common.Ext
open Ast
type logic_type = Any | Lia | BV | Reals | Arrays
let logic_type_of_str = function
| "LIA" | "SAT" -> Lia | "BV" -> BV | "Reals" -> Reals | "Arrays" -> Arrays | _ -> Any
type symbol = string
type sort = symbol * Logic.Sort.t
module type TermType = sig
val logic_of: unit -> log... |
5c31529918efcdfa22a0c61272821c5a3d97875bd7f2e76b3e18d3ad5cc727ab | scicloj/wadogo | log.clj | (ns wadogo.ticks.log
(:require [fastmath.core :as m]
[wadogo.ticks.linear :refer [linear-ticks]]))
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defn- logp
[^double base]
(cond
(m/one? base) identity
(== base m/E) (fn ^double [^double x] (m/log x))
(== base 2.0) m... | null | https://raw.githubusercontent.com/scicloj/wadogo/4076820f55c1b6413b055611ad49be4de392cdb7/src/wadogo/ticks/log.clj | clojure | (ns wadogo.ticks.log
(:require [fastmath.core :as m]
[wadogo.ticks.linear :refer [linear-ticks]]))
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defn- logp
[^double base]
(cond
(m/one? base) identity
(== base m/E) (fn ^double [^double x] (m/log x))
(== base 2.0) m... | |
8cc628929d9cc264dde92f5b24fb5b3261549d3bee388f82280aaf7547e5b411 | bobatkey/CS316-17 | Lec08.hs | module Lec08 where
import Test.QuickCheck
LECTURE 08 : QUICKCHECK
{- PART I : WRITING INDIVIDUAL TEST CASES -}
-- artisanal testing, one at a time
append_test_1 :: Bool
append_test_1 =
[1,2,3] ++ [4,5,6] == [1,2,3,4,5,6]
append_test_2 :: Bool
append_test_2 =
[4,5,6] ++ [1,2,3] == [4,5,6,1,2,3]
append_t... | null | https://raw.githubusercontent.com/bobatkey/CS316-17/36eb67c335cd0e6f5b7a4b8eafdea3cd4b715e0c/lectures/Lec08.hs | haskell | PART I : WRITING INDIVIDUAL TEST CASES
artisanal testing, one at a time
PART II : PROPERTY BASED TESTING WITH QUICKCHECK
/~nr/cs257/archive/john-hughes/quick.pdf
Why not test with lots of examples, not just one?
(x + y) + z = x + (y + z)
--------------------------------------------------------------------
-... | module Lec08 where
import Test.QuickCheck
LECTURE 08 : QUICKCHECK
append_test_1 :: Bool
append_test_1 =
[1,2,3] ++ [4,5,6] == [1,2,3,4,5,6]
append_test_2 :: Bool
append_test_2 =
[4,5,6] ++ [1,2,3] == [4,5,6,1,2,3]
append_test_3 :: Bool
append_test_3 =
[] ++ [1,2,3] == [1,2,3]
append_test_4 :: Bool
app... |
b50f886d96f74a9b349a3f625c4a031c6cd7324f26a22bd473e2de5f08be2cba | mpickering/apply-refact | Lambda38.hs | foo a b c = bar (flux ++ quux) c where flux = c | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Lambda38.hs | haskell | foo a b c = bar (flux ++ quux) c where flux = c | |
d3d8f72c7802cff475a3d8e26f08afaf8746fb845dd8b7a3f4789890dc0d248b | travisbrady/ocaml-vw | simple.ml | (*
* A trivial example showing how to create a vw instance
* feed it some examples and then generate a prediction
*)
let printf = Printf.printf
let () =
let vw = Vw.initialize "--invert_hash the_model.vw" in
printf "VW!!\n%!";
let examples = Array.map (fun x -> Vw.read_example vw x)
[|"0 | pric... | null | https://raw.githubusercontent.com/travisbrady/ocaml-vw/2c5ac40872a7bd4b921a8554f82f8783f5e2f88d/examples/simple.ml | ocaml |
* A trivial example showing how to create a vw instance
* feed it some examples and then generate a prediction
| let printf = Printf.printf
let () =
let vw = Vw.initialize "--invert_hash the_model.vw" in
printf "VW!!\n%!";
let examples = Array.map (fun x -> Vw.read_example vw x)
[|"0 | price:.23 sqft:.25 age:.05 2006";
"1 | price:.33 sqft:.35 age:.02 2006"|] in
let label = Vw.get_label (example... |
dd0a50da98e4be7d22228efd6277c1b96e0218cff76d0ca38fa4768fca7f9518 | dongcarl/guix | emacs.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2015 < >
Copyright © 2020 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU 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 ; ei... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/guix/build-system/emacs.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2015 < >
Copyright © 2020 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix build-system emacs)
#:use-module ((guix build emacs-build-system)... |
0d9c0add1be4370496f567b2dcfc773235b69eea402430bf3ccfdd518fb74833 | tomgr/libcspm | Monad.hs | # LANGUAGE CPP #
module CSPM.Evaluator.Monad where
import Control.Monad.Reader
import Prelude hiding (lookup)
import CSPM.Syntax.Names
import CSPM.Evaluator.Environment
import {-# SOURCE #-} CSPM.Evaluator.Values
import Util.Annotated
import Util.Exception
type EvaluationState = Environment
type EvaluationMonad = Re... | null | https://raw.githubusercontent.com/tomgr/libcspm/24d1b41954191a16e3b5e388e35f5ba0915d671e/src/CSPM/Evaluator/Monad.hs | haskell | # SOURCE #
catch it
| Implements non-recursive lets.
| Implements recursive lets. | # LANGUAGE CPP #
module CSPM.Evaluator.Monad where
import Control.Monad.Reader
import Prelude hiding (lookup)
import CSPM.Syntax.Names
import CSPM.Evaluator.Environment
import Util.Annotated
import Util.Exception
type EvaluationState = Environment
type EvaluationMonad = Reader EvaluationState
gets :: (EvaluationSta... |
3548be80cd7f976c2b6ea3c6200531f3391834d7c9f6ffabeeab6b7e0f37dcb3 | ocsigen/eliom | ppx_eliom.mli | *
Eliom PPX syntax extension . For documentation , refer to
{ % < < a_manual chapter="ppx - syntax"|the corresponding manual page.>>% }
Eliom PPX syntax extension. For documentation, refer to
{% <<a_manual chapter="ppx-syntax"|the corresponding manual page.>>%}
*)
| null | https://raw.githubusercontent.com/ocsigen/eliom/a78186cc8720db70009f89bd9069d1f21f166ec4/src/ppx/ppx_eliom.mli | ocaml | *
Eliom PPX syntax extension . For documentation , refer to
{ % < < a_manual chapter="ppx - syntax"|the corresponding manual page.>>% }
Eliom PPX syntax extension. For documentation, refer to
{% <<a_manual chapter="ppx-syntax"|the corresponding manual page.>>%}
*)
| |
70d691c7283121ed74f1a8156864802016b174fbac42a09b86cf1fdc8fb0cc54 | coccinelle/coccinelle | sexp_ast_c.mli | val string_of_toplevel: Ast_c.toplevel -> string
val string_of_expression: Ast_c.expression -> string
val string_of_program: Ast_c.program -> string
val show_info: bool ref
val show_qualifier: bool ref
val show_expr_info: bool ref
| null | https://raw.githubusercontent.com/coccinelle/coccinelle/57cbff0c5768e22bb2d8c20e8dae74294515c6b3/parsing_c/sexp_ast_c.mli | ocaml | val string_of_toplevel: Ast_c.toplevel -> string
val string_of_expression: Ast_c.expression -> string
val string_of_program: Ast_c.program -> string
val show_info: bool ref
val show_qualifier: bool ref
val show_expr_info: bool ref
| |
fc4c084e00987d6d6b8d826f47da669d9b437265d9557e84a060a51ab147b3d7 | ragkousism/Guix-on-Hurd | gnupg.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2010 , 2011 , 2013 , 2014 , 2016 < >
Copyright © 2013 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the F... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/guix/gnupg.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2010 , 2011 , 2013 , 2014 , 2016 < >
Copyright © 2013 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix gnupg)
#:use-module (ice-9 popen)
#... |
386b96624cc0412e24c404971b9ea7a31cafa881eb5363080878414268d52c06 | smaccoun/polysemy-servant | Serve.hs | module Server.Serve where
import AppBase
import Servant.Server
import Servant (errHTTPCode)
import Server.API.API (apiServer, api)
import qualified Network.Wai.Handler.Warp as Warp
import Config
import qualified Network.Wai as Wai
import Polysemy hiding (run)
import Effects
import Control.Monad.Except (throwError, cat... | null | https://raw.githubusercontent.com/smaccoun/polysemy-servant/93f7977d6c03995d03674e9e5e0c24f02458b182/src/Server/Serve.hs | haskell | module Server.Serve where
import AppBase
import Servant.Server
import Servant (errHTTPCode)
import Server.API.API (apiServer, api)
import qualified Network.Wai.Handler.Warp as Warp
import Config
import qualified Network.Wai as Wai
import Polysemy hiding (run)
import Effects
import Control.Monad.Except (throwError, cat... | |
0c5039134041246515c24678b28348136cd8b834984f65b6d815e2b3bc5c4c3c | raph-amiard/CamllVM | 13_gcd_clean.ml | let rec gcd a b =
if a = 0 then b
else if b = 0 then a
else if a > b then gcd b (a mod b)
else gcd a (b mod a);;
print_int (gcd 12344 24482);;
print_newline ();;
| null | https://raw.githubusercontent.com/raph-amiard/CamllVM/d36928f0e81a6f4f65ddd3a8653887d187632dc2/test/testfiles/13_gcd_clean.ml | ocaml | let rec gcd a b =
if a = 0 then b
else if b = 0 then a
else if a > b then gcd b (a mod b)
else gcd a (b mod a);;
print_int (gcd 12344 24482);;
print_newline ();;
| |
eeb14b41684b28bb94eb9bce8cb199232ba33f764a2fa719a06ac6f78d616b48 | drcode/webfui | inverse_kinematics.clj | (ns webfui-examples.views.inverse-kinematics
(:require [webfui-examples.views.common :as common]
[noir.content.getting-started])
(:use [noir.core :only [defpage]]
[hiccup.core :only [html]]))
(defpage "/inverse_kinematics" []
(common/layout "inverse_kinematics"))
| null | https://raw.githubusercontent.com/drcode/webfui/e8ba6e9224542755e5780488cb43f0c5510827f9/webfui-examples/src-clj/webfui_examples/views/inverse_kinematics.clj | clojure | (ns webfui-examples.views.inverse-kinematics
(:require [webfui-examples.views.common :as common]
[noir.content.getting-started])
(:use [noir.core :only [defpage]]
[hiccup.core :only [html]]))
(defpage "/inverse_kinematics" []
(common/layout "inverse_kinematics"))
| |
862d20dd0a4ca7436d953822fd04a5876945e2e8df427107bfcd55f14ba8e09d | careercup/CtCI-6th-Edition-Clojure | chapter_4_q8_test.clj | (ns ^{:author "Leeor Engel"}
chapter-4.chapter-4-q8-test
(:require [clojure.test :refer :all]
[data-structures.tree :refer :all]
[chapter-4.chapter-4-q8 :refer :all]
[clojure.zip :as zip]))
(deftest first-common-ancestor-test
(testing "equal depths"
(let [tree (create-tree-... | null | https://raw.githubusercontent.com/careercup/CtCI-6th-Edition-Clojure/ef151b94978af82fb3e0b1b0cd084d910870c52a/test/chapter_4/chapter_4_q8_test.clj | clojure | (ns ^{:author "Leeor Engel"}
chapter-4.chapter-4-q8-test
(:require [clojure.test :refer :all]
[data-structures.tree :refer :all]
[chapter-4.chapter-4-q8 :refer :all]
[clojure.zip :as zip]))
(deftest first-common-ancestor-test
(testing "equal depths"
(let [tree (create-tree-... | |
e3923491a9f2d3cb8f0dd17c70c7d18a971cc152b30682bf960d49de2592eb53 | MaskRay/99-problems-ocaml | 6.ml | let is_palindrome xs = List.rev xs = xs
| null | https://raw.githubusercontent.com/MaskRay/99-problems-ocaml/652604f13ba7a73eee06d359b4db549b49ec9bb3/1-10/6.ml | ocaml | let is_palindrome xs = List.rev xs = xs
| |
9e9576e22685ae5be12f0255e9ee2f4ebecba65d5a7f6608603cd8d996450be7 | AndrasKovacs/setoidtt | FlatParseIndent.hs |
module Old.FlatParseIndent where
import qualified Data.ByteString as B
import qualified Data.ByteString.Short.Internal as SB
import qualified Data.ByteString.Unsafe as B
import qualified Data.Text.Short as T
import qualified Data.Text.Short.Unsafe as T
import qualified Data.Map.Strict as M
import Data.Map (Map)
impo... | null | https://raw.githubusercontent.com/AndrasKovacs/setoidtt/621aef2c4ae5a6acb418fa1153575b21e2dc48d2/setoidtt/flatparse/Old/FlatParseIndent.hs | haskell | ------------------------------------------------------------------------------
# complete OK#, Err# #
# inline (<$) #
# inline empty #
# inline pure #
# inline (<*>) #
# inline (<*) #
# inline (*>) #
# inline return #
# inline (>>=) #
# inline (>>) #
# inline ask #
# inline local #
# inline derefChar8# #
# inline isDig... |
module Old.FlatParseIndent where
import qualified Data.ByteString as B
import qualified Data.ByteString.Short.Internal as SB
import qualified Data.ByteString.Unsafe as B
import qualified Data.Text.Short as T
import qualified Data.Text.Short.Unsafe as T
import qualified Data.Map.Strict as M
import Data.Map (Map)
impo... |
c345361c4c0da5b60d93e136f72c318f636ffe3d02b1ba794b2c3ce2e9a45e95 | elastic/runbld | fs.clj | (ns runbld.fs)
(defprotocol FileSystem
(fs-mountpoint [_] "/dev/md0")
(fs-type [_] "xfs")
(fs-bytes-total [_])
(fs-bytes-used [_])
(fs-bytes-free [_])
(fs-percent-used [_])
(fs-percent-free [_])
)
| null | https://raw.githubusercontent.com/elastic/runbld/7afcb1d95a464dc068f95abf3ad8a7566202ce28/src/clj/runbld/fs.clj | clojure | (ns runbld.fs)
(defprotocol FileSystem
(fs-mountpoint [_] "/dev/md0")
(fs-type [_] "xfs")
(fs-bytes-total [_])
(fs-bytes-used [_])
(fs-bytes-free [_])
(fs-percent-used [_])
(fs-percent-free [_])
)
| |
d430b3f4e60c047037247271d4ec66f95a61c4d532d705533203c80d21df3a59 | greglook/solanum | tcp.clj | (ns solanum.source.tcp
"Metrics source that checks the availability of a local TCP port."
(:require
[solanum.source.core :as source])
(:import
(java.net
InetSocketAddress
Socket
SocketTimeoutException)))
# # Measurements
(defn- test-port
"Test a TCP port by connecting to it. Retur... | null | https://raw.githubusercontent.com/greglook/solanum/5b0fed6cc897e691bb93aeb5d4bfea892b425d54/src/solanum/source/tcp.clj | clojure | (ns solanum.source.tcp
"Metrics source that checks the availability of a local TCP port."
(:require
[solanum.source.core :as source])
(:import
(java.net
InetSocketAddress
Socket
SocketTimeoutException)))
# # Measurements
(defn- test-port
"Test a TCP port by connecting to it. Retur... | |
3b27dbb20feec3993bfe25c22a8c317331f0f1baa283471c6fe17e014d807faa | qiuxiafei/zk-web | zk.clj | (ns zk-web.zk
(:import [com.netflix.curator.retry RetryNTimes]
[com.netflix.curator.framework CuratorFramework CuratorFrameworkFactory])
(:require [clj-time.format :as time-format]
[clj-time.coerce :as time-coerce])
(:refer-clojure :exclude [set get])
(:use zk-web.util))
(defn- mk-zk-cli... | null | https://raw.githubusercontent.com/qiuxiafei/zk-web/30399b0a6f540d5d45970cc14b897814912a6f0c/src/zk_web/zk.clj | clojure | memorize this function to save net connection | (ns zk-web.zk
(:import [com.netflix.curator.retry RetryNTimes]
[com.netflix.curator.framework CuratorFramework CuratorFrameworkFactory])
(:require [clj-time.format :as time-format]
[clj-time.coerce :as time-coerce])
(:refer-clojure :exclude [set get])
(:use zk-web.util))
(defn- mk-zk-cli... |
7b3ae3d753128af090752f6fa5dbb5edfada82c451e8baaa6a789749eb06ace5 | dmbarbour/awelon | Main.hs | # LANGUAGE PatternGuards , ViewPatterns , OverloadedStrings #
-- | The `ao` command line executable, with many utilities for
-- non-interactive programming.
module Main
( main
) where
import Control.Applicative
import Control.Monad
import Data.Monoid
import Data.Ratio
import qualified Data.Map as M
import q... | null | https://raw.githubusercontent.com/dmbarbour/awelon/af9124654dd9462cc4887dccf67b3e33302c7351/hsrc_ao/Main.hs | haskell | | The `ao` command line executable, with many utilities for
non-interactive programming.
stdout) \n\
todo: typechecking!
when persistence is working, perhaps add an AO_HOME or similar.
very simple command line processing
runMode ["jit",cmd] = printImperativeJIT cmd
runMode ["test.jit"] = runAOTests (ab... | # LANGUAGE PatternGuards , ViewPatterns , OverloadedStrings #
module Main
( main
) where
import Control.Applicative
import Control.Monad
import Data.Monoid
import Data.Ratio
import qualified Data.Map as M
import qualified Data.Text as T
import qualified Data.List as L
import qualified Data.Sequence as S
imp... |
7300cabf716a52f851250410e531e8385118aaaa18e4d45b82f4b050531647ef | ekmett/algebra | Commutative.hs | # LANGUAGE MultiParamTypeClasses , UndecidableInstances , FlexibleInstances , TypeOperators #
module Numeric.Algebra.Commutative
( Commutative
, CommutativeAlgebra
, CocommutativeCoalgebra
, CommutativeBialgebra
) where
import Data.Int
import Data.IntSet (IntSet)
import Data.IntMap (IntMap)
import Data.Set ... | null | https://raw.githubusercontent.com/ekmett/algebra/12dd33e848f406dd53d19b69b4f14c93ba6e352b/src/Numeric/Algebra/Commutative.hs | haskell | | A commutative multiplicative semigroup
instance (Commutative r
, Monoidal r
, Semiring r
) => CommutativeAlgebra r (Map a b)
instance ( Commutative r
, Monoidal r
, Semiring r | # LANGUAGE MultiParamTypeClasses , UndecidableInstances , FlexibleInstances , TypeOperators #
module Numeric.Algebra.Commutative
( Commutative
, CommutativeAlgebra
, CocommutativeCoalgebra
, CommutativeBialgebra
) where
import Data.Int
import Data.IntSet (IntSet)
import Data.IntMap (IntMap)
import Data.Set ... |
23372acebfe95667c350725b6967e802d276ac3affef5206865300baa8d2bf5c | ocaml-ppx/ppx | exposed_sexp.ml | type t = Stdppx.Sexp.t =
| Atom of string
| List of t list
| null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/src/exposed_sexp.ml | ocaml | type t = Stdppx.Sexp.t =
| Atom of string
| List of t list
| |
0c6e43c4e70c550490ebd057af1d03fcb2d6a32e5c4eb1ede69ca78bc43c726f | SamB/coq | printmod.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/parsing/printmod.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
must be with let because streams ar... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Util
open Name... |
0570a97af9a619010bb4d1b7973350bd4a4b77af9e0002d8c7e16e97db57e79a | zack-bitcoin/amoveo-mining-pool | config.erl | -module(config).
-compile(export_all).
mode() -> production.
%mode() -> test.
full_node() ->
case mode() of
test ->
":3011/";%useful for testing by connecting to `make multi-quick` mode in the amoveo full node.
production ->
":8081/"
end.
external() ->
X = full_node(),
Y = lists:reverse(... | null | https://raw.githubusercontent.com/zack-bitcoin/amoveo-mining-pool/fd39d6812e0bc9bdd613aec0e82c3c3907df23c5/apps/amoveo_mining_pool/src/config.erl | erlang | mode() -> test.
useful for testing by connecting to `make multi-quick` mode in the amoveo full node.
64139933.%100227592.
for every block , we pay out 2^share_block_ratio many rewards .
rewards are smoothed out over the last rt()+1 blocks.
when you shut off the pool, it pays out to everyone who has more than this much... | -module(config).
-compile(export_all).
mode() -> production.
full_node() ->
case mode() of
test ->
production ->
":8081/"
end.
external() ->
X = full_node(),
Y = lists:reverse(X),
Z = [hd("/")|[hd("0")|tl(tl(Y))]],
lists:reverse(Z).
this is the portion of the block reward that goes to... |
9d3c81b109a564b90446fad56a21913e273275dbe3da66f5c5938b6880f7ceba | robrix/sequoia | Quantification.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE QuantifiedConstraints #
# LANGUAGE UndecidableInstances #
module Sequoia.Connective.Quantification
( -- * Adjunction
leftAdjunct
, rightAdjunct
-- * Quantified constraints
, type (==>)
-- * Connectives
, module Sequoia.Connective.Exists
, module Sequoia.Connective.ForAl... | null | https://raw.githubusercontent.com/robrix/sequoia/2851088bc763e6c8bad99152ab94b2cf7bf7c580/src/Sequoia/Connective/Quantification.hs | haskell | # LANGUAGE ConstraintKinds #
* Adjunction
* Quantified constraints
* Connectives
Quantified constraints | # LANGUAGE QuantifiedConstraints #
# LANGUAGE UndecidableInstances #
module Sequoia.Connective.Quantification
leftAdjunct
, rightAdjunct
, type (==>)
, module Sequoia.Connective.Exists
, module Sequoia.Connective.ForAll
) where
import Data.Kind (Constraint)
import Sequoia.Connective.Exists
import Sequoia.Connective.... |
d4951beae3a6bf0b4b153f69ab6b9774c6ed84344ed18f7133daa44b97b2d1fc | softwarelanguageslab/maf | R5RS_scp1_counter-4.scm | ; Changes:
* removed : 1
* added : 0
* swaps : 0
; * negated predicates: 0
; * swapped branches: 0
; * calls to id fun: 0
(letrec ((result ())
(output (lambda (i)
(set! result (cons i result))))
(count1 (lambda (x)
(if (= 0 x)
(display ... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_counter-4.scm | scheme | Changes:
* negated predicates: 0
* swapped branches: 0
* calls to id fun: 0 | * removed : 1
* added : 0
* swaps : 0
(letrec ((result ())
(output (lambda (i)
(set! result (cons i result))))
(count1 (lambda (x)
(if (= 0 x)
(display x)
(begin
(<change>
... |
14100ef310ae39661b5747e4cf8de07f76a96d715dbd4195cf83ad54562f2e5a | TrustInSoft/tis-kernel | LogicAssigns.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/LogicAssigns.ml | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
56c90b3834a2c0ac259a8fa50af1efa1997ee48fe0a11913cb4525782b591a36 | penpot/penpot | helpers.clj | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.srepl.helpers
"A main namespace for server repl."
#_:clj-kondo/ignore
(:require
[app.auth :r... | null | https://raw.githubusercontent.com/penpot/penpot/42e97f8be105af41757f8e896b93a99032a2b72a/backend/src/app/srepl/helpers.clj | clojure |
Copyright (c) KALEIDOS INC | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.srepl.helpers
"A main namespace for server repl."
#_:clj-kondo/ignore
(:require
[app.auth :refer [derive-password]]
[app.c... |
7c2bf5abee59c29c8bba4cfcb5be3aa7a317aa4caa05973a5bf078de2c288f1f | isovector/dynahaskell | Typecheck.hs | # LANGUAGE TemplateHaskell #
module Sem.Typecheck where
import Types
import Polysemy
import GHC
import HIE.Bios
import Printers
data Typecheck m a where
Typecheck :: Source -> Typecheck m (Maybe TypecheckedModule)
makeSem ''Typecheck
runTypechecker
:: Members '[Embed Ghc, Embed IO] r
=> Sem (Typecheck ... | null | https://raw.githubusercontent.com/isovector/dynahaskell/50819888fa118e123f45d98d3d135e611f4b0c35/src/Sem/Typecheck.hs | haskell | # LANGUAGE TemplateHaskell #
module Sem.Typecheck where
import Types
import Polysemy
import GHC
import HIE.Bios
import Printers
data Typecheck m a where
Typecheck :: Source -> Typecheck m (Maybe TypecheckedModule)
makeSem ''Typecheck
runTypechecker
:: Members '[Embed Ghc, Embed IO] r
=> Sem (Typecheck ... | |
a9482ce5eb1bea0d75903220ab8983beb1353f98057a1d132c65f54deed91a64 | metaocaml/ber-metaocaml | mod_use.ml | TEST
files = " mod.ml "
* expect
files = "mod.ml"
* expect
*)
#mod_use "mod.ml"
[%%expect {|
module Mod : sig val answer : int end
|}];;
| null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/tool-toplevel/mod_use.ml | ocaml | TEST
files = " mod.ml "
* expect
files = "mod.ml"
* expect
*)
#mod_use "mod.ml"
[%%expect {|
module Mod : sig val answer : int end
|}];;
| |
35876f1ba1fb3439377d7576c8cca9432a9210507b4c8a19d126d1f062fb067d | 2600hz/kazoo | webhooks_channel_answer.erl | %%%-----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz
%%%
%%%
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%%
%%% @end
%%%---------... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/applications/webhooks/src/modules/webhooks_channel_answer.erl | erlang | -----------------------------------------------------------------------------
@end
----------------------------------------------------------------------------- | ( C ) 2010 - 2020 , 2600Hz
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(webhooks_channel_answer).
-export([init/0
,bindings_and_responders/0
]).
-include("webho... |
fd579145eb8f33eb9d45768693de48e6e5051c0c845d5aeb3532d0442b40422e | killy971/hpc-coveralls | HpcCoverallsCmdLine.hs | {-# LANGUAGE DeriveDataTypeable #-}
module HpcCoverallsCmdLine where
import Data.List
import Data.Version (Version(..))
import Paths_hpc_coveralls (version)
import System.Console.CmdArgs
import Trace.Hpc.Coveralls.Types
data HpcCoverallsArgs = CmdMain
{ optExcludeDirs :: [String]
, argTestSuites :: [Str... | null | https://raw.githubusercontent.com/killy971/hpc-coveralls/04fe42c4533b3244e9fa1c2772aa5e30baf5eef0/src/HpcCoverallsCmdLine.hs | haskell | # LANGUAGE DeriveDataTypeable # |
module HpcCoverallsCmdLine where
import Data.List
import Data.Version (Version(..))
import Paths_hpc_coveralls (version)
import System.Console.CmdArgs
import Trace.Hpc.Coveralls.Types
data HpcCoverallsArgs = CmdMain
{ optExcludeDirs :: [String]
, argTestSuites :: [String]
, optCabalFile :: Maybe... |
a1735c094d12b2c1a5cb93a4a34d889770fc89035b5acc819c90b089405e3116 | gcv/appengine-magic | core_google.clj | (in-ns 'appengine-magic.core)
(import '[java.io File FileInputStream BufferedInputStream])
(defn appengine-base-url [& {:keys [https?] :or {https? false}}]
(when (= :dev-appserver (appengine-environment-type))
(throw (RuntimeException.
"appengine-magic.core/appengine-base-url not supported in dev-a... | null | https://raw.githubusercontent.com/gcv/appengine-magic/facc9fe4945b3becd772d6b053844e572dcc1c73/src/appengine_magic/core_google.clj | clojure | (in-ns 'appengine-magic.core)
(import '[java.io File FileInputStream BufferedInputStream])
(defn appengine-base-url [& {:keys [https?] :or {https? false}}]
(when (= :dev-appserver (appengine-environment-type))
(throw (RuntimeException.
"appengine-magic.core/appengine-base-url not supported in dev-a... | |
44ef29f929ab44d8b075099c033c61023ed616275149461abfcbff1b0b2695a2 | fccm/glMLite | accanti.ml | Copyright ( c ) , 1994 .
( c ) Copyright 1993 , Silicon Graphics , Inc.
* ALL RIGHTS RESERVED
* Permission to use , copy , modify , and distribute this software for
* any purpose and without fee is hereby granted , provided that the above
* copyright notice appear in all copies and that both the cop... | null | https://raw.githubusercontent.com/fccm/glMLite/c52cd806909581e49d9b660195576c8a932f6d33/RedBook-Samples/accanti.ml | ocaml | accanti.ml
Escape | Copyright ( c ) , 1994 .
( c ) Copyright 1993 , Silicon Graphics , Inc.
* ALL RIGHTS RESERVED
* Permission to use , copy , modify , and distribute this software for
* any purpose and without fee is hereby granted , provided that the above
* copyright notice appear in all copies and that both the cop... |
b1d06f76473c099de0b128f4037dd7da6d9c5c4ef18f4184c8124be84065c1d0 | gar1t/modlib | proxy_http.erl | -module(proxy_http).
-include("webapp.hrl").
-include("httpd.hrl").
-export([start/1, request/3]).
start(Port) ->
application:start(inets),
modlib:start([{port, Port}, {modules, [?MODULE]}]).
request(_, "/favicon.ico", _) ->
{not_found, "Not Found"};
request(_Method, _Path, Mod) ->
handle_request(Mo... | null | https://raw.githubusercontent.com/gar1t/modlib/e1e0b2aa160a760964a0508283146af81800d098/examples/proxy_http.erl | erlang | -module(proxy_http).
-include("webapp.hrl").
-include("httpd.hrl").
-export([start/1, request/3]).
start(Port) ->
application:start(inets),
modlib:start([{port, Port}, {modules, [?MODULE]}]).
request(_, "/favicon.ico", _) ->
{not_found, "Not Found"};
request(_Method, _Path, Mod) ->
handle_request(Mo... | |
7ed3d74fb57c0dd4998b2a2fa6b2a50acedcb41807b4c45255c7a19feab0ee9e | albertoruiz/easyVision | warp.hs | # LANGUAGE TemplateHaskell , RecordWildCards #
import Vision.GUI
import Image.Processing
import Numeric.LinearAlgebra ((<>))
import Vision(ht,desp,scaling,kgen)
import Util.Rotation
import Util.Misc(degree)
autoParam "CGParam" "cg-"
[ ("pan", "Double", realParam (0) (-40) (40))
, ("dx", "Double", realP... | null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/examples/warp.hs | haskell | # LANGUAGE TemplateHaskell , RecordWildCards #
import Vision.GUI
import Image.Processing
import Numeric.LinearAlgebra ((<>))
import Vision(ht,desp,scaling,kgen)
import Util.Rotation
import Util.Misc(degree)
autoParam "CGParam" "cg-"
[ ("pan", "Double", realParam (0) (-40) (40))
, ("dx", "Double", realP... | |
25164488ec9fa987042323f9d876c7508112cafc1e39bc2334ce913767127c4e | malcolmreynolds/GSLL | roots-one.lisp | One - dimensional root solver .
Time - stamp : < 2009 - 04 - 04 22:27:16EDT roots-one.lisp >
$ Id$
(in-package :gsl)
/usr / include / gsl / gsl_roots.h
;;;;****************************************************************************
;;;; Initialization
;;;;************************************************... | null | https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/solve-minimize-fit/roots-one.lisp | lisp | ****************************************************************************
Initialization
****************************************************************************
****************************************************************************
Iteration
**************************************************************... | One - dimensional root solver .
Time - stamp : < 2009 - 04 - 04 22:27:16EDT roots-one.lisp >
$ Id$
(in-package :gsl)
/usr / include / gsl / gsl_roots.h
(defmobject one-dimensional-root-solver-f "gsl_root_fsolver"
((type :pointer))
"one-dimensional root solver with function only"
:initialize-suffix... |
9f60a00e6f4b6f2319086b53e91d8d4df44cbe564d89d992dd6347d69e05cada | fission-codes/cli | Main.hs | module Main (main) where
import Fission.Prelude
import qualified RIO.Partial as Partial
import Network.HTTP.Client as HTTP
import Network.HTTP.Client.TLS as HTTP
import Servant.Client
import Fission.Environment
import Fission.Internal.App (isDebugEnable... | null | https://raw.githubusercontent.com/fission-codes/cli/dc3500babad35a6cb44835fa503d27d672cbcdb3/app/Main.hs | haskell | module Main (main) where
import Fission.Prelude
import qualified RIO.Partial as Partial
import Network.HTTP.Client as HTTP
import Network.HTTP.Client.TLS as HTTP
import Servant.Client
import Fission.Environment
import Fission.Internal.App (isDebugEnable... | |
37b7a5116b8b06c5ee93de03694934a04c26ff72671af93e59116481b7b648a5 | brendanhay/terrafomo | Types.hs | -- This module was auto-generated. If it is modified, it will not be overwritten.
-- |
-- Module : Terrafomo.Ignition.Types
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
-- Stability : auto-generated
Portability : non - portable (... | null | https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-ignition/src/Terrafomo/Ignition/Types.hs | haskell | This module was auto-generated. If it is modified, it will not be overwritten.
|
Module : Terrafomo.Ignition.Types
Stability : auto-generated
import Formatting (Format, (%)) |
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
Portability : non - portable ( GHC extensions )
module Terrafomo.Ignition.Types where
import Data . Text ( Text )
import Terrafomo
import Terrafomo . Ignition . Lens
import qualif... |
f80057a49c0ba90e09f4691db593f37f4db43aa23fdf28e058896f6d6db7b292 | erlang/rebar3 | rebar_resource_v2.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% ex: ts=4 sw=4 et
-module(rebar_resource_v2).
-export([new/3,
find_resource_state/2,
format_source/1,
lock/2,
download/3,
needs_update/2,
make_vsn/3,
format_error/1]).
-export_type([resour... | null | https://raw.githubusercontent.com/erlang/rebar3/048412ed4593e19097f4fa91747593aac6706afb/apps/rebar/src/rebar_resource_v2.erl | erlang | ex: ts=4 sw=4 et | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
-module(rebar_resource_v2).
-export([new/3,
find_resource_state/2,
format_source/1,
lock/2,
download/3,
needs_update/2,
make_vsn/3,
format_error/1]).
-export_type([resource/0,
... |
29ec6a2cadec6b28ada048adb8ec41a8fdfa8b00d4b8b572aa533363aefe6a85 | themattchan/advent-of-code | Zipper.hs | module Zipper where
newtype Zipper a = Zipper ([a], a, [a]) deriving Show
zipLeft :: Int -> Zipper a -> Maybe (Zipper a)
zipLeft 0 z = Just z
zipLeft n (Zipper ([],_,_)) = Nothing
zipLeft n (Zipper (l:ls,e,rs)) = zipLeft (n-1) (Zipper (ls, l, e:rs))
zipRight :: Int -> Zipper a -> Maybe (Zipper a)
zipRight 0 z = Just... | null | https://raw.githubusercontent.com/themattchan/advent-of-code/0b08a4fbadf7e713d40044523af3debb7d0cb6b9/Zipper.hs | haskell | module Zipper where
newtype Zipper a = Zipper ([a], a, [a]) deriving Show
zipLeft :: Int -> Zipper a -> Maybe (Zipper a)
zipLeft 0 z = Just z
zipLeft n (Zipper ([],_,_)) = Nothing
zipLeft n (Zipper (l:ls,e,rs)) = zipLeft (n-1) (Zipper (ls, l, e:rs))
zipRight :: Int -> Zipper a -> Maybe (Zipper a)
zipRight 0 z = Just... | |
d03f6df9c0f94b589ad2b0619f8d0ec4eab34eb7b9afe527a508692e2c7b606a | baskeboler/cljs-karaoke-client | playlists.cljs | (ns cljs-karaoke.events.playlists
(:require [re-frame.core :as rf :include-macros true]
[cljs-karaoke.playlists :as pl]
[cljs-karaoke.protocols :as protocols]
;; [cljs-karaoke.events :as events]
;; [cljs-karaoke.events.songs :as song-events]
[day8.re-frame.t... | null | https://raw.githubusercontent.com/baskeboler/cljs-karaoke-client/bb6512435eaa436d35034886be99213625847ee0/src/main/cljs_karaoke/events/playlists.cljs | clojure | [cljs-karaoke.events :as events]
[cljs-karaoke.events.songs :as song-events]
:dispatch [::set-current-playlist-song]})) | (ns cljs-karaoke.events.playlists
(:require [re-frame.core :as rf :include-macros true]
[cljs-karaoke.playlists :as pl]
[cljs-karaoke.protocols :as protocols]
[day8.re-frame.tracing :refer-macros [fn-traced]]))
(rf/reg-event-fx
::playlist-load
(fn-traced
[{:keys [db]} _]
{:d... |
21295f27eae581e1509f01aff64c47cc1f4c1fa15f1e865d680319b4d7243b6f | dgtized/shimmers | unwinding.cljs | (ns shimmers.sketches.unwinding
(:require
[quil.core :as q :include-macros true]
[quil.middleware :as m]
[shimmers.common.framerate :as framerate]
[shimmers.sketch :as sketch :include-macros true]
[shimmers.common.quil :as cq]
[shimmers.math.equations :as eq]
[thi.ng.geom.vector :as gv]
[thi.n... | null | https://raw.githubusercontent.com/dgtized/shimmers/ce42c63db4f7fff4fedcfd695047653513e2747e/src/shimmers/sketches/unwinding.cljs | clojure | (ns shimmers.sketches.unwinding
(:require
[quil.core :as q :include-macros true]
[quil.middleware :as m]
[shimmers.common.framerate :as framerate]
[shimmers.sketch :as sketch :include-macros true]
[shimmers.common.quil :as cq]
[shimmers.math.equations :as eq]
[thi.ng.geom.vector :as gv]
[thi.n... | |
fbcef92b0c3caed91fcf046d2a35dd9da4ca50e36adea7ca120dfc15b67bf3bc | cartazio/tlaps | p_parser.mli |
* concept.mli --- conceptualizing
*
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* concept.mli --- conceptualizing
*
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
type supp = Emit | Suppress
val usebody : P_t.usable Tla_parser.lprs
val proof : P_t.proof Tla_p... | null | https://raw.githubusercontent.com/cartazio/tlaps/562a34c066b636da7b921ae30fc5eacf83608280/src/proof/p_parser.mli | ocaml |
* concept.mli --- conceptualizing
*
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* concept.mli --- conceptualizing
*
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
type supp = Emit | Suppress
val usebody : P_t.usable Tla_parser.lprs
val proof : P_t.proof Tla_p... | |
0439300c0fd2301748123f512663f8ff6d897f2911fe7ed7b0bbc115689eea54 | projectcs13/sensor-cloud | triggers_lib_tests.erl | @author < >
%% [www.csproj13.student.it.uu.se]
%% @version 1.0
[ Copyright information ]
%%
%% @doc == triggers_lib_tests ==
%% This module contains several tests to test the functionallity
%% in the module triggers_lib.
%%
%% @end
-module(triggers_lib_tests).
-include_lib("eunit/include/eunit.hrl").
-include_... | null | https://raw.githubusercontent.com/projectcs13/sensor-cloud/0302bd74b2e62fddbd832fb4c7a27b9c62852b90/test/triggers_lib_tests.erl | erlang | [www.csproj13.student.it.uu.se]
@version 1.0
@doc == triggers_lib_tests ==
This module contains several tests to test the functionallity
in the module triggers_lib.
@end
@doc
Function: less_than_test/0
Purpose: Used test the less_than function
Returns: ok | {error, term()}
@end
@doc
Function: greater_th... | @author < >
[ Copyright information ]
-module(triggers_lib_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("amqp_client.hrl").
-export([]).
-spec less_than_test() -> ok | {error, term()}.
less_than_test() ->
Data = [{"1","{\"value\":5}"},{"2","{\"value\":7}"},{"3","{\"value\":9}"},{"4","{\"va... |
3345f24e31a01e0143df5a3b323ebbc3f76803e13ca3f187936f6a58b8303f38 | tarantool/jepsen.tarantool | register.clj | (ns tarantool.register
"Run register tests."
(:require [clojure.tools.logging :refer [info warn]]
[clojure.string :as str]
[jepsen [cli :as cli]
[client :as client]
[checker :as checker]
[core :as jepsen]
[contro... | null | https://raw.githubusercontent.com/tarantool/jepsen.tarantool/4bc6a97c5755ed57790b85959b59d0614ba93916/src/tarantool/register.clj | clojure | wait for leader election and joining to a cluster | (ns tarantool.register
"Run register tests."
(:require [clojure.tools.logging :refer [info warn]]
[clojure.string :as str]
[jepsen [cli :as cli]
[client :as client]
[checker :as checker]
[core :as jepsen]
[contro... |
044ddacbe6f5224ce748e408db43a579afdbceae2656a5cd3d8944bf6c514235 | chiroptical/thinking-with-types | Lib.hs | module Lib where
import Data.Word (Word8)
import Test.QuickCheck
-- Cardinality
-- ---
-- Given a data constructor, the amount of inhabitants
-- Syntax: |{data constuctor}| = {inhabitants}
--
|Void| = 0
data Void
|Unit| = 1
data Unit = Void
|Bool'| = 2
data Bool' = True' | False'
... | null | https://raw.githubusercontent.com/chiroptical/thinking-with-types/781f90f1b08eb94ef3600c5b7da92dfaf9ea4285/Chapter1/exercises/src/Lib.hs | haskell | Cardinality
---
Given a data constructor, the amount of inhabitants
Syntax: |{data constuctor}| = {inhabitants}
---
are isomorphic, we can define the `to` and `from` functions
Syntax: $s \cong t$
Laws:
to . from = id
from . to = id
Bool and Spin are isomorphic
Sum Types,
the cardinality is the sum of ... | module Lib where
import Data.Word (Word8)
import Test.QuickCheck
|Void| = 0
data Void
|Unit| = 1
data Unit = Void
|Bool'| = 2
data Bool' = True' | False'
Isomorphic
Any two data constructors with the same cardinality
to :: s -> t
to = undefined
from :: t -> s
from = undefined... |
9db713f94d4f333d9cab54ec2c7f54c91a394894760ed2ed354b8a165b9f45e2 | haskell/cabal | PackageEnvironment.hs | # LANGUAGE DeriveGeneric #
-----------------------------------------------------------------------------
-- |
Module : Distribution . Client . . PackageEnvironment
-- Maintainer :
-- Portability : portable
--
Utilities for working with the package environment file . Patterned after
-- Distribution.Cli... | null | https://raw.githubusercontent.com/haskell/cabal/9f7dc559d682331515692dd7b42f9abd3a087898/cabal-install/src/Distribution/Client/Sandbox/PackageEnvironment.hs | haskell | ---------------------------------------------------------------------------
|
Maintainer :
Portability : portable
Distribution.Client.Config.
---------------------------------------------------------------------------
* Configuration saved in the package environment file
TODO: would be nice to remove dupli... | # LANGUAGE DeriveGeneric #
Module : Distribution . Client . . PackageEnvironment
Utilities for working with the package environment file . Patterned after
module Distribution.Client.Sandbox.PackageEnvironment (
PackageEnvironment(..)
, PackageEnvironmentType(..)
, classifyPackageEnvironment
, r... |
ee122b2c3334e8f14080287dd25478b5011b1bc6d4491bdd3a142193eab7bcee | mrossini-ethz/physical-quantities | conversion-test.lisp | (in-package :pq)
(define-test conversion-test ()
(check
;; Different prefix
(qtest #q(1 m -> km) :value 1/1000 :error 0 :unit '((|km| 1)))
;; Different prefix, different unit
(qtest #q(1 m / s -> km / h) :value 36/10 :error 0 :unit '((|km| 1) (|h| -1)))
Different prefix , power > 1
(qtest #q(1 ... | null | https://raw.githubusercontent.com/mrossini-ethz/physical-quantities/348827f0632eb5bd14b378dab4e47bb6e3102f70/test/conversion-test.lisp | lisp | Different prefix
Different prefix, different unit
Derived units
Special cases
Incompatible units | (in-package :pq)
(define-test conversion-test ()
(check
(qtest #q(1 m -> km) :value 1/1000 :error 0 :unit '((|km| 1)))
(qtest #q(1 m / s -> km / h) :value 36/10 :error 0 :unit '((|km| 1) (|h| -1)))
Different prefix , power > 1
(qtest #q(1 m ^ 3 -> cm ^ 3) :value 1000000 :error 0 :unit '((|cm| 3)))
Co... |
be425830de0da8863ad986b6ef5ca0c2b8be6446d531ccb2382d8170bc0a928e | acl2/acl2 | bv-array-read@useless-runes.lsp | (BV-ARRAY-READ)
(BV-ARRAY-READ-OF-TRUE-LIST-FIX
(28 4 (:REWRITE BVCHOP-IDENTITY))
(24 4 (:REWRITE BVCHOP-WITH-N-NEGATIVE))
(16 9 (:REWRITE DEFAULT-<-2))
(14 9 (:REWRITE DEFAULT-<-1))
(13 13 (:TYPE-PRESCRIPTION CEILING-OF-LG))
(10 4 (:REWRITE BVCHOP-WHEN-SIZE-IS-NOT-POSP))
(8 8 (:REWRITE INTEGERP-FROM-UNSIGNED-BY... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/bv-lists/.sys/bv-array-read%40useless-runes.lsp | lisp | (BV-ARRAY-READ)
(BV-ARRAY-READ-OF-TRUE-LIST-FIX
(28 4 (:REWRITE BVCHOP-IDENTITY))
(24 4 (:REWRITE BVCHOP-WITH-N-NEGATIVE))
(16 9 (:REWRITE DEFAULT-<-2))
(14 9 (:REWRITE DEFAULT-<-1))
(13 13 (:TYPE-PRESCRIPTION CEILING-OF-LG))
(10 4 (:REWRITE BVCHOP-WHEN-SIZE-IS-NOT-POSP))
(8 8 (:REWRITE INTEGERP-FROM-UNSIGNED-BY... | |
9c27967179705d8f8d40d5d8aed6ec17a6fd9a9dfd18537d8b824d925cbc4c5f | rtoy/ansi-cl-tests | labels.lsp | ;-*- Mode: Lisp -*-
Author :
Created : We d Oct 9 19:06:33 2002
;;;; Contains: Tests of LABELS
(in-package :cl-test)
(deftest labels.1
(labels ((%f () 1))
(%f))
1)
(deftest labels.2
(labels ((%f (x) x))
(%f 2))
2)
(deftest labels.3
(labels ((%f (&rest args) args))
(%f 'a 'b 'c... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/labels.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of LABELS
The optional arguments are not in the block defined by
the local function declaration
Keyword parameter initializers are not in the blocked defined
by the local function declaration
The aux parameters are not in the block defined by
the local function declaration
... | Author :
Created : We d Oct 9 19:06:33 2002
(in-package :cl-test)
(deftest labels.1
(labels ((%f () 1))
(%f))
1)
(deftest labels.2
(labels ((%f (x) x))
(%f 2))
2)
(deftest labels.3
(labels ((%f (&rest args) args))
(%f 'a 'b 'c))
(a b c))
(deftest labels.4
(block %f
(label... |
027685a789375311bae443b96c8a6c46676bc0246bc49b5a9dd501627d42d9dc | fdopen/ppx_cstubs | ppx_cstubs_custom.mli | This file is part of ppx_cstubs ( )
* Copyright ( c ) 2018 - 2019 fdopen
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version... | null | https://raw.githubusercontent.com/fdopen/ppx_cstubs/5d5ce9b7cf45d87bb71c046a76d30c17ec6075e5/src/custom/ppx_cstubs_custom.mli | ocaml | This file is part of ppx_cstubs ( )
* Copyright ( c ) 2018 - 2019 fdopen
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version... | |
1f4d307767eff1c1d05b1d9d3b027e915504d54e5cca7d1c3a5b9989403ba242 | opencog/pln | simple-implication-scope.scm | (ImplicationScope (stv 1 1)
(TypedVariable
(Variable "$X")
(Type "ConceptNode"))
(Evaluation
(Predicate "P")
(Variable "$X"))
(Evaluation
(Predicate "Q")
(Variable "$X")))
| null | https://raw.githubusercontent.com/opencog/pln/52dc099e21393892cf5529fef687a69682436b2d/tests/pln/rules/simple-implication-scope.scm | scheme | (ImplicationScope (stv 1 1)
(TypedVariable
(Variable "$X")
(Type "ConceptNode"))
(Evaluation
(Predicate "P")
(Variable "$X"))
(Evaluation
(Predicate "Q")
(Variable "$X")))
| |
05b37cba705567e275cc51753cd3771a80b36e286ebf393eb2ed119f3fc60b00 | Ericson2314/lighthouse | Internals.hs | # OPTIONS_GHC -cpp -fffi #
-----------------------------------------------------------------------------
-- |
-- Module : System.Process.Internals
Copyright : ( c ) The University of Glasgow 2004
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : expe... | null | https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/process/System/Process/Internals.hs | haskell | ---------------------------------------------------------------------------
|
Module : System.Process.Internals
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : portable
-------------------------------------------------------------... | # OPTIONS_GHC -cpp -fffi #
Copyright : ( c ) The University of Glasgow 2004
Operations for creating and interacting with sub - processes .
module System.Process.Internals (
#ifndef __HUGS__
ProcessHandle(..), ProcessHandle__(..),
PHANDLE, closePHANDLE, mkProcessHandle,
withProcessHandle, withProcessHandl... |
96c9141a16e5a73cf84a48b7975cd82d18e151f119e98715dd08e02586a7426c | jumarko/clojure-experiments | tennis_test.clj | (ns clojure-experiments.dojo-katas.tennis-test
(:require [clojure-experiments.dojo-katas.tennis :as tennis]
[clojure.test :refer [deftest is testing]]))
(defn new-game []
(tennis/make-game "P1" "P2"))
;;; TODO: fixture later
check -to-pass-a-value-from-a-fixture-to-a-test-with-clojure-test
( defn ... | null | https://raw.githubusercontent.com/jumarko/clojure-experiments/f0f9c091959e7f54c3fb13d0585a793ebb09e4f9/test/clojure_experiments/dojo_katas/tennis_test.clj | clojure | TODO: fixture later
)
(use-fixtures :each prepare-game-fixture)
TODO: This feels it should be easier (maybe `iterate` or `reduce`?) but it doesn't matter much after all
TODO Tests categories
player wins
advantage | (ns clojure-experiments.dojo-katas.tennis-test
(:require [clojure-experiments.dojo-katas.tennis :as tennis]
[clojure.test :refer [deftest is testing]]))
(defn new-game []
(tennis/make-game "P1" "P2"))
check -to-pass-a-value-from-a-fixture-to-a-test-with-clojure-test
( defn prepare - game - fixture... |
fa183e4ffd3f92d20ae8cece37cd3d03afee1ecf39eb76e154c499e1dbf1fb16 | winterland1989/mysql-haskell | TLS.hs | |
Module : Database . MySQL.Connection
Description : TLS support for mysql - haskell via @tls@ package .
Copyright : ( c ) Winterland , 2016
License : BSD
Maintainer :
Stability : experimental
Portability : PORTABLE
This module provides secure MySQL connection using ' tls ' package ... | null | https://raw.githubusercontent.com/winterland1989/mysql-haskell/d93caffe0991e1090a3854acff355ff0ea6075c7/Database/MySQL/TLS.hs | haskell | ------------------------------------------------------------------------------
| Provide a 'TLS.ClientParams' and a subject name to establish a TLS connection.
| |
Module : Database . MySQL.Connection
Description : TLS support for mysql - haskell via @tls@ package .
Copyright : ( c ) Winterland , 2016
License : BSD
Maintainer :
Stability : experimental
Portability : PORTABLE
This module provides secure MySQL connection using ' tls ' package ... |
4f980abebbfc5f52d1c01735ebc12c3d7b80cd7eb320acb63b054da1ae12ee8d | ZHaskell/stdio | ExtraSpec.hs | # LANGUAGE TypeApplications #
# LANGUAGE ScopedTypeVariables #
module Std.Data.Vector.ExtraSpec where
import qualified Data.List as List
import Data.Word
import qualified Std.Data.Vector as V
import qualified Std.Data.Vector.Base as V
import qualified Std.Data.Vector.Extra as ... | null | https://raw.githubusercontent.com/ZHaskell/stdio/7887b9413dc9feb957ddcbea96184f904cf37c12/std-data/test/Std/Data/Vector/ExtraSpec.hs | haskell | # LANGUAGE TypeApplications #
# LANGUAGE ScopedTypeVariables #
module Std.Data.Vector.ExtraSpec where
import qualified Data.List as List
import Data.Word
import qualified Std.Data.Vector as V
import qualified Std.Data.Vector.Base as V
import qualified Std.Data.Vector.Extra as ... | |
0df599ac7dd0d52b3c8bafa1a1ceb2391fb20ef5c1f14c58c3da81892f083e15 | haskell-waargonaut/waargonaut | Bench.hs | module Main where
import qualified Waargbench
main :: IO ()
main = Waargbench.main
| null | https://raw.githubusercontent.com/haskell-waargonaut/waargonaut/ba1dbbc170c2279749ea29bc8aaf375bdb659ad2/waargbench/bench/Bench.hs | haskell | module Main where
import qualified Waargbench
main :: IO ()
main = Waargbench.main
| |
70a765de3191399fc8a233ef4fec2498ce15d8a4c67aa4d00743d7b1c9262e06 | MyDataFlow/ttalk-server | ets_statem.erl | Copyright 2010 - 2011 < > ,
< >
and < >
%%%
This file is part of PropEr .
%%%
%%% PropEr 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 o... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/proper/examples/ets_statem.erl | erlang |
PropEr is free software: you can redistribute it and/or modify
(at your option) any later version.
PropEr 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
GNU General Public License fo... | Copyright 2010 - 2011 < > ,
< >
and < >
This file is part of PropEr .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Pub... |
657663bf7f71eedbc5679d33b157191154b17da35ec5095167763467331d54f8 | Dasudian/DSDIN | wormhole_close_solo_tx.erl |
-module(wormhole_close_solo_tx).
-include("channel_txs.hrl").
-behavior(aetx).
%% Behavior API
-export([new/1,
type/0,
fee/1,
ttl/1,
nonce/1,
origin/1,
check/5,
process/5,
accounts/1,
signers/2,
serialization_template/1,
... | null | https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/wormhole/src/wormhole_close_solo_tx.erl | erlang | Behavior API
===================================================================
Types
===================================================================
===================================================================
Behaviour API
===================================================================
swagger sch... |
-module(wormhole_close_solo_tx).
-include("channel_txs.hrl").
-behavior(aetx).
-export([new/1,
type/0,
fee/1,
ttl/1,
nonce/1,
origin/1,
check/5,
process/5,
accounts/1,
signers/2,
serialization_template/1,
serialize/1,... |
d89a11ce9f966e1cce8eb490e75bd9ba94aa41257ec64e358e27a14984b7e395 | jiangpengnju/htdp2e | ex188.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex188) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decima... | null | https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/arbitrarily-large-data/composing-functions/ex188.rkt | racket | about the language level of this file in a form that our tools can easily process.
Design a program that sorts lists of game players by score:
(make-gp String Number)
- '()
sorts list of game players by score, descendingly.
insert gp into the score descendingly ordered list of game players l | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex188) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define-struct gp [name score])
A GamePlayer is a structu... |
880ff15fe503ade9ed36f59ce2977dcab3c7ee35169eca580e8ce80ca904e151 | ktakashi/sagittarius-scheme | queue.scm | -*- mode : scheme ; coding : utf-8 -*-
;;;
;;; queue.scm - Queue utilities
;;;
Copyright ( c ) 2010 - 2014 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistribu... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/0c8a04f60adefd7ed6ba089704fb4c4581e26e28/sitelib/util/queue.scm | scheme | coding : utf-8 -*-
queue.scm - Queue utilities
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 ... | Copyright ( c ) 2010 - 2014 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
API names are taken from Gauche and slib
(... |
ef236e2e7c62912af52d21937c516fd4ea12142198b97749c48990a64609cd22 | gdamore/tree-sitter-d | with.scm | ================================================================================
With statement
================================================================================
unittest { with (x) x++; }
--------------------------------------------------------------------------------
(source_file
(unittest_declarati... | null | https://raw.githubusercontent.com/gdamore/tree-sitter-d/601c4a1e8310fb2f3c43fa8a923d0d27497f3c04/test/corpus/with.scm | scheme | }
} | ================================================================================
With statement
================================================================================
--------------------------------------------------------------------------------
(source_file
(unittest_declaration
(unittest)
(bloc... |
a7ceacfb003f1b60d2164d5c978f7cbe2e0b006c7060793fefc40151a67929d6 | kupl/LearnML | patch.ml | exception Error of string
type lambda = V of string | P of (string * lambda) | C of (lambda * lambda)
let rec __s3 (__s4 : lambda) : string list =
match __s4 with
| V __s5 -> [ __s5 ]
| P (__s6, __s7) ->
List.filter (fun (__s8 : string) -> not (__s6 = __s8)) (__s3 __s7)
| C (__s9, __s10) -> __s3 __s9 @ ... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/lambda/sub6/patch.ml | ocaml | exception Error of string
type lambda = V of string | P of (string * lambda) | C of (lambda * lambda)
let rec __s3 (__s4 : lambda) : string list =
match __s4 with
| V __s5 -> [ __s5 ]
| P (__s6, __s7) ->
List.filter (fun (__s8 : string) -> not (__s6 = __s8)) (__s3 __s7)
| C (__s9, __s10) -> __s3 __s9 @ ... | |
1c11151535a5069cc82a3c3ad0b5914a313c26dc808d5c4b08d09118e0e86c99 | kelamg/HtDP2e-workthrough | ex416.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex416) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Intertwined-Data/ex416.rkt | racket | about the language level of this file in a form that our tools can easily process.
Number -> N
find the integer such that b underflows
Number -> N
find the integer such that b overflows
Number [N -> N] Number -> N
N -> N | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex416) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define base #i10.0)
(check-expect
(= (expt base (ad... |
264f7b2e87f382e623923fa04ebc2347a1bda79452dc962047e1cd3a61039f42 | ldmberman/HoneyBadgerBFT | RBCTest.hs | # LANGUAGE ScopedTypeVariables #
module RBCTest where
import Control.Monad.Catch (MonadMask, try)
import Control.Monad.State (runState)
import Data.ByteString.Char8 (pack)
import RBC (In (..), Out (..), RBCError (..),
... | null | https://raw.githubusercontent.com/ldmberman/HoneyBadgerBFT/73e6ee870cfe513a4e826abbc249848634869967/test/RBCTest.hs | haskell | # LANGUAGE ScopedTypeVariables #
module RBCTest where
import Control.Monad.Catch (MonadMask, try)
import Control.Monad.State (runState)
import Data.ByteString.Char8 (pack)
import RBC (In (..), Out (..), RBCError (..),
... | |
1db79a9fa1c8642c9466d129a0077199b1e2ed4663e3659545ba8a9e287f8742 | dialohq/grpc-proxy-sidecar | discover.ml | Lightweight thread library for
* Program discover
* Copyright ( C ) 2010
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation , with linking exceptions ;
* eith... | null | https://raw.githubusercontent.com/dialohq/grpc-proxy-sidecar/f63ed9f8ce1f6177c125db918f56176ea44d79f5/grpc_proxy_sidecar.esy.lock/opam/conf-libev.4-12/files/discover.ml | ocaml | Keep that in sync with the list in myocamlbuild.ml
+-----------------------------------------------------------------+
| Test codes |
+-----------------------------------------------------------------+
+-----------------------------------------------------... | Lightweight thread library for
* Program discover
* Copyright ( C ) 2010
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation , with linking exceptions ;
* eith... |
a8007d3a1fa21dd6e61767b12fbe0c98015b793e18dc519811d774bbad953d20 | drym-org/qi | expander.rkt | #lang racket/base
(provide expand-flow)
(define (expand-flow stx)
stx)
| null | https://raw.githubusercontent.com/drym-org/qi/a8bd930eda09e07b8f44fd2e7100b7be96d446ea/qi-lib/flow/expander.rkt | racket | #lang racket/base
(provide expand-flow)
(define (expand-flow stx)
stx)
| |
23db986a7ff309710be6c5f504d4882e08b3fe11e9f7ebec75afc6663e3dd31e | vikram/lisplibraries | xml-parser.lisp | -*- package : NOX ; Syntax : Common - lisp ; Base : 10 -*-
;;;
xml-parser.lisp
;;;
;;;
;;; --------------------------------------------------------------------------------------
;;;
;;; The contents of this file are subject to the NOKOS License Version 1.0a (the
;;; "License"); you may not use this file excep... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/wilbur/nox/xml-parser.lisp | lisp | Syntax : Common - lisp ; Base : 10 -*-
--------------------------------------------------------------------------------------
The contents of this file are subject to the NOKOS License Version 1.0a (the
"License"); you may not use this file except in compliance with the License.
WARRANTY OF ANY KIND, e... |
xml-parser.lisp
Software distributed under the License is distributed on an " AS IS " basis , WITHOUT
The Original Software is
WILBUR2 : Nokia Semantic Web Toolkit for CLOS
Copyright ( c ) 2001 - 2005 Nokia and others . All Rights Reserved .
Portions Copyright ( c ) 1989 - 1992 . All Rights ... |
e2239b123fdbc49e485c7ee110d7b0102e3acd5908a1b73211707c4758ba38c2 | mikera/core.matrix | implementations.cljc | (ns clojure.core.matrix.implementations
"Namespace for management of core.matrix implementations. Users should avoid using these
functions directly as they are intended for library and tool writers."
(:require [clojure.core.matrix.protocols :as mp]
[clojure.core.matrix.macros #?(:clj :refer :cljs :re... | null | https://raw.githubusercontent.com/mikera/core.matrix/0a35f6e3d6d2335cb56f6f3e5744bfa1dd0390aa/src/main/clojure/clojure/core/matrix/implementations.cljc | clojure | =====================================================
Implementation utilities
Tools to support the registration / manangement of clojure.core.matrix implementations
TODO: use current implementation? | (ns clojure.core.matrix.implementations
"Namespace for management of core.matrix implementations. Users should avoid using these
functions directly as they are intended for library and tool writers."
(:require [clojure.core.matrix.protocols :as mp]
[clojure.core.matrix.macros #?(:clj :refer :cljs :re... |
55216803a81927214c69241320c81be32bcd80919cd4923190cb9d66317dde34 | input-output-hk/plutus | Common.hs | -- editorconfig-checker-disable-file
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ViewPatterns #-}
{- | Miscellaneous shared code for benchmarking-related things. -}
module PlutusBenchmark.Common
( module Export
, Term
, getConfig
... | null | https://raw.githubusercontent.com/input-output-hk/plutus/e470420424cc8c8fb9eb140702b39c6dfeb6a443/plutus-benchmark/common/PlutusBenchmark/Common.hs | haskell | editorconfig-checker-disable-file
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE ViewPatterns #
| Miscellaneous shared code for benchmarking-related things.
Include number of iterations in HTML report
| Just extract the body of a program wrapped in a 'CompiledCodeIn'. We use this a ... | # LANGUAGE FlexibleContexts #
module PlutusBenchmark.Common
( module Export
, Term
, getConfig
, toAnonDeBruijnTerm
, toNamedDeBruijnTerm
, compiledCodeToTerm
, haskellValueToTerm
, benchTermCek
, runTermCek
, cekResultMatchesHaskellValue
)
where
import Paths_plutus_benc... |
24aafb0a0f9711a05983b85d3723087bd097ad118a3607e811def57aec57404a | racket/typed-racket | callcc.rkt | #lang typed/racket
(: tag (Prompt-Tagof Integer (Integer -> Integer)))
(define tag (make-continuation-prompt-tag))
(define cc : (Option (-> Integer Nothing)) #f)
(call-with-continuation-prompt
(λ ()
(+ 1
(call-with-current-continuation
(λ ([k : (Integer -> Nothing)])
(set! cc k)
(k... | null | https://raw.githubusercontent.com/racket/typed-racket/0236151e3b95d6d39276353cb5005197843e16e4/typed-racket-test/succeed/callcc.rkt | racket | #lang typed/racket
(: tag (Prompt-Tagof Integer (Integer -> Integer)))
(define tag (make-continuation-prompt-tag))
(define cc : (Option (-> Integer Nothing)) #f)
(call-with-continuation-prompt
(λ ()
(+ 1
(call-with-current-continuation
(λ ([k : (Integer -> Nothing)])
(set! cc k)
(k... | |
26f51a97a0f74630e75a147938bbbed478376a934ef43841be15973e1374ebdf | distrap/lambdadrive | ADCTest.hs |
module Main where
import Ivory.Tower.Config
import Ivory.OS.FreeRTOS.Tower.STM32
import LDrive.Platforms
import LDrive.Tests.ADC (app)
main :: IO ()
main = compileTowerSTM32FreeRTOS testplatform_stm32 p $
app (stm32config_clock . testplatform_stm32)
testplatform_adc1
testplatform_pwm... | null | https://raw.githubusercontent.com/distrap/lambdadrive/2bbf6b173fbc1c6d1f809ee4f95ec0bf737d7064/test/ADCTest.hs | haskell |
module Main where
import Ivory.Tower.Config
import Ivory.OS.FreeRTOS.Tower.STM32
import LDrive.Platforms
import LDrive.Tests.ADC (app)
main :: IO ()
main = compileTowerSTM32FreeRTOS testplatform_stm32 p $
app (stm32config_clock . testplatform_stm32)
testplatform_adc1
testplatform_pwm... | |
713cb622a18d03d98fe30445c01e74d4a08803b6a44efc711e0caeb35131f0a4 | theHamsta/petalisp-cuda | package.lisp | (defpackage petalisp-cuda.custom-op
(:use :cl
:petalisp
:petalisp.ir
:petalisp.core)
(:import-from :petalisp.ir
:dendrite-cons
:ensure-cluster
:cluster-dendrites
:dendrite-depth
:dendrite
:copy-de... | null | https://raw.githubusercontent.com/theHamsta/petalisp-cuda/12b9ee426e14edf492d862d5bd2dbec18ec427c6/src/custom-op/package.lisp | lisp | (defpackage petalisp-cuda.custom-op
(:use :cl
:petalisp
:petalisp.ir
:petalisp.core)
(:import-from :petalisp.ir
:dendrite-cons
:ensure-cluster
:cluster-dendrites
:dendrite-depth
:dendrite
:copy-de... | |
1e83a4eb30c8dfc5768e3b1207bae54677d0afaac068a3b774e9d75c96b0dcf4 | bgusach/exercises-htdp2e | ex-267.rkt | #lang htdp/isl
(require test-engine/racket-tests)
# # # Constants
(define $->€ 1.22)
# # # Functions
; [List-of Number] -> [List-of Number]
; Converts a list of dollars into a list of euros
(check-within
(convert-to-euro '(0 1 5))
(list 0 $->€ (* 5 $->€))
0.01
)
(define (convert-to-euro lo$)
(map dol... | null | https://raw.githubusercontent.com/bgusach/exercises-htdp2e/c4fd33f28fb0427862a2777a1fde8bf6432a7690/3-abstraction/ex-267.rkt | racket | [List-of Number] -> [List-of Number]
Converts a list of dollars into a list of euros
Number -> Number
Converts an amount of dollars to an amount of euros NOTE: I think the
exercise wanted that this is a local defined within convert-to-euro but
it makes more sense if it is at top-level
[List-of Number] -> [List-o... | #lang htdp/isl
(require test-engine/racket-tests)
# # # Constants
(define $->€ 1.22)
# # # Functions
(check-within
(convert-to-euro '(0 1 5))
(list 0 $->€ (* 5 $->€))
0.01
)
(define (convert-to-euro lo$)
(map dollar->euro lo$)
)
(check-expect (dollar->euro 1) $->€)
(define (dollar->euro amount)
... |
df8b959e9e8d2247719039ceb73ef0f2cc48ff4ded9548eb8520e401338be665 | 8c6794b6/haskell-sc-scratch | Pinger.hs | ------------------------------------------------------------------------------
example from rd .
--
module Pinger where
import Sound.SC3
import Sound.OpenSoundControl
import Control.Monad (when)
import System.Environment (getArgs)
import Control.Concurrent (forkIO, threadDelay)
| Pause current thread for the in... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/RD/Pinger.hs | haskell | ----------------------------------------------------------------------------
| example from rd .
module Pinger where
import Sound.SC3
import Sound.OpenSoundControl
import Control.Monad (when)
import System.Environment (getArgs)
import Control.Concurrent (forkIO, threadDelay)
| Pause current thread for the indicated duration , given in seconds .
sleep :: Double -> IO ()
sleep n = when (n >... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.