_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
483dc9a2a0bede52fc7c35ac6c7b082ed99801fadee6096fe81b671059259395
elaforge/karya
Mridangam2015.hs
Copyright 2018 -- This program is distributed under the terms of the GNU General Public -- License 3.0, see COPYING or -3.0.txt module Solkattu.Score.Mridangam2015 where import Prelude hiding ((.), repeat) import qualified Solkattu.Tala as Tala import Solkattu.Dsl.Mridangam c_1 :: Korvai c_1 = akash $ date 201...
null
https://raw.githubusercontent.com/elaforge/karya/09c596b065ea493e8aebc7014e371de17e6d85de/Solkattu/Score/Mridangam2015.hs
haskell
This program is distributed under the terms of the GNU General Public License 3.0, see COPYING or -3.0.txt
Copyright 2018 module Solkattu.Score.Mridangam2015 where import Prelude hiding ((.), repeat) import qualified Solkattu.Tala as Tala import Solkattu.Dsl.Mridangam c_1 :: Korvai c_1 = akash $ date 2015 1 1 $ tekha $ comment "rupak hindustani = 2 * misra chapu" $ korvaiS Tala.misra_chapu [ sd $ i. __....
52c4f960b7ac2b0efdd092754b651ccfaa3695c12207f2777f2c4a0fc4db8b44
yaxu/embedded
diagram.hs
# LANGUAGE NoMonomorphismRestriction # # LANGUAGE FlexibleContexts # {-# LANGUAGE TypeFamilies #-} import qualified Diagrams.Prelude as D import Diagrams.Backend.SVG.CmdLine import Sound.Tidal.Context -- or: import Diagrams . Backend.xxx . CmdLine -- where xxx is the backend you would like to ...
null
https://raw.githubusercontent.com/yaxu/embedded/a6402576fe12fb8ec3f5974bbc2fff640f2f221c/tidal/diagram.hs
haskell
# LANGUAGE TypeFamilies # or: where xxx is the backend you would like to use.
# LANGUAGE NoMonomorphismRestriction # # LANGUAGE FlexibleContexts # import qualified Diagrams.Prelude as D import Diagrams.Backend.SVG.CmdLine import Sound.Tidal.Context import Diagrams . Backend.xxx . CmdLine myCircle :: D.Diagram D.B myCircle = D.circle 1 eff = (D.text "F" <> D.square 1) # D.fontSize ...
4601bf417f9c626dec067ec556103352cc56cafd83053a5f2c502daac9efacdd
webnf/webnf
middleware.clj
(ns webnf.middleware (:require [webnf.base :refer [autoload]] [clojure.tools.logging :as log])) (autoload webnf.middleware.browser-http/wrap-browser-http) (autoload webnf.middleware.pretty-exception/wrap-pretty-exception)
null
https://raw.githubusercontent.com/webnf/webnf/6a2ccaa755e6e40528eb13a5c36bae16ba4947e7/handler/src/clj/webnf/middleware.clj
clojure
(ns webnf.middleware (:require [webnf.base :refer [autoload]] [clojure.tools.logging :as log])) (autoload webnf.middleware.browser-http/wrap-browser-http) (autoload webnf.middleware.pretty-exception/wrap-pretty-exception)
1720bcf3645ad4b13f56ee2fa423c760d86e34fe93ecb0e478aadcf87733a004
gethop-dev/hop-cli
persistence.clj
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this ;; file, You can obtain one at / {{=<< >>=}} (ns <<project.name>>.boundary.port.persistence) ;; (defprotocol SomeProtocolName ;; (some-method-name [db logger other-method-par...
null
https://raw.githubusercontent.com/gethop-dev/hop-cli/c7b848915ff268aa41ff9a61a62c614f58ecbeb9/resources/bootstrap/profiles/persistence/sql/app/src/%7B%7Bproject.files-name%7D%7D/boundary/port/persistence.clj
clojure
file, You can obtain one at / (defprotocol SomeProtocolName (some-method-name [db logger other-method-params...]))
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this {{=<< >>=}} (ns <<project.name>>.boundary.port.persistence)
caea0f9fb1fabaf8eb1b78d9f27a1a1fc78c0dd15bf6871afddfc2b945024ddf
sirherrbatka/cl-progress-bar
docstrings.lisp
(in-package #:cl-progress-bar) (docs:define-docs :formatter docs.ext:rich-aggregating-formatter (variable *progress-bar* (:description "Current progress bar or NIL if there is no progress bar active. Should not be manipulated manually.")) (variable *progress-bar-enabled* (:description "Boolean. T if pr...
null
https://raw.githubusercontent.com/sirherrbatka/cl-progress-bar/9374170858663c8fe829e9fb5a29bd2cb48d95ae/src/docstrings.lisp
lisp
(in-package #:cl-progress-bar) (docs:define-docs :formatter docs.ext:rich-aggregating-formatter (variable *progress-bar* (:description "Current progress bar or NIL if there is no progress bar active. Should not be manipulated manually.")) (variable *progress-bar-enabled* (:description "Boolean. T if pr...
d40f441a6c3d63053a732ae4da6a8da4f9fee377a2eab78cf956c29b257a511b
issuu/ocaml-protoc-plugin
emit.ml
open StdLabels open Parameters open Spec.Descriptor.Google.Protobuf module IntSet = Set.Make(struct type t = int let compare = compare end) let sprintf = Printf.sprintf (** Slightly overloaded name here. Its also used for all other types which would go into a module *) type module' = { module_name : string; s...
null
https://raw.githubusercontent.com/issuu/ocaml-protoc-plugin/2dd1706f08847e12b91ca4b175ddb4fd527fb20c/src/plugin/emit.ml
ocaml
* Slightly overloaded name here. Its also used for all other types which would go into a module Enums are not mangled - Maybe they should be lowercased though. To keep symmetry, only ensure that lowercased names are unique so that the upper case names are aswell. We should remove this mapping if/...
open StdLabels open Parameters open Spec.Descriptor.Google.Protobuf module IntSet = Set.Make(struct type t = int let compare = compare end) let sprintf = Printf.sprintf type module' = { module_name : string; signature : Code.t; implementation : Code.t; } let emit_enum_type ~scope ~params EnumDescriptorProt...
57896d39b2a84bc0dbea12f9c95f2d65ad3ffdd68b9a36ec44a9e8b397eeec5f
MaximilianAlgehed/VisPar
Tiny.hs
import VisPar import Control.DeepSeq example :: Par Int example = do ivar <- new fork (put ivar 5) get ivar main :: IO () main = do print $ runPar example g <- visPar Complete "0" example saveGraphPdf Vertical "tiny.graph.pdf" g
null
https://raw.githubusercontent.com/MaximilianAlgehed/VisPar/c63fc5bdaf6325158e85eb1602c7a87c66bb8d9a/examples/Tiny.hs
haskell
import VisPar import Control.DeepSeq example :: Par Int example = do ivar <- new fork (put ivar 5) get ivar main :: IO () main = do print $ runPar example g <- visPar Complete "0" example saveGraphPdf Vertical "tiny.graph.pdf" g
25cc3c2a46fd9b3991082fe7b8fced146ae23b07484ac8d4ac5e3b89b8ea67b3
dwayne/eopl3
translator.rkt
#lang eopl (require "./parser.rkt") (require "./senv.rkt") (provide Translator translate) (define (translate prog) (let ([init-senv (extend-senv 'i (extend-senv 'v (extend-senv 'x (empt...
null
https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/03-ch3/interpreters/racket/NAMELESS-PROC-3.38/translator.rkt
racket
#lang eopl (require "./parser.rkt") (require "./senv.rkt") (provide Translator translate) (define (translate prog) (let ([init-senv (extend-senv 'i (extend-senv 'v (extend-senv 'x (empt...
ab28ce8516a857b357e9fc93a1b8a895fbe209d8d79a0a04d504d435175c4c25
f-me/carma-public
ContractGenerator.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE QuasiQuotes # -- Allowed fields -- VIN | car_vin | Марка | car_make Модель | car_model ФИО владельца карты | cardnumber_cardowner Номер карты ...
null
https://raw.githubusercontent.com/f-me/carma-public/82a9f44f7d919e54daa4114aa08dfec58b01009b/srv/src/AppHandlers/ContractGenerator.hs
haskell
Allowed fields VIN | car_vin Дата регистрации в программе | cardnumber_validfrom Межсервисный интервал | cardnumber_serviceinterval Дата начала гарантии | car_warrantystart Дата покупки | car_buydate Дата первой продажи ...
# LANGUAGE NoImplicitPrelude # # LANGUAGE QuasiQuotes # | Марка | car_make Модель | car_model ФИО владельца карты | cardnumber_cardowner Номер карты | cardnumber_cardnumber ФИО менеджера ...
3dfcc123ddfe7dddf005a4fedf77b4df38798155f75e220a5a7446261016cdfb
ghilesZ/geoml
circum_incircle.ml
open Geoml let iof = int_of_float let foi = float_of_int (*************** Random utilities *******************) let gen_point xmin xmax ymin ymax = let x = xmin +. (foi (Random.int (int_of_float (xmax-.xmin)))) and y = ymin +. (foi (Random.int (int_of_float (ymax-.ymin)))) in Point.make x y let gen_triangle xm...
null
https://raw.githubusercontent.com/ghilesZ/geoml/a239499dabbbfbf74bae73a105ed567546f43312/examples/circle/circum_incircle.ml
ocaml
************** Random utilities ****************** ***************** Main example ********************* ***** Window and event handling ****
open Geoml let iof = int_of_float let foi = float_of_int let gen_point xmin xmax ymin ymax = let x = xmin +. (foi (Random.int (int_of_float (xmax-.xmin)))) and y = ymin +. (foi (Random.int (int_of_float (ymax-.ymin)))) in Point.make x y let gen_triangle xmin xmax ymin ymax = let p1 = gen_point xmin xmax ymin...
94c01e0f086ae99eb3f6448c9f79693c827b6ecbc2fe0d6812acae75239e1cd9
issuu/ocaml-zmq
test.mli
module Make: functor(T: Zmq_deferred.Deferred.T) -> sig val run: ((unit -> unit T.Deferred.t) -> unit) -> unit end
null
https://raw.githubusercontent.com/issuu/ocaml-zmq/f1aad60f136529f45543a08a2f42c63d716e4e8f/zmq-deferred/test/test.mli
ocaml
module Make: functor(T: Zmq_deferred.Deferred.T) -> sig val run: ((unit -> unit T.Deferred.t) -> unit) -> unit end
82487031087ebf651eb0b524c4bf289aa7034b48c01c7fcdde44d3b269046b36
runexec/chp
main.cljs
(ns main) (defn clojurescript [] (js/alert "Hi from ClojureScript!"))
null
https://raw.githubusercontent.com/runexec/chp/9059399c46fb4106a73631c741f1e557af541a8b/chp-examples/basic/resources/cljs/main.cljs
clojure
(ns main) (defn clojurescript [] (js/alert "Hi from ClojureScript!"))
d7a8fdc4bb4af1751c0c3f99268e395ac2d5af3b8ad2436dab912df36202db9c
zellerin/http2
errors.lisp
(in-package #:http2) (defun test-bad-headers (headers) (fiasco:signals http-stream-error (with-http2-connection (connection 'vanilla-client-connection :network-stream (connect-to-tls-server *server-domain* :port *server-port*)) ...
null
https://raw.githubusercontent.com/zellerin/http2/6b3216a2743d303686c3c94bacaee66abccd9d1e/tests/errors.lisp
lisp
if it does not signal eventually we lose. test:
(in-package #:http2) (defun test-bad-headers (headers) (fiasco:signals http-stream-error (with-http2-connection (connection 'vanilla-client-connection :network-stream (connect-to-tls-server *server-domain* :port *server-port*)) ...
20315e1dbb60022b1b23d8f95f169cc832c7d157fc72cb98aeff4be92059ce4b
TyOverby/mono
tailwind_colors.mli
* The color palettes included in the Tailwind CSS library , taken from [ -colors ] on 2021 - 02 - 13 . The larger the number on a color , the darker it is . This library takes the approach of * not * ascribing semantic value to certain colors ; instead , it selects several " palettes " of color...
null
https://raw.githubusercontent.com/TyOverby/mono/7666c0328d194bf9a569fb65babc0486f2aaa40d/vendor/janestreet-bonsai/web_ui/tailwind_colors/tailwind_colors.mli
ocaml
* The gray palette * The red palette * The yellow palette * The green palette * The blue palette * The indigo palette * The purple palette * The pink palette
* The color palettes included in the Tailwind CSS library , taken from [ -colors ] on 2021 - 02 - 13 . The larger the number on a color , the darker it is . This library takes the approach of * not * ascribing semantic value to certain colors ; instead , it selects several " palettes " of color...
682d4e313476601f0f1050ca6eba39e4a3068e5aa8b72cc6ed493d32a3e09bfb
kupl/FixML
sub24.ml
type exp = | Num of int | Plus of exp * exp | Minus of exp * exp type formula = | True | False | Not of formula | AndAlso of formula * formula | OrElse of formula * formula | Imply of formula * formula | Equal of exp * exp let rec eval_exp a = match a with | Num n -> n | Plus (n1,n2)...
null
https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/formula/formula1/submissions/sub24.ml
ocaml
type exp = | Num of int | Plus of exp * exp | Minus of exp * exp type formula = | True | False | Not of formula | AndAlso of formula * formula | OrElse of formula * formula | Imply of formula * formula | Equal of exp * exp let rec eval_exp a = match a with | Num n -> n | Plus (n1,n2)...
7daf5f096234179deb42a90d5586b4c4567bb806d532e2ee2c0126e231ce6367
BoeingX/haskell-programming-from-first-principles
PhoneNumbers.hs
module ParserCombinators.ChapterExercises.PhoneNumbers where import Control.Applicative import Data.List import Text.Trifecta instance (Eq a) => Eq (Result a) where Success a == Success b = a == b Failure a == Failure b = True _ == _ = False type NumberingPlanArea = Int -- aka area code type Exchange = I...
null
https://raw.githubusercontent.com/BoeingX/haskell-programming-from-first-principles/ffb637f536597f552a4e4567fee848ed27f3ba74/src/ParserCombinators/ChapterExercises/PhoneNumbers.hs
haskell
aka area code
module ParserCombinators.ChapterExercises.PhoneNumbers where import Control.Applicative import Data.List import Text.Trifecta instance (Eq a) => Eq (Result a) where Success a == Success b = a == b Failure a == Failure b = True _ == _ = False type Exchange = Int type LineNumber = Int data PhoneNumber = ...
8ac722e33d2f580fea1b41150d14340944f3f4d7feb0be64e32d0286a49eeb70
screenshotbot/screenshotbot-oss
harbormaster.lisp
;;;; Copyright 2018-Present Modern Interpreters Inc. ;;;; This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (defpackage :util/phabricator/harbormaster (:use #:cl) (:import-from #:util/phabr...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/7dca84b3b0cd08c32b1d7721ac8a4195786f0361/src/util/phabricator/harbormaster.lisp
lisp
Copyright 2018-Present Modern Interpreters Inc.
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (defpackage :util/phabricator/harbormaster (:use #:cl) (:import-from #:util/phabricator/conduit #:call-conduit ...
024a514bd6dc085214d349f69c9722582721a709aeff851b75482ee813ad1c5d
wilbowma/cur
equality.rkt
#lang s-exp "../main.rkt" (provide elim-== PM-sym PM-trans ML-= ML-refl elim-ML-= f-equal (for-syntax ~== ~ML-= (rename-out [~== ~PM-=])) (rename-out [==/i PM-=] [==/i ==] [refl/i PM-refl] [refl/i refl] ...
null
https://raw.githubusercontent.com/wilbowma/cur/e039c98941b3d272c6e462387df22846e10b0128/cur-lib/cur/stdlib/equality.rkt
racket
pm symmetry pm transitivity (using pm-sym) coq f_equal
#lang s-exp "../main.rkt" (provide elim-== PM-sym PM-trans ML-= ML-refl elim-ML-= f-equal (for-syntax ~== ~ML-= (rename-out [~== ~PM-=])) (rename-out [==/i PM-=] [==/i ==] [refl/i PM-refl] [refl/i refl] ...
d630d7740cac66141dbf3dcd6dcd2cfd8db8a5db1685579d30284aab8f72103a
azimut/shiny
main.lisp
(in-package :shiny) (defvar *dimensions-fbo* nil) (defvar *fbo* nil) (defvar *sam* nil) ;; Assimp (defvar *mesh* nil) (defvar *mesh-light* nil) (defvar *ass* nil) (defvar *ass-light* nil) (defvar *blend* nil) (defvar *bs* nil) ;; Merge (defvar *sam-depth* nil) (defvar *fbo-secondary* nil) (defvar *sam-secondary* ...
null
https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/examples/light-etude/main.lisp
lisp
Assimp Merge (unless *mesh*) -------------------------------------------------- Buffer stream for single stage pipelines -------------------------------------------------- HDR fbo(s) (free *fbo-secondary*) (free *fbo-terciary*) (free *fbo-ao*) ; BLOOM LIGHT ; SSAO ; pos ; nor :d)) ; p...
(in-package :shiny) (defvar *dimensions-fbo* nil) (defvar *fbo* nil) (defvar *sam* nil) (defvar *mesh* nil) (defvar *mesh-light* nil) (defvar *ass* nil) (defvar *ass-light* nil) (defvar *blend* nil) (defvar *bs* nil) (defvar *sam-depth* nil) (defvar *fbo-secondary* nil) (defvar *sam-secondary* nil) (defvar *fbo-t...
855417e1c9f0c6575281c552d0a0f8a17e7750aa0e03b0e436532fca3dab8193
korya/efuns
jeton.ml
(***********************************************************************) (* *) xlib for (* *) Fabrice Le Fessant , projet Para / SOR , INRIA Rocq...
null
https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/xlib/jeton.ml
ocaml
********************************************************************* ...
xlib for Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt Copyright 1998 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . open Concur type 'a value = NoValue | Value of 'a |...
26400f2328525e667d0c7a5444d4cf1a0ab53ff4e4f7eeff053c2247991b45d4
LeventErkok/crackNum
Setup.hs
----------------------------------------------------------------------------- -- | -- Module : Main Copyright : ( c ) -- License : BSD3 -- Maintainer : -- Stability : experimental -- -- Setup module for crackNum ----------------------------------------------------------------------------- # O...
null
https://raw.githubusercontent.com/LeventErkok/crackNum/3c89e5a4f70257dd2cb9cb069b8c49fbb90f30c6/Setup.hs
haskell
--------------------------------------------------------------------------- | Module : Main License : BSD3 Maintainer : Stability : experimental Setup module for crackNum ---------------------------------------------------------------------------
Copyright : ( c ) # OPTIONS_GHC -Wall # module Main(main) where import Distribution.Simple main :: IO () main = defaultMain
54be7b76e595d0b1eb2db9656afec49e71074a2dedb8f6f6931e95dbf8501284
SuzanneSoy/anaphoric
if-let-test.rkt
#lang racket (require anaphoric/if-let rackunit) (define lst '(x y z a b c)) (check-equal? (if-let [x (member 'a lst)] (begin (check-equal? x '(a b c)) 'seen) (fail "aif selected wrong branch")) 'seen) (check-equal? (let ([x 'outer]) ...
null
https://raw.githubusercontent.com/SuzanneSoy/anaphoric/c648ec2aad6d2b2ec72acc729143454d1e855cf6/test/if-let-test.rkt
racket
#lang racket (require anaphoric/if-let rackunit) (define lst '(x y z a b c)) (check-equal? (if-let [x (member 'a lst)] (begin (check-equal? x '(a b c)) 'seen) (fail "aif selected wrong branch")) 'seen) (check-equal? (let ([x 'outer]) ...
6d976633252631c0e372173c4bc373c95e8a830999793b6df3efb68f40c43a31
ocamllabs/ocaml-modular-implicits
t252-pushoffsetclosure.ml
open Lib;; let rec f x = x and g _ = f 4 and h _ = f 6 in if h 1 <> 6 then raise Not_found ;; * 0 CONSTINT 42 2 PUSHACC0 3 MAKEBLOCK1 0 5 POP 1 7 9 BRANCH 25 11 ACC0 12 RETURN 1 14 CONSTINT 4 16 PUSHOFFSETCLOSUREM2 ...
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-ocaml/t252-pushoffsetclosure.ml
ocaml
open Lib;; let rec f x = x and g _ = f 4 and h _ = f 6 in if h 1 <> 6 then raise Not_found ;; * 0 CONSTINT 42 2 PUSHACC0 3 MAKEBLOCK1 0 5 POP 1 7 9 BRANCH 25 11 ACC0 12 RETURN 1 14 CONSTINT 4 16 PUSHOFFSETCLOSUREM2 ...
20433aa6e6ccc5cf9a3512798cd6ce22ec563369ee51668a24ed71d437aea306
orionsbelt-battlegrounds/obb-rules
test_runner.cljs
(ns obb-rules.test-runner (:require [cljs.test :refer-macros [run-tests run-all-tests] :refer [empty-env report]] [obb-rules.test-requires])) (enable-console-print!) (defn runner [] (time (run-all-tests #"obb-rules.*-test"))) (runner) (defn -main [& args]) (set! *main-cli-fn* -main)
null
https://raw.githubusercontent.com/orionsbelt-battlegrounds/obb-rules/97fad6506eb81142f74f4722aca58b80d618bf45/test/obb_rules/test_runner.cljs
clojure
(ns obb-rules.test-runner (:require [cljs.test :refer-macros [run-tests run-all-tests] :refer [empty-env report]] [obb-rules.test-requires])) (enable-console-print!) (defn runner [] (time (run-all-tests #"obb-rules.*-test"))) (runner) (defn -main [& args]) (set! *main-cli-fn* -main)
4d25add05f7fe1a0d27fa86ddd8cd9b003b94a5ae4d796983162199cf0258cb7
buildsome/buildsome
Show.hs
module Lib.Show (show) where import Prelude.Compat hiding (show) import qualified Prelude.Compat as Prelude import Data.String (IsString(..)) show :: (Show a, IsString str) => a -> str show = fromString . Prelude.show
null
https://raw.githubusercontent.com/buildsome/buildsome/479b92bb74a474a5f0c3292b79202cc850bd8653/src/Lib/Show.hs
haskell
module Lib.Show (show) where import Prelude.Compat hiding (show) import qualified Prelude.Compat as Prelude import Data.String (IsString(..)) show :: (Show a, IsString str) => a -> str show = fromString . Prelude.show
77773ac280cc6ea88d3b9bd0e4289906ce5476cf563a1c1162982606d54396c6
TerrorJack/ghc-alter
memo001.hs
module Main(main) where import Memo1 testMemo = do let keys = [ [1..n] | n <- [1..1000] ] keys2 = [ [n,n-1..1] | n <- [1..1000] ] mlength = memo length putStr (show (map mlength (keys ++ keys ++ keys2 ++ keys2))) putStr (show (mlength [1..100000])) will memoize itself over each element of '...
null
https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/tests/memo001.hs
haskell
entries can be purged. Finally, we do a a large computation purged.
module Main(main) where import Memo1 testMemo = do let keys = [ [1..n] | n <- [1..1000] ] keys2 = [ [n,n-1..1] | n <- [1..1000] ] mlength = memo length putStr (show (map mlength (keys ++ keys ++ keys2 ++ keys2))) putStr (show (mlength [1..100000])) will memoize itself over each element of '...
3b42dd7f98ca760cae44a8d21c3989a83346ccbe700426c6f7c23e947f8b5c70
xtdb/xtdb
main.clj
(ns xtdb.console-demo.main (:require [xtdb.api :as xt] [integrant.core :as ig] [integrant.repl :as ir] [clojure.string :as string] [clojure.java.io :as io] [xtdb.rocksdb :as rocks]) (:import java.io.Closeable) (:gen-class)) (defmethod ig/init-key :conso...
null
https://raw.githubusercontent.com/xtdb/xtdb/e2f51ed99fc2716faa8ad254c0b18166c937b134/examples/console-demo/src/xtdb/console_demo/main.clj
clojure
Await data-set data Submit :bar multiple times - entity to showcase entity searching/history.
(ns xtdb.console-demo.main (:require [xtdb.api :as xt] [integrant.core :as ig] [integrant.repl :as ir] [clojure.string :as string] [clojure.java.io :as io] [xtdb.rocksdb :as rocks]) (:import java.io.Closeable) (:gen-class)) (defmethod ig/init-key :conso...
31551d2d0cf94010922e5c1e4ea27ca228f712dc0a5ed39bd32abfed24f2b509
grin-compiler/ghc-wpc-sample-programs
Powerpoint.hs
# LANGUAGE NoImplicitPrelude # module Tests.Writers.Powerpoint (tests) where import Prelude import Tests.Writers.OOXML (ooxmlTest) import Text.Pandoc import Test.Tasty import System.FilePath import Text.DocTemplates (ToContext(toVal), Context(..)) import qualified Data.Map as M import Data.Text (pack) -- templating i...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/test/Tests/Writers/Powerpoint.hs
haskell
templating is important enough, and can break enough things, that we want to run all our tests with both default formatting and a template.
# LANGUAGE NoImplicitPrelude # module Tests.Writers.Powerpoint (tests) where import Prelude import Tests.Writers.OOXML (ooxmlTest) import Text.Pandoc import Test.Tasty import System.FilePath import Text.DocTemplates (ToContext(toVal), Context(..)) import qualified Data.Map as M import Data.Text (pack) modifyPptxName...
2e1ad8320bce7f60ca161b954f4fb0b7d391d58ea786f3106f9b08778460a661
thheller/shadow-cljs
util.cljs
(ns shadow.cljs.npm.util (:require ["child_process" :as cp] ["fs" :as fs])) (defn slurp [file] (-> (fs/readFileSync file) (.toString))) (defn reduce-> [init reduce-fn coll] (reduce reduce-fn init coll)) (defn conj-set [x y] (if (nil? x) #{y} (conj x y))) (defn kill-proc [^js proc] ;;...
null
https://raw.githubusercontent.com/thheller/shadow-cljs/ba0a02aec050c6bc8db1932916009400f99d3cce/src/main/shadow/cljs/npm/util.cljs
clojure
the java process should now always exit cleanly when the node process is killed
(ns shadow.cljs.npm.util (:require ["child_process" :as cp] ["fs" :as fs])) (defn slurp [file] (-> (fs/readFileSync file) (.toString))) (defn reduce-> [init reduce-fn coll] (reduce reduce-fn init coll)) (defn conj-set [x y] (if (nil? x) #{y} (conj x y))) (defn kill-proc [^js proc] so...
dc0ab6d6364684fcc7f54f49fba40204fece900c44c10e062340de568663be84
metabase/metabase
field_values.clj
(ns metabase.models.params.field-values "Code related to fetching FieldValues for Fields to populate parameter widgets. Always used by the field values (`GET /api/field/:id/values`) endpoint; used by the chain filter endpoints under certain circumstances." (:require [metabase.models.field-values :as field-valu...
null
https://raw.githubusercontent.com/metabase/metabase/2cd0bb399bb9c4d1ed2b8de0c5fd05cb499aa02b/src/metabase/models/params/field_values.clj
clojure
used by the chain filter endpoints under certain circumstances." read permissions for a Field = partial permissions for its parent Table (including EE segmented permissions) +----------------------------------------------------------------------------------------------------------------+ | ...
(ns metabase.models.params.field-values "Code related to fetching FieldValues for Fields to populate parameter widgets. Always used by the field (:require [metabase.models.field-values :as field-values :refer [FieldValues]] [metabase.models.interface :as mi] [metabase.plugins.classloader :as classloader] ...
e51c68bf47d042e2032f2e5e6a4c91803be40fb4e409c6e413a81d00ba9203b1
Relph1119/sicp-solutions-manual
p1-23-find-divisor.scm
(load "src/examples/ch01/p8-square.scm") (load "src/examples/ch01/p33-divides.scm") (load "src/practices/ch01/p1-23-next.scm") (define (find-divisor n test-divisor) (cond ((> (square test-divisor) n) n) ((divides? test-divisor n) test-divisor) (else (find-divisor n (next test-divisor)))))
null
https://raw.githubusercontent.com/Relph1119/sicp-solutions-manual/f2ff309a6c898376209c198030c70d6adfac1fc1/src/practices/ch01/p1-23-find-divisor.scm
scheme
(load "src/examples/ch01/p8-square.scm") (load "src/examples/ch01/p33-divides.scm") (load "src/practices/ch01/p1-23-next.scm") (define (find-divisor n test-divisor) (cond ((> (square test-divisor) n) n) ((divides? test-divisor n) test-divisor) (else (find-divisor n (next test-divisor)))))
3f2524552455a084d2c11def2b5a4a3ea6932c8a9a403b271550dc688f07c7c1
cram2/cram
main.lisp
(in-package :cslg) (defun main (num-experiments) (setf cram-bullet-reasoning-belief-state:*spawn-debug-window* nil) (setf cram-tf:*tf-broadcasting-enabled* t) (roslisp-utilities:startup-ros :name "cram" :anonymous nil) (setf ccl::*is-logging-enabled* t) (setf ccl::*host* "''") (setf ccl::*cert-path* "'/hom...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_learning/cram_sim_log_generator/src/main.lisp
lisp
(pr2-proj:with-simulated-robot (demo::demo-random nil '(:bowl :spoon))) (demo::generate-training-data)
(in-package :cslg) (defun main (num-experiments) (setf cram-bullet-reasoning-belief-state:*spawn-debug-window* nil) (setf cram-tf:*tf-broadcasting-enabled* t) (roslisp-utilities:startup-ros :name "cram" :anonymous nil) (setf ccl::*is-logging-enabled* t) (setf ccl::*host* "''") (setf ccl::*cert-path* "'/hom...
e552ec1f0c4995e81424f0c997646a0b930611b7651d47da519f8f20b2e38a88
BinaryAnalysisPlatform/bap
thumb_mov.mli
open Bap_core_theory open Thumb_core open Thumb_opcodes module Make(CT : Theory.Core) : sig open Theory (** [adds rd, rn, #x] aka add(1) *) val addi3 : r32 reg -> r32 reg -> int -> cond -> unit eff * [ adds rd , # x ] aka add(2 ) val addi8 : r32 reg -> int -> cond -> unit eff * [ adds rd , rn , ] aka add(...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/354f8082218482d05b05598c172e0364108fd281/plugins/thumb/thumb_mov.mli
ocaml
* [adds rd, rn, #x] aka add(1) * [subs sp, #i] aka sub(4) * [orrs rd, rn] * [cmp rn, #i]
open Bap_core_theory open Thumb_core open Thumb_opcodes module Make(CT : Theory.Core) : sig open Theory val addi3 : r32 reg -> r32 reg -> int -> cond -> unit eff * [ adds rd , # x ] aka add(2 ) val addi8 : r32 reg -> int -> cond -> unit eff * [ adds rd , rn , ] aka add(3 ) and add(4 ) val addrr : r32 reg -...
4f7ee81126d91fe9ee7c3ad31f78bd4f14b541ddadcdcf4b69a7b46b2c5cd1da
haskell/cabal
init-interactive.test.hs
import Test.Cabal.Prelude main = cabalTest $ withSourceCopyDir "app" $ do cwd <- fmap testSourceCopyDir getTestEnv buildOut <- withDirectory cwd $ do cabalWithStdin "init" ["-i"] "2\n\n5\n\n\n\n\n\n\n\n\n\n\n\n\n" setup "configure" [] setup' "build" ["app"] assertFileDoesConta...
null
https://raw.githubusercontent.com/haskell/cabal/869ecdce5b4f663085835a5127b56e725174e3bb/cabal-testsuite/PackageTests/Init/init-interactive.test.hs
haskell
import Test.Cabal.Prelude main = cabalTest $ withSourceCopyDir "app" $ do cwd <- fmap testSourceCopyDir getTestEnv buildOut <- withDirectory cwd $ do cabalWithStdin "init" ["-i"] "2\n\n5\n\n\n\n\n\n\n\n\n\n\n\n\n" setup "configure" [] setup' "build" ["app"] assertFileDoesConta...
46e9ed4b5b3a39b3b851c3c896bbf3f10ce0a137f2c0f10ef6b5be0aba8af00a
plewto/Cadejo
subedit.clj
(ns cadejo.ui.instruments.subedit (:require [seesaw.core :as ss]) ) (defprotocol InstrumentSubEditor (widgets [this]) (widget [this key]) (parent [this]) (parent! [this p]) (status! [this msg]) (warning! [this msg]) (set-param! [this param value]) (init! [...
null
https://raw.githubusercontent.com/plewto/Cadejo/2a98610ce1f5fe01dce5f28d986a38c86677fd67/src/cadejo/ui/instruments/subedit.clj
clojure
Wrap several subeditors to treat them as a single subeditor if nil a vertical panel is created. Returns InstrumentSubEditor ignore
(ns cadejo.ui.instruments.subedit (:require [seesaw.core :as ss]) ) (defprotocol InstrumentSubEditor (widgets [this]) (widget [this key]) (parent [this]) (parent! [this p]) (status! [this msg]) (warning! [this msg]) (set-param! [this param value]) (init! [...
ab05e595f44bd53d4d4832ca3d509f929b8678d0fc04ff3242ebffa793e77195
squaresLab/genprog-code
cdiff.ml
* * Copyright ( c ) 2012 - 2018 , * < > * < > * < > * < > * < > * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are ...
null
https://raw.githubusercontent.com/squaresLab/genprog-code/7982415b347529efee02190ab9ba6bd7eda6195e/src/cdiff.ml
ocaml
* We convert a CIL AST to a very generic data structure for the purposes of performing the DiffX structural difference algorithm; we convert back later. This structure is sufficiently generic that it could easily be adapted to non-C representations unique per node */* */* */* * a node_info variable maps ...
* * Copyright ( c ) 2012 - 2018 , * < > * < > * < > * < > * < > * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are ...
ca5f483affaf7f6c8ef35898f7b953ae2383957fb86d2cedb0ba2af52770cb7d
tomsmalley/semantic-reflex
List.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RecursiveDo #-} # LANGUAGE RecordWildCards # {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} module Example.Sectio...
null
https://raw.githubusercontent.com/tomsmalley/semantic-reflex/5a973390fae1facbc4351b75ea59210d6756b8e5/semantic-reflex-example/src/Example/Section/List.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE QuasiQuotes # # LANGUAGE RecursiveDo # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # In the absence of local data declarations: data Files a = File a | Folder a [Files a]
# LANGUAGE FlexibleContexts # # LANGUAGE RecordWildCards # module Example.Section.List where import Control.Lens hiding (List) import Data.Foldable (for_, traverse_) import Data.Monoid ((<>)) import Reflex.Dom.SemanticUI import Reflex.Dom.Core (text) import Example.QQ import Example.Common data Files a =...
4a68746efada5d02df82b865ea400ffe8b34fd80f4049cfaa0d42505428553e6
modular-macros/ocaml-macros
pr7260.ml
type bar = < bar: unit > type _ ty = Int : int ty type dyn = Dyn : 'a ty -> dyn;; class foo = object (this) method foo (Dyn ty) = match ty with | Int -> (this :> bar) end;; (* fail, but not for scope *) [%%expect{| type bar = < bar : unit > type _ ty = Int : int ty type dyn = Dyn : 'a ty -> dyn...
null
https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/typing-gadts/pr7260.ml
ocaml
fail, but not for scope
type bar = < bar: unit > type _ ty = Int : int ty type dyn = Dyn : 'a ty -> dyn;; class foo = object (this) method foo (Dyn ty) = match ty with | Int -> (this :> bar) [%%expect{| type bar = < bar : unit > type _ ty = Int : int ty type dyn = Dyn : 'a ty -> dyn Line _, characters 0-108: Error: This ...
f7cf58a1bea4e67dc55be61f05bc51f22c83e88aeb703a2bbff69b91110ce292
MyPost/cassius
protocols.clj
(ns cassius.protocols) (def ^:dynamic *default-key-encoding* :utf-8) (def ^:dynamic *default-value-encoding* :default) (defprotocol Mappable (to-map [m] "Converts object into a hashmap")) (defmulti from-map "Takes a map and converts it into type t" (fn [m t] t)) (defprotocol ByteBufferable (to-bbuff [v] "Co...
null
https://raw.githubusercontent.com/MyPost/cassius/7b5f550fa8e8f825d4ecd7ba6a0d34c5ff606a7c/src/cassius/protocols.clj
clojure
(ns cassius.protocols) (def ^:dynamic *default-key-encoding* :utf-8) (def ^:dynamic *default-value-encoding* :default) (defprotocol Mappable (to-map [m] "Converts object into a hashmap")) (defmulti from-map "Takes a map and converts it into type t" (fn [m t] t)) (defprotocol ByteBufferable (to-bbuff [v] "Co...
bd66d084bf4a5a6ec34d44c400a4aa82a0e6bf43badf4152cc09c53e9df1772a
yakaz/yamerl
ex_6.11_multiline_comments.erl
-module('ex_6.11_multiline_comments'). -include_lib("eunit/include/eunit.hrl"). -define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml"). single_test_() -> ?_assertMatch( {yamerl_parser, {file,?FILENAME}, [], <<>>, 43, true, [], 0, 44, ...
null
https://raw.githubusercontent.com/yakaz/yamerl/0032607a7b27fa2b548fc9a02d7ae6b53469c0c5/test/parsing/ex_6.11_multiline_comments.erl
erlang
-module('ex_6.11_multiline_comments'). -include_lib("eunit/include/eunit.hrl"). -define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml"). single_test_() -> ?_assertMatch( {yamerl_parser, {file,?FILENAME}, [], <<>>, 43, true, [], 0, 44, ...
eabc07d583302129b7d039123672cb2bfb4b57a54f518642188194962acd554c
YoshikuniJujo/funpaala
convert.hs
halve :: Double -> Double halve = (/ 2) seven :: Integer seven = 7 convert :: (Double -> Double) -> Integer -> Double convert f n = f $ fromIntegral n
null
https://raw.githubusercontent.com/YoshikuniJujo/funpaala/5366130826da0e6b1180992dfff94c4a634cda99/samples/09_tuple/convert.hs
haskell
halve :: Double -> Double halve = (/ 2) seven :: Integer seven = 7 convert :: (Double -> Double) -> Integer -> Double convert f n = f $ fromIntegral n
03d82759562eecf361603ea648f301cdb75fc39ecb9630d60863f147df278ab8
ekmett/concurrent
Unsafe.hs
# LANGUAGE PolyKinds # # LANGUAGE DataKinds # {-# LANGUAGE RankNTypes #-} # LANGUAGE TypeFamilies # # LANGUAGE TupleSections # # LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FunctionalDependencies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE RoleAn...
null
https://raw.githubusercontent.com/ekmett/concurrent/e22acb891890f412a7f16352836fdc4fb8de8936/src/Concurrent/Par/Unsafe.hs
haskell
# LANGUAGE RankNTypes # idempotent computations
# LANGUAGE PolyKinds # # LANGUAGE DataKinds # # LANGUAGE TypeFamilies # # LANGUAGE TupleSections # # LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FunctionalDependencies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE RoleAnnotations # module Concurren...
5bacc69c1975cd381020acbfbcc1f3db125b69369d8629ff8ba10031764a3335
alexkazik/qrcode
Intermediate.hs
# LANGUAGE NoImplicitPrelude # module Codec.QRCode.Intermediate ( -- * Generators -- | The results of the different generators can be appended using `<>`. mixed , automatic , text , binary , kanji , alphanumeric , numeric , eci -- * Intermediate , intermediate -- * Encoder , encode --...
null
https://raw.githubusercontent.com/alexkazik/qrcode/7ee12de893c856a968dc1397602a7f81f8ea2c68/qrcode-core/src/Codec/QRCode/Intermediate.hs
haskell
* Generators | The results of the different generators can be appended using `<>`. * Intermediate * Encoder * Re-Exports | Convert segments into an intermediate state. be an result. The Version and ErrorLevel is already determined at this point. | Convert the intermediate state into an image.
# LANGUAGE NoImplicitPrelude # module Codec.QRCode.Intermediate ( mixed , automatic , text , binary , kanji , alphanumeric , numeric , eci , intermediate , encode , module Codec.QRCode.Data.ErrorLevel , module Codec.QRCode.Data.Mask , module Codec.QRCode.Data.QRImage , module Codec.QRCo...
51caf5171ab13ed110ec1d63257273a5a5caf0b816b01acc39187cdf7cb060cb
Bluehouse-Technology/grpc
grpc_app.erl
%%%------------------------------------------------------------------- Licensed to the Apache Software Foundation ( ASF ) under one %%% or more contributor license agreements. See the NOTICE file %%% distributed with this work for additional information %%% regarding copyright ownership. The ASF licenses this file ...
null
https://raw.githubusercontent.com/Bluehouse-Technology/grpc/cdb7ab70c57e248d474369d6b3c5de77151f52f7/src/grpc_app.erl
erlang
------------------------------------------------------------------- or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file "License"); you may not use this file except in compliance -2.0 Unle...
Licensed to the Apache Software Foundation ( ASF ) under one to you under the Apache License , Version 2.0 ( the with the License . You may obtain a copy of the License at software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(grpc_app)...
d903b78c54113ab3406e63b6913418207a1b889e77531cea4dd122d8d40bff44
techascent/tech.ml.dataset
modelling_test.clj
(ns tech.v3.dataset.modelling-test (:require [tech.v3.dataset.modelling :as modelling] [tech.v3.dataset :as ds] [tech.v3.dataset.categorical :as ds-cat] [tech.v3.dataset.test-utils :as test-utils] [tech.v3.datatype :as dtype] [clojure.test :refer [deftest is...
null
https://raw.githubusercontent.com/techascent/tech.ml.dataset/2e20935e38d3eaf0c3554b274cef8f700b08558e/test/tech/v3/dataset/modelling_test.clj
clojure
(ns tech.v3.dataset.modelling-test (:require [tech.v3.dataset.modelling :as modelling] [tech.v3.dataset :as ds] [tech.v3.dataset.categorical :as ds-cat] [tech.v3.dataset.test-utils :as test-utils] [tech.v3.datatype :as dtype] [clojure.test :refer [deftest is...
ae23d45b22d0703744d8b1af50cfbf5cbc15e3231edc367550d8abb3f168e569
solita/mnt-teet
comments_view.cljs
(ns teet.comments.comments-view (:require [herb.core :refer [<class]] [reagent.core :as r] [tuck.core :as t] [teet.app-state :as app-state] [teet.authorization.authorization-check :as authorization-check :refer [when-authorized]] [teet.comment.comment-model ...
null
https://raw.githubusercontent.com/solita/mnt-teet/0f1868f8be94e68c5e8daf7e1988541f23ed0631/app/frontend/src/cljs/teet/comments/comments_view.cljs
clojure
TODO: Both this and the create comment form should be replaced with form2 to make the add image button look decent. (log/debug "showing delete-button-with-confirm, id" (str "delete-button-" id)) New comment was just added but hasn't been refetched yet, show skeleton _ (log/debug "keys in page-state map:" (ke...
(ns teet.comments.comments-view (:require [herb.core :refer [<class]] [reagent.core :as r] [tuck.core :as t] [teet.app-state :as app-state] [teet.authorization.authorization-check :as authorization-check :refer [when-authorized]] [teet.comment.comment-model ...
72693edb16c11459b92d7295fa68e5c8031bf852b43fac7a27ce7cd58a8eb83c
Datomic/mbrainz-sample
query.clj
Copyright ( c ) Metadata Partners , LLC . 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 this distribution. ;; By using this software in any fashion, you are a...
null
https://raw.githubusercontent.com/Datomic/mbrainz-sample/d5b1221d1df493b9374ec3bf76d445d4f7ae59e1/src/clj/datomic/samples/query.clj
clojure
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 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 ...
Copyright ( c ) Metadata Partners , LLC . All rights reserved . (ns datomic.samples.query (:require [datomic.api :as d])) (defn only "Return the only item from a query result" [query-result] (assert (= 1 (count query-result))) (assert (= 1 (count (first query-result)))) (ffirst query-result)) (defpro...
94715e6d0f7fbf8f2175a9e18f2d022bdbb1caa979d63dfc6075fefa883f134f
wavewave/hoodle
StartUp.hs
# LANGUAGE CPP # # LANGUAGE RecordWildCards # -- | -- Module : Hoodle.StartUp Copyright : ( c ) 2012 , 2014 -- -- License : BSD3 Maintainer : < > -- Stability : experimental Portability : GHC module Hoodle.StartUp where import qualified Config.Dyre as Dyre import Hoodle.Command (command...
null
https://raw.githubusercontent.com/wavewave/hoodle/518533227caa76d1a3b09423c7d98761c177d429/hoodle/src/Hoodle/StartUp.hs
haskell
| Module : Hoodle.StartUp License : BSD3 Stability : experimental | | |
# LANGUAGE CPP # # LANGUAGE RecordWildCards # Copyright : ( c ) 2012 , 2014 Maintainer : < > Portability : GHC module Hoodle.StartUp where import qualified Config.Dyre as Dyre import Hoodle.Command (commandLineProcess) import Hoodle.ProgType (mode) import Hoodle.Script (ScriptConfig (..), showErro...
aa2b1cffe694897f27c8cb685c27fd53bb697488f32a14da5e42c21b9b8986aa
lasp-lang/partisan
demers_anti_entropy.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2018 . All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the...
null
https://raw.githubusercontent.com/lasp-lang/partisan/fd048fc1b34309d9fa41450434a7e7b3b2fa1fb8/protocols/demers_anti_entropy.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2018 . All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(demers_anti_entropy)...
064a64a0b03dfbad52a8cb30ff1c0b884da1bb4e826dfa58fea401ef88fa39e4
turquoise-hexagon/euler
solution.scm
(import (euler)) (define (solve n) (digitsum n)) (let ((_ (solve (expt 2 1000)))) (print _) (assert (= _ 1366)))
null
https://raw.githubusercontent.com/turquoise-hexagon/euler/592c5f4f45fe8e8b82102be9fe11b3b1134d98fc/src/016/solution.scm
scheme
(import (euler)) (define (solve n) (digitsum n)) (let ((_ (solve (expt 2 1000)))) (print _) (assert (= _ 1366)))
c20a0c266e64526f61d8a450ec61b9d2f43eb136b47a04ceaf0af097ef330a2a
zenspider/schemers
exercise.2.21.scm
#lang racket/base (require "../lib/test.rkt") Exercise 2.21 : ;; The procedure `square-list' takes a list of numbers as argument and ;; returns a list of the squares of those numbers. ;; ( square - list ( list 1 2 3 4 ) ) ;; (1 4 9 16) ;; Here are two different definitions of ` square - list ' . Comp...
null
https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_2/exercise.2.21.scm
scheme
The procedure `square-list' takes a list of numbers as argument and returns a list of the squares of those numbers. (1 4 9 16) of them by filling in the missing expressions: (define (square-list items) (if (null? items) nil (cons <??> <??>))) (define (square-list...
#lang racket/base (require "../lib/test.rkt") Exercise 2.21 : ( square - list ( list 1 2 3 4 ) ) Here are two different definitions of ` square - list ' . Complete both (define (square n) (* n n)) (define (square-list1 items) (if (null? items) null (cons (square (car items)) (square-list1 (cdr i...
2fc5f6b3b18043aa3e920ecd2eb3332944627cfa6da5e741b52e07ea0dd07d99
racket/scribble
info.rkt
#lang info (define collection 'multi) (define deps '("scheme-lib" "base" "at-exp-lib" "scribble-text-lib")) (define pkg-desc "Language for HTML with embedded Racket code") (define pkg-authors '(mflatt eli)) (define license '(Apache-2.0 OR MIT))
null
https://raw.githubusercontent.com/racket/scribble/359c0cddf7ba1cf6cf8502f9396f24d362d1eba5/scribble-html-lib/info.rkt
racket
#lang info (define collection 'multi) (define deps '("scheme-lib" "base" "at-exp-lib" "scribble-text-lib")) (define pkg-desc "Language for HTML with embedded Racket code") (define pkg-authors '(mflatt eli)) (define license '(Apache-2.0 OR MIT))
70d17b3906ac27ce311f66c9faab694f72bf38e83abaf0f426bc89e125378143
vii/dysfunkycom
joystick.lisp
(in-package #:sdl-examples) (defvar *joystick* nil) (defvar *num-joysticks* 0) (defvar *current-joystick-index* 0) (defvar *status* nil) (defstruct joystick fp index axis-motion button-down button-up hat-motion ball-motion status) (defun incf-line (&optional (lines 1) (font sdl:*default-font*)) (*...
null
https://raw.githubusercontent.com/vii/dysfunkycom/a493fa72662b79e7c4e70361ad0ea3c7235b6166/addons/lispbuilder-sdl/examples/joystick.lisp
lisp
(in-package #:sdl-examples) (defvar *joystick* nil) (defvar *num-joysticks* 0) (defvar *current-joystick-index* 0) (defvar *status* nil) (defstruct joystick fp index axis-motion button-down button-up hat-motion ball-motion status) (defun incf-line (&optional (lines 1) (font sdl:*default-font*)) (*...
a281d1fcf6d092087025d8dda46b5980b5d7cda4500937a905815c790151a1ee
input-output-hk/cardano-rest
Web.hs
module Explorer.Web ( runServer , WebserverConfig(..) -- For testing. , CAddress (..) , CTxAddressBrief (..) , CAddressSummary (..) , CCoin (..) , CGenesisAddressInfo (..) , CHash (..) , CTxBrief (..) , CTxHash (..) , queryAddressSummary , queryAllGenesisAddresses , queryBlocksTxs , query...
null
https://raw.githubusercontent.com/input-output-hk/cardano-rest/040b123b45af06060aae04479d92fada68820f12/explorer-api/src/Explorer/Web.hs
haskell
For testing.
module Explorer.Web ( runServer , WebserverConfig(..) , CAddress (..) , CTxAddressBrief (..) , CAddressSummary (..) , CCoin (..) , CGenesisAddressInfo (..) , CHash (..) , CTxBrief (..) , CTxHash (..) , queryAddressSummary , queryAllGenesisAddresses , queryBlocksTxs , queryChainTip , runQu...
e275faef0c619b159b2763a62c6449f7e3fe221b5875fe9eb803a9f02bb5f750
serioga/webapp-clojure-2020
core.clj
(ns app.html.core (:require [clojure.java.io :as io] [rum.core :as rum]) (:import (org.apache.commons.codec.digest DigestUtils))) (set! *warn-on-reflection* true) •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• (defn render-page "Renders hiccup to ...
null
https://raw.githubusercontent.com/serioga/webapp-clojure-2020/9b33fe785fddeaa0a0a22b288d34d9be0c72ffc6/src/app/html/core.clj
clojure
(ns app.html.core (:require [clojure.java.io :as io] [rum.core :as rum]) (:import (org.apache.commons.codec.digest DigestUtils))) (set! *warn-on-reflection* true) •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• (defn render-page "Renders hiccup to ...
aec41091e576983a515c63fcae91f13bed0e6fc5adf50bc8fb53a2fbb203a1c4
clash-lang/clash-compiler
VRotate.hs
module VRotate where import Clash.Prelude import Clash.Explicit.Testbench topEntity :: Vec 5 Int -> (Vec 5 Int,Vec 5 Int) topEntity v = (rotateLeftS v d2,rotateRightS v d2) {-# NOINLINE topEntity #-} testBench :: Signal System Bool testBench = done where testInput = pure (1:>2:>3:>4:>5:>Nil) expectedO...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/Vector/VRotate.hs
haskell
# NOINLINE topEntity #
module VRotate where import Clash.Prelude import Clash.Explicit.Testbench topEntity :: Vec 5 Int -> (Vec 5 Int,Vec 5 Int) topEntity v = (rotateLeftS v d2,rotateRightS v d2) testBench :: Signal System Bool testBench = done where testInput = pure (1:>2:>3:>4:>5:>Nil) expectedOutput = outputVerifier' clk...
9495f4948890f115bd496992e1b296f143be66c9ebb959feef4bdec4c8c04ceb
garycrawford/lein-life
user.clj
(ns user "Tools for interactive development with the REPL. This file should not be included in a production build of the application." (:require [clojure.tools.namespace.repl :refer [refresh]] [midje.repl :refer [autotest]] [reloaded.repl :refer [system init start stop go reset]] [cemerick.pomegra...
null
https://raw.githubusercontent.com/garycrawford/lein-life/d55f3636950b58b02399ab32eb1f6d81ecfce823/src/leiningen/new/life/common/dev/user.clj
clojure
TODO: switch out for alembic as it allows reloading of project file
(ns user "Tools for interactive development with the REPL. This file should not be included in a production build of the application." (:require [clojure.tools.namespace.repl :refer [refresh]] [midje.repl :refer [autotest]] [reloaded.repl :refer [system init start stop go reset]] [cemerick.pomegra...
19136871dcd9c723125de42438d95b7301d0eda5efda05fa79d37ec7a0b15f8e
fission-codes/fission
Types.hs
module Fission.CLI.PubSub.Secure.Session.Handshake.Types (Handshake (..)) where import Data.ByteArray as ByteArray import qualified Data.ByteString.Base64 as Base64 import qualified RIO.ByteString.Lazy as Lazy import qualified RIO.Text ...
null
https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-cli/library/Fission/CLI/PubSub/Secure/Session/Handshake/Types.hs
haskell
module Fission.CLI.PubSub.Secure.Session.Handshake.Types (Handshake (..)) where import Data.ByteArray as ByteArray import qualified Data.ByteString.Base64 as Base64 import qualified RIO.ByteString.Lazy as Lazy import qualified RIO.Text ...
4d59c8a5b68535827bf6043e1fa194acc314553391f614263b18578806b31635
ocaml-flambda/ocaml-jst
typedecl.ml
(**************************************************************************) (* *) (* OCaml *) (* *) and ,...
null
https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/c703f5f7772dd4252405b086be11c15a3c67f2ac/typing/typedecl.ml
ocaml
************************************************************************ OCaml ...
and , projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Misc open Asttypes open Parsetree open Primitive open Types open Typetexp module String = Misc.Stdlib.String ty...
85cb769bd486cc7d8c5e4d5049621fe87771e08a4f3fbc649a005e71ac9a85f1
aterreno/etcd-clojure
core_test.clj
(ns etcd-clojure.core-test (:require [clojure.test :refer :all] [etcd-clojure.core :as etcd])) (defn setup-test [] (let [connect (etcd/connect! "127.0.0.1")] (is (= ":2379") (first connect)))) (defn teardown-test [] (println "teardown")) (defn once-fixtures [f] (setup-test) (try (f) ...
null
https://raw.githubusercontent.com/aterreno/etcd-clojure/3112e8b1bddbb71bb0cfa12bc9a60550b4f02305/test/etcd_clojure/core_test.clj
clojure
(ns etcd-clojure.core-test (:require [clojure.test :refer :all] [etcd-clojure.core :as etcd])) (defn setup-test [] (let [connect (etcd/connect! "127.0.0.1")] (is (= ":2379") (first connect)))) (defn teardown-test [] (println "teardown")) (defn once-fixtures [f] (setup-test) (try (f) ...
89ebdbd3ca1148dd88e2e80e1df59d9e630c9c49408caa7ff061c91c45e0a8b4
rudolph-miller/dyna
error.lisp
(in-package :cl-user) (defpackage dyna.error (:use :cl)) (in-package :dyna.error) (syntax:use-syntax :annot) @export (define-condition <dyna-error> (simple-error) ()) @export (define-condition <dyna-request-error> (<dyna-error>) ((status :initarg :status) (meta :initarg :meta) (message :initarg :message)) ...
null
https://raw.githubusercontent.com/rudolph-miller/dyna/d8cf27bc7428e3ac578ed704ff72de98582d89e0/src/error.lisp
lisp
(in-package :cl-user) (defpackage dyna.error (:use :cl)) (in-package :dyna.error) (syntax:use-syntax :annot) @export (define-condition <dyna-error> (simple-error) ()) @export (define-condition <dyna-request-error> (<dyna-error>) ((status :initarg :status) (meta :initarg :meta) (message :initarg :message)) ...
1d8ce7f2692b1751ac53064f96f9f6ac6e948fe3cf45a6315576d52957c854e9
amnh/PCG
Custom.hs
----------------------------------------------------------------------------- -- | Module : Text . . Custom Copyright : ( c ) 2015 - 2021 Ward Wheeler -- License : BSD-style -- -- Maintainer : -- Stability : provisional -- Portability : portable -- Custom utility combinators for ' Text ....
null
https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/file-parsers/src/Text/Megaparsec/Custom.hs
haskell
--------------------------------------------------------------------------- | License : BSD-style Maintainer : Stability : provisional Portability : portable --------------------------------------------------------------------------- # LANGUAGE BangPatterns # # LANGUAGE FlexibleContexts # ...
Module : Text . . Custom Copyright : ( c ) 2015 - 2021 Ward Wheeler Custom utility combinators for ' Text . ' parser construction . # LANGUAGE ApplicativeDo # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # module Text.Megaparsec.Custom ( anythingTill , double , en...
37ca52397ee87401948a1ddf276f43e8247d06e2109d93402d382c33af08cd77
shirok/Gauche
cross-compile-ios.scm
#!/usr/bin/env gosh (use gauche.generator) (use gauche.process) (use srfi.13) (use file.util) ;; Global parameters ;; we build stuff under *builddir*/$ARCH (define *builddir* "build-ios") ;; the final output destination (define *outdir* (build-path *builddir* "Gauche-iOS-core.framework")) ;; gauche abi version (de...
null
https://raw.githubusercontent.com/shirok/Gauche/e606bfe5a94b100d5807bca9c2bb95df94f60aa6/src/cross-compile-ios.scm
scheme
Global parameters we build stuff under *builddir*/$ARCH the final output destination gauche abi version SDK versions unused for now Architecture-dependent stuff
#!/usr/bin/env gosh (use gauche.generator) (use gauche.process) (use srfi.13) (use file.util) (define *builddir* "build-ios") (define *outdir* (build-path *builddir* "Gauche-iOS-core.framework")) (define *abi-version* "0.9") (define *ios-deploy-target-version* "7.1") (define (devroot target) (ecase target ...
f7c81fc48612ed59ae709cde0f052e77324866296753e2760caf32f2ac9cab0e
FranklinChen/hugs98-plus-Sep2006
Utils.hs
# OPTIONS_GHC -fno - implicit - prelude # ----------------------------------------------------------------------------- -- | -- Module : Foreign.Marshal.Utils Copyright : ( c ) The FFI task force 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- Maintainer : -- Stability :...
null
https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/base/Foreign/Marshal/Utils.hs
haskell
--------------------------------------------------------------------------- | Module : Foreign.Marshal.Utils License : BSD-style (see the file libraries/base/LICENSE) Stability : provisional Portability : portable --------------------------------------------------------------------------- * Gen...
# OPTIONS_GHC -fno - implicit - prelude # Copyright : ( c ) The FFI task force 2001 Maintainer : Utilities for primitive marshaling module Foreign.Marshal.Utils ( * * Marshalling of Boolean values ( non - zero corresponds to ' True ' ) : : a = > Bool - > a : : a = > a - > Bool * * Haskel...
33f99720353edb1323f88cb130aca808aa4194a97bbced61b407827f4d3a0365
s3team/uroboros
bb_counting.ml
This instrumentation plugin is for 32 - bit binary . It inserts counting instructions at the beginning of each basic block . This instrumentation plugin is for 32-bit binary. It inserts counting instructions at the beginning of each basic block. *) module Instrumentation_Plugin = struct ...
null
https://raw.githubusercontent.com/s3team/uroboros/cdb379a4678ba912bde5d53f7302ad9409abee71/src/plugins/bb_counting.ml
ocaml
il update list
This instrumentation plugin is for 32 - bit binary . It inserts counting instructions at the beginning of each basic block . This instrumentation plugin is for 32-bit binary. It inserts counting instructions at the beginning of each basic block. *) module Instrumentation_Plugin = struct ...
5f85cdb50cd746492c6de50b65a4230f724fe0a4799827c2ea23892ff525db1d
charlieg/Sparser
SGML1.lisp
;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- copyright ( c ) 1991,1992,1993,1994,1995 -- all rights reserved ;;; File : " SGML " ;;; Module: "objects;forms:" Version : 1.0 September 1995 initiated 10/21/91 , tweeked 10/30 . 1.0 ( 5/21/92 ) Moved body to objects;doc ...
null
https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/objects/forms/SGML1.lisp
lisp
-*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- Module: "objects;forms:" doc them as redundant since the only arg is a string and most will be autodef'd ------------ sgml cases ------------
copyright ( c ) 1991,1992,1993,1994,1995 -- all rights reserved File : " SGML " Version : 1.0 September 1995 initiated 10/21/91 , tweeked 10/30 . ( 5/19/94 ) added define - markup - tag - pair . 6/1 added define - invisible - markup 6/6 added the keyword : annotation . 9/19/9...
001e153b63b8c3963026054683a1e6b458f145404add28d2e2af263fffe229a4
3b/cl-opengl
funcs-gl-glcore-gles1-gles2-glsc2.lisp
;;; this file is automatically generated, do not edit ;;; generated from files with the following copyright: ;;; Copyright ( c ) 2013 - 2017 The Khronos Group Inc. ;;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;;; you may not use this file except in compliance with the License. ;;; You m...
null
https://raw.githubusercontent.com/3b/cl-opengl/e2d83e0977b7e7ac3f3d348d8ccc7ccd04e74d59/gl/funcs-gl-glcore-gles1-gles2-glsc2.lisp
lisp
this file is automatically generated, do not edit generated from files with the following copyright: you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CON...
Copyright ( c ) 2013 - 2017 The Khronos Group Inc. distributed under the License is distributed on an " AS IS " BASIS , (in-package #:cl-opengl-bindings) generated 2017 - 10 - 04T20:14:06Z from gl.xml @ git sha 2c8fa02871abd4102bd03d09d42645cce20c468f , 2017 - 10 - 03T15:09:09Z (defparameter *glext-version* ...
cb616833fa59cba82204ef269e3688f2c265241cb7f38c9e4d9d1ab5b97c03f3
jaspervdj/digestive-functors
Heist.hs
-------------------------------------------------------------------------------- | This module provides a Heist frontend for the digestive - functors library . -- -- Disclaimer: this documentation requires very basic familiarity with -- digestive-functors. You might want to take a quick look at this tutorial -- first...
null
https://raw.githubusercontent.com/jaspervdj/digestive-functors/5827b47404a93b103cc57ad0f54f4dc0bdf94e24/digestive-functors-heist/src/Text/Digestive/Heist.hs
haskell
------------------------------------------------------------------------------ Disclaimer: this documentation requires very basic familiarity with digestive-functors. You might want to take a quick look at this tutorial first: This module exports the functions 'digestiveSplices' and 'bindDigestiveSplices', and ...
| This module provides a Heist frontend for the digestive - functors library . < > > < dfInputTextArea ref="description " cols="20 " rows="3 " / > module Text.Digestive.Heist digestiveSplices , bindDigestiveSplices , dfInput , dfInputList , dfInputText , dfInputTextArea , dfInputPa...
347012dbadfecc6796108e110eecd991d32bb227947790934526ca423465c028
digital-asset/ghc
T13311.hs
{-# LANGUAGE RankNTypes #-} module T13311 where f :: forall a. (Monoid a) => forall b. (Monoid b) => Maybe a -> Maybe b f _ = mempty g :: IO () g = do f putChar 'a'
null
https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/typecheck/should_fail/T13311.hs
haskell
# LANGUAGE RankNTypes #
module T13311 where f :: forall a. (Monoid a) => forall b. (Monoid b) => Maybe a -> Maybe b f _ = mempty g :: IO () g = do f putChar 'a'
e9cdb6c1db16d1cbcac6276055772fcce37a30d7597616331ef7907077cf212e
CodyReichert/qi
util.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CHUNGA ; Base : 10 -*- $ Header : /usr / local / cvsrep / chunga / util.lisp , v 1.12 2008/05/25 10:53:48 edi Exp $ Copyright ( c ) 2006 - 2010 , Dr. . All rights reserved . ;;; Redistribution and use in source and binary forms, with or without ;;; modifi...
null
https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/chunga-master/util.lisp
lisp
Syntax : COMMON - LISP ; Package : CHUNGA ; Base : 10 -*- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the fo...
$ Header : /usr / local / cvsrep / chunga / util.lisp , v 1.12 2008/05/25 10:53:48 edi Exp $ Copyright ( c ) 2006 - 2010 , Dr. . All rights reserved . DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , (in-package :chu...
c02383f6c17b90cc582ada9deec51b3d3a85c99295fe22655af13fdf363d9aa3
restyled-io/restyled.io
JWT.hs
| Extension of @"GitHub . Auth"@ to support JWT - based authorization module GitHub.Auth.JWT ( AuthJWT(..) , authJWT , authJWTMax ) where import Prelude import Control.Exception.Safe (throwString) import Data.ByteString (ByteString) import Data.Text.Encoding (encodeUtf8) import Data.Time import Data...
null
https://raw.githubusercontent.com/restyled-io/restyled.io/2486edb6c9b352118d36f8f7cb06432be7fd7c4c/src/GitHub/Auth/JWT.hs
haskell
minutes as the real maximum.
| Extension of @"GitHub . Auth"@ to support JWT - based authorization module GitHub.Auth.JWT ( AuthJWT(..) , authJWT , authJWTMax ) where import Prelude import Control.Exception.Safe (throwString) import Data.ByteString (ByteString) import Data.Text.Encoding (encodeUtf8) import Data.Time import Data...
0a4778819df80b950c827fbd9ae9afd21856c6a255883931cdf05b0fb1d98d7d
losfair/Violet
Nat.hs
# LANGUAGE TemplateHaskell # module Violet.TypeLevel.Nat where import Language.Haskell.TH import Language.Haskell.TH.Syntax import Prelude natT :: Integer -> TypeQ natT n = pure (LitT (NumTyLit n))
null
https://raw.githubusercontent.com/losfair/Violet/dcdd05f8dc08a438a157347f424966da73ccc9b8/src/Violet/TypeLevel/Nat.hs
haskell
# LANGUAGE TemplateHaskell # module Violet.TypeLevel.Nat where import Language.Haskell.TH import Language.Haskell.TH.Syntax import Prelude natT :: Integer -> TypeQ natT n = pure (LitT (NumTyLit n))
0358f4e85be478d0879a31204f6aa3f1efcf6647b05d464a8bf19734028cc2b0
BillHallahan/G2
Test7.hs
-- cmd_line = (--no-keep-quals) {-@ LIQUID "--short-names" @-} {-@ LIQUID "--no-termination" @-} {-@ LIQUID "--prune-unsorted" @-} # LANGUAGE DeriveGeneric # module Combined () where import qualified Data.Map as M import Data.List (minimumBy, head) data List a = Emp | R a deriving (Eq, O...
null
https://raw.githubusercontent.com/BillHallahan/G2/4d287df8ed7ba13c06d96d4911b9eedf870e80a1/tests/LiquidInf/Artificial/Pos/Test7.hs
haskell
cmd_line = (--no-keep-quals) @ LIQUID "--short-names" @ @ LIQUID "--no-termination" @ @ LIQUID "--prune-unsorted" @ @ invariant {v:List a | 0 <= size v} @
# LANGUAGE DeriveGeneric # module Combined () where import qualified Data.Map as M import Data.List (minimumBy, head) data List a = Emp | R a deriving (Eq, Ord, Show) @ measure size : : List a - > Int size ( Emp ) = 0 size ( R x ) = 1 @ size (Emp) = 0 size (R x) ...
e18940053f4f6b36f36ee9293fdce91df3d511205aab8ab95e2adb4f71319749
grzm/awyeah-api
interceptors.clj
Copyright ( c ) Cognitect , Inc. ;; All rights reserved. (ns ^:skip-wiki com.grzm.awyeah.interceptors "Impl, don't call directly." (:require [com.grzm.awyeah.service :as service] [com.grzm.awyeah.util :as util])) (set! *warn-on-reflection* true) (defmulti modify-http-request (fn [service _op-map _http-re...
null
https://raw.githubusercontent.com/grzm/awyeah-api/1810bf624da2be58c77813106a1d51e32db11690/src/com/grzm/awyeah/interceptors.clj
clojure
All rights reserved. See -sdk-java-v2/blob/985ec92c0dfac868b33791fe4623296c68e2feab/services/glacier/src/main/java/software/amazon/awssdk/services/glacier/internal/GlacierExecutionInterceptor.java#L40
Copyright ( c ) Cognitect , Inc. (ns ^:skip-wiki com.grzm.awyeah.interceptors "Impl, don't call directly." (:require [com.grzm.awyeah.service :as service] [com.grzm.awyeah.util :as util])) (set! *warn-on-reflection* true) (defmulti modify-http-request (fn [service _op-map _http-request] ...
2542e9f8e4246a135b039fd4aba8fdb87d147cbd1f0255624a7a48cd6028b0a3
tweag/ormolu
proc-lambdas-out.hs
{-# LANGUAGE Arrows #-} foo = proc a -> \f b -> a -< f b -- Foo bar = proc x -> \f g h -> \() -> \(Left (x, y)) -> -- Tuple value f (g (h x)) -< y
null
https://raw.githubusercontent.com/tweag/ormolu/11cda4c653bc67a6ff579531a441410626ab3bbd/data/examples/declaration/value/function/arrow/proc-lambdas-out.hs
haskell
# LANGUAGE Arrows # Foo Tuple value
bar = proc x -> \f g h -> \() -> \(Left (x, y)) -> f (g (h x)) -< y
9d259c494c9560d48e72e5beb686ec41abf58d638e40dfb62517ec24f862aec8
achirkin/vulkan
VK_NV_sample_mask_override_coverage.hs
# OPTIONS_HADDOCK not - home # {-# LANGUAGE DataKinds #-} {-# LANGUAGE MagicHash #-} # LANGUAGE PatternSynonyms # {-# LANGUAGE Strict #-} {-# LANGUAGE ViewPatterns #-} module Graphics.Vulkan.Ext.VK_NV_sample_mask_override_coverage * Vulkan extension : @VK_NV_sample_mask_override_coverage@ ...
null
https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_NV_sample_mask_override_coverage.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE MagicHash # # LANGUAGE Strict # # LANGUAGE ViewPatterns # | supported: @vulkan@ type: @device@ Extension number: @95@ # INLINE is_VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME #
# OPTIONS_HADDOCK not - home # # LANGUAGE PatternSynonyms # module Graphics.Vulkan.Ext.VK_NV_sample_mask_override_coverage * Vulkan extension : @VK_NV_sample_mask_override_coverage@ contact : author : VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION, pattern VK_NV_SAMPLE_MASK_OVERRIDE_COVERA...
1f2771649fad04c26850859d9dc62e0076c1f7f4544cc81d72f1f383117744d3
rabbitmq/rabbitmq-federation
unit_inbroker_SUITE.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . %% -module(unit_inbroker_SUITE). -include_lib("comm...
null
https://raw.githubusercontent.com/rabbitmq/rabbitmq-federation/960b8214487ae2495cd39afbbd3a2c4d9ea37985/test/unit_inbroker_SUITE.erl
erlang
------------------------------------------------------------------- Testsuite setup/teardown. ------------------------------------------------------------------- ------------------------------------------------------------------- Testcases. ------------------------------------------------------------------- Te...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . -module(unit_inbroker_SUITE). -include_lib("common_tes...
911341873e4e7360cded3d051c046bf5c5d97dc8a0842b3cb1e67e9bd4e7206f
binaryage/env-config
logging.cljs
(ns env-config.impl.logging) (defn logp [level message] (case level :debug (js/console.log message) :info (js/console.info message) :warn (js/console.warn message) :error (js/console.error message) :fatal (js/console.error message))) ; -- public --------------------------------------------------...
null
https://raw.githubusercontent.com/binaryage/env-config/27a99a5c2d5ca0941339508484853c45de555a49/src/lib/env_config/impl/logging.cljs
clojure
-- public -----------------------------------------------------------------------------------------------------------------
(ns env-config.impl.logging) (defn logp [level message] (case level :debug (js/console.log message) :info (js/console.info message) :warn (js/console.warn message) :error (js/console.error message) :fatal (js/console.error message))) (defn reporter [messages] (doseq [[level message] messages]...
196d54a0896bef0a5cd51713e616dc597dc9f77a20a060cc5bb065265861e7a0
bgusach/exercises-htdp2e
ex-092.rkt
#lang htdp/bsl (require 2htdp/image) (require 2htdp/universe) (define cham-image (bitmap "images/cham.png")) (define BACKGROUND-WIDTH 300) (define BACKGROUND-HEIGHT 180) (define BACKGROUND (empty-scene BACKGROUND-WIDTH BACKGROUND-HEIGHT)) (define SPEED 3) (define HAPPINESS-SPEED -1) A ChamColour is one of ; - "r...
null
https://raw.githubusercontent.com/bgusach/exercises-htdp2e/c4fd33f28fb0427862a2777a1fde8bf6432a7690/ex-092.rkt
racket
- "red" - "blue" - "green" interpretation: colour of the chameleon intepretation: state of the world defined by where is the chameleon, what colour it has and how happy it is Returns an image that represents cham in the current state Returns whether the cham is completely unhappy Returns whether the cham is co...
#lang htdp/bsl (require 2htdp/image) (require 2htdp/universe) (define cham-image (bitmap "images/cham.png")) (define BACKGROUND-WIDTH 300) (define BACKGROUND-HEIGHT 180) (define BACKGROUND (empty-scene BACKGROUND-WIDTH BACKGROUND-HEIGHT)) (define SPEED 3) (define HAPPINESS-SPEED -1) A ChamColour is one of A P...
7e1f122d2691636a7096bf5e13cea198697ff7932bb34e1728833f9677172e6a
ekmett/succinct
Delta.hs
# LANGUAGE CPP # ----------------------------------------------------------------------------- -- | Copyright : ( C ) 2013 - 15 -- License : BSD-style (see the file LICENSE) Maintainer : < > -- Stability : experimental -- Portability : non-portable -- -----------------------------------------...
null
https://raw.githubusercontent.com/ekmett/succinct/7e884138c2e943f5ca08f56b58b409d08b870ab9/src/Succinct/Internal/Delta.hs
haskell
--------------------------------------------------------------------------- | License : BSD-style (see the file LICENSE) Stability : experimental Portability : non-portable --------------------------------------------------------------------------- | Δ-Range-Min This provides a semigroup-based variant ...
# LANGUAGE CPP # Copyright : ( C ) 2013 - 15 Maintainer : < > module Succinct.Internal.Delta ( Delta(..) , minima , bool , bits , byte , e8, d8, n8 ) where #if __GLASGOW_HASKELL__ < 710 import Control.Applicative #endif import Data.Bits import Data.Int import Data.Semigroup import Data....
e68300273cb953e0c7ea58921c207baa292b0ee789718d3aa6bb2d9490ef9ce2
esb-lwb/lwb
sat_test.clj
lwb Logic WorkBench -- Predicate Logic , tests Copyright ( c ) 2016 - 2020 , THM . All rights reserved . ; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( -1.0.php ) . ; By using this software in any fashion, you are agreeing to be bound by ; the terms of this l...
null
https://raw.githubusercontent.com/esb-lwb/lwb/bba51ada7f7316341733d37b0dc4848c4891ef3a/test/lwb/pred/sat_test.clj
clojure
The use and distribution terms for this software are covered by the By using this software in any fashion, you are agreeing to be bound by the terms of this license.
lwb Logic WorkBench -- Predicate Logic , tests Copyright ( c ) 2016 - 2020 , THM . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) . (ns lwb.pred.sat-test (:require [clojure.test :refer :all] [lwb.pred.sat :refer :all] [clojure.spec.test.alpha :as stest])) (stest/instr...
37aa5adc7f22d9acf0ef6d5be4aa36bb91e8686b93571799f1749e902f638635
gilith/hol-light
prover9.ml
(* ========================================================================= *) Interface to prover9 . (* ========================================================================= *) * * * NB : this is the " prover9 " command invoked by HOL Light . * * * * If t...
null
https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/Examples/prover9.ml
ocaml
========================================================================= ========================================================================= ------------------------------------------------------------------------- ------------------------------------------------------------------------- ---------------...
Interface to prover9 . * * * NB : this is the " prover9 " command invoked by HOL Light . * * * * If this does n't work , set an explicit path to the prover9 binary * * * **** If this doesn't work, set an explicit path to the prover9 binary ****) let prove...
e7b0a6bbd0c1a112fb657497019779754dea2ac174b50767e01485bc4deefdea
cvogt/2020-07-01-haskell-game-demo
Wiring.hs
module Playtime.Wiring where import Codec.Picture (DynamicImage) import Data.Aeson import GHC.Err (error) import My.IO import My.Prelude import Playtime.Debug import Playtime.EngineConfig import Playtime.EngineState import Playtime.Event import Playtime.GL import Playtime.Geometry import Playtime.LiveCode import Playt...
null
https://raw.githubusercontent.com/cvogt/2020-07-01-haskell-game-demo/f90fcd19ea79802774dcfafe8505415d6f8c8a8b/lib/Playtime/Wiring.hs
haskell
NOTE: resurrect this when implementing dynamically loaded textures updateTextureCache loadedTexturesMVar visualizations f' = DynamicSprite ref -> Nothing -> do
module Playtime.Wiring where import Codec.Picture (DynamicImage) import Data.Aeson import GHC.Err (error) import My.IO import My.Prelude import Playtime.Debug import Playtime.EngineConfig import Playtime.EngineState import Playtime.Event import Playtime.GL import Playtime.Geometry import Playtime.LiveCode import Playt...
6abb739dbbced9bb570ef2728747309a40ab2aab84a4e76acdd573c416ed95b9
malcolmreynolds/GSLL
types.lisp
;; Interpolation types , Sun Nov 4 2007 - 17:41 Time - stamp : < 2009 - 02 - 16 09:46:04EST types.lisp > $ Id$ (in-package :gsl) (defmpar +linear-interpolation+ "gsl_interp_linear" "Linear interpolation. This interpolation method does not require any additional memory.") (defmpar +polynomial-inter...
null
https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/interpolation/types.lisp
lisp
Interpolation types
, Sun Nov 4 2007 - 17:41 Time - stamp : < 2009 - 02 - 16 09:46:04EST types.lisp > $ Id$ (in-package :gsl) (defmpar +linear-interpolation+ "gsl_interp_linear" "Linear interpolation. This interpolation method does not require any additional memory.") (defmpar +polynomial-interpolation+ "gsl_interp_p...
cbd055d8166b4ad9bf4d4fe78a9c14abc250f498d80eeba35994417191b3403d
herd/herdtools7
ASLBase.ml
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/daedd7431cb00884afea2ec39749222e2c367c6b/lib/ASLBase.ml
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2015 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...
97793827ff229c90db00f403c41c7e9096410530c6d7d779870f5c0604a64d3e
incoherentsoftware/defect-process
Data.hs
module Enemy.All.Axe.Data ( AxeEnemyData(..) , mkAxeEnemyData , rollWillUseAttackLunge ) where import Control.Monad.IO.Class (MonadIO, liftIO) import System.Random (randomRIO) import Configs import Configs.All.Enemy import Configs.All.Enemy.Axe import Enemy.All.Axe.AttackDescriptions import E...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/15f2569e7d0e481c2e28c0ca3a5e72d2c049b667/src/Enemy/All/Axe/Data.hs
haskell
module Enemy.All.Axe.Data ( AxeEnemyData(..) , mkAxeEnemyData , rollWillUseAttackLunge ) where import Control.Monad.IO.Class (MonadIO, liftIO) import System.Random (randomRIO) import Configs import Configs.All.Enemy import Configs.All.Enemy.Axe import Enemy.All.Axe.AttackDescriptions import E...
3103b81138be9ab0244d7320a69a3a30b71bcb0ef5ade44fdb3b138ff8f75a48
dfinity-side-projects/dhc
Parse.hs
# LANGUAGE CPP # {-# LANGUAGE MultiWayIf #-} # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} module Hero.Parse (parseWasm, Wasm(..), ripWasm, elTable) where #ifdef __HASTE__ import qualified Data.Map.Strict as IM import qualified Data.Set as IS #else import Data.IntMap.Strict (IntMap) import qualified ...
null
https://raw.githubusercontent.com/dfinity-side-projects/dhc/60ac6c85ca02b53c0fdd1f5852c1eaf35f97d579/src/Hero/Parse.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # TODO: Record maximum. Size. Header and version. Sections. Outputs make no sense for dfn, but we support them so we can use this code more generally. Returns elements of table as association list of slot to (function index, function type).
# LANGUAGE CPP # # LANGUAGE NamedFieldPuns # module Hero.Parse (parseWasm, Wasm(..), ripWasm, elTable) where #ifdef __HASTE__ import qualified Data.Map.Strict as IM import qualified Data.Set as IS #else import Data.IntMap.Strict (IntMap) import qualified Data.IntMap.Strict as IM import qualified Data.IntSet as IS #en...
e899d1f142d2594158265e829e382ee7e32915b1ee01c22c706507ef53a92ab7
haskell/haskell-language-server
GoldenShowMapChar.expected.hs
test :: Show a => a -> (String -> b) -> b test a f = f (show a)
null
https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/golden/GoldenShowMapChar.expected.hs
haskell
test :: Show a => a -> (String -> b) -> b test a f = f (show a)
510585bcff1877d4eefc8875c84f8f59751ff6de9a4c234c94adfe0e977acac1
input-output-hk/ouroboros-network
NodeToNode.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE NamedFieldPuns # # LANGUAGE QuantifiedConstraints # {-# LANGUAGE RankNTypes #-} # LANGUAGE RecordWildCards # {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TypeApplications # -- | Intended for qu...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/2793b6993c8f6ed158f432055fa4ef581acdb661/ouroboros-consensus-diffusion/src/Ouroboros/Consensus/Network/NodeToNode.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # | Intended for qualified import * Handlers * Codecs * Byte Limits * Tracers * Applications ** Projections * Re-exports -----------------------------------------------------...
# LANGUAGE NamedFieldPuns # # LANGUAGE QuantifiedConstraints # # LANGUAGE RecordWildCards # # LANGUAGE TypeApplications # module Ouroboros.Consensus.Network.NodeToNode ( Handlers (..) , mkHandlers , Codecs (..) , defaultCodecs , identityCodecs , ByteLimits , byteLimits , noByteLi...
c210fee4bc0926c20b87577d1527ecf683c1c0d5a37ddb44cb9a7dc4fd80824c
clojure-emacs/sayid
plugin.clj
(ns sayid.plugin (:require [clojure.java.io :as io])) (def version "The current version of sayid as a string." (-> (or (io/resource "META-INF/leiningen/com.billpiel/sayid/project.clj") "project.clj") slurp read-string (nth 2))) (defn middleware [project] (-> project (up...
null
https://raw.githubusercontent.com/clojure-emacs/sayid/27f35778de9509067716a7bed14306787334a589/src/sayid/plugin.clj
clojure
(ns sayid.plugin (:require [clojure.java.io :as io])) (def version "The current version of sayid as a string." (-> (or (io/resource "META-INF/leiningen/com.billpiel/sayid/project.clj") "project.clj") slurp read-string (nth 2))) (defn middleware [project] (-> project (up...
4cb4b2801786a1bc996df310ee9a25270e9a6b4697122b590fbf00550755502a
gulige/neuroevo
xor_send_output.erl
-module(xor_send_output). -export([act/5]). -include_lib("ne_common/src/include/common.hrl"). -include("records.hrl"). The function simply forwards the Output vector to the XOR simulator , and waits for the resulting Fitness and EndFlag from the simulation process . act(ExoSelf_PId, Output, VL, _Parameters, Scape) ...
null
https://raw.githubusercontent.com/gulige/neuroevo/09e67928c2417f2b27ec6522acc82f8b3c844949/apps/neuroevo/src/actuators/xor_send_output.erl
erlang
-module(xor_send_output). -export([act/5]). -include_lib("ne_common/src/include/common.hrl"). -include("records.hrl"). The function simply forwards the Output vector to the XOR simulator , and waits for the resulting Fitness and EndFlag from the simulation process . act(ExoSelf_PId, Output, VL, _Parameters, Scape) ...
46304962eada9b8ff07f84f4b1c1954fc07487535bc3a6a5cd2c5c89ab2dab7a
zotonic/zotonic
z_dispatcher.erl
@author < > 2009 - 2012 %% @doc Manage dispatch lists (aka definitions for url patterns). Constructs named urls from dispatch lists. Copyright 2009 - 2012 %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You ...
null
https://raw.githubusercontent.com/zotonic/zotonic/0f977d08bfbf4b2441eab9d1c41dd25286ff164f/apps/zotonic_core/src/support/z_dispatcher.erl
erlang
@doc Manage dispatch lists (aka definitions for url patterns). Constructs named urls from dispatch lists. you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR C...
@author < > 2009 - 2012 Copyright 2009 - 2012 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(z_dispatcher). -author("Marc Worrell <>"). -behaviour(gen_server). -export([init/1, handle_call/3, handle...
0e1d6183af269b05b4501dc24543abfc8edd5bf65455bc0696127aad2dedda13
fyquah/hardcaml_arty
uart.ml
open Base open Hardcaml open Signal module Byte_with_valid = struct module Pre = struct include With_valid let t = { valid = ("valid", 1) ; value = ("value", 8) } ;; end include Pre include Hardcaml.Interface.Make(Pre) end type counter = { counter : Signal.t option ; last_...
null
https://raw.githubusercontent.com/fyquah/hardcaml_arty/aba3de22a26e2a609d5972174782bd1a7069e8a5/src/infrastructure/uart.ml
ocaml
| S_wait_for_stop_bit S_wait_for_stop_bit, [ if_ rx_data_raw [ sm.set_next S_stop_bit; ] @@ elif cycles_elapsed_for_bit.last_cycle_trigger [ (* Overrun, drop frame.
open Base open Hardcaml open Signal module Byte_with_valid = struct module Pre = struct include With_valid let t = { valid = ("valid", 1) ; value = ("value", 8) } ;; end include Pre include Hardcaml.Interface.Make(Pre) end type counter = { counter : Signal.t option ; last_...
3f8d1b392243251c117f384d9c76388ec22ba90e315b43c2af18aea10a2f8325
Isaac-DeFrain/KFramework
constants.ml
type sort = |SortProcCell |SortBoundsCell |SortBool |SortK |SortMap |SortSumCell |SortParCellFragment |SortKVariable |SortKCell |SortBytes |SortKItem |SortStringBuffer |SortName |SortTCell |SortInt |SortProcCellBag |SortBoundsCellOpt |SortKConfigVar |SortBoundCell |SortSumCellFragment |SortProcCellFragment |SortProc |...
null
https://raw.githubusercontent.com/Isaac-DeFrain/KFramework/54e6b833f104222ef24ea75551dc97c0ae4f588c/Languages/Pi-Calc/pi-kompiled/constants.ml
ocaml
type sort = |SortProcCell |SortBoundsCell |SortBool |SortK |SortMap |SortSumCell |SortParCellFragment |SortKVariable |SortKCell |SortBytes |SortKItem |SortStringBuffer |SortName |SortTCell |SortInt |SortProcCellBag |SortBoundsCellOpt |SortKConfigVar |SortBoundCell |SortSumCellFragment |SortProcCellFragment |SortProc |...
73e4573fe2b4b5de9cc3f23ca9c022cc886b04bcf9348c56aa4c22fb721c6b69
Metaxal/text-table
table.rkt
#lang racket (require text-table rackunit) ; to write/try test easily: (define-syntax-rule (tbcheck expr) (let ([res expr]) (displayln res) `(check-equal? expr ,res))) ; Ex: ( tbcheck ( simple - table->string ' ( ( ) (1 2 3)))) (check-exn exn:fail? (λ () ...
null
https://raw.githubusercontent.com/Metaxal/text-table/b20f34b068aedbe6c1756628dc4c9df9b1cba2e1/tests/table.rkt
racket
to write/try test easily: Ex: Check border-style1/c still works border-style-frame/c Check alignment
#lang racket (require text-table rackunit) (define-syntax-rule (tbcheck expr) (let ([res expr]) (displayln res) `(check-equal? expr ,res))) ( tbcheck ( simple - table->string ' ( ( ) (1 2 3)))) (check-exn exn:fail? (λ () (table->string '()))) (check-exn ...
e0fb2ed53dde338f8b8a6624bb90d67b27ffb44955d56494a98bdb895d35494e
rob7hunter/leftparen
web-support.scm
#lang scheme/base ;; This differs from web-export.ss in that these are ones that we wrote and aren't included in PLT libs . (require (file "util.scm") xml net/url scheme/serialize "web-export.ss" "contract-lp.ss" ) (provide request-all-bindings ;; fina...
null
https://raw.githubusercontent.com/rob7hunter/leftparen/169c896bda989b6a049fe49253a04d6f8b62402b/web-support.scm
scheme
This differs from web-export.ss in that these are ones that we wrote and aren't final-prep-of-response (via contract) basic-response (via contract) list-response (via contract) single-response-promise-in-list (via contract) single-response/full-in-list (via contract) response-promise-to-redirect (via contract) ...
#lang scheme/base included in PLT libs . (require (file "util.scm") xml net/url scheme/serialize "web-export.ss" "contract-lp.ss" ) (provide request-all-bindings xexpr->de-grouped-xexprs wrap-each-in-list wrap-each-in-list-with-attrs ...
f420b35314b497365c3f5821d9f04ddac825bbdeb1d8da0f98bb9417bd01ccc0
flipstone/haskell-for-beginners
Play.hs
module AdventureGame.Play ( Game(..) , play , showRoom , parseCommand ) where import AdventureGame.UI import AdventureGame.World data Game = Game { currentRoom :: Room } data Command = Go Direction | Quit play :: Command -> Game -> Action Game play Quit = Action Done play (Go dir) = takeExit dir sho...
null
https://raw.githubusercontent.com/flipstone/haskell-for-beginners/e586a1f3ef08f21d5181171fe7a7b27057391f0b/answers/midterm/AdventureGame/Play.hs
haskell
module AdventureGame.Play ( Game(..) , play , showRoom , parseCommand ) where import AdventureGame.UI import AdventureGame.World data Game = Game { currentRoom :: Room } data Command = Go Direction | Quit play :: Command -> Game -> Action Game play Quit = Action Done play (Go dir) = takeExit dir sho...
b87f8af30988b0719137ba42b1b6e5f3b88771f15bcbaabafffa623567a88e53
icicle-lang/icicle-ambiata
Fact.hs
# LANGUAGE NoImplicitPrelude # module Icicle.Test.Gen.Data.Fact ( genEncoding , genStructField ) where import qualified Data.Map.Strict as Map import Disorder.Corpus (colours) import Hedgehog import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range as Range import I...
null
https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-compiler/test/Icicle/Test/Gen/Data/Fact.hs
haskell
# LANGUAGE NoImplicitPrelude # module Icicle.Test.Gen.Data.Fact ( genEncoding , genStructField ) where import qualified Data.Map.Strict as Map import Disorder.Corpus (colours) import Hedgehog import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range as Range import I...
dcd728fd13a690b302c61698f688cf1d17a384aae3197b6aad5e6bfdcc0056d5
slagyr/joodo
favicon.clj
(ns ^{:doc "This namespace is for favicon.ico requests."} joodo.middleware.favicon) (defn- is-favicon-request? [request] (= [:get "/favicon.ico"] [(:request-method request) (:uri request)])) (defn wrap-favicon-bouncer "Responds with 404 for /favicon.ico requests." [handler] (fn [request] (if (is-favicon...
null
https://raw.githubusercontent.com/slagyr/joodo/e7edbc707a7901d1a1c5465382dd25db368f4596/joodo/src/joodo/middleware/favicon.clj
clojure
(ns ^{:doc "This namespace is for favicon.ico requests."} joodo.middleware.favicon) (defn- is-favicon-request? [request] (= [:get "/favicon.ico"] [(:request-method request) (:uri request)])) (defn wrap-favicon-bouncer "Responds with 404 for /favicon.ico requests." [handler] (fn [request] (if (is-favicon...
b34875f51627f6ada5914f59101aa9882892ca1f8f549a3dc02886cd8154cbd6
bitc/hs-vault-tool
Internal.hs
module Network.VaultTool.Internal where import Control.Exception (throwIO) import Control.Monad (when) import Data.Aeson import Network.HTTP.Client import Network.HTTP.Types.Header import Network.HTTP.Types.Method import Network.HTTP.Types.Status import qualified Data.ByteString.Lazy as BL import Network.VaultTool.Ty...
null
https://raw.githubusercontent.com/bitc/hs-vault-tool/a474f11b94236455a7617b2d9a4eecbe1922ee58/vault-tool/src/Network/VaultTool/Internal.hs
haskell
module Network.VaultTool.Internal where import Control.Exception (throwIO) import Control.Monad (when) import Data.Aeson import Network.HTTP.Client import Network.HTTP.Types.Header import Network.HTTP.Types.Method import Network.HTTP.Types.Status import qualified Data.ByteString.Lazy as BL import Network.VaultTool.Ty...