_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
9e7808078884133f9e4826a5ae9e8f5183d48c9f4ee32cdc4c3279617fdde171
2600hz/kazoo
knm_telnyx_util.erl
%%%----------------------------------------------------------------------------- ( C ) 2014 - 2020 , 2600Hz %%% @doc @author This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %%% %%% @end...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_numbers/src/knm_telnyx_util.erl
erlang
----------------------------------------------------------------------------- @doc @end ----------------------------------------------------------------------------- ------------------------------------------------------------------------------ 2B13129677542 . @end -------------------------------------------------...
( C ) 2014 - 2020 , 2600Hz @author This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(knm_telnyx_util). -export([did/1]). -export([req/2, req/3]). -include("knm.hrl"). -define(M...
d1483cc957d3d0265df4654b3a2ffbc6223867ec14b149f551b4b8b604b0b3e9
rubenbarroso/EOPL
3_46.scm
(load "/Users/ruben/Dropbox/EOPL/src/interps/r5rs.scm") (load "/Users/ruben/Dropbox/EOPL/src/interps/define-datatype.scm") (load "/Users/ruben/Dropbox/EOPL/src/interps/sllgen.scm") ;;;;;;;;;;;;;;;; top level and tests ;;;;;;;;;;;;;;;; (define run (lambda (string) (eval-program (scan&parse string)))) (define ru...
null
https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/chapter3/3_46.scm
scheme
top level and tests ;;;;;;;;;;;;;;;; needed for testing grammatical specification ;;;;;;;;;;;;;;;; the interpreter ;;;;;;;;;;;;;;;; \new3 \new7 support for begin-exp booleans ;;;;;;;;;;;;;;;; procedures ;;;;;;;;;;;;;;;; We simply need to replace the current representation for closures by the abstract syntax tree ...
(load "/Users/ruben/Dropbox/EOPL/src/interps/r5rs.scm") (load "/Users/ruben/Dropbox/EOPL/src/interps/define-datatype.scm") (load "/Users/ruben/Dropbox/EOPL/src/interps/sllgen.scm") (define run (lambda (string) (eval-program (scan&parse string)))) (define run-all (lambda () (run-experiment run use-executi...
2a37bea666ce408788eeb4ee9701ebf8af3c5f539853ddcb5f32d6a3189d3402
johnridesabike/acutis
matching.ml
(**************************************************************************) (* *) Copyright ( c ) 2022 . (* *) This Source Code For...
null
https://raw.githubusercontent.com/johnridesabike/acutis/f9144c8890c43627376e28991023a9dbe1b8d3f9/lib/matching.ml
ocaml
************************************************************************ ****************************...
Copyright ( c ) 2022 . This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. module T = Typechecker module Ty = Typescheme module C...
7964aa007898a36763b44ea406ff848e756a87be90c6d342b0a9a8b989ec8f69
GlideAngle/flare-timing
LeadAreaMain.hs
# OPTIONS_GHC -fno - warn - partial - type - signatures # import Prelude hiding (last) import Data.Maybe (fromMaybe, catMaybes) import System.Environment (getProgName) import System.Console.CmdArgs.Implicit (cmdArgs) import Formatting ((%), fprint) import Formatting.Clock (timeSpecs) import System.Clock (getTime, Cloc...
null
https://raw.githubusercontent.com/GlideAngle/flare-timing/34873946be9b93c37048ed118ef5b4649c71d630/lang-haskell/flare-timing/prod-apps/lead-area/LeadAreaMain.hs
haskell
# OPTIONS_GHC -fno - warn - partial - type - signatures # import Prelude hiding (last) import Data.Maybe (fromMaybe, catMaybes) import System.Environment (getProgName) import System.Console.CmdArgs.Implicit (cmdArgs) import Formatting ((%), fprint) import Formatting.Clock (timeSpecs) import System.Clock (getTime, Cloc...
75fe7201f41f9e929aded38c00bdd0dc1e1edccb889bac7361c1bf43c3821403
gregtatcam/imaplet-lwt
imaplet_stun.mli
* Copyright ( c ) 2013 - 2014 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND...
null
https://raw.githubusercontent.com/gregtatcam/imaplet-lwt/d7b51253e79cffa97e98ab899ed833cd7cb44bb6/lib/commands/imaplet_stun.mli
ocaml
* Copyright ( c ) 2013 - 2014 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND...
18ff20bf3c99a36ad0ad106714bd57a6120e86f70d8e3af917c304d13c9e24ff
matterhorn-chat/matterhorn
Users.hs
{-# LANGUAGE OverloadedStrings #-} module Matterhorn.State.Users ( handleNewUsers , handleTypingUser , handleUserUpdated , withFetchedUser , withFetchedUserMaybe ) where import Prelude () import Matterhorn.Prelude import qualified Data.Text as T import qualified Data.Foldable as F impo...
null
https://raw.githubusercontent.com/matterhorn-chat/matterhorn/19a73ce833a8a8de3616cf884c03e9f08a4db0a7/src/Matterhorn/State/Users.hs
haskell
# LANGUAGE OverloadedStrings # | Handle the typing events from the websocket to show the currently typing users on UI Indicate that the user is typing in the specified channel. If the typing is occurring in a thread and that thread is open in some team, also indicate that the user is typing in that thread's wind...
module Matterhorn.State.Users ( handleNewUsers , handleTypingUser , handleUserUpdated , withFetchedUser , withFetchedUserMaybe ) where import Prelude () import Matterhorn.Prelude import qualified Data.Text as T import qualified Data.Foldable as F import qualified Data.HashMap.Strict as...
a61320cc63581242d78a02f8b236e69eebe7719de813ba26d8e49582f73bf562
well-typed/large-records
Simple.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # {-# LANGUAGE TypeOperators #-} {-# LANGUAGE RankNTypes #-} -- | Simple interface (without a functor argument) -- -- See "Data.Record.Anon.Advanced" for the advanced interface. You will probably also want to import " Data . Record . Anon " . -- -- ...
null
https://raw.githubusercontent.com/well-typed/large-records/5f4f8af48d8189d675bf4c822b83d85b4e13800b/large-anon/src/Data/Record/Anon/Simple.hs
haskell
# LANGUAGE TypeOperators # # LANGUAGE RankNTypes # | Simple interface (without a functor argument) See "Data.Record.Anon.Advanced" for the advanced interface. Intended for qualified import. > import Data.Record.Anon > import Data.Record.Anon.Simple (Record) > import qualified Data.Record.Anon.Simple a...
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # You will probably also want to import " Data . Record . Anon " . module Data.Record.Anon.Simple ( Record , empty , insert , insertA , applyPending , get , set , project , inject , lens , merge , toAdvanced , fromAdvanced , seq...
da12f430b8717e1438794d80f1fa750c802538b8a601162f8a453a16e98f190e
haskus/packages
Maybe.hs
# LANGUAGE LambdaCase # -- | Utils for Maybe data type module Haskus.Utils.Maybe ( onNothing , onNothingM , fromMaybeM , headMaybe , module Data.Maybe ) where import Data.Maybe -- | Flipped `fromMaybe` onNothing :: Maybe a -> a -> a onNothing = flip fromMaybe -- | Flipped `fromMaybeM` onNothingM :...
null
https://raw.githubusercontent.com/haskus/packages/40ea6101cea84e2c1466bc55cdb22bed92f642a2/haskus-utils-data/src/lib/Haskus/Utils/Maybe.hs
haskell
| Utils for Maybe data type | Flipped `fromMaybe` | Flipped `fromMaybeM` | Get the head of the list if the latter is not empty
# LANGUAGE LambdaCase # module Haskus.Utils.Maybe ( onNothing , onNothingM , fromMaybeM , headMaybe , module Data.Maybe ) where import Data.Maybe onNothing :: Maybe a -> a -> a onNothing = flip fromMaybe onNothingM :: Monad m => m (Maybe a) -> m a -> m a onNothingM = flip fromMaybeM | fromMaybe...
b5c8eef6e795e2ca11804a5d5b224e239ac28096f17ff4643077a04cea217943
asivitz/Hickory
main.hs
module Main where import System.Environment import System.FilePath import Hickory.ModelLoading.Wavefront import Hickory.ModelLoading.DirectXModel (loadModelFromX, packedMesh) import Hickory.Vulkan.Mesh (writeMeshToFile) main :: IO () main = do getArgs >>= \case [inf, outf] -> case takeExtension inf of ".o...
null
https://raw.githubusercontent.com/asivitz/Hickory/f45a2109c6bbf6adba1c3ea089d248421599c2e7/core/pack-model/main.hs
haskell
module Main where import System.Environment import System.FilePath import Hickory.ModelLoading.Wavefront import Hickory.ModelLoading.DirectXModel (loadModelFromX, packedMesh) import Hickory.Vulkan.Mesh (writeMeshToFile) main :: IO () main = do getArgs >>= \case [inf, outf] -> case takeExtension inf of ".o...
c1933a1970b01d795bce6604d83c6b78f41efc54da92e3ffeffe86df4288a48f
herd/herdtools7
language.ml
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/aef181181408f40dbdb4ed35c5338335a83d983f/litmus/language.ml
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2010 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...
459b94ce6bedc0e8c48b37a31dcee48f938cc0bcf2a95cf0b9b6e120ac9cfd22
ilyasergey/monadic-cfa
MonadKCFA.hs
module Main where -- Imports. import CPS import Data.Map as Map import Data.Set as Set -- Abbreviations. type k :-> v = Map.Map k v type ℙ a = Set.Set a (==>) :: a -> b -> (a,b) (==>) x y = (x,y) (//) :: Ord k => (k :-> v) -> [(k,v)] -> (k :-> v) (//) f [] = f (//) f ((x,y):tl) = Map.insert x y (f // tl) -- Pa...
null
https://raw.githubusercontent.com/ilyasergey/monadic-cfa/caeb9e5375affe9c3cdee0753ae2ba489cdc328a/obsolete/MonadKCFA.hs
haskell
Imports. Abbreviations. Partial order theory. (>>=) :: m a -> (a -> m b) -> m b (>>) :: m a -> m b -> m b return :: a -> m a fail :: String -> m a return a >>= k = k a m >>= return = m
module Main where import CPS import Data.Map as Map import Data.Set as Set type k :-> v = Map.Map k v type ℙ a = Set.Set a (==>) :: a -> b -> (a,b) (==>) x y = (x,y) (//) :: Ord k => (k :-> v) -> [(k,v)] -> (k :-> v) (//) f [] = f (//) f ((x,y):tl) = Map.insert x y (f // tl) class Lattice a where bot :: a top :...
1bcd93ad51aeab8c112cc880e3850d4009c6c8dc123826c37c65924b892cc209
adinapoli/mandrill
HTTP.hs
{-# LANGUAGE OverloadedStrings #-} module Network.API.Mandrill.HTTP where import Control.Applicative import Data.Aeson import Data.Monoid import qualified Data.Text as T import Network.API.Mandrill.Settings import Network.API.Mandrill.Types import ...
null
https://raw.githubusercontent.com/adinapoli/mandrill/3e57e9a2851df70a21ffe96c0cca14a575923334/src/Network/API/Mandrill/HTTP.hs
haskell
# LANGUAGE OverloadedStrings #
module Network.API.Mandrill.HTTP where import Control.Applicative import Data.Aeson import Data.Monoid import qualified Data.Text as T import Network.API.Mandrill.Settings import Network.API.Mandrill.Types import Network.HTTP.Client import...
964defac2e5d83c4270e9ffc25b6b63e90be1fe48731ea8b6180a25545aee496
gvolpe/haskell-book-exercises
matchingTuples.hs
module TupleFunctions where -- These have to be the same type because -- (+) is a -> a -> a addEmUp2 :: Num a => (a, a) -> a addEmUp2 (x, y) = x + y -- addEmUp2 could also be written like so (not pattern matching) addEmUp2Alt :: Num a => (a, a) -> a addEmUp2Alt tup = (fst tup) + (snd tup) fst3 :: (a, b, c) -> a fst3...
null
https://raw.githubusercontent.com/gvolpe/haskell-book-exercises/5c1b9d8dc729ee5a90c8709b9c889cbacb30a2cb/chapter7/matchingTuples.hs
haskell
These have to be the same type because (+) is a -> a -> a addEmUp2 could also be written like so (not pattern matching)
module TupleFunctions where addEmUp2 :: Num a => (a, a) -> a addEmUp2 (x, y) = x + y addEmUp2Alt :: Num a => (a, a) -> a addEmUp2Alt tup = (fst tup) + (snd tup) fst3 :: (a, b, c) -> a fst3 (x, _, _) = x third3 :: (a, b, c) -> c third3 (_, _, x) = x
4a64be8aa2a4a7529f00dd9db996db70c20a5cb55dbcbce081164fb6f93d5acb
mauny/the-functional-approach-to-programming
type_synth.ml
#open "termes";; #open "type_synthesis";; #open "ml_type";; #open "ml_exp1";; (* +scheme+ *) type 'a scheme = Forall of int list * 'a;; (* +scheme+ *) (* +unique+ *) let rec unique = function [] -> [] | x::l -> if mem x l then unique l else x :: unique l;; (* +unique+ *) (* +vars_of_tyenv+ *) let vars_of_tyenv...
null
https://raw.githubusercontent.com/mauny/the-functional-approach-to-programming/1ec8bed5d33d3a67bbd67d09afb3f5c3c8978838/cl-75/Typage/type_synth.ml
ocaml
+scheme+ +scheme+ +unique+ +unique+ +vars_of_tyenv+ +vars_of_tyenv+ +generalize+ +generalize+ +instance+ +instance+ +subst_but+ +subst_but+ +subst_minus+ +subst_minus+ +subst_env+ +subst_env+ +term_map+ +term_map+ +make_string_vars+ +make_string_vars+ +unop_type+ +unop_type+ ...
#open "termes";; #open "type_synthesis";; #open "ml_type";; #open "ml_exp1";; type 'a scheme = Forall of int list * 'a;; let rec unique = function [] -> [] | x::l -> if mem x l then unique l else x :: unique l;; let vars_of_tyenv env = flat_map (fun (_, Forall(gvars,t)) -> subtract (vars t) gvars) env ;; l...
af0adcc85c8e5e5673eedf45d29e35d217576e1026fff658d984fcdeb51248b3
Zulu-Inuoe/seq
seq-tests.lisp
(defpackage #:com.inuoe.seq-tests (:use #:cl #:com.inuoe.seq) (:import-from #:alexandria #:plist-hash-table) (:import-from #:fiveam #:def-suite #:finishes #:in-suite #:is #:signals #:test) (:export ;;; Test suites for specializing the 'expressions' #:seq ;;; Programmati...
null
https://raw.githubusercontent.com/Zulu-Inuoe/seq/504dd97594b89afcf95ebcd8f4543dc1a0519e4b/t/seq/seq-tests.lisp
lisp
Test suites for specializing the 'expressions' Programmatic run-tests
(defpackage #:com.inuoe.seq-tests (:use #:cl #:com.inuoe.seq) (:import-from #:alexandria #:plist-hash-table) (:import-from #:fiveam #:def-suite #:finishes #:in-suite #:is #:signals #:test) (:export #:seq #:run #:main)) (in-package #:com.inuoe.seq-tests) (def-suite seq...
131cbdc28e1d8eb21817d5b23f120e5cedc67fac89f32366e00843db710ec730
codinuum/cca
context.ml
Copyright 2012 - 2020 Codinuum Software Lab < > Copyright 2020 Chiba Institute of Technology 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 Unl...
null
https://raw.githubusercontent.com/codinuum/cca/88ea07f3fe3671b78518769d804fdebabcd28e90/src/ast/analyzing/langs/cpp/parsing/src/context.ml
ocaml
Copyright 2012 - 2020 Codinuum Software Lab < > Copyright 2020 Chiba Institute of Technology 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 Unl...
3d6966824329a83a3e012afd8943af4dcf95db522786a179f8e1539d54dfea01
funcool/catacumba
core.clj
Copyright ( c ) 2015 - 2016 < > ;; All rights reserved. ;; ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions are met: ;; ;; * Redistributions of source code must retain the above copyright notice, this ;; list of conditions...
null
https://raw.githubusercontent.com/funcool/catacumba/a493843176ee8defa2f3c6afa23c720f495d9341/src/clojure/catacumba/core.clj
clojure
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions ...
Copyright ( c ) 2015 - 2016 < > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXE...
4511e523a7ee6f1a96ea579c88ad8130aab6571130b9000aa84c613d76db9203
jrm-code-project/LISP-Machine
edkeys.lisp
-*- Mode : LISP ; Package : STEVE ; : CL ; -*- 1983 Copyright ( c ) May 1983 by and Massachusetts Institute of Technology . ;Permission to copy all or part of this material is granted, provided that the copies are not made or distributed for resale , the MIT ; copyright notice and reference to the source fil...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/gjcx/steve/edkeys.lisp
lisp
Package : STEVE ; : CL ; -*- 1983 Permission to copy all or part of this material is granted, provided copyright notice and reference to the source file and the software distribution version appear, and that notice is given that copying History: removed references to editor-defun-key 5/8/84 AUTO-DIGIT-ARG-SAV...
Copyright ( c ) May 1983 by and Massachusetts Institute of Technology . that the copies are not made or distributed for resale , the MIT is by permission of Massachusetts Institute of Technology . (defvar re-generate-screen-really) (defvar *editor-cursor*) (defvar *editor-buffer*) (defvar *editor-current-ke...
61073565b4c265de5397cfe9477c0423d75e2ac1cfe9a5aad1ac956f1a999284
bitblaze-fuzzball/fuzzball
temu_state.mli
* An interface to program state files generated by Tracecap . @author , An interface to program state files generated by Tracecap. @author Juan Caballero, Zhenkai Liang *) (** Raised for state files with an unknown version number in the header *) exception Unknown_state_version (** Rais...
null
https://raw.githubusercontent.com/bitblaze-fuzzball/fuzzball/b9a617b45e68fa732f1357fedc08a2a10f87a62c/trace/temu_state.mli
ocaml
* Raised for state files with an unknown version number in the header * Raised for get_(byte|short|word|long) methods if full range not in state file * Raised when requesting registers from state file without register info * Flags * The state file header * Registers in a state file * Get start address for memb...
* An interface to program state files generated by Tracecap . @author , An interface to program state files generated by Tracecap. @author Juan Caballero, Zhenkai Liang *) exception Unknown_state_version exception Incomplete_value exception Registers_unavailable type state_flags_t = {...
b344676cec7132eb0cc0baff804836aa32db4b24623288b813d1fbc8ec299a24
rlepigre/ocaml-bindlib
ast.ml
(** Ast constructed by the parser. *) * term . type pterm = | PApp of pterm * pterm (** Application. *) | PLam of string * pterm (** Abstraction. *) | PVar of string (** Variable. *) | PNrm of pterm (** Normalisation of a term. *) let many_PLam : string list -> pterm -> pterm = List.fold_right (fun...
null
https://raw.githubusercontent.com/rlepigre/ocaml-bindlib/1b5f9f30152ba0e5eb49d018d4085a88438db9c0/examples/metavar/ast.ml
ocaml
* Ast constructed by the parser. * Application. * Abstraction. * Variable. * Normalisation of a term. * Declare a meta-variable. * Print the normal form of the given term. * Undo the previous command (excluding [Undo]). * Print all the goals (unset meta-variables).
* term . type pterm = | PApp of pterm * pterm | PLam of string * pterm | PVar of string | PNrm of pterm let many_PLam : string list -> pterm -> pterm = List.fold_right (fun x t -> PLam(x,t)) * command . type cmd = | Decl of string * pterm | Prnt of pterm | Undo | Goal
4c5bba23107d857758ee38e42ca01d287ce361d6208ffb7a8fdbc4b74783a880
alvatar/spheres
shared-structure.scm
;;!! SRFI-38 External Representation for Data With Shared Structure ;;! write-with-shared-structure (define* (write-with-shared-structure obj (port (current-output-port)) (serialize? #f)) (with-output-to-port port (lambda () (let* ((p (current-output-port)) ...
null
https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/spheres/io/shared-structure.scm
scheme
!! SRFI-38 External Representation for Data With Shared Structure ! write-with-shared-structure ! read-with-shared-structure
(define* (write-with-shared-structure obj (port (current-output-port)) (serialize? #f)) (with-output-to-port port (lambda () (let* ((p (current-output-port)) (prev-readtable (output-port-readtable p))) (output-port-readtable-set! p ...
b802355163b3f583e3bb5e82e127b3394e72c7b48f59be9b10abffb62b09cb77
leksah/leksah-server
GHCUtils.hs
# LANGUAGE CPP # # LANGUAGE LambdaCase # # LANGUAGE ViewPatterns # {-# LANGUAGE OverloadedStrings #-} # OPTIONS_GHC -fno - warn - orphans # ----------------------------------------------------------------------------- -- -- Module : IDE.Utils.GHCUtils Copyright : 2007 - 2011 , -- License : GPL -...
null
https://raw.githubusercontent.com/leksah/leksah-server/d4b735c17a36123dc97f79fabf1e9310d74984a6/src/IDE/Utils/GHCUtils.hs
haskell
# LANGUAGE OverloadedStrings # --------------------------------------------------------------------------- Module : IDE.Utils.GHCUtils License : GPL Stability : provisional Portability : | --------------------------------------------------------------------------- | Unload whatever is currently ...
# LANGUAGE CPP # # LANGUAGE LambdaCase # # LANGUAGE ViewPatterns # # OPTIONS_GHC -fno - warn - orphans # Copyright : 2007 - 2011 , Maintainer : Jutaro < > module IDE.Utils.GHCUtils ( inGhcIO , getInstalledPackageInfos , findFittingPackages , myParseModule , myParseHeader , mkDependency...
94e016e5ebd06501dd22b6602d349d519e4deb62f5e8e5780f75bd0781bee5ca
1HaskellADay/1HAD
Solution.hs
module HAD.Y2014.M04.D09.Solution where import Data.List (sortBy) import Data.Monoid (mconcat, (<>)) import Data.Ord (comparing) -- $setup -- >>> import Data.List data Foo = Foo {x :: Int, y :: String, z :: String} deriving (Read, Show, Eq) | orderXYZ Order Foo by x then by y and then by z prop > ...
null
https://raw.githubusercontent.com/1HaskellADay/1HAD/3b3f9b7448744f9b788034f3aca2d5050d1a5c73/exercises/HAD/Y2014/M04/D09/Solution.hs
haskell
$setup >>> import Data.List
module HAD.Y2014.M04.D09.Solution where import Data.List (sortBy) import Data.Monoid (mconcat, (<>)) import Data.Ord (comparing) data Foo = Foo {x :: Int, y :: String, z :: String} deriving (Read, Show, Eq) | orderXYZ Order Foo by x then by y and then by z prop > sort xs = = ( map x . . map ( \v ...
171670ffee785f47380006119b989f23d8b3012f18868767d73811f8986bc34a
shamazmazum/easy-audio
package.lisp
(defpackage easy-audio.core (:use #:cl) (:local-nicknames (:sera :serapeum)) (:export Restarts & conditions #:*current-condition* #:with-interactive-debug ;; Types #:bit-counter #:ub #:sb #:sa-ub #:sa-sb ;; Utility functions #:mixchannels))
null
https://raw.githubusercontent.com/shamazmazum/easy-audio/774ede953082b1457a276dda16374fcec395fe89/core/package.lisp
lisp
Types Utility functions
(defpackage easy-audio.core (:use #:cl) (:local-nicknames (:sera :serapeum)) (:export Restarts & conditions #:*current-condition* #:with-interactive-debug #:bit-counter #:ub #:sb #:sa-ub #:sa-sb #:mixchannels))
d4269f343579b31cc55c8a834e054509d9e73a343d138282c503e17035ca3fc0
scrintal/heroicons-reagent
user.cljs
(ns com.scrintal.heroicons.solid.user) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M7.5 6a4.5 4.5 0 119 0 4.5 4.5 0 01-9 0zM3.751 20.105a8.25 8.25 0 0116.498 0 .75.75 0...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/user.cljs
clojure
(ns com.scrintal.heroicons.solid.user) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M7.5 6a4.5 4.5 0 119 0 4.5 4.5 0 01-9 0zM3.751 20.105a8.25 8.25 0 0116.498 0 .75.75 0...
6189661223921bbf1bdc9800b44451e8504931d062cd1a8d80d1185227514805
OCamlPro/ez_api
ezLoads.ml
(**************************************************************************) (* *) (* Copyright 2018-2023 OCamlPro *) (* *) (* All righ...
null
https://raw.githubusercontent.com/OCamlPro/ez_api/5253f7dd8936e923290aa969ee43ebd3dc6fce2d/src/tools/loads/ezLoads.ml
ocaml
************************************************************************ Copyright 2018-2023 OCamlPro All rights reserved. This ...
GNU Lesser General Public License version 2.1 , with the special let average f = function | [] -> 0. | l -> let wsum = List.fold_left (fun acc x -> acc +. (f x)) 0. l in wsum /. (float_of_int @@ List.length l) let median f = function | [] -> 0. | l -> let l = List.sort (fun x1 x2 -> comp...
b52f66f0999bdfa056ab4ea76f114251f4a7158b92f9ab001bb5a863f43afeb7
juji-io/datalevin
parser_where.cljc
(ns datalevin.test.parser-where (:require #?(:cljs [cljs.test :as t :refer-macros [is are deftest testing]] :clj [clojure.test :as t :refer [is are deftest testing]]) [datalevin.parser :as dp]) #?(:clj (:import [clojure.lang ExceptionInfo]))) (deftest pattern (are [clause pattern] (= ...
null
https://raw.githubusercontent.com/juji-io/datalevin/14f91468a971c71ed33f5213ca2e5ff09cbb9350/test/datalevin/test/parser_where.cljc
clojure
(ns datalevin.test.parser-where (:require #?(:cljs [cljs.test :as t :refer-macros [is are deftest testing]] :clj [clojure.test :as t :refer [is are deftest testing]]) [datalevin.parser :as dp]) #?(:clj (:import [clojure.lang ExceptionInfo]))) (deftest pattern (are [clause pattern] (= ...
149930d13c83e5d9db2e37f3281b36d4cc07407be50b65019320282d5d084968
CUTE-Lang/miniCUTE
SimpleArithmeticTest.hs
HLINT ignore " Redundant do " # LANGUAGE DataKinds # # LANGUAGE QuasiQuotes # -- | Copyright : ( c ) 2018 - present -- License: BSD 3-Clause module Minicute.Transpilers.Optimizers.SimpleArithmeticTest ( spec_simpleArithmetic ) where import Test.Tasty.Hspec import Control.Monad import Data.Tuple.Extra impor...
null
https://raw.githubusercontent.com/CUTE-Lang/miniCUTE/b6c8a48b10e2af0786a50175d57b5339be7be2de/main-packages/minicute-optimizer/test/Minicute/Transpilers/Optimizers/SimpleArithmeticTest.hs
haskell
| License: BSD 3-Clause
HLINT ignore " Redundant do " # LANGUAGE DataKinds # # LANGUAGE QuasiQuotes # Copyright : ( c ) 2018 - present module Minicute.Transpilers.Optimizers.SimpleArithmeticTest ( spec_simpleArithmetic ) where import Test.Tasty.Hspec import Control.Monad import Data.Tuple.Extra import Minicute.Transpilers.Optimiz...
7a3a67dc0e3c0a125f99be3b74759f303b7cf490df8fb0ce2ca5ba25cec84a67
hargettp/hh-web
html5.lisp
Copyright ( c ) 2010 ;; Permission is hereby granted, free of charge, to any person obtaining a copy ;; of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation the rights ;; to use, copy, modify, merge, publish, distribute, ...
null
https://raw.githubusercontent.com/hargettp/hh-web/d877398493196adffbd5d3e31fc1eaa60f331b36/taglibraries/html5.lisp
lisp
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnished to do so, subject to the following conditions: The above copyright notice an...
Copyright ( c ) 2010 in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR L...
0988f1cc0320083bedc152bbeebac9347f8c93fe36075cde56fce613de445203
unnohideyuki/bunny
sample257.hs
main = print $ drop 5 [1..10]
null
https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample257.hs
haskell
main = print $ drop 5 [1..10]
4c5b76178578b1b79325709659d9fa917a15c4c1f9bfc2582fb46c5335b7efe3
tfeb/tfeb-lisp-toys
test-for.lisp
;;;; Tests for FOR / GATHER ;;; ;;; These are incomplete and don't test most of the interesting cases ;;; #+org.tfeb.tools.require-module (org.tfeb.tools.require-module:needs ((:org.tfeb.toys.for :org.tfeb.hax.collecting) :compile t) #+Quicklisp ("parachute" :fallback ql:quickload)) (defpackage :org.tfeb.to...
null
https://raw.githubusercontent.com/tfeb/tfeb-lisp-toys/0c73d908816f645ad0bfd315007f6af52673159c/test/test-for.lisp
lisp
Tests for FOR / GATHER These are incomplete and don't test most of the interesting cases
#+org.tfeb.tools.require-module (org.tfeb.tools.require-module:needs ((:org.tfeb.toys.for :org.tfeb.hax.collecting) :compile t) #+Quicklisp ("parachute" :fallback ql:quickload)) (defpackage :org.tfeb.toys.for/test (:use :cl :org.tfeb.toys.for :org.tfeb.hax.collecting :org.shirakumo.parachute)) (in-packag...
6f58ac32666bf30975673583fc87a313314e94876010ec2442d0a2a3bbee81ec
huangz1990/SICP-answers
test-9-plus.scm
(load "test-manager/load.scm") (load "9-plus.scm") (define-each-check (= 3 (plus 1 2)) (= 10 (plus 3 7)) ) (run-registered-tests)
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp1/code/test-9-plus.scm
scheme
(load "test-manager/load.scm") (load "9-plus.scm") (define-each-check (= 3 (plus 1 2)) (= 10 (plus 3 7)) ) (run-registered-tests)
32c6efc3e2cbf0509aa05256bf64cbe3199f573d9724a827f2eb94d84591e5d3
racket/scribble
render.rkt
#lang racket/base (require "core.rkt" "base-render.rkt" "xref.rkt" racket/file racket/class racket/contract/base (prefix-in html: "html-render.rkt")) (provide/contract [render (((listof part?) (listof path-string?)) (#:render-mixin ...
null
https://raw.githubusercontent.com/racket/scribble/beb2d9834169665121d34b5f3195ddf252c3c998/scribble-lib/scribble/render.rkt
racket
#lang racket/base (require "core.rkt" "base-render.rkt" "xref.rkt" racket/file racket/class racket/contract/base (prefix-in html: "html-render.rkt")) (provide/contract [render (((listof part?) (listof path-string?)) (#:render-mixin ...
3d54598308bc488a18f219c01f9f63ffcf46de54a2fe3a7dcb8f94b07d7a05d2
jacquev6/General
OfStandardNumbers.ml
#include "../Generated/Traits/OfStandardNumbers.ml" module Tests = struct include Tests_ module MakeExamples(M: Testable.S0)(E: Examples.S0 with type t := M.t) = E module MakeTests(M: Testable.S0)(E: Examples.S0 with type t := M.t) = struct let tests = [] end include MakeMakers(MakeExamples)(MakeTests...
null
https://raw.githubusercontent.com/jacquev6/General/5237123668e939c0cb83aa3e1c4756473336bc7e/src/Traits/OfStandardNumbers.ml
ocaml
#include "../Generated/Traits/OfStandardNumbers.ml" module Tests = struct include Tests_ module MakeExamples(M: Testable.S0)(E: Examples.S0 with type t := M.t) = E module MakeTests(M: Testable.S0)(E: Examples.S0 with type t := M.t) = struct let tests = [] end include MakeMakers(MakeExamples)(MakeTests...
0325dde89bab18461c7f15dbed5c3efc48632d42c882fb9f76318c70b0edbb60
helium/router
router_ics_gateway_location_worker.erl
%%%------------------------------------------------------------------- %% @doc = = Router IOT Config Service Gateway Location Worker = = %% @end %%%------------------------------------------------------------------- -module(router_ics_gateway_location_worker). -behavior(gen_server). -include("./autogen/iot_config_p...
null
https://raw.githubusercontent.com/helium/router/117cf4240cdd742eb6fb20db8ec1d6a63f64bd95/src/grpc/router_ics_gateway_location_worker.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- ------------------------------------------------------------------ API Function Exports ------------------------------------------------------------------ -------------...
= = Router IOT Config Service Gateway Location Worker = = -module(router_ics_gateway_location_worker). -behavior(gen_server). -include("./autogen/iot_config_pb.hrl"). -export([ start_link/1, init_ets/0, get/1 ]). gen_server Function Exports -export([ init/1, handle_call/3, handle_cast/2,...
2c1e7f80b3541bda71514483f5ba2a27a055afafe4638fe265a98265af005af4
goodell/cppmem
dom.ml
Js_of_ocaml library * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking ...
null
https://raw.githubusercontent.com/goodell/cppmem/eb3ce19b607a5d6ec81138cd8cacd236f9388e87/js_of_ocaml-1.2/lib/dom.ml
ocaml
Will not happen * Specification of [Attr] objects. * Specification of [NamedNodeMap] objects. * Specification of [Element] objects. Legacy methods The function preventDefault must be called explicitely when using addEventListener... depending on the internet explorer version, e can be 0, null or undefine...
Js_of_ocaml library * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking ...
98c42f74ae16c27b697351de6fef8639092e8cf4158454e0dca61f321b9da1a7
cbaggers/varjo
regular-macros.lisp
(in-package :varjo.tests) (5am:in-suite regular-macro-tests) ;;------------------------------------------------------------ ;; Helper data (v-defmacro test-rm-0 (x y) `(v! ,x ,y)) (v-defmacro test-rm-1 (&environment env x y) `(v! ,x ,y)) ;;------------------------------------------------------------ ;; Tests (...
null
https://raw.githubusercontent.com/cbaggers/varjo/9e77f30220053155d2ef8870ceba157f75e538d4/tests/regular-macros.lisp
lisp
------------------------------------------------------------ Helper data ------------------------------------------------------------ Tests
(in-package :varjo.tests) (5am:in-suite regular-macro-tests) (v-defmacro test-rm-0 (x y) `(v! ,x ,y)) (v-defmacro test-rm-1 (&environment env x y) `(v! ,x ,y)) (5am:def-test regular-macros-0 (:suite regular-macro-tests) (finishes-p (compile-vert () :410 nil (test-rm-0 10 2s0) (v! 0 0 0 0)))) (5...
51ddf2e1f9f8df8f930fdcbc9130951b30149654b0faefb43404de14b256807a
mwand/eopl3
interp.scm
(module interp (lib "eopl.ss" "eopl") (require "drscheme-init.scm") (require "lang.scm") (require "data-structures.scm") (require "environments.scm") (provide value-of-program value-of) ;;;;;;;;;;;;;;;; the interpreter ;;;;;;;;;;;;;;;; ;; value-of-program : Program -> Expval (define value-of-progra...
null
https://raw.githubusercontent.com/mwand/eopl3/b50e015be7f021d94c1af5f0e3a05d40dd2b0cbf/chapter7/checked/interp.scm
scheme
the interpreter ;;;;;;;;;;;;;;;; value-of-program : Program -> Expval
(module interp (lib "eopl.ss" "eopl") (require "drscheme-init.scm") (require "lang.scm") (require "data-structures.scm") (require "environments.scm") (provide value-of-program value-of) (define value-of-program (lambda (pgm) (cases program pgm (a-program (body) (value-of ...
97d182d2a189c16e9cfeb912c7d9e29b7b2ecf073bc54dd84d117bf0af47d8f1
cedlemo/OCaml-GI-ctypes-bindings-generator
Target_flags.mli
open Ctypes type t = Same_app | Same_widget | Other_app | Other_widget type t_list = t list val of_value: Unsigned.uint32 -> t val to_value: t -> Unsigned.uint32 val list_of_value: Unsigned.uint32 -> t_list val list_to_value: t_list -> Unsigned.uint32 val t_list_view : t_list typ
null
https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Target_flags.mli
ocaml
open Ctypes type t = Same_app | Same_widget | Other_app | Other_widget type t_list = t list val of_value: Unsigned.uint32 -> t val to_value: t -> Unsigned.uint32 val list_of_value: Unsigned.uint32 -> t_list val list_to_value: t_list -> Unsigned.uint32 val t_list_view : t_list typ
2b030bb4e485aa8320ab563321af61658dfdecfdee6bc72debda55f84f2f0cb6
grin-compiler/grin
SparseCaseOptimisationSpec.hs
# LANGUAGE OverloadedStrings , QuasiQuotes , ViewPatterns # module Transformations.Optimising.SparseCaseOptimisationSpec where import Transformations.Optimising.SparseCaseOptimisation import Test.Hspec import Grin.Grin import Grin.TH import Test.Test hiding (newVar) import Test.Assertions import Grin.TypeEnv import q...
null
https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/test/Transformations/Optimising/SparseCaseOptimisationSpec.hs
haskell
# LANGUAGE OverloadedStrings , QuasiQuotes , ViewPatterns # module Transformations.Optimising.SparseCaseOptimisationSpec where import Transformations.Optimising.SparseCaseOptimisation import Test.Hspec import Grin.Grin import Grin.TH import Test.Test hiding (newVar) import Test.Assertions import Grin.TypeEnv import q...
107f695134200034c939c2e64437b8001097b2366c81ef121ae0b12453b62724
semilin/layoup
ev27.lisp
(MAKE-LAYOUT :NAME "ev27" :MATRIX (APPLY #'KEY-MATRIX '(",uoyfjgrbl" "aiehkdtncs" ";.'pqxmwvz")) :SHIFT-MATRIX NIL :KEYBOARD NIL)
null
https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/ev27.lisp
lisp
(MAKE-LAYOUT :NAME "ev27" :MATRIX (APPLY #'KEY-MATRIX '(",uoyfjgrbl" "aiehkdtncs" ";.'pqxmwvz")) :SHIFT-MATRIX NIL :KEYBOARD NIL)
6ff14e02eef36c99d740c80308d5e47cacb9172315b4ebc87e01be6c9568878d
uhc/uhc
LexerMonad.hs
| Module : LexerMonad License : GPL Maintainer : Stability : experimental Portability : portable License : GPL Maintainer : Stability : experimental Portability : portable -} module Helium.Parser.LexerMonad ( LexerMona...
null
https://raw.githubusercontent.com/uhc/uhc/8eb6914df3ba2ba43916a1a4956c6f25aa0e07c5/EHC/src/helium/Parser/LexerMonad.hs
haskell
Output monad: [LexerWarning]
| Module : LexerMonad License : GPL Maintainer : Stability : experimental Portability : portable License : GPL Maintainer : Stability : experimental Portability : portable -} module Helium.Parser.LexerMonad ( LexerMona...
9188fd290043ca45cae3486a788c34a820e6b209e1c43d518c0a1916cdac5991
vonzhou/LearnYouHaskellForGreatGood
Sphere.hs
module Geometry.Sphere ( volume , area ) where volume :: Float -> Float volume radius = (4.0 / 3.0) * pi * (radius ^ 3) area :: Float -> Float area radius = 4 * pi * (radius ^ 2)
null
https://raw.githubusercontent.com/vonzhou/LearnYouHaskellForGreatGood/439d848deac53ef6da6df433078b7f1dcf54d18d/chapter6/Geometry/Sphere.hs
haskell
module Geometry.Sphere ( volume , area ) where volume :: Float -> Float volume radius = (4.0 / 3.0) * pi * (radius ^ 3) area :: Float -> Float area radius = 4 * pi * (radius ^ 2)
50b75b388cff1f34897ccbcbecb2b238272732c8a38cbe9f7a152b517f6a9e21
heraldry/heraldicon
render_options.cljs
(ns heraldicon.frontend.component.render-options (:require [heraldicon.frontend.component.core :as component] [heraldicon.frontend.element.core :as element])) (defn- form [context] (element/elements context [:scope :escutcheon :flag-aspect-ratio-preset :flag-height :flag-width :flag...
null
https://raw.githubusercontent.com/heraldry/heraldicon/f742958ce1e85f47c8222f99c6c594792ac5a793/src/heraldicon/frontend/component/render_options.cljs
clojure
(ns heraldicon.frontend.component.render-options (:require [heraldicon.frontend.component.core :as component] [heraldicon.frontend.element.core :as element])) (defn- form [context] (element/elements context [:scope :escutcheon :flag-aspect-ratio-preset :flag-height :flag-width :flag...
9a0c30f49daa708cd4be64ae1c77c86cc9eeb0279d457af14ba9830c3a21ce42
zenspider/schemers
exercise.2.36.scm
#lang racket/base (require "../lib/test.rkt") (require "../lib/myutils.scm") Exercise 2.36 ;; The procedure `accumulate-n' is similar to `accumulate' except that it takes as its third argument a sequence of sequences , which are ;; all assumed to have the same number of elements. It applies the designated accu...
null
https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_2/exercise.2.36.scm
scheme
The procedure `accumulate-n' is similar to `accumulate' except that all assumed to have the same number of elements. It applies the on, and returns a sequence of the results. For instance, if `s' is following definition of `accumulate-n': nil (cons (accumulate op init <??>) ...
#lang racket/base (require "../lib/test.rkt") (require "../lib/myutils.scm") Exercise 2.36 it takes as its third argument a sequence of sequences , which are designated accumulation procedure to combine all the first elements of the sequences , all the second elements of the sequences , and so a sequence c...
c5421822ee31021129b0e5d6a3aa7cf642752915da4e357e73e6cb4f6ab61ee5
generateme/fastmath
kernel_examples.clj
(ns fastmath.kernel-examples (:require [fastmath.kernel :refer :all] [metadoc.examples :refer :all] [fastmath.distance :as d] [fastmath.fields :as fields] [fastmath.vector :as v])) (add-examples approx (example-session "Usage" (let [ak (approx (kernel :gaussian))...
null
https://raw.githubusercontent.com/generateme/fastmath/2eb38baffe73077bab331a20449d9d7596af7059/metadoc/fastmath/kernel_examples.clj
clojure
(ns fastmath.kernel-examples (:require [fastmath.kernel :refer :all] [metadoc.examples :refer :all] [fastmath.distance :as d] [fastmath.fields :as fields] [fastmath.vector :as v])) (add-examples approx (example-session "Usage" (let [ak (approx (kernel :gaussian))...
cf607fefe95994584f4698aa92424cd54b54b1387762b85388e15abd1adcfeda
narkisr-deprecated/core
validations.clj
(comment re-core, Copyright 2012 Ronen Narkis, narkisr.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software distri...
null
https://raw.githubusercontent.com/narkisr-deprecated/core/85b4a768ef4b3a4eae86695bce36d270dd51dbae/src/aws/validations.clj
clojure
(comment re-core, Copyright 2012 Ronen Narkis, narkisr.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software distri...
7f0a6356852f3801dca6f83a3bc43f933c05885a4f4dd402be1812cff9c6ca30
ZeusWPI/contests
fractions.hs
import Control.Applicative ((<$>)) import Control.Monad (replicateM_) import Data.List (foldl') import Data.Map (Map) import Data.Maybe (fromMaybe) import qualified Data.Map as M type Product = Map Char Int parseProduct :: String -> Product parseProduct = foldl' (\m c -> M.insertWith' (+) c 1 m) M.empty unparseProdu...
null
https://raw.githubusercontent.com/ZeusWPI/contests/d78aec91be3ce32a436d160cd7a13825d36bbf3a/2010-vpw/fractions.hs
haskell
import Control.Applicative ((<$>)) import Control.Monad (replicateM_) import Data.List (foldl') import Data.Map (Map) import Data.Maybe (fromMaybe) import qualified Data.Map as M type Product = Map Char Int parseProduct :: String -> Product parseProduct = foldl' (\m c -> M.insertWith' (+) c 1 m) M.empty unparseProdu...
667dba8b897acd444b8fd9bcbb8d90cd37b61ac50676b0abefef8ef2381c92f3
mikera/core.matrix
matrix_joining.clj
(ns clojure.core.matrix.demo.matrix-joining (:use [clojure.core.matrix])) (defn join-all "Joins a matrix of matrices to create a bigger matrix :-)" ([M] (apply join (map #(apply join-along 1 (slices %)) (slices M))))) ;; EXAMPLE CODE (join-all [[ [[1]] [[2 3]] ] [ [[4] [7]] [[5 6...
null
https://raw.githubusercontent.com/mikera/core.matrix/0a35f6e3d6d2335cb56f6f3e5744bfa1dd0390aa/src/test/clojure/clojure/core/matrix/demo/matrix_joining.clj
clojure
EXAMPLE CODE
(ns clojure.core.matrix.demo.matrix-joining (:use [clojure.core.matrix])) (defn join-all "Joins a matrix of matrices to create a bigger matrix :-)" ([M] (apply join (map #(apply join-along 1 (slices %)) (slices M))))) (join-all [[ [[1]] [[2 3]] ] [ [[4] [7]] [[5 6] [8 9]] ]]) ...
ef19a3fee2b5417cb3326e82ccabfa56102ed499bafaeaea06883392e58ed2a4
Frama-C/Frama-C-snapshot
generator.mli
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/rte/generator.mli
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
0992185c8d5ef50b8bb5b069e5a2b132ba9bb8875e0c9494b977039d2130c850
Beluga-lang/Beluga
iO.ml
open Support open Beluga open Syntax module Error = struct type t = | EndOfInput (** Any user prompt is subject to raise this error *) exception E of t open Format let fmt_ppr ppf = function | EndOfInput -> fprintf ppf "End of input." let _ = Error.register_printing_function (fun...
null
https://raw.githubusercontent.com/Beluga-lang/Beluga/4d1c1bd917daac43c304c527b155c12dba76391a/src/harpoon/iO.ml
ocaml
* Any user prompt is subject to raise this error instrument the InputPrompt.t so that every successful call increments the prompt number
open Support open Beluga open Syntax module Error = struct type t = exception E of t open Format let fmt_ppr ppf = function | EndOfInput -> fprintf ppf "End of input." let _ = Error.register_printing_function (function E e -> Some e | _ -> None) fmt_ppr let throw e = raise (...
6fa45180c9f481e9c8e564f791f5d8635de8c68635e98524158eedcb86badff7
AndrewRademacher/coinbase-exchange
MarketData.hs
# LANGUAGE CPP # {-# LANGUAGE DeriveGeneric #-} # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} module Coinbase.Exchange.MarketData ( getProducts , getTopOf...
null
https://raw.githubusercontent.com/AndrewRademacher/coinbase-exchange/77945f2dddb1699927c354dfd221f366289ea19c/src/Coinbase/Exchange/MarketData.hs
haskell
# LANGUAGE DeriveGeneric # # LANGUAGE OverloadedStrings # Products Order Book Product Ticker Product Trades Historic Rates (Candles) Product Stats Exchange Currencies Exchange Time
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # module Coinbase.Exchange.MarketData ( getProducts , getTopOfBook , getTop50OfBook , getOrderBook , getProductTicker , getTrades ...
1f69dfd4de126beb540785273651060049607111f3556190cd848516aa0bdfd2
ckirkendall/kioo
html_parser.clj
(ns kioo.html-parser "Sets up parsers to use hickory vs enlive's tag soup we do this because of issues in tag soup around <a> tags and block elements. It also optional provides minification of the html to avoid excess spans. Much of this we pulled form enlive-ws a proof of concept by @jesseshurlock It wa...
null
https://raw.githubusercontent.com/ckirkendall/kioo/970d029ca0ab813a916c77286bcb7cf33a005e3c/src/kioo/html_parser.clj
clojure
Other options here: /#Using_HTML_Compressor_from_Java_API At this point the only non-default I care about is intertag spaces param to the type (println compressed-html) (println parsed-data)
(ns kioo.html-parser "Sets up parsers to use hickory vs enlive's tag soup we do this because of issues in tag soup around <a> tags and block elements. It also optional provides minification of the html to avoid excess spans. Much of this we pulled form enlive-ws a proof of concept by @jesseshurlock It wa...
08b5f3b69f431196b3802a5cd9616a6447e41199978baecdd612fc4878b643e8
huangz1990/SICP-answers
test-46-sqrt.scm
(load "test-manager/load.scm") (load "46-sqrt.scm") (define-each-check (>= 0.1 (abs (- 3 (sqrt 9)))) ) (run-registered-tests)
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp1/code/test-46-sqrt.scm
scheme
(load "test-manager/load.scm") (load "46-sqrt.scm") (define-each-check (>= 0.1 (abs (- 3 (sqrt 9)))) ) (run-registered-tests)
eed265cf45e362e8f9a9110ffe387b78d6bf289b93be7a07f0c483ba69816c53
ghc/testsuite
tcfail195.hs
# LANGUAGE RankNTypes , GADTs # module ShouldFail where data Foo a where Foo :: Int -> Foo (forall a. a)
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail195.hs
haskell
# LANGUAGE RankNTypes , GADTs # module ShouldFail where data Foo a where Foo :: Int -> Foo (forall a. a)
7db7e4966891b0852a32ea1bb28ef7ccf494e44771f6dcc202bcedcd0d485c78
ucsd-progsys/liquidhaskell
Specs.hs
{-# LANGUAGE DeriveAnyClass #-} -- | This module contains the top-level structures that hold -- information about specifications. # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DerivingVia #-} # OPTIONS_GHC -...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/71f43cec74468bb2f1759e01418c87c5626a7b1f/src/Language/Haskell/Liquid/Types/Specs.hs
haskell
# LANGUAGE DeriveAnyClass # | This module contains the top-level structures that hold information about specifications. # LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # * Different types of specifications $differentSpecTypes * TargetInfo $targetInfo * Gathering information about...
# LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # OPTIONS_GHC -Wno - orphans # module Language.Haskell.Liquid.Types.Specs ( TargetInfo(..) , TargetSrc(..) * TargetSpec , TargetSpec(..) , BareSpec(..) * LiftedSpec $ liftedSpec , LiftedSpec(..) , TargetDependencies...
5691da3385200388e2d656a05c7922ef668c90d47645b96f79e371aa02d8b14d
http-kit/chat-polling
project.clj
(defproject org.httpkit/chat-polling "1.0" :description "Realtime chat by utilizing http-kit's websocket support" :dependencies [[org.clojure/clojure "1.5.1"] [ring/ring-core "1.1.8"] [compojure "1.1.5"] [org.clojure/data.json "0.2.1"] [org.clojure...
null
https://raw.githubusercontent.com/http-kit/chat-polling/8f581009ba977ffbdacb0c1e03dd0a9ff1497b30/project.clj
clojure
(defproject org.httpkit/chat-polling "1.0" :description "Realtime chat by utilizing http-kit's websocket support" :dependencies [[org.clojure/clojure "1.5.1"] [ring/ring-core "1.1.8"] [compojure "1.1.5"] [org.clojure/data.json "0.2.1"] [org.clojure...
e996ebf24c8a5e9589a6b3726df337d3e8fec127a08d220afff918ccb2c5e3d1
jimweirich/sicp-study
ex1_31_test.scm
(test-case "Ex 1.31 Factorial via Product" (assert-equal 1 (factorial 0)) (assert-equal 1 (factorial 1)) (assert-equal 2 (factorial 2)) (assert-equal 120 (factorial 5))) (test-case "Ex 1.31 PI via product series" (assert-in-delta 3.14 (pi-series 100) 0.1)) (t...
null
https://raw.githubusercontent.com/jimweirich/sicp-study/bc5190e04ed6ae321107ed6149241f26efc1b8c8/scheme/chapter1/ex1_31_test.scm
scheme
(test-case "Ex 1.31 Factorial via Product" (assert-equal 1 (factorial 0)) (assert-equal 1 (factorial 1)) (assert-equal 2 (factorial 2)) (assert-equal 120 (factorial 5))) (test-case "Ex 1.31 PI via product series" (assert-in-delta 3.14 (pi-series 100) 0.1)) (t...
9c16e7c3d06194ddcd253ff6d1c00cce70a0dfa78a8606f9bd34a0451bdff5b3
dannypsnl/sauron
history.rkt
;; history selection part #lang racket/base (provide increase-selected-index decrease-selected-index new-history current-selected-expression) evaluated - history : ( ) (define evaluated-history (make-parameter '())) ;; current-selected-index: Integer (define current-selected-index (make-paramete...
null
https://raw.githubusercontent.com/dannypsnl/sauron/1d1d0e263e104251b44b2baa7741869374e922e1/repl/history.rkt
racket
history selection part current-selected-index: Integer notice the bound check that `increase-selected-index` shouldn't bigger than size of history
#lang racket/base (provide increase-selected-index decrease-selected-index new-history current-selected-expression) evaluated - history : ( ) (define evaluated-history (make-parameter '())) (define current-selected-index (make-parameter -1)) (define (new-history e) (evaluated-history (cons e (...
14f4e9390ccb4ba1ab3a86a46b29ab98d2c10fa94f45145f4664b846840bf9ce
spawnfest/eep49ers
wxPaletteChangedEvent.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2020 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxPaletteChangedEvent.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 2008 - 2020 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(wxPaletteChangedEvent). -include("wxe.hrl"). -export([getChangedWindow/1,setChangedWindow/2]). -export([get...
bc5a386623da46dd3e4878eb0a51c50d4a4916e4a4bd6b5a7896eebfdd222848
matijapretnar/eff
plainOCaml.ml
(* Compilation to multicore ocaml *) open Utils module Term = Language.Term module Type = Language.Type module Backend : Language.Backend.S = struct (* ------------------------------------------------------------------------ *) (* Setup *) let translate_exeff_config = TranslateExEff2NoEff.initial_state ...
null
https://raw.githubusercontent.com/matijapretnar/eff/1be07f0c7fbaadf5c28437bf11fe818aa76640e7/src/05-backends/plain-ocaml/plainOCaml.ml
ocaml
Compilation to multicore ocaml ------------------------------------------------------------------------ Setup ------------------------------------------------------------------------ Processing functions Print.warning "[#typeof] commands are ignored when compiling to OCaml.";
open Utils module Term = Language.Term module Type = Language.Type module Backend : Language.Backend.S = struct let translate_exeff_config = TranslateExEff2NoEff.initial_state { purity_aware_translation = !Config.optimizator_config.purity_aware_translation; } let translate_noeff...
97852a9d06a562908587db815594dfee7a592eb874d10f3a2e2e3baf699a9672
yuriy-chumak/ol
version-3-0.scm
OpenGL 3.0 ( 11 Aug 2008 ) GLSL 1.3 (define-library (OpenGL version-3-0) (export ; this version provides new functionality over old so , OpenGL 1.0 , 1.1 , ... , 2.1 still available . disabling of old functionality was introduced in 3.2 gl:CreateContextAttribs ; os independent context creation function GL_...
null
https://raw.githubusercontent.com/yuriy-chumak/ol/0a38b3f9dbb720aa3fbc3e8219429ebe240c86bf/libraries/OpenGL/version-3-0.scm
scheme
this version provides new functionality over old os independent context creation function /* Reuse tokens from ARB_depth_buffer_float */ /* reuse GL_DEPTH_COMPONENT32F */ /* reuse GL_DEPTH32F_STENCIL8 */ /* reuse GL_FLOAT_32_UNSIGNED_INT_24_8_REV */ /* Reuse tokens from ARB_framebuffer_sRGB */ /* reuse GL_FRAME...
OpenGL 3.0 ( 11 Aug 2008 ) GLSL 1.3 (define-library (OpenGL version-3-0) (export so , OpenGL 1.0 , 1.1 , ... , 2.1 still available . disabling of old functionality was introduced in 3.2 GL_VERSION_3_0 GL_COMPARE_REF_TO_TEXTURE GL_CLIP_DISTANCE0 GL_CLIP_DISTANCE1 GL_CLIP_DISTANCE2 GL_CLIP_DISTA...
c6e4fae321b5243b5f31797986925ad1a0d3546e28661cf26c5f3999766bce3e
PrecursorApp/precursor
logging.clj
(ns pc.logging (:require [pc.profile :as profile]) (:import org.apache.commons.logging.LogFactory (org.apache.log4j Logger BasicConfigurator EnhancedPatternLayout Level ConsoleAppender ...
null
https://raw.githubusercontent.com/PrecursorApp/precursor/30202e40365f6883c4767e423d6299f0d13dc528/src/pc/logging.clj
clojure
no use in logging to console when we're in production
(ns pc.logging (:require [pc.profile :as profile]) (:import org.apache.commons.logging.LogFactory (org.apache.log4j Logger BasicConfigurator EnhancedPatternLayout Level ConsoleAppender ...
f598712ab7514557ffde087b26505217bfc70fc760296427f360ffa620f2e506
TyOverby/mono
vdom.ml
open! Core module Float = struct include Float let to_string f = sprintf "%.3f" f end module Attr = struct type t = { classes : string list ; transforms : string list ; other : string } let empty = { classes = []; other = ""; transforms = [] } let stringlike key data = { empty with other =...
null
https://raw.githubusercontent.com/TyOverby/mono/94225736a93457d5c9aeed399c4ae1a08b239fd5/lib/bindgen/src/vdom.ml
ocaml
open! Core module Float = struct include Float let to_string f = sprintf "%.3f" f end module Attr = struct type t = { classes : string list ; transforms : string list ; other : string } let empty = { classes = []; other = ""; transforms = [] } let stringlike key data = { empty with other =...
00591062e69939dae4a6b96edd0448a8c1769b84d49ff612375e54bee57232ff
well-typed-lightbulbs/ocaml-esp32
camlinternalLazy.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/stdlib/camlinternalLazy.ml
ocaml
************************************************************************ OCaml ...
, projet Para , INRIA Rocquencourt Copyright 1997 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the type 'a t = 'a lazy_t exception Undefined let raise_undefined = Obj.repr (fun () -> raise Undefined) ex...
7be7db8c568ae041373460fe798aa3baee4bcb008c89ae1e05c7773f98390832
RunOrg/RunOrg
response.ml
(* © 2014 RunOrg *) open Std open Common module Ssl = SafeSsl (* Request parser logging ====================== *) let log_enabled = false (* Response types ============== *) exception Timeout type time = float type status = [ `OK | `Found | `BadRequest | `RequestEntityTooLarge | `NotImpleme...
null
https://raw.githubusercontent.com/RunOrg/RunOrg/b53ee2357f4bcb919ac48577426d632dffc25062/server/httpdLib/response.ml
ocaml
© 2014 RunOrg Request parser logging ====================== Response types ============== Sending a response ================== The names of the status codes. Raw response function, merely formats the individual lines for output. Response function that adds a content-type header and formats the...
open Std open Common module Ssl = SafeSsl let log_enabled = false exception Timeout type time = float type status = [ `OK | `Found | `BadRequest | `RequestEntityTooLarge | `NotImplemented | `Unauthorized | `NotFound | `Forbidden | `MethodNotAllowed | `Accepted | `NotModified | `Ser...
c9722600e20cf5160c04244eb6df9adc29ef873eddb4e88cb82cb4b9b4251175
gebi/jungerl
cord_regexp.erl
%%%---------------------------------------------------------------------- %%% File : cord_regexp.erl Author : < > Purpose : Regexp ops on cords Created : 10 Mar 2001 by < > %%%---------------------------------------------------------------------- -module(cord_regexp). -author(''). -compile(export_all...
null
https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/ermacs/src/cord_regexp.erl
erlang
---------------------------------------------------------------------- File : cord_regexp.erl ---------------------------------------------------------------------- -export([Function/Arity, ...]). a new continuation to recurse with comes to backwards-searching. Right now, ^ will match the end when going backward...
Author : < > Purpose : Regexp ops on cords Created : 10 Mar 2001 by < > -module(cord_regexp). -author(''). -compile(export_all). first_match(RE, Cord) -> first_match(RE, Cord, 1). first_match(RE, Cord, Pos) -> first_match(RE, Cord, Pos, forward). Find the first match of RE in starting from...
13403b23bf89d3baa72ec9caffd291db349a90d3f91dc9a32f18ebf1c6cee3a6
jeaye/orchestra
test.cljc
(ns orchestra.spec.test (:require [clojure.spec.alpha :as s] [clojure.spec.test.alpha :as st])) (defn- no-args-spec [v spec] (ex-info (str "Args for " v " are not spec'ed.") {:var v :spec spec ::s/failure :no-args-spec})) (defn- spec-checking-fn [v f raw-fn-spec] (let [fn-spec (#'s/ma...
null
https://raw.githubusercontent.com/jeaye/orchestra/81e5181f7b42e5e2763a2b37db17954f3be0314e/src/clj/orchestra/spec/test.cljc
clojure
(ns orchestra.spec.test (:require [clojure.spec.alpha :as s] [clojure.spec.test.alpha :as st])) (defn- no-args-spec [v spec] (ex-info (str "Args for " v " are not spec'ed.") {:var v :spec spec ::s/failure :no-args-spec})) (defn- spec-checking-fn [v f raw-fn-spec] (let [fn-spec (#'s/ma...
a490dd38e89b7429f88c93fef7dba5237594fec83793bc1f2bb2e1d4a3f90d8a
metosin/schema-tools
doo_runner.cljs
(ns schema-tools.doo-runner (:require [doo.runner :refer-macros [doo-tests]] schema-tools.core-test schema-tools.walk-test schema-tools.select-schema-test schema-tools.coerce-test schema-tools.swagger.core-test schema-tools.openapi.core-test ...
null
https://raw.githubusercontent.com/metosin/schema-tools/e52f72851982f4bb33509779424f46b16d34b861/test/cljs/schema_tools/doo_runner.cljs
clojure
(ns schema-tools.doo-runner (:require [doo.runner :refer-macros [doo-tests]] schema-tools.core-test schema-tools.walk-test schema-tools.select-schema-test schema-tools.coerce-test schema-tools.swagger.core-test schema-tools.openapi.core-test ...
315ace89e02bf169a0402a9f7b389cf9886ecba8255b5172d3e4fa0043f51279
TyOverby/five
shapes.mli
open! Import (** A shape is defined as a function from a point in 3d space to the distance to the edge of the shape. A returned value of [0] means that the queried point is on the edge of the shape, while a positive value indicates that it was outside of the shape. Negative values signify that the...
null
https://raw.githubusercontent.com/TyOverby/five/0922cd23e15859541dffc4f820a4e6286a52819b/five/shapes.mli
ocaml
* A shape is defined as a function from a point in 3d space to the distance to the edge of the shape. A returned value of [0] means that the queried point is on the edge of the shape, while a positive value indicates that it was outside of the shape. Negative values signify that the point is inside...
open! Import type t = x:v -> y:v -> z:v -> v val circle : r:v -> t val ring : ro:v -> ri:v -> t val rect : min_x:v -> min_y:v -> max_x:v -> max_y:v -> t val sphere : r:v -> t val box : min_x:v -> min_y:v -> min_z:v -> max_x:v -> max_y:v -> max_z:v -> t val rounded_box : r:v -> min_x:v -> mi...
201646860000773ea550c4852232a0f906d16afb3627f4e6922f119a200f1526
hurryabit/pukeko
Unwind.hs
module Pukeko.AST.Unwind ( unwindl , unwindr , rewindl , rewindr ) where import Pukeko.Prelude import Control.Lens -- | Unwind the spine of a left associative operation like application. unwindl :: Prism' e (e, a) -> e -> (e, [a]) unwindl p = go [] where go args expr = case matching p expr of R...
null
https://raw.githubusercontent.com/hurryabit/pukeko/d11a101a41123c5151bcdd7dd2d0ef53c65483c2/src/Pukeko/AST/Unwind.hs
haskell
| Unwind the spine of a left associative operation like application. | Unwind the spine of a right associative operation like abstraction.
module Pukeko.AST.Unwind ( unwindl , unwindr , rewindl , rewindr ) where import Pukeko.Prelude import Control.Lens unwindl :: Prism' e (e, a) -> e -> (e, [a]) unwindl p = go [] where go args expr = case matching p expr of Right (fun, arg) -> go (arg:args) fun Left fun -> (fun, arg...
e13d3a2e32fc14978c5b751c3b7779a0e28aa7b35e64015a93af18728e048ed6
hoelzl/Clicc
static-effect.lisp
;;;----------------------------------------------------------------------------- Copyright ( C ) 1993 Christian - Albrechts - Universitaet zu Kiel , Germany ;;;-------------------------------------------------------------------------- Projekt : APPLY - A Practicable And Portable Lisp Implementation ;;; ...
null
https://raw.githubusercontent.com/hoelzl/Clicc/cea01db35301144967dc74fd2f96dd58aa52d6ea/src/compiler/static-effect.lisp
lisp
----------------------------------------------------------------------------- -------------------------------------------------------------------------- ------------------------------------------------------ Funktion : Seiteneffektanalyse Analyse-form : ZWS * EFFECT -----> EFFEKT E...
Copyright ( C ) 1993 Christian - Albrechts - Universitaet zu Kiel , Germany Projekt : APPLY - A Practicable And Portable Lisp Implementation Implementierung der folgenden Funktion : ZWS : die read - list , write - list } $ Revision : 1.75...
130fd3f2c0f4421cb28a0d31210ac89de914cf1358975d29ec84510f08ccfdce
triffon/fp-2022-23
13.flatten.rkt
(define (atom? x) (and (not (null? x)) (not (pair? x)))) (define (flatten dl) (cond ((null? dl) '()) ((atom? dl) (list dl)) (else (append (flatten (car dl)) (flatten (cdr dl))))))
null
https://raw.githubusercontent.com/triffon/fp-2022-23/b6991b5be25fb65d1e44b49ff612eb4e63f7caae/exercises/cs2/05.scheme.fold-deeplists/solutions/13.flatten.rkt
racket
(define (atom? x) (and (not (null? x)) (not (pair? x)))) (define (flatten dl) (cond ((null? dl) '()) ((atom? dl) (list dl)) (else (append (flatten (car dl)) (flatten (cdr dl))))))
114e34ae222cca46f417e21834c32ca0407947fa620c1488dd8a983cb62b2413
wilkerlucio/pathom
core.cljs
(ns com.wsscode.fulcro.ui.core (:require [fulcro.client.localized-dom :as dom])) (defn wrap-react-component-localized "Wrap a react component with localized css support (like on dom/*)" [component] (fn [& args] (if (keyword? (first args)) (dom/macro-create-element component (next args) (first args)) ...
null
https://raw.githubusercontent.com/wilkerlucio/pathom/4ec25055d3d156241e9174d68ec438c93c971b9b/workspaces/src/com/wsscode/fulcro/ui/core.cljs
clojure
(ns com.wsscode.fulcro.ui.core (:require [fulcro.client.localized-dom :as dom])) (defn wrap-react-component-localized "Wrap a react component with localized css support (like on dom/*)" [component] (fn [& args] (if (keyword? (first args)) (dom/macro-create-element component (next args) (first args)) ...
345acd6201144832af4d34496ef7017719cd4c84059130279a6f0d5d3e57d948
chrisdone/prana
Ghc.hs
# LANGUAGE StandaloneDeriving # # LANGUAGE TupleSections # {-# LANGUAGE BangPatterns #-} # LANGUAGE FlexibleContexts # # LANGUAGE ViewPatterns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE ApplicativeDo # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # | Import from...
null
https://raw.githubusercontent.com/chrisdone/prana/f2e45538937d326aff562b6d49296eaedd015662/prana-ghc/src/Prana/Ghc.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE OverloadedStrings # Pipeline: ------------------------------------------------------------------------------ Types ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ | ...
# LANGUAGE StandaloneDeriving # # LANGUAGE TupleSections # # LANGUAGE FlexibleContexts # # LANGUAGE ViewPatterns # # LANGUAGE ScopedTypeVariables # # LANGUAGE ApplicativeDo # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # | Import from GHC into . 0 . each module . 1 . RENAME each module . 2 ...
a8e2fdf63c697cd9176a454695fc77a9b5e9e8e7143015574cf1a9b059054b7d
robertzk/xgboost.hs
Setup.hs
import Distribution.Simple import Distribution.Simple.Setup import Distribution.Simple.Utils (rawSystemExit) import System.Environment (lookupEnv, setEnv) -- Blatantly borrowed from -up-cabal-the-ffi-and-c2hs/ main = defaultMainWithHooks simpleUserHooks { preBuild = \a b -> makeLib a b >> preBuild simpleUse...
null
https://raw.githubusercontent.com/robertzk/xgboost.hs/b0b8890eba63a4dd25de3413b12a727f5e2fedac/Setup.hs
haskell
Blatantly borrowed from -up-cabal-the-ffi-and-c2hs/
import Distribution.Simple import Distribution.Simple.Setup import Distribution.Simple.Utils (rawSystemExit) import System.Environment (lookupEnv, setEnv) main = defaultMainWithHooks simpleUserHooks { preBuild = \a b -> makeLib a b >> preBuild simpleUserHooks a b } makeLib :: Args -> BuildFlags -> IO () ma...
b960c0b5fc8a0c16115398d039898795cdfa437f99a6dc1f1313a0777d1baf36
haroldcarr/learn-haskell-coq-ml-etc
FoldDir.hs
import ( toLower ) import Data.Char (toLower) import Control.Monad (filterM, forM, liftM) import System.Directory (doesDirectoryExist, getDirectoryContents, Permissions(..), getModificationTime, getPermissions) import System . Time ( ClockTime ( .. ) ) -- deprecated import Data.Time.Clock import System.FilePath...
null
https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/book/2009-Real_World_Haskell/FoldDir.hs
haskell
deprecated Think of filesystem traversal as a fold over the directory hierarchy. Iterate controls our fold. cease and return unwrap do not recurse use "unwrap" as input to the next call of fold function alias or the function that we fold with. Logically a left fold. The seed for each step is the result of the ...
import ( toLower ) import Data.Char (toLower) import Control.Monad (filterM, forM, liftM) import System.Directory (doesDirectoryExist, getDirectoryContents, Permissions(..), getModificationTime, getPermissions) import Data.Time.Clock import System.FilePath (takeExtension, takeFileName, (</>)) import Control.Excep...
e16e0e641e61b0267538468f3796f042fdcb77f4c18d5f877e546f14fbc59b21
ScottBrooks/Erlcraft
mochiweb_charref.erl
@author < > 2007 Mochi Media , Inc. @doc Converts HTML 4 charrefs and entities to codepoints . -module(mochiweb_charref). -export([charref/1]). %% External API. ) - > integer ( ) | undefined %% @doc Convert a decimal charref, hex charref, or html entity to a unicode %% codepoint, or return undefin...
null
https://raw.githubusercontent.com/ScottBrooks/Erlcraft/ed336eb8da4d83e937687ce34feecb76b4128288/deps/mochiweb-src/src/mochiweb_charref.erl
erlang
External API. @doc Convert a decimal charref, hex charref, or html entity to a unicode codepoint, or return undefined on failure. The input should not include an ampersand or semicolon. Internal API. Tests
@author < > 2007 Mochi Media , Inc. @doc Converts HTML 4 charrefs and entities to codepoints . -module(mochiweb_charref). -export([charref/1]). ) - > integer ( ) | undefined charref("#38 " ) = 38 , charref("#x26 " ) = 38 , charref("amp " ) = 38 . charref(B) when is_binary(B) -> charref(binar...
a724e40a4d279934850a2caab839ad24111f2ba7090db8d2bead74184e1521da
turquoise-hexagon/euler
solution.scm
(import (chicken fixnum) (euler)) (define (f n p) (let loop ((n n) (acc 0)) (if (fx= n 0) acc (let ((_ (fx/ n p))) (loop _ (fx+ acc _)))))) (define (solve n m) (foldl (lambda (acc p) (fxmod (fx* acc (fx+ (modular-expt p (fx* 2 (f n p)) m) 1)) m)) 1 (primes n))) (let ((_ ...
null
https://raw.githubusercontent.com/turquoise-hexagon/euler/b9f33406a547a3451ab86f06f3487528f05119b4/src/spoilers/429/solution.scm
scheme
(import (chicken fixnum) (euler)) (define (f n p) (let loop ((n n) (acc 0)) (if (fx= n 0) acc (let ((_ (fx/ n p))) (loop _ (fx+ acc _)))))) (define (solve n m) (foldl (lambda (acc p) (fxmod (fx* acc (fx+ (modular-expt p (fx* 2 (f n p)) m) 1)) m)) 1 (primes n))) (let ((_ ...
f99e3081c272f054d796c373fc8efdcf2da7db07a3c29dc4ec40affcf286694a
dgvncsz0f/hzk
test-zookeeper.hs
{-# LANGUAGE OverloadedStrings #-} -- This file is part of zhk -- -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without modification, -- are permitted provided that the following conditions are met: -- -- Redistributions of source code must retain the above copyright no...
null
https://raw.githubusercontent.com/dgvncsz0f/hzk/cec10a95d836e8915ff64d566cb4e7410eb9e933/src/test-zookeeper.hs
haskell
# LANGUAGE OverloadedStrings # This file is part of zhk All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of...
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; ...
8df565914d7a6f68d429b50957a7fadf7cca1cb11a3caae89f1639d5e05f1fe8
juhp/fbrnch
RpmBuild.hs
module RpmBuild ( builtRpms, buildRPMs, installDeps, installMissingMacros, buildRequires, getSources, generateSrpm, generateSrpm', BCond(..), ForceShort(..), isShortCircuit, checkSourcesMatch, notInstalled, rpmEval ) where import Data.Char (isDigit) import Data.Either (partitionEithers) i...
null
https://raw.githubusercontent.com/juhp/fbrnch/521d268e90801366f1fefba995257f18e125a10c/src/RpmBuild.hs
haskell
previously was "" for pkggit rpmEval' :: String -> IO String rpmEval' s = do mres <- rpmEval s fromMaybe (error' (show s ++ " undefined!")) mres all ) "Source0:" or "Patch1:" pretty print with ~/ from fedora-haskell-tools Wrote: /current/dir/SRPMS/name-version-release.buildreqs.nosrc.rpm "^[Ss]ource[0-9]*...
module RpmBuild ( builtRpms, buildRPMs, installDeps, installMissingMacros, buildRequires, getSources, generateSrpm, generateSrpm', BCond(..), ForceShort(..), isShortCircuit, checkSourcesMatch, notInstalled, rpmEval ) where import Data.Char (isDigit) import Data.Either (partitionEithers) i...
a637f37e0819bfde61009817f09e5466ba52a55b785749e9959aeef2cd355f33
kalai-transpiler/kalai
build.clj
(ns build (:require [clojure.tools.build.api :as b] [deps-deploy.deps-deploy :as dd])) (def lib 'com.github.kalai-transpiler/kalai) (def version (format "0.2.%s" (b/git-count-revs nil))) (def class-dir "target/classes") (def basis (b/create-basis {:project "deps.edn"})) (def jar-file (format "target/%s-%...
null
https://raw.githubusercontent.com/kalai-transpiler/kalai/4d0ebbbb654c5392a72499d68ec5be22efdf4243/dev/build.clj
clojure
(ns build (:require [clojure.tools.build.api :as b] [deps-deploy.deps-deploy :as dd])) (def lib 'com.github.kalai-transpiler/kalai) (def version (format "0.2.%s" (b/git-count-revs nil))) (def class-dir "target/classes") (def basis (b/create-basis {:project "deps.edn"})) (def jar-file (format "target/%s-%...
4f765d6929b9c9e0d2ce50bb7a7234eb7c8213b06f52a2243062d9fb96347c49
greg42/openOfficeMarkup
Document.hs
- ---------------------------------------------------------------------------- - " THE BEER - WARE LICENSE " ( Revision 42 ): - < > wrote this file . As long as you retain this notice you - can do whatever you want with this stuff . If we meet some day , and you - think this stuff is worth it , you can ...
null
https://raw.githubusercontent.com/greg42/openOfficeMarkup/2bf19cb147f881456dedfdcfe912b89334ef20ce/markupParser/Text/Udoc/Document.hs
haskell
-------------------------------------------------------------------------- -------------------------------------------------------------------------- -------------------------------------------------------------------------- -------------------------------------------------------------------------- ------------------...
- " THE BEER - WARE LICENSE " ( Revision 42 ): - < > wrote this file . As long as you retain this notice you - can do whatever you want with this stuff . If we meet some day , and you - think this stuff is worth it , you can buy me a beer in return . - "THE BEER-WARE LICENSE" (Revision 42): - <> wro...
2b7d8e6273a551ae360c0fe9901a1aed40d01a438a1f5095fd81b8485ec863b3
digitallyinduced/ihp-forum
Comments.hs
module Web.Controller.Comments where import Web.Controller.Prelude import Web.View.Comments.New import Web.View.Comments.Edit import Web.View.Comments.Show import Web.View.Comments.New import Web.View.Comments.Show import Web.View.Comments.Edit import Web.Mail.Comments.NewCommentNotification instance Controller Comme...
null
https://raw.githubusercontent.com/digitallyinduced/ihp-forum/d71975ffd0439d27a69acb184431fb1b48796b15/Web/Controller/Comments.hs
haskell
module Web.Controller.Comments where import Web.Controller.Prelude import Web.View.Comments.New import Web.View.Comments.Edit import Web.View.Comments.Show import Web.View.Comments.New import Web.View.Comments.Show import Web.View.Comments.Edit import Web.Mail.Comments.NewCommentNotification instance Controller Comme...
0bd4a2c22c22291911e2d35602dec5d5347a8fa44338d9e236bb38952afc4e8b
vehicle-lang/vehicle
Core.hs
-- | This module exports the datatype representations of the core builtin symbols. module Vehicle.Syntax.AST.Builtin.Core ( Quantifier (..), EqualityOp (..), equalityOp, equalityOpName, EqualityDomain (..), OrderOp (..), orderOp, orderOpName, OrderDomain (..), isStrict, flipStr...
null
https://raw.githubusercontent.com/vehicle-lang/vehicle/605c0aedfac2a722b36de1ee7616527de6870b0d/vehicle-syntax/src/Vehicle/Syntax/AST/Builtin/Core.hs
haskell
| This module exports the datatype representations of the core builtin symbols. ------------------------------------------------------------------------------ Function positions | Represents whether something is an input or an output of a function ---------------------------------------------------------------------...
module Vehicle.Syntax.AST.Builtin.Core ( Quantifier (..), EqualityOp (..), equalityOp, equalityOpName, EqualityDomain (..), OrderOp (..), orderOp, orderOpName, OrderDomain (..), isStrict, flipStrictness, flipOrder, chainable, FunctionPosition (..), ) where import...
7fa3b4faa9338ccbbfaf58a55084cfe7e12ed363f5f3684d553f70c3c99920a7
zalora/postgresql-user-manager
CmdArguments.hs
{-# language DeriveDataTypeable #-} module CmdArguments where import System.Console.CmdArgs -- program info  _PROGRAM_NAME = "PostgreSQL User Privileges Manager" _PROGRAM_VERSION = "0.1.0.0" _PROGRAM_INFO = _PROGRAM_NAME ++ " version " ++ _PROGRAM_VERSION _PROGRAM_ABOUT = "A Haskell tool for managing user privileges...
null
https://raw.githubusercontent.com/zalora/postgresql-user-manager/049c91efd2906412aebea9c6d78a5be6261a2411/src/CmdArguments.hs
haskell
# language DeriveDataTypeable # program info  handle argument options: positional args, not option positional args, not option
module CmdArguments where import System.Console.CmdArgs _PROGRAM_NAME = "PostgreSQL User Privileges Manager" _PROGRAM_VERSION = "0.1.0.0" _PROGRAM_INFO = _PROGRAM_NAME ++ " version " ++ _PROGRAM_VERSION _PROGRAM_ABOUT = "A Haskell tool for managing user privileges in PostgreSQL." _COPYRIGHT = "(C) Dat Le 2013" data...
1821d8905d9e55148ef0db67d1773365a2c861ef462e7572e07b2f918962f21e
flow/ocaml-vlq
vlq.mli
* * Copyright ( c ) 2018 - present , Facebook , Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) 2018-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENS...
null
https://raw.githubusercontent.com/flow/ocaml-vlq/1d1676be31413879af0f44d74a3e571da08e8937/src/vlq.mli
ocaml
* * Copyright ( c ) 2018 - present , Facebook , Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) 2018-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENS...
ddfd199ca4a033fe3424f5685ebe7b781e639dfee65d3169bfd433caf7b8e52c
m1kal/charbel
parametrized_adder.clj
(module add {:parameters [WIDTH_A 32 WIDTH_B 4 RESULT_WIDTH 33]} [[:in a WIDTH_A] [:in b WIDTH_B] [:out result RESULT_WIDTH]] (register tmp (+ a b)) (assign result tmp))
null
https://raw.githubusercontent.com/m1kal/charbel/8f35bd476e7c1e82b2d4ee407f55105b0a32c018/test-resources/parametrized_adder.clj
clojure
(module add {:parameters [WIDTH_A 32 WIDTH_B 4 RESULT_WIDTH 33]} [[:in a WIDTH_A] [:in b WIDTH_B] [:out result RESULT_WIDTH]] (register tmp (+ a b)) (assign result tmp))
911f6d325bdc2736a21899eaf80c6092094bf50051d44678381cbbdf3bb4decc
fons/cl-twitter
twitter.lisp
(in-package :cl-twit-repl) ;; ;; Public API for common commands ;; ;; ;; ;; (defvar *oauth-request-token-cache-max-length* 100 "Max number of request tokens that can be cached by CL-Twitter.") (defvar *oauth-request-token-cache* nil "A list of request tokens that have been generated for OAuth authentication by OAUTH-...
null
https://raw.githubusercontent.com/fons/cl-twitter/6a72291f8c60bd07efd2a8605f18a3eb7570cc4a/cl-twit-repl/twitter.lisp
lisp
Public API for common commands Ugly, ugly hack to get login working in v1.1 API. Basically, create a simple stub twitter-user object and populate enough of it to get the full code working. Ugly, ugly hack to get login working in v1.1 API. Basically, create a simple stub twitter-user object and populate enoug...
(in-package :cl-twit-repl) (defvar *oauth-request-token-cache-max-length* 100 "Max number of request tokens that can be cached by CL-Twitter.") (defvar *oauth-request-token-cache* nil "A list of request tokens that have been generated for OAuth authentication by OAUTH-MAKE-TWITTER-AUTHORIZATION-URI. These are stored...
1d87c386036323b1422cc96f8b258366641f95ca0e2f2986e772841469e49864
emina/rosette
util.rkt
#lang rosette (require "types.rkt") (provide source-of parse-selector check-selector) ; Formats and returns source information for the given syntax. (define (source-of stx) (format "~a:~a:~a" (syntax-source stx) (syntax-line stx) (syntax-column stx))) Parses the given idx syntax as a vector selector identifie...
null
https://raw.githubusercontent.com/emina/rosette/a64e2bccfe5876c5daaf4a17c5a28a49e2fbd501/sdsl/synthcl/lang/util.rkt
racket
Formats and returns source information for the given syntax. duplicates if the allow-duplicates? flag is true. If the given identifier cannot parsed as a vector selector, throws a syntax error using the given context syntax for error localization. Checks that the given list of selector indices is valid for the...
#lang rosette (require "types.rkt") (provide source-of parse-selector check-selector) (define (source-of stx) (format "~a:~a:~a" (syntax-source stx) (syntax-line stx) (syntax-column stx))) Parses the given idx syntax as a vector selector identifier ( as defined in Ch . 6.1.7 of opencl-1.2 specification ) , ...
25e62d3e2c3c8b3130437b0ec66cca3872f8d1df4b9299f876ad0e33b3e41e63
fulcrologic/statecharts
chart_spec.cljc
(ns com.fulcrologic.statecharts.chart-spec (:require [com.fulcrologic.statecharts.elements :refer [state initial parallel final transition]] [com.fulcrologic.statecharts :as sc] [com.fulcrologic.statecharts.chart :as chart] [fulcro-spec.core :refer [specification assertions =>]])) (let [substates [(...
null
https://raw.githubusercontent.com/fulcrologic/statecharts/82dab36fb45ee1b3d8755d8c52c7d21d1c55443e/src/test/com/fulcrologic/statecharts/chart_spec.cljc
clojure
(ns com.fulcrologic.statecharts.chart-spec (:require [com.fulcrologic.statecharts.elements :refer [state initial parallel final transition]] [com.fulcrologic.statecharts :as sc] [com.fulcrologic.statecharts.chart :as chart] [fulcro-spec.core :refer [specification assertions =>]])) (let [substates [(...
c07cdb1626ea42f7f70dc21c6fa9fed884010dea011beb3ca61830bb927352f8
mooreryan/ocaml_python_bindgen
person2_runner.ml
let () = Py.initialize () let hagrid = Person2.__init__ ~name:"Hagrid" ~age:111 () let () = print_endline @@ Person2.__str__ hagrid ()
null
https://raw.githubusercontent.com/mooreryan/ocaml_python_bindgen/2781f1c6adf5208c208266deb1b36f2eb01f541c/test/embed_source.t/person2_runner.ml
ocaml
let () = Py.initialize () let hagrid = Person2.__init__ ~name:"Hagrid" ~age:111 () let () = print_endline @@ Person2.__str__ hagrid ()
40c64ab9cfdc440ca97225d008f80847ee5a3d65db6fcdce694ba76635037006
sharplispers/montezuma
multi-reader.lisp
(in-package #:montezuma) (defclass multi-reader (index-reader) ((sub-readers :initarg :sub-readers) (max-doc :initform 0 :reader max-doc) (num-docs :initform -1) (starts) (ones) (norms-cache :initform (make-table :test #'equal)) (has-deletions-p :initform NIL))) (defmacro with-sub-reader ((sub...
null
https://raw.githubusercontent.com/sharplispers/montezuma/ee2129eece7065760de4ebbaeffaadcb27644738/src/index/multi-reader.lisp
lisp
(in-package #:montezuma) (defclass multi-reader (index-reader) ((sub-readers :initarg :sub-readers) (max-doc :initform 0 :reader max-doc) (num-docs :initform -1) (starts) (ones) (norms-cache :initform (make-table :test #'equal)) (has-deletions-p :initform NIL))) (defmacro with-sub-reader ((sub...
575d80617de25dd8986bb5750046aa2e44014daa9b7733f61181fe19c5bd239f
jrwdunham/tegere
loader.clj
(ns tegere.fiddle.loader "Fiddle file for playing around with loader.clj." (:require [tegere.loader :as loader])) (comment ;; Load the feature files in the example Apes project into a maybe ;; `::tegere.parser/features` collection. (loader/load-feature-files "examples/apes/src/apes/features") )
null
https://raw.githubusercontent.com/jrwdunham/tegere/ee05eec87419d7d4cf91aebd2da121225bb8b3eb/src/tegere/fiddle/loader.clj
clojure
Load the feature files in the example Apes project into a maybe `::tegere.parser/features` collection.
(ns tegere.fiddle.loader "Fiddle file for playing around with loader.clj." (:require [tegere.loader :as loader])) (comment (loader/load-feature-files "examples/apes/src/apes/features") )
812de83e77957ed99f0aeb678e993d71a2de2a31bda3fa548f321e9cc5b0c57b
ghc/testsuite
tcrun035.hs
{-# LANGUAGE Rank2Types #-} -- Tests subsumption for infix operators (in this case (.)) Broke GHC 6.4 ! -- Now it breaks the impredicativity story -- (id {a}) . (id {a}) :: a -> a And ( forall = > m a ) /~ IO a module Main(main) where foo :: (forall m. Monad m => m a) -> IO a foo = id . id main :: IO () m...
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_run/tcrun035.hs
haskell
# LANGUAGE Rank2Types # Tests subsumption for infix operators (in this case (.)) Now it breaks the impredicativity story (id {a}) . (id {a}) :: a -> a
Broke GHC 6.4 ! And ( forall = > m a ) /~ IO a module Main(main) where foo :: (forall m. Monad m => m a) -> IO a foo = id . id main :: IO () main = foo (return ())
0e4c615d4d884d626524ce22c6b052a477dd4d5911ee01b721ceafcf0cc7e5b5
input-output-hk/cardano-ledger
PParams.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDe...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/b9aa1ad1728c0ceeca62657ec94d6d099896c052/eras/shelley/impl/src/Cardano/Ledger/Shelley/PParams.hs
haskell
# LANGUAGE OverloadedStrings # | This module contains just the type of protocol parameters. * Deprecated ==================================================================== | Protocol parameters. ^ The linear factor for the minimum fee calculation ^ The constant factor for the minimum fee calculation ^ Maximal ...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeApplication...
a59a0170f0f1fd5b3b043f68d06ebda4383ea0bf628142601e49015ff17aff16
mejgun/haskell-tdlib
GetAnimatedEmoji.hs
{-# LANGUAGE OverloadedStrings #-} -- | module TD.Query.GetAnimatedEmoji where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U -- | Returns an animated emoji corresponding to a given emoji . Returns a 404 error if the emoji has no animated emoji @emoji The emoji ...
null
https://raw.githubusercontent.com/mejgun/haskell-tdlib/81516bd04c25c7371d4a9a5c972499791111c407/src/TD/Query/GetAnimatedEmoji.hs
haskell
# LANGUAGE OverloadedStrings # | | |
module TD.Query.GetAnimatedEmoji where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U Returns an animated emoji corresponding to a given emoji . Returns a 404 error if the emoji has no animated emoji @emoji The emoji data GetAnimatedEmoji = GetAnimatedEmoji ...
904f2711fd62dee6d5562edb7f1a8f148926d2b34a7a044343840c000db17ec5
DavidAlphaFox/RabbitMQ
mochitemp.erl
@author < > @copyright 2010 Mochi Media , Inc. %% @doc Create temporary files and directories. -module(mochitemp). -export([gettempdir/0]). -export([mkdtemp/0, mkdtemp/3]). -export([rmtempdir/1]). %% -export([mkstemp/4]). -define(SAFE_CHARS, {$a, $b, $c, $d, $e, $f, $g, $h, $i, $j, $k, $l, $m, ...
null
https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/mochiweb-wrapper/mochiweb-git/src/mochitemp.erl
erlang
@doc Create temporary files and directories. -export([mkstemp/4]). TODO: An ugly wrapper over the mktemp tool with open_port and sadness? to issue O_CREAT|O_EXCL. I suppose we could hack something with mkdtemp, del_dir, open. ok. Tests Toggle the existence of a dir so that it fails Reset state
@author < > @copyright 2010 Mochi Media , Inc. -module(mochitemp). -export([gettempdir/0]). -export([mkdtemp/0, mkdtemp/3]). -export([rmtempdir/1]). -define(SAFE_CHARS, {$a, $b, $c, $d, $e, $f, $g, $h, $i, $j, $k, $l, $m, $n, $o, $p, $q, $r, $s, $t, $u, $v, $w, $x, $y, $z, ...
68e8b257ab0eb2e3f85fea081823edcebbf7d19c9a377a2b3b7463e99f0389a9
ayamada/copy-of-svn.tir.jp
partcont.scm
;;; coding: euc-jp ;;; -*- scheme -*- ;;; vim:set ft=scheme ts=8 sts=2 sw=2 et: $ Id$ ;; this file came from -bin/viewcvs.cgi/kahua/Kahua/src/kahua/partcont.scm ;; Implements partial continuation ;; Copyright ( c ) 2004 Scheme Arts , L.L.C. , All rights reserved . Copyright ( c ) 2004 Time Intermedia Corpor...
null
https://raw.githubusercontent.com/ayamada/copy-of-svn.tir.jp/101cd00d595ee7bb96348df54f49707295e9e263/Gauche-tir/branches/Gauche-tir03/0.0.7/lib/tir03/util/partcont.scm
scheme
coding: euc-jp -*- scheme -*- vim:set ft=scheme ts=8 sts=2 sw=2 et: this file came from Implements partial continuation See COPYING for terms and conditions of using this software ( -bin/viewcvs.cgi/kahua/Kahua/COPYING?view=markup ) Cf. (reset/pc expr) == (reset expr) (call/pc (lambda (k) expr ......
$ Id$ -bin/viewcvs.cgi/kahua/Kahua/src/kahua/partcont.scm Copyright ( c ) 2004 Scheme Arts , L.L.C. , All rights reserved . Copyright ( c ) 2004 Time Intermedia Corporation , All rights reserved . and , Final Shift for Call / cc : Direct implementation of Shift and Reset , ICFP ' 02 , 2002 . Cha...
606d6c421f3b21a24bf75f4372b83c5961fef5cc54b03f6adf9e1794915f4640
tlaplus/tlapm
lazyList.ml
* lazyList.ml --- lazy lists * * * Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation * lazyList.ml --- lazy lists * * * Copyright (C) 2008-2010 INRIA and Microsoft Corporation *) type 'a llist = Ll of 'a front Lazy.t and 'a front = | Nil | Cons of 'a * 'a llist type 'a t = 'a lli...
null
https://raw.githubusercontent.com/tlaplus/tlapm/b82e2fd049c5bc1b14508ae16890666c6928975f/src/pars/lazyList.ml
ocaml
* let expose (Ll ll) = match force ll with * | Nil -> None * | Cons (a, l) -> Some (a, l)
* lazyList.ml --- lazy lists * * * Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation * lazyList.ml --- lazy lists * * * Copyright (C) 2008-2010 INRIA and Microsoft Corporation *) type 'a llist = Ll of 'a front Lazy.t and 'a front = | Nil | Cons of 'a * 'a llist type 'a t = 'a lli...