_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
202ac0636bf74e82129925752d4a7c98ee59b285cf2106b384e43a85f396f03d
OCADml/OCADml
path3.ml
open V include Path.Make (V3) include PathSearch.Make (V3) (BallTree3) (PathSearch.TangentSign3) include Arc3 include Rounding.Make (V3) (Arc3) module Bez2 = Bezier.Make (V2) let of_tups = List.map V3.of_tup let of_path2 ?(plane = Plane.xy) = Path2.lift plane let to_path2 ?(plane = Plane.xy) = List.map (Plane.project ...
null
https://raw.githubusercontent.com/OCADml/OCADml/a41535c9f7a3ca1daff7f7a06896052edaac93ca/lib/path3.ml
ocaml
x-axis y-axis xy equal, but less than z xy equal, roughly following plane too few points, or co-linear
open V include Path.Make (V3) include PathSearch.Make (V3) (BallTree3) (PathSearch.TangentSign3) include Arc3 include Rounding.Make (V3) (Arc3) module Bez2 = Bezier.Make (V2) let of_tups = List.map V3.of_tup let of_path2 ?(plane = Plane.xy) = Path2.lift plane let to_path2 ?(plane = Plane.xy) = List.map (Plane.project ...
5b5d015a8f10ab7833d7a14287f88aaa2e60ccc0fe3ccf32883c177627b90c5a
mbutterick/beautiful-racket
And.tst.rkt
#lang hdl-tst-demo // This file is part of www.nand2tetris.org // and the book "The Elements of Computing Systems" // by Nisan and Schocken, MIT Press. // File name: projects/01/And.tst load And.hdl, output-file And.out, compare-to And.cmp, output-list a%B3.1.3 b%B3.1.3 out%B3.1.3; set a 0, set b 0, eval, output; s...
null
https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/hdl-demo/And.tst.rkt
racket
#lang hdl-tst-demo // This file is part of www.nand2tetris.org // and the book "The Elements of Computing Systems" // by Nisan and Schocken, MIT Press. // File name: projects/01/And.tst load And.hdl, output-file And.out, compare-to And.cmp, set a 0, set b 0, eval, set a 0, set b 1, eval, set a 1, set b 0, eval, s...
b5cb4bf844cf4fffa32af661ad9c146ae911f3a97aae2c3fc67f02a32deba1ba
chrisdone/labels
Labels.hs
# LANGUAGE DataKinds # {-# LANGUAGE BangPatterns #-} # LANGUAGE KindSignatures # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE Rank2Types #-} # LANGUAGE OverloadedLabels # -- | Labels for fields in a tuple. -- -- Enable these extensions: -- -- In GHCi: -- -- @ -- :set -XOverloadedLabels -XTypeOperators -XDataKinds -XFlexibl...
null
https://raw.githubusercontent.com/chrisdone/labels/de2ffeb17d61ffb7057d59416283f355f6862706/labels/src/Labels.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE RankNTypes # # LANGUAGE Rank2Types # | Labels for fields in a tuple. Enable these extensions: In GHCi: @ :set -XOverloadedLabels -XTypeOperators -XDataKinds -XFlexibleContexts @ In a module: @ @ Get fields of a record: Set fields of a record: Modify fields of...
# LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE OverloadedLabels # { -\ # LANGUAGE OverloadedLabels , TypeOperators , DataKinds , FlexibleContexts \#- } Construct a record : > > > ( # foo : = " hi " , # bar : = 123 ) ( # foo : = " hi",#bar : = 123 ) > > > get # bar ( # foo : = " hi " , # bar : =...
08b06505c7799e3e9c79e3f8e3cfb9170a3061bc78ab2210fb1436ede47317b9
ucsd-progsys/dsolve
mem.ml
let f xs = match xs with | y::ys -> assert (Mylist.mem y xs) | [] -> () let cons (x: int) xs = x :: xs let xs1 = [] let xs2 = 1 :: xs1 let s = assert (Mylist.mem 1 xs2) let t = (fun (x: int list) -> x) xs2 let xs3 = 2 :: xs2 let t = (fun (x: int list) -> x) xs3 let s = assert (Mylist.mem 1 xs3) let s = ...
null
https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/mem.ml
ocaml
let f xs = match xs with | y::ys -> assert (Mylist.mem y xs) | [] -> () let cons (x: int) xs = x :: xs let xs1 = [] let xs2 = 1 :: xs1 let s = assert (Mylist.mem 1 xs2) let t = (fun (x: int list) -> x) xs2 let xs3 = 2 :: xs2 let t = (fun (x: int list) -> x) xs3 let s = assert (Mylist.mem 1 xs3) let s = ...
d6b4c3766ca54b99393cf2c74ccd06888ad21c8022d3eb7ee012d5a2106d1e9b
janestreet/sexp
query.ml
open! Core module Set_kind = struct type t = { optional : bool ; first_only : bool } [@@deriving sexp] end type t = | Capture_unlabeled of t | Capture_to_number of int * t | Capture_to_name of string * t | Any | Atom of string | Atom_regex of string | Sequence of t list | Star of t |...
null
https://raw.githubusercontent.com/janestreet/sexp/56e485b3cbf8a43e1a8d7647b0df31b27053febf/sexp_app/pattern/query.ml
ocaml
open! Core module Set_kind = struct type t = { optional : bool ; first_only : bool } [@@deriving sexp] end type t = | Capture_unlabeled of t | Capture_to_number of int * t | Capture_to_name of string * t | Any | Atom of string | Atom_regex of string | Sequence of t list | Star of t |...
9255dde6450cd7a7f79a3147b13eb9ec6a71d873f0b8a0009c37cc7e565f1ff5
silent-entertainment/claxiom
system.lisp
(in-package #:claxiom) ;;;;;;;;;; System-level hooks (define-json-handler (claxiom/system/kill-thread) () (when (and (bt:threadp *front-end-eval-thread*) (bt:thread-alive-p *front-end-eval-thread*)) (bt:destroy-thread *front-end-eval-thread*)) (publish-update! nil 'killed-eval) :ok) (define-json-handl...
null
https://raw.githubusercontent.com/silent-entertainment/claxiom/44c6122ec46859fd881772bfc24ca3a141fb153a/src/ui/http-api/system.lisp
lisp
System-level hooks Server-side hint hooks
(in-package #:claxiom) (define-json-handler (claxiom/system/kill-thread) () (when (and (bt:threadp *front-end-eval-thread*) (bt:thread-alive-p *front-end-eval-thread*)) (bt:destroy-thread *front-end-eval-thread*)) (publish-update! nil 'killed-eval) :ok) (define-json-handler (claxiom/system/formats) ()...
27a532ee3feded456f5b05c13118df95d0f16adbba87076077eb27c73b18e960
kayceesrk/Quelea
Consts.hs
module Quelea.Consts ( cCACHE_LWM, cDISK_LWM, cGC_WORKER_THREAD_DELAY, cCACHE_THREAD_DELAY, cCACHE_MAX_OBJS, cNUM_WORKERS, cLOCK_DELAY, cKEEP_FRACTION ) where cCACHE_LWM :: Int cCACHE_LWM = 128 cDISK_LWM :: Int cDISK_LWM = 1024 cGC_WORKER_THREAD_DELAY :: Int cGC_WORKER_THREAD_DELAY = 1000000 cCACHE_...
null
https://raw.githubusercontent.com/kayceesrk/Quelea/73db79a5d5513b9aeeb475867a67bacb6a5313d0/src/Quelea/Consts.hs
haskell
module Quelea.Consts ( cCACHE_LWM, cDISK_LWM, cGC_WORKER_THREAD_DELAY, cCACHE_THREAD_DELAY, cCACHE_MAX_OBJS, cNUM_WORKERS, cLOCK_DELAY, cKEEP_FRACTION ) where cCACHE_LWM :: Int cCACHE_LWM = 128 cDISK_LWM :: Int cDISK_LWM = 1024 cGC_WORKER_THREAD_DELAY :: Int cGC_WORKER_THREAD_DELAY = 1000000 cCACHE_...
17b1116d557f818f97d8bb7569119da10908b9c173b2a0a0c342bae6c6a8bbdb
tweag/asterius
T3591.hs
Copyright 2009 This file is part of the Streaming Component Combinators ( SCC ) project . The SCC project 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 th...
null
https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/simplCore/T3591.hs
haskell
| Module "Trampoline" defines the pipe computations and their basic building blocks. ----------- -----------
Copyright 2009 This file is part of the Streaming Component Combinators ( SCC ) project . The SCC project 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 th...
537b83fb4edc8b770b2e9246bad3daba75f4dc20fe11c0146c5e3744e69c1fd4
blindglobe/common-lisp-stat
absorbtion.lisp
From LispStat 1 : need to document source appropriately . (in-package :lisp-stat-data-examples) FIXME : Shutup compiler warnings , need to clean up and ;;; appropriately initialize. (defvar iron nil) (defvar aluminum nil) (defvar absorpbtion nil) (def iron (list 61 175 111 124 130 173 169 169 160 224 257 333 1...
null
https://raw.githubusercontent.com/blindglobe/common-lisp-stat/0c657e10a4ee7e8d4ef3737f8c2d4e62abace2d8/Data/absorbtion.lisp
lisp
appropriately initialize.
From LispStat 1 : need to document source appropriately . (in-package :lisp-stat-data-examples) FIXME : Shutup compiler warnings , need to clean up and (defvar iron nil) (defvar aluminum nil) (defvar absorpbtion nil) (def iron (list 61 175 111 124 130 173 169 169 160 224 257 333 199)) (def aluminum (list 13 21...
30a23792afa144bdbfe6388406e2135c46db30f949e4f0dce220adfa765a23c7
iij/lmq
lmq_mpull_SUITE.erl
-module(lmq_mpull_SUITE). -include("lmq.hrl"). -include_lib("common_test/include/ct.hrl"). -export([init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2, all/0]). -export([pull/1, pull_async/1, client_closed/1]). all() -> [pull, pull_async, client_closed]. init_per_suite(Config) -> ...
null
https://raw.githubusercontent.com/iij/lmq/3f01c555af973a07a3f2b22ff95a2bc1c7930bc2/test/lmq_mpull_SUITE.erl
erlang
-module(lmq_mpull_SUITE). -include("lmq.hrl"). -include_lib("common_test/include/ct.hrl"). -export([init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2, all/0]). -export([pull/1, pull_async/1, client_closed/1]). all() -> [pull, pull_async, client_closed]. init_per_suite(Config) -> ...
38e4fabee4a2a74ebb9bc433fc34cfe277b94330e1438a226ad14587c4c85494
kadena-io/pact
API.hs
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # # OPTIONS_GHC -fno - warn - orphans # #...
null
https://raw.githubusercontent.com/kadena-io/pact/e2f3dd1fd1952bb4f736042083769b52dbb2a819/src/Pact/Server/API.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # | endpoints | client | Public Pact REST API. | "pact -s" REST API.
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # # OPTIONS_GHC -fno - warn - orphans # # LANGUAGE OverloadedLists # module Pact.Server.API ( ApiV1A...
84c538660e9dd1993c81fde6647b5f4e748112baff8a0419b8a3a261adcbe134
dmitryvk/sbcl-win32-threads
defstruct.lisp
that part of DEFSTRUCT implementation which is needed not just ;;;; in the target Lisp but also in the cross-compilation host This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon Uni...
null
https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/code/defstruct.lisp
lisp
in the target Lisp but also in the cross-compilation host more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. getting LAYOUTs Return the compiler layout for NAME. (The class referred to by NAM...
that part of DEFSTRUCT implementation which is needed not just This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB!KERNEL") (/show0 "code/defstruct.lisp 15") ...
bf7914d7892a196756d688d26eb1eaac7d9cb4626b2d8245760e0d0b7d8ba0ef
ryukinix/discrete-mathematics
Exercises.hs
{-- EXERCISES --} import Notes ( BinTreeInt(LeafInt, NodeInt) , BinTree(Leaf, Node) , inorder , height ) import TreePrinter Exercise 1 Define a datatype Tree1 for a tree that contains a character and an integer in each node , along with exactly three -- subtrees. data Tree1 = Leaf1 | Node1 Integer ...
null
https://raw.githubusercontent.com/ryukinix/discrete-mathematics/1f779e05822c094af33745e2dd3c9a35c6dfb388/src/05-trees/Exercises.hs
haskell
- EXERCISES - subtrees. in each node, and that allows each node to have any number of subtrees Suppose that a tree has type BinTree a, and we have a function f :: a -> b. Write a new traversal function: that traverses the tree using inorder, but it applies f to the data value in each node before placing the resul...
import Notes ( BinTreeInt(LeafInt, NodeInt) , BinTree(Leaf, Node) , inorder , height ) import TreePrinter Exercise 1 Define a datatype Tree1 for a tree that contains a character and an integer in each node , along with exactly three data Tree1 = Leaf1 | Node1 Integer Char Tree1 Tree1 Tree1 ...
1148c21b53b35aa80fb607691141b5e9ecc5fb2507d2b3d55942d02080e7ad36
aeternity/aeternity
aeu_crypto.erl
%%%------------------------------------------------------------------- ( C ) 2019 , Aeternity Anstalt %%% @doc %%% Some crypto related helper functions. %%% @end %%%------------------------------------------------------------------- -module(aeu_crypto). -export([ ecdsa_from_der_pk/1 , ecdsa_from_der_sig/1 ...
null
https://raw.githubusercontent.com/aeternity/aeternity/d906cb3c964dd52ad24cb4c15c05cac56e5a5c3e/apps/aeutils/src/aeu_crypto.erl
erlang
------------------------------------------------------------------- @doc Some crypto related helper functions. @end ------------------------------------------------------------------- extended signature. It is assumed that v is the ‘recovery identifier’. The recovery identifier is a curve point for which r is the...
( C ) 2019 , Aeternity Anstalt -module(aeu_crypto). -export([ ecdsa_from_der_pk/1 , ecdsa_from_der_sig/1 , ecdsa_to_der_pk/1 , ecdsa_to_der_sig/1 , ecdsa_recoverable_from_ecdsa/3 , ecrecover/3 , ecverify/4 , verify_sig/3 , verify_sig/4 ]). ...
a21faf01d3ddff286d2d7405467154a94d087bb28dd70a4f9744436b8e4fc354
rudymatela/fitspec
Report.hs
-- | Module : Test . FitSpec . Report Copyright : ( c ) 2015 - 2017 License : 3 - Clause BSD ( see the file LICENSE ) Maintainer : < > -- Generate ' Test . FitSpec ' reports . module Test.FitSpec.Report ( report , reportWith , reportWithExtra , Args(..) , args , fixargs , ...
null
https://raw.githubusercontent.com/rudymatela/fitspec/f67b0dfc4d7413d62e6c6f4df36df3703f2a4302/src/Test/FitSpec/Report.hs
haskell
| | How to show mutants. Use this to fill 'showMutantAs'. | Extra arguments / configuration for 'reportWith'. See 'args' for default values. ^ (starting) number of function mutations ^ (starting) number of test values (for each prop.) advanced options: ^ whether to show detailed results ^ how to show mutan...
Module : Test . FitSpec . Report Copyright : ( c ) 2015 - 2017 License : 3 - Clause BSD ( see the file LICENSE ) Maintainer : < > Generate ' Test . FitSpec ' reports . module Test.FitSpec.Report ( report , reportWith , reportWithExtra , Args(..) , args , fixargs , Property...
29b578836dfc5f5dd348d50e3e997e0f054bf99af5bab10ad6ba2432381f142e
joakin/cnake
ui.cljs
(ns cnake.ui (:require-macros [cljs.core.async.macros :refer [go go-loop]]) (:require [cnake.utils.dom :as dom] [cnake.utils.canvas :as canvas] [cnake.game :as game] [cljs.core.async :as async :refer [chan put! pipe unique merge map< filter< alts!]] [goog.events :as e...
null
https://raw.githubusercontent.com/joakin/cnake/eebe1051261a9a36b65a962e6d6cd58659879dca/src/cnake/ui.cljs
clojure
------------------------------------------------------------------------------- Height and width of the canvas in pixels depending of the square-size and the game's board size ------------------------------------------------------------------------------- -----------------------------------------------------------...
(ns cnake.ui (:require-macros [cljs.core.async.macros :refer [go go-loop]]) (:require [cnake.utils.dom :as dom] [cnake.utils.canvas :as canvas] [cnake.game :as game] [cljs.core.async :as async :refer [chan put! pipe unique merge map< filter< alts!]] [goog.events :as e...
52616e8f300a613579f0b9b5de42ff13bbfa3661b3a2c343efc8b0675d40aeee
GaloisInc/daedalus
Graph.hs
module Graph where import Data.Map(Map) import qualified Data.Map as Map import Data.Text(Text) import qualified Data.Text as Text import Data.List(intersperse) import Data.Graph(graphFromEdges,flattenSCC) import Data.Graph.SCC type NodeId = Text data G = G { nodes :: [(NodeId,Text)] , edges :: [(NodeId,[NodeId]...
null
https://raw.githubusercontent.com/GaloisInc/daedalus/fbab273f81a875e8181af05c4ecc5969febabf08/formats/pdf/arlington-pdf-model/app/Graph.hs
haskell
module Graph where import Data.Map(Map) import qualified Data.Map as Map import Data.Text(Text) import qualified Data.Text as Text import Data.List(intersperse) import Data.Graph(graphFromEdges,flattenSCC) import Data.Graph.SCC type NodeId = Text data G = G { nodes :: [(NodeId,Text)] , edges :: [(NodeId,[NodeId]...
8db2c5cc0da513e3c07b8b3901a6373aa58966888f25dfc5bc843ef7296e3206
CloudI/CloudI
cow_http2_machine.erl
Copyright ( c ) 2018 , < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS A...
null
https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_cowlib/src/cow_http2_machine.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2018 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(cow_http2_machine). -export([init/2]). -export([ini...
961b39ebc0220e240dc76741bd25c378e7d55acf0d3edf669f898ca4aa2e5627
Twinside/Eq
Stack.hs
# OPTIONS_GHC -fno - warn - orphans # module Language.Eq.Algorithm.StackVM.Stack( compileExpression , evalProgram , ValueType ) where import Control.Applicative import Data.List( foldl' ) import Langu...
null
https://raw.githubusercontent.com/Twinside/Eq/60105372d55420735b722245db7021c239c812f4/Language/Eq/Algorithm/StackVM/Stack.hs
haskell
| bla | Main eval function. | Convert a polynome into a formula to provide the minimal formula in term of multiplication need.
# OPTIONS_GHC -fno - warn - orphans # module Language.Eq.Algorithm.StackVM.Stack( compileExpression , evalProgram , ValueType ) where import Control.Applicative import Data.List( foldl' ) import Langu...
7c09a373e4cabf2b3b4c10d310091ab1d0262d93fcb2e229df4988984c58e270
erszcz/learning
utp_test.erl
-module(utp_test). -compile([export_all]). trace_test() -> Events = [{fred, bob, order_food}, {bob, hank, order_food}, {bob, fred, serve_wine}, {hank, bob, pickup}, {bob, fred, serve_feed}, {fred, renee, pay}, {fred, fred, eat}], ...
null
https://raw.githubusercontent.com/erszcz/learning/b21c58a09598e2aa5fa8a6909a80c81dc6be1601/erlang-et/utp_test.erl
erlang
-module(utp_test). -compile([export_all]). trace_test() -> Events = [{fred, bob, order_food}, {bob, hank, order_food}, {bob, fred, serve_wine}, {hank, bob, pickup}, {bob, fred, serve_feed}, {fred, renee, pay}, {fred, fred, eat}], ...
eb4918b3ef56f90c430ef042152e85968ce5d3dfeae430380236be620bced69f
fyquah/hardcaml_arty
uart.mli
open Base open Hardcaml module Byte_with_valid : sig include Hardcaml.Interface.S with type 'a t = 'a With_valid.t end type t val create : unit -> t * Sets the tx data from the UART pins . Should only ever be called once , raises an exception when called multiple times . raises an exception when calle...
null
https://raw.githubusercontent.com/fyquah/hardcaml_arty/aba3de22a26e2a609d5972174782bd1a7069e8a5/src/infrastructure/uart.mli
ocaml
open Base open Hardcaml module Byte_with_valid : sig include Hardcaml.Interface.S with type 'a t = 'a With_valid.t end type t val create : unit -> t * Sets the tx data from the UART pins . Should only ever be called once , raises an exception when called multiple times . raises an exception when calle...
7d013198b318ef4bd791689acdfc51c21b7568104422fc924b686059c590e0f0
ocaml/ocaml-lsp
a.ml
let a_x = 5 module A_B = struct type a_b_t = string let a_b = "hello" end let a_d = match "" with | "" -> true | _ -> false type user = | Admin | NotAdmin let a_u = Admin let a_arr = [] let a_m, a_n = (1, 2) let a_i = let a_i_h = 6 in a_i_h module StringMap = Map.Make (String) module My_string...
null
https://raw.githubusercontent.com/ocaml/ocaml-lsp/e57b34d129fe36e86cb1ac6aad6c53b2e1901b49/ocaml-lsp-server/test/e2e/__tests__/workspace_symbol_A/bin/a.ml
ocaml
let a_x = 5 module A_B = struct type a_b_t = string let a_b = "hello" end let a_d = match "" with | "" -> true | _ -> false type user = | Admin | NotAdmin let a_u = Admin let a_arr = [] let a_m, a_n = (1, 2) let a_i = let a_i_h = 6 in a_i_h module StringMap = Map.Make (String) module My_string...
be3fc9b7f9a0fc294aa5f4a6cdc22f70e51761350be917a945d4e4d3ce3bab8c
acieroid/scala-am
fs15.scm
(let* ((numblocks 26) (numinode 32) (locki (vector (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (n...
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/threads/variations/fs15.scm
scheme
(let* ((numblocks 26) (numinode 32) (locki (vector (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (n...
7b8e7b5fbd80a5a3710f944ada661e0a6cfdf9660aac9de92802f86dfd9f31cd
trevorcook/hkd-delta
Type.hs
module HKD.Delta.Type ( Static(..) , Change(..), change , Revise(..), revise ) where import Data.Bifunctor import GHC.Generics |Useful ' DeltaOf ' for data that does n't change , and for changes -- that will be ignored. data Static a = Static deriving (Generic,Show,Functor) | The ' Maybe ' type for Delta...
null
https://raw.githubusercontent.com/trevorcook/hkd-delta/d4849438b65f4dc38e1b89504851357e379a96f8/src/HKD/Delta/Type.hs
haskell
that will be ignored. some change within a data structure. This is recognized by the generically derived delta methods, such that a construction with all 'Unchanged' fields will yield an 'Unchanged' data. or just an update.
module HKD.Delta.Type ( Static(..) , Change(..), change , Revise(..), revise ) where import Data.Bifunctor import GHC.Generics |Useful ' DeltaOf ' for data that does n't change , and for changes data Static a = Static deriving (Generic,Show,Functor) | The ' Maybe ' type for Deltas . Useful for signaling ...
4b7f8d93011ed4a22887c48f52af93569c5751668730ffa64a01a354c11cfec8
BranchTaken/Hemlock
test_rev_split_take_drop.ml
open! Basis.Rudiments open! Basis open List let test () = let lists = [ []; [0L]; [0L; 1L] ] in iter lists ~f:(fun l -> Range.Uns.iter (0L =:= length l) ~f:(fun i -> let a, b = split i l in File.Fmt.stdout |> Fmt.fmt "split/take,drop " |> Uns.pp i |> Fmt.fmt " " ...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/1c2109aaf351a25c16cee357987c173e3d110b2b/bootstrap/test/basis/list/test_rev_split_take_drop.ml
ocaml
open! Basis.Rudiments open! Basis open List let test () = let lists = [ []; [0L]; [0L; 1L] ] in iter lists ~f:(fun l -> Range.Uns.iter (0L =:= length l) ~f:(fun i -> let a, b = split i l in File.Fmt.stdout |> Fmt.fmt "split/take,drop " |> Uns.pp i |> Fmt.fmt " " ...
331c1223394ad9a0709dc140234c3e6d79375eabde9462c890a359931251f4ce
benoitc/hackney_disp
hackney_disp_handler.erl
%%% -*- erlang -*- %%% This file is part of hackney_disp released under the Apache 2 license . %%% See the NOTICE for more information. %%% Copyright ( c ) 2012 , under the BSD license %%% @doc Dispcount worker implementation for TCP socket handling %%% @end %%% -module(hackney_disp_handler). -behaviour(dispc...
null
https://raw.githubusercontent.com/benoitc/hackney_disp/04cc6c032d86a21d25340989c46d9595002582d3/src/hackney_disp_handler.erl
erlang
-*- erlang -*- See the NOTICE for more information. @end Make it lazy to connect. On checkout only! caller died socket closed or something The socket doesn't match the one we had -- an error happened somewhere aw shoot, someone lost our resource, we gotta create a new one: stuff might be down! something u...
This file is part of hackney_disp released under the Apache 2 license . Copyright ( c ) 2012 , under the BSD license @doc Dispcount worker implementation for TCP socket handling -module(hackney_disp_handler). -behaviour(dispcount). -export([init/1, checkout/2, checkin/2, handle_inf...
2f8e1f364dba462a01387755f871ed4040bd3b9c1c35fb01a2f768a93dab5873
sunshineclt/Racket-Helper
homework3-4.rkt
#lang racket (define (accumulate op init seq) (if (null? seq) init (op (car seq) (accumulate op init (cdr seq))))) (define (accumulate-n op init seqs) (if (null? seqs) '() (cons (accumulate op init (map (lambda (lst) (car lst)) seqs)) (if (= (length (car seqs)) 1) ...
null
https://raw.githubusercontent.com/sunshineclt/Racket-Helper/bf85f38dd8d084db68265bb98d8c38bada6494ec/%E9%99%88%E4%B9%90%E5%A4%A9/Week3/homework3-4.rkt
racket
#lang racket (define (accumulate op init seq) (if (null? seq) init (op (car seq) (accumulate op init (cdr seq))))) (define (accumulate-n op init seqs) (if (null? seqs) '() (cons (accumulate op init (map (lambda (lst) (car lst)) seqs)) (if (= (length (car seqs)) 1) ...
e6b1e9e3d509dafb8bd43de4e0d480166138a1bec50932937ef69d350f37d501
coq/coq
redexpr.mli
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * *...
null
https://raw.githubusercontent.com/coq/coq/110921a449fcb830ec2a1cd07e3acc32319feae6/tactics/redexpr.mli
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team // * This file is distributed under the terms of the * (see LICENSE file for the text of the license) ************************************...
v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser Gener...
527caf0440147be4e972f635298d98887746dc318075d7b96c7462ab3db5fb88
xtendo-org/unbreak
Run.hs
-- | Module : . Run -- License : AGPL-3 Maintainer : XT -- Stability : Provisional -- Portability : POSIX -- Functions that perform the action of the utility . module Unbreak.Run ( runInit , runOpen , runCat , runLogout , runAdd , runList ) where import Prelude hi...
null
https://raw.githubusercontent.com/xtendo-org/unbreak/756d9e70e40f8801181532bf679d62a27d5bf52c/lib/Unbreak/Run.hs
haskell
| License : AGPL-3 Stability : Provisional Portability : POSIX | Creates the @~\/.unbreak.json@ file with the default configuration if it's missing. idempotent session get existing session or if that fails, create a new session | Given a filename, try copying the file from the remote to a temporary ...
Module : . Run Maintainer : XT Functions that perform the action of the utility . module Unbreak.Run ( runInit , runOpen , runCat , runLogout , runAdd , runList ) where import Prelude hiding ((++)) import Data.Maybe import Control.Monad import Control.Exception import Syst...
7552910a9594e614347ea737cd6a57059721e164078768e5e264469ddbe4a9b7
WhatsApp/eqwalizer
misc.erl
Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved . %%% This source code is licensed under the Apache 2.0 license found in %%% the LICENSE file in the root directory of this source tree. -module(misc). %% The majority of these tests are just %% to get some code coverage. %% Many of them d...
null
https://raw.githubusercontent.com/WhatsApp/eqwalizer/8017d486c025eaa5c35ced1481ad5bad0f665efa/eqwalizer/test_projects/check/src/misc.erl
erlang
the LICENSE file in the root directory of this source tree. The majority of these tests are just to get some code coverage. Many of them do not have any special meaning. scroll down for test86 -spec send02_neg(term(), term()) -> term(). send02_neg(Where, What) -> Where ! What. this is not very correct s...
Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved . This source code is licensed under the Apache 2.0 license found in -module(misc). -compile([export_all, nowarn_export_all]). -import(misc_lib, [boolean_id/1]). -export_type([ o/0, o_rec/0, o_cycle/0, x_cycle/0, int_...
f1078baab8b8683e57d781dfda0101e3de3cd3abf471b614ddcc9e627b23eeb8
metosin/malli
app2.cljc
;; this file is used to view the generated bundle sizes - npx shadow - cljs run shadow.cljs.build - report app2 /tmp / report.html ;; - npx shadow-cljs release app2 --pseudo-names (ns malli.app2 (:require [malli.core :as m] [malli.registry :as mr])) ;; - cljs: :closure-defines {malli.registry/type "cus...
null
https://raw.githubusercontent.com/metosin/malli/7ce3567f30f3b0f7d176b351d29145f0fa35ab60/app/malli/app2.cljc
clojure
this file is used to view the generated bundle sizes - npx shadow-cljs release app2 --pseudo-names - cljs: :closure-defines {malli.registry/type "custom"} => true => true
- npx shadow - cljs run shadow.cljs.build - report app2 /tmp / report.html (ns malli.app2 (:require [malli.core :as m] [malli.registry :as mr])) - clj : : jvm - opts [ " -Dmalli.registry / type = custom " ] just what is needed ( 1.2 kb gzipped ) (def registry {:string (m/-string-schema) :ma...
85ef533f184717461c6b40b4eb0b13d26a3b7347f44bc13ce79b1fe194cc5ca0
pNre/gram
types.ml
open Ctypes open Foreign let strndup = foreign "strndup" (string @-> size_t @-> returning (ptr char)) let strlen = foreign "strlen" (ptr char @-> returning int) let free = foreign "free" (ptr void @-> returning void) let char_ptr_to_string p = let len = strlen p in let chars = CArray.from_ptr p len in let bytes...
null
https://raw.githubusercontent.com/pNre/gram/e3c60dc6a3ea49d47e3cafb9f4c84e43ca3f6967/readline/types.ml
ocaml
open Ctypes open Foreign let strndup = foreign "strndup" (string @-> size_t @-> returning (ptr char)) let strlen = foreign "strlen" (ptr char @-> returning int) let free = foreign "free" (ptr void @-> returning void) let char_ptr_to_string p = let len = strlen p in let chars = CArray.from_ptr p len in let bytes...
35de853a4bd6923a911b728d63e4bb1417711aa94165ffcef9525806bf902b8a
phylogeography/spread
file_fxs.cljs
(ns ui.file-fxs (:require [re-frame.core :as re-frame])) (re-frame/reg-fx :spread/download-text-as-file (fn [{:keys [file-name file-type text]}] (let [download-anchor (js/document.createElement "a")] (.setAttribute download-anchor "href" (str file-type "," (js/encodeURIComponent text))) (.setAttribute...
null
https://raw.githubusercontent.com/phylogeography/spread/56f3500e6d83e0ebd50041dc336ffa0697d7baf8/src/cljs/ui/file_fxs.cljs
clojure
(ns ui.file-fxs (:require [re-frame.core :as re-frame])) (re-frame/reg-fx :spread/download-text-as-file (fn [{:keys [file-name file-type text]}] (let [download-anchor (js/document.createElement "a")] (.setAttribute download-anchor "href" (str file-type "," (js/encodeURIComponent text))) (.setAttribute...
1b88303b36edabd0c5cf9d295fc68b1103a59edeef247141e2cc1cb80e8c63b0
ktakashi/sagittarius-scheme
fields.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; ;;; sagittarius/crypto/math/ec/fields.scm - EC fields ;;; Copyright ( c ) 2022 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/c4fcd66790eba3379c93479c3f12fc455f2ca5bb/ext/crypto/sagittarius/crypto/math/ec/fields.scm
scheme
coding : utf-8 ; -*- sagittarius/crypto/math/ec/fields.scm - EC fields Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, ...
Copyright ( c ) 2022 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING #!nounbound (library (sagittarius crypto math ec fi...
43ea0b078e53f7202eab78e4ee6655fff7c08aaeb5540c570dac512959a466be
hkuplg/fcore
PrettyUtils.hs
# OPTIONS_GHC -fno - warn - missing - signatures # | Module : PrettyUtils Description : Utilities for pretty printing . Copyright : ( c ) 2014—2015 The F2J Project Developers ( given in AUTHORS.txt ) License : BSD3 Maintainer : < > Stability : experimental Portability ...
null
https://raw.githubusercontent.com/hkuplg/fcore/e27b6dec5bfd319edb8c3e90d94a993bcc7b4c95/frontend/PrettyUtils.hs
haskell
pretty :: a -> Doc pretty = prettyPrec basePrec prettyPrec :: Prec -> a -> Doc prettyPrec _ = PrettyUtils.pretty | Prettify a document as code.
# OPTIONS_GHC -fno - warn - missing - signatures # | Module : PrettyUtils Description : Utilities for pretty printing . Copyright : ( c ) 2014—2015 The F2J Project Developers ( given in AUTHORS.txt ) License : BSD3 Maintainer : < > Stability : experimental Portability ...
93a1b097c4b332190d9c1367d60eab7adadb7cc9d42d899e957e8fa6a4fafb92
haguenau/wyrd
tmkSignal.ml
class ['a,'b] signal name filter = object (self) val mutable callbacks : (int * ('a -> 'b)) list = [] method emit : 'a -> 'b = function x -> filter x callbacks method connect p f = let rec connect_aux = function | [] -> [p, f] | (ph,_)::_ as q when ph < p -> (p,f)::q | h::t -> h::(conn...
null
https://raw.githubusercontent.com/haguenau/wyrd/490ce39ad9ecf36969eb74b9f882f85a1ef14ba3/curses/tmk/tmkSignal.ml
ocaml
class ['a,'b] signal name filter = object (self) val mutable callbacks : (int * ('a -> 'b)) list = [] method emit : 'a -> 'b = function x -> filter x callbacks method connect p f = let rec connect_aux = function | [] -> [p, f] | (ph,_)::_ as q when ph < p -> (p,f)::q | h::t -> h::(conn...
e9bcfadf22378f09747c6832f184b32fa2cea5df363a584f0c6483a33ddd7489
wdebeaum/step
agent.lisp
;;;; ;;;; W::agent ;;;; (define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::agent (SENSES ((meta-data :origin calo :entry-date 20060803 :change-date nil :comments nil) (LF-PARENT ONT::agent-representative) ;professional) ;agent) ) ) ) ))
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/agent.lisp
lisp
W::agent professional) ;agent)
(define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::agent (SENSES ((meta-data :origin calo :entry-date 20060803 :change-date nil :comments nil) ) ) ) ))
f865263068337d50c2b93f9e1d964dba29824038a5d39ee5d5eab84a3fdaa1f3
rcherrueau/APE
new_binding_or*.rkt
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Writing Hygienic Macros in Scheme with Syntax - case Technical Report # 356 ;; page 8 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #lang racket (require "print-test.rkt") Must return the v...
null
https://raw.githubusercontent.com/rcherrueau/APE/8b5302709000bd043b64d46d55642acb34ce5ba7/racket/hygienic_macros/new_binding_or*.rkt
racket
true (nonfalse) value. does evaluate to a true value. In order to avoid evaluating the subexpression twice, a temporary variable `t` is introduced.
Writing Hygienic Macros in Scheme with Syntax - case Technical Report # 356 page 8 #lang racket (require "print-test.rkt") Must return the value of the first subexpression that evaluate to a (define-syntax (or* x) (syntax-case x () [(_) #'#f] [(_ e) #'e] [(_ e1 e2 e3 ...) If there is more...
cca8f04a3bcc61f72e16dd0a742cd6558b2a7df032f660479ee26c15e9d3b95a
AccelerationNet/cl-csv
csv.lisp
(defpackage :cl-csv-test (:use :cl :cl-user :cl-csv :lisp-unit2 :iter)) (in-package :cl-csv-test) (cl-interpol:enable-interpol-syntax) (defun run-all-tests () (run-tests :package :cl-csv-test :name :cl-csv :run-contexts #'with-summary-context )) (defmacro assert-length (exp it &rest them) `(assert-eql...
null
https://raw.githubusercontent.com/AccelerationNet/cl-csv/68ecb5d816545677513d7f6308d9e5e8d2265651/tests/csv.lisp
lisp
test SKIPPING-HEADER option test SEPARATOR newline filled buffer ** newline
(defpackage :cl-csv-test (:use :cl :cl-user :cl-csv :lisp-unit2 :iter)) (in-package :cl-csv-test) (cl-interpol:enable-interpol-syntax) (defun run-all-tests () (run-tests :package :cl-csv-test :name :cl-csv :run-contexts #'with-summary-context )) (defmacro assert-length (exp it &rest them) `(assert-eql...
4f92fae6da67f44f1c3638f252e373ac4346269933f4bdbb097755978f2f0285
darkleaf/publicator
id_generator.clj
(ns publicator.persistence.id-generator (:require [jdbc.core :as jdbc] [publicator.domain.abstractions.id-generator :as id-generator])) (deftype IdGenerator [data-source] id-generator/IdGenerator (-generate [_] (with-open [conn (jdbc/connection data-source)] (let [stmt (jdbc/prepared-statement co...
null
https://raw.githubusercontent.com/darkleaf/publicator/e07eee93d8f3d9c07a15d574619d5ea59c00f87d/persistence/src/publicator/persistence/id_generator.clj
clojure
(ns publicator.persistence.id-generator (:require [jdbc.core :as jdbc] [publicator.domain.abstractions.id-generator :as id-generator])) (deftype IdGenerator [data-source] id-generator/IdGenerator (-generate [_] (with-open [conn (jdbc/connection data-source)] (let [stmt (jdbc/prepared-statement co...
ebad626533649e949ecfc48eb926a1fa4ee45c54c0279fe793025e17ef51c019
hsyl20/haskus-system
CmdLine.hs
module CmdLine ( Options(..) , getOptions ) where import Options.Applicative data Options = Options { optpath :: String , optport :: Int } options :: Parser Options options = Options <$> argument str ( metavar "PATH" <> help "Path to the binary or the project" ) <*> opti...
null
https://raw.githubusercontent.com/hsyl20/haskus-system/2f389c6ecae5b0180b464ddef51e36f6e567d690/haskus-system-tools/src/elf/CmdLine.hs
haskell
module CmdLine ( Options(..) , getOptions ) where import Options.Applicative data Options = Options { optpath :: String , optport :: Int } options :: Parser Options options = Options <$> argument str ( metavar "PATH" <> help "Path to the binary or the project" ) <*> opti...
d2d5c0e8b876822424195f07daa98f98ed466b3adac93fde66ca052edf14278f
rmculpepper/gamble
enumerate.rkt
Copyright ( c ) 2014 Released under the terms of the 2 - clause BSD license . ;; See the file COPYRIGHT for details. #lang racket/base (require (rename-in racket/match [match-define defmatch]) racket/class "../interfaces.rkt" "../dist.rkt" "../util/prob.rkt" "../../di...
null
https://raw.githubusercontent.com/rmculpepper/gamble/a5231e2eb3dc0721eedc63a77ee6d9333846323e/gamble/private/enumerate/enumerate.rkt
racket
See the file COPYRIGHT for details. == Overview == Enumeration using lazy tree of probability-labeled possibilities, based on delimited continuations (only for discrete ERPs). For enumeration to work: - The predicate must accept a nonempty set of paths. Without knowing structure of paths and conditioning p...
Copyright ( c ) 2014 Released under the terms of the 2 - clause BSD license . #lang racket/base (require (rename-in racket/match [match-define defmatch]) racket/class "../interfaces.rkt" "../dist.rkt" "../util/prob.rkt" "../../dist/discrete.rkt" "lazy-tree.rk...
e91fbca71f87607a44be8cbc81c07d329757fc9ddf604b861d93a5e1aa31ea1a
janestreet/merlin-jst
test.ml
* * * # 670 * * * module type S = sig class virtual x : object method private virtual release : unit end end module Make (C : S) = struct class c = object method private release = () end let x = 3 end * * * # 843 * * * class a x = object method x = x end and b x = a x class a x = ob...
null
https://raw.githubusercontent.com/janestreet/merlin-jst/0152b4e8ef1b7cd0ddee2873aa1860a971585391/tests/test-dirs/short-paths.t/test.ml
ocaml
the following cases do not trigger error *** Don't select deprecated paths ***
* * * # 670 * * * module type S = sig class virtual x : object method private virtual release : unit end end module Make (C : S) = struct class c = object method private release = () end let x = 3 end * * * # 843 * * * class a x = object method x = x end and b x = a x class a x = ob...
93a2f08b13e780cfa6388b60457c59e2f286fac51787850075ab357fdb5dcc2b
mirage/decompress
lzo.ml
type bigstring = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t type error = [ `Malformed of string | `Invalid_argument of string | `Invalid_dictionary ] let pf = Format.fprintf let pp_error ppf = function | `Malformed err -> pf ppf "%s" err | `Invalid_argument err -> pf ppf "%s" err...
null
https://raw.githubusercontent.com/mirage/decompress/c2744b785a77d15e03c7397d59e232464855215a/lib/lzo.ml
ocaml
XXX(dinosaure): [Kontinuation] exists to break the stack-overflow with [js_of_ocaml] but it was not implemented yet. TODO: replace it by something else to ensure exhaustive pattern-matching. inflate literal: TODO: check [lsr]. next: break len > 20
type bigstring = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t type error = [ `Malformed of string | `Invalid_argument of string | `Invalid_dictionary ] let pf = Format.fprintf let pp_error ppf = function | `Malformed err -> pf ppf "%s" err | `Invalid_argument err -> pf ppf "%s" err...
834c9d60ee6039b6afb51b5fe6187311ed964d9f9df4f6f2a155d99ee730cc1e
spawnfest/eep49ers
ssl.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1999 - 2020 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/ssl/src/ssl.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 1999 - 2020 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , Purpose : Main API module for the SSL application that implements TLS and DTLS -module(ssl). -include_lib("publ...
ea98c8ee9a0c4255aacbd781159ef08ef99195e8aaf26728ecb76aa0cb3d3a7d
cofree-coffee/cofree-bot
Spec.hs
module Main where -------------------------------------------------------------------------------- import Control.Monad.IO.Class (liftIO) import Data.Functor.Compose (Compose (..)) import Data.Text qualified as Text import Hedgehog.Gen qualified as Gen import Hedgehog.Range qualified as Range import Options.Env (read...
null
https://raw.githubusercontent.com/cofree-coffee/cofree-bot/2466a444f17c560bfbadcad328f8a8c08d8da896/cofree-bot/test/Spec.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Note: This spec is kind of silly, but the initial env var fetching used 'read' and failed on the 'Text' instance requiring quoting.
module Main where import Control.Monad.IO.Class (liftIO) import Data.Functor.Compose (Compose (..)) import Data.Text qualified as Text import Hedgehog.Gen qualified as Gen import Hedgehog.Range qualified as Range import Options.Env (readEnv) import Options.Types (MatrixServer (MatrixServer)) import System.Environment...
5c473760aeaeeb3a19e9cbdf397856162cbba98da1f20cb73d156c3f91eac78f
gersak/vura
catholic.cljc
(ns vura.holidays.catholic #?(:cljs [vura.holidays.macros :refer [static-holiday]]) (:require [vura.core :as vura] [vura.holidays.core :as c] #?(:clj [vura.holidays.macros :refer [static-holiday]]))) (static-holiday epiphany? 1 6) (def easter (memoize (fn [year] (let [a (mod year 19) ...
null
https://raw.githubusercontent.com/gersak/vura/a81e898de9e743205865cbfbf6465a649fcff6fa/holidays/src/vura/holidays/catholic.cljc
clojure
(let [d (-> data vura/time->value vura/day-context)] (some (fn [[f n]] (when (f d) n)) holiday->context)))
(ns vura.holidays.catholic #?(:cljs [vura.holidays.macros :refer [static-holiday]]) (:require [vura.core :as vura] [vura.holidays.core :as c] #?(:clj [vura.holidays.macros :refer [static-holiday]]))) (static-holiday epiphany? 1 6) (def easter (memoize (fn [year] (let [a (mod year 19) ...
d33ae2fc91ac076cab6f989bc9daabce82249abec361d5c47e383d6512fc1868
Clozure/ccl-tests
muffle-warning.lsp
;-*- Mode: Lisp -*- Author : Created : Sun Mar 23 08:46:05 2003 ;;;; Contains: Tests of the MUFFLE-WARNING restart and function (in-package :cl-test) (deftest muffle-warning.1 (restart-case (progn (muffle-warning) 'bad) (muffle-warning () 'good)) good) (deftest muffle-warning.2 (let ((c1 (...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/muffle-warning.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of the MUFFLE-WARNING restart and function All conditions are now associated with c1
Author : Created : Sun Mar 23 08:46:05 2003 (in-package :cl-test) (deftest muffle-warning.1 (restart-case (progn (muffle-warning) 'bad) (muffle-warning () 'good)) good) (deftest muffle-warning.2 (let ((c1 (make-condition 'error)) (c2 (make-condition 'error))) (restart-case (with-cond...
8d86ac261a8a0509a0c6b9e58c0fc43360d2d30c3f96392aabe7eecef02405fe
juji-io/editscript
a_star_test.cljc
;; 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 LICENSE at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;; the ter...
null
https://raw.githubusercontent.com/juji-io/editscript/4d393145a85fed81eac0457e33602e104cecc722/test/editscript/diff/a_star_test.cljc
clojure
The use and distribution terms for this software are covered by the which can be found in the file LICENSE 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 this notice, or any other, from this software.
Copyright ( c ) . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) (ns editscript.diff.a-star-test (:require [clojure.test :refer [is testing deftest]] [editscript.edit :refer [get-edits]] [editscript.diff.a-star :refer [diff]])) (deftest vec-diff-test (testing "Testing ...
a84f2b5c798b18ec9aaeb967f49db78e9d3a045783bebdb4766005b531ed64f1
roburio/unikernels
config.ml
( c ) 2017 , 2018 , all rights reserved open Mirage let resolver = let doc = Key.Arg.info ~doc:"Recursive resolver to query" ["resolver"] in Key.(create "resolver" Arg.(opt ipv4_address (Ipaddr.V4.of_string_exn "141.1.1.1") doc)) let dns_handler = let packages = [ package "logs" ; package ~...
null
https://raw.githubusercontent.com/roburio/unikernels/1cd349fef3ffc4d3fbb51bd7d35421c8d8bb9671/stub-resolver/config.ml
ocaml
( c ) 2017 , 2018 , all rights reserved open Mirage let resolver = let doc = Key.Arg.info ~doc:"Recursive resolver to query" ["resolver"] in Key.(create "resolver" Arg.(opt ipv4_address (Ipaddr.V4.of_string_exn "141.1.1.1") doc)) let dns_handler = let packages = [ package "logs" ; package ~...
2928362ceac9646cfa58ac957f6b584b3f4afd63977d38cfa5464fd693badf18
graninas/GraphServer
TextureInit.hs
module Draw.TextureInit where import qualified Graphics.UI.GLUT as GLUT (TextureObject(..)) import qualified Graphics.Rendering.OpenGL as GL import Common.GLTypes import qualified ThirdParty.Frag.Textures as FragTex import qualified ThirdParty.ImageFormats.TGA as IFTGA import qualified ThirdParty.GLUtil.Textures a...
null
https://raw.githubusercontent.com/graninas/GraphServer/088c234ae840162002f707559cfefc96bcc02bda/src/Draw/TextureInit.hs
haskell
module Draw.TextureInit where import qualified Graphics.UI.GLUT as GLUT (TextureObject(..)) import qualified Graphics.Rendering.OpenGL as GL import Common.GLTypes import qualified ThirdParty.Frag.Textures as FragTex import qualified ThirdParty.ImageFormats.TGA as IFTGA import qualified ThirdParty.GLUtil.Textures a...
5713e3f817282e24415391981b1ffc121d00fa8a56096a506d2f4bdb9a2c30ef
patrikja/AFPcourse
DSL.hs
# LANGUAGE ScopedTypeVariables # module DSL where import Control.Monad(liftM) ---------------------------------------------------------------- Problem 1a : constP a = \_f _p _s _t -> a liftPc op ia b = liftP2 op ia (constP b) liftP2 op ia ib = \ f p s t -> ia f p s t `op` ib f p s t liftPath fp = \...
null
https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/exam/2015-03/DSL.hs
haskell
-------------------------------------------------------------- Some OK variations: Some examples of errors redefine InfoP as a deep embedding (making all the operations contructors in a datatype) liftP2 f (Const a) (Const b) = Const (f a b) ... -------------------------------------------------------------- Proble...
# LANGUAGE ScopedTypeVariables # module DSL where import Control.Monad(liftM) Problem 1a : constP a = \_f _p _s _t -> a liftPc op ia b = liftP2 op ia (constP b) liftP2 op ia ib = \ f p s t -> ia f p s t `op` ib f p s t liftPath fp = \ f _p _s _t -> fp f (&&?) = liftP2 (&&) (||?) ...
d9ea017695981de83c46c3a187afc4fb6613c4299efcae11178704318db47124
CorticalComputer/DXNN2
fx.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% This source code and work is provided and developed by . COM % The original release of this source code and the DXNN MK2 system was introduced and explained in my book : Handbook of Neuroevolution Through Erlang . Springer 2012 , print I...
null
https://raw.githubusercontent.com/CorticalComputer/DXNN2/d57d43a91f125f3930e06611f5fce15a0462b32f/src/fx.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 g...
This source code and work is provided and developed by . COM The original release of this source code and the DXNN MK2 system was introduced and explained in my book : Handbook of Neuroevolution Through Erlang . Springer 2012 , print ISBN : 978 - 1 - 4614 - 4462 - 6 ebook ISBN : 978 - 1 - 4614 - 4463 - 6 . Co...
a871fbbca0f7f19952d02ffaf48acffc58a0fa8ca02a9b9a5ec0dc30ecb26943
kloimhardt/werkbank
env.clj
; Copyright © 2017 . This work is based on the Scmutils system of MIT / GNU Scheme : Copyright © 2002 Massachusetts Institute of Technology ; ; This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; ei...
null
https://raw.githubusercontent.com/kloimhardt/werkbank/df66274eb978d060a043b8429b29d0f36c4a2e89/src/sicmutils/env.clj
clojure
This is free software; you can redistribute it and/or modify either version 3 of the License , or ( at your option) any later version. This software 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 PUR...
Copyright © 2017 . This work is based on the Scmutils system of MIT / GNU Scheme : Copyright © 2002 Massachusetts Institute of Technology it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License (ns sicmutils.env "The purpose o...
63e944d8a421007287a6c5b0bb017392dd92d040185e53ee3beb117fd1d25ebb
gregnwosu/haskellbook
HttpStuff.hs
module HttpStuff where import Data.ByteString.Lazy import Network.Wreq urls :: [String] urls = ["", ""] mapping :: IO [Response ByteString] mapping = traverse get urls
null
https://raw.githubusercontent.com/gregnwosu/haskellbook/b21fb6772e58f07cff334d9c551d0477ec856897/chapter21/src/HttpStuff.hs
haskell
module HttpStuff where import Data.ByteString.Lazy import Network.Wreq urls :: [String] urls = ["", ""] mapping :: IO [Response ByteString] mapping = traverse get urls
74f5486b800e3e9ec05ac7c446ed9e7f1d428dbce3f93b462d52e5c6f1eb6deb
kelamg/HtDP2e-workthrough
ex28.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex28) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Fixed-size-Data/ex28.rkt
racket
about the language level of this file in a form that our tools can easily process.
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex28) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define base-attendees 120) (define base-price 5.0) (define base-at...
2afb3dac9fc093a30122ab5aa1120c2f006641fa32b91165766ea53275d24fa5
tezos/tezos-mirror
main_snoop.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2020 Nomadic Labs . < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/cbcbf6945ce9bcda5189f887ab81000ed0a48892/src/bin_snoop/main_snoop.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2020 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...
f27ee9944b44d72496509448ff98d8b7aaa913db2f663cca122cba5120820ba4
jrm-code-project/LISP-Machine
fquery-common.lisp
-*- Mode : LISP ; Package : FORMAT ; : ZL ; Base:8 -*- * * ( c ) Copyright 1980 Massachusetts Institute of Technology * * (DEFPARAMETER Y-OR-N-P-CHOICES '(((T "Yes.") #/Y #/T #/SP #/HAND-UP) ((NIL "No.") #/N #/RUBOUT #/HAND-DOWN))) (DEFPARAMETER YES-OR-NO-P-CHOICES '((T "Yes"...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/io1/fquery-common.lisp
lisp
Package : FORMAT ; : ZL ; Base:8 -*- not used User spazzed, will need fresh line character lossage Not relevant Don't confuse the user by mentioning possible alternative inputs. character lossage If that would echo as something else, say so character lossage Just in case DEFVAR is in ZWEI.
* * ( c ) Copyright 1980 Massachusetts Institute of Technology * * (DEFPARAMETER Y-OR-N-P-CHOICES '(((T "Yes.") #/Y #/T #/SP #/HAND-UP) ((NIL "No.") #/N #/RUBOUT #/HAND-DOWN))) (DEFPARAMETER YES-OR-NO-P-CHOICES '((T "Yes") (NIL "No"))) (DEFVAR FQUERY-FORMAT-STRING) (DEFVAR FQ...
e343906f5feeb06a954ce96679423dd2b69382e3f936a2e72acd26f5ff430145
futurice/haskell-futurice-prelude
Indexed.hs
# LANGUAGE GADTs # # LANGUAGE KindSignatures # {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} module Futurice.Indexed ( -- * Classes IxFunctor (..), IxApply (..), IxApplicative (..), -- * IxConst IxConst (..), -- * Free IxAp (..), liftIxAp, lowerIxAp, ...
null
https://raw.githubusercontent.com/futurice/haskell-futurice-prelude/3297616a1f9b613ba17ce6cb16a61fadfbf1fa00/src/Futurice/Indexed.hs
haskell
# LANGUAGE PolyKinds # # LANGUAGE RankNTypes # * Classes * IxConst * Free ----------------------------------------------------------------------------- Classes ----------------------------------------------------------------------------- ---------------------------------------------------------------------...
# LANGUAGE GADTs # # LANGUAGE KindSignatures # module Futurice.Indexed ( IxFunctor (..), IxApply (..), IxApplicative (..), IxConst (..), IxAp (..), liftIxAp, lowerIxAp, lowerIxAp_, ) where import Control.Category (Category) import Data.Kind (Type) import Futurice.Prelude ...
f15419475b252823d53950d56dc4fa37269ba71a917c6b30b0ddbd2336092004
Vonmo/erbloom
bloom_SUITE.erl
-module(bloom_SUITE). -compile(export_all). -import(ct_helper, [config/2]). -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). all() -> [ {group, bloom}, {group, perf} ]. groups() -> [ {bloom, [parallel, shuffle], [new, serialize, deserialize, set, check...
null
https://raw.githubusercontent.com/Vonmo/erbloom/36d943e0ac8b3cf7272e615b622d3767872f8deb/test/bloom_SUITE.erl
erlang
============================================================================= init ============================================================================= ============================================================================= end =======================================================================...
-module(bloom_SUITE). -compile(export_all). -import(ct_helper, [config/2]). -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). all() -> [ {group, bloom}, {group, perf} ]. groups() -> [ {bloom, [parallel, shuffle], [new, serialize, deserialize, set, check...
6ffc29a532796886335a302a789dee65ffb0472400dd59cd62ac295717355a33
clojure-emacs/cider-nrepl
piggieback_test.clj
(ns cider.nrepl.piggieback-test (:require [cider.piggieback :as piggieback] [cider.nrepl.test-session :as session] [cider.nrepl.middleware :refer [cider-middleware]] [cljs.repl.node :as node] [clojure.test :refer :all] [nrepl.core :as nrepl] [nrepl.server :as server])) (def repl-env (delay (no...
null
https://raw.githubusercontent.com/clojure-emacs/cider-nrepl/cd29bd761e58707d438b3373d7512c9e33ded865/test/cljs/cider/nrepl/piggieback_test.clj
clojure
we should n't run any tests if it fails
(ns cider.nrepl.piggieback-test (:require [cider.piggieback :as piggieback] [cider.nrepl.test-session :as session] [cider.nrepl.middleware :refer [cider-middleware]] [cljs.repl.node :as node] [clojure.test :refer :all] [nrepl.core :as nrepl] [nrepl.server :as server])) (def repl-env (delay (no...
3edf7bf5ab3c78fe0f5918bfd730cc1820da90e88b34f7d6f97b67615217cab9
wilbowma/cur
rewrite-in.rkt
#lang cur (require (except-in cur/stdlib/equality sym) (only-in cur/stdlib/equality [sym sym-orig]) cur/stdlib/sugar cur/stdlib/bool cur/ntac/base cur/ntac/standard cur/ntac/rewrite "rackunit-ntac.rkt" rackunit/turnstile+) ;; test rewriting in ctx...
null
https://raw.githubusercontent.com/wilbowma/cur/e039c98941b3d272c6e462387df22846e10b0128/cur-test/cur/tests/ntac/rewrite-in.rkt
racket
test rewriting in ctx hypotheses regular rewrite (no #:in) raw term: regular rewrite (no #:in) by-rewrite H1: goal: x=z -> y=z wrong raw term (for trans/in): by-rewrite H2 #:in H1 x=y -> x=z another wrong raw term (for trans/in) (bc H2 and H1 position are flipped in the elim) by-rewrite H2 #:in H1 x=y -> x=z ...
#lang cur (require (except-in cur/stdlib/equality sym) (only-in cur/stdlib/equality [sym sym-orig]) cur/stdlib/sugar cur/stdlib/bool cur/ntac/base cur/ntac/standard cur/ntac/rewrite "rackunit-ntac.rkt" rackunit/turnstile+) (define sym sym-orig) ...
5a4eb12e351ee432512a3df3c84e788af17d16047f7adaf67c6d650468fc5ed9
xsc/thrift-clj
iface_test.clj
(ns ^{ :doc "Tests for Service Interface Import" :author "Yannick Scherer" } thrift-clj.gen.iface-test (:use midje.sweet) (:require [thrift-clj.core :as thrift])) # # Import (thrift/import-types [thriftclj.structs Person Name Location Country]) (thrift/import-iface [thriftclj.services.TelephoneBook...
null
https://raw.githubusercontent.com/xsc/thrift-clj/cc6cf181540cd516c293c448ba07d8b3c023f04e/test-thrift/clj/thrift_clj/gen/iface_test.clj
clojure
## Tests
(ns ^{ :doc "Tests for Service Interface Import" :author "Yannick Scherer" } thrift-clj.gen.iface-test (:use midje.sweet) (:require [thrift-clj.core :as thrift])) # # Import (thrift/import-types [thriftclj.structs Person Name Location Country]) (thrift/import-iface [thriftclj.services.TelephoneBook...
c1396f1cb9ec7ac978d8f428476e47354c19aec42c11c1d1a3f86a1b17e1f243
froydnj/ironclad
cmac.lisp
;;;; -*- mode: lisp; indent-tabs-mode: nil -*- cmac.lisp -- The CMAC algorithm from NIST 800 - 38B. (in-package :crypto) (defclass cmac () ((cipher :reader cmac-cipher :initarg :cipher) (subkey1 :reader cmac-subkey1 :initarg :subkey1 :type (simple-array (unsigned-byte 8) (*))) (subkey2 :reader c...
null
https://raw.githubusercontent.com/froydnj/ironclad/fe88483bba68eac4db3b48bb4a5a40035965fc84/src/macs/cmac.lisp
lisp
-*- mode: lisp; indent-tabs-mode: nil -*-
cmac.lisp -- The CMAC algorithm from NIST 800 - 38B. (in-package :crypto) (defclass cmac () ((cipher :reader cmac-cipher :initarg :cipher) (subkey1 :reader cmac-subkey1 :initarg :subkey1 :type (simple-array (unsigned-byte 8) (*))) (subkey2 :reader cmac-subkey2 :initarg :subkey2 :type...
2cf06493b2e0556be6a096b3b835acc7dc094b8de5c6de2d9225a1096cdf4487
ChicagoBoss/ChicagoBoss
boss_log_util_test.erl
%%------------------------------------------------------------------- @author ChicagoBoss Team and contributors , see file in root directory %% @end This file is part of ChicagoBoss project . See file in root directory %% for license information, see LICENSE file in root directory %% @end %...
null
https://raw.githubusercontent.com/ChicagoBoss/ChicagoBoss/113bac70c2f835c1e99c757170fd38abf09f5da2/test/boss_log_util_test.erl
erlang
------------------------------------------------------------------- @end for license information, see LICENSE file in root directory @end @doc -------------------------------------------------------------------
@author ChicagoBoss Team and contributors , see file in root directory This file is part of ChicagoBoss project . See file in root directory -module(boss_log_util_test). -include_lib("eunit/include/eunit.hrl"). -include("../src/boss/boss_web.hrl"). gen_trace_without_location(Arg1, Arg2) -> ...
43ac661a3fcaaad6f7edd23fb9489311647ae9c6d155e4bb1c12f5fe211ecf64
albertoruiz/easyVision
SVM.hs
----------------------------------------------------------------------------- | Module : Classifier . SVM Copyright : ( c ) 2007 License : GPL - style Maintainer : ( aruiz at um dot es ) Stability : very provisional Portability : uses SVM - Light Interface to the Sup...
null
https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/packages/classifier/src/Classifier/SVM.hs
haskell
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
| Module : Classifier . SVM Copyright : ( c ) 2007 License : GPL - style Maintainer : ( aruiz at um dot es ) Stability : very provisional Portability : uses SVM - Light Interface to the Support Vector Machine program SVM - Light by Thorsten Joachims , available in < ...
d9353f2014d37274cc956b6ad83e6d63595a2ec1c44b679e2ac9d4ad3c9dc5ca
ekmett/ekmett.github.com
Policy.hs
module Policy (Classified, Secret, runSecret, runClassified) where import Control.Monad (liftM) import Control.Monad.Security import System.IO.Unsafe (unsafePerformIO) import Control.Concurrent.MVar (MVar,newMVar,withMVar) import Foreign.C.String (peekCAString,withCString,CString) import System.Console.Readline (readl...
null
https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/security-policy/_darcs/pristine/test/Policy.hs
haskell
| Secret | n^2 - n instances. we only let you extract secret things that we can show in the logs later | allow anyone to extract classified data if they just say please.
module Policy (Classified, Secret, runSecret, runClassified) where import Control.Monad (liftM) import Control.Monad.Security import System.IO.Unsafe (unsafePerformIO) import Control.Concurrent.MVar (MVar,newMVar,withMVar) import Foreign.C.String (peekCAString,withCString,CString) import System.Console.Readline (readl...
a3979282a4aeddd3f914e3511f4274e323228f22b3ce16c58f2682f8c071ff24
commercialhaskell/path
Windows.hs
# LANGUAGE LambdaCase # {-# LANGUAGE QuasiQuotes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # -- | Test suite. module Windows (spec) where import Control.Applicative import Control.Monad import Data.Aeson import qualified Data.ByteString.Lazy.Char8 as LBS import Data.Maybe...
null
https://raw.githubusercontent.com/commercialhaskell/path/2bec48c17be4b82f7dabc8e2dd167444e558e9a5/test/Windows.hs
haskell
# LANGUAGE QuasiQuotes # | Test suite. | Test suite (Windows version). | Restricting the input of any tricks. | The 'dirname' operation. | The 'filename' operation. | The 'parent' operation. | The 'isProperPrefixOf' operation. | The 'stripProperPrefix' operation. | The '</>' operation. | Tests for the...
# LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # module Windows (spec) where import Control.Applicative import Control.Monad import Data.Aeson import qualified Data.ByteString.Lazy.Char8 as LBS import Data.Maybe import Path.Windows import Path.Internal.Windows impo...
1adb375ac49ffde240cee3c0b65f602a42c9eec001233ba8878dc467df21381a
ryanpbrewster/haskell
P001Test.hs
module Problems.P001Test ( case_001_main ) where import Problems.P001 import Test.Tasty.Discover (Assertion, (@?=)) case_001_main :: Assertion case_001_main = solve @?= "233168"
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/tests/Problems/P001Test.hs
haskell
module Problems.P001Test ( case_001_main ) where import Problems.P001 import Test.Tasty.Discover (Assertion, (@?=)) case_001_main :: Assertion case_001_main = solve @?= "233168"
e964a9166fcdf2ad3f7fd74892d2ecb2f2d9cf1ac16303d20a784a90025e6e68
bennn/little-book-of-semaphores
5-5-h20.rkt
#lang little-book-of-semaphores (define bond-id (box 0)) (struct molecule ( Natural t ;; (U 'water 'hydrogen) ) #:transparent ) (define water-q (make-semaphore 0)) (define num-water (box 0)) (define hydro-q (make-semaphore 0)) (define num-hydro (box 0)) (define mutex (make-semaphore 1)) (define bond-lock (make-...
null
https://raw.githubusercontent.com/bennn/little-book-of-semaphores/13dc1690073ae45f5ac7e4e4137d636aae1ef7c9/problems/5-5-h20.rkt
racket
(U 'water 'hydrogen) ----------------------------------------------------------------------------- Generic for water/hydrogen, how to wait with bond-lock ----------------------------------------------------------------------------- -----------------------------------------------------------------------------
#lang little-book-of-semaphores (define bond-id (box 0)) (struct molecule ( Natural ) #:transparent ) (define water-q (make-semaphore 0)) (define num-water (box 0)) (define hydro-q (make-semaphore 0)) (define num-hydro (box 0)) (define mutex (make-semaphore 1)) (define bond-lock (make-semaphore 1)) (define subbond...
0611484de2689fd0e8a84fe8736c2c97b7682872a5ed9297af1b73ebaf1527e0
mirage/ocaml-qcow
qcow_metadata.ml
* Copyright ( C ) 2017 Docker Inc * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND TH...
null
https://raw.githubusercontent.com/mirage/ocaml-qcow/2418c66627dcce8420bcb06d7547db171528060a/lib/qcow_metadata.ml
ocaml
* An in-memory cache of metadata clusters used to speed up lookups. Cache entries may be `read` or `update`d with a lock held to block concurrent access. free/ used space map Find the block currently being referenced so it can be marked as free. * Read the contents of [cluster] and apply the fu...
* Copyright ( C ) 2017 Docker Inc * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND TH...
14192c929f392979ea526c18e152ea14a7c13d6448f299aab8dcb24e5525dc6a
facebook/infer
mergeCapture.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/facebook/infer/d372496ff5f8170d2c894029cec3e97eef8f4591/infer/src/integration/mergeCapture.ml
ocaml
* Module to merge the results of capture for different buck/gradle targets. shadowed for tracing
* 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 ...
500fe93f597e165880092504201ea33df84b9626fde888d39c543d00c1393ca2
abakst/Brisk
Match00.hs
module Match00 where import Control.Distributed.Process main :: Process () main = receiveWait [ match f -- receive([match x:t1 -> f -- ,match x:t2 -> g -- ,match x:t3 -> h]) >>= \x -> ... , match g ] where f :: Int -> Process () f x = return () g :: Stri...
null
https://raw.githubusercontent.com/abakst/Brisk/3e4ce790a742d3e3b786dba45d36f715ea0e61ef/examples/Match00.hs
haskell
receive([match x:t1 -> f ,match x:t2 -> g ,match x:t3 -> h]) >>= \x -> ...
module Match00 where import Control.Distributed.Process main :: Process () main = receiveWait [ , match g ] where f :: Int -> Process () f x = return () g :: String -> Process () g x = return ()
81c96aee179732de5e758bf807897183fa7a24e6f5f1fab99815517433510835
swaywm/chicken-wlroots
wayland-types.scm
Copyright 2019 ;; ;; Permission is hereby granted, free of charge, to any person obtaining a copy ;; of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation the ;; rights to use, copy, modify, merge, publish, distribute, subl...
null
https://raw.githubusercontent.com/swaywm/chicken-wlroots/649f200126102b1247ba638eb797d14b46bafc0b/include/wayland-types.scm
scheme
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to rights to use, copy, modify, merge, publish, distribute, sublicense, and/or furnished to do so, subject to the following conditions: The above copyright notice and...
Copyright 2019 deal in the Software without restriction , including without limitation the sell copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILI...
bdeccfc17d16025744daa38673fd1933fd9994d7b07f0b7c573e90f2ae3a87de
LexiFi/menhir
StackSymbols.mli
(******************************************************************************) (* *) (* *) ...
null
https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/StackSymbols.mli
ocaml
**************************************************************************** file LICEN...
, Paris , PPS , Université Paris Diderot . All rights reserved . This file is distributed under the terms of the GNU General Public License version 2 , as...
e4084638c36d68369e219bbce137e9a853b1e06336f95a66f4f0f17ab4132945
leanil/LambdaGen
Utility.hs
module Utility where import Control.Applicative ((<$>)) import Control.Monad (when) import Data.Char (chr, ord) import Data.List (sort, sortBy) import Data.Text (Text, filter, pack) import System.Directory (createDirectoryIfMissing, doesDirectoryExist, removeDirectoryRecursive) import System.Exit (ExitCode(..), exitFa...
null
https://raw.githubusercontent.com/leanil/LambdaGen/aff49962759c1ce1fcfb2a1cc4a9a11d78e713a9/src/Utility.hs
haskell
module Utility where import Control.Applicative ((<$>)) import Control.Monad (when) import Data.Char (chr, ord) import Data.List (sort, sortBy) import Data.Text (Text, filter, pack) import System.Directory (createDirectoryIfMissing, doesDirectoryExist, removeDirectoryRecursive) import System.Exit (ExitCode(..), exitFa...
7e49fd44dcf0171beb290d0791c34869ef267a1685fbeb0deed97ed4b1063531
jamii/erl-telehash
th_util.erl
% stuff that doesnt fit anywhere else -module(th_util). -include("conf.hrl"). -include("types.hrl"). -include_lib("proper/include/proper.hrl"). -export([address_to_binary/1, binary_to_address/1, binary_to_end/1, hex_to_end/1, end_to_hex/1, to_end/1, random_end/0, random_end/1, distance/2, to_bits/1]). -export([tap_...
null
https://raw.githubusercontent.com/jamii/erl-telehash/2c0218bbf7a543e318ed50a1d48fb481963f151e/src/th_util.erl
erlang
stuff that doesnt fit anywhere else --- api --- --- tests --- --- end ---
-module(th_util). -include("conf.hrl"). -include("types.hrl"). -include_lib("proper/include/proper.hrl"). -export([address_to_binary/1, binary_to_address/1, binary_to_end/1, hex_to_end/1, end_to_hex/1, to_end/1, random_end/0, random_end/1, distance/2, to_bits/1]). -export([tap_to_json/1, json_to_tap/1]). -export([e...
6c232e9b547226a2a915ef2effa1218024f536fece662929b0ac66c680f804f0
cryptosense/pkcs11
pkcs11_CK_EC_KDF_TYPE.ml
open Ctypes type t = P11_ulong.t let t : t typ = ulong let ( ! ) x = Unsigned.ULong.of_string (Int64.to_string x) let _CKD_NULL = !0x00000001L let _CKD_SHA1_KDF = !0x00000002L let make = let open P11_ec_kdf in function | CKD_NULL -> _CKD_NULL | CKD_SHA1_KDF -> _CKD_SHA1_KDF let view ul = let open P11_e...
null
https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/driver/pkcs11_CK_EC_KDF_TYPE.ml
ocaml
open Ctypes type t = P11_ulong.t let t : t typ = ulong let ( ! ) x = Unsigned.ULong.of_string (Int64.to_string x) let _CKD_NULL = !0x00000001L let _CKD_SHA1_KDF = !0x00000002L let make = let open P11_ec_kdf in function | CKD_NULL -> _CKD_NULL | CKD_SHA1_KDF -> _CKD_SHA1_KDF let view ul = let open P11_e...
a28a3f27d74e5242139161a8732b5b41a93dc4a593e12a5f326c248f1fd000f1
2600hz-archive/whistle
monitor.erl
@author < > ( C ) 2010 - 2011 , VoIP INC %%% @doc %%% Service/Server Monitoring %%% @end Created : 11 Nov 2010 by < > -module(monitor). -author('Karl Anderson <>'). -export([start/0, start_link/0, start_link/1, stop/0, set_amqp_host/1]). ( ) - > { ok , Pid::pid ( ) } %% @doc Starts the monitor for...
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/whistle_apps/apps/monitor/src/monitor.erl
erlang
@doc Service/Server Monitoring @end @doc Starts the monitor for inclusion in a supervisor tree @doc Start the monitor server. @doc Stop the monitor server.
@author < > ( C ) 2010 - 2011 , VoIP INC Created : 11 Nov 2010 by < > -module(monitor). -author('Karl Anderson <>'). -export([start/0, start_link/0, start_link/1, stop/0, set_amqp_host/1]). ( ) - > { ok , Pid::pid ( ) } start_link() -> start_deps(), monitor_sup:start_link(). start_link(AH...
f059b2d3e323fa56e273017270b343f0e6341e88b32b932df722a191f1adcb27
nomaddo/loop
tident.ml
type ident = {name: string; id: int} [@@deriving show] type path = | Tident of ident [@@deriving show] let make_ident s = { name = s; id = Btypes.gen_sym () } let ident tpath = match tpath with | Tident ident -> ident let get_name tpath = (ident tpath).name let path s = let id = make_ident s in Tident ...
null
https://raw.githubusercontent.com/nomaddo/loop/cd2204208b67b7e1f386b730c953404482ca36d6/typing/tident.ml
ocaml
type ident = {name: string; id: int} [@@deriving show] type path = | Tident of ident [@@deriving show] let make_ident s = { name = s; id = Btypes.gen_sym () } let ident tpath = match tpath with | Tident ident -> ident let get_name tpath = (ident tpath).name let path s = let id = make_ident s in Tident ...
b707190078d3e26f11aece97aff2cb249d6838d2458d365af4c5f72b168794dd
mjambon/atdgen
ag_oj_mapping.ml
open Printf open Atd_ast open Ag_error open Ag_mapping type o = Ag_ocaml.atd_ocaml_repr type j = Ag_json.json_repr type oj_mapping = (Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.mapping type oj_def = (Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.def (* Translation of the types into t...
null
https://raw.githubusercontent.com/mjambon/atdgen/9b031da2f182a1fa60bc76ff3a3228ff7b45a8a3/src/ag_oj_mapping.ml
ocaml
Translation of the types into the ocaml/json mapping. will try to determine implicit default value later
open Printf open Atd_ast open Ag_error open Ag_mapping type o = Ag_ocaml.atd_ocaml_repr type j = Ag_json.json_repr type oj_mapping = (Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.mapping type oj_def = (Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.def let rec mapping_of_expr (x : type_e...
be949b04e686f0d5cd5860d46b2e20416b7c12cf7fddac5bc91d7f0290e0de83
facebook/flow
listUtils.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/common/utils/listUtils.ml
ocaml
* performs a map, but returns the original list if there is no change *
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
fba0ec00355b45b33eae7873ab6e4405ee0c071a5ac3f91846f70c677b1c5867
sanderhahn/mod_interact
mod_available_post.erl
%%%---------------------------------------------------------------------- %%% File : mod_available_post.erl Author : < > %%% Purpose : Forward presence notifications to a url Created : 12 Feb 2012 by < > %%% %%% Copyright ( C ) 2012 %%% %%% This program is free software; you can redistribute it a...
null
https://raw.githubusercontent.com/sanderhahn/mod_interact/8f1a1905a6dfcde48b13cc3fb47264d366965c9f/src/mod_available_post.erl
erlang
---------------------------------------------------------------------- File : mod_available_post.erl Purpose : Forward presence notifications to a url This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it...
Author : < > Created : 12 Feb 2012 by < > Copyright ( C ) 2012 modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public License Foundation , Inc. , 59 Temple Pl...
76525315c06fc74871fe9aa2a36b6710179d8d0c1f31c5326f8baca37c3a3984
SKA-ScienceDataProcessor/RC
Types.hs
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} # LANGUAGE GeneralizedNewtypeDeriving # module DNA.Types where import Control.Monad.Reader import Control.Monad.State.Strict (StateT) import Control.Monad.Except import Control.Distributed.Process import Control.Distributed.Process...
null
https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS3/lib/DNA/Types.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveGeneric # -------------------------------------------------------------- -------------------------------------------------------------- | Monad to which computations in the 'Process' could be lifted --------------------------------------------------...
# LANGUAGE GeneralizedNewtypeDeriving # module DNA.Types where import Control.Monad.Reader import Control.Monad.State.Strict (StateT) import Control.Monad.Except import Control.Distributed.Process import Control.Distributed.Process.Serializable (Serializable) import Data.Binary (Binary(..)) import Data.Typeable (Typ...
00e3b1f28d076cefa9f192699b2acb444c68723f41605cd86aa5b4877007f660
PLTools/OCanren
Disequality.mli
* OCanren . * Copyright ( C ) 2015 - 2017 * , , , * St. Petersburg State University , JetBrains Research * * This software is free software ; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License version 2 , as published by the Free Softwa...
null
https://raw.githubusercontent.com/PLTools/OCanren/1ead64bde16b0eb339a6bf790ea871e19bbaccd0/src/core/Disequality.mli
ocaml
[empty] empty disequality constraint store [Answer.t] result of reification of disequality constraints [extract a v] returns list of `forbidden` terms for variable [v]
* OCanren . * Copyright ( C ) 2015 - 2017 * , , , * St. Petersburg State University , JetBrains Research * * This software is free software ; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License version 2 , as published by the Free Softwa...
fa4ec02e1e16cc4ce346c30d9c7ef7b22c47d9edba2e7013a5811982146222ec
savonet/ocaml-posix
posix_signal_stubs.ml
open Ctypes module Def (F : Cstubs.FOREIGN) = struct open F module Types = Posix_signal_types.Def (Posix_signal_generated_types) open Types let sigemptyset = foreign "sigemptyset" (ptr sigset_t @-> returning int) let sigaddset = foreign "sigaddset" (ptr sigset_t @-> int @-> returning int) let sigismember...
null
https://raw.githubusercontent.com/savonet/ocaml-posix/d46d011de16154b34324eae6ee6e7010138cf4af/posix-signal/src/stubs/posix_signal_stubs.ml
ocaml
open Ctypes module Def (F : Cstubs.FOREIGN) = struct open F module Types = Posix_signal_types.Def (Posix_signal_generated_types) open Types let sigemptyset = foreign "sigemptyset" (ptr sigset_t @-> returning int) let sigaddset = foreign "sigaddset" (ptr sigset_t @-> int @-> returning int) let sigismember...
d462f12fc820247ad8d7825aaf8e55c676ef1fef7b561e6d94148888cad4efe8
basho/yokozuna
yz_aae_test.erl
-module(yz_aae_test). -compile(export_all). -include("yokozuna.hrl"). -include_lib("eunit/include/eunit.hrl"). -define(N, 3). -define(NUM_KEYS, 1000). -define(NUM_KEYS_SPACES, 1000). -define(TOTAL_KEYS, ?NUM_KEYS + ?NUM_KEYS_SPACES). -define(TOTAL_KEYS_REP, ?N * (?NUM_KEYS + ?NUM_KEYS_SPACES)). -define(BUCKET_TYPE, <<"...
null
https://raw.githubusercontent.com/basho/yokozuna/e15fe64f9ef9318c0cc21754f3dfdd073d2dc77d/riak_test/yz_aae_test.erl
erlang
Run test for `default'/legacy bucket type Run test for custom bucket type Wait for a full round of exchange and then get total repair may happen while loading the data. By getting the count before deleting keys it can be subtracted from the total count later to verify that the exact number of repairs was made gi...
-module(yz_aae_test). -compile(export_all). -include("yokozuna.hrl"). -include_lib("eunit/include/eunit.hrl"). -define(N, 3). -define(NUM_KEYS, 1000). -define(NUM_KEYS_SPACES, 1000). -define(TOTAL_KEYS, ?NUM_KEYS + ?NUM_KEYS_SPACES). -define(TOTAL_KEYS_REP, ?N * (?NUM_KEYS + ?NUM_KEYS_SPACES)). -define(BUCKET_TYPE, <<"...
22aa18fdd39390be9d079be3582d30e502ab3715392687a1af53522db4c19022
practicalli/clojure-through-code
10_changing_state.clj
(ns clojure-through-code.10-changing-state) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Changing state in Clojure The most common way to manage changing state in Clojure is the atom . Essentially an atom is a box that can hold any other clojure data . when you change the atom contents , you are essentially replacing one i...
null
https://raw.githubusercontent.com/practicalli/clojure-through-code/82834cdab6b5315aea630386c851200f98d5e48f/src/clojure_through_code/10_changing_state.clj
clojure
Unlike numbers, strings and collections, the contents of an atom changes when you use a function that changes a value or collection. However, the value or collection itself is immutable, so does not change. Its the atom that shows you a different value. Using fictional characters to show atoms in action (work in ...
(ns clojure-through-code.10-changing-state) Changing state in Clojure The most common way to manage changing state in Clojure is the atom . Essentially an atom is a box that can hold any other clojure data . when you change the atom contents , you are essentially replacing one immutable value with another . ...
49f1905b17ef2cbc6b6fdd947e42febbcffdad0c3d39831c17c2066e7fa772af
vicampo/riposte
grammar.rkt
#lang brag riposte-program : (program-step | import)* @program-step: assignment | echo | command | exec | assertion | unset | snooze | function-definition | function-call import: /"import" FILENAME uri-template: ( URI-TEMPLATE-LITERAL | uri-template-expression ) + uri-template-expression: /"{" [ ur...
null
https://raw.githubusercontent.com/vicampo/riposte/0a71e54539cb40b574f84674769792444691a8cf/grammar.rkt
racket
#lang brag riposte-program : (program-step | import)* @program-step: assignment | echo | command | exec | assertion | unset | snooze | function-definition | function-call import: /"import" FILENAME uri-template: ( URI-TEMPLATE-LITERAL | uri-template-expression ) + uri-template-expression: /"{" [ ur...
840777e0118c17c197e7f650fab97113de5750fd2f0037e063f8a64b4aec140c
basho-labs/mesos-erlang
erl_mesos_utils_SUITE.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2016 Basho Technologies Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file %% except in compliance with the License. You may obtain %...
null
https://raw.githubusercontent.com/basho-labs/mesos-erlang/b90bf62c2d614f12a0ac3cd55a915b3737198da5/test/erl_mesos_utils_SUITE.erl
erlang
------------------------------------------------------------------- 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, KIND, either express or implied. See the ...
Copyright ( c ) 2016 Basho Technologies Inc. All Rights Reserved . This file is provided to you under the Apache License , software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(erl_mesos_utils_SUITE). -include_lib("common_test/include/ct....
0761499554d298379f7d96335f3413dd5a844d0d4811025fd628f2a1f29a416b
janestreet/universe
test_zone.ml
open Core_kernel open Poly module Time = struct include Time let sexp_of_t x = Sexp.Atom (Time.to_string x) end let%test _ = let open Timezone.Private.Zone_cache in init (); let result = Option.is_some (find "America/New_York") in (* keep this test from contaminating tests later in the file *) the_one_...
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/timezone/test/test_zone.ml
ocaml
keep this test from contaminating tests later in the file
open Core_kernel open Poly module Time = struct include Time let sexp_of_t x = Sexp.Atom (Time.to_string x) end let%test _ = let open Timezone.Private.Zone_cache in init (); let result = Option.is_some (find "America/New_York") in the_one_and_only.full <- false; Hashtbl.clear the_one_and_only.table; ...
a3e5902823d99a60cb354c4278d6023d9df9bfb608e903a0835edfeb6a49b2b8
sjl/cl-nrepl
quickutils.lisp
;;;; This file was automatically generated by Quickutil. ;;;; See for details. ;;;; To regenerate: ( qtlc : save - utils - as " quickutils.lisp " : utilities ' (: CURRY : SUBDIVIDE : APPENDF : COMPOSE : DOHASH : ENSURE - BOOLEAN : ENSURE - GETHASH : ENSURE - LIST : HASH - TABLE - KEYS : MAPHASH - KEYS : : ONCE - O...
null
https://raw.githubusercontent.com/sjl/cl-nrepl/20a71458344a721d605c349b92268879bdfc98a1/vendor/quickutils.lisp
lisp
This file was automatically generated by Quickutil. See for details. To regenerate: eval-when To propagate return type and allow the compiler to eliminate the IF when it is known if the argument is function or not. eval-when Using M-V-C we don't need to append the arguments. Since lists have O(N) access time,...
( qtlc : save - utils - as " quickutils.lisp " : utilities ' (: CURRY : SUBDIVIDE : APPENDF : COMPOSE : DOHASH : ENSURE - BOOLEAN : ENSURE - GETHASH : ENSURE - LIST : HASH - TABLE - KEYS : MAPHASH - KEYS : : ONCE - ONLY : RCURRY : REMOVEF : SYMB : WITH - GENSYMS ) : ensure - package T : package " NREPL.QUICKUTILS "...
005cbfe3f374e5f10d0a85f07fedd0357afa9edc8891d1b920218f18483dcaaa
lspitzner/brittany
Test91.hs
func x | very long guard, another rather long guard that refers to x = nontrivialexpression foo bar alsdkjlasdjlasj | otherwise = 0
null
https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test91.hs
haskell
func x | very long guard, another rather long guard that refers to x = nontrivialexpression foo bar alsdkjlasdjlasj | otherwise = 0
bff0864d2a68ee734d5c9d5bc7ab0ac1217b571f21d76779faf11b46f86a385a
dmjio/aoc2020
Main.hs
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE BangPatterns #-} # LANGUAGE ViewPatterns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeApplications # # LANGUAGE ScopedTypeVariables # module Main where import Control.Monad import Data.Bits import Data.Char impo...
null
https://raw.githubusercontent.com/dmjio/aoc2020/83c1d55a2dad3b2318666debaf18b5368cff8738/6/Main.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE BangPatterns # # LANGUAGE OverloadedStrings #
# LANGUAGE ViewPatterns # # LANGUAGE TypeApplications # # LANGUAGE ScopedTypeVariables # module Main where import Control.Monad import Data.Bits import Data.Char import Data.List import Data.List.Split import qualified Data.Map.Strict as M import ...
0252fe4351ba7cf1384cbcab41d8b3689e26f97283ecb46c27f275d18f238da2
nuvla/api-server
session_mitreid_token.clj
(ns sixsq.nuvla.server.resources.session-mitreid-token (:require [clojure.tools.logging :as log] [sixsq.nuvla.auth.cookies :as cookies] [sixsq.nuvla.auth.external :as ex] [sixsq.nuvla.auth.utils.sign :as sign] [sixsq.nuvla.auth.utils.timestamp :as ts] [sixsq.nuvla.server.middleware.authn-info ...
null
https://raw.githubusercontent.com/nuvla/api-server/e4f0535e2e39e5042094fc20bfb811d2a9c75ad5/code/src/sixsq/nuvla/server/resources/session_mitreid_token.clj
clojure
multimethods for validation transform template into session resource only validate the client IP address, if the parameter is set initialization: no schema for this parent resource
(ns sixsq.nuvla.server.resources.session-mitreid-token (:require [clojure.tools.logging :as log] [sixsq.nuvla.auth.cookies :as cookies] [sixsq.nuvla.auth.external :as ex] [sixsq.nuvla.auth.utils.sign :as sign] [sixsq.nuvla.auth.utils.timestamp :as ts] [sixsq.nuvla.server.middleware.authn-info ...
4b047a42b31ea6bd8036660357ca6b896922e762283bed30c7df610aacac30cd
sdslabs/slack-lens
main.clj
(ns in.co.sdslabs.slack-lens.listener.main (:require [in.co.sdslabs.slack-lens.lib [slack-rtm :as rtm] [es :as es]] [in.co.sdslabs.slack-lens.config.es :as es-config] [cheshire.core :as json] [clojure.java.io :a...
null
https://raw.githubusercontent.com/sdslabs/slack-lens/eaea87929c24474064c2d4d976335d01d4bac233/src/in/co/sdslabs/slack_lens/listener/main.clj
clojure
(ns in.co.sdslabs.slack-lens.listener.main (:require [in.co.sdslabs.slack-lens.lib [slack-rtm :as rtm] [es :as es]] [in.co.sdslabs.slack-lens.config.es :as es-config] [cheshire.core :as json] [clojure.java.io :a...
4102a1a56c1a4b52671cd7e8a8eb6720c596fb543ce9d8ba21c11ffed5e01932
hasktorch/hasktorch
LSTM.hs
# LANGUAGE FlexibleContexts # # LANGUAGE FunctionalDependencies # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # module LSTM where import Control.Monad.State.Strict import Data.List (foldl', intersperse, scanl') import RecurrentLayer import Torch data LSTMSpec = LSTMSpec {inf :: Int, hf :: Int} data ...
null
https://raw.githubusercontent.com/hasktorch/hasktorch/8fa4d2a6cdb7f144484f7d24d8d4924fb0faecd2/examples/rnn/LSTM.hs
haskell
Typeclass that allows us to manipulate and update the layer weights
# LANGUAGE FlexibleContexts # # LANGUAGE FunctionalDependencies # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # module LSTM where import Control.Monad.State.Strict import Data.List (foldl', intersperse, scanl') import RecurrentLayer import Torch data LSTMSpec = LSTMSpec {inf :: Int, hf :: Int} data ...
0428010d8d31ff1bbc9c90494d243dfc5c5a8e221f43ea3fbf5400b979504185
input-output-hk/cardano-ledger
Activation.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} module Cardano.Chain.Delegation.Validation.Activation ( -- * Activation State (..), activateDelegation, ) where import Cardano.Chain.Common (KeyHash) import qualified Cardano.Chain.Delegatio...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/b9aa1ad1728c0ceeca62657ec94d6d099896c052/eras/byron/ledger/impl/src/Cardano/Chain/Delegation/Validation/Activation.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings # * Activation ------------------------------------------------------------------------------ Activation ------------------------------------------------------------------------------ | Maps containing, for each delegator, the active delegation and the slot it...
# LANGUAGE DeriveGeneric # # LANGUAGE NamedFieldPuns # module Cardano.Chain.Delegation.Validation.Activation ( State (..), activateDelegation, ) where import Cardano.Chain.Common (KeyHash) import qualified Cardano.Chain.Delegation as Delegation import Cardano.Chain.Delegation.Validation.Scheduling (ScheduledDeleg...
8923515895235762e150a4c8552333118b0a0ba4c9d4b63ec3b1773cb770858e
wattlebirdaz/rclref
rclref_get_statem_sup.erl
-module(rclref_get_statem_sup). -behaviour(supervisor). -export([start_get_statem/1, stop_get_statem/1, start_link/0]). -export([init/1]). -spec start_get_statem([term()]) -> {ok, undefined} | {ok, non_neg_integer()}. start_get_statem(Args) -> ReqId = reqid(), {ok, _} = supervisor:start_child(?MODULE, [[ReqI...
null
https://raw.githubusercontent.com/wattlebirdaz/rclref/0e31857de43e3930f69d4063f79a518fe9fdbb79/apps/rclref/src/rclref_get_statem_sup.erl
erlang
Callbacks Internal Functions
-module(rclref_get_statem_sup). -behaviour(supervisor). -export([start_get_statem/1, stop_get_statem/1, start_link/0]). -export([init/1]). -spec start_get_statem([term()]) -> {ok, undefined} | {ok, non_neg_integer()}. start_get_statem(Args) -> ReqId = reqid(), {ok, _} = supervisor:start_child(?MODULE, [[ReqI...
9e190aeb98499abff4d1134d6324f434d2733bcd7598704cc727e36c2bec2a69
FlogFr/FlashCard
Types.hs
module Database.Types where import Protolude hiding (empty, Location, get) import Database.PostgreSQL.LibPQ import Foreign.C.Types import Control.Exception import System.IO.Error import Data.Binary import Data.Binary.Get import Data.Time import Data.UUID import qualified Data.ByteString.Lazy as BSL import qualified ...
null
https://raw.githubusercontent.com/FlogFr/FlashCard/17029f9b84f23c43f67702b77bd7418cdf0a9d28/src/Database/Types.hs
haskell
Please refer to the documentation of array.h in postgresql repository * <ndim> - number of dimensions of the array * <dataoffset> - offset to stored data, or 0 if no nulls bitmap * <elemtype> - element type OID * <dimensions> - length of each array axis (C array of int) * <lower bnds> - lower...
module Database.Types where import Protolude hiding (empty, Location, get) import Database.PostgreSQL.LibPQ import Foreign.C.Types import Control.Exception import System.IO.Error import Data.Binary import Data.Binary.Get import Data.Time import Data.UUID import qualified Data.ByteString.Lazy as BSL import qualified ...