_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
2f16eb489518b1c8a5bdfee4a1dc19dd019132833a0ba1e411e9f5b2cf6530c4
clojerl/clojerl
clojerl.IFn.erl
%%% Code generate by scripts/generate-protocols -module('clojerl.IFn'). -include("clojerl.hrl"). -include("clojerl_int.hrl"). -clojure(true). -protocol(true). -export(['apply'/2]). -export([?SATISFIES/1]). -export([?EXTENDS/1]). -callback 'apply'(any(), any()) -> any(). -optional_callbacks(['apply'/2]). 'apply'(Fn...
null
https://raw.githubusercontent.com/clojerl/clojerl/aa35847ca64e1c66224867ca4c31ca6de95bc898/src/erl/lang/protocols/clojerl.IFn.erl
erlang
Code generate by scripts/generate-protocols
-module('clojerl.IFn'). -include("clojerl.hrl"). -include("clojerl_int.hrl"). -clojure(true). -protocol(true). -export(['apply'/2]). -export([?SATISFIES/1]). -export([?EXTENDS/1]). -callback 'apply'(any(), any()) -> any(). -optional_callbacks(['apply'/2]). 'apply'(Fn, Args) -> case Fn of #{?TYPE := 'clojerl....
00c9b69b97d0d3fe4d3c34c94dbec8f8656ff0bcc6ed8c782a6c06fcf97d873a
bdeket/rktsicm
arity.rkt
#lang racket/base (require rackunit "../../kernel/cstm/arity.rkt") (define the-tests (test-suite "kernel/cstm/arity" (check-equal? (combine-arity 4 6) '(4 6)) (check-equal? (combine-arity 4 (arity-at-least 6)) (list 4 (arity-at-least 6))) (check-equal? (combine-arity 4 (arity-at-least 5)) (arit...
null
https://raw.githubusercontent.com/bdeket/rktsicm/1fd389513b3eb891828f34fb0d8419e393781d91/rktsicm/sicm/tests/kernel/arity.rkt
racket
#lang racket/base (require rackunit "../../kernel/cstm/arity.rkt") (define the-tests (test-suite "kernel/cstm/arity" (check-equal? (combine-arity 4 6) '(4 6)) (check-equal? (combine-arity 4 (arity-at-least 6)) (list 4 (arity-at-least 6))) (check-equal? (combine-arity 4 (arity-at-least 5)) (arit...
20a86fffc16932b38500a18b12e719d4066680748a72e003bfdbaa3bd8f1f300
hoelzl/Clicc
clisp-compat.lisp
;;;----------------------------------------------------------------------------- Copyright ( C ) 1993 Christian - Albrechts - Universitaet zu Kiel , Germany ;;;----------------------------------------------------------------------------- Projekt : APPLY - A Practicable And Portable Lisp Implementation ;;; ...
null
https://raw.githubusercontent.com/hoelzl/Clicc/cea01db35301144967dc74fd2f96dd58aa52d6ea/src/compiler/clisp-compat.lisp
lisp
----------------------------------------------------------------------------- ----------------------------------------------------------------------------- ------------------------------------------------------ Funktion : defpackage Initial revision --------------------------------------------------...
Copyright ( C ) 1993 Christian - Albrechts - Universitaet zu Kiel , Germany Projekt : APPLY - A Practicable And Portable Lisp Implementation $ Revision : 1.4 $ $ Log : , v $ Revision 1.4 1993/08/31 09:31:47 die 22Aug93 Version vorgenommen . Revision 1.3 1993/06/17 08:00:09 hk ein...
dacdf0c5abce17dcbc44d1fa3213363725713ad5d1b3608e6f0b34cc6fd0a741
autolwe/autolwe
Test_Type.ml
open Type open OUnit let test_type _ = let tv = Lenvar.mk "l" in Format.printf "tyvar: %a\n" Lenvar.pp tv; let ty1_a = mk_ty (BS tv) in let ty1 = mk_ty (Prod [ty1_a; ty1_a]) in restart the program and load from storage . let ty2_a = mk_ty (BS tv) in let ty2 = mk_ty (Prod [ty2_a; ty2_a]) in (* create th...
null
https://raw.githubusercontent.com/autolwe/autolwe/3452c3dae06fc8e9815d94133fdeb8f3b8315f32/src/Test/Test_Type.ml
ocaml
create the same type ty1 not equal ty2 ety1 equal ety2
open Type open OUnit let test_type _ = let tv = Lenvar.mk "l" in Format.printf "tyvar: %a\n" Lenvar.pp tv; let ty1_a = mk_ty (BS tv) in let ty1 = mk_ty (Prod [ty1_a; ty1_a]) in restart the program and load from storage . let ty2_a = mk_ty (BS tv) in Format.printf "ty1=%a, ty2=%a, equal=%b \n" pp_ty t...
ce251546d37897453dd1c980ed6b78d5623945b3a8d081f887b8ac0d2ee37698
facebook/flow
cache_test.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/common/utils/__tests__/cache_test.ml
ocaml
Without the sleeps I (nmote) observed a spurious failure of this test, since * eviction is based on last time of access. A few 1 ms sleeps should be more than * enough time to avoid spurious failures, but not enough to noticeably affect the * runtime of the tests. This will evict ...
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
024b2308badd4308eb4735430a3c9be8208d85b02efb11cbb320521951c5fd33
khibino/haskell-invertible-syntax-poly
Instances.hs
# LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # -- | Module : Text . Syntax . . Instances Copyright : 2012 -- License : BSD3 -- -- Maintainer : -- Stability : experimental -- Portability : unknown -- This module contains basic parsers instances for ' Syntax ' . module Text.Sy...
null
https://raw.githubusercontent.com/khibino/haskell-invertible-syntax-poly/03409b9d5f7767f33863ea8ae8b6787ddf99e29a/src/Text/Syntax/Parser/Instances.hs
haskell
| License : BSD3 Maintainer : Stability : experimental Portability : unknown
# LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # Module : Text . Syntax . . Instances Copyright : 2012 This module contains basic parsers instances for ' Syntax ' . module Text.Syntax.Parser.Instances () where import Control.Isomorphism.Partial (IsoFunctor((<$>))) import Control.Mona...
81cd16bd968ef3fd6477dec86695f41d531867c43a751900bdbc1062741947b9
adityaathalye/sicp
ex2-05-arithmetic-cons.scm
Ex . 2.5 Define cons , car , cdr in terms of 2^a * 3^b (define (cons a b) (* (expt 2 a) (expt 3 b))) (define (car x) (define (iter result) (if (= (modulo result 3) 0) (iter (/ result 3)) (/ (log result) (log 2)))) (iter x)) (define (cdr x) (define (iter result) (if (= (mo...
null
https://raw.githubusercontent.com/adityaathalye/sicp/c8b62c366dade1d5101238a32267dab177808105/ex2-05-arithmetic-cons.scm
scheme
Test results: Value : 7 . Value : 12.999999999999998
Ex . 2.5 Define cons , car , cdr in terms of 2^a * 3^b (define (cons a b) (* (expt 2 a) (expt 3 b))) (define (car x) (define (iter result) (if (= (modulo result 3) 0) (iter (/ result 3)) (/ (log result) (log 2)))) (iter x)) (define (cdr x) (define (iter result) (if (= (mo...
e8664d363d2e0d3752b718760dfd1ceac98ccc8d4a50be0bf8f2a010336293ac
lisp/de.setf.utility
profiler.lisp
;;; -*- Package: de.setf.utility.implementation; -*- ;;; test utilities (in-package :de.setf.utility.implementation) (eval-when (:compile-toplevel :load-toplevel :execute) (unless (intersection '(:digitool :clozure) *features*) (cerror "Continue anyway." "This file must be conditionalized for ~a." (lisp-imple...
null
https://raw.githubusercontent.com/lisp/de.setf.utility/782cd79d99ebf40deeed60c492be9873bbe42a15/test/profiler.lisp
lisp
-*- Package: de.setf.utility.implementation; -*- test utilities emulate reinitialize-instance by observation by observation (defun test-fm (arg1 arg2) (+ arg1 arg2))
(in-package :de.setf.utility.implementation) (eval-when (:compile-toplevel :load-toplevel :execute) (unless (intersection '(:digitool :clozure) *features*) (cerror "Continue anyway." "This file must be conditionalized for ~a." (lisp-implementation-type)))) (modpackage :de.setf.utility (:export :*function-p...
74192a991c59ba3615b7bef81ebca4af1951607beb2555c3bbec65f49d005392
dbuenzli/webs
formality.ml
--------------------------------------------------------------------------- Copyright ( c ) 2020 The webs programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) ...
null
https://raw.githubusercontent.com/dbuenzli/webs/87cc41038f75f39b704eb14cb8b76d34664b8b0f/examples/formality.ml
ocaml
--------------------------------------------------------------------------- Copyright ( c ) 2020 The webs programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) ...
99aaa8ff6357942c92fac4b2272f8f01e8e558fe2257bb5101da016ececc6b5d
habit-lang/alb
Analyzer.hs
module Analyzer ( emptyFixities , module Analyzer.FunctionalNotation , module Analyzer.Desugaring , module Analyzer.Fixity , module Analyzer.LabeledFields , module Analyzer.Tuples , module Analyzer.Freshening) where import Analyzer.FunctionalNotation import Analyzer.Desugaring import Analyz...
null
https://raw.githubusercontent.com/habit-lang/alb/567d4c86194a884cc1ceeffca9663211de2d554c/src/Analyzer.hs
haskell
module Analyzer ( emptyFixities , module Analyzer.FunctionalNotation , module Analyzer.Desugaring , module Analyzer.Fixity , module Analyzer.LabeledFields , module Analyzer.Tuples , module Analyzer.Freshening) where import Analyzer.FunctionalNotation import Analyzer.Desugaring import Analyz...
73e95de89f0629ea0352bee06096ca2388b4e331e9ef671c04294954c1abb73d
achirkin/vulkan
VK_KHR_get_display_properties2.hs
# OPTIONS_GHC -fno - warn - orphans # # OPTIONS_HADDOCK not - home # {-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleInstances # # LANGUAGE ForeignFunctionInterface # {-# LANGUAGE MagicHash #-} {-# LANGUAGE PatternSynonyms #-} {-# LA...
null
https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_KHR_get_display_properties2.hs
haskell
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE MagicHash # # LANGUAGE PatternSynonyms # # LANGUAGE Strict # # LANGUAGE TypeFamilies # # LANGUAGE ViewPatterns # | supported: @vulkan@ contact: @James Jones @cuba...
# OPTIONS_GHC -fno - warn - orphans # # OPTIONS_HADDOCK not - home # # LANGUAGE FlexibleInstances # # LANGUAGE ForeignFunctionInterface # module Graphics.Vulkan.Ext.VK_KHR_get_display_properties2 * Vulkan extension : @VK_KHR_get_display_properties2@ module Graphics.Vulkan.Marshal, AHardwareBuffer(), ...
adc7eaaa93dfb786dbb0b95a7325c5b1fcc2d379d9313fee4435cb31ad807ec7
flosell/lambdacd
matchers.clj
(ns lambdacd.testsupport.matchers) (defn map-containing [expected m] (and (every? (set (keys m)) (keys expected)) (every? #(= (m %)(expected %)) (keys expected))))
null
https://raw.githubusercontent.com/flosell/lambdacd/e9ba3cebb2d5f0070a2e0e1e08fc85fc99ee7135/test/clj/lambdacd/testsupport/matchers.clj
clojure
(ns lambdacd.testsupport.matchers) (defn map-containing [expected m] (and (every? (set (keys m)) (keys expected)) (every? #(= (m %)(expected %)) (keys expected))))
012b06676cefe079307e23992e3b68676126080c4c7d14f8965ea85710d3037f
sarabander/p2pu-sicp
2.66.scm
From the book ( searches linear sets ) (define (lookup given-key set-of-records) (cond ((null? set-of-records) false) ((equal? given-key (key (car set-of-records))) (car set-of-records)) (else (lookup given-key (cdr set-of-records))))) ;; -------------------------- (define alphabet-record (list->tree '((1 ...
null
https://raw.githubusercontent.com/sarabander/p2pu-sicp/fbc49b67dac717da1487629fb2d7a7d86dfdbe32/2.3/2.66.scm
scheme
-------------------------- New lookup for binary trees '(1 'a) #f #f
From the book ( searches linear sets ) (define (lookup given-key set-of-records) (cond ((null? set-of-records) false) ((equal? given-key (key (car set-of-records))) (car set-of-records)) (else (lookup given-key (cdr set-of-records))))) (define alphabet-record (list->tree '((1 'a) (3 'c) (4 'd) (7 'g) (8 'h...
131892284427cab0ac056326b390a1bf728f3f107c3b1a7e4293ca3c87843150
ghcjs/ghcjs-base
WebSocket.hs
# LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE InterruptibleFFI # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE MagicHash # {-# LANGUAGE UnliftedFFITypes #-} # LANGUAGE GHCForeignImportPrim # # LANGUAGE UnboxedTuples # module JavaScript.Web.WebSocket ( W...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-base/18f31dec5d9eae1ef35ff8bbf163394942efd227/JavaScript/Web/WebSocket.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE OverloadedStrings # # LANGUAGE UnliftedFFITypes # ^ called when the connection closes (at most once) ^ called for each message instance IsJSVal WebSocket | create a WebSocket fixme | close a websocket and release the callbacks -----------------------------------------...
# LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # # LANGUAGE InterruptibleFFI # # LANGUAGE MagicHash # # LANGUAGE GHCForeignImportPrim # # LANGUAGE UnboxedTuples # module JavaScript.Web.WebSocket ( WebSocket , WebSocketRequest(..) , ReadySt...
0e51ff3f3e8e972360e84aa81bac1217fab21e6a68ef4a3c7ea91e24e78f24e4
mbg/hoop
Expr2.hs
# LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # # LANGUAGE ExistentialQuantification # # LANGUAGE MultiParamTypeClasses # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE PolyKinds # # LANGUAGE TypeFamilies # # LANGUAGE FunctionalDependencies # {-# OPTIONS_GHC -ddump-...
null
https://raw.githubusercontent.com/mbg/hoop/98a53bb1db66b06f9b5d3e5242eed336f908ad18/test/Expr2.hs
haskell
# OPTIONS_GHC -ddump-splices -ddump-to-file # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------
# LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # # LANGUAGE ExistentialQuantification # # LANGUAGE MultiParamTypeClasses # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE PolyKinds # # LANGUAGE TypeFamilies # # LANGUAGE FunctionalDependencies # module Expr2 where i...
dc596edbabd0e5074e68f5b217628beb8c4355f13ab8837a71671739faabd6f7
alasconnect/azure-demo
Todo.hs
module Database.Todo where -------------------------------------------------------------------------------- import Control.Lens import Database.Beam import Database.Beam.Backend.SQL.BeamExtensions import Database.Beam.Postgres import GHC.Stack ---------------------------------------------------------------------------...
null
https://raw.githubusercontent.com/alasconnect/azure-demo/5d16db775ccf3b753f4ef078bad8e9437b844d76/backend/src/Database/Todo.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------
module Database.Todo where import Control.Lens import Database.Beam import Database.Beam.Backend.SQL.BeamExtensions import Database.Beam.Postgres import GHC.Stack import Database import Models.Todo allTodos :: (HasCallStack, MonadIO m) => Connection -> m [Todo] allTodos conn = liftIO $ runBeamPostgres conn $ ru...
11029415b321427ed17f8cbbb3b9b122407d1f4a5fe10abeac8ab2610efb66de
mirage/irmin
pack_index_intf.ml
* Copyright ( c ) 2018 - 2022 Tarides < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS...
null
https://raw.githubusercontent.com/mirage/irmin/9127c0c0ac3ee28563f55d9c2d8471919087e30c/src/irmin-pack/unix/pack_index_intf.ml
ocaml
* An abstraction on top of the index library that exposes an API that better fits the irmin-pack use case.
* Copyright ( c ) 2018 - 2022 Tarides < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS...
85e4fddb89ff88faf69749c4d5a7f7070c0c41085c72958bad7e60fccdb050b3
BekaValentine/SimpleFP-v2
Telescope.hs
{-# OPTIONS -Wall #-} # LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE FlexibleContexts # -- | This module defines telescopes. module Utils.Telescope where import Utils.ABT import Utils.Vars import Data.Functor.Classes import Data.List (inits) -- | A ...
null
https://raw.githubusercontent.com/BekaValentine/SimpleFP-v2/ae00ec809caefcd13664395b0ae2fc66145f6a74/src/Utils/Telescope.hs
haskell
# OPTIONS -Wall # # LANGUAGE DeriveTraversable # | This module defines telescopes. | A telescope is a series of binders. This is used for constructions that have iterated binding with no ultimate scope, such as record types. | It's often the case that we need to instantiate a telescope of scopes with a sequence of...
# LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE FlexibleContexts # module Utils.Telescope where import Utils.ABT import Utils.Vars import Data.Functor.Classes import Data.List (inits) data Telescope a = Telescope [a] deriving (Functor,Foldable,Traversable) instance Eq1 Telescop...
a73ec487dd162672a4338a30c1c07901bfa46ace3a44499cdd8fb832af39c795
tsoding/HyperNerd
Replies.hs
# LANGUAGE QuasiQuotes # {-# LANGUAGE OverloadedStrings #-} module Bot.Replies where import Data.Aeson import qualified Data.ByteString.Lazy as BS import Data.Functor import qualified Data.Map as M import Data.Maybe import Data.Proxy import qualified Data.Text as T import Effect import Entity import HyperNerd.Comonad...
null
https://raw.githubusercontent.com/tsoding/HyperNerd/5322580483c5c05179bc455a6f94566d398bccdf/src/Bot/Replies.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes # module Bot.Replies where import Data.Aeson import qualified Data.ByteString.Lazy as BS import Data.Functor import qualified Data.Map as M import Data.Maybe import Data.Proxy import qualified Data.Text as T import Effect import Entity import HyperNerd.Comonad import Network.HTTP.Simple (getRes...
80b020391ecdd393d6abcc8cb428aa5e73bf30035242715181688d71a3a880ca
spawnfest/eep49ers
wxSystemOptions.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2020 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxSystemOptions.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 2008 - 2020 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(wxSystemOptions). -include("wxe.hrl"). -export([getOption/1,getOptionInt/1,hasOption/1,isFalse/1,setOption/2...
5083dc1f430ead1b9dc96762143b3034f51916c97b8e40699dc96e4f668f3fa0
mvdcamme/meta-tracing-JIT
fib.scm
(begin (define (fib n) (if (< n 2) n (+ (fib (- n 1)) (fib (- n 2))))) (fib 10))
null
https://raw.githubusercontent.com/mvdcamme/meta-tracing-JIT/640af917e473f3793ab12791dcb2c80f617b8a0d/benchmarks/fib.scm
scheme
(begin (define (fib n) (if (< n 2) n (+ (fib (- n 1)) (fib (- n 2))))) (fib 10))
81a2a22d4a127fdfceedd9b840278581ee49f2294af9cf9dd82e05314bd90be3
jabber-at/ejabberd
ejabberd_piefxis.erl
%%%---------------------------------------------------------------------- %%% File : ejabberd_piefxis.erl Author : , , Purpose : XEP-0227 : Portable Import / Export Format for XMPP - IM Servers Created : 17 Jul 2008 by > %%% %%% ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne %%% %%% This p...
null
https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/src/ejabberd_piefxis.erl
erlang
---------------------------------------------------------------------- File : ejabberd_piefxis.erl This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without e...
Author : , , Purpose : XEP-0227 : Portable Import / Export Format for XMPP - IM Servers Created : 17 Jul 2008 by > ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of ...
c4e4d3a224ab858afaa8ce3362cb74a975a2822ad77b9e92638d6471ac8e0d17
glebec/haskell-programming-allen-moronuki
Ex26_14.Hit.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # module Ex26_14.Hit where import Control.Monad.IO.Class import Control.Monad.Trans.Class import Control.Monad.Trans.Reader import Data.IORef import qualified Data.Map as M import Data.Maybe (fromMaybe) import Data.Text.Lazy (Text) import qualified Da...
null
https://raw.githubusercontent.com/glebec/haskell-programming-allen-moronuki/99bd232f523e426d18a5e096f1cf771228c55f52/26-monad-transformers/Ex26_14.Hit.hs
haskell
# LANGUAGE OverloadedStrings # counts <- lift $ asks counts prefix <- lift $ asks prefix
# LANGUAGE ScopedTypeVariables # module Ex26_14.Hit where import Control.Monad.IO.Class import Control.Monad.Trans.Class import Control.Monad.Trans.Reader import Data.IORef import qualified Data.Map as M import Data.Maybe (fromMaybe) import Data.Text.Lazy (Text) import qualified Data.Text.Lazy as TL import System.En...
a3838e1f67e696ac8082bde4949259a68a976f1ca68a312f3690c7c6c0bd78a9
mpardalos/Kima
ArgumentParser.hs
module ArgumentParser (Command(..), RunOpts, CompileOpts, DumpStage(..), getCommand, getCommand') where import Options.Applicative -- | Top-level commands in the CLI data Command = Run RunOpts FilePath | Compile CompileOpts FilePath | Dump DumpStage FilePath | Repl deriving Show -- | Op...
null
https://raw.githubusercontent.com/mpardalos/Kima/2d9bfb44d873795108789910c4b374059786c0e4/app/ArgumentParser.hs
haskell
| Top-level commands in the CLI | Options relating to running (interpreting) code | Options relating to compiling code | Where to write the compiled output. Can be omitted | Top-level command parser
module ArgumentParser (Command(..), RunOpts, CompileOpts, DumpStage(..), getCommand, getCommand') where import Options.Applicative data Command = Run RunOpts FilePath | Compile CompileOpts FilePath | Dump DumpStage FilePath | Repl deriving Show data RunOpts = RunOpts deriving Show ...
010932e1b2df6bce1c19102683ec9bc4245bfc0961380ff4ab1520cf1f7cf368
clojure-interop/google-cloud-clients
EventServiceStubSettings$Builder.clj
(ns com.google.cloud.talent.v4beta1.stub.EventServiceStubSettings$Builder "Builder for EventServiceStubSettings." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.talent.v4beta1.stub EventServiceStubSettings$Builder])) (defn apply-to-all-unary-methods "Applies the given settings upda...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.talent/src/com/google/cloud/talent/v4beta1/stub/EventServiceStubSettings%24Builder.clj
clojure
(ns com.google.cloud.talent.v4beta1.stub.EventServiceStubSettings$Builder "Builder for EventServiceStubSettings." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.talent.v4beta1.stub EventServiceStubSettings$Builder])) (defn apply-to-all-unary-methods "Applies the given settings upda...
0e13e0ab4c87c6b27de5531e9500b39989cd6db7816bb36e169b63715bd1d7fc
nasa/Common-Metadata-Repository
response.clj
(ns cmr.http.kit.response "This namespace defines a default set of transform functions suitable for use in presenting results to HTTP clients. Note that ring-based middleware may take advantage of these functions either by single use or composition." (:require [cheshire.core :as json] [cheshire.generat...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/3215ee6945cb1fa82499c3c3d74841c3284eec6e/other/cmr-exchange/http-kit-support/src/cmr/http/kit/response.clj
clojure
XXX This is currently broken ... with a stackoverflow error. The issue is turn calls soft-reference->json!, when attempting to encode a soft- generating function instead of the API-level one. Handlers for extracting different fields from general-response-handler
(ns cmr.http.kit.response "This namespace defines a default set of transform functions suitable for use in presenting results to HTTP clients. Note that ring-based middleware may take advantage of these functions either by single use or composition." (:require [cheshire.core :as json] [cheshire.generat...
a9be5a7723019f547d5c717308efde5c0dbba07552e7a8b4642e48b4ca341f94
dfordivam/tenjinreader
SrsDB.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE TemplateHaskell # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE StandaloneDeriving # {-# LANGUAGE TypeSynonymInstances #-} # LANGUAG...
null
https://raw.githubusercontent.com/dfordivam/tenjinreader/894a6f6b23d52c9c048740c0ea62f4c0f47d9561/backend/src/SrsDB.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # # LANGUAGE DeriveAnyClass # # LANGUAGE TypeSynonymInstances # An Srs Item may not have an entry in this map instance Binary (ReaderDocumentOldTree t)
# LANGUAGE TemplateHaskell # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE StandaloneDeriving # # LANGUAGE FlexibleInstances # # LANGUAGE TypeFamilies # module SrsDB where import Common import KanjiDB () import Control.Applicative ((<$>)) import Control.Lens import Data...
e4ea9dc782adbb9f9583793728e8cb233ae0de743bbfffb5e94e940d1b47439a
DuoSRX/ocamnes
memory.ml
open Core type t = { ppu : Ppu.t; mapper : Mapper.t; ram : int array; } let make ~mapper ~ppu = { ppu; mapper; ram = Array.create ~len:0x800 0; } let load m address = if address < 0x2000 then m.ram.(address land 0x7FF) else if (address lsr 13) = 1 then Ppu.read_register m.ppu (0x2000 + ...
null
https://raw.githubusercontent.com/DuoSRX/ocamnes/58886a3f327516dcab9622637afac14c3c50738a/lib/memory.ml
ocaml
open Core type t = { ppu : Ppu.t; mapper : Mapper.t; ram : int array; } let make ~mapper ~ppu = { ppu; mapper; ram = Array.create ~len:0x800 0; } let load m address = if address < 0x2000 then m.ram.(address land 0x7FF) else if (address lsr 13) = 1 then Ppu.read_register m.ppu (0x2000 + ...
5c3d602bee3ee6093b1554991872da7eb3c7fc37dfbb7c1683e10dcc7bb87716
spawnfest/eep49ers
test1.erl
-module(test1). -copyright('Copyright (c) 1991-97 Ericsson Telecom AB'). -vsn('$Revision: /main/release/2 $'). -compile(export_all). -warning("a warning"). f1() -> true. f2() -> true.
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/tools/test/make_SUITE_data/test1.erl
erlang
-module(test1). -copyright('Copyright (c) 1991-97 Ericsson Telecom AB'). -vsn('$Revision: /main/release/2 $'). -compile(export_all). -warning("a warning"). f1() -> true. f2() -> true.
4596e79315346733f65a6f57951ab5606291a5f647d53e934ed753736d674e7b
reagent-project/reagent
util_test.cljs
(ns reagent.impl.util-test (:require [clojure.test :refer [deftest is testing]] [reagent.debug :refer [dev?]] [reagent.core :as r] [reagent.impl.util :as util])) (deftest class-names-test (is (= nil (r/class-names) (r/class-names nil) (r/class-names []...
null
https://raw.githubusercontent.com/reagent-project/reagent/9c4826560ca351d6832dc253d5a9adaf64bc022a/test/reagent/impl/util_test.cljs
clojure
(simple-benchmark [] (do (util/class-names "a" "b") (util/class-names nil "a") (util/class-names "a" nil)) (simple-benchmark [] (util/class-names "a" "b" nil "c" "d") Test all IFn arities TODO: What should happen in this case?
(ns reagent.impl.util-test (:require [clojure.test :refer [deftest is testing]] [reagent.debug :refer [dev?]] [reagent.core :as r] [reagent.impl.util :as util])) (deftest class-names-test (is (= nil (r/class-names) (r/class-names nil) (r/class-names []...
ab29642e1899f1d4b2d8ae51cecb50320582e15631298e02c1e01f5bbd8aedbe
sweet-tooth-clojure/endpoint
utils_test.cljc
(ns sweet-tooth.endpoint.utils-test (:require [sweet-tooth.endpoint.utils :as sut] #?(:clj [clojure.test :refer [deftest testing is]] :cljs [cljs.test :refer [deftest testing is] :include-macros true]))) (deftest handler #?(:clj (testing "returns a var for clj" (is (= handler...
null
https://raw.githubusercontent.com/sweet-tooth-clojure/endpoint/bafe8448b26aefa4b44d2bf7fe2f9c565cfad414/test/sweet_tooth/endpoint/utils_test.cljc
clojure
(ns sweet-tooth.endpoint.utils-test (:require [sweet-tooth.endpoint.utils :as sut] #?(:clj [clojure.test :refer [deftest testing is]] :cljs [cljs.test :refer [deftest testing is] :include-macros true]))) (deftest handler #?(:clj (testing "returns a var for clj" (is (= handler...
986ec4a628f020218aa4d16b37806b52fdbd01f7d3fb3a8bc2e8aae79f446047
bragful/ephp
ephp_lib_exec.erl
-module(ephp_lib_exec). -author(''). -behaviour(ephp_lib). -export([init_func/0, init_config/0, init_const/0, handle_error/3, shell_exec/3]). -include("ephp.hrl"). -spec init_func() -> ephp_lib:php_function_results(). init_func() -> [{shell_exec, [{args, [string]}]}]. -spec init_config() -> ephp_lib:php_confi...
null
https://raw.githubusercontent.com/bragful/ephp/119f1760a5cdf4c8b6a01739e852c7183af7acff/src/ephp_lib_exec.erl
erlang
TODO: give more security to this and ensure it's not disabled
-module(ephp_lib_exec). -author(''). -behaviour(ephp_lib). -export([init_func/0, init_config/0, init_const/0, handle_error/3, shell_exec/3]). -include("ephp.hrl"). -spec init_func() -> ephp_lib:php_function_results(). init_func() -> [{shell_exec, [{args, [string]}]}]. -spec init_config() -> ephp_lib:php_confi...
84546f66d8a80b714c7c1f7b30c0b419db2745805c3860707fc9b95d56a44e3e
screenshotbot/screenshotbot-oss
test-recent-runs.lisp
;;;; Copyright 2018-Present Modern Interpreters Inc. ;;;; This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (pkg:define-package :screenshotbot/dashboard/test-recent-runs (:use #:cl ...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/0dc4627a08a251f86f306a47098e8ff8463146cb/src/screenshotbot/dashboard/test-recent-runs.lisp
lisp
Copyright 2018-Present Modern Interpreters Inc.
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (pkg:define-package :screenshotbot/dashboard/test-recent-runs (:use #:cl #:alexandria #:fiveam #:screenshotbo...
f20c44b90a8a4ed16be78c7b59f997a6c6cd82b83839e14a44c103e84a51f169
RichiH/git-annex
Progress.hs
git - annex progress output - - Copyright 2010 - 2015 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2010-2015 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} # LANGUAGE CPP # module Messages.Progress where import Common import Messages import Util...
null
https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Messages/Progress.hs
haskell
} Use when the command's own progress output is preferred. - The command's output will be suppressed and git-annex's progress meter - used for concurrent output, and json progress. Poll file size to display meter, but only when concurrent output or - json progress needs the information. Progress dots. Runs a ...
git - annex progress output - - Copyright 2010 - 2015 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2010-2015 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} # LANGUAGE CPP # module Messages.Progress where import Common import Messages import Util...
f27f7949b5f59e4de6211a91889c3c375bbcfa5753d736c40397f3c652d27614
ArulselvanMadhavan/haskell-first-principles
FixTheCode.hs
module FixTheCode where import Control.Monad import Control.Monad.Trans.Maybe isValid :: String -> Bool isValid v = '!' `elem` v maybeExcite :: MaybeT IO String maybeExcite = MaybeT $ do v <- getLine guard $ isValid v return $ Just v doExcite :: IO () doExcite = do putStrLn "say ...
null
https://raw.githubusercontent.com/ArulselvanMadhavan/haskell-first-principles/06e0c71c502848c8e75c8109dd49c0954d815bba/chapter26/src/FixTheCode.hs
haskell
module FixTheCode where import Control.Monad import Control.Monad.Trans.Maybe isValid :: String -> Bool isValid v = '!' `elem` v maybeExcite :: MaybeT IO String maybeExcite = MaybeT $ do v <- getLine guard $ isValid v return $ Just v doExcite :: IO () doExcite = do putStrLn "say ...
215d5e548afcf99e474a33992029e583db976c7a459765f766a708b34aa3d48a
bboston7/racpete
state.rkt
#lang racket (require racket/serialize) (provide define-state sstruct) (define-syntax-rule (sstruct id ...) (serializable-struct id ...)) #| Utility for managing state. |# (struct blank ()) ;; We need to use (hash-copy) because (read) returns an immutable hash table, ; and we need an immutable one. (def...
null
https://raw.githubusercontent.com/bboston7/racpete/6bc173261a81aa3dfbfe7b734c12a8d04a001a7e/src/util/state.rkt
racket
Utility for managing state. We need to use (hash-copy) because (read) returns an immutable hash table, and we need an immutable one.
#lang racket (require racket/serialize) (provide define-state sstruct) (define-syntax-rule (sstruct id ...) (serializable-struct id ...)) (struct blank ()) (define (load-state) (with-handlers ([exn:fail? (lambda (x) (make-hash))]) (deserialize (with-input-from-file "state" read)))) (d...
591c971f6b8e536a50cc051171ce898f6ddf431a37ecbde0cec71d17bc54ca75
mhjort/clj-gatling
short_summary.clj
(ns clj-gatling.reporters.short-summary (:require [clojure.set :refer [rename-keys]])) (def generator (fn [_] {:generate identity :as-str (fn [{:keys [ok ko] :or {ko 0 ok 0}}] (let [total (+ ok ko)] (str "Total number of requests: " total ...
null
https://raw.githubusercontent.com/mhjort/clj-gatling/f59f5948d4a90fd5e6b3ecbcd8d779835041dfd7/src/clj_gatling/reporters/short_summary.clj
clojure
TODO Simulation should not return nil (it should return false instead)
(ns clj-gatling.reporters.short-summary (:require [clojure.set :refer [rename-keys]])) (def generator (fn [_] {:generate identity :as-str (fn [{:keys [ok ko] :or {ko 0 ok 0}}] (let [total (+ ok ko)] (str "Total number of requests: " total ...
3e2ee14d1052bafefa09a8e6030814435557fcaafc3cf7bea8d7c10b1799d15d
ralexstokes/stoken
rpc.clj
(ns io.stokes.rpc (:require [com.stuartsierra.component :as component] [org.httpkit.server :as http] [compojure.core :as compojure] [crypto.random :as rand] [clojure.data.json :as json] [io.stokes.block :as block] [io.stokes.transaction :as trans...
null
https://raw.githubusercontent.com/ralexstokes/stoken/b88adb36ffa1e9f3099925634eb1f98beb986442/src/io/stokes/rpc.clj
clojure
(ns io.stokes.rpc (:require [com.stuartsierra.component :as component] [org.httpkit.server :as http] [compojure.core :as compojure] [crypto.random :as rand] [clojure.data.json :as json] [io.stokes.block :as block] [io.stokes.transaction :as trans...
ded3809bdddb359f4b20758a414a294ab72f77c35925689fab65b301f1ea7803
patrikja/AFPcourse
Families.hs
# LANGUAGE TypeFamilies , GADTs # module Families where type Nat = Int The " " function can be simulated using type families type family Silly n :: * type instance Silly Zero = Bool type instance Silly (Suc Zero) = Nat type instance Silly (Suc (Suc n)) = (Silly n , Silly (Suc n)) -- But note tha...
null
https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/L13/after/src/2015/Families.hs
haskell
But note that the argument n is a type, not a natural number. Thus we cannot pattern match on it to define "silly". Some simple functions Does the definition look familiar? We have no predefined addition types, so we have to define it Nothing is stopping us from strange cases Exercise: implement Fin and vector ...
# LANGUAGE TypeFamilies , GADTs # module Families where type Nat = Int The " " function can be simulated using type families type family Silly n :: * type instance Silly Zero = Bool type instance Silly (Suc Zero) = Nat type instance Silly (Suc (Suc n)) = (Silly n , Silly (Suc n)) The family ...
a87ea6d3d0c57f26b83d5318942d5f8b5a2882d7c0e35cc3dac6dbce8ac57983
rd--/hsc3
latch.help.hs
-- latch ; sample & hold let n = whiteNoiseId 'α' ar i = impulse ar 9 0 l = latch n i in blip ar (l * 400 + 500) 4 * 0.2 latch ; c.f . LFNoise0 let n1 = latch (whiteNoiseId 'α' ar) (impulse ar 9 0) n2 = lfNoise0Id 'α' kr 9 in blip ar (mce2 n1 n2 * 400 + 500) 4 * 0.2 -- latch ; -users/2006-December/02999...
null
https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/latch.help.hs
haskell
latch ; sample & hold latch ; -users/2006-December/029991.html latch ; density control for sample and hold of noise signal -- ; drawings
let n = whiteNoiseId 'α' ar i = impulse ar 9 0 l = latch n i in blip ar (l * 400 + 500) 4 * 0.2 latch ; c.f . LFNoise0 let n1 = latch (whiteNoiseId 'α' ar) (impulse ar 9 0) n2 = lfNoise0Id 'α' kr 9 in blip ar (mce2 n1 n2 * 400 + 500) 4 * 0.2 let n0 = lfNoise2Id 'α' kr 8 n1 = lfNoise2Id 'β' kr 3 ...
f8dec2a47a071133afb4ba2b9e38c57c3fa45684c59d122a129bd83698598e8a
typelead/etlas
InstalledPreference.hs
module Distribution.Solver.Types.InstalledPreference ( InstalledPreference(..), ) where -- | Whether we prefer an installed version of a package or simply the latest -- version. -- data InstalledPreference = PreferInstalled | PreferLatest deriving Show
null
https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas/Distribution/Solver/Types/InstalledPreference.hs
haskell
| Whether we prefer an installed version of a package or simply the latest version.
module Distribution.Solver.Types.InstalledPreference ( InstalledPreference(..), ) where data InstalledPreference = PreferInstalled | PreferLatest deriving Show
56f42a5e09bd881912f9f0e65df8e034f53d48e31d1b61cf5b66c0951bd68ce2
hurryabit/pukeko
Language.hs
module Pukeko.AST.Language ( Surface , PreTyped , Typed , Unnested , Unclassy , SystemF , SuperCore , TypeOf , DictOf , IsPreTyped , IsTyped , IsNested , IsClassy , IsLambda , HasTmAbs , HasTyApp , HasTyAbs , HasDxApp , HasDxAbs ) where import Pukeko.Prelude import Data.Kind...
null
https://raw.githubusercontent.com/hurryabit/pukeko/d11a101a41123c5151bcdd7dd2d0ef53c65483c2/src/Pukeko/AST/Language.hs
haskell
module Pukeko.AST.Language ( Surface , PreTyped , Typed , Unnested , Unclassy , SystemF , SuperCore , TypeOf , DictOf , IsPreTyped , IsTyped , IsNested , IsClassy , IsLambda , HasTmAbs , HasTyApp , HasTyAbs , HasDxApp , HasDxAbs ) where import Pukeko.Prelude import Data.Kind...
ea9eefceb19e05c81b2411c4808e69083daf4d3d44ac214fba57a26a86ecfcfb
jeapostrophe/exp
new-testament.rkt
#lang racket/base (require racket/list racket/match racket/pretty) (define nt '((Mark 16 45 28 35 41 43 56 37 38 50 52 33 44 37 72 47 20 0 0 0 0 0 0 0 0 0 0 0 0 678) (Matt 28 25 23 17 25 48 34 29 34 38 42 30 50 58 36 39 28 27 35 30 34...
null
https://raw.githubusercontent.com/jeapostrophe/exp/43615110fd0439d2ef940c42629fcdc054c370f9/new-testament.rkt
racket
vr verses-per-week) cs))]
#lang racket/base (require racket/list racket/match racket/pretty) (define nt '((Mark 16 45 28 35 41 43 56 37 38 50 52 33 44 37 72 47 20 0 0 0 0 0 0 0 0 0 0 0 0 678) (Matt 28 25 23 17 25 48 34 29 34 38 42 30 50 58 36 39 28 27 35 30 34...
e5426937fb40770a0117e5b7d9b73b0e548abdac8fb49b3b50e6c92f0308409f
swift-nav/plover
Print.hs
# LANGUAGE PatternSynonyms # -- Print a C ast module Language.Plover.Print where import Data.List (intercalate) import Language.Plover.Types -- Printing output -- flatten :: CExpr -> Either Error Line flatten (Extension _) = return EmptyLine flatten (Declare t var) = return $ LineDecl t var flatten (Vec var bound b...
null
https://raw.githubusercontent.com/swift-nav/plover/3d00d70802c6696ddf0ea71b073def46595e07f0/relics/Print.hs
haskell
Print a C ast Printing output -- Expects input to have a main function; adds includes Strict: requires that the term is fully reduced by compile ppLine _ _ x = error $ "ppline. " ++ show x (a :! b) -> pe a ++ "[" ++ pe b ++ "]"
# LANGUAGE PatternSynonyms # module Language.Plover.Print where import Data.List (intercalate) import Language.Plover.Types flatten :: CExpr -> Either Error Line flatten (Extension _) = return EmptyLine flatten (Declare t var) = return $ LineDecl t var flatten (Vec var bound body) = do body' <- flatten body ret...
dc78796af101a264005d066ed233d85f0aebeeb7f86198f017319819749ed889
elaforge/karya
Map.hs
Copyright 2016 -- This program is distributed under the terms of the GNU General Public -- License 3.0, see COPYING or -3.0.txt module Derive.C.Post.Map (library) where import qualified Derive.Args as Args import qualified Derive.Call.Module as Module import qualified Derive.Call.Post as Post import qualified Deri...
null
https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Derive/C/Post/Map.hs
haskell
This program is distributed under the terms of the GNU General Public License 3.0, see COPYING or -3.0.txt
Copyright 2016 module Derive.C.Post.Map (library) where import qualified Derive.Args as Args import qualified Derive.Call.Module as Module import qualified Derive.Call.Post as Post import qualified Derive.Call.Tags as Tags import qualified Derive.Derive as Derive import qualified Derive.DeriveT as DeriveT import q...
f8c6488f6434ebfa2b2adc5924fd4149412d32c9f989f4e5e08af19c9111f073
eholk/elegant-weapons
helpers.scm
(library (elegant-weapons helpers) (export gensym iota define-match andmap ormap map-values ident? binop? relop? float? scalar-type? c-type? cl-type? join make-begin symbol-append ;; match exports match trace-match match+ trace-match+ ...
null
https://raw.githubusercontent.com/eholk/elegant-weapons/ce51432c614cdba5d2f12c7b5451af01095257a4/lib/elegant-weapons/helpers.scm
scheme
match exports From #./syntax:s11 This abstracts away most of the boilerplate for writing match-based transformations. A little unsafe. Stipulation: make sure the match macro is in the environment everywhere this macro is used.
(library (elegant-weapons helpers) (export gensym iota define-match andmap ormap map-values ident? binop? relop? float? scalar-type? c-type? cl-type? join make-begin symbol-append match trace-match match+ trace-match+ match/lexical-contex...
cb329a16f5fc86d970e5e7415d105ef112b0182e9f9389bf75081ca9ab00cbee
NicklasBoto/funQ
QM.hs
{-# LANGUAGE OverloadedLists #-} {-# LANGUAGE BlockArguments #-} # OPTIONS_HADDOCK not - home # | Module : QM Description : The Quantum Monad Stability : experimental Definition of the quantum monad ( ` QM ` ) and helper functions Module : QM Description : The Quantum Mo...
null
https://raw.githubusercontent.com/NicklasBoto/funQ/9444da05273be215a66044b976d031229d8832fc/src/Lib/QM.hs
haskell
# LANGUAGE OverloadedLists # # LANGUAGE BlockArguments # * QBit * Helpers | Internal index type, to indicate it is a qubit index. | Pointer to a qubit in QState. Represents the linking function in QLambda | The program state, a complex vector representation of the qubits in the system Keeps a sta...
# OPTIONS_HADDOCK not - home # | Module : QM Description : The Quantum Monad Stability : experimental Definition of the quantum monad ( ` QM ` ) and helper functions Module : QM Description : The Quantum Monad Stability : experimental Definition of the quantum monad (`QM`) and helpe...
bad8b438b74060c79b69f0fc1fc0da7a1cc91319e2a098909046d6cda4106a2a
solatis/haskell-bitcoin-api
UTXO.hs
module Network.Bitcoin.Api.UTXO where import Data.Word (Word32) import Data.Maybe (maybeToList) import Data.Aeson import qualified Data.Bitcoin.Types as BT import qualified Network.Bitcoin.Api.Internal as I import qualified Network.Bitcoin...
null
https://raw.githubusercontent.com/solatis/haskell-bitcoin-api/cd4b9757283bdd61b5b4ac922db36bbebc469dea/src/Network/Bitcoin/Api/UTXO.hs
haskell
| Returns details about an unspent transaction output. ^ Our session context ^ Transaction ID of transaction containing output ^ Return transaction outputs from unconfirmed transactions as well? | Returns proof that one or more transactions were included in a block ^ Our session context ^ Transaction IDs to retu...
module Network.Bitcoin.Api.UTXO where import Data.Word (Word32) import Data.Maybe (maybeToList) import Data.Aeson import qualified Data.Bitcoin.Types as BT import qualified Network.Bitcoin.Api.Internal as I import qualified Network.Bitcoin...
320780ad5fb09a06a2072a7555492079cf3ce8390304c75ebda5de9307ea0993
siers/zn
Main.hs
# LANGUAGE OverloadedStrings , TupleSections # module Zn.Commands.URL.Main ( url , format , parseTitle , download , process ) where import Control.Lens import Control.Monad import Control.Monad.Catch import Control.Retry import Data.List import Data.Text (Text, pack, unpack, strip) import Netw...
null
https://raw.githubusercontent.com/siers/zn/b78692910fc5c4c725b3133cb91f5e1e3da94808/src/Zn/Commands/URL/Main.hs
haskell
# LANGUAGE OverloadedStrings , TupleSections # module Zn.Commands.URL.Main ( url , format , parseTitle , download , process ) where import Control.Lens import Control.Monad import Control.Monad.Catch import Control.Retry import Data.List import Data.Text (Text, pack, unpack, strip) import Netw...
ac919a369c4644755a24284b3eee78c336cd867e95970cbdac1368565cc02ba5
may-liu/qtalk
http_get_muc_history_v2.erl
-module(http_get_muc_history_v2). -export([init/3]). -export([handle/2]). -export([terminate/3]). -include("logger.hrl"). -include("http_req.hrl"). -record(domain_info,{max_time = 20000000000 ,users = [],args = []}). init(_Transport, Req, []) -> {ok, Req, undefined}. handle(Req, State) -> catch ejb_monitor:mo...
null
https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/scripts/ejb_http_server/src/http_get_muc_history_v2.erl
erlang
[{obj,[{"Domain",<<"ejabhost1">>},{"Msgs",Msgs},{"Times",Time}]}] [] end,Res3);
-module(http_get_muc_history_v2). -export([init/3]). -export([handle/2]). -export([terminate/3]). -include("logger.hrl"). -include("http_req.hrl"). -record(domain_info,{max_time = 20000000000 ,users = [],args = []}). init(_Transport, Req, []) -> {ok, Req, undefined}. handle(Req, State) -> catch ejb_monitor:mo...
e709692d696f982b455ceec6464f275ebc39a52794dac29103cecd36a1d5f82e
quux00/land-of-lisp-in-clojure
game_test.clj
(ns thornydev.orc.game-test (:use clojure.test thornydev.orc.game thornydev.orc.monsters)) (deftest test-player-dead? (testing "after player init" (init-player) (is (not (player-dead?))) )) (deftest test-get-monster-choice (testing "after monster init" (binding [*monster-num* 3] ...
null
https://raw.githubusercontent.com/quux00/land-of-lisp-in-clojure/2a15a89afa0cd04cf1757ccf7da289031e135165/orc-battle/test/thornydev/orc/game_test.clj
clojure
this one is already dead, so throws exception use reader-form constructor notation should get back the same orc (attacking doesn't change the orc) ensure current strength decreased by amount reported from the monster-attack method so you get a new hydra back from this method
(ns thornydev.orc.game-test (:use clojure.test thornydev.orc.game thornydev.orc.monsters)) (deftest test-player-dead? (testing "after player init" (init-player) (is (not (player-dead?))) )) (deftest test-get-monster-choice (testing "after monster init" (binding [*monster-num* 3] ...
9429a83ae01124cca5961c85f2c76b8ea24686414f1afa74996b22c16e635911
prg-titech/Kani-CUDA
profile.rkt
0 0 0 0 0 0 0 0 0 0 3 3 9 9 3 2 0 1 1 2 0 2 2 0 2 3 3 9 9 3 3 0 9 3 0 1 9 0 1 3 3 3 9 9 3 5 0 10 4 2 1 11 2 1 5 3 3 9 9 3 6 0 18 6 0 2 18 0 2 6 3 3 9 9 3 8 0 19 7 2 2 20 2 2 8 3 3 9 9 3 0 0 81 0 0 0 81 0 0 0 3 3 9 9 3 2 0 82 1 2 0 83 2 0 2 3 3 9 9 3 3 0 90 3 0 1 90 0 1 3 3 3 9 9 3 5 0 91 4 2 1 92 2 1 5 3 3 9 9 3 6 0 99...
null
https://raw.githubusercontent.com/prg-titech/Kani-CUDA/e97c4bede43a5fc4031a7d2cfc32d71b01ac26c4/Emulator/Examples/Diffusion3d/profile.rkt
racket
0 0 0 0 0 0 0 0 0 0 3 3 9 9 3 2 0 1 1 2 0 2 2 0 2 3 3 9 9 3 3 0 9 3 0 1 9 0 1 3 3 3 9 9 3 5 0 10 4 2 1 11 2 1 5 3 3 9 9 3 6 0 18 6 0 2 18 0 2 6 3 3 9 9 3 8 0 19 7 2 2 20 2 2 8 3 3 9 9 3 0 0 81 0 0 0 81 0 0 0 3 3 9 9 3 2 0 82 1 2 0 83 2 0 2 3 3 9 9 3 3 0 90 3 0 1 90 0 1 3 3 3 9 9 3 5 0 91 4 2 1 92 2 1 5 3 3 9 9 3 6 0 99...
4288358d3ecaeda4323cb58ec9b0b99ceff0521382267f25e4cc9c0a631f66d8
1HaskellADay/1HAD
Exercise.hs
module HAD.Y2014.M04.D01.Exercise where data Binary = A Binary | B Binary | Done deriving (Eq, Read, Show) -- | isCyclic Check if the Binary object is cyclic -- -- Examples -- >>> isCyclic $ A $ B $ Done -- -- False -- >>> :{ -- let -- x = A y -- y = B x -- in isCyclic x -- :} -- True -- isCyclic ...
null
https://raw.githubusercontent.com/1HaskellADay/1HAD/3b3f9b7448744f9b788034f3aca2d5050d1a5c73/exercises/HAD/Y2014/M04/D01/Exercise.hs
haskell
| isCyclic Check if the Binary object is cyclic Examples >>> isCyclic $ A $ B $ Done False >>> :{ let x = A y y = B x in isCyclic x :} True
module HAD.Y2014.M04.D01.Exercise where data Binary = A Binary | B Binary | Done deriving (Eq, Read, Show) isCyclic :: Binary -> Bool isCyclic = undefined
2d9355db7f24d22a25d102c3c383c0a07c6faa4ecea6ed83b7f47290cc51a6ad
mbj/stratosphere
ImmunityTimePropertyProperty.hs
module Stratosphere.WAFv2.RuleGroup.ImmunityTimePropertyProperty ( ImmunityTimePropertyProperty(..), mkImmunityTimePropertyProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosp...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/wafv2/gen/Stratosphere/WAFv2/RuleGroup/ImmunityTimePropertyProperty.hs
haskell
module Stratosphere.WAFv2.RuleGroup.ImmunityTimePropertyProperty ( ImmunityTimePropertyProperty(..), mkImmunityTimePropertyProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosp...
b82217b439dab3511f08b1108bcddadeb55b4fd4c7ccf8c9dafdcb67270b579d
paurkedal/ocaml-caqti
bikereg.ml
Copyright ( C ) 2014 - -2022 Petter A. Urkedal < > * * 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 la...
null
https://raw.githubusercontent.com/paurkedal/ocaml-caqti/eca8ecb9fe9679abd6881a4ea3a193a0b1ab1a81/examples/bikereg.ml
ocaml
This is an example of how to use Caqti directly in application code. * This way of defining typed wrappers around queries should also work for * code-generators. This is an example of a custom type, but it is experimental for now. The * alternative is to use plain tuples, as the other queries below, and covertin...
Copyright ( C ) 2014 - -2022 Petter A. Urkedal < > * * 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 la...
07268b091ef46a0ed676f30c1a91e5ad21b3a7029a4323d8058b50b4b5cd471b
raydeejay/cl-microvm
package.lisp
package.lisp (defpackage #:cl-microvm (:use #:cl))
null
https://raw.githubusercontent.com/raydeejay/cl-microvm/65e1d11c251f28198ed199bd2d66aa3cdd34a7c8/package.lisp
lisp
package.lisp (defpackage #:cl-microvm (:use #:cl))
ef9647cdc9905a232f7dbfc5ed4748bc1b550410ec20ec143ae4a57c57e67c1e
chunsj/TH
ch11.lisp
(ql:quickload :cl-ppcre) (defpackage :gdl-ch11 (:use #:common-lisp #:mu #:th #:th.db.imdb)) (in-package :gdl-ch11) ;; onehots (defparameter *onehots* #{}) (setf ($ *onehots* "cat") (tensor '(1 0 0 0))) (setf ($ *onehots* "the") (tensor '(0 1 0 0))) (setf ($ *onehots* "dog") (tensor '(0 0 1...
null
https://raw.githubusercontent.com/chunsj/TH/890f05ab81148d9fe558be3979c30c303b448480/examples/books/gdl/ch11.lisp
lisp
onehots to implement efficient embedding layer, we need row/column selection which is possible by using $index function compare multiplication and embedding layer shortcut (conceptually) now we have indices of words as input this is conceptually real input size instead of large matrix multiplication, we can use ...
(ql:quickload :cl-ppcre) (defpackage :gdl-ch11 (:use #:common-lisp #:mu #:th #:th.db.imdb)) (in-package :gdl-ch11) (defparameter *onehots* #{}) (setf ($ *onehots* "cat") (tensor '(1 0 0 0))) (setf ($ *onehots* "the") (tensor '(0 1 0 0))) (setf ($ *onehots* "dog") (tensor '(0 0 1 0))) (setf...
338edcdcc4dcfd563d3d5cee99bda0d6c8f765fcc074a9416d35d386e05360aa
mathematical-systems/clml
dlarfg.lisp
;;; Compiled by f2cl version: ( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ " " $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 " " $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ " " $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ " " $ I d : f2cl5.l , v 1.197 2008/09/11 15:0...
null
https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/lapack/dlarfg.lisp
lisp
Compiled by f2cl version: Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format double-float))
( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ " " $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 " " $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ " " $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ " " $ I d : f2cl5.l , v 1.197 2008/09/11 15:03:25 rtoy Exp $ " " $ I d :...
bcd2b04fb33df88a276069c9b30d4d1595e0ca4dcc092b3fa85cdb0bcecb4890
well-typed/large-records
R030.hs
#if PROFILE_CORESIZE {-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-} #endif #if PROFILE_TIMING {-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} #endif # LANGUAGE OverloadedLabels # # LANGUAGE RecordWildCards # {-# OPTIONS_GHC -fplugin=Data.Record.Anon.Plugin #-} module Experiment.SetEve...
null
https://raw.githubusercontent.com/well-typed/large-records/78d0966e4871847e2c17a0aa821bacf38bdf96bc/large-records-benchmarks/bench/large-anon/Experiment/SetEvens/Sized/R030.hs
haskell
# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl # # OPTIONS_GHC -ddump-to-file -ddump-timings # # OPTIONS_GHC -fplugin=Data.Record.Anon.Plugin # 00 .. 09
#if PROFILE_CORESIZE #endif #if PROFILE_TIMING #endif # LANGUAGE OverloadedLabels # # LANGUAGE RecordWildCards # module Experiment.SetEvens.Sized.R030 where import Data.Record.Anon.Simple (Record) import qualified Data.Record.Anon.Simple as Anon import Bench.EvensOfSize.Evens030 import Common.RowOfSize.Row030 s...
b64b9781b7456e234b0f7c1c09c72bfebf646fd7c7dac735f95f643af3e47604
brendanhay/gogol
UndeleteProject.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-serviceconsumermanagement/gen/Gogol/ServiceConsumerManagement/Services/TenancyUnits/UndeleteProject.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Attempts to undelete a previously deleted tenant project. The project must be in a DELETED state. There are no guarantees that an undeleted project will be in a fully restored and functional state. Call the @ApplyTenantProjectConf...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
236beaaadbf5f7ffa9054d4e2bba9c4b42e9a72c3c9627620f79c6f1a12187cf
cyverse-archive/DiscoveryEnvironmentBackend
time.clj
(ns donkey.util.time (:require [clj-time.coerce :as tc] [clj-time.format :as tf] [clojure.string :as string])) (defn format-timestamp "Formats a timestamp in a standard format." [timestamp] (if-not (or (string/blank? timestamp) (= "0" timestamp)) (tf/unparse (:date-time tf/formatter...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/Donkey/src/donkey/util/time.clj
clojure
(ns donkey.util.time (:require [clj-time.coerce :as tc] [clj-time.format :as tf] [clojure.string :as string])) (defn format-timestamp "Formats a timestamp in a standard format." [timestamp] (if-not (or (string/blank? timestamp) (= "0" timestamp)) (tf/unparse (:date-time tf/formatter...
b651d205d4473b7cd21c8734f8fe02a9dc0b84c02c71dd8458bce9e09e332df2
jimcrayne/jhc
StablePtr.hs
# OPTIONS_JHC -fno - prelude -fffi -funboxed - tuples # module Foreign.StablePtr( StablePtr(), castStablePtrToPtr, castPtrToStablePtr, newStablePtr, deRefStablePtr, freeStablePtr ) where import Jhc.Prim.Rts import Jhc.IO import Jhc.Type.Ptr import Jhc.Basics data StablePtr a castPtrToStab...
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/lib/haskell-extras/Foreign/StablePtr.hs
haskell
extra box around it.
# OPTIONS_JHC -fno - prelude -fffi -funboxed - tuples # module Foreign.StablePtr( StablePtr(), castStablePtrToPtr, castPtrToStablePtr, newStablePtr, deRefStablePtr, freeStablePtr ) where import Jhc.Prim.Rts import Jhc.IO import Jhc.Type.Ptr import Jhc.Basics data StablePtr a castPtrToStab...
63851bfbc668696306f19b84f159a11da1c785e7dd1546bfb5acc4f48d71c6e7
pNre/Hera
db.ml
open Async open Caqti_async open Caqti_request.Infix open Caqti_type.Std open Core (* Types *) module Types = struct include Types end Queries module Queries = struct (* Types *) let select_subscription = let open Types.Subscription in let encode { id; subscriber_id; type_id; feed_url } = Ok (id...
null
https://raw.githubusercontent.com/pNre/Hera/204a961b3010009fbbb2818cfe2daea8860908e3/hera/db/db.ml
ocaml
Types Types Initialization Subscriptions Market positions Sent items Preferences Database initialization Fetch Insert Delete
open Async open Caqti_async open Caqti_request.Infix open Caqti_type.Std open Core module Types = struct include Types end Queries module Queries = struct let select_subscription = let open Types.Subscription in let encode { id; subscriber_id; type_id; feed_url } = Ok (id, subscriber_id, type_id, ...
0806ccf3e9081d8f093ed3859bb4cac8224b4e6e0c87906c731d726d6ef278f2
lisp/de.setf.xml
namespace.lisp
-*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*- (in-package :xml-query-data-model) (setq xml-query-data-model:*namespace* (xml-query-data-model:defnamespace "/" (:use) (:ni...
null
https://raw.githubusercontent.com/lisp/de.setf.xml/827681c969342096c3b95735d84b447befa69fa6/namespaces/purl-org/vocab/relationship/namespace.lisp
lisp
Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*- (xqdm:find-namespace "/" :if-does-not-exist :load)
(in-package :xml-query-data-model) (setq xml-query-data-model:*namespace* (xml-query-data-model:defnamespace "/" (:use) (:nicknames) (:export "acqua...
3068e7cea5f92961af439dcf2ae2ecf8220057777bfc163976aaeef738a417db
facebook/flow
init_js.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/f7d50bb772462888b27b5dbf9acf7d079eb1ff5f/src/services/inference/init_js.ml
ocaml
types are always allowed in lib files lib files are always "use strict" workers workers Lib files use only concrete locations, so this is not used. symbols loaded from this file are suppressed if found in later ones process all lib files: parse, infer, and add the symbols they define to the builtins obj...
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
276380369ae65ba92fdc9841ce1e5f34b861a2bdde392a3afbbabefc44d4ce1f
zcaudate/hara
executive_test.clj
(ns hara.test.executive-test (:use [hara.test :exclude [run]]) (:require [hara.test.executive :refer :all] [hara.io.project :as project])) ^{:refer hara.test.executive/accumulate :added "3.0"} (fact "helper function for accumulating results over disparate facts and files") ^{:refer hara.test.executive...
null
https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/test/hara/test/executive_test.clj
clojure
(ns hara.test.executive-test (:use [hara.test :exclude [run]]) (:require [hara.test.executive :refer :all] [hara.io.project :as project])) ^{:refer hara.test.executive/accumulate :added "3.0"} (fact "helper function for accumulating results over disparate facts and files") ^{:refer hara.test.executive...
5b97f87cd4e85536c8a63cc062c2a24d762b1bc6645105c80c9bbf4a07fa79de
webyrd/mk-interp
mk-interp.scm
;;; miniKanren interpreter in Scheme ;;; Written in the style of Indiana University 's C311 / courses by , , and (load "pmatch.scm") ;; The following conventions are often used in the following < g > * indicates a list of > ;; <g>*s indicates a matrix of <g>, (really a list of <g>*) ge i...
null
https://raw.githubusercontent.com/webyrd/mk-interp/748cddb834cc08c72c45526d571c75a6a0ed9ffa/mk-interp.scm
scheme
miniKanren interpreter in Scheme The following conventions are often used in the following <g>*s indicates a matrix of <g>, (really a list of <g>*) begin miniKanren-specific clauses end miniKanren-specific clauses Helpers for miniKanren. tests (test-check "non-composed run" Type (debug) to ...
Written in the style of Indiana University 's C311 / courses by , , and (load "pmatch.scm") < g > * indicates a list of > ge indicates a goal expression , when evaluated , it 's simply a g ( goal ) (define ext-env* (lambda (x* a* env) `((env ,x* . ,a*) ,env))) (define ext-rec-...
89aaba99d847d8c22012e88ac05530e910d34974e43921e57ffed91f12c8d0b6
Yuras/pdf-toolbox
File.hs
{-# LANGUAGE OverloadedStrings #-} -- | Pdf file as a set of objects module Pdf.Core.File ( File(..) , withPdfFile , fromHandle , fromBytes , fromBuffer , lastTrailer , findObject , streamContent , rawStreamContent , EncryptionStatus(..) , encryptionStatus , setUserPassword , setDecryptor , NotFound(..) ) where impo...
null
https://raw.githubusercontent.com/Yuras/pdf-toolbox/f1d20479fe6782bc293468ac05186e658216388b/core/lib/Pdf/Core/File.hs
haskell
# LANGUAGE OverloadedStrings # | Pdf file as a set of objects | Pdf file is a collection of 'Object's | The last trailer is an entry point to PDF file. All other objects usually are referensed from it, directly or indirectly. | Get an object with the specified ref. | Get content of the stream It's decrypted and...
module Pdf.Core.File ( File(..) , withPdfFile , fromHandle , fromBytes , fromBuffer , lastTrailer , findObject , streamContent , rawStreamContent , EncryptionStatus(..) , encryptionStatus , setUserPassword , setDecryptor , NotFound(..) ) where import Data.ByteString (ByteString) import qualified Data.ByteString as B...
86225d98f01d2db333daa5a7a764a305ad9530f667cb7bcc24e9ac4731fd6aa8
stevebleazard/ocaml-jsonxt
parser_monad.ml
module type IO = Io.IO module type Parser = sig module IO : IO module Compliance : Compliance.S val decode : reader : (unit -> Tokens.token IO.t) -> (Compliance.json option, string) result IO.t end module Make (Compliance : Compliance.S) (IO : IO) : Parser with module IO = IO and module Complianc...
null
https://raw.githubusercontent.com/stevebleazard/ocaml-jsonxt/fe982b6087dd76ca003d8fbc19ae9a519f54b828/lib/parser_monad.ml
ocaml
module type IO = Io.IO module type Parser = sig module IO : IO module Compliance : Compliance.S val decode : reader : (unit -> Tokens.token IO.t) -> (Compliance.json option, string) result IO.t end module Make (Compliance : Compliance.S) (IO : IO) : Parser with module IO = IO and module Complianc...
19396879f0abc8bda98b6379fba5b7b78ee6fd0491fc1442628e54c957acf3a3
rtoy/cmucl
vm-tran.lisp
;;; -*- Package: C; Log: C.Log -*- ;;; ;;; ********************************************************************** This code was written as part of the Spice Lisp project at Carnegie - Mellon University , and has been placed in the public domain . If you want to use this code or any part of Spice Lisp , please con...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/compiler/old-rt/vm-tran.lisp
lisp
-*- Package: C; Log: C.Log -*- ********************************************************************** ********************************************************************** This file contains impelemtentation-dependent transforms, IR2 convert methods, etc. whichever predicate was defined last when there ar...
This code was written as part of the Spice Lisp project at Carnegie - Mellon University , and has been placed in the public domain . If you want to use this code or any part of Spice Lisp , please contact ( FAHLMAN@CMUC ) . Written by (in-package 'c) We need to define these predicates , since the TYPEP...
06cb7b317b4ec7a0141bef69df7955445abaafae2a31023cfa0bcad0da14972f
cryptosense/pkcs11
p11_ulong.ml
type t = Unsigned.ULong.t [@@deriving ord] let equal a b = compare a b = 0 let show = Unsigned.ULong.to_string let pp fmt n = Format.pp_print_string fmt (show n) let of_yojson = function | `String s -> Ok (Unsigned.ULong.of_string s) | _ -> Error "ulong_of_yojson: not a string" let to_yojson ulong = `String (U...
null
https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/lib/p11_ulong.ml
ocaml
type t = Unsigned.ULong.t [@@deriving ord] let equal a b = compare a b = 0 let show = Unsigned.ULong.to_string let pp fmt n = Format.pp_print_string fmt (show n) let of_yojson = function | `String s -> Ok (Unsigned.ULong.of_string s) | _ -> Error "ulong_of_yojson: not a string" let to_yojson ulong = `String (U...
edf007497a4c0e998eddcfd363ac186f1cade042c938edbfe42c0cb737381212
expipiplus1/vulkan
ObjectType.hs
{-# language CPP #-} No documentation found for Chapter " ObjectType " module Vulkan.Core10.Enums.ObjectType (ObjectType( OBJECT_TYPE_UNKNOWN , OBJECT_TYPE_INSTANCE , OBJECT_TYPE_PHYSICAL_DEVICE ...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/a46784a1079839381e18cfe37a8c0d6ce29a0c90/src/Vulkan/Core10/Enums/ObjectType.hs
haskell
# language CPP # | VkObjectType - Specify an enumeration to track object handle types = Description \' +-----------------------------------------------+-----------------------------------------------------------+ +===============================================+==================================================...
No documentation found for Chapter " ObjectType " module Vulkan.Core10.Enums.ObjectType (ObjectType( OBJECT_TYPE_UNKNOWN , OBJECT_TYPE_INSTANCE , OBJECT_TYPE_PHYSICAL_DEVICE ...
80a380bd82b80211dc4feece40ca575f57e670e4e95fd74b8e6773f446b0d0dc
D00mch/PWA-clojure
formats.clj
(ns pwa.middleware.formats (:require [cognitect.transit :as transit] [luminus-transit.time :as time] [muuntaja.core :as m])) (def instance (m/create (-> m/default-options (update-in [:formats "application/transit+json" :decoder-opts] (partial merge time/time-deserializat...
null
https://raw.githubusercontent.com/D00mch/PWA-clojure/39ab4d3690c7a8ddbdd8095d65a782961f92c183/src/clj/pwa/middleware/formats.clj
clojure
(ns pwa.middleware.formats (:require [cognitect.transit :as transit] [luminus-transit.time :as time] [muuntaja.core :as m])) (def instance (m/create (-> m/default-options (update-in [:formats "application/transit+json" :decoder-opts] (partial merge time/time-deserializat...
534169dcdc42969f2716ce46206c68567e6667ed90b3152d664d668d09cb28d5
techascent/tech.ml.dataset
build.clj
(ns build (:require [clojure.tools.build.api :as b] [clojure.edn :as edn]) (:refer-clojure :exclude [compile])) (def basis (b/create-basis {:project "deps.edn"})) (def uber-file "target/ubertest.jar") (def class-dir "target/classes") (defn clean [_] (b/delete {:path "target"})) (defn ubertest [_]...
null
https://raw.githubusercontent.com/techascent/tech.ml.dataset/7a97215ab91400980cd466371e44a0e2e557fee5/ubertest/build.clj
clojure
(ns build (:require [clojure.tools.build.api :as b] [clojure.edn :as edn]) (:refer-clojure :exclude [compile])) (def basis (b/create-basis {:project "deps.edn"})) (def uber-file "target/ubertest.jar") (def class-dir "target/classes") (defn clean [_] (b/delete {:path "target"})) (defn ubertest [_]...
4e18132719741d0a039b5a8bfdf4d8e753ee45ccb465f580be10cfd24bb5a7bd
gethop-dev/hydrogen.duct-template
home.clj
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this ;; file, You can obtain one at / {{=<< >>=}} (ns <<namespace>>.client.home "This namespace is there to solve cross-platform compatibility for BE and FE when doing isomorphic r...
null
https://raw.githubusercontent.com/gethop-dev/hydrogen.duct-template/34d56aa499af1e673d9587b7da0cca2b126ff106/resources/ssr/client_substitutes/home.clj
clojure
file, You can obtain one at /
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this {{=<< >>=}} (ns <<namespace>>.client.home "This namespace is there to solve cross-platform compatibility for BE and FE when doing isomorphic rendering" (:require [re-frame.c...
7aaeff2a55d5389fddaaaa662681ffed9082928c6dff02905220732ebbc46088
mejgun/haskell-tdlib
SetUserSupportInfo.hs
{-# LANGUAGE OverloadedStrings #-} -- | module TD.Query.SetUserSupportInfo where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified TD.Data.FormattedText as FormattedText import qualified Utils as U -- | Sets support information for the given user ; for Telegram support only @...
null
https://raw.githubusercontent.com/mejgun/haskell-tdlib/c9fe0a631abbb042d630817cf648ceae2fe2dad8/src/TD/Query/SetUserSupportInfo.hs
haskell
# LANGUAGE OverloadedStrings # | | | |
module TD.Query.SetUserSupportInfo where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified TD.Data.FormattedText as FormattedText import qualified Utils as U Sets support information for the given user ; for Telegram support only @user_id User identifier @message New informat...
0fb8b9b8cd781608b9da3b2b8e06a55a92c055ba341b2bcfed52307d8822b508
nikita-volkov/hasql-cursor-query
Transactions.hs
module Hasql.CursorQuery.Private.Transactions where import Hasql.CursorQuery.Private.Prelude import qualified Hasql.CursorQuery.Private.CursorQuery as B import qualified Hasql.CursorQuery.Private.CursorTransactions as C import qualified Hasql.Transaction as A import qualified Hasql.CursorTransaction.Transactions as D ...
null
https://raw.githubusercontent.com/nikita-volkov/hasql-cursor-query/d249b02abac2ee8b77d4e0bd90f7a5d8c5161f83/library/Hasql/CursorQuery/Private/Transactions.hs
haskell
| Executes CursorQuery in Transaction provided the parameters.
module Hasql.CursorQuery.Private.Transactions where import Hasql.CursorQuery.Private.Prelude import qualified Hasql.CursorQuery.Private.CursorQuery as B import qualified Hasql.CursorQuery.Private.CursorTransactions as C import qualified Hasql.Transaction as A import qualified Hasql.CursorTransaction.Transactions as D ...
5185deaec2d3a23392991b3d7d71ab215ee9121b5b42129c13fac47b794906c2
music-suite/music-preludes
chords.hs
import Music.Prelude kStrum = 0.005 kStrum = 0 main = do openLilypond music -- openMidi music guitar = (tutti $ fromMidiProgram 26) alto = (tutti $ fromMidiProgram 65) rh = (tutti $ fromMidiProgram 0) -- Strum a chord TODO port this to Chord module strumUp :: [Score a] -> Score a strumUp = pcat . ...
null
https://raw.githubusercontent.com/music-suite/music-preludes/2512b7dba62b4adadd04c01772046a3c09be72d7/examples/chords.hs
haskell
openMidi music Strum a chord ^ Initial direction ^ Duration pattern (repeated if necessary) ^ Sequence of chords to strum <> (level mf $ set parts' guitar $ melody) <> level _p strings
import Music.Prelude kStrum = 0.005 kStrum = 0 main = do openLilypond music guitar = (tutti $ fromMidiProgram 26) alto = (tutti $ fromMidiProgram 65) rh = (tutti $ fromMidiProgram 0) TODO port this to Chord module strumUp :: [Score a] -> Score a strumUp = pcat . zipWith (\t x -> delay t . stretchTo ...
dd482b5f34119608eff8b4d452bae61be22e8165aa44e833de3b8983ea49c72d
wireless-net/erlang-nommu
lcnt_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2010 - 2011 . 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 Publi...
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/tools/test/lcnt_SUITE.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 2010 - 2011 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(lcnt_SUITE). -include_lib("test_se...
c75e2a28f917b5cefc1c643e5365d33229b5d294f092c5888c3bcbb6e25d7b03
jacquev6/General
StdIn.ml
module OCSP = OCamlStandard.Pervasives let channel = OCSP.stdin
null
https://raw.githubusercontent.com/jacquev6/General/5237123668e939c0cb83aa3e1c4756473336bc7e/src/Implementation/StdIn.ml
ocaml
module OCSP = OCamlStandard.Pervasives let channel = OCSP.stdin
0bfc0b272df030e8ff9a4e1c57ab72574b192870f7f2e7844d61d5b0170b2de1
dannypsnl/plt-research
nat.rkt
#lang racket (provide (for-syntax Nat zero suc Bool true false Vec) Nat zero suc Bool true false Vec) (begin-for-syntax (define Bool 'Bool) (define true 'true) (define false 'false) (define Nat 'Nat) (define zero 'zero) (define (suc n) ...
null
https://raw.githubusercontent.com/dannypsnl/plt-research/c3fbb9a5b517d7fdd6c05cea13330f005055bd6a/racket/env/nat.rkt
racket
#lang racket (provide (for-syntax Nat zero suc Bool true false Vec) Nat zero suc Bool true false Vec) (begin-for-syntax (define Bool 'Bool) (define true 'true) (define false 'false) (define Nat 'Nat) (define zero 'zero) (define (suc n) ...
457acc0ae3efe696e6f1225b1c2ca7f9588963c9c0b6f028dde4d73c93e9a7a7
bvaugon/ocapic
queue.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/lib/queue.mli
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 * First - in first - out queues . This module implements queues ( FIFOs ) , with in - place modific...
2b755a644c83efd73061d5690e9754a5cb9753715a592189e35abad8a2bae983
michaelklishin/urly
url_dump_test.clj
(ns clojurewerkz.urly.test.url_dump-test (:refer-clojure :exclude [resolve]) (:use clojurewerkz.urly.core clojure.test) (:require [clojure.java.io :as io])) (deftest test-parsing-dumped-links (with-open [rdr (io/reader (io/resource "url_dump.txt"))] (doseq [x (line-seq rdr)] (let [urly (u...
null
https://raw.githubusercontent.com/michaelklishin/urly/1cc18c3e0441ea033cd23edb4fab8a87f3a26685/test/clojurewerkz/urly/test/url_dump_test.clj
clojure
(ns clojurewerkz.urly.test.url_dump-test (:refer-clojure :exclude [resolve]) (:use clojurewerkz.urly.core clojure.test) (:require [clojure.java.io :as io])) (deftest test-parsing-dumped-links (with-open [rdr (io/reader (io/resource "url_dump.txt"))] (doseq [x (line-seq rdr)] (let [urly (u...
5c76b1b3d844500a20b217c10a1829f46c09e5d2a471863bdf3233aa25707435
rd--/hsc3
Nrt.hs
-- | Non-realtime score generation. module Sound.Sc3.Server.Nrt where import Data.Maybe {- base -} import System.IO {- base -} import qualified Data.ByteString.Lazy as B {- bytestring -} import qualified Sound.Osc.Coding.Byte as Byte {- hosc -} import qualified Sound.Osc.Coding.Decode.Binary as Decode {- hosc3 -} im...
null
https://raw.githubusercontent.com/rd--/hsc3/4b3a4ea1f1198b7598bfde79fbaaff701c16fd1a/Sound/Sc3/Server/Nrt.hs
haskell
| Non-realtime score generation. base base bytestring hosc hosc3 hosc3 hosc hosc | Encode Bundle and prefix with encoded length. | 'span' of 'f' of 'bundleTime'. Can be used to separate the /initialisation/ and /remainder/ parts of a score. | Encode an 'Nrt' score. hosc hsc3 | Write an 'N...
module Sound.Sc3.Server.Nrt where oscWithSize :: Bundle -> B.ByteString oscWithSize o = let b = Encode.encodeBundle o l = Byte.encode_i32 (fromIntegral (B.length b)) in B.append l b | An ' Nrt ' score is a sequence of ' Bundle 's . newtype Nrt = Nrt {nrt_bundles :: [Bundle]} deriving (Show) nrt_...
b82cc141cb671eb725e6eaea39eb15d5b9c27f277a863cb5a192a229f00ede5f
phronmophobic/membrane-re-frame-example
db.clj
(ns membrane-re-frame-example.db (:require;; [cljs.reader] [clojure.spec.alpha :as s] #_[re-frame.core :as re-frame])) ;; -- Spec -------------------------------------------------------------------- ;; This is a clojure.spec specification for the value in app - db . It is like a ;; Schema....
null
https://raw.githubusercontent.com/phronmophobic/membrane-re-frame-example/9015b3dc4cd441da4144b80aee22ad502b53476b/src/membrane_re_frame_example/db.clj
clojure
[cljs.reader] -- Spec -------------------------------------------------------------------- Schema. See: The value in app-db should always match this spec. Only event handlers can change the value in app-db so, after each event handler How is this done? Look in events.cljs and you'll notice that all handlers ...
(ns membrane-re-frame-example.db [clojure.spec.alpha :as s] #_[re-frame.core :as re-frame])) This is a clojure.spec specification for the value in app - db . It is like a has run , we re - check app - db for correctness ( compliance with the ) . (s/def ::id int?) (s/def ::title string?) ...
67d96b0545ac1049c8b400a64a15e256831f4662324dc46370e6df847b491f78
mtnygard/simulant-example
project.clj
(defproject com.datomic/simulant-example "0.1.0-SNAPSHOT" :description "Example application and simulation" :plugins [[lein-modules "0.3.11"]] :modules {:dirs ["simtest", "example-ui"] :inherited {:repositories {"my.datomic.com" {:url ""}} ...
null
https://raw.githubusercontent.com/mtnygard/simulant-example/dcb76b2eda47dfb6be10a2077ade319873eacce1/project.clj
clojure
For the UI
(defproject com.datomic/simulant-example "0.1.0-SNAPSHOT" :description "Example application and simulation" :plugins [[lein-modules "0.3.11"]] :modules {:dirs ["simtest", "example-ui"] :inherited {:repositories {"my.datomic.com" {:url ""}} ...
c3267f7453c2922e80ac5350164f871ea82b40648717d5e7cdf143a4d0ec3ad6
imrehg/ypsilon
ffi.scm
#!nobacktrace (library (ffi) (export alignof:bool alignof:double alignof:float alignof:int alignof:int16_t alignof:int32_t alignof:int64_t alignof:int8_t alignof:long alignof:long-long alignof:short alignof:s...
null
https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ffi.scm
scheme
#!nobacktrace (library (ffi) (export alignof:bool alignof:double alignof:float alignof:int alignof:int16_t alignof:int32_t alignof:int64_t alignof:int8_t alignof:long alignof:long-long alignof:short alignof:s...
b1cd9ebcceb7b433e54bc275bbdb61cc756bd7d1f217490008a526c077dec58e
IvanIvanov/haskell-lisp-interpreter
Evaluator.hs
module Interpreter.Evaluator ( eval , evalSequence ) where import Interpreter.DataTypes -- The "eval" function is the heart of the evaluator. It takes an environment with variable bindings and a Lisp Expression to evaluate . The Expression is -- evaluated returning a new environment, possibly containing new bindings...
null
https://raw.githubusercontent.com/IvanIvanov/haskell-lisp-interpreter/a5835c290f9f92eaaafa15b8ee5a0ae4b0c81bb7/src/Evaluator.hs
haskell
The "eval" function is the heart of the evaluator. It takes an environment evaluated returning a new environment, possibly containing new bindings, and A helper function that evaluates a sequence of expressions one after another passing an updated environment to each subsequent evaluation and
module Interpreter.Evaluator ( eval , evalSequence ) where import Interpreter.DataTypes with variable bindings and a Lisp Expression to evaluate . The Expression is the Expression resulting from the evaluation process . eval :: Environment -> Expression -> (Environment, Expression) eval environment (Null) = (envir...
e680e828853fa0dab85855658b2964b653c969f9aeb6e49d69fe0b50bc7ec4a7
monadbobo/ocaml-core
unsafe_common.ml
Unsafe_common : functions common to unsafe binary protocol conversion . open Common open Bigarray type sptr type eptr type sptr_ptr external get_sptr : buf -> pos : pos -> sptr = "get_buf_ptr_stub" "noalloc" external get_eptr : buf -> pos : pos -> eptr = "get_buf_ptr_stub" "noalloc" external shift_sptr : sptr -> i...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/bin_prot/lib/unsafe_common.ml
ocaml
Unsafe_common : functions common to unsafe binary protocol conversion . open Common open Bigarray type sptr type eptr type sptr_ptr external get_sptr : buf -> pos : pos -> sptr = "get_buf_ptr_stub" "noalloc" external get_eptr : buf -> pos : pos -> eptr = "get_buf_ptr_stub" "noalloc" external shift_sptr : sptr -> i...
51803e8704c077b2e96a9589e3b6ced2bd274abb3ff9fb6719dad920c4aa6d1d
mtravers/goddinpotty
html_generation.clj
(ns goddinpotty.html-generation (:require [org.parkerici.multitool.core :as u] [hiccup.core :as hiccup] [me.raynes.fs :as fs] [goddinpotty.utils :as utils] [goddinpotty.templating :as templating] [goddinpotty.batadase :as bd] [goddinpotty.recent ...
null
https://raw.githubusercontent.com/mtravers/goddinpotty/a689bc2613b8d874a3c86a81a443f7d3c284afd9/src/goddinpotty/html_generation.clj
clojure
This works actually no, it introduces spaces that have an effect on rendering! Fuck! Unaccountably not in fs Not actually used If there are any more special pages; should get more declarative about these generators. Not actually called, useful for dev I miss OOP I miss OOP
(ns goddinpotty.html-generation (:require [org.parkerici.multitool.core :as u] [hiccup.core :as hiccup] [me.raynes.fs :as fs] [goddinpotty.utils :as utils] [goddinpotty.templating :as templating] [goddinpotty.batadase :as bd] [goddinpotty.recent ...
6054656051f7658727f63fca9ab12b1aa5f27b125f5448be9de8d20660b7a4b4
cartazio/tlaps
p_fmt.ml
* proof / fmt.ml --- proofs ( pretty printing ) * * * Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation * proof/fmt.ml --- proofs (pretty printing) * * * Copyright (C) 2008-2010 INRIA and Microsoft Corporation *) START dflags * * " proof " goals when printing proofs ( ...
null
https://raw.githubusercontent.com/cartazio/tlaps/562a34c066b636da7b921ae30fc5eacf83608280/src/proof/p_fmt.ml
ocaml
proof_nl end pp_force_newline ff () ; assumptions negation of old goal step name hidden fact that it is true negation of old goal + new assumption step name definition and fact hidden fact that it is true step name definition and fact new context negation of old goal step name definition hidd...
* proof / fmt.ml --- proofs ( pretty printing ) * * * Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation * proof/fmt.ml --- proofs (pretty printing) * * * Copyright (C) 2008-2010 INRIA and Microsoft Corporation *) START dflags * * " proof " goals when printing proofs ( ...
6921110fdf2d8b3eb07fddf5ad78824d5882346ae237b1143909df77fe80175b
full-spectrum/neo4clj
sanitize_test.clj
(ns neo4clj.sanitize-test (:require [clojure.test :as t] [neo4clj.sanitize :as sut])) (t/deftest cypher-label (t/testing "Sanitation of a Clojure label to match the CYPHER style guide" (t/are [cypher label] (= cypher (sut/cypher-label label)) "Car" :car "Car" "car" "Car" "...
null
https://raw.githubusercontent.com/full-spectrum/neo4clj/71d2e4843e38557123d72fe668587d0a846949ba/neo4clj-core/test/neo4clj/sanitize_test.clj
clojure
(ns neo4clj.sanitize-test (:require [clojure.test :as t] [neo4clj.sanitize :as sut])) (t/deftest cypher-label (t/testing "Sanitation of a Clojure label to match the CYPHER style guide" (t/are [cypher label] (= cypher (sut/cypher-label label)) "Car" :car "Car" "car" "Car" "...
0bedf32e79bfd47f14e5ab20fc25e72e4beb75c78693105dcd25611e286f4449
libreim/haskell
sort.hs
import Data.List (partition) import Control.Monad (forever, void) qsort :: Ord a => [a] -> [a] qsort [] = [] qsort (x:xs) = qsort lower <> [x] <> qsort higher where (lower, higher) = partition (<x) xs main = forever ((readLn :: IO [Int]) >>= print . qsort)
null
https://raw.githubusercontent.com/libreim/haskell/ebe17a649bd50ee69340f2de803086fe32cd6f5d/PrimeraParte/wcount/sort.hs
haskell
import Data.List (partition) import Control.Monad (forever, void) qsort :: Ord a => [a] -> [a] qsort [] = [] qsort (x:xs) = qsort lower <> [x] <> qsort higher where (lower, higher) = partition (<x) xs main = forever ((readLn :: IO [Int]) >>= print . qsort)
65eee30a1aa1065096cbb0df6450715b3a5f1e6af88b180358f38476ef204ee1
tfausak/rattletrap
Content.hs
module Rattletrap.Type.Content where import qualified Data.ByteString as ByteString import qualified Data.ByteString.Lazy as LazyByteString import qualified Data.Word as Word import qualified Rattletrap.BitGet as BitGet import qualified Rattletrap.BitPut as BitPut import qualified Rattletrap.ByteGet as ByteGet import ...
null
https://raw.githubusercontent.com/tfausak/rattletrap/cc6d6aba923d840f23de7673cab9a043096d3099/src/lib/Rattletrap/Type/Content.hs
haskell
| Contains low-level game data about a 'Rattletrap.Replay.Replay'. | A list of which frames are key frames. Although they aren't necessary for replay, key frames are frames that replicate every actor. They | The size of the stream in bytes. This is only really necessary because the stream has some arbitrary amount...
module Rattletrap.Type.Content where import qualified Data.ByteString as ByteString import qualified Data.ByteString.Lazy as LazyByteString import qualified Data.Word as Word import qualified Rattletrap.BitGet as BitGet import qualified Rattletrap.BitPut as BitPut import qualified Rattletrap.ByteGet as ByteGet import ...
8f4f41be30eff87270cc9b0cebcf38f8af2d8dbf81c5e53d8bd0368a7dd53666
clojure-interop/aws-api
AmazonSnowballAsync.clj
(ns com.amazonaws.services.snowball.AmazonSnowballAsync "Interface for accessing Amazon Snowball asynchronously. Each asynchronous method will return a Java Future object overloads which accept an AsyncHandler can be used to receive notification when an asynchronous operation completes. Note: Do not directly i...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.snowball/src/com/amazonaws/services/snowball/AmazonSnowballAsync.clj
clojure
the other job attributes are
(ns com.amazonaws.services.snowball.AmazonSnowballAsync "Interface for accessing Amazon Snowball asynchronously. Each asynchronous method will return a Java Future object overloads which accept an AsyncHandler can be used to receive notification when an asynchronous operation completes. Note: Do not directly i...
6274420c45dcb3ecef526fbb1962ea75dce3885394f76863c7df2e7ee1d46832
rtoy/ansi-cl-tests
with-slots.lsp
;-*- Mode: Lisp -*- Author : Created : Sat May 17 18:04:10 2003 ;;;; Contains: Tests of WITH-SLOTS (in-package :cl-test) (deftest with-slots.1 (with-slots () nil) nil) (deftest with-slots.2 (with-slots () nil (values))) (deftest with-slots.3 (with-slots () nil (values 'a 'b 'c 'd 'e 'f)) a ...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/with-slots.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of WITH-SLOTS with-slots is an implicit progn, not a tagbody with-slots has no implicit block Tests on standard objects If slot is unbound, act as if slot-value had been called Free declaration scope test
Author : Created : Sat May 17 18:04:10 2003 (in-package :cl-test) (deftest with-slots.1 (with-slots () nil) nil) (deftest with-slots.2 (with-slots () nil (values))) (deftest with-slots.3 (with-slots () nil (values 'a 'b 'c 'd 'e 'f)) a b c d e f) (deftest with-slots.4 (let ((x 0) (y 10) (z 2...
02e88b97143b704386ff04d31d311029d64bbbe9a6bc1174b92dd1f32929a0fc
Gbury/dolmen
logic.ml
(* This file is free software, part of dolmen. See file "LICENSE" for more information *) module type S = sig type file type statement exception Extension_not_found of string type language = | Alt_ergo | Dimacs | ICNF | Smtlib2 of Dolmen_smtlib2.Script.version | Tptp of Dolmen_tptp.versi...
null
https://raw.githubusercontent.com/Gbury/dolmen/58903349a3c422402f25ec479ce90d944f44f148/src/classes/logic.ml
ocaml
This file is free software, part of dolmen. See file "LICENSE" for more information Alt-ergo format iCNF Smtlib2 Zipperposition format
module type S = sig type file type statement exception Extension_not_found of string type language = | Alt_ergo | Dimacs | ICNF | Smtlib2 of Dolmen_smtlib2.Script.version | Tptp of Dolmen_tptp.version | Zf val enum : (string * language) list val string_of_language : language -> ...
3af49c0dd932ae7b74ee604e9dc85d8a488c1e079d1641a30e4d64e88cd1d165
SHoltzen/dice
dice.ml
open DiceLib open Core open Passes (** List of rows in a table *) type tableres = String.t List.t List.t type result = TableRes of String.t * tableres | StringRes of String.t * String.t | ErrorRes of String.t let print_res r = match r with | TableRes(name, rows) -> Format.printf "================[ %...
null
https://raw.githubusercontent.com/SHoltzen/dice/800cd7bfc4fa1311c51e460b95e9c0dc7b30edf3/bin/dice.ml
ocaml
* List of rows in a table Bdd.man_print_stats compiled.ctx.man;
open DiceLib open Core open Passes type tableres = String.t List.t List.t type result = TableRes of String.t * tableres | StringRes of String.t * String.t | ErrorRes of String.t let print_res r = match r with | TableRes(name, rows) -> Format.printf "================[ %s ]================\n" name; ...
0fd4b14e4e47eb8bbe1721a47fc7ad374cfd009bb3decd30ca186060df6e46e6
heraldry/heraldicon
core.cljs
(ns heraldicon.heraldry.charge-group.core (:require [heraldicon.context :as c] [heraldicon.heraldry.field.environment :as environment] [heraldicon.heraldry.option.position :as position] [heraldicon.interface :as interface] [heraldicon.localization.string :as string] [heraldicon.math.bounding-box :as...
null
https://raw.githubusercontent.com/heraldry/heraldicon/71126cfd7ba342dea0d1bb849be92cbe5290a6fd/src/heraldicon/heraldry/charge_group/core.cljs
clojure
use get-environment and get-exact-shape for the parent context here deliberately, TODO: no need to calculate all positions here
(ns heraldicon.heraldry.charge-group.core (:require [heraldicon.context :as c] [heraldicon.heraldry.field.environment :as environment] [heraldicon.heraldry.option.position :as position] [heraldicon.interface :as interface] [heraldicon.localization.string :as string] [heraldicon.math.bounding-box :as...
5708a9ddacaff28fd3ec84a5ca5f3fddd4f14a04065190d030a569c5292a1dc1
contentjon/chai-latte
chai.cljs
(ns latte.test.chai (:require [latte.chai :refer (expect)]) (:require-macros [latte.core :refer (describe it)])) (describe "expect" (describe "with simple JavaScript values" (it "works with all chai language chains" [] (expect true :to.equal true) (expect true :not.to.equal false) (...
null
https://raw.githubusercontent.com/contentjon/chai-latte/aff304ae397ceea72513d3da4812b2bd20ca11ac/test/latte/test/chai.cljs
clojure
(ns latte.test.chai (:require [latte.chai :refer (expect)]) (:require-macros [latte.core :refer (describe it)])) (describe "expect" (describe "with simple JavaScript values" (it "works with all chai language chains" [] (expect true :to.equal true) (expect true :not.to.equal false) (...