_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
8fb7f3dc2e9540bdf7a04a447289e5bfda84fc6180d13d2dacd006ba2af36e7b
camllight/camllight
librar.ml
(* librar.ml : builds a library by concatenating bytecode object files *) #open "misc";; #open "emit_phr";; let offset_compiled_phrase ofs cp = { cph_pos = cp.cph_pos + ofs; cph_len = cp.cph_len; cph_reloc = cp.cph_reloc; cph_events = cp.cph_events; cph_pure = cp.cph_pure } ;; let add_to_library ou...
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/src/librar/librar.ml
ocaml
librar.ml : builds a library by concatenating bytecode object files
#open "misc";; #open "emit_phr";; let offset_compiled_phrase ofs cp = { cph_pos = cp.cph_pos + ofs; cph_len = cp.cph_len; cph_reloc = cp.cph_reloc; cph_events = cp.cph_events; cph_pure = cp.cph_pure } ;; let add_to_library outchan (offset, index_rest) filename = try let inchan = open_in_bin (...
36a6057821cf4d40ae5ba41f0a4d116e72d3a4603ebd5c654d299181598bba04
utahstreetlabs/parseapp-cljs
parse_macros.clj
(ns parseapp-cljs.parse-macros (:require [cljs.core.async.macros :refer [go]])) (defmacro defdrpc [name args & body] `(.define (.-Cloud js/Parse) ~(str name) (fn ~args ~@body))) (defmacro defjob [name args & body] `(.job (.-Cloud js/Parse) ~(str name) (fn ~args ~@body))) (defmacro defhook [class hook-name args...
null
https://raw.githubusercontent.com/utahstreetlabs/parseapp-cljs/577db251d984ad193cf8504cf334fd58a8b29fc1/src/clj/parseapp_cljs/parse_macros.clj
clojure
(ns parseapp-cljs.parse-macros (:require [cljs.core.async.macros :refer [go]])) (defmacro defdrpc [name args & body] `(.define (.-Cloud js/Parse) ~(str name) (fn ~args ~@body))) (defmacro defjob [name args & body] `(.job (.-Cloud js/Parse) ~(str name) (fn ~args ~@body))) (defmacro defhook [class hook-name args...
d4d33f4d47b1dc6b1494d72b6e93003c3e93781503092cf5011b4f9831ca726e
ryanpbrewster/haskell
P191.hs
module Problems.P191 ( solve ) where -- 191.hs - A particular school offers cash rewards to children with good attendance and - punctuality . If they are absent for three consecutive days or late on more - than one occasion then they forfeit their prize . - - During an n - day period a trinary strin...
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/src/Problems/P191.hs
haskell
191.hs
module Problems.P191 ( solve ) where - A particular school offers cash rewards to children with good attendance and - punctuality . If they are absent for three consecutive days or late on more - than one occasion then they forfeit their prize . - - During an n - day period a trinary string is forme...
35cf20cb8da0823622cb7af458e12648e1c7d1de2be3a7e15fea7b91ec126cfb
jserot/lascar
mealy.mli
(**********************************************************************) (* *) LASCAr (* *) Copyright ( c ) 2017 - prese...
null
https://raw.githubusercontent.com/jserot/lascar/79bd11cd0d47545bccfc3a3571f37af065915c83/src/lib/mealy.mli
ocaml
******************************************************************** This source code is licensed under the lic...
LASCAr Copyright ( c ) 2017 - present , . All rights reserved . * Mealy machines . A Mealy machine M is a LTS for which transition labels are pairs of input and output variable boolean valuations . A Mealy machine M is a LTS for ...
2115219b4eb99df1bcdf08f14160f845e9d657d6427747b0d18940f559c61aa9
wangsix/VMO_repeated_themes_discovery
converter.lisp
;(in-package :common-lisp-user) (load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "csv-files" :type "lisp") *MCStylistic-Mar2013-functions-path*)) (load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "kern-by-col" :type "li...
null
https://raw.githubusercontent.com/wangsix/VMO_repeated_themes_discovery/0082b3c55e64ed447c8b68bcb705fd6da8e3541f/JKUPDD-Oct2013/groundTruth/beethovenOp2No1Mvt3/monophonic/script/converter.lisp
lisp
(in-package :common-lisp-user) mono, no anacrusis.
(load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "csv-files" :type "lisp") *MCStylistic-Mar2013-functions-path*)) (load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "kern-by-col" :type "lisp") *MCStylistic-Mar2013-func...
1fcf1ca4c446335074d694a443827f744e4d9c01d350ec05d49240d840b7c9d2
melhadad/fuf
ir10.lisp
;;; -*- Mode:Lisp; Syntax:Common-Lisp; -*- ;;; ------------------------------------------------------------ ;;; File : IR10.LISP ;;; Description : Sample inputs to test GR10. Author : and Created : Aug 14 91 Modified : Sep 17 91 Added relative examples ;;; Language : Common Lisp ;;; -...
null
https://raw.githubusercontent.com/melhadad/fuf/57bd0e31afc6aaa03b85f45f4c7195af701508b8/examples/ir10.lisp
lisp
-*- Mode:Lisp; Syntax:Common-Lisp; -*- ------------------------------------------------------------ File : IR10.LISP Description : Sample inputs to test GR10. Language : Common Lisp ------------------------------------------------------------ T74 T75 T76 T77 T97 T101 ...
Author : and Created : Aug 14 91 Modified : Sep 17 91 Added relative examples (in-package "FUG5") The following tests are incorrect : ( T15 - BIS T52 T53 T54 T55 T56 T57 T58 T59 T60 T61 T62 T63 T64 T65 T66 T67 T68 T69...
ca95eebae7168954bbb03561c7c2f89fe6004f7589b34974b843e3246b130b3a
cgoldammer/haskell-chess
Main.hs
# LANGUAGE OverloadedStrings , FlexibleInstances , ScopedTypeVariables # module Main (main) where import Data.Either.Combinators as EitherC import Data.List import Data.Either import Chess.Pgn.Logic as Pgn main = do let number = 100 let file = "test/files/many.pgn" games <- getGames file number print "NUMB...
null
https://raw.githubusercontent.com/cgoldammer/haskell-chess/6611a29db74e80ca10f1b3122495a0f83abcb337/profileApp/Main.hs
haskell
let total = length games stack exec -- profile-exe +RTS -sstderr
# LANGUAGE OverloadedStrings , FlexibleInstances , ScopedTypeVariables # module Main (main) where import Data.Either.Combinators as EitherC import Data.List import Data.Either import Chess.Pgn.Logic as Pgn main = do let number = 100 let file = "test/files/many.pgn" games <- getGames file number print "NUMB...
82faa40ca78607e8a818aff6213d74c4893e25cde6fb3e38f6fda40c58da7dbf
gfngfn/apbuf
genElm.ml
open Types module Constant : GenMlScheme.CONSTANT = struct let fun_decode_field = "Json.Decode.field" let fun_decode_and_then = ("Json.Decode.andThen", true) let fun_decode_map = "Json.Decode.map" let fun_decode_succeed = "Json.Decode.succeed" let fun_decode_fail = "Json.Decode.fail" let fun...
null
https://raw.githubusercontent.com/gfngfn/apbuf/8f5cfb009d6e07236d3ac5aacfd4247017f20cc1/src/genElm.ml
ocaml
TODO: make less ad-hoc
open Types module Constant : GenMlScheme.CONSTANT = struct let fun_decode_field = "Json.Decode.field" let fun_decode_and_then = ("Json.Decode.andThen", true) let fun_decode_map = "Json.Decode.map" let fun_decode_succeed = "Json.Decode.succeed" let fun_decode_fail = "Json.Decode.fail" let fun...
266237b208ae417a5e1b5847075d7ab5ccd5f23c84b246d91a6f645c65e04144
OCamlPro/ez_search
useParmap.yes.ml
include Parmap
null
https://raw.githubusercontent.com/OCamlPro/ez_search/c88d536c2c9470daa1f82ba1786bcd9bc02fd63f/src/ez_search/useParmap.yes.ml
ocaml
include Parmap
f50f1f96248d7902f06a08dc8571dc6853bdc973481cd31bf83bd5fba0b9404a
gregtatcam/imaplet-lwt
parser_intf.mli
type 'a token = [`Token of 'a | `Eof] type 'a continue = [`Continue of 'a | `End ] (* API functions for parser creators *) module Comm : sig type ('a, 'b) t (* Basic actions to produce tokens *) val put : 'a -> 'b -> ('a, 'b) t val continue : 'a -> ('a, 'b) t (* Advance functions to produce tokens *) ...
null
https://raw.githubusercontent.com/gregtatcam/imaplet-lwt/d7b51253e79cffa97e98ab899ed833cd7cb44bb6/lib/parsemail/parser_intf.mli
ocaml
API functions for parser creators Basic actions to produce tokens Advance functions to produce tokens In-band signaling An error from which the parser can recover has ocurred A fatal error from which the parser can't recover has ocurred Mappings between languages of different fertility Extended signature...
type 'a token = [`Token of 'a | `Eof] type 'a continue = [`Continue of 'a | `End ] module Comm : sig type ('a, 'b) t val put : 'a -> 'b -> ('a, 'b) t val continue : 'a -> ('a, 'b) t val put_opt : 'a -> 'b option -> ('a, 'b) t val put_list : 'a -> 'b list -> ('a, 'b) t val warning : 'a -> msg:str...
39531bd2e048d146e34167aba0aa9b176b582ec3ec11efb66030d6b05487a085
danielmiladinov/joy-of-clojure
nil_pun_with_care.clj
;; Nil pun with care ;; --------------------------------------------------------------------------------------------------------------------- Because empty collections act like true in Boolean contexts , you need an idiom for testing whether there 's anything in a collection to process . Thankfully , Clojure provid...
null
https://raw.githubusercontent.com/danielmiladinov/joy-of-clojure/cad7d1851e153beb12a2cd536eb467be12cb7a73/src/joy-of-clojure/chapter3/nil_pun_with_care.clj
clojure
Nil pun with care --------------------------------------------------------------------------------------------------------------------- => nil The seq function returns a sequence view of a collection, or nil if the collection is empty. In a language like Common Lisp, an empty list acts as a false value and can be u...
Because empty collections act like true in Boolean contexts , you need an idiom for testing whether there 's anything in a collection to process . Thankfully , Clojure provides such a technique : (seq [1 2 3]) = > ( 1 2 3 ) (seq []) determining a looping termination . As you saw earlier , Clojure 's empty seque...
b4587c3ac0e836096f87ed84bc9b461de237ce5b37bbc069b811ef92e49b66d0
koji-kojiro/matplotlib-cl
matplotlib-cl.lisp
(defpackage #:matplotlib-cl (:nicknames #:plt) (:use #:cl) (:shadow #:close #:fill #:get #:step) (:export #:*pyplot-functions*)) (in-package :matplotlib-cl) (eval-when (:compile-toplevel :load-toplevel :execute) (burgled-batteries:startup-python) (handler-case (burgled-batteries:run* "import matplotli...
null
https://raw.githubusercontent.com/koji-kojiro/matplotlib-cl/ccb11c60e38c72dc2cede31e739b526d7d331283/src/matplotlib-cl.lisp
lisp
(defpackage #:matplotlib-cl (:nicknames #:plt) (:use #:cl) (:shadow #:close #:fill #:get #:step) (:export #:*pyplot-functions*)) (in-package :matplotlib-cl) (eval-when (:compile-toplevel :load-toplevel :execute) (burgled-batteries:startup-python) (handler-case (burgled-batteries:run* "import matplotli...
688847f07e6adc1c9a9d14a98d77c128a1e3a99875fefe0e2c14096ee2b36817
Eduap-com/WordMat
cmf5kb.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $...
null
https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/fftpack5/lisp/cmf5kb.lisp
lisp
Compiled by f2cl version: Using Lisp CMU Common Lisp snapshot-2020-04 (21D Unicode) Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format single-float))
( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl6.l , v 1d5cbacbb9...
9d1a10d1e21e1b4d1349ee6370162929b98bd3b2824ca6db2e11c13392db1828
BranchTaken/Hemlock
test_partition_tf.ml
open! Basis.Rudiments open! Basis open! OrdmapTest open Ordmap let test () = let test arr = begin let ordmap = of_karray arr in let t_ordmap, f_ordmap = partition_tf ordmap ~f:(fun (k, _) -> k % 2L = 0L) in let t_arr = to_array t_ordmap in let f_arr = to_array f_ordmap in File.Fmt.stdout |> (...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/ed397cf3294ca397024e69eb3b1ed5f1db773db6/bootstrap/test/basis/ordmap/test_partition_tf.ml
ocaml
open! Basis.Rudiments open! Basis open! OrdmapTest open Ordmap let test () = let test arr = begin let ordmap = of_karray arr in let t_ordmap, f_ordmap = partition_tf ordmap ~f:(fun (k, _) -> k % 2L = 0L) in let t_arr = to_array t_ordmap in let f_arr = to_array f_ordmap in File.Fmt.stdout |> (...
11cdeaa1d6ac5ab59fdbf99b3ba66bbfeece0f28e5fddfae87d01ea31c5e171c
racket/scribble
info.rkt
#lang info (define test-responsibles '((all eli)))
null
https://raw.githubusercontent.com/racket/scribble/beb2d9834169665121d34b5f3195ddf252c3c998/scribble-html-lib/scribble/html/info.rkt
racket
#lang info (define test-responsibles '((all eli)))
36c43561afc256d807cfde722fc4b26cee855fb1a023ad01da78dfb5cc995719
timbertson/passe
server_config.ml
module type Sig = sig val is_sandstorm : unit -> bool end
null
https://raw.githubusercontent.com/timbertson/passe/467a79ea0cd7b08a97b52be3bd1307a3bdf55799/src/server/server_config.ml
ocaml
module type Sig = sig val is_sandstorm : unit -> bool end
0359126aff81da77eba6751c42bab81a4ad25f4cb2e8c94c25ef4a333a64713f
composewell/streamly
Prelude.hs
# OPTIONS_GHC -Wno - deprecations # #include "inline.hs" -- | Module : Streamly . Prelude Copyright : ( c ) 2017 Composewell Technologies -- -- License : BSD3 -- Maintainer : -- Stability : released Portability : GHC -- -- To run examples in this module: -- > > > import qualified Streamly . D...
null
https://raw.githubusercontent.com/composewell/streamly/8629a0e806f5eea87d23650c540aa04176f25c43/src/Streamly/Prelude.hs
haskell
| License : BSD3 Maintainer : Stability : released To run examples in this module: We will add some more imports in the examples as needed. @n@ seconds: >>> import Control.Concurrent (threadDelay) >>> :{ delay n = do sleep for n seconds print " n sec " return n -- IO ...
# OPTIONS_GHC -Wno - deprecations # #include "inline.hs" Module : Streamly . Prelude Copyright : ( c ) 2017 Composewell Technologies Portability : GHC > > > import qualified Streamly . Data . Fold as Fold > > > import qualified Streamly . Prelude as Stream For effectful streams we will use the fo...
03435fb5d348a09651f5ab5eacccdd372bf5193f8184644a77caba7e6192fdd8
inconvergent/weir
math.lisp
(in-package :math) (deftype pos-int (&optional (bits 31)) `(unsigned-byte ,bits)) (declaim (inline clamp)) (defun clamp (v mi ma) (declare #.*opt-settings* (double-float v mi ma)) (max (min v ma) mi)) (declaim (inline last*)) (defun last* (l) (declare #.*opt-settings* (list l)) "last element of l" (firs...
null
https://raw.githubusercontent.com/inconvergent/weir/3c364e3a0e15526f0d6985f08a57b312b5c35f7d/src/math/math.lisp
lisp
RANGES LIST MATH OTHER
(in-package :math) (deftype pos-int (&optional (bits 31)) `(unsigned-byte ,bits)) (declaim (inline clamp)) (defun clamp (v mi ma) (declare #.*opt-settings* (double-float v mi ma)) (max (min v ma) mi)) (declaim (inline last*)) (defun last* (l) (declare #.*opt-settings* (list l)) "last element of l" (firs...
45f33d648f7db32db19d695a36826a4971b8c5e3fbbad6cf003308b8e2505946
dbuenzli/uunf
uunf_tmap.ml
--------------------------------------------------------------------------- Copyright ( c ) 2012 The uunf programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) ...
null
https://raw.githubusercontent.com/dbuenzli/uunf/e4209d351123bd646e8ddc22bd8941157fb3de25/src/uunf_tmap.ml
ocaml
default value. 0x10F + 1
--------------------------------------------------------------------------- Copyright ( c ) 2012 The uunf programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) ...
12276ed22690f48cf42325707a6e9e79435442d28d37aaab51303f8d25ea6a70
ghcjs/ghcjs-dom
TextEvent.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.TextEvent (js_initTextEvent, initTextEvent, js_getData, getData, TextEvent(..),...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/TextEvent.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | <-US/docs/Web/API/TextEvent.initTextEvent Mozilla TextEvent.initTextEvent documentation> | <-US/docs/Web/API/TextEvent.data Mozilla TextEvent.data documentation>
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.TextEvent (js_initTextEvent, initTextEvent, js_getData, getData, TextEvent(..), gTypeTextEvent) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Boo...
f53a7c33cf07affc2162f37efe0fd19739e32cee448ae6110feae402e6bf4cf2
webyrd/miniKanren-uncourse
muk.scm
;; microKanren in Scheme based on 2013 Scheme Workshop paper by and ;; -2013/papers/HemannMuKanren2013.pdf ;; ;; ;; concepts in a miniKanren-like implementation ;; -------------------------------------------- ;; ;; ability to create terms (numbers, pairs) ;; ;; logic variables ;; ability to introduce (lexi...
null
https://raw.githubusercontent.com/webyrd/miniKanren-uncourse/19bc2903266197d6ba6c6b818e0a196ea620377b/hangouts-by-date/02015-01-11/muk.scm
scheme
microKanren in Scheme -2013/papers/HemannMuKanren2013.pdf concepts in a miniKanren-like implementation -------------------------------------------- ability to create terms (numbers, pairs) logic variables ability to introduce (lexically scoped) fresh logic variables (fresh) unify terms == conjuncti...
based on 2013 Scheme Workshop paper by and disjuction [ or ] ( bewteen conde clauses ) (conde [g1 g2 g3] [g4] [g5 g6]) ) ) g2 g3) (run 1 (q) (run 1 (fresh (q) g1 g2 g3)) ) (disj (conj g1 (conj g2 g3)) (disj g4 (conj g5 g6))) (fresh (x y z) g1 g2 ...
4bcc9dccb75fec14930bb6d40dbc99931f35676eb6aa4b9d86a3ebce06d36558
fccm/glMLite
viewport.ml
Demonstration of view - ports Copyright ( C ) 2005 This program is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later vers...
null
https://raw.githubusercontent.com/fccm/glMLite/c52cd806909581e49d9b660195576c8a932f6d33/examples/viewport.ml
ocaml
Just a teapot and its frame Function called to update rendering Perspective projection Perspective view Right view Face view Top view End Creation of the window OpenGL settings glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA; Declaration of the callbacks Loop
Demonstration of view - ports Copyright ( C ) 2005 This program is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later vers...
81cf1d8f00d4a944b7dcb2e67f90884a247ca6262684397da40827d71e9b6f0c
GlideAngle/flare-timing
Cost.hs
module Flight.ShortestPath.Cost ( Zs(..) , PathCost(..) , GraphBuilder , NodeConnector , CostSegment , DistancePointToPoint , AngleCut(..) , fromZs ) where import Data.UnitsOfMeasure (u) import Data.Graph.Inductive.Graph (Node, LEdge) import Data.Graph.Inductive.PatriciaTree (Gr) i...
null
https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/task/library/Flight/ShortestPath/Cost.hs
haskell
^ All good, here's the wrapped value. ^ Zones are not separated. | A point to point distance with path function. | When searching some angles can be excluded. These are not in the initial sweep. During the search the sweep angle is reduced by the next sweep function.
module Flight.ShortestPath.Cost ( Zs(..) , PathCost(..) , GraphBuilder , NodeConnector , CostSegment , DistancePointToPoint , AngleCut(..) , fromZs ) where import Data.UnitsOfMeasure (u) import Data.Graph.Inductive.Graph (Node, LEdge) import Data.Graph.Inductive.PatriciaTree (Gr) i...
2a7ea93c8d362c29aef2a556747a0cb15d41838c6df6c74aa8850a756ec64eff
SRI-CSL/f3d
sysdef-more-gl-objects.lisp
(in-package :cl-user) ;;; subsystem to load gl-object classes that depend on basic-gui (st:define-system "more-gl-objects" :required-systems '(common-symbols gl transforms gl-objects basic-gui) :files '("image-object.lisp" "object-labels.lisp" "conjugate-point.lisp" ;; "terrain-grid.lisp" ...
null
https://raw.githubusercontent.com/SRI-CSL/f3d/93285f582198bfbab33ca96ff71efda539b1bec7/f3d-tk/ui-objects/sysdef-more-gl-objects.lisp
lisp
subsystem to load gl-object classes that depend on basic-gui "terrain-grid.lisp"
(in-package :cl-user) (st:define-system "more-gl-objects" :required-systems '(common-symbols gl transforms gl-objects basic-gui) :files '("image-object.lisp" "object-labels.lisp" "conjugate-point.lisp" ))
95cbab711d69833b978cd5999a63b0b655a46650182ec14d521bd42389e11f19
Melchizedek6809/Nujel
scheme.scm
(define (test-run i ret) (if (< i 10000000) (test-run (+ 1 i) (if (or (zero? (modulo i 3)) (zero? (modulo i 5))) (+ ret i) ret)) ret)) (display "The sum is: ") (display (test-run 0 0)) (newline)
null
https://raw.githubusercontent.com/Melchizedek6809/Nujel/ae4932671f0eda4eff4b0bdd2232865c16367f3b/benchmark/euler1/scheme.scm
scheme
(define (test-run i ret) (if (< i 10000000) (test-run (+ 1 i) (if (or (zero? (modulo i 3)) (zero? (modulo i 5))) (+ ret i) ret)) ret)) (display "The sum is: ") (display (test-run 0 0)) (newline)
76ce313c5a64e86b863624bbda06f715aee4117bb63eee9c47e6fdf65b49d529
janestreet/merlin-jst
functor_app.ml
module type X_int = sig val x : int end module Increment (M : X_int) = struct let x = M.x + 1 end module X = Increment(_);;
null
https://raw.githubusercontent.com/janestreet/merlin-jst/0152b4e8ef1b7cd0ddee2873aa1860a971585391/tests/test-dirs/construct/c-modules.t/functor_app.ml
ocaml
module type X_int = sig val x : int end module Increment (M : X_int) = struct let x = M.x + 1 end module X = Increment(_);;
c151535c72825b70eff041af367fe788ba1495b5d24979b3fba277ac75e4d1f9
cheecheeo/haskell-cgi
error.hs
import Network.CGI (CGI, CGIResult, runCGI, liftIO, output, handleErrors) cgiMain :: CGI CGIResult cgiMain = liftIO (readFile "foo") >> output "bar" main :: IO () main = runCGI (handleErrors cgiMain)
null
https://raw.githubusercontent.com/cheecheeo/haskell-cgi/a49660abdc5b711fcc99989f121eb4404bbde66c/examples/error.hs
haskell
import Network.CGI (CGI, CGIResult, runCGI, liftIO, output, handleErrors) cgiMain :: CGI CGIResult cgiMain = liftIO (readFile "foo") >> output "bar" main :: IO () main = runCGI (handleErrors cgiMain)
f403e789b6433c941131e2c97fd12a555d209f906ac377e06c02c6126e89adf6
mariari/Misc-Lisp-Scripts
pattern-matching.lisp
(eval-when (:compile-toplevel :load-toplevel :execute) (ql:quickload '(:fare-quasiquote-readtable :fare-quasiquote :trivia.quasiquote :trivia :let-over-lambda))) (defpackage #:match ;; (:nicknames) (:use #:trivia) (:use #:common-lisp)) (in...
null
https://raw.githubusercontent.com/mariari/Misc-Lisp-Scripts/acecadc75fcbe15e6b97e084d179aacdbbde06a8/pattern-matching.lisp
lisp
(:nicknames) (let ((x :x)) (match '(:x :y :z) (in-optimizer :trivia) broken? works ((guard (list* a b) (evenp a) a))) subpattern test-form subpattern test-form
(eval-when (:compile-toplevel :load-toplevel :execute) (ql:quickload '(:fare-quasiquote-readtable :fare-quasiquote :trivia.quasiquote :trivia :let-over-lambda))) (defpackage #:match (:use #:trivia) (:use #:common-lisp)) (in-package :match) ...
57d56be510c2be4e2f3f954b70b692e013f643b2c003f3b81352ce197d4a113c
richhickey/clojure-contrib
string.clj
str_utils3.clj -- functional string utilities for Clojure by , / January 26 , 2010 Copyright ( c ) , 2010 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse ;; Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of t...
null
https://raw.githubusercontent.com/richhickey/clojure-contrib/40b960bba41ba02811ef0e2c632d721eb199649f/src/main/clojure/clojure/contrib/string.clj
clojure
Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. This seems to be the fastest way to ite...
str_utils3.clj -- functional string utilities for Clojure by , / January 26 , 2010 Copyright ( c ) , 2010 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse (ns #^{:author "Stuart Sierra" :doc "This is a library of string manipulation functions...
cae27334fa4ad9428370eb02ee12f3f4ffdfe63e6f3236df1e169544b2468497
cl-axon/cl-aima
route-finding.lisp
;;; -*- Mode: Lisp; Syntax: Common-Lisp; -*- File: search/domains/route-finding ;;;; Find a Route Between Cities on a Map (defstructure (route-finding-problem (:include problem (initial-state 'A) (goal 'B))) "The problem of finding a route from one city to another on a map. By default it i...
null
https://raw.githubusercontent.com/cl-axon/cl-aima/1e6915fa9f3e5f2c6fd75952d674ebec53558d04/search/domains/route-finding.lisp
lisp
-*- Mode: Lisp; Syntax: Common-Lisp; -*- File: search/domains/route-finding Find a Route Between Cities on a Map We round this to the nearest integer, just to make things easier to read Now lay down the roads
(defstructure (route-finding-problem (:include problem (initial-state 'A) (goal 'B))) "The problem of finding a route from one city to another on a map. By default it is a random map. A state in a route-finding problem is just the name of the current city. Note that a more complicated ...
824048d6424711666045bbc630c4858b49e0b1943576e84199ff4b852949ae1f
tommaisey/aeon
cos-h.help.scm
;; (cos-h a) Cosine . (let* ((a (line kr (- pi) pi 1 remove-synth)) (b (sub (fdiv (cos-h a) (/ pi 2)) 1)) (f (mul-add b 900 1600))) (audition (out 0 (mul (sin-osc ar f 0) 0.1))))
null
https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/unary-ops/cos-h.help.scm
scheme
(cos-h a)
Cosine . (let* ((a (line kr (- pi) pi 1 remove-synth)) (b (sub (fdiv (cos-h a) (/ pi 2)) 1)) (f (mul-add b 900 1600))) (audition (out 0 (mul (sin-osc ar f 0) 0.1))))
b9a9c44c702b82cd817b88a6f4e035e60d131553283a038456518004496b52f8
AndrasKovacs/setoidtt
U.hs
module Data.Ref.U where import GHC.Prim import Data.Unlifted import qualified Data.Array.UM as UM type role Ref representational representational newtype Ref a b = Ref (UM.Array a) instance (Unlifted a, Unlifted b) => Unlifted (Ref a b) where type Rep (Ref a b) = MutableArrayArray# RealWorld to# (Ref (UM.Array...
null
https://raw.githubusercontent.com/AndrasKovacs/setoidtt/621aef2c4ae5a6acb418fa1153575b21e2dc48d2/setoidtt/primdata/Data/Ref/U.hs
haskell
# inline new # # inline read # # inline write # # inline modify #
module Data.Ref.U where import GHC.Prim import Data.Unlifted import qualified Data.Array.UM as UM type role Ref representational representational newtype Ref a b = Ref (UM.Array a) instance (Unlifted a, Unlifted b) => Unlifted (Ref a b) where type Rep (Ref a b) = MutableArrayArray# RealWorld to# (Ref (UM.Array...
8d376462411584a19b250b44878df426bf8b91259170ea6a835ee56da95620f2
jumarko/clojure-experiments
0402_most_frequent.clj
(ns clojure-experiments.purely-functional.puzzles.0402-most-frequent "-tv-newsletter-402-up-front-vs-incremental-design/. Find the most frequent element in the collection but you cannot use `frequencies`. Solutions here: " (:require [clojure.test :refer [deftest is testing]])) (defn most-frequent [coll] (whe...
null
https://raw.githubusercontent.com/jumarko/clojure-experiments/f0f9c091959e7f54c3fb13d0585a793ebb09e4f9/src/clojure_experiments/purely_functional/puzzles/0402_most_frequent.clj
clojure
(ns clojure-experiments.purely-functional.puzzles.0402-most-frequent "-tv-newsletter-402-up-front-vs-incremental-design/. Find the most frequent element in the collection but you cannot use `frequencies`. Solutions here: " (:require [clojure.test :refer [deftest is testing]])) (defn most-frequent [coll] (whe...
c89109ded485e5ab3101cdec6105c500260b2a11e3394d3c3a360b9640207dbe
dvdt/xvsy
stat.clj
(ns xvsy.stat "Statistic mapping functions for various SQL databases" (:require [xvsy.utils :refer [apply2]]) (:require [clojure.string] [korma.core] [korma.sql.engine :as eng] [korma.sql.fns :as sfns])) (def out-of-bounds "[]") (def db-stats "Holds an atom of a map of db =...
null
https://raw.githubusercontent.com/dvdt/xvsy/ff29b96affc6723bb9c66da1011f31900af679dd/src/clj/xvsy/stat.clj
clojure
TODO: make this conform with pg WIDTH_BUCKET
(ns xvsy.stat "Statistic mapping functions for various SQL databases" (:require [xvsy.utils :refer [apply2]]) (:require [clojure.string] [korma.core] [korma.sql.engine :as eng] [korma.sql.fns :as sfns])) (def out-of-bounds "[]") (def db-stats "Holds an atom of a map of db =...
ba41654266815e77496f12bb5bf7141e657890610ab9a4982c2a275e257840b9
fragnix/fragnix
GHC.IO.Handle.FD.hs
{-# LINE 1 "GHC.IO.Handle.FD.hs" #-} # LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude # ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.Handle.FD Copyright : ( c ) The University of Glasgow , 1994 - ...
null
https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/builtins/base/GHC.IO.Handle.FD.hs
haskell
# LINE 1 "GHC.IO.Handle.FD.hs" # --------------------------------------------------------------------------- | Module : GHC.IO.Handle.FD License : see libraries/base/LICENSE Maintainer : Stability : internal Portability : non-portable Handle operations implemented by file descriptors (FDs) ...
# LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude # Copyright : ( c ) The University of Glasgow , 1994 - 2008 module GHC.IO.Handle.FD ( stdin, stdout, stderr, openFile, openBinaryFile, openFileBlocking, mkHandleFromFD, fdToHandle, fdToHandle', isEOF ...
abfecd7c6f63b614383f2a287cf02efab582a5f7c61da3ecd2cc6a81442559c1
fluree/db
crud.clj
(ns json-ld.crud (:require [fluree.db.json-ld.api :as fluree] [fluree.db.util.async :refer [<?? go-try channel?]])) (comment (def ipfs-conn @(fluree/connect-ipfs {:server nil ;; use default ;; ledger defaults used for newly created ledgers ...
null
https://raw.githubusercontent.com/fluree/db/0080232f4ba257bb3979c4c9ba2d87c8bc2ad061/dev/json_ld/crud.clj
clojure
use default ledger defaults used for newly created ledgers publish to ipns by default using the provided key/profile should work OK delete everything for :ex/alice delete any :schema/age values for :ex/bob delete all subjects with a :schema/email predicate
(ns json-ld.crud (:require [fluree.db.json-ld.api :as fluree] [fluree.db.util.async :refer [<?? go-try channel?]])) (comment (def ipfs-conn @(fluree/connect-ipfs :indexer {:reindex-min-bytes 9000 :reindex-max-bytes 10000000} :cont...
a1acd96869946606419b11e836d1e39fa8863573a7250866a17102a571a3fd5d
li-clutter-org/http2-test
State.hs
# LANGUAGE OverloadedStrings , GeneralizedNewtypeDeriving , FlexibleInstances , MultiParamTypeClasses # This module plugs a worker ( check module ... MainLoop . Tokens , and there type StreamWorker ) and adapts it so that it speaks in frames . So , it implements translation between the generic tokens present a...
null
https://raw.githubusercontent.com/li-clutter-org/http2-test/38d6706511f93af875273f7702fa0ea8582d5d8e/hs-src/Rede/SpdyProtocol/Streams/State.hs
haskell
A dictionary from local id to (global) stream id Due to the use of Z here, this struct only makes sense inside the IO monad (or equivalent) the stream is always started by the browser What should I do when this stream finishes? A dictionary from local to global id of the streams... What should be the id of the n...
# LANGUAGE OverloadedStrings , GeneralizedNewtypeDeriving , FlexibleInstances , MultiParamTypeClasses # This module plugs a worker ( check module ... MainLoop . Tokens , and there type StreamWorker ) and adapts it so that it speaks in frames . So , it implements translation between the generic tokens present a...
2a8b6793f734ff6d2b48d2e8720b40ac78edf0008c1f5f6f0c46c6fbb066e677
gogins/csound-extended-nudruz
modes-todo.lisp
(require :asdf) (require :cm2) (require :fomus) (require :nudruz) (in-package :cm) ;; list of all pits in mode (defun allmodenotes (modename) (remove-duplicates (loop for x to 128 collect (keynum (note x :through modename))))) ;; vector of modal indices (defun allmodeindx (modename) (let ((allmdlen (length (a...
null
https://raw.githubusercontent.com/gogins/csound-extended-nudruz/4551d54890f4adbadc5db8f46cc24af8e92fb9e9/sources/modes-todo.lisp
lisp
list of all pits in mode vector of modal indices e.g., (= (length (allmodenotes octatonic)) (length (allmodeindx octatonic))) = T all non-mode pits are converted to 'R e.g. (allmodenotes pentatonic) = (0 2 4 7 9 12 14 .... (allmodenotes stravmode) = (0 2 3 5 7 8 10 12 13 15 ... MKG: Incomplete... (floor conv...
(require :asdf) (require :cm2) (require :fomus) (require :nudruz) (in-package :cm) (defun allmodenotes (modename) (remove-duplicates (loop for x to 128 collect (keynum (note x :through modename))))) (defun allmodeindx (modename) (let ((allmdlen (length (allmodenotes modename)))) (loop for x to (- allmdlen...
42e1eaeb804354512e14da76e454cde2c592e6a6746dbfb019d2df2159f1ba01
buntine/Simply-Scheme-Exercises
18-4.scm
; Write count-nodes, a procedure that takes a tree as argument and returns the ; total number of nodes in the tree. (Earlier we counted the number of leaf nodes.) note : This procedure will count all nodes , including leaves . To disregard all of the leaves , replace the 1 with a 0 in count - nodes ( ...
null
https://raw.githubusercontent.com/buntine/Simply-Scheme-Exercises/c6cbf0bd60d6385b506b8df94c348ac5edc7f646/18-trees/18-4.scm
scheme
Write count-nodes, a procedure that takes a tree as argument and returns the total number of nodes in the tree. (Earlier we counted the number of leaf nodes.)
note : This procedure will count all nodes , including leaves . To disregard all of the leaves , replace the 1 with a 0 in count - nodes ( case ) . (define (leaf? node) (null? (children node))) (define (count-nodes tree) (if (leaf? tree) 1 (+ 1 (count-nodes-in-forest (children tree))))) ...
3a40b11b752973e41d1a617e97be9c90744655cd24f1b6a65fbb40b50806a02b
portkey-cloud/aws-clj-sdk
_2017-11-27.clj
(ns portkey.aws.comprehend.-2017-11-27 (:require [portkey.aws])) (def endpoints '{"eu-west-1" {:credential-scope {:service "comprehend", :region "eu-west-1"}, :ssl-common-name "comprehend.eu-west-1.amazonaws.com", :endpoint "-west-1.amazonaws.com", :signature-version :v4}, "us-east-2" {:credenti...
null
https://raw.githubusercontent.com/portkey-cloud/aws-clj-sdk/10623a5c86bd56c8b312f56b76ae5ff52c26a945/src/portkey/aws/comprehend/_2017-11-27.clj
clojure
(ns portkey.aws.comprehend.-2017-11-27 (:require [portkey.aws])) (def endpoints '{"eu-west-1" {:credential-scope {:service "comprehend", :region "eu-west-1"}, :ssl-common-name "comprehend.eu-west-1.amazonaws.com", :endpoint "-west-1.amazonaws.com", :signature-version :v4}, "us-east-2" {:credenti...
90f96adc219baa8e12b5382600fd4710741b72e51904a58061829face3f2be42
ghc/ghc
Syntax.hs
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE NamedFieldPuns #-} # LANGUAGE UndecidableInstances # ( c ) The GRASP / AQUA ...
null
https://raw.githubusercontent.com/ghc/ghc/93f0e3c49cea484bd6e838892ff8702ec51f34c3/compiler/GHC/Stg/Syntax.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DataKinds # # LANGUAGE DeriveDataTypeable # # LANGUAGE TypeFamilies # # LANGUAGE NamedFieldPuns # a set of synonyms for the vanilla parameterisation a set of synonyms for the code gen parameterisation Same for taggedness a set of synonyms for t...
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE UndecidableInstances # ( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998 Shared term graph ( STG ) syntax for spineless - tagless code generation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...
827cdf5514f94e7d3a871291774a6d48cd48a54c48c2c119e9c14a84c6b03995
let-def/menhir
convert.ml
(**************************************************************************) (* *) Menhir (* *) , INRIA Ro...
null
https://raw.githubusercontent.com/let-def/menhir/e8ba7bef219acd355798072c42abbd11335ecf09/src/convert.ml
ocaml
************************************************************************ et en Automatique. All rig...
Menhir , INRIA Rocquencourt , PPS , Université Paris Diderot Copyright 2005 - 2008 Institut National de Recherche en Informatique under the terms of the GNU Library General Pu...
7095065a7bbadcb31af445b374989622d0f478ff6c1b3e3e6fd04394020c2fbb
ploeh/advent-of-code-2017
Solution.hs
module Day25 where import Data.List (find, unfoldr) import Data.Set (Set) import qualified Data.Set as Set import Prelude hiding (Left, Right) data TMachine = TMachine { cursorPosition :: Integer , currentState :: Char , tape :: Set Integer } deriving (Show, Eq) initialMachine :: Char -> TMachine initialMach...
null
https://raw.githubusercontent.com/ploeh/advent-of-code-2017/e0f66bf2735cf1e37fbcf001296fdda8df3ece8c/Day25/Solution.hs
haskell
While I could have written a parser for the instruction 'language' in the puzzle, it was faster to just translate the instuctions into the following instruction set. Tests
module Day25 where import Data.List (find, unfoldr) import Data.Set (Set) import qualified Data.Set as Set import Prelude hiding (Left, Right) data TMachine = TMachine { cursorPosition :: Integer , currentState :: Char , tape :: Set Integer } deriving (Show, Eq) initialMachine :: Char -> TMachine initialMach...
7fa7545b2d859043346de287d4ecf289901e1726676a62326e05235fcbb19485
mcimini/Gradualizer
GenerateAuxiliaryPredicates.hs
module GenerateAuxiliaryPredicates where import System.IO.Unsafe import Data.Unique import Data.Char import Data.List import TypeSystem import Static import TypeSystemForCC simples :: Int -> [TypeEntry] simples n = map (\i -> Simple "typ") [1 .. n] auxiliaryPred :: TypeSystem -> TypeSystem auxiliaryPred ts = (Ts (s...
null
https://raw.githubusercontent.com/mcimini/Gradualizer/9868c18590d6fc864f69b8136ac24616cb5df8ff/GenerateAuxiliaryPredicates.hs
haskell
module GenerateAuxiliaryPredicates where import System.IO.Unsafe import Data.Unique import Data.Char import Data.List import TypeSystem import Static import TypeSystemForCC simples :: Int -> [TypeEntry] simples n = map (\i -> Simple "typ") [1 .. n] auxiliaryPred :: TypeSystem -> TypeSystem auxiliaryPred ts = (Ts (s...
b95f6b63298a701554d3f21c565797144f5e4848ae5c44d38422f479553e9a7e
reborg/clojure-essential-reference
1.clj
(require '[clojure.string :as s]) < 1 > "Patterson, John: 'Once Upon a Time in the West'") < 2 > {\, "_comma_" \space "_space_" \. "_dot_" \' "_quote_" \: "_colon_" \newline "_newline_"}) (s/escape link link-escape) ; <3> ;; "Patterson_comma__space_John_colon__space__quote_Once_space_Upon_ ;; s...
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/StringsandRegularExpressions/escape%2Cchar-name-string%2Cchar-escape-string/1.clj
clojure
<3> "Patterson_comma__space_John_colon__space__quote_Once_space_Upon_ space_a_space_Time_space_in_space_the_space_West_quote_"
(require '[clojure.string :as s]) < 1 > "Patterson, John: 'Once Upon a Time in the West'") < 2 > {\, "_comma_" \space "_space_" \. "_dot_" \' "_quote_" \: "_colon_" \newline "_newline_"})
39474df7b4985a136e56710fd9f1ad49c871b895d7e81e186407a5438640b545
ocaml-ppx/ppx
ast_pattern.mli
* First class AST patterns open! Import * PPX rewriters often need to recognize fragments , for instance to parse the payload of an attribute / expression . You can do that with a pattern matching and manual error reporting when the input is not what you expect but this has proven to quickly beco...
null
https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/src/ast_pattern.mli
ocaml
* Type of a pattern: - ['a] is the type of value matched by the pattern - ['b] is the continuation, for instance for a pattern that captures an [int] and a [string], ['b] will be [int -> string -> _] - ['c] is the result of the continuation. * Matches a value against a pattern. * Pattern that captu...
* First class AST patterns open! Import * PPX rewriters often need to recognize fragments , for instance to parse the payload of an attribute / expression . You can do that with a pattern matching and manual error reporting when the input is not what you expect but this has proven to quickly beco...
3e21a989893c7a3dbfee164c059a60b3c05199a774db68ebcf46712a396e43f9
footprintanalytics/footprint-web
redefs.clj
(ns metabase.test.redefs "Redefinitions of vars from 3rd-party namespaces to make sure they do extra stuff we want (like initialize things if needed when running)." (:require [metabase.plugins.classloader :as classloader] [metabase.test-runner.parallel :as test-runner.parallel] [toucan.db ...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/test/redefs.clj
clojure
replace [[toucan.util.test/do-with-temp]] so it initializes the DB before doing the other stuff it usually does so with-temp-defaults are loaded disallow with-temp inside parallel tests. once we're a little more comfortable with the current parallel stuff we should remove this restriction. catch any Exceptions th...
(ns metabase.test.redefs "Redefinitions of vars from 3rd-party namespaces to make sure they do extra stuff we want (like initialize things if needed when running)." (:require [metabase.plugins.classloader :as classloader] [metabase.test-runner.parallel :as test-runner.parallel] [toucan.db ...
21b05380aa2caad3e975af3a06a2cfb8da95135eb5e99b869f4ff01999e41684
jeapostrophe/adqc
type.rkt
#lang racket/base (require (for-syntax racket/base racket/struct-info racket/syntax) racket/contract/base racket/hash racket/match racket/set syntax/parse/define "ast.rkt" "print.rkt" "util.rkt") Type fo...
null
https://raw.githubusercontent.com/jeapostrophe/adqc/59030f17f603356786a2cf19b78e54ccb1181848/type.rkt
racket
nodes, as they contain the rest of the function as their body. Maybe have different reporting schemes for syntax which makes declarations and has a body XXX add logic for union types. If x is not referenced in 'be', x will not be in be-env. In this case, return ty to avoid error. XXX Only checks for bounds when `...
#lang racket/base (require (for-syntax racket/base racket/struct-info racket/syntax) racket/contract/base racket/hash racket/match racket/set syntax/parse/define "ast.rkt" "print.rkt" "util.rkt") Type fo...
8b1e6f29dbef3597d61ea899cb04519943d3310dac5235cae2ec90b1f2b9e5bb
RichiH/git-annex
CurrentRepo.hs
The current git repository . - - Copyright 2012 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2012 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module Git.CurrentRepo where import Common import Git.Types import Git.Construct import qualified Git...
null
https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Git/CurrentRepo.hs
haskell
work - tree and --git - dir to git commands it runs . work-tree and --git-dir to git commands it runs.
The current git repository . - - Copyright 2012 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2012 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module Git.CurrentRepo where import Common import Git.Types import Git.Construct import qualified Git...
e033cda88cc716f09cd8ae845a6a31f921812a786f40d1ad64d092f3080a75a1
alvatar/spheres
deduction1-trace.scm
Some preliminary checks, using goal-rev ((hs.0 hs.0) (c.0 !p-q)) goal-fwd (h p hs c q hs1) (!h (mp !p !q) !pq-hs !q-c (mp !p-q (mp !q-q (s !h !p-c !q-c))) !pq-hs-h) just (p phs hs c) ((mp !p-q (mp !q-q (s !h !p-c !q-c))) !pq-hsq !pq-hs-h (-> !h !q-c)) (subset phs.0 hs.0) (subset a.0 b.0) ((b.0 !pq-hs-h) (a.0 !pq-hsq...
null
https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/doc/logic/kanren-examples/deduction1-trace.scm
scheme
the tail
Some preliminary checks, using goal-rev ((hs.0 hs.0) (c.0 !p-q)) goal-fwd (h p hs c q hs1) (!h (mp !p !q) !pq-hs !q-c (mp !p-q (mp !q-q (s !h !p-c !q-c))) !pq-hs-h) just (p phs hs c) ((mp !p-q (mp !q-q (s !h !p-c !q-c))) !pq-hsq !pq-hs-h (-> !h !q-c)) (subset phs.0 hs.0) (subset a.0 b.0) ((b.0 !pq-hs-h) (a.0 !pq-hsq...
19192725253fd3a71f67e2c1e834e655811b421214b76107ff5f28e98747d6e1
fp-works/2019-winter-Haskell-school
Exercise1.hs
module Exercise1 ( fibs1 ) where fibs1 :: Integer -> Integer fibs1 0 = 0 fibs1 1 = 1 fibs1 n = fibs1 (n - 1) + fibs1 (n - 2)
null
https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week6/weining/src/Exercise1.hs
haskell
module Exercise1 ( fibs1 ) where fibs1 :: Integer -> Integer fibs1 0 = 0 fibs1 1 = 1 fibs1 n = fibs1 (n - 1) + fibs1 (n - 2)
9d69014ac1b5b1d84348e07fafcec136b12fe40b42580b202c201de635a0956f
metabase/metabase
files.clj
(ns metabuild-common.files (:require [clojure.java.io :as io] [clojure.string :as str] [metabuild-common.misc :as misc] [metabuild-common.output :as out] [metabuild-common.shell :as shell] [metabuild-common.steps :as steps]) (:import (java.io File) (java.nio.file Files FileSystems FileVisitO...
null
https://raw.githubusercontent.com/metabase/metabase/5e9b52a32dfeab754d218c758d08fffbacb7c0e7/bin/build/src/metabuild_common/files.clj
clojure
don't preserve symlinks or something like that. -> \"usr/cam/.emacs.d/init.el\"" /home/cam/metabase/bin/build/src/metabuild_common/ /home/cam/metabase/bin/build/src/ /home/cam/metabase/bin/build/ /home/cam/metabase/ /home/cam/metabase/
(ns metabuild-common.files (:require [clojure.java.io :as io] [clojure.string :as str] [metabuild-common.misc :as misc] [metabuild-common.output :as out] [metabuild-common.shell :as shell] [metabuild-common.steps :as steps]) (:import (java.io File) (java.nio.file Files FileSystems FileVisitO...
88417876d3c99ee041c37380f6a0b4977e1f19e0c1dd55def08d0185c8bc34d3
scymtym/clim.flamegraph
standard-tree.lisp
;;;; standard-tree.lisp --- Default implementations of the tree and node protocols ;;;; Copyright ( C ) 2019 , 2020 Jan Moringen ;;;; Author : < > (cl:in-package #:clim.flamegraph.model) ;;; `hit-count-mixin' TODO should this be in a different file ? ((%hit-count :initarg :hit-count :acces...
null
https://raw.githubusercontent.com/scymtym/clim.flamegraph/03b5e4f08b53af86a98afa975a8e7a29d0ddd3a7/src/model/standard-tree.lisp
lisp
standard-tree.lisp --- Default implementations of the tree and node protocols `hit-count-mixin' `standard-tree' `standard-node' TODO HACK
Copyright ( C ) 2019 , 2020 Jan Moringen Author : < > (cl:in-package #:clim.flamegraph.model) TODO should this be in a different file ? ((%hit-count :initarg :hit-count :accessor hit-count :initform 0))) (defmethod print-items:print-items append ((object hit-count-mixin)) ...
4ec902c02617b263a00a78f825612d2c7c1412b076f97f6a0905e74d2f0a8512
kelamg/HtDP2e-workthrough
ex24.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-beginner-reader.ss" "lang")((modname ex24) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Fixed-size-Data/ex24.rkt
racket
about the language level of this file in a form that our tools can easily process. run with stepper
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex24) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define (==>2 x y) (or (not x) y)) (==>2 #true #false)
f1256d95f529b97331bdc3ca2af17c1bc9c080bca56254fe19bd8b141180e7b2
apache/couchdb-fabric
fabric_db_create.erl
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not % use this file except in compliance with the License. You may obtain a copy of % the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an " A...
null
https://raw.githubusercontent.com/apache/couchdb-fabric/ce62148d0a4469751d8078cc223684da29b5d4a7/src/fabric_db_create.erl
erlang
use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(fabric_db_create). -export([go/2]). -include_lib("fabric/include/fabric.hrl"). -include_lib("mem3/include/mem3.hrl"). -include_lib("couch/include/c...
3cc140e98ac51341478bda3f65001b95c02f719e838d94c92d23e09fb8c320ec
Zulu-Inuoe/clution
usocket.lisp
;;;; See LICENSE for licensing information. (in-package :usocket) (defparameter *wildcard-host* #(0 0 0 0) "Hostname to pass when all interfaces in the current system are to be bound. If this variable is passed to socket-listen, IPv6 capable systems will also listen for IPv6 connections.") (defparameter *auto...
null
https://raw.githubusercontent.com/Zulu-Inuoe/clution/b72f7afe5f770ff68a066184a389c23551863f7f/cl-clution/qlfile-libs/usocket-0.7.0.1/usocket.lisp
lisp
See LICENSE for licensing information. Iff an external-format was passed to `socket-connect' or `socket-listen' the stream is a flexi-stream. Otherwise the stream is implementation specific." also see -vs-shutdown-socket implementation specific the list of all usockets maps implementation sockets to usockets Imp...
(in-package :usocket) (defparameter *wildcard-host* #(0 0 0 0) "Hostname to pass when all interfaces in the current system are to be bound. If this variable is passed to socket-listen, IPv6 capable systems will also listen for IPv6 connections.") (defparameter *auto-port* 0 "Port number to pass when an auto...
d8fb1282408308ddb7e989279e89a0ce943c9c7f07134f6b9507e24d8961a503
overtone/overtone
vosim.clj
(ns overtone.sc.machinery.ugen.metadata.extras.vosim (:use [overtone.sc.machinery.ugen common check])) (def specs [ {:name "VOSIM" :summary "Vosim pulse generator." :args [{:name "trig" :default 0.1 :doc "Starts a vosim pulse when a transition from non-positive to positive occurs...
null
https://raw.githubusercontent.com/overtone/overtone/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/src/overtone/sc/machinery/ugen/metadata/extras/vosim.clj
clojure
(ns overtone.sc.machinery.ugen.metadata.extras.vosim (:use [overtone.sc.machinery.ugen common check])) (def specs [ {:name "VOSIM" :summary "Vosim pulse generator." :args [{:name "trig" :default 0.1 :doc "Starts a vosim pulse when a transition from non-positive to positive occurs...
4f52cff25ea0d46171e4a17d6f90bcb8c84916520288024b1a3304e3da0eecbc
psyeugenic/fgraph
provisual_tracer.erl
Copyright ( C ) 2012 %% %% File: provisual_tracer.erl Author : Björn - Egil Dahlberg Created : 2012 - 06 - 15 -module(provisual_tracer). -export([start/3]). -record(tstate,{ n = 1, registry, procs, node, client, server, graph, rs}). start(Node, Graph, Rs) -> spawn_link(fun() -> init(Node,...
null
https://raw.githubusercontent.com/psyeugenic/fgraph/c485fefc9de78012b13b35abe59f0d29090ff6d1/src/provisual_tracer.erl
erlang
File: provisual_tracer.erl setup remote tracer wait for ready then setup trace receiver receive initial data and populate graph liveness linkage generate pid <-> name registry and populate graph io:format("link ~p~n", [Link]),
Copyright ( C ) 2012 Author : Björn - Egil Dahlberg Created : 2012 - 06 - 15 -module(provisual_tracer). -export([start/3]). -record(tstate,{ n = 1, registry, procs, node, client, server, graph, rs}). start(Node, Graph, Rs) -> spawn_link(fun() -> init(Node, Graph, Rs) end). init(Node, Graph,...
607cae0c7c39bca6aa41608df92791c9b9d5ada2d9763f0444938a2790194870
day8/re-com
md_circle_icon_button.cljs
(ns re-demo.md-circle-icon-button (:require [re-com.core :refer [at h-box v-box box gap line label md-circle-icon-button horizontal-bar-tabs vertical-bar-tabs p p-span]] [re-com.buttons :refer [md-circle-icon-button-parts-desc md-circle-icon-button-args-desc]] [re-demo.utils :refer [panel-...
null
https://raw.githubusercontent.com/day8/re-com/07451b1d19c59eb185548efe93e2d00b5d3eab89/src/re_demo/md_circle_icon_button.cljs
clojure
(ns re-demo.md-circle-icon-button (:require [re-com.core :refer [at h-box v-box box gap line label md-circle-icon-button horizontal-bar-tabs vertical-bar-tabs p p-span]] [re-com.buttons :refer [md-circle-icon-button-parts-desc md-circle-icon-button-args-desc]] [re-demo.utils :refer [panel-...
a4e1816673f5e44fa3ca6e3fd756da17e3de974515335e6ea79f6b46d1f7057f
binsec/haunted
uaf_detection.ml
(**************************************************************************) This file is part of BINSEC . (* *) Copyright ( C ) 2016 - 2019 (* VERIMAG...
null
https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/dynamic/dse/path_exploration/uaf_detection.ml
ocaml
************************************************************************ VERIMAG you can redistribute it an...
This file is part of BINSEC . Copyright ( C ) 2016 - 2019 Lesser General Public License as published by the Free Software Foundation , version 2.1 . See the GNU Le...
aef34a2328ab70947691f3d99e1804eb40ac60b0516ac69a602c80fb973670c9
quchen/prettyprinter
Type.hs
# OPTIONS_HADDOCK not - home # -- | __Internal module with stability guarantees__ -- -- This module exposes the internals of the @'Doc'@ type so other libraries can -- write adaptors to/from it. For all other uses, please use only the API -- provided by non-internal modules. -- -- Although this module is internal, it ...
null
https://raw.githubusercontent.com/quchen/prettyprinter/11e8bf12aed2f698e619c3a8c07eca3af4da1aed/prettyprinter/src/Prettyprinter/Internal/Type.hs
haskell
| __Internal module with stability guarantees__ This module exposes the internals of the @'Doc'@ type so other libraries can write adaptors to/from it. For all other uses, please use only the API provided by non-internal modules. Although this module is internal, it follows the usual package versioning module i...
# OPTIONS_HADDOCK not - home # policy , AKA ’s version of semantic versioning . In other words , this module Prettyprinter.Internal.Type (Doc(..)) where import Prettyprinter.Internal
706e72beb148177e523dce75ca7309585ec6a8f5a4f0d8728045e5670bfdc50e
haskell-tools/haskell-tools
Operators_res.hs
# LANGUAGE TypeOperators # module Refactor.GenerateExports.Operators ((|=>|), (:+:)(..)) where (|=>|) :: Int -> Int -> Int a |=>| b = a + b data a :+: b = a :+: b
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/GenerateExports/Operators_res.hs
haskell
# LANGUAGE TypeOperators # module Refactor.GenerateExports.Operators ((|=>|), (:+:)(..)) where (|=>|) :: Int -> Int -> Int a |=>| b = a + b data a :+: b = a :+: b
c9a36572ee438c373ef3d16db2c8d9a1f7a864681fd3d57edd264a0c19e73064
staples-sparx/kits
messages.clj
(ns ^{:doc "Text formatters for writing to syslog."} kits.syslog.messages (:require [kits.timestamp :as ts]) (:import java.text.SimpleDateFormat java.util.Date)) (set! *warn-on-reflection* true) (def date-format-pattern "MMM dd HH:mm:ss"); (def ^ThreadLocal date-format-holder (ThreadLocal.)) (defn...
null
https://raw.githubusercontent.com/staples-sparx/kits/66ae99bce83e8fd1248cc5c0da1f23673f221073/src/clojure/kits/syslog/messages.clj
clojure
Done Last
(ns ^{:doc "Text formatters for writing to syslog."} kits.syslog.messages (:require [kits.timestamp :as ts]) (:import java.text.SimpleDateFormat java.util.Date)) (set! *warn-on-reflection* true) (def ^ThreadLocal date-format-holder (ThreadLocal.)) (defn ^SimpleDateFormat thread-local-date-format [...
10c2dd5b7c1feda0908145327269a91111268c6c9228bccdb6a93d35e646cdaa
jaspervdj/advent-of-code
Dijkstra.hs
# LANGUAGE ScopedTypeVariables # module AdventOfCode.Grid.Dijkstra ( dijkstra ) where import qualified AdventOfCode.Grid as G import Control.Monad (guard) import qualified Data.List as L import qualified Data.Map as M import Data.Maybe (maybeToList) import qualif...
null
https://raw.githubusercontent.com/jaspervdj/advent-of-code/bdc9628d1495d4e7fdbd9cea2739b929f733e751/lib/hs/AdventOfCode/Grid/Dijkstra.hs
haskell
| Horrible priority queue ^ May we take this edge? ^ Starting positions ^ Cells ^ Distances Queue empty, we're done Already visited New visit
# LANGUAGE ScopedTypeVariables # module AdventOfCode.Grid.Dijkstra ( dijkstra ) where import qualified AdventOfCode.Grid as G import Control.Monad (guard) import qualified Data.List as L import qualified Data.Map as M import Data.Maybe (maybeToList) import qualif...
fc366d64363498d95cdb9d5e8e40f6731c6564ae4c9dba3adc42c985a8f95e1e
axelarge/advent-of-code
day16.clj
(ns advent-of-code.y2017.day16 (:require [advent-of-code.support :refer :all] [clojure.string :as str])) (def test-input "s1,x3/4,pe/b") (def input (get-input 2017 16)) ;;; Moves (defn spin [d x] (let [i (- (count d) x)] (into (subvec d i) (subvec d 0 i)))) (defn exchange [d a b] (as...
null
https://raw.githubusercontent.com/axelarge/advent-of-code/4c62a53ef71605780a22cf8219029453d8e1b977/src/advent_of_code/y2017/day16.clj
clojure
Moves Parsing / formatting Part 1 Solutions
(ns advent-of-code.y2017.day16 (:require [advent-of-code.support :refer :all] [clojure.string :as str])) (def test-input "s1,x3/4,pe/b") (def input (get-input 2017 16)) (defn spin [d x] (let [i (- (count d) x)] (into (subvec d i) (subvec d 0 i)))) (defn exchange [d a b] (assoc d ...
f5e6fc707c54993c22660a2bfaa2333bd9fa2d3d68e724fcc603c81d4a2dbaa1
draperlaboratory/cbat_tools
test_precondition.ml
(***************************************************************************) (* *) Copyright ( C ) 2018/2019 The Charles Stark Draper Laboratory , Inc. (* *) (* This...
null
https://raw.githubusercontent.com/draperlaboratory/cbat_tools/78c665c96b343991cb44bebb8658df6750fb59bd/wp/lib/bap_wp/tests/unit/test_precondition.ml
ocaml
************************************************************************* This file is provided under the license found in the LICENSE file in the top-level director...
Copyright ( C ) 2018/2019 The Charles Stark Draper Laboratory , Inc. This work is funded in part by ONR / NAWC Contract N6833518C0107 . Its content does not necessarily reflect the position or policy of the US open !Core open Bap.Std open OUnit2 open OUnitTest open Bap_wp open Bil_to_bir open Tes...
97f8f055378f87180ea327a1d901b3c03d068e780f9b223155d4329fb5c2da25
discus-lang/ddc
Context.hs
module DDC.Core.Flow.Context ( module DDC.Core.Flow.Context.Base , module DDC.Core.Flow.Context.FillPath ) where import DDC.Core.Flow.Context.Base import DDC.Core.Flow.Context.FillPath
null
https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core-flow/DDC/Core/Flow/Context.hs
haskell
module DDC.Core.Flow.Context ( module DDC.Core.Flow.Context.Base , module DDC.Core.Flow.Context.FillPath ) where import DDC.Core.Flow.Context.Base import DDC.Core.Flow.Context.FillPath
e4a0339e22c7fd3eb0358291c32232d11e64316f27a9e2bf4b7e84b0a43ecae1
krl/bliss
helpers.clj
(ns bliss.helpers (:import java.util.Date)) (def DEFAULT-LEN 1) (defn timestamp [] (.getTime (Date.))) (defn get-len [event] (or (:len event) DEFAULT-LEN)) (defn get-time [event] (or (:time event) 0)) (defn get-end [event] (+ (get-len event) (get-time event))) ;; (defmacro dbg [& body] `(let [re...
null
https://raw.githubusercontent.com/krl/bliss/2de5a4655da27ca8e8b69e11e1214bfb8d6ea8cc/src/bliss/helpers.clj
clojure
(ns bliss.helpers (:import java.util.Date)) (def DEFAULT-LEN 1) (defn timestamp [] (.getTime (Date.))) (defn get-len [event] (or (:len event) DEFAULT-LEN)) (defn get-time [event] (or (:time event) 0)) (defn get-end [event] (+ (get-len event) (get-time event))) (defmacro dbg [& body] `(let [resul...
c6b0b9fc759bc0e3208db2bf4c029777cdbcb57b0aceb34a77a5d6e2b87b5110
robert-strandh/SICL
do-dostar-defmacro.lisp
(cl:in-package #:sicl-iteration) (defmacro do (variable-clauses end-test &body body) (do-dostar-expander 'let 'psetq variable-clauses end-test body)) (defmacro do* (variable-clauses end-test &body body) (do-dostar-expander 'let* 'setq variable-clauses end-test body))
null
https://raw.githubusercontent.com/robert-strandh/SICL/ec906617ea81bf9e033699bd27c32a346d21a1c1/Code/Iteration/do-dostar-defmacro.lisp
lisp
(cl:in-package #:sicl-iteration) (defmacro do (variable-clauses end-test &body body) (do-dostar-expander 'let 'psetq variable-clauses end-test body)) (defmacro do* (variable-clauses end-test &body body) (do-dostar-expander 'let* 'setq variable-clauses end-test body))
a7ae9fa0bd064d1aa5d5d0049c45d89b9c3fad46af314860cd512d084ac25314
processone/ejabberd
mod_muc_sup.erl
%%%---------------------------------------------------------------------- Created : 4 Jul 2019 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne %%% %%% 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 ...
null
https://raw.githubusercontent.com/processone/ejabberd/c103182bc7e5b8a8ab123ce02d1959a54e939480/src/mod_muc_sup.erl
erlang
---------------------------------------------------------------------- This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER...
Created : 4 Jul 2019 by < > ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public License along with this program ; i...
618dcc9e23b4ff8ec3c51cf7564b45ca96cdb6dafca8bf8ca42b2dfbea85d86d
Opetushallitus/ataru
application_form_components.cljs
(ns ataru.hakija.application-form-components (:require [re-frame.core :refer [subscribe dispatch]] [cljs.core.match :refer-macros [match]] [ataru.application-common.application-field-common :as application-field :refer [answer-key required-h...
null
https://raw.githubusercontent.com/Opetushallitus/ataru/9d1471f04d694b11d9ce124ea9564d9b10527f19/src/cljs/ataru/hakija/application_form_components.cljs
clojure
(ns ataru.hakija.application-form-components (:require [re-frame.core :refer [subscribe dispatch]] [cljs.core.match :refer-macros [match]] [ataru.application-common.application-field-common :as application-field :refer [answer-key required-h...
471e08e51b0308e6756e2c9befe71bad8b7ab29fd20fc8b67417c39cd244ebb2
LPCIC/matita
content2pres.mli
Copyright ( C ) 2000 , HELM Team . * * This file is part of HELM , an Hypertextual , Electronic * Library of Mathematics , developed at the Computer Science * Department , University of Bologna , Italy . * * is free software ; you can redistribute it and/or * modify it under the terms of the GNU...
null
https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/components/content_pres/content2pres.mli
ocaml
************************************************************************ ****************************...
Copyright ( C ) 2000 , HELM Team . * * This file is part of HELM , an Hypertextual , Electronic * Library of Mathematics , developed at the Computer Science * Department , University of Bologna , Italy . * * is free software ; you can redistribute it and/or * modify it under the terms of the GNU...
52a3d92764965bef7f5747cba5e8b287942e78d76b7825a59c18b080ea243cda
MyDataFlow/ttalk-server
ssl_hello_world_app.erl
%% Feel free to use, reuse and abuse the code in this file. @private -module(ssl_hello_world_app). -behaviour(application). %% API. -export([start/2]). -export([stop/1]). %% API. start(_Type, _Args) -> Dispatch = cowboy_router:compile([ {'_', [ {"/", toppage_handler, []} ]} ]), PrivDir = code:priv_dir(s...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/cowboy/examples/ssl_hello_world/src/ssl_hello_world_app.erl
erlang
Feel free to use, reuse and abuse the code in this file. API. API.
@private -module(ssl_hello_world_app). -behaviour(application). -export([start/2]). -export([stop/1]). start(_Type, _Args) -> Dispatch = cowboy_router:compile([ {'_', [ {"/", toppage_handler, []} ]} ]), PrivDir = code:priv_dir(ssl_hello_world), {ok, _} = cowboy:start_https(https, 100, [ {port, 8443},...
58248f88bcf6ed9e9966d818a424ec32059af3d9ff42d20893ebae8495fd502d
Copilot-Language/copilot
Temporal.hs
Copyright © 2011 National Institute of Aerospace / Galois , Inc. {-# LANGUAGE Safe #-} -- | Temporal stream transformations. module Copilot.Language.Operators.Temporal ( (++) , drop ) where import Copilot.Core (Typed) import Copilot.Language.Prelude import Copilot.Language.Stream import Prelude () infixr 1 ...
null
https://raw.githubusercontent.com/Copilot-Language/copilot/17a9b45eea4e95a465d6e773c6fbcf9bf810b6cc/copilot-language/src/Copilot/Language/Operators/Temporal.hs
haskell
# LANGUAGE Safe # | Temporal stream transformations. | Prepend a fixed number of samples to a stream. The elements to be appended at the beginning of the stream must be limited, that is, the list must have finite length. Prepending elements to a stream may increase the memory requirements of the generated progr...
Copyright © 2011 National Institute of Aerospace / Galois , Inc. module Copilot.Language.Operators.Temporal ( (++) , drop ) where import Copilot.Core (Typed) import Copilot.Language.Prelude import Copilot.Language.Stream import Prelude () infixr 1 ++ (++) :: Typed a => [a] -> Stream a -> Stream a (++) = (`...
72429564e5db429568bc70e800c1ec5f8312e2a6756e72f4295b96e598767eec
tmfg/mmtis-national-access-point
transport_service.cljs
(ns ote.app.controller.transport-service "Transport operator controls " ;; FIXME: Move transport-service related stuff to other file (:require [tuck.core :as tuck :refer-macros [define-event]] [clojure.string :as str] [taoensso.timbre :as log] [testdoub...
null
https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/30afbdd1488e320acb037678be23759062b021c8/ote/src/cljs/ote/app/controller/transport_service.cljs
clojure
FIXME: Move transport-service related stuff to other file Set transport-operator and sub-type Navigation hook events for new service creation and editing Add service for currently selected transport operator and transport-operator-vector Set only service type and sub-type Redirect to add service page Get operato...
(ns ote.app.controller.transport-service (:require [tuck.core :as tuck :refer-macros [define-event]] [clojure.string :as str] [taoensso.timbre :as log] [testdouble.cljs.csv :as csv] [ote.communication :as comm] [ote.db.transport-service :as t-service] ...
80e9bc6140c88b790b6e08c8df5b588a8bc8ac035bb6367274cf26831ba6f6a0
purescript/purescript
Directive.hs
-- | Directives for PSCI . -- module Language.PureScript.Interactive.Directive where import Prelude import Data.Maybe (fromJust) import Data.List (isPrefixOf) import Data.Tuple (swap) import Language.PureScript.Interactive.Types -- | -- A mapping of directives to the different strings that can be used to invoke -...
null
https://raw.githubusercontent.com/purescript/purescript/02bd6ae60bcd18cbfa892f268ef6359d84ed7c9b/src/Language/PureScript/Interactive/Directive.hs
haskell
| | A mapping of directives to the different strings that can be used to invoke them. | Like directiveStrings, but the other way around. | Returns all possible string representations of a directive. | Returns the default string representation of a directive. | Returns the list of directives which could...
Directives for PSCI . module Language.PureScript.Interactive.Directive where import Prelude import Data.Maybe (fromJust) import Data.List (isPrefixOf) import Data.Tuple (swap) import Language.PureScript.Interactive.Types directiveStrings :: [(Directive, [String])] directiveStrings = [ (Help , ["?", "help...
d35d6dbbf22f5189adcbb87cba7f9c762cc3d7b8d907b16254c9aecbf9aeca47
khigia/ocaml-anneal
myocamlbuild.ml
open Ocamlbuild_plugin open Command (* *) (* these functions are not really officially exported *) let run_and_read = Ocamlbuild_pack.My_unix.run_and_read let blank_sep_strings = Ocamlbuild_pack.Lexers.blank_sep_strings (* this lists all supported packages *) let find_packages () = blank_sep_strings & ...
null
https://raw.githubusercontent.com/khigia/ocaml-anneal/70ff50f1b4dc28875f1246822dbd1b8d1fbff912/myocamlbuild.ml
ocaml
these functions are not really officially exported this lists all supported packages this is supposed to list available syntaxes, but I don't know how to do it. ocamlfind command by using Before_options one let command line options have an higher priority on the contrary using After_options will guarantee...
open Ocamlbuild_plugin open Command let run_and_read = Ocamlbuild_pack.My_unix.run_and_read let blank_sep_strings = Ocamlbuild_pack.Lexers.blank_sep_strings let find_packages () = blank_sep_strings & Lexing.from_string & run_and_read "ocamlfind list | cut -d' ' -f1" let fi...
f9bc84ace36305662728448cf83741b188ac13ad503757dd63af619be50b7fc4
wireapp/wire-server
Validation.hs
-- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License...
null
https://raw.githubusercontent.com/wireapp/wire-server/17c81f8cdff5551509f25b2510d40f5251951c6a/services/brig/src/Brig/API/MLS/KeyPackages/Validation.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under 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 PARTI...
Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along module Brig.API.MLS.KeyPackages....
702909700929348caab21106dc80c8cf83b6370b6231c4cfe1beb5e0fcedddf9
ConsumerDataStandardsAustralia/validation-prototype
Customer.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeOperators #-} module Web.ConsumerData.Au.Api.Types.Common.Customer ( module Web.ConsumerData.Au.Api.Types...
null
https://raw.githubusercontent.com/ConsumerDataStandardsAustralia/validation-prototype/ff63338b77339ee49fa3e0be5bb9d7f74e50c28b/consumer-data-au-api-types/src/Web/ConsumerData/Au/Api/Types/Common/Customer.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE RankNTypes # # LANGUAGE TypeOperators #
# LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # module Web.ConsumerData.Au.Api.Types.Common.Customer ( module Web.ConsumerData.Au.Api.Types.Common.Customer , module CustomerResponse , module CustomerDetailResponse ) where import Control.Lens (Getter, to) ...
cd6391d62af9db236a58148cf4faab962d1e8b67becec08e902c75bc99c607a9
HumbleUI/HumbleUI
slider.clj
(ns io.github.humbleui.ui.slider (:require [clojure.math :as math] [io.github.humbleui.canvas :as canvas] [io.github.humbleui.core :as core] [io.github.humbleui.protocols :as protocols])) (defn- value-at [slider x] (let [{:keys [*state thumb-size my-rect]} slider {:keys [min max step delta-...
null
https://raw.githubusercontent.com/HumbleUI/HumbleUI/12cf37a4cf4bfab030112191f78c73f922716d89/src/io/github/humbleui/ui/slider.clj
clojure
(ns io.github.humbleui.ui.slider (:require [clojure.math :as math] [io.github.humbleui.canvas :as canvas] [io.github.humbleui.core :as core] [io.github.humbleui.protocols :as protocols])) (defn- value-at [slider x] (let [{:keys [*state thumb-size my-rect]} slider {:keys [min max step delta-...
0a00513f52e720353dbab819ccd2aad299139d336b38ea5ebe4da88d7a2ac3e2
ad-si/TaskLite
User.hs
module User where import Protolude hiding (get, put) import Data.Aeson (ToJSON) data User = User { email :: Text , name :: Text , avatar_url :: Text } deriving (Show, Generic) instance ToJSON User
null
https://raw.githubusercontent.com/ad-si/TaskLite/32d010642b5785f63b20cdd65ec5d4b9f34f3b2b/tasklite-server/source-old/User.hs
haskell
module User where import Protolude hiding (get, put) import Data.Aeson (ToJSON) data User = User { email :: Text , name :: Text , avatar_url :: Text } deriving (Show, Generic) instance ToJSON User
4624639776a42e941dd47f2724701d3346d0282409b5a058cfd795bdaa05d8a6
inhabitedtype/ocaml-aws
getReusableDelegationSetLimit.ml
open Types open Aws type input = GetReusableDelegationSetLimitRequest.t type output = GetReusableDelegationSetLimitResponse.t type error = Errors_internal.t let service = "route53" let signature_version = Request.V4 let to_http service region req = let uri = Uri.add_query_params (Uri.of_string (Aws.Ut...
null
https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/route53/lib/getReusableDelegationSetLimit.ml
ocaml
open Types open Aws type input = GetReusableDelegationSetLimitRequest.t type output = GetReusableDelegationSetLimitResponse.t type error = Errors_internal.t let service = "route53" let signature_version = Request.V4 let to_http service region req = let uri = Uri.add_query_params (Uri.of_string (Aws.Ut...
df16ed1c0b86527ba0b29e8ea1897f0aecd99b0133b114cff20592a9175c975f
eliza0x/cotton
Main.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE DataKinds # module Main where import qualified Cotton as C import Options.Declarative import Control.Monad.IO.Class import qualified System.Process as Sys import qualified System.Exit as E import qualified Data.ByteString.Char8 as BC8 compile :: Bool -> ...
null
https://raw.githubusercontent.com/eliza0x/cotton/c00588ed277b690886901c778130eae0b0908835/app/Main.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE DataKinds # module Main where import qualified Cotton as C import Options.Declarative import Control.Monad.IO.Class import qualified System.Process as Sys import qualified System.Exit as E import qualified Data.ByteString.Char8 as BC8 compile :: Bool -> String -> IO () compile isDebugMode...
6a0b48d6dfe1b562afb384653ee29d678adec84c787b5152a9c69fdf70f26bab
donaldsonjw/bigloo
if.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / comptime / Expand / if.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Expand/if.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * The `if' macro expansion */ *===========================...
* serrano / prgm / project / bigloo / comptime / Expand / if.scm * / * Author : * / * Creation : We d Dec 28 15:42:10 1994 * / * Last change : Thu Nov 3 14:23:56 2011 ( serrano ) * / * Co...
666eb03fc94a4dc153ef5766ce4fd1e9196f735ba9b1200d1b38b25d30f10d0f
wilkes/karras
testing.clj
(ns karras.entity.testing (:use [karras.core :only [with-mongo-request]] [karras.entity :only [entity-specs collection-for]] [karras.collection :only [drop-collection collection]])) (defn entity-fixture "creates a test fixture that wraps tests in a with-mongo-request and drops all the colllectio...
null
https://raw.githubusercontent.com/wilkes/karras/38830c8e0313428c6c9c1b5cb035dc2a04ec7625/src/karras/entity/testing.clj
clojure
(ns karras.entity.testing (:use [karras.core :only [with-mongo-request]] [karras.entity :only [entity-specs collection-for]] [karras.collection :only [drop-collection collection]])) (defn entity-fixture "creates a test fixture that wraps tests in a with-mongo-request and drops all the colllectio...
3ad03582b8583ebf2c4c5ac2a4781f91270364c9efda85fd5f9aa23b9b1401ff
kosmikus/multirec
Read.hs
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE Rank2Types #-} # LANGUAGE KindSignatures # {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE GADTs # --------------------...
null
https://raw.githubusercontent.com/kosmikus/multirec/10ea901f0e1067bbe3632b1fab34103c83eeff0f/src/Generics/MultiRec/Read.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE Rank2Types # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # --------------------------------------------------------------------------- | Module : Generics.MultiRec.Read License : BSD3 Stability : experimental Portabilit...
# LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE GADTs # Copyright : ( c ) 2009 - -2010 Universiteit Utrecht Maintainer : Generic read . module Generics.MultiRec.Read where import Generics.MultiRec.Base import Contr...
6fd40bba3ad25c40979e6e8f26b537e241fd76dc600e501976a5a518637b314a
danr/hipspec
Lists3.hs
# LANGUAGE TypeFamilies , DeriveDataTypeable , FlexibleContexts , FlexibleInstances , TypeSynonymInstances # module Main where import Prelude (undefined,Eq,Show,Ord,return,div) import qualified Prelude as P import Data.Typeable import Hip.HipSpec import Test.QuickCheck hiding (Prop) import Control.Applicative data ...
null
https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/examples/old-examples/quickspec/Lists3.hs
haskell
The tiny Hip Prelude
# LANGUAGE TypeFamilies , DeriveDataTypeable , FlexibleContexts , FlexibleInstances , TypeSynonymInstances # module Main where import Prelude (undefined,Eq,Show,Ord,return,div) import qualified Prelude as P import Data.Typeable import Hip.HipSpec import Test.QuickCheck hiding (Prop) import Control.Applicative data ...
79389c8fa06a2dbe8add198e5997215431c84a03cc75d75c03f1af0a2cb86f9c
erlcloud/erlcloud
erlcloud_autoscaling.erl
%% Amazon Auto Scaling Web Service API Client . %% Documentation - %% -module(erlcloud_autoscaling). -author(''). -export([configure/2, configure/3, new/2, new/3]). -export([describe_autoscaling_groups/0, describe_autoscaling_groups/1, describe_autoscaling_groups/2, describe_launch_configurations/0, desc...
null
https://raw.githubusercontent.com/erlcloud/erlcloud/eca4aa751ce7ce6b09f849a58c2df384b7d4b976/src/erlcloud_autoscaling.erl
erlang
Documentation - erlcloud_aws : param_list(GroupNames , " " ) ) of erlcloud_aws : param_list(GroupNames , " " ) ) of
Amazon Auto Scaling Web Service API Client . -module(erlcloud_autoscaling). -author(''). -export([configure/2, configure/3, new/2, new/3]). -export([describe_autoscaling_groups/0, describe_autoscaling_groups/1, describe_autoscaling_groups/2, describe_launch_configurations/0, describe_launch_configurations/...
9d60e27283706ab847e238c3149bfe9ecab3f9888826b6715e23e35cad72873e
haskell-opengl/GLUT
Begin.hs
-------------------------------------------------------------------------------- -- | -- Module : Graphics.UI.GLUT.Begin Copyright : ( c ) 2002 - 2018 -- License : BSD3 -- Maintainer : < > -- Stability : stable -- Portability : portable -- After a GLUT program has done initial setup s...
null
https://raw.githubusercontent.com/haskell-opengl/GLUT/36207fa51e4c1ea1e5512aeaa373198a4a56cad0/src/Graphics/UI/GLUT/Begin.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.UI.GLUT.Begin License : BSD3 Stability : stable Portability : portable 'mainLoop' or handle events iteratively with 'mainLoopEvent'. ----------------------------------------------------------------...
Copyright : ( c ) 2002 - 2018 Maintainer : < > After a GLUT program has done initial setup such as creating windows and menus , GLUT programs enter the GLUT event processing loop by calling module Graphics.UI.GLUT.Begin ( mainLoop, mainLoopEvent, leaveMainLoop, ActionOnWindowClose(..), act...
919b58bfefe0eb332b97188c36bf03905c0bf4895b6c79a6b0fc26eeedef25a6
rescript-lang/rescript-compiler
js_call_info.ml
Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P. * Copyright ( C ) 2016 - , Authors of ReScript * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the...
null
https://raw.githubusercontent.com/rescript-lang/rescript-compiler/e60482c6f6a69994907b9bd56e58ce87052e3659/jscomp/core/js_call_info.ml
ocaml
called by plain ocaml expression built-in externals either from [@@val] or not available, such calls does not follow such rules {[ fun x y -> (f x y) === f ]} when [f] is an atom
Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P. * Copyright ( C ) 2016 - , Authors of ReScript * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the...
92800c548ee5ffc061b94846e4154bec98ec0e1d68bde68316ded29eb89c4f21
Workiva/eva
v2.clj
Copyright 2015 - 2019 Workiva Inc. ;; ;; Licensed under the Eclipse Public License 1.0 (the "License"); ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -1.0.php ;; ;; Unless required by applicable law or agreed to in writing, software dist...
null
https://raw.githubusercontent.com/Workiva/eva/b7b8a6a5215cccb507a92aa67e0168dc777ffeac/server/src/eva/server/v2.clj
clojure
Licensed under the Eclipse Public License 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -1.0.php Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...
Copyright 2015 - 2019 Workiva Inc. distributed under the License is distributed on an " AS IS " BASIS , (ns eva.server.v2 (:require [clojure.edn :as edn] [clojure.java.io :as io] [clojure.spec.alpha :as s] [clojure.core.server] [clojure.string :as str] ...
3360f313ecfb162762ebc2581c485d5cb57d6fb56ed5f2875498d19788553f74
shirok/Gauche
event-core.scm
;;; ;;; file.event - Interface for system file event API ;;; Copyright ( c ) 2023 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1. Redistributions of source code must retain th...
null
https://raw.githubusercontent.com/shirok/Gauche/785dfaf8c28f0b675d57d47a37dc7d689add260f/ext/file/event-core.scm
scheme
file.event - Interface for system file event API Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the...
Copyright ( c ) 2023 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING (select-module file.event) (inline-stub (.when (d...
e322295e08c7b9e1e6d585c779198f99cbf40a45bffaadef78a2f9a8e6eb60a7
ogaml/ogaml
noise.ml
open OgamlMath (* Generate a random permutation *) let rec fuse_rnd r = function |([],l) |(l,[]) -> l |(t1::q1,l2) when Random.State.int r 2 = 0 -> t1::(fuse_rnd r (q1,l2)) |(l1,t2::q2) -> t2::(fuse_rnd r (l1,q2)) and split_l = function |[] -> ([],[]) |[t] -> ([t],[]) |t1::t2::q -> let (l1,l2) = spli...
null
https://raw.githubusercontent.com/ogaml/ogaml/5e74597521abf7ba2833a9247e55780eabfbab78/src/utils/noise.ml
ocaml
Generate a random permutation Interpolation
open OgamlMath let rec fuse_rnd r = function |([],l) |(l,[]) -> l |(t1::q1,l2) when Random.State.int r 2 = 0 -> t1::(fuse_rnd r (q1,l2)) |(l1,t2::q2) -> t2::(fuse_rnd r (l1,q2)) and split_l = function |[] -> ([],[]) |[t] -> ([t],[]) |t1::t2::q -> let (l1,l2) = split_l q in (t1::l1,t2::l2) and pe...
7f4f6af5164324edfae7cea984f2668f380ba37987cc6d56c5b5b2cfd5fbaecf
samply/blaze
search_param_registry.clj
(ns blaze.db.search-param-registry (:refer-clojure :exclude [get]) (:require [blaze.anomaly :as ba :refer [if-ok when-ok]] [blaze.coll.core :as coll] [blaze.db.impl.search-param :as search-param] [blaze.db.impl.search-param.core :as sc] [blaze.fhir.spec :as fhir-spec] [blaze.util :refer [con...
null
https://raw.githubusercontent.com/samply/blaze/948eee38021467fa343c522a644a7fd4b24b6467/modules/db/src/blaze/db/search_param_registry.clj
clojure
(ns blaze.db.search-param-registry (:refer-clojure :exclude [get]) (:require [blaze.anomaly :as ba :refer [if-ok when-ok]] [blaze.coll.core :as coll] [blaze.db.impl.search-param :as search-param] [blaze.db.impl.search-param.core :as sc] [blaze.fhir.spec :as fhir-spec] [blaze.util :refer [con...
15b60541a213718c477a8d86da7dc27c2df63e258b563820bac8959b6b0c8805
phillord/tawny-owl
pattern_test.clj
(ns tawny.pattern-test (:use [clojure.test]) (:require [tawny.owl :as o] [tawny.debug] [tawny.fixture :as f] [tawny.pattern :as p] [tawny.query :as q] [tawny.util :as u] [tawny.type :as t] [tawny.test-util :refer :all])) (def to nil) (use-fixtures :each (f/test-ontology-fixture-generato...
null
https://raw.githubusercontent.com/phillord/tawny-owl/331e14b838a42adebbd325f80f60830fa0915d76/test/tawny/pattern_test.clj
clojure
order is not defined! order is not defined! have to use real keywords here because op checks for handlers.
(ns tawny.pattern-test (:use [clojure.test]) (:require [tawny.owl :as o] [tawny.debug] [tawny.fixture :as f] [tawny.pattern :as p] [tawny.query :as q] [tawny.util :as u] [tawny.type :as t] [tawny.test-util :refer :all])) (def to nil) (use-fixtures :each (f/test-ontology-fixture-generato...
3095b1d9a0a4e65aa6a301ecddd162616293f913c3e2068aa59ce2e69205c9d0
xu-hao/QueryArrow
SchemaParser.hs
# LANGUAGE TemplateHaskell # module SchemaParser where import qualified Text.Parsec.Token as T import Text.ParserCombinators.Parsec import Control.Applicative ((*>), (<*), (<$>), (<*>)) import QueryArrow.Syntax.Term import QueryArrow.Syntax.Type import QueryArrow.Syntax.Utils import QueryArrow.SQL.SQL import System.I...
null
https://raw.githubusercontent.com/xu-hao/QueryArrow/4dd5b8a22c8ed2d24818de5b8bcaa9abc456ef0d/QueryArrow-gen-tool/src/SchemaParser.hs
haskell
<|> create_sequence case prefix of special case for server load special case for server load digest "QUOTA_USAGE" -> partition (\(ColDef key0 _ _) -> let key1 = map toUpper key0 in specical case for quota usage "DATA" -> partition (\(ColDef key0 _ _) -> ...
# LANGUAGE TemplateHaskell # module SchemaParser where import qualified Text.Parsec.Token as T import Text.ParserCombinators.Parsec import Control.Applicative ((*>), (<*), (<$>), (<*>)) import QueryArrow.Syntax.Term import QueryArrow.Syntax.Type import QueryArrow.Syntax.Utils import QueryArrow.SQL.SQL import System.I...
61be2f125ff40089a5ba18d1b0fcbd69f88994d13564c696d6a836bfa6494d15
iburzynski/haskell-setup
FileAnatomy.hs
-- Haskell File Anatomy {-- 1. Language extensions go before anything else these modify compiler behavior -} {-# LANGUAGE OverloadedStrings #-} 2 . Module declaration goes next ( name should match filename ) module FileAnatomy where {-- 3. Import statements go next these add functionality beyond Prel...
null
https://raw.githubusercontent.com/iburzynski/haskell-setup/0dcd4cad967b7f25c655e741c34f9d42b0c05639/FileAnatomy.hs
haskell
Haskell File Anatomy - 1. Language extensions go before anything else these modify compiler behavior # LANGUAGE OverloadedStrings # - 3. Import statements go next these add functionality beyond Prelude (use qualified imports to prevent name collisions) - - 4. Type declarations go next thes...
2 . Module declaration goes next ( name should match filename ) module FileAnatomy where import qualified Data.Text as Text type FizzBuzz = Text.Text main :: IO () main = do mapM_ (putStrLn . Text.unpack . fizzBuzz) [1 .. 100] fizzBuzz :: Int -> FizzBuzz fizzBuzz x | divis3 x && divis5 x = "FizzBuzz" | d...
028dc7b8bd8636acecc264fbf9d8870a276540fd58a61df6467296793adb5225
matterhorn-chat/mattermost-api
Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main ( main ) where import Control.Exception import Control.Monad (when) import System.Exit import Text.Show.Pretty ( ppShow ) import Data.Monoid ((<>)) import qualified Data.Sequence as Seq import Test.Tasty i...
null
https://raw.githubusercontent.com/matterhorn-chat/mattermost-api/66f9736de4dbcd695248fe77534c8b7d5c780c6a/test/Main.hs
haskell
# LANGUAGE OverloadedStrings # Users and other test configuration data Test groups Note that the order of the tests matters as each may have side effects on which subsequent tests depend. Test definitions Load channels so we can get the IDs of joined channels Enable open team so that the admin can create new us...
module Main ( main ) where import Control.Exception import Control.Monad (when) import System.Exit import Text.Show.Pretty ( ppShow ) import Data.Monoid ((<>)) import qualified Data.Sequence as Seq import Test.Tasty import Network.Mattermost....
efa330bc552f3e7acc22f85d5c9c145791cb816fed02988aeaa8443f7f804d13
reactioncommerce/pricewatch
main.clj
(ns reaction.pricewatch.main "Main entry point for the application." (:gen-class) (:require [clojure.string :as string] [clojure.tools.cli :refer [parse-opts]] [duct.core :as duct])) (duct/load-hierarchy) (defn usage [options-summary] (->> ["An application." "" "Usage: [clojure] -m...
null
https://raw.githubusercontent.com/reactioncommerce/pricewatch/521e05aea72c478738de94cbe0739b4f1c3966ef/src/reaction/pricewatch/main.clj
clojure
An option with a required argument :validate [#(and (not (empty? %)) (every? keyword? %)] :validate [#(and (not (empty? %)) (every? keyword? %)] A boolean option defaulting to nil help => exit OK with usage summary errors => exit with description of errors custom validation on arg...
(ns reaction.pricewatch.main "Main entry point for the application." (:gen-class) (:require [clojure.string :as string] [clojure.tools.cli :refer [parse-opts]] [duct.core :as duct])) (duct/load-hierarchy) (defn usage [options-summary] (->> ["An application." "" "Usage: [clojure] -m...
e046b00fee112210d1654dfbaeffe14a3a704ba7a803f13f7a48caf9fea044ef
elastic/eui-cljs
icon_string.cljs
(ns eui.icon-string (:require ["@elastic/eui/lib/components/icon/assets/string.js" :as eui])) (def string eui/icon)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_string.cljs
clojure
(ns eui.icon-string (:require ["@elastic/eui/lib/components/icon/assets/string.js" :as eui])) (def string eui/icon)