_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
765f42028d2fe1bd6f88701dccb407a5590abe6dd7888f15cd433f9c583b49e9
input-output-hk/plutus-apps
Tx.hs
module Plutus.Script.Utils.V2.Tx ( scriptTxOut ) where import Plutus.Script.Utils.V2.Address (mkValidatorAddress) import Plutus.Script.Utils.V2.Scripts (scriptHash) import Plutus.V2.Ledger.Api (OutputDatum, TxOut (TxOut), Validator, Value, unValidatorScript) type HasReferenceScript = Bool -- | Create a trans...
null
https://raw.githubusercontent.com/input-output-hk/plutus-apps/5ff40dafcdb07483442093efb4eaa39d12f34880/plutus-script-utils/src/Plutus/Script/Utils/V2/Tx.hs
haskell
| Create a transaction output locked by a validator script and attach the given data script.
module Plutus.Script.Utils.V2.Tx ( scriptTxOut ) where import Plutus.Script.Utils.V2.Address (mkValidatorAddress) import Plutus.Script.Utils.V2.Scripts (scriptHash) import Plutus.V2.Ledger.Api (OutputDatum, TxOut (TxOut), Validator, Value, unValidatorScript) type HasReferenceScript = Bool scriptTxOut :: Vali...
e82052ef79bdbe26a08ae1bd84f6e2af0896284e6714033f97edac96d8b10572
harpocrates/language-rust
CompleteTest.hs
# LANGUAGE ScopedTypeVariables # module CompleteTest (completeSuite) where import Test.Framework (testGroup, Test) import Test.Framework.Providers.HUnit import Test.HUnit hiding (Test) import Language.Rust.Syntax (SourceFile) import Language.Rust.Parser (parse, Span, inputStreamFromString, ParseFail(..)) import Langu...
null
https://raw.githubusercontent.com/harpocrates/language-rust/9d509c450d009cc99f1180b3f2f30247dfb1cfce/test/unit-tests/CompleteTest.hs
haskell
| | See <-lang-nursery/fmt-rfcs/issues/29> See <-lang-nursery/fmt-rfcs/issues/38> The '-> ret_ty' should never be on a line of its own - split the args instead. See <-lang-nursery/fmt-rfcs/issues/77> See <-lang-nursery/fmt-rfcs/issues/32> Pretty print it Assert th...
# LANGUAGE ScopedTypeVariables # module CompleteTest (completeSuite) where import Test.Framework (testGroup, Test) import Test.Framework.Providers.HUnit import Test.HUnit hiding (Test) import Language.Rust.Syntax (SourceFile) import Language.Rust.Parser (parse, Span, inputStreamFromString, ParseFail(..)) import Langu...
d0041f455fb66ce19f49d72c229fd43eff059899f695478bf968f906c88e5774
avsm/mirage-ci
mirageCI.ml
--------------------------------------------------------------------------- Copyright ( c ) 2016 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) 2...
null
https://raw.githubusercontent.com/avsm/mirage-ci/a11ecf203976299fa19337fd9e1794d6ca3fa436/src-bin/mirageCI.ml
ocaml
Command-line parsing
--------------------------------------------------------------------------- Copyright ( c ) 2016 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) 2...
65fc26bb57a19ed0fefb8c66a06732840e0be42a2c48ec57c38095e30ae69dad
csgordon/cayenne
SCC.hs
module SCC(scc, sccEq) where -- Compute strongly connected components. -- The graph is represented as a list of (node, neighbour list) pairs. -- A list of list of nodes is returned, each connected. Original code by . {-import List(partition)-} type Node v = (v, [v]) type Edge v = (v, v) scc :: (Eq node) => [Node ...
null
https://raw.githubusercontent.com/csgordon/cayenne/7fdf59b5e21124b5caa9f776199a30cd0e5d88b2/SCC.hs
haskell
Compute strongly connected components. The graph is represented as a list of (node, neighbour list) pairs. A list of list of nodes is returned, each connected. import List(partition) new elem using eq!
module SCC(scc, sccEq) where Original code by . type Node v = (v, [v]) type Edge v = (v, v) scc :: (Eq node) => [Node node] -> [[node]] scc ns = sccEq (==) ns sccEq :: (node->node->Bool) -> [Node node] -> [[node]] sccEq (===) ns = sccEdgeEq (===) [(x,y) | (x, ys) <- ns, y<-ys] (map fst ns) sccEdgeEq :: (node->...
81be7eab8d776cbdc33e474c590a50427fabb03987f35c04a36ab5710d52cdaf
otakup0pe/magicbeam
magicbeam_app.erl
@private -module(magicbeam_app). -author(''). -export([start/2, stop/1, rpc_start/1, rpc_stop/0]). -include("magicbeam.hrl"). -record(state, {ssh}). rpc_start(AppSpec) -> ok = application:load(AppSpec), case magicbeam_util:start_deps() of ok -> ok = application:start(magicbeam); {error, _} ...
null
https://raw.githubusercontent.com/otakup0pe/magicbeam/e8907b0c3ed1afa96c4e635e4f6b345aacdb88ee/src/magicbeam_app.erl
erlang
@private -module(magicbeam_app). -author(''). -export([start/2, stop/1, rpc_start/1, rpc_stop/0]). -include("magicbeam.hrl"). -record(state, {ssh}). rpc_start(AppSpec) -> ok = application:load(AppSpec), case magicbeam_util:start_deps() of ok -> ok = application:start(magicbeam); {error, _} ...
00599703cf35fb67b6ead958a6499e56827315b096d5b18e3798fd00f8cb026c
schemeorg-community/index.scheme.org
index.scm
(((code . "r5rs") (name . "R5RS") (file . "filters/r5rs.scm")) ((code . "r6rs") (name . "R6RS") (file . "filters/r6rs.scm")) ((code . "r6rs_all") (name . "R6RS + SRFIs") (file . "filters/r6rs-portable.scm")) ((code . "r7rs_small") (name . "R7RS small") (file . "filters/r7rs-small.scm...
null
https://raw.githubusercontent.com/schemeorg-community/index.scheme.org/32e1afcfe423a158ac8ce014f5c0b8399d12a1ea/filters/index.scm
scheme
(((code . "r5rs") (name . "R5RS") (file . "filters/r5rs.scm")) ((code . "r6rs") (name . "R6RS") (file . "filters/r6rs.scm")) ((code . "r6rs_all") (name . "R6RS + SRFIs") (file . "filters/r6rs-portable.scm")) ((code . "r7rs_small") (name . "R7RS small") (file . "filters/r7rs-small.scm...
006be09b125e3d4c9e18c4740e5a7d89c621874a9e97cc9c730c8a2f45f1c6a7
fredlund/McErlang
mce_mon_sane.erl
Copyright ( c ) 2009 , %% 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 a...
null
https://raw.githubusercontent.com/fredlund/McErlang/25b38a38a729fdb3c3d2afb9be016bbb14237792/monitors/src/mce_mon_sane.erl
erlang
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. %% Redi...
Copyright ( c ) 2009 , IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR @author 2006 - 2009 @private -module(mce_mon_sane). -export([init/1,stateChange/3,monitorType/0]). -include("state.hrl...
f2343c6ffe1e15d215c30ca26c3a4c1e8b0584456014634fbae846604610c861
ocaml-ppx/ppx
version.mli
open! Base type t = Astlib.Version.t [@@deriving compare, equal, hash, sexp_of]
null
https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/astlib/base/version.mli
ocaml
open! Base type t = Astlib.Version.t [@@deriving compare, equal, hash, sexp_of]
a853dc88ef6a9625d135863087fb21048eec78435e793351d0a38fc81cfc8f42
S8A/htdp-exercises
ex420.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex420) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex420.rkt
racket
about the language level of this file in a form that our tools can easily process. N -> [List-of Number] [List-of Number] -> Number Sums the numbers in the given list than from right to left: > (sum (oscillate #i1000.0)) > (sum (reverse (oscillate #i1000.0))) Again, the difference may appear to be small until w...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex420) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define (oscillate n) (local ((define (O i) ...
442d521b32277938d809c0dc9061f31495f6992ea33a70f5ec9caa23cfdabfa9
racket/web-server
static.rkt
#lang racket/base (require web-server/servlet-dispatch racket/runtime-path web-server/dispatchers/dispatch-files) (define-runtime-path static-path "static.txt") (serve/launch/wait (λ (sema) (make #:url->path (λ (url) (values static-path null)))) #:launch-path #f #:banner? #f #:port 8001)
null
https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-test/tests/web-server/stress/vs-hop/static.rkt
racket
#lang racket/base (require web-server/servlet-dispatch racket/runtime-path web-server/dispatchers/dispatch-files) (define-runtime-path static-path "static.txt") (serve/launch/wait (λ (sema) (make #:url->path (λ (url) (values static-path null)))) #:launch-path #f #:banner? #f #:port 8001)
3ec7514b78b7a54039a88703eb3d107c5736ad9a1030f75198478cccef327bc0
binsec/haunted
ida_cg.ml
(**************************************************************************) This file is part of BINSEC . (* *) Copyright ( C ) 2016 - 2019 CEA ( Co...
null
https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/ida/ida_cg.ml
ocaml
************************************************************************ alternatives) you can redistribute it an...
This file is part of BINSEC . Copyright ( C ) 2016 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ve...
8fd88f8a104eb223c9a7facb3a5377ebd1d02754912f54ba17188a66e75ea351
hannesm/telnet
telnet_mirage.mli
module type SFLOW = sig type +'a io type input type output type flow type error val error_message : error -> string val read : flow -> [`Ok of input | `Eof | `Error of error ] io val write : flow -> output -> [`Ok of unit | `Eof | `Error of error ] io val writev : flow -> output list -> [`Ok of ...
null
https://raw.githubusercontent.com/hannesm/telnet/ff11a380d06161a9300aa212e6c0595026ad9920/mirage/telnet_mirage.mli
ocaml
module type SFLOW = sig type +'a io type input type output type flow type error val error_message : error -> string val read : flow -> [`Ok of input | `Eof | `Error of error ] io val write : flow -> output -> [`Ok of unit | `Eof | `Error of error ] io val writev : flow -> output list -> [`Ok of ...
9425b056ce116b47fc0bc3102f4fd1dcdb3a31b5560d4e1350f52ecf50239a17
oakes/play-clj-examples
core.clj
(ns minimal-3d-physics.core (:require [play-clj.core :refer :all] [play-clj.g3d :refer :all] [play-clj.g3d-physics :refer :all] [play-clj.math :refer :all] [play-clj.ui :refer :all])) (def ^:const mass 10) (defn get-environment [] (let [attr-type (attribute-type :...
null
https://raw.githubusercontent.com/oakes/play-clj-examples/449a505a068faeeb35d4ee4622c6a05e3fff6763/minimal-3d-physics/desktop/src-common/minimal_3d_physics/core.clj
clojure
do something with the entities that made contact
(ns minimal-3d-physics.core (:require [play-clj.core :refer :all] [play-clj.g3d :refer :all] [play-clj.g3d-physics :refer :all] [play-clj.math :refer :all] [play-clj.ui :refer :all])) (def ^:const mass 10) (defn get-environment [] (let [attr-type (attribute-type :...
2f8ece3c3f0e0e44d560d7a703f8cced9401e2d8f04d8dbba09ccd11d5b1f3e1
vyzo/gerbil
expander__rt.scm
(declare (block) (standard-bindings) (extended-bindings)) (begin (load-module "gerbil/expander/common__rt") (load-module "gerbil/expander/stx__rt") (load-module "gerbil/expander/core__rt") (load-module "gerbil/expander/top__rt") (load-module "gerbil/expander/module__rt") (load-module "gerbil/expander/compil...
null
https://raw.githubusercontent.com/vyzo/gerbil/17fbcb95a8302c0de3f88380be1a3eb6fe891b95/src/bootstrap/gerbil/expander__rt.scm
scheme
(declare (block) (standard-bindings) (extended-bindings)) (begin (load-module "gerbil/expander/common__rt") (load-module "gerbil/expander/stx__rt") (load-module "gerbil/expander/core__rt") (load-module "gerbil/expander/top__rt") (load-module "gerbil/expander/module__rt") (load-module "gerbil/expander/compil...
112ee4b24874b1c144a071813f90bf58c5f564e709ad7bce20e58183fd8f9d7b
pink-gorilla/demo-goldly
bmi.clj
(ns bmi (:require [goldly.service.core :as s])) (defn calc-bmi-server [bmi-data] (println "calc-bmi-server: " bmi-data) (let [{:keys [height weight bmi] :as data} bmi-data h (/ height 100)] (if (nil? bmi) (assoc data :bmi (int (/ weight (* h h)))) (assoc data :weight (int (* bmi h h))))))...
null
https://raw.githubusercontent.com/pink-gorilla/demo-goldly/4489764ecac483b526069e5e8fcaa9743ad06dcd/src/bmi.clj
clojure
(ns bmi (:require [goldly.service.core :as s])) (defn calc-bmi-server [bmi-data] (println "calc-bmi-server: " bmi-data) (let [{:keys [height weight bmi] :as data} bmi-data h (/ height 100)] (if (nil? bmi) (assoc data :bmi (int (/ weight (* h h)))) (assoc data :weight (int (* bmi h h))))))...
1c40f2b250e70e8aae2b1f279d114049b121982d7e4e99703713129f56b53e76
openmusic-project/OMChroma
df.lisp
;===================================================== ; CHROMA ;===================================================== part of the OMChroma library - > High - level control of sound synthesis in OM ;===================================================== ; ;This program is free software; you can redistribute it and/...
null
https://raw.githubusercontent.com/openmusic-project/OMChroma/5ded34f22b59a1a93ea7b87e182c9dbdfa95e047/sources/chroma/dg/df.lisp
lisp
===================================================== CHROMA ===================================================== ===================================================== This program is free software; you can redistribute it and/or either version 2 of the License, or (at your option) any later version. See file LIC...
part of the OMChroma library - > High - level control of sound synthesis in OM modify it under the terms of the GNU General Public License File author : -------| Version V1.0 : Jan 22 , 1990 , V2.0 , Aug 2000 -------| Rev. 3.0 , , Feb 2010 -------| By -------| Copyright 1990 IRCAM -LOOKUP FUNCTIONS T...
d1d7c838b265dd3e893777d5148c1a8089d85b64eb6762717a313cac94e12392
schemeorg-community/index.scheme.org
scheme.process-context.scm
(((name . "command-line") (signature lambda () list?) (tags pure) (desc . "Returns the command line passed to the process as a list of strings. The first string corresponds to the command name, and is implementation-dependent. It is an error to mutate any of these strings.")) ((name . "emergency-exit") (signat...
null
https://raw.githubusercontent.com/schemeorg-community/index.scheme.org/32e1afcfe423a158ac8ce014f5c0b8399d12a1ea/types/scheme.process-context.scm
scheme
(((name . "command-line") (signature lambda () list?) (tags pure) (desc . "Returns the command line passed to the process as a list of strings. The first string corresponds to the command name, and is implementation-dependent. It is an error to mutate any of these strings.")) ((name . "emergency-exit") (signat...
5b8f5bc6d2d127cfc1592b2dca75e675c70d10c6b8cd2acc93dd5442aca523dd
theodormoroianu/SecondYearCourses
Exp-5_20210115184028.hs
module Exp where import Parsing import Control.Applicative import Data.Char data Exp = Lit Int | Id String | Add Exp Exp | Sub Exp Exp | Mul Exp Exp | Div Exp Exp deriving (Eq,Show) type Env = [(String, Int)] myLookup :: String -> [(String, Int)] -> Int myLookup ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/l/.history/lab12/Exp-5_20210115184028.hs
haskell
module Exp where import Parsing import Control.Applicative import Data.Char data Exp = Lit Int | Id String | Add Exp Exp | Sub Exp Exp | Mul Exp Exp | Div Exp Exp deriving (Eq,Show) type Env = [(String, Int)] myLookup :: String -> [(String, Int)] -> Int myLookup ...
7c42065cc7513482c071d709cf01cf839bc8b88afc7522622aee4d0ec354ab4e
alanz/ghc-exactprint
T10463.hs
{-# LANGUAGE ScopedTypeVariables, PartialTypeSignatures #-} module T10463 where f (x :: _) = x ++ ""
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/T10463.hs
haskell
# LANGUAGE ScopedTypeVariables, PartialTypeSignatures #
module T10463 where f (x :: _) = x ++ ""
a899307a96c4b533b16dc836ae0b0a418d36eca924c330ed0ec12f610c754014
fukamachi/mondo
protocol.lisp
(defpackage #:mondo/swank/protocol (:use #:cl) (:shadow #:debug) (:import-from #:mondo/swank/connection #:connection #:connection-package-name #:connection-lock #:connection-socket #:connection-continuation-counter #:c...
null
https://raw.githubusercontent.com/fukamachi/mondo/a8a9d2670104836a0c1063b8fea19ff281734ec3/src/swank/protocol.lisp
lisp
(defpackage #:mondo/swank/protocol (:use #:cl) (:shadow #:debug) (:import-from #:mondo/swank/connection #:connection #:connection-package-name #:connection-lock #:connection-socket #:connection-continuation-counter #:c...
e2a42782a0da8a03ad4738128f01db44b918f2430e4a1a31d4ed51e6db06fe9c
gpetiot/Frama-C-Mutation
mut_options.ml
module Self = Plugin.Register (struct let name = "Mutation" let shortname = "mut" let help = "" end) module Enabled = Self.False (struct let option_name = "-mut" let help = "" end) (* Customization *) module Mut_Code = Self.True (struct let option_name = "-mut-code" let help = "perform mutations on...
null
https://raw.githubusercontent.com/gpetiot/Frama-C-Mutation/1a7fa546900a647ac284e2bebef6752722096ac6/mut_options.ml
ocaml
Customization Debug Keys
module Self = Plugin.Register (struct let name = "Mutation" let shortname = "mut" let help = "" end) module Enabled = Self.False (struct let option_name = "-mut" let help = "" end) module Mut_Code = Self.True (struct let option_name = "-mut-code" let help = "perform mutations on the C code" end) m...
4732654bffc7ff2d71e2048ab09d61fc99f1cf78e939dfc10fa720b12183bd77
florence/markov
main.rkt
#lang typed/racket/base (require "markov.rkt") (provide MarkovChain train-markov generate save-markov load-markov)
null
https://raw.githubusercontent.com/florence/markov/f6541f79329e8400e4070cd8f5356a743fe12db8/main.rkt
racket
#lang typed/racket/base (require "markov.rkt") (provide MarkovChain train-markov generate save-markov load-markov)
277ef5065824eb75813d199d5ca7446e389ceb359c7083e1ff7fcb693a25ba14
donut-party/datapotato
05.clj
(ns donut.datapotato-tutorial.05 "progressive construction" (:require [donut.datapotato.core :as dc])) (def potato-schema {:user {:prefix :u} :topic {:prefix :t :relations {:owner-id [:user :id]}}}) (def potato-db {:schema potato-schema}) (defn ex-01 [] (let [potato-db-1 (dc/add-ents {:...
null
https://raw.githubusercontent.com/donut-party/datapotato/6483ce30c3fcdc28f25b334e6b80b7af2eb5da2c/docs/tutorial/donut/datapotato_tutorial/05.clj
clojure
(ns donut.datapotato-tutorial.05 "progressive construction" (:require [donut.datapotato.core :as dc])) (def potato-schema {:user {:prefix :u} :topic {:prefix :t :relations {:owner-id [:user :id]}}}) (def potato-db {:schema potato-schema}) (defn ex-01 [] (let [potato-db-1 (dc/add-ents {:...
220b8dc24e8489c9be9723ed40f0e16b721bf3e2664e77ad711d6aef6f7909a8
MaximilianAlgehed/VisPar
Example.hs
import VisPar import Control.DeepSeq parMapM :: NFData b => (a -> Par b) -> [a] -> Par [b] parMapM f as = do ibs <- mapM (spawn . f) as mapM get ibs example :: Par [Int] example = parMapM (return . (*10)) [1..3] main :: IO () main = do print $ runPar example g <- visPar Complete "0" example saveGraphPdf Ve...
null
https://raw.githubusercontent.com/MaximilianAlgehed/VisPar/c63fc5bdaf6325158e85eb1602c7a87c66bb8d9a/examples/Example.hs
haskell
import VisPar import Control.DeepSeq parMapM :: NFData b => (a -> Par b) -> [a] -> Par [b] parMapM f as = do ibs <- mapM (spawn . f) as mapM get ibs example :: Par [Int] example = parMapM (return . (*10)) [1..3] main :: IO () main = do print $ runPar example g <- visPar Complete "0" example saveGraphPdf Ve...
874ad7c6772ddb0f644b4360cbe4135170c6d1ba3aa9b834a88ecb54afdf8fdb
circuithub/rel8
Column.hs
# language DataKinds # {-# language TypeFamilies #-} # language StandaloneKindSignatures # module Rel8.Schema.Column ( Column, Default ) where -- base import Data.Kind ( Type ) import Prelude () -- rel8 import Rel8.Kind.Necessity ( Necessity( Required, Optional ) ) import Rel8.Schema.Field ( Field ) import quali...
null
https://raw.githubusercontent.com/circuithub/rel8/93638f8bdf98023fb5ac2d9b38867af51561a063/src/Rel8/Schema/Column.hs
haskell
# language TypeFamilies # base rel8 | The @Column@ type family should be used to indicate which fields of your data types are single columns in queries. This type family has special support when a query is executed, allowing you to use a single data type for
# language DataKinds # # language StandaloneKindSignatures # module Rel8.Schema.Column ( Column, Default ) where import Data.Kind ( Type ) import Prelude () import Rel8.Kind.Necessity ( Necessity( Required, Optional ) ) import Rel8.Schema.Field ( Field ) import qualified Rel8.Schema.Kind as K both query data...
a60ad79b565c67fa3baf3fec53db70e2bae4647e24f74575dd66ec703be7c134
Bogdanp/koyo
info.rkt
#lang info (define collection "app-name-here") (define deps '("base" "component-lib" "db-lib" ("deta-lib" #:version "0.9") "forms-lib" "gregor-lib" "koyo-lib" "koyo-north" "koyo-postmark" ...
null
https://raw.githubusercontent.com/Bogdanp/koyo/2dd096940da875085855124ef04421657f9c4581/koyo-lib/blueprints/standard/app-name-here/info.rkt
racket
#lang info (define collection "app-name-here") (define deps '("base" "component-lib" "db-lib" ("deta-lib" #:version "0.9") "forms-lib" "gregor-lib" "koyo-lib" "koyo-north" "koyo-postmark" ...
90b4be8afd1126cb15d00fb314b5ae6eeffc9d3721ad83a33e9d3a0fbf8e2669
zlatozar/study-paip
macsymar.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CH8 ; Base : 10 -*- File macsymar.lisp : The rewrite rules for in Chapter 8 (in-package #:ch8) ;; General rules (setf *simplification-rules* (mapcar #'simp-rule '( (x + 0 = x) (0 + x = x) ...
null
https://raw.githubusercontent.com/zlatozar/study-paip/dfa1ca6118f718f5d47d8c63cbb7b4cad23671e1/ch08/macsymar.lisp
lisp
Syntax : COMMON - LISP ; Package : CH8 ; Base : 10 -*- General rules Associativity and Commutative Logs and Trig Differentiation Integration Some examples to try (from an integration table): (simp '(int sin(a + b * x) d x)) (simp '(int sin x * cos x d x)) (simp '(Int log x / x d x)) (simp '(Int 1 / (x * log...
File macsymar.lisp : The rewrite rules for in Chapter 8 (in-package #:ch8) (setf *simplification-rules* (mapcar #'simp-rule '( (x + 0 = x) (0 + x = x) (x + x = 2 * x) (x - 0 = x) ...
0a0e34aed5c6476fe22d97ef36caddee3ca3f1f05792bea26ba75a406d582760
byteally/webapi
Reflex.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE KindSignatures # # LANGUAGE TypeOperators # # LANGUAGE TypeFamilies # # LANGUAGE DataKinds # # LANGUAGE LambdaCase # # LANGUAGE PolyKinds # module WebApi.Client.Reflex where import Reflex.Dom.Core hiding (Reque...
null
https://raw.githubusercontent.com/byteally/webapi/707ebb4048a432cfd3285f4fe46cc1e5825a5018/webapi-client-reflex-dom/src/WebApi/Client/Reflex.hs
haskell
# LANGUAGE OverloadedStrings # TODO: Http-Only cookie cannot be read from JS TODO: Http-Only cookie cannot be read from JS TODO: Should qpar be Maybe NOTE: Handles only single request body TODO: Handle Files TODO: Handle other xhr response case
# LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE KindSignatures # # LANGUAGE TypeOperators # # LANGUAGE TypeFamilies # # LANGUAGE DataKinds # # LANGUAGE LambdaCase # # LANGUAGE PolyKinds # module WebApi.Client.Reflex where import Reflex.Dom.Core hiding (Request, Response) import WebApi.Contrac...
ffc7bc70e4566f90737c89e353c6f2a233079203d1f4ef82d2091c2ff05ef320
d-cent/coracle
db.clj
(ns coracle.test.db (:require [midje.sweet :refer :all] [coracle.test.helpers :as h] [coracle.db :as db])) (facts "Can fetch and retrieve activities" (h/with-db-do (fn [db] (db/fetch-activities db {}) => [] (db/add-activity db {"actor" "Jerome Flynn"}) ...
null
https://raw.githubusercontent.com/d-cent/coracle/da10a7d4b557bb2ab6996e09d99cee5f1ba994e9/test/coracle/test/db.clj
clojure
(ns coracle.test.db (:require [midje.sweet :refer :all] [coracle.test.helpers :as h] [coracle.db :as db])) (facts "Can fetch and retrieve activities" (h/with-db-do (fn [db] (db/fetch-activities db {}) => [] (db/add-activity db {"actor" "Jerome Flynn"}) ...
0c5d7f00ad039f9576dbd7566e96afd055b9c9a2cfec512b2779c43fc31dfb9d
helium/miner
miner_test_sc_packet_handler.erl
-module(miner_test_sc_packet_handler). -export([handle_packet/3, handle_offer/2]). handle_packet(Packet, _PacketTime, HandlerPid) -> F = application:get_env(blockchain, sc_packet_handler_packet_fun, fun(_Packet) -> ok end), lager:info("Packet: ~p, HandlerPid: ~p", [Packet, HandlerPid]), F(Packet). handle...
null
https://raw.githubusercontent.com/helium/miner/8906ca280544d9d14ce34fade54ea6f5e51e5c98/test/miner_test_sc_packet_handler.erl
erlang
-module(miner_test_sc_packet_handler). -export([handle_packet/3, handle_offer/2]). handle_packet(Packet, _PacketTime, HandlerPid) -> F = application:get_env(blockchain, sc_packet_handler_packet_fun, fun(_Packet) -> ok end), lager:info("Packet: ~p, HandlerPid: ~p", [Packet, HandlerPid]), F(Packet). handle...
e49c34a6307298971b97ce20cb3ef605b0d2c07581c5e11d473af7792b5b5601
HunterYIboHu/htdp2-solution
ex356-BSL-func-expr.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex356-BSL-func-expr) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t construc...
null
https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter4/Section21-Refining-Interpreters/ex356-BSL-func-expr.rkt
racket
about the language level of this file in a form that our tools can easily process. (cons Symbol (cons Number '())). An Add is a structure: An Mul is a structure: An Func is a structure: (make-func Symbol [List-of Symbol] BSL-func-expr) - Number - Add - Mul - Number - Symbol - Add - Mul - Number - Sy...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex356-BSL-func-expr) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) An AL ( short for association list ) is...
95b71b8566f689c0c1d214d5da3fd632b834c03b0d5ae243130f63fec4d5a33d
craigl64/clim-ccl
test-clim.lisp
-*- mode : common - lisp ; package : clim - user -*- ;; ;; ;; See the file LICENSE for the full license governing this code. ;; (in-package :clim-user) (clim-test:define-frame-test test-test-frame (test-frame :width 600 :height 600) ((com-clear) (com-make-table) (com-make-table) (com-square-it 5) (co...
null
https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/test/test-clim.lisp
lisp
package : clim - user -*- See the file LICENSE for the full license governing this code. this tends to fail because the window decoration appears to be taken into consideration in the position-sheet-carefully Disable/enable command stuff. --- This would be nice but the problem occurs in the event handler p...
(in-package :clim-user) (clim-test:define-frame-test test-test-frame (test-frame :width 600 :height 600) ((com-clear) (com-make-table) (com-make-table) (com-square-it 5) (com-make-one (:push-button))) (com-quit)) (clim-test:define-frame-test test-test-frame0 (test-frame0) ((com-clear) (com-make...
0bbf7bb82800ff4c100c255cd4ad903c8878974207475e05f77d4930ba1a3197
mmontone/cl-xul
components.lisp
(in-package :xul-test) (define-component components-showcase () () (:initialize (comp) (add-component comp (gensym) (make-instance 'counter :counter 0))) (:render (comp) (<:vbox (<:vbox (maphash (lambda (slot counter) (declare (ignore slot)) (render counter) (<:button (<:...
null
https://raw.githubusercontent.com/mmontone/cl-xul/049c8664bb58d177c71d93ac5b5e1a2ba9b9469b/test/showcase/components.lisp
lisp
(break "Incrementing counter: ~A" counter)
(in-package :xul-test) (define-component components-showcase () () (:initialize (comp) (add-component comp (gensym) (make-instance 'counter :counter 0))) (:render (comp) (<:vbox (<:vbox (maphash (lambda (slot counter) (declare (ignore slot)) (render counter) (<:button (<:...
c1c94544d9f5cde9078f2267b1a0f23ec1b202eb4e6c67e29f059bf3726d6ac1
tsloughter/kuberl
kuberl_v1beta1_subject_access_review_spec.erl
-module(kuberl_v1beta1_subject_access_review_spec). -export([encode/1]). -export_type([kuberl_v1beta1_subject_access_review_spec/0]). -type kuberl_v1beta1_subject_access_review_spec() :: #{ 'extra' => maps:map(), 'group' => list(), 'nonResourceAttributes' => kuberl_v1beta1_non_resource_attributes:k...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1beta1_subject_access_review_spec.erl
erlang
-module(kuberl_v1beta1_subject_access_review_spec). -export([encode/1]). -export_type([kuberl_v1beta1_subject_access_review_spec/0]). -type kuberl_v1beta1_subject_access_review_spec() :: #{ 'extra' => maps:map(), 'group' => list(), 'nonResourceAttributes' => kuberl_v1beta1_non_resource_attributes:k...
0ca8505eef2becfb2e0cf6560628464402f9bc2e188f8569c5489b3ac32ee411
racket/draw
info.rkt
#lang info (define collection 'multi) (define deps '("base")) (define build-deps '("racket-index" "scheme-lib" "draw-lib" "racket-test" "sgl" "gui-lib" "rackunit-lib" "pco...
null
https://raw.githubusercontent.com/racket/draw/7ef41f5c6ee8fae9ad8f4deb662a4d5a97625ec7/draw-test/info.rkt
racket
#lang info (define collection 'multi) (define deps '("base")) (define build-deps '("racket-index" "scheme-lib" "draw-lib" "racket-test" "sgl" "gui-lib" "rackunit-lib" "pco...
faacf74e4e4ef3c286061b0a3fe5dc262aef8d12badccdd4be4d613eeddda252
frenetic-lang/ocaml-topology
topology.ml
open Filename open Network_Common (* Refs for input and output filenames *) let infname = ref None let outfname = ref None let pingall = ref false let prologue = ref "static/mn_prologue.txt" let epilogue = ref "static/mn_epilogue.txt" (* Accepted arguments *) let arg_spec = [ ("-o", Arg.String (fun s -> o...
null
https://raw.githubusercontent.com/frenetic-lang/ocaml-topology/a13ed36faaf216962fabd24d3402f91f5fec781d/exe/topology.ml
ocaml
Refs for input and output filenames Accepted arguments Check extensions on input or output files and parse/print accordingly Entry point
open Filename open Network_Common let infname = ref None let outfname = ref None let pingall = ref false let prologue = ref "static/mn_prologue.txt" let epilogue = ref "static/mn_epilogue.txt" let arg_spec = [ ("-o", Arg.String (fun s -> outfname := Some s ), "\tWrite topology to a file") ; ("-...
4e44f43171b6fdbc2a218a9515ad81da4e4961002c53d901134020ef2a978ef0
wireless-net/erlang-nommu
wxStaticBoxSizer.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2013 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Publi...
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/src/gen/wxStaticBoxSizer.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitatio...
Copyright Ericsson AB 2008 - 2013 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(wxStaticBoxSizer). -include("wxe....
2e3c668755dd3bba32b645477ea01e6dea23f97c8b62191845c82691de4d1c7a
mfikes/coal-mine
problem_121.cljc
(ns coal-mine.problem-121 (:require [coal-mine.checks :refer [defcheck-121] :rename {defcheck-121 defcheck}] [clojure.test])) (defn run-tests [] (clojure.test/run-tests 'coal-mine.problem-121)) (defn -main [] (run-tests)) #?(:cljs (set! *main-cli-fn* -main))
null
https://raw.githubusercontent.com/mfikes/coal-mine/0961d085b37f4e59489a8cf6a2b8fef0a698d8fb/src/coal_mine/problem_121.cljc
clojure
(ns coal-mine.problem-121 (:require [coal-mine.checks :refer [defcheck-121] :rename {defcheck-121 defcheck}] [clojure.test])) (defn run-tests [] (clojure.test/run-tests 'coal-mine.problem-121)) (defn -main [] (run-tests)) #?(:cljs (set! *main-cli-fn* -main))
d96cd837635c5cda518224bd80514de827968eb34dd23bbb6bf1e7741dbca1b4
marick/Midje
t_collection_old.clj
(ns midje.checking.checkers.t-collection-old (:require [midje.sweet :refer :all] [midje.checking.core :refer :all] [midje.test-util :refer :all])) ;; These are still potentially useful tests from a misguided code organization. ;; Delete them as they fail (after moving better tests to t-collec...
null
https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/test/midje/checking/checkers/t_collection_old.clj
clojure
These are still potentially useful tests from a misguided code organization. Delete them as they fail (after moving better tests to t-collection. order matters duplicates matter duplicates matter I suppose could arguably be true. duplicates matter duplicates matter I suppose could arguably be true. order matt...
(ns midje.checking.checkers.t-collection-old (:require [midje.sweet :refer :all] [midje.checking.core :refer :all] [midje.test-util :refer :all])) (facts "about has-prefix" "lists" '() => (has-prefix '()) '(1) => (has-prefix '()) '(1) => (has-prefix '(1)) '(1 2 3) => (has-prefix '(...
a3559bdb50a55c8da0d4bb16c26d8d04c4e4d5ed60cf03f20ea0c406c05973a0
zoomhub/zoomhub
DelayedIO.hs
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # module Servant.Server.Internal.DelayedIO where import Control.Monad.Base (MonadBase (..)) import Control.Monad.Catch (MonadThrow (..)) import ...
null
https://raw.githubusercontent.com/zoomhub/zoomhub/3779709478d17a4c46762de1d5d3ae451437c087/vendor/servant/servant-server/src/Servant/Server/Internal/DelayedIO.hs
haskell
| Computations used in a 'Delayed' can depend on the incoming 'Request', may perform 'IO', and result in a (with the possibility to recover), or fail fatally. restoreM = DelayedIO . restoreM | Fail with the option to recover. | Fail fatally, i.e., without any option to recover. | Gain access to the incomi...
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # module Servant.Server.Internal.DelayedIO where import Control.Monad.Base (MonadBase (..)) import Control.Monad.Catch (MonadThrow (..)) import ...
f4fdb93835f09d5793369b18b902b36789d0d2ccfc4a488843b07896c2522b16
unison-code/uni-instr-sel
LLVM.hs
| Copyright : Copyright ( c ) 2012 - 2017 , < > License : BSD3 ( see the LICENSE file ) Maintainer : Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <> License : BSD3 (see the LICENSE file) Maintainer : -} Main authors : < > Main authors: Gabriel Hjort ...
null
https://raw.githubusercontent.com/unison-code/uni-instr-sel/2edb2f3399ea43e75f33706261bd6b93bedc6762/hlib/instr-sel/Language/InstrSel/Functions/LLVM.hs
haskell
| Copyright : Copyright ( c ) 2012 - 2017 , < > License : BSD3 ( see the LICENSE file ) Maintainer : Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <> License : BSD3 (see the LICENSE file) Maintainer : -} Main authors : < > Main authors: Gabriel Hjort ...
a4b42f32d3efabc9a41aeb1ea9e7e791e87aa0d9eb2fe355a5b59ae901122ecf
VisionsGlobalEmpowerment/webchange
views.cljs
(ns webchange.ui.components.switch.views (:require [webchange.ui.utils.get-class-name :refer [get-class-name]])) (defn switch [{:keys [checked? class-name color disabled? id indeterminate? label label-side name on-change state title value] :or {checked? true disabled? false ...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/2097ed3510b4060028232a85956a00c7efbfda68/src/cljs/webchange/ui/components/switch/views.cljs
clojure
(ns webchange.ui.components.switch.views (:require [webchange.ui.utils.get-class-name :refer [get-class-name]])) (defn switch [{:keys [checked? class-name color disabled? id indeterminate? label label-side name on-change state title value] :or {checked? true disabled? false ...
ce4953086d293156e5311125fb86bf6be3cac2992adfd96dc32bc57e111514bd
shaunlebron/solar-system-of-js
animate.cljs
(ns solar-system-of-js.animate (:require-macros [cljs.core.async.macros :refer [go go-loop]]) (:require [cljs.core.async :refer [put! <! chan tap untap mult]] [solar-system-of-js.state :refer [state]] [solar-system-of-js.math :refer [PI cos]])) ;;----------------------------------------------------...
null
https://raw.githubusercontent.com/shaunlebron/solar-system-of-js/a5c53c9727622ac023963766323b6eb5d03f5226/src/solar_system_of_js/animate.cljs
clojure
---------------------------------------------------------------------- Heartbeat ---------------------------------------------------------------------- ---------------------------------------------------------------------- Animation ---------------------------------------------------------------------- from jquery ...
(ns solar-system-of-js.animate (:require-macros [cljs.core.async.macros :refer [go go-loop]]) (:require [cljs.core.async :refer [put! <! chan tap untap mult]] [solar-system-of-js.state :refer [state]] [solar-system-of-js.math :refer [PI cos]])) (def tick-chan "This channel receives dt (delta tim...
2ce4606428a02ee1d523b7198ac2e2fad5a2d726243da817cd47934056b873c0
ktahar/ocaml-lp
ffi_consts_stubgen.ml
let prefix = "lp_glpk_stub" let prologue = "#include <glpk.h>" let () = print_endline prologue ; Cstubs.Types.write_c Format.std_formatter (module Lp_glpk_bindings_consts.M)
null
https://raw.githubusercontent.com/ktahar/ocaml-lp/d8e2ad3fcef91cef6b3ec1fc39026bc07010c16b/src/lp-glpk/consts/stubgen/ffi_consts_stubgen.ml
ocaml
let prefix = "lp_glpk_stub" let prologue = "#include <glpk.h>" let () = print_endline prologue ; Cstubs.Types.write_c Format.std_formatter (module Lp_glpk_bindings_consts.M)
abf90841595d7a6beb2ba29ede4379b53c750a2ad568732b93b1f2dbbe92a76a
joearms/elib1
elib1_indexer_plugin_erl.erl
Copyright ( c ) 2006 - 2009 See MIT - LICENSE for licensing information . -module(elib1_indexer_plugin_erl). %% -export([file/1, strings/1, frequencies/1, tokenise_string/1]). -import(lists, [foldl/3, member/2, reverse/1]). -define(IN(X,Min,Max), X >= Min, X =< Max). -define(WHITESPACE(X),X=:=$\s;X=:=$\t;X=:=$...
null
https://raw.githubusercontent.com/joearms/elib1/d617d0ec70a058ef102749eadf51c024444c28d9/lib/src/elib1_indexer_plugin_erl.erl
erlang
only interested in atoms and comments io:format("Comments=~p~n",[Comments]), io:format("Atoms=~p~n",[Atoms]), io:format("Words with frequencies (unstemmed)=~p~n",[Words]), atoms can contain _@ and be uppercaes finally this is where we add stuff variable -- treat like an atom and throw away the rest
Copyright ( c ) 2006 - 2009 See MIT - LICENSE for licensing information . -module(elib1_indexer_plugin_erl). -export([file/1, strings/1, frequencies/1, tokenise_string/1]). -import(lists, [foldl/3, member/2, reverse/1]). -define(IN(X,Min,Max), X >= Min, X =< Max). -define(WHITESPACE(X),X=:=$\s;X=:=$\t;X=:=$\r;X...
171a47f62c93d38d75114c50054f3ad35f67a7b63c7a6c6d996fb3abfd415d39
haskell/haskell-language-server
KnownModuleInstanceSemigroup.expected.hs
data Foo = Foo instance Semigroup Foo where (<>) _ _ = Foo data Bar = Bar Foo Foo instance Semigroup Bar where (Bar foo foo') <> (Bar foo2 foo3) = Bar (foo <> foo2) (foo' <> foo3)
null
https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/golden/KnownModuleInstanceSemigroup.expected.hs
haskell
data Foo = Foo instance Semigroup Foo where (<>) _ _ = Foo data Bar = Bar Foo Foo instance Semigroup Bar where (Bar foo foo') <> (Bar foo2 foo3) = Bar (foo <> foo2) (foo' <> foo3)
62550551abc35f63099b41414163627810b2354cbcc78baa6dce6534ca18eece
lindig/lua-ml
luainterp.ml
module type S = sig module Value : Luavalue.S module Ast : Luaast.S with module Value = Value type state = Value.state type value = Value.value exception Error of string type compiled = unit -> value list val compile : srcdbg:(Luasrcmap.map * bool) -> Ast.chunk list -> state -> compiled type startup_c...
null
https://raw.githubusercontent.com/lindig/lua-ml/af4bb6d940e0f22b144e817dda900382bc60aed8/src/luainterp.ml
ocaml
produce a fresh, initialized state error fallback get the named global variable invoke named fallback on given state and arguments evaluates function with given srcloc on activation stack registers values as named global variables register_module t l inserts members of l into global table t, creati...
module type S = sig module Value : Luavalue.S module Ast : Luaast.S with module Value = Value type state = Value.state type value = Value.value exception Error of string type compiled = unit -> value list val compile : srcdbg:(Luasrcmap.map * bool) -> Ast.chunk list -> state -> compiled type startup_c...
b3347cf5055d2e340869278d2d7927a5a0f121961b933ff5ae97e39545081efa
appleshan/cl-http
html-3-2.lisp
-*- Syntax : Ansi - Common - Lisp ; Package : CL - USER ; Base : 10 ; Mode : lisp -*- ;;; File: html-3-2.lisp Last edited by smishra on Tue Jul 28 15:58:10 1998 ( c ) Copyright 1996 - 97 , ( ) ;;; All Rights Reserved (in-package :html-parser) This file contains a transcription of the HTML 3.2 DTD A...
null
https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/html-parser/v10/html-3-2.lisp
lisp
Package : CL - USER ; Base : 10 ; Mode : lisp -*- File: html-3-2.lisp All Rights Reserved :sequence all of these are required, in the given order :and all of these are required, in any order All entity definitions MUST precede element definitions, otherwise writing the code to process the definitions bec...
Last edited by smishra on Tue Jul 28 15:58:10 1998 ( c ) Copyright 1996 - 97 , ( ) (in-package :html-parser) This file contains a transcription of the HTML 3.2 DTD All entities beginning with a % are special SGML declarations : set one or more of these is allowed , in any order : or one of t...
e7473c159ca7045028b2624739816b28fd362088866ae5f449683bc02d561d88
atzeus/reflectionwithoutremorse
FastTCQueue.hs
module Data.FastTCQueue(module Data.Interface.TSequence, FastTCQueue) where import Data.Interface.TSequence import Data.RTQueue import Data.CTQueue type FastTCQueue = CTQueue RTQueue
null
https://raw.githubusercontent.com/atzeus/reflectionwithoutremorse/2ab000be1ddc49a2ec36afaaa58485df56aef654/Data/FastTCQueue.hs
haskell
module Data.FastTCQueue(module Data.Interface.TSequence, FastTCQueue) where import Data.Interface.TSequence import Data.RTQueue import Data.CTQueue type FastTCQueue = CTQueue RTQueue
c889f4279e2cfe5a9143ba50c09f34367a3644f154f640e145841fd8bf6cbe83
boris-ci/boris
Project.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} module Boris.Http.Api.Project ( byId , byName , list , NewProjectError (..) , new ) where import Boris.Core.Data.Keyed import Boris.Core.Data.Project import Boris.Core.Data.Repository import qualified Boris.H...
null
https://raw.githubusercontent.com/boris-ci/boris/c321187490afc889bf281442ac4ef9398b77b200/boris-http/src/Boris/Http/Api/Project.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE NoImplicitPrelude # module Boris.Http.Api.Project ( byId , byName , list , NewProjectError (..) , new ) where import Boris.Core.Data.Keyed import Boris.Core.Data.Project import Boris.Core.Data.Repository import qualified Boris.Http.Db.Project as ProjectDb import ...
a961fce2a0289d0455b2f32adc38e8be8d0e8eb6e50daf51c099069ebe6818eb
carp-lang/Carp
TestConstraints.hs
module TestConstraints where import Constraints import Eval import Infer import qualified Map import Obj import Parsing import qualified Set import Test.HUnit import TestLookup import Types -- | Helper functions for testing unification of Constraints isUnificationFailure :: Either UnificationFailure TypeMappings -> B...
null
https://raw.githubusercontent.com/carp-lang/Carp/e1943b29a9a47f4da38136d2c4434adf85f22a95/test/TestConstraints.hs
haskell
| Helper functions for testing unification of Constraints | A dummy XObj | Some type variables | Test constraints ,testConstr30 DISABLED FOR NOW, started failing when lifetimes were added to function types TODO: Fix! -- Should collapse type variables into minimal set: testConstr10 = assertSolution m7 = solve ([...
module TestConstraints where import Constraints import Eval import Infer import qualified Map import Obj import Parsing import qualified Set import Test.HUnit import TestLookup import Types isUnificationFailure :: Either UnificationFailure TypeMappings -> Bool isUnificationFailure (Left _) = True isUnificationFailure...
591ceba5018e326394e3a6402561c422d0a7705e688f425658068eb3b0f34beb
cram2/cram
interpolation.lisp
Regression test for GSLL , automatically generated ;; Copyright 2009 Distributed under the terms of the GNU General Public License ;; ;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , ...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/tests/interpolation.lisp
lisp
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Publi...
Regression test for GSLL , automatically generated Copyright 2009 Distributed under the terms of the GNU General Public License it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the ...
3dbe6e2da62d25c3184d4ad10c0f43a5341bb5aa1d6b20928a06287b694e2078
facebookarchive/pfff
server_codemap_parsing.mli
(* internally memoize the highlight information in _hmemo_file *) val tokens_with_categ_of_file : Common.filename -> ( string , Database_code.entity ) Hashtbl.t - > (string * Highlight_code.category option * Common2.filepos) list (* val disable_file_in_cache : Common.filename -> unit *) (* helpers *) val us...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/web/code_map/server_codemap_parsing.mli
ocaml
internally memoize the highlight information in _hmemo_file val disable_file_in_cache : Common.filename -> unit helpers
val tokens_with_categ_of_file : Common.filename -> ( string , Database_code.entity ) Hashtbl.t - > (string * Highlight_code.category option * Common2.filepos) list val use_arity_of_use_count : int -> Highlight_code.use_arity
5e1f4b15118ffccbb32f2e151e3c3e3783afa587e41b2d71ecb83e57993ed476
jaked/ocamljs
pervasives.ml
* This file is part of ocamljs , OCaml to Javascript compiler * Copyright ( C ) 2007 - 9 Skydeck , Inc * Copyright ( C ) 2010 * * This library 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 Softwar...
null
https://raw.githubusercontent.com/jaked/ocamljs/378080ff1c8033bb15ed2bd29bf1443e301d7af8/src/stdlib/patches/3.12.0/pervasives.ml
ocaml
********************************************************************* Objective Caml ...
* This file is part of ocamljs , OCaml to Javascript compiler * Copyright ( C ) 2007 - 9 Skydeck , Inc * Copyright ( C ) 2010 * * This library 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 Softwar...
29c3dfd0eb43bd26a9e3ce1dd4b687a297ba91a639ebb2bf968bd394e52448c6
Abhiroop/okasaki
RBTreeDeleteMight.hs
module RBTreeDeleteMight where data Color = R | B | BB | NB data Tree a = E | T Color (Tree a) a (Tree a) blacken :: Color -> Color blacken B = BB blacken R = B blacken NB = R blacken BB = error "Can't blacken further" lighten :: Color -> Color lighten BB = B lighten B = R lighten R = NB lighten NB = error "Can't...
null
https://raw.githubusercontent.com/Abhiroop/okasaki/b4e8b6261cf9c44b7b273116be3da6efde76232d/src/RBTreeDeleteMight.hs
haskell
General cases of balancing
module RBTreeDeleteMight where data Color = R | B | BB | NB data Tree a = E | T Color (Tree a) a (Tree a) blacken :: Color -> Color blacken B = BB blacken R = B blacken NB = R blacken BB = error "Can't blacken further" lighten :: Color -> Color lighten BB = B lighten B = R lighten R = NB lighten NB = error "Can't...
5d965aad2bae334c94d65ea1d27c637ef4d805b4c38b01278824650067291541
janestreet/accessor_base
accessor_tuple2.ml
open! Base open! Import let fst = [%accessor Accessor.field ~get:fst ~set:(fun (_, c) b -> b, c)] let fsti = [%accessor Accessor.fieldi ~get:(fun (a, b) -> b, a) ~set:(fun (_, c) b -> b, c)] ;; let snd = [%accessor Accessor.field ~get:snd ~set:(fun (c, _) b -> c, b)] let sndi = [%accessor Accessor.fieldi ~get:Fn.i...
null
https://raw.githubusercontent.com/janestreet/accessor_base/8384c29a37e557168ae8a43b2a5a531f0ffc16e4/src/accessor_tuple2.ml
ocaml
open! Base open! Import let fst = [%accessor Accessor.field ~get:fst ~set:(fun (_, c) b -> b, c)] let fsti = [%accessor Accessor.fieldi ~get:(fun (a, b) -> b, a) ~set:(fun (_, c) b -> b, c)] ;; let snd = [%accessor Accessor.field ~get:snd ~set:(fun (c, _) b -> c, b)] let sndi = [%accessor Accessor.fieldi ~get:Fn.i...
4c103882e33ad893f45d500043a26a831a271488998323d8b99b69004c065e87
nyu-acsys/drift
inductive4.ml
let rec f g x = if x < (-3) then (* x<=-4 *) f g (-4) else if x <= 1 then (* -3<=x<=1 *) g x else (* x>1 *) f (f g) (x - 2) let incr y = y + 1 let main (n:int(*-:{v:Int | true}*)) = assert(f incr 3 >= -3)
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/r_type/first/inductive4.ml
ocaml
x<=-4 -3<=x<=1 x>1 -:{v:Int | true}
let rec f g x = f g (-4) g x f (f g) (x - 2) let incr y = y + 1 assert(f incr 3 >= -3)
b493b7a468f41d30b3c50e72667b42d5873e65947d4ecdac23392c3718ee9931
nuprl/gradual-typing-performance
chest-closed.rkt
#lang racket/base (provide chest-closed) (require racket/draw racket/runtime-path) (define-runtime-path chest-closed-img "chest-closed.png") (define chest-closed (read-bitmap chest-closed-img))
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/2htdp/planetcute/chest-closed.rkt
racket
#lang racket/base (provide chest-closed) (require racket/draw racket/runtime-path) (define-runtime-path chest-closed-img "chest-closed.png") (define chest-closed (read-bitmap chest-closed-img))
89c3d11d38f9f2b08a0e50f0294f59f7e24328dddc74b71d63d9995882c87092
anoma/juvix
BinderList.hs
module Juvix.Compiler.Core.Data.BinderList where import GHC.Show qualified as S import Juvix.Compiler.Core.Language hiding (cons, drop, lookup, uncons) import Juvix.Prelude qualified as Prelude -- | if we have \x\y. b, the binderlist in b is [y, x] data BinderList a = BinderList { _blLength :: Int, _blMap :: [a...
null
https://raw.githubusercontent.com/anoma/juvix/23f34403f521c0aaab481b7e4071d0736da08508/src/Juvix/Compiler/Core/Data/BinderList.hs
haskell
| if we have \x\y. b, the binderlist in b is [y, x] | same as `lookupsSortedRev` but the result is in the same order as the input list. | efficient multiple lookups. The input list needs to be in non-decreasing order. | The result is in reversed order (non-increasing order) | lookup de Bruijn Index | lookup de Br...
module Juvix.Compiler.Core.Data.BinderList where import GHC.Show qualified as S import Juvix.Compiler.Core.Language hiding (cons, drop, lookup, uncons) import Juvix.Prelude qualified as Prelude data BinderList a = BinderList { _blLength :: Int, _blMap :: [a] } deriving stock (Eq, Generic) makeLenses ''Bind...
447b94517bb5124d0a16e0a791cb3db80461ea897dc17bfae8d9141285058ddd
ruricolist/FXML
test.lisp
(in-package #:fxml.sanitize) (defpackage #:fxml.sanitize.test (:use #:cl #:alexandria #:serapeum #:fxml.sanitize #:fiveam) (:export #:run-sanitize-test)) (in-package #:fxml.sanitize.test) (def-suite sanitize :description "Sanitize tests suite") (defun run-test () (run! 'sanitize)) #+ () (defmethod as...
null
https://raw.githubusercontent.com/ruricolist/FXML/a0e73bb48ef03adea94a55986cc27f522074c8e1/sanitize/test.lisp
lisp
simple Collapse whitespace. basic malformed ") a > dolor</strong></a > sit < br > amet alert(&quot;hello ;) ; " ) ) ) unclosed malicious raw-comment tricky \">foo</a>") \">foo</a>") \">foo</a>") \">foo</a>") \">foo</a>") \">foo</a>") \">foo</a>") \">foo</a>") \">foo</a>") entity should translate valid...
(in-package #:fxml.sanitize) (defpackage #:fxml.sanitize.test (:use #:cl #:alexandria #:serapeum #:fxml.sanitize #:fiveam) (:export #:run-sanitize-test)) (in-package #:fxml.sanitize.test) (def-suite sanitize :description "Sanitize tests suite") (defun run-test () (run! 'sanitize)) #+ () (defmethod as...
6439238fba51a1b46df3133b7890a4361e392cc96362db01d32b25d031e289f4
tfausak/burrito
Operator.hs
{-# LANGUAGE DeriveDataTypeable #-} module Burrito.Internal.Type.Operator ( Operator (..), ) where import qualified Data.Data as Data data Operator = Ampersand | FullStop | None | NumberSign | PlusSign | QuestionMark | Semicolon | Solidus deriving (Data.Data, Eq, Ord, Show)
null
https://raw.githubusercontent.com/tfausak/burrito/e4475f6bc44862a36464bd8904296d68d995ead2/source/library/Burrito/Internal/Type/Operator.hs
haskell
# LANGUAGE DeriveDataTypeable #
module Burrito.Internal.Type.Operator ( Operator (..), ) where import qualified Data.Data as Data data Operator = Ampersand | FullStop | None | NumberSign | PlusSign | QuestionMark | Semicolon | Solidus deriving (Data.Data, Eq, Ord, Show)
94bab0e2abb1371e8b5f65c29349c06a850c7a74d7b2bb61828659b66cc2cc49
tfausak/advent-of-code
1.hs
-- stack --resolver lts-12.0 script import qualified Control.Monad as Monad import qualified Control.Monad.Trans.State as State main = print . sum . allMetadata . State.evalState getNode . map read . words =<< getContents allMetadata node = metadata node ++ concatMap allMetadata (children node) data No...
null
https://raw.githubusercontent.com/tfausak/advent-of-code/26f0d9726b019ff7b97fa7e0f2f995269b399578/2018/8/1.hs
haskell
stack --resolver lts-12.0 script
import qualified Control.Monad as Monad import qualified Control.Monad.Trans.State as State main = print . sum . allMetadata . State.evalState getNode . map read . words =<< getContents allMetadata node = metadata node ++ concatMap allMetadata (children node) data Node = Node { children :: [ Node ], me...
20af890c15518e4d2bb05fc5cb1a46b9857f52055a161667a6354867e7c8ae27
aeternity/aeternity
aec_peers_tests.erl
%%%============================================================================= ( C ) 2017 , Aeternity Anstalt %%% @doc %%% Unit tests for the aec_peers module %%% @end %%%============================================================================= -module(aec_peers_tests). -ifdef(TEST). %=== INCLUDES ========...
null
https://raw.githubusercontent.com/aeternity/aeternity/5f77f2b73a60a91bcac25be2dd4777f9f0e0d814/apps/aecore/test/aec_peers_tests.erl
erlang
============================================================================= @doc Unit tests for the aec_peers module @end ============================================================================= === INCLUDES ================================================================== This should be in sync with aec_...
( C ) 2017 , Aeternity Anstalt -module(aec_peers_tests). -ifdef(TEST). -include_lib("eunit/include/eunit.hrl"). = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -define(DEFAULT_MAX_OUTBOUND, 10). -defin...
63e8e507d0871c453db0ea67c18823d6500e13a6f342852405f837c336b9ee56
lambdaisland/breakout
config.cljs
(ns breakout.config) (def debug? ^boolean js/goog.DEBUG)
null
https://raw.githubusercontent.com/lambdaisland/breakout/72062cf46abe0501284bfd036c2ca65245ce79ae/src/cljs/breakout/config.cljs
clojure
(ns breakout.config) (def debug? ^boolean js/goog.DEBUG)
2f1009c5adeaeb557c10604dd17b74e9293d746dc0675a9c29f29ab3a643698f
jnavila/plotkicadsch
kicadLib_sigs.ml
open KicadSch_sigs type relcoord = RelCoord of int * int type circle = {center: relcoord; radius: int} type pin_orientation = P_L | P_R | P_U | P_D type pin_tag = string * size type pin = { name: pin_tag ; number: pin_tag ; length: size ; contact: relcoord ; orient: pin_orientation } type primitive = ...
null
https://raw.githubusercontent.com/jnavila/plotkicadsch/fa673978302fe7253d69e5a5753e1e8a23b2f746/kicadsch/src/kicadLib_sigs.ml
ocaml
open KicadSch_sigs type relcoord = RelCoord of int * int type circle = {center: relcoord; radius: int} type pin_orientation = P_L | P_R | P_U | P_D type pin_tag = string * size type pin = { name: pin_tag ; number: pin_tag ; length: size ; contact: relcoord ; orient: pin_orientation } type primitive = ...
6b65e2e6de28f21dba49f267e7a463d92430c8f321ead056ea27805566c3a9a4
mvoidex/hsdev
Base.hs
# LANGUAGE PatternGuards , PackageImports # module HsDev.Tools.Ghc.Base ( * Running ghcRun, ghcRunWith, * Commonly used DynFlags interpretedFlags, noLinkFlags, -- * Setting DynFlags withFlags, modifyFlags, -- * Loading targets clearTargets, makeTarget, loadTargets, loadInteractive, reload, -- * Logging me...
null
https://raw.githubusercontent.com/mvoidex/hsdev/016646080a6859e4d9b4a1935fc1d732e388db1a/src/HsDev/Tools/Ghc/Base.hs
haskell
* Setting DynFlags * Loading targets * Logging messages * Util | Update @DynFlags@ _ <- liftIO $ initPackages fs' | Clear loaded targets | Make target with its source code optional | Load all targets | Load and set interactive context | Reload targets | Same as @collectMessages@, but when no result except n...
# LANGUAGE PatternGuards , PackageImports # module HsDev.Tools.Ghc.Base ( * Running ghcRun, ghcRunWith, * Commonly used DynFlags interpretedFlags, noLinkFlags, withFlags, modifyFlags, clearTargets, makeTarget, loadTargets, loadInteractive, reload, collectMessages, collectMessages_, formatType, spanRegion...
1529c319250c3f791f791a2bffd6da44d99df962ad26061cbdc9cf1aa5f614c8
weldr/bdcs
Projects.hs
-- | -- Module: BDCS.RPM.Projects Copyright : ( c ) 2016 - 2017 Red Hat , Inc. -- License: LGPL -- Maintainer : -- Stability: alpha -- Portability: portable -- -- 'Projects' record support for RPM packages. module BDCS.RPM.Projects(mkProject) where import Codec.RPM.Tags(Tag, findByteStringTag, findStr...
null
https://raw.githubusercontent.com/weldr/bdcs/cf360c3240644b4847336b9d58b2067f3aa1ec50/src/BDCS/RPM/Projects.hs
haskell
| Module: BDCS.RPM.Projects License: LGPL Stability: alpha Portability: portable 'Projects' record support for RPM packages. | Return a 'Projects' record for the RPM package. as the name.
Copyright : ( c ) 2016 - 2017 Red Hat , Inc. Maintainer : module BDCS.RPM.Projects(mkProject) where import Codec.RPM.Tags(Tag, findByteStringTag, findStringTag) import Data.List(elemIndices) import qualified Data.Text as T import Data.Text.Encoding(decodeUtf8) import BDCS.DB(Proje...
932b8d94055deafe5f77caf43952891901beb7cadf71976c49e413afd4676604
facebook/duckling
Corpus.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE OverloadedStrings #-} module Duckling.AmountOfMoney.BG.Corpus ( corpus ) where import Data...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/AmountOfMoney/BG/Corpus.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE OverloadedStrings #
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.AmountOfMoney.BG.Corpus ( corpus ) where import Data.String import Prelude import Duckling.AmountOfMoney.Types import Duckling.Locale import Duckling.Resolve import Duckling.Testing.Types corpus :: Corpus corpus = (testContext {locale = makeLoc...
5fcef006d52bc45bf16dc3cec771a156d4342f8bd61bf6b8f839d69c48c94331
scheme/scsh
functional-search-tree.scm
Copyright ( c ) 1993 - 2008 by and . ; Functional red-black search trees See Red - Black Trees in a Functional Setting by . Journal of Functional Programming , 9(4):471 - 477 , July 1999 . ( variant from ) Red - black trees are binary search trees obeying two key invariants : ; - Any path from a ro...
null
https://raw.githubusercontent.com/scheme/scsh/114432435e4eadd54334df6b37fcae505079b49f/scheme/functional-search-tree.scm
scheme
Functional red-black search trees - Any path from a root node to a leaf node contains the same number of black nodes. - Red nodes always have black children. returns invalid subtree or #f empty nodes are black (assert (not (node-red? rleft)))
Copyright ( c ) 1993 - 2008 by and . See Red - Black Trees in a Functional Setting by . Journal of Functional Programming , 9(4):471 - 477 , July 1999 . ( variant from ) Red - black trees are binary search trees obeying two key invariants : (define-record-type search-tree :search-tree (really-ma...
01adc0cf0fd8ff8144976e24c69e852289fc04e872f8545a6f568d55caa9e327
chriseidhof/formlets
MassInput.hs
module Text.Formlets.MassInput where import Text.XHtml.Strict.Formlets import qualified Text.Formlets as F import Text.XHtml.Strict ((!), (+++), (<<)) import Control.Applicative import qualified Text.XHtml.Strict as X import Data.Monoid massInput :: (Applicative m, Monad m) => (XHtmlFormlet m a) -- ^ A form...
null
https://raw.githubusercontent.com/chriseidhof/formlets/b78cd6cba3d3d3894bc547924ad0cb8f55067ba2/Text/Formlets/MassInput.hs
haskell
^ A formlet for a single a ^ This will add an optional wrapper tag around the whole list Uncomment the following line if you want the newly added fields to be empty. ," newItem.children('input').attr('value','');"
module Text.Formlets.MassInput where import Text.XHtml.Strict.Formlets import qualified Text.Formlets as F import Text.XHtml.Strict ((!), (+++), (<<)) import Control.Applicative import qualified Text.XHtml.Strict as X import Data.Monoid massInput :: (Applicative m, Monad m) ^ This should add at least one wrapper ta...
cb66556fdf8491176f232a3cbeb315d8a9cb7d888b3ddf6afb08de19d96b5d48
purerl/purerl
Unused.hs
-- | Removes unused variables module Language.PureScript.Erl.CodeGen.Optimizer.Unused ( removeUnusedFuns, ) where import Control.Monad (filterM) import Data.Monoid (Any (..)) import qualified Data.Set as S import Data.Text (Text) import Language.PureScript.Erl.CodeGen.AST ( Atom (..), Erl (..), pattern E...
null
https://raw.githubusercontent.com/purerl/purerl/d4c933b36dfaed8f4ae4e07a8806cf8a822885f4/src/Language/PureScript/Erl/CodeGen/Optimizer/Unused.hs
haskell
| Removes unused variables TODO not recognising external self-module calls, which should not be generated right now, who are we anyway
module Language.PureScript.Erl.CodeGen.Optimizer.Unused ( removeUnusedFuns, ) where import Control.Monad (filterM) import Data.Monoid (Any (..)) import qualified Data.Set as S import Data.Text (Text) import Language.PureScript.Erl.CodeGen.AST ( Atom (..), Erl (..), pattern EApp, everything, ) impor...
c166c17c14fc236691af3b1a2ac46ba9386817a5fd1d6b2f5a5495c467494c11
malcolmreynolds/GSLL
beta.lisp
;; Beta distribution , Sat Sep 30 2006 Time - stamp : < 2009 - 05 - 24 21:34:36EDT beta.lisp > $ Id$ (in-package :gsl) (defmfun sample ((generator random-number-generator) (type (eql 'beta)) &key a b) "gsl_ran_beta" (((mpointer generator) :pointer) (a :double) (b :double)) :definition :method :c-r...
null
https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/random/beta.lisp
lisp
Beta distribution Examples and unit test
, Sat Sep 30 2006 Time - stamp : < 2009 - 05 - 24 21:34:36EDT beta.lisp > $ Id$ (in-package :gsl) (defmfun sample ((generator random-number-generator) (type (eql 'beta)) &key a b) "gsl_ran_beta" (((mpointer generator) :pointer) (a :double) (b :double)) :definition :method :c-return :double "A...
0a998752dadb9df55b8972e69565fda6ca519e0f3605552b27e52e317e3266c1
chef-boneyard/opscode-pushy-server
pushy_named_job_resource.erl
-*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*- %% ex: ts=4 sw=4 et @author < > %%% @doc %%% REST resource for getting information about push jobs %%% @end Copyright 2012 - 2012 Chef Software , Inc. All Rights Reserved . %% This file is provided to you under the Apache Li...
null
https://raw.githubusercontent.com/chef-boneyard/opscode-pushy-server/7272326960fcc35eaa99fa8d5f5bd58959755b3e/apps/pushy/src/pushy_named_job_resource.erl
erlang
ex: ts=4 sw=4 et @doc REST resource for getting information about push jobs @end 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, KIND, either express or impl...
-*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*- @author < > Copyright 2012 - 2012 Chef Software , Inc. All Rights Reserved . This file is provided to you under the Apache License , software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT W...
2527f4d8dedc07d98787e45c3ade02fc1d4b1ccc9fbd68a84caba7765b93257c
modular-macros/ocaml-macros
pr6817.ml
module A = struct type nil = Cstr end open A ;; type _ s = | Nil : nil s | Cons : 't s -> ('h -> 't) s type ('stack, 'typ) var = | Head : (('typ -> _) s, 'typ) var | Tail : ('tail s, 'typ) var -> ((_ -> 'tail) s, 'typ) var type _ lst = | CNil : nil lst | CCons : 'h * ('t lst) -> ('h -> 't) lst ;; ...
null
https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/typing-gadts/pr6817.ml
ocaml
module A = struct type nil = Cstr end open A ;; type _ s = | Nil : nil s | Cons : 't s -> ('h -> 't) s type ('stack, 'typ) var = | Head : (('typ -> _) s, 'typ) var | Tail : ('tail s, 'typ) var -> ((_ -> 'tail) s, 'typ) var type _ lst = | CNil : nil lst | CCons : 'h * ('t lst) -> ('h -> 't) lst ;; ...
801da4d62ae0e3b901137d46268cbfa4bff6659c3db40e8954950a58f955fbbf
rd--/hosc
System.hs
-- | System time module Sound.Osc.Time.System where import Data.Int {- base -} import Data.Word {- base -} time > = 1.8 import Sound.Osc.Time {- hosc -} | Get the system time , epoch start of 1970 UTC , leap - seconds ignored . getSystemTime is typically much faster than getCurrentTime , however it is not a...
null
https://raw.githubusercontent.com/rd--/hosc/23fee4a12bfb2fc48f4fcc894cf5ed5c7b3b7e26/Sound/Osc/Time/System.hs
haskell
| System time base base hosc | System time with fractional part in microseconds (us) instead of nanoseconds (ns).
module Sound.Osc.Time.System where time > = 1.8 | Get the system time , epoch start of 1970 UTC , leap - seconds ignored . getSystemTime is typically much faster than getCurrentTime , however it is not available in Hugs . getSystemTimeAsNtpReal :: IO NtpReal getSystemTimeAsNtpReal = do tm <- Clock.System....
9ef511d54ffc7b244173e6d250f76ce1aa4559d98b2802eb4106f494d8ab6ac3
inria-parkas/sundialsml
arraydense.ml
open Sundials open Bigarray module M = Matrix.ArrayDense let printf = Format.printf let fprintf = Format.fprintf let print_mat out m = let (nr, nc) = RealArray2.size m in fprintf out "@[<v>"; for i = 0 to nr - 1 do fprintf out "@[<h>"; for j = 0 to nc - 1 do fprintf out "@ % e" (M.get m i j) ...
null
https://raw.githubusercontent.com/inria-parkas/sundialsml/0c46b0c6c067677af6ef8006260b9e697cc0562b/examples/ocaml/linear/arraydense.ml
ocaml
open Sundials open Bigarray module M = Matrix.ArrayDense let printf = Format.printf let fprintf = Format.fprintf let print_mat out m = let (nr, nc) = RealArray2.size m in fprintf out "@[<v>"; for i = 0 to nr - 1 do fprintf out "@[<h>"; for j = 0 to nc - 1 do fprintf out "@ % e" (M.get m i j) ...
1b1590e7d6f276614192462517d2cc4c6391f2c8ec7cf6a224bed5a94e1f4c96
helium/erlang-hbbft
hbbft_distributed_SUITE.erl
-module(hbbft_distributed_SUITE). -export([ groups/0, init_per_group/2, end_per_group/2, init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2, all/0 ]). -export([simple_test/1, serialization_test/1, partition_test/1, partition_and_filter_test/1]). all() -> [{...
null
https://raw.githubusercontent.com/helium/erlang-hbbft/d25236378aa7274a0257e21283ace552f47b245e/test/hbbft_distributed_SUITE.erl
erlang
per suite cleanup, placeholder test cases master starts the dealer each node gets a secret key load hbbft_worker on each node start a hbbft_worker on each node wait for all the worker's mailboxes to settle and. wait for the chains to converge find the shortest chain and check all chains have the same common pr...
-module(hbbft_distributed_SUITE). -export([ groups/0, init_per_group/2, end_per_group/2, init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2, all/0 ]). -export([simple_test/1, serialization_test/1, partition_test/1, partition_and_filter_test/1]). all() -> [{...
3568640bae35afd2882a788c9d98b62777f06377ce2480a6f1af232b02ef6917
RichiH/git-annex
Unused.hs
git - annex unused log file - - This file is stored locally in .git / annex/ , not in the git - annex branch . - - The format : " int key timestamp " - - The int is a short , stable identifier that the user can use to - refer to this key . ( Equivilant to a filename . ) - - The timestamp in...
null
https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Logs/Unused.hs
haskell
everything that is stored in the unused log used to look up unused keys specified by the user Only keeps keys that are in the new log, but uses any timestamps - those keys had in the old log. Set of unused keys. This is cached for speed.
git - annex unused log file - - This file is stored locally in .git / annex/ , not in the git - annex branch . - - The format : " int key timestamp " - - The int is a short , stable identifier that the user can use to - refer to this key . ( Equivilant to a filename . ) - - The timestamp in...
f14bf2dff4621fac4e91aef2c647dc2beaba0f39ef379840b9899cf8ce04764f
pixlsus/registry.gimp.org_static
Swap_Scale_3D.scm
(script-fu-register "Swap_Scale_3D" "Swap_Scale_3D" "Swap Left and Right image and scale" "Don Sauer" "GNU General Public License v3+" "2012" "RGB*" SF-IMAGE "Image" 0 ...
null
https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/Swap_Scale_3D.scm
scheme
(script-fu-register "Swap_Scale_3D" "Swap_Scale_3D" "Swap Left and Right image and scale" "Don Sauer" "GNU General Public License v3+" "2012" "RGB*" SF-IMAGE "Image" 0 ...
a1cc61e9d9707d5621cff67afff7532a991b41c3804c05296b88b32251f66ab5
evrim/core-server
facebook.lisp
(in-package :core-server) ;; ------------------------------------------------------------------------- ;; Facebook Graph HTTP Client ;; ------------------------------------------------------------------------- ;; / ;; -side/ ;; / Author : > Date : July 2012 ;; 1 . Pop - up a dialog using < fb : oauth - uri ...
null
https://raw.githubusercontent.com/evrim/core-server/200ea8151d2f8d81b593d605b183a9cddae1e82d/src/clients/facebook.lisp
lisp
------------------------------------------------------------------------- Facebook Graph HTTP Client ------------------------------------------------------------------------- / -side/ / ------------------------------------------------------------------------- Oauth Dialog ------------------------------------...
(in-package :core-server) Author : > Date : July 2012 1 . Pop - up a dialog using < fb : oauth - uri 2 . Get * code * parameter in the return - uri < not here > 3 . Get an access token 4 . Use < fb : me and fellows . (defun make-fb-uri (&key paths queries) (make-uri :scheme "https" :server "www.face...
8cb7a8e7964187696220733ce873a700ee8627335abdc1aa5dd47e6bf84479bc
vtan/spanout
Level.hs
module Spanout.Level (generateBricks) where import Spanout.Common import Control.Lens import Control.Monad import Control.Monad.Random import Data.Fixed import Linear -- Generates bricks in randomly sized rows generateBricks :: MonadRandom m => m [Brick] generateBricks = do relLevelHeight <- getRandomR (0.3, 0...
null
https://raw.githubusercontent.com/vtan/spanout/d0b2c1b428b4143ec12637dd09b044d627e53767/src/Spanout/Level.hs
haskell
Generates bricks in randomly sized rows Splits a row of a given height randomly Fills the rectangle centered at the origin with bricks Fills the rectangle centered at the origin with bricks Calculates the vertical row centers based on the row heights, so the resulting list of rows is centered at the origin
module Spanout.Level (generateBricks) where import Spanout.Common import Control.Lens import Control.Monad import Control.Monad.Random import Data.Fixed import Linear generateBricks :: MonadRandom m => m [Brick] generateBricks = do relLevelHeight <- getRandomR (0.3, 0.6) relRowHeights <- splitRow relLevelHei...
95d5d35af06c5d266666f4438d0d29c3f9b94543414a60fc287ea73da3bc805e
decidedlyso/merge-insertion-sort
core.clj
(ns merge-insertion-sort.test.core (:require [clojure.test :refer :all] [merge-insertion-sort.core :as lib])) (deftest binary-search-insertion-point (testing "empty" (is (= 0 (lib/binary-search-insertion-point 1 [])))) (testing "start" (is (= 0 (lib/binary-search-insertion-point 0 [1])))) (te...
null
https://raw.githubusercontent.com/decidedlyso/merge-insertion-sort/91d33b6df64a00264360da8b0a29eb508e0cb7ea/test/merge_insertion_sort/test/core.clj
clojure
(ns merge-insertion-sort.test.core (:require [clojure.test :refer :all] [merge-insertion-sort.core :as lib])) (deftest binary-search-insertion-point (testing "empty" (is (= 0 (lib/binary-search-insertion-point 1 [])))) (testing "start" (is (= 0 (lib/binary-search-insertion-point 0 [1])))) (te...
763f568d24e666c09479a209aebe3357307fd1a82ed727203861e2603e66e4e1
lmj/lfarm
promise-test.lisp
Copyright ( c ) 2013 , . 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 c...
null
https://raw.githubusercontent.com/lmj/lfarm/f7ba49f1ec01fb99a7aeb8f18e245a44411c361b/lfarm-test/promise-test.lisp
lisp
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 in binary...
Copyright ( c ) 2013 , . All rights reserved . " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR T...
925b88f564fc235db73e0d712c9abd65325efa60b728cf19a5b820d08cecaaab
probprog/anglican
gradients.cljc
(ns anglican.gradients (:refer-clojure :exclude [rand rand-int rand-nth]) (:require [clojure.core.matrix :as m :refer [mul div add sub mmul]] [clojure.core.matrix.linear :as linalg] [anglican.runtime :refer [finite? log pow exp normal gamma exponential b...
null
https://raw.githubusercontent.com/probprog/anglican/ab6111d7fa8f68f42ea046feab928ca3eedde1d7/src/anglican/gradients.cljc
clojure
Math functions required by gradients Gradient protocol Note that grad-log may take its gradients with respect to different parameters than those used to define the distribution --- for example, the gradient for `anglican.runtime.normal-distribution` is with respect to the mean and the log of the standard deviati...
(ns anglican.gradients (:refer-clojure :exclude [rand rand-int rand-nth]) (:require [clojure.core.matrix :as m :refer [mul div add sub mmul]] [clojure.core.matrix.linear :as linalg] [anglican.runtime :refer [finite? log pow exp normal gamma exponential b...
faae70940b303b8cf9e6dde248a13371d3a5a9823f07c0963de21ea5167b4eb1
mirage/ocaml-cohttp
make.ml
module Request (IO : S.IO) = struct include Cohttp.Request include ( Private.Make (IO) : module type of Private.Make (IO) with type t := t) end module Response (IO : S.IO) = struct include Cohttp.Response include ( Private.Make (IO) : module type of Private.Make (IO) with type t := t) end
null
https://raw.githubusercontent.com/mirage/ocaml-cohttp/3db1a7766a30978f2ce337afba32f8658812384a/cohttp-lwt/src/make.ml
ocaml
module Request (IO : S.IO) = struct include Cohttp.Request include ( Private.Make (IO) : module type of Private.Make (IO) with type t := t) end module Response (IO : S.IO) = struct include Cohttp.Response include ( Private.Make (IO) : module type of Private.Make (IO) with type t := t) end
881e01dcc414f5a0a62bb375c80f3ed1ac1f7c6cb759a3335501465d24415601
dparis/gen-phzr
input_handler.cljs
(ns phzr.impl.accessors.input-handler) (def input-handler-get-properties {:allow-horizontal-drag "allowHorizontalDrag" :allow-vertical-drag "allowVerticalDrag" :bounds-rect "boundsRect" :bounds-sprite "boundsSprite" :bring-to-top "bringToTop" :consume-pointer-event "consumePointerEvent" :drag-from-...
null
https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/impl/accessors/input_handler.cljs
clojure
(ns phzr.impl.accessors.input-handler) (def input-handler-get-properties {:allow-horizontal-drag "allowHorizontalDrag" :allow-vertical-drag "allowVerticalDrag" :bounds-rect "boundsRect" :bounds-sprite "boundsSprite" :bring-to-top "bringToTop" :consume-pointer-event "consumePointerEvent" :drag-from-...
8acf80c56b7629d1c4b3c8c8cbb8e65003e3c5d6e4097e48343ab845a4bb69ca
greglook/merkle-db
index_test.clj
(ns merkle-db.index-test (:require [clojure.set :as set] [clojure.spec.alpha :as s] [clojure.string :as str] [clojure.test :refer :all] [clojure.test.check.generators :as gen] [com.gfredericks.test.chuck.clojure-test :refer [checking]] [com.gfredericks.test.chuck.generators :as tcgen] ...
null
https://raw.githubusercontent.com/greglook/merkle-db/449f58005cac0390a40ea15f9bf5403443f3be7d/lib/core/test/merkle_db/index_test.clj
clojure
A / \ B C /|\ / \ TODO: identical? would be a stronger guarantee here ..W.. / \ A X / \ / \ B C Y Z /|\ / \ / \ / \ ..X'. / | \ C Y Z / \ / \ / \ 3 4 5 6 7 8 ..A'. / | \ B C Z / \ / \ / \ ## Generative Tests
(ns merkle-db.index-test (:require [clojure.set :as set] [clojure.spec.alpha :as s] [clojure.string :as str] [clojure.test :refer :all] [clojure.test.check.generators :as gen] [com.gfredericks.test.chuck.clojure-test :refer [checking]] [com.gfredericks.test.chuck.generators :as tcgen] ...
81435df7878e9918e1e00d7fd1234a5652d075ce59eceb5d7c116d65aaec539e
codecrafters-io/build-your-own-grep
RegEx.hs
# OPTIONS_GHC -Wno - missing - export - lists # {-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} {-# HLINT ignore "Use list comprehension" #-} module RegEx where import Data.Char (isDigit, isAlphaNum) type M a = [a] -> [[a]] singleM :: (a -> Bool) -> M a singleM _ [] = [] singleM p (c:cs) = if p c then [cs] else [] ...
null
https://raw.githubusercontent.com/codecrafters-io/build-your-own-grep/085a70404357c4abf11ff7c039cdf13181349e3c/solutions/haskell/11-wildcard/code/src/RegEx.hs
haskell
# OPTIONS_GHC -Wno-unrecognised-pragmas # # HLINT ignore "Use list comprehension" # | Lets now look at some extreme matchers that we can use as identity elements in our later operations and properties | A matcher that matches nothing. Equivalent to the 'empty set' or '∅' or '0' from the theory of regular languages. ...
# OPTIONS_GHC -Wno - missing - export - lists # module RegEx where import Data.Char (isDigit, isAlphaNum) type M a = [a] -> [[a]] singleM :: (a -> Bool) -> M a singleM _ [] = [] singleM p (c:cs) = if p c then [cs] else [] posLit :: Eq a => a -> M a posLit c = singleM (== c) negLit :: Eq a => a -> M a negLit c =...
1306cff356c8e88f0a321339965d46c98612e617ac070a224ebc1479b7ebb34a
BitGameEN/bitgamex
erlcloud_ddb2_tests.erl
-*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*- -module(erlcloud_ddb2_tests). -include_lib("eunit/include/eunit.hrl"). -include("erlcloud.hrl"). -include("erlcloud_ddb2.hrl"). %% Unit tests for ddb. These tests work by using to mock erlcloud_httpc . There are two classes of test : inp...
null
https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/erlcloud/test/erlcloud_ddb2_tests.erl
erlang
Unit tests for ddb. Input tests verify that different function args produce the desired JSON request. An input test list provides a list of funs and the JSON that is expected to result. Output tests verify that the http response produces the correct return from the fun. An output test lists provides a list of re...
-*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*- -module(erlcloud_ddb2_tests). -include_lib("eunit/include/eunit.hrl"). -include("erlcloud.hrl"). -include("erlcloud_ddb2.hrl"). These tests work by using to mock erlcloud_httpc . There are two classes of test : input and output . -defin...
b9e59b6b770f4da7ca847d75242484b3c9449e9f59aa4c1afdf6498bdca3e859
gonimo/gonimo
I18N.hs
module Gonimo.I18N where import Data.Text import Data.Aeson.Types (FromJSON, ToJSON (..), defaultOptions, genericToJSON, genericToEncoding) import GHC.Generics data Locale = DE_DE | EN_GB deriving (Show, Eq, Generic) -- Probably not a goo...
null
https://raw.githubusercontent.com/gonimo/gonimo/f4072db9e56f0c853a9f07e048e254eaa671283b/gonimo-common/src/Gonimo/I18N.hs
haskell
Probably not a good idea, but we need it.
module Gonimo.I18N where import Data.Text import Data.Aeson.Types (FromJSON, ToJSON (..), defaultOptions, genericToJSON, genericToEncoding) import GHC.Generics data Locale = DE_DE | EN_GB deriving (Show, Eq, Generic) instance Semigroup Lo...
5b73561de6cdd1be62f48536380c7b8b1fafd9726a291af9d0e2d74073955e26
pfdietz/ansi-test
loop7.lsp
;-*- Mode: Lisp -*- Author : Created : Mon Nov 11 21:40:05 2002 ;;;; Contains: Tests for FOR-AS-PACKAGE clause for LOOP (defpackage "LOOP.CL-TEST.1" (:use) (:intern "FOO" "BAR" "BAZ") (:export "A" "B" "C")) (defpackage "LOOP.CL-TEST.2" (:use "LOOP.CL-TEST.1") (:intern "X" "Y" "Z")) (deftes...
null
https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/iteration/loop7.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests for FOR-AS-PACKAGE clause for LOOP are of the cases that the package is not supplied in the loop form. Cases where the package doesn't exist. According to the standard, NIL d-var-specs Type specs Tests of the 'as' form Test that explicit calls to macroexpand in subforms ...
Author : Created : Mon Nov 11 21:40:05 2002 (defpackage "LOOP.CL-TEST.1" (:use) (:intern "FOO" "BAR" "BAZ") (:export "A" "B" "C")) (defpackage "LOOP.CL-TEST.2" (:use "LOOP.CL-TEST.1") (:intern "X" "Y" "Z")) (deftest loop.7.1 (sort (mapcar #'symbol-name (loop for x being the s...
b21293e00253aebda028ba2bfa27ece702848d2a1d813dad19cee4488b68477e
tov/shcaml
proc.cppo.ml
* The idea of Proc is to abstract away UNIX processes into something * more manageable from OCaml . To this end , we create abstract Proc.t * objects that we store in a weak table ; a SIGCHLD handler collects the * exit status of child processes and stores them in the Proc.t objects * in this table , w...
null
https://raw.githubusercontent.com/tov/shcaml/43ae852a00e3a11520f90f2451baa71863409774/lib/proc.cppo.ml
ocaml
Because of what is apparenly a bug in Utop * (), we have to use [Lwt_unix.fork] * instead of [Unix.fork] in shcaml for it to work with Utop. * As a workaround, we depend optionally on lwt, and detect at compile time if * it is installed. If so, we use [Lwt_unix.fork]. We should just clear the table, but we nee...
* The idea of Proc is to abstract away UNIX processes into something * more manageable from OCaml . To this end , we create abstract Proc.t * objects that we store in a weak table ; a SIGCHLD handler collects the * exit status of child processes and stores them in the Proc.t objects * in this table , w...
99c5c3d618437bc02b86d03014ef785c930a39391a5db35372aa8886c263ce16
namin/Communication-Bootstrapping-v1
testbed.scm
The system consists of two talkers , each with a feature - bus coming ;; in, and a comm-line connecting. The state of this system can be described as a list of five elements : ( feat1 talker1 comm talker2 feat2 ) ;; Starting pattern for a instance ( ( ( f1 1 ) ( f2 2 ) ) imap1 ( ) imap2 ( ) ) ;; or ...
null
https://raw.githubusercontent.com/namin/Communication-Bootstrapping-v1/aeeca7a7ea3c2c91cca9ba35b9e89738ac0e18e5/testbed.scm
scheme
in, and a comm-line connecting. Starting pattern for a instance or Run a test by A feature set is defined as follows: subject, object, action, instrument, place (YES, IT'S PRETTY ARBITRARY: I JUST WANT A DECENT-SIZED SPACE) Normal Set leg cup butterfly dog cat turtle door window car ham...
The system consists of two talkers , each with a feature - bus coming The state of this system can be described as a list of five elements : ( feat1 talker1 comm talker2 feat2 ) ( ( ( f1 1 ) ( f2 2 ) ) imap1 ( ) imap2 ( ) ) ( ( ( f1 1 ) ( f2 2 ) ) imap 1 ( ) imap2 ( ( f1 1 ) ( f2 2 ) ) ) update imap...
5dc3d6c9ed23b49d41c96cabb1d403e9d859395853b1772d59509b0d3d73441d
anuyts/menkar
Syntax.hs
# LANGUAGE DataKinds , KindSignatures , GADTs , TypeOperators , RankNTypes , # # LANGUAGE TemplateHaskell # module Menkar.Fine.Syntax.Syntax where import Menkar.System.Basic import Menkar.System.Fine.Syntax import Menkar.Fine.Syntax.Substitution hiding (Expr (..)) import Menkar.Basic.Context import qualified Menkar...
null
https://raw.githubusercontent.com/anuyts/menkar/1f00e9febd1e9ed70c138ae8232b1c72a17d31da/menkar/src/Menkar/Fine/Syntax/Syntax.hs
haskell
----------------- ----------------- ----------------- Segment info will have to depend on v, because 'resolves' annotations have variables DependentModality { dmodDom : : mode v , dmodCod : : mode ( Maybe v ) , dmodMod : : v } DependentModality {dmodDom :: mode v, dmodCod :: mode (Maybe v), dmodMod :: modty v} | Lo...
# LANGUAGE DataKinds , KindSignatures , GADTs , TypeOperators , RankNTypes , # # LANGUAGE TemplateHaskell # module Menkar.Fine.Syntax.Syntax where import Menkar.System.Basic import Menkar.System.Fine.Syntax import Menkar.Fine.Syntax.Substitution hiding (Expr (..)) import Menkar.Basic.Context import qualified Menkar...
9b93385aad7e074c69d0d6cbbc965afeb508b228d406ff112ae80c2b983a8930
bjorng/wings
e3d__png.erl
%% %% e3d__png.erl -- %% Functions for reading and writing PNG files . %% Copyright ( c ) 2005 - 2011 %% %% See the file "license.terms" for information on usage and redistribution %% of this file, and for a DISCLAIMER OF ALL WARRANTIES. %% %% $Id$ %% -module(e3d__png). -export([load/1,load/2,save/2,...
null
https://raw.githubusercontent.com/bjorng/wings/1e2c2d62e93a98c263b167c7a41f8611e0ff08cd/e3d/e3d__png.erl
erlang
e3d__png.erl -- See the file "license.terms" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. $Id$ -compile(export_all). %% testing -define(TC(Cmd), wings_util:tc(fun() -> Cmd end, ?MODULE, ?LINE)). pixels in the chunks. io:format("Sz Uncompressed ...
Functions for reading and writing PNG files . Copyright ( c ) 2005 - 2011 -module(e3d__png). -export([load/1,load/2,save/2,save/3,save_bin/1,save_bin/2]). -export([format_error/1, test/1, test/0]). -compile(inline). -include("e3d_image.hrl"). -define(MAGIC, 137,$P,$N,$G,$\r,$\n,26,$\n). -define(GREYSCAL...
a6e7459b2ffc572d61fa5192a507dc592a8ae2239c7f44bbecf9fc50ef221e4c
vraid/earthgen
heightmap-create.rkt
#lang typed/racket (require vraid/random vraid/struct "../grid-base.rkt" "heightmap-structs.rkt" math/flonum) (provide heightmap-create heightmap-function (struct-out heightmap-parameters) heightmap-parameters/kw) (define-type heightmap-function (grid-li...
null
https://raw.githubusercontent.com/vraid/earthgen/208ac834c02208ddc16a31aa9e7ff7f91c18e046/planet/heightmap/heightmap-create.rkt
racket
#lang typed/racket (require vraid/random vraid/struct "../grid-base.rkt" "heightmap-structs.rkt" math/flonum) (provide heightmap-create heightmap-function (struct-out heightmap-parameters) heightmap-parameters/kw) (define-type heightmap-function (grid-li...
5392bbd5b3273a09fdaf30e39b2300650ab4b9edb9d61d07a61595783a09a7a7
xtendo-org/saha
Parser.hs
module Saha.Parser ( source , template , Template(..) ) where import Control.Applicative import Data.Char import Data.Text import Data.Attoparsec.Text source :: Text -> Maybe ([(Text, Text)], Text) source x = case parse headers x of Done rest r -> Just (r, rest) _ -> Nothing headers :: Parser [(Text, Te...
null
https://raw.githubusercontent.com/xtendo-org/saha/e2774cdbc7e5147e7178342317083ea2ee8e7a75/library/Saha/Parser.hs
haskell
module Saha.Parser ( source , template , Template(..) ) where import Control.Applicative import Data.Char import Data.Text import Data.Attoparsec.Text source :: Text -> Maybe ([(Text, Text)], Text) source x = case parse headers x of Done rest r -> Just (r, rest) _ -> Nothing headers :: Parser [(Text, Te...
39fbdbd354b6912d0a7828ae0e78fe90b3083e49bbcfcb8b8ecc45c5e0e0d936
jnjcc/cl-qrencode-deprecated
qr-encode-testcase.lisp
Copyright ( C ) 2010 , 2011 johnc < > ;; ;; 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 2 , or ( at your option ) ;; any later version. ;; ;; This program is distributed in ...
null
https://raw.githubusercontent.com/jnjcc/cl-qrencode-deprecated/b31498adf81d771310be871ff6a50bd54f574336/tests/qr-encode-testcase.lisp
lisp
This program is free software; you can redistribute it and/or modify either version 2 , 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 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Se...
Copyright ( C ) 2010 , 2011 johnc < > it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License (in-package #:cl-qrencode) (defvar *data* "00100000010000011100110101000101001010011101110000101\ 11010000000111011000010101010011111010...
d0f134845e2fedc2f506631a2606cb866f9f011c5bdeecdbb40643d946ef617c
hyperfiddle/electric
gather.cljc
(ns hyperfiddle.electric.impl.gather (:require [hyperfiddle.electric.impl.failer :as failer]) #?(:clj (:import (clojure.lang IDeref IFn))) #?(:cljs (:require-macros [hyperfiddle.electric.impl.gather :refer [aget-aset]]))) #?(:clj (defmacro aget-aset [arr idx val] `(let [a# ~arr i# ~idx ...
null
https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/src/hyperfiddle/electric/impl/gather.cljc
clojure
0: iterator ^ Reflection optimization: no static method RT.aset instead.
(ns hyperfiddle.electric.impl.gather (:require [hyperfiddle.electric.impl.failer :as failer]) #?(:clj (:import (clojure.lang IDeref IFn))) #?(:cljs (:require-macros [hyperfiddle.electric.impl.gather :refer [aget-aset]]))) #?(:clj (defmacro aget-aset [arr idx val] `(let [a# ~arr i# ~idx ...
233fd4819193e40782629795bda6d3126c100ba565ad47c444820e0e0415a43e
ocaml-ppx/ppx
gen_versions.mli
val print_unversioned_types : unit -> unit val print_version_mli : Astlib.Version.t -> unit val print_version_ml : Astlib.Version.t -> unit
null
https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/ast/cinaps/gen_versions.mli
ocaml
val print_unversioned_types : unit -> unit val print_version_mli : Astlib.Version.t -> unit val print_version_ml : Astlib.Version.t -> unit