_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
0e311f4ea5de70e257744a3a7ef839f8acf3a12ca8b54ce336241f5a0dc954d5
peddie/pipes-zeromq4
proxy.hs
# OPTIONS_GHC -Wall # {-# LANGUAGE OverloadedStrings #-} module Main where import Control.Monad import Pipes.ZMQ4 import qualified Pipes.Prelude as P import qualified System.ZMQ4 as Z import System.Environment (getArgs) import Control.Concurrent (threadDelay) proxy :: IO () proxy = Z.withContext $ \ctx -> runSafe...
null
https://raw.githubusercontent.com/peddie/pipes-zeromq4/82223ecc4e7496d00124add9f1427471be733836/examples/proxy.hs
haskell
# LANGUAGE OverloadedStrings #
# OPTIONS_GHC -Wall # module Main where import Control.Monad import Pipes.ZMQ4 import qualified Pipes.Prelude as P import qualified System.ZMQ4 as Z import System.Environment (getArgs) import Control.Concurrent (threadDelay) proxy :: IO () proxy = Z.withContext $ \ctx -> runSafeT . runEffect $ setupProducer ctx...
6ff1cdb2cf3b5bffd6b0ff50f29062ad0726d236818aec11569ce7e297fff4ec
xvw/planet
option.ml
type 'a t = 'a option let eq f left right = match left, right with | None, None -> true | Some x, Some y -> f x y | _ -> false ;; let pp pp' formater = function | None -> Format.fprintf formater "None" | Some x -> Format.fprintf formater "Some (%a)" pp' x ;; let is_valid = function | Some _ -> true |...
null
https://raw.githubusercontent.com/xvw/planet/c2a77ea66f61cc76df78b9c2ad06d114795f3053/src/bedrock/option.ml
ocaml
type 'a t = 'a option let eq f left right = match left, right with | None, None -> true | Some x, Some y -> f x y | _ -> false ;; let pp pp' formater = function | None -> Format.fprintf formater "None" | Some x -> Format.fprintf formater "Some (%a)" pp' x ;; let is_valid = function | Some _ -> true |...
9a1e40c2c6193bf47843f8ad367e0b806c31119d54c13725247a5670870aadcc
MichelBoucey/ip6addr
Main.hs
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # import Control.Monad (replicateM_) import qualified Data.Text as T import qualified Data.Text.IO as TIO (hPutStrLn, putStrLn) import System.Console.CmdArgs import...
null
https://raw.githubusercontent.com/MichelBoucey/ip6addr/2bdb1d2358dcdbd0c43ce0dd50f67f0076449159/app/Main.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards # import Control.Monad (replicateM_) import qualified Data.Text as T import qualified Data.Text.IO as TIO (hPutStrLn, putStrLn) import System.Console.CmdArgs import System.Exit import System.IO (stderr) ...
63c86abebcf3248cdb6de2a500108e5f4d1067bcbe0646313128c45f90826002
shayan-najd/NativeMetaprogramming
tc168.hs
# LANGUAGE MultiParamTypeClasses , FlexibleContexts # -- We want to get the type -- g :: forall a b c. C a (b,c) => a -> b but GHC 6.0 bogusly gets -- g :: forall a b. C a (b,()) => a -> b -- Having done this, we reject f on the grounds -- that its type is ambiguous: adding the type signature : : C a ( ...
null
https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_compile/tc168.hs
haskell
We want to get the type g :: forall a b c. C a (b,c) => a -> b g :: forall a b. C a (b,()) => a -> b Having done this, we reject f on the grounds that its type is ambiguous: adding the type would fail
# LANGUAGE MultiParamTypeClasses , FlexibleContexts # but GHC 6.0 bogusly gets signature : : C a ( b , c ) = > a - > b module ShouldCompile where class C a b where { op :: a -> b } g x = fst (op x)
cf3e91da559392074036f78114853ec128b2e65044b6d1b9aea529736655cc8c
stumpwm/stumpwm-contrib
package.lisp
package.lisp (defpackage #:stumptray (:use #:cl #:alexandria) (:export *tray-viwin-background* *tray-hiwin-background* *tray-placeholder-pixels-per-space* add-mode-line-hooks remove-mode-line-hooks ))
null
https://raw.githubusercontent.com/stumpwm/stumpwm-contrib/a7dc1c663d04e6c73a4772c8a6ad56a34381096a/modeline/stumptray/package.lisp
lisp
package.lisp (defpackage #:stumptray (:use #:cl #:alexandria) (:export *tray-viwin-background* *tray-hiwin-background* *tray-placeholder-pixels-per-space* add-mode-line-hooks remove-mode-line-hooks ))
c282481d9ef690eb763182bd3fc1c82485df8207d751e67c25b21e0a7db0dad4
krestenkrab/triq
triq_statem_fsm.erl
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- %% ex: ts=4 sw=4 et %% This file is part of Triq - Trifork QuickCheck %% Copyright ( c ) 2011 - 2013 by %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% ...
null
https://raw.githubusercontent.com/krestenkrab/triq/c7306b8eaea133d52140cb828817efb5e50a3d52/src/triq_statem_fsm.erl
erlang
ex: ts=4 sw=4 et 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...
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- This file is part of Triq - Trifork QuickCheck Copyright ( c ) 2011 - 2013 by Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(triq_statem_fsm). ...
c70dad6f25561418773f7579400ec7dfc65f82caf43fce1db2f6531fbdd0f709
johnlawrenceaspden/hobby-code
heron2.clj
;; Code from the Clojure Dojo at dev8d. Written collaboratively by a room full of 30 people . (defn avg[x y](/ (+ x y) 2)) (defn abs[x](if (> x 0) x (- x))) (defn makeimpr[target] (fn[x] (avg x (/ target x)))) (defn makegoodenough [target epsilon] (fn[x] (< (abs (- target (* x...
null
https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/dev8d-clojure-dojo/heron2.clj
clojure
Code from the Clojure Dojo at dev8d. Written collaboratively by bug here that no-one spotted. but it works for our particular problem.
a room full of 30 people . (defn avg[x y](/ (+ x y) 2)) (defn abs[x](if (> x 0) x (- x))) (defn makeimpr[target] (fn[x] (avg x (/ target x)))) (defn makegoodenough [target epsilon] (fn[x] (< (abs (- target (* x x) )) epsilon))) (defn iterativeimprove[x goodenough? improve] ...
66e453cfbba9fb0a3d987c619cef03e7aab912a1bf5a5834f3abc92fae1f95d7
AHartNtkn/IotaTT
RawSyntax.hs
module RawSyntax where import AbstractSyntax import PrettyPrinting -- Representation for printing import Exp.Abs import Control.Monad import Data.String import Data.HashMap.Strict (HashMap, (!)) import qualified Data.HashMap.Strict as HM {- Intermediate raw instax -} data ITerm = IVS String | IV String Int ...
null
https://raw.githubusercontent.com/AHartNtkn/IotaTT/ada8e4b5aa7b525463369b56591ddc58dca91b4d/RawSyntax.hs
haskell
Representation for printing Intermediate raw instax Convert intermediate syntax into abstract syntax Replace string variables with deBruijin indices Convert intermediate syntax into abstract syntax Convert concrete syntax into intermediate syntax Convert Concrete Syntax into Abstract Syntax
module RawSyntax where import AbstractSyntax import PrettyPrinting import Exp.Abs import Control.Monad import Data.String import Data.HashMap.Strict (HashMap, (!)) import qualified Data.HashMap.Strict as HM data ITerm = IVS String | IV String Int | ILam String ITerm | IAnn ITerm ITerm | IApp ITerm I...
d99f7a9689c2d2f4688347cfdf66449b95e7c79bd4d49890cffdc4be4220b18c
ocaml/dune
ansi_color.mli
module RGB8 : sig * 8 bit RGB color type t * [ RGB8.to_int t ] returns the [ int ] value of [ t ] as an 8 bit integer . val to_int : t -> int end module RGB24 : sig * 24 bit RGB color type t (** [RGB24.red t] returns the red component of [t] *) val red : t -> int (** [RGB24.green t] returns the green co...
null
https://raw.githubusercontent.com/ocaml/dune/ce02bf035c7c421167be3b7b706f2b934faa6f59/otherlibs/stdune/src/ansi_color.mli
ocaml
* [RGB24.red t] returns the red component of [t] * [RGB24.green t] returns the green component of [t] * [RGB24.blue t] returns the blue component of [t] * ANSI terminal styles * Ansi escape sequence that set the terminal style to exactly these styles * Print to [Format.std_formatter] * Print to [Format.err_format...
module RGB8 : sig * 8 bit RGB color type t * [ RGB8.to_int t ] returns the [ int ] value of [ t ] as an 8 bit integer . val to_int : t -> int end module RGB24 : sig * 24 bit RGB color type t val red : t -> int val green : t -> int val blue : t -> int end module Style : sig type t = [ `Fg_default...
30a0a345f3054dbfbf5450a5e1400ffca3eaf33954755fdf97db0509ecc863c1
haroldcarr/learn-haskell-coq-ml-etc
ch_13_9.hs
Created : 2015 Apr 23 ( Thu ) 11:44:31 by . Last Modified : 2015 Apr 23 ( Thu ) 11:44:53 by . Created : 2015 Apr 23 (Thu) 11:44:31 by Harold Carr. Last Modified : 2015 Apr 23 (Thu) 11:44:53 by Harold Carr. -} import Test.HUnit as T import Test.HUnit.Util as U 13.9 Exe...
null
https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/book/2007-Programming_in_Haskell-1st_Edition-Graham_Hutton/ch_13_9.hs
haskell
---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ------------...
Created : 2015 Apr 23 ( Thu ) 11:44:31 by . Last Modified : 2015 Apr 23 ( Thu ) 11:44:53 by . Created : 2015 Apr 23 (Thu) 11:44:31 by Harold Carr. Last Modified : 2015 Apr 23 (Thu) 11:44:53 by Harold Carr. -} import Test.HUnit as T import Test.HUnit.Util as U 13.9 Exe...
81ac8ef4549ad074d3363c6d475ffbb46471b47ad764189ef1ca42283689e53a
tolysz/ghcjs-stack
CmdConfigure.hs
-- | cabal-install CLI command: configure -- module Distribution.Client.CmdConfigure ( configureAction, ) where import Distribution.Client.ProjectOrchestration import Distribution.Client.ProjectConfig import Distribution.Client.Setup ( GlobalFlags, ConfigFlags(..), ConfigExFlags, InstallFlags ) import ...
null
https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal-next/cabal-install/Distribution/Client/CmdConfigure.hs
haskell
| cabal-install CLI command: configure the @build@ command where we bring the install plan up to date (thus checking that it's possible). The only difference is that @configure@ also allows the user to specify some extra config flags which we save in the file @cabal.project.local@. For more details on how this...
module Distribution.Client.CmdConfigure ( configureAction, ) where import Distribution.Client.ProjectOrchestration import Distribution.Client.ProjectConfig import Distribution.Client.Setup ( GlobalFlags, ConfigFlags(..), ConfigExFlags, InstallFlags ) import Distribution.Simple.Setup ( HaddockF...
f8a64da7d240a783181533a239ecaf25bb0243339935840eb41fcf5c45289980
ygmpkk/house
Nondet.hs
module Nondet where import Prop import Unstable.Control.Monad.Trans import Control.Monad(MonadPlus(..)) findAll_return x = findAll (return x) === return [x] findAll_bind m f = findAll (m >>= f) === do xs <- findAll m fmap concat (mapM (findAll . f) xs) findAll_fi...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/monads/Unstable/Control/Monad/laws/Nondet.hs
haskell
module Nondet where import Prop import Unstable.Control.Monad.Trans import Control.Monad(MonadPlus(..)) findAll_return x = findAll (return x) === return [x] findAll_bind m f = findAll (m >>= f) === do xs <- findAll m fmap concat (mapM (findAll . f) xs) findAll_fi...
7d72bb569e3fd6d9cfeff974244dc444447433fb8d6160120c2a932863c81277
kind2-mc/kind2
lustreIdent.ml
This file is part of the Kind 2 model checker . Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa 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 a...
null
https://raw.githubusercontent.com/kind2-mc/kind2/691e929d20f6d5ca317a7f6b6438a9c56bb0670f/src/lustre/lustreIdent.ml
ocaml
********************************************************************** Types and pretty-printers ********************************************************************** An identifier is a string with integer indexes Use polymorphic hash function Use polymorphic equ...
This file is part of the Kind 2 model checker . Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa 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 a...
324ec5190c73967f817d06c93255e0edb6e756345e70d8e42475c8547e9aa4ce
ekmett/coda
BDD.hs
{-# language ScopedTypeVariables #-} {-# language FlexibleContexts #-} # language BangPatterns # {-# language Strict #-} module Ersatz.Solver.BDD where import Control.Applicative import Data.Bits import Data.BDD as BDD import Data.IntMap as IntMap import Data.IntSet as IntSet import Data.Proxy import Ersatz.Problem im...
null
https://raw.githubusercontent.com/ekmett/coda/bca7e36ab00036f92d94eb86298712ab1dbf9b8d/wip/bdd/Ersatz/Solver/BDD.hs
haskell
# language ScopedTypeVariables # # language FlexibleContexts # # language Strict # True is a member of the clause
# language BangPatterns # module Ersatz.Solver.BDD where import Control.Applicative import Data.Bits import Data.BDD as BDD import Data.IntMap as IntMap import Data.IntSet as IntSet import Data.Proxy import Ersatz.Problem import Ersatz.Solution literal :: Cached s => Int -> BDD s literal 1 = One literal (-1) = Zer...
4f2ac42289780e22c1ca40017c938a76c69706f708300411c37b7d2e0d12da62
sunshineclt/Racket-Helper
2-SICP3.73.rkt
#lang racket (define (stream-car stream) (car stream)) (define (stream-cdr stream) (force (cdr stream))) (define-syntax cons-stream (syntax-rules () [(cons-stream x y) (cons x (delay y))])) (define the-empty-stream '()) (define (stream-null? stream) (null? stream)) 取 stream里面第 n 项 , n从0开始算 (if (stream-...
null
https://raw.githubusercontent.com/sunshineclt/Racket-Helper/bf85f38dd8d084db68265bb98d8c38bada6494ec/%E5%BE%90%E7%8E%89%E9%BA%9F/%E4%BD%9C%E4%B8%9A8/2-SICP3.73.rkt
racket
在此处补充你的代码 以上
#lang racket (define (stream-car stream) (car stream)) (define (stream-cdr stream) (force (cdr stream))) (define-syntax cons-stream (syntax-rules () [(cons-stream x y) (cons x (delay y))])) (define the-empty-stream '()) (define (stream-null? stream) (null? stream)) 取 stream里面第 n 项 , n从0开始算 (if (stream-...
423ef638c7be3e10c4a4385432da50d610b8290de229320e685d444fa5e999b4
serioga/webapp-clojure-2020
response.clj
(ns lib.ring-util.response) (set! *warn-on-reflection* true) •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• (defn- response-type-charset* ([body content-type] (response-type-charset* body content-type 200)) ([body content-type status] {:body body :hea...
null
https://raw.githubusercontent.com/serioga/webapp-clojure-2020/215c4419564c65cb69565774758b4912cafac6e6/src/lib/ring_util/response.clj
clojure
(ns lib.ring-util.response) (set! *warn-on-reflection* true) •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• (defn- response-type-charset* ([body content-type] (response-type-charset* body content-type 200)) ([body content-type status] {:body body :hea...
808e174e9d0a9425320c0679ace1d1896a0af51b37f9618bacd546eb5f79a30d
input-output-hk/qeditas
ctre.ml
Copyright ( c ) 2015 - 2016 The Qeditas developers Distributed under the MIT software license , see the accompanying file COPYING or -license.php . file COPYING or -license.php. *) open Big_int open Ser open Hashaux open Hash open Net open Db open Mathdata open Assets open Cryptocurr open Tx open Config l...
null
https://raw.githubusercontent.com/input-output-hk/qeditas/f4871bd20833cd08a215f9d5fc9df2d362cba410/src/ctre.ml
ocaml
** coins in the initial distribution start out at maximum age ** ** unlocked ** ** only start aging after it is mature ** ** how many blocks since the output became mature ** ** up to maximum_age ** ** multiply the currency units by (a2/512)^2 ** ** in this case it's locked until block height n and is a reward ** ** on...
Copyright ( c ) 2015 - 2016 The Qeditas developers Distributed under the MIT software license , see the accompanying file COPYING or -license.php . file COPYING or -license.php. *) open Big_int open Ser open Hashaux open Hash open Net open Db open Mathdata open Assets open Cryptocurr open Tx open Config l...
bef3a319b8c908dc7b98ac90c924a09fc47f8b360ddcf0454d9ed23ef0538b69
Happstack/happstack-server
Timer.hs
{-# OPTIONS -fth -fglasgow-exts -fallow-undecidable-instances #-} module Timer where import Happstack.State import Happstack.Data import Data.Typeable import Data.Generics import Control.Monad.State (modify) import Control.Concurrent newtype Timer = Timer Int deriving (Typeable) instance Version Timer $(deriveSeriali...
null
https://raw.githubusercontent.com/Happstack/happstack-server/d9cdb9af5635b1ebd9db0801b66dbf4e58aba66b/attic/Examples/Timer.hs
haskell
# OPTIONS -fth -fglasgow-exts -fallow-undecidable-instances #
module Timer where import Happstack.State import Happstack.Data import Data.Typeable import Data.Generics import Control.Monad.State (modify) import Control.Concurrent newtype Timer = Timer Int deriving (Typeable) instance Version Timer $(deriveSerialize ''Timer) $(deriveNewData [''Timer]) tick () = modify $ \(Time...
dcfd766331b41daf0b756ead07de01651ea1bb4b2ce9566bb2e835594f033bf0
dmvianna/haskellbook
Ch24-LearnParsers.hs
{-# LANGUAGE RankNTypes #-} module LearnParsers where import Text.Trifecta import Text.Parser.Combinators stop :: Parser a stop = unexpected "stop" one = char '1' two = char '2' three = char '3' one' = one >> stop read two characters , ' 1 ' and ' 2 ' oneTwo = char '1' >> char '2' read two characters , ' 1 '...
null
https://raw.githubusercontent.com/dmvianna/haskellbook/b1fdce66283ccf3e740db0bb1ad9730a7669d1fc/src/Ch24-LearnParsers.hs
haskell
# LANGUAGE RankNTypes # string parsers how do we prevent >> to drop it on the floor?
module LearnParsers where import Text.Trifecta import Text.Parser.Combinators stop :: Parser a stop = unexpected "stop" one = char '1' two = char '2' three = char '3' one' = one >> stop read two characters , ' 1 ' and ' 2 ' oneTwo = char '1' >> char '2' read two characters , ' 1 ' and ' 2 ' , then die oneTwo...
62ff4c522048ceba2f70abdb069b2e7e20bf285710431f54be06d17c8f4c64f8
spurious/sagittarius-scheme-mirror
jceks.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; ;;; security/keystore/jks.scm - JKS ;;; Copyright ( c ) 2010 - 2015 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1. Redi...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/security/keystore/jceks.scm
scheme
coding : utf-8 ; -*- security/keystore/jks.scm - JKS Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of condi...
Copyright ( c ) 2010 - 2015 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING (library (security keystore jceks) (expo...
e0918d2af436d18a7f87e860576170ca2a46a22bda36600d223f88894cf941f1
APTE/APTE
algorithm.mli
open Standard_library exception Not_equivalent_left of Process.symbolic_process exception Not_equivalent_right of Process.symbolic_process (** Option for the algorithm *) val option_semantics : Process.semantics ref * true if POR technique with compression will be used ( only for action - determinate proc . ) val o...
null
https://raw.githubusercontent.com/APTE/APTE/d5f1bbd29c2fc324a6015ac50173a0cc8ad66623/Source/trace_equivalence/algorithm.mli
ocaml
* Option for the algorithm * true if we want to display all explored symbolic traces * count the number of explored symbolic traces * Functions for the strategy * The strategy * Debugging tools
open Standard_library exception Not_equivalent_left of Process.symbolic_process exception Not_equivalent_right of Process.symbolic_process val option_semantics : Process.semantics ref * true if POR technique with compression will be used ( only for action - determinate proc . ) val option_compr : bool ref * true i...
cb1d7235c45bc920fb3471b40159ea438d11aee174d6473532f6183ed36a311d
haskell/stylish-haskell
Tests.hs
-------------------------------------------------------------------------------- # LANGUAGE OverloadedLists # module Language.Haskell.Stylish.Step.Tabs.Tests ( tests ) where -------------------------------------------------------------------------------- import Test.Framework (Test, ...
null
https://raw.githubusercontent.com/haskell/stylish-haskell/be4814e4380613567b7055830cd596a580a5ad6d/tests/Language/Haskell/Stylish/Step/Tabs/Tests.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ----...
# LANGUAGE OverloadedLists # module Language.Haskell.Stylish.Step.Tabs.Tests ( tests ) where import Test.Framework (Test, testGroup) import Test.Framework.Providers.HUnit (testCase) import Test.HUnit (Assertion) import Language.Hask...
9c05c673579a2cb5d2488ce898b9256e26d4a111e77fcdd091018edb8191e252
pjotrp/guix
http-client.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2012 , 2013 , 2014 , 2015 < > Copyright © 2015 < > Copyright © 2012 , 2015 Free Software Foundation , Inc. ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of th...
null
https://raw.githubusercontent.com/pjotrp/guix/96250294012c2f1520b67f12ea80bfd6b98075a2/guix/http-client.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2012 , 2013 , 2014 , 2015 < > Copyright © 2015 < > Copyright © 2012 , 2015 Free Software Foundation , Inc. under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-...
3417d525ed06aa54c7b9b10428d662cd40936e065e47b7c8386776bab61e551c
8c6794b6/haskell-sc-scratch
Interpreter.hs
# LANGUAGE NoMonomorphismRestriction # {-# LANGUAGE Rank2Types #-} # LANGUAGE FlexibleContexts # # LANGUAGE NoImplicitPrelude # ------------------------------------------------------------------------------ -- | -- Module : $Header$ CopyRight : ( c ) 8c6794b6 -- License : BSD3 Maintainer : -- Stabili...
null
https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/hsc3-lepton/src/lib/Sound/SC3/Lepton/Pattern/Old/Interpreter.hs
haskell
# LANGUAGE Rank2Types # ---------------------------------------------------------------------------- | Module : $Header$ License : BSD3 Stability : unstable Interpreter of pattern DSL. * Running patterns * Showing patterns * ByteString builder and parser * Syntax representation of patterns
# LANGUAGE NoMonomorphismRestriction # # LANGUAGE FlexibleContexts # # LANGUAGE NoImplicitPrelude # CopyRight : ( c ) 8c6794b6 Maintainer : Portability : non - portable ( Rank2Types , FlexibleContexts ) module Sound.SC3.Lepton.Pattern.Interpreter R(..), toR, runP, runPIO, foldPIO, foldPIO_, mapPIO_, nan...
e8ccfb415d436f4646deebe2e5b71fc4c40649aa337797ff1eea304224e1b863
TrustInSoft/tis-interpreter
builtins_lib_tis_malloc.ml
(**************************************************************************) (* *) (* This file is part of tis-interpreter. *) Copyright ( C ) 2016 CEA Modified b...
null
https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/value/domains/cvalue/builtins_lib_tis_malloc.ml
ocaml
************************************************************************ This file is part of tis-interpreter. you can redistribute it an...
Copyright ( C ) 2016 CEA Modified by General Public License as published by the Free Software Foundation , version 2 . GNU General Public License version 2 for more details . o...
432707af64e68b0fd1a1a0122cbf9ef143491009f2563e0c73f2c94fce2e19e4
alx741/graphite
DGraphSpec.hs
module Data.Graph.DGraphSpec where import Test.Hspec import Test.QuickCheck import Data.Graph.DGraph import Data.Graph.Types spec :: Spec spec = do describe "Directed Graph (DGraph)" $ do it "Can tell if a vertex exists" $ property $ do let g = insertVertex 1 empty :: DGraph Int () ...
null
https://raw.githubusercontent.com/alx741/graphite/c911d7dae2c17d20c70ad9b7da1a1f7b142cbb9a/test/Data/Graph/DGraphSpec.hs
haskell
module Data.Graph.DGraphSpec where import Test.Hspec import Test.QuickCheck import Data.Graph.DGraph import Data.Graph.Types spec :: Spec spec = do describe "Directed Graph (DGraph)" $ do it "Can tell if a vertex exists" $ property $ do let g = insertVertex 1 empty :: DGraph Int () ...
0026c5c9508014ad2141a9b72753ee3271363ff6642d4a5ed5b6b82a9f6d8009
NorfairKing/smos
GetBackup.hs
# LANGUAGE RecordWildCards # module Smos.Server.Handler.GetBackup ( serveGetBackup, prepareBackupFilePath, ) where import Codec.Archive.Zip as Zip import Conduit import Data.ByteString (ByteString) import qualified Data.Conduit.Combinators as C import Servant.Types.SourceT as Source import Smos.Server.Handler...
null
https://raw.githubusercontent.com/NorfairKing/smos/91efacaede3574e2f8f9d9601bf0383897eebfd8/smos-server/src/Smos/Server/Handler/GetBackup.hs
haskell
Create a zip archive NOTE: Running 'Zip.mkEntrySelector' in 'Maybe' instead of 'IO' missing files in the resulting zip file. However: We think that that is better than not being able to download any backups. Stream the zip archive
# LANGUAGE RecordWildCards # module Smos.Server.Handler.GetBackup ( serveGetBackup, prepareBackupFilePath, ) where import Codec.Archive.Zip as Zip import Conduit import Data.ByteString (ByteString) import qualified Data.Conduit.Combinators as C import Servant.Types.SourceT as Source import Smos.Server.Handler...
0f3ed0938642bf4af7a68f8575d19f44dfee5b1b5b68c412da03350b2cb7676e
candera/dynne
operations.clj
(ns dynne.operations "Functions for manipulating operations on sounds, returning new operations." (:refer-clojure :exclude [compile]) (:require [dynne.sound :as snd] [primitive-math :as p])) ;;; Input bindings (defn input "Create an operation that just samples that sound without additional proce...
null
https://raw.githubusercontent.com/candera/dynne/21dc6d4b0c2d28ae5f8d27a7c59a104e1a42a007/src/clj/dynne/operations.clj
clojure
Input bindings Composite operations Compilation
(ns dynne.operations "Functions for manipulating operations on sounds, returning new operations." (:refer-clojure :exclude [compile]) (:require [dynne.sound :as snd] [primitive-math :as p])) (defn input "Create an operation that just samples that sound without additional processing." [identifi...
00140f11c272dc6def098518a4f2229d1cfda401847d1eba0bbc9005ab14b066
ghc/testsuite
T3950.hs
{-# LANGUAGE GADTs #-} module T3950 where -- Id :: (* -> * -> *) -> * -> * -> * data Id p x y = Id (p x y) -- Sealed :: (* -> *) -> * data Sealed p where Sealed :: p x -> Sealed p -- w :: (* -> * -> *) -> * -- Id p :: * -> * -> * rp :: Bool -> Maybe (w (Id p)) rp _ = Just rp' where rp' :: Se...
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/T3950.hs
haskell
# LANGUAGE GADTs # Id :: (* -> * -> *) -> * -> * -> * Sealed :: (* -> *) -> * w :: (* -> * -> *) -> * Id p :: * -> * -> *
module T3950 where data Id p x y = Id (p x y) data Sealed p where Sealed :: p x -> Sealed p rp :: Bool -> Maybe (w (Id p)) rp _ = Just rp' where rp' :: Sealed (Id p x) rp' = undefined
56e3471661d6be09f489869d30fb803dd6b534bd147965e4404fc3eba32c6962
oscaro/clj-gcloud-common
common.clj
(ns clj-gcloud.common (:require [clj-gcloud.duration :as d] [clojure.java.io :as io] [clojure.spec.alpha :as s]) (:import (com.google.auth.oauth2 ServiceAccountCredentials) (com.google.api.gax.core CredentialsProvider BackgroundResource) (com.google.api.gax.retrying RetrySettings) (com.google.a...
null
https://raw.githubusercontent.com/oscaro/clj-gcloud-common/292538ba0c6f014d096db86086febfa03c2aa072/src/clj_gcloud/common.clj
clojure
Credentials Misc Shutdown Helper methods for logging
(ns clj-gcloud.common (:require [clj-gcloud.duration :as d] [clojure.java.io :as io] [clojure.spec.alpha :as s]) (:import (com.google.auth.oauth2 ServiceAccountCredentials) (com.google.api.gax.core CredentialsProvider BackgroundResource) (com.google.api.gax.retrying RetrySettings) (com.google.a...
920601defb599277e95cc3a3428d7312de6a517a6c857b2058f6179d77a550d2
gsakkas/rite
2734.ml
let rec clone x n = if n < 1 then [] else x :: (clone x (n - 1));; let padZero l1 l2 = let a = (List.length l1) - (List.length l2) in if a > 0 then l1 * (clone 0 a) else "bye";; fix let rec clone x n = if n < 1 then [ ] else x : : ( clone x ( n - 1 ) ) ; ; let = let a = ( l1 ) - ( List.length l2...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/2734.ml
ocaml
let rec clone x n = if n < 1 then [] else x :: (clone x (n - 1));; let padZero l1 l2 = let a = (List.length l1) - (List.length l2) in if a > 0 then l1 * (clone 0 a) else "bye";; fix let rec clone x n = if n < 1 then [ ] else x : : ( clone x ( n - 1 ) ) ; ; let = let a = ( l1 ) - ( List.length l2...
7cd730a1418553174515f71569cb9497ca2ff0b0691c3acb82d4ca9dade7dc6e
LuxMiranda/herms
RichText.hs
# LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # module RichText ( Color (..), Text, RichText, (~~), bgColor, bold, fontColor, putText, putTextLn, toStr, ) where import Data.String import System.Console.ANSI import System.IO class Text t where toStr :: B...
null
https://raw.githubusercontent.com/LuxMiranda/herms/cb2bf5be31090300cfd9cae5d5cbf1b1f13c65c4/src/RichText.hs
haskell
We don't want to output ANSI codes if STDOUT is being redirected to a file, so we check if STDOUT is a terminal that supports ANSI.
# LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # module RichText ( Color (..), Text, RichText, (~~), bgColor, bold, fontColor, putText, putTextLn, toStr, ) where import Data.String import System.Console.ANSI import System.IO class Text t where toStr :: B...
34d044d6f8b9725c5b71d6164240888d688ce7d10d6ca18fbd47f34141100eb6
phadej/cabal-refact
Identity.hs
module Distribution.Refact.Refactoring.Identity where import Distribution.Refact.Types.Refactoring identityRefactoring :: Refactoring identityRefactoring = id
null
https://raw.githubusercontent.com/phadej/cabal-refact/9442736429e498f95dc24866c97be587113206ab/src/Distribution/Refact/Refactoring/Identity.hs
haskell
module Distribution.Refact.Refactoring.Identity where import Distribution.Refact.Types.Refactoring identityRefactoring :: Refactoring identityRefactoring = id
f8c014c2dcf1fd2fec22177f0df9bf196562728c5b956dc043001c3421d4fc69
Helium4Haskell/helium
SynExportD.hs
module SynExportD where import SynExportB main = show x
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/make/SynExportD.hs
haskell
module SynExportD where import SynExportB main = show x
e64ecd2b2ecd9c896047aa1d4c4d846ebadbc36d29c8ccf8f4ed50a3719d85df
evertedsphere/noether
GADTMaps.hs
# OPTIONS_GHC -fno - warn - unticked - promoted - constructors # module Noether.Algebra.Linear.GADTMaps where import Noether.Algebra.Single import Noether.Algebra.Multiple import Noether.Algebra.Actions import Noether.Algebra.Linear.Module import Prelude hidi...
null
https://raw.githubusercontent.com/evertedsphere/noether/c4223f64b9df5b0dbbeec1fea726bfff7f5810f5/old/GADTMaps.hs
haskell
----------------------------------------------------------------------- FIXME: This module is broken, as it relies on the old encoding of the algebraic structures. from <-matrices>, Likely extremely nonperformant, but definitely pretty and a good place to test the abstractions developed so far. ------------------...
# OPTIONS_GHC -fno - warn - unticked - promoted - constructors # module Noether.Algebra.Linear.GADTMaps where import Noether.Algebra.Single import Noether.Algebra.Multiple import Noether.Algebra.Actions import Noether.Algebra.Linear.Module import Prelude hidi...
4f956ac2248a83cc564e0cbd522e0ebe766ebffe57684e97fba20187f1c7cc35
magnusjonsson/opti
compiler.ml
open Expr open Syntax_tree open Fresh open Delta open Update open Unit open Eval let direct_dependent_updates (s: specification) (g: fresh_name_generator) ~(direct_dependents_table: (string, string) Hashtbl.t) ~(rank_table: (string, int) Hashtbl.t) (deltas: delta list): update list = let not_already_in_delta_set...
null
https://raw.githubusercontent.com/magnusjonsson/opti/dffb7b86b81c8059276b038313ddd88d2e9ff67e/lib/compiler.ml
ocaml
group the updates by rank and subscripts and perform updates assumption: updates is already sorted While evaluating, pretend that the variable is a phantom variable phantom variable
open Expr open Syntax_tree open Fresh open Delta open Update open Unit open Eval let direct_dependent_updates (s: specification) (g: fresh_name_generator) ~(direct_dependents_table: (string, string) Hashtbl.t) ~(rank_table: (string, int) Hashtbl.t) (deltas: delta list): update list = let not_already_in_delta_set...
e14f4b18b74ab33e904dc72a4883b5dd4653d6ce06b83f32f34b73eb86e1fc04
haslab/HAAP
Tarefa2_2017li1g180.hs
module Tarefa2_2017li1g180 where import LI11718 import Data.List import Data.Maybe import Safe import Tarefa1_2017li1g180 testesT2 :: [Tabuleiro] testesT2 = tabs validaPos :: Posicao -> Tabuleiro -> Bool hpacheco : mudei para incluir parede validaPos (x,y) t = x <= maybe 0 length (headMay t) && y <= length t pon...
null
https://raw.githubusercontent.com/haslab/HAAP/5acf9efaf0e5f6cba1c2482e51bda703f405a86f/examples/plab/svn/2017li1g180/src/Tarefa2_2017li1g180.hs
haskell
mapa nao geravel por caminhos, lava extra a volta posicao inicial invalida mapa so lava mapa com caminho extra altura da lava invalida
module Tarefa2_2017li1g180 where import LI11718 import Data.List import Data.Maybe import Safe import Tarefa1_2017li1g180 testesT2 :: [Tabuleiro] testesT2 = tabs validaPos :: Posicao -> Tabuleiro -> Bool hpacheco : mudei para incluir parede validaPos (x,y) t = x <= maybe 0 length (headMay t) && y <= length t pon...
8cdd2c030b67a256c3ccf2b615f21ee2d6d92368a0447ca063ecc73368f7a7f7
ptaoussanis/carmine
tundra.clj
(ns taoensso.carmine.tests.tundra (:require [clojure.test :as test :refer [is deftest]] [taoensso.carmine :as car :refer [wcar]] [taoensso.carmine.message-queue :as mq] [taoensso.carmine.tundra :as tundra] [taoensso.carmine.tundra.disk :as tdisk])) (comment (remove-ns 'taoensso.ca...
null
https://raw.githubusercontent.com/ptaoussanis/carmine/4f13e08a5a41a81c745e4a82ea1c5c1a2223a3eb/test/taoensso/carmine/tests/tundra.clj
clojure
Won't throw since `(tkey :invalid)` isn't in evictable set: Reset vals throw, but only _after_ all possible dirtying): Wait for replication Make some local modifications throw, but only _after_ all possible fetches) nil eviction timeout (default) is respected! Clears timeouts Wait for replication Clears time...
(ns taoensso.carmine.tests.tundra (:require [clojure.test :as test :refer [is deftest]] [taoensso.carmine :as car :refer [wcar]] [taoensso.carmine.message-queue :as mq] [taoensso.carmine.tundra :as tundra] [taoensso.carmine.tundra.disk :as tdisk])) (comment (remove-ns 'taoensso.ca...
e4beb40bf3d156659211a6a2dbe1f685844b2837fa72b3f51f6bb85078202c77
Clojure2D/clojure2d
glitch.clj
(ns clojure2d.extra.glitch "Various glitching pixel filters or functions ### Filter Use following filters with [[filter-channels]] function. * Slitscan - x/y slitscan simulation based on wave functions * Shift-channels - just shift channels * Mirror - mirror image along different axes * Slitscan2 - s...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d/db446f0d9e64d223b795c6fbd98dbdd8dd0a2779/src/clojure2d/extra/glitch.clj
clojure
Random setup is based on sum of oscillators defined in `signal` namespace. channel shifts Slitscan2 mirrorimage pix2line blend machine maybe some random colorspace on output? ch1 blend ch2 blend ch3 blend switch images imgslicer
(ns clojure2d.extra.glitch "Various glitching pixel filters or functions ### Filter Use following filters with [[filter-channels]] function. * Slitscan - x/y slitscan simulation based on wave functions * Shift-channels - just shift channels * Mirror - mirror image along different axes * Slitscan2 - s...
8ae9e311497e16fd8f5274dbb9ffd058920c7fa69a0c4ba8a32b10116ce9d482
herd/herdtools7
cat2html.ml
open Printf let prog = if Array.length Sys.argv > 0 then Filename.basename Sys.argv.(0) else "cat2html7" module Make (O:sig val verbose : int val name : string val inp : in_channel val out : out_channel val css : string val lexer : LexItem.collect -> Lexing.lexbuf -> un...
null
https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/tools/cat2html.ml
ocaml
open Printf let prog = if Array.length Sys.argv > 0 then Filename.basename Sys.argv.(0) else "cat2html7" module Make (O:sig val verbose : int val name : string val inp : in_channel val out : out_channel val css : string val lexer : LexItem.collect -> Lexing.lexbuf -> un...
7c5da0a42fbfe45d49758433f8df9d36ca9376a50d4cebe1ee9383caae4bcbef
sonyxperiadev/dataflow
Renderer.hs
-- Renders 'Diagram' as JSON. module DataFlow.JSONGraphFormat.Renderer (convertDiagram, renderJSONGraph) where import qualified Data.Aeson as A import Data.ByteString.Lazy (ByteString) import Data.Text (pack, unpack) import qualified Data.Map as M import qualified ...
null
https://raw.githubusercontent.com/sonyxperiadev/dataflow/8bef5bd6bf96a918197e66ad9d675ff8cd2a4e33/src/DataFlow/JSONGraphFormat/Renderer.hs
haskell
Renders 'Diagram' as JSON. TODO: replace title attribute with mandatory ID for boundaries
module DataFlow.JSONGraphFormat.Renderer (convertDiagram, renderJSONGraph) where import qualified Data.Aeson as A import Data.ByteString.Lazy (ByteString) import Data.Text (pack, unpack) import qualified Data.Map as M import qualified Data.Vector as V ...
67a3afcf2aeb0b27a6233ce33dd1e417b4c07f302d1c152a9ec9ef68fbad902e
Perry961002/SICP
exe2.32-subsets.scm
(define (subsets s) (if (null? s) (list '()) (let ((rest (subsets (cdr s)))) ;除去首元素之后的子集表 (append rest (map (lambda (x) ;对于rest中的每个元素可以选择把(car s)加入其中, 或者不加 (cons (car s) x)) rest)))))
null
https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap2/exercise/exe2.32-subsets.scm
scheme
除去首元素之后的子集表 对于rest中的每个元素可以选择把(car s)加入其中, 或者不加
(define (subsets s) (if (null? s) (list '()) (cons (car s) x)) rest)))))
96d39e0656e2ed1407d89213e940fcbd8a5c83df9b85a5266dd4e4ba16a842f1
ghc/testsuite
mc23.hs
-- Checks that using the "by" clause in a transform requires a function parameter # OPTIONS_GHC -XMonadComprehensions -XTransformListComp # module ShouldFail where import Data.List(take) z = [x | x <- [1..10], then take 5 by x ]
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/mc23.hs
haskell
Checks that using the "by" clause in a transform requires a function parameter
# OPTIONS_GHC -XMonadComprehensions -XTransformListComp # module ShouldFail where import Data.List(take) z = [x | x <- [1..10], then take 5 by x ]
1f88e1e46afd6938af3296eb0ef6a54c775095228ee5271a041d02bb87ad8737
mangpo/greenthumb
test-search.rkt
#lang s-exp rosette (require "../inst.rkt" "llvm-parser.rkt" "llvm-machine.rkt" "llvm-printer.rkt" "llvm-simulator-rosette.rkt" "llvm-simulator-racket.rkt" "llvm-validator.rkt" "llvm-symbolic.rkt" "llvm-stochastic.rkt" "llvm-forwardbackward.rkt" "llvm-enumerator.rk...
null
https://raw.githubusercontent.com/mangpo/greenthumb/7a8626205879af8c788f9927eeff643f4ddc5cde/llvm/test-search.rkt
racket
(define code (define code (define code (define code (define code (define code (define code (define code (define code Define search space of candidate programs. # of ?'s = # of instructions in a candidate program. (send symbolic synthesize-window spec sketch live-out upperbound cost, #f = no upperbound #t = synth...
#lang s-exp rosette (require "../inst.rkt" "llvm-parser.rkt" "llvm-machine.rkt" "llvm-printer.rkt" "llvm-simulator-rosette.rkt" "llvm-simulator-racket.rkt" "llvm-validator.rkt" "llvm-symbolic.rkt" "llvm-stochastic.rkt" "llvm-forwardbackward.rkt" "llvm-enumerator.rk...
4d7c98fe1775957198fd9ec5ad7fa503f8077f4a8fc44767aa4f8de54b2dd191
zelark/AoC-2020
day_11.clj
(ns zelark.aoc-2020.day-11 (:require [clojure.java.io :as io] [clojure.string :as str])) --- Day 11 : Seating System --- ;; (def input (slurp (io/resource "input_11.txt"))) (defn parse-input [input target] (->> (str/split-lines input) (mapcat (fn [y row] (keep-indexed (fn [x ch] (when (= ch...
null
https://raw.githubusercontent.com/zelark/AoC-2020/5417c3514889eb02efc23f6be7d69e29fdfa0376/src/zelark/aoc_2020/day_11.clj
clojure
(ns zelark.aoc-2020.day-11 (:require [clojure.java.io :as io] [clojure.string :as str])) --- Day 11 : Seating System --- (def input (slurp (io/resource "input_11.txt"))) (defn parse-input [input target] (->> (str/split-lines input) (mapcat (fn [y row] (keep-indexed (fn [x ch] (when (= ch tar...
37f1d376fb2ad539558d2003eea63a94f59173d7edca5af85bb44a298fb50d5d
Fresheyeball/Shpadoinkle
ExampleState.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # module Shpadoinkle.Website.Types.ExampleState where import Data.Aeson (FromJSON, ToJSON) import GHC.Generics (Generic) import Shpadoinkle (NFData)...
null
https://raw.githubusercontent.com/Fresheyeball/Shpadoinkle/5e5fb636fb0b0e99f04bae0d75cff722a10463ae/website/Shpadoinkle/Website/Types/ExampleState.hs
haskell
# LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # module Shpadoinkle.Website.Types.ExampleState where import Data.Aeson (FromJSON, ToJSON) import GHC.Generics (Generic) import Shpadoinkle (NFData) import Shpadoinkle.Isreal...
7aaecb202435d8105c049c6ccf431b89d136cc7f8c1cb878404e003b2549773d
WhatsApp/erlt
erlt_build.erl
Copyright ( c ) Facebook , Inc. and its affiliates . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing,...
null
https://raw.githubusercontent.com/WhatsApp/erlt/616a4adc628ca8754112e659701e57f1cd7fecd1/erltc/src/erlt_build.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright ( c ) Facebook , Inc. and its affiliates . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , in ./rebar_prv_erlt.erl erlt_build is based on earlier work on erlbuild , a low - level build tool for Erlang -modul...
367d6b4134dea29c037a3bd0cb15d45f99a2a2b74b582179b94b159826169a72
simingwang/emqx-plugin-kafkav5
net_adm.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2016 . 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 applic...
null
https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/rel/emqx_plugin_kafka/lib/kernel-8.3/src/net_adm.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 l...
Copyright Ericsson AB 1996 - 2016 . 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(net_adm). -export([host_file/0, localhost/0, names/0, names/1, ping_list/1, world/0,world/1, world_...
9c18996148e8dfcc9d55d7fe4ccc3ae7a697b4fbb01207cf621bfe491174a6b8
basho/machi
corfurl_test.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may ob...
null
https://raw.githubusercontent.com/basho/machi/e87bd59a9777d805b00f9e9981467eb28e28390c/prototype/corfurl/test/corfurl_test.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module...
25061711e96e1c1195db36392907cf73feb38f0c757104069bb730a9a8bc7897
ml4tp/tcoq
document.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/ide/document.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** Invariant, only the tip is a allowe...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * exception Empty let invalid_...
d0ee865721d5b9bf65715971f45e90eb9298c50701991bae4442298784e4ea0f
cloudkj/lambda-ml
dbscan.clj
(ns lambda-ml.clustering.dbscan "Density-based clustering with DBSCAN. Example usage: ``` (def data [[2 10] [2 5] [8 4] [5 8] [7 5] [6 4] [1 2] [4 9]]) (let [epsilon 4.0 min-pts 2] (dbscan lambda-ml.distance/euclidean epsilon min-pts data)) = > { [ 8 4 ] 1 , [ 6 4 ] 1 , [ 7 5 ] 1 , [ 5 8 ] 2 , [ ...
null
https://raw.githubusercontent.com/cloudkj/lambda-ml/a470a375d2b94f5e5e623a5e198ac312b018ffb3/src/lambda_ml/clustering/dbscan.clj
clojure
Add current node if it's within proximity Explore near branch Optionally, explore far branch No more points Already visited Visit point Noise Expand cluster Assign point to cluster Find all neighbors-of-neighbors Assign expanded neighbors to clusters
(ns lambda-ml.clustering.dbscan "Density-based clustering with DBSCAN. Example usage: ``` (def data [[2 10] [2 5] [8 4] [5 8] [7 5] [6 4] [1 2] [4 9]]) (let [epsilon 4.0 min-pts 2] (dbscan lambda-ml.distance/euclidean epsilon min-pts data)) = > { [ 8 4 ] 1 , [ 6 4 ] 1 , [ 7 5 ] 1 , [ 5 8 ] 2 , [ ...
1352818b8ca88b11665707614badf3ad16f15a85b5eb7ed4179ed83c3dfeb013
hanshuebner/bknr-web
leech.lisp
(in-package :leech) wer ein beispiel braucht soll sich das passt hier nicht ganz in den rahmen rein :) (defgeneric schedule-job (queue job)) (defgeneric execute-job (queue job)) (defgeneric job-queue-add-job (queue job)) (defgeneric job-error-handler (queue job e)) (defgeneric job-queue-print (queue)) (defgene...
null
https://raw.githubusercontent.com/hanshuebner/bknr-web/5c30b61818a2f02f6f2e5dc69fd77396ec3afc51/modules/spider/leech.lisp
lisp
lock list?
(in-package :leech) wer ein beispiel braucht soll sich das passt hier nicht ganz in den rahmen rein :) (defgeneric schedule-job (queue job)) (defgeneric execute-job (queue job)) (defgeneric job-queue-add-job (queue job)) (defgeneric job-error-handler (queue job e)) (defgeneric job-queue-print (queue)) (defgene...
1f0737ce59710d2c2dc4634d396b0ffe6e0ac60e63c07c190928e9cce3dcc8b2
janestreet/async_smtp
mail_log_tags.ml
let component = "component" let spool_id = "spool-id" let rfc822_id = "rfc822-id" let local_id = "local-id" let sender = "sender" let recipient = "recipient" let email_fingerprint = "email-fingerprint" let message_size = "message-size" let local_ip_address = "local-ip-address" let remote_address = "remote-address" let ...
null
https://raw.githubusercontent.com/janestreet/async_smtp/72c538d76f5c7453bbc89af44d93931cd499a912/src/mail_log_tags.ml
ocaml
let component = "component" let spool_id = "spool-id" let rfc822_id = "rfc822-id" let local_id = "local-id" let sender = "sender" let recipient = "recipient" let email_fingerprint = "email-fingerprint" let message_size = "message-size" let local_ip_address = "local-ip-address" let remote_address = "remote-address" let ...
cd92d662562b67008993749a60f471594655af3b3fb843e679b833d73efe8ce6
wdebeaum/step
test7.lisp
(define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::RIGHT (SENSES ((meta-data :origin fruitcarts :entry-date 20060803 :change-date nil :comments nil :wn ("right%1:15:00")) ONT::object - dependent - location ) (example "to the right of the building") (TEMPL GEN-PART-OF-RELN-TEMPL) enforce...
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/converter/test7.lisp
lisp
(TEMPL other-reln-subcat-required-templ)
(define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::RIGHT (SENSES ((meta-data :origin fruitcarts :entry-date 20060803 :change-date nil :comments nil :wn ("right%1:15:00")) ONT::object - dependent - location ) (example "to the right of the building") (TEMPL GEN-PART-OF-RELN-TEMPL) enforce...
4cb63ef274820528143bc9ae78d8e120dd70a6cded23e4815984105995e7d702
aaltodsg/instans
sparql-ops.lisp
-*- Mode : Lisp ; Syntax : COMMON - LISP ; Base : 10 ; Package : INSTANS -*- ;;; Author : ( ) ;;; (in-package #:instans) (eval-when (:compile-toplevel) (load "sparql/sparql-types")) TODO ;;; * How should we name sparql-functions? Should we use sparql-zap or just zap? The latter is nice and short, but the ...
null
https://raw.githubusercontent.com/aaltodsg/instans/5ffc90e733e76ab911165f205ba57a7b3b200945/src/sparql/sparql-ops.lisp
lisp
Syntax : COMMON - LISP ; Base : 10 ; Package : INSTANS -*- * How should we name sparql-functions? Should we use sparql-zap or just zap? The latter is nice and short, but the function calls may be difficult to understand, since we have to add the sparql- in front of the name? * How to handle string literal argum...
Author : ( ) (in-package #:instans) (eval-when (:compile-toplevel) (load "sparql/sparql-types")) TODO (in-package #:instans) 17.2.2 Effective Boolean Value ( EBV ) The XQuery Effective Boolean Value rules rely on the definition of 's fn : boolean . The following false if the operand value has z...
ac636845beb395a593b2bd609f26237621610267719f04c5512ae9deab454f79
Vaguery/klapaucius
scalar_conversions_test.clj
(ns push.instructions.base.scalar_conversions_test (:require [push.interpreter.core :as i]) (:use midje.sweet) (:use [push.util.test-helpers]) (:use [push.type.item.scalar]) ) (tabular (fact ":boolean->float returns 1.0 if the `:boolean` is `true`, 0.0 if `false`" (register-type-and-check-instruction ...
null
https://raw.githubusercontent.com/Vaguery/klapaucius/17b55eb76feaa520a85d4df93597cccffe6bdba4/test/push/instructions/base/scalar_conversions_test.clj
clojure
(ns push.instructions.base.scalar_conversions_test (:require [push.interpreter.core :as i]) (:use midje.sweet) (:use [push.util.test-helpers]) (:use [push.type.item.scalar]) ) (tabular (fact ":boolean->float returns 1.0 if the `:boolean` is `true`, 0.0 if `false`" (register-type-and-check-instruction ...
d5cd20d1fb1a1988ca28564a265f6e37ff0974dea752dc5663e6df8ba98775ee
bravit/hid-examples
IPTypes.hs
{-# LANGUAGE DeriveAnyClass #-} module IPTypes where import Data.Word import Data.List (intercalate) import Control.Exception (Exception) newtype IP = IP {unIP :: Word32} deriving (Eq, Ord) instance Show IP where show (IP ip) = intercalate "." $ map show [b4,b3,b2,b1] where (ip1, b1) = ip `divMod` 256...
null
https://raw.githubusercontent.com/bravit/hid-examples/913e116b7ee9c7971bba10fe70ae0b61bfb9391b/ip/lookup/IPTypes.hs
haskell
# LANGUAGE DeriveAnyClass #
module IPTypes where import Data.Word import Data.List (intercalate) import Control.Exception (Exception) newtype IP = IP {unIP :: Word32} deriving (Eq, Ord) instance Show IP where show (IP ip) = intercalate "." $ map show [b4,b3,b2,b1] where (ip1, b1) = ip `divMod` 256 (ip2, b2) = ip1 `divMod` ...
e3e05c43fd2269987c6bf7fb6b3b14731bd6f97c9edaf0b0b342759e727ca333
csm/s4
auth.clj
(ns s4.auth (:require [cemerick.uri :as uri] [clojure.string :as string] [clojure.core.async :as async] [clojure.spec.alpha :as s] [s4.auth.protocols :as s4p] [s4.util :refer [hex sha256 hmac-256 unhex]] [superv.async :as sv] [clojure...
null
https://raw.githubusercontent.com/csm/s4/a09662bbd1696ee2159545523d5def34802fcc16/src/s4/auth.clj
clojure
for some reason, ~ isn't encoded by AWS? (map first headers)))) )) result
(ns s4.auth (:require [cemerick.uri :as uri] [clojure.string :as string] [clojure.core.async :as async] [clojure.spec.alpha :as s] [s4.auth.protocols :as s4p] [s4.util :refer [hex sha256 hmac-256 unhex]] [superv.async :as sv] [clojure...
b5b8eed095706deef85e3b7f3185a9e1b3146b41f0e16cfa9a810cd2e1dc9c09
reborg/clojure-essential-reference
4.clj
< 1 > ;; ................................0 < 2 > (lazy-seq (when-first [x xs] ; <3> (cons x (dechunk (rest xs)))))) < 4 > ;; .0
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/SequentialProcessing/when-first/4.clj
clojure
................................0 <3> .0
< 1 > < 2 > (lazy-seq (cons x (dechunk (rest xs)))))) < 4 >
a38a5e3ff344fa96f17ee9a78b6d4e2bfdf781c912b662683b8ad761070e819f
ocaml/ocaml-lsp
client.ml
include Rpc.Client
null
https://raw.githubusercontent.com/ocaml/ocaml-lsp/0b1390b78c0e4f72deb76f04b8a0e83fa2f03b6c/lsp-fiber/src/client.ml
ocaml
include Rpc.Client
ec14a0053b78fce417027d363663d5f129e880a93b5e1eb6253da507ef06bb44
haskell-lisp/yale-haskell
runtime-utils.scm
;;; runtime-utils.scm -- basic runtime support ;;; author : date : 9 Jun 1992 ;;; ;;; This file contains definitions (beyond the normal mumble stuff) ;;; that is referenced directly in code built by the code generator. ;;; See backend/codegen.scm. ;;; ;;; (delay form) ;;; returns a delay object with u...
null
https://raw.githubusercontent.com/haskell-lisp/yale-haskell/4e987026148fe65c323afbc93cd560c07bf06b3f/runtime/runtime-utils.scm
scheme
runtime-utils.scm -- basic runtime support This file contains definitions (beyond the normal mumble stuff) that is referenced directly in code built by the code generator. See backend/codegen.scm. (delay form) returns a delay object with unevaluated "form". (box form) returns a delay object with evaluate...
author : date : 9 Jun 1992 (define-syntax (delay form) `(cons '#f (lambda () ,form))) (define-syntax (box form) (cond ((number? form) `(quote ,(cons '#t form))) ((and (pair? form) (eq? (car form) 'quote)) `(quote ,(cons '#t (cadr form)))) (else `(cons '#t ,form)))) (define-syntax (unbox...
502a59839681e3c4a0a775d5be626094fc1447c679a4db356545fcd073310baa
cl-axon/cl-paip
gps1.lisp
;;; -*- Mode: Lisp; Syntax: Common-Lisp; -*- ;;; Code from Paradigms of Artificial Intelligence Programming Copyright ( c ) 1991 File gps1.lisp : First version of GPS ( General Problem Solver ) (defvar *state* nil "The current state: a list of conditions.") (defvar *ops* nil "A list of available operators.") ...
null
https://raw.githubusercontent.com/cl-axon/cl-paip/5922be8e3aae00197779bad4a05afa8ea1f6b8c9/gps1.lisp
lisp
-*- Mode: Lisp; Syntax: Common-Lisp; -*- Code from Paradigms of Artificial Intelligence Programming ==============================
Copyright ( c ) 1991 File gps1.lisp : First version of GPS ( General Problem Solver ) (defvar *state* nil "The current state: a list of conditions.") (defvar *ops* nil "A list of available operators.") (defstruct op "An operation" (action nil) (preconds nil) (add-list nil) (del-list nil)) (defun GPS (*stat...
f553f727ad5ee56e99af3f81056562327c49bf5a9195589595977d3012b87b88
hyperfiddle/electric
no_join.clj
# + TODO : TODO(t ! ) STARTED(s ! ) VERIFY(v ! ) | DONE ( ! ) CANCELED(@/ ! ) ;; ;;* HFQL which doesn't join anything ;; Same as [ [ file:~/Documents / fabric / scratch / geoffrey / hfql / links.clj::(ns geoffrey.hfql.links][HFQL with links ] ] but renderers have to sample streams on their own . (ns geoffrey.hfql...
null
https://raw.githubusercontent.com/hyperfiddle/electric/e633dc635cf84e0a2320b664ba722b696ce0067b/scratch/geoffrey/2021/hfql/no_join.clj
clojure
* HFQL which doesn't join anything @(render ) nil
# + TODO : TODO(t ! ) STARTED(s ! ) VERIFY(v ! ) | DONE ( ! ) CANCELED(@/ ! ) Same as [ [ file:~/Documents / fabric / scratch / geoffrey / hfql / links.clj::(ns geoffrey.hfql.links][HFQL with links ] ] but renderers have to sample streams on their own . (ns geoffrey.hfql.no-join (:require [datascript.core :as d...
8bbdaccdb90dd13d09710ce8e3870c281db2dc4724e3efa0ce0a332b27b2f12c
spawnfest/eep49ers
big_local_type.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2001 - 2015 . 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/916ea06f69c8dc1b3f950219fe17c2d8bb12bf77/lib/dialyzer/test/opaque_SUITE_data/src/big_local_type.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 2001 - 2015 . 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(big_local_type). -export([parse_form/1,parse_exprs/1,parse_term/1]). -export([normalise/1,tokens/1,tokens/...
d6e68e80d136d5b66e5269f55ddf8bf2d9ee5059be045396e81170c7f78a902d
janestreet/vcaml
highlighted_text.ml
open Core module Chunk = struct type t = { text : string ; hl_group : string option } let to_msgpack { text; hl_group } = match hl_group with | None -> Msgpack.Array [ String text ] | Some hl_group -> Array [ String text; String hl_group ] ;; end type t = Chunk.t list let to_msgpack t ...
null
https://raw.githubusercontent.com/janestreet/vcaml/2693867a8cebe12585d882816a192a9c9722766a/src/highlighted_text.ml
ocaml
open Core module Chunk = struct type t = { text : string ; hl_group : string option } let to_msgpack { text; hl_group } = match hl_group with | None -> Msgpack.Array [ String text ] | Some hl_group -> Array [ String text; String hl_group ] ;; end type t = Chunk.t list let to_msgpack t ...
a9695e853fc7dfd70d2bb39b5018d598a29e0cb0cd2d485167b03cd38c2f937c
techascent/tvm-clj
_quantize.clj
(ns tvm-clj.impl.fns.relay._quantize (:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns])) (tvm-ns-fns/export-tvm-functions "relay._quantize")
null
https://raw.githubusercontent.com/techascent/tvm-clj/1088845bd613b4ba14b00381ffe3cdbd3d8b639e/src/tvm_clj/impl/fns/relay/_quantize.clj
clojure
(ns tvm-clj.impl.fns.relay._quantize (:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns])) (tvm-ns-fns/export-tvm-functions "relay._quantize")
6e5a97ceac457055cf4e920cf24a4ee7bc25a679b8268e81297f5fd57d9b787f
jaspervdj/uplcg
Cards.hs
# LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # module Uplcg.Cards ( Deck , CardSets (..) , loadCardSets ) where import qualified Data.Aeson.TH as Aeson import qualified Data.HashMap.Strict as HMS import Data.Maybe (fromMaybe, listToMaybe) import qualified Data.Text ...
null
https://raw.githubusercontent.com/jaspervdj/uplcg/79e26c44cb127109ae5d545d0c5bad436dd1493f/server/lib/Uplcg/Cards.hs
haskell
# LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # module Uplcg.Cards ( Deck , CardSets (..) , loadCardSets ) where import qualified Data.Aeson.TH as Aeson import qualified Data.HashMap.Strict as HMS import Data.Maybe (fromMaybe, listToMaybe) import qualified Data.Text ...
5c9e37eda67d82e2365751c5d0038b2c6bd66cce6963d98de7c755eb030c96bc
jdf-id-au/talk
ws.clj
(ns talk.ws "Parse ws messages and forward to `in` with backpressure. Send ws messages asynchronously from `out-sub`." (:require [clojure.tools.logging :as log] [clojure.core.async :as async :refer [go-loop chan <!! >!! <! >! put! close!]] [clojure.spec.alpha :as s] [talk.util...
null
https://raw.githubusercontent.com/jdf-id-au/talk/90605a561fd7815fcb9826fd2603cf5626d7a0f9/src/talk/ws.clj
clojure
WebSocketChunkedInput only makes ContinuationWebSocketFrames, so needed to make-first. is actually called async/take! passes nil if out-sub closed backpressure even if message invalid! Benefit is application not needing to worry about manual memory management... first take!, see send! for subsequent # (log/de...
(ns talk.ws "Parse ws messages and forward to `in` with backpressure. Send ws messages asynchronously from `out-sub`." (:require [clojure.tools.logging :as log] [clojure.core.async :as async :refer [go-loop chan <!! >!! <! >! put! close!]] [clojure.spec.alpha :as s] [talk.util...
4eda96744d9718e35d02fe009ccb7901d10f2d3c53dae3f8ae9be8fd56b59b14
kazu-yamamoto/quic
TransportError.hs
{-# LANGUAGE OverloadedStrings #-} module TransportError ( transportErrorSpec ) where import Control.Monad import Data.ByteString () import qualified Data.ByteString as BS import qualified Network.TLS as TLS import Network.TLS.QUIC (ExtensionRaw(..)) import Test.Hspec import UnliftIO.Concurrent import UnliftIO....
null
https://raw.githubusercontent.com/kazu-yamamoto/quic/89b78b2f60ba8a3815b5857e4011ea4b572dec9c/test/TransportError.hs
haskell
# LANGUAGE OverloadedStrings # -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------...
module TransportError ( transportErrorSpec ) where import Control.Monad import Data.ByteString () import qualified Data.ByteString as BS import qualified Network.TLS as TLS import Network.TLS.QUIC (ExtensionRaw(..)) import Test.Hspec import UnliftIO.Concurrent import UnliftIO.Timeout import Network.QUIC.Client...
97c997bed32789dac1c1deb3c7cb543a68d077fa3d14c910d1a322685ceaf496
mokus0/junkbox
RecordCalculus.hs
# LANGUAGE TemplateHaskell # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE GeneralizedNewtypeDeriving # -- mostly just some experimenst with 'Unbound'... module Experiments.RecordCalculus where import Unbound.LocallyName...
null
https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/Experiments/RecordCalculus.hs
haskell
mostly just some experimenst with 'Unbound'... A simple untyped lambda calculus, with access to "primitive" values, extended to include "case" constructs, with the following semantics: values, the only significance of which is their identity. to expressions. Application of a case expression to a selector y...
# LANGUAGE TemplateHaskell # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE GeneralizedNewtypeDeriving # module Experiments.RecordCalculus where import Unbound.LocallyNameless 1 . A new primitive value type , the " sel...
d13b6e42a4920c32b88fad6e97c390c7c1f734486a8775167b777caaa9ef152c
alanzplus/EOPL
1.28.rkt
#lang eopl (define merge (lambda (loi1 loi2) (cond ((null? loi1) loi2) ((null? loi2) loi1) ((< (car loi1) (car loi2)) (cons (car loi1) (merge (cdr loi1) loi2))) (else (cons (car loi2) (merge loi1 (cdr loi2))))))) (provide merge)
null
https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/EOPL/ch1/1.28.rkt
racket
#lang eopl (define merge (lambda (loi1 loi2) (cond ((null? loi1) loi2) ((null? loi2) loi1) ((< (car loi1) (car loi2)) (cons (car loi1) (merge (cdr loi1) loi2))) (else (cons (car loi2) (merge loi1 (cdr loi2))))))) (provide merge)
83ffa7345fe9407069a3d81604efbf6bfb1a34e569f472a298daaf93e44f0c9f
EveryTian/Haskell-Codewars
process-trees.hs
-- -trees module ProcessTree where import ProcessTree.Process preloaded : type PID = Int data Process = Process PID [ Process ] type PID = Int data Process = Process PID [Process] -} makeTree :: [(PID, PID)] -> Process makeTree = f 1 where f p xs = Process p [f (fst i) xs | i <- xs, snd i == p]
null
https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/5kyu/process-trees.hs
haskell
-trees
module ProcessTree where import ProcessTree.Process preloaded : type PID = Int data Process = Process PID [ Process ] type PID = Int data Process = Process PID [Process] -} makeTree :: [(PID, PID)] -> Process makeTree = f 1 where f p xs = Process p [f (fst i) xs | i <- xs, snd i == p]
757b17d991884f4f5c37fa40db551dbbf0b62e94239ab8765074f578a24622ff
tarides/opam-monorepo
serial_shape.ml
open Import module Conv = struct type ('repr, 'true_type) t = { from_repr : 'repr -> ('true_type, Rresult.R.msg) result; to_repr : 'true_type -> 'repr; equal : ('true_type -> 'true_type -> bool) option; pp : 'true_type Fmt.t option; } let make ~from_repr ~to_repr ?equal ?pp () = { from_repr; to_...
null
https://raw.githubusercontent.com/tarides/opam-monorepo/5b70c915f30fa3d8eb312fadf978b5f1aa9ab5b3/lib/serial_shape.ml
ocaml
open Import module Conv = struct type ('repr, 'true_type) t = { from_repr : 'repr -> ('true_type, Rresult.R.msg) result; to_repr : 'true_type -> 'repr; equal : ('true_type -> 'true_type -> bool) option; pp : 'true_type Fmt.t option; } let make ~from_repr ~to_repr ?equal ?pp () = { from_repr; to_...
60ed5f03dc9154e29436fe051da5b8a5b18237fa360aa1727f955dd4a9679a55
arclanguage/Clamp
iter.lisp
;;;; These are macros which allow for different kinds of iteration. (in-package :clamp) (use-syntax :clamp) (mac repeat (n &body body) "Excutes BODY N times." (if (no body) ; If this is part of iterate. `(iter:repeat ,n) `(loop repeat ,n do (do ,@body)))) (mac up (var a b &body body) "Evaluates BOD...
null
https://raw.githubusercontent.com/arclanguage/Clamp/9f165b057a109564cd0e836cf611d1e81e43cb12/src/iter.lisp
lisp
These are macros which allow for different kinds of iteration. If this is part of iterate. the higher number (the from) as opposed to down which does not.
(in-package :clamp) (use-syntax :clamp) (mac repeat (n &body body) "Excutes BODY N times." `(iter:repeat ,n) `(loop repeat ,n do (do ,@body)))) (mac up (var a b &body body) "Evaluates BODY iterating from A up to B exclusive." `(loop for ,var from ,a below ,b do (do ,@body))) (mac upto (var a b &bo...
b28b4da3d49c0f4458d996de1fca68b37098e28a585f06f536d6119276e234b6
metosin/reitit
project.clj
(defproject metosin/reitit-malli "0.6.0" :description "Reitit: Malli coercion" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :scm {:name "git" :url "" :dir "../.."} :plugins [[lein-parent "0.3.2"]] :parent-project {:path "../../project.clj" ...
null
https://raw.githubusercontent.com/metosin/reitit/47f1ee0c8407cdc6a6dbf7bf58b6eb682531a3f7/modules/reitit-malli/project.clj
clojure
(defproject metosin/reitit-malli "0.6.0" :description "Reitit: Malli coercion" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :scm {:name "git" :url "" :dir "../.."} :plugins [[lein-parent "0.3.2"]] :parent-project {:path "../../project.clj" ...
1fff2e401d17797a4690ce5e6c0a73859446b77da6f8e6e85c971f81e44ac62b
tezos-commons/baseDAO
Helper.hs
SPDX - FileCopyrightText : 2021 Tezos Commons SPDX - License - Identifier : LicenseRef - MIT - TC module SMT.Common.Helper ( handleTransfer ) where import Universum hiding (drop, swap) import Lorentz hiding (now, (>>)) import Ligo.BaseDAO.Common.Types import SMT.Model.BaseDAO.Types handleTransfer :: [Simpl...
null
https://raw.githubusercontent.com/tezos-commons/baseDAO/01eedff3e222945815816fd5e2a1623040a75388/haskell/test/SMT/Common/Helper.hs
haskell
SPDX - FileCopyrightText : 2021 Tezos Commons SPDX - License - Identifier : LicenseRef - MIT - TC module SMT.Common.Helper ( handleTransfer ) where import Universum hiding (drop, swap) import Lorentz hiding (now, (>>)) import Ligo.BaseDAO.Common.Types import SMT.Model.BaseDAO.Types handleTransfer :: [Simpl...
ae2ed38e86fdd7906f09383377d9f15e543b79ad3b5bfc3056cfeda63280d3b6
evrim/core-server
serialize.lisp
;; ---------------------------------------------------------------------------- ;; Prevalence Isomorphism ;; ---------------------------------------------------------------------------- (in-package :core-server) ;; -------------------------------------------------------------------------- ;; Lisp->XML ;; -------------...
null
https://raw.githubusercontent.com/evrim/core-server/200ea8151d2f8d81b593d605b183a9cddae1e82d/src/database/serialize.lisp
lisp
---------------------------------------------------------------------------- Prevalence Isomorphism ---------------------------------------------------------------------------- -------------------------------------------------------------------------- Lisp->XML ----------------------------------------------------...
(in-package :core-server) (defmethod xml-serialize ((object t) &optional (k #'xml-serialize)) (declare (ignore k)) (error "Cannot serialize ~A" object)) XML->Lisp (defmethod xml-deserialize ((xml t) &optional (k #'xml-deserialize)) (declare (ignore k)) (error "Cannot deserialize ~A" xml)) (defxml <db:objec...
f4234e851879e285a77115bb632b8ea2e8b12e82aa073c8a84160fb389b1496d
madvas/fractalify
form_select.cljs
(ns fractalify.components.form-select (:require [material-ui.core :as ui] [re-frame.core :as f] [schema.core :as s :include-macros true] [fractalify.utils :as u] [plumbing.core :as p] [clojure.walk :as w] [fractalify.main.schemas :as ch] [reagent.core :as r] [com.rpl.specter :as e]...
null
https://raw.githubusercontent.com/madvas/fractalify/20193e6ff7293af19eb90ed2f40d3f928d9f4ccc/src/cljs/fractalify/components/form_select.cljs
clojure
(ns fractalify.components.form-select (:require [material-ui.core :as ui] [re-frame.core :as f] [schema.core :as s :include-macros true] [fractalify.utils :as u] [plumbing.core :as p] [clojure.walk :as w] [fractalify.main.schemas :as ch] [reagent.core :as r] [com.rpl.specter :as e]...
9875cceb7fe6efd3c266bd016d8ac9d115c3539142d401d4bcccdb7918f2c143
psholtz/MIT-SICP
exercise3-33.scm
;; ;; [working] ;; ;; ;; Adder constraint: ;; (define (adder a1 a2 sum) (define (process-new-value) (cond ((and (has-value? a1) (has-value? a2)) (set-value! sum (+ (get-value a1) (get-value a2)) me)) ((and (has-value? a1) (has-value? sum)) (set-value! a2 (- (get-value sum) ...
null
https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Section-3.3/mit-scheme/exercise3-33.scm
scheme
[working] Adder constraint: Multiplier constraint: Constant constraint: Supporting constraint procedures: Define the average network: Run the unit tests: ==> ==> ==>
(define (adder a1 a2 sum) (define (process-new-value) (cond ((and (has-value? a1) (has-value? a2)) (set-value! sum (+ (get-value a1) (get-value a2)) me)) ((and (has-value? a1) (has-value? sum)) (set-value! a2 (- (get-value sum) (get-value a1)) me)) ((and (has-val...
6c5354e5bf6a687de4f1d14948fd8604c2c3de2ed398b8605368b98e08240df5
abarbu/haskell-torch
CRC32C.hs
-- | Module : Torch . Internal . Copyright : ( c ) 2013 < > , ( ? ) Maintainer : < > -- Stability : stable Portability : non - portable ( GHC extensions ) -- -- Implementation of the CRC32C checksum algorithm. -- The current implementation is in " pure " , thus does not take advantage -...
null
https://raw.githubusercontent.com/abarbu/haskell-torch/03b2c10bf8ca3d4508d52c2123e753d93b3c4236/haskell-torch/src/Torch/Internal/CRC32C.hs
haskell
| Stability : stable Implementation of the CRC32C checksum algorithm. of hardware implementations available on several CPU types. It's performance (throughput) is therefore possibly insufficient for certain classes of applications. Attribution: it is believed that the code is, at least partly, based on an ...
Module : Torch . Internal . Copyright : ( c ) 2013 < > , ( ? ) Maintainer : < > Portability : non - portable ( GHC extensions ) The current implementation is in " pure " , thus does not take advantage implementation by , which has since vanished from the internet . module Torch.Intern...
ce87c89f6870ee190fa4eba97b3bc534a1b669a856f2d0da92b2b765be1a7ba2
practicalli/practicalli.github.io
landing_page_test.cljs
(ns practicalli.landing-page-test (:require [cljs.test :refer-macros [deftest is testing]] [practicalli.landing-page :as landing-page]))
null
https://raw.githubusercontent.com/practicalli/practicalli.github.io/6eb2f2f82911106b1512dcd3eef36d33294e06eb/test/practicalli/landing_page_test.cljs
clojure
(ns practicalli.landing-page-test (:require [cljs.test :refer-macros [deftest is testing]] [practicalli.landing-page :as landing-page]))
294e9f0653740c09d05a1a71c67a2244f356bbb826f6cb0d069deadf0a6ccc4d
fortytools/holumbus
Intermediate.hs
-- ---------------------------------------------------------------------------- | Module : Holumbus . Query . Intermediate Copyright : Copyright ( C ) 2007 , 2008 License : MIT Maintainer : ( ) Stability : experimental Portability : portable Version : 0.3 The...
null
https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/Holumbus-Searchengine/src/Holumbus/Query/Intermediate.hs
haskell
---------------------------------------------------------------------------- ---------------------------------------------------------------------------- * The intermediate result type. * Construction * Query * Combine * Conversion ---------------------------------------------------------------------------- | ...
| Module : Holumbus . Query . Intermediate Copyright : Copyright ( C ) 2007 , 2008 License : MIT Maintainer : ( ) Stability : experimental Portability : portable Version : 0.3 The data type for intermediate results occuring during query processing . Modu...
159d9c9fd5ece25221ac00724708e933ade7eb6dd7131dfd7fce08858d6702a6
uim/sigscheme
test-srfi6.scm
;; Filename : test-srfi6.scm ;; About : unit test for SRFI-6 Basic String Ports ;; Copyright ( C ) 2005 - 2006 < mover AT hct.zaq.ne.jp > Copyright ( c ) 2007 - 2008 SigScheme Project < uim - en AT googlegroups.com > ;; ;; All rights reserved. ;; ;; Redistribution and use in source and binary forms, with...
null
https://raw.githubusercontent.com/uim/sigscheme/ccf1f92d6c2a0f45c15d93da82e399c2a78fe5f3/test/test-srfi6.scm
scheme
Filename : test-srfi6.scm About : unit test for SRFI-6 Basic String Ports All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaim...
Copyright ( C ) 2005 - 2006 < mover AT hct.zaq.ne.jp > Copyright ( c ) 2007 - 2008 SigScheme Project < uim - en AT googlegroups.com > 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright 3 . Neither the name of authors ...
5ba5acfeffb72a30cbb3f7952b545f027f9b27427829180d2fd3a6470ed51037
mbj/stratosphere
HealthCheckConfigProperty.hs
module Stratosphere.Lightsail.Container.HealthCheckConfigProperty ( HealthCheckConfigProperty(..), mkHealthCheckConfigProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere....
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/lightsail/gen/Stratosphere/Lightsail/Container/HealthCheckConfigProperty.hs
haskell
module Stratosphere.Lightsail.Container.HealthCheckConfigProperty ( HealthCheckConfigProperty(..), mkHealthCheckConfigProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere....
b7eb024e8622885590699ab543d002e66c1e37e6ebb061ef88e151ce950d63c3
aligusnet/astro
MoonTest.hs
module Data.Astro.MoonTest ( tests ) where import Test.Framework (testGroup) import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.HUnit import Test.HUnit.Approx import Test.QuickCheck import Data.Astro.TypesTest (testDecimalDegrees) import Data.Astro.Coordin...
null
https://raw.githubusercontent.com/aligusnet/astro/a8c951885061ccef98299af053fdc1a1cc808f17/test/Data/Astro/MoonTest.hs
haskell
module Data.Astro.MoonTest ( tests ) where import Test.Framework (testGroup) import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.HUnit import Test.HUnit.Approx import Test.QuickCheck import Data.Astro.TypesTest (testDecimalDegrees) import Data.Astro.Coordin...
faca88a6d17d5b01da5b1a15029bf16db0b46ded597ad7eefbbd1a2606007ba7
gsakkas/rite
0129.ml
CaseG VarG [(ConsPatG EmptyPatG EmptyPatG,Nothing,AppG [EmptyG,EmptyG])] match xs with | hd :: tl -> f (f hd hd) tl
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/clusters/0129.ml
ocaml
CaseG VarG [(ConsPatG EmptyPatG EmptyPatG,Nothing,AppG [EmptyG,EmptyG])] match xs with | hd :: tl -> f (f hd hd) tl
c8d07fb6ca2719de2e41e7c0e69ca451452ac41f32e1b921638f4edabc26d496
hexlet-codebattle/battle_asserts
factorial_trailing_zeroes.clj
(ns battle-asserts.issues.factorial-trailing-zeroes (:require [clojure.test.check.generators :as gen])) (def level :easy) (def tags ["math"]) (def description {:en "Return the number of trailing zeroes in n! 10 ! = 3 628 800 , the number of trailing zeros is 2 . " :ru "Верните количество конечных нулей в n!...
null
https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/9dfe09e2ab64651047e02dc7ec6ef395b0754ce5/src/battle_asserts/issues/factorial_trailing_zeroes.clj
clojure
(ns battle-asserts.issues.factorial-trailing-zeroes (:require [clojure.test.check.generators :as gen])) (def level :easy) (def tags ["math"]) (def description {:en "Return the number of trailing zeroes in n! 10 ! = 3 628 800 , the number of trailing zeros is 2 . " :ru "Верните количество конечных нулей в n!...
a8972b84161e108bab37994d686f1d56cedac7c7bc9663559e892a874a077b92
callum-oakley/advent-of-code
25.clj
(ns aoc.2020.25 (:require [clojure.string :as str] [clojure.test :refer [deftest is]])) (defn parse [s] (map read-string (str/split-lines s))) (defn steps [subject] (iterate #(mod (* subject %) 20201227) 1)) (defn loops [key] (some (fn [[n val]] (when (= val key) n)) (map-indexed vector (steps 7)))) (...
null
https://raw.githubusercontent.com/callum-oakley/advent-of-code/e24c126fdfa4852c1380f5d1b1fda96da1ebe553/src/aoc/2020/25.clj
clojure
(ns aoc.2020.25 (:require [clojure.string :as str] [clojure.test :refer [deftest is]])) (defn parse [s] (map read-string (str/split-lines s))) (defn steps [subject] (iterate #(mod (* subject %) 20201227) 1)) (defn loops [key] (some (fn [[n val]] (when (= val key) n)) (map-indexed vector (steps 7)))) (...
14ebde0135df3b242ae940cb656d07eb3686a15d58083e0922ae8931bad4c124
caisah/sicp-exercises-and-examples
ex.3.50.scm
;; Complete the following definition, which generalizes stream-map to allow procedures that take multiple arguments , analogous to map in Section 2.2.1 . (define (stream-map proc . argstreams) (if (stream-null? (car argstreams)) the-empty-stream (cons-stream (apply proc (map stream-car argstream...
null
https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/3.5.1-streams_are_delayed_lists/ex.3.50.scm
scheme
Complete the following definition, which generalizes stream-map to allow procedures
that take multiple arguments , analogous to map in Section 2.2.1 . (define (stream-map proc . argstreams) (if (stream-null? (car argstreams)) the-empty-stream (cons-stream (apply proc (map stream-car argstreams)) (apply stream-map (cons proc (map stream-cdr argstreams)))))) ...
511eeffa78d72dc72e91a2031871d0572ac73c36216d787600e573a4ced60180
opencog/pln
implication-to-implication-scope.scm
;; ======================================================================= ;; Implication Scope to Implication Rule ( TODO add wiki page ) ;; ImplicationLink LambdaLink ;; V ;; P LambdaLink ;; V ;; Q ;; |- ;; ImplicationScopeLink ;; V ;; P ;; Q ;; ;; where V is a variable ...
null
https://raw.githubusercontent.com/opencog/pln/52dc099e21393892cf5529fef687a69682436b2d/opencog/pln/rules/wip/implication-to-implication-scope.scm
scheme
======================================================================= Implication Scope to Implication Rule V P V Q |- ImplicationScopeLink V P Q where V is a variable or a list of variables, P and Q are the --------------------------------------------------------------...
( TODO add wiki page ) ImplicationLink LambdaLink LambdaLink implicant and implicand bodies . (define implication-to-implication-scope-variables (VariableList (TypedVariableLink (VariableNode "$TyVs") (TypeChoice (TypeNode "TypedVariableLink") (TypeNode "Var...
5afcb3edd001f07f0a38888c6440fab7c939e840b6fb4644cd0a38ffebbbb953
nodename/stately
core.cljs
(set! js/React (js/require "react-native/Libraries/react-native/react-native.js")) (ns quantumcalc.core (:require [reagent.core :as reagent] [nodename.stately.comms :refer [log warn use-re-frame!]] [quantumcalc.ui.calc :refer [calc-screen]] [quantumcalc.statechart.main :refer [sta...
null
https://raw.githubusercontent.com/nodename/stately/cf4e1092445f1b88f0846756ba053ac1e2c5b9bf/examples/QuantumCalc/src/quantumcalc/core.cljs
clojure
(set! js/React (js/require "react-native/Libraries/react-native/react-native.js")) (ns quantumcalc.core (:require [reagent.core :as reagent] [nodename.stately.comms :refer [log warn use-re-frame!]] [quantumcalc.ui.calc :refer [calc-screen]] [quantumcalc.statechart.main :refer [sta...
1f83aa4a69c4d60fa536c98821eba3f055ef0f36f6f80dee7c157f11daf7365a
fmw/vix
util.clj
test / vix / test / util.clj tests for misc utility functions . Copyright 2011 - 2012 , Vixu.com , F.M. ( Filip ) de Waard < > . ;; 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 ...
null
https://raw.githubusercontent.com/fmw/vix/112a45d6e376f099ad0a3f5bff9cc07511f2ff5e/test/clj/vix/test/util.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permiss...
test / vix / test / util.clj tests for misc utility functions . Copyright 2011 - 2012 , Vixu.com , F.M. ( Filip ) de Waard < > . distributed under the License is distributed on an " AS IS " BASIS , (ns vix.test.util (:use [vix.util] :reload) (:use [clojure.test]) (:require [clj-time.core :as time-core])) ...
229c6e74d997f24a8a0481cb65789f8814c972c2c5ee067931ea57a6acc0a944
racket/racket7
struct-star.rkt
#lang racket/base (require (for-syntax racket/base racket/provide-transform)) (provide struct* struct*-copy struct*-out) ;; The `struct*` form is like `struct`, but a field can be have a `*` ;; before it or not: the fields without `*` are moved into a nested ;; structure (and ca...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/common/struct-star.rkt
racket
The `struct*` form is like `struct`, but a field can be have a `*` before it or not: the fields without `*` are moved into a nested structure (and cannot be mutable), and the ones with `*` are kept immediate. This distinction is useful is `struct*-copy` is used often to asjust some fields and not others in a relat...
#lang racket/base (require (for-syntax racket/base racket/provide-transform)) (provide struct* struct*-copy struct*-out) (struct* fish (* weight color name)) though one field in the outer structure . (begin-for-syntax (struct struct*-shap...
514b07a21ae5e6a86c794bc5cd2a95251d6b7b8b8fa74428024a1b92adb3f9f5
vzaccaria/pandoc-mm
Data.hs
# LANGUAGE QuasiQuotes # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE FlexibleContexts # module MindMap.Data where import Text.Pandoc import Text.Pandoc.Error import Text.Pandoc.Walk (walk) import qualified Data.Map as Map import Debug.Trace import Data.List import Data.String.Interpolate import System.Process impor...
null
https://raw.githubusercontent.com/vzaccaria/pandoc-mm/c1dd14ce4790b2d8a787e5703a9693920cf9bcaa/src/MindMap/Data.hs
haskell
# LANGUAGE OverloadedStrings # This might happen also when some meta info is present but with a blank value final decision; change from: to unfoldr:: ([a] -> Maybe (b, [a])) -> [a] -> [b] so we need to build: ([Chunk] -> Maybe (Structure, [Chunk])) to be filled later To generate unique identifiers we ...
# LANGUAGE QuasiQuotes # # LANGUAGE FlexibleContexts # module MindMap.Data where import Text.Pandoc import Text.Pandoc.Error import Text.Pandoc.Walk (walk) import qualified Data.Map as Map import Debug.Trace import Data.List import Data.String.Interpolate import System.Process import System.Directory import Data.Char...
a34847e09f46ff4e30d301b349f3bcff12d96759dc2a1305e93b55ebd1be3d5a
fulcro-legacy/fulcro3
dom_spec.cljc
(ns com.fulcrologic.fulcro.dom-spec (:require [fulcro-spec.core :refer [specification behavior assertions provided component when-mocking]] [com.fulcrologic.fulcro.algorithms.do-not-use :as util] com.fulcrologic.fulcro.dom [com.fulcrologic.fulcro.dom-common :as cdom] [clojure.string :as str] #...
null
https://raw.githubusercontent.com/fulcro-legacy/fulcro3/5d1b9ab274406afd68b792192d5a783f29963314/src/test/com/fulcrologic/fulcro/dom_spec.cljc
clojure
Need to run these because the cljs version of these emit JS maps
(ns com.fulcrologic.fulcro.dom-spec (:require [fulcro-spec.core :refer [specification behavior assertions provided component when-mocking]] [com.fulcrologic.fulcro.algorithms.do-not-use :as util] com.fulcrologic.fulcro.dom [com.fulcrologic.fulcro.dom-common :as cdom] [clojure.string :as str] #...
a3a44923953a5ff6d365e295fdb1406287c33d91601c16fd0ae4f1b422e869fb
facebookarchive/duckling_old
util_test.clj
(ns duckling.util-test (:use [clojure.test] [duckling.util])) (deftest mergings (is (= {:foo 2 :bar 2} (merge-according-to {:foo +} {:foo 1 :bar 2} {:foo 1})))) (deftest partialmax (is (= [[6] [1 2]] (split-by-partial-max compare [1 2 6] [1 2 3 4]))))
null
https://raw.githubusercontent.com/facebookarchive/duckling_old/bf5bb9758c36313b56e136a28ba401696eeff10b/test/duckling/util_test.clj
clojure
(ns duckling.util-test (:use [clojure.test] [duckling.util])) (deftest mergings (is (= {:foo 2 :bar 2} (merge-according-to {:foo +} {:foo 1 :bar 2} {:foo 1})))) (deftest partialmax (is (= [[6] [1 2]] (split-by-partial-max compare [1 2 6] [1 2 3 4]))))
12b8818359107780d6d257983ae79d40d393c9c30db1845c327a6c0cdb655534
jyh/metaprl
itt_power.ml
doc <:doc< @module[Itt_power] A power of a type <<'T>> is a type of all @i{subsets} of <<'T>>. @docoff ---------------------------------------------------------------- @begin[license] This file is part of MetaPRL, a modular, higher order logical framework that provides a logical programming ...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/itt/applications/function_spaces/itt_power.ml
ocaml
TODO: We need also no-thinnig version of elim More TODO: Power{T} forms lattice
doc <:doc< @module[Itt_power] A power of a type <<'T>> is a type of all @i{subsets} of <<'T>>. @docoff ---------------------------------------------------------------- @begin[license] This file is part of MetaPRL, a modular, higher order logical framework that provides a logical programming ...
495934133327071d1a343b90863eedcf515b26ddaab12fc63eaa63cb777e0c0e
jbclements/sxml
xpath-ast.rkt
#lang racket/base (require srfi/2 "ssax/errors-and-warnings.rkt" "xpath-parser.rkt") (provide (all-defined-out)) ;; XPath/XPointer -> Abstract Syntax Tree parser ; ; This software is in Public Domain. IT IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND . ; ; Please send bug reports and comments...
null
https://raw.githubusercontent.com/jbclements/sxml/d3b8570cf7287c4e06636e17634f0f5c39203d52/sxml/xpath-ast.rkt
racket
XPath/XPointer -> Abstract Syntax Tree parser This software is in Public Domain. Please send bug reports and comments to: Dmitry Lizorkin ========================================================================== Writing operations as an S-expression in an infix notation -----------------------------------...
#lang racket/base (require srfi/2 "ssax/errors-and-warnings.rkt" "xpath-parser.rkt") (provide (all-defined-out)) IT IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND . W3C textual / XPointer - > AST (define (txp:ast-operation-helper expr-lst op-lst add-on) (let ((rev-expr-ls...
a8635b6904de2c71b4f81b415c4102b32f43bf2c8ee49387381c5e3d2c8e444a
graninas/Hydra
Language.hs
{-# LANGUAGE GADTs #-} # LANGUAGE TemplateHaskell # module Hydra.Core.Process.Language where import Hydra.Prelude import qualified Hydra.Core.Domain as D -- | Language for Process. data ProcessF m next where -- | Fork a process for node. ForkProcess :: m a -> (D.ProcessPtr a -> next) ->...
null
https://raw.githubusercontent.com/graninas/Hydra/60d591b1300528f5ffd93efa205012eebdd0286c/lib/hydra-free/src/Hydra/Core/Process/Language.hs
haskell
# LANGUAGE GADTs # | Language for Process. | Fork a process for node. | Hardly kill the process. | Try get result (non-blocking). | Await for result (blocking). | Fork a process. | Hardly kill a process. | Try get result from a process (non-blocking). | Await for result from a process (blocking).
# LANGUAGE TemplateHaskell # module Hydra.Core.Process.Language where import Hydra.Prelude import qualified Hydra.Core.Domain as D data ProcessF m next where ForkProcess :: m a -> (D.ProcessPtr a -> next) -> ProcessF m next KillProcess :: D.ProcessPtr a -> (() -> next) -> ProcessF m next TryG...
fe4474f09cc96a805bc54c57e9cb537206ad5e2f1d4a2da7c54810b0e95ac117
hasktorch/hasktorch
GEncoderOnlySpec.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PartialTypeSignatures # # LANGUAGE RecordW...
null
https://raw.githubusercontent.com/hasktorch/hasktorch/2b70de320c8cf39d97aa1859032e085740f6561e/experimental/gradually-typed/test/Torch/GraduallyTyped/NN/Transformer/GEncoderOnlySpec.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # OPTIONS_GHC -v2 #
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PartialTypeSignatures # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE Type...