_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
3d70f8c84f7138cee1f7a4e4216b48b5d5a8d777e25d0da1618d9c6f188f11e3
fdopen/uwt
t_fs.mli
val l: OUnitTest.test val file_to_bytes: string -> bytes Lwt.t val with_file: mode:Uwt.Fs.uv_open_flag list -> string -> (Uwt.file -> 'a Lwt.t) -> 'a Lwt.t
null
https://raw.githubusercontent.com/fdopen/uwt/44276aa6755b92eddc9ad58662a968afad243e8b/test/t_fs.mli
ocaml
val l: OUnitTest.test val file_to_bytes: string -> bytes Lwt.t val with_file: mode:Uwt.Fs.uv_open_flag list -> string -> (Uwt.file -> 'a Lwt.t) -> 'a Lwt.t
e5d1b317df1cd4a1252a4219436029a776583632a547693e851562e41358c2cf
agentm/project-m36
FSType.hs
# LANGUAGE CPP # confirm that the filesystem type is a journaled FS type expected by Project : M36 use statfs on Linux and macOS and GetVolumeInformation on Windows -- this could still be fooled with symlinks or by disabling journaling on filesystems that support that module ProjectM36.FSType where #if defined(min...
null
https://raw.githubusercontent.com/agentm/project-m36/57a75b35e84bebf0945db6dae53350fda83f24b6/src/lib/ProjectM36/FSType.hs
haskell
this could still be fooled with symlinks or by disabling journaling on filesystems that support that ANSI MAX_PATH- we only care about the drive name anyway get the drive path of the incoming path Linux cannot report journaling, so we just check the filesystem type as a proxy EXT3+4 REISERFS XFS JFS
# LANGUAGE CPP # confirm that the filesystem type is a journaled FS type expected by Project : M36 use statfs on Linux and macOS and GetVolumeInformation on Windows module ProjectM36.FSType where #if defined(mingw32_HOST_OS) # if defined(i386_HOST_ARCH) # define WINDOWS_CCONV stdcall # elif defined(x86_64_HOST_AR...
a2e96b949cff42ec12194d91894097533a3327a6e760f27ad9970b8a32c59c91
yzhs/ocamlllvm
format.mli
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/yzhs/ocamlllvm/45cbf449d81f2ef9d234968e49a4305aaa39ace2/src/stdlib/format.mli
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with $ Id$ * Pretty printing . Thi...
50f3ff3ed0369422df988cfa7b1509869195ef77292cbe21b287b385dc44a581
andersfugmann/ppx_protocol_conv
unittest.ml
module type Test_module = sig module Make : functor (Driver : Testable.Driver) -> sig val unittest: unit Alcotest.test end end let verbose = false module Make(Driver : Testable.Driver) = struct let test_modules : (module Test_module) list = [ (module Test_arrays); (module Test_driver); ...
null
https://raw.githubusercontent.com/andersfugmann/ppx_protocol_conv/e93eb01ca8ba8c7dd734070316cd281a199dee0d/test/unittest.ml
ocaml
Create a list of tests
module type Test_module = sig module Make : functor (Driver : Testable.Driver) -> sig val unittest: unit Alcotest.test end end let verbose = false module Make(Driver : Testable.Driver) = struct let test_modules : (module Test_module) list = [ (module Test_arrays); (module Test_driver); ...
75980ff76a63e3013ffbc34733663f035bb4f32de0458e2f654703caf7819adc
cyga/real-world-haskell
tempfile.7.hs
-- file: ch07/tempfile.7.hs -- This extension enables us to tell the compiler about the types in -- lambda expresions # LANGUAGE ScopedTypeVariables # import System.IO import System.Directory(getTemporaryDirectory, removeFile) catch is removed from system . IO.Error in ghc > 7 -- see #no1 import System . IO.Error(cat...
null
https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch07/tempfile.7.hs
haskell
file: ch07/tempfile.7.hs This extension enables us to tell the compiler about the types in lambda expresions see #no1 The main entry point. Work with a temp file in myAction. The guts of the program. Called with the path and handle of a temporary file. When this function exits, that file will be closed and ...
# LANGUAGE ScopedTypeVariables # import System.IO import System.Directory(getTemporaryDirectory, removeFile) catch is removed from system . IO.Error in ghc > 7 import System . IO.Error(catch ) import Control.Exception(IOException,catch,finally) main :: IO () main = withTempFile "mytemp.txt" myAction myAction :: Fil...
31ce3317f40afe69c81a4986c1b380df27b4b8f54f9c5f1fad87b8ead877ff66
euhmeuh/rilouworld
database.rkt
#lang racket/base (provide sprite-ref make-database) (require racket/class racket/function pkg/lib anaphoric mode-lambda/static rilouworld/private/utils/log rilouworld/private/utils/struct (prefix-in quest: rilouworld/quest)) (define (sprite-ref name index) (string->symbol (format "~a/~a" name ...
null
https://raw.githubusercontent.com/euhmeuh/rilouworld/184dea6c187f4f94da6616b89ec15cc8ba6bb786/private/core/database.rkt
racket
#lang racket/base (provide sprite-ref make-database) (require racket/class racket/function pkg/lib anaphoric mode-lambda/static rilouworld/private/utils/log rilouworld/private/utils/struct (prefix-in quest: rilouworld/quest)) (define (sprite-ref name index) (string->symbol (format "~a/~a" name ...
368d11d1b464da0a1cb374f3ad11ef977221ccc05fa0970f92ac8c25c310b7f6
modular-macros/ocaml-macros
unused_types.ml
module Unused : sig end = struct type unused = int end ;; module Unused_nonrec : sig end = struct type nonrec used = int type nonrec unused = used end ;; module Unused_rec : sig end = struct type unused = A of unused end ;; module Unused_exception : sig end = struct exception Nobody_uses_me end ;; module ...
null
https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/typing-warnings/unused_types.ml
ocaml
module Unused : sig end = struct type unused = int end ;; module Unused_nonrec : sig end = struct type nonrec used = int type nonrec unused = used end ;; module Unused_rec : sig end = struct type unused = A of unused end ;; module Unused_exception : sig end = struct exception Nobody_uses_me end ;; module ...
0ec8a6d804834c62a42c82ae16c46b493e8d5612b62f76d9a16b084480d22ac3
rowangithub/DOrder
up-nested.ml
let rec loopa i j n = if ( j <= n ) then // tmpl("le(i , j , k , n ) " ) ; // i = 0 ; // k = 0 ; // i = 0; // k = 0;*) if ( i >= 0) then while ( i < n ) { // tmpl("le(i , j , k , n ) " ) ; assert ( k>=i ) ; i++ ; ; } while( i < n ...
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/folprograms/invgen/up-nested.ml
ocaml
j = 0; while( j < n ) { // tmpl("le(i,j,k,n)"); assert(k>0); j++; k--; }
let rec loopa i j n = if ( j <= n ) then // tmpl("le(i , j , k , n ) " ) ; // i = 0 ; // k = 0 ; // i = 0; // k = 0;*) if ( i >= 0) then while ( i < n ) { // tmpl("le(i , j , k , n ) " ) ; assert ( k>=i ) ; i++ ; ; } while( i < n ...
38356e789b71dee08e5a4a72de12e2d95ded2c86e3825cad21596a70e0702644
jackfirth/lens
string.rkt
#lang racket/base (require racket/contract/base) (provide (contract-out [string-ref-lens (-> exact-nonnegative-integer? (lens/c immutable-string? char?))] [string-pick-lens (->* [] #:rest (listof exact-nonnegative-integer?) (lens/c immutable-stri...
null
https://raw.githubusercontent.com/jackfirth/lens/733db7744921409b69ddc78ae5b23ffaa6b91e37/lens-data/lens/private/string/string.rkt
racket
#lang racket/base (require racket/contract/base) (provide (contract-out [string-ref-lens (-> exact-nonnegative-integer? (lens/c immutable-string? char?))] [string-pick-lens (->* [] #:rest (listof exact-nonnegative-integer?) (lens/c immutable-stri...
ef19ac3a3e5b93996f5fa4d0dbb44ad7961b8b1b1a48446269a5f8ec7662ffa6
ferd/sups
sups_worker_sup.erl
-module(sups_worker_sup). -export([start_link/0, init/1]). -behaviour(supervisor). start_link() -> supervisor:start_link(?MODULE, []). init([]) -> {ok, {#{strategy => one_for_one, intensity => 5, period => 10}, [#{id => worker1, start => {sups_worker, start_link, []}, restart =...
null
https://raw.githubusercontent.com/ferd/sups/8f365c3b3079a3e52a15ffe13ac70621e2c31e38/src/sups_worker_sup.erl
erlang
-module(sups_worker_sup). -export([start_link/0, init/1]). -behaviour(supervisor). start_link() -> supervisor:start_link(?MODULE, []). init([]) -> {ok, {#{strategy => one_for_one, intensity => 5, period => 10}, [#{id => worker1, start => {sups_worker, start_link, []}, restart =...
b80c822ce3f5e78de52896b5c004174f08798864e4b85de511260f735ef5771b
marigold-dev/mankavar
naive.ml
module type REDUCER = sig type t type msg val reduce : msg -> t -> t end module Message = struct module A = struct type t = | Add_i of int | Add_b end module B = struct type t = int end module AB = struct type t = A of A.t | B of B.t end end module type B_FOR_A = sig type t ...
null
https://raw.githubusercontent.com/marigold-dev/mankavar/31ef2cc7dbdaa6646e4aa07915d10b38a7470d10/experiments/state_management/naive.ml
ocaml
module type REDUCER = sig type t type msg val reduce : msg -> t -> t end module Message = struct module A = struct type t = | Add_i of int | Add_b end module B = struct type t = int end module AB = struct type t = A of A.t | B of B.t end end module type B_FOR_A = sig type t ...
1e22deee1ba10e80503e26f215c2762103fe2fce5c2410f96018ef84261d3d20
screenshotbot/screenshotbot-oss
package.lisp
;; Copyright 2018-Present Modern Interpreters 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 /. #+nil (defpackage :screenshotbot-sdk (:export #:main))
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/0577066b0b5613cd41899dc38b36c41501048c72/src/screenshotbot/sdk/package.lisp
lisp
Copyright 2018-Present Modern Interpreters 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 /. #+nil (defpackage :screenshotbot-sdk (:export #:main))
6c4d6972c906a6065c0128066011c55fe339721e6ba8504e674a117001458235
wilbowma/cur
defs.rkt
#lang racket (require scribble/base) (provide todo omit title* section* subsubsub*section*) ;; TODO: made this disable-able in main.scrbl via parameters or ;; something (define (todo . x) (void) ( apply margin - note * " TODO : " x ) ) (define-syntax (omit syn) #'(void)) (define (first-word x) (first (string-...
null
https://raw.githubusercontent.com/wilbowma/cur/e039c98941b3d272c6e462387df22846e10b0128/cur-paper/defs.rkt
racket
TODO: made this disable-able in main.scrbl via parameters or something (apply elem #:style "SSubSubSubSection" x)
#lang racket (require scribble/base) (provide todo omit title* section* subsubsub*section*) (define (todo . x) (void) ( apply margin - note * " TODO : " x ) ) (define-syntax (omit syn) #'(void)) (define (first-word x) (first (string-split (first x) #px"\\W"))) (define (title* . x) (apply title #:tag (f...
7449618d64a8d02d4f974c06d022c1500368a919ad06e037bdaa103e333bd0f6
dorchard/effect-monad
State.hs
# LANGUAGE InstanceSigs # module Control.Effect.Parameterised.State where -- Bye Monads... as we know them import Prelude hiding (Monad(..)) import Control.Effect.Parameterised newtype State s1 s2 a = State { runState :: s1 -> (a, s2) } State parameterised monad -- ... just like the instance PMonad State where ...
null
https://raw.githubusercontent.com/dorchard/effect-monad/5750ef8438f750e528002a0a4e255514cbf3150a/src/Control/Effect/Parameterised/State.hs
haskell
Bye Monads... as we know them ... just like the
# LANGUAGE InstanceSigs # module Control.Effect.Parameterised.State where import Prelude hiding (Monad(..)) import Control.Effect.Parameterised newtype State s1 s2 a = State { runState :: s1 -> (a, s2) } State parameterised monad instance PMonad State where return :: a -> State s s a return x = State (\s -> (...
edb6586e5dc749ee5d78c75765c41d6b38eb66ce163fe98736f03c4aebadff7c
isavita/category-theory-for-programmers-with-erlang
ch4.erl
-module(ch4). -compile(export_all). Explicite logger example negate_with_log(X, Log) -> {not X, Log ++ "Not so!"}. % Aggregated logger between function calls negate_with_agg_log(X) -> {not X, "Not so!"}. to_upper_case(String) -> string:to_upper(String). to_words(Sentence) -> Words = lists:foldl( ...
null
https://raw.githubusercontent.com/isavita/category-theory-for-programmers-with-erlang/4ffa11dd9ffc77e6a909ccf36e19bdfd5af117ce/ch4.erl
erlang
Aggregated logger between function calls
-module(ch4). -compile(export_all). Explicite logger example negate_with_log(X, Log) -> {not X, Log ++ "Not so!"}. negate_with_agg_log(X) -> {not X, "Not so!"}. to_upper_case(String) -> string:to_upper(String). to_words(Sentence) -> Words = lists:foldl( fun(Splitter, Words) -> lis...
22450aa3257f4232af41a91f323c9fdbb01ab494a98f72730e7a06f536ac9936
esl/MongooseIM
mongoose_graphql_roster_user_mutation.erl
-module(mongoose_graphql_roster_user_mutation). -behaviour(mongoose_graphql). -export([execute/4]). -ignore_xref([execute/4]). -import(mongoose_graphql_helper, [make_error/2, format_result/2, null_to_default/2]). execute(Ctx, _Obj, <<"addContact">>, Args) -> add_contact(Ctx, Args); execute(Ctx, _Obj, <<"addCont...
null
https://raw.githubusercontent.com/esl/MongooseIM/891f7ab9ca5e7b41be5da9550152fec1590b0b22/src/graphql/user/mongoose_graphql_roster_user_mutation.erl
erlang
-module(mongoose_graphql_roster_user_mutation). -behaviour(mongoose_graphql). -export([execute/4]). -ignore_xref([execute/4]). -import(mongoose_graphql_helper, [make_error/2, format_result/2, null_to_default/2]). execute(Ctx, _Obj, <<"addContact">>, Args) -> add_contact(Ctx, Args); execute(Ctx, _Obj, <<"addCont...
84909c169580d26c901c7710b986b2194c4a2c7960cff68dbe3a2351de2bfbc6
dhess/sicp-solutions
ex2.46.scm
(define (make-vect x y) (cons x y)) (define (xcor-vect v) (car v)) (define (ycor-vect v) (cdr v)) (define (add-vect v1 v2) (make-vect (+ (xcor-vect v1) (xcor-vect v2)) (+ (ycor-vect v1) (ycor-vect v2)))) (define (scale-vect s v) (make-vect (* s (xcor-vect v)) ...
null
https://raw.githubusercontent.com/dhess/sicp-solutions/2cf78db98917e9cb1252efda76fddc8e45fe4140/chap2/ex2.46.scm
scheme
(define (make-vect x y) (cons x y)) (define (xcor-vect v) (car v)) (define (ycor-vect v) (cdr v)) (define (add-vect v1 v2) (make-vect (+ (xcor-vect v1) (xcor-vect v2)) (+ (ycor-vect v1) (ycor-vect v2)))) (define (scale-vect s v) (make-vect (* s (xcor-vect v)) ...
ce2eca0afb334551a51dbf4b8496bdf186a56eaf85ce2c76e3a2ef297e773a60
mzp/coq-ruby
csymtable.mli
open Names open Term open Pre_env val val_of_constr : env -> constr -> values val set_opaque_const : constant -> unit val set_transparent_const : constant -> unit
null
https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/kernel/csymtable.mli
ocaml
open Names open Term open Pre_env val val_of_constr : env -> constr -> values val set_opaque_const : constant -> unit val set_transparent_const : constant -> unit
33010bc7aee38e9f828645bb3bd2d8b2c8562cdc3cf3e86c6365c1780051132c
maxlapshin/fix
fix_proxy_client.erl
-module(fix_proxy_client). -include("../include/business.hrl"). -include("../include/fix.hrl"). -export([run/2]). run(Exchange, Symbol) -> {ok, Pid} = fix_connection:start_link(self(), fix:get_value(fix_proxy)), fix_connection:logon(Pid), fix_connection:subscribe(Pid, Exchange, Symbol), loop(Pid). loop(Pi...
null
https://raw.githubusercontent.com/maxlapshin/fix/4b5208c7c11528fe477954f48152a1922cf17630/src/fix_proxy_client.erl
erlang
-module(fix_proxy_client). -include("../include/business.hrl"). -include("../include/fix.hrl"). -export([run/2]). run(Exchange, Symbol) -> {ok, Pid} = fix_connection:start_link(self(), fix:get_value(fix_proxy)), fix_connection:logon(Pid), fix_connection:subscribe(Pid, Exchange, Symbol), loop(Pid). loop(Pi...
adf94e44afb58334ae097bae8e0c546e8f69d5f43ab0f726e2b933a7704e2539
ucsd-progsys/dsolve
outcometree.mli
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet Crista...
null
https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/typing/outcometree.mli
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 2001 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 . $ I d : outcometree.mli , v 1.15 2006/04/05 ...
2079355ed5087e4b9f358e5de4761eb332bb00a3f1386fbc01e6fc8a8ec00caa
glv2/cl-monero-tools
mnemonic.lisp
;;;; This file is part of monero-tools Copyright 2016 - 2017 Distributed under the GNU GPL v3 or later . ;;;; See the file LICENSE for terms of use and distribution. (in-package :monero-tools-tests) (def-suite mnemonic-tests :description "Unit tests for mnemonic seed functions." :in monero-tools-tests) ...
null
https://raw.githubusercontent.com/glv2/cl-monero-tools/ab972ac3a7c5489cf23e3bdaa5d390d5cff1732b/tests/mnemonic.lisp
lisp
This file is part of monero-tools See the file LICENSE for terms of use and distribution.
Copyright 2016 - 2017 Distributed under the GNU GPL v3 or later . (in-package :monero-tools-tests) (def-suite mnemonic-tests :description "Unit tests for mnemonic seed functions." :in monero-tools-tests) (in-suite mnemonic-tests) (test secret-key->mnemonic-seed (flet ((secret-key->mnemonic-seed/hex (...
a003093a3f15b69bfbeea5af0b1701641adaa4f013f90e384326a61755834e2c
jakemcc/sicp-study
1.15.clj
Exercise 1.15 ;(ns exercise1.15) (defn cube [x] (* x x x)) (defn p [x] (- (* 3 x) (* 4 (cube x)))) (defn abs [x] (if (< x 0) (- x) x)) (defn sine [angle] (if (not (> (abs angle) 0.1)) angle (p (sine (/ angle 3.0))))) a ) How many times is p called when ( sine 12.15 ) is evaluated ? ( sine 1...
null
https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section1.2/1.15.clj
clojure
(ns exercise1.15) b) What is the order of growth in space and number of steps when (sine a) is evaluated
Exercise 1.15 (defn cube [x] (* x x x)) (defn p [x] (- (* 3 x) (* 4 (cube x)))) (defn abs [x] (if (< x 0) (- x) x)) (defn sine [angle] (if (not (> (abs angle) 0.1)) angle (p (sine (/ angle 3.0))))) a ) How many times is p called when ( sine 12.15 ) is evaluated ? ( sine 12.15 ) 5 times ...
1e943cfd3f2bdf931e4cca0507df4ffd37959577fab229b0a0de9a151518be5a
scverif/scverif
glob_option.ml
Copyright 2019 - Inria , NXP SPDX - License - Identifier : BSD-3 - Clause - Clear WITH modifications let v_silent = 0 let v_normal = 1 (* normal printing *) let v_normal_debug = 2 (* normal printing with extra info i.e full *) let v_full = 3 (* full printing *) let full = ref false let set_ful...
null
https://raw.githubusercontent.com/scverif/scverif/307a17b61a2286fb7009d434825f9245caebfddc/src/glob_option.ml
ocaml
normal printing normal printing with extra info i.e full full printing
Copyright 2019 - Inria , NXP SPDX - License - Identifier : BSD-3 - Clause - Clear WITH modifications let v_silent = 0 let full = ref false let set_full b = full := b let verbose = ref v_silent let set_verbose lvl = verbose := lvl; set_full (v_normal_debug <= lvl); Maskverif.Util.set_verbose lvl let if_...
d130325b80e500acde367dc584666e5fa97ceadb8dac061c9f26ce43a35a5497
hjcapple/reading-sicp
huffman.scm
P109 - [ 2.3.4 实例 : 编码树 ] (define (make-leaf symbol weight) (list 'leaf symbol weight)) (define (leaf? object) (eq? (car object) 'leaf)) (define (symbol-leaf x) (cadr x)) (define (weight-leaf x) (caddr x)) (define (make-code-tree left right) (list left right (append (symbol left) (symb...
null
https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_5/exercise_5_51/test_code/huffman.scm
scheme
'(A D A B B C A)
P109 - [ 2.3.4 实例 : 编码树 ] (define (make-leaf symbol weight) (list 'leaf symbol weight)) (define (leaf? object) (eq? (car object) 'leaf)) (define (symbol-leaf x) (cadr x)) (define (weight-leaf x) (caddr x)) (define (make-code-tree left right) (list left right (append (symbol left) (symb...
ecc2def313bc73d774505cde872e4601cb0c69f877747ebce732309e2bc04d5e
waldheinz/bling
Spectrum.hs
# LANGUAGE TypeFamilies # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE BangPatterns #-} module Graphics.Bling.Spectrum ( Spectrum, WeightedSpectrum(..), ImageSample, Contribution, white, black, -- * Spectrum conversions rgbToSpectrumRefl, rgbToSpectrumIllum, unGamma, -- * Working with SPDs Spd,...
null
https://raw.githubusercontent.com/waldheinz/bling/1f338f4b8dbd6a2708cb10787f4a2ac55f66d5a8/src/lib/Graphics/Bling/Spectrum.hs
haskell
# LANGUAGE BangPatterns # * Spectrum conversions * Working with SPDs | the number of spectral bands we use for a spectrum ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ | a "black" @Spectrum@ (no transmitt...
# LANGUAGE TypeFamilies # # LANGUAGE MultiParamTypeClasses # module Graphics.Bling.Spectrum ( Spectrum, WeightedSpectrum(..), ImageSample, Contribution, white, black, rgbToSpectrumRefl, rgbToSpectrumIllum, unGamma, Spd, mkSpd, mkSpd', mkSpdFunc, fromCIExy, spdToXYZ, evalSpd, isBlack, sNaN, sInfinite...
74a7d4fc7803727f89dee84aff84671db568d59245b0afbe3ae16eaa5d540e55
goldfirere/thesis
Basics.hs
Copyright ( c ) 2016 -} # LANGUAGE TypeOperators , TypeFamilies , TypeApplications , ExplicitForAll , ScopedTypeVariables , GADTs , , TypeInType , ConstraintKinds , UndecidableInstances , FlexibleInstances , MultiParamTypeClasses , FunctionalDependencies , ...
null
https://raw.githubusercontent.com/goldfirere/thesis/22f066bc26b1147530525aabb3df686416b3e4aa/defense/Basics.hs
haskell
----------------------------- Heterogeneous propositional equality Type-level inequality append type-level lists (schemas) handle inequality well. Shorter name for shorter example ----------------------------- Unlike in the singletons paper, we now have injective type families, so we use that to model singletons...
Copyright ( c ) 2016 -} # LANGUAGE TypeOperators , TypeFamilies , TypeApplications , ExplicitForAll , ScopedTypeVariables , GADTs , , TypeInType , ConstraintKinds , UndecidableInstances , FlexibleInstances , MultiParamTypeClasses , FunctionalDependencies , ...
263846eb427042e72d0830f4d3ea75ca4d963d7bd641b439790041c0b1a08074
rd--/hsc3
trigAvg.help.hs
-- trigAvg let x = mouseX kr 0 1000 Linear 0.2 b = mouseButton kr 0 1 0.2 n = X.trigAvg kr (roundTo x 100) b in sinOsc ar n 0 * 0.1 -- trigAvg let n = X.trigAvg kr (sinOsc ar 0.1 0) (impulse kr 0.2 0) in sinOsc ar 220 0 * n * 0.25
null
https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/trigAvg.help.hs
haskell
trigAvg trigAvg
let x = mouseX kr 0 1000 Linear 0.2 b = mouseButton kr 0 1 0.2 n = X.trigAvg kr (roundTo x 100) b in sinOsc ar n 0 * 0.1 let n = X.trigAvg kr (sinOsc ar 0.1 0) (impulse kr 0.2 0) in sinOsc ar 220 0 * n * 0.25
aab36d7ce0a8297c11c1b4289bba66db9319f4db9ec1ff6fd5a4b7a9c53ae55a
input-output-hk/cardano-base
RoundTrip.hs
# LANGUAGE NumDecimals # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # module Test.Cardano.Binary.RoundTrip ( tests ) where import Test.Cardano.Prelude ( eachOf, discoverRoundTrip ) import Data.Ratio ((%)) import Data.Fixed (E9, Fixed(..)) import Hedgehog (Property, Range, checkParallel) imp...
null
https://raw.githubusercontent.com/input-output-hk/cardano-base/7e64caa79e0f751f1333ccbce4a64cb48752ae69/cardano-binary/test/Test/Cardano/Binary/RoundTrip.hs
haskell
# LANGUAGE NumDecimals # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # module Test.Cardano.Binary.RoundTrip ( tests ) where import Test.Cardano.Prelude ( eachOf, discoverRoundTrip ) import Data.Ratio ((%)) import Data.Fixed (E9, Fixed(..)) import Hedgehog (Property, Range, checkParallel) imp...
0fe6c3aed7fb209232723358d868d003365a8ff70c7e4b9b742ce9a9cdc7a4bd
SquircleSpace/shcl
sequence.lisp
Copyright 2019 ;; 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 in writing, software distributed under the Li...
null
https://raw.githubusercontent.com/SquircleSpace/shcl/cc8d3c841b8b64b6715bf8f238fb19cd6093a793/core/sequence.lisp
lisp
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 language governing per...
Copyright 2019 distributed under the License is distributed on an " AS IS " BASIS , (defpackage :shcl/core/sequence (:use :common-lisp) (:import-from :shcl/core/utility #:required #:optimization-settings #:make-extensible-vector #:document #:define-documentation-type) (:import-from :bordeaux-threads ...
7ca3e705e35da5f6425c03fcabd52f323ca5adc358262dbefd15b6749357567c
MarcusPlieninger/HtDP_2e_solutions
HtDP_2e_Exercise_007.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-reader.ss" "lang")((modname HtDP_2e_Exercise_7) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib ...
null
https://raw.githubusercontent.com/MarcusPlieninger/HtDP_2e_solutions/1b25b01ee950034c43cc9a907c4eabae2b5e4dbc/HtDP_2e_Exercise_007.rkt
racket
about the language level of this file in a form that our tools can easily process. (define sunny #true) So in this particular case, the answer is #false. (Why?) A disjunction where both values are false evaluates to false. The reason for the negation is that whatever the boolean value of sunny is, its negation will de...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname HtDP_2e_Exercise_7) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decima...
8c48575740c6bc481b6a0e11d948d9ea481d0bb6122b6531ebffb952ce045100
monadfix/shower
Class.hs
{- | This module defines the representation of data that the parser produces and the pretty-printer consumes. -} module Shower.Class where -- | A tagless final encoding for a result builder (@ShowS@, @Doc@, @Html@, etc). -- -- Note that 'showerStringLit' and 'showerCharLit' take exact uninterpreted strings to avoi...
null
https://raw.githubusercontent.com/monadfix/shower/3e02d92e0500e41b4e9932294f4960463a7222d4/lib/Shower/Class.hs
haskell
| This module defines the representation of data that the parser produces and the pretty-printer consumes. | A tagless final encoding for a result builder (@ShowS@, @Doc@, @Html@, etc). Note that 'showerStringLit' and 'showerCharLit' take exact uninterpreted | A string literal, @"hello, (world)"@. | Variable n...
module Shower.Class where strings to avoid losing information ( e.g. @"\\n"@ vs. @"\\10"@ ) . class Shower a where | A record , @ { x = 24 , y = 42 } @ or @ { " a " : null , " b " : 13 } @. showerRecord :: [ShowerComma (a, ShowerFieldSep, a)] -> a | A list , @[1 , 2 , 3]@. showerList :: [ShowerComma a] -> a ...
4e09090042057da9a19d996db27934ba8104265d2db8793bdf3e66b9636f4029
ayakout/tcp_router
tcp_router.erl
-module(tcp_router). -export([start/2, stop/1]). -define(INITIAL_ROUTE, 10000). -define(ROUTER_PORT, 8001). -behaviour(application). -include("tcp_router.hrl"). Mnesia install -export([install/1]). start(normal, []) -> ets:new(tcp_app_routes, [public, named_table]), ets : new(tcp_route_backends , [ public ...
null
https://raw.githubusercontent.com/ayakout/tcp_router/57c23ca593890f8354ca958c87b7d0894f05601a/src/tcp_router.erl
erlang
@doc Install mnesia tables
-module(tcp_router). -export([start/2, stop/1]). -define(INITIAL_ROUTE, 10000). -define(ROUTER_PORT, 8001). -behaviour(application). -include("tcp_router.hrl"). Mnesia install -export([install/1]). start(normal, []) -> ets:new(tcp_app_routes, [public, named_table]), ets : new(tcp_route_backends , [ public ...
1eb4e5ef757b1e4be3083646567b75ef65fd9a6948f55bdf8a6ac548012d5136
wireapp/wire-server
BulkPush.hs
-- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License...
null
https://raw.githubusercontent.com/wireapp/wire-server/607d93e0cd6a7f312ab5bad071ad383068e896c5/libs/wire-api/src/Wire/API/Internal/BulkPush.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTI...
Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along module Wire.API.Internal.BulkPus...
76ff4b270b0745a6c50c4584b01c99d631c0736aedb15a9acea762680846da04
Lisp-Stat/special-functions
main.lisp
-*- Mode : LISP ; Base : 10 ; Syntax : ANSI - Common - Lisp ; Package : SPECIAL - FUNCTIONS - TESTS -*- Copyright ( c ) 2020 by Symbolics Pte . Ltd. All rights reserved . (in-package #:special-functions-tests) (def-suite all-tests :description "The master suite of all special functions tests.") (in-suite all-t...
null
https://raw.githubusercontent.com/Lisp-Stat/special-functions/ff284b69e83708ed5e1a0d20f421122f9bf64909/tests/main.lisp
lisp
Base : 10 ; Syntax : ANSI - Common - Lisp ; Package : SPECIAL - FUNCTIONS - TESTS -*- Fiveam get-float does not allow for ranges.
Copyright ( c ) 2020 by Symbolics Pte . Ltd. All rights reserved . (in-package #:special-functions-tests) (def-suite all-tests :description "The master suite of all special functions tests.") (in-suite all-tests) (defun gen-double (generator min max) "Return a generator producing doubles between min and max, ...
ff49b07759dc5d65187533fccad50a2da135779a0f6cda555e7e3a51700eaba5
amuletml/amulet
Diagnostic.hs
# LANGUAGE OverloadedStrings , DuplicateRecordFields , FlexibleContexts # | Provides helper methods for working with diagnostics , and converting Amulet 's error messages into diagnostics . Amulet's error messages into diagnostics. -} module AmuletLsp.Diagnostic (diagnosticOf) where import Control.Lens hiding (...
null
https://raw.githubusercontent.com/amuletml/amulet/fcba0b7e198b8d354e95722bbe118bccc8483f4e/bin/AmuletLsp/Diagnostic.hs
haskell
| Some type which can be converted to a diagnostic. | Construct a diagnostic of some error.
# LANGUAGE OverloadedStrings , DuplicateRecordFields , FlexibleContexts # | Provides helper methods for working with diagnostics , and converting Amulet 's error messages into diagnostics . Amulet's error messages into diagnostics. -} module AmuletLsp.Diagnostic (diagnosticOf) where import Control.Lens hiding (...
4ded295bcca4c21b6e6c75f34de53e14914f1697667e27a2c71bf85dfe40d60d
janestreet/merlin-jst
extensions.mli
open Parsetree type extension_expr = | Eexp_list_comprehension of expression * comprehension list | Eexp_arr_comprehension of expression * comprehension list and comprehension = { clauses: comprehension_clause list; guard : expression option } and comprehension_clause = [ ... for i = E2 to E3 ] ( flag =...
null
https://raw.githubusercontent.com/janestreet/merlin-jst/980b574405617fa0dfb0b79a84a66536b46cd71b/upstream/ocaml_flambda/parsing/extensions.mli
ocaml
[ ... for i in E3 ]
open Parsetree type extension_expr = | Eexp_list_comprehension of expression * comprehension list | Eexp_arr_comprehension of expression * comprehension list and comprehension = { clauses: comprehension_clause list; guard : expression option } and comprehension_clause = [ ... for i = E2 to E3 ] ( flag =...
b2039f985d640dda78aba1e85f83f34e8398b4eda0d3e0f6fd3a4626a6e151b6
ryanpbrewster/haskell
length.hs
len([])=0 len(f:r)=1+len(r) leng(l)=foldr (\x y->1+y) 0 l main=print(length([1..100000]))
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/hello-world/length.hs
haskell
len([])=0 len(f:r)=1+len(r) leng(l)=foldr (\x y->1+y) 0 l main=print(length([1..100000]))
189af21d14beed89b7c6c4052576d29ea95e173beef0782ffab08ec2ff2eed51
OCamlPro/ez_api
ezServer.dummy.ml
(**************************************************************************) (* *) (* Copyright 2018-2023 OCamlPro *) (* *) (* All righ...
null
https://raw.githubusercontent.com/OCamlPro/ez_api/5253f7dd8936e923290aa969ee43ebd3dc6fce2d/src/server/default/ezServer.dummy.ml
ocaml
************************************************************************ Copyright 2018-2023 OCamlPro All rights reserved. This ...
GNU Lesser General Public License version 2.1 , with the special let server ?catch:_ _ = Format.eprintf "Cohttp or Httpaf server implementation not availble\n\ Try: `opam install cohttp-lwt-unix`\n\ or: `opam install httpaf-lwt-unix`@."; Lwt.return_unit let set_debug () = ()
e47998ec4a46308b014dded69b3e2d1bdaaff8e940b99db38a2c258822078138
froggey/Mezzano
cons.lisp
;;;; Cons-related primitives (in-package :mezzano.compiler.backend.x86-64) (define-builtin mezzano.runtime::%car ((cons) result) (emit (make-instance 'x86-instruction :opcode 'lap:mov64 :operands (list result `(:car ,cons)) :inputs (list cons) ...
null
https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/compiler/backend/x86-64/cons.lisp
lisp
Cons-related primitives
(in-package :mezzano.compiler.backend.x86-64) (define-builtin mezzano.runtime::%car ((cons) result) (emit (make-instance 'x86-instruction :opcode 'lap:mov64 :operands (list result `(:car ,cons)) :inputs (list cons) :outputs ...
821f3f236be5cba3ce742b5ca47ade2c73c0c5adace92fe79c948ac7f2137376
c4-project/c4f
stub.ml
This file is part of c4f . Copyright ( c ) 2018 - 2022 C4 Project c4 t itself is licensed under the MIT License . See the LICENSE file in the project root for more information . Parts of c4 t are based on code from the Herdtools7 project ( ) : see the LICENSE.herd file in the project...
null
https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/delitmus/src/stub.ml
ocaml
* Produces a list of sorted, type-adjusted parameters from [vars]. These are the parameters of the inner call, and need to be filtered to produce the other parameter/argument lists.
This file is part of c4f . Copyright ( c ) 2018 - 2022 C4 Project c4 t itself is licensed under the MIT License . See the LICENSE file in the project root for more information . Parts of c4 t are based on code from the Herdtools7 project ( ) : see the LICENSE.herd file in the project...
b5fa3cc0cd01bd35c3eb3d5c7fb3ca970fde4d6b9e87b4b175709484d4cb415e
JAremko/spacetools
head_test.clj
(ns spacetools.spacedoc.org.head-test "Testing helpers for working with headers of documents." (:require [clojure.spec.alpha :as s] [clojure.string :as str] [clojure.test :refer :all] [clojure.test.check.clojure-test :refer [defspec]] [clojure.test.check.generators :a...
null
https://raw.githubusercontent.com/JAremko/spacetools/d047e99689918b5a4ad483022f35802b2015af5f/components/spacedoc/test/spacetools/spacedoc/org/head_test.clj
clojure
Test helpers Tests
(ns spacetools.spacedoc.org.head-test "Testing helpers for working with headers of documents." (:require [clojure.spec.alpha :as s] [clojure.string :as str] [clojure.test :refer :all] [clojure.test.check.clojure-test :refer [defspec]] [clojure.test.check.generators :a...
f541414d89387829f5e844cba660eb472cb8d039d38677605000f5837e9bf40f
input-output-hk/ouroboros-network
Split.hs
# LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # module Test.Util.Split ( spanLeft , spanLeft' , splitAtJust ) where import Data.Bifunctor (first) import Data.Word (Word64) {------------------------------------------------------------------------------- spanLeft ----...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/c82309f403e99d916a76bb4d96d6812fb0a9db81/ouroboros-consensus-test/src/Test/Util/Split.hs
haskell
------------------------------------------------------------------------------ spanLeft ------------------------------------------------------------------------------ INVARIANT The output data is a segmentation of the given list. ------------------------------------------------------------------------------ split...
# LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # module Test.Util.Split ( spanLeft , spanLeft' , splitAtJust ) where import Data.Bifunctor (first) import Data.Word (Word64) | The returned @b@ is the first in the list . spanLeft :: forall x a b. (x -> Either a...
1f7afbd61bbbbc658c0eff75bb4d975d56bd25ea18a40d7f30e82529169f035a
generateme/inferme
project.clj
(defproject generateme/inferme "0.0.2-SNAPSHOT" :description "MCMC based Bayesian inference toolkit" :url "" :license {:name "The Unlicense" :url ""} :scm {:name "git" :url "/"} :dependencies [[org.clojure/clojure "1.10.3"] [cljplot "0.0.2a-SNAPSHOT"]] :profiles {:dev ...
null
https://raw.githubusercontent.com/generateme/inferme/b6c65f0545d4c14531af6e93d8c2d015de3cec59/project.clj
clojure
(defproject generateme/inferme "0.0.2-SNAPSHOT" :description "MCMC based Bayesian inference toolkit" :url "" :license {:name "The Unlicense" :url ""} :scm {:name "git" :url "/"} :dependencies [[org.clojure/clojure "1.10.3"] [cljplot "0.0.2a-SNAPSHOT"]] :profiles {:dev ...
4388f63d7d9c8c6e47f0d49fb5d1b300e385d89bcbdb73f7b1c4c51af012998f
ucsd-progsys/liquidhaskell
ApplicativeList.hs
{-@ LIQUID "--expect-any-error" @-} {-@ LIQUID "--reflection" @-} module ApplicativeList where import Prelude hiding (fmap, id, seq, pure) -- | Applicative Laws : -- | identity pure id <*> v = v -- | composition pure (.) <*> u <*> v <*> w = u <*> (v <*> w) -- | homomorphism pure f <*> pure x = pure (f x) -- ...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/benchmarks/popl18/nople/neg/ApplicativeList.hs
haskell
@ LIQUID "--expect-any-error" @ @ LIQUID "--reflection" @ | Applicative Laws : | identity pure id <*> v = v | composition pure (.) <*> u <*> v <*> w = u <*> (v <*> w) | homomorphism pure f <*> pure x = pure (f x) | interchange u <*> pure y = pure ($ y) <*> u @ reflect pure @ @ reflect seq @ @ reflect app...
module ApplicativeList where import Prelude hiding (fmap, id, seq, pure) pure :: a -> L a pure x = C x N seq :: L (a -> b) -> L a -> L b seq fs xs | llen fs > 0 = append (fmap (hd fs) xs) (seq (tl fs) xs) | otherwise = N append :: L a -> L a -> L a append xs ys | llen xs == 0 = ys | otherwise = C ...
29467e8759e1ee38efa1f71fcc30e817f74f6b8a77686604c92ac924b7f234ef
bcc32/projecteuler-ocaml
memo.ml
open! Core open! Import type ('a, 'b) fn = 'a -> 'b let[@inline always] simple key f = let cache = Hashtbl.create key in fun x -> Hashtbl.findi_or_add cache x ~default:f ;; let[@inline always] recursive key f = let cache = Hashtbl.create key in let rec memoized_f x = Hashtbl.findi_or_add cache x ~default:(f ...
null
https://raw.githubusercontent.com/bcc32/projecteuler-ocaml/712f85902c70adc1ec13dcbbee456c8bfa8450b2/src/memo.ml
ocaml
open! Core open! Import type ('a, 'b) fn = 'a -> 'b let[@inline always] simple key f = let cache = Hashtbl.create key in fun x -> Hashtbl.findi_or_add cache x ~default:f ;; let[@inline always] recursive key f = let cache = Hashtbl.create key in let rec memoized_f x = Hashtbl.findi_or_add cache x ~default:(f ...
850b12c186f339040a0b960ee8fe00167458b04b9a5c63959db51e1fc0a3a9b6
haskell-gi/haskell-gi
ForestStore.hs
# LANGUAGE CPP # # LANGUAGE TypeFamilies # # LANGUAGE DataKinds # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # -- -*-haskell-*- GIMP Toolkit ( GTK ) CustomStore TreeModel -- Author : , -- Created : 11 Feburary 2006 -- Copyright ( C ) 2005 - 2016 , , -- --...
null
https://raw.githubusercontent.com/haskell-gi/haskell-gi/bff8f3b92bf2594ea3d6745c346a8de594fc3709/gi-gtk-hs/src/Data/GI/Gtk/ModelView/ForestStore.hs
haskell
-*-haskell-*- This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public This library 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 PARTICULA...
# LANGUAGE CPP # # LANGUAGE TypeFamilies # # LANGUAGE DataKinds # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # GIMP Toolkit ( GTK ) CustomStore TreeModel Author : , Created : 11 Feburary 2006 Copyright ( C ) 2005 - 2016 , , License as published by the ...
5f8f59facc3eb9f6d16cfceffacbfb1a4a8a3eeaa18353eefe4ff211c6b709e9
BinaryAnalysisPlatform/bap
elf_parse.mli
open Core_kernel[@@warning "-D"] open Elf_types val from_bigstring : ?pos:int -> ?len:int -> Bigstring.t -> elf Or_error.t
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/bap_elf/elf_parse.mli
ocaml
open Core_kernel[@@warning "-D"] open Elf_types val from_bigstring : ?pos:int -> ?len:int -> Bigstring.t -> elf Or_error.t
e1dbcf02f7ee43d40ebcd401f73ddb7956e5f046b995c841e9d4ce040ec2acfb
transient-haskell/transient
Internals.stateio.hs
----------------------------------------------------------------------------- -- -- Module : Base -- Copyright : License : MIT -- -- Maintainer : -- Stability : -- Portability : -- -- | See -- Everything in this module is exported in order to allow extensibility. ---------------------------------...
null
https://raw.githubusercontent.com/transient-haskell/transient/301831888887fb199e9f9bfaba2502389e73bc93/src/Transient/Internals.stateio.hs
haskell
--------------------------------------------------------------------------- Module : Base Copyright : Maintainer : Stability : Portability : | See Everything in this module is exported in order to allow extensibility. --------------------------------------------------------------------------- # ...
License : MIT # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # # LANGUAGE InstanceSigs # module Transient.Internals where import Contro...
d8c8accbd7314f5946120184f6f1918fbf64de09dfacceea599d3d88115f65e9
astrada/ocamlfuse
hello.ml
open Unix open LargeFile open Bigarray open Fuse let default_stats = LargeFile.stat "." let fname = "hello" let name = "/" ^ fname let contents : Fuse.buffer = Array1.of_array Bigarray.char Bigarray.c_layout [| 'H'; 'e'; 'l'; 'l'; 'o'; ' '; 'w'; 'o'; 'r'; 'l'; 'd'; '!' |] let do_getattr path = if path = "/...
null
https://raw.githubusercontent.com/astrada/ocamlfuse/08f90ac0b976b94022a7ecac992da9f88e6cd78b/example/hello.ml
ocaml
open Unix open LargeFile open Bigarray open Fuse let default_stats = LargeFile.stat "." let fname = "hello" let name = "/" ^ fname let contents : Fuse.buffer = Array1.of_array Bigarray.char Bigarray.c_layout [| 'H'; 'e'; 'l'; 'l'; 'o'; ' '; 'w'; 'o'; 'r'; 'l'; 'd'; '!' |] let do_getattr path = if path = "/...
fa81d76185603a64b6ccd16d2877f45eabbfd39df8624ba5915dd4e8d9982cb6
janestreet/base
ordering.mli
(** [Ordering] is intended to make code that matches on the result of a comparison more concise and easier to read. For example, instead of writing: {[ let r = compare x y in if r < 0 then ... else if r = 0 then ... else ... ]} you could simply writ...
null
https://raw.githubusercontent.com/janestreet/base/db8a9e93393074a2eb52db0b121f891c1c5bd392/src/ordering.mli
ocaml
* [Ordering] is intended to make code that matches on the result of a comparison more concise and easier to read. For example, instead of writing: {[ let r = compare x y in if r < 0 then ... else if r = 0 then ... else ... ]} you could simply write:...
open! Import type t = | Less | Equal | Greater [@@deriving_inline compare, hash, sexp, sexp_grammar] include Ppx_compare_lib.Comparable.S with type t := t include Ppx_hash_lib.Hashable.S with type t := t include Sexplib0.Sexpable.S with type t := t val t_sexp_grammar : t Sexplib0.Sexp_grammar.t [@@@end] val...
65ca7e8372316010b5e2de3351a57c78c5e120cdedc45f155b1f50362606ee7a
sionescu/iolib
address-arithmetic.lisp
;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- ;;; ;;; --- Arithmetic with addresses and network masks. ;;; (in-package :iolib/sockets) (defun make-netmask (&key cidr class) "Create a subnet mask by specifying either its class(:A, :B or :C) or a CIDR suffix(a number between 0 and 32)." (assert (or cidr class) (ci...
null
https://raw.githubusercontent.com/sionescu/iolib/dac715c81db55704db623d8b2cfc399ebcf6175f/src/sockets/address-arithmetic.lisp
lisp
-*- Mode: Lisp; indent-tabs-mode: nil -*- --- Arithmetic with addresses and network masks. if keyword it must be one of 0.0.0.0 - 127.255.255.255
(in-package :iolib/sockets) (defun make-netmask (&key cidr class) "Create a subnet mask by specifying either its class(:A, :B or :C) or a CIDR suffix(a number between 0 and 32)." (assert (or cidr class) (cidr class) "You must either specify a CIDR or a network class.") (cond (cidr (check-type cidr (mod 33) ...
b5252151b11cc9519ddc3aadb765c9e380960c9f7836593aeedf87ecc4c7da52
jaredly/reason-language-server
main_args.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/407/main_args.mli
ocaml
************************************************************************ OCaml ...
, projet Para , INRIA Rocquencourt Copyright 1998 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the ATTENTION ! When you add or modify a parsing or typing option , do not forget to update ocamldoc opti...
f5894594569dcfca3306bc49525acb0ea7464b446df3d85202fed72383453b8f
nominolo/lambdachine
Pretty.hs
# LANGUAGE FlexibleInstances # {-# LANGUAGE TypeSynonymInstances #-} -- | Module : Lambdachine . Utils . Pretty Copyright : ( c ) 2009 -- License : BSD-style -- -- Maintainer : -- Stability : experimental -- Portability : portable -- module Lambdachine.Utils.Pretty ( module Lambdachine.Utils.Pr...
null
https://raw.githubusercontent.com/nominolo/lambdachine/49d97cf7a367a650ab421f7aa19feb90bfe14731/compiler/Lambdachine/Utils/Pretty.hs
haskell
# LANGUAGE TypeSynonymInstances # | License : BSD-style Maintainer : Stability : experimental Portability : portable ---------------------------------------------------------------------- * Global Environment Stuff | A lens for reading and writing the global environment. Use 'mkGlobalEnvL' to constru...
# LANGUAGE FlexibleInstances # Module : Lambdachine . Utils . Pretty Copyright : ( c ) 2009 module Lambdachine.Utils.Pretty ( module Lambdachine.Utils.Pretty , (<>) ) where import qualified Text.PrettyPrint.ANSI.Leijen as P import Control.Applicative import Data.Functor.Identity import Data.Map (...
07929467a6c11985250ac6ffa7587ed30182ba1939b837c83a55e1d87a3ca722
karimarttila/clojure
session_dynamodb.clj
(ns simpleserver.sessiondb.session-dynamodb (:require [clojure.tools.logging :as log] [clj-time.core :as c-time] [ring.middleware.cors :refer [wrap-cors]] [buddy.sign.jwt :as buddy-jwt] [amazonica.aws.dynamodbv2 :as dynamodb] [simpleserver.util.prop :as ss-prop] [simpleserver.sessiondb.ses...
null
https://raw.githubusercontent.com/karimarttila/clojure/ee1261b9a8e6be92cb47aeb325f82a278f2c1ed3/clj-ring-cljs-reagent-demo/simple-server/src/simpleserver/sessiondb/session_dynamodb.clj
clojure
(ns simpleserver.sessiondb.session-dynamodb (:require [clojure.tools.logging :as log] [clj-time.core :as c-time] [ring.middleware.cors :refer [wrap-cors]] [buddy.sign.jwt :as buddy-jwt] [amazonica.aws.dynamodbv2 :as dynamodb] [simpleserver.util.prop :as ss-prop] [simpleserver.sessiondb.ses...
650fdba64bbc87366feb80ae5e1f03a8bce571ff15d1d93adf135ec2e808f466
zmthy/http-media
MediaType.hs
------------------------------------------------------------------------------ | Defines the ' MediaType ' accept header with an ' Accept ' instance for use -- in content-type negotiation. module Network.HTTP.Media.MediaType ( -- * Type and creation MediaType , Parameters , (//) , (/:) ...
null
https://raw.githubusercontent.com/zmthy/http-media/bc45b456299712299078167cb4b29eba551c54c9/src/Network/HTTP/Media/MediaType.hs
haskell
---------------------------------------------------------------------------- in content-type negotiation. * Type and creation * Querying ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- --------------------------...
| Defines the ' MediaType ' accept header with an ' Accept ' instance for use module Network.HTTP.Media.MediaType ( MediaType , Parameters , (//) , (/:) , mainType , subType , parameters , (/?) , (/.) ) where import qualified Data.ByteString.Char8 as BS ...
28335f9e0770d84a562d5c9d3c312c4c273ed0daa00b5cfd60a42f04c244dcc6
uber/queryparser
Internal.hs
Copyright ( c ) 2017 Uber Technologies , Inc. -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation the rights -- to use, copy, modify, mer...
null
https://raw.githubusercontent.com/uber/queryparser/6015e8f273f4498326fec0315ac5580d7036f8a4/dialects/hive/src/Database/Sql/Hive/Parser/Internal.hs
haskell
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnished to do so, subject to the following conditions: The above copyright notice ...
Copyright ( c ) 2017 Uber Technologies , Inc. in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY K...
d8d471652162fee62fb3e69d7a503c4f75d3ceffa4bcb1f34d0da45419d2df40
liquidz/antq
download_test.clj
(ns antq.download-test (:require [antq.download :as sut] [antq.util.git :as u.git] [clojure.test :as t] [clojure.tools.deps :as deps])) (defn- test-download! [m] (-> m (sut/download!) (dissoc :mvn/repos))) (t/deftest download!-test (with-redefs [deps/resolve-deps (fn [deps-map _args-ma...
null
https://raw.githubusercontent.com/liquidz/antq/4a4fb5e61ddb2f3400e18bdd5c856ca4f04cdfd7/test/antq/download_test.clj
clojure
(ns antq.download-test (:require [antq.download :as sut] [antq.util.git :as u.git] [clojure.test :as t] [clojure.tools.deps :as deps])) (defn- test-download! [m] (-> m (sut/download!) (dissoc :mvn/repos))) (t/deftest download!-test (with-redefs [deps/resolve-deps (fn [deps-map _args-ma...
9319cbd6ca3e48fcabe267a5b4a6b0791d9908b2cf9d98d4717de7ce72f3f56e
picty/parsifal
dns.ml
open Parsifal open BasePTypes open PTypes enum rr_type (16, UnknownVal UnknownQueryType) = | 1 -> RRT_A, "A" | 2 -> RRT_NS, "NS" | 3 -> RRT_MD, "MD" | 4 -> RRT_MF, "MF" | 5 -> RRT_CNAME, "CNAME" | 6 -> RRT_SOA, "SOA" | 7 -> RRT_MB, "MB" | 8 -> RRT_MG, "MG" | 9 -> RRT_MR, "MR" | 10 -> RRT_NULL, "NU...
null
https://raw.githubusercontent.com/picty/parsifal/767a1d558ea6da23ada46d8d96a057514b0aa2a8/net/dns.ml
ocaml
open Parsifal open BasePTypes open PTypes enum rr_type (16, UnknownVal UnknownQueryType) = | 1 -> RRT_A, "A" | 2 -> RRT_NS, "NS" | 3 -> RRT_MD, "MD" | 4 -> RRT_MF, "MF" | 5 -> RRT_CNAME, "CNAME" | 6 -> RRT_SOA, "SOA" | 7 -> RRT_MB, "MB" | 8 -> RRT_MG, "MG" | 9 -> RRT_MR, "MR" | 10 -> RRT_NULL, "NU...
767bf34a13755d90d7e9a14dd1fb998d7ecd7b30669313bcb82aac16e2536070
RichiH/git-annex
Drop.hs
git - annex command - - Copyright 2010 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2010 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module Command.Drop where import Command import qualified Remote import qualified Annex import Annex.UUID impo...
null
https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Command/Drop.hs
haskell
Filter the remote it's being dropped from out of the lists of places assumed to have the key, and places to check. as long as the local repo is not untrusted. force overrides and always allows dropping . force overrides and always allows dropping. In auto mode, only runs the action if there are enough - copies on...
git - annex command - - Copyright 2010 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2010 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module Command.Drop where import Command import qualified Remote import qualified Annex import Annex.UUID impo...
93b4ce9b628f259cdc6fdec8fecb501573b2a7efe7030ee5701c129d5edab2f1
Anut-py/h-raylib
Core.hs
{-# OPTIONS -Wall #-} # LANGUAGE ForeignFunctionInterface # module Raylib.Core where import Data.IORef (modifyIORef', readIORef) import qualified Data.Map as Map import Foreign ( Ptr, Storable (peek, sizeOf), castPtr, fromBool, peekArray, toBool, ) import Foreign.C ( CInt (CInt), CUChar,...
null
https://raw.githubusercontent.com/Anut-py/h-raylib/22116158546b5f604a512192c67bf2bf07bb31c8/src/Raylib/Core.hs
haskell
# OPTIONS -Wall # TODO: Clean this up if possible | Unloads a shader from GPU memory (VRAM). Shaders are automatically unloaded when `closeWindow` is called, so manually unloading shaders is not required. In larger projects, you may want to manually unload shaders to avoid having
# LANGUAGE ForeignFunctionInterface # module Raylib.Core where import Data.IORef (modifyIORef', readIORef) import qualified Data.Map as Map import Foreign ( Ptr, Storable (peek, sizeOf), castPtr, fromBool, peekArray, toBool, ) import Foreign.C ( CInt (CInt), CUChar, CUInt (CUInt), ...
7b8d1a9154a7cd6370b1b53488d38094feaf72984b366980a8f18db6aec191db
xvw/preface
freer_selective_ping_pong.ml
type 'a f = | Read : string f | Write : string -> unit f type 'a io = | IORead : string io | IOWrite : string -> unit io module IO = struct include Preface.Make.Freer_monad.Over (struct type 'a t = 'a io end) let get_line = perform IORead let put_line s = perform (IOWrite s) module Selective =...
null
https://raw.githubusercontent.com/xvw/preface/89af07e80f2e7458a1381ec22aa85036b68e6e8a/test/preface_examples_test/freer_selective_ping_pong.ml
ocaml
type 'a f = | Read : string f | Write : string -> unit f type 'a io = | IORead : string io | IOWrite : string -> unit io module IO = struct include Preface.Make.Freer_monad.Over (struct type 'a t = 'a io end) let get_line = perform IORead let put_line s = perform (IOWrite s) module Selective =...
327b07d6953bf3ae8b6d4afb7d8dbeaaf51e8a6f830ebe65cc67f962bc8d45a3
LaurentMazare/ocaml-torch
gan_stability.ml
GAN stability adapted from / adapted from / *) open Base open Torch let img_size = 128 let latent_dim = 128 let batch_size = 16 let learning_rate = 1e-4 let reg_param = 10. let nf = 32 let batches = 10 ** 8 let leaky_relu xs = Tensor.(max xs (xs * f 0.2)) let conv2d = Layer.conv2d_ ~stride:1 let upsample ...
null
https://raw.githubusercontent.com/LaurentMazare/ocaml-torch/76fbfb80c588b274f383684ba59977a139201aca/examples/gan/gan_stability.ml
ocaml
Use the resnet2 model similar to:
GAN stability adapted from / adapted from / *) open Base open Torch let img_size = 128 let latent_dim = 128 let batch_size = 16 let learning_rate = 1e-4 let reg_param = 10. let nf = 32 let batches = 10 ** 8 let leaky_relu xs = Tensor.(max xs (xs * f 0.2)) let conv2d = Layer.conv2d_ ~stride:1 let upsample ...
38da47bf1740d29536efeb1ca4973c1aed60828a7da4cf1204ab7e5759f84397
kupl/LearnML
original.ml
type aexp = | Const of int | Var of string | Power of (string * int) | Times of aexp list | Sum of aexp list let rec diff ((aexp : aexp), (x : string)) : aexp = match aexp with | Const n -> Const 0 | Var x -> Const 1 | Power (x, n) -> ( match n with | 0 -> Const 1 | _ -> Times [ Con...
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/diff/sub47/original.ml
ocaml
type aexp = | Const of int | Var of string | Power of (string * int) | Times of aexp list | Sum of aexp list let rec diff ((aexp : aexp), (x : string)) : aexp = match aexp with | Const n -> Const 0 | Var x -> Const 1 | Power (x, n) -> ( match n with | 0 -> Const 1 | _ -> Times [ Con...
f1e12f25c47680b4ba2ec1befc808b5d8dd91c4af5e0af14a9578abc3d7cf0d1
huangz1990/SICP-answers
50-rotate180.scm
50-rotate180.scm (define (rotate180 painter) (transform-painter painter (make-vect 1.0 1.0) (make-vect 0.0 1.0) (make-vect 1.0 0.0)))
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/50-rotate180.scm
scheme
50-rotate180.scm (define (rotate180 painter) (transform-painter painter (make-vect 1.0 1.0) (make-vect 0.0 1.0) (make-vect 1.0 0.0)))
45a4f6d78a1477bf15dccfe885c6692b30372f8c0067f8b8ba4a9711a4bef141
SparkFund/spec-tacular
spec_tacular_test.clj
(ns spark.spec-tacular-test (:use spark.spec-tacular clojure.test [spark.spec-tacular.generators :exclude [prop-check-components]]) (:require [clojure.core.typed :as t] [clojure.test.check :as tc] [clojure.test.check.generators :as gen] [clojure.test.check.propert...
null
https://raw.githubusercontent.com/SparkFund/spec-tacular/2ddeaa0a33593a5e71f377368ded4701fa223e20/test/spark/spec_tacular_test.clj
clojure
----------------------------------------------------------------------------- defspec ----------------------------------------------------------------------------- link ----------------------------------------------------------------------------- booleans, is-many ------------------------------------------------...
(ns spark.spec-tacular-test (:use spark.spec-tacular clojure.test [spark.spec-tacular.generators :exclude [prop-check-components]]) (:require [clojure.core.typed :as t] [clojure.test.check :as tc] [clojure.test.check.generators :as gen] [clojure.test.check.propert...
2ab4301267f910a31a8049b063f12e22811c4a78acf721d154a1c5daa4c81f95
B-Lang-org/bsc
BExpr.hs
# LANGUAGE CPP # module BExpr(BExpr, bNothing, bAdd, bImplies, bImpliesB) where #if defined(__GLASGOW_HASKELL__) && (__GLASGOW_HASKELL__ >= 804) import Prelude hiding ((<>)) #endif import Util(isOrdSubset, mergeOrdNoDup) import PPrint import ISyntax import ISyntaxUtil import BDD import Prim --import Debug.Trace ...
null
https://raw.githubusercontent.com/B-Lang-org/bsc/bd141b505394edc5a4bdd3db442a9b0a8c101f0f/src/comp/BExpr.hs
haskell
import Debug.Trace bNothing is no information bImplies checks if the know facts implies an expression. bImplies is allowed to answer False even if the implication is true, but not the other way around. This implementation is exact , but slow . This implementation is exact, but slow. ------- Trivial implementa...
# LANGUAGE CPP # module BExpr(BExpr, bNothing, bAdd, bImplies, bImpliesB) where #if defined(__GLASGOW_HASKELL__) && (__GLASGOW_HASKELL__ >= 804) import Prelude hiding ((<>)) #endif import Util(isOrdSubset, mergeOrdNoDup) import PPrint import ISyntax import ISyntaxUtil import BDD import Prim A BExpr records infor...
77cb0b8cdd6fce8183caad9bee74164dac9b71decdca612b1a9856798a3b2ac1
ucsd-progsys/liquidhaskell
Vector0.hs
{-@ LIQUID "--expect-any-error" @-} module Vector0 (x0, prop0, prop1, prop2, prop3) where import Language.Haskell.Liquid.Prelude import Data.Vector hiding (map, concat, zipWith, filter, foldr, foldl, (++)) xs :: [Int] xs = [1,2,3,4] vs :: Vector Int vs = fromList xs prop0 :: Bool prop0 = liquidAssertB (x >= 0) ...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/names/neg/Vector0.hs
haskell
@ LIQUID "--expect-any-error" @
module Vector0 (x0, prop0, prop1, prop2, prop3) where import Language.Haskell.Liquid.Prelude import Data.Vector hiding (map, concat, zipWith, filter, foldr, foldl, (++)) xs :: [Int] xs = [1,2,3,4] vs :: Vector Int vs = fromList xs prop0 :: Bool prop0 = liquidAssertB (x >= 0) where x = Prelude.head xs pr...
d7517aed923c37ae455ef3f28e0cfe90bed634bc5f1d15faee950bbf8cfd7b20
funcool/dost
crypto.cljs
Copyright 2016 < > ;; 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 in writing, software distributed under the...
null
https://raw.githubusercontent.com/funcool/dost/e68a23ff7d99892d3f2d7bc6fe733bd74d1743a3/src/dost/core/crypto.cljs
clojure
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 language governing perm...
Copyright 2016 < > Licensed under the Apache License , Version 2.0 ( the " License " ) distributed under the License is distributed on an " AS IS " BASIS , (ns dost.core.crypto (:refer-clojure :exclude [reset! -reset]) (:require [cljs.nodejs :as node] [promesa.core :as p :include-macros true] ...
02c6ba5c31bdfba548af39a6e18ea691b33be678afb1b6318817a791b2ad9c33
haskus/haskus-system
Deflate.hs
# LANGUAGE MultiWayIf , LambdaCase # -- | Implement DEFLATE (de)compression algorithm -- -- -- -- TODO: use BufferBuilder instead of Seq Word8! -- -- TODO: the function `putFixedCode` is currently exported to avoid a compiler -- warning. We should implement the whole compression algorithms and export a -- "compress" ...
null
https://raw.githubusercontent.com/haskus/haskus-system/38b3a363c26bc4d82e3493d8638d46bc35678616/haskus-system/src/lib/Haskus/Format/Compression/Algorithms/Deflate.hs
haskell
| Implement DEFLATE (de)compression algorithm TODO: use BufferBuilder instead of Seq Word8! TODO: the function `putFixedCode` is currently exported to avoid a compiler warning. We should implement the whole compression algorithms and export a "compress" method instead. * Internal functions Compressed data...
# LANGUAGE MultiWayIf , LambdaCase # module Haskus.Format.Compression.Algorithms.Deflate ( decompress , makeHuffmanCodes , makeBitGetFromCodes , putFixedCode ) where import qualified Data.Sequence as Seq import Data.Sequence ((><), Seq, (|>)) import Data.Foldable (toList) import Data.Ord(comparing) im...
0967ca6cb6ba5d45daf6f6a5aa0fd3855eed58d28dbea096e2c6b9e52247d88b
vmchale/apple
R.hs
{-# LANGUAGE RankNTypes #-} module R ( Renames (..) , HasRenames (..) , maxLens , rG , rE ) where import A import Control.Monad.State.Strict (MonadState, runState) import Data.Bifunctor (second) import Data.Functor ...
null
https://raw.githubusercontent.com/vmchale/apple/ed41443012d6dd2a73edcff10915c0defda0e34b/src/R.hs
haskell
# LANGUAGE RankNTypes # Make sure you don't have cycles in the renames map! globally unique
module R ( Renames (..) , HasRenames (..) , maxLens , rG , rE ) where import A import Control.Monad.State.Strict (MonadState, runState) import Data.Bifunctor (second) import Data.Functor (($>)) import qualif...
933cb23e6c4fdbed6fd75fbcb00a0c75ab4dcca404c0af262b7b4bec1b47408d
OlivierSohn/hamazed
Image.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE LambdaCase # module Imj.Random.MWC.Image ( mkMWC256Image , mkMWC256ImageGray , mkMWC256ImageGray' , mkMWC256ImageRGB ) where import Imj.Prelude import Codec.Picture import Data.Bits(shiftR) import Dat...
null
https://raw.githubusercontent.com/OlivierSohn/hamazed/c0df1bb60a8538ac75e413d2f5bf0bf050e5bc37/imj-profile/src/Imj/Random/MWC/Image.hs
haskell
# LANGUAGE NoImplicitPrelude # # LANGUAGE LambdaCase # module Imj.Random.MWC.Image ( mkMWC256Image , mkMWC256ImageGray , mkMWC256ImageGray' , mkMWC256ImageRGB ) where import Imj.Prelude import Codec.Picture import Data.Bits(shiftR) import Dat...
4f065d49ebe4973ffd3a3d13da4f348d340fcb44ffba93e00d414084e326a5cb
TyOverby/mono
test_to_string.ml
open! Core open! Import let show ?filter_printed_attributes node = let t = node |> Node_helpers.unsafe_convert_exn in t |> [%sexp_of: Node_helpers.t] |> print_s; print_endline "----------------------"; t |> Node_helpers.to_string_html ?filter_printed_attributes |> print_endline ;; let%expect_test "basic text"...
null
https://raw.githubusercontent.com/TyOverby/mono/8d6b3484d5db63f2f5472c7367986ea30290764d/vendor/janestreet-virtual_dom/test/test_to_string.ml
ocaml
open! Core open! Import let show ?filter_printed_attributes node = let t = node |> Node_helpers.unsafe_convert_exn in t |> [%sexp_of: Node_helpers.t] |> print_s; print_endline "----------------------"; t |> Node_helpers.to_string_html ?filter_printed_attributes |> print_endline ;; let%expect_test "basic text"...
19b814dfe218d5e36847355325b109138aaaf2af5dd3e2b2bf44a87ac77aa923
PrecursorApp/precursor
colors.cljs
(ns frontend.colors (:require [clojure.string :as str])) ;; Note that these are ordered so that next-color will choose ;; a color with high contrast to the previous color (def color-idents [:color.name/red :color.name/cyan :color.name/purple :color.name/orange :color.name/blue :color.name/yellow ...
null
https://raw.githubusercontent.com/PrecursorApp/precursor/30202e40365f6883c4767e423d6299f0d13dc528/src-cljs/frontend/colors.cljs
clojure
Note that these are ordered so that next-color will choose a color with high contrast to the previous color handles old chats that are missing a session/uuid
(ns frontend.colors (:require [clojure.string :as str])) (def color-idents [:color.name/red :color.name/cyan :color.name/purple :color.name/orange :color.name/blue :color.name/yellow :color.name/pink :color.name/green]) (defn next-color [choices current-color] (let [n (inc (count (take-whil...
7b4e22ebcae50507a72740832036b8ad6234ccdeec4b0d3edabd1cc030dc9bbd
hyperfiddle/electric
api.cljc
(ns hyperfiddle.api #?(:cljs (:require-macros [hyperfiddle.api :refer [hfql]])) (:import [hyperfiddle.electric Pending] #?(:cljs [goog.math Long])) (:require clojure.edn [contrib.dynamic :refer [call-sym]] [clojure.spec.alpha :as s] [hyperfiddle.hfql :as hfql] ...
null
https://raw.githubusercontent.com/hyperfiddle/electric/a057d75280fecac4c0667a4fa8d4c182b9363fb8/src/hyperfiddle/api.cljc
clojure
Server side only meant to be called by a renderer MISSING today resolve cycle - hyperfiddle.txn needs hf/tx-meta [rosie] before rcf turns on due to test/seattle undefined (defmacro into-tx Electric call can infer schema clojure compatible call :cljs (def into-tx nil)) colorless, !t on server need the fla...
(ns hyperfiddle.api #?(:cljs (:require-macros [hyperfiddle.api :refer [hfql]])) (:import [hyperfiddle.electric Pending] #?(:cljs [goog.math Long])) (:require clojure.edn [contrib.dynamic :refer [call-sym]] [clojure.spec.alpha :as s] [hyperfiddle.hfql :as hfql] ...
2b8187c4a71689950b2c760d63ce1d28a84005665c0b67e283cb1f878484e0e0
pfdietz/ansi-test
pathname-directory.lsp
;-*- Mode: Lisp -*- Author : Created : Sat Dec 6 14:24:39 2003 ;;;; Contains: Tests for PATHNAME-DIRECTORY (deftest pathname-directory.1 (loop for p in *pathnames* for directory = (pathname-directory p) unless (or (stringp directory) (member directory '(nil :wi...
null
https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/pathnames/pathname-directory.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests for PATHNAME-DIRECTORY section 19.3.2.1
Author : Created : Sat Dec 6 14:24:39 2003 (deftest pathname-directory.1 (loop for p in *pathnames* for directory = (pathname-directory p) unless (or (stringp directory) (member directory '(nil :wild :unspecific)) (and (consp directory) ...
4d0c7f2e8e51b3439c74587224a90f692e144b53afbb4c7092ed673027e3250a
ashwinbhaskar/google-drive-file-uploader
drive_test.clj
(ns google-drive-file-uploader.drive-test (:require [clojure.test :refer :all] [google-drive-file-uploader.drive :as drive] [mock-clj.core :as m] [failjure.core :as f])) (deftest upload-file-to-folder-test (testing "Should check the validity of access token before calling get-fi...
null
https://raw.githubusercontent.com/ashwinbhaskar/google-drive-file-uploader/16e2e763ec9137f2be69dfd12dc6fad4e9d0d71f/test/google_drive_file_uploader/drive_test.clj
clojure
(ns google-drive-file-uploader.drive-test (:require [clojure.test :refer :all] [google-drive-file-uploader.drive :as drive] [mock-clj.core :as m] [failjure.core :as f])) (deftest upload-file-to-folder-test (testing "Should check the validity of access token before calling get-fi...
3524b571f75b6e4856b6802ef8d588f3b97922189bfe10866e14b30f46f6bbb3
fukamachi/as-interval
as-interval.lisp
(in-package :cl-user) (defpackage as-interval-test (:use :cl :as-interval :cl-test-more)) (in-package :as-interval-test) (plan 1) (diag "Running a test... this takes 10 seconds...") (is-print (as:with-event-loop () (let ((event (interval (lambda () ...
null
https://raw.githubusercontent.com/fukamachi/as-interval/1fc6b823834b3ad56544b225500178a141a9c14a/t/as-interval.lisp
lisp
(in-package :cl-user) (defpackage as-interval-test (:use :cl :as-interval :cl-test-more)) (in-package :as-interval-test) (plan 1) (diag "Running a test... this takes 10 seconds...") (is-print (as:with-event-loop () (let ((event (interval (lambda () ...
da1c6b99ee8662bae671501b102cb4bff9d69794fd9ded9b256112dc14e56df0
McParen/croatoan
menu.lisp
(in-package :de.anvi.croatoan) ;; menu ;; curses extension for programming menus ;; -island.net/ncurses/man/menu.3x.html default size of ncurses menus is 16 rows , 1 col . (defclass menu (element layout) ((menu-type :initarg :menu-type :initform :selection :accessor menu-type :type...
null
https://raw.githubusercontent.com/McParen/croatoan/c38cca13706d597b6276b7c466dd64f733aaef5e/src/menu.lisp
lisp
menu curses extension for programming menus -island.net/ncurses/man/menu.3x.html init for menus which aren't menu windows item-padding is either an integer, or a list (top-bottom left-right) or (top bottom left right). Convert strings and symbols to item objects if an item object is given, just return it if we ...
(in-package :de.anvi.croatoan) default size of ncurses menus is 16 rows , 1 col . (defclass menu (element layout) ((menu-type :initarg :menu-type :initform :selection :accessor menu-type :type keyword :documentation "Types of menus: :selection (default) or :checklist."...
5eb4bacbbbbda04c2074b336f76f15a8e6d830bf4c37ca6301203d894382f053
schell/odin
TextInput.hs
module Odin.Engine.GUI.TextInput ( TextInputState(..) , TextInputData(..) , TextInput , slotTextInput , renderTextInput , sizeOfTextInput ) where import Odin.Engine.GUI.TextInput.Internal
null
https://raw.githubusercontent.com/schell/odin/97ae1610a7abd19aa150bc7dfc132082d88ca9ea/odin-engine/src/Odin/Engine/GUI/TextInput.hs
haskell
module Odin.Engine.GUI.TextInput ( TextInputState(..) , TextInputData(..) , TextInput , slotTextInput , renderTextInput , sizeOfTextInput ) where import Odin.Engine.GUI.TextInput.Internal
ecde6e31efe77cff80294c75e8cff4a04bf145fe6f79e9f63a260559fb57072a
azimut/shiny
drum.lisp
(in-package :shiny) THIS SYNTX SUCKS ! ! ! (pa (quant 4) (repeat 4 '(60)) (mapcar #'rhythm `(1/4 2/4 ,(+ 2/4 1/8) 3/4)) 60 11 (mapcar #'rhythm `(1/4 2/4 ,(+ 2/4 1/8) 3/4))) (defmacro drumthis (time note beats velocity channel) (alexandria:with-gensyms (lbeats nbeats) `(let ((,lbeats (length ,b...
null
https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/compositions/drafts/drum.lisp
lisp
?
(in-package :shiny) THIS SYNTX SUCKS ! ! ! (pa (quant 4) (repeat 4 '(60)) (mapcar #'rhythm `(1/4 2/4 ,(+ 2/4 1/8) 3/4)) 60 11 (mapcar #'rhythm `(1/4 2/4 ,(+ 2/4 1/8) 3/4))) (defmacro drumthis (time note beats velocity channel) (alexandria:with-gensyms (lbeats nbeats) `(let ((,lbeats (length ,b...
c484327ed11a47e5591e7d4ee0726544f17db30df8fb692256c4cb05117b97d8
atomvm/atomvm_lib
sx126x_cmd.erl
%% Copyright ( c ) 2022 dushin.net %% 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 in wr...
null
https://raw.githubusercontent.com/atomvm/atomvm_lib/0a35b8efc334a97fcc4e23d4d948962160e5fd4d/src/sx126x_cmd.erl
erlang
All rights reserved. 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 ...
Copyright ( c ) 2022 dushin.net Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(sx126x_cmd). An SPI driver for the LoRa ( SX126X ) chipset . This module can be used to send and receive messages using LoRa modul...
400b9efbab333204b15c575feb969aa884817391e553189c4eb4b8fe68b4b6d8
rtoy/ansi-cl-tests
max.lsp
;-*- Mode: Lisp -*- Author : Created : Sun Aug 3 15:55:17 2003 Contains : Tests of MAX (in-package :cl-test) (compile-and-load "numbers-aux.lsp") ;;; Error tests (deftest max.error.1 (signals-error (max) program-error) t) (deftest max.error.2 (check-type-error #'max #'realp) nil) (defte...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/max.lsp
lisp
-*- Mode: Lisp -*- Error tests Non-error tests
Author : Created : Sun Aug 3 15:55:17 2003 Contains : Tests of MAX (in-package :cl-test) (compile-and-load "numbers-aux.lsp") (deftest max.error.1 (signals-error (max) program-error) t) (deftest max.error.2 (check-type-error #'max #'realp) nil) (deftest max.error.3 (check-type-error #'(la...
0fdd956024a34353f92ffa032e1cb2dff37903322f1f836f392a223ebbe48822
theodormoroianu/SecondYearCourses
LambdaChurch_20210415164336.hs
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415164336.hs
haskell
alpha-equivalence subst u x t defines [u/x]t, i.e., substituting u for x in t This substitution avoids variable captures so it is safe to be used when reducing terms with free variables (e.g., if evaluating inside lambda abstractions) ^ substitution term ^ variable to be substitutes ^ term in which the substit...
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
d9c5da018d13bb875f6ed394788b5cedeca4027093c3c9bc361dff3585493218
zeniuseducation/questdb
project.clj
(defproject zenedu.squest/questdb "0.2.2" :description "A lightweight disk-persisted embedded nosql db using edn inspired by couch" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.6.0"] [me.raynes/fs "1.4.6"] ...
null
https://raw.githubusercontent.com/zeniuseducation/questdb/f54e8896cd6e2cf641374f6aded651c1f75dd521/project.clj
clojure
(defproject zenedu.squest/questdb "0.2.2" :description "A lightweight disk-persisted embedded nosql db using edn inspired by couch" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.6.0"] [me.raynes/fs "1.4.6"] ...
926e8e7ed942744f48985d4a9911ac59bdbc530b2a38dd3fec970ef578c4e0b3
v0d1ch/plaid
Transactions.hs
module Data.Api.Transactions ( plaidGetTransactions , plaidRefreshTransactions , plaidCategoriesGet ) where import Data.Common plaidGetTransactions :: ( MonadReader PlaidEnv m , MonadThrow m , PlaidHttp m ) => PlaidBody PlaidTransactionsGet -> m ByteString plaidGetTransactions b...
null
https://raw.githubusercontent.com/v0d1ch/plaid/3450c2f4d1c494f2677554b5bd249828a78f370f/Data/Api/Transactions.hs
haskell
module Data.Api.Transactions ( plaidGetTransactions , plaidRefreshTransactions , plaidCategoriesGet ) where import Data.Common plaidGetTransactions :: ( MonadReader PlaidEnv m , MonadThrow m , PlaidHttp m ) => PlaidBody PlaidTransactionsGet -> m ByteString plaidGetTransactions b...
ce6f03da7471893f6abae6193de2a71a1478cb7ee431842ce51e924e12508ae0
klarna/mnesia_eleveldb
mnesia_eleveldb_params.erl
%%---------------------------------------------------------------- Copyright ( c ) 2013 - 2016 Klarna AB %% 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 License at %% %% ...
null
https://raw.githubusercontent.com/klarna/mnesia_eleveldb/1bbeb9243cf0e7f3ef36a713bf657b3ebf31fb63/src/mnesia_eleveldb_params.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 permissions an...
Copyright ( c ) 2013 - 2016 Klarna AB 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(mnesia_eleveldb_params). -behav...
2e1df53f85a799a8ef9ed3379f4adeafeace759481cf927b34fe829ebed798c6
onyx-platform/onyx-examples
core.clj
(ns terminal-reduce-task.core (:require [clojure.core.async :refer [chan >!! <!! close!]] [onyx.plugin.core-async :refer [take-segments!]] [onyx.api]) (:gen-class)) (def input-segments [{:n 21 :event-time #inst "2015-09-13T03:00:00.829-00:00"} {:n 12 :event-time #inst "2015-09-13T03:04...
null
https://raw.githubusercontent.com/onyx-platform/onyx-examples/668fddd26bc6b692a478fb8dc0e6d3d329879396/terminal-reduce-task/src/terminal_reduce_task/core.clj
clojure
When a reduce task is used as terminal node, an output plugin is no longer required. executed for each segment
(ns terminal-reduce-task.core (:require [clojure.core.async :refer [chan >!! <!! close!]] [onyx.plugin.core-async :refer [take-segments!]] [onyx.api]) (:gen-class)) (def input-segments [{:n 21 :event-time #inst "2015-09-13T03:00:00.829-00:00"} {:n 12 :event-time #inst "2015-09-13T03:04...
ca6eb45b0db938dc54d03b8b0d8fc79918d9932d1ede7531a537dba181f9ddc1
casidiablo/slack-rtm
core.clj
(ns slack-rtm.core (:require [clj-slack.rtm :as rtm] [clj-slack.core :refer [slack-request]] [clojure.core.async :as async :refer [chan pub sub go >! <! go-loop close! unsub unsub-all]] [clojure.data.json :as json] [clojure.test] [gniazdo.core :...
null
https://raw.githubusercontent.com/casidiablo/slack-rtm/dad6b674f4a4eda92ed8528bf896df5d82fb32ad/src/slack_rtm/core.clj
clojure
private utility methods close connection and channel send the message as a JSON string create a publication of websocket raw callbacks subscribe a channel to the :on-receive callbacks and create a publication of parsed slack events subscribe initial subscribers save the response from rtm/start to pass back to c...
(ns slack-rtm.core (:require [clj-slack.rtm :as rtm] [clj-slack.core :refer [slack-request]] [clojure.core.async :as async :refer [chan pub sub go >! <! go-loop close! unsub unsub-all]] [clojure.data.json :as json] [clojure.test] [gniazdo.core :...
7635e8fec565a7113e95d3338237f9d89b8fbf4d568e7e62fa6d3ae9097ca837
heidegger/JSConTest
effect.ml
type t = | Default | NoTrans | OnlyEffect | All
null
https://raw.githubusercontent.com/heidegger/JSConTest/7c807a76af998da25775fba1f5cbe1cf8031d121/ocaml/effect.ml
ocaml
type t = | Default | NoTrans | OnlyEffect | All
07149e1c31a563b7130cda5ab87df1efbd5f113875319003f9db96e82aedd590
ntoronto/pict3d
texture.rkt
#lang typed/racket/base (require racket/match racket/list typed/opengl (except-in typed/opengl/ffi cast ->) "context.rkt" "object.rkt") (provide (all-defined-out)) ;; =================================================================================================== ;; Ma...
null
https://raw.githubusercontent.com/ntoronto/pict3d/09283c9d930c63b6a6a3f2caa43e029222091bdb/pict3d/private/gl/texture.rkt
racket
=================================================================================================== Managed textures
#lang typed/racket/base (require racket/match racket/list typed/opengl (except-in typed/opengl/ffi cast ->) "context.rkt" "object.rkt") (provide (all-defined-out)) (: current-gl-active-texture (Parameterof Integer)) (define current-gl-active-texture (make-parameter GL_TE...
c23d02912d7345bb54ad14dbafcff156ac722441a83e0528c148590254fb281d
jasonkuhrt-archive/hpfp-answers
WhatKind.hs
module WhatKind where 1 -- For the signature of `a -> a` the type of `a` is `*`. 2 -- For the signature of `a -> f a` the type of `a` is `*` and the type of `f` is `* -> *` because `f` is being applied (to `a`).
null
https://raw.githubusercontent.com/jasonkuhrt-archive/hpfp-answers/c03ae936f208cfa3ca1eb0e720a5527cebe4c034/chapter-12/WhatKind.hs
haskell
For the signature of `a -> a` the type of `a` is `*`. For the signature of `a -> f a` the type of `a` is `*` and the type of `f` is `* -> *` because `f` is being applied (to `a`).
module WhatKind where 1 2
07db4df9c4f7f3ba2704f0b0b2dcd634e475d351734f819d9e9709a3d3d8f673
mtgred/netrunner
installing.clj
(ns game.core.installing (:require [cond-plus.core :refer [cond+]] [game.core.agendas :refer [update-advancement-requirement]] [game.core.board :refer [all-installed get-remotes installable-servers server->zone all-installed-runner-type]] [game.core.card :refer [agenda? asset? convert-to-condition-cou...
null
https://raw.githubusercontent.com/mtgred/netrunner/f92143720e7ec7e88e641445a1dc695aeb1ac7f0/src/clj/game/core/installing.clj
clojure
Intalling a corp card Region check ice install prevented by Unscheduled Maintenance Installing not locked no restrictions failed region check failed install lock check failed ice check else make sure they didn't trash the card themselves Ignore all costs Pay costs "Face-up" cards All other cards explicit...
(ns game.core.installing (:require [cond-plus.core :refer [cond+]] [game.core.agendas :refer [update-advancement-requirement]] [game.core.board :refer [all-installed get-remotes installable-servers server->zone all-installed-runner-type]] [game.core.card :refer [agenda? asset? convert-to-condition-cou...
22d35727b7904cc2522940374b77069b0ea8b775feadebd20451767264980269
apache/couchdb-rebar
rebar_subdirs.erl
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- %% ex: ts=4 sw=4 et %% ------------------------------------------------------------------- %% rebar : Erlang Build Tools %% Copyright ( c ) 2009 ( ) %% %% Permission is hereby granted, free of charge, to any person obtaining a copy %% of this softw...
null
https://raw.githubusercontent.com/apache/couchdb-rebar/8578221c20d0caa3deb724e5622a924045ffa8bf/src/rebar_subdirs.erl
erlang
ex: ts=4 sw=4 et ------------------------------------------------------------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sel...
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- rebar : Erlang Build Tools Copyright ( c ) 2009 ( ) in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the...
1b0942dd7e6e9ca7dccb3c88b2ef6c7ba999c6467355608f628459374a290c66
zenspider/schemers
exercise.1.37.scm
#lang racket/base Exercise 1.37 : ;; a. An infinite "continued fraction" is an expression of the form ;; N[1 ] ;; f = --------------------- ;; N[2] ;; D[1] + --------------- ] ---------...
null
https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_1/exercise.1.37.scm
scheme
a. An infinite "continued fraction" is an expression of the form f = --------------------- N[2] D[1] + --------------- D[3] + ... As an example, one can show that the infinite continued infinite continued fraction is to trun...
#lang racket/base Exercise 1.37 : N[1 ] ] --------- fraction expansion with the n[i ] and the D[i ] all equal to 1 produces 1/[phi ] , where [ phi ] is the golden ratio ( described in section * Note 1 - 2 - 2 : :) ....
f1d8aa79c2f5a2cae94e3b16404fc8534c2c723635c0aed557139298aa67e6db
michalkonecny/aern2
Optimisation.hs
module AERN2.BoxFun.Optimisation where import qualified Prelude import MixedTypesNumPrelude import qualified Numeric.CollectErrors as CN import AERN2.MP.Dyadic import AERN2.MP.Ball import AERN2.BoxFun.Box (Box) import qualified AERN2.BoxFun.Box as Box import AERN2.BoxFun.Type import AERN2.Kleenean import AERN2.Linear....
null
https://raw.githubusercontent.com/michalkonecny/aern2/025005773f075280b89d8467b78cd74cb4e40cd5/aern2-mfun/src/AERN2/BoxFun/Optimisation.hs
haskell
TODO: safe? TODO: radius should be 0 - TODO: hack... trace ("value: "++ (show $ val)) $ trace ("val' "++ (show $ val')) $ trace ("precision: "++ (show $ precision)) $ trace ("dist to last "++ (show $ distToLast)) $ trace ("accuracy: "++ (show $ getAccuracy val')) $ trace ("precision centre: "++ (show $ fmap (getPrec...
module AERN2.BoxFun.Optimisation where import qualified Prelude import MixedTypesNumPrelude import qualified Numeric.CollectErrors as CN import AERN2.MP.Dyadic import AERN2.MP.Ball import AERN2.BoxFun.Box (Box) import qualified AERN2.BoxFun.Box as Box import AERN2.BoxFun.Type import AERN2.Kleenean import AERN2.Linear....
84de414160823fab30b53f36d4949982c230de872a5c8867a23f2acab2b5ea14
ucsd-progsys/liquidhaskell
Panic.hs
module GHC.Prim.Panic (module Exports) where import "ghc-prim" GHC.Prim.Panic as Exports
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/5e9347ac719e0ca192b05ccde74617d0cbb05a85/liquid-ghc-prim/src/GHC/Prim/Panic.hs
haskell
module GHC.Prim.Panic (module Exports) where import "ghc-prim" GHC.Prim.Panic as Exports
7f796329bf627819352bf89523dce5a927b9bd498c0bcbc69f691d8e87e59a40
input-output-hk/cardano-sl
Ssc.hs
# LANGUAGE TypeFamilies # | Richmen computation for SSC . module Pos.DB.Lrc.Consumer.Ssc ( * The ' RichmenComponent ' instance sscRichmenComponent -- * The consumer , sscLrcConsumer -- * Functions for getting richmen , getSscRichmen , tryGetSscRichmen ) ...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/db/src/Pos/DB/Lrc/Consumer/Ssc.hs
haskell
* The consumer * Functions for getting richmen -------------------------------------------------------------------------- -------------------------------------------------------------------------- -------------------------------------------------------------------------- The consumer --------------------------------...
# LANGUAGE TypeFamilies # | Richmen computation for SSC . module Pos.DB.Lrc.Consumer.Ssc ( * The ' RichmenComponent ' instance sscRichmenComponent , sscLrcConsumer , getSscRichmen , tryGetSscRichmen ) where import Universum import Pos.Chain.Lrc (...
1038a75192ee8d85d62b438c0f43bf1924b6e51140aee5bc21927c7322120c3e
foshardware/lsc
HigherOrder.hs
Copyright 2018 - < > SPDX - License - Identifier : GPL-3.0 - or - later # LANGUAGE CPP # {-# LANGUAGE BangPatterns #-} -- | Assorted higher-order functions -- module LSC.HigherOrder ( ifoldl' #if !MIN_VERSION_base(4,13,0) , foldMap' #endif , module Control.Applicative , module Control.Monad , modul...
null
https://raw.githubusercontent.com/foshardware/lsc/006c245a89b0a0056286205917438c7d031d04b9/src/LSC/HigherOrder.hs
haskell
# LANGUAGE BangPatterns # | Assorted higher-order functions # INLINE ifoldl' # # INLINE foldMap' #
Copyright 2018 - < > SPDX - License - Identifier : GPL-3.0 - or - later # LANGUAGE CPP # module LSC.HigherOrder ( ifoldl' #if !MIN_VERSION_base(4,13,0) , foldMap' #endif , module Control.Applicative , module Control.Monad , module Data.Foldable ) where import Control.Applicative (liftA2) import ...
d51099f8b01528c6aecd2a089fca128fe4ae05b428815d885131455f5ded93b6
uccmisl/dashc
adapt_algo.ml
* dashc , client emulator for DASH video streaming * Copyright ( c ) 2016 - 2018 , , University College Cork * * 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 ; eit...
null
https://raw.githubusercontent.com/uccmisl/dashc/8a97ceb2bdf6a74bde410be9a1d1432d5e11445a/src/adapt_algo.ml
ocaml
Probe and Adapt: Rate Adaptation for HTTP Video Streaming At Scale: A Buffer-Based Approach to Rate Adaptation: Evidence from a Large Video Streaming Service /~nickm/papers/sigcomm2014-video.pdf /~nickm/papers/ty-thesis.pdf rate_prev is used for ~init below only as a start value, there is no me...
* dashc , client emulator for DASH video streaming * Copyright ( c ) 2016 - 2018 , , University College Cork * * 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 ; eit...
bf8ef314f8fa657940fa57d5d8ae5f7b06fe487765c7ded77a7afbab80a64b14
tfausak/monadoc-5
Main.hs
module Monadoc.Main where import qualified Control.Concurrent.Async as Async import qualified Control.Monad as Monad import qualified Control.Monad.Catch as Exception import qualified Control.Monad.Trans.Class as Trans import qualified Control.Monad.Trans.Reader as Reader import qualified Database.SQLite.Simple as Sql...
null
https://raw.githubusercontent.com/tfausak/monadoc-5/5361dd1870072cf2771857adbe92658118ddaa27/src/lib/Monadoc/Main.hs
haskell
module Monadoc.Main where import qualified Control.Concurrent.Async as Async import qualified Control.Monad as Monad import qualified Control.Monad.Catch as Exception import qualified Control.Monad.Trans.Class as Trans import qualified Control.Monad.Trans.Reader as Reader import qualified Database.SQLite.Simple as Sql...