_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
fd49fa6f8ed6daad5879d8d8291244cb24034965f1bbe604e5f213b3a7e4f76d
haskell-unordered-containers/unordered-containers
List.hs
module Properties.List (tests) where import Data.HashMap.Internal.List import Data.List (nub, sort, sortBy) import Data.Ord (comparing) import Test.QuickCheck (Property, property, (===), (==>)) import Test.Tasty (TestTree, testGroup) import Test.Tasty.Quick...
null
https://raw.githubusercontent.com/haskell-unordered-containers/unordered-containers/42a25dbc19babf7c1153ae19bdef609f8308de04/tests/Properties/List.hs
haskell
| Homogenous version of 'unorderedCompare'
module Properties.List (tests) where import Data.HashMap.Internal.List import Data.List (nub, sort, sortBy) import Data.Ord (comparing) import Test.QuickCheck (Property, property, (===), (==>)) import Test.Tasty (TestTree, testGroup) import Test.Tasty.Quick...
d31ba45eb303dbbab67af433a47e6c97393a3620bc718368e0bce196081ffa2a
pascal-knodel/haskell-craft
E'11'11.hs
-- -- -- ------------------ Exercise 11.11 . ------------------ -- -- -- module E'11'11 where import GHC.Enum ( enumFromTo ) " comp2 " : ----------- comp2 :: (a -> b) -> (b -> b -> c) -> (a -> a -> c) comp2 f g = \x y -> g (f x) (f y) The " comp2 " definition from the book already used partial appl...
null
https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/Chapter%C2%A011/E'11'11.hs
haskell
---------------- ---------------- --------- But really, instead of hiding "x" and "y" by a lambda abstraction we just could have written it out: GHCi> comp2 (+1) (+) 0 0 "total": --------- Other solutions for "total": Questions: How do we find the smallest/smartest definition, using partial applicatio...
Exercise 11.11 . module E'11'11 where import GHC.Enum ( enumFromTo ) " comp2 " : comp2 :: (a -> b) -> (b -> b -> c) -> (a -> a -> c) comp2 f g = \x y -> g (f x) (f y) The " comp2 " definition from the book already used partial application . comp2 : : ( a - > b ) - > ( b - > b - > c ) - > ( a - ...
d4c80e31bf699ab04993a3648a03a83c6143fe5006f3261c9683677b227ab952
plumatic/grab-bag
experiments_test.clj
(ns domain.experiments-test (:use clojure.test plumbing.test plumbing.core) (:require [domain.experiments :as experiments])) (deftest stable?-test (is (experiments/stable? [[:a 4]] [[:a 4]])) (is (experiments/stable? [[:a 4] [:b 6]] [[:a 4] [:b 6]])) (is (experiments/stable? [[:a 4] [:b 6]] [[:a 6] [:b 4]...
null
https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/domain/test/domain/experiments_test.clj
clojure
(ns domain.experiments-test (:use clojure.test plumbing.test plumbing.core) (:require [domain.experiments :as experiments])) (deftest stable?-test (is (experiments/stable? [[:a 4]] [[:a 4]])) (is (experiments/stable? [[:a 4] [:b 6]] [[:a 4] [:b 6]])) (is (experiments/stable? [[:a 4] [:b 6]] [[:a 6] [:b 4]...
8182f2cf15328d8e4167095c3074f69e0e99fdeee98ba7736cff15101f468ba9
kupl/FixML
sub63.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 * string -> aexp = fun (aex, str) -> match aex with | Const n -> Const 0 | Var a -> if a = str then Const 1 else Var a | Power (a,b) -> if a = str then Times[Const ...
null
https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/differentiate/diff1/submissions/sub63.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 * string -> aexp = fun (aex, str) -> match aex with | Const n -> Const 0 | Var a -> if a = str then Const 1 else Var a | Power (a,b) -> if a = str then Times[Const ...
c2fde747ad5ac0da6472476bff4e5e3f2cd4b15df04f9c1dbaccf9d90c1a4d9b
tomgr/libcspm
DeclBind.hs
# LANGUAGE CPP , TypeSynonymInstances , FlexibleInstances # module CSPM.Evaluator.DeclBind ( bindDecls, ) where import Data.List (partition) import CSPM.Syntax.Names import CSPM.Syntax.AST import CSPM.Syntax.Types import CSPM.Evaluator.AnalyserMonad import CSPM.Evaluator.BuiltInFunctions import CSPM.Syntax.DataT...
null
https://raw.githubusercontent.com/tomgr/libcspm/24d1b41954191a16e3b5e388e35f5ba0915d671e/src/CSPM/Evaluator/DeclBind.hs
haskell
# SOURCE # | Given a list of declarations, returns a sequence of names bounds to values that can be passed to 'addScopeAndBind' in order to bind them in the current scope. Lookup the existing value of events and add to it Be careful with the following - it's a bit fragile with respect to generating the correct pr...
# LANGUAGE CPP , TypeSynonymInstances , FlexibleInstances # module CSPM.Evaluator.DeclBind ( bindDecls, ) where import Data.List (partition) import CSPM.Syntax.Names import CSPM.Syntax.AST import CSPM.Syntax.Types import CSPM.Evaluator.AnalyserMonad import CSPM.Evaluator.BuiltInFunctions import CSPM.Syntax.DataT...
098ea278fe2c255171b0bdf659380d599a3842e366bd632e239010fd19467219
synduce/Synduce
zero_after_one_no.ml
* @synduce --max - lifting=1 type blist = Nil | Cons of bool * blist type clist = Emp | Single of bool | Concat of clist * clist Checks some substring matches 10 * let rec spec = function | Nil -> (false, false) | Cons (hd, tl) -> let seen1, res = spec tl in (seen1 || hd, (seen1 && not hd) || res) ...
null
https://raw.githubusercontent.com/synduce/Synduce/42d970faa863365f10531b19945cbb5cfb70f134/benchmarks/incomplete/list/zero_after_one_no.ml
ocaml
* @synduce --max - lifting=1 type blist = Nil | Cons of bool * blist type clist = Emp | Single of bool | Concat of clist * clist Checks some substring matches 10 * let rec spec = function | Nil -> (false, false) | Cons (hd, tl) -> let seen1, res = spec tl in (seen1 || hd, (seen1 && not hd) || res) ...
f3c38e2aac897f353d7ad01126bde6bec89ec7cefcc512554354585ae8ccbdc7
racket/gui
comment-box.rkt
#lang scheme/base (require (for-syntax scheme/base) scheme/unit racket/class scheme/gui/base racket/runtime-path "sig.rkt" "../decorated-editor-snip.rkt" string-constants) (define-runtime-path semicolon-bitmap-path '(lib "icons/semicolon.gif")) (provide c...
null
https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/framework/private/comment-box.rkt
racket
find-containing-editor : -> (union #f editor) find-this-position : -> (union #f number) copy-contents-with-semicolons-to-position : (is-a? text%) number -> void find-last-snip : editor -> snip returns the last snip in the editor
#lang scheme/base (require (for-syntax scheme/base) scheme/unit racket/class scheme/gui/base racket/runtime-path "sig.rkt" "../decorated-editor-snip.rkt" string-constants) (define-runtime-path semicolon-bitmap-path '(lib "icons/semicolon.gif")) (provide c...
6983743beb35b417d79c8e2d89fc909f24a037377a097864648c131a8c983633
ToxicFrog/bltool
flags.clj
(ns bltool.flags (:require [clojure.core.typed :as t :refer [fn> ann]]) (:require [clojure.tools.cli :as cli])) (ann flags (t/Vec Any)) (def flags []) (ann *opts* (t/Map String String)) (def ^:dynamic *opts* {}) (ann register-flags [* -> Nothing]) (defn register-flags [& new-flags] (def flags (into flags new-f...
null
https://raw.githubusercontent.com/ToxicFrog/bltool/4148836186698b398b306790f6bd10348a5911ba/src/bltool/flags.clj
clojure
(ns bltool.flags (:require [clojure.core.typed :as t :refer [fn> ann]]) (:require [clojure.tools.cli :as cli])) (ann flags (t/Vec Any)) (def flags []) (ann *opts* (t/Map String String)) (def ^:dynamic *opts* {}) (ann register-flags [* -> Nothing]) (defn register-flags [& new-flags] (def flags (into flags new-f...
8dd8d2f66c6a991555307f0d4ed1ca74c97d757fee813000d3fe67ae0c9d8299
gowthamk/ocaml-irmin
main.ml
(* Utility functions *) U is a module with two functions module U = struct let string_of_list f l = "[ " ^ List.fold_left (fun a b -> a ^ (f b) ^ "; ") "" l ^ "]" let print_header h = Printf.printf "%s" ("\n" ^ h ^ "\n") end (* Set - AVL Tree *) let _ = U.print_header "Treedoc"; let module MkConfig (Vars: sig...
null
https://raw.githubusercontent.com/gowthamk/ocaml-irmin/54775f6c3012e87d2d0308f37a2ec7b27477e887/treedoc/main.ml
ocaml
Utility functions Set - AVL Tree * The initial document.
U is a module with two functions module U = struct let string_of_list f l = "[ " ^ List.fold_left (fun a b -> a ^ (f b) ^ "; ") "" l ^ "]" let print_header h = Printf.printf "%s" ("\n" ^ h ^ "\n") end let _ = U.print_header "Treedoc"; let module MkConfig (Vars: sig val root: string end) : Itreedoc.Config = st...
ffb1dd0f66053909c595900084f77ff843bae1670303c1243c262a627421a8e3
crategus/cl-cffi-gtk
cairo.ps-surface.lisp
;;; ---------------------------------------------------------------------------- ;;; cairo.ps-surface.lisp ;;; The documentation of the file is taken from the Cairo Reference Manual Version 1.16 and modified to document the Lisp binding to the Cairo ;;; library. See <>. The API documentation of the ;;; Lisp binding...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/22156e3e2356f71a67231d9868abcab3582356f3/cairo/cairo.ps-surface.lisp
lisp
---------------------------------------------------------------------------- cairo.ps-surface.lisp library. See <>. The API documentation of the Lisp binding is available at <-cffi-gtk/>. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public Li...
The documentation of the file is taken from the Cairo Reference Manual Version 1.16 and modified to document the Lisp binding to the Cairo Copyright ( C ) 2020 as published by the Free Software Foundation , either version 3 of the the GNU Lesser General Public License that clarifies the terms for use GNU ...
72651664494e4ace97f861ad23133914673671e9bf146a88054f2effcfabe0c2
tek/polysemy-hasql
SingletonTest.hs
module Polysemy.Hasql.Test.SingletonTest where import Data.UUID (UUID) import Polysemy.Db.Data.DbError (DbError) import qualified Polysemy.Db.Data.QueryStore as QueryStore import Polysemy.Db.Data.QueryStore (QueryStore) import Polysemy.Db.Data.Rep (Prim) import qualified Polysemy.Db.Data.Uid as Uid import Polysemy.Tes...
null
https://raw.githubusercontent.com/tek/polysemy-hasql/1cf195590fc3c356adf042ae3b0a1f9874591a74/packages/hasql/integration/Polysemy/Hasql/Test/SingletonTest.hs
haskell
module Polysemy.Hasql.Test.SingletonTest where import Data.UUID (UUID) import Polysemy.Db.Data.DbError (DbError) import qualified Polysemy.Db.Data.QueryStore as QueryStore import Polysemy.Db.Data.QueryStore (QueryStore) import Polysemy.Db.Data.Rep (Prim) import qualified Polysemy.Db.Data.Uid as Uid import Polysemy.Tes...
37d6ce5d71cd313dd77861502349bd945de2b27fe31c1167686a553afb0aea94
ocaml-multicore/ocaml-tsan
test_generator.ml
type path = int list type topdown_path = Topdown of int list let rev p = Topdown (List.rev p) module Pp = struct let int ppf d = Format.fprintf ppf "%d" d let list ~sep p ppf x = Format.pp_print_list ~pp_sep:(fun ppf () -> Format.fprintf ppf sep) p ppf x end let id ppf path = Format.fprintf ppf "%a" Pp.(list ~s...
null
https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/testsuite/tests/lib-dynlink-domains/test_generator.ml
ocaml
Link plugins Print result
type path = int list type topdown_path = Topdown of int list let rev p = Topdown (List.rev p) module Pp = struct let int ppf d = Format.fprintf ppf "%d" d let list ~sep p ppf x = Format.pp_print_list ~pp_sep:(fun ppf () -> Format.fprintf ppf sep) p ppf x end let id ppf path = Format.fprintf ppf "%a" Pp.(list ~s...
18dbb246d6dc57b0dd5755b702421079aa325f106e98f4b444adb029965dc64d
vernemq/vernemq
vmq_ql_query.erl
Copyright 2018 Erlio GmbH Basel Switzerland ( ) %% 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, sof...
null
https://raw.githubusercontent.com/vernemq/vernemq/234d253250cb5371b97ebb588622076fdabc6a5f/apps/vmq_ql/src/vmq_ql_query.erl
erlang
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 2018 Erlio GmbH Basel Switzerland ( ) Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(vmq_ql_query). -include("vmq_ql.hrl"). -behaviour(gen_server). -export([ start_link/2, fetch/3 ]). -export...
e9bd25315a21b4759f2c069df875f563a2091f3dcced969011038d90a9a178ee
ariesteam/aries
batch.clj
Copyright 2011 The ARIES Consortium ( ) ;;; ;;; This file is part of ARIES. ;;; ;;; ARIES is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , ;;; or (at your option)...
null
https://raw.githubusercontent.com/ariesteam/aries/b3fafd4640f4e7950fff3791bc4ea4c06ee4dcdf/plugins/org.integratedmodelling.aries.core/bindings/clojure/applications/batch.clj
clojure
This file is part of ARIES. ARIES is free software: you can redistribute it and/or modify or (at your option) any later version. ARIES 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. ...
Copyright 2011 The ARIES Consortium ( ) it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , You should have received a copy of the GNU General Public License (defn save-view-model "Run the view model at the given r...
5fad3c48930fdac627188478779dfbc7b017214aee99e4a9a0e0f98cd8ad3c30
haskell-CI/hackage-matrix-builder
MainWorker.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PolyKinds # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # {-# LANGUAGE TypeFamilies ...
null
https://raw.githubusercontent.com/haskell-CI/hackage-matrix-builder/bb813e9e4cf0d08352f33004c00ede987f45da56/src-exe/MainWorker.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE OverloadedStrings # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # | import qualified Data.Text.Encoding as T import System.IO.Streams.Process import System.Exit import System.Process jobs aquire write-lock during build-phases...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE PolyKinds # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # Copyright : © 2018 SPDX - License - Identifier : GPL-3.0 - or - later module Main (main)...
550993d2ed789322d9066afc4ecdc8680e9d82a668e3a02f078b99a04c120c6b
project-oak/hafnium-verification
bufferOverrunTrace.ml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/bufferoverrun/bufferOverrunTrace.ml
ocaml
offset, length
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
d67b52b7304692d6cbc30aef18fe6a0687e6c2964727f639a3470f3fe7ff35a4
b0-system/b0
b0_cmd_list.mli
--------------------------------------------------------------------------- Copyright ( c ) 2020 The b0 programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
null
https://raw.githubusercontent.com/b0-system/b0/d1b413ebb600dd387ad6ef3fc097328580fa22d9/tool-b0/b0_cmd_list.mli
ocaml
* [cmd] is the command line for [list].
--------------------------------------------------------------------------- Copyright ( c ) 2020 The b0 programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
a519c1d330afbd6b8b33ab81cfff41004446b06dbb40cc38aba6e193df13ede1
gonimo/gonimo
Internal.hs
# LANGUAGE MultiParamTypeClasses # {-# LANGUAGE RankNTypes #-} # LANGUAGE TemplateHaskell # # LANGUAGE FlexibleInstances # module Gonimo.Server.Messenger.Internal where import Control.Concurrent.STM (TVar, readTVar, writeTVar) import Control.Lens import Control.Monad.State.Class (Mon...
null
https://raw.githubusercontent.com/gonimo/gonimo/f4072db9e56f0c853a9f07e048e254eaa671283b/back/src/Gonimo/Server/Messenger/Internal.hs
haskell
# LANGUAGE RankNTypes # | Register a receiver for a given device. Any previous receiver will simply be overridden. We steal the session. Delete old one (leave any family!) | Update a given receiver's device type. | Retrieve all devices that are online in a given family. Delete old: Set new: | Delete your onl...
# LANGUAGE MultiParamTypeClasses # # LANGUAGE TemplateHaskell # # LANGUAGE FlexibleInstances # module Gonimo.Server.Messenger.Internal where import Control.Concurrent.STM (TVar, readTVar, writeTVar) import Control.Lens import Control.Monad.State.Class (MonadState, gets) import ...
a5504453726adfbc0908456c64be68676dd7e4632125b3fc340a33d95ef5bbbf
arrayfire/arrayfire-haskell
Statistics.hs
# LANGUAGE ViewPatterns # # OPTIONS_GHC -fno - warn - unused - imports # -------------------------------------------------------------------------------- -- | -- Module : ArrayFire.Statistics Copyright : ( c ) 2019 - 2020 -- License : BSD3 Maintainer : < > -- Stability : Experimental Port...
null
https://raw.githubusercontent.com/arrayfire/arrayfire-haskell/5d621602bb925ce5122a66011003498cbe638e2b/src/ArrayFire/Statistics.hs
haskell
------------------------------------------------------------------------------ | Module : ArrayFire.Statistics License : BSD3 Stability : Experimental Statistics API. Example of finding the top k elements along with their indices from an 'Array' @ >>> vals ArrayFire Array >>> indexes ArrayFir...
# LANGUAGE ViewPatterns # # OPTIONS_GHC -fno - warn - unused - imports # Copyright : ( c ) 2019 - 2020 Maintainer : < > Portability : GHC > > > let ( vals , indexes ) = ' topk ' ( ' vector ' \@'Double ' 10 [ 1 .. ] ) 3 ' TopKDefault ' [ 3 1 1 1 ] 10.0000 9.0000 8.0000 [ 3 1 1 ...
40bad7acfc39f2140675498c41e52fcb9fcc783d7c24f33362ed7b402c47204b
eait-itig/rdpproxy
rdpproxy.erl
%% %% rdpproxy %% remote desktop proxy %% Copyright 2012 - 2015 < > The University of Queensland %% All rights reserved. %% %% Redistribution and use in source and binary forms, with or without %% modification, are permitted provided that the following conditions %% are met: 1 . Redistributions of source code ...
null
https://raw.githubusercontent.com/eait-itig/rdpproxy/8739bed2050d591c0aaa4ca34755b20093feb6ee/src/rdpproxy.erl
erlang
rdpproxy remote desktop proxy All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer. notice, this list of conditions and the followi...
Copyright 2012 - 2015 < > The University of Queensland 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright THIS SOFTWARE IS PROVIDED BY THE AUTHOR ` ` AS IS '' AND ANY EXPRESS OR INCIDENTAL , SPECIAL , EXEMPLARY , OR CON...
ba0b8780ccd7603e2b591ceaded544d0bc339365ebbff2e7b46ecbfd10002985
tezos/tezos-mirror
store.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Nomadic Labs , < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/aa878d424fddb85745e5445ed89432dd9d6380cc/src/proto_016_PtMumbai/lib_sc_rollup_node/store.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 Nomadic Labs , < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN A...
272eb2f3ecb45dcfac17ee84cd5a8b2c59b68aa7a809eb4c6399c49c59035d23
songyahui/AlgebraicEffect
pagination0.ml
let sublist low high list = List.filteri (fun i _ -> i >= low && i < high) list type 'a page = Page of 'a * (unit -> 'a page) effect Request : int -> (string list) page effect ContinueFrom : int * int -> (string list) page let get n = perform (Request n) let get_from n = perform (ContinueFrom (n, n)) let databa...
null
https://raw.githubusercontent.com/songyahui/AlgebraicEffect/27688952b598a101a27523be796e8011d70b02de/src/programs.t/pagination0.ml
ocaml
let sublist low high list = List.filteri (fun i _ -> i >= low && i < high) list type 'a page = Page of 'a * (unit -> 'a page) effect Request : int -> (string list) page effect ContinueFrom : int * int -> (string list) page let get n = perform (Request n) let get_from n = perform (ContinueFrom (n, n)) let databa...
fdab1d7b11ea9c2416be8743fcf26f65e9ea1dc4f98f543418ae04734bee8ce8
REPROSEC/dolev-yao-star
Vale_Transformers_PeepHole.ml
open Prims type pre_peephole = { ph: Vale_X64_Machine_Semantics_s.ins Prims.list -> Vale_X64_Machine_Semantics_s.ins Prims.list FStar_Pervasives_Native.option ; input_hint: Prims.pos } let (__proj__Mkpre_peephole__item__ph : pre_peephole -> Vale_X64_Machine_Semantics_s.ins Prims.list -...
null
https://raw.githubusercontent.com/REPROSEC/dolev-yao-star/d97a8dd4d07f2322437f186e4db6a1f4d5ee9230/concrete/hacl-star-snapshot/ml/Vale_Transformers_PeepHole.ml
ocaml
open Prims type pre_peephole = { ph: Vale_X64_Machine_Semantics_s.ins Prims.list -> Vale_X64_Machine_Semantics_s.ins Prims.list FStar_Pervasives_Native.option ; input_hint: Prims.pos } let (__proj__Mkpre_peephole__item__ph : pre_peephole -> Vale_X64_Machine_Semantics_s.ins Prims.list -...
2d38307f9893c2587821f8a1f21b45029b8fc7be7f10a8018669b03a9032c6da
tonyfloatersu/solution-haskell-craft-of-FP
Chapter_10_my_note.hs
module Chapter_10_my_note where import Prelude hiding (unzip, last, init, getLine) import Test.QuickCheck import Test.QuickCheck.Function doubleAllv1 :: [Integer] -> [Integer] doubleAllv1 ls = [x * 2 | x <- ls] doubleAllv2 :: [Integer] -> [Integer] doubleAllv2 [] = [] double...
null
https://raw.githubusercontent.com/tonyfloatersu/solution-haskell-craft-of-FP/0d4090ef28417c82a7b01e4a764f657641cb83f3/Chapter_10_my_note.hs
haskell
picSizeComp :: Picture -> Picture -> Bool picSizeComp p1 p2 = if isReg p1 == isReg p2 else error "there is a regular pic and a irregular one" superimpose :: Picture -> Picture -> Picture superimpose = undefined compariation of figures: -----> not same regularity: ------> False now te...
module Chapter_10_my_note where import Prelude hiding (unzip, last, init, getLine) import Test.QuickCheck import Test.QuickCheck.Function doubleAllv1 :: [Integer] -> [Integer] doubleAllv1 ls = [x * 2 | x <- ls] doubleAllv2 :: [Integer] -> [Integer] doubleAllv2 [] = [] double...
5ab0f0139aa8091dae3ab5d5b9582b915e8d0857a661aa836d50f25fe52b3687
Sarcasm/.stumpwm.d
utils.lisp
;; Utility functions ;; usage: ;; (load "utils.lisp") (in-package :stumpwm) (export '(global-set-key)) (defun global-set-key (key command) "Define a global keybinding (use `*top-map*')." (define-key *top-map* key command) ) (defun run-shell-commands (commands) "Run a list of shell commands." (dolist (comm...
null
https://raw.githubusercontent.com/Sarcasm/.stumpwm.d/4b6122903b115e7349c6833fdbdabdd3264ddc63/utils.lisp
lisp
Utility functions usage: (load "utils.lisp")
(in-package :stumpwm) (export '(global-set-key)) (defun global-set-key (key command) "Define a global keybinding (use `*top-map*')." (define-key *top-map* key command) ) (defun run-shell-commands (commands) "Run a list of shell commands." (dolist (command commands) (run-shell-command command)) )
7b704db023e86b8d93867f98d484fa56ef7091cd94b236aed58ffe906a9dddcf
sgbj/MaximaSharp
dgeqrf.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 2edcbd958861 2012/05/30 03:34:52 toy $ " " f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 3fe93de3be82 2012/05/06 02:17:14 toy ...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/lapack/lapack/dgeqrf.lisp
lisp
Compiled by f2cl version: Using Lisp CMU Common Lisp 20d (20D Unicode) Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 2edcbd958861 2012/05/30 03:34:52 toy $ " " f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 3fe93de3be82 2012/05/06 02:17:14 toy $ " " f2cl6.l , v 1d5cbacbb...
8265bdb5170ce022ec5320eadfcf4fca21ec25227d49b0baa02a8ba93bc587b9
jellelicht/guix
engineering.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2015 < > Copyright © 2015 < > Copyright © 2016 < > ;;; ;;; 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 Fre...
null
https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/engineering.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 © 2015 < > Copyright © 2016 < > 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 engineering) #:use-module (guix...
3221d762b225255684f7aa7706d51cd0ae651bcf9564d90d2bfa9e842cd14c0e
nuprl/gradual-typing-performance
devils-frequency.rkt
#lang racket (module stack typed/racket (define-type (Stack A) (Listof A)) (: stack-empty? (All (A) ((Stack A) -> Boolean))) (define (stack-empty? stk) (null? stk)) (provide stack-empty?)) (require 'stack) (define my-stack (range 20)) (time (for ([_i (in-range (expt 10 6))]) (stack-empty? my-stack)))...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/paper/jfp-2016/src/devils-frequency.rkt
racket
#lang racket (module stack typed/racket (define-type (Stack A) (Listof A)) (: stack-empty? (All (A) ((Stack A) -> Boolean))) (define (stack-empty? stk) (null? stk)) (provide stack-empty?)) (require 'stack) (define my-stack (range 20)) (time (for ([_i (in-range (expt 10 6))]) (stack-empty? my-stack)))...
63ab95d84ce06f507231cebbfde19da4f598cb6618bfa2e0119aaca7f6693015
owickstrom/komposition
KeyMaps.hs
# LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} # LANGUAGE OverloadedLabels # # LANGUAGE OverloadedLists # module Komposition.Application.KeyMaps where import Komposition.Application.Base import Komposition.Composition.Insert import Ko...
null
https://raw.githubusercontent.com/owickstrom/komposition/64893d50941b90f44d77fea0dc6d30c061464cf3/src/Komposition/Application/KeyMaps.hs
haskell
# LANGUAGE GADTs # # LANGUAGE LambdaCase #
# LANGUAGE DataKinds # # LANGUAGE OverloadedLabels # # LANGUAGE OverloadedLists # module Komposition.Application.KeyMaps where import Komposition.Application.Base import Komposition.Composition.Insert import Komposition.Composition.Paste import Komposition.Focus impor...
a777aa167167b76c4858aecc4e5d02431354f6731bd0e59cf763eeb84eb1fe91
kitnil/dotfiles
web.scm
(define-module (home services web) #:use-module (gnu home services) #:use-module (gnu home services shepherd) #:use-module (guix gexp) #:use-module (guix records) #:use-module (gnu services) #:use-module (home config) #:export (home-chromium-service home-youtube-dl-service)) (define home-chro...
null
https://raw.githubusercontent.com/kitnil/dotfiles/354a101e7e2789ad37e8b0c9f4534e2a9fc55439/dotfiles/guixsd/modules/home/services/web.scm
scheme
(define-module (home services web) #:use-module (gnu home services) #:use-module (gnu home services shepherd) #:use-module (guix gexp) #:use-module (guix records) #:use-module (gnu services) #:use-module (home config) #:export (home-chromium-service home-youtube-dl-service)) (define home-chro...
cfeb9ca9d6dd3aa73dd5af2a62c46548a28eefb915ba6455669a84e1b56aac2c
msakai/nonlinear-optimization-ad
Backprop.hs
# LANGUAGE ScopedTypeVariables , Rank2Types , FlexibleContexts , CPP , TypeFamilies # # OPTIONS_GHC -Wall # -- ----------------------------------------------------------------------------- -- | -- Module : Numeric.Optimization.Algorithms.HagerZhang05.Backprop Copyright : ( c ) 2020 -- License : GPL...
null
https://raw.githubusercontent.com/msakai/nonlinear-optimization-ad/06ddf7f100a37afba13cf8ac53e3c5526caf8f60/nonlinear-optimization-backprop/src/Numeric/Optimization/Algorithms/HagerZhang05/Backprop.hs
haskell
--------------------------------------------------------------------------- | Module : Numeric.Optimization.Algorithms.HagerZhang05.Backprop License : GPL Maintainer : Stability : experimental Portability : non-portable This package enhance [nonlinear-optimization](-optimization)'s usabil...
# LANGUAGE ScopedTypeVariables , Rank2Types , FlexibleContexts , CPP , TypeFamilies # # OPTIONS_GHC -Wall # Copyright : ( c ) 2020 module Numeric.Optimization.Algorithms.HagerZhang05.Backprop optimize , Result(..) , Statistics(..) , defaultParameters , Parameters(..) , Verbose(..) , LineSearch(...
a5dcdab1fb8068efe7aea81d6553244c6efda3eaf638223b0fff47834b62a674
mukul-rathi/bolt
type_data_races_functions.mli
* This module is responsible for checking the the desugared AST functions for data races open Core open Desugaring.Desugared_ast val type_data_races_function_defn : class_defn list -> function_defn list -> ignore_data_races:bool -> function_defn -> function_defn Or_error.t (** If ignore_data_races flag s...
null
https://raw.githubusercontent.com/mukul-rathi/bolt/1faf19d698852fdb6af2ee005a5f036ee1c76503/src/frontend/data_race_checker/type_data_races_functions.mli
ocaml
* If ignore_data_races flag set, will check capabilities but won't enforce constraints.
* This module is responsible for checking the the desugared AST functions for data races open Core open Desugaring.Desugared_ast val type_data_races_function_defn : class_defn list -> function_defn list -> ignore_data_races:bool -> function_defn -> function_defn Or_error.t
d3c6b8246f6e8df5f2c8826396cf8bf9ea59b4612e725d78077bc9139eb974b5
Lysxia/test-monad-laws
Cont.hs
# LANGUAGE ScopedTypeVariables # module Test.Monad.Cont where import Control.Monad.Cont import Data.Void (absurd) import Test.QuickCheck.HigherOrder (Equation(..)) * ' MonadCont ' laws These are derived from [ here]( / pipermail / libraries/2019 - October/030041.html ) -- | 'callCC' has no effects other than pa...
null
https://raw.githubusercontent.com/Lysxia/test-monad-laws/1cb9e116769771cb49fbd1614f50b05e120a2709/src/Test/Monad/Cont.hs
haskell
| 'callCC' has no effects other than passing the continuation to the provided function. @ 'callCC' ('const' x) = x @ | The continuation given returns the value passed to it, and not some other one. @ 'callCC' ('$' x) = 'pure' x @ | The continuation given returns the value passed to it, whether it's pure or...
# LANGUAGE ScopedTypeVariables # module Test.Monad.Cont where import Control.Monad.Cont import Data.Void (absurd) import Test.QuickCheck.HigherOrder (Equation(..)) * ' MonadCont ' laws These are derived from [ here]( / pipermail / libraries/2019 - October/030041.html ) callCC_const :: forall m a. MonadCont m =>...
f4ae956525147eaa1fa222f168f901e7ba4a758ac441dc43ba49cb5161b28118
jimweirich/sicp-study
ex3_1_test.scm
SICP Tests 3.1 -- (test-case "Ex 3.1 -- make-accumulator" (let ((a (make-accumulator 5))) (assert-equal 15 (a 10)) (assert-equal 25 (a 10))))
null
https://raw.githubusercontent.com/jimweirich/sicp-study/bc5190e04ed6ae321107ed6149241f26efc1b8c8/scheme/chapter3/ex3_1_test.scm
scheme
SICP Tests 3.1 -- (test-case "Ex 3.1 -- make-accumulator" (let ((a (make-accumulator 5))) (assert-equal 15 (a 10)) (assert-equal 25 (a 10))))
cb56b6be46fe829a9557acafd49ce62219a5b32ce29e2126d6ae45b5a784435e
bos/rwh
QC-basics.hs
{-- snippet module --} import Test.QuickCheck import Data.List {-- /snippet module --} -- Simple model testing - snippet mysort - qsort :: Ord a => [a] -> [a] qsort [] = [] qsort (x:xs) = qsort lhs ++ [x] ++ qsort rhs where lhs = filter (< x) xs rhs = filter (>= x) xs - /snippet mysort - {-- snipp...
null
https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch12/QC-basics.hs
haskell
- snippet module - - /snippet module - Simple model testing - snippet idempotent - - /snippet idempotent - - snippet relatives_wrong - - /snippet relatives_wrong - - snippet relatives_right - - /snippet relatives_right - - snippet relatives - - /snippet relatives - - snippet model - - /snippet model - Generating rand...
import Test.QuickCheck import Data.List - snippet mysort - qsort :: Ord a => [a] -> [a] qsort [] = [] qsort (x:xs) = qsort lhs ++ [x] ++ qsort rhs where lhs = filter (< x) xs rhs = filter (>= x) xs - /snippet mysort - prop_idempotent xs = qsort (qsort xs) == qsort xs prop_minimum xs = hea...
71202538464468f7e8ad3779ff83c6a7d2a9516c088f9f3ec69acaae157c99e9
f-me/carma-public
CarClass.hs
# LANGUAGE TemplateHaskell # module Carma.Model.CarClass where import Data.Text import Data.Typeable import Data.Vector import Data.Model import Data.Model.TH import Data.Model.View import Carma.Model.Types() import Carma.Model.PgTypes() data CarClass = CarClass { ident :: PK Int CarClass "Класс автомобиля" ...
null
https://raw.githubusercontent.com/f-me/carma-public/82a9f44f7d919e54daa4114aa08dfec58b01009b/carma-models/src/Carma/Model/CarClass.hs
haskell
# LANGUAGE TemplateHaskell # module Carma.Model.CarClass where import Data.Text import Data.Typeable import Data.Vector import Data.Model import Data.Model.TH import Data.Model.View import Carma.Model.Types() import Carma.Model.PgTypes() data CarClass = CarClass { ident :: PK Int CarClass "Класс автомобиля" ...
1b2597e4b34166ad1f5afc866d96f70b3f4d46e283f454731af1af9112ebfc5c
rabbitmq/ra-kv-store
timeline.clj
(ns jepsen.checker.timeline "Renders an HTML timeline of a history." (:require [clojure.core.reducers :as r] [clojure.string :as str] [clj-time.coerce :as t-coerce] [hiccup.core :as h] [knossos.history :as history] [jepsen.util :as util :refer [name+ pprin...
null
https://raw.githubusercontent.com/rabbitmq/ra-kv-store/faf36863bb3822ef4dcd99de5635007273d35997/jepsen/jepsen/src/jepsen/checker/timeline.clj
clojure
Info following invoke Unmatched info
(ns jepsen.checker.timeline "Renders an HTML timeline of a history." (:require [clojure.core.reducers :as r] [clojure.string :as str] [clj-time.coerce :as t-coerce] [hiccup.core :as h] [knossos.history :as history] [jepsen.util :as util :refer [name+ pprin...
6e04ce7adc2940013d0b4b81203132f50af5e00af85f544c6837718e00b46acf
rtoy/ansi-cl-tests
fround.lsp
;-*- Mode: Lisp -*- Author : Created : Thu Aug 21 16:07:59 2003 ;;;; Contains: Tests of FROUND (in-package :cl-test) (compile-and-load "numbers-aux.lsp") (compile-and-load "fround-aux.lsp") ;;; Error tests (deftest fround.error.1 (signals-error (fround) program-error) t) (deftest fround.error.2 ...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/fround.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of FROUND Error tests Non-error tests
Author : Created : Thu Aug 21 16:07:59 2003 (in-package :cl-test) (compile-and-load "numbers-aux.lsp") (compile-and-load "fround-aux.lsp") (deftest fround.error.1 (signals-error (fround) program-error) t) (deftest fround.error.2 (signals-error (fround 1.0 1 nil) program-error) t) (deftest frou...
5cc53ee7653d0f4430918380f05c382aeef4e6831e41a002019e8088f9e6243f
fukamachi/lack
test.lisp
(in-package :cl-user) (defpackage lack.test (:use :cl) (:import-from :quri :uri :uri-path :uri-query :merge-uris :render-uri :url-encode-params) (:import-from :cl-cookie :make-cookie-jar ...
null
https://raw.githubusercontent.com/fukamachi/lack/c2edb842247ced0071dc21987f97629575667fe8/src/test.lisp
lisp
default headers Seems that all Clack handlers put into this field only pathname with GET parameters set-cookie)))))) XXX: Framework sometimes return '(NIL) as body TODO: support pathname TODO: check if the response content-type is text/binary
(in-package :cl-user) (defpackage lack.test (:use :cl) (:import-from :quri :uri :uri-path :uri-query :merge-uris :render-uri :url-encode-params) (:import-from :cl-cookie :make-cookie-jar ...
381d02d71ffc559c65f95cf3df7d73565cdfe4e89985767ca54a886b2bda14e8
haroldcarr/learn-haskell-coq-ml-etc
capslocker.hs
import Data.Char main = do contents <- getContents putStr (map toUpper contents)
null
https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/book/2011-Learn_You_a_Haskell/capslocker.hs
haskell
import Data.Char main = do contents <- getContents putStr (map toUpper contents)
0f6eabb2cc8d11c0a5843b9bfcde4cce3217cd8bbc1ce1a49b74b28ae4d4759c
racket/plot
13620.rkt
#lang racket (require rackunit plot plot/utils racket/draw racket/runtime-path "../helpers.rkt") ;; -bugs/blob/7e4bb9a65cd4783bef9936b576c5e06a5da3fb01/all/13620 (define (do-plot-contour-intervals output-fn) (output-fn (contour-intervals * -1 1 -1 1 #:alphas '()))) (def...
null
https://raw.githubusercontent.com/racket/plot/c4126001f2c609e36c3aa12f300e9c673ab1a806/plot-test/plot/tests/PRs/13620.rkt
racket
-bugs/blob/7e4bb9a65cd4783bef9936b576c5e06a5da3fb01/all/13620 Should fail with a "could not determine sensible plot bounds" message Should fail with a "could not determine sensible plot bounds" message
#lang racket (require rackunit plot plot/utils racket/draw racket/runtime-path "../helpers.rkt") (define (do-plot-contour-intervals output-fn) (output-fn (contour-intervals * -1 1 -1 1 #:alphas '()))) (define (do-plot-contour-intervals3d output-fn) (output-fn (contour...
686df0514ee5202d16c44eb1437cc2ab8f062aa75ecd3f1ac3289fbd18bbd41f
grin-compiler/ghc-wpc-sample-programs
FileName.hs
# LANGUAGE CPP # {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE GeneralizedNewtypeDeriving # {-| Operations on file names. -} module Agda.Utils.FileName ( AbsolutePath(AbsolutePath) , filePath , mkAbsolute , absolute , (===) , doesFileExistCaseSensitive , rootPath ) wher...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/Agda-2.6.1/src/full/Agda/Utils/FileName.hs
haskell
# LANGUAGE DeriveDataTypeable # | Operations on file names. | Paths which are known to be absolute. paths point to the same files or directories. | Extract the 'AbsolutePath' to be used as 'FilePath'. The following instance is deprecated, and Pretty should be used instead. Later, simply derive Show for ...
# LANGUAGE CPP # # LANGUAGE GeneralizedNewtypeDeriving # module Agda.Utils.FileName ( AbsolutePath(AbsolutePath) , filePath , mkAbsolute , absolute , (===) , doesFileExistCaseSensitive , rootPath ) where import System.Directory import System.FilePath #ifdef mingw32_HOST_OS imp...
6c7e257639df976892029d114dd764145b997c678d9644baa7af83e33222b0ca
brendanzab/language-garden
ShaderTypes.ml
(** {0 Common types used in GPU shader languages} *) * { 1 Type level natural numbers } * A type that represents the number zero , i.e. [ 0 ] type zero = private Z (** A type that represents the successor of ['n], i.e. ['n + 1] *) type 'n succ = private Succ of 'n * { 2 Natural number constants } type n0 = zero t...
null
https://raw.githubusercontent.com/brendanzab/language-garden/d73b3e95dc7206f02c2a8ecc96c7aac10db4cc9e/lang-shader-graphics/lib/ShaderTypes.ml
ocaml
* {0 Common types used in GPU shader languages} * A type that represents the successor of ['n], i.e. ['n + 1] * These are useful for expressing the idea that a number must be at least a certian natural number * Vectors indexed with a statically known size. This is not a very efficient representation, but we ...
* { 1 Type level natural numbers } * A type that represents the number zero , i.e. [ 0 ] type zero = private Z type 'n succ = private Succ of 'n * { 2 Natural number constants } type n0 = zero type n1 = n0 succ type n2 = n1 succ type n3 = n2 succ type n4 = n3 succ * { 2 Greater - than or equal to constants } t...
1d194772b117652cb5bf13314c0a95bce9d219ff4b7e3f4cd8a88811a98b727b
mirage/irmin-rpc
config.ml
open Mirage let main = foreign ~packages:[ package "duration"; package "irmin-rpc-mirage" ] "Unikernel.Main" (random @-> mclock @-> pclock @-> time @-> stackv4 @-> job) let stack = static_ipv4_stack default_network let packages = [ package "digestif" ] let () = register ~packages "irmin-rpc" [ ...
null
https://raw.githubusercontent.com/mirage/irmin-rpc/d5d556830db794551f83da945579933e4d06691d/examples/mirage/config.ml
ocaml
open Mirage let main = foreign ~packages:[ package "duration"; package "irmin-rpc-mirage" ] "Unikernel.Main" (random @-> mclock @-> pclock @-> time @-> stackv4 @-> job) let stack = static_ipv4_stack default_network let packages = [ package "digestif" ] let () = register ~packages "irmin-rpc" [ ...
1772e95cb515abd75d764fe3bfd3e57cb78daf6ded4137b6e56d6a4085438354
SamB/coq
hashcons.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/lib/hashcons.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** Hash consing of datastructures Th...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * $ Id$ [ t ] is the t...
94d0f6f3dac93c588f38dde3bccc96424733ba87ce9f52d8e830172af20e00bd
WorksHub/client
issue.cljc
(ns wh.common.issue (:require #?(:clj [clj-time.coerce :as tc] :cljs [cljs-time.coerce :as tc]) #?(:clj [clj-time.format :as tf] :cljs [cljs-time.format :as tf]) [clojure.string :as str] [wh.common.cases :as cases] [wh.util :as util])) (defn gql-issue->issue [issue] (-> issue ...
null
https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/common/src/wh/common/issue.cljc
clojure
(ns wh.common.issue (:require #?(:clj [clj-time.coerce :as tc] :cljs [cljs-time.coerce :as tc]) #?(:clj [clj-time.format :as tf] :cljs [cljs-time.format :as tf]) [clojure.string :as str] [wh.common.cases :as cases] [wh.util :as util])) (defn gql-issue->issue [issue] (-> issue ...
976538658410d7dc49f7ff2f2a32d8bca61aac2c3b9b3acc2baecda715fc19a9
brendanhay/amazonka
GetFolderPath.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE StrictData #-} # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - binds # # OPTIONS_GHC -fno - warn - unused -...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-workdocs/gen/Amazonka/WorkDocs/GetFolderPath.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Module : Amazonka.WorkDocs.GetFolderPath Stability : auto-generated Retrieves the path information (the hierarchy from the root folder) for the specified folder. the requested folder and only includes the IDs of the parent folders in the path. You...
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - binds # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # De...
b582135622a4be4308f7d9adc090d051b032ef1e5317d576ef5e355c3ed5a0c1
mirage/ocaml-xenstore-server
xs_client_unix.ml
* Copyright ( C ) Citrix Systems Inc. * * 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 ; version 2.1 only . with the special * exception on linking described in file LI...
null
https://raw.githubusercontent.com/mirage/ocaml-xenstore-server/2a8ae397d2f9291107b5d9e9cfc6085fde8c0982/legacy_unix/xs_client_unix.ml
ocaml
we never care about events or ordering, only paths we need to stop watching and clean up * Register that a watched path has been changed * Return a set of modified paths, or an empty set if we're cancelling * Called to shutdown the watcher and trigger an orderly cleanup Represents a single acive connection to a...
* Copyright ( C ) Citrix Systems Inc. * * 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 ; version 2.1 only . with the special * exception on linking described in file LI...
64d3d8dc29662165c974bded3ac5412bdcd40748cf35501d864473c0c9a0dc74
janestreet/core
fqueue_tests.ml
open Core let%test_unit "Fqueue round trip via list" = Quickcheck.test (List.quickcheck_generator Int.quickcheck_generator) ~sexp_of:[%sexp_of: int list] ~f:(fun a -> let b = Fqueue.of_list a in let c = Fqueue.to_list b in let d = Fqueue.of_list c in [%test_result: int list] ~expe...
null
https://raw.githubusercontent.com/janestreet/core/4b6635d206f7adcfac8324820d246299d6f572fe/core/test/fqueue_tests.ml
ocaml
open Core let%test_unit "Fqueue round trip via list" = Quickcheck.test (List.quickcheck_generator Int.quickcheck_generator) ~sexp_of:[%sexp_of: int list] ~f:(fun a -> let b = Fqueue.of_list a in let c = Fqueue.to_list b in let d = Fqueue.of_list c in [%test_result: int list] ~expe...
71c9cc848747340ef381507dcb1a6c4046e3924c4006700aaf7dd8b660df4885
wh5a/thih
TIMain.hs
------------------------------------------------------------------------------ Copyright : and The Hatchet Team ( see file Contributors ) Module : TIMain Description : The main components of the type inferenc...
null
https://raw.githubusercontent.com/wh5a/thih/dc5cb16ba4e998097135beb0c7b0b416cac7bfae/hatchet/TIMain.hs
haskell
---------------------------------------------------------------------------- ---------------------------------------------------------------------------- -----------------------------------------------------------------------------} almost everything -------------------------------------------------------------------...
Copyright : and The Hatchet Team ( see file Contributors ) Module : TIMain Description : The main components of the type inference algorithm . Primary Authors : ...
252a32a9b3939787a9972dcad29addb0b722015235d326ca8ac104782f4f1d9f
sadiqj/ocaml-esp32
aliases.ml
module C = Char;; C.chr 66;; module C' : module type of Char = C;; C'.chr 66;; module C3 = struct include Char end;; C3.chr 66;; [%%expect{| module C = Char - : char = 'B' module C' : sig external code : char -> int = "%identity" val chr : int -> char val escaped : char -> string val lowercase : cha...
null
https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/testsuite/tests/typing-modules/aliases.ml
ocaml
does not alias X sound, but should probably fail Applicative functors This works thanks to abbreviations Does not work yet XXX PR#6307 ok should succeed too Counter example: why we need to be careful with PR#6307 keep alias fail (* if the above succeeded, one could break invariants should suc...
module C = Char;; C.chr 66;; module C' : module type of Char = C;; C'.chr 66;; module C3 = struct include Char end;; C3.chr 66;; [%%expect{| module C = Char - : char = 'B' module C' : sig external code : char -> int = "%identity" val chr : int -> char val escaped : char -> string val lowercase : cha...
94ed81f92e055d563a046620537d22f41e76a526425f45f5dab5369e4ff2abef
ygrek/mldonkey
commonResult.ml
Copyright 2001 , 2002 b8_bavard , b8_fee_carabine , This file is part of mldonkey . mldonkey 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 2 of the License , or ...
null
https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/daemon/common/commonResult.ml
ocaml
Update specific tags to highest value Temporarily download results only from the network that returned the result
Copyright 2001 , 2002 b8_bavard , b8_fee_carabine , This file is part of mldonkey . mldonkey 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 2 of the License , or ...
aab30732e537f0411b1eb494fea4a52d1f09aebb1ce43848c73deea2080706f3
den1k/vimsical
subs.cljc
(ns vimsical.frontend.vims.subs (:require [re-frame.core :as re-frame] [vimsical.vims :as vims] [vimsical.queries.vims :as queries.vims] [vimsical.vcs.branch :as vcs.branch])) (re-frame/reg-sub ::vims (fn [[_ {vims-uid :db/uid}]] (re-frame/subscribe [:q queries.vims/pull-quer...
null
https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/src/frontend/vimsical/frontend/vims/subs.cljc
clojure
(ns vimsical.frontend.vims.subs (:require [re-frame.core :as re-frame] [vimsical.vims :as vims] [vimsical.queries.vims :as queries.vims] [vimsical.vcs.branch :as vcs.branch])) (re-frame/reg-sub ::vims (fn [[_ {vims-uid :db/uid}]] (re-frame/subscribe [:q queries.vims/pull-quer...
68948e260497e29f7adbec40426ec5e2cce8f958424b140c6c70c7bfc4738586
modular-macros/ocaml-macros
bank.ml
(* The bank account example, using events and channels *) open Printf open Event type account = int channel * int channel let account (put_ch, get_ch) = let rec acc balance = select [ wrap (send get_ch balance) (fun () -> acc balance); wrap (receive put_ch) (fun amount -> if balance + amoun...
null
https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/lib-threads/bank.ml
ocaml
The bank account example, using events and channels
open Printf open Event type account = int channel * int channel let account (put_ch, get_ch) = let rec acc balance = select [ wrap (send get_ch balance) (fun () -> acc balance); wrap (receive put_ch) (fun amount -> if balance + amount < 0 then failwith "negative balance"; acc (balan...
22fd99b3cff7b1bf83a81c1edd1ac966ac40228a4b1f7ad6216af2696d601533
ruricolist/overlord
types.lisp
(defpackage :overlord/types (:use :cl :alexandria :serapeum :uiop/pathname) (:import-from :uiop/stream :default-temporary-directory) (:import-from :uiop :getcwd) (:import-from :trivia :match :let-match1 :ematch :multiple-value-ematch) (:import-from :fset :compare :compare-slots :define-cross-type-comp...
null
https://raw.githubusercontent.com/ruricolist/overlord/974192157da55ad548f82ec8983590cf19629196/types.lisp
lisp
Conditions. General types. Symbols Conditions. General types. We don't check that every element is of type A (that could be expensive) but, if `null' is not a subtype of A, then we do check that `nil' is not present in the list. It is not sound, but it is useful. XXX Not, of course, recursive, but still catch...
(defpackage :overlord/types (:use :cl :alexandria :serapeum :uiop/pathname) (:import-from :uiop/stream :default-temporary-directory) (:import-from :uiop :getcwd) (:import-from :trivia :match :let-match1 :ematch :multiple-value-ematch) (:import-from :fset :compare :compare-slots :define-cross-type-comp...
e640901b43d5fd7067e10ae4bd8f5129cbb68155e740ec042dcd5f69786029a0
theoremprover-museum/LCF77
ol2.lsp
(PUTPROP (QUOTE variant) 2 (QUOTE NUMARGS)) (PUTPROP (QUOTE variant) (MKTIDY (QUOTE ((term # (term list)) /-> term))) (QUOTE MLTYPE)) (DML' aconvform 2 ALPHACONV ((form # form) /-> bool)) (DML' aconvterm 2 ALPHACONV ((term # term) /-> bool)) (DML' termfrees 1 FREEVARS (term /-> (term list))) (DML' formfrees 1 FREEVARS ...
null
https://raw.githubusercontent.com/theoremprover-museum/LCF77/7a43e95deee18ae37389d98e184b38fdfb3df923/src/ol2.lsp
lisp
(PUTPROP (QUOTE variant) 2 (QUOTE NUMARGS)) (PUTPROP (QUOTE variant) (MKTIDY (QUOTE ((term # (term list)) /-> term))) (QUOTE MLTYPE)) (DML' aconvform 2 ALPHACONV ((form # form) /-> bool)) (DML' aconvterm 2 ALPHACONV ((term # term) /-> bool)) (DML' termfrees 1 FREEVARS (term /-> (term list))) (DML' formfrees 1 FREEVARS ...
5f503e0e6090ed2c15888eb037c33d236d8489a47eb8d547d18c584e89cf8f35
finnishtransportagency/harja
main.cljs
(ns harja.asiakas.main (:require [harja.atom] [harja.asiakas.ymparisto :as ymparisto] [harja.views.main :as main-view] [harja.asiakas.tapahtumat :as t] [harja.asiakas.kommunikaatio :as k] [harja.virhekasittely :as v] [harja.tiedot.hallintayksikot...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/488b1e096f0611e175221d74ba4f2ffed6bea8f1/src/cljs/harja/asiakas/main.cljs
clojure
(ns harja.asiakas.main (:require [harja.atom] [harja.asiakas.ymparisto :as ymparisto] [harja.views.main :as main-view] [harja.asiakas.tapahtumat :as t] [harja.asiakas.kommunikaatio :as k] [harja.virhekasittely :as v] [harja.tiedot.hallintayksikot...
8b3ffdc10a334bbfe49388136f7cedf11f25f140a89cbe21275e8582a58639cf
Enecuum/Node
Lens.hs
# LANGUAGE FunctionalDependencies # {-# LANGUAGE TemplateHaskell #-} module Enecuum.Samples.Blockchain.DB.Lens where import Enecuum.Prelude import Control.Lens (Getter, to, makeFieldsNoPrefix) import Enecuum.Samples.Blockchain.DB.Model import Enecuum.Samples.Blockchain...
null
https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/src/Enecuum/Samples/Blockchain/DB/Lens.hs
haskell
# LANGUAGE TemplateHaskell #
# LANGUAGE FunctionalDependencies # module Enecuum.Samples.Blockchain.DB.Lens where import Enecuum.Prelude import Control.Lens (Getter, to, makeFieldsNoPrefix) import Enecuum.Samples.Blockchain.DB.Model import Enecuum.Samples.Blockchain.DB.Entities import qualified Enecuum.Co...
00f2963101c2115bed57210858799003186aea127b1b1b1a470d3e506acffd8a
vikram/lisplibraries
redirect.lisp
;; -*- lisp -*- (in-package :it.bese.ucw) ;;;; ** Redirect (defclass redirect-component () ((target :accessor target :initarg :target)) (:metaclass standard-component-class) (:documentation "Send a client redirect. This component, which must be used as a window-component, redirects the client to the url speci...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/ucw-boxset/ucw_dev/src/components/redirect.lisp
lisp
-*- lisp -*- ** Redirect All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following...
(in-package :it.bese.ucw) (defclass redirect-component () ((target :accessor target :initarg :target)) (:metaclass standard-component-class) (:documentation "Send a client redirect. This component, which must be used as a window-component, redirects the client to the url specified in the target slot. A 302 (a...
29a481d2c68468b9ed153137686d702b66885d94dfa6b82e42b892639b97ebb3
evilmartians/foundry
unicode.mli
(* Single encoded code points. *) type utf8 type utf16 type utf32 = private int (* Encoded unicode strings *) type utf8s = private string type utf16s = private int list type utf32s = private int list (* The number of trailing octets *) val utf8_length : char -> int Validate representation val adopt_utf32 : int -> ...
null
https://raw.githubusercontent.com/evilmartians/foundry/ce947c7dcca79ab7a7ce25870e9fc0eb15e9c2bd/vendor/ucs/lib/unicode.mli
ocaml
Single encoded code points. Encoded unicode strings The number of trailing octets Import without validation. Use with care! List of characters to string String to list of characters Single UTF-16 of single UTF-8/32 Single UTF-32 of single UTF-8/16 Conversion to OCaml string A standard library overlay...
type utf8 type utf16 type utf32 = private int type utf8s = private string type utf16s = private int list type utf32s = private int list val utf8_length : char -> int Validate representation val adopt_utf32 : int -> utf32 val adopt_utf8s : string -> utf8s val adopt_utf16s : int list -> utf16s val adopt_utf32s : in...
aae90ef0341fdcf1fbfa34a004c94c703e4ea6271bd2b771d6a500aae0eb39eb
lspitzner/brittany
Test336.hs
-- brittany { lconfig_indentPolicy: IndentPolicyMultiple } foo = bar this is the first argument this is the second argument this is the third argument , now I 'll skip one comment arg4 this is the fifth argument this is the sixth argument
null
https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test336.hs
haskell
brittany { lconfig_indentPolicy: IndentPolicyMultiple }
foo = bar this is the first argument this is the second argument this is the third argument , now I 'll skip one comment arg4 this is the fifth argument this is the sixth argument
1134e6c3346be88ce662c9867631fc6ed60ff1dc9e63d07fa1a7080f047fb207
databrary/databrary
Authorize.hs
{-# LANGUAGE OverloadedStrings #-} module View.Authorize ( authorizeSiteTitle , htmlAuthorizeForm ) where import qualified Data.ByteString.Char8 as BSC import qualified Data.Text as T import qualified Store.Config as C import Service.Messages import Action import View.Form import Model.Party import Model.Permis...
null
https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/View/Authorize.hs
haskell
# LANGUAGE OverloadedStrings # # SOURCE #
module View.Authorize ( authorizeSiteTitle , htmlAuthorizeForm ) where import qualified Data.ByteString.Char8 as BSC import qualified Data.Text as T import qualified Store.Config as C import Service.Messages import Action import View.Form import Model.Party import Model.Permission import Model.Authorize import ...
34e47d6dcc7c29cda3b5f8d8f0830ea685f1adce5b0732b363212c82ef3a9c61
racket/drdr
metadata.rkt
#lang racket/base (require racket/path racket/match racket/list racket/contract/base racket/string racket/set "status.rkt" "path-utils.rkt" "dirstruct.rkt" "scm.rkt") (module+ test (require rackunit)) (define (path-command-line a-path a...
null
https://raw.githubusercontent.com/racket/drdr/a3e5e778a1c19e7312b98bab25ed95075783f896/metadata.rkt
racket
#lang racket/base (require racket/path racket/match racket/list racket/contract/base racket/string racket/set "status.rkt" "path-utils.rkt" "dirstruct.rkt" "scm.rkt") (module+ test (require rackunit)) (define (path-command-line a-path a...
7eec0548716003a23d8895a80faacbc159b2ca341867e8c25e4317c03da5858f
xapi-project/xen-api
xapi_pool_update.ml
* Copyright ( C ) 2006 - 2016 Citrix Systems Inc. * * 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 ; version 2.1 only . with the special * exception on linking describe...
null
https://raw.githubusercontent.com/xapi-project/xen-api/b6f17fd39f75f8255e72a1e78185bca22a7b532f/ocaml/xapi/xapi_pool_update.ml
ocaml
* true = all hosts in a pool must have this update * Mount a filesystem somewhere, with optional type not mounted yum config example [main] keepcache=0 reposdir=/dev/null gpgcheck=$signed repo_gpgcheck=$signed installonlypkgs= group_command=compat [$label] name=$label baseurl=url ${...
* Copyright ( C ) 2006 - 2016 Citrix Systems Inc. * * 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 ; version 2.1 only . with the special * exception on linking describe...
200824127f0606f5dd3ca1617cf53aa09aaf3fb180b0229419401c0cdce6f493
groundedsage/VeganBN-website
web.cljc
(ns vbn.web #?(:cljs (:require-macros [vbn.styler :refer [css at-media]])) (:require [rum.core :as rum] [vbn.atoms :as atom] [vbn.molecules :as molecule] #?(:clj [vbn.styler :refer [css at-media get-css-str]]))) (def pricing-options [(css {:border-style "outset" ...
null
https://raw.githubusercontent.com/groundedsage/VeganBN-website/d04ebf49f409b7a1dfce98344556b479697995ae/src/cljc/vbn/web.cljc
clojure
FIXBELOW - make brand-color FIXBELOW - make brand-dark PAGE COMPONENTS ;;;;;;;;;; OUR PROCESS {:style {:margin-top "0"}} REASONS TO CHOOSE FULL SLICE PRINCIPLES .principle.make-top-margin CONTACT FORM FULL SLICE PRICING SECTION FULL SLICE .circle FIXBELOW <- won't need th...
(ns vbn.web #?(:cljs (:require-macros [vbn.styler :refer [css at-media]])) (:require [rum.core :as rum] [vbn.atoms :as atom] [vbn.molecules :as molecule] #?(:clj [vbn.styler :refer [css at-media get-css-str]]))) (def pricing-options [(css {:border-style "outset" ...
52828cb0861810bbfb9c1c9bc9a412b12a87758f5a4053d8c95e272289503733
haroldcarr/learn-haskell-coq-ml-etc
XFollowerLoggedOut.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE RecordWildCards # module XFollowerLoggedOut where import XActionOutput import XClien...
null
https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/program-structure/2019-01-hc-example-based-on-adjointio-raft/src/XFollowerLoggedOut.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # ---------------------------------------------------------------------------- ------------------------------------------------------------------------------ -----------------------------------------------------------------------...
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # module XFollowerLoggedOut where import XActionOutput import XClient import XEventInput import XMonad import XNodeState import XPers...
cdeb7fb23f71ba681d3c4793f7615f16d0709f07c19809ad8d47c253747ebcd0
seanirby/koeeoadi
faces.cljs
(ns koeeoadi.components.faces (:require [goog.dom :as gdom] [goog.style :as gstyle] [om.next :as om :refer-macros [defui]] [om.dom :as dom] [koeeoadi.components.palette :refer [Color]] [koeeoadi.util :as util] [koeeoadi.reconciler :refer [reconci...
null
https://raw.githubusercontent.com/seanirby/koeeoadi/481dc31e023e0a54ee5248bd2ef06a56e7d1d64d/src/cljs/koeeoadi/components/faces.cljs
clojure
(ns koeeoadi.components.faces (:require [goog.dom :as gdom] [goog.style :as gstyle] [om.next :as om :refer-macros [defui]] [om.dom :as dom] [koeeoadi.components.palette :refer [Color]] [koeeoadi.util :as util] [koeeoadi.reconciler :refer [reconci...
2a0c02c632a4a66eb8ff0975c997750905cf72c2638e1c62591f220f680d83a4
inaka/lsl
lsl_single_session_handler.erl
%%% @doc /sessions/:session_token handler -module(lsl_single_session_handler). -author(''). -behaviour(trails_handler). -include_lib("mixer/include/mixer.hrl"). -mixin([{ sr_single_entity_handler , [ init/3 , rest_init/2 , allowed_methods/2 , resource_exists/2 , delete_...
null
https://raw.githubusercontent.com/inaka/lsl/fdb5690fa51bc2f7fe8b50a22caca78fd9d8a7a5/src/handlers/lsl_single_session_handler.erl
erlang
@doc /sessions/:session_token handler
-module(lsl_single_session_handler). -author(''). -behaviour(trails_handler). -include_lib("mixer/include/mixer.hrl"). -mixin([{ sr_single_entity_handler , [ init/3 , rest_init/2 , allowed_methods/2 , resource_exists/2 , delete_resource/2 ] }]). -expo...
69ae1437134033cbc039595033d7726950e9987db4d079e4fa1d2078e7249c5a
expipiplus1/exact-real
Floating.hs
# LANGUAGE NoMonomorphismRestriction # # LANGUAGE ScopedTypeVariables # module Floating ( floating ) where import Fractional (fractional) import System.Random (Random) import Test.QuickCheck.Checkers (EqProp, (=-=), inverseL) import Test.QuickCheck.Extra (UnitInterval(..), Tiny(..), BiunitInterval) import Test.Ta...
null
https://raw.githubusercontent.com/expipiplus1/exact-real/6b76f5d6d06ffcfde67311726376217254688332/test/Floating.hs
haskell
TODO: Use open interval Use <= here because of precision issues :(
# LANGUAGE NoMonomorphismRestriction # # LANGUAGE ScopedTypeVariables # module Floating ( floating ) where import Fractional (fractional) import System.Random (Random) import Test.QuickCheck.Checkers (EqProp, (=-=), inverseL) import Test.QuickCheck.Extra (UnitInterval(..), Tiny(..), BiunitInterval) import Test.Ta...
deff6fe44894359d52dbe86eba4ff070f49a32a8ad068fedb7bf087cba434d53
lipas-liikuntapaikat/lipas
events.cljs
(ns lipas.ui.accessibility.events (:require [ajax.core :as ajax] [lipas.utils :as cutils] [re-frame.core :as re-frame])) (re-frame/reg-event-fx ::get-statements (fn [{:keys [db]} [_ lipas-id]] {:db (assoc-in db [:accessibility :loading?] true) :http-xhrio {:method :post :params ...
null
https://raw.githubusercontent.com/lipas-liikuntapaikat/lipas/f60185b597d2a7fca5480b392cd33187bccfb34a/webapp/src/cljs/lipas/ui/accessibility/events.cljs
clojure
(ns lipas.ui.accessibility.events (:require [ajax.core :as ajax] [lipas.utils :as cutils] [re-frame.core :as re-frame])) (re-frame/reg-event-fx ::get-statements (fn [{:keys [db]} [_ lipas-id]] {:db (assoc-in db [:accessibility :loading?] true) :http-xhrio {:method :post :params ...
842636b217a37db28781020fbaf42bdf14ca2c9ae182982ad929ddff82e5bc42
heraldry/heraldicon
angle.cljs
(ns heraldicon.math.angle) (defn to-rad ^js/Number [^js/Number angle] (/ (* angle Math/PI) 180)) (defn to-deg ^js/Number [^js/Number angle] (* (/ angle Math/PI) 180)) (defn normalize ^js/Number [^js/Number angle] (loop [angle angle] (cond (neg? angle) (recur (+ angle 360)) (>= angle 360) (recur...
null
https://raw.githubusercontent.com/heraldry/heraldicon/f742958ce1e85f47c8222f99c6c594792ac5a793/src/heraldicon/math/angle.cljs
clojure
(ns heraldicon.math.angle) (defn to-rad ^js/Number [^js/Number angle] (/ (* angle Math/PI) 180)) (defn to-deg ^js/Number [^js/Number angle] (* (/ angle Math/PI) 180)) (defn normalize ^js/Number [^js/Number angle] (loop [angle angle] (cond (neg? angle) (recur (+ angle 360)) (>= angle 360) (recur...
1b8e7b481c725b1768ea2a0d6944c363f24d8a9f6a2f98d7810c74bd0e9bc651
kanatohodets/riak_core_workshop_euc2016
kvapi_sup.erl
%%%------------------------------------------------------------------- %% @doc kvapi top level supervisor. %% @end %%%------------------------------------------------------------------- -module(kvapi_sup). -behaviour(supervisor). %% API -export([start_link/0]). %% Supervisor callbacks -export([init/1]). -define(SE...
null
https://raw.githubusercontent.com/kanatohodets/riak_core_workshop_euc2016/a396bb5a1879ec0cb3d70bbc4b6cd39e097cd610/5_http_kv/erlang/apps/kvapi/src/kvapi_sup.erl
erlang
------------------------------------------------------------------- @doc kvapi top level supervisor. @end ------------------------------------------------------------------- API Supervisor callbacks ==================================================================== API functions =================================...
-module(kvapi_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(SERVER, ?MODULE). start_link() -> supervisor:start_link({local, ?SERVER}, ?MODULE, []). Child : : { Id , StartFunc , Restart , Shutdown , Type , Modules } init([]) -> {ok, { {one_for_all, 0, 1}, []} }. ...
f41928af72c247e384c01ce69c6b83a8c3afe1d460007c64256ace2449357212
rescript-association/genType
Dependencies.ml
open GenTypeCommon let rec handleNamespace ~name dep = match dep with | External _ | Internal _ -> dep | Dot (External s, moduleName) when s = name -> External moduleName | Dot (dep1, s) -> Dot (dep1 |> handleNamespace ~name, s) let rec fromPath1 ~config ~typeEnv (path : Path.t) = match path with | Pident...
null
https://raw.githubusercontent.com/rescript-association/genType/22b666a1004b5079c2a5f76d20e79a3b11c9e2dd/src/Dependencies.ml
ocaml
open GenTypeCommon let rec handleNamespace ~name dep = match dep with | External _ | Internal _ -> dep | Dot (External s, moduleName) when s = name -> External moduleName | Dot (dep1, s) -> Dot (dep1 |> handleNamespace ~name, s) let rec fromPath1 ~config ~typeEnv (path : Path.t) = match path with | Pident...
4fbd0891894854dda4bc06d999e56f9dcaaaf67b4c998577d6a30c8841d83aba
achirkin/vulkan
VK_EXT_depth_clip_enable.hs
# OPTIONS_HADDOCK not - home # {-# LANGUAGE DataKinds #-} {-# LANGUAGE MagicHash #-} # LANGUAGE PatternSynonyms # {-# LANGUAGE Strict #-} {-# LANGUAGE ViewPatterns #-} module Graphics.Vulkan.Ext.VK_EXT_depth_clip_enable * Vulkan extension : @VK_EXT_depth_clip_enable@ -- | -- ...
null
https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_EXT_depth_clip_enable.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE MagicHash # # LANGUAGE Strict # # LANGUAGE ViewPatterns # | supported: @vulkan@ author: @EXT@ type: @device@ > #include "vk_platform.h" # INLINE _VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME #
# OPTIONS_HADDOCK not - home # # LANGUAGE PatternSynonyms # module Graphics.Vulkan.Ext.VK_EXT_depth_clip_enable * Vulkan extension : @VK_EXT_depth_clip_enable@ contact : Extension number : @103@ module Graphics.Vulkan.Marshal, AHardwareBuffer(), ANativeWindow(), CAMetalLayer(), VkBool32(..), ...
8e162b6f167a2fa6ea85bb3581a7c023e7ab69917eaffb53758ac441dd67e26e
ztellman/penumbra
sierpinski.clj
Copyright ( c ) . All rights reserved . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by...
null
https://raw.githubusercontent.com/ztellman/penumbra/db43d01c280305beab26d1004ae78b1777ab3fc7/test/example/opengl/sierpinski.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (ns example.opengl.sierpinski (:use [penumbra opengl]) (:require [penumbra.app :as app])) (defn draw-pyramid [] (material :front-and-back :ambient-and-diffuse [1 0.25 0.25 1]) (draw-triangle-fan (vertex 0 1 0) (dotimes [_ 5] (rotate 90 0 1 0) ...
70e04d0e01549a32935f2f42960afbb7569e2463941df8713cf581c1e41a9c88
fakedata-haskell/fakedata
Lebowski.hs
# LANGUAGE TemplateHaskell # {-# LANGUAGE OverloadedStrings #-} module Faker.Movie.Lebowski where import Data.Text import Faker import Faker.Internal import Faker.Provider.Lebowski import Faker.TH $(generateFakeField "lebowski" "actors") $(generateFakeField "lebowski" "characters") $(generateFakeField "lebowski" "...
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/e6fbc16cfa27b2d17aa449ea8140788196ca135b/src/Faker/Movie/Lebowski.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # module Faker.Movie.Lebowski where import Data.Text import Faker import Faker.Internal import Faker.Provider.Lebowski import Faker.TH $(generateFakeField "lebowski" "actors") $(generateFakeField "lebowski" "characters") $(generateFakeField "lebowski" "quotes")
64c6cfcc9b6a6b087a90be70ba0b44ef372fdce6abd07752a304f67a48e67719
LdBeth/keim
poly.lisp
;;; -*- Package: KEIM; Syntax: Common-lisp; Mode: LISP -*- ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;; Copyright ( C ) 1993 by AG Siekmann , , ; ; Universitaet des Saarlandes , Saarbr...
null
https://raw.githubusercontent.com/LdBeth/keim/ed2665d3b0d9a78eaa88b5a2940a4541f0750926/keim/prog/term/poly.lisp
lisp
-*- Package: KEIM; Syntax: Common-lisp; Mode: LISP -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ; ; All rights reserved. ;; For information about th...
(in-package :keim) (mod~defmod poly :uses (keim mod sym term type ) :documentation "Definitions of polymorphic symbol classes." :exports ( poly+poly poly+polyvar poly+polyconst poly~instances poly~set-instances! poly~initial-type poly~p poly~co...
a37df49c551d3a704ae7c19d0625fa5b42450cc390fbc228c6bfae7708aac827
vernemq/vernemq
smerl.erl
@author < > [ ] @copyright Yariv Sadan 2006 - 2007 %% @doc Smerl : Simple Metaprogramming for Erlang %% Smerl is an Erlang library that simplifies the creation and manipulation of Erlang modules in %% runtime. %% You do n't need to know Smerl in order to use ErlyWeb ; Smerl is included in ErlyW...
null
https://raw.githubusercontent.com/vernemq/vernemq/234d253250cb5371b97ebb588622076fdabc6a5f/apps/vmq_plugin/src/smerl.erl
erlang
runtime. ``` test_smerl() -> {ok, M2} = smerl:add_func(M1, "bar() -> 1 + 1."), returns 2 ` ` smerl:has_func(M2, bar, 0). % returns true ''' or as abstract forms. For more information, read the Abstract Format ([-5.5/erts-5.5/doc/html/absform.html#4]). would be written as ``` ...
@author < > [ ] @copyright Yariv Sadan 2006 - 2007 @doc Smerl : Simple Metaprogramming for Erlang Smerl is an Erlang library that simplifies the creation and manipulation of Erlang modules in You do n't need to know Smerl in order to use ErlyWeb ; Smerl is included in ErlyWeb because ErlyWeb use...
8f9af2befddef7ce1ca794a961beb1903dceab360efade5d82a2654b0fbf9130
puppetlabs/puppetserver
master_service.clj
(ns puppetlabs.services.master.master-service (:require [clojure.tools.logging :as log] [ring.middleware.params :as ring] [puppetlabs.trapperkeeper.core :refer [defservice]] [puppetlabs.services.master.master-core :as core] [puppetlabs.puppetserver.certificate-authority...
null
https://raw.githubusercontent.com/puppetlabs/puppetserver/3341f41df56e04451a6bcf1e06ba3a542251cead/src/clj/puppetlabs/services/master/master_service.clj
clojure
Default list of allowed histograms/timers Default list of allowed values/counts if the webrouting config uses the old-style config where there is a single key with a route-id, we need to deal with that for backward compat. We have a hard-coded assumption that this route-id key called `invalid-in-puppet-4` in the...
(ns puppetlabs.services.master.master-service (:require [clojure.tools.logging :as log] [ring.middleware.params :as ring] [puppetlabs.trapperkeeper.core :refer [defservice]] [puppetlabs.services.master.master-core :as core] [puppetlabs.puppetserver.certificate-authority...
b3f86406d59ac090f0fd6a400b026389517fb994784e9bb736f15061e06e1160
brunjlar/neural
MNIST.hs
# LANGUAGE DataKinds # # LANGUAGE TypeFamilies # module Main where import Codec.Picture import Control.Category import qualified Data.Array as A import Data.MyPrelude import Data.Utils import Numeric.Neural import Pipes.GZip (decompress) import q...
null
https://raw.githubusercontent.com/brunjlar/neural/1211d1a2bed14b4036f48c500f945fea027cd3b9/examples/MNIST/MNIST.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE TypeFamilies # module Main where import Codec.Picture import Control.Category import qualified Data.Array as A import Data.MyPrelude import Data.Utils import Numeric.Neural import Pipes.GZip (decompress) import q...
c249a958a71944550eb156de831e79cc3f3b3c0c049fc9072f47f0d73a066eba
ejgallego/dualquery
utils.ml
(**************************************************************************) Generic testing framework for evaluating speedup on (* a multi-core *) (* *) Author(s ): ...
null
https://raw.githubusercontent.com/ejgallego/dualquery/f8355212a760ef77ad3fb07f3bb595e775bf06d2/parmap/tests/utils.ml
ocaml
************************************************************************ a multi-core This program is free softw...
Generic testing framework for evaluating speedup on Author(s ): it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 2 of the open Parmap let scale_test ?(inorder=tr...
c4c7b180d0fcaf73a62536e17f934a2ab57a2a86d475f14efd6a7bc1644d0da3
sqd/haskell-C89-interpreter
Storage.hs
module Storage( Memory, readMem, Id, allocate, free, modify, newMem, blockAllocate )where import Value import Definition import Type import qualified Data.Map.Strict as M import Control.Exception.Base data Memory = Mem (M.Map Id Value) Id deriving Show newMem = Mem M.empty 1 readMem :: Memory -> Id -> Value readMe...
null
https://raw.githubusercontent.com/sqd/haskell-C89-interpreter/cd0cd344cf07eba29a906b62fb31ea120adfca86/Storage.hs
haskell
module Storage( Memory, readMem, Id, allocate, free, modify, newMem, blockAllocate )where import Value import Definition import Type import qualified Data.Map.Strict as M import Control.Exception.Base data Memory = Mem (M.Map Id Value) Id deriving Show newMem = Mem M.empty 1 readMem :: Memory -> Id -> Value readMe...
f496e1624115adc1d72df780413f2f590f9bb1abd7ae28de20a84ce27889bf12
prepor/twarc
project.clj
(defproject twarc "0.1.15" :description "Doing Quartz the right way" :url "" :license {:name "Eclipse Public License", :url "-v10.html"} :dependencies [[org.clojure/clojure "1.10.1"] [org.quartz-scheduler/quartz "2.3.2"] [org.quartz-scheduler/quartz-jobs "2.3.2"] ...
null
https://raw.githubusercontent.com/prepor/twarc/b7bfb2b8866d94da3a986074ef6377957c66d291/project.clj
clojure
(defproject twarc "0.1.15" :description "Doing Quartz the right way" :url "" :license {:name "Eclipse Public License", :url "-v10.html"} :dependencies [[org.clojure/clojure "1.10.1"] [org.quartz-scheduler/quartz "2.3.2"] [org.quartz-scheduler/quartz-jobs "2.3.2"] ...
64c63303da6bcf7d60d55938c57fa58525650e1181bf18d1dfae00909d3a9dbd
nikomatsakis/a-mir-formality
extrude.rkt
#lang racket (require redex/reduction-semantics "../logic/substitution.rkt" "../logic/env.rkt" "../logic/env-inequalities.rkt" "grammar.rkt" "hypothesized-bounds.rkt" ) (provide extrude-parameter ) (define-metafunction formality-ty ; Creates a new parame...
null
https://raw.githubusercontent.com/nikomatsakis/a-mir-formality/bc951e21bff2bae1ccab8cc05b2b39cfb6365bfd/racket-src/ty/extrude.rkt
racket
Creates a new parameter `Parameter_out` of `Parameter` where * `Parameter_out InequalityOp Parameter`, assuming that `Goals_out` are Creates a new parameter `Parameter_out` of `Parameter` where * `Parameter_out InequalityOp Parameter`, assuming that `Goals_out` are satisfied Can also be applied to where-clauses...
#lang racket (require redex/reduction-semantics "../logic/substitution.rkt" "../logic/env.rkt" "../logic/env-inequalities.rkt" "grammar.rkt" "hypothesized-bounds.rkt" ) (provide extrude-parameter ) (define-metafunction formality-ty * ` Parameter_out ` re...
113844f7b975993f13c3a89afb4a19fce8d4c687823f658c066a0c4958226c7b
tsahyt/clingo-haskell
Theory.hs
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -Wno - missing - pattern - synonym - signatures # module Clingo.Internal.Inspection.Theory ( TheoryAtoms, TermId, ElementId, AtomId, TheoryTermType, pattern TheoryTuple, pattern TheoryList, pattern TheorySet, pattern TheoryFunction, pat...
null
https://raw.githubusercontent.com/tsahyt/clingo-haskell/083c84aae63565067644ccaa72223a4c12b33b88/src/Clingo/Internal/Inspection/Theory.hs
haskell
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -Wno - missing - pattern - synonym - signatures # module Clingo.Internal.Inspection.Theory ( TheoryAtoms, TermId, ElementId, AtomId, TheoryTermType, pattern TheoryTuple, pattern TheoryList, pattern TheorySet, pattern TheoryFunction, pat...
ea8027b757d0f2dcd50a9cdc5c8957fa3b5541e333daaf45befe8279ab0ff88d
yzh44yzh/practical_erlang
test.erl
-module(test). -export([run/0]). run() -> case main:test() of ok -> init:stop(0); error -> init:stop(1) end.
null
https://raw.githubusercontent.com/yzh44yzh/practical_erlang/c9eec8cf44e152bf50d9bc6d5cb87fee4764f609/03_high_order_fun/solution/test.erl
erlang
-module(test). -export([run/0]). run() -> case main:test() of ok -> init:stop(0); error -> init:stop(1) end.
b72d27678b8c7ff62696eb491fd2691715141b9f0c05212f7d50d533c20372b6
spacegangster/gcal-clj
specs_error_responses.clj
(ns gcal-clj.specs-error-responses "Common Google Calendar error responses. Original doc " (:require [clojure.spec.alpha :as s] [common.specs.http])) ;;; spec for a general error from a response body ;;; (s/def :s.gcal.http.errors/item (s/keys :req-un [::domain ::reason ::message] :opt-...
null
https://raw.githubusercontent.com/spacegangster/gcal-clj/c7b14d6330f1099adb1b9ae6f5631dfebde0cbd3/src/gcal_clj/specs_error_responses.clj
clojure
spec for a general error from a response body ;;; the http body The specified resource was not found. - when the requested resource (with the provided ID) has never existed - when accessing a calendar that the user can not access - something else
(ns gcal-clj.specs-error-responses "Common Google Calendar error responses. Original doc " (:require [clojure.spec.alpha :as s] [common.specs.http])) (s/def :s.gcal.http.errors/item (s/keys :req-un [::domain ::reason ::message] :opt-un [::location ::locationType])) (s/def :s.gcal.http....
20445b34819edeab5eae68116aa83e4397e1564bf3dd87c6f22f86d4a67e4933
aspiwack/porcupine
ReaderSoup.hs
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeCla...
null
https://raw.githubusercontent.com/aspiwack/porcupine/23dcba1523626af0fdf6085f4107987d4bf718d7/reader-soup/src/Control/Monad/ReaderSoup.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DataKinds # # LANGUAGE OverloadedLabels # # LANGUAGE RankNTypes # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # * Low-level API and host more Readers, in a way that's more generic than creat...
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications ...
55ee3044fb5eb278b2d088bc2cb1100bc2ef40fcd0701bfb96d45a6ab7129ba6
markwoodhall/swaggerdown
generate.clj
(ns swaggerdown.generate (:require [clojure.pprint :as pprint] [cheshire.core :refer [generate-string]] [swaggerdown.html :as h] [swaggerdown.http :refer [read-swagger]] [swaggerdown.markdown :as m] [yaml.core :as y])) (defn- sort-map [m ks] (if (empty? ks) m (let [k (first ks)] ...
null
https://raw.githubusercontent.com/markwoodhall/swaggerdown/3d34d151c075d54d446eee7039f19420bf265e30/src/swaggerdown/generate.clj
clojure
(ns swaggerdown.generate (:require [clojure.pprint :as pprint] [cheshire.core :refer [generate-string]] [swaggerdown.html :as h] [swaggerdown.http :refer [read-swagger]] [swaggerdown.markdown :as m] [yaml.core :as y])) (defn- sort-map [m ks] (if (empty? ks) m (let [k (first ks)] ...
fda0308cfd708117a4ad31d317df9da4a110a8bd8a8e7298eaeb3d06c2ef5673
zellige/hs-geojson
GeoPolygon.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # ------------------------------------------------------------------- -- | Module : Data . Geospatial . Internal . Geometry . GeoPolygon Copyright : ( C ) 2014 - 2021 HS - GeoJSON Project -- License : BSD-style (...
null
https://raw.githubusercontent.com/zellige/hs-geojson/fb66e4f1b016d8e73408d9faa0945f61253131fa/src/Data/Geospatial/Internal/Geometry/GeoPolygon.hs
haskell
# LANGUAGE DeriveAnyClass # ----------------------------------------------------------------- | License : BSD-style (see the file LICENSE.md) * Type * Lenses instances parseJSON :: Value -> Parser a
# LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # Module : Data . Geospatial . Internal . Geometry . GeoPolygon Copyright : ( C ) 2014 - 2021 HS - GeoJSON Project Maintainer : module Data.Geospatial.Internal.Geometry.GeoPolygon GeoPolygon (..), unGeoPolygon, ) where import Cont...
91a876af980a552d093c21a19cf277f03e6cd13f5f0af7f63cce8db822dcd0b9
lnostdal/SymbolicWeb
logging.clj
(in-ns 'symbolicweb.core) ;;; TODO: Add proper logging stuff here. Log4j? (defn log [& args] (with-sw-agent nil (binding [*print-level* 5] (flush) (apply println "\n\n[SW]:" args) (flush))))
null
https://raw.githubusercontent.com/lnostdal/SymbolicWeb/d9600b286f70f88570deda57b05ca240e4e06567/src/symbolicweb/logging.clj
clojure
TODO: Add proper logging stuff here. Log4j?
(in-ns 'symbolicweb.core) (defn log [& args] (with-sw-agent nil (binding [*print-level* 5] (flush) (apply println "\n\n[SW]:" args) (flush))))
918aaa1c184d06bf77186a4dd949e4fdac347413fd738e4d3507503ab4a01a30
rleonid/oml
oml_sampling.mli
Copyright 2015 : < > < > 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...
null
https://raw.githubusercontent.com/rleonid/oml/a857d67708827ed00df3f175a942044601ca50cf/src/stats/oml_sampling.mli
ocaml
* Create generators for sampling from specified distributions. * [normal_std seed ()] is equivalent to [normal seed ~mean:0.0 ~std:1.0 ()]. * Provides polymorphic versions that sample over arrays of any type.
Copyright 2015 : < > < > 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...
bf2f1fec14c9657f03458da415ae6812b5a86b1c35d6bd772c210054a43aa5b9
alda-lang/alda-core
markers_test.clj
(ns alda.parser.markers-test (:require [clojure.test :refer :all] [alda.lisp] [alda.parser :refer (parse-input)])) (deftest marker-tests (testing "markers" (is (= [(alda.lisp/marker "chorus")] (parse-input "%chorus" :output :events))) (is (= [(alda.lisp/at-marker "verse-...
null
https://raw.githubusercontent.com/alda-lang/alda-core/4c92eb4fe363485193c58b77b1ec8e36c8866fb5/test/alda/parser/markers_test.clj
clojure
(ns alda.parser.markers-test (:require [clojure.test :refer :all] [alda.lisp] [alda.parser :refer (parse-input)])) (deftest marker-tests (testing "markers" (is (= [(alda.lisp/marker "chorus")] (parse-input "%chorus" :output :events))) (is (= [(alda.lisp/at-marker "verse-...
291262e49b3dd7e13003f844e0d4f0a34a8f83cee4d3d5aca92455afa7ffae88
janestreet/lwt-async
lwt_process.mli
Lightweight thread library for * Module Lwt_process * Copyright ( C ) 2009 * * 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 ; * ei...
null
https://raw.githubusercontent.com/janestreet/lwt-async/c738e6202c1c7409e079e513c7bdf469f7f9984c/src/unix/lwt_process.mli
ocaml
* Process management * This modules allow you to spawn processes and communicate with them. * A command executed with the shell. (with ["/bin/sh -c <cmd>"] on Unix and ["cmd.exe /c <cmd>"] on Windows). * All the following functions take an optionnal argument [timeout]. If specified, after expiration, the p...
Lightweight thread library for * Module Lwt_process * Copyright ( C ) 2009 * * 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 ; * ei...
edbb54694b0b8372de64fc03fa823ba287390ff545b5b69790182a06b92d6261
graninas/Functional-Design-and-Architecture
Language.hs
{-# LANGUAGE GADTs #-} module Andromeda.LogicControl.Language where import Andromeda.Hardware.Common import Andromeda.Hardware.Domain import Andromeda.LogicControl.Domain import Andromeda.Common import qualified Andromeda.Hardware.Language.Hdl as L import qualified Andromeda.Hardware.Language.DeviceControl as DC im...
null
https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/786069eb89f990d5ef94e7251eff13515773cd9b/Second-Edition-Manning-Publications/BookSamples/CH07/Section7p2p1/src/Andromeda/LogicControl/Language.hs
haskell
# LANGUAGE GADTs #
module Andromeda.LogicControl.Language where import Andromeda.Hardware.Common import Andromeda.Hardware.Domain import Andromeda.LogicControl.Domain import Andromeda.Common import qualified Andromeda.Hardware.Language.Hdl as L import qualified Andromeda.Hardware.Language.DeviceControl as DC import Control.Monad.Free...
be0f5ecb38d96e8b02de79db689efdaa1ba110879042d2d0a888d54492cf0646
avsm/platform
module.ml
module AAAAAAAAAAAAAAAAAAA = Soooooooooooooooooooooooome.Loooooooooooooooooooooooong.Mod let _ = let module A = B in let module AAAAAAAAAAAAAAAAAAA = Soooooooooooooooooooooooome.Loooooooooooooooooooooooong.Mod in t let create (type a b) t i w p = let module T = (val (t : (a, b) t)) in T.create i w p...
null
https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/ocamlformat.0.12/test/passing/module.ml
ocaml
a a
module AAAAAAAAAAAAAAAAAAA = Soooooooooooooooooooooooome.Loooooooooooooooooooooooong.Mod let _ = let module A = B in let module AAAAAAAAAAAAAAAAAAA = Soooooooooooooooooooooooome.Loooooooooooooooooooooooong.Mod in t let create (type a b) t i w p = let module T = (val (t : (a, b) t)) in T.create i w p...
0b589774584762bab6a3e2fd623164ae519960b6bd7d55ae6f5cf14384ac695b
NorfairKing/the-notes
Terms.hs
module Computability.FiniteStateAutomata.Terms where import Notes makeDefs [ "nondeterministic finite state automaton" , "accept" , "reject" , "deterministic finite state automaton" ]
null
https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/Computability/FiniteStateAutomata/Terms.hs
haskell
module Computability.FiniteStateAutomata.Terms where import Notes makeDefs [ "nondeterministic finite state automaton" , "accept" , "reject" , "deterministic finite state automaton" ]
1ea7fedc6e191be604a1a309375722598a1ab9c2482c848208585acef5004a06
clojure/tools.analyzer
elide_meta.clj
Copyright ( c ) , Rich Hickey & contributors . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be b...
null
https://raw.githubusercontent.com/clojure/tools.analyzer/5d1d0dcf3dfe693e71ef36a44f50d4aa944dc65f/src/main/clojure/clojure/tools/analyzer/passes/elide_meta.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) , Rich Hickey & contributors . (ns clojure.tools.analyzer.passes.elide-meta (:require [clojure.tools.analyzer.passes.source-info :refer [source-info]])) (def ^:dynamic elides "A map of op keywords to predicate IFns. The predicate will be used to indicate what map keys should be elided on ...
5d820b31181f7d8cca04aa8e77225e7f9925fab6fbc423ef8b1660157fe59647
startalkIM/ejabberd
poolboy_tests.erl
-module(poolboy_tests). -include_lib("eunit/include/eunit.hrl"). pool_test_() -> {foreach, fun() -> error_logger:tty(false) end, fun(_) -> case whereis(poolboy_test) of undefined -> ok; Pid -> pool_call(Pid, stop) end, ...
null
https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/deps/poolboy/test/poolboy_tests.erl
erlang
Tell a worker to exit and await its impending doom. There's no easy way to wait for a checkin to complete, because it's async and the supervisor may kill the process if it was an overflow worker. The only solution seems to be a nasty hardcoded sleep. Check basic pool operation. Check that the pool overflows prope...
-module(poolboy_tests). -include_lib("eunit/include/eunit.hrl"). pool_test_() -> {foreach, fun() -> error_logger:tty(false) end, fun(_) -> case whereis(poolboy_test) of undefined -> ok; Pid -> pool_call(Pid, stop) end, ...
6c633e5f897aa517eaa8c47dbe179b8607f6fd85850d664b006eeb1f54d01ca2
scrintal/heroicons-reagent
home_modern.cljs
(ns com.scrintal.heroicons.solid.home-modern) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:d "M19.006 3.705a.75.75 0 00-.512-1.41L6 6.838V3a.75.75 0 00-.75-.75h-1.5A.75.75 0 003 3v4.93l-1.006.365a.75.75 0 00.51...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/home_modern.cljs
clojure
(ns com.scrintal.heroicons.solid.home-modern) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:d "M19.006 3.705a.75.75 0 00-.512-1.41L6 6.838V3a.75.75 0 00-.75-.75h-1.5A.75.75 0 003 3v4.93l-1.006.365a.75.75 0 00.51...