_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
cfb0889d0f08870d77b165262d67285b20df6762930231ea79ec68bc9d7beb35
abcdw/rde
ini.scm
;;; rde --- Reproducible development environment. ;;; Copyright © 2022 < > ;;; ;;; This file is part of rde. ;;; ;;; rde is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the License , ...
null
https://raw.githubusercontent.com/abcdw/rde/5b8605f421d0b8a9569e43cb6f7e651e7a8f7218/src/rde/serializers/ini.scm
scheme
rde --- Reproducible development environment. This file is part of rde. rde is free software; you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. rde is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the im...
Copyright © 2022 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License (define-module (rde serializers ini) #:use-module (ice-9 match) #:use-module (ice-9 format) #:use-module (srfi srfi-1) #:use-module (rde serializers...
ffbc7370d2c860172256fbded7cc1e009f59127db263f54360c1f5eb8b40c06c
cryptosense/enumerators
example.ml
let print_target (ip, port) = Printf.printf "[%s]:%d\n" ip port let () = let addresses = Enumerator.make ["2001:db8::1"; "2001:db8::2"] in let ports = Enumerator.range 1 1024 in let targets = Enumerator.product addresses ports in Enumerator.iter print_target targets
null
https://raw.githubusercontent.com/cryptosense/enumerators/0ba393e993a3a1574453395a5a424a3bccda522c/example.ml
ocaml
let print_target (ip, port) = Printf.printf "[%s]:%d\n" ip port let () = let addresses = Enumerator.make ["2001:db8::1"; "2001:db8::2"] in let ports = Enumerator.range 1 1024 in let targets = Enumerator.product addresses ports in Enumerator.iter print_target targets
cca602b14a289f36a2b2c47ea1701dfccf7773bd231b5a0d51670e72a4aedf04
abarbu/haskell-torch
Indexing.hs
# LANGUAGE DeriveDataTypeable , , TemplateHaskell , TypeApplications , TypeFamilies # | Two templates ( @i@ and @s@ ) which allow for convenient indexing . This adds -- no functionality itself, the templates are all trivial, and merely string together operations from Torch . Tensor . -- @[i|1|]@ is a ( Tensor -...
null
https://raw.githubusercontent.com/abarbu/haskell-torch/03b2c10bf8ca3d4508d52c2123e753d93b3c4236/haskell-torch/src/Torch/Indexing.hs
haskell
no functionality itself, the templates are all trivial, and merely string @[s|1|]@ is a (Tensor -> Tensor -> IO Tensor), a set operation which indexes unindexed, but updated, tensor is returned. * @[i|1,2,3|]@ using multiple indices for multiple dimensions * @[i|$x,2|]@ indexes with a local variable, a number ...
# LANGUAGE DeriveDataTypeable , , TemplateHaskell , TypeApplications , TypeFamilies # | Two templates ( @i@ and @s@ ) which allow for convenient indexing . This adds together operations from Torch . Tensor . @[i|1|]@ is a ( Tensor - > IO Tensor ) , a get operation which indexes with one along the first dimens...
7c837cfcb0e7c7b5e67f1ebf26ff29a4b13e57408650daf597298b243ae7ae8c
mark-watson/lisp_practical_semantic_web
backend.lisp
(push "../knowledgebooks_nlp/" asdf:*central-registry*) (asdf:operate 'asdf:load-op :kbnlp) (eval-when (compile load eval) (require :aserve) (require :agraph)) (defpackage :user (:use :net.aserve.client :kbnlp)) (in-package :user) (db.agraph.user::enable-!-reader) ; enable the ! reader macro (db.agraph.user::cr...
null
https://raw.githubusercontent.com/mark-watson/lisp_practical_semantic_web/2d9d5bb06b574ab0bff15664fe747a5b99e1fb1b/web_app/backend.lisp
lisp
enable the ! reader macro <> <#login> "demo" . (db.agraph.user::print-triples (db.agraph.user::get-triples)) (part->string u :format :terse)
(push "../knowledgebooks_nlp/" asdf:*central-registry*) (asdf:operate 'asdf:load-op :kbnlp) (eval-when (compile load eval) (require :aserve) (require :agraph)) (defpackage :user (:use :net.aserve.client :kbnlp)) (in-package :user) (db.agraph.user::create-triple-store "/tmp/webportal_rdf") (db.agraph.user::regis...
788e0e231587a29973e86257fd95621476b0209eb220b85bb9a6ddf95f71b615
janestreet/ecaml
hello_world.ml
open! Core open! Ecaml (* To build this file, run dune build hello_world.so To test, run emacs -Q -L _build/default --batch --eval "(progn (require 'hello_world) (say-hello \"emacs\"))" *) let () = message "Hello, world!"; defun ("say-hello" |> Symbol.intern) [%here] ~docstring:{| Takes one ...
null
https://raw.githubusercontent.com/janestreet/ecaml/7c16e5720ee1da04e0757cf185a074debf9088df/example/hello_world.ml
ocaml
To build this file, run dune build hello_world.so To test, run emacs -Q -L _build/default --batch --eval "(progn (require 'hello_world) (say-hello \"emacs\"))"
open! Core open! Ecaml let () = message "Hello, world!"; defun ("say-hello" |> Symbol.intern) [%here] ~docstring:{| Takes one argument NAME and says "Hello, NAME" |} (Returns Value.Type.unit) (let open Defun.Let_syntax in let%map_open name = required "name" string in message ("Hello,...
3021ef50aa4b03898917ef20522e01fa41c0055dc3d8e79ccc7ce8179bee9416
brick-lang/kekka
inferKind.ml
open Core open Common (** Inference Kind: These kinds contain meta kind-variables *) module InfKind = struct type t = | Var of Common.Id.t (* variable *) | Con of Heart.Kind.t (* constant *) | App of t * t (* application *) [@@deriving show] let star = Con Heart.Kind.Pri...
null
https://raw.githubusercontent.com/brick-lang/kekka/7ede659ffb49959b140e6ab0a72d38ff6c63311b/kindEngine/inferKind.ml
ocaml
* Inference Kind: These kinds contain meta kind-variables variable constant application (->) k1 k2 HasKindVar ************************************************************* * Substitution ************************************************************* Left-biased union HasKindVar Assumes a left-biased u...
open Core open Common module InfKind = struct type t = [@@deriving show] let star = Con Heart.Kind.Prim.star let inf_kind_handled = KICon Kind.kind_handled let fun_n kinds k = List.fold_right ~init:k ~f:fun_1 kinds let rec (|=>) sub kind = match kind with | Var id -> (match Id.Map.find sub id w...
9e799a9cf993e4cdcb634362c714ca936ae4ac864bd587cc83f68b1a66293429
anoma/juvix
Negative.hs
module Asm.Run.Negative where import Asm.Run.Base import Base data NegTest = NegTest { _name :: String, _relDir :: Path Rel Dir, _file :: Path Rel File } root :: Path Abs Dir root = relToProject $(mkRelDir "tests/Asm/negative") testDescr :: NegTest -> TestDescr testDescr NegTest {..} = let tRoot = roo...
null
https://raw.githubusercontent.com/anoma/juvix/af63c36574da981e62d72b3c985fff2ba6266e8b/test/Asm/Run/Negative.hs
haskell
module Asm.Run.Negative where import Asm.Run.Base import Base data NegTest = NegTest { _name :: String, _relDir :: Path Rel Dir, _file :: Path Rel File } root :: Path Abs Dir root = relToProject $(mkRelDir "tests/Asm/negative") testDescr :: NegTest -> TestDescr testDescr NegTest {..} = let tRoot = roo...
58ec4e41e8694527dd8a78d34819b6495d1a93743b92c00610eb9220ef923bdb
tov/shcaml
signal.mli
(** * Treat UNIX signals as OCaml exceptions. *) (** Raised by {!signal_protect} when a signal is delivered. *) exception Signal of int (** Call a thunk while delivering signals as exceptions. * [Signal.signal_protect n ~exn thunk] calls [thunk], handling * signal [n] by throwing exception [exn] instead. If [?ex...
null
https://raw.githubusercontent.com/tov/shcaml/43ae852a00e3a11520f90f2451baa71863409774/lib/signal.mli
ocaml
* * Treat UNIX signals as OCaml exceptions. * Raised by {!signal_protect} when a signal is delivered. * Call a thunk while delivering signals as exceptions. * [Signal.signal_protect n ~exn thunk] calls [thunk], handling * signal [n] by throwing exception [exn] instead. If [?exn] isn't * given, it default to [Si...
exception Signal of int val signal_protect : int -> ?exn:exn -> (unit -> 'a) -> 'a
e7585a9fe6755f10808566db9c4f6db406b902f5e7bf808768a3012d4f39ccaa
adomokos/haskell-katas
Ex10_FlowCaseExpressionSpec.hs
module Ex10_FlowCaseExpressionSpec ( spec ) where import Test.Hspec main :: IO () main = hspec spec {- ___ -} {- ___ -} {- where ___ [] = "is empty." -} {- ___ -} {- ___ -} -- head' :: [a] -> a -- head' xs = case xs of ... -- describeList :: [a] -> String -- describeList xs = "The...
null
https://raw.githubusercontent.com/adomokos/haskell-katas/be06d23192e6aca4297814455247fc74814ccbf1/test/Ex10_FlowCaseExpressionSpec.hs
haskell
___ ___ where ___ [] = "is empty." ___ ___ head' :: [a] -> a head' xs = case xs of ... describeList :: [a] -> String describeList xs = "The list is " ++ case xs ___ Case statement can be written with patten matching describeList xs = "The list is " ++ what xs
module Ex10_FlowCaseExpressionSpec ( spec ) where import Test.Hspec main :: IO () main = hspec spec spec :: Spec spec = describe "Case expressions" $ do it "can be used anywhere" $ do pending head ' [ 1,3 ] ` shouldBe ` 1 it "can be even used in expressions" $ do pending describeList [...
35bd92112e21e6760cf6693797759f4351316a9c851212328a2a426808f4cf22
jyh/metaprl
m_doc_cps.mli
* Explains CPS conversion . * * ---------------------------------------------------------------- * * @begin[license ] * Copyright ( C ) 2003 , Caltech * * This program is free software ; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as pub...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/experimental/compile/m_doc_cps.mli
ocaml
* -*- * Local Variables: * Caml-master: "compile" * End: * -*-
* Explains CPS conversion . * * ---------------------------------------------------------------- * * @begin[license ] * Copyright ( C ) 2003 , Caltech * * This program is free software ; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as pub...
6f3e60da7def54d15595ba0b209a5fdd7915620eaad2ea189967d9f70013204f
marcoheisig/cl-mpi
wrap.lisp
;;; Wrapper library specification for querying information that is not ;;; necessarily static, such as the definition of MPI_COMM_WORLD. (include "mpi.h") (in-package :cl-mpi) #. `(progn ,@(loop for (object c-name reader-name) in *mpi-constant-table* collect `(defwrapper* ,re...
null
https://raw.githubusercontent.com/marcoheisig/cl-mpi/ba92be06ec1dca74d0ca5256aa387d8a28c8ad86/mpi/wrap.lisp
lisp
Wrapper library specification for querying information that is not necessarily static, such as the definition of MPI_COMM_WORLD.
(include "mpi.h") (in-package :cl-mpi) #. `(progn ,@(loop for (object c-name reader-name) in *mpi-constant-table* collect `(defwrapper* ,reader-name ,(cffi::canonicalize-foreign-type (class-name (class-of object))) () ...
55dd4dfab2ff74b41176545a57449192df1d0b05e2a5c7ebf1b32a81ccb1d9fd
zotonic/zotonic
filter_group_firstchar.erl
@author < > 2011 @doc group a list of sorted rsc ids on their first letter of the title or another rsc property . Then , split this list in a number of %% more-or-less even columns. Copyright 2011 %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file...
null
https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_base/src/filters/filter_group_firstchar.erl
erlang
more-or-less even columns. 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 spec...
@author < > 2011 @doc group a list of sorted rsc ids on their first letter of the title or another rsc property . Then , split this list in a number of Copyright 2011 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS ...
100b594f16a2508ce915894f85d53e80864814b38c75675e5e4f63b379df4c3c
malcolmreynolds/GSLL
absolute-deviation.lisp
Regression test ABSOLUTE - DEVIATION for GSLL , automatically generated (in-package :gsl) (LISP-UNIT:DEFINE-TEST ABSOLUTE-DEVIATION (LISP-UNIT::ASSERT-NUMERICAL-EQUAL (LIST (LIST 6.18d0 6.647777777777779d0 6.18d0)) (MULTIPLE-VALUE-LIST ...
null
https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/tests/absolute-deviation.lisp
lisp
Regression test ABSOLUTE - DEVIATION for GSLL , automatically generated (in-package :gsl) (LISP-UNIT:DEFINE-TEST ABSOLUTE-DEVIATION (LISP-UNIT::ASSERT-NUMERICAL-EQUAL (LIST (LIST 6.18d0 6.647777777777779d0 6.18d0)) (MULTIPLE-VALUE-LIST ...
be245f070d34c2cd12ec3f3a4b7c8419ef3eb2d72f27a82146445ab3fd6ff345
ocaml/ocaml
pr8575.ml
(* TEST * expect *) module A = struct type t = A | B let x = B end;; [%%expect{| module A : sig type t = A | B val x : t end |}] let test () = match A.x with | A as a -> `A_t a | B when false -> `Onoes | B -> if Random.bool () then `Onoes else `A_t B;; [%%expect{| val test : unit -> [> `A_t of A.t | `Onoes...
null
https://raw.githubusercontent.com/ocaml/ocaml/d71ea3d089ae3c338b8b6e2fb7beb08908076c7a/testsuite/tests/typing-polyvariants-bugs/pr8575.ml
ocaml
TEST * expect
module A = struct type t = A | B let x = B end;; [%%expect{| module A : sig type t = A | B val x : t end |}] let test () = match A.x with | A as a -> `A_t a | B when false -> `Onoes | B -> if Random.bool () then `Onoes else `A_t B;; [%%expect{| val test : unit -> [> `A_t of A.t | `Onoes ] = <fun> |}, Principa...
09b8b2b779017dd7b968700ca5d276d94e8bd676929a0047b7467defb3a03a63
onedata/op-worker
atm_openfaas_activity_report.erl
%%%------------------------------------------------------------------- @author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%------------------------------------------------------------------- %%% @doc Record expressing OpenFaaS activity ...
null
https://raw.githubusercontent.com/onedata/op-worker/af88ede8353170b5d20f815900f0cbca20a1dc70/src/modules/automation/task/executor/platforms/openfaas/activity_feed/atm_openfaas_activity_report.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- @doc The record is not persistable, but is encoded to JSON on the activity feed channel. @end ------------------------------------------------------------------- jsonable_rec...
@author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . Record expressing OpenFaaS activity report used in openfaas activity feed . -module(atm_openfaas_activity_report). -author("Lukasz Opiola"). -behaviour(jsonable_record). -include("modules/automa...
81eff5b10acbe1f27d41793438a2107471b1019e41ce032e6d76eae69613ebf3
egobrain/tq_transform
db_default.erl
-module(db_default). -compile({parse_transform, tq_record_transform}). -export([ def_value/0, def_value/1 ]). %% Test -field({def1, [ {type, integer}, {default, 1} ]}). -field({def2, [ {type, integer}, {default_func, def_value} ]}). -field(...
null
https://raw.githubusercontent.com/egobrain/tq_transform/6729f12b1a2fa5ece41ebb15b716c7f8b9360a33/test/src/db_default.erl
erlang
Test
-module(db_default). -compile({parse_transform, tq_record_transform}). -export([ def_value/0, def_value/1 ]). -field({def1, [ {type, integer}, {default, 1} ]}). -field({def2, [ {type, integer}, {default_func, def_value} ]}). -field({def3, ...
348c85524a11e220dd6f84aba87210a8cad562c9fd36bfea0baccc764ba652ea
clj-commons/rewrite-clj
subedit_test.cljc
(ns rewrite-clj.zip.subedit-test (:require [clojure.test :refer [deftest testing is]] [rewrite-clj.zip :as z] [rewrite-clj.zip.options :as options])) (deftest t-trees (let [root (z/of-string "[1 #{2 [3 4] 5} 6]")] (testing "modifying subtrees" (let [loc (z/subedit-> root ...
null
https://raw.githubusercontent.com/clj-commons/rewrite-clj/1e1d1dfbf43ec80c2442c2050673adfc6677ca6b/test/rewrite_clj/zip/subedit_test.cljc
clojure
(ns rewrite-clj.zip.subedit-test (:require [clojure.test :refer [deftest testing is]] [rewrite-clj.zip :as z] [rewrite-clj.zip.options :as options])) (deftest t-trees (let [root (z/of-string "[1 #{2 [3 4] 5} 6]")] (testing "modifying subtrees" (let [loc (z/subedit-> root ...
01bfcb8af70f8be2f2abaa040bda4455a554b0de560bd3d814df0ab90bac0bad
TyOverby/mono
float_tolerance.mli
open Core open Import (** [apply hunks tolerance ~context] converts diff ranges into context if the diff looks like floating point numbers that changed by less than [tolerance]. If necessary, narrows or splits the resulting hunks to limit context to [context] lines. Float tolerance must be applied before...
null
https://raw.githubusercontent.com/TyOverby/mono/8d6b3484d5db63f2f5472c7367986ea30290764d/vendor/janestreet-patdiff/kernel/src/float_tolerance.mli
ocaml
* [apply hunks tolerance ~context] converts diff ranges into context if the diff looks like floating point numbers that changed by less than [tolerance]. If necessary, narrows or splits the resulting hunks to limit context to [context] lines. Float tolerance must be applied before refinement.
open Core open Import val apply : string Patience_diff.Hunks.t -> Percent.t -> context:int -> string Patience_diff.Hunks.t
2ceb549b9972da34fe49ab57595486a7e61821b78c87154593323ba19a4cf08d
fukamachi/clozure-cl
cocoa-remote-lisp.lisp
-*- Mode : Lisp ; Package : CCL -*- ;;; Copyright ( C ) 2011 Clozure Associates This file is part of Clozure CL . ;;; Clozure CL is licensed under the terms of the Lisp Lesser GNU Public License , known as the LLGPL and distributed with Clozure CL as the ;;; file "LICENSE". The LLGPL consists of a ...
null
https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/cocoa-ide/cocoa-remote-lisp.lisp
lisp
Package : CCL -*- file "LICENSE". The LLGPL consists of a preamble and the LGPL, conflict, the preamble takes precedence. Clozure CL is referenced in the preamble as the "LIBRARY." The LLGPL is also available online at Use the IDE to debug a remote ccl. **** THIS IS NOT COMPLETE AND NOT HOOK...
Copyright ( C ) 2011 Clozure Associates This file is part of Clozure CL . Clozure CL is licensed under the terms of the Lisp Lesser GNU Public License , known as the LLGPL and distributed with Clozure CL as the which is distributed with Clozure CL as the file " LGPL " . Where these (in-package...
0336e266ef5c38e15b3d3ef549057aab9783330e7e830907522ddfb1c301ff2a
emqx/emqx
emqx_license_cli.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %%-------------------------------------------------------------------- -module(emqx_license_cli). -include("emqx_license.hrl"). -export([load/0, license/1, unload/0, ...
null
https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/lib-ee/emqx_license/src/emqx_license_cli.erl
erlang
-------------------------------------------------------------------- -------------------------------------------------------------------- ------------------------------------------------------------------------------ API ------------------------------------------------------------------------------
Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . -module(emqx_license_cli). -include("emqx_license.hrl"). -export([load/0, license/1, unload/0, print_warnings/1]). -define(PRINT_MSG(Msg), io:format(Msg)). -define(PRINT(Format, Args), io:format(Format, Args)). load() -> ok = emq...
d17f34b4d66ff4a6e5aea2687642c8405ab12cd807ff550ffbb423f5b1452a5f
exercism/racket
all-your-base.rkt
#lang racket (provide rebase) (define (rebase list-digits in-base out-base) (error "Not implemented yet"))
null
https://raw.githubusercontent.com/exercism/racket/2ec0e750e5e8cde8d07542201e75c90625e222ea/exercises/practice/all-your-base/all-your-base.rkt
racket
#lang racket (provide rebase) (define (rebase list-digits in-base out-base) (error "Not implemented yet"))
beaf40b7e8073c81c2d3f300f6c4fdeaaca00b7fa61d638d07665b0a17981107
bennn/dissertation
file.rkt
#lang racket/base (require racket/dict racket/match racket/port racket/runtime-path file/unzip json) (provide cldr-ref cldr-ref* cldr-json) (define (cldr-ref json key [fail (λ () (raise (exn:fail:contract ...
null
https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/gregor/base/cldr/file.rkt
racket
#lang racket/base (require racket/dict racket/match racket/port racket/runtime-path file/unzip json) (provide cldr-ref cldr-ref* cldr-json) (define (cldr-ref json key [fail (λ () (raise (exn:fail:contract ...
69cfbc13c63b64156b38f62f9f1c82dc2b9270f1b34aca07567b3e56603c13f9
mbutterick/aoc-racket
11.rkt
#lang br (require racket/file rackunit) (define (make-octopodes) (define octopodes (make-hasheqv)) (for* ([(line lidx) (in-indexed (file->lines "11.rktd"))] [(depth cidx) (in-indexed line)]) (hash-set! octopodes (make-rectangular cidx lidx) (string->number (string depth)))) octopodes) (define octop...
null
https://raw.githubusercontent.com/mbutterick/aoc-racket/af8752d29ecf8642dfc93bad7bed2ef2f9f62fd8/2021/11.rkt
racket
#lang br (require racket/file rackunit) (define (make-octopodes) (define octopodes (make-hasheqv)) (for* ([(line lidx) (in-indexed (file->lines "11.rktd"))] [(depth cidx) (in-indexed line)]) (hash-set! octopodes (make-rectangular cidx lidx) (string->number (string depth)))) octopodes) (define octop...
806ac2205522e33a6ed571929f17c9c946e0ae8eb56b9fd3edaf7a3c656bf2af
informatimago/lisp
tests.lisp
-*- mode : lisp;coding : utf-8 -*- ;;;;************************************************************************** FILE : tests.lisp ;;;;LANGUAGE: Common-Lisp ;;;;SYSTEM: Common-Lisp USER - INTERFACE : ;;;;DESCRIPTION ;;;; Some tests of the pkcs11 package . ;;;; ;;;; ...
null
https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/clext/pkcs11/tests.lisp
lisp
coding : utf-8 -*- ************************************************************************** LANGUAGE: Common-Lisp SYSTEM: Common-Lisp DESCRIPTION Note they're not (YET) actual unit tests (automatic tests, resulting in success / failure status), but more debugging validation. (And d...
FILE : tests.lisp USER - INTERFACE : Some tests of the pkcs11 package . tools and exercises of the pkcs11 functions that need manual Smartcard in the Smartcard reader , key - in PIN codes , etc ) . < PJB > < > MODIFICATIONS 2018 - 04 - 25 < PJB > Created . AGPL3 ...
857b39c63d7c6908114a1c2245752d63ed1f325281fe17db2c853d0fa6507eb8
bsansouci/bsb-native
test_copy_typedef.ml
module type S = [%copy_typedef] module type T = sig type t module type M = [%copy_typedef] end module M = struct type t = [%copy_typedef] end type t = [%copy_typedef] let _x = M.A let _y : t = [1; 2] type _loc = [%copy_typedef "../../parsing/location.mli" t]
null
https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/experimental/frisch/test_copy_typedef.ml
ocaml
module type S = [%copy_typedef] module type T = sig type t module type M = [%copy_typedef] end module M = struct type t = [%copy_typedef] end type t = [%copy_typedef] let _x = M.A let _y : t = [1; 2] type _loc = [%copy_typedef "../../parsing/location.mli" t]
4008b169ec5095e0fa80ecf3384719b3a5e4ffcdae91daad4ecea7d88195800f
basho/riak_core
riak_core_node_watcher.erl
%% ------------------------------------------------------------------- %% %% riak_core: Core Riak Application %% Copyright ( c ) 2007 - 2010 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...
null
https://raw.githubusercontent.com/basho/riak_core/abbcca3cfb7da10798d8fc169043955638d4d9db/src/riak_core_node_watcher.erl
erlang
------------------------------------------------------------------- riak_core: Core Riak Application Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the sp...
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -...
0ee410a0a4828a0a0b11f69cd14d3d6417ecf759a4f17050f10e506739054fe4
biocaml/biocaml
lines.ml
include Biocaml_unix.Lines include MakeIO (Future_async)
null
https://raw.githubusercontent.com/biocaml/biocaml/ac619539fed348747d686b8f628e80c1bb8bfc59/lib/async/lines.ml
ocaml
include Biocaml_unix.Lines include MakeIO (Future_async)
55e60b55dd8a6b531a277e938ec21de5b959a73012566e3127d45f698d371408
melange-re/melange
gpr_1154_test.ml
let suites : Mt.pair_suites ref = ref [] let test_id = ref 0 let eq loc x y = incr test_id ; suites := (loc ^" id " ^ (string_of_int !test_id), (fun _ -> Mt.Eq(x,y))) :: !suites let f x = print_string("f"); x let g x = Int64.logor x (f x) let v = ref 0 let f2 x = incr v ; x let g2 x = Int64.logor x ...
null
https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/gpr_1154_test.ml
ocaml
TODO: should be shared for small integers, also we should not inline it (more allocations here)
let suites : Mt.pair_suites ref = ref [] let test_id = ref 0 let eq loc x y = incr test_id ; suites := (loc ^" id " ^ (string_of_int !test_id), (fun _ -> Mt.Eq(x,y))) :: !suites let f x = print_string("f"); x let g x = Int64.logor x (f x) let v = ref 0 let f2 x = incr v ; x let g2 x = Int64.logor x ...
acbbce62789ef68071559f630f9b7df3ecf13162a9058ab6305ae21f47c093b5
gebi/jungerl
sl.erl
%%% File : sl.erl Author : < > %%% Description : Serial line control Created : 7 Oct 2002 by < > -module(sl). -define(SL_CONNECT, 1). -define(SL_DISCONNECT, 2). -define(SL_OPEN, 3). -define(SL_CLOSE, 4). -define(SL_XOFF, 5). -define(SL_XON, 6). -define(SL_BREAK, 7). -...
null
https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/sl/src/sl.erl
erlang
File : sl.erl Description : Serial line control
Author : < > Created : 7 Oct 2002 by < > -module(sl). -define(SL_CONNECT, 1). -define(SL_DISCONNECT, 2). -define(SL_OPEN, 3). -define(SL_CLOSE, 4). -define(SL_XOFF, 5). -define(SL_XON, 6). -define(SL_BREAK, 7). -define(SL_UPDATE, 8). -define(SL_GET_RATES, 9). -defin...
d2d52d63431e37fa2e69e7ca02a645c9c7bc3bdaed944f205464a5fe47f381c4
soulomoon/SICP
Exercise3.82.scm
Exercise 3.82 : Redo Exercise 3.5 on Monte Carlo integration in terms of streams . The stream version of estimate - integral will not have an argument telling how many trials to perform . Instead , it will produce a stream of estimates based on successively more trials . (load "/home/soulomoon/git/SICP/Chapter3/stre...
null
https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter3/Exercise3.82.scm
scheme
memory limit : 128 MB . >
Exercise 3.82 : Redo Exercise 3.5 on Monte Carlo integration in terms of streams . The stream version of estimate - integral will not have an argument telling how many trials to perform . Instead , it will produce a stream of estimates based on successively more trials . (load "/home/soulomoon/git/SICP/Chapter3/stre...
192d1770bcd7123ca2d009b827476c80d89a144a32d19d6d0437aac35466d331
tweag/sparkle
Spark.hs
# LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} # LANGUAGE KindSignatures # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # module Control.Distributed.Spark ( module S , initializeSparkThread , runInSparkThread , forwardUnhandledExceptionsToSpark ) where import Con...
null
https://raw.githubusercontent.com/tweag/sparkle/ea4f4e96d0c8199ba7f75b08ca0a9c10475b596f/src/Control/Distributed/Spark.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # This function will be called before running main or any user code in executors. We need to load classes using the context ClassLoader. Here we we can't use inline-java here, as the generated code would call into this function creating an infinite recursion | The f...
# LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # module Control.Distributed.Spark ( module S , initializeSparkThread , runInSparkThread , forwardUnhandledExceptionsToSpark ) where import Control.Concurrent (runInBoundThread, yield) import Control.D...
d9ee232c0cb2a6b50a4e05fac6d16bd3e21078b930e4a9986ed3941df5e4a201
zero-one-group/geni
xgboost.clj
(ns examples.xgboost (:require [zero-one.geni.core :as g] [zero-one.geni.ml :as ml])) (def training (g/read-libsvm! "test/resources/sample_libsvm_data.txt")) ;; XGBoost Classifier (def xgb-classifier-model (ml/fit training (ml/xgboost-classifier {:max-depth 2 :num-round 2}))) (-> training (ml/tra...
null
https://raw.githubusercontent.com/zero-one-group/geni/4dbabf8315d85cc1526e04bca7e4cb7b75c21ac1/examples/xgboost.clj
clojure
XGBoost Classifier => +-----+----------------------------------------+ |label|probability | +-----+----------------------------------------+ |0.0 |[0.7502040266990662,0.24979597330093384]| |1.0 |[0.24869805574417114,0.7513019442558289]| |1.0 |[0.24869805574417114,0.7513019442558289...
(ns examples.xgboost (:require [zero-one.geni.core :as g] [zero-one.geni.ml :as ml])) (def training (g/read-libsvm! "test/resources/sample_libsvm_data.txt")) (def xgb-classifier-model (ml/fit training (ml/xgboost-classifier {:max-depth 2 :num-round 2}))) (-> training (ml/transform xgb-classifier-...
cff783246ee927ba8419a9e641174b4e424615e4e9300d104d1778b4ea2029e4
uw-unsat/serval
base.rkt
#lang rosette (require (prefix-in core: "../lib/core.rkt")) (provide (all-defined-out)) (struct pstate (n z c v) #:mutable #:transparent) (define (pstate.nzcv-set! pstate nzcv) (set-pstate-n! pstate (first nzcv)) (set-pstate-z! pstate (second nzcv)) (set-pstate-c! pstate (third nzcv)) (set-pstate-v! pstat...
null
https://raw.githubusercontent.com/uw-unsat/serval/be11ecccf03f81b8bd0557acf8385a6a5d4f51ed/serval/arm32/base.rkt
racket
r15 is read as PC + 8. PC must be modified explicitly using cpu-pc-set! rather than r15. instruction-run returns void means that the PC should bump to the next instruction. Bump the pc for most instructions, which return #<void>. conditional instructions Evaluate base condition. Otherwise, invert condition if n...
#lang rosette (require (prefix-in core: "../lib/core.rkt")) (provide (all-defined-out)) (struct pstate (n z c v) #:mutable #:transparent) (define (pstate.nzcv-set! pstate nzcv) (set-pstate-n! pstate (first nzcv)) (set-pstate-z! pstate (second nzcv)) (set-pstate-c! pstate (third nzcv)) (set-pstate-v! pstat...
56db5d5b0bb7b63e7281f51f23e2b698303958642f8de15ad64fc29852fbbc4e
uwplse/synapse
imetasketch.rkt
#lang s-exp rosette (require racket/generic "iterator.rkt" "../engine/metasketch.rkt" "../engine/eval.rkt" "../engine/util.rkt") (provide (rename-out [imeta-make imeta] [isketch-make isketch] [isketch-program-lazy isketch-program]) imeta? isketch? isketch-index) Constructs an indexed metasketch M using ...
null
https://raw.githubusercontent.com/uwplse/synapse/10f605f8f1fff6dade90607f516550b961a10169/opsyn/metasketches/imetasketch.rkt
racket
* arity : natural/c is the input arity of all programs in M. (a list of natural numbers) and returns a symbolic program (that is, a representation of a set of programs) at that index. The programs returned by ref must take arity(M) arguments. * subset : (or/c natural/c +inf.0) -> set? takes as input a cost r...
#lang s-exp rosette (require racket/generic "iterator.rkt" "../engine/metasketch.rkt" "../engine/eval.rkt" "../engine/util.rkt") (provide (rename-out [imeta-make imeta] [isketch-make isketch] [isketch-program-lazy isketch-program]) imeta? isketch? isketch-index) Constructs an indexed metasketch M using ...
371eb57796d6177b4709cd3497be9caefc3312240281199c008b8a3f5049c89c
input-output-hk/cardano-explorer
ErrorRender.hs
{-# LANGUAGE OverloadedStrings #-} module Cardano.TxSubmit.ErrorRender ( renderApplyMempoolPayloadErr ) where -- This file contains error renders. The should hve defined at a lower level, with the error -- type definitions, but for some reason have not been. -- They will be defined here for now and then moved wher...
null
https://raw.githubusercontent.com/input-output-hk/cardano-explorer/3abcb32339edac7c2397114a1d170cc76b82e9b6/cardano-tx-submit/src/Cardano/TxSubmit/ErrorRender.hs
haskell
# LANGUAGE OverloadedStrings # This file contains error renders. The should hve defined at a lower level, with the error type definitions, but for some reason have not been. They will be defined here for now and then moved where they are supposed to be once they are working.
module Cardano.TxSubmit.ErrorRender ( renderApplyMempoolPayloadErr ) where import Cardano.Chain.UTxO.Validation (TxValidationError (..), UTxOValidationError (..)) import Cardano.Chain.UTxO.UTxO (UTxOError(..)) import Cardano.Chain.Byron.API (ApplyMempoolPayloadErr (..)) import ...
9afec8ff1063a2710675d7f496ba91ae39afede0aa03296a84e78f315f28b466
s-expressionists/Eclector
client.lisp
(cl:in-package #:eclector.parse-result) (defclass parse-result-client () ()) The following two methods are for backwards compatibility : ;;; Eclector code always calls the generic functions defined in the base module . The following two methods delegate such calls to ;;; client-defined methods on generic functi...
null
https://raw.githubusercontent.com/s-expressionists/Eclector/4ffe15558ac37fd0ab561550e4f4963557f9b729/code/parse-result/client.lisp
lisp
Eclector code always calls the generic functions defined in the client-defined methods on generic functions defined in the parse-result module. If there are no such client-defined methods, the default methods defined in the parse-result module delegate back to the default methods defined in the base module. This...
(cl:in-package #:eclector.parse-result) (defclass parse-result-client () ()) The following two methods are for backwards compatibility : base module . The following two methods delegate such calls to (defmethod eclector.base:source-position ((client parse-result-client) stream) (source-position client stream)...
c5eec27f57b7cc16ab81b54288a4f22ef24d325563c4dfe468cb133ce271b068
kseo/language-dart
Grammar.hs
{-# LANGUAGE RankNTypes, RecordWildCards #-} module Language.Dart.Grammar (module Language.Dart.Grammar, module Language.Dart.GrammarDeclaration) where import Control.Applicative import Data.Char (chr, isDigit, isHexDigit) import Data.List (intersperse) import Data.Monoid (Dual(..), Endo...
null
https://raw.githubusercontent.com/kseo/language-dart/2349515a535b01cecd22fcbae73bf9ee763ee06d/src/Language/Dart/Grammar.hs
haskell
# LANGUAGE RankNTypes, RecordWildCards # adjacent (separated only by whitespace). While the grammar only allows adjacent strings when all of the strings are of the same kind (single line or multi-line), this class doesn't enforce that restriction. A boolean literal expression. A floating point literal express...
module Language.Dart.Grammar (module Language.Dart.Grammar, module Language.Dart.GrammarDeclaration) where import Control.Applicative import Data.Char (chr, isDigit, isHexDigit) import Data.List (intersperse) import Data.Monoid (Dual(..), Endo(..), (<>)) import Numeric (readHex) import T...
221dd38aabb4c454e1ec5ca8e78ee8b821a3b46408f61aedc508f96268fe4a19
dennismckinnon/Ethereum-Contracts
Scoreboard.lsp
Transactions to the scoreboard are of three types : 1 ) Scoreboard type - this is from the game contract ; txdata /winner/loser/tie? 2 ) Admin type - This is from the account which first sends a transaction to this contract ( they get Admin status ) and can suicide and link / delink ; txdata /"suicide" 3 ) Cont...
null
https://raw.githubusercontent.com/dennismckinnon/Ethereum-Contracts/25b5e7037da382dd95a1376fad81f936f6610b36/TicTacToe/Scoreboard.lsp
lisp
txdata /winner/loser/tie? txdata /"suicide" txdata /"link" ("delink") Contract stores a record of scores in a users slot corresponding to their address. (passed along with winning data) Contract Flow (Use) -----> The txdata 3 is 0 indicates not a tie, txdata 0 is winner, txdata 1 is loser. If tie then winne...
Transactions to the scoreboard are of three types : 1 ) Scoreboard type - this is from the game contract 2 ) Admin type - This is from the account which first sends a transaction to this contract ( they get Admin status ) and can suicide and link / delink 3 ) Contract link manipulation - This is similar to Admin ...
25248306d0754efd9497abc921eb3128972acdfd69bc2f1d936b17b070c797bf
barrucadu/dejafu
Properties.hs
# LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # module Unit.Properties where import qualified Control.Exception as E import Control.Monad (zipWithM) import qualified Control.Monad.Conc.Class as C import Control.Monad.IO.Class ...
null
https://raw.githubusercontent.com/barrucadu/dejafu/f805783398e2be60ebabb56fce9f23506b9d1879/dejafu-tests/lib/Unit/Properties.hs
haskell
----------------------------------------------------------------------------- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --------...
# LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # module Unit.Properties where import qualified Control.Exception as E import Control.Monad (zipWithM) import qualified Control.Monad.Conc.Class as C import Control.Monad.IO.Class ...
e6fd23c223e44c6352fccc0686087a4ce44ecc7e2394510b5493f64113f91694
OCamlPro/ocplib-endian
common_401.cppo.ml
external swap16 : int -> int = "%bswap16" external swap32 : int32 -> int32 = "%bswap_int32" external swap64 : int64 -> int64 = "%bswap_int64" external swapnative : nativeint -> nativeint = "%bswap_native" module BigEndian = struct let get_char = get_char let get_uint8 = get_uint8 let get_int8 = get_int8 let s...
null
https://raw.githubusercontent.com/OCamlPro/ocplib-endian/4f9fc814497b09da84f94ddf85cb20c9777887c2/src/common_401.cppo.ml
ocaml
external swap16 : int -> int = "%bswap16" external swap32 : int32 -> int32 = "%bswap_int32" external swap64 : int64 -> int64 = "%bswap_int64" external swapnative : nativeint -> nativeint = "%bswap_native" module BigEndian = struct let get_char = get_char let get_uint8 = get_uint8 let get_int8 = get_int8 let s...
b476ca4e41501cc47ff85b6d807222d0661afc67946b53f813116bdd0f3e6110
kupl/FixML
sub26.ml
type exp = | V of var | P of var * exp | C of exp * exp and var = string let check : exp -> bool = fun exp -> match exp with | V var -> false | P(var1, V var2) -> if var1 = var2 then true else false | P(var1, C(V var2, P(var3, V var4))) -> if var1 = var4 || var2 ...
null
https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/wellformedness/wellformedness/submissions/sub26.ml
ocaml
type exp = | V of var | P of var * exp | C of exp * exp and var = string let check : exp -> bool = fun exp -> match exp with | V var -> false | P(var1, V var2) -> if var1 = var2 then true else false | P(var1, C(V var2, P(var3, V var4))) -> if var1 = var4 || var2 ...
eed8901a9dbf8506332596dd9280ed777161dcd88112724605d3b1379b107271
coq/coq
objFile.ml
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * *...
null
https://raw.githubusercontent.com/coq/coq/68ccd6dd3119264ba517bb82cdb8e5c4e5f2d24e/lib/objFile.ml
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team // * This file is distributed under the terms of the * (see LICENSE file for the text of the license) ************************************...
v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser Gener...
397b5297c06d5aad92c50e344f022c2f1ba23f274d2db5c6ecc8267d6d7b637d
gedge-platform/gedge-platform
amqp_direct_consumer.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2011 - 2021 VMware , Inc. or its affiliates . All rights reserved . %% %% @doc This module is an implementation of the a...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/amqp_client/src/amqp_direct_consumer.erl
erlang
@doc This module is an implementation of the amqp_gen_consumer opening AMQP channels. <br/> <br/> The Consumer parameter for this implementation is {{@module}, queue subscription-related messages.<br/> <br/> This consumer implementation causes the channel to send to the basic.cancel_ok and basic.deliver mess...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2011 - 2021 VMware , Inc. or its affiliates . All rights reserved . behaviour and can be used as part of the Consumer par...
745e4042ea015f7ae7fdb4981439f9d3db2d5cba3eeefe6c1fe1164d0bef748c
kuberlog/holon
storage.lisp
(in-package :holon.task) (ql:quickload :postmodern) (ql:quickload :chirp) (defun load-secrets () (with-open-file (f "task/secrets") (let ((secrets (read f))) (setf chirp::*oauth-api-key* (cdr (assoc 'oauth-api-key secrets))) (setf chirp::*oauth-api-secret* (cdr (assoc 'oauth-api-secret secr...
null
https://raw.githubusercontent.com/kuberlog/holon/03dd159f9333aaf3c0a6ff1db2adb09a5f567cd5/lisp/task/storage.lisp
lisp
(load-secrets) not using this at the moment
(in-package :holon.task) (ql:quickload :postmodern) (ql:quickload :chirp) (defun load-secrets () (with-open-file (f "task/secrets") (let ((secrets (read f))) (setf chirp::*oauth-api-key* (cdr (assoc 'oauth-api-key secrets))) (setf chirp::*oauth-api-secret* (cdr (assoc 'oauth-api-secret secr...
8b01b54dda4215f50b024db36ac068942250ab10d4310f8bd8cb30889829ac95
kupl/LearnML
original.ml
type exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp) type formula = | True | False | Not of formula | AndAlso of (formula * formula) | OrElse of (formula * formula) | Imply of (formula * formula) | Equal of (exp * exp) let rec eval (form : formula) : bool = let rec value (x : exp) : int ...
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/formula/sub69/original.ml
ocaml
type exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp) type formula = | True | False | Not of formula | AndAlso of (formula * formula) | OrElse of (formula * formula) | Imply of (formula * formula) | Equal of (exp * exp) let rec eval (form : formula) : bool = let rec value (x : exp) : int ...
af443c7939149e82be9d3542cc752d7887638721569032a1f1d67801c1d3c317
ktakashi/sagittarius-scheme
hmac_sha256_test.scm
(test-hmac "hmac_sha256_test" :algorithm "HMACSHA256" :key-size 256 :tag-size 256 :tests '(#(1 "empty message" #vu8(30 34 92 175 185 3 57 187 161 178 64 118 212 32 108 62 121 195 85 128 93 133 22 130 188 129 139 170 79 90 119 121) #vu8() #vu8(177 117 181 125 137 234 108 182 6 2...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/e4187eaa8221fad00d7e340019c30429e8824694/ext/crypto/tests/testvectors/hmac/hmac_sha256_test.scm
scheme
(test-hmac "hmac_sha256_test" :algorithm "HMACSHA256" :key-size 256 :tag-size 256 :tests '(#(1 "empty message" #vu8(30 34 92 175 185 3 57 187 161 178 64 118 212 32 108 62 121 195 85 128 93 133 22 130 188 129 139 170 79 90 119 121) #vu8() #vu8(177 117 181 125 137 234 108 182 6 2...
eb3c7d94a421d0d290f54a1253c558acc643a2110d48c660a1ad70bdc240dcea
camlp5/camlp5
diff.ml
(* camlp5r *) (* diff.ml,v *) Copyright ( c ) INRIA 2007 - 2017 Parts of Code of GNU diff ( analyze.c ) translated from C to OCaml and adjusted . Basic algorithm described by in : " An O(ND ) Difference Algorithm and Its Variations " and adjusted. Basic algorithm described by Eugene W.Myers in: ...
null
https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/ocaml_src/lib/diff.ml
ocaml
camlp5r diff.ml,v [make_indexer a b] returns an array of index of items of [a] which are also present in [b]; this way, the main algorithm can skip items which, anyway, are different. This improves the speed much. The same time, this function updates the items of so that all equal items point to the ...
Copyright ( c ) INRIA 2007 - 2017 Parts of Code of GNU diff ( analyze.c ) translated from C to OCaml and adjusted . Basic algorithm described by in : " An O(ND ) Difference Algorithm and Its Variations " and adjusted. Basic algorithm described by Eugene W.Myers in: "An O(ND) Difference Algori...
9ad291d8be932eab6ca3dac4c1a9e6ee63c7669c8988b7e2e96c8f1cb852c0a4
ros/roslisp_common
client-goal-handle.lisp
Copyright ( c ) 2014 , < > ;;; All rights reserved. ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions are met: ;;; ;;; * Redistributions of source code must retain the above copyright ;;; notice, this list of conditions...
null
https://raw.githubusercontent.com/ros/roslisp_common/4db311da26497d84a147f190200e50c7a5b4106e/actionlib_lisp/src/new_implementation/client-goal-handle.lisp
lisp
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in ...
Copyright ( c ) 2014 , < > * Neither the name of the Institute for Artificial Intelligence/ Universitaet Bremen nor the names of its contributors may be used to THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR P...
d1c27f02bade9843ba4dc365b2642342f52c47e0036a59d8bcbf665a0143b8f5
danielsz/certificaat
session.clj
(ns certificaat.acme4j.session (:import [org.shredzone.acme4j Session])) (defn create [acme-uri] (Session. acme-uri)) (defn login "Returns a login object" [session url-location keypair] (.login session url-location keypair))
null
https://raw.githubusercontent.com/danielsz/certificaat/955429f6303da9a687cf636d93437281f43ddb71/src/certificaat/acme4j/session.clj
clojure
(ns certificaat.acme4j.session (:import [org.shredzone.acme4j Session])) (defn create [acme-uri] (Session. acme-uri)) (defn login "Returns a login object" [session url-location keypair] (.login session url-location keypair))
9b019a91813b68dc7372e0ced16c0eb1e7ebb9da47aa8ec3382dbfc7bd39af1a
ocaml-obuild/obuild
binprot.ml
open Bin_prot.Std type t = { i: int; f: float } [@@deriving bin_io] let () = let x = { i = 2048 ; f = 3.1415 } in let buff = Bin_prot.Utils.bin_dump bin_writer_t x in let y = bin_read_t buff ~pos_ref:(ref 0) in assert(x = y)
null
https://raw.githubusercontent.com/ocaml-obuild/obuild/28252e8cee836448e85bfbc9e09a44e7674dae39/tests/dependencies/ppx_sexp/binprot.ml
ocaml
open Bin_prot.Std type t = { i: int; f: float } [@@deriving bin_io] let () = let x = { i = 2048 ; f = 3.1415 } in let buff = Bin_prot.Utils.bin_dump bin_writer_t x in let y = bin_read_t buff ~pos_ref:(ref 0) in assert(x = y)
6defd1296d04270ab2b75465e1e49d9d39fb1b5284ef0cac3248ce61c4216c21
psholtz/MIT-SICP
exercise-09.scm
;; Working definitions ( Data Structures ) ;; (define (make-units C L H) (list C L H)) (define get-units-C car) (define get-units-L cadr) (define get-units-H caddr) (define (make-class number units) (list number units)) (define get-class-number car) (define get-class-units cadr) (define (get-class-total-units cla...
null
https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Recitations-F2007/Recitation-06/mit-scheme/exercise-09.scm
scheme
Working definitions (HOPs) Previous solutions Basic Classes Rewrite "drop-class" to use "filter". We had already written "drop-class" to use filter: Run some unit tests: The "non-filter" version is given as:
Working definitions ( Data Structures ) (define (make-units C L H) (list C L H)) (define get-units-C car) (define get-units-L cadr) (define get-units-H caddr) (define (make-class number units) (list number units)) (define get-class-number car) (define get-class-units cadr) (define (get-class-total-units class) (...
6f946725ed641a7c995f17decfa80a58dfd7c973c02f4a30d5c2d3d68dc63c84
tarides/ocaml-jit
relocation.ml
Copyright ( c ) 2021 < > * * 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 THE AUTHO...
null
https://raw.githubusercontent.com/tarides/ocaml-jit/fe2fce1a5bb89acf5f7239917f6098d53c2c14ec/lib/jit/relocation.ml
ocaml
Copyright ( c ) 2021 < > * * 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 THE AUTHO...
a43ca488d943e1d59f976275e4b908d9558b834807dc59ec3723ee7c164a29c3
hasufell/hpath
CreateRegularFileSpec.hs
{-# LANGUAGE OverloadedStrings #-} module System.Posix.RawFilePath.Directory.CreateRegularFileSpec where import Test.Hspec import System.IO.Error ( ioeGetErrorType ) import GHC.IO.Exception ( IOErrorType(..) ) import Utils upTmpDir :: IO () upTmpDir = do setTmpDir "CreateRegularFileSpec" creat...
null
https://raw.githubusercontent.com/hasufell/hpath/9fcc1890596e5b838bf3be9ed303165fbc692d11/hpath-directory/test/System/Posix/RawFilePath/Directory/CreateRegularFileSpec.hs
haskell
# LANGUAGE OverloadedStrings # successes -- posix failures --
module System.Posix.RawFilePath.Directory.CreateRegularFileSpec where import Test.Hspec import System.IO.Error ( ioeGetErrorType ) import GHC.IO.Exception ( IOErrorType(..) ) import Utils upTmpDir :: IO () upTmpDir = do setTmpDir "CreateRegularFileSpec" createTmpDir setupFiles :: IO () setupF...
95bfc903a5c26ea9878235d9b42231980c19631b180a00a1f115a96effca31e5
YoshikuniJujo/test_haskell
Queue.hs
# LANGUAGE ImportQualifiedPost # # OPTIONS_GHC -Wall -fno - warn - tabs # module Gpu.Vulkan.Queue ( M.Q, submit, M.waitIdle ) where import Data.TypeLevel.Uncurry import Data.HeteroParList qualified as HeteroParList import Gpu.Vulkan import qualified Gpu.Vulkan.Fence.Type as Fence import Gpu.Vulkan.Queue.Middle q...
null
https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/e5bad21f788a602c3d6e015c84162f848f0e8ee0/themes/gui/vulkan/try-my-vulkan-snd/src/Gpu/Vulkan/Queue.hs
haskell
# LANGUAGE ImportQualifiedPost # # OPTIONS_GHC -Wall -fno - warn - tabs # module Gpu.Vulkan.Queue ( M.Q, submit, M.waitIdle ) where import Data.TypeLevel.Uncurry import Data.HeteroParList qualified as HeteroParList import Gpu.Vulkan import qualified Gpu.Vulkan.Fence.Type as Fence import Gpu.Vulkan.Queue.Middle q...
daa268d02683f8e6ac839c2b4bcf60f0168d7259e9b5831f929990a95130152a
plow-technologies/quickcheck-arbitrary-template
Internal.hs
# LANGUAGE TemplateHaskell # module Test.QuickCheck.TH.Generators.Internal (makeArbitrary) where import Data.Monoid ((<>)) import Language.Haskell.TH import Language.Haskell.TH.Syntax import Test.QuickCheck import Test.QuickCheck.TH.Generators.Internal.BuildArbitra...
null
https://raw.githubusercontent.com/plow-technologies/quickcheck-arbitrary-template/97d6243f9d3b7dddb0a1c6329de9f3f8ad49c813/src/Test/QuickCheck/TH/Generators/Internal.hs
haskell
| create buildArb1 through buildArb20 automatically | Boilerplate for top level splices. The given 'Name' must be from a type constructor. Furthermore, the type constructor must be either a data type or a newtype. Any other value will result in an exception. ^ Function that generates the actual code. Will be app...
# LANGUAGE TemplateHaskell # module Test.QuickCheck.TH.Generators.Internal (makeArbitrary) where import Data.Monoid ((<>)) import Language.Haskell.TH import Language.Haskell.TH.Syntax import Test.QuickCheck import Test.QuickCheck.TH.Generators.Internal.BuildArbitra...
47f42dc12b359c04b1a5cda322eac5368c54391fb115337b75490e2309243be1
haskell-opengl/GLUT
FogIndex.hs
FogIndex.hs ( adapted from fogindex.c which is ( c ) Silicon Graphics , Inc ) Copyright ( c ) 2002 - 2018 < > This file is part of HOpenGL and distributed under a BSD - style license See the file libraries / GLUT / LICENSE This program draws 5 wireframe spheres , each at a different z dista...
null
https://raw.githubusercontent.com/haskell-opengl/GLUT/36207fa51e4c1ea1e5512aeaa373198a4a56cad0/examples/RedBook4/FogIndex.hs
haskell
display mode, depth buffer, and handle input events.
FogIndex.hs ( adapted from fogindex.c which is ( c ) Silicon Graphics , Inc ) Copyright ( c ) 2002 - 2018 < > This file is part of HOpenGL and distributed under a BSD - style license See the file libraries / GLUT / LICENSE This program draws 5 wireframe spheres , each at a different z dista...
d8437abe07e01219f96f549d20e144f2b5c6315b9a7726f0e979b2a7c309ce4d
Mikolaj/horde-ad
ShortTestForCISimplified.hs
module Main (main) where import Prelude import Data.Proxy import qualified System.IO as SIO import Test.Tasty import Test.Tasty.Options import Test.Tasty.Runners import qualified TestDescentSimple import qualified TestGradientSimple import qualified TestMnistFCNNSimple import ...
null
https://raw.githubusercontent.com/Mikolaj/horde-ad/9184e40314779f011a27f23b79a75460ffff4d52/test/ShortTestForCISimplified.hs
haskell
import qualified TestMnistCNN import qualified TestMnistFCNN import qualified TestMnistRNN Limit interleaving of characters in parallel tests. ++ TestGradient.testTrees ++ TestDescent.testTrees ++ TestMnistFCNN.shortTestForCITrees ++ TestMnistRNN.shortTestForCITrees ++ TestMnistCNN.shortTestForCITrees
module Main (main) where import Prelude import Data.Proxy import qualified System.IO as SIO import Test.Tasty import Test.Tasty.Options import Test.Tasty.Runners import qualified TestDescentSimple import qualified TestGradientSimple import qualified TestMnistFCNNSimple import ...
9d4cd02edadbacdeb5aa57bafdd1a7ddeb94fbc410d2c6d09e935c67762a76de
processone/tsung
ts_ssl.erl
-module(ts_ssl). -export([ connect/2, connect/3, connect/4, send/3, close/1, set_opts/2, protocol_options/1, normalize_incomming_data/2 ]). -behaviour(gen_ts_transport). -include("ts_profile.hrl"). -include("ts_config.hrl"). protocol_options(Proto=#proto_opts{disable_sni=true}) -> [{server_name_indication, dis...
null
https://raw.githubusercontent.com/processone/tsung/91345cd3c873edfc07d5bbb1fabac41cac9a2891/src/tsung/ts_ssl.erl
erlang
-> {ok, Socket} send/3 -> ok | {error, Reason} set_opts/2 -> socket() Other, non gen_tcp packet.
-module(ts_ssl). -export([ connect/2, connect/3, connect/4, send/3, close/1, set_opts/2, protocol_options/1, normalize_incomming_data/2 ]). -behaviour(gen_ts_transport). -include("ts_profile.hrl"). -include("ts_config.hrl"). protocol_options(Proto=#proto_opts{disable_sni=true}) -> [{server_name_indication, dis...
17cfee4a7849e85c4dd3ad1aebb17ad5a39b1597175f5f5f62775be9b66a722b
justinmeiners/exercises
2_67.scm
(define (make-leaf symbol weight) (list 'leaf symbol weight)) (define (leaf? object) (eq? (car object) 'leaf)) (define (symbol-leaf x) (cadr x)) (define (weight-leaf x) (caddr x)) (define (make-code-tree left right) (list left right (append (symbols left) (symbols right)) (+ (weigh...
null
https://raw.githubusercontent.com/justinmeiners/exercises/9491bc16925eae12e048ccd3f424b870ebdc73aa/sicp/2/2_67.scm
scheme
symbol frequency (display (decode sample-message sample-tree)) (newline)
(define (make-leaf symbol weight) (list 'leaf symbol weight)) (define (leaf? object) (eq? (car object) 'leaf)) (define (symbol-leaf x) (cadr x)) (define (weight-leaf x) (caddr x)) (define (make-code-tree left right) (list left right (append (symbols left) (symbols right)) (+ (weigh...
cd35e7b0b4e89c53eef010e2b255d23d18ab797be239e4340ac89879d7f04328
klange/cs421
picomllex.ml
# 1 "picomllex.mll" open Student open Mp8common exception EndInput let line_count = ref 1 let char_count = ref 1 let cinc n = char_count := !char_count + n let linc n = line_count := (char_count := 1; !line_count + n) # 17 "picomllex.ml" let __ocaml_lex_tables = { Lexing.lex_base = "\000\000\198\255\084\0...
null
https://raw.githubusercontent.com/klange/cs421/8db4619db63169bbc2ca7e1998fa4e95f002a5c4/mp8grader/picomllex.ml
ocaml
# 1 "picomllex.mll" open Student open Mp8common exception EndInput let line_count = ref 1 let char_count = ref 1 let cinc n = char_count := !char_count + n let linc n = line_count := (char_count := 1; !line_count + n) # 17 "picomllex.ml" let __ocaml_lex_tables = { Lexing.lex_base = "\000\000\198\255\084\0...
bb68e7a808c09b914270ac1dd3ca48e3e5302b301bc48e8be80c91456bc02f27
jimweirich/sicp-study
ex1_32_test.scm
SICP 1.32 Tests (define (identity x) x) (define (inc n) (+ 1 n)) (define (factorial n) (product identity 2 inc n)) (define (sum-integers a b) (sum identity a inc b)) (test-case "Ex 1.32 Sum of integers" (assert-equal 55 (sum-integers 1 10))) (test-case "Ex 1.32 Factorial" (assert-equal...
null
https://raw.githubusercontent.com/jimweirich/sicp-study/bc5190e04ed6ae321107ed6149241f26efc1b8c8/scheme/chapter1/ex1_32_test.scm
scheme
SICP 1.32 Tests (define (identity x) x) (define (inc n) (+ 1 n)) (define (factorial n) (product identity 2 inc n)) (define (sum-integers a b) (sum identity a inc b)) (test-case "Ex 1.32 Sum of integers" (assert-equal 55 (sum-integers 1 10))) (test-case "Ex 1.32 Factorial" (assert-equal...
c8e4d6572e1ab06899015977900a15813ee0af355584713ec14550dea80991df
tweag/ormolu
singleline.hs
module Foo ( foo, bar, baz ) where
null
https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/module-header/singleline.hs
haskell
module Foo ( foo, bar, baz ) where
a383217c9fe9c8af57f205c073fb9d9411ea602ac5275fdb0d73866e70395709
zhongwencool/observer_cli
observer_cli_escriptize.erl
-module(observer_cli_escriptize). -export([main/1]). %% @doc escript main -spec main(list()) -> 'ok'. -define(BEAM_MODS, [ recon, recon_alloc, recon_lib, recon_trace, observer_cli, observer_cli_ets, observer_cli_lib, observer_cli_process, observer_cli_application, observer_cli...
null
https://raw.githubusercontent.com/zhongwencool/observer_cli/baa70569bccc5508e9839e20768540ef3cdca016/src/observer_cli_escriptize.erl
erlang
@doc escript main only a name without host given, assume shortname
-module(observer_cli_escriptize). -export([main/1]). -spec main(list()) -> 'ok'. -define(BEAM_MODS, [ recon, recon_alloc, recon_lib, recon_trace, observer_cli, observer_cli_ets, observer_cli_lib, observer_cli_process, observer_cli_application, observer_cli_help, observer_c...
daef546f00b633542465f23923ef4c4dda8d0b61edfd4cb61df03ad931282867
glondu/belenios
pages_admin.mli
(**************************************************************************) (* BELENIOS *) (* *) Copyright © 2012 - 2022 (* ...
null
https://raw.githubusercontent.com/glondu/belenios/5306402c15c6a76438b13b8b9da0f45d02a0563d/src/web/server/common/pages_admin.mli
ocaml
************************************************************************ BELENIOS This program is free softw...
Copyright © 2012 - 2022 it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the exemption that compiling , linking , and/or using OpenSSL is allowed . You should have rece...
4cb48371e40bb280a70aea3addaa6edc18196d287920560c5ef66ee9bf6b47f9
clash-lang/clash-compiler
T1766.hs
module T1766 where import qualified Prelude import Data.List (nub) import Data.Maybe (mapMaybe) import Clash.Class.Counter import Clash.Explicit.Prelude import Clash.Backend import Clash.Netlist.Types import Test.Tasty.Clash import Test.Tasty.Clash.NetlistTest brightness :: Unsigned 3 -> Unsigned 3 -> Unsigned 4 ...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/df3d5d1484413f2366e64804dab760fdb57edf14/tests/shouldwork/Netlist/T1766.hs
haskell
module T1766 where import qualified Prelude import Data.List (nub) import Data.Maybe (mapMaybe) import Clash.Class.Counter import Clash.Explicit.Prelude import Clash.Backend import Clash.Netlist.Types import Test.Tasty.Clash import Test.Tasty.Clash.NetlistTest brightness :: Unsigned 3 -> Unsigned 3 -> Unsigned 4 ...
fb68acddc653d8c2a94a3caa5ddac3e24e24a0f5b1106c6f04d4caf742bff11f
synduce/Synduce
sum_between.ml
* @synduce -s 2 --no - lifting -NB -n 30 type 'a tree = | Leaf of 'a | Node of 'a * 'a tree * 'a tree let rec tree_min = function | Leaf x -> x | Node (a, l, r) -> min a (min (tree_min l) (tree_min r)) ;; let rec tree_max = function | Leaf x -> x | Node (a, l, r) -> max a (max (tree_max l) (tree_max r)) ...
null
https://raw.githubusercontent.com/synduce/Synduce/42d970faa863365f10531b19945cbb5cfb70f134/benchmarks/incomplete/bst/sum_between.ml
ocaml
* @synduce -s 2 --no - lifting -NB -n 30 type 'a tree = | Leaf of 'a | Node of 'a * 'a tree * 'a tree let rec tree_min = function | Leaf x -> x | Node (a, l, r) -> min a (min (tree_min l) (tree_min r)) ;; let rec tree_max = function | Leaf x -> x | Node (a, l, r) -> max a (max (tree_max l) (tree_max r)) ...
f5e2ff2447ee84e5015cae62616cbc627d00cb177c1d9cdcbdd005ac2fde147a
Rydgel/flappy-haskell
Types.hs
module Types where import FRP.Yampa import qualified SDL data Bird = Bird { birdPos :: !Double , birdVel :: !Double , birdState :: !Double } deriving (Show) data Sky = Sky { skyPos :: !Double } deriving (Show) data Ground = Ground { groundPos :: !D...
null
https://raw.githubusercontent.com/Rydgel/flappy-haskell/4790c34978e47b048af1550f6d3af8604d9c8a89/src/Types.hs
haskell
module Types where import FRP.Yampa import qualified SDL data Bird = Bird { birdPos :: !Double , birdVel :: !Double , birdState :: !Double } deriving (Show) data Sky = Sky { skyPos :: !Double } deriving (Show) data Ground = Ground { groundPos :: !D...
03abadf9b565beafc5f1d09fa59e05ac1bef6e702f1d188276fd5b066c45a1f0
input-output-hk/rscoin-haskell
Actions.hs
# LANGUAGE CPP # {-# LANGUAGE KindSignatures #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE ViewPatterns # -- | Module that provides description of what user node can do and -- functions that runs chosen action. module Actions ( processCommand ...
null
https://raw.githubusercontent.com/input-output-hk/rscoin-haskell/109d8f6f226e9d0b360fcaac14c5a90da112a810/src/User/Actions.hs
haskell
# LANGUAGE KindSignatures # | Module that provides description of what user node can do and functions that runs chosen action. | Processes command line user command Crazy indentation ;( | Boolean flags stands for "show blacklist?". Default -- false, show whitelist. | Blacklists and whitelists allocations. B...
# LANGUAGE CPP # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE ViewPatterns # module Actions ( processCommand , initializeStorage ) where import Control.Applicative (liftA2) import Control.Lens ((^.)) i...
4fabee63493bac43a347f287fd0ab2c77f5fd666ca19567acb83ce9efa31de50
josephwilk/musical-creativity
t_cellular_automata.clj
(ns musical-creativity.integration.t-cellular-automata (:require [midje.sweet :refer :all] [musical-creativity.composers.cellular-automata :as cellular-automata])) (def rules [[["*" "*" "*"] "0"] [["*" "*" "0"] "*"] [["*" "0" "*"] "0"] [["*" "0" "0"] "*"] [["0" "*" "*"] "*"] [["0" "*" "0"] "...
null
https://raw.githubusercontent.com/josephwilk/musical-creativity/c2e6aab2a26d69ee2e51f4fad84fa3a71805e6ca/test/musical_creativity/integration/t_cellular_automata.clj
clojure
(ns musical-creativity.integration.t-cellular-automata (:require [midje.sweet :refer :all] [musical-creativity.composers.cellular-automata :as cellular-automata])) (def rules [[["*" "*" "*"] "0"] [["*" "*" "0"] "*"] [["*" "0" "*"] "0"] [["*" "0" "0"] "*"] [["0" "*" "*"] "*"] [["0" "*" "0"] "...
f0ca80e432bacb6292d0188386e49d61f151e19fd817a93f012b270f5ccd5361
rabbitmq/khepri
khepri_machine.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright © 2021 - 2023 VMware , Inc. or its affiliates . All rights reserved . %% %% @doc Khepri private low - level API . %% This ...
null
https://raw.githubusercontent.com/rabbitmq/khepri/91699e5e0e7224e6cea0841ed05ffc346a115cab/src/khepri_machine.erl
erlang
@doc state machine. All functions in {@link khepri} are built on top of this module. This module is private. The documentation is still visible because it may help understand some implementation details. However, this module should ra_machine callbacks. For internal use only. Properties attached to each nod...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright © 2021 - 2023 VMware , Inc. or its affiliates . All rights reserved . Khepri private low - level API . This module exposes th...
17c7948e620ba5a259afc1e42b155f7edd07a06e272f3310696672afd9da53a7
gonzojive/parenscript
firebug-tracing.lisp
Tracing macro courtesy of < > , logs to Firebug console ;; On a happier note here is a macro I wrote to enable . Works with firebug . You 'll need to ( defvar ;; *trace-level*). I don't do indentation but that would be an easy ;; addition. (defpsmacro console (&rest rest) `(console.log ,@rest)) (defp...
null
https://raw.githubusercontent.com/gonzojive/parenscript/5d4772369e28c33cd3522ad46d3de357f7cacf70/extras/firebug-tracing.lisp
lisp
On a happier note here is a macro I wrote to enable *trace-level*). I don't do indentation but that would be an easy addition.
Tracing macro courtesy of < > , logs to Firebug console . Works with firebug . You 'll need to ( defvar (defpsmacro console (&rest rest) `(console.log ,@rest)) (defpsmacro defun-trace (name args &rest body) (let* ((sname (ps::symbol-to-js name)) (tname (ps-gensym name)) (arg-names...
361ab3d6048e3d6e6af0ce2d7c0c27b3af0a642c316a64a7416fa954b1fbed0f
andrewMacmurray/haskell-book-solutions
as.hs
module As where import Data.Char isSubsequenceOf :: Eq a => [a] -> [a] -> Bool isSubsequenceOf [] _ = True isSubsequenceOf _ [] = False isSubsequenceOf (x:xs) phrase@(y:ys) = if x `elem` phrase then isSubsequenceOf xs ys else isSubsequenceOf (x:xs) ys makePair :: String -> (String, String) makePair xs = (xs, ca...
null
https://raw.githubusercontent.com/andrewMacmurray/haskell-book-solutions/f4fd386187c03828d1736d9a43642ab4f0ec6462/src/ch11/as.hs
haskell
module As where import Data.Char isSubsequenceOf :: Eq a => [a] -> [a] -> Bool isSubsequenceOf [] _ = True isSubsequenceOf _ [] = False isSubsequenceOf (x:xs) phrase@(y:ys) = if x `elem` phrase then isSubsequenceOf xs ys else isSubsequenceOf (x:xs) ys makePair :: String -> (String, String) makePair xs = (xs, ca...
432dfec0c114a36a98aa1ae6318d7efd38d87f12c98ac46bcdeac925eff3ee51
zyrolasting/polyglot
publish.rkt
#lang racket/base (provide publish) (require racket/file racket/path racket/port racket/set racket/list racket/cmdline raco/command-name unlike-assets/logging aws/s3 aws/keys "../../main.rkt" "../../paths.rkt" "shared.rkt") (define bucket (make-parameter "default-bucket")) (define dry-run? (...
null
https://raw.githubusercontent.com/zyrolasting/polyglot/d27ca7fe90fd4ba2a6c5bcd921fce89e72d2c408/polyglot-lib/polyglot/private/cli/publish.rkt
racket
#lang racket/base (provide publish) (require racket/file racket/path racket/port racket/set racket/list racket/cmdline raco/command-name unlike-assets/logging aws/s3 aws/keys "../../main.rkt" "../../paths.rkt" "shared.rkt") (define bucket (make-parameter "default-bucket")) (define dry-run? (...
9933583a593004c910f484203e5503a38bdb165f497ec9366df7b45d98943d76
AlexKnauth/afl
test-afl-at-exp-racket.rkt
#lang afl at-exp racket/base (require rackunit) (check-equal? (map #λ(+ % 1) '(1 2 3)) '(2 3 4)) (check-equal? (map #λ(+ % %2) '(1 2 3) '(1 2 3)) '(2 4 6)) (check-equal? (#λ(apply list* % %&) 1 '(2 3)) '(1 2 3)) (check-equal? (#λ(* 1/2 %#:m (* %#:v %#:v)) #:m 2 #:v 1) ...
null
https://raw.githubusercontent.com/AlexKnauth/afl/a51e609615f7645d773a726b225d3356b751d017/afl/tests/test-afl-at-exp-racket.rkt
racket
#lang afl at-exp racket/base (require rackunit) (check-equal? (map #λ(+ % 1) '(1 2 3)) '(2 3 4)) (check-equal? (map #λ(+ % %2) '(1 2 3) '(1 2 3)) '(2 4 6)) (check-equal? (#λ(apply list* % %&) 1 '(2 3)) '(1 2 3)) (check-equal? (#λ(* 1/2 %#:m (* %#:v %#:v)) #:m 2 #:v 1) ...
61211ff50f9ff65511daf95ce6ae3320e7bddff671da44b42db6e70980875e66
racket/scribble
contract-render.rkt
#lang racket/base (require racket/class racket/match (prefix-in text: "text-render.rkt") "base-render.rkt" "core.rkt" file/convertible racket/serialize) (provide override-render-mixin-single override-render-mixin-multi) (define (override-render-mixin multi?) (mix...
null
https://raw.githubusercontent.com/racket/scribble/beb2d9834169665121d34b5f3195ddf252c3c998/scribble-lib/scribble/contract-render.rkt
racket
mode is either 'block -- search for the blue blocks or (cons number number) -- search for tags in a block (printf "-----\n") ((dynamic-require 'racket/pretty 'pretty-write) block) the spaces that appear at the ends of the lines
#lang racket/base (require racket/class racket/match (prefix-in text: "text-render.rkt") "base-render.rkt" "core.rkt" file/convertible racket/serialize) (provide override-render-mixin-single override-render-mixin-multi) (define (override-render-mixin multi?) (mix...
2a76201a058c62f57336fb85f2b402ef8661786abdd2e8d89911b8e51e0a8978
dnaeon/cl-migratum
migrate.lisp
Copyright ( c ) 2020 - 2022 Nikolov < > ;; All rights reserved. ;; ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions ;; are met: ;; 1 . Redistributions of source code must retain the above copyright ;; notice, this lis...
null
https://raw.githubusercontent.com/dnaeon/cl-migratum/31ceaf4ff66ae3c124d95673bb0d5d61e87588ba/src/cli/migrate.lisp
lisp
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer in this position and unchanged. notice, this list of conditions and the fo...
Copyright ( c ) 2020 - 2022 Nikolov < > 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S ) ` ` AS IS '' AND ANY EXPRESS OR INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL ...
4026fc68777346ba8abf13147e7f8eb90320f0553a292d28d42e13b51602b270
byteally/webapi
Main.hs
# LANGUAGE RecordWildCards # module Main where import Options.Applicative ( (<**>), fullDesc, header, info, long, progDesc, strOption, execParser, helper, Parser ) import WebApi.OpenAPI (generateModels) data CliArgs = CliArgs { inputJsonFP :: FilePath...
null
https://raw.githubusercontent.com/byteally/webapi/244bee3b3669993fcc62afc86d06baac33e02966/webapi-openapi/openapi-model-generator/Main.hs
haskell
# LANGUAGE RecordWildCards # module Main where import Options.Applicative ( (<**>), fullDesc, header, info, long, progDesc, strOption, execParser, helper, Parser ) import WebApi.OpenAPI (generateModels) data CliArgs = CliArgs { inputJsonFP :: FilePath...
97d3414fea78762e31321f25056c3fa1ff9a956be9a59f5a509c1a2b9ef0e64e
gregr/racket-misc
fof-kanren.rkt
#lang racket/base (provide interpret fof-apply (struct-out fof-func-app) run-config-fof runfof runfof* runfof-depth runfof*-depth ) (require "cursor.rkt" "dict.rkt" "maybe.rkt" "microkanren.rkt" "minikanren.rkt" "record.rkt" "repr.rkt" "set.rkt" "sugar.rkt" racket/dict racket/fu...
null
https://raw.githubusercontent.com/gregr/racket-misc/0a5c9d4875288795e209d06982b82848c989d08b/fof-kanren.rkt
racket
TODO: normalization unnecessary unless under a func-app such as when new-term is func-app or everything here is under a higher level func-app (track this for efficiency?) TODO: if empty, remove completely TODO: this was a bad idea that's now easier to fix TODO: re-enable with deterministic sub-func reification or...
#lang racket/base (provide interpret fof-apply (struct-out fof-func-app) run-config-fof runfof runfof* runfof-depth runfof*-depth ) (require "cursor.rkt" "dict.rkt" "maybe.rkt" "microkanren.rkt" "minikanren.rkt" "record.rkt" "repr.rkt" "set.rkt" "sugar.rkt" racket/dict racket/fu...
ee62e9cbc2337f5dd416373094e420cc08ae5f380df88d3e58ec8d93bf7d1377
toyokumo/kintone-client
test_runner.cljs
(ns cljs.test-runner (:require [doo.runner :refer-macros [doo-tests]] ;; require all the namespaces that have tests in them [kintone-client.app-test] [kintone-client.authentication-test] [kintone-client.connection-test] [kintone-client.record-test] ...
null
https://raw.githubusercontent.com/toyokumo/kintone-client/32cf5abec1efa6d7ed5f33cf889535863358875b/script/cljs/test_runner.cljs
clojure
require all the namespaces that have tests in them
(ns cljs.test-runner (:require [doo.runner :refer-macros [doo-tests]] [kintone-client.app-test] [kintone-client.authentication-test] [kintone-client.connection-test] [kintone-client.record-test] [kintone-client.url-test] [kintone-client.user-test...
1bdfd403fae5458d1df1955e28969d217879aaaafa7b9a435c014aa9166f28cf
haskell-tools/haskell-tools
PatternSynonym.hs
{-# LANGUAGE PatternSynonyms, ViewPatterns #-} module Decl.PatternSynonym where data Type = App String [Type] pattern Arrow :: Type -> Type -> Type pattern Arrow t1 t2 = App "->" [t1, t2] pattern Int <- App "Int" [] pattern Maybe t <- App "Maybe" [t] where Maybe (App "()" []) = App "Bool" [] ...
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/refactor/examples/Decl/PatternSynonym.hs
haskell
# LANGUAGE PatternSynonyms, ViewPatterns # ---- this is not supported yet pattern Head :: e -> a e0 pattern Tail :: a e -> a e pattern Head h = h:_ pattern Tail t = _:t
module Decl.PatternSynonym where data Type = App String [Type] pattern Arrow :: Type -> Type -> Type pattern Arrow t1 t2 = App "->" [t1, t2] pattern Int <- App "Int" [] pattern Maybe t <- App "Maybe" [t] where Maybe (App "()" []) = App "Bool" [] Maybe t = App "Maybe" [t] pattern (:<) ::...
71af70b449b3e897d89f170355137a554847e400640ed987b1ffe6c1378fc9ea
z0w0/helm
Keyboard.hs
-- | Contains subscriptions to events from the keyboard. module Helm.Keyboard ( -- * Types Key(..) -- * Subscriptions , presses , downs , ups ) where import FRP.Elerea.Param (input, snapshot) import Helm.Engine (Engine(..), Sub(..), Key(..)) -- | Subscribe to keyboard press events and map to a ...
null
https://raw.githubusercontent.com/z0w0/helm/e2d8745d573c8b775aa390b70c597722ec102e48/src/Helm/Keyboard.hs
haskell
| Contains subscriptions to events from the keyboard. * Types * Subscriptions | Subscribe to keyboard press events and map to a game action. A key press event is produced whenever a key is either released or continously held down. ^ The function to map the key pressed to an action. ^ The mapped subscription. |...
module Helm.Keyboard ( Key(..) , presses , downs , ups ) where import FRP.Elerea.Param (input, snapshot) import Helm.Engine (Engine(..), Sub(..), Key(..)) presses :: Engine e presses f = Sub $ do engine <- input >>= snapshot fmap (fmap f) <$> keyboardPressSignal engine downs :: Engine e downs...
9855a4230eb70308e9442f75522f91286fff9705f1d60248267bcd296461f9fe
bmillwood/haskell-src-meta
Hs.hs
-- | Eat your face! module Language.Haskell.Meta.QQ.Hs (hs, pat) where import Language.Haskell.Meta (parseExp, parsePat) import Language.Haskell.Meta.Utils (pretty) import Language.Haskell.TH.Lib import Language.Haskell.TH.Quote import Language.Haskell.TH.Syntax -- | > ghci > [ $ hs|\x - > ( x , x)| ] 42 -- > (4...
null
https://raw.githubusercontent.com/bmillwood/haskell-src-meta/7b2c8167d751d433fe3532b30ebd211e43dbff89/examples/Hs.hs
haskell
| Eat your face! | > (42,42)
module Language.Haskell.Meta.QQ.Hs (hs, pat) where import Language.Haskell.Meta (parseExp, parsePat) import Language.Haskell.Meta.Utils (pretty) import Language.Haskell.TH.Lib import Language.Haskell.TH.Quote import Language.Haskell.TH.Syntax > ghci > [ $ hs|\x - > ( x , x)| ] 42 > ghci > ( \[$hs|a@(x,_)| ] - ...
fdebf0059f9efa9c473936b0f117e8ea8cf4b9072c7ad2dd62cc21a329213f87
skynet-gh/skylobby
uikeys.clj
(ns spring-lobby.spring.uikeys (:require [clojail.core :as clojail] [clojure.java.io :as io] [clojure.string :as string] [instaparse.core :as instaparse] [taoensso.timbre :as log])) (set! *warn-on-reflection* true) (def uikeys-grammar (instaparse/parser "uikeys = line* <line> = (bin...
null
https://raw.githubusercontent.com/skynet-gh/skylobby/0592644653bc4edf221c543d2ba0a9d316087c6e/src/clj/spring_lobby/spring/uikeys.clj
clojure
(ns spring-lobby.spring.uikeys (:require [clojail.core :as clojail] [clojure.java.io :as io] [clojure.string :as string] [instaparse.core :as instaparse] [taoensso.timbre :as log])) (set! *warn-on-reflection* true) (def uikeys-grammar (instaparse/parser "uikeys = line* <line> = (bin...
115c1d9497a0507babe0fdfee64cc20bed4651371b4514c039dbb07bb776281c
tsloughter/kuberl
kuberl_v1beta1_volume_error.erl
-module(kuberl_v1beta1_volume_error). -export([encode/1]). -export_type([kuberl_v1beta1_volume_error/0]). -type kuberl_v1beta1_volume_error() :: #{ 'message' => binary(), 'time' => kuberl_date_time:kuberl_date_time() }. encode(#{ 'message' := Message, 'time' := Time }) -> #{ 'm...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1beta1_volume_error.erl
erlang
-module(kuberl_v1beta1_volume_error). -export([encode/1]). -export_type([kuberl_v1beta1_volume_error/0]). -type kuberl_v1beta1_volume_error() :: #{ 'message' => binary(), 'time' => kuberl_date_time:kuberl_date_time() }. encode(#{ 'message' := Message, 'time' := Time }) -> #{ 'm...
65a6e7dfb3340446cca459db74cfa79d14b2ed9a49b8f12052c0f695d248fc48
ptigwe/hs2048
Logic.hs
{-# LANGUAGE MultiWayIf #-} # LANGUAGE RecordWildCards # module Logic where import Data.Maybe import GameModel import InputModel import Miso import System.Random import Touch groupedByTwo :: Eq a => [a] -> [[a]] groupedByTwo [x] = [[x]] groupedByTwo [x, y] = if x == y then [[x, y]] else [[x], [y]] groupedB...
null
https://raw.githubusercontent.com/ptigwe/hs2048/ef5fa82e7f91ca7bd1468844d25c8e294edff7c1/src/Logic.hs
haskell
# LANGUAGE MultiWayIf #
# LANGUAGE RecordWildCards # module Logic where import Data.Maybe import GameModel import InputModel import Miso import System.Random import Touch groupedByTwo :: Eq a => [a] -> [[a]] groupedByTwo [x] = [[x]] groupedByTwo [x, y] = if x == y then [[x, y]] else [[x], [y]] groupedByTwo (x:y:xs) = if x == y ...
2ae76131a8ff549dbe2db72931894d13d09c90ff7615bee1a93049f0d19d4e9b
titola/incudine
package.lisp
(defpackage :snd (:use :cl) (:shadow #:eval #:load) (:export #:*program-name* #:*program-args* #:snd-error #:run #:eval #:load #:exit #:flush-stream #:close-stream #:emacs-mode-p #:enable-sharp-s7-syntax)) (in-package :snd) (defvar *program-name* "snd" "Snd command line program name.") (...
null
https://raw.githubusercontent.com/titola/incudine/325174a54a540f4daa67bcbb29780073c35b7b80/contrib/cl-snd/package.lisp
lisp
(defpackage :snd (:use :cl) (:shadow #:eval #:load) (:export #:*program-name* #:*program-args* #:snd-error #:run #:eval #:load #:exit #:flush-stream #:close-stream #:emacs-mode-p #:enable-sharp-s7-syntax)) (in-package :snd) (defvar *program-name* "snd" "Snd command line program name.") (...
c99df5c11bd9b441b754aa83d0d4740aae1cdf84eca672f4ab5aa800e0996367
Opetushallitus/ataru
base_education_module_2nd.cljc
(ns ataru.component-data.base-education-module-2nd (:require [ataru.util :as util] [ataru.translations.texts :refer [base-education-2nd-module-texts general-texts]] [ataru.component-data.component :as component :refer [harkinnanvaraisuus-wrapper-id]] [clojure.core.match :refer [mat...
null
https://raw.githubusercontent.com/Opetushallitus/ataru/158c88cc20a8f9689aa1d432030e041bc0ababac/src/cljc/ataru/component_data/base_education_module_2nd.cljc
clojure
(ns ataru.component-data.base-education-module-2nd (:require [ataru.util :as util] [ataru.translations.texts :refer [base-education-2nd-module-texts general-texts]] [ataru.component-data.component :as component :refer [harkinnanvaraisuus-wrapper-id]] [clojure.core.match :refer [mat...
e5af127fba1dadc3730034a1492eed1cb7c2a938257924db1b76d0df44ef331b
mfoemmel/erlang-otp
megaco_test_generic_transport.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2007 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/megaco/test/megaco_test_generic_transport.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2007 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(megaco_test_generic_transport). ...
62c5e2b1bd35acc50fea4050ce7889112c7a5de7d7a6e8f0fe49e2aeed7d0cb3
well-typed-lightbulbs/ocaml-esp32
clflags.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/utils/clflags.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the module Int_arg_helper = Arg_helper.Make (struct module Key = struct include Numbers.Int let of...
1be37df00169812c091eb9fa6ef0f6aa34656385a926909ccd0794394ba2b417
KaroshiBee/weevil
dap.ml
(* main module for everything to do with messages/event enums/command enums *) module Commands = Dap_commands module Events = Dap_events module Js_msg = Dap_js_msg module Config = Dap_config module Launch_mode = Dap_launch_mode module Header = Dap_header module Data = Dap_messages.Data module Request = Dap_request modu...
null
https://raw.githubusercontent.com/KaroshiBee/weevil/1b166ba053062498c1ec05c885e04fba4ae7d831/lib/dapper/dap.ml
ocaml
main module for everything to do with messages/event enums/command enums
module Commands = Dap_commands module Events = Dap_events module Js_msg = Dap_js_msg module Config = Dap_config module Launch_mode = Dap_launch_mode module Header = Dap_header module Data = Dap_messages.Data module Request = Dap_request module Response = Dap_response module Event = Dap_event TODO use tezos error plum...
603bc39d54ad0b2310451c06962510a49303292c41b4bbfd4483b9d55dbac6a7
cdsmith/HMock
Multiplicity.hs
# LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # module Multiplicity where import Test.HMock import Test.Hspec import Test.QuickCheck hiding (once) instance Arbitrary Multiplicity where arbitrary = between <$> (fromInteger <$> arbitrary) <*> (fromInteger . getNonNegative <$> arbitrary) g...
null
https://raw.githubusercontent.com/cdsmith/HMock/5826b4bfab1cda6a68d6029cd16d927319a1ce2e/test/Multiplicity.hs
haskell
# LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # module Multiplicity where import Test.HMock import Test.Hspec import Test.QuickCheck hiding (once) instance Arbitrary Multiplicity where arbitrary = between <$> (fromInteger <$> arbitrary) <*> (fromInteger . getNonNegative <$> arbitrary) g...
44d4dace6df6ebd85b86b07e4cf8f4deffc88d43dc0d7925ddfb3db0d5ab8da7
camlp5/camlp5
pretty.ml
(* camlp5r *) (* pretty.ml,v *) Copyright ( c ) INRIA 2007 - 2017 (* #load "pa_macro.cmo" *) open Versdep;; exception GiveUp;; let line_length = ref 78;; let horiz_ctx = ref false;; let utf8_string_length s = let rec loop i len = if i = String.length s then len else let c = Char.code s.[i] in ...
null
https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/ocaml_src/lib/pretty.ml
ocaml
camlp5r pretty.ml,v #load "pa_macro.cmo"
Copyright ( c ) INRIA 2007 - 2017 open Versdep;; exception GiveUp;; let line_length = ref 78;; let horiz_ctx = ref false;; let utf8_string_length s = let rec loop i len = if i = String.length s then len else let c = Char.code s.[i] in if c < 0b1000_0000 || c >= 0b1100_0000 then loop (i + 1)...
ee713b0b5f39dbf94b4dff17c16d072d336735912335bd1841eac7a6f3b982df
radian-software/kalyn
Boilerplate.hs
module Boilerplate ( addProgramBoilerplate ) where import Data.List import qualified Data.Set as Set import Assembly addFnBoilerplate :: PhysicalFunction -> PhysicalFunction addFnBoilerplate (Function stackSpace name instrs) = let clobberedRegs = nub $...
null
https://raw.githubusercontent.com/radian-software/kalyn/03d279eee4cf73cd355ed7a13c46340fbb15540b/src/Boilerplate.hs
haskell
module Boilerplate ( addProgramBoilerplate ) where import Data.List import qualified Data.Set as Set import Assembly addFnBoilerplate :: PhysicalFunction -> PhysicalFunction addFnBoilerplate (Function stackSpace name instrs) = let clobberedRegs = nub $...
68b09924fb812e76aa2fe7acca27b1af085d9997260e500e41a08a235b28d1da
funcool/buddy-core
certificates_tests.clj
Copyright 2014 - 2015 < > ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -2.0 ;; ;; Unless required by applicable law or agreed to in writing, software distributed un...
null
https://raw.githubusercontent.com/funcool/buddy-core/bd31ff9b802e689b046afae0f8c29ed70bb15ab5/test/buddy/core/certificates_tests.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright 2014 - 2015 < > Licensed under the Apache License , Version 2.0 ( the " License " ) distributed under the License is distributed on an " AS IS " BASIS , (ns buddy.core.certificates-tests (:require [clojure.test :refer :all] [buddy.core.codecs :refer :all] [buddy.core.nonce ...
319f65756fca5d0ab6bfab8588149ba6ff4f255d6f6f0b5782a73d4024a5949a
microsoft/SLAyer
SYMBOLIC_HEAP.ml
Copyright ( c ) Microsoft Corporation . All rights reserved . * Signatures describing formulas open Library open Variable open Expression (*TERM========================================================================*) (** Common interface of formulas *) module type TERM = sig type t val fv : t -> Vars...
null
https://raw.githubusercontent.com/microsoft/SLAyer/6f46f6999c18f415bc368b43b5ba3eb54f0b1c04/src/SYMBOLIC_HEAP.ml
ocaml
TERM======================================================================== * Common interface of formulas * set of free variables * map over subexpressions * fold over all expressions and their subexpressions * comparison * equality * human-readable presentation * human-readable presentation using a variable f...
Copyright ( c ) Microsoft Corporation . All rights reserved . * Signatures describing formulas open Library open Variable open Expression module type TERM = sig type t val fv : t -> Vars.t val map_exps : (Exp.t -> Exp.t) -> t -> t val fold_exps : (Exp.t -> 'a -> 'a) -> t -> 'a -> 'a val compar...
de3b67dc0980eb057c733b55a58f03ff2b78f892f348cec688232c50733b21c9
kana/sicp
ex-3.1.scm
Exercise 3.1 . An accumulator is a procedure that is called repeatedly with ;;; a single numeric argument and accumulates its arguments into a sum. Each ;;; time it is called, it returns the currently accumulated sum. Write ;;; a procedure make-accumulator that generates accumulators, each maintaining ;;; an i...
null
https://raw.githubusercontent.com/kana/sicp/912bda4276995492ffc2ec971618316701e196f6/ex-3.1.scm
scheme
a single numeric argument and accumulates its arguments into a sum. Each time it is called, it returns the currently accumulated sum. Write a procedure make-accumulator that generates accumulators, each maintaining an independent sum. The input to make-accumulator should specify the initial value of the sum; f...
Exercise 3.1 . An accumulator is a procedure that is called repeatedly with ( define A ( make - accumulator 5 ) ) ( A 10 ) 15 ( A 10 ) 25 (define (make-accumulator sum) (lambda (n) (set! sum (+ sum n)) sum)) (define A1 (make-accumulator 10)) (define A2 (make-accumulator 3)) ...
307bb20f601f216f5c57626f79379a5a8cd0cc0798d24b3b205f4a562b5878c4
ninenines/asciideck
asciideck_to_manpage.erl
Copyright ( c ) 2016 - 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 DISC...
null
https://raw.githubusercontent.com/ninenines/asciideck/73a2e67e709c38930580a80238e308397472c47d/src/asciideck_to_manpage.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 ) 2016 - 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 The documentation section 4.1 has a pretty good -m...
0c6810ea74a9ab11ff5e9dca4a9ef3f81871bbc634b28ea015568a4a7cb1bcbc
haskell/haskell-ide-engine
CodeActions.hs
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} # LANGUAGE DuplicateRecordFields # # LANGUAGE OverloadedStrings # {-# LANGUAGE FlexibleContexts #-} module Haskell.Ide.Engine.CodeActions where import Control.Lens import Control.Monad.Reader import qualified Data.Aeson as J import...
null
https://raw.githubusercontent.com/haskell/haskell-ide-engine/d84b84322ccac81bf4963983d55cc4e6e98ad418/src/Haskell/Ide/Engine/CodeActions.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # TODO: make context specific commands for all sorts of things, such as refactorings
# LANGUAGE DuplicateRecordFields # # LANGUAGE OverloadedStrings # module Haskell.Ide.Engine.CodeActions where import Control.Lens import Control.Monad.Reader import qualified Data.Aeson as J import Data.Maybe import Data.Foldable import qualified GHC.Generics as G import Haskell.Ide.Engine.Reactor import Haskell....
6b152e0948a527a7d8c5ce152c53e34e68d7a788b3b564913a90eb220c14152b
vyzo/gerbil
srfi-121.scm
;; Chibi Scheme versions of any and every (define (any pred ls) (if (null? (cdr ls)) (pred (car ls)) ((lambda (x) (if x x (any pred (cdr ls)))) (pred (car ls))))) (define (every pred ls) (if (null? (cdr ls)) (pred (car ls)) (if (pred (car ls)) (every pred (cdr ls)) #f))) ;; generator (define (g...
null
https://raw.githubusercontent.com/vyzo/gerbil/17fbcb95a8302c0de3f88380be1a3eb6fe891b95/src/std/srfi/srfi-121.scm
scheme
Chibi Scheme versions of any and every generator make-iota-generator make-iota make-range-generator make-coroutine-generator void? or yield again? list->generator vector->generator reverse-vector->generator string->generator bytevector->generator make-for-each-generator FIXME: seems to fail test make-unfo...
(define (any pred ls) (if (null? (cdr ls)) (pred (car ls)) ((lambda (x) (if x x (any pred (cdr ls)))) (pred (car ls))))) (define (every pred ls) (if (null? (cdr ls)) (pred (car ls)) (if (pred (car ls)) (every pred (cdr ls)) #f))) (define (generator . args) (lambda () (if (null? args) ...
d42cc86d002d4f20e3a35240ddb1dd2d6f85415b7d3a7a4970a2735f00e23120
Failproofshark/cl-sdl2-ttf
autowrap.lisp
(in-package :sdl2-ffi) (autowrap:c-include '(sdl2-ttf autowrap-spec "SDL2_ttf.h") :function-package :sdl2-ffi.functions :spec-path '(sdl2-ttf autowrap-spec) :exclude-sources ("/usr/include/") :include-sources ("SDL_ttf.h") ...
null
https://raw.githubusercontent.com/Failproofshark/cl-sdl2-ttf/ff2821a2787cb527ca643a0dbca6ab2171ce141d/src/autowrap.lisp
lisp
We're mostly dealing with SDL-surface which contains accessors in the main cl-sdl2 library
(in-package :sdl2-ffi) (autowrap:c-include '(sdl2-ttf autowrap-spec "SDL2_ttf.h") :function-package :sdl2-ffi.functions :spec-path '(sdl2-ttf autowrap-spec) :exclude-sources ("/usr/include/") :include-sources ("SDL_ttf.h") ...