_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
1f4e6e8f73800e8b80b2b1f4cd83a791bc083b9a7eead45fe3f4b485b5768c2d
QuickChick/TestingNoninterference
Util.hs
module Util where import Control.Arrow import Control.Monad import Data.List import System.Random import Test.QuickCheck.Gen import Test.QuickCheck import Data.IORef > ) : : Bool - > Bool p --> q = not p || q infixr 1 --> int :: (Num a, Random a) => Gen a int = choose (-10,10) upfrom :: (Num a, Random a) => a ->...
null
https://raw.githubusercontent.com/QuickChick/TestingNoninterference/29cc71ec6aa734e84b4087556ddf8d5555cf8819/common/Util.hs
haskell
> q = not p || q > # INLINE isIndex #
module Util where import Control.Arrow import Control.Monad import Data.List import System.Random import Test.QuickCheck.Gen import Test.QuickCheck import Data.IORef > ) : : Bool - > Bool int :: (Num a, Random a) => Gen a int = choose (-10,10) upfrom :: (Num a, Random a) => a -> a -> Gen a n `upfrom` low = choos...
4a9aeda57079d76d34d58f98da6a67c7351bd7aa67bdb64a47962b3cf73bbad8
sadiqj/ocaml-esp32
topmain.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/toplevel/topmain.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 open Clflags open Compenv let usage = "Usage: ocaml <options> <object-files> [script-file [arguments]]\n...
9258fbfe8062ff622f7ab794141c77bdf22e2fa2407938b0efa74ab271b97794
NetComposer/nkmedia
nkmedia_fs_event_protocol.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2016 . All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the...
null
https://raw.githubusercontent.com/NetComposer/nkmedia/24480866a523bfd6490abfe90ea46c6130ffe51f/src/fs_backend/nkmedia_fs_event_protocol.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2016 . 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 -module(nkmedia_fs_event_pro...
ed5f7074ff1c81a123e1a58b404504dbd09149c59a44701bebaa15cd87eaf4e0
cirodrig/triolet
Sequence.hs
# LANGUAGE GADTs , TypeFamilies , RankNTypes , ScopedTypeVariables # module Triolet.Sequence where ------------------------------------------------------------------------------- -- Sequences data Seq a = forall s. Seq s (s -> SeqStep s a) data SeqStep s a = Yield s a | Skip s | Done peel_Seq :: Seq a -> Maybe (a,...
null
https://raw.githubusercontent.com/cirodrig/triolet/e515a1dc0d6b3e546320eac7b71fb36cea5b53d0/doc/spec/Triolet/Sequence.hs
haskell
----------------------------------------------------------------------------- Sequences # INLINE fold_Seq #
# LANGUAGE GADTs , TypeFamilies , RankNTypes , ScopedTypeVariables # module Triolet.Sequence where data Seq a = forall s. Seq s (s -> SeqStep s a) data SeqStep s a = Yield s a | Skip s | Done peel_Seq :: Seq a -> Maybe (a, Seq a) peel_Seq (Seq s g) = peel s where peel s = case g s of Yield s' x -...
141d369db83bee24da0df0ba34b850e8e31d8c5f6e41971a3a9d26d0536cdf00
MinaProtocol/mina
tests.ml
module Backend = Kimchi_pasta.Vesta_based_plonk module Impl = Pickles.Impls.Step module Field = Impl.Field (* function to check a circuit defined by a 'main' function *) let keygen_prove_verify (main : ?w:'a -> 'b -> unit -> unit) input_typ ?priv pub = let kp = Impl.constraint_system ~input_typ ~return...
null
https://raw.githubusercontent.com/MinaProtocol/mina/04b85f369ee4013ca6278d41842381cafbeb26c1/src/lib/snarky_js_bindings/tests/tests.ml
ocaml
function to check a circuit defined by a 'main' function TODO: make work for larger arbitrary pub spec
module Backend = Kimchi_pasta.Vesta_based_plonk module Impl = Pickles.Impls.Step module Field = Impl.Field let keygen_prove_verify (main : ?w:'a -> 'b -> unit -> unit) input_typ ?priv pub = let kp = Impl.constraint_system ~input_typ ~return_typ:(Snarky_backendless.Typ.unit ()) (main ?w:None) ...
b0477aa217b82149900acffc50b60698d31088d2f060a0ddfde408e037b3d689
returntocorp/semgrep
il_ruby_helpers.ml
open Utils_ruby open Il_ruby type pos2 = Parse_info.t let uniq_counter = ref 0 let uniq () = incr uniq_counter; !uniq_counter let mkstmt snode pos = { snode; pos; lexical_locals = Utils_ruby.StrSet.empty; preds = Set_.empty; succs = Set_.empty; sid = uniq (); } let update_stmt stmt ...
null
https://raw.githubusercontent.com/returntocorp/semgrep/00f1e67bbb80f00e29db3381288fc00398b6868a/languages/ruby/dyp/il_ruby_helpers.ml
ocaml
handle CB These can't actually appear in a method these start a new scope these start a new scope
open Utils_ruby open Il_ruby type pos2 = Parse_info.t let uniq_counter = ref 0 let uniq () = incr uniq_counter; !uniq_counter let mkstmt snode pos = { snode; pos; lexical_locals = Utils_ruby.StrSet.empty; preds = Set_.empty; succs = Set_.empty; sid = uniq (); } let update_stmt stmt ...
200b2155449829779d9de5c30fd8aa29f67122814725819187760b3bb4ed7372
evrim/core-server
crud.lisp
(defpackage :crud (:use :cl :core-server :arnesi)) (in-package :crud) (defclass+ crud-application (http-application database) () (:metaclass http-application+) (:default-initargs :auto-start t)) (defclass+ user () ((username :host both) (email :host both) (password :host local))) (defcrud user) (de...
null
https://raw.githubusercontent.com/evrim/core-server/200ea8151d2f8d81b593d605b183a9cddae1e82d/examples/crud.lisp
lisp
call/cc :: JSComponent -> ------------------------------------------------------------------------- Javascript call/cc: (f &rest args) -> (apply #'f (append args (list k))) ------------------------------------------------------------------------- CRUD> (js (defun manual-continuation () (k 3)) (with-call/...
(defpackage :crud (:use :cl :core-server :arnesi)) (in-package :crud) (defclass+ crud-application (http-application database) () (:metaclass http-application+) (:default-initargs :auto-start t)) (defclass+ user () ((username :host both) (email :host both) (password :host local))) (defcrud user) (de...
48dff2390dd63790d76d77671dce08c28c89de024311016d8ab359a0cf64c957
jaspervdj/blaze-html-hexpat
Hexpat.hs
-- | Renderer that supports rendering to expat forests -- -- Warning: because this renderer doesn't directly create the output, but rather -- an XML tree representation, it is impossible to render pre-escaped text. This means that @preEscapedString@ will produce the same output as @string@. This -- also applies to th...
null
https://raw.githubusercontent.com/jaspervdj/blaze-html-hexpat/9330570e29031a16b39468b861f841860a740e8a/Text/Blaze/Renderer/Hexpat.hs
haskell
| Renderer that supports rendering to expat forests Warning: because this renderer doesn't directly create the output, but rather an XML tree representation, it is impossible to render pre-escaped text. This also applies to the functions @preEscapedText@, @preEscapedTextValue@... | Type used as list of nodes |...
means that @preEscapedString@ will produce the same output as @string@. This module Text.Blaze.Renderer.Hexpat ( Forest , renderHtml ) where import Data.ByteString (ByteString) import qualified Data.ByteString as SB import qualified Data.Text as T import qualified Data.Text.Encoding as T (encodeUtf8) imp...
06689c9d1268132d58dc861f9a895074c18a6e48d3a3b2e9b61954e719df33ca
Bannerets/camlproto
TransportTcpFullCaml.ml
open! Base module Math = Math.Make(PlatformCaml) module Crypto = Math.Crypto let src = Logs.Src.create "camlproto.transport.tcp_full.caml" module Log = (val Logs.src_log src : Logs.LOG) type t = { input : Lwt_io.input_channel; output : Lwt_io.output_channel; mutable seq_no_send : int; mutable seq_no_receive ...
null
https://raw.githubusercontent.com/Bannerets/camlproto/de41d876e00d69598dd20ca8953eda17ce999332/src/transport/tcp_full_caml/TransportTcpFullCaml.ml
ocaml
tcp_full packet structure: * +----+----+----...----+----+ * |len.|seq.| payload |crc.| * +----+----+----...----+----+ TODO: Reuse cstruct or use bytes? without checksum
open! Base module Math = Math.Make(PlatformCaml) module Crypto = Math.Crypto let src = Logs.Src.create "camlproto.transport.tcp_full.caml" module Log = (val Logs.src_log src : Logs.LOG) type t = { input : Lwt_io.input_channel; output : Lwt_io.output_channel; mutable seq_no_send : int; mutable seq_no_receive ...
5d108786ebb216665efba0005b13c3ca66c6059b28fcb78a67a4473c4c344167
apache/couchdb-rebar
rebar_config.erl
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- %% ex: ts=4 sw=4 et %% ------------------------------------------------------------------- %% rebar : Erlang Build Tools %% Copyright ( c ) 2009 ( ) %% %% Permission is hereby granted, free of charge, to any person obtaining a copy %% of this softw...
null
https://raw.githubusercontent.com/apache/couchdb-rebar/8578221c20d0caa3deb724e5622a924045ffa8bf/src/rebar_config.erl
erlang
ex: ts=4 sw=4 et ------------------------------------------------------------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sel...
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- rebar : Erlang Build Tools Copyright ( c ) 2009 ( ) in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the...
ff6477cfb55e795f0eab622c91ffa3a3ea693509b25b89eab610e0c23a593955
lpgauth/fast_disk_log
fast_disk_log_utils.erl
-module(fast_disk_log_utils). -include("fast_disk_log.hrl"). -export([ env/2, error_msg/2, lookup/3, random/1, warning_msg/2 ]). %% public -spec env(atom(), term()) -> term(). env(Key, Default) -> application:get_env(?APP, Key, Default). -spec error_msg(string(), [term()]) -> ok. error_msg(...
null
https://raw.githubusercontent.com/lpgauth/fast_disk_log/ce781aafadba416e187108aaa51d1bc0024dbf53/src/fast_disk_log_utils.erl
erlang
public
-module(fast_disk_log_utils). -include("fast_disk_log.hrl"). -export([ env/2, error_msg/2, lookup/3, random/1, warning_msg/2 ]). -spec env(atom(), term()) -> term(). env(Key, Default) -> application:get_env(?APP, Key, Default). -spec error_msg(string(), [term()]) -> ok. error_msg(Format, Da...
55b1b7ecc2490b8650ebabb623d6764b5852dd784df9a8b3e37c75bb541d89f0
eslick/cl-registry
utils.lisp
(in-package :registry) (registry-proclamations) ;; ;; Various helpful utilities ;; (defun get-object (id) (elephant::controller-recreate-instance *store-controller* id)) (defmacro assert-body-type (type &body body) (with-gensyms (value) `(let ((,value (progn ,@body))) (assert (eq (type-of ,value) ,ty...
null
https://raw.githubusercontent.com/eslick/cl-registry/d4015c400dc6abf0eeaf908ed9056aac956eee82/src/libs/utils.lisp
lisp
Various helpful utilities ))) Little list utilities (used in group.lisp) Shadow with html to allow *dev Some rendering aids avoid mixed char syms Efficient database ops Special rendering support The name could be better, and this should probably be someplace else. Random crap
(in-package :registry) (registry-proclamations) (defun get-object (id) (elephant::controller-recreate-instance *store-controller* id)) (defmacro assert-body-type (type &body body) (with-gensyms (value) `(let ((,value (progn ,@body))) (assert (eq (type-of ,value) ,type)) ,value))) Find a nat...
f32d55b30978218ffd2e4bf9e97e68fd0d68589aceff7c9814cbf653d8104739
mejgun/haskell-tdlib
SearchCallMessages.hs
{-# LANGUAGE OverloadedStrings #-} -- | module TD.Query.SearchCallMessages where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U -- | Searches for call messages . Returns the results in reverse chronological order ( i.e. , in order of decreasing message_id ) . Fo...
null
https://raw.githubusercontent.com/mejgun/haskell-tdlib/dc380d18d49eaadc386a81dc98af2ce00f8797c2/src/TD/Query/SearchCallMessages.hs
haskell
# LANGUAGE OverloadedStrings # | | | Pass true to search only for messages with missed/declined calls
module TD.Query.SearchCallMessages where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U Searches for call messages . Returns the results in reverse chronological order ( i.e. , in order of decreasing message_id ) . For optimal performance , the number of returne...
f5ff82ee74d138cc6a2665fc3f3f7c9b3bd7b8e76dac793d53ca7b67358caf5d
paurkedal/ocaml-caqti
driver_loader.ml
Copyright ( C ) 2022 < > * * This library is free software ; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or ( at your * option ) any later version , with the ...
null
https://raw.githubusercontent.com/paurkedal/ocaml-caqti/f8b7a1c2bde2013d24ffc0b104f4af6e5f01480b/caqti/lib-platform-unix/driver_loader.ml
ocaml
Copyright ( C ) 2022 < > * * This library is free software ; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or ( at your * option ) any later version , with the ...
c76265259fb6a83f057a9329db4bf721ab1c2c9cc6700448536af2ce01988cb6
sondresl/AdventOfCode
Day16.hs
# LANGUAGE DeriveFunctor # module Day16 where import Data.Bits import Data.Bool import Data.Map (Map, (!)) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import qualified Data.Vector as V import Text.ParserCombinators.Parsec import Control.Monad.State import Data.List (foldl') ...
null
https://raw.githubusercontent.com/sondresl/AdventOfCode/51525441795417f31b3eb67a690aa5534d1e699b/2018/Haskell/src/Day16.hs
haskell
# LANGUAGE DeriveFunctor # module Day16 where import Data.Bits import Data.Bool import Data.Map (Map, (!)) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import qualified Data.Vector as V import Text.ParserCombinators.Parsec import Control.Monad.State import Data.List (foldl') ...
73c6f148ddaeb3348d2fc1aa655d785bb4390e82ab3292419be81c6864d3e885
Opetushallitus/ataru
tutu_payment_view.cljs
(ns ataru.virkailija.application.tutu-payment.tutu-payment-view (:require [re-frame.core :refer [subscribe dispatch]] [cljs-time.format :as format] [clojure.string :as string] [ataru.virkailija.application.tutu-payment.tutu-payment-handlers] [ataru.virkailija.applicatio...
null
https://raw.githubusercontent.com/Opetushallitus/ataru/4f1f156d14625631971b3ae92be62129da702c01/src/cljs/ataru/virkailija/application/tutu_payment/tutu_payment_view.cljs
clojure
(ns ataru.virkailija.application.tutu-payment.tutu-payment-view (:require [re-frame.core :refer [subscribe dispatch]] [cljs-time.format :as format] [clojure.string :as string] [ataru.virkailija.application.tutu-payment.tutu-payment-handlers] [ataru.virkailija.applicatio...
6a24512c8d24f050d909e05f2be5ec2a5319c6eb044bd7b6dafbc9e56c554664
Clojure2D/clojure2d-examples
lsystem_8_9.clj
(ns examples.NOC.ch08.lsystem-8-9 (:require [clojure2d.core :refer :all] [fastmath.core :as m] [fastmath.vector :as v])) (def ^:const ^int s 600) (def cnvs (canvas s s :highest)) (defn make-generator "Apply rules to the string" [rules] (fn [^String s] (reduce #(str %1 (or (rules %...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/NOC/ch08/lsystem_8_9.clj
clojure
(ns examples.NOC.ch08.lsystem-8-9 (:require [clojure2d.core :refer :all] [fastmath.core :as m] [fastmath.vector :as v])) (def ^:const ^int s 600) (def cnvs (canvas s s :highest)) (defn make-generator "Apply rules to the string" [rules] (fn [^String s] (reduce #(str %1 (or (rules %...
4a8c95a9be7864bd8d191f94dd636d027f0600b343992890d5604a616ec2c14d
kindista/kindista
email-verification.lisp
Copyright 2013 - 2016 CommonGoods Network , Inc. ;;; This file is part of Kindista . ;;; Kindista is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ;;; (at you...
null
https://raw.githubusercontent.com/kindista/kindista/60da1325e628841721200aa00e4de5f9687c0adb/src/email/email-verification.lisp
lisp
(at your option) any later version. without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
Copyright 2013 - 2016 CommonGoods Network , Inc. This file is part of Kindista . Kindista is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or Kindista is distr...
a117ad630b1ffad52104634063d970296a3080f7a6575e535e457ca9eaa11d09
rbkmoney/hellgate
hg_client_customer.erl
-module(hg_client_customer). -include_lib("damsel/include/dmsl_payment_processing_thrift.hrl"). %% API -export([start/1]). -export([start_link/1]). -export([stop/1]). -export([create/2]). -export([get/2]). -export([get/3]). -export([delete/2]). -export([start_binding/3]). -export([pull_event/2]). -export([pull_eve...
null
https://raw.githubusercontent.com/rbkmoney/hellgate/454939c7f20679daefb8838988fb65da2310ef78/apps/hg_client/src/hg_client_customer.erl
erlang
API Types API FIXME: infinity sounds dangerous
-module(hg_client_customer). -include_lib("damsel/include/dmsl_payment_processing_thrift.hrl"). -export([start/1]). -export([start_link/1]). -export([stop/1]). -export([create/2]). -export([get/2]). -export([get/3]). -export([delete/2]). -export([start_binding/3]). -export([pull_event/2]). -export([pull_event/3])....
7d52f26f0630479f06075bdacf4917046426df49c8cc55b3db044be75c938789
lpsmith/postgresql-simple
Ok.hs
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE CPP #-} ------------------------------------------------------------------------------ -- | -- Module : Database.PostgreSQL.Simple.Ok Copyright : ( c ) 2012 - 2015 -- License : BSD3 -- -- Maintainer...
null
https://raw.githubusercontent.com/lpsmith/postgresql-simple/ce9def5019c2a6f8b93d3e3478587f33993bba56/src/Database/PostgreSQL/Simple/Ok.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveFunctor # # LANGUAGE CPP # ---------------------------------------------------------------------------- | Module : Database.PostgreSQL.Simple.Ok License : BSD3 Maintainer : Stability : experimental The 'Ok' type is a simple er...
Copyright : ( c ) 2012 - 2015 One of the primary reasons why this type was introduced is that had not been provided an instance for ' Alternative ' , commonly - used type and included in Extending the failure case to a list of ' SomeException 's enables a ' Errors [ ] ' . Though ' < | > ' ...
2f89ce4614cd8577e55b3f33a508fb968d19775ee88a15843469b4a9d53bb2b2
takikawa/racket-ppa
info.rkt
(module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote ("base" "plot-gui-lib" "draw-lib" "plot-lib" "snip-lib"))) (define build-deps (quote ())) (define pkg-desc "Compatibility library for Plot 5.1.3 and earlier") (define pkg-authors (quote (ntoronto))) (define test-responsible...
null
https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/share/pkgs/plot-compat/info.rkt
racket
(module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote ("base" "plot-gui-lib" "draw-lib" "plot-lib" "snip-lib"))) (define build-deps (quote ())) (define pkg-desc "Compatibility library for Plot 5.1.3 and earlier") (define pkg-authors (quote (ntoronto))) (define test-responsible...
d9ed07f491cdc2d1a222f131448149fec09941d56a2463c0e2c0b5eb4a1659f8
godotclj/godotclj
proto.clj
(ns godotclj.proto) (defprotocol ToFunction (->function [_ ret-type])) (defprotocol ToPointer (->ptr [_])) (defprotocol ToAddress (->address [_])) (defprotocol ToVariant (->variant [_])) (defprotocol ToClojure (->clj [_])) (defprotocol PVariantToObject (pvariant->object [_]))
null
https://raw.githubusercontent.com/godotclj/godotclj/23e9c62e7083f7be9aff8bb205d2a270dd5b5e39/src/clojure/godotclj/proto.clj
clojure
(ns godotclj.proto) (defprotocol ToFunction (->function [_ ret-type])) (defprotocol ToPointer (->ptr [_])) (defprotocol ToAddress (->address [_])) (defprotocol ToVariant (->variant [_])) (defprotocol ToClojure (->clj [_])) (defprotocol PVariantToObject (pvariant->object [_]))
6d287b1dde584953dc874d481a5d7ff6f779deb6b415693787f81d7797d71755
xh4/web-toolkit
os.lisp
;;;; --------------------------------------------------------------------------- ;;;; Access to the Operating System (uiop/package:define-package :uiop/os (:use :uiop/common-lisp :uiop/package :uiop/utility) (:export #:featurep #:os-unix-p #:os-macosx-p #:os-windows-p #:os-genera-p #:detect-os ;; features #:...
null
https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/uiop-3.3.3/os.lisp
lisp
--------------------------------------------------------------------------- Access to the Operating System features environment variables implementation identifier Windows shortcut support Features You may bind *features* with a copy of what your target system offers to test its properties. OS-MACOSX is not mu...
(uiop/package:define-package :uiop/os (:use :uiop/common-lisp :uiop/package :uiop/utility) (:export #:os-cond #:implementation-type #:*implementation-type* #:operating-system #:architecture #:lisp-version-string #:hostname #:getcwd #:chdir #:read-null-terminated-string #:read-little-endian #:pars...
ec3b946b75062d0e80477f85787349b897f01db1c034149e90b9ee9f6a47da3c
lesguillemets/sicp-haskell
2.3.3.1.hs
module ExSets where newtype LSet a = LSet [a] deriving (Show) cons :: a -> LSet a -> LSet a cons x (LSet xs) = LSet (x:xs) fromList :: (Eq a) => [a] -> LSet a fromList [] = LSet [] fromList (x:xs) = adjoinSet x (fromList xs) elemOfSet :: (Eq a) => a -> LSet a -> Bool elemOfSet _ (LSet []) = False elemOfSet el (LSet ...
null
https://raw.githubusercontent.com/lesguillemets/sicp-haskell/df524a1e28c45fb16a56f539cad8babc881d0431/text/chap02/sect3/2.3.3.1.hs
haskell
module ExSets where newtype LSet a = LSet [a] deriving (Show) cons :: a -> LSet a -> LSet a cons x (LSet xs) = LSet (x:xs) fromList :: (Eq a) => [a] -> LSet a fromList [] = LSet [] fromList (x:xs) = adjoinSet x (fromList xs) elemOfSet :: (Eq a) => a -> LSet a -> Bool elemOfSet _ (LSet []) = False elemOfSet el (LSet ...
4dfcbb5a4e0aa408b3cf3ffd9df7648fe90d77d0432a7c68ced049717d0a422d
clojure-interop/google-cloud-clients
ResourceManagerFactory.clj
(ns com.google.cloud.resourcemanager.ResourceManagerFactory "An interface for ResourceManager factories." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.resourcemanager ResourceManagerFactory]))
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.resourcemanager/src/com/google/cloud/resourcemanager/ResourceManagerFactory.clj
clojure
(ns com.google.cloud.resourcemanager.ResourceManagerFactory "An interface for ResourceManager factories." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.resourcemanager ResourceManagerFactory]))
e32d1dc03065720bd469fd152cce7d9d6f4cc620acb10a01007f8de94d7816ab
nuvla/ui
utils_detail.cljs
(ns sixsq.nuvla.ui.apps.utils-detail (:require [sixsq.nuvla.ui.apps-application.utils :as apps-application-utils] [sixsq.nuvla.ui.apps-component.utils :as apps-component-utils] [sixsq.nuvla.ui.apps.spec :as spec] [sixsq.nuvla.ui.apps.utils :as utils])) (defn db->module [module c...
null
https://raw.githubusercontent.com/nuvla/ui/c10704eabd339489722fa53bc99f11f21103c070/code/src/cljs/sixsq/nuvla/ui/apps/utils_detail.cljs
clojure
(ns sixsq.nuvla.ui.apps.utils-detail (:require [sixsq.nuvla.ui.apps-application.utils :as apps-application-utils] [sixsq.nuvla.ui.apps-component.utils :as apps-component-utils] [sixsq.nuvla.ui.apps.spec :as spec] [sixsq.nuvla.ui.apps.utils :as utils])) (defn db->module [module c...
bdccf4359b75e0106ae6e20a92ff05ee50ec982a79d670c81662ccff70325964
thepower/tpnode
mledger.erl
-module(mledger). -include("include/tplog.hrl"). -compile({no_auto_import,[get/1]}). -export([start_db/0,deploy4test/2, put/2,get/1,get_vers/1,hash/1,hashl/1]). -export([bi_create/6,bi_set_ver/2]). -export([bals2patch/1, apply_patch/2]). -export([dbmtfun/3]). -export([mb2item/1]). -export([get_kv/1]). -export([get_kpv/...
null
https://raw.githubusercontent.com/thepower/tpnode/2d68665a2cc4adb990fb15845868dc474e187a23/apps/tpnode/src/mledger.erl
erlang
Path="db/mledger_" ++ atom_to_list(node()) ++ ".db", io:format("BS ~p~n",[BState]), io:format("BS ~p~n",[BState]), io:format("LStore ~p~n",[Patches]), io:format("RH ~p~n",[RH]), io:format("Check hash ~p~n",[NewHash]), Filename="ledger_"++integer_to_list(os:system_time(millisecond))++atom...
-module(mledger). -include("include/tplog.hrl"). -compile({no_auto_import,[get/1]}). -export([start_db/0,deploy4test/2, put/2,get/1,get_vers/1,hash/1,hashl/1]). -export([bi_create/6,bi_set_ver/2]). -export([bals2patch/1, apply_patch/2]). -export([dbmtfun/3]). -export([mb2item/1]). -export([get_kv/1]). -export([get_kpv/...
da40030b513b6ef843aba2b364ea68cc31d602ada53d331bc6245bd18f01aec8
janestreet/memtrace_viewer_with_deps
css_gen.mli
(** A set of functions to generate css declaration lists. This library can be used to programmatically produce strings suitable for the HTML style attribute, e.g. style="display:flex;background-color:red". *) open Core_kernel type css_global_values = [ `Inherit | `Initial ] [@@deriving sexp, compare] modu...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/virtual_dom/css_gen/src/css_gen.mli
ocaml
* A set of functions to generate css declaration lists. This library can be used to programmatically produce strings suitable for the HTML style attribute, e.g. style="display:flex;background-color:red". * [create ~h ~s ~l ~a] creates a color that corresponds to hsla([h],[s],[l],[a]) If [a] is omitte...
open Core_kernel type css_global_values = [ `Inherit | `Initial ] [@@deriving sexp, compare] module Color : sig module RGBA : sig type t [@@deriving sexp, bin_io, compare] * [ create ~r ~g ~b ~a ] creates a color that corresponds to rgba([r],[g],[b],[a ] ) If [ a ] is omitted then it creates a co...
42fe708b6db7eec436ae759668bd85194842e8b2ed69882ed057ca46113f76bc
JacquesCarette/Drasil
TypeDepGen.hs
FIXME : use real parser ( Low Priority ; see line 189 ) | Creates graphs showing the dependency of one type upon another . module TypeDepGen (main) where import Data.List import Data.Maybe import System.IO import System.Directory import System.FilePath (takeDirectory) import Control.Monad import qualified Data.Map...
null
https://raw.githubusercontent.com/JacquesCarette/Drasil/9e843be259838358860a9a8c8ea1f9bd4295a858/code/scripts/TypeDepGen.hs
haskell
Entry data type for storing entry data for each file entry change to entryName? change to entryPath? main controller function; initiates function calls to generate output file directory variables (for scripts, code and output directories) obtains code directory and output directory filepaths gets names + filepat...
FIXME : use real parser ( Low Priority ; see line 189 ) | Creates graphs showing the dependency of one type upon another . module TypeDepGen (main) where import Data.List import Data.Maybe import System.IO import System.Directory import System.FilePath (takeDirectory) import Control.Monad import qualified Data.Map...
6d4fa338851ba19a2a15bc5276db1fd5a7fd20fe0827dfac4f68aa09c58ebc33
erlang-mozjs/erlang-mozjs
js_driver_tests.erl
-module(js_driver_tests). -include_lib("eunit/include/eunit.hrl"). basic_define_test_() -> {setup, fun() -> {ok, Handle} = mozjs_nif:sm_init(8, 8), Handle end, fun(Handle) -> mozjs_nif:sm_stop(Handle) end, fun(Handle) -> [ {"define as binary", ?_assertEqual(ok, js_driver:define_js(Handle, <<"var a = 100;fun...
null
https://raw.githubusercontent.com/erlang-mozjs/erlang-mozjs/95f1ebf3d54569cbd510c61e1e3eab5c848c890d/test/js_driver_tests.erl
erlang
-module(js_driver_tests). -include_lib("eunit/include/eunit.hrl"). basic_define_test_() -> {setup, fun() -> {ok, Handle} = mozjs_nif:sm_init(8, 8), Handle end, fun(Handle) -> mozjs_nif:sm_stop(Handle) end, fun(Handle) -> [ {"define as binary", ?_assertEqual(ok, js_driver:define_js(Handle, <<"var a = 100;fun...
74badd9cdedefb56e752c9e1516b745490fc8d1ffdf6a942d866cdd1db285bdd
MyDataFlow/ttalk-server
markdown_middleware_app.erl
%% Feel free to use, reuse and abuse the code in this file. @private -module(markdown_middleware_app). -behaviour(application). %% API. -export([start/2]). -export([stop/1]). %% API. start(_Type, _Args) -> Dispatch = cowboy_router:compile([ {'_', [ {"/[...]", cowboy_static, {priv_dir, markdown_middleware, "...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/cowboy/examples/markdown_middleware/src/markdown_middleware_app.erl
erlang
Feel free to use, reuse and abuse the code in this file. API. API.
@private -module(markdown_middleware_app). -behaviour(application). -export([start/2]). -export([stop/1]). start(_Type, _Args) -> Dispatch = cowboy_router:compile([ {'_', [ {"/[...]", cowboy_static, {priv_dir, markdown_middleware, ""}} ]} ]), {ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [ {e...
795063bfcece0995cc692b67666303e5f681eb22ac16b195e70af0d946fc2943
replikativ/replikativ
protocols.cljc
(ns replikativ.protocols "Protocols between replication and CRDT implementations.") (defprotocol POpBasedCRDT (-handshake [this S] "Initial message send to other replica to catch up.") (-downstream [this op] "Returns new state when operation is applied to the CRDT. This function is pure and does not affect ...
null
https://raw.githubusercontent.com/replikativ/replikativ/1533a7e43e46bfb70e8c8eb34dc5708e611a478d/src/replikativ/protocols.cljc
clojure
(ns replikativ.protocols "Protocols between replication and CRDT implementations.") (defprotocol POpBasedCRDT (-handshake [this S] "Initial message send to other replica to catch up.") (-downstream [this op] "Returns new state when operation is applied to the CRDT. This function is pure and does not affect ...
89e6c148ad526c2af8615e764a5833ce25e5185a669f020c2ccda67a9393c1be
rtoy/cmucl
memory.lisp
-*- Package : RT ; Log : c.log -*- ;;; ;;; ********************************************************************** This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . ;;; (ext:file-comment "$Header: src/compiler/rt/memory.lisp $"...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/compiler/rt/memory.lisp
lisp
Log : c.log -*- ********************************************************************** ********************************************************************** $Header: src/compiler/rt/memory.lisp $ reference VOPs inherited by basic memory reference operations. CELL-REF and CELL-SET are used to define VOPs...
This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . (ext:file-comment "$Header: src/compiler/rt/memory.lisp $") This file contains the IBM RT definitions of some general purpose memory Written by Converted by . (in-pack...
ce86d0f0dbe5fb4fa3a60100ff97868e288929a5e44e936fd935279ff48641f5
hunt-framework/hunt
Main.hs
{-# LANGUAGE DeriveDataTypeable #-} module Main where import Control.Monad (unless) import Data.Text (Text, unpack) import Data.Time.Clock import Hunt.ClientInterface import Hunt.Common import Hunt.Common.ApiDocument import ...
null
https://raw.githubusercontent.com/hunt-framework/hunt/d692aae756b7bdfb4c99f5a3951aec12893649a8/hunt-demos/hunt-cli-search/src/Main.hs
haskell
# LANGUAGE DeriveDataTypeable # ---------------------------------------------------------------------------- | Hunt command line search. After index is loaded, queries can be performed 'exit' stops the application reads query from line no paging here. fetch all results. might lead to slow queries! | Print in...
module Main where import Control.Monad (unless) import Data.Text (Text, unpack) import Data.Time.Clock import Hunt.ClientInterface import Hunt.Common import Hunt.Common.ApiDocument import Hunt.Index.Schema import ...
1ee9eab34c86152295e6999fb8a48e7043b5daae1e000b12d2b8c9328cf2ce28
CodyReichert/qi
cffi-clisp.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; cffi-clisp.lisp --- CFFI - SYS implementation for CLISP . ;;; Copyright ( C ) 2005 - 2006 , < > Copyright ( C ) 2005 - 2006 , < > ;;; ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a copy of this software and associated do...
null
https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/cffi-master/src/cffi-clisp.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to...
cffi-clisp.lisp --- CFFI - SYS implementation for CLISP . Copyright ( C ) 2005 - 2006 , < > Copyright ( C ) 2005 - 2006 , < > files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions ...
dcee28e074e00617d65ce758511fb9f6e7f8bf56c6c9f4f2c2e6b17f52debf93
graninas/Pragmatic-Type-Level-Design
Language.hs
module Auction.Language ( module X ) where import Auction.Language.Description as X import Auction.Language.Flow as X import Auction.Language.Auction as X import Auction.Language.DataActions as X
null
https://raw.githubusercontent.com/graninas/Pragmatic-Type-Level-Design/a7e051ed9d664c6986323336a0ad2132a3fa3f1c/demo-apps/auction/src/Auction/Language.hs
haskell
module Auction.Language ( module X ) where import Auction.Language.Description as X import Auction.Language.Flow as X import Auction.Language.Auction as X import Auction.Language.DataActions as X
2394eab9002dfba93855a619fb8dec20df4aa63894f5c8142b36ba7f1e41e2a1
erlang/epmd
epmd.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2016 . 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 Public Licen...
null
https://raw.githubusercontent.com/erlang/epmd/c27e1e3d37f9bb7f657782be5809b78a58b98b4d/src/epmd.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 limitatio...
Copyright Ericsson AB 2016 . 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 " Author : Björn - Egil Dahlberg Created : 201...
f0985312e80a072e378c13141cf85078a1e269e6a2e4e850cbc89c27da7add4d
tonyrog/eth
eth_packet.erl
@author < > ( C ) 2013 , %%% @doc %%% General packet %%% @end Created : 2 May 2013 by < > -module(eth_packet). -include_lib("enet/include/enet_types.hrl"). -export([decode/1, decode/2]). -export([fmt_json/1, fmt_yang/1, fmt_erl/1]). -export([dump/1, dump_json/1, dump_yang/1, dump_erl/1]). -expo...
null
https://raw.githubusercontent.com/tonyrog/eth/51e9989a020ccf8aafa0c286c0dc19ab7862a5a8/src/eth_packet.erl
erlang
@doc General packet @end Format values and records in JSON format formt as JSON array? YANG FORMAT fixme! fixme! formt as YANG array? fixme! fixme! only indent when using newline/carriage return
@author < > ( C ) 2013 , Created : 2 May 2013 by < > -module(eth_packet). -include_lib("enet/include/enet_types.hrl"). -export([decode/1, decode/2]). -export([fmt_json/1, fmt_yang/1, fmt_erl/1]). -export([dump/1, dump_json/1, dump_yang/1, dump_erl/1]). -export([parse_json/1, parse_yang/1, parse_erl/...
1f96715531acfbd88a1ec14045d396314febf4994a64e9c65daf84132509d6f1
clojure-interop/aws-api
project.clj
(defproject clojure-interop/com.amazonaws.services.mediapackagevod "1.0.0" :description "Clojure to Java Interop Bindings for com.amazonaws.services.mediapackagevod" :url "-interop/aws-api" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"]] :so...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.mediapackagevod/project.clj
clojure
(defproject clojure-interop/com.amazonaws.services.mediapackagevod "1.0.0" :description "Clojure to Java Interop Bindings for com.amazonaws.services.mediapackagevod" :url "-interop/aws-api" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"]] :so...
8f06b2b3597128cf003a0106093393d873dc2d87b1b22d5f07421b551f362d2c
wireapp/wire-server
SparAccess.hs
# LANGUAGE TemplateHaskell # -- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , e...
null
https://raw.githubusercontent.com/wireapp/wire-server/a28c06f4096f35d5bdb4289b45abff2c51d354fa/services/galley/src/Galley/Effects/SparAccess.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTI...
# LANGUAGE TemplateHaskell # Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along mo...
628fbf1ae729eb4cb357a13b6d49d6e09bdd3a6105f3297820028a0c31d43876
olleharstedt/subsetphp
eventLogger.ml
* * Copyright ( c ) 2015 , Facebook , Inc. * All rights reserved . * * This source code is licensed under the BSD - style license found in the * LICENSE file in the " hack " directory of this source tree . An additional grant * of patent rights can be found in the PATENTS file in the same directory . ...
null
https://raw.githubusercontent.com/olleharstedt/subsetphp/37f7967594bdda38531f4fbde6ffc5ae33a307a3/eventLogger.ml
ocaml
* * Copyright ( c ) 2015 , Facebook , Inc. * All rights reserved . * * This source code is licensed under the BSD - style license found in the * LICENSE file in the " hack " directory of this source tree . An additional grant * of patent rights can be found in the PATENTS file in the same directory . ...
82b6f1d19644551858f8400da07682421474e43719069eab5cb23c918e75df9c
serokell/edna
Generator.hs
SPDX - FileCopyrightText : 2021 > -- SPDX - License - Identifier : AGPL-3.0 - or - later module Generator ( GeneratorSpec (..) , generatorDetails , generateAndSave ) where import Universum import qualified Data.ByteString.Lazy as BSL import qualified Data.Map.Strict as Map import qualified Data.Text a...
null
https://raw.githubusercontent.com/serokell/edna/57b8b36b0a2d3fd3ff8c5304f1df940bc34088c9/backend/generator/Generator.hs
haskell
cases here. | Specification for data generator: determines what data will be generated. 'Word' seems to be the most appropriate type for indices, but here we use We don't use it for measurements because here we don't construct measurement IDs and add them to other indices. ^ How many projects to generate. ^ Ho...
SPDX - FileCopyrightText : 2021 > SPDX - License - Identifier : AGPL-3.0 - or - later module Generator ( GeneratorSpec (..) , generatorDetails , generateAndSave ) where import Universum import qualified Data.ByteString.Lazy as BSL import qualified Data.Map.Strict as Map import qualified Data.Text as T...
560f2bafa1113ff4075671fd2a7e70ee64ba7a7798e051f894dc9d8cb199caed
mbutterick/css-tools
transition.rkt
#lang racket/base (require "core.rkt") (provide (all-defined-out)) (define (make-css-transition property duration #:timing-function [timing-function #f] #:delay [delay #f]) (join-css-strings (filter values (list (make-css-string "transition-property" property) (make-css-...
null
https://raw.githubusercontent.com/mbutterick/css-tools/f065107c46cc3a1fbd2052654347f8912c34985a/transition.rkt
racket
#lang racket/base (require "core.rkt") (provide (all-defined-out)) (define (make-css-transition property duration #:timing-function [timing-function #f] #:delay [delay #f]) (join-css-strings (filter values (list (make-css-string "transition-property" property) (make-css-...
30f9b641736bf602ed1ef61cd19313971db8d29f23d7b059c21d4231402356cc
stabilized/clojurescript
build_api_tests.clj
(ns cljs.build-api-tests (:use cljs.build.api) (:use clojure.test) (:require [cljs.env :as env] [cljs.analyzer :as ana])) (deftest test-target-file-for-cljs-ns (is (= (.getPath (target-file-for-cljs-ns 'example.core-lib nil)) "out/example/core_lib.js")) (is (= (.getPath (target-file-for-...
null
https://raw.githubusercontent.com/stabilized/clojurescript/f38f141525576b2a89cde190f25f9cf2fc4c418a/test/clj/cljs/build_api_tests.clj
clojure
basic linear graph
(ns cljs.build-api-tests (:use cljs.build.api) (:use clojure.test) (:require [cljs.env :as env] [cljs.analyzer :as ana])) (deftest test-target-file-for-cljs-ns (is (= (.getPath (target-file-for-cljs-ns 'example.core-lib nil)) "out/example/core_lib.js")) (is (= (.getPath (target-file-for-...
1f04f0ff5b4f7235829c1144387ab021973b51954922aeb945c84f257e60951d
jackfirth/resyntax
syntax-rules-shortcuts.rkt
#lang racket/base (require racket/contract/base) (provide (contract-out [syntax-rules-shortcuts refactoring-suite?])) (require rebellion/private/static-name resyntax/refactoring-rule resyntax/refactoring-suite resyntax/private/syntax-replacement syntax/parse) ;@-----------...
null
https://raw.githubusercontent.com/jackfirth/resyntax/f5a8ae97ee17be45ae23519bb9e702da3940e8b8/default-recommendations/syntax-rules-shortcuts.rkt
racket
@----------------------------------------------------------------------------------------------------
#lang racket/base (require racket/contract/base) (provide (contract-out [syntax-rules-shortcuts refactoring-suite?])) (require rebellion/private/static-name resyntax/refactoring-rule resyntax/refactoring-suite resyntax/private/syntax-replacement syntax/parse) (define-ref...
1a12da6c6b0bfd8a975e1d403fe83f3081c16a1068b2a71ab938532b54ad834f
samrushing/irken-compiler
t_callbug.scm
;; -*- Mode: Irken -*- (include "lib/core.scm") (include "lib/pair.scm") (include "lib/alist.scm") ;; trying to repro a bug I found when working on self/match.scm, where I ;; accidentally invoked a symbol arg... somehow the solver let it slide, dunno why . If I changed ( tag ) to ( 3 ) or ( rules - stack ) I ge...
null
https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t_callbug.scm
scheme
-*- Mode: Irken -*- trying to repro a bug I found when working on self/match.scm, where I accidentally invoked a symbol arg... somehow the solver let it slide, somehow the key part of alist/iterate allowed it to get through. (alist/iterate (lambda (tag rules-stack) (let ((alt (dt.get (tag))) (wil...
(include "lib/core.scm") (include "lib/pair.scm") (include "lib/alist.scm") dunno why . If I changed ( tag ) to ( 3 ) or ( rules - stack ) I get an error , ( ( nthunk alt.arity new - match - var ) ) ( ' ( ) ) ) (define (get s) s) (define thing (alist/make ('x {get=get n=0}...
f5782a090018e0beb23a07048db315f7c54d8ab6d285c2181492831af2a8a8b8
wireapp/saml2-web-sso
APISpec.hs
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -Wno-unused-binds -Wno-incomplete-patterns -Wno-incomplete-uni-patterns -Wno-orphans #-} module Test.SAML2.WebSSO.APISpec ( spec, ) where import Control.Concurrent.MVar import Control.Exception (SomeException, try) import Control.Lens import Control.Monad.Except ...
null
https://raw.githubusercontent.com/wireapp/saml2-web-sso/b79a45ac98b1f592ac18511fce48ed88d2e931c9/test/Test/SAML2/WebSSO/APISpec.hs
haskell
# LANGUAGE OverloadedStrings # # OPTIONS_GHC -Wno-unused-binds -Wno-incomplete-patterns -Wno-incomplete-uni-patterns -Wno-orphans # there is no strong reason why we would want this test to pass or fail; it is just here to document the current behavior. see also the comment in 'parseAuthnResponseBody'. needed for ma...
module Test.SAML2.WebSSO.APISpec ( spec, ) where import Control.Concurrent.MVar import Control.Exception (SomeException, try) import Control.Lens import Control.Monad.Except import qualified Data.ByteString.Base64.Lazy as EL (decodeLenient, encode) import Data.Either import Data.EitherR import Data.List.NonEmpty ...
9f387308babab7292a159231e49ddaf436a1df33dc409eba8917d43803e3f2fe
Zulu-Inuoe/jzon
ratio-to-double.lisp
(eval-when (:compile-toplevel :load-toplevel :execute) (flet ((#1=#:|| (package) (unless (find-package package) (cond ((and (find-package '#:ql) (find-symbol (string '#:quickload) '#:ql)) (funcall (find-symbol (string '#:quickload) '#:ql) package)) ((a...
null
https://raw.githubusercontent.com/Zulu-Inuoe/jzon/c69fa5c08dee2c4fb2c5f4a39d581943a2c4cdd8/src/ratio-to-double.lisp
lisp
This implementation was ported from the Clozure Common Lisp source alongside helper functions and values This `ratio-to-double' function is used to in the course of (jzon:parse (jzon:stringify x)) due to the way that it rounds rationals close to 0 sign - sign(sign) => result dont error if res...
(eval-when (:compile-toplevel :load-toplevel :execute) (flet ((#1=#:|| (package) (unless (find-package package) (cond ((and (find-package '#:ql) (find-symbol (string '#:quickload) '#:ql)) (funcall (find-symbol (string '#:quickload) '#:ql) package)) ((a...
5f6b0d4ff0778f2ecc2c3850b946248bf42bbec00acf0ff93994203ce136bbaf
jimcrayne/jhc
tc217.hs
{-# OPTIONS_GHC -fglasgow-exts -w #-} # LANGUAGE UndecidableInstances # module ShouldCompile where import Control.Monad.Reader instance Eq (a -> b) where _ == _ = error "whoops" instance Show (a -> b) where show = const "<fun>" -- This is the exmaple from Trac #179 foo x = show (\_ -> True) This is t...
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/2_pass/ghc/uncat/tc217.hs
haskell
# OPTIONS_GHC -fglasgow-exts -w # This is the exmaple from Trac #179
# LANGUAGE UndecidableInstances # module ShouldCompile where import Control.Monad.Reader instance Eq (a -> b) where _ == _ = error "whoops" instance Show (a -> b) where show = const "<fun>" foo x = show (\_ -> True) This is the example from Trac # 963 instance (Num a, Monad m, Eq (m a), Show (m a)) =...
3bf2e69da88652aeadfdd492c922b9b5b56f4eb3972adfef1443b14768bbed34
jyh/metaprl
ma_experiments.mli
extends Nuprl_experiments
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/mesa/ma_experiments.mli
ocaml
extends Nuprl_experiments
db2a468cf59dc314380300a91a4bd9e5f653ced00b2d4c472a6578c1fe4e1068
srid/Taut
Login.hs
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # -- Slack login and how we use that to authorize users module Backend.Logi...
null
https://raw.githubusercontent.com/srid/Taut/75f10c50a391d6e7301f6a26b2c781f0bf76a5c1/backend/src/Backend/Login.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # Slack login and how we use that to authorize users NOTE: The only reason we build the grantHref in the backend instead of the frontend (where it would be most appropriate) is because of a bug in obelisk missing exe-config (we need routeEnv) in the frontend pos...
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Backend.Login ( authorizeUser, handleOAuthCallback, ) where import Backend.Config import Common.Route import Common.Slac...
1be553a41adf6e7537b70752a79845c5ce4bd6fffa7b0a6761a8f3640dfbd4de
patperry/hs-linear-algebra
LU.hs
module LU ( luFactor, luFactorM ) where import Control.Monad( zipWithM_ ) import Control.Monad.ST( ST, runST ) import Numeric.LinearAlgebra import qualified Numeric.LinearAlgebra.Matrix as M import qualified Numeric.LinearAlgebra.Vector as V luFactor :: (BLAS3 e) => Matrix e -> Either Int (Matrix e, [Int]) luFactor...
null
https://raw.githubusercontent.com/patperry/hs-linear-algebra/887939175e03687b12eabe2fce5904b494242a1a/examples/LU.hs
haskell
module LU ( luFactor, luFactorM ) where import Control.Monad( zipWithM_ ) import Control.Monad.ST( ST, runST ) import Numeric.LinearAlgebra import qualified Numeric.LinearAlgebra.Matrix as M import qualified Numeric.LinearAlgebra.Vector as V luFactor :: (BLAS3 e) => Matrix e -> Either Int (Matrix e, [Int]) luFactor...
4e12062bf21306df4202d1f5510557a5ce7375fdd656adffffc569514e70a4a6
inhabitedtype/ocaml-aws
getMaintenanceWindow.ml
open Types open Aws type input = GetMaintenanceWindowRequest.t type output = GetMaintenanceWindowResult.t type error = Errors_internal.t let service = "ssm" let signature_version = Request.V4 let to_http service region req = let uri = Uri.add_query_params (Uri.of_string (Aws.Util.of_option_exn (Endpoi...
null
https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/3bc554af7ae7ef9e2dcea44a1b72c9e687435fa9/libraries/ssm/lib/getMaintenanceWindow.ml
ocaml
open Types open Aws type input = GetMaintenanceWindowRequest.t type output = GetMaintenanceWindowResult.t type error = Errors_internal.t let service = "ssm" let signature_version = Request.V4 let to_http service region req = let uri = Uri.add_query_params (Uri.of_string (Aws.Util.of_option_exn (Endpoi...
f60bf935ae58f9054759a9ac5e527eed105f2212ecfb97e254e21fa34ebb252a
tonyg/ocaml-networking
test.ml
open Unix open Printf open Thread let conn_main s = let cout = out_channel_of_descr s in let rec count n = match n with | 0 -> fprintf cout "Bye!\r\n%!" | _ -> fprintf cout "Hello %d\r\n%!" n; Thread.delay 0.5; count (n - 1) in count 10; printf "Closing the connection.\n%!"; flush cout; c...
null
https://raw.githubusercontent.com/tonyg/ocaml-networking/c952c33e34749aec4a05ae480e60ac7bddc77bfe/test.ml
ocaml
open Unix open Printf open Thread let conn_main s = let cout = out_channel_of_descr s in let rec count n = match n with | 0 -> fprintf cout "Bye!\r\n%!" | _ -> fprintf cout "Hello %d\r\n%!" n; Thread.delay 0.5; count (n - 1) in count 10; printf "Closing the connection.\n%!"; flush cout; c...
017ac2b349fab2bf43da859098be38603f4e0df37ae95f46d652def1bfef4775
xapi-project/xen-api
xapi_local_session.ml
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
null
https://raw.githubusercontent.com/xapi-project/xen-api/6c2aadbb44166b389a3bd956c8a6af5787003d68/ocaml/xapi/xapi_local_session.ml
ocaml
* Code to handle local sessions, used so that slaves can communicate even when the master is down.
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
febaeab452fb17fb298b5bd04f1cb3a771eacd9dd8dd2f222847c66ed3c2cfbd
serokell/qtah
QBrush.hs
This file is part of Qtah . -- Copyright 2015 - 2018 The Qtah Authors . -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the License , or -- (at your option) ...
null
https://raw.githubusercontent.com/serokell/qtah/abb4932248c82dc5c662a20d8f177acbc7cfa722/qtah-generator/src/Graphics/UI/Qtah/Generator/Interface/Gui/QBrush.hs
haskell
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER...
This file is part of Qtah . Copyright 2015 - 2018 The Qtah Authors . the Free Software Foundation , either version 3 of the License , or GNU Lesser General Public License for more details . You should have received a copy of the GNU Lesser General Public License module Graphics.UI.Qtah.Generator.Interface.Gu...
50c04d9d014a00fb155678547cf3e3cb344fd9d134cae47315ea22ce3d242595
ocaml/uchar
config.ml
#!/usr/bin/env ocaml #directory "pkg" #use "topkg-ext.ml" module Config = struct include Config_default let vars = [ "NAME", "uchar"; "VERSION", Git.describe ~chop_v:true "master"; "MAINTAINER", "Daniel Bünzli <daniel.buenzl i\\@erratique.ch>" ] end
null
https://raw.githubusercontent.com/ocaml/uchar/f9988830581a1f233d32e79aaacf8af76ddb9613/pkg/config.ml
ocaml
#!/usr/bin/env ocaml #directory "pkg" #use "topkg-ext.ml" module Config = struct include Config_default let vars = [ "NAME", "uchar"; "VERSION", Git.describe ~chop_v:true "master"; "MAINTAINER", "Daniel Bünzli <daniel.buenzl i\\@erratique.ch>" ] end
7038ae08a855ec8f1c4383058ada0123508e84e07b13285b7cce77a45c77909a
ralsei/bingus
mult-tree.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname mult-tree) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal...
null
https://raw.githubusercontent.com/ralsei/bingus/0e5118c305b57f3c291d1499d08a68127ea70ca4/bingus-examples/mult-tree.rkt
racket
about the language level of this file in a form that our tools can easily process. A TreeOfNumbers is one of: - (make-leaf Number) - (make-node TreeOfNumbers TreeOfNumbers) prod-tree : TreeOfNumbers -> Number multiplies all elements in a TreeOfNumbers depth : TreeOfNumbers -> Number
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname mult-tree) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define-struct leaf [n]) (define-struct node [left right]) (d...
e4e2f52999495c55cd7e7fd848014f8bebcd9785b1e8c6b3c35bb7da1b7bc7ed
ismailbennani/websocketml
websocketml.mli
(** This library implements {{:}RFC6455}. There are currently no supported extensions. *) (** {1 WS} *) exception WSError of string type t type msg_type = BinaryMsg | TextMsg type msg = { msg_typ : msg_type; msg_data : bytes } (** All these op codes are defined in the RFC *) type opcode = | ContinuationFrame...
null
https://raw.githubusercontent.com/ismailbennani/websocketml/22dfbc4bacc5f9e11f12607c386aabb213e6edf7/src/websocketml.mli
ocaml
* This library implements {{:}RFC6455}. There are currently no supported extensions. * {1 WS} * All these op codes are defined in the RFC * All these exit codes are defined in the RFC * Get the unix socket * Get remote address * {2 Read} * These method may raise {!WSError} if the socket is closed * Return t...
exception WSError of string type t type msg_type = BinaryMsg | TextMsg type msg = { msg_typ : msg_type; msg_data : bytes } type opcode = | ContinuationFrame | TextFrame | BinaryFrame | Close | Ping | Pong | ControlFrame of int | NonControlFrame of int type exit_code = * 1000 * 1001 * 1002 * 1003 * 1005 * 1006...
3f8e9a1266eb1d216b6dac3de73345e43df8edf829c77e5a1d9d05517ee60075
nikodemus/SBCL
parse-defmacro.lisp
the PARSE - DEFMACRO function and related code This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. The software is in the public...
null
https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/code/parse-defmacro.lisp
lisp
more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. variables for accumulating the results of parsing a DEFMACRO. (Declarations tests that do argument counting at expansion time LET bindings do...
the PARSE - DEFMACRO function and related code This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB!KERNEL") in DEFMACRO are the reason this is n't as easy a...
f0eac4decc1c3598f87053880f77beb97dfa0a7534671744f1c2ac0d9032a5b6
jmtd/hwadtools
Wad.hs
module Wad ( WadHeader(..) , wadHeaderSize , DirEnt(..) , getDirEnts , wadDirEnts , Thing(..) , readThing , readThings , maplumps ) where import qualified Data.ByteString.Lazy as L import qualified Data.ByteString.Lazy.C...
null
https://raw.githubusercontent.com/jmtd/hwadtools/e5639a068edf8d88f3e560cbc3708593223e3109/Wad.hs
haskell
---------------------------------------------------------------------------- prop_wadheader_binary_idem1 x = x == decode (encode x) prop_wadheader_binary_idem2 x = x == encode (decode x) ---------------------------------------------------------------------------- XXX: test wad directory encoding/decoding - XXX need ...
module Wad ( WadHeader(..) , wadHeaderSize , DirEnt(..) , getDirEnts , wadDirEnts , Thing(..) , readThing , readThings , maplumps ) where import qualified Data.ByteString.Lazy as L import qualified Data.ByteString.Lazy.C...
1668d9391d9ff70b113d37e50b08281fe3d603da504925c6afd2e677efd88ce5
zotonic/zotonic
survey_q_multiple_choice.erl
@author < > 2013 Copyright 2013 %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing, softwar...
null
https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_survey/src/questions/survey_q_multiple_choice.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
@author < > 2013 Copyright 2013 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(survey_q_multiple_choice). -export([ answer/3, prep_chart/3, prep_answer_header/2, prep_answer/3, pr...
8df5e3ae3c40e206e156de139d3afe83edec06cf2c65f3274b43d34fc9f8f9d7
reynir/ocaml-ssh-agent
ssh_agent.mli
module Pubkey : sig type ssh_dss = Mirage_crypto_pk.Dsa.pub type ssh_rsa = Mirage_crypto_pk.Rsa.pub type ssh_ed25519 = Mirage_crypto_ec.Ed25519.pub type options = (string * string) list * [ options ] is a list of pairs of options used in [ critical_options ] and * [ extensions ] . The first element is t...
null
https://raw.githubusercontent.com/reynir/ocaml-ssh-agent/574cf846d52c061efae20a238209ce25327ceb51/src/ssh_agent.mli
ocaml
* CA-provided random bitstring. * The public key this certificate is valid for. * Whether this is a host key certificate or a user key certificate. * Critical extensions. Must be sorted lexicographically. * Non-critical extensions. Must be sorted lexicographically. * [reserved] is always empty currently according ...
module Pubkey : sig type ssh_dss = Mirage_crypto_pk.Dsa.pub type ssh_rsa = Mirage_crypto_pk.Rsa.pub type ssh_ed25519 = Mirage_crypto_ec.Ed25519.pub type options = (string * string) list * [ options ] is a list of pairs of options used in [ critical_options ] and * [ extensions ] . The first element is t...
6ef24650b9dab48297a20824e2d907d590099570fec26faf721baae9105e1e98
Oblosys/proxima
DeclBlocks.hs
UUAGC 0.9.10 ( ) module DeclBlocks where import Code (Decl,Expr) DeclBlocks -------------------------------------------------- alternatives : alternative : child : { [ Decl ] } child visit : { Decl } child next : DeclBlocks ...
null
https://raw.githubusercontent.com/Oblosys/proxima/f154dff2ccb8afe00eeb325d9d06f5e2a5ee7589/uuagc/src-derived/DeclBlocks.hs
haskell
------------------------------------------------ DeclBlocksRoot ----------------------------------------------
UUAGC 0.9.10 ( ) module DeclBlocks where import Code (Decl,Expr) alternatives : alternative : child : { [ Decl ] } child visit : { Decl } child next : DeclBlocks alternative DeclTerminator : child : { [ ...
193e443fd0f8db7e66322fe845fbb9550951a541402e505ac3ebb7ae7aa212e4
JeffreyBenjaminBrown/hode
Rslt.hs
module Data.Rslt where import Data.Map (Map) import qualified Data.Map as M import Data.Maybe import Data.Set (Set) import qualified Data.Set as S import Data.Rslt.Index import Data.Rslt.Types -- | The `Index` can answer every fundamental connectivity question: -- What is i...
null
https://raw.githubusercontent.com/JeffreyBenjaminBrown/hode/79a54a6796fa01570cde6903b398675c42954e62/earlier-work/Rslt/functions-not-data/Rslt.hs
haskell
| The `Index` can answer every fundamental connectivity question: What is in something, what is something in, etc. i.e. anything but a ` Par ` -- via `addrOf`. ^ The fields in the `Index`, plus the `holdsPosition` function,
module Data.Rslt where import Data.Map (Map) import qualified Data.Map as M import Data.Maybe import Data.Set (Set) import qualified Data.Set as S import Data.Rslt.Index import Data.Rslt.Types are the atomic ways to search an ` Rslt ` . data Index = Index { _addrOf ...
3b38c17a5d57355a008bf3694b0e252897942607619a3323742b84e7b9de1d47
fujita-y/digamma
deriv.scm
;;; DERIV -- Symbolic derivation. ;;; Returns the wrong answer for quotients. ;;; Fortunately these aren't used in the benchmark. (define (deriv a) (cond ((not (pair? a)) (if (eq? a 'x) 1 0)) ((eq? (car a) '+) (cons '+ (map deriv (cdr a)))) ((eq? (car a) '-) ...
null
https://raw.githubusercontent.com/fujita-y/digamma/5a31f9fd67737fd857ada643d5548155a2ed0e76/bench/gambit-benchmarks/deriv.scm
scheme
DERIV -- Symbolic derivation. Returns the wrong answer for quotients. Fortunately these aren't used in the benchmark.
(define (deriv a) (cond ((not (pair? a)) (if (eq? a 'x) 1 0)) ((eq? (car a) '+) (cons '+ (map deriv (cdr a)))) ((eq? (car a) '-) (cons '- (map deriv (cdr a)))) ((eq? (car a) '*) (list '* a (cons...
b875ab06fc239cdee84c32afbc2808a27a494162be318805b476335cee278b8a
UU-ComputerScience/uulib
Main.hs
| Some benchmarks for UULIB . module Main(main) where import UU.Parsing import UU.Parsing.Derived import UU.Parsing.CharParser import UU.Parsing.Interface import UU.Parsing.MachineInterface import Control.DeepSeq import Criterion.Types import Progression.Main -- | 26 Choices uulibP :: Parser Char String uulibP = p...
null
https://raw.githubusercontent.com/UU-ComputerScience/uulib/68a5e661547908979545b493da3a55418ca5a6aa/benchmark/src/Main.hs
haskell
| 26 Choices
| Some benchmarks for UULIB . module Main(main) where import UU.Parsing import UU.Parsing.Derived import UU.Parsing.CharParser import UU.Parsing.Interface import UU.Parsing.MachineInterface import Control.DeepSeq import Criterion.Types import Progression.Main uulibP :: Parser Char String uulibP = pList $ pAny pSym...
b6664d1a99edb75eccf817effc5ed398822fbe88a8391d4ac5363af432c323c5
themattchan/core
Language.hs
module Core.Language where type Name = String A core lang program is a list of defns type Program a = [ScDefn a] type CoreProgram = Program Name -- A supercombinator (toplevel) definition is the name, args, and body type ScDefn a = (Name, [a], Expr a) type CoreScDefn = ScDefn Name -- Cases in case expressions typ...
null
https://raw.githubusercontent.com/themattchan/core/ba7e8f62cffc463ddf0143f25a5b692f77d474e1/src/Core/Language.hs
haskell
A supercombinator (toplevel) definition is the name, args, and body Cases in case expressions The main expr data type Variables Numbers Let(rec) expressions boolean with True = recursive, Definitions Body of let(rec) Case expression Expression to scrutinise Alternatives Lambda abstractions
module Core.Language where type Name = String A core lang program is a list of defns type Program a = [ScDefn a] type CoreProgram = Program Name type ScDefn a = (Name, [a], Expr a) type CoreScDefn = ScDefn Name type Alter a = (Int, [a], Expr a) type CoreAlt = Alter Name type CoreExpr = Expr Name data Expr a C...
e1460ae8cb698bab3314cd607b35e5ae0ca035e819aaf8ec16dbf782f0725905
composewell/streaming-benchmarks
Pipes.hs
-- | -- Module : Benchmarks.Pipes Copyright : ( c ) 2018 -- License : MIT -- Maintainer : {-# LANGUAGE RankNTypes #-} # LANGUAGE TemplateHaskell # module Benchmarks.Pipes where import Benchmarks.DefaultMain (defaultMain) import Benchmarks.Common (value, maxValue, appendValue) import Data.Void (V...
null
https://raw.githubusercontent.com/composewell/streaming-benchmarks/c31fa9d2d20c9b4e8e85be19ac1e7a41a88b4945/Benchmarks/Pipes.hs
haskell
| Module : Benchmarks.Pipes Maintainer : # LANGUAGE RankNTypes # ----------------------------------------------------------------------------- Stream generation and elimination ----------------------------------------------------------------------------- source n = S.each [n..n+value] ---------------------...
Copyright : ( c ) 2018 License : MIT # LANGUAGE TemplateHaskell # module Benchmarks.Pipes where import Benchmarks.DefaultMain (defaultMain) import Benchmarks.Common (value, maxValue, appendValue) import Data.Void (Void) import Prelude (Monad, Int, (+), ($), id, return, even, (>), (<=), s...
a665783e4823b0e4b0f377c8f314f1d729d2e7e90eeca13b4446735a0a7bc628
ocsigen/ocaml-eliom
main.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/lib-dynlink-native/main.ml
ocaml
************************************************************************ OCaml ...
, LexiFi Copyright 2007 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the let () = Api.add_cb (fun () -> print_endline "Callback from main") let () = Dynlink.init (); Dynli...
31dab42dbd4b4457950c91a5882ba25ff4cba5510e1ec0efe93492cb99f989ba
roterski/syncrate-fulcro
http_server.clj
(ns app.server-components.http-server (:require [app.server-components.config :refer [config]] [app.server-components.middleware :refer [middleware]] [mount.core :refer [defstate]] [clojure.pprint :refer [pprint]] [org.httpkit.server :as http-kit] [taoensso.timbre :as log])) (def env-config ...
null
https://raw.githubusercontent.com/roterski/syncrate-fulcro/3fda40b12973e64c7ff976174498ec512b411323/src/main/app/server_components/http_server.clj
clojure
(ns app.server-components.http-server (:require [app.server-components.config :refer [config]] [app.server-components.middleware :refer [middleware]] [mount.core :refer [defstate]] [clojure.pprint :refer [pprint]] [org.httpkit.server :as http-kit] [taoensso.timbre :as log])) (def env-config ...
922dc11fce64f85dc6b81f3c22466e1a87059fba1211fc16d925b1cee482264d
BnMcGn/clack-pretend
package.lisp
package.lisp (defpackage #:clack-pretend (:use #:cl #:lack.component #:lack.request #:alexandria) (:export #:clack-pretend #:last-input #:last-request-object #:last-request-url #:pretend-builder #:run-pretend #:last-session #:last-output #:last-as-code #:quick-summary #:verbose-b...
null
https://raw.githubusercontent.com/BnMcGn/clack-pretend/90016b0fdb40869131dd076bf4470b030baa1dc7/package.lisp
lisp
package.lisp (defpackage #:clack-pretend (:use #:cl #:lack.component #:lack.request #:alexandria) (:export #:clack-pretend #:last-input #:last-request-object #:last-request-url #:pretend-builder #:run-pretend #:last-session #:last-output #:last-as-code #:quick-summary #:verbose-b...
0fe7cfeb22a135ee6f381acf0c85483dbc1773cf2284cc3dd1682174276bd4f7
lspector/Clojush
bioavailability.clj
;; bioavailability.clj ;; This problem is a symbolic regression problem with 359 fitness cases over 241 variables . Each fitness case is a candidate drug compound , ;; with each variable being a bi-dimensional molecule descriptor of ;; that compound. The data file data/bioavailability.txt ;; contains the data, with...
null
https://raw.githubusercontent.com/lspector/Clojush/685b991535607cf942ae1500557171a0739982c3/src/clojush/problems/regression/bioavailability.clj
clojure
bioavailability.clj with each variable being a bi-dimensional molecule descriptor of that compound. The data file data/bioavailability.txt contains the data, with the last column being the target variable, in this case human oral bioavailability (%F), a float in the The experimental procedure is copied from the...
This problem is a symbolic regression problem with 359 fitness cases over 241 variables . Each fitness case is a candidate drug compound , range [ 0.0 , 100.0 ] . procedure uses 70 % of the fitness cases as a training set , and the remaining 30 % as a test set . Each time this file is run , it will select r...
c37d44bbdaea9eb7a8d3753b99e8b3659b482501ddebbfdf949b6f4f2906f184
metabase/metabase
test_util.clj
(ns metabase.query-processor.streaming.test-util "Utility functions for testing QP streaming (download) functionality." (:require [cheshire.core :as json] [clojure.data.csv :as csv] [clojure.test :refer :all] [dk.ative.docjure.spreadsheet :as spreadsheet] [metabase.query-processor :as qp] [metabas...
null
https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/test/metabase/query_processor/streaming/test_util.clj
clojure
(ns metabase.query-processor.streaming.test-util "Utility functions for testing QP streaming (download) functionality." (:require [cheshire.core :as json] [clojure.data.csv :as csv] [clojure.test :refer :all] [dk.ative.docjure.spreadsheet :as spreadsheet] [metabase.query-processor :as qp] [metabas...
988f8993a1efa7cc4429d965f5d3536a431a65f701eb58da89c78b4c995ac6b0
lpgauth/httpc_bench
httpc_bench_server.erl
-module(httpc_bench_server). -include("httpc_bench.hrl"). -compile(inline). -compile({inline_size, 512}). -export([ start/0, stop/0 ]). %% public start() -> case get(?MODULE) of undefined -> io:format("Server started...~n", []), {ok, LSocket} = listen(), put(?M...
null
https://raw.githubusercontent.com/lpgauth/httpc_bench/5430ddd569dcecf2c120ca424493c336df44284f/src/httpc_bench_server.erl
erlang
public private
-module(httpc_bench_server). -include("httpc_bench.hrl"). -compile(inline). -compile({inline_size, 512}). -export([ start/0, stop/0 ]). start() -> case get(?MODULE) of undefined -> io:format("Server started...~n", []), {ok, LSocket} = listen(), put(?MODULE, LSo...
4ea9988a0d32d6325c8abcdcc91fd53c820eece78ae5df35abf6295bad128cc2
afiniate/aws_async
sqs_request.ml
open Core.Std open Async.Std type headers = (string * string) list let parse_error xml_string = let open Result.Monad_infix in let parse_error channel = Sqs_xml.expect_tag channel ~name:"Error" >>= Sqs_xml.extract_tag_body ~name:"Type" >>= fun (channel, t) -> Sqs_xml.expect_end channel >>= Sqs...
null
https://raw.githubusercontent.com/afiniate/aws_async/44c27bf9f18f76e9e6405c2252098c4aa3d9a8bc/lib/sqs/sqs_request.ml
ocaml
open Core.Std open Async.Std type headers = (string * string) list let parse_error xml_string = let open Result.Monad_infix in let parse_error channel = Sqs_xml.expect_tag channel ~name:"Error" >>= Sqs_xml.extract_tag_body ~name:"Type" >>= fun (channel, t) -> Sqs_xml.expect_end channel >>= Sqs...
8995d118bc77d9101c61a43f0b6d20e2b2aa450faeae2e65b069116bb13fb675
inaka/erlang_guidelines
indent.erl
-module(indent). -export([bad/0, better/0, good/0]). %% @doc inconsistent bad() -> try ThisBlock = is:indented(with, two, spaces), that:is_good(ThisBlock) catch _:_ -> this_block:is_indented(with, four, spaces) end. @doc consistent , but with 4 spaces better() -> receive ...
null
https://raw.githubusercontent.com/inaka/erlang_guidelines/7a802a23a08d120db7e94115b4600b26194dd242/src/indent.erl
erlang
@doc inconsistent @doc good
-module(indent). -export([bad/0, better/0, good/0]). bad() -> try ThisBlock = is:indented(with, two, spaces), that:is_good(ThisBlock) catch _:_ -> this_block:is_indented(with, four, spaces) end. @doc consistent , but with 4 spaces better() -> receive {this, block} -> is:in...
820a5eee094bf6ea85ff05fa5643383a75ec32e5faa8aeef89f6a26596291228
nilenso/time-tracker
util.clj
(ns time-tracker.util (:require [clj-time.core :as time] [clj-time.coerce :as time-coerce] [clojure.walk :as walk] [clojure.spec :as s])) (defn statement-success? [result] (< 0 result)) (def select-success? (comp statement-success? count)) (defn to-epoch-seconds [time-obj]...
null
https://raw.githubusercontent.com/nilenso/time-tracker/054d0dc6d6b89a4ed234d8f0b0a260b6deeef9e3/src/clj/time_tracker/util.clj
clojure
(ns time-tracker.util (:require [clj-time.core :as time] [clj-time.coerce :as time-coerce] [clojure.walk :as walk] [clojure.spec :as s])) (defn statement-success? [result] (< 0 result)) (def select-success? (comp statement-success? count)) (defn to-epoch-seconds [time-obj]...
5833c2647b1de18b90f284993a0fccdf96771e2f7617991ad6ef9d5b0d286ead
gadfly361/baking-soda
react_bootstrap.clj
(ns baking-soda.react-bootstrap) (def react-bootstrap-tags '[Accordion Alert Badge Breadcrumb BreadcrumbItem Button ButtonGroup ButtonToolbar Carousel CarouselItem Checkbox Clearfix CloseButton Col Collapse ControlLabel Dropdown DropdownButton ...
null
https://raw.githubusercontent.com/gadfly361/baking-soda/5e1affd8f1a4ea19e8a0c6d5e401f4a6803c497c/src/baking_soda/react_bootstrap.clj
clojure
(ns baking-soda.react-bootstrap) (def react-bootstrap-tags '[Accordion Alert Badge Breadcrumb BreadcrumbItem Button ButtonGroup ButtonToolbar Carousel CarouselItem Checkbox Clearfix CloseButton Col Collapse ControlLabel Dropdown DropdownButton ...
ec5676f2a0fed895a3ec444808f88b4f7625ec204ce6c9f78ccaab0534d90e43
vikram/lisplibraries
result.lisp
-*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*- ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; ID : $ I d : result.lisp 7061 2003 - 09 - 07 06:34:45Z kevin $ Purpose : Result functions for XLUnit ;;;; ;;;; **********************...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/xlunit-0.6.2/result.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 -*- ************************************************************************* FILE IDENTIFICATION ************************************************************************* Test Failures ---------------------------------------------------------------------- methods add-...
ID : $ I d : result.lisp 7061 2003 - 09 - 07 06:34:45Z kevin $ Purpose : Result functions for XLUnit (in-package #:xlunit) (defclass test-results () ((test :initarg :test :reader result-test) (count :initform 0 :accessor run-tests) (failures :initarg :failures :accessor failures :initform nil) ...
b62d1514f80e9327c8072ab551c406ec0d9aab05bc0a152218ed033a90c29ac8
nuprl/gradual-typing-performance
provide-doc-transform.rkt
#lang racket/base (require "srcdoc.rkt") (provide define-provide/doc-transformer (for-syntax provide/doc-transformer? provide/doc-transformer-proc))
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/scribble-lib/scribble/provide-doc-transform.rkt
racket
#lang racket/base (require "srcdoc.rkt") (provide define-provide/doc-transformer (for-syntax provide/doc-transformer? provide/doc-transformer-proc))
bee9b76923495d37c4982b544c75427a7bacaf437d103c7023989b2c419b5623
Opetushallitus/ataru
oppijanumerorekisteri_person_extract_spec.clj
(ns ataru.person-service.oppijanumerorekisteri-person-extract-spec (:require [speclj.core :refer [describe it tags should should=]] [ataru.fixtures.application :as application-fixtures] [ataru.person-service.oppijanumerorekisteri-person-extract :refer [extract-person-from-application]])) (def finnish-per...
null
https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/spec/ataru/person_service/oppijanumerorekisteri_person_extract_spec.clj
clojure
Only relevant fields here
(ns ataru.person-service.oppijanumerorekisteri-person-extract-spec (:require [speclj.core :refer [describe it tags should should=]] [ataru.fixtures.application :as application-fixtures] [ataru.person-service.oppijanumerorekisteri-person-extract :refer [extract-person-from-application]])) (def finnish-per...
fc22923fa7dcd812ea5e59b439efa056a03fde673b2b7885bb78fda45eb5ae2b
cram2/cram
complex.lisp
;; Functions of complex numbers 2009 - 01 - 13 21:19:38EST complex.lisp Time - stamp : < 2011 - 10 - 29 23:20:40EDT complex.lisp > ;; Copyright 2009 Distributed under the terms of the GNU General Public License ;; ;; This program is free software: you can redistribute it and/or modify it under the terms ...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/mathematical/complex.lisp
lisp
Functions of complex numbers This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS...
2009 - 01 - 13 21:19:38EST complex.lisp Time - stamp : < 2011 - 10 - 29 23:20:40EDT complex.lisp > Copyright 2009 Distributed under the terms of the GNU General Public License it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the Lic...
bca62ee40fe13a9c0fad8a75ff447a12de2d1aa07784d5c3ef70f3fd2981f181
ocaml/ocaml-lsp
main.ml
let main_y = Lib.lib_x ;; let () = let main_z = "test" in print_endline (main_z);; print_endline (string_of_int main_y) ;; print_endline (string_of_int A.a_x) ;; print_endline (string_of_int (Lib.length []))
null
https://raw.githubusercontent.com/ocaml/ocaml-lsp/e57b34d129fe36e86cb1ac6aad6c53b2e1901b49/ocaml-lsp-server/test/e2e/__tests__/workspace_symbol_A/bin/main.ml
ocaml
let main_y = Lib.lib_x ;; let () = let main_z = "test" in print_endline (main_z);; print_endline (string_of_int main_y) ;; print_endline (string_of_int A.a_x) ;; print_endline (string_of_int (Lib.length []))
186945538de50ecedd07bc2a77957fdc6f3c4df1bc4b38b1cbc954f35ebbca06
hasktorch/ffi-experimental
Autograd.hs
module Torch.Managed.Autograd where import Foreign.ForeignPtr import qualified Torch.Unmanaged.Autograd as Unmanaged import qualified ATen.Unmanaged.Type.Tensor import qualified ATen.Unmanaged.Type.TensorList import ATen.Type import ATen.Class import ATen.Cast grad :: ForeignPtr Tensor -> ForeignPtr TensorList -> ...
null
https://raw.githubusercontent.com/hasktorch/ffi-experimental/54192297742221c4d50398586ba8d187451f9ee0/ffi/src/Torch/Managed/Autograd.hs
haskell
module Torch.Managed.Autograd where import Foreign.ForeignPtr import qualified Torch.Unmanaged.Autograd as Unmanaged import qualified ATen.Unmanaged.Type.Tensor import qualified ATen.Unmanaged.Type.TensorList import ATen.Type import ATen.Class import ATen.Cast grad :: ForeignPtr Tensor -> ForeignPtr TensorList -> ...
bd07cfba2e6f7c653cd136f238a5c10d7438c512459db501d3925fc2c94df2a2
valpackett/sweetroll
Response.hs
# LANGUAGE NoImplicitPrelude , OverloadedStrings , UnicodeSyntax , TupleSections # module Sweetroll.Micropub.Response where import Sweetroll.Prelude import qualified Data.Map as M import Web.FormUrlEncoded data MicropubResponse = Posted | AuthInfo [(Text, Text)] ...
null
https://raw.githubusercontent.com/valpackett/sweetroll/f91501da72fd5bb40743b21b66a9da791f5991a2/sweetroll-be/library/Sweetroll/Micropub/Response.hs
haskell
Screw this.
# LANGUAGE NoImplicitPrelude , OverloadedStrings , UnicodeSyntax , TupleSections # module Sweetroll.Micropub.Response where import Sweetroll.Prelude import qualified Data.Map as M import Web.FormUrlEncoded data MicropubResponse = Posted | AuthInfo [(Text, Text)] ...
e0b4c86986a1fde56764f577a161bf731f2af98174da81b128cec3476b66ea58
jnear/compiler-construction-assignments
run-tests-A5.rkt
#! /usr/bin/env racket #lang racket (require "utilities.rkt") (require "interp-R2.rkt") (require "compiler-A5.rkt") (debug-level 2) Define the passes to be used by interp - tests and the grader (define r2-passes `( ("shrink" ,shrink ,interp-R2) ("uniquify" ,uniquify ,interp-R2) ("remove-complex-opera*" ...
null
https://raw.githubusercontent.com/jnear/compiler-construction-assignments/17a1edbd59627341622203056180d9af7830756d/run-tests-A5.rkt
racket
#! /usr/bin/env racket #lang racket (require "utilities.rkt") (require "interp-R2.rkt") (require "compiler-A5.rkt") (debug-level 2) Define the passes to be used by interp - tests and the grader (define r2-passes `( ("shrink" ,shrink ,interp-R2) ("uniquify" ,uniquify ,interp-R2) ("remove-complex-opera*" ...
56b3ff909bf06bc8e2fae42629e13847609c051bcebab500a1e4e2b3f487daad
webyrd/miniKanren-uncourse
symbolo-numbero-tests.scm
(load "mk.scm") (test "symbolo-numbero-1" (run* (q) (symbolo q) (numbero q)) '()) (test "symbolo-numbero-2" (run* (q) (numbero q) (symbolo q)) '()) (test "symbolo-numbero-3" (run* (q) (fresh (x) (numbero x) (symbolo x))) '()) (test "symbolo-numbero-4" (run* (q) (fresh (x) (sy...
null
https://raw.githubusercontent.com/webyrd/miniKanren-uncourse/19bc2903266197d6ba6c6b818e0a196ea620377b/mk-implementations/scheme/symbolo-numbero-tests.scm
scheme
(load "mk.scm") (test "symbolo-numbero-1" (run* (q) (symbolo q) (numbero q)) '()) (test "symbolo-numbero-2" (run* (q) (numbero q) (symbolo q)) '()) (test "symbolo-numbero-3" (run* (q) (fresh (x) (numbero x) (symbolo x))) '()) (test "symbolo-numbero-4" (run* (q) (fresh (x) (sy...
e006f18a03017455400b3ce6c57eb2be0efcc08075ad39581bb91db2ec3f6062
mariari/Misc-Lisp-Scripts
chapter5.lisp
(defun joiner (obj) (typecase obj (cons #'append) (number #'+))) (defun join (&rest args) (apply (joiner (car args)) args)) ;; Weird closure thingy that lexical scoping allows to work (defun make-adder (n) #'(lambda (x) (+ x n))) ( setq add3 ( make - adder 3 ) ) ;; (funcall add3 2) ;; Used to ...
null
https://raw.githubusercontent.com/mariari/Misc-Lisp-Scripts/acecadc75fcbe15e6b97e084d179aacdbbde06a8/Books/OnLisp/chapter5.lisp
lisp
Weird closure thingy that lexical scoping allows to work (funcall add3 2) Used to getting the destructive version of a function In action A bit awkward in cl- since we need the funcall and #' Testing out memory efficiency of this all 5.0000 seconds of real time 0.000 seconds of real time (setq fastid (m...
(defun joiner (obj) (typecase obj (cons #'append) (number #'+))) (defun join (&rest args) (apply (joiner (car args)) args)) (defun make-adder (n) #'(lambda (x) (+ x n))) ( setq add3 ( make - adder 3 ) ) (defvar *!equivs* (make-hash-table)) (defun ! (fn) (or (gethash fn *!equivs*) fn)) (defu...
fb9eb631dc9e2e420536dbcdd2125c7fecbf2b13347f4c304830db5d70c8ab64
gdamore/tree-sitter-d
helix-textobjects.scm
(function_declaration (function_body) @function.inside) @function.around (comment) @comment.inside (comment)+ @comment.around (class_declaration (aggregate_body) @class.inside) @class.around (interface_declaration (aggregate_body) @class.inside) @class.around (struct_declaration (aggregate_body) @class.inside) @class.a...
null
https://raw.githubusercontent.com/gdamore/tree-sitter-d/0f0fdd68dc03931c0a718d2b98f0bf85caf574a3/queries/helix-textobjects.scm
scheme
(function_declaration (function_body) @function.inside) @function.around (comment) @comment.inside (comment)+ @comment.around (class_declaration (aggregate_body) @class.inside) @class.around (interface_declaration (aggregate_body) @class.inside) @class.around (struct_declaration (aggregate_body) @class.inside) @class.a...
c429f16b51c357d6b47f47c149628405e39b2ae37bfb131f8018b80adf247e28
punit-naik/ssh-cli
core_test.clj
(ns ssh-cli.core-test (:require [clojure.test :refer [deftest testing is]] [clojure.java.io :refer [resource]] [ssh-cli.core :refer [exec-remote scp]] [clojure.string :refer [trim split]])) (defonce ^:private user-name (System/getProperty "user.name")) (defonce ^:private machine (...
null
https://raw.githubusercontent.com/punit-naik/ssh-cli/0d8b44703c00f6462e228157cd995d494d982c08/test/ssh_cli/core_test.clj
clojure
(ns ssh-cli.core-test (:require [clojure.test :refer [deftest testing is]] [clojure.java.io :refer [resource]] [ssh-cli.core :refer [exec-remote scp]] [clojure.string :refer [trim split]])) (defonce ^:private user-name (System/getProperty "user.name")) (defonce ^:private machine (...
09d289bec736d4513eaab67812f4893e4df4620a2c5cc40fbdc7181198f11127
johnlawrenceaspden/hobby-code
itila1.4.clj
;; Information Theory, Inference, and Learning Algorithms Exercise 1.4 ;; A binary symmetric channel of noise f flips each bit with probability f (defn flip[bit] (if (= bit 0) 1 0)) (defn flip-rand[f bit] (if (< (rand) f) (flip bit) bit)) (defn corrupt[f sq] (map #(flip-rand f %) sq)) ( defn corrupt[f sq ] ;; ...
null
https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/itila1.4.clj
clojure
Information Theory, Inference, and Learning Algorithms A binary symmetric channel of noise f flips each bit with probability f (lazy-seq (when-let [sq (seq sq)] (corrupt f (rest sq)))))) repetition codes just repeat each bit n times (lazy-seq (when-let [sq (seq sq)] (concat (repeat n ...
Exercise 1.4 (defn flip[bit] (if (= bit 0) 1 0)) (defn flip-rand[f bit] (if (< (rand) f) (flip bit) bit)) (defn corrupt[f sq] (map #(flip-rand f %) sq)) ( defn corrupt[f sq ] ( cons ( if ( < ( rand ) f ) ( flip ( first sq ) ) ( first sq ) ) (defn binary-symmetric-channel[f] (fn[sq] (corrupt f sq))) (...
cfb52d495cb12abbc29ebacc3edaf5b2afe793224748f25568992f30432421da
bufferswap/ViralityEngine
render.lisp
(in-package #:virality.component) (v:define-component render () ((%mode :reader mode :initarg :mode :initform :mesh) (%draw-method :reader draw-method :initform (constantly nil)) (%transform :reader transform) (%material :accessor material :initarg :materia...
null
https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/src/components/render.lisp
lisp
TODO: Make this constant time TODO: This behavior here implies a policy about uniform usage for materials, in that, using a material that doesn't define this uniform will silently ignore the issue if you try setting it. The todo here is figure out how to get this better described so we can do compile time checks ...
(in-package #:virality.component) (v:define-component render () ((%mode :reader mode :initarg :mode :initform :mesh) (%draw-method :reader draw-method :initform (constantly nil)) (%transform :reader transform) (%material :accessor material :initarg :materia...
242be20026e5b05ea7ef347689b250888385a7cf58228464a67d722eb2c6c5aa
artyom-poptsov/guile-png
rectangle.scm
(define-module (png graphics rectangle) #:use-module (oop goops) #:use-module (png image) #:use-module (png graphics graphic) #:use-module (png graphics point) #:use-module (png graphics line) #:export (<rectangle> rectangle-position rectangle-width rectangle-height)) ...
null
https://raw.githubusercontent.com/artyom-poptsov/guile-png/118dd70f22664b8974eac6840a292c2855726546/modules/png/graphics/rectangle.scm
scheme
The position of the rectangle. <point> The width of the rectangle. <number> The height of the rectangle. <number> rectangle.scm ends here.
(define-module (png graphics rectangle) #:use-module (oop goops) #:use-module (png image) #:use-module (png graphics graphic) #:use-module (png graphics point) #:use-module (png graphics line) #:export (<rectangle> rectangle-position rectangle-width rectangle-height)) ...
feb7ef2f51d4774cb0bbf250baf87f0c8d8117a85d1b4e47a54c3cbd6447150c
minio/minio-hs
Credentials.hs
-- MinIO Haskell SDK , ( C ) 2017 - 2022 MinIO , Inc. -- Licensed under the Apache License , Version 2.0 ( the " License " ) ; -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- -2.0 -- -- Unless required by applicable law or agreed to in writing...
null
https://raw.githubusercontent.com/minio/minio-hs/f4ae55468e7d7aea9e89214a985ccb0dd9f4ddbf/src/Network/Minio/Credentials.hs
haskell
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing per...
MinIO Haskell SDK , ( C ) 2017 - 2022 MinIO , Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , module Network.Minio.Credentials ( CredentialValue (..), CredentialProvider (..), AccessKey, SecretKey, S...
86d2aa98ffdc5e811cc4e5f193e89121e786781b51febbc3a78e6f391600795d
nuvla/api-server
session_template_mitreid.cljc
(ns sixsq.nuvla.server.resources.spec.session-template-mitreid (:require [clojure.spec.alpha :as s] [sixsq.nuvla.server.resources.spec.session-template :as ps] [sixsq.nuvla.server.util.spec :as su])) Defines the contents of the MITREid SessionTemplate resource itself . (s/def ::schema (su/only-keys-...
null
https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/src/sixsq/nuvla/server/resources/spec/session_template_mitreid.cljc
clojure
Defines the contents of the MITREid template used in a create resource.
(ns sixsq.nuvla.server.resources.spec.session-template-mitreid (:require [clojure.spec.alpha :as s] [sixsq.nuvla.server.resources.spec.session-template :as ps] [sixsq.nuvla.server.util.spec :as su])) Defines the contents of the MITREid SessionTemplate resource itself . (s/def ::schema (su/only-keys-...
01ae57bfe1e8d4f538a327345cecb90ea6b4eea7990a445c8181f76948269579
Gbury/dolmen
dolmen_icnf.mli
(* This file is free software, part of dolmen. See file "LICENSE" formore information *) (** iCNF language input *) module type Term = Ast.Term module type Statement = Ast.Statement (** Implementation requirement for the iCNF format. *) module Make (L : Dolmen_intf.Location.S) (T : Term with type location :...
null
https://raw.githubusercontent.com/Gbury/dolmen/55566c8db8a9c7636743b49a8c0bfaa061bbeb0c/src/languages/icnf/dolmen_icnf.mli
ocaml
This file is free software, part of dolmen. See file "LICENSE" formore information * iCNF language input * Implementation requirement for the iCNF format. * Functor to generate a parser for the iCNF format.
module type Term = Ast.Term module type Statement = Ast.Statement module Make (L : Dolmen_intf.Location.S) (T : Term with type location := L.t) (S : Statement with type location := L.t and type term := T.t) : Dolmen_intf.Language.S with type statement = S.t and type file := L.file
7830fedd071a42b771f739643ccf4003b06d5d5a6cffd6d441457e8e5fb230bf
schemeorg-community/index.scheme.org
srfi.28.scm
(((name . "format") (signature lambda ((string? format-string) obj ...) string?) (tags pure) (spec-values (format-string ("~a" "The corresponding value is inserted into the string as if printed with display.") ("~s" "The corresponding value is inserted into the string as if printed with write...
null
https://raw.githubusercontent.com/schemeorg-community/index.scheme.org/32e1afcfe423a158ac8ce014f5c0b8399d12a1ea/types/srfi.28.scm
scheme
(((name . "format") (signature lambda ((string? format-string) obj ...) string?) (tags pure) (spec-values (format-string ("~a" "The corresponding value is inserted into the string as if printed with display.") ("~s" "The corresponding value is inserted into the string as if printed with write...
ed2926d1c95750addfd9034fb0793720bbeda7e5e10202ff0c3b979615477658
Clozure/ccl
l1-cl-package.lisp
-*- Mode : Lisp ; Package : CCL -*- ;;; Copyright 1994 - 2009 Clozure Associates ;;; 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 appl...
null
https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/level-1/l1-cl-package.lisp
lisp
Package : CCL -*- 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 la...
Copyright 1994 - 2009 Clozure Associates distributed under the License is distributed on an " AS IS " BASIS , (in-package "CCL") (eval-when (:compile-toplevel :execute) (defconstant %lisp-symbols% '("&ALLOW-OTHER-KEYS" "&AUX" "&BODY" "&ENVIRONMENT" "&KEY" "&OPTIONAL" ...
566f5188385998be62208a75b1bacf115a64def7de288f9c1ae74137857854f7
osstotalsoft/functional-guy
03.Maximum.hs
maximum' [] = error "maximum of empty list" maximum' [x] = x maximum' (x : xs) = max x (maximum' xs)
null
https://raw.githubusercontent.com/osstotalsoft/functional-guy/c02a8b22026c261a9722551f3641228dc02619ba/Chapter2.%20The%20foundation/Exercises/01.Recursion/03.Maximum.hs
haskell
maximum' [] = error "maximum of empty list" maximum' [x] = x maximum' (x : xs) = max x (maximum' xs)