_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
391f8b07e060a903a68bc58a704f544d14c3826ffb58c027cf88d82ba333621d
hying-caritas/hysh
misc.lisp
(in-package :hysh) ;; pipeline filter helpers ;; char-func should be char -> char function (defun filter-char (char-func) "Call the char-func for the each character read form *standard-input*, and write the return value of the char-func to *standard-output* if it is not NIL." (iter (for c := (read-char *standard-...
null
https://raw.githubusercontent.com/hying-caritas/hysh/9b232ae6e93bc163581d4a6a58e543d137ac619c/misc.lisp
lisp
pipeline filter helpers char-func should be char -> char function line-func should be string -> string (line -> line) function
(in-package :hysh) (defun filter-char (char-func) "Call the char-func for the each character read form *standard-input*, and write the return value of the char-func to *standard-output* if it is not NIL." (iter (for c := (read-char *standard-input* nil)) (while c) (let ((out-char (funcall char-func c))) (if ...
3978b1c7471722228db13e690dfbadeaa5eee0026aecb22ae2c7130ec11b1423
philnguyen/soft-contract
append.rkt
#lang racket/base (require racket/match racket/contract soft-contract/induction) (define list-induct (induct-on list?)) (define (trivial-list-induct l P) (list-induct l P trivial trivial)) ;; Source ;; -progsys/liquidhaskell/blob/develop/benchmarks/popl18/ple/pos/Append.hs (define append (match-...
null
https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/proofs/correct/LH/append.rkt
racket
Source -progsys/liquidhaskell/blob/develop/benchmarks/popl18/ple/pos/Append.hs
#lang racket/base (require racket/match racket/contract soft-contract/induction) (define list-induct (induct-on list?)) (define (trivial-list-induct l P) (list-induct l P trivial trivial)) (define append (match-lambda** [('() ys) ys] [((cons x xs) ys) (cons x (append xs ys))])) (d...
32e39253f94f08e32eb386a9ac4dac7ddebb8141405c914438fcf217d0b74da4
fccm/glMLite
main_cylinder.ml
* FUNCTION : * very minimal " main " for GL demos . * * HISTORY : * Linas Vepstas March 1995 * Copyright ( c ) 1995 Linas Vepstas < > * 2008 - OCaml version by * FUNCTION: * very minimal "main" for GL demos. * * HISTORY: * Linas Vepstas March 1995 * Copyright (c) 1995 Linas Vepstas <> ...
null
https://raw.githubusercontent.com/fccm/glMLite/c52cd806909581e49d9b660195576c8a932f6d33/gle-examples/main_cylinder.ml
ocaml
required include files get notified of mouse motions set up a light main initialize glut create popup menu roughly, measured in centimeters initialize lighting
* FUNCTION : * very minimal " main " for GL demos . * * HISTORY : * Linas Vepstas March 1995 * Copyright ( c ) 1995 Linas Vepstas < > * 2008 - OCaml version by * FUNCTION: * very minimal "main" for GL demos. * * HISTORY: * Linas Vepstas March 1995 * Copyright (c) 1995 Linas Vepstas <> ...
c2b6ea1260a9d689b29b6b09c0120a6295de7e5449d4dde9b7d138fdb9cb1b24
andrewMacmurray/haskell-book-solutions
reimplement.hs
module Reimplement where myOr :: [Bool] -> Bool myOr [] = False myOr (x:xs) = if x == True then True else myOr xs myAny :: (a -> Bool) -> [a] -> Bool myAny f [] = False myAny f (x:xs) = if f x == True then True else myAny f xs myElem :: Eq a => a -> [a] -> Bool myElem _ [] = False myElem y (x:xs) = if y == ...
null
https://raw.githubusercontent.com/andrewMacmurray/haskell-book-solutions/f4fd386187c03828d1736d9a43642ab4f0ec6462/src/ch9/reimplement.hs
haskell
module Reimplement where myOr :: [Bool] -> Bool myOr [] = False myOr (x:xs) = if x == True then True else myOr xs myAny :: (a -> Bool) -> [a] -> Bool myAny f [] = False myAny f (x:xs) = if f x == True then True else myAny f xs myElem :: Eq a => a -> [a] -> Bool myElem _ [] = False myElem y (x:xs) = if y == ...
eff5f93fea33d24feb535fb027721ff4310fb8f2ab7b2813a250064d386e8cb5
clojure-android/lein-droid
utils.clj
;; Provides utilities for the plugin. ;; (ns leiningen.droid.utils (:require [leiningen.core.project :as pr] [leiningen.core.classpath :as cp] robert.hooke) (:use [clojure.java.io :only (file reader)] [leiningen.core.main :only (info debug abort *debug*)] [clojure.string :onl...
null
https://raw.githubusercontent.com/clojure-android/lein-droid/1e0f8d5a5dd3c53232e21a1874867c212edb9848/src/leiningen/droid/utils.clj
clojure
Provides utilities for the plugin. know that has all the tools. Let's grab the last directory inside build-tools/ and hope it is the one we need. :sdk-path might be nil when this function is called from middleware before the :sdk-path is merged from some external profile. In this case just do nothing to project ...
(ns leiningen.droid.utils (:require [leiningen.core.project :as pr] [leiningen.core.classpath :as cp] robert.hooke) (:use [clojure.java.io :only (file reader)] [leiningen.core.main :only (info debug abort *debug*)] [clojure.string :only (join)]) (:import [java.io File Strin...
11013e47640d4f053e4e16c19c2291cd8b6968885d774e659c8f645c8f8d2a63
static-analysis-engineering/codehawk
bCHAssemblyFunctions.ml
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Binary Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Co...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/c1b3158e0d73cda7cfc10d75f6173f4297991a82/CodeHawk/CHB/bchlibx86/bCHAssemblyFunctions.ml
ocaml
chutil bchlib bchlibx86 cache bottom-up traversal order of call graph returns: number of instructions that depend on a condition-code status flag
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Binary Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Co...
58b8fb577cc1ca0ddb317c716a9881e85e0c639a798a3a3870101ccc17633aba
crisrise/vmq_kafka
vmq_kafka_worker.erl
-module(vmq_kafka_worker). -author("candreola"). -export([send/1]). -behaviour(gen_server). -export([start_link/0, init/1, terminate/2, code_change/3, handle_call/3, handle_cast/2, handle_info/2]). -define(SERVER_NAME, ?MODULE). -include("kafka_proto.hrl"). -record(state, { brod_client, num_partitions, kafk...
null
https://raw.githubusercontent.com/crisrise/vmq_kafka/b3a17ef8af551e6307d5819b5f624fed1f35b659/src/vmq_kafka_worker.erl
erlang
=================================================================== OTP Part =================================================================== =================================================================== Public Hooks ===================================================================
-module(vmq_kafka_worker). -author("candreola"). -export([send/1]). -behaviour(gen_server). -export([start_link/0, init/1, terminate/2, code_change/3, handle_call/3, handle_cast/2, handle_info/2]). -define(SERVER_NAME, ?MODULE). -include("kafka_proto.hrl"). -record(state, { brod_client, num_partitions, kafk...
6395d3acdffb09bc70d10ac2729dce787a3456e54491fccc095401de9beade45
league/metaserv
stringSet.ml
module StringSet = Set.Make(String) include StringSet
null
https://raw.githubusercontent.com/league/metaserv/35e85832b3d6dfe4e15b8036653d4429a90644f5/server/stringSet.ml
ocaml
module StringSet = Set.Make(String) include StringSet
19fd16af753f0df247350388f8b25b4fda7a31acc52d015780a1297e2c7acd45
clojure-interop/aws-api
AbstractAmazonSNS.clj
(ns com.amazonaws.services.sns.AbstractAmazonSNS "Abstract implementation of AmazonSNS. Convenient method forms pass through to the corresponding overload that takes a request object, which throws an UnsupportedOperationException." (:refer-clojure :only [require comment defn ->]) (:import [com.amazonaws.service...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.sns/src/com/amazonaws/services/sns/AbstractAmazonSNS.clj
clojure
(ns com.amazonaws.services.sns.AbstractAmazonSNS "Abstract implementation of AmazonSNS. Convenient method forms pass through to the corresponding overload that takes a request object, which throws an UnsupportedOperationException." (:refer-clojure :only [require comment defn ->]) (:import [com.amazonaws.service...
4a29c25654fc85ab8ed76a039cb56a16ccb9c9928c234395ea6b4a2a134eab43
ecraven/r7rs-benchmarks
peval.scm
PEVAL -- A simple partial evaluator for Scheme , written by . (import (scheme base) (scheme cxr) (scheme read) (scheme write) (scheme time)) ;;------------------------------------------------------------------------------ Utilities (define (xevery? pred? l) (let loop ((l l)) (or (null? l) (and (pred? (c...
null
https://raw.githubusercontent.com/ecraven/r7rs-benchmarks/b0910c4759629fcd2fb84a323a4eeef3b6ffc6bf/src/peval.scm
scheme
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ The partial evaluator. return a copy of 'exp' where each bound var has been renamed (to prevent aliasing problems) is 'expr' a constant expression? return t...
PEVAL -- A simple partial evaluator for Scheme , written by . (import (scheme base) (scheme cxr) (scheme read) (scheme write) (scheme time)) Utilities (define (xevery? pred? l) (let loop ((l l)) (or (null? l) (and (pred? (car l)) (loop (cdr l)))))) (define (some? pred? l) (let loop ((l l)) (if (n...
530128609001c99ff783ff9de00d75d1fab33e932b939d3d41e118ee107a2ac1
nasa/Common-Metadata-Repository
project.clj
(def oracle-jar-repo-env-var "The name of an environment variable that when set indicates an internal maven repo containing the Oracle JDBC jars. Set this environment variable to avoid having to manually download Oracle JDBC jars." "CMR_ORACLE_JAR_REPO") (def extra-repository "The set of repositories to in...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/5e7c185e8aebc0a27b87ce4200882b6cd5646460/oracle-lib/project.clj
clojure
Dynamically include extra repositories in the project definition if configured. This profile is used for linting and static analysis. To run for this all projects at the same time, use the same command but from the top- level directory. The following profile is overriden on the build server or in the user's ~/.le...
(def oracle-jar-repo-env-var "The name of an environment variable that when set indicates an internal maven repo containing the Oracle JDBC jars. Set this environment variable to avoid having to manually download Oracle JDBC jars." "CMR_ORACLE_JAR_REPO") (def extra-repository "The set of repositories to in...
9ced7bce18ec3c9af4e2f3ecdd79858a8788a4b7dc881e606a298d5c9bd605cc
gvannest/piscine_OCaml
ex04.ml
module type VAL = sig type t val add : t -> t -> t val mul : t -> t -> t end module type EVALEXPR = sig type t type expr = Value of t | Add of expr * expr | Mul of expr * expr val eval : expr -> t end module type MAKEEVALEXPR = functor (ArithmeticModule : VAL) -> EVALEXPR with type t = ...
null
https://raw.githubusercontent.com/gvannest/piscine_OCaml/2533c6152cfb46c637d48a6d0718f7c7262b3ba6/d06/ex04/ex04.ml
ocaml
module type VAL = sig type t val add : t -> t -> t val mul : t -> t -> t end module type EVALEXPR = sig type t type expr = Value of t | Add of expr * expr | Mul of expr * expr val eval : expr -> t end module type MAKEEVALEXPR = functor (ArithmeticModule : VAL) -> EVALEXPR with type t = ...
961f3f2edd79ab3c612f76439babf5e144e58878e9bd47ca87b46108d7ccdc72
mfp/extprot
unit_write.ml
open OUnit open Printf module E = Extprot module PP = E.Pretty_print open Test_types let check_write ?msg expected f v () = assert_equal ?msg ~printer:(sprintf "%S") expected (E.Conv.serialize f v) let bits n shift = Char.chr (Int64.to_int (Int64.logand (Int64.shift_right_logical n shift) 0xFFL)) let check_bits...
null
https://raw.githubusercontent.com/mfp/extprot/c69eb66398e35b964c4232a7c3c85151fb5eddbe/test/unit_write.ml
ocaml
print_endline @@ prettyprint v; print_endline @@ PP.pp (E.Inspect_msg.inspect ~verbose:false) (IO.input_string enc); we write an extended message with extra fields to make sure they are * skipped when there's an error in the conversion function for the * original message definition
open OUnit open Printf module E = Extprot module PP = E.Pretty_print open Test_types let check_write ?msg expected f v () = assert_equal ?msg ~printer:(sprintf "%S") expected (E.Conv.serialize f v) let bits n shift = Char.chr (Int64.to_int (Int64.logand (Int64.shift_right_logical n shift) 0xFFL)) let check_bits...
8a056eefa675404827fa60c8a4288cb13ff2759b01b9c499fedf6aa277a3e062
bazurbat/chicken-scheme
profiler.scm
;;;; profiler.scm - Support code for profiling applications ; Copyright ( c ) 2008 - 2016 , The CHICKEN Team Copyright ( c ) 2000 - 2007 , ; All rights reserved. ; ; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following ; conditions are met: ; ...
null
https://raw.githubusercontent.com/bazurbat/chicken-scheme/f0c9d1fd8b68eb322e320e65ec40b0bf7d1b41dc/profiler.scm
scheme
profiler.scm - Support code for profiling applications 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 conditi...
Copyright ( c ) 2008 - 2016 , The CHICKEN Team Copyright ( c ) 2000 - 2007 , THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIM...
b34904ecb97da1486db425f2e439eb7672017d28c21e8d8b2dba4a582ba7cb89
stchang/pasterack
clean-tmp.rkt
#lang racket (require redis) ; delete tmp file that dont have existing paste (define (clean-tmp tmp-dir htdoc-dir #:trial? [trial? #t]) (define dir-count 0) (define file-count 0) (when trial? (displayln "(trial mode)")) 1 ) dirs in tmp (for ([d (in-directory tmp-dir (lambda go-into-dirs? #f))] #:when...
null
https://raw.githubusercontent.com/stchang/pasterack/2239d3edfd26517106f4e5669ede382b508c5dd8/clean-tmp.rkt
racket
delete tmp file that dont have existing paste dirs only for now
#lang racket (require redis) (define (clean-tmp tmp-dir htdoc-dir #:trial? [trial? #t]) (define dir-count 0) (define file-count 0) (when trial? (displayln "(trial mode)")) 1 ) dirs in tmp (for ([d (in-directory tmp-dir (lambda go-into-dirs? #f))] (define paste-num (substring (path->string d) (add1 ...
09542b8916825ef85b346b77dfac71b865acdcda6c1cc9a62539228591c187e6
mejgun/haskell-tdlib
Seconds.hs
{-# LANGUAGE OverloadedStrings #-} -- | module TD.Data.Seconds where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U -- | | Contains a value representing a number of seconds @seconds Number of seconds Seconds { -- | seconds :: Maybe Float } deriving (...
null
https://raw.githubusercontent.com/mejgun/haskell-tdlib/beb6635177d7626b70fd909b1d89f2156a992cd2/src/TD/Data/Seconds.hs
haskell
# LANGUAGE OverloadedStrings # | | |
module TD.Data.Seconds where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U | Contains a value representing a number of seconds @seconds Number of seconds Seconds seconds :: Maybe Float } deriving (Eq) instance Show Seconds where show Seconds ...
094f0bc0e5874b02ef5d73efe8d2832d30e0a156857719ad49e525503578c7f2
xu-hao/QueryArrow
Serialization.hs
# LANGUAGE TemplateHaskell , StandaloneDeriving , DeriveGeneric , TypeFamilies , FlexibleInstances # module QueryArrow.Remote.Serialization where import QueryArrow.Remote.Definitions import QueryArrow.DB.NoTranslation import Data.Scientific import Data.MessagePack import GHC.Generics import QueryArrow.Serialization ()...
null
https://raw.githubusercontent.com/xu-hao/QueryArrow/4dd5b8a22c8ed2d24818de5b8bcaa9abc456ef0d/QueryArrow-db-remote/src/QueryArrow/Remote/Serialization.hs
haskell
parseJSON js = do sk <- parseJSON js toJSON (staticKey sptr)
# LANGUAGE TemplateHaskell , StandaloneDeriving , DeriveGeneric , TypeFamilies , FlexibleInstances # module QueryArrow.Remote.Serialization where import QueryArrow.Remote.Definitions import QueryArrow.DB.NoTranslation import Data.Scientific import Data.MessagePack import GHC.Generics import QueryArrow.Serialization ()...
3dc69363e564d6a0117496217cc0d3ab3331885767bab24c1051ac20c7c31c88
tweag/hyperion
Benchmark.hs
# LANGUAGE GADTSyntax # # LANGUAGE ExistentialQuantification # module Hyperion.Benchmark ( -- * Benchmarks Benchmark(..) , bench , bgroup , env , series -- * Batches , Batch , runBatch , nf , nfIO , whnf , whnfIO -- * Environments , Env , use ) where import Control.Exception (evalu...
null
https://raw.githubusercontent.com/tweag/hyperion/4b123d51cbd4d94891fa1097b5f52bac19839357/src/Hyperion/Benchmark.hs
haskell
* Benchmarks * Batches * Environments ^ Acquire resource ^ Finalize resource | Apply an argument to a function, and evaluate the result to weak | Apply an argument to a function, and evaluate the result to head normal form (NF). | Perform an action, then evaluate its result to head normal form. This is partic...
# LANGUAGE GADTSyntax # # LANGUAGE ExistentialQuantification # module Hyperion.Benchmark Benchmark(..) , bench , bgroup , env , series , Batch , runBatch , nf , nfIO , whnf , whnfIO , Env , use ) where import Control.Exception (evaluate) import Control.Monad.State.Strict (modify') import...
6461ad943fb80e125364704efcba99f3cf49af26e873645beab176a5e193f329
sof/feed
Export.hs
-------------------------------------------------------------------- -- | -- Module : Text.RSS1.Export Copyright : ( c ) Galois , Inc. 2008 , ( c ) Sigbjorn Finne 2009- -- License : BSD3 -- -- Maintainer: Sigbjorn Finne <> -- Stability : provisional -- Portability: portable -- ---------------------...
null
https://raw.githubusercontent.com/sof/feed/74891cf9d7c9a69e38a8f84dc34fefdb174a9da5/Text/RSS1/Export.hs
haskell
------------------------------------------------------------------ | Module : Text.RSS1.Export License : BSD3 Maintainer: Sigbjorn Finne <> Stability : provisional Portability: portable ------------------------------------------------------------------ - -
Copyright : ( c ) Galois , Inc. 2008 , ( c ) Sigbjorn Finne 2009- module Text.RSS1.Export ( xmlFeed ) where import Text.XML.Light as XML import Text.RSS1.Syntax import Text.RSS1.Utils import Text.DublinCore.Types import Data.List import Data.Maybe qualNode :: (Maybe String,Maybe String...
40f427a505e3fa5e9c370e26a6657ea511e43ad08e953b5b6de6196126fe08c5
realworldocaml/book
sexp_grammar.ml
include Sexp_grammar_intf include Sexplib0.Sexp_grammar let remember_to_update_these_together ~t_of_sexp ~t_sexp_grammar = t_of_sexp, t_sexp_grammar ;;
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/sexplib/src/sexp_grammar.ml
ocaml
include Sexp_grammar_intf include Sexplib0.Sexp_grammar let remember_to_update_these_together ~t_of_sexp ~t_sexp_grammar = t_of_sexp, t_sexp_grammar ;;
4f987a173b54ab96a9c331cfb0f8546409ce523c85a7581b9c07796ac9bf6de0
cryptosense/pkcs11
p11_slot.mli
type t = | Index of int | Id of int | Description of string | Label of string [@@deriving eq, ord, show, yojson] val default : t val to_string : t -> string * string
null
https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/lib/p11_slot.mli
ocaml
type t = | Index of int | Id of int | Description of string | Label of string [@@deriving eq, ord, show, yojson] val default : t val to_string : t -> string * string
d36e626aa468af910e25a3d7daf9d357154316bc7ba9718ba8cb763771103107
JacquesCarette/Drasil
Concepts.hs
module Drasil.DblPendulum.Concepts where import Language.Drasil import Data.Drasil.Domains (physics) import Data.Drasil.Concepts.Documentation (first, second_, object) import Data.Drasil.Theories.Physics (newtonSLRQD) import Language.Drasil.Chunk.Concept.NamedCombinators (compoundNC) import Data.Drasil.Concepts.Physic...
null
https://raw.githubusercontent.com/JacquesCarette/Drasil/a1c22b739c958ae169e8fe4fb2ea2b0a670dc7df/code/drasil-example/dblpendulum/lib/Drasil/DblPendulum/Concepts.hs
haskell
module Drasil.DblPendulum.Concepts where import Language.Drasil import Data.Drasil.Domains (physics) import Data.Drasil.Concepts.Documentation (first, second_, object) import Data.Drasil.Theories.Physics (newtonSLRQD) import Language.Drasil.Chunk.Concept.NamedCombinators (compoundNC) import Data.Drasil.Concepts.Physic...
9d99afb7acf32ff0f72a01e7bf2c46fcb09ac9269f2ff50103d5ac996c170c49
zk/clojuredocs
syntax.cljc
;; From (ns clojuredocs.syntax (:require [clojure.string :as string])) (def builtins #{"def" "defn" "ns" "atom" "let" "if" "when" "cond" "merge" "assoc" "swap!" "reset!" "for" "range" "nil?" "int" "or" "->" "->>" "%" "fn" "if-not" "empty?" "case" "str" "pos?" "zero?"...
null
https://raw.githubusercontent.com/zk/clojuredocs/28f5ee500f4349039ee81c70d7ac40acbb19e5d8/src/cljc/clojuredocs/syntax.cljc
clojure
From
(ns clojuredocs.syntax (:require [clojure.string :as string])) (def builtins #{"def" "defn" "ns" "atom" "let" "if" "when" "cond" "merge" "assoc" "swap!" "reset!" "for" "range" "nil?" "int" "or" "->" "->>" "%" "fn" "if-not" "empty?" "case" "str" "pos?" "zero?" "map" "r...
39bc81ccf7b27130c6723f9e177dd986955626f5478d7b0442eb1bbcba53fbf9
locusmath/locus
object.clj
(ns locus.additive.field.core.object (:require [locus.set.logic.core.set :refer :all] [locus.set.mapping.general.core.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.quiver.structure.core.protocols :refer :all] [locus.set.copresheaf.stru...
null
https://raw.githubusercontent.com/locusmath/locus/12061072ccfe6a28f87eb8bd4489397dcf4b93d8/src/clojure/locus/additive/field/core/object.clj
clojure
A field is an arithmetic structure contain all relevant operations of addition, multiplication, subtraction, and division. Fields often emerge in commutative algebra from the quotients of commutative rings by maximal ideals, such as the unique maximal ideals of local rings, or by the field of fractions of an integ...
(ns locus.additive.field.core.object (:require [locus.set.logic.core.set :refer :all] [locus.set.mapping.general.core.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.quiver.structure.core.protocols :refer :all] [locus.set.copresheaf.stru...
557f2df7daae205e4fc5f868edc0aae8c9e0b2b850b01c36fc3edf57fdf29eb6
ds-wizard/engine-backend
RegistryTemplates.hs
module Wizard.Database.Migration.Development.Registry.Data.RegistryTemplates where import Shared.Database.Migration.Development.DocumentTemplate.Data.DocumentTemplates import Shared.Model.DocumentTemplate.DocumentTemplate import Wizard.Model.Registry.RegistryTemplate commonWizardRegistryTemplate :: RegistryTemplate c...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-wizard/src/Wizard/Database/Migration/Development/Registry/Data/RegistryTemplates.hs
haskell
module Wizard.Database.Migration.Development.Registry.Data.RegistryTemplates where import Shared.Database.Migration.Development.DocumentTemplate.Data.DocumentTemplates import Shared.Model.DocumentTemplate.DocumentTemplate import Wizard.Model.Registry.RegistryTemplate commonWizardRegistryTemplate :: RegistryTemplate c...
067ac7cf644f8535127c6ee1cb8adddb847e5f51170edb5de439d0a37e8bd811
rheaplex/art-social-graph
load.lisp
(load "art-social-graph.asd") (asdf:oos 'asdf:load-op :art-social-graph)
null
https://raw.githubusercontent.com/rheaplex/art-social-graph/8ce7be9d7f20c83134108e97b83eb8a0c4c24c57/load.lisp
lisp
(load "art-social-graph.asd") (asdf:oos 'asdf:load-op :art-social-graph)
d1957e4acaa6bff1c920877f189f846f8766d12c6e352dcd868ae9334a080a9e
goldfirere/cs380
Class.hs
# LANGUAGE GADTs , TypeInType , StandaloneDeriving , TypeFamilies , TypeOperators , ScopedTypeVariables # TypeOperators, ScopedTypeVariables #-} {-# OPTIONS_GHC -Wincomplete-patterns #-} module Class where import Data.Kind import Prelude hiding ( reverse, (++), last, replicate, length) imp...
null
https://raw.githubusercontent.com/goldfirere/cs380/a9e2d2e610eb4e9e082cef0559b6e29a6d82a253/15_singletons/Class.hs
haskell
# OPTIONS_GHC -Wincomplete-patterns # :~: comes from Data.Type.Equality map :: (a -> b) -> Vec n a -> Vec n b plus_ri
# LANGUAGE GADTs , TypeInType , StandaloneDeriving , TypeFamilies , TypeOperators , ScopedTypeVariables # TypeOperators, ScopedTypeVariables #-} module Class where import Data.Kind import Prelude hiding ( reverse, (++), last, replicate, length) import Data.Type.Equality import Unsafe.Coerc...
4a080d090d522bca9a0fdb956eb356ce74d4a30aa41a1a851bd2572b344469d1
Wikia/vignette
core_test.clj
(ns vignette.perfmonitoring.core-test (:require [midje.sweet :refer :all] [vignette.perfmonitoring.core :refer :all] [prometheus.core :as prometheus])) (facts :publish (publish {:request-count 1}) => nil (provided (prometheus/increase-counter anything "vignette" "request_count" [] ...
null
https://raw.githubusercontent.com/Wikia/vignette/4797aeffc0a01dcfe1e1f661b2d2649d44ddb1d0/test/vignette/perfmonitoring/core_test.clj
clojure
(ns vignette.perfmonitoring.core-test (:require [midje.sweet :refer :all] [vignette.perfmonitoring.core :refer :all] [prometheus.core :as prometheus])) (facts :publish (publish {:request-count 1}) => nil (provided (prometheus/increase-counter anything "vignette" "request_count" [] ...
6ce78e7514b864abc46649336c3858bbb1af53b8f533a1ef99b6d6ef79c5c4b5
bluegraybox/examples
fizzbuzz_1.erl
#!/usr/local/bin/escript -mode(compile). main([]) -> fizzbuzz(1). fizzbuzz(X) when X > 100 -> ok; fizzbuzz(X) when ((X rem 5) == 0) and ((X rem 3) == 0) -> io:format("fizzbuzz~n"), fizzbuzz(X + 1); fizzbuzz(X) when ((X rem 3) == 0) -> io:format("fizz~n"), fizzbuzz(X + 1); fizzbuzz(X) when ((X rem...
null
https://raw.githubusercontent.com/bluegraybox/examples/20f238be10e2e987687d7289b2f4897cc7d95abd/fizzbuzz/fizzbuzz_1.erl
erlang
#!/usr/local/bin/escript -mode(compile). main([]) -> fizzbuzz(1). fizzbuzz(X) when X > 100 -> ok; fizzbuzz(X) when ((X rem 5) == 0) and ((X rem 3) == 0) -> io:format("fizzbuzz~n"), fizzbuzz(X + 1); fizzbuzz(X) when ((X rem 3) == 0) -> io:format("fizz~n"), fizzbuzz(X + 1); fizzbuzz(X) when ((X rem...
6094770c9adfc78c9827243d9fb602149ffb53182c00f1f22928707cf085aae8
cl21/cl21
function.lisp
(in-package :cl21-user) (defpackage cl21-test.function (:use :cl21 :cl-test-more)) (in-package :cl21-test.function) (plan 12) (ok (typep #'(setf getf) 'function) "setf function is recognized") (is (map (compose #'sin #'1+) '(1 2 3)) '(0.9092974 0.14112 -0.7568025)) (is (map #'(compose sin 1+) '(1 2 3))...
null
https://raw.githubusercontent.com/cl21/cl21/c36644f3b6ea4975174c8ce72de43a4524dd0696/t/function.lisp
lisp
(in-package :cl21-user) (defpackage cl21-test.function (:use :cl21 :cl-test-more)) (in-package :cl21-test.function) (plan 12) (ok (typep #'(setf getf) 'function) "setf function is recognized") (is (map (compose #'sin #'1+) '(1 2 3)) '(0.9092974 0.14112 -0.7568025)) (is (map #'(compose sin 1+) '(1 2 3))...
035b55af1546c491bb753e08c7411f6edc4ee04514a50d3d1b1a86ed13566c08
bozsahin/ccglab-database
cl-book.ccg.lisp
(DEFPARAMETER *CCG-GRAMMAR* '(((KEY 1) (PHON I) (MORPH N) (SYN (((BCAT S) (FEATS NIL)) (DIR FS) (MODAL ALL) (((BCAT S) (FEATS NIL)) (DIR BS) (MODAL ALL) ((BCAT NP) (FEATS ((AGR 1S))))))) (SEM (LAM P (P "I"))) (PARAM 1.0)) ((KEY 2) (PHON YOU) (MORPH N) (SYN (((BCAT S) (FEA...
null
https://raw.githubusercontent.com/bozsahin/ccglab-database/f24215aaa4ac8102f6d76c9c0ec5bd58a29743d7/cl-book/cl-book.ccg.lisp
lisp
(DEFPARAMETER *CCG-GRAMMAR* '(((KEY 1) (PHON I) (MORPH N) (SYN (((BCAT S) (FEATS NIL)) (DIR FS) (MODAL ALL) (((BCAT S) (FEATS NIL)) (DIR BS) (MODAL ALL) ((BCAT NP) (FEATS ((AGR 1S))))))) (SEM (LAM P (P "I"))) (PARAM 1.0)) ((KEY 2) (PHON YOU) (MORPH N) (SYN (((BCAT S) (FEA...
a3c6f492605720c24b57d876f40e19f7891a7fd4780d65bb91f25c79afa589de
2600hz/kazoo
kapi_schemas_tests.erl
%%%----------------------------------------------------------------------------- ( C ) 2013 - 2020 , 2600Hz %%% @doc 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_ast/test/kapi_schemas_tests.erl
erlang
----------------------------------------------------------------------------- @doc @end -----------------------------------------------------------------------------
( C ) 2013 - 2020 , 2600Hz 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(kapi_schemas_tests). -include_lib("eunit/include/eunit.hrl"). base_schema_test_() -> Test = fun kapi...
5c9912b43a10fa3f92fd64fa7cfb304e130f8bd3107eca5c6d17a942b77a3c27
waddlaw/TAPL
Types.hs
module Language.SimpleLambda.Types ( Ty (..), Term (..), Context, addContext, unCtx, Binding (..), SimpleTypedLambda, pprSimple, ) where import Data.Text.Prettyprint.Doc import RIO import qualified RIO.List.Partial as List.Partial import qualified RIO.Text as Text type SimpleTypedLambd...
null
https://raw.githubusercontent.com/waddlaw/TAPL/94576e46821aaf7abce6d1d828fc3ce6d05a40b8/subs/lambda-simple/src/Language/SimpleLambda/Types.hs
haskell
| 型無しの変数 | 型付きの変数 | 関数型 | Bool型
module Language.SimpleLambda.Types ( Ty (..), Term (..), Context, addContext, unCtx, Binding (..), SimpleTypedLambda, pprSimple, ) where import Data.Text.Prettyprint.Doc import RIO import qualified RIO.List.Partial as List.Partial import qualified RIO.Text as Text type SimpleTypedLambd...
6f75f5baa7a321a4fb6dbcf0eedcdc1db0d8776fcee8800305d1676cda3a4ed3
fourmolu/fourmolu
operators-6-four-out.hs
type PermuteRef = "a" :> ( "b" :> "c" :> End :<|> "c" :> "b" :> End ) :<|> "b" :> ( "a" :> "c" :> End :<|> "c" :> "a" :> End )
null
https://raw.githubusercontent.com/fourmolu/fourmolu/1f8903a92c8d5001dc1ec8ecfd4a04a3b61c3283/data/examples/declaration/value/function/operators-6-four-out.hs
haskell
type PermuteRef = "a" :> ( "b" :> "c" :> End :<|> "c" :> "b" :> End ) :<|> "b" :> ( "a" :> "c" :> End :<|> "c" :> "a" :> End )
ae37a699da32d896b7b1e2b88a442205cc61a1904a2d3ef92410408923acf678
bootstrapworld/curr
manualpages-index.rkt
;; This file contains the index for pages that we will extract from ;; the manually-maintained workbook. We will use this to find pages ;; within the PDF file, based on their tag names stuff from ColleenPages ("unit-listing" 1) ("Unit-1" 2) ("Unit-2" 3) ("Unit-3" 4) ("Unit-4" 5) ("Unit-5" 6) ("Unit-6" 7) ("...
null
https://raw.githubusercontent.com/bootstrapworld/curr/443015255eacc1c902a29978df0e3e8e8f3b9430/courses/blank-course/resources/workbook/langs/es-mx/manualpages-index.rkt
racket
This file contains the index for pages that we will extract from the manually-maintained workbook. We will use this to find pages within the PDF file, based on their tag names stuff from the original workbook ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;...
stuff from ColleenPages ("unit-listing" 1) ("Unit-1" 2) ("Unit-2" 3) ("Unit-3" 4) ("Unit-4" 5) ("Unit-5" 6) ("Unit-6" 7) ("Unit-7" 8) ("Unit-8" 9) ("Unit-9" 10) ("Contracts" 1) ("NinjaCat-Dissection" 3) ("NinjaCat-Coordinates" 4) ("Game-Design" 5) ("Circle-of-Evaluation-Practice" 6) ("Unit-2" 7) ("C...
5954d5b36b39a9655732e720268437afe171f41ab9177218c51393839af9315d
whitequark/ocaml-lz4
LZ4_bindgen.ml
let () = let fmt = Format.formatter_of_out_channel (open_out "LZ4_stubs.c") in Format.fprintf fmt "#include <lz4.h>@."; Cstubs.write_c fmt ~prefix:"caml_" (module LZ4_bindings.C); let fmt = Format.formatter_of_out_channel (open_out "LZ4_generated.ml") in Cstubs.write_ml fmt ~prefix:"caml_" (module LZ4_bindi...
null
https://raw.githubusercontent.com/whitequark/ocaml-lz4/ca58479500c6969b2e0d3b6e1898b1b6b36b9774/lib_gen/LZ4_bindgen.ml
ocaml
let () = let fmt = Format.formatter_of_out_channel (open_out "LZ4_stubs.c") in Format.fprintf fmt "#include <lz4.h>@."; Cstubs.write_c fmt ~prefix:"caml_" (module LZ4_bindings.C); let fmt = Format.formatter_of_out_channel (open_out "LZ4_generated.ml") in Cstubs.write_ml fmt ~prefix:"caml_" (module LZ4_bindi...
b7629e687b9e39847d0d5d6c6e3dd474500ff4dd740e0dff277438dc2eefcc1b
satori-com/mzbench
mzb_worker_script_validator.erl
-module(mzb_worker_script_validator). -export([validate_worker_script/2]). -include_lib("mzbench_language/include/mzbl_types.hrl"). -spec validate_worker_script([#operation{}], {module(), module()}) -> script_validation_result(). validate_worker_script(Script, Worker) -> Errors = lists:flatmap(fun(Expr) -> ...
null
https://raw.githubusercontent.com/satori-com/mzbench/02be2684655cde94d537c322bb0611e258ae9718/node/apps/mzbench/src/mzb_worker_script_validator.erl
erlang
-module(mzb_worker_script_validator). -export([validate_worker_script/2]). -include_lib("mzbench_language/include/mzbl_types.hrl"). -spec validate_worker_script([#operation{}], {module(), module()}) -> script_validation_result(). validate_worker_script(Script, Worker) -> Errors = lists:flatmap(fun(Expr) -> ...
02e93b0fc27ab44b7c6230ece455a12e36f150c2c53c41073457696f6b9229fa
esl/MongooseIM
cth_surefire.erl
%%-------------------------------------------------------------------- %% %CopyrightBegin% %% Copyright Ericsson AB 2012 - 2022 . 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 cop...
null
https://raw.githubusercontent.com/esl/MongooseIM/72eaa5f14bc2982c9e273364bed42760d68c4b56/big_tests/src/cth_surefire.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 KI...
Copyright Ericsson AB 2012 - 2022 . 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(cth_surefire). -export([id/1, init/2]). -export([pre_init_per_suite/3]). -export([post_init_per_suite/4])...
410d2760103400614004c02f6062add4eb4b59b2defcb8615876bdd64e475eae
Helium4Haskell/helium
Thompson04.hs
exOr :: bool -> bool -> bool exOr b1 b2 = (b1 && not b2) || (b2 && not b1)
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/thompson/Thompson04.hs
haskell
exOr :: bool -> bool -> bool exOr b1 b2 = (b1 && not b2) || (b2 && not b1)
b08968a796963448857eb71af66c2b781279489d9e1570eee9b38459af634019
macourtney/Dark-Exchange
util.clj
(ns test.fixtures.util (:use darkexchange.database.util) (:require [clojure.test :as clojure-test] [test.init :as test-init])) (defn load-records [fixture-map] (apply insert-into (:table fixture-map) (:records fixture-map))) (defn unload-records [fixture-map] (try (delete (:table fi...
null
https://raw.githubusercontent.com/macourtney/Dark-Exchange/1654d05cda0c81585da7b8e64f9ea3e2944b27f1/test/test/fixtures/util.clj
clojure
(ns test.fixtures.util (:use darkexchange.database.util) (:require [clojure.test :as clojure-test] [test.init :as test-init])) (defn load-records [fixture-map] (apply insert-into (:table fixture-map) (:records fixture-map))) (defn unload-records [fixture-map] (try (delete (:table fi...
180519ea6ef4401c8264dec65391702f777a2f8b3d4e359b200c68a4ba6a79b0
jacekschae/learn-pedestal-course-files
interceptors.clj
(ns cheffy.interceptors (:require [datomic.client.api :as d] [io.pedestal.interceptor :as interceptor] [cheffy.components.auth :as auth] [clojure.string :as string])) (def db-interceptor (interceptor/interceptor {:name ::db-interceptor :enter (fn [ctx] (le...
null
https://raw.githubusercontent.com/jacekschae/learn-pedestal-course-files/76ae71ffd11d32f306cd9ab4bd158461d8c81782/increments/70-aws-ssm/src/main/cheffy/interceptors.clj
clojure
(ns cheffy.interceptors (:require [datomic.client.api :as d] [io.pedestal.interceptor :as interceptor] [cheffy.components.auth :as auth] [clojure.string :as string])) (def db-interceptor (interceptor/interceptor {:name ::db-interceptor :enter (fn [ctx] (le...
5f1b770d6b602b30361b8020dbf0f01b4fc2f5761270ed22067a9dd6165494ee
DavidAlphaFox/RabbitMQ
rabbit_tracing_files.erl
The contents of this file are subject to the Mozilla Public License Version 1.1 ( the " License " ) ; you may not use this file except in %% compliance with the License. You may obtain a copy of the License %% at / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WA...
null
https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-tracing/src/rabbit_tracing_files.erl
erlang
compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -------------------------------------------------------------------- --------...
The contents of this file are subject to the Mozilla Public License Version 1.1 ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is GoPivotal , Inc. ...
f7fa5db0f74290b56047987ee9b5c8ff90f6b7388abe95c067ab17ee5ebb4be1
SimulaVR/godot-haskell
WebSocketServer.hs
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.WebSocketServer (Godot.Core.WebSocketServer.sig_clie...
null
https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/WebSocketServer.hs
haskell
# NOINLINE bindWebSocketServer_get_peer_port # # NOINLINE bindWebSocketServer_set_private_key #
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.WebSocketServer (Godot.Core.WebSocketServer.sig_clie...
c01481a2193d55d35a95dae3672c4299dfce31fa1fede7ee176d20fed13861f8
jarvinet/scheme
a.scm
(define (a b) (define (c d) (if (> d 0) (c (- d 1)) d)) (c b))
null
https://raw.githubusercontent.com/jarvinet/scheme/47633d7fc4d82d739a62ceec75c111f6549b1650/bin/test/a.scm
scheme
(define (a b) (define (c d) (if (> d 0) (c (- d 1)) d)) (c b))
47e2b378ca4686150ab4d0436734a28b7a904fc9dba1725ca25b527f360a54ff
mokus0/junkbox
Susie.hs
module Main where import Susie.Main import Susie.Module.Console import Susie.Module.Config import Susie.Module.IRC main = susie config { modules = [ configModule , consoleModule , ircModule ] }
null
https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Projects/susie/src/Susie.hs
haskell
module Main where import Susie.Main import Susie.Module.Console import Susie.Module.Config import Susie.Module.IRC main = susie config { modules = [ configModule , consoleModule , ircModule ] }
0fb3f8b43f7f64f980d3dfd05256f0a18c9b57c82382afb661947aeae7025fc6
gilith/hol-light
itab.ml
(* ========================================================================= *) (* Intuitionistic theorem prover (complete for propositional fragment). *) (* *) , University of Cambridge Computer Laboratory (* ...
null
https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/itab.ml
ocaml
========================================================================= Intuitionistic theorem prover (complete for propositional fragment). ===============...
, University of Cambridge Computer Laboratory ( c ) Copyright , University of Cambridge 1998 ( c ) Copyright , 1998 - 2007 needs "tactics.ml";; let UNIFY_ACCEPT_TAC mvs th (asl,w) = let insts = term_unify mvs (concl th) w ...
2a69da48aa1737569ed779dd811b6fa6ab9a2bc7e60f897903acd0d46d29843e
PrincetonUniversity/lucid
Cmdline.ml
type config = { mutable verbose : bool (* Print out each transformation name before we do it *) ; mutable debug : bool (** Print out the whole program after each transformation *) ; mutable show_effects : bool (** Print out effect annotations *) ; mutable verbose_types : bool (** Print out extra...
null
https://raw.githubusercontent.com/PrincetonUniversity/lucid/ae6faebdd95cf99d3162cc496f167cdb5b4a5541/src/lib/frontend/Cmdline.ml
ocaml
Print out each transformation name before we do it * Print out the whole program after each transformation * Print out effect annotations * Print out extra typing information * Print out a little more typing information Try to print out record types using the user-defined name Show effects even for non-global ...
type config = { mutable verbose : bool ; mutable debug : bool ; mutable show_tvar_links : bool ; mutable show_constraints : bool ; mutable show_queries : bool ; mutable use_type_names : bool ; mutable show_interp_state : bool ; mutable output : string } let default () = { verbose = true ; debug ...
019fb0573abd5a8e8e2bf97b69e7eb10fde9908a8897f8c8989251e331972357
mflatt/plait
rename.rkt
#lang plait (require (rename-in [typed-in racket (map : (('a 'b -> 'c) (Listof 'a) (Listof 'b) -> (Listof 'c)))] [map rkt-map2])) (require (rename-in [typed-in racket (map : (('a 'b 'c -> 'd) ...
null
https://raw.githubusercontent.com/mflatt/plait/32420453c0890a505c4cb4ee13b0fdcc74655a18/tests/rename.rkt
racket
#lang plait (require (rename-in [typed-in racket (map : (('a 'b -> 'c) (Listof 'a) (Listof 'b) -> (Listof 'c)))] [map rkt-map2])) (require (rename-in [typed-in racket (map : (('a 'b 'c -> 'd) ...
a0f9f90f56db71fa0ec6e1efe9cf84d6f9f59a655b15775d8ef8a26350eda9e7
haskell/aeson
PropertyKeys.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE TypeApplications # module PropertyKeys ( keysTests ) where import Prelude.Compat import Control.Applicative (Const) import Data.Time.Compat (Day, LocalTime, TimeOfDay, UTCTime) import Data.Time.Calendar.Compat (DayOfWeek) import Data.Time.Calendar.Month.Compat (Month) import...
null
https://raw.githubusercontent.com/haskell/aeson/78c2338c20d31ba5dd46036d10d6c4815c12185d/tests/PropertyKeys.hs
haskell
# LANGUAGE NoImplicitPrelude # # LANGUAGE TypeApplications # module PropertyKeys ( keysTests ) where import Prelude.Compat import Control.Applicative (Const) import Data.Time.Compat (Day, LocalTime, TimeOfDay, UTCTime) import Data.Time.Calendar.Compat (DayOfWeek) import Data.Time.Calendar.Month.Compat (Month) import...
9aa4be6462c9a423e79c0c7c98aef80d9a39d888e5ad1a6b78b355b614f85fc7
gholomia/NUMEX
Challenging-TestCases.rkt
#lang racket ;; syntax: -lang.org/rackunit/api.html (require "solution.rkt") ; This file uses Racket's unit-testing framework, which is convenient but not required of you. (require rackunit) (define envList (list (cons "x" (int 2)) (cons "y" (int 3)) (cons "z" (int 4)) (cons "p" (...
null
https://raw.githubusercontent.com/gholomia/NUMEX/e5dfd63bd23753731d0714372a67fc04873f4d3b/src/Challenging-TestCases.rkt
racket
syntax: -lang.org/rackunit/api.html This file uses Racket's unit-testing framework, which is convenient but not required of you. (fun "f" "y" (add (var "x") (var "y")))))) OR any permutation OR any permutation OR any permutation OR any permutation OR any permutation OR any permutation OR any permutation ...
#lang racket (require "solution.rkt") (require rackunit) (define envList (list (cons "x" (int 2)) (cons "y" (int 3)) (cons "z" (int 4)) (cons "p" (int 5)) (cons "q" (int 6)) (cons "t" (int 7)) (cons "a" (int 8)) (cons "b" (int 9)) (cons "u" (i...
b7bed5ea1da4008b1c1428439854f66580f09b7fd82e1abfd00b7b2b8825089d
ocaml-sf/learn-ocaml-corpus
correct_no_balancing_rl.ml
(* This code uses path compression, but no balancing. [union x y] creates a link of [y] to [x]. *) let make () : elem = ref (Root 0) let rec find (x : elem) : elem = match !x with | Root _ -> x | Link y -> let z = find y in x := Link z; z let eq (x : elem) (y : elem) : bool = fin...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/unionfind/wrong/correct_no_balancing_rl.ml
ocaml
This code uses path compression, but no balancing. [union x y] creates a link of [y] to [x].
let make () : elem = ref (Root 0) let rec find (x : elem) : elem = match !x with | Root _ -> x | Link y -> let z = find y in x := Link z; z let eq (x : elem) (y : elem) : bool = find x == find y let link (x : elem) (y : elem) : unit = if x != y then match !x, !y with | Ro...
8a9792e3e5c26477c33afc7dc2e59ad6c0520cbb78c6cdf3db3772d92c8e468b
clojure-interop/aws-api
project.clj
(defproject clojure-interop/com.amazonaws.services.resourcegroups "1.0.0" :description "Clojure to Java Interop Bindings for com.amazonaws.services.resourcegroups" :url "-interop/aws-api" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"]] :sour...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.resourcegroups/project.clj
clojure
(defproject clojure-interop/com.amazonaws.services.resourcegroups "1.0.0" :description "Clojure to Java Interop Bindings for com.amazonaws.services.resourcegroups" :url "-interop/aws-api" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"]] :sour...
07912fa913ac5378b827e19b0d1dbe0e41dfd6fd243220574ea3766b4542785d
soranoba/erlup
spam_sup.erl
%%%------------------------------------------------------------------- %% @doc spam top level supervisor. %% @end %%%------------------------------------------------------------------- -module('spam_sup'). -behaviour(supervisor). %% API -export([start_link/0]). %% Supervisor callbacks -export([init/1]). -define(SE...
null
https://raw.githubusercontent.com/soranoba/erlup/c7d785eb8222b9f38d94b911c84a06b398b43f0f/ct/erlup_SUITE_data/spam_v1/src/spam_sup.erl
erlang
------------------------------------------------------------------- @doc spam top level supervisor. @end ------------------------------------------------------------------- API Supervisor callbacks ==================================================================== API functions ==================================...
-module('spam_sup'). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(SERVER, ?MODULE). start_link() -> supervisor:start_link({local, ?SERVER}, ?MODULE, []). Child : : { Id , StartFunc , Restart , Shutdown , Type , Modules } init([]) -> Mod = spam_srv, Children = [{Mod,...
d919acedafd165f8d3673f0d7e024272cac2edf697f74d09e808236c4f8eaa63
exercism/babashka
project.clj
(defproject largest-series-product "0.1.0-SNAPSHOT" :description "largest-series-product exercise." :url "-series-product" :dependencies [[org.clojure/clojure "1.10.0"]])
null
https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/practice/largest-series-product/project.clj
clojure
(defproject largest-series-product "0.1.0-SNAPSHOT" :description "largest-series-product exercise." :url "-series-product" :dependencies [[org.clojure/clojure "1.10.0"]])
b7c95d8b84c852c0bdf56277b606dca6a27796d8c797e11e9e29409ee6ce1b6b
FreeProving/free-compiler
ParserTests.hs
| This module contains tests for " FreeC.Frontend . IR.Parser " . module FreeC.Frontend.IR.ParserTests where import Test.Hspec hiding ( shouldReturn ) import FreeC.Frontend.IR.Parser import FreeC.IR.SrcSpan import qualified FreeC.IR.Syntax as IR import ...
null
https://raw.githubusercontent.com/FreeProving/free-compiler/6931b9ca652a185a92dd824373f092823aea4ea9/src/test/FreeC/Frontend/IR/ParserTests.hs
haskell
----------------------------------------------------------------------------- Expectation Setters -- ----------------------------------------------------------------------------- input and produces the given output. | Like 'shouldParse' for modules. Automat...
| This module contains tests for " FreeC.Frontend . IR.Parser " . module FreeC.Frontend.IR.ParserTests where import Test.Hspec hiding ( shouldReturn ) import FreeC.Frontend.IR.Parser import FreeC.IR.SrcSpan import qualified FreeC.IR.Syntax as IR import ...
7d2b9e8d012c5bf60f043558d794b527c5b12198a3c84f8ac42752c9323b2cc6
JonasDuregard/BNFC-meta
CFtoPrinter.hs
# LANGUAGE TemplateHaskell # BNF Converter : Pretty - printer generator Copyright ( C ) 2004 Author : This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either vers...
null
https://raw.githubusercontent.com/JonasDuregard/BNFC-meta/1526a2fbd7b01d374ebe2e49f78494f46d7472b8/Language/LBNF/CFtoPrinter.hs
haskell
showsPrintRule cf t = unlines $ [ "instance Print " ++ t ++ " where", " prt _ x = doc (shows x)", ifList cf t ] unlines $ [ "instance Print " ++ own ++ " where", " prt _ (" ++ own ++ posn ++ ") = doc (showString i)", ifList cf own ] where posn = if isPositionCat cf own then " (_,i)" else " i" ...
# LANGUAGE TemplateHaskell # BNF Converter : Pretty - printer generator Copyright ( C ) 2004 Author : This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either vers...
97eaf30b03e444ad9aee3b5e6c349231c5bf2aa1133fe31b832ad8f190e06598
ninenines/cowboy
cowboy_compress_h.erl
Copyright ( c ) 2017 , < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS A...
null
https://raw.githubusercontent.com/ninenines/cowboy/8795233c57f1f472781a22ffbf186ce38cc5b049/src/cowboy_compress_h.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2017 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(cowboy_compress_h). -behavior(cowboy_stream). -expo...
540b558b24bff7d20408e017e601e477960c08f15679901cec1becdd331f3a3b
dmjio/miso
Main.hs
# LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE PolyKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} # LANGUAGE TypeApplications # module Main where import Common imp...
null
https://raw.githubusercontent.com/dmjio/miso/0be227bca6e0aec16a69a1c09f9a90624af070c1/examples/sse/server/Main.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE PolyKinds # # LANGUAGE DataKinds # # LANGUAGE TypeOperators # Send 1 event/s containing the current server time | Wrapper for setting HTML doctype and header Include the frontend
# LANGUAGE CPP # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TypeApplications # module Main where import Common import Control.Concurrent import Control.Monad import Data.Binary.Builder import Data.Monoid ((<>)) import Data.Proxy import ...
6bce60b118cda533fd29d5a058ed9e2231c50d0ab496455d67c2bf4a87e1c492
CDSoft/abp
abp.hs
This file is part of ABP . ABP is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . ABP is distributed...
null
https://raw.githubusercontent.com/CDSoft/abp/98e042066869aa5b898096c31b51d2b6dc316456/app/abp.hs
haskell
This file is part of ABP . ABP is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . ABP is distributed...
594d100dd3cc26143d9ff0e4614a142d6e7e688439abcb0a086fa0a3741af7e4
politrons/Dive_into_Haskell
TuplesFunctions.hs
module TuplesFunctions (sorterNameOutput,olderOutput) where import Data.Char import Data.List | Haskell is a strong type language and just like in Scala we can define better business logic types -- from primitives using [type] type Name = String type SurName = String type Age = Int type Person = (Name, SurName, ...
null
https://raw.githubusercontent.com/politrons/Dive_into_Haskell/fd9dec14b87aecba0b3561385c1d75cf969546a4/src/features/TuplesFunctions.hs
haskell
from primitives using [type] | We create our instance of Person passing the values defined in Person type | To extract a value from the Person instance we need to create a function that select the element from the tuple | Transform/filter Functions | Pipelines
module TuplesFunctions (sorterNameOutput,olderOutput) where import Data.Char import Data.List | Haskell is a strong type language and just like in Scala we can define better business logic types type Name = String type SurName = String type Age = Int type Person = (Name, SurName, Age) person1 = ("Paul", "Perez", ...
045ce77f41a767d18b7e75530a6f2edbbec6346ad221cfff665aa98fab9636c3
rodentrabies/bp
encoding.lisp
(uiop:define-package :bp/tests/encoding (:use :cl :fiveam) (:use :bp/core/all) (:import-from :bp/crypto/random #:random-bytes)) (in-package :bp/tests/encoding) (def-suite encoding-tests :description "Tests for various encoding formats used by Bitcoin Protocol.") (def-suite base58-tests :descr...
null
https://raw.githubusercontent.com/rodentrabies/bp/5ca35882a77d4b6cba56f8cac51be1581e841b06/tests/encoding.lisp
lisp
bad character (signals bech32-overall-max-length-exceeded-error (signals bech32-overall-max-length-exceeded-error (bech32-decode "an84characterslonghumanreadablepartthatcontainsthetheexcludedcharactersbioandnumber11d6pts4"))
(uiop:define-package :bp/tests/encoding (:use :cl :fiveam) (:use :bp/core/all) (:import-from :bp/crypto/random #:random-bytes)) (in-package :bp/tests/encoding) (def-suite encoding-tests :description "Tests for various encoding formats used by Bitcoin Protocol.") (def-suite base58-tests :descr...
d7c7182ef20c50abf82d9c2f07f281a068fd2074e1d15579bfe576f2f0f19ea4
elastic/eui-cljs
icon_logo_azure_mono.cljs
(ns eui.icon-logo-azure-mono (:require ["@elastic/eui/lib/components/icon/assets/logo_azure_mono.js" :as eui])) (def logoAzureMono eui/icon)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_logo_azure_mono.cljs
clojure
(ns eui.icon-logo-azure-mono (:require ["@elastic/eui/lib/components/icon/assets/logo_azure_mono.js" :as eui])) (def logoAzureMono eui/icon)
b8af00e67a23ad7c053e31bf628c551c2c401c4c2cc67f9183dcd5d5a081bef8
ericclack/overtone-loops
pattern_04_18.clj
(ns overtone-loops.dph-book.pattern-04-18 (:use [overtone.live] [overtone-loops.loops])) Define some samples from Freesound.org (def closed-hh (freesound2 404890)) (def open-hh (freesound2 404893)) (def snare (freesound2 404859)) (def kick (freesound2 171104)) (def ride (freesound2 162311)) ;; (ride) (def...
null
https://raw.githubusercontent.com/ericclack/overtone-loops/54b0c230c1e6bd3d378583af982db4e9ae4bda69/src/overtone_loops/dph_book/pattern_04_18.clj
clojure
(ride) (ride-bell) (stop)
(ns overtone-loops.dph-book.pattern-04-18 (:use [overtone.live] [overtone-loops.loops])) Define some samples from Freesound.org (def closed-hh (freesound2 404890)) (def open-hh (freesound2 404893)) (def snare (freesound2 404859)) (def kick (freesound2 171104)) We want to use amps between 0 and 9 in our...
a317c5da156b569adb508b3d1a67fb7bfafb365178e20d279c0bfed00ec07877
berke/aurochs
bootstrap.ml
(* Bootstrap *) open Pffpsf open Peg let load_grammar fn = let u = Util.read_file fn in let m = String.length u in let peg = Grammar_original.peg in (*with_file_output "internal.peg" (fun oc -> Pretty.print_grammar oc peg);*) let (q, i, t) = Peg.descent (fun x -> List.assoc x peg) (List.ass...
null
https://raw.githubusercontent.com/berke/aurochs/637bdc0d4682772837f9e44112212e7f20ab96ff/aurochs/bootstrap.ml
ocaml
Bootstrap with_file_output "internal.peg" (fun oc -> Pretty.print_grammar oc peg);
open Pffpsf open Peg let load_grammar fn = let u = Util.read_file fn in let m = String.length u in let peg = Grammar_original.peg in let (q, i, t) = Peg.descent (fun x -> List.assoc x peg) (List.assoc "start" peg) u in try if q && i = m then Convert_grammar_original.convert_gramma...
aefc1528a47379cf5a0e131f082b0f607d8fa69e99e5415ab93b58ca3d25ec02
ndpar/erlang
io_handler.erl
%% Erlang Programming , p.136 . %% Event Manager Pattern. %% %% See also event_manager.erl %% -module(io_handler). -export([init/1, terminate/1, handle_event/2]). init(Count) -> Count. terminate(Count) -> {count, Count}. handle_event({raise_alarm, Id, Alarm}, Count) -> print(alarm, Id, Alarm, Count), Count...
null
https://raw.githubusercontent.com/ndpar/erlang/e215841a1d370e0fc5eb6b9ff40ea7ae78fc8763/src/io_handler.erl
erlang
Event Manager Pattern. See also event_manager.erl
Erlang Programming , p.136 . -module(io_handler). -export([init/1, terminate/1, handle_event/2]). init(Count) -> Count. terminate(Count) -> {count, Count}. handle_event({raise_alarm, Id, Alarm}, Count) -> print(alarm, Id, Alarm, Count), Count + 1; handle_event({clear_alarm, Id, Alarm}, Count) -> print(...
e2d7b964fda3c04e2db3d8740b9ba169b20db7c26cf8cc1ed5489d15e811b820
CGenie/haskell-snake
Main.hs
module Main where import Control.Lens import Game.HSnake.AI import Game.HSnake.Basic import Game.HSnake.Game import Game.HSnake.Graphics import Game.HSnake.Player import Game.HSnake.Snake import Control.Monad import Control.Monad.State import Control.Monad.Reader import Data.List import Foreign.C.Types (CInt(..)) im...
null
https://raw.githubusercontent.com/CGenie/haskell-snake/3783e65632cd89691f63bff0ff51ede9efbe81bd/driver/Main.hs
haskell
Renderer renders to gameScreen, not to window We have text additionally to render to other parts of the window If we rendered directly to window and then rendered text, this would result in flickering timerState Otherwise we would eat the apple, then immediately move the snake, which is wrong. increase snake's ...
module Main where import Control.Lens import Game.HSnake.AI import Game.HSnake.Basic import Game.HSnake.Game import Game.HSnake.Graphics import Game.HSnake.Player import Game.HSnake.Snake import Control.Monad import Control.Monad.State import Control.Monad.Reader import Data.List import Foreign.C.Types (CInt(..)) im...
b75340c0c0c971b71d229d5050f4f8c0e25e2070bfebfb28826ae29a28ebaaa7
ktakashi/sagittarius-scheme
keys.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; ;;; sagittarius/crypto/keys.scm - Key ;;; Copyright ( c ) 2022 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1. Redistrib...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/be6f19788f67251b5bc154034591a0d60c52098c/ext/crypto/sagittarius/crypto/keys.scm
scheme
coding : utf-8 ; -*- sagittarius/crypto/keys.scm - Key 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 con...
Copyright ( c ) 2022 < > " 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 #!nounbound (library (sagittarius crypto keys) ...
1f04c4449a0dc005fb9db35c34ff8b6c9fcc3cc238debbaa29f5cce1b710e5f0
hargettp/hh-web
html.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/html.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...
9770affa133e08e1cca409e260480d8ea7b3ddb6d3cddaad4e388b512accdd3d
lemenkov/erlrtpproxy
rtpproxy_ctl.erl
%%%---------------------------------------------------------------------- %%% %%% This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the %%% License, or (at your option) any late...
null
https://raw.githubusercontent.com/lemenkov/erlrtpproxy/47b0bb92f6cf9dbc012ea6f1bb757d07ea06734d/src/rtpproxy_ctl.erl
erlang
---------------------------------------------------------------------- This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCH...
modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the You should have received a copy of the GNU General Public License Foundation , Inc. , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA -module(rtpproxy_ctl). -author(''...
309ebcecd2b97c0a37c3a02eb533f5626daeddd7ebbdee72ca07fbc7891596ce
erlang/otp
diameter_event_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2013 - 2022 . 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/erlang/otp/66dd3c397b5dd68cb087a1a830f25c62c5d1d2ad/lib/diameter/test/diameter_event_SUITE.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 2013 - 2022 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , Tests of events sent as a consequence of diameter : . -module(diameter_event_SUITE). -export([run/0]). -export...
cc9fb40dea029c5df657948999a0012328a2bd65461a067c1f61a24abe86b610
stumpwm/stumpwm-contrib
notifications.lisp
notifications.lisp -- Poor man 's systray for StumpWM (in-package #:notifications) Copyright 2008 < > ;; ;; Maintainer: ;; ;;; Code: (add-screen-mode-line-formatter #\N 'notifications-as-string) (defparameter *notifications-delimiters* '("[" "]")) (defvar notifications nil "A list of notification strings."...
null
https://raw.githubusercontent.com/stumpwm/stumpwm-contrib/a7dc1c663d04e6c73a4772c8a6ad56a34381096a/minor-mode/notifications/notifications.lisp
lisp
Maintainer: Code: End:
notifications.lisp -- Poor man 's systray for StumpWM (in-package #:notifications) Copyright 2008 < > (add-screen-mode-line-formatter #\N 'notifications-as-string) (defparameter *notifications-delimiters* '("[" "]")) (defvar notifications nil "A list of notification strings.") (defcommand notifications-add...
6dcce2224de2659fdd3c7e213337f5451e56ecda0d4ef55f64289fa0b37c4672
litxio/ptghci
Escape.hs
# LANGUAGE PatternGuards # Copyright 2014 - 2018 . -- 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 -- ...
null
https://raw.githubusercontent.com/litxio/ptghci/bbb3c5fdf2e73a557864b6b1e26833fffb34fc84/src/Language/Haskell/Ghcid/Escape.hs
haskell
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. * ...
# LANGUAGE PatternGuards # Copyright 2014 - 2018 . * Neither the name of nor the names of other " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , P...
0f6306d743fd1fd2711e252ffe3d8388482b0f3e5f613da2bd85fcc1a03604d3
fluentpython/lispy
chap9c.scm
$ I d : chap9c.scm , v 4.6 2006/11/27 queinnec Exp $ ;;;(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) ;;; This file is part of the files that accompany the book: LISP Implantation Semantique Programmation ( InterEditions , France ) By Christian Queinnec < > ;;; Newest version ma...
null
https://raw.githubusercontent.com/fluentpython/lispy/6b995c398e2d100fc3fc292e34ba1a00c0ae9b5a/references/LiSP-2ndEdition-2006Dec11/src/chap9c.scm
scheme
(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) This file is part of the files that accompany the book: Newest version may be retrieved from: Check the README file before using this file. (((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) Variables are not Programs! ...
$ I d : chap9c.scm , v 4.6 2006/11/27 queinnec Exp $ LISP Implantation Semantique Programmation ( InterEditions , France ) By Christian Queinnec < > ( IP 128.93.2.54 ) ftp.inria.fr : INRIA / Projects / icsla / Books / LiSP*.tar.gz A low - level macro system offering hygien . (define-class Variable...
0826b53f0900e43c514c0d0b5bb10389dd971ab8cc7488c158988e914b715aad
fragnix/fragnix
Data.Monoid.hs
{-# LINE 1 "Data.Monoid.hs" #-} # LANGUAGE Trustworthy # # LANGUAGE NoImplicitPrelude # # LANGUAGE DeriveGeneric # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # ----------------------------------------------------------------------------- -- | -- Module : Data.Mo...
null
https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/builtins/base/Data.Monoid.hs
haskell
# LINE 1 "Data.Monoid.hs" # --------------------------------------------------------------------------- | Module : Data.Monoid License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : experimental Portability : portable A class for monoids (types with an associative ...
# LANGUAGE Trustworthy # # LANGUAGE NoImplicitPrelude # # LANGUAGE DeriveGeneric # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # Copyright : ( c ) 2001 , ( c ) Oregon Graduate Institute of Science and Technology , 2001 module Data.Monoid ( ...
9fbec8aed28b70c6ef124107fcbe7e43585f885807596c77260f81b152468bd1
lsrcz/mini-prover
NameBounding.hs
# LANGUAGE LambdaCase # module MiniProver.Core.NameBounding ( NameBoundStatus(..) , checkAllNameBounded , checkAllNameBoundedCommand , combineNameBoundStatus ) where import MiniProver.Core.Syntax import MiniProver.Core.Context import MiniProver.PrettyPrint.PrettyPrint import Data.List (group, sort, concatM...
null
https://raw.githubusercontent.com/lsrcz/mini-prover/0aa4cdf3b495ddf6707f27dcbee810d519b43177/src/MiniProver/Core/NameBounding.hs
haskell
# LANGUAGE LambdaCase # module MiniProver.Core.NameBounding ( NameBoundStatus(..) , checkAllNameBounded , checkAllNameBoundedCommand , combineNameBoundStatus ) where import MiniProver.Core.Syntax import MiniProver.Core.Context import MiniProver.PrettyPrint.PrettyPrint import Data.List (group, sort, concatM...
1379da16b2cfdf70c031fa461d81730f5b89be65b6831099fd0c21188412a254
ocamllabs/ocaml-modular-implicits
main.ml
(* PR#6435 *) module F (M : sig type t module Set : Set.S with type elt = t end) = struct let test set = Printf.printf "%d\n" (M.Set.cardinal set) end module M = F (Offset) let () = M.test (Offset.M.Set.singleton "42")
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/basic-modules/main.ml
ocaml
PR#6435
module F (M : sig type t module Set : Set.S with type elt = t end) = struct let test set = Printf.printf "%d\n" (M.Set.cardinal set) end module M = F (Offset) let () = M.test (Offset.M.Set.singleton "42")
95be3a5a7a0c01f74caa79d9f2ed1ebb57a2b9980751349ef875c2ff5410422a
PDP-10/panda
loadup.lisp
((PRELOADUP (SETQQ COMPILE.EXT COM) (LOADUPROFILE (COND ((EQ (EVALV ( QUOTE BYTELISPFLG)) T) (QUOTE (BOOTSTRAP MAXCCODEFORMAT BASIC MISC MAXCSWAP ASSEMBLE LOADUP MACHINEDEPENDENT MACHINEINDEPENDENT DATATYPE))) (T (QUOTE (BOOTSTRAP CODEFORMAT BASIC MISC SWAP ASSEMBLE LOADUP MACHINEDEPENDENT MACHINEINDEPENDENT DAT...
null
https://raw.githubusercontent.com/PDP-10/panda/522301975c062914ea3d630a1daefde261ddf590/files/lisp/loadup.lisp
lisp
((PRELOADUP (SETQQ COMPILE.EXT COM) (LOADUPROFILE (COND ((EQ (EVALV ( QUOTE BYTELISPFLG)) T) (QUOTE (BOOTSTRAP MAXCCODEFORMAT BASIC MISC MAXCSWAP ASSEMBLE LOADUP MACHINEDEPENDENT MACHINEINDEPENDENT DATATYPE))) (T (QUOTE (BOOTSTRAP CODEFORMAT BASIC MISC SWAP ASSEMBLE LOADUP MACHINEDEPENDENT MACHINEINDEPENDENT DAT...
12be747a6907cd31e64360588b2a24d9c24b5d9fbce95ea6cc9916861b613c2f
Javran/advent-of-code
Day5.hs
module Javran.AdventOfCode.Y2021.Day5 ( ) where import qualified Data.Map.Strict as M import Javran.AdventOfCode.Prelude import Text.ParserCombinators.ReadP hiding (many) data Day5 deriving (Generic) type Coord = (Int, Int) type Line = (Coord, Coord) coordP :: ReadP Coord coordP = (,) <$> decimal1P <*> (char ','...
null
https://raw.githubusercontent.com/Javran/advent-of-code/676ef13c2f9d341cf7de0f383335a1cf577bd73d/src/Javran/AdventOfCode/Y2021/Day5.hs
haskell
module Javran.AdventOfCode.Y2021.Day5 ( ) where import qualified Data.Map.Strict as M import Javran.AdventOfCode.Prelude import Text.ParserCombinators.ReadP hiding (many) data Day5 deriving (Generic) type Coord = (Int, Int) type Line = (Coord, Coord) coordP :: ReadP Coord coordP = (,) <$> decimal1P <*> (char ','...
5354409a6201c68edb0c751e3c1bf1ffc7d6190fabe17c33c80ed553097aa04c
madgen/exalog
EDB.hs
# LANGUAGE DataKinds # module Fixture.Ancestor.EDB ( initEDB , finalEDB , ancAncKnowledge , parKnowledge , parAncKnowledge , finalLinearProvEDB , finalNonLinearProvEDB ) where import Protolude hiding (Set, head) import Data.Maybe (fromJust) import qualified Data.Vector.Sized as V import qua...
null
https://raw.githubusercontent.com/madgen/exalog/7d169b066c5c08f2b8e44f5e078df264731ac177/fixtures/Fixture/Ancestor/EDB.hs
haskell
anc(X,Y) :- par(X,Y).
# LANGUAGE DataKinds # module Fixture.Ancestor.EDB ( initEDB , finalEDB , ancAncKnowledge , parKnowledge , parAncKnowledge , finalLinearProvEDB , finalNonLinearProvEDB ) where import Protolude hiding (Set, head) import Data.Maybe (fromJust) import qualified Data.Vector.Sized as V import qua...
378263aa63c0396e454887dbb7f754469148dd065a49c96fbfe755fccd4fda01
haskell-mafia/tinfoil
KDF.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module Test.IO.Tinfoil.KDF where import Disorder.Core.IO (testIO, withCPUTime) import Disorder.Core.UniquePair (UniquePair(..)) import P import System.IO import Test.Q...
null
https://raw.githubusercontent.com/haskell-mafia/tinfoil/f46b2ea0b9984ac9a97073932b5584ce0a2e0554/test/Test/IO/Tinfoil/KDF.hs
haskell
# LANGUAGE OverloadedStrings # Results shouldn't vary before/after param updates. Run twice and check the times to make sure we're not memoizing the result.
# LANGUAGE NoImplicitPrelude # # LANGUAGE TemplateHaskell # module Test.IO.Tinfoil.KDF where import Disorder.Core.IO (testIO, withCPUTime) import Disorder.Core.UniquePair (UniquePair(..)) import P import System.IO import Test.QuickCheck import Test.Qui...
8fd7fc53a2ed3b88923d364df03361dd637f6b2e804eb2a20282e2542f962581
returntocorp/semgrep
test_parsing_ml.mli
Print the set of tokens in a .ml file val test_tokens_ml : Common.filename -> unit This makes accessible the different test_xxx functions above from * the command line , e.g. ' -parse_ml foo.ml will call the * test_parse_ml function . * the command line, e.g. '$ pfff -parse_ml foo.ml will call the * t...
null
https://raw.githubusercontent.com/returntocorp/semgrep/00f1e67bbb80f00e29db3381288fc00398b6868a/languages/ocaml/menhir/test_parsing_ml.mli
ocaml
Print the set of tokens in a .ml file val test_tokens_ml : Common.filename -> unit This makes accessible the different test_xxx functions above from * the command line , e.g. ' -parse_ml foo.ml will call the * test_parse_ml function . * the command line, e.g. '$ pfff -parse_ml foo.ml will call the * t...
9e6862d37a650f99ae8d28edba20a865d0d3890ad8177019a0b68bbe71321704
tomferon/eventsourcing
Migration.hs
{-# LANGUAGE FlexibleContexts #-} # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Database.CQRS.PostgreSQL.Migration ( migrate , lockTable , swapTables , lockTableNoTransacti...
null
https://raw.githubusercontent.com/tomferon/eventsourcing/58e7bc21944436ff78689e2b705d600ca8d4fa24/eventsourcing-postgresql/src/Database/CQRS/PostgreSQL/Migration.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE OverloadedStrings # # LANGUAGE RecordWildCards # | Migrate a stream family stored in a PostgreSQL database to the same database. It is meant to run in parallel with the application using the stream family without disturbing it. An alternative use of this is to migr...
# LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Database.CQRS.PostgreSQL.Migration ( migrate , lockTable , swapTables , lockTableNoTransaction , swapTablesNoTransaction ) where import Control.Exception import Control.Monad (forever, ...
ea3ced92abec81b15ec4f3d6649d201b774c9447bd6db4a658fb33073be82a9d
binaryage/chromex
app.clj
(ns chromex.ext.app " * available since Chrome 36 * " (:refer-clojure :only [defmacro defn apply declare meta let partial]) (:require [chromex.wrapgen :refer [gen-wrap-helper]] [chromex.callgen :refer [gen-call-helper gen-tap-all-events-call]])) (declare api-table) (declare gen-call) -- fun...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts/chromex/ext/app.clj
clojure
-- convenience ------------------------------------------------------------------------------------------------------------ --------------------------------------------------------------------------------------------------------------------------- -- API TABLE --------------------------------------------------------...
(ns chromex.ext.app " * available since Chrome 36 * " (:refer-clojure :only [defmacro defn apply declare meta let partial]) (:require [chromex.wrapgen :refer [gen-wrap-helper]] [chromex.callgen :refer [gen-call-helper gen-tap-all-events-call]])) (declare api-table) (declare gen-call) -- fun...
16e9ba4d3d2c0fa0603f4018cb967d9e23b97973b11dc3ee9995ccfa745363cf
ogaml/ogaml
GL.mli
* Provides unsafe access to the internal openGL state . * * All functions in this module modify the GL state * without further verification . * * Any call to one of these functions should be followed * by an update of the current window 's Context.t * * NOTE : For internal use onl...
null
https://raw.githubusercontent.com/ogaml/ogaml/5e74597521abf7ba2833a9247e55780eabfbab78/src/graphics/backend/GL.mli
ocaml
* Type of floats stored in data * Type of ints stored in data * Type of data using caml type 'a and storing type 'b * Clears some data * Creates some data, the integer must be the expected size * Creates some data, the integer must be the expected size * Adds a vector3f to the data * Adds a color to the data * ...
* Provides unsafe access to the internal openGL state . * * All functions in this module modify the GL state * without further verification . * * Any call to one of these functions should be followed * by an update of the current window 's Context.t * * NOTE : For internal use onl...
697fdb49b44fb664fd43f8e24a2ff1dd75a782184ec4fe0c8d6e63b5dd057b17
dterei/SafeHaskellExamples
UntrustedPlug.hs
# LANGUAGE FlexibleInstances # # OPTIONS_GHC -fwarn - unsafe # module UntrustedPlug where import TrustedLib instance {-# OVERLAPS #-} Pos [Int] where { res _ = 2 }
null
https://raw.githubusercontent.com/dterei/SafeHaskellExamples/0f7bbb53cf1cbb8419ce3a4aa4258b84be30ffcc/overlapping1/UntrustedPlug.hs
haskell
# OVERLAPS #
# LANGUAGE FlexibleInstances # # OPTIONS_GHC -fwarn - unsafe # module UntrustedPlug where import TrustedLib instance Pos [Int] where { res _ = 2 }
4345d9ab651396581bd541bdaa0b8dc6ba6f911d6d312dceedd0336b43c1f450
nikita-volkov/rebase
BufferedIO.hs
module Rebase.GHC.IO.BufferedIO ( module GHC.IO.BufferedIO ) where import GHC.IO.BufferedIO
null
https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/GHC/IO/BufferedIO.hs
haskell
module Rebase.GHC.IO.BufferedIO ( module GHC.IO.BufferedIO ) where import GHC.IO.BufferedIO
28c945738fb8fc9e774fdab069b0300f60dd26f8b607718c9020d7ac0557d646
sacerdot/ocaml-http
http_user_agent.mli
OCaml HTTP - do it yourself ( fully OCaml ) HTTP daemon Copyright ( C ) < 2002 - 2005 > < > This program is free software ; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation , version 2 . This pr...
null
https://raw.githubusercontent.com/sacerdot/ocaml-http/c13be78ad0fa4b2427feaf3777e20be4863115b9/http_user_agent.mli
ocaml
code, body * as above but iter callback function on HTTP response's body instead of * returning it as a string
OCaml HTTP - do it yourself ( fully OCaml ) HTTP daemon Copyright ( C ) < 2002 - 2005 > < > This program is free software ; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation , version 2 . This pr...
5b506dd3d0659fa90c0b6e8b74ab90fed8984dfd7b4dd04bb1526b72acc20eb4
MondayMorningHaskell/Monads
LawsComplete.hs
module LawsComplete where import qualified Data.Map as M import Test.QuickCheck Functor Laws class Functor f where fmap : : ( a - > b ) - > f a - > f b -- Identity Law fmap i d = i d -- Composition Law fmap ( g . f ) = . fmap f class Functor f where fmap :: (a -> b) -> f a -> f b -- Identi...
null
https://raw.githubusercontent.com/MondayMorningHaskell/Monads/41bda26e0199c1c0734bd2c8c45f33b880ac3122/src/LawsComplete.hs
haskell
Identity Law Composition Law Identity Law Composition Law Identity Law Interchange Law Composition Law Identity Law Homomorphism Law Interchange Law Composition Law Identity Laws Composition Law Identity Laws Composition Law An invalid functor instance! This isn't right! TODO: Fix the funct...
module LawsComplete where import qualified Data.Map as M import Test.QuickCheck Functor Laws class Functor f where fmap : : ( a - > b ) - > f a - > f b fmap i d = i d fmap ( g . f ) = . fmap f class Functor f where fmap :: (a -> b) -> f a -> f b fmap id = id fmap (g . f) = fmap g . fmap f -}...
ada2cd539dff5b0e283e92fa45959d204497a5392bb271d722c7ac1ce0873395
larcenists/larceny
sortfaster.scm
SRFI 132 specifies these eight procedures . ;;; ;;; Benchmarking has shown that the (rnrs sorting) procedures are faster than the sorting procedures defined by SRFI 132 's ;;; reference implementation, so the R6RS procedures are used here. ;;; ;;; This file is a plug-and-play alternative to sort.scm in the ;;; same...
null
https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/lib/SRFI/srfi/132/sortfaster.scm
scheme
Benchmarking has shown that the (rnrs sorting) procedures reference implementation, so the R6RS procedures are used here. This file is a plug-and-play alternative to sort.scm in the same directory. The R6RS procedures are now imported without renaming. To make that work, the R6RS vector-sort and vector-sort! p...
SRFI 132 specifies these eight procedures . are faster than the sorting procedures defined by SRFI 132 's (define list-sort! list-sort) (define list-stable-sort list-sort) (define list-stable-sort! list-sort) (define (vector-sort < v . rest) (cond ((null? rest) (r6rs-vector-sort < v)) ...
170ac7d4f821ada765d15b5604e12ebf3bfd638f9a72160de8488c9d1fed8ee0
docopt/docopt.hs
ApplicativeParsec.hs
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} {-# OPTIONS_HADDOCK hide #-} module System.Console.Docopt.ApplicativeParsec ( module Control.Applicative , module Text.ParserCombinators.Parsec ) where import Control.Applicative hiding (optional, (<|>)) import Text.ParserCombinators.Parsec hi...
null
https://raw.githubusercontent.com/docopt/docopt.hs/a099173860a40cfa371752160ff32dafa957f958/System/Console/Docopt/ApplicativeParsec.hs
haskell
# LANGUAGE TypeSynonymInstances, FlexibleInstances # # OPTIONS_HADDOCK hide #
module System.Console.Docopt.ApplicativeParsec ( module Control.Applicative , module Text.ParserCombinators.Parsec ) where import Control.Applicative hiding (optional, (<|>)) import Text.ParserCombinators.Parsec hiding (many)
4b4197b6eebe5b455b905026031f27d93ab93a65ef66d777fcccf2e8cb320aca
informatimago/lisp
mxarc.lisp
-*- mode : lisp;coding : utf-8 -*- ;;;;************************************************************************** FILE : mxarc.lisp ;;;;LANGUAGE: Common-Lisp ;;;;SYSTEM: Common-Lisp USER - INTERFACE : ;;;;DESCRIPTION ;;;; ;;;; Tool to extract multics archives. ;;;; ...
null
https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/multics/mxarc.lisp
lisp
coding : utf-8 -*- ************************************************************************** LANGUAGE: Common-Lisp SYSTEM: Common-Lisp DESCRIPTION Tool to extract multics archives. LEGAL This program is free software: you can redistribute it and/or modify (at your option) any late...
FILE : mxarc.lisp USER - INTERFACE : < PJB > < > MODIFICATIONS 2015 - 03 - 28 < PJB > Created . AGPL3 Copyright 2015 - 2016 it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the Licen...
8ca03cf2306af96f98a5c7f6e408866b12b0b1163b8606e9d10e3d25b31aa14a
mdedwards/slippery-chicken
ensemble-examples.lsp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; File: ensemble-examples.lsp ;;; Class Hierarchy : None ;;; Version : 1.0 ;;; ;;; Project: slippery chicken (algorithmic composition) ;;; ;;; Purpose: Lisp-code examples to accompany ensemble...
null
https://raw.githubusercontent.com/mdedwards/slippery-chicken/c1c11fadcdb40cd869d5b29091ba5e53c5270e04/doc/examples/ensemble-examples.lsp
lisp
File: ensemble-examples.lsp Project: slippery chicken (algorithmic composition) Purpose: Lisp-code examples to accompany ensemble.html Creation date: 13th July 2012 **** This file is part of slippery-chicken slippery-chicken is free...
Class Hierarchy : None Version : 1.0 Author : $ $ Last modified : 22:42:02 Fri May 17 2013 BST SVN ID : $ I d : ensemble-examples.lsp 3538 2013 - 05 - 18 08:29:15Z medward2 $ Licence : Copyright ( c ) 2012 Public License as published by the Free Softw...
23bbdc8e45b947b84af184d958ad84413881fd5598ded432f84162d52cd198be
dinosaure/art
part_lwt.ml
open Part
null
https://raw.githubusercontent.com/dinosaure/art/40af4c34a2e2ec9632cb73a74ac2ec0fd7f62a81/lib/part_lwt.ml
ocaml
open Part
82f590838bb6f8a004a9852189199b74b9a8acae637ce742f685505d83b5776d
avatar29A/hs-aitubots-api
Image.hs
{-# LANGUAGE OverloadedStrings #-} module Aitu.Bot.Types.Image (Image (..)) where import Data.Aeson import Data.Text import Data.UUID.Types -- Image represents metadata on a image -- doc: -api-contract/image.html data Image = Image { imageType :: Text , imageFileId :: UUID , imageMimeType :: Text , i...
null
https://raw.githubusercontent.com/avatar29A/hs-aitubots-api/9cc3fd1e4e9e81491628741a6bbb68afbb85704e/src/Aitu/Bot/Types/Image.hs
haskell
# LANGUAGE OverloadedStrings # Image represents metadata on a image doc: -api-contract/image.html
module Aitu.Bot.Types.Image (Image (..)) where import Data.Aeson import Data.Text import Data.UUID.Types data Image = Image { imageType :: Text , imageFileId :: UUID , imageMimeType :: Text , imageName :: Text , imageSize :: Int , imageWidth :: Int , imageHeight :: Int } deriving (Show) ...
5e54db154910d99ec0d0f61dd1bfccdfeac27eb36f73b46a1edf9870bf616b6d
janestreet/bonsai
main.ml
open! Core open! Bonsai_web open Bonsai.Let_syntax let component = let%sub height, increase_height = Bonsai.state_machine0 (module Int) (module Unit) ~default_model:0 ~apply_action:(fun ~inject:_ ~schedule_event:_ old_model () -> old_model + 10) in let%sub append_effect = let%arr ...
null
https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/examples/inline_css_private_appending/main.ml
ocaml
open! Core open! Bonsai_web open Bonsai.Let_syntax let component = let%sub height, increase_height = Bonsai.state_machine0 (module Int) (module Unit) ~default_model:0 ~apply_action:(fun ~inject:_ ~schedule_event:_ old_model () -> old_model + 10) in let%sub append_effect = let%arr ...
58aadeb6379f84c6c3449b272cc6f796ebe9226dc1a56f09da9e2c52571eeeea
thi-ng/demos
project.clj
(defproject ws-ldn-11-ex05 "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/clojurescript "1.8.51"] [thi.ng/strf "0.2.2"] [reagent "0.5.1"]] :plugins [[lein-figwheel "0.5.4-3"] ...
null
https://raw.githubusercontent.com/thi-ng/demos/048cd131099a7db29be56b965c053908acad4166/ws-ldn-11/day2/ex05/project.clj
clojure
:depends-on #{}
(defproject ws-ldn-11-ex05 "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/clojurescript "1.8.51"] [thi.ng/strf "0.2.2"] [reagent "0.5.1"]] :plugins [[lein-figwheel "0.5.4-3"] ...
203774e4a40e2a282ec68f52f7a4c2303bc78d75b827fb63e1cbff9bfbeb41cb
links-lang/links
lens_set.ml
module type OrderedShow = sig type t [@@deriving show] include Set.OrderedType with type t := t end module Seq = Lens_seq module type S = Lens_set_intf.S module Make (Ord : OrderedShow) = struct include Set.Make ((Ord : OrderedShow)) let of_seq s = Seq.fold_left (fun set v -> add v set) empty s let to_s...
null
https://raw.githubusercontent.com/links-lang/links/2923893c80677b67cacc6747a25b5bcd65c4c2b6/lens/lens_set.ml
ocaml
module type OrderedShow = sig type t [@@deriving show] include Set.OrderedType with type t := t end module Seq = Lens_seq module type S = Lens_set_intf.S module Make (Ord : OrderedShow) = struct include Set.Make ((Ord : OrderedShow)) let of_seq s = Seq.fold_left (fun set v -> add v set) empty s let to_s...
a1206882842ef85c2786769e12f63b2e0b6ac839b096509069894a2c5dabd8a8
DavidAlphaFox/RabbitMQ
rabbit_web_dispatch_sup.erl
The contents of this file are subject to the Mozilla Public License %% Version 1.1 (the "License"); you may not use this file except in %% compliance with the License. You may obtain a copy of the License %% at / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WARRANTY OF ...
null
https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-web-dispatch/src/rabbit_web_dispatch_sup.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. External export...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is GoPivotal , Inc. Copyright ( c ) 2010 - 2014 GoPivotal , Inc. All rights reserved . -module...
14ea20ad8ffb2904f06986a0013b5c48763b44670110f7d679f5ef38fee90a35
haskell-distributed/network-transport-tcp
JustPingThroughMVar.hs
# LANGUAGE CPP , BangPatterns # module Main where import Control.Monad import Data.Int import Network.Socket ( AddrInfo, AddrInfoFlag (AI_PASSIVE), HostName, ServiceName, Socket , SocketType (Stream), SocketOption (ReuseAddr) , accept, addrAddress, addrFlags, addrFamily, bindSocket, defaultProtocol , default...
null
https://raw.githubusercontent.com/haskell-distributed/network-transport-tcp/2cb34ba7102cfa68ec86b562a96b07c1a64016f3/benchmarks/JustPingThroughMVar.hs
haskell
Start the server Set up multiplexing channel Wait for incoming connections (pings from the client) Reply to the client Start the client Wait for the client to finish putStrLn $ "client received " ++ unpack bs | Receive a package | Send a package | Encode length (manual for now) | Decode length (manual for no...
# LANGUAGE CPP , BangPatterns # module Main where import Control.Monad import Data.Int import Network.Socket ( AddrInfo, AddrInfoFlag (AI_PASSIVE), HostName, ServiceName, Socket , SocketType (Stream), SocketOption (ReuseAddr) , accept, addrAddress, addrFlags, addrFamily, bindSocket, defaultProtocol , default...
782c96e2c701d644dfdd3817c72518e71fafa2157efcb392defe9f8f9ec9d800
ananthakumaran/eopl
implicit_ref_lang.clj
(ns eopl.core.implicit-ref-lang (:use eopl.core.define-datatype) (:use eopl.core.env) (:use eopl.core.implicit-ref-lang-parser) ;; (:use eopl.core.link-ref) (:use eopl.core.vector-ref) (:use clojure.set) (:use clojure.test) (:use eopl.core.feature)) (defn expval->num [val] (cases expval val (num...
null
https://raw.githubusercontent.com/ananthakumaran/eopl/876d6c2e44865e2c89a05a683d99a289c71f1487/src/eopl/core/implicit_ref_lang.clj
clojure
(:use eopl.core.link-ref) tests
(ns eopl.core.implicit-ref-lang (:use eopl.core.define-datatype) (:use eopl.core.env) (:use eopl.core.implicit-ref-lang-parser) (:use eopl.core.vector-ref) (:use clojure.set) (:use clojure.test) (:use eopl.core.feature)) (defn expval->num [val] (cases expval val (num-val (num) num) (else (throw...