_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
31a75590faedcafe662b884a041cb0eb6c4a8290e0aaa90ed044fa562a9806f9
Akii/elescore
Api.hs
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # module Elescore.Api ( eleapi , module Elescore.Projection.Disruption ) where import ClassyPrelude import Control.Concurrent (forkIO, threadDelay) import qualified Data.IntMap as IM import qualified Data.Map...
null
https://raw.githubusercontent.com/Akii/elescore/216540f9891f8317179abd8dde215d7cd7deb448/src/Elescore/Api.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # module Elescore.Api ( eleapi , module Elescore.Projection.Disruption ) where import ClassyPrelude import Control.Concurrent (forkIO, threadDelay) import qualified Data.IntMap as IM import qualified Data.Map...
ad879f69dee9737b91800a91d794d5f31bf21fffc55e4f55bdc4a66a70200f89
jafingerhut/thalia
doc_test.clj
(ns thalia.doc-test (:use clojure.test thalia.doc) (:require [clojure.string :as str]) (:import (clojure.lang Compiler Compiler$CompilerException))) (def major-minor-version ((juxt :major :minor) *clojure-version*)) (def clojure=15 (= (compare major-minor-version [1 5]) 0)) (def clojure=16 (= (compare ...
null
https://raw.githubusercontent.com/jafingerhut/thalia/20c98eec8168ff72c5b3965cc048b817d34a4583/test/thalia/doc_test.clj
clojure
This value is useful to demonstrate some weirdness with array/vector indexing. Assertions from docs for clojure.core/== fixed in Clojure 1.6.0 and without get. Assertions from docs for clojure.core/hash args converted to ints (is (= 5 5)))
(ns thalia.doc-test (:use clojure.test thalia.doc) (:require [clojure.string :as str]) (:import (clojure.lang Compiler Compiler$CompilerException))) (def major-minor-version ((juxt :major :minor) *clojure-version*)) (def clojure=15 (= (compare major-minor-version [1 5]) 0)) (def clojure=16 (= (compare ...
8523e9d3c669772f1b004724a12eb0b91b6df736350c4bc5fff39a8d61995b5d
ekmett/unpacked-containers
Int.hs
module Int where type Key = Int
null
https://raw.githubusercontent.com/ekmett/unpacked-containers/7dc56993a57511b58257b5d389473e638a7082d2/unpacked-containers/example/Int.hs
haskell
module Int where type Key = Int
971e4302d6319860a3a297c5ef5c038928a54e89205e693ba7f54d85ba38c8d9
input-output-hk/cardano-sl
UtxoSpec.hs
{-# LANGUAGE LambdaCase #-} # LANGUAGE RecordWildCards # # LANGUAGE TupleSections # # LANGUAGE TypeApplications # # LANGUAGE ViewPatterns # | Specification of Pos . Chain . Txp . module Test.Pos.Chain.Txp.Toil.UtxoSpec ( spec ) where import Universum hiding (id) import ...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/chain/test/Test/Pos/Chain/Txp/Toil/UtxoSpec.hs
haskell
# LANGUAGE LambdaCase # -------------------------------------------------------------------------- -------------------------------------------------------------------------- -------------------------------------------------------------------------- Properties -----------------------------------------------------...
# LANGUAGE RecordWildCards # # LANGUAGE TupleSections # # LANGUAGE TypeApplications # # LANGUAGE ViewPatterns # | Specification of Pos . Chain . Txp . module Test.Pos.Chain.Txp.Toil.UtxoSpec ( spec ) where import Universum hiding (id) import Control.Monad.Except (runE...
5c093bf8d5904f6602616d42a0702d036343c82ba0f8e73c6ffb93f649f0c2c2
KULeuven-CS/CPL
syntax.rkt
#lang eopl (require racket) (provide (all-defined-out)) ;;; Syntax (define-datatype program program? (a-program (exp1 expression?))) (define-datatype expression expression? (const-exp (num number?)) (const-list-exp (nums (list-of number?))) (unop-exp (oper unop?) (exp1 expression?)) (diff-exp (exp1 expressi...
null
https://raw.githubusercontent.com/KULeuven-CS/CPL/0c62cca832edc43218ac63c4e8233e3c3f05d20a/chapter5/THREADS/syntax.rkt
racket
Syntax
#lang eopl (require racket) (provide (all-defined-out)) (define-datatype program program? (a-program (exp1 expression?))) (define-datatype expression expression? (const-exp (num number?)) (const-list-exp (nums (list-of number?))) (unop-exp (oper unop?) (exp1 expression?)) (diff-exp (exp1 expression?) (exp2 ...
5656a746f2bcd5d84164c0d6f0b66e9ae7834f0da3481bba271a84ce439c2dea
AdRoll/mero
mero_stat.erl
-module(mero_stat). %% noop/1 intentionally discards its argument. -hank([{unnecessary_function_arguments, [{noop, 1, 1}]}]). -export([noop/1, incr/1]). incr(Key) -> {StatMod, StatFun} = mero_conf:stat_callback(), erlang:apply(StatMod, StatFun, [Key, 1]). noop(_Key) -> ok.
null
https://raw.githubusercontent.com/AdRoll/mero/30d6b60cb2d5998ea69942e5a28d253196e968e6/src/mero_stat.erl
erlang
noop/1 intentionally discards its argument.
-module(mero_stat). -hank([{unnecessary_function_arguments, [{noop, 1, 1}]}]). -export([noop/1, incr/1]). incr(Key) -> {StatMod, StatFun} = mero_conf:stat_callback(), erlang:apply(StatMod, StatFun, [Key, 1]). noop(_Key) -> ok.
01170fc9726b6d790497ae534200c9e8045f5793f5aa24ffb8f3eeb4355c57be
geophf/1HaskellADay
Exercise.hs
# LANGUAGE OverloadedStrings , QuasiQuotes # module Y2017.M11.D24.Exercise where {-- Let's say, oh, that you're in a start-up, and you would like to, oh, return a list of articles associated with a source article as JSON from a PostgreSQL database. Hypothetically. For example. --} import Database.PostgreSQL.Simple...
null
https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2017/M11/D24/Exercise.hs
haskell
- Let's say, oh, that you're in a start-up, and you would like to, oh, return a list of articles associated with a source article as JSON from a PostgreSQL database. Hypothetically. For example. - for SpecialCharTable for Brief } now, we need to get the rest of the data, given the recommendation ids, from the art...
# LANGUAGE OverloadedStrings , QuasiQuotes # module Y2017.M11.D24.Exercise where import Database.PostgreSQL.Simple import Database.PostgreSQL.Simple.SqlQQ import Database.PostgreSQL.Simple.FromRow below imports available via 1HaskellADay git repository . import Control.Scan.Config import Store.SQL.Connection imp...
d25bd612d4068156214893fb4b9baea11e9c61738b81e9b6299a3974b0f3e726
lopec/LoPEC
db_SUITE.erl
-module(db_SUITE). -include("../include/db.hrl"). -suite_defaults([{timetrap, {minutes, 10}}]). -compile(export_all). -includelib("common_test/include/ct.hrl"). init_per_suite(Config) -> ok = application:start(common), ok = application:start(chronicler), Config. end_per_suite(_Config) -> applicati...
null
https://raw.githubusercontent.com/lopec/LoPEC/29a3989c48a60e5990615dea17bad9d24d770f7b/branches/stable-1/lib/master/test/db_SUITE.erl
erlang
chronicler:set_logging_level(all), Check to see that the database doesn't blow up just because there are no jobs and stuff Let's add them Try to fetch another task, should receive no_task Make sure that JobA has its state set to the only task. Free all tasks associated to JobA and check that its free
-module(db_SUITE). -include("../include/db.hrl"). -suite_defaults([{timetrap, {minutes, 10}}]). -compile(export_all). -includelib("common_test/include/ct.hrl"). init_per_suite(Config) -> ok = application:start(common), ok = application:start(chronicler), Config. end_per_suite(_Config) -> applicati...
74fab0ad705a3c167c78a9f8aeee32bdb8f90573aa612b5f3ed494cfc98535c3
scalar-labs/scalar-jepsen
scalardl_test.clj
(ns scalardl.scalardl-test)
null
https://raw.githubusercontent.com/scalar-labs/scalar-jepsen/66b08cccad256241e09ac4140a58e2d1574df517/scalardl/test/scalardl/scalardl_test.clj
clojure
(ns scalardl.scalardl-test)
cd9ec8b4aa64ec467286e167afaf97b5fd40ed0fedae2590bb73bbb5d30759f9
rkaippully/webgear
Tag.hs
module Model.Tag ( list ) where import Database.Esqueleto import Model.Common import Model.Entities import Relude list :: DBAction [Text] list = fmap unValue <$> -- select only tags used in articles (select $ from $ \(tag, articleTag) -> do where_ (tag ^. TagId ==. articleTag ^. ArticleTagTagid) ...
null
https://raw.githubusercontent.com/rkaippully/webgear/db122125c35e5853251bfd68a0e5222fafd6cd49/webgear-examples/realworld/Model/Tag.hs
haskell
select only tags used in articles
module Model.Tag ( list ) where import Database.Esqueleto import Model.Common import Model.Entities import Relude list :: DBAction [Text] list = fmap unValue <$> (select $ from $ \(tag, articleTag) -> do where_ (tag ^. TagId ==. articleTag ^. ArticleTagTagid) pure $ tag ^. TagName)
8b6d7611a1d71c3cd70c111e156223415c3c5d419f5783fb04063f9b4b5b26e1
fjames86/frpc2
test3.lisp
Copyright ( c ) 2016 < > This code is licensed under the MIT license . (defpackage #:frpc2.test3 (:use #:cl #:frpc2)) (in-package #:frpc2.test3) (defun test-call-null-udp (addr) (let ((client (make-instance 'udp-client :addr addr))) (unwind-protect (call-rpcbind-null client) (transport-close cl...
null
https://raw.githubusercontent.com/fjames86/frpc2/6b7ec2c7d57a0918ecc3755af75ff183e24d7e85/test/test3.lisp
lisp
Copyright ( c ) 2016 < > This code is licensed under the MIT license . (defpackage #:frpc2.test3 (:use #:cl #:frpc2)) (in-package #:frpc2.test3) (defun test-call-null-udp (addr) (let ((client (make-instance 'udp-client :addr addr))) (unwind-protect (call-rpcbind-null client) (transport-close cl...
906e845af01ff2645dabeba0c45c2d1e4ebbdb4f007b78f2b2dbaececcf8b0e2
jtza8/interact
export.lisp
(in-package :interact) (auto-export :interact :add-packages (:rt :events :watch))
null
https://raw.githubusercontent.com/jtza8/interact/ea2121d7e900dac4fe2a085bd5f2783a640e71f8/src/export.lisp
lisp
(in-package :interact) (auto-export :interact :add-packages (:rt :events :watch))
22634ca5b868163980fc93244ab8e97111f7a2ca4135ca2449cefbcf913de845
lantiga/clj-toml
project.clj
(defproject clj-toml "0.4.0" :description "TOML for Clojure" :url "" :author "Luca Antiga" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"] [instaparse "1.4.8"] [clojure.java-time "0.3.1"]])
null
https://raw.githubusercontent.com/lantiga/clj-toml/4295146a8ed54d8d86186149d568899173195bb7/project.clj
clojure
(defproject clj-toml "0.4.0" :description "TOML for Clojure" :url "" :author "Luca Antiga" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"] [instaparse "1.4.8"] [clojure.java-time "0.3.1"]])
b5f21248472e7c0307b170ef393a8973e671472da44650e308e4f8c7de4791b7
yesodweb/wai
runtests.hs
# LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # {-# LANGUAGE OverloadedStrings #-} import Test.Framework (defaultMain, testGroup, Test) import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 import Test.HUnit hiding (Test) import Network.Wai.Handler.Warp (takeHeaders, InvalidRequest (....
null
https://raw.githubusercontent.com/yesodweb/wai/f59e577f865d017b4726826ac5586bb916cf315b/warp/attic/runtests.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # import Test.Framework (defaultMain, testGroup, Test) import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 import Test.HUnit hiding (Test) import Network.Wai.Handler.Warp (takeHeaders, InvalidRequest (..), readInt) import Data.Enumerator...
7b5cc73ad616f321f28671da72b7c9f09ef48a9c58fd1518e45fc93ba48d6183
racket/web-server
elim-callcc.rkt
#lang racket/base (require (for-template racket/base) syntax/kerncase racket/contract "abort-resume.rkt" (for-template "abort-resume.rkt") "util.rkt") (provide/contract [elim-callcc (syntax? . -> . syntax?)]) (define (id x) x) ;; mark-lambda-as-safe: w -> w ;; If w is a l...
null
https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-lib/web-server/lang/elim-callcc.rkt
racket
mark-lambda-as-safe: w -> w If w is a lambda-expression then add #t to the safety mark, otherwise no mark XXX Do I need to rebuild the CMs?
#lang racket/base (require (for-template racket/base) syntax/kerncase racket/contract "abort-resume.rkt" (for-template "abort-resume.rkt") "util.rkt") (provide/contract [elim-callcc (syntax? . -> . syntax?)]) (define (id x) x) (define (mark-lambda-as-safe w) (rearm w...
9c6d68cbf80bfe38e39f144cdb6f6d3810703e441e59ed3a4e02ba68303f94ab
sansarip/owlbear
tag_name.cljs
(ns owlbear.lexer.html.tag-name (:require [owlbear.lexer.html.token-types :as html-tknt])) (defn tag-name-ctx? "Given a context, returns true if the context is an HTML tag name" [ctx] (and (some? ctx) (html-tknt/token-type? ctx :tag-name))) (defn tag-name-ctx "Given a context, returns the context if...
null
https://raw.githubusercontent.com/sansarip/owlbear/b25d46e3f401f5fee739889e5bc604f6b9c00c41/src/cljs/owlbear/lexer/html/tag_name.cljs
clojure
(ns owlbear.lexer.html.tag-name (:require [owlbear.lexer.html.token-types :as html-tknt])) (defn tag-name-ctx? "Given a context, returns true if the context is an HTML tag name" [ctx] (and (some? ctx) (html-tknt/token-type? ctx :tag-name))) (defn tag-name-ctx "Given a context, returns the context if...
6661bfb9c6e91a66667f6622847cac070c47a52d08b362f06b1d2e3d0c45f8c9
bravit/tt-ghc-exercises
Evaluator.hs
module Evaluator (evalTerms, parseAndEval, sub, shift) where import Control.Monad import TaplError import FullUntypedParser import FullUntyped import Context sub :: Int -> Term -> Term -> Term sub subIdx replacement term = helper term varSub where varSub c v@(TmVar _ _) | index v == c + subIdx = s...
null
https://raw.githubusercontent.com/bravit/tt-ghc-exercises/c4805ac48134df42112b2823eb9391d17b2780b3/untyped/Evaluator.hs
haskell
contains common functionality of "sub" and "shift" Small-step evaluation of a term terms later in the sequence (as opposed to an abstraction, which affect terms within its subtree) Evaluates a sequence of terms, where earlier terms in the sequence (such as binders) affect the context of later terms.
module Evaluator (evalTerms, parseAndEval, sub, shift) where import Control.Monad import TaplError import FullUntypedParser import FullUntyped import Context sub :: Int -> Term -> Term -> Term sub subIdx replacement term = helper term varSub where varSub c v@(TmVar _ _) | index v == c + subIdx = s...
84f4f3c6606ee2c634ad14378471e2dbc88d13821c9e126ba0dfd265d54574a1
hidaris/thinking-dumps
interp.rkt
#lang racket (provide (all-defined-out)) ;; Expr -> Integer (define (interp e) (match e [(? integer? i) i] [`(add1 ,e0) (match (interp e0) [i0 (+ i0 1)])] [`(sub1 ,e0) (match (interp e0) [i0 (- i0 1)])]))
null
https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/compiler/blackmail/interp.rkt
racket
Expr -> Integer
#lang racket (provide (all-defined-out)) (define (interp e) (match e [(? integer? i) i] [`(add1 ,e0) (match (interp e0) [i0 (+ i0 1)])] [`(sub1 ,e0) (match (interp e0) [i0 (- i0 1)])]))
4b5935cdd3ac3abb1c5a271d60b4b06b9139da1246d1586b03970b4d87d381df
ogri-la/strongbox-comrades
project.clj
(defproject ogri-la/strongbox-comrades "0.2.0-unreleased" :description "strongbox comrades.csv SPA" :url "-la/strongbox-comrades" :license {:name "GNU Affero General Public License (AGPL)" :url "-3.0.en.html"} :min-lein-version "2.9.1" clj [org.clojure/clojure "1.10.0"] ...
null
https://raw.githubusercontent.com/ogri-la/strongbox-comrades/bd51a4eb3818bbc6780781ef9e21bd0a449f8d2a/project.clj
clojure
reload code cljs remember to update pom file (`lein pom`) not possible for figwheel: -figwheel/issues/614 The presence of a :figwheel configuration here will cause figwheel to inject the figwheel client into your build :open-urls will pop open your application started and compiled your application. Comment th...
(defproject ogri-la/strongbox-comrades "0.2.0-unreleased" :description "strongbox comrades.csv SPA" :url "-la/strongbox-comrades" :license {:name "GNU Affero General Public License (AGPL)" :url "-3.0.en.html"} :min-lein-version "2.9.1" clj [org.clojure/clojure "1.10.0"] ...
4987dfcbc8a76b33207754c01831730bdf440efb607f5678887b4854c62b7a5c
nijohando/event
user.clj
(ns prj.user (:require [jp.nijohando.event :as f] [jp.nijohando.prj.test :as prj-test] [prj.cljs])) (defn test-clj [] (prj-test/run-tests 'jp.nijohando.event-test 'jp.nijohando.event-test-clj)) (defn test-cljs [] (prj.cljs/test-cljs)) (defn repl-cljs [] (prj.cljs/repl-cljs))
null
https://raw.githubusercontent.com/nijohando/event/34e359c554d2baaa01e4fec524942f513a26d7f5/dev/prj/user.clj
clojure
(ns prj.user (:require [jp.nijohando.event :as f] [jp.nijohando.prj.test :as prj-test] [prj.cljs])) (defn test-clj [] (prj-test/run-tests 'jp.nijohando.event-test 'jp.nijohando.event-test-clj)) (defn test-cljs [] (prj.cljs/test-cljs)) (defn repl-cljs [] (prj.cljs/repl-cljs))
17f76c27c48a34a99ffe87d2824c88cbf065ba59fc40423fbbb6cb21400bd6a4
facebookarchive/pfff
ast_miniphp.ml
An example of dynamic language where have no type information . * Could look at the few POPL papers talking about PHP , maybe they present * a mini - PHP . * * could copy code from todo / pfff - old / lang_php / old / mini / ast_mini_php.ml ? * Could look at the few POPL papers talking about PHP, mayb...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/mini/ast_miniphp.ml
ocaml
An example of dynamic language where have no type information . * Could look at the few POPL papers talking about PHP , maybe they present * a mini - PHP . * * could copy code from todo / pfff - old / lang_php / old / mini / ast_mini_php.ml ? * Could look at the few POPL papers talking about PHP, mayb...
97e7ce2765b25b96f36832da4210e74b006c402ce8acfefee89bc93f9a6d4b6c
opencog/learn
scatter.scm
; ; scatter.scm - create scatterplot images. Write out single-channel " flo " images . ; (use-modules (ice-9 format)) (use-modules (ice-9 binary-ports)) (use-modules (rnrs bytevectors)) (use-modules (rnrs io ports)) (define-public (write-flo filename LST FN) " write-flo - write a single-color-channel floating-point...
null
https://raw.githubusercontent.com/opencog/learn/c599c856f59c1815b92520bee043c588d0d1ebf9/learn-lang-diary/utils/scatter.scm
scheme
scatter.scm - create scatterplot images. Write out single-channel Write a null byte. (bytevector-ieee-single-set! bvrow ncol number 'little) Now write out the row.
" flo " images . (use-modules (ice-9 format)) (use-modules (ice-9 binary-ports)) (use-modules (rnrs bytevectors)) (use-modules (rnrs io ports)) (define-public (write-flo filename LST FN) " write-flo - write a single-color-channel floating-point image of a matrix. This assumes that FN is a function, taking two argu...
c4f9e78e3801fdfc332c32ecc8d616fb26abd62c2700af39637696929cdc9c75
zouv/erlbte
n_wait.erl
%% Author: zouv Date : 2016 - 09 - 26 %% Doc: Wait Action Node -module(n_wait). -behaviour(bte_node_behaviour). -include("common.hrl"). -export([ node_name/0, init/1, execute/3 ]). node_name() -> "Wait". init(_Parameters) -> {}. %% only for test execute(BteStatus, _Node, _IsFromStack) -> case util:ran...
null
https://raw.githubusercontent.com/zouv/erlbte/dad129dafdbbac11b38c7d10f0f0b4d49555f427/src/actions/n_wait.erl
erlang
Author: zouv Doc: Wait Action Node only for test
Date : 2016 - 09 - 26 -module(n_wait). -behaviour(bte_node_behaviour). -include("common.hrl"). -export([ node_name/0, init/1, execute/3 ]). node_name() -> "Wait". init(_Parameters) -> {}. execute(BteStatus, _Node, _IsFromStack) -> case util:rand(1, 3) of 1 -> Status = ?BTE_SUCCESS; 2 -> Stat...
e28d6d0dc6a8f3e96f95ab278fa1f0df4701055b377bbdd7afea86518e8fc25f
konn/smooth
Utils.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # {-# LANGUAGE GADTs #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MagicHash # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # {-# LANGUAGE TypeSynonymInstances #-} #...
null
https://raw.githubusercontent.com/konn/smooth/4cb4eb84eaa3c9dcd0d2bf7cd09654113c57b02a/test/Utils.hs
haskell
# LANGUAGE GADTs # # LANGUAGE TypeSynonymInstances # # OPTIONS_GHC -fplugin GHC.TypeLits.Presburger # | Expr n :/ Expr n | Expr n :** Expr n | Recip (Expr n) , :/ , :** Actually, sinh is total. but it grows so fast to reach infinity Yes, exponential is total, but it is easy to explode... evalExpr (Recip e) ...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MagicHash # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -Wno - orphans...
7c8cfe28257f7a6f515f03341150b47182ab16f908a23fa6fa209eb770820763
Engelberg/instaparse
transform.cljc
(ns instaparse.transform "Functions to transform parse trees" (:require [instaparse.gll] [instaparse.util :refer [throw-illegal-argument-exception]])) (defn map-preserving-meta [f l] (with-meta (map f l) (meta l))) (defn merge-meta "This variation of the merge-meta in gll does nothing if obj is no...
null
https://raw.githubusercontent.com/Engelberg/instaparse/4d1903b059e77dc0049dfbc75af9dce995756148/src/instaparse/transform.cljc
clojure
Detect what kind of tree this is This is a leaf of the tree that should pass through unchanged This is an enlive tree-seq This is a hiccup tree-seq This is either a sequence of parse results, or a tree with a hidden root tag. pass failures through unchanged
(ns instaparse.transform "Functions to transform parse trees" (:require [instaparse.gll] [instaparse.util :refer [throw-illegal-argument-exception]])) (defn map-preserving-meta [f l] (with-meta (map f l) (meta l))) (defn merge-meta "This variation of the merge-meta in gll does nothing if obj is no...
1b1b26e19dee0480b7fed14143c704dd39cf647befc422ee362194456a12f563
racket/racket7
regexp.rkt
#lang racket/base (require racket/include racket/unsafe/ops) ;; Run using the built-in C implementation: '|C -----------------| (include "regexp.rktl") ;; Run the Racket implementation: '|Racket -----------------| (let () (define-syntax-rule (linklet () ([int-id ext-id] ...) body ...) (begin (def...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/cs/demo/regexp.rkt
racket
Run using the built-in C implementation: Run the Racket implementation: Run using the Racket implementation:
#lang racket/base (require racket/include racket/unsafe/ops) '|C -----------------| (include "regexp.rktl") '|Racket -----------------| (let () (define-syntax-rule (linklet () ([int-id ext-id] ...) body ...) (begin (define ext-id #f) ... (let () body ... (set! ext-id int-id)...
dbfa6973cd65fd7fcecb7f5a26ea41f59bf300bb6ab36520980412be160244eb
rd--/hsc3
sinOscFB.help.hs
-- sinOscFB let x = mouseX kr 0 4 Linear 0.2 in sinOscFB ar (mce2 400 301) x * 0.1 -- sinOscFB let y = mouseY kr 10 1000 Exponential 0.2 x = mouseX kr (pi/2) pi Linear 0.2 in sinOscFB ar y x * 0.1 -- sinOscFB let y = mouseY kr 1 1000 Exponential 0.2 x = mouseX kr (pi/2) pi Linear 0.2 in sinOscFB ar (100 * sin...
null
https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/sinOscFB.help.hs
haskell
sinOscFB sinOscFB sinOscFB
let x = mouseX kr 0 4 Linear 0.2 in sinOscFB ar (mce2 400 301) x * 0.1 let y = mouseY kr 10 1000 Exponential 0.2 x = mouseX kr (pi/2) pi Linear 0.2 in sinOscFB ar y x * 0.1 let y = mouseY kr 1 1000 Exponential 0.2 x = mouseX kr (pi/2) pi Linear 0.2 in sinOscFB ar (100 * sinOscFB ar y 0 + 200) x * 0.1
22efdcb7744ba60266337ec4a45f4b08ad1ef9b68aa59bc3f9d4f540ecdbf0a5
mark-watson/haskell_tutorial_cookbook_examples
CommandLine1.hs
module Main where import System.IO import Data.Char (toUpper) main = do putStrLn "Enter a line of text for test 1:" s <- getLine putStrLn $ "As upper case:\t" ++ (map toUpper s) main
null
https://raw.githubusercontent.com/mark-watson/haskell_tutorial_cookbook_examples/0f46465b67d245fa3853b4e320d79b7d7234e061/CommandLineApp/CommandLine1.hs
haskell
module Main where import System.IO import Data.Char (toUpper) main = do putStrLn "Enter a line of text for test 1:" s <- getLine putStrLn $ "As upper case:\t" ++ (map toUpper s) main
2044d6cc666449cf35a3633c9ea2675fd541be1edd51115099f3db528f20a447
sjl/advent
day-13.lisp
(advent:defpackage* :advent/2021/13) (in-package :advent/2021/13) (defun dot (x y) (complex x y)) (defun x (dot) (realpart dot)) (defun y (dot) (imagpart dot)) (defun parse (lines) (iterate (for line :in lines) (ppcre:register-groups-bind ((#'parse-integer x y)) ("(\\d+),(\\d+)" line) (collect (dot x ...
null
https://raw.githubusercontent.com/sjl/advent/c6f3e11eeace1c7d50f19d64260ee8879785cce0/src/2021/days/day-13.lisp
lisp
(print-hash-table-map (dots-to-hash-table dots) :flip-y t) Scratch --------------------------------------------------------------------
(advent:defpackage* :advent/2021/13) (in-package :advent/2021/13) (defun dot (x y) (complex x y)) (defun x (dot) (realpart dot)) (defun y (dot) (imagpart dot)) (defun parse (lines) (iterate (for line :in lines) (ppcre:register-groups-bind ((#'parse-integer x y)) ("(\\d+),(\\d+)" line) (collect (dot x ...
520e3646f19632372b6a0c87b4c9556f25b5d9f4c62a9ddcedb1fd287cbf6900
typedclojure/typedclojure
isa.clj
Copyright ( c ) , contributors . ;; 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 ;...
null
https://raw.githubusercontent.com/typedclojure/typedclojure/1b3c9ef6786a792ae991c438ea8dca31175aa4a7/typed/clj.checker/src/typed/cljc/checker/check/isa.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 ) , contributors . (ns ^:no-doc typed.cljc.checker.check.isa (:require [typed.cljc.checker.type-rep :as r] [typed.cljc.checker.check-below :as below] [typed.cljc.checker.filter-ops :as fo] [clojure.core.typed.contract-utils :as con] [typed.cljc...
c2fa0a08fd34bbf1b30a974f986da6cffc6007a733d56ca198708d0769c50f1d
waldheinz/bling
Bling.hs
module Graphics.Bling ( module Data.Monoid, module Graphics.Bling.IO.Bitmap, module Graphics.Bling.Camera, module Graphics.Bling.Filter, module Graphics.Bling.Image, module Graphics.Bling.Integrator.BidirPath, module Graphics.Bling.Integrator.Path, module Graphics.Bling.Light, module Graphic...
null
https://raw.githubusercontent.com/waldheinz/bling/1f338f4b8dbd6a2708cb10787f4a2ac55f66d5a8/src/lib/Graphics/Bling.hs
haskell
| Geometry without id
module Graphics.Bling ( module Data.Monoid, module Graphics.Bling.IO.Bitmap, module Graphics.Bling.Camera, module Graphics.Bling.Filter, module Graphics.Bling.Image, module Graphics.Bling.Integrator.BidirPath, module Graphics.Bling.Integrator.Path, module Graphics.Bling.Light, module Graphic...
a8028c440da3a3aa9fdf6f2b4e6179c63d4afd62a60638299f426d585f347d14
arachne-framework/enterprise-spa
enterprise_spa_test.clj
(ns org.arachne-framework.template.enterprise-spa-test)
null
https://raw.githubusercontent.com/arachne-framework/enterprise-spa/084efbb7a9cb49349cc54a630f8f6b6fb3063646/test/org/arachne_framework/template/enterprise_spa_test.clj
clojure
(ns org.arachne-framework.template.enterprise-spa-test)
84b88bc4002cebf3c822adfea0baa8d46d09a1240b1d9dadd83fde672b5deca8
oscoin/oscoin
Transport.hs
module Oscoin.P2P.Transport ( RecvError(..) -- * Framed , Framed , framed , anyFramed , framedSend , framedRecv , framedEnvelope -- * Streaming , Streaming , streaming , anyStreaming , streamingSend , streamingRecv , streamingEnvelope ) where import ...
null
https://raw.githubusercontent.com/oscoin/oscoin/2eb5652c9999dd0f30c70b3ba6b638156c74cdb1/src/Oscoin/P2P/Transport.hs
haskell
* Framed * Streaming Framed ---------------------------------------------------------------------- Streaming ------------------------------------------------------------------- TODO(kim): make this untyped as well ------------------------------------------------------------------------------
module Oscoin.P2P.Transport ( RecvError(..) , Framed , framed , anyFramed , framedSend , framedRecv , framedEnvelope , Streaming , streaming , anyStreaming , streamingSend , streamingRecv , streamingEnvelope ) where import Oscoin.Prelude import ...
3fc7eb28fc6639a34af5b4fa9dc6fa4751dadf7ad201ae1c8e0ffc7f61b37082
kappelmann/eidi2_repetitorium_tum
Threading_Basics.ml
open Event (* Aufgabe 1 *) let threaded_filter p l c = let rec filter p = function [] -> [] | x::xs -> if p x then x::filter p xs else filter p xs in let _ = Thread.create (fun () -> sync (send c (filter p l))) () in () (* Aufgabe 2 *) type 'a t = 'a channel let create f v = let c =...
null
https://raw.githubusercontent.com/kappelmann/eidi2_repetitorium_tum/1d16bbc498487a85960e0d83152249eb13944611/2016/threads/solutions/Threading_Basics.ml
ocaml
Aufgabe 1 Aufgabe 2 Aufgabe 3
open Event let threaded_filter p l c = let rec filter p = function [] -> [] | x::xs -> if p x then x::filter p xs else filter p xs in let _ = Thread.create (fun () -> sync (send c (filter p l))) () in () type 'a t = 'a channel let create f v = let c = new_channel() in let re...
983f25d7e20cbe96a8954330af21f38abcbc8a9d0643df192d6059a1ced99d9d
haskell-tools/haskell-tools
CrossDef.hs
# LANGUAGE TemplateHaskell # module TH.CrossDef where $([d| x = 3 |])
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/refactor/examples/TH/CrossDef.hs
haskell
# LANGUAGE TemplateHaskell # module TH.CrossDef where $([d| x = 3 |])
6edd858205283a20f4eb953016ba283911a33f4066a520474fbc0cc56384516a
soarlab/FPTaylor
interval.ml
include Interval1 let zero_I = zero_interval let one_I = one_interval let fprintf_I fp format i = Printf.fprintf fp "[%s, %s]" (Printf.sprintf format i.low) (Printf.sprintf format i.high) let sprintf_I format i = Printf.sprintf "[%s, %s]" (Printf.sprintf format i.low) (Printf.sprintf format i.high)...
null
https://raw.githubusercontent.com/soarlab/FPTaylor/efbbc83970fe3c9f4cb33fafbbe1050dd18749cd/simple_interval/fast_interval/interval.ml
ocaml
include Interval1 let zero_I = zero_interval let one_I = one_interval let fprintf_I fp format i = Printf.fprintf fp "[%s, %s]" (Printf.sprintf format i.low) (Printf.sprintf format i.high) let sprintf_I format i = Printf.sprintf "[%s, %s]" (Printf.sprintf format i.low) (Printf.sprintf format i.high)...
7e040bdce9a0cd5fed39fa7df51baab8c5004fc5156cb1cf7a47961c821a748d
johnlawrenceaspden/hobby-code
plaza-w3c.clj
(use 'plaza.rdf.core) (import java.io.FileInputStream) (reset-model) ;;It's imperative. Do this to flush all the old data (def e (document-to-model (new FileInputStream "/home/john/hobby-code/w3schoolsrdfexamples/rdfdocumentexample.xml") :xml)) (def e-str (with-out-str (model-to-format e :n3))) ...
null
https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/plaza-w3c.clj
clojure
It's imperative. Do this to flush all the old data
(use 'plaza.rdf.core) (import java.io.FileInputStream) (def e (document-to-model (new FileInputStream "/home/john/hobby-code/w3schoolsrdfexamples/rdfdocumentexample.xml") :xml)) (def e-str (with-out-str (model-to-format e :n3))) (print e-str) (map #((.getURI (first %)) (second %) (nth % 2)) (mo...
8954a9d9c18b8500bb2f1755ae19defd2dbdea3a6c2c8976060c62652e9091c3
argp/bap
batDigest.mli
* BatDigest - Additional functions for MD5 message digests * Copyright ( C ) 1996 , INRIA Rocquencourt * Copyright ( C ) 2009 , LIFO , Universite d'Orleans * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License a...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/src/batDigest.mli
ocaml
* Return the digest of the given string. * Return the digest of the file whose name is given. * Return the printable hexadecimal representation of the given digest. * If [len] is nonnegative, [Digest.channel ic len] reads [len] characters from channel [ic] and returns their digest, or @raise End_of_file if e...
* BatDigest - Additional functions for MD5 message digests * Copyright ( C ) 1996 , INRIA Rocquencourt * Copyright ( C ) 2009 , LIFO , Universite d'Orleans * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License a...
821956c28ba7b55b5beb9bbd0d1b84c3acd6828944bb02afcc0e2ab839ecb346
borodust/bodge-ode
packages.lisp
(cl:defpackage :ode (:nicknames :ode) (:use :cl :alexandria) (:export #:+infinity+ #:contact-flags #:define-collision-callback #:collision-callback #:space-collide))
null
https://raw.githubusercontent.com/borodust/bodge-ode/e60c6940fa055624205aafd4170305d0193cd933/src/packages.lisp
lisp
(cl:defpackage :ode (:nicknames :ode) (:use :cl :alexandria) (:export #:+infinity+ #:contact-flags #:define-collision-callback #:collision-callback #:space-collide))
3d996feab058685ab7092bba6f896231eeeba7b41fcd94c6317d033e7b641bfc
tel/saltine
ChaCha20Poly1305Properties.hs
{-# LANGUAGE OverloadedStrings #-} # OPTIONS_GHC -fno - warn - orphans # module AEAD.ChaCha20Poly1305Properties ( testAEADChaCha20 ) where import Util import Crypto.Saltine.Core.AEAD.ChaCha20Poly1305IETF import Crypto.Saltine.Class (decode) import Crypto.Saltine.Internal.AE...
null
https://raw.githubusercontent.com/tel/saltine/b00e00fa8ce8bf4ee176a9d3deead57c590fc686/tests/AEAD/ChaCha20Poly1305Properties.hs
haskell
# LANGUAGE OverloadedStrings # | Ciphertext can be decrypted | Detached ciphertext/tag can be decrypted | Ciphertext cannot be decrypted if the ciphertext is perturbed | Ciphertext cannot be decrypted if the tag is perturbed | Ciphertext cannot be decrypted if the ciphertext is perturbed | Ciphertext cannot be de...
# OPTIONS_GHC -fno - warn - orphans # module AEAD.ChaCha20Poly1305Properties ( testAEADChaCha20 ) where import Util import Crypto.Saltine.Core.AEAD.ChaCha20Poly1305IETF import Crypto.Saltine.Class (decode) import Crypto.Saltine.Internal.AEAD.ChaCha20Poly1305IETF as Bytes i...
2074503a9cfb48594ca9a91176a31094c7b4e38551949099eb752603fbbf196a
Apress/practical-webdev-haskell
Common.hs
module Adapter.HTTP.Common where import ClassyPrelude import Web.Scotty.Trans import Blaze.ByteString.Builder (toLazyByteString) import Web.Cookie import Domain.Auth.Types import Data.Time.Lens import qualified Text.Digestive.Types as DF -- * Forms toResult :: Either e a -> DF.Result e a toResult = either DF.Error D...
null
https://raw.githubusercontent.com/Apress/practical-webdev-haskell/17b90c06030def254bb0497b9e357f5d3b96d0cf/11/src/Adapter/HTTP/Common.hs
haskell
* Forms * Cookies * Sessions
module Adapter.HTTP.Common where import ClassyPrelude import Web.Scotty.Trans import Blaze.ByteString.Builder (toLazyByteString) import Web.Cookie import Domain.Auth.Types import Data.Time.Lens import qualified Text.Digestive.Types as DF toResult :: Either e a -> DF.Result e a toResult = either DF.Error DF.Success ...
0769f70a4bb974cdb3087ed84e584726779d3da6065c26bfe6b628b3eec3742e
NorfairKing/bevel
Gen.hs
# OPTIONS_GHC -fno - warn - dodgy - exports # module Bevel.Data.Gen ( module X, ) where import Bevel.Data.Command.Gen as X ()
null
https://raw.githubusercontent.com/NorfairKing/bevel/8cc74d83d058f916acf4cf247341852600d9456e/bevel-data-gen/src/Bevel/Data/Gen.hs
haskell
# OPTIONS_GHC -fno - warn - dodgy - exports # module Bevel.Data.Gen ( module X, ) where import Bevel.Data.Command.Gen as X ()
85bb633cd06f1978a5cce23304aacccffe7a846fd9df7a0486534942a82ff949
haskell/haskell-language-server
RefineIntroWhere.hs
test :: Maybe Int -> Int test = _ where -- Don't delete me! blah = undefined
null
https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/golden/RefineIntroWhere.hs
haskell
Don't delete me!
test :: Maybe Int -> Int test = _ where blah = undefined
73b65498fd72ee43f1baff1d9cd7982ea39e7c46adb73c523552b2e6f864136b
digital-asset/ghc
unboxedsums1.hs
# LANGUAGE UnboxedSums , MagicHash # module Main where import GHC.Prim import GHC.Types import System.Mem (performMajorGC) type Either1 a b = (# a | b #) showEither1 :: (Show a, Show b) => Either1 a b -> String showEither1 (# left | #) = "Left " ++ show left showEither1 (# | right #) = "Right " ++ show right sho...
null
https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/unboxedsums/unboxedsums1.hs
haskell
make sure we don't put pointers to non-pointer slots make sure pointers in unboxed sums are really roots boxed types only prim types only a mix of prim and boxed types big arity
# LANGUAGE UnboxedSums , MagicHash # module Main where import GHC.Prim import GHC.Types import System.Mem (performMajorGC) type Either1 a b = (# a | b #) showEither1 :: (Show a, Show b) => Either1 a b -> String showEither1 (# left | #) = "Left " ++ show left showEither1 (# | right #) = "Right " ++ show right sho...
1e3e722967318fd89b816d6a69fb7975094ff3372d9f23c4991753cd8f7f221c
wadehennessey/wcl
hash.lisp
( C ) Copyright 1990 - 2014 by . All rights reserved . (defmethod clrhash ((table hash-table)) (let ((buckets (hash-table-buckets table)) (empty *empty-bucket-marker*)) (declare (simple-vector buckets)) (dotimes (i (hash-table-length table)) (setf (svref buckets i) empty)) (setf (hash-...
null
https://raw.githubusercontent.com/wadehennessey/wcl/841316ffe06743d4c14b4ed70819bdb39158df6a/src/cl/functions/hash.lisp
lisp
key in the table. For example, the package system hashes on on strings, but symbols are stored in the table). SPICE HEY! This should execute without interrupts. Should move the copy out of the critical section, though. HEY! need to account for gc relocating pointers!!! Until then, we punt and reduce to linear ...
( C ) Copyright 1990 - 2014 by . All rights reserved . (defmethod clrhash ((table hash-table)) (let ((buckets (hash-table-buckets table)) (empty *empty-bucket-marker*)) (declare (simple-vector buckets)) (dotimes (i (hash-table-length table)) (setf (svref buckets i) empty)) (setf (hash-...
b87b7ed63d5c87200f842f413d86509232f8db9b1670b5ecbdd4b38b6d86f250
brianium/yoose
async.clj
(ns brianium.yoose.async (:require [clojure.core.async :as async :refer [go go-loop <! <!! >!]] [clojure.core.async.impl.protocols :refer [ReadPort WritePort Channel]] [brianium.yoose :refer [UseCase out in]])) (defn chan? "Check if the given value is a ManyToMany channel" [value] (and...
null
https://raw.githubusercontent.com/brianium/yoose/c4f2892798cbdfef726ce221723c9397108e472e/src/brianium/yoose/async.clj
clojure
(ns brianium.yoose.async (:require [clojure.core.async :as async :refer [go go-loop <! <!! >!]] [clojure.core.async.impl.protocols :refer [ReadPort WritePort Channel]] [brianium.yoose :refer [UseCase out in]])) (defn chan? "Check if the given value is a ManyToMany channel" [value] (and...
8e89d8bdcd2703dac848e7396d4d669f618d40b9471dc58410ddbd93d8e3779c
Frama-C/Frama-C-snapshot
wpContext.ml
(**************************************************************************) (* *) This file is part of WP plug - in of Frama - C. (* *) Copyrigh...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/wp/wpContext.ml
ocaml
************************************************************************ alternatives) ...
This file is part of WP plug - in of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat a l'energie atomique et aux energies Lesser General Public License as published by the Free Software Foundation ,...
6eb714da931ad4ef0d7bd0e56e2c2b0df1767153c347ff8e3700b469c02f187a
cddr/edn-avro
build.clj
(ns build (:require [clojure.string :as str] [clojure.tools.build.api :as b] [deps-deploy.deps-deploy :as dd])) (def version (let [git-tag (b/git-process {:git-args "describe --tags --abbrev=0"}) git-describe (b/git-process {:git-args "describe"})] (str/join "-" (->> [git-tag (when-not (= git-...
null
https://raw.githubusercontent.com/cddr/edn-avro/075c21e173069c10dc66c5318036bca565406f97/build.clj
clojure
(ns build (:require [clojure.string :as str] [clojure.tools.build.api :as b] [deps-deploy.deps-deploy :as dd])) (def version (let [git-tag (b/git-process {:git-args "describe --tags --abbrev=0"}) git-describe (b/git-process {:git-args "describe"})] (str/join "-" (->> [git-tag (when-not (= git-...
eb650924daa93304c3d814f28f13b154711f4058e4b0b7755032a15b89dfe32b
montelibero-org/veche
Event.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE BlockArguments # # LANGUAGE DataKinds # # LANGUAGE DefaultSignatures # # LANGUAGE DisambiguateRecordFields # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE ImportQualifiedPost # # LANGUAGE NamedFieldPuns # # LANGUAGE NoImplicitPrelude # # LANG...
null
https://raw.githubusercontent.com/montelibero-org/veche/7c94d0461ceebf824388b3e8585a90094ef3e5b9/veche-web/src/Model/Event.hs
haskell
# LANGUAGE OverloadedStrings # | issueId must present | commentId must present | Get all undelivered events
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE BlockArguments # # LANGUAGE DataKinds # # LANGUAGE DefaultSignatures # # LANGUAGE DisambiguateRecordFields # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE ImportQualifiedPost # # LANGUAGE NamedFieldPuns # # LANGUAGE NoImplicitPrelude # # LANG...
c5fd967913a16b6e8c117ca9ead54caea0095b430f8c3f4aa091b5363af8ca7e
sol/doctest
Foo.hs
module Foo where foo :: Int foo = 23
null
https://raw.githubusercontent.com/sol/doctest/ec6498542986b659f50e961b02144923f6f41eba/test/integration/custom-package-conf/foo/Foo.hs
haskell
module Foo where foo :: Int foo = 23
2e230c9f1b2fdeca4f6d79857ca26a958d0821359f09476ad4312a3093073996
Gandalf-/coreutils
Tee.hs
module Coreutils.Tee where import Control.Exception import Control.Monad import qualified Streaming.ByteString as Q import System.Console.GetOpt import System.Exit import System.IO import Coreutils.Util data Tee = Tee instance Util Tee where run _ = t...
null
https://raw.githubusercontent.com/Gandalf-/coreutils/d76bd5a2698e9dc8f548698cded1a873a196a4dc/Coreutils/Tee.hs
haskell
get handles for all output files and stdout, run them through tee build up n computations that copy the stream and write it a file | Options
module Coreutils.Tee where import Control.Exception import Control.Monad import qualified Streaming.ByteString as Q import System.Console.GetOpt import System.Exit import System.IO import Coreutils.Util data Tee = Tee instance Util Tee where run _ = t...
3aef0e6a25e08fe2031a0b86edee2c5cd8f7b9eb71acf6db981268dd0b80ddac
erikd/vector-algorithms
Util.hs
# LANGUAGE TypeOperators # module Util where import Control.Monad import Control.Monad.ST import Data.Word import Data.Int import qualified Data.ByteString as B import qualified Data.Vector as V import Data.Vector.Mutable hiding (length) import Test.QuickCheck mfromList :: [e] -> ST s (MVector s e) mfromList l...
null
https://raw.githubusercontent.com/erikd/vector-algorithms/d25f05648ebf419a96755eeba7352df6b7f7dd3f/tests/properties/Util.hs
haskell
# LANGUAGE TypeOperators # module Util where import Control.Monad import Control.Monad.ST import Data.Word import Data.Int import qualified Data.ByteString as B import qualified Data.Vector as V import Data.Vector.Mutable hiding (length) import Test.QuickCheck mfromList :: [e] -> ST s (MVector s e) mfromList l...
ddd7b262759130789a811dad66b29970d83374abf7f95365c77495f06e82e159
victornicolet/parsynt
Alpha.ml
open Base open Utils let _NID = ref 0;; let _VID = ref 99;; let names : int SH.t = SH.create 0;; let reserved = [ "INT_MIN"; "INT_MAX"; "INT"; "max"; "min"; "+"; "-"; "*"; "/"; "="; ">"; ">="; "<="; "=="; "="; "exp"; "expt"; "log"; "bool"; "int"; "float"; "real"; "bitvector"; "list"; "map"; "fold"; ...
null
https://raw.githubusercontent.com/victornicolet/parsynt/d3f530923c0c75537b92c2930eb882921f38268c/src/lang/Alpha.ml
ocaml
open Base open Utils let _NID = ref 0;; let _VID = ref 99;; let names : int SH.t = SH.create 0;; let reserved = [ "INT_MIN"; "INT_MAX"; "INT"; "max"; "min"; "+"; "-"; "*"; "/"; "="; ">"; ">="; "<="; "=="; "="; "exp"; "expt"; "log"; "bool"; "int"; "float"; "real"; "bitvector"; "list"; "map"; "fold"; ...
c3d7e9a0b5d37c8ed56d6f4b8294fb4a98eb9288eb4907a59fb629d31650599c
haskell-repa/repa
Main.hs
# LANGUAGE PackageImports , BangPatterns , QuasiQuotes , PatternGuards , ScopedTypeVariables # {-# OPTIONS -Wall -fno-warn-missing-signatures -fno-warn-incomplete-patterns #-} -- | Apply Sobel operators to an image. import System.Environment import Data.Array.Repa as R import Data.Array.Repa.A...
null
https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-examples/examples/Sobel/src-repa/Main.hs
haskell
# OPTIONS -Wall -fno-warn-missing-signatures -fno-warn-incomplete-patterns # | Apply Sobel operators to an image. Load the source image and convert it to greyscale Run the filter. | Determine the squared magnitude of a vector.
# LANGUAGE PackageImports , BangPatterns , QuasiQuotes , PatternGuards , ScopedTypeVariables # import System.Environment import Data.Array.Repa as R import Data.Array.Repa.Algorithms.Pixel as R import Data.Array.Repa.IO.BMP import Data.Array.Repa.IO.Timing import Prelude ...
d9888cec37966214aeeef7f3e230722e52c4e194a5c4412b944a06ae3b0ea6fb
kelamg/HtDP2e-workthrough
ex2.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-advanced-reader.ss" "lang")((modname ex2) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #t #t...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Fixed-size-Data/ex2.rkt
racket
about the language level of this file in a form that our tools can easily process.
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-advanced-reader.ss" "lang")((modname ex2) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #t #t none #f () #f))) (define prefix "hello") (define suffix "world") (string-append pref...
fd56fab8f6bd24c3edbdfd950fbcfc3d227a1b8710a3b9625d83cf0184b71b61
cutsea110/Kestrel
Model.hs
# OPTIONS_GHC -fspec - constr - count=100 # module Model ( module Model ) where import ClassyPrelude.Yesod import Database.Persist.Quasi import Yesod . Helpers . Crud -- FIXME import Data.Time import qualified Settings (tz) type Version = Int -- You can define all of your database entities here. You...
null
https://raw.githubusercontent.com/cutsea110/Kestrel/9af7f7ab17a15854e21cc6cb25ac922379a97df7/Model.hs
haskell
FIXME You can define all of your database entities here. You can find more information on persistent and how to declare entities at: FIXME Crud instance Item User where
# OPTIONS_GHC -fspec - constr - count=100 # module Model ( module Model ) where import ClassyPrelude.Yesod import Database.Persist.Quasi import Data.Time import qualified Settings (tz) type Version = Int share [mkPersist sqlSettings, mkMigrate "migrateAll"] $(persistFileWith upperCaseSettings "c...
692339efed709c81a1b4d9e01cda7d9ced8b230f4f2755d35d701b55c2d9c8bc
appleshan/cl-http
cl-http-70-153.lisp
-*- Mode : LISP ; Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : t -*- Patch file for CL - HTTP version 70.153 Reason : Function ( CLOS : METHOD HTTP::MIME - STREAM - DECODE - UNTIL - BOUNDARY ( T T T ( EQL : BINARY ) ) ): ;;; Fix check-for-mime-boundry not to drop a byte on failed matches...
null
https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lispm/server/patch/cl-http-70/cl-http-70-153.lisp
lisp
Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : t -*- Fix check-for-mime-boundry not to drop a byte on failed matches. DOMAIN - FIXES.LISP.33 ) , MAILBOX - FORMAT.LISP.24 ) , MAILER - FIXES.LISP.15 ) , Patch TCP hang on close when client drops connection. (from HTTP:LISPM;SERVER;TCP-PATCH-HANG-O...
Patch file for CL - HTTP version 70.153 Reason : Function ( CLOS : METHOD HTTP::MIME - STREAM - DECODE - UNTIL - BOUNDARY ( T T T ( EQL : BINARY ) ) ): Written by JCMa , 10/30/01 19:16:14 while running on FUJI - VLM from FUJI:/usr / lib / symbolics / ComLink-39 - 8 - F - MIT-8 - 5.vlod with Open Genera 2.0 ...
99468e05aa2d303d3407cfdc7723bd4315f179b45363ab659908c359f3629f38
mkoppmann/eselsohr
Integration.hs
module Test.Integration ( integrations ) where import Test.Tasty ( TestTree , testGroup ) import Test.Tasty.Hspec (testSpec) import Test.Ui.Web.Controller.ArticleList (articleListControllerSpec) import Test.Ui.Web.Controller.Collection (collectionControllerSpec) import Test.Ui.Web.Controller.Stati...
null
https://raw.githubusercontent.com/mkoppmann/eselsohr/3bb8609199c1dfda94935e6dde0c46fc429de84e/test/Test/Integration.hs
haskell
module Test.Integration ( integrations ) where import Test.Tasty ( TestTree , testGroup ) import Test.Tasty.Hspec (testSpec) import Test.Ui.Web.Controller.ArticleList (articleListControllerSpec) import Test.Ui.Web.Controller.Collection (collectionControllerSpec) import Test.Ui.Web.Controller.Stati...
08f42646e7a0b2b220c4afa423af7205304af813c7f30dd6bdb0a65050c29ecc
jeroanan/rkt-coreutils
ls.rkt
#lang s-exp "util/program/repl-program.rkt" Copyright 2020 ;; See COPYING for details (provide ls% ls) (require racket/bool racket/string racket/list racket/format) (require "typedef/stat.rkt" "typedef/getpwuid.rkt" "util/fileaccessstr.rkt"...
null
https://raw.githubusercontent.com/jeroanan/rkt-coreutils/571629d1e2562c557ba258b31ce454add2e93dd9/src/repl/ls.rkt
racket
See COPYING for details ls - list directories TODO: add help method TODO: Find a way to check if we are running in the repl. Whether to print inode no. If true output in "long mode". Otherwise just show what's in the listing. If true don't include "." and ".." when showing all entries Should output in in colour...
#lang s-exp "util/program/repl-program.rkt" Copyright 2020 (provide ls% ls) (require racket/bool racket/string racket/list racket/format) (require "typedef/stat.rkt" "typedef/getpwuid.rkt" "util/fileaccessstr.rkt" "util/hu...
1ceeff80f3114ad8a293fd1c57f5df75d50fc952dfa5307912bbdb415860b5a3
flosell/lambdacd
control_flow_test.clj
(ns lambdacd.steps.control-flow-test (:use [lambdacd.testsupport.test-util]) (:refer-clojure :exclude [alias]) (:require [clojure.test :refer :all] [lambdacd.testsupport.matchers :refer [map-containing]] [lambdacd.testsupport.data :refer [some-ctx-with some-ctx]] [lambdacd.step...
null
https://raw.githubusercontent.com/flosell/lambdacd/e9ba3cebb2d5f0070a2e0e1e08fc85fc99ee7135/test/clj/lambdacd/steps/control_flow_test.clj
clojure
wait a bit before starting to give both steps some time wait a bit before starting to give both steps some time make sure the step always eventually finishes make sure the step always eventually finishes
(ns lambdacd.steps.control-flow-test (:use [lambdacd.testsupport.test-util]) (:refer-clojure :exclude [alias]) (:require [clojure.test :refer :all] [lambdacd.testsupport.matchers :refer [map-containing]] [lambdacd.testsupport.data :refer [some-ctx-with some-ctx]] [lambdacd.step...
b6dd5da1f640f22a04ecaba210314db9b2b4471bfdde95fb723a8b6abe728860
camllight/camllight
ouster-f16.6.ml
#open "tk";; (* fake commands omitted *) let top = OpenTk() in let ok = button__create top [Text "OK"] and apply = button__create top [Text "Apply"] and cancel = button__create top [Text "Cancel"] and help = button__create top [Text "Help"] in pack [ok; apply; cancel; help] [Side Side_Left]; MainLo...
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/camltk/books-examples/ouster-f16.6.ml
ocaml
fake commands omitted
#open "tk";; let top = OpenTk() in let ok = button__create top [Text "OK"] and apply = button__create top [Text "Apply"] and cancel = button__create top [Text "Cancel"] and help = button__create top [Text "Help"] in pack [ok; apply; cancel; help] [Side Side_Left]; MainLoop() ;;
16a43125677310b728a3938d77c1ec3c7a6b60df6848c1323b2d14a591a680b8
sile/taomp-sbcl
base-hash-set.lisp
(defpackage base-hash-set (:use :common-lisp :util) (:nicknames base) (:export make add erase contains? @hash with-lock table set-size)) (in-package :base-hash-set) (defstruct @hash (table #() :type vector) (set-size 0 :type fixnum...
null
https://raw.githubusercontent.com/sile/taomp-sbcl/6216891346160e613fae3bb73491bc8c8fbad1c4/c13/base-hash-set.lisp
lisp
(defpackage base-hash-set (:use :common-lisp :util) (:nicknames base) (:export make add erase contains? @hash with-lock table set-size)) (in-package :base-hash-set) (defstruct @hash (table #() :type vector) (set-size 0 :type fixnum...
ab30d7738a9ca7d25d1c9af8865610ea0e0213a0ecdc1fe713a7588cb55e4f98
larcenists/larceny
locals3.scm
(text (nop) (label bar (jmp quux)) (locals (bar quux) (nop) (label bar (jmp quux) (nop)) (label quux (jmp bar) (nop))) (label quux (jmp bar))) 00000000 90 nop ; bar: 00000001 E90D000000 jmp 0x13 ; jmp quux 00000006 90 nop ;...
null
https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/tests/prims/locals3.scm
scheme
bar: jmp quux local bar: jmp local quux jmp local bar jmp bar
(text (nop) (label bar (jmp quux)) (locals (bar quux) (nop) (label bar (jmp quux) (nop)) (label quux (jmp bar) (nop))) (label quux (jmp bar))) 00000000 90 nop 00000006 90 nop 0000000C 90 nop local quux : 0000001...
b82c4bc84b006b0dc680634c1504dfa54def78d21406cc1b95ab3ca64312e5ad
sneeuwballen/zipperposition
type_check.ml
This file is free software , part of Logtk . See file " license " for more details . * { 1 TPTP Syntax and types checking } open Logtk open Logtk_parsers module PT = STerm module T = TypedSTerm module Err = CCResult module A = Ast_tptp open Err.Infix let print_line () = Printf.printf "%s\n" (CCString.repeat "...
null
https://raw.githubusercontent.com/sneeuwballen/zipperposition/7f1455fbe2e7509907f927649c288141b1a3a247/src/tools/type_check.ml
ocaml
print input declarations? check the given file print_line (); Format.printf "checking file `%s`...@." file; print_line ();
This file is free software , part of Logtk . See file " license " for more details . * { 1 TPTP Syntax and types checking } open Logtk open Logtk_parsers module PT = STerm module T = TypedSTerm module Err = CCResult module A = Ast_tptp open Err.Infix let print_line () = Printf.printf "%s\n" (CCString.repeat "...
c99a2bdfd69506737ad74d7af82713bdf7d580021d77372db81438ce0a18d6a2
hreinhardt/amqp
Types.hs
# LANGUAGE BangPatterns , DeriveDataTypeable # -- | -- This module contains data - types specified in the spec module Network.AMQP.Types ( AMQPException(..), Octet, Bit, ChannelID, PayloadSize, ShortInt, LongInt, LongLongInt, ShortString(..), LongString(..), ConsumerTag, ...
null
https://raw.githubusercontent.com/hreinhardt/amqp/5c310093d8aba8fe563aab414ac8641a0ae31d99/Network/AMQP/Types.hs
haskell
| | describes whether a channel was closed by user-request (Normal) or by an AMQP exception (Abnormal) | the 'String' contains the reason why the channel was closed ^ String may contain a reason ^ the 'Int' contains the channel-max property of the connection (i.e. the highest permitted channel id) performs runGe...
# LANGUAGE BangPatterns , DeriveDataTypeable # This module contains data - types specified in the spec module Network.AMQP.Types ( AMQPException(..), Octet, Bit, ChannelID, PayloadSize, ShortInt, LongInt, LongLongInt, ShortString(..), LongString(..), ConsumerTag, Times...
7e0af3ad0d5b70d17f1fe89a7837e29eae825167b2b9712906b94dcc4354f58d
stephenpascoe/hs-arrow
StructArrayBuilder.hs
| Copyright : , and License : LGPL-2.1 Maintainer : ( ) It wraps @arrow::StructBuilder@. Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria () It wraps @arrow::StructBuilder@. -} #define ENABLE_OVERLOADING (MI...
null
https://raw.githubusercontent.com/stephenpascoe/hs-arrow/86c7c452a8626b1d69a3cffd277078d455823271/gi-arrow/GI/Arrow/Objects/StructArrayBuilder.hs
haskell
* Exported types * Methods ** append #method:append# ** appendNull #method:appendNull# ** getFieldBuilder #method:getFieldBuilder# ** getFieldBuilders #method:getFieldBuilders# # SOURCE # # SOURCE # # SOURCE # | Memory-managed wrapper type. # OVERLAPPABLE # method StructArrayBuilder::new method type : Construc...
| Copyright : , and License : LGPL-2.1 Maintainer : ( ) It wraps @arrow::StructBuilder@. Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria () It wraps @arrow::StructBuilder@. -} #define ENABLE_OVERLOADING (MI...
d7e1f3fba0f8dbc7c917b107a539a834abdbbf1a820572abc7b7d3870c080aa6
may-liu/qtalk
http_get_adjacentmsg.erl
%% Feel free to use, reuse and abuse the code in this file. -module(http_get_adjacentmsg). -export([init/3]). -export([handle/2]). -export([terminate/3]). -include("ejabberd.hrl"). -include("logger.hrl"). init(_Transport, Req, []) -> {ok, Req, undefined}. handle(Req, State) -> {Method, _} = cowboy_req:method(Req)...
null
https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/http_get_adjacentmsg.erl
erlang
Feel free to use, reuse and abuse the code in this file. case http_utils:do_verify_user_key(LServer,User,Key) of
-module(http_get_adjacentmsg). -export([init/3]). -export([handle/2]). -export([terminate/3]). -include("ejabberd.hrl"). -include("logger.hrl"). init(_Transport, Req, []) -> {ok, Req, undefined}. handle(Req, State) -> {Method, _} = cowboy_req:method(Req), case Method of <<"GET">> -> {Host,_} = cowboy_req...
a395bf718f067cf53119026c7631760a59a7e8ba5cf4a0fdd9b593aef20d73d5
gpetiot/Frama-C-StaDy
print.mli
(* Extend the default printer to display the generated code insertions * at the corresponding label and the generated functions. *) class print_insertions : (* labeled environments *) ( Symbolic_label.t , Cil_types.varinfo Queue.t * Cil_types.stmt Queue.t * Cil_types.stmt Queue.t ) Hashtbl.t -> (* new func...
null
https://raw.githubusercontent.com/gpetiot/Frama-C-StaDy/48d8677c0c145d730d7f94e37b7b3e3a80fd1a27/print.mli
ocaml
Extend the default printer to display the generated code insertions * at the corresponding label and the generated functions. labeled environments new functions
class print_insertions : ( Symbolic_label.t , Cil_types.varinfo Queue.t * Cil_types.stmt Queue.t * Cil_types.stmt Queue.t ) Hashtbl.t Cil_types.fundec list i d of stmts , parameterizing the SWD int list -> Printer.extensible_printer
5f44bd4223b7d7b82fd7b4c940b249b35e11a32bd078866bf294ecabfb148216
tobast/OCrypto
rc4_bitv.mli
This file is part of OCrypto . OCrypto is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . OCrypto i...
null
https://raw.githubusercontent.com/tobast/OCrypto/fa3dded3cedf160a8d290cc6edd4d9cc543497c7/rc4_bitv.mli
ocaml
This file is part of OCrypto . OCrypto is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . OCrypto i...
bba64dab255dd9c40df6e3b8922f42bec9b9dc40ecbbc74b925d4c3be3df1508
Frama-C/Frama-C-snapshot
wpRTE.ml
(**************************************************************************) (* *) This file is part of WP plug - in of Frama - C. (* *) Copyrigh...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/wp/wpRTE.ml
ocaml
************************************************************************ alternatives) ...
This file is part of WP plug - in of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat a l'energie atomique et aux energies Lesser General Public License as published by the Free Software Foundation ,...
14443f14462b5373aae1b00f977657bac525b836f206edddb9120f9b1d35a500
incoherentsoftware/defect-process
HealthItemPickup.hs
module Level.Room.Item.Pickup.All.HealthItemPickup ( mkHealthItemPickup ) where import qualified Data.Text as T import AppEnv import Configs import Configs.All.Level import Level.Room.Item import Level.Room.Item.Pickup import Level.Room.Types import Msg import Stats.Manager import Util import World.Util heal...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/15f2569e7d0e481c2e28c0ca3a5e72d2c049b667/src/Level/Room/Item/Pickup/All/HealthItemPickup.hs
haskell
module Level.Room.Item.Pickup.All.HealthItemPickup ( mkHealthItemPickup ) where import qualified Data.Text as T import AppEnv import Configs import Configs.All.Level import Level.Room.Item import Level.Room.Item.Pickup import Level.Room.Types import Msg import Stats.Manager import Util import World.Util heal...
b2306e695ba54c5ef7450c069ca3622c24e36d0411f85af87f3bbe5af685fc69
input-output-hk/rscoin-core
Primitives.hs
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # # LANGUAGE TemplateHaskell # -- | The most basic primitives from the paper. module RSCoin.Core.Primitives ( Color (..) , CoinAmount (..) , Coin (..) , Address (..) , AddrId , Transaction (..) , Transacti...
null
https://raw.githubusercontent.com/input-output-hk/rscoin-core/5b3fde8de1bdce71ee6ea0e8f1582ea28f451171/src/RSCoin/Core/Primitives.hs
haskell
| The most basic primitives from the paper. Purple is for multisignature address allocation. | Coin is the unit of currency. It has amount and color. In fact, it's colored coin. | Address can serve as input or output to transactions. It is simply a public key. Basically, it is tuple of transaction identifier, in...
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # # LANGUAGE TemplateHaskell # module RSCoin.Core.Primitives ( Color (..) , CoinAmount (..) , Coin (..) , Address (..) , AddrId , Transaction (..) , TransactionId , grey ) where import ...
3c1752296e4d38431b03dc98a2a9a54d4273193f4eadd800f643a79d69df7da2
mikelevins/categories
load-r6rs.scm
;;;; *********************************************************************** ;;;; FILE IDENTIFICATION ;;;; ;;;; Name: load-r6rs.scm ;;;; Project: Categories ;;;; Purpose: load portable r6rs Categories ;;;; Author: mikel evins Copyright : Copyright 2009 by mikel evins , all rights rese...
null
https://raw.githubusercontent.com/mikelevins/categories/66e3861071e4d88b7b27421a78ab497e1fb5fa0c/0.2.1/scm/load-r6rs.scm
scheme
*********************************************************************** FILE IDENTIFICATION Name: load-r6rs.scm Project: Categories Purpose: load portable r6rs Categories Author: mikel evins See the accompanying file "License" for more information *******************...
Copyright : Copyright 2009 by mikel evins , all rights reserved License : Licensed under the Apache License , version 2.0 (import (categories))
02eb1c0df29f03a8d2cc1088b810c53f3fcd1550d9bf8ddc0ade1c25c31a4509
JacquesCarette/Drasil
Classes.hs
-- | Defining all the classes which represent knowledge-about-theories. module Theory.Drasil.Classes ( -- the classes HasInputs(..) , HasOutput(..) ) where import Language.Drasil import Control.Lens (Lens') -- | Members of this class may have inputs. class HasInputs c where -- | Provides a 'Lens' that ho...
null
https://raw.githubusercontent.com/JacquesCarette/Drasil/92dddf7a545ba5029f99ad5c5eddcd8dad56a2d8/code/drasil-theory/lib/Theory/Drasil/Classes.hs
haskell
| Defining all the classes which represent knowledge-about-theories. the classes | Members of this class may have inputs. | Provides a 'Lens' that holds a 'QuantityDict' and maybe constraints. | Members of this class may have outputs. | Provides a 'Lens' that holds a 'QuantityDict' for output. | Provides a 'Lens...
module Theory.Drasil.Classes ( HasInputs(..) , HasOutput(..) ) where import Language.Drasil import Control.Lens (Lens') class HasInputs c where inputs :: Lens' c [(QuantityDict, Maybe (RealInterval Expr Expr))] class HasOutput c where output :: Lens' c QuantityDict out_constraints :: Lens' c [RealInte...
a8b1ee316ef5d5519ee52bc7f5b1297dae0cfeea0bdc4eaaad80e92e0c52ab20
ichko/fmi-fp-2020-21
class.hs
import Control.Monad (forM, forM_, forever, when) main' :: IO () main' = do a <- getLine b <- getLine print [a, b] main'' :: IO () main'' = do res <- sequence [getLine, getLine] print res mainMap :: IO () mainMap = do mapM_ print [1, 2, 3] mainFor :: IO () mainFor = do forM_ [1, 2, 3] $ \i -> do p...
null
https://raw.githubusercontent.com/ichko/fmi-fp-2020-21/83dea8db7666e7a8a372d82301d71c79d5b798ff/week-07/class.hs
haskell
forever
import Control.Monad (forM, forM_, forever, when) main' :: IO () main' = do a <- getLine b <- getLine print [a, b] main'' :: IO () main'' = do res <- sequence [getLine, getLine] print res mainMap :: IO () mainMap = do mapM_ print [1, 2, 3] mainFor :: IO () mainFor = do forM_ [1, 2, 3] $ \i -> do p...
f17518122a462a65d35a228aa1db046a69bb2e98b324ccbbc4044744930327d6
binghe/cl-net-snmp
server-base.lisp
;;;; -*- Mode: Lisp -*- $ Id$ (in-package :snmp) (defun clean-default-dispatch () (clrhash *default-dispatch-table*) (clrhash *default-walk-table*) (setf *default-walk-list* (list nil))) (defun register-variable (oid function &key (dispatch-table *default-dispatch-table*) ...
null
https://raw.githubusercontent.com/binghe/cl-net-snmp/3cf053bce75734097f0d7e2245a53fa0c45f5e05/server-base.lisp
lisp
-*- Mode: Lisp -*- register process function into dispatch-table if current node should be in head of walk-list, just push it append current one to the last find the right node in walk-list and insert after it make a new node and insert into middle
$ Id$ (in-package :snmp) (defun clean-default-dispatch () (clrhash *default-dispatch-table*) (clrhash *default-walk-table*) (setf *default-walk-list* (list nil))) (defun register-variable (oid function &key (dispatch-table *default-dispatch-table*) ...
eab1de828e507946b4a398e47062dd9612b3aa7c36f932c2a32b5ca05a97ea65
clojurebook/ClojureProgramming
event_handling.clj
(ns salesorg.event-handling (use [eventing.processing :only (process-event)])) (defmethod process-event 'sales/purchase [evt] (println (format "We made a sale of %s to %s!" (:products evt) (:username evt)))) (defmethod process-event 'sales/lead-generation [evt] (println "Add prospect to CRM system: " evt)) ...
null
https://raw.githubusercontent.com/clojurebook/ClojureProgramming/bcc7c58862982a5793e22788fc11a9ed7ffc548f/ch15-couchdb/src/salesorg/event_handling.clj
clojure
(ns salesorg.event-handling (use [eventing.processing :only (process-event)])) (defmethod process-event 'sales/purchase [evt] (println (format "We made a sale of %s to %s!" (:products evt) (:username evt)))) (defmethod process-event 'sales/lead-generation [evt] (println "Add prospect to CRM system: " evt)) ...
31c3d1d1110124ec4251c463a03bc484ab05019699df917947da0a636d394c62
alexandroid000/improv
Parser.hs
module Parser where import RobotSpec import Improv import Data.Map (Map) import qualified Data.Map as Map import Ros.Geometry_msgs.Twist import Ros.Topic (Topic) import Text.ParserCombinators.Parsec import Control.Monad.State.Lazy as S import qualified Data.List.Split as Split import Data.List import Debug.Trace typ...
null
https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/src/Parser.hs
haskell
line # (-1 for parsec errors) and error string motion primitives ------------------------------------------------------------------------------------------- VERY BASIC MULTIFUNC adds rest at beginning of dance to allow time for ROS to initialize Handling parsec error Empty line Variable assignment Single command ...
module Parser where import RobotSpec import Improv import Data.Map (Map) import qualified Data.Map as Map import Ros.Geometry_msgs.Twist import Ros.Topic (Topic) import Text.ParserCombinators.Parsec import Control.Monad.State.Lazy as S import qualified Data.List.Split as Split import Data.List import Debug.Trace typ...
4ea7a99f705c7d1d539a70a502664c2845b96c8bcf94aaacf06d44df63af31ab
TGOlson/blockchain
Blockchain.hs
module Data.Blockchain.Types.Blockchain ( Validated , Unvalidated , Blockchain , blockchainConfig , blockchainNode , BlockchainNode(..) , ValidationException(..) , BlockException(..) -- * Construction , construct , validate , unvalidate , addBlock -- * Validation ...
null
https://raw.githubusercontent.com/TGOlson/blockchain/da53ad888589b5a2f3fd2c53c33a399fefb48ab1/lib/Data/Blockchain/Types/Blockchain.hs
haskell
* Construction * Validation * Chain inspection Types ---------------------------------------------------------------------------------------------------- | Core blockchain data type. Uses a validation tag to declare if it is known to abide by expected blockchain rules. Will be either @'Blockchain' 'Validated'@ or...
module Data.Blockchain.Types.Blockchain ( Validated , Unvalidated , Blockchain , blockchainConfig , blockchainNode , BlockchainNode(..) , ValidationException(..) , BlockException(..) , construct , validate , unvalidate , addBlock , validateTransaction , validateTr...
03e96ac63db4bc4e7d00eca0ed27088f6adaf6261f2cc8bb201a679b5cc45f03
letmaik/monadiccp
GeneratorInfo.hs
module Control.Search.GeneratorInfo where import Control.Search.Language type TreeState = Value type EvalState = Value space i = baseTstate i @-> "space" data Info = Info { baseTstate :: TreeState , path :: TreeState -> TreeState , abort_ :: [Statement -> Statement]...
null
https://raw.githubusercontent.com/letmaik/monadiccp/fe4498e46a7b9d9e387fd5e4ed5d0749a89d0188/src/Control/Search/GeneratorInfo.hs
haskell
VHook ("/* " ++ show (estate_type i) ++ " */ null")
module Control.Search.GeneratorInfo where import Control.Search.Language type TreeState = Value type EvalState = Value space i = baseTstate i @-> "space" data Info = Info { baseTstate :: TreeState , path :: TreeState -> TreeState , abort_ :: [Statement -> Statement]...
f8eee07e9a25ddd890bbd456b1aa83a8194949fd77cc4cc5670882e0aecd3e40
TrustInSoft/tis-kernel
history.mli
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/gui/history.mli
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 This file is part of Frama - C. Copyright ( C ) 2007 - 2015 ...
ad61974044182ce050e40e2ef84156b882a39915fdfd62837b161709fde1facd
scalar-labs/scalar-jepsen
runner.clj
(ns scalardl.runner (:gen-class) (:require [clojure.string :as cstr] [cassandra [nemesis :as can] [runner :as car]] [jepsen [core :as jepsen] [cli :as cli]] [scalardl [nemesis :as nemesis] [cas] ...
null
https://raw.githubusercontent.com/scalar-labs/scalar-jepsen/66b08cccad256241e09ac4140a58e2d1574df517/scalardl/src/scalardl/runner.clj
clojure
(ns scalardl.runner (:gen-class) (:require [clojure.string :as cstr] [cassandra [nemesis :as can] [runner :as car]] [jepsen [core :as jepsen] [cli :as cli]] [scalardl [nemesis :as nemesis] [cas] ...
a12e398d6b91e909fc71fd58f3697ccdca76678d50e7c5297c4cdd1d4e163dde
mirage/ocaml-dns-forward
dns_forward_framing.mli
* Copyright ( C ) 2016 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
null
https://raw.githubusercontent.com/mirage/ocaml-dns-forward/1b253cbf0e1c15b80facbb13ced762a0dfa99bdf/lib/dns_forward_framing.mli
ocaml
* Copyright ( C ) 2016 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
0474eba4eecea1aa4c39d565bbb01ee2a2bdda4bcf999ce77a2a103799bb1223
CloudI/CloudI
hackney_local_tcp.erl
%%% -*- erlang -*- %%% This file is part of hackney released under the Apache 2 license . %%% See the NOTICE for more information. %%% Copyright ( c ) 2011 - 2012 , < > %%% -module(hackney_local_tcp). -export([messages/1, connect/3, connect/4, recv/2, recv/3, send/2, setopts/2, controlling_process/2, ...
null
https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_hackney/src/hackney_local_tcp.erl
erlang
-*- erlang -*- See the NOTICE for more information. @doc Atoms used to identify messages in {active, once | true} mode. connect @doc Receive a packet from a socket in passive mode. @see gen_tcp:recv/3 @doc Send a packet on a socket. @see gen_tcp:send/2 @see inet:setopts/2 @doc Assign a new controlling proc...
This file is part of hackney released under the Apache 2 license . Copyright ( c ) 2011 - 2012 , < > -module(hackney_local_tcp). -export([messages/1, connect/3, connect/4, recv/2, recv/3, send/2, setopts/2, controlling_process/2, peername/1, close/1, shutdown/2, sockname/1]). messages(_) -> {t...
ffa0b07afde261009f4183d446142efe523f756668d289dab28fc21c0f470e45
ndaniels/MRFy
PsiPred.hs
module PsiPred ( parsePsiPred , checkPreds , SSPrediction(..) , PsiPred(..) ) where import ParsecHelper import Constants import Text.ParserCombinators.Parsec hiding (many, optional, (<|>)) import Text.ParserCombinators.Parsec.Char import Text.Parsec.String import Control.Applicative import Numeric import ...
null
https://raw.githubusercontent.com/ndaniels/MRFy/9b522d991a9bf98a6690f791dc92ad6fe675115c/PsiPred.hs
haskell
this should pull out of Either
module PsiPred ( parsePsiPred , checkPreds , SSPrediction(..) , PsiPred(..) ) where import ParsecHelper import Constants import Text.ParserCombinators.Parsec hiding (many, optional, (<|>)) import Text.ParserCombinators.Parsec.Char import Text.Parsec.String import Control.Applicative import Numeric import ...
4ee5757481f6e7a3d3b019dbabeb56a8c7577b927eece2348ccc0a2641a4b006
the-dr-lazy/cascade
Api.hs
| Module : Cascade . Api . Network . TestClient . Api Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! ! Copyright : ( c ) 2020 - 2021 Cascade License : MPL 2.0 Maintainer : < > ( the-dr-lazy.github.io ) Stability : Stable Portability : POSIX ! ! ! INSERT MODULE LONG DESCRI...
null
https://raw.githubusercontent.com/the-dr-lazy/cascade/014a5589a2763ce373e8c84a211cddc479872b44/cascade-api/test/Cascade/Api/Network/TestClient/Api.hs
haskell
| Module : Cascade . Api . Network . TestClient . Api Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! ! Copyright : ( c ) 2020 - 2021 Cascade License : MPL 2.0 Maintainer : < > ( the-dr-lazy.github.io ) Stability : Stable Portability : POSIX ! ! ! INSERT MODULE LONG DESCRI...
1ff96815169613753675538e9fa0a70776d3b5dcbfc0a74c52b25e35815f9156
patoline/patoline
unicode_scripts.ml
Copyright Florian Hatat , , , Pierre - Etienne Meunier , , 2012 . This file is part of Patoline . Patoline 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 th...
null
https://raw.githubusercontent.com/patoline/patoline/3dcd41fdff64895d795d4a78baa27d572b161081/editors/emacs/unicode_scripts.ml
ocaml
Copyright Florian Hatat , , , Pierre - Etienne Meunier , , 2012 . This file is part of Patoline . Patoline 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 th...
c55f8bbae60ce47106bdafdd15c1e38f112f5e96c97445f2d97e9f16bf9d76ea
byorgey/AoC
06.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE LambdaCase #-} # LANGUAGE TemplateHaskell # import Control.Applicative import Control.Arrow import Control.Lens import Control.Monad.State import Control.Monad.Writer import Data.Bits import Data.By...
null
https://raw.githubusercontent.com/byorgey/AoC/30eb51eb41af9ca86b05de598a3a96d25bd428e3/2017/06/06.hs
haskell
# LANGUAGE LambdaCase # ----------------------------------------------------------
# LANGUAGE FlexibleContexts # # LANGUAGE TemplateHaskell # import Control.Applicative import Control.Arrow import Control.Lens import Control.Monad.State import Control.Monad.Writer import Data.Bits import Data.ByteString.Char8 (pack, unpack) imp...
1f6f10243a69792637b8eedec7c8e5b21b6f9900da7d10010a4d8bc987388ec6
bsaleil/lc
array1.scm.scm
;;------------------------------------------------------------------------------ Macros (##define-macro (def-macro form . body) `(##define-macro ,form (let () ,@body))) (def-macro (FLOATvector-const . lst) `',(list->f64vector lst)) (def-macro (FLOATvector? x) `(f64vector? ,x)) (def-macro (FLOATvector...
null
https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/tools/benchtimes/resultVMIL-lc-gsc-lc/LC5f64/array1.scm.scm
scheme
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Gabriel benchmarks C benchmarks Other benchmarks
Macros (##define-macro (def-macro form . body) `(##define-macro ,form (let () ,@body))) (def-macro (FLOATvector-const . lst) `',(list->f64vector lst)) (def-macro (FLOATvector? x) `(f64vector? ,x)) (def-macro (FLOATvector . lst) `(f64vector ,@lst)) (def-macro (FLOATmake-vector n . init) `(make...
58705bb8fc5392cc06b3a41af162455148a8bf4a5b43c03d37690640da473280
foreverbell/project-euler-solutions
27.hs
import Data.Foldable (maximumBy) import Data.Function (on) import Common.Numbers.Primes (testPrime) import Common.List (maximumBy') produceLength (a, b) = length $ takeWhile (testPrime . (\n -> n^2+a*n+b)) [0 .. ] main = print $ uncurry (*) result where result = maximumBy' (compare `on` produceLength) $ [ (a,b) |...
null
https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/27.hs
haskell
import Data.Foldable (maximumBy) import Data.Function (on) import Common.Numbers.Primes (testPrime) import Common.List (maximumBy') produceLength (a, b) = length $ takeWhile (testPrime . (\n -> n^2+a*n+b)) [0 .. ] main = print $ uncurry (*) result where result = maximumBy' (compare `on` produceLength) $ [ (a,b) |...
52f2898946c015ec8d7dccc850443c47360f3b14df14dac855ad21198abfa21d
metabase/metabase
follow_up_emails_test.clj
(ns ^:mb/once metabase.task.follow-up-emails-test (:require [clojure.test :refer :all] [metabase.email-test :refer [inbox with-fake-inbox]] [metabase.task.follow-up-emails :as follow-up-emails] [metabase.test.fixtures :as fixtures] [metabase.test.util :as tu])) (use-fixtures :once (fixtures/initialize...
null
https://raw.githubusercontent.com/metabase/metabase/c659e767d1371db8820dc867f3538edcd694265a/test/metabase/task/follow_up_emails_test.clj
clojure
(ns ^:mb/once metabase.task.follow-up-emails-test (:require [clojure.test :refer :all] [metabase.email-test :refer [inbox with-fake-inbox]] [metabase.task.follow-up-emails :as follow-up-emails] [metabase.test.fixtures :as fixtures] [metabase.test.util :as tu])) (use-fixtures :once (fixtures/initialize...
1794f6cd54704186f80088d684ec4845552af89f9a43c3d5b56b58c12f39b1fb
deadpendency/deadpendency
Internal.hs
# LANGUAGE DataKinds # module DF.Effect.FetchRegistryRepoInfo.Backend.LanguageRegistryFiles.Internal ( fetchJSON, fetchJSON', fetchUrl, fetchUrl', fetchUrlRetry404, fetchJSONRetry404, getLatestReleaseKey, selectFinalRepo, stripVPrefix, ) where import Common.Model.Git.QualifiedRepo ...
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/dependency-fetcher/src/DF/Effect/FetchRegistryRepoInfo/Backend/LanguageRegistryFiles/Internal.hs
haskell
# LANGUAGE DataKinds # module DF.Effect.FetchRegistryRepoInfo.Backend.LanguageRegistryFiles.Internal ( fetchJSON, fetchJSON', fetchUrl, fetchUrl', fetchUrlRetry404, fetchJSONRetry404, getLatestReleaseKey, selectFinalRepo, stripVPrefix, ) where import Common.Model.Git.QualifiedRepo ...
9d93123748c3c874d48921855bb8838ab6757ec0afd12bfa01424ea4c631be31
moby/datakit
datakit_github.mli
* Main object types used by the GitHub bridge . (** {1 Printable Sets} *) * Pretty - printable { ! Set . OrderedType } . module type ELT = sig include Set.OrderedType val pp : t Fmt.t end (** Pretty-printable {!Set.S}. *) module type SET = sig include Asetmap.Set.S val pp : t Fmt.t end (** Pretty-printabl...
null
https://raw.githubusercontent.com/moby/datakit/e047e55a2dfa3aaec02398d7d7699f4f7afd2b47/src/datakit-github/datakit_github.mli
ocaml
* {1 Printable Sets} * Pretty-printable {!Set.S}. * Pretty-printable {!Map.S}. * [Set] is similar to {!Set.Make} but for pretty-printable sets. * The type for status states. * [pp] is the pretty-printer for status states. * [to_string v] is the string represenation of [v]. * [of_string s] is the value v such tha...
* Main object types used by the GitHub bridge . * Pretty - printable { ! Set . OrderedType } . module type ELT = sig include Set.OrderedType val pp : t Fmt.t end module type SET = sig include Asetmap.Set.S val pp : t Fmt.t end module type MAP = sig include Asetmap.Map.S val pp : 'a Fmt.t -> 'a t Fmt....
cab03893d56589d8b1fcbfc1d8c3ec4dc65a0a6a79fffa7b4a19f2db2da64534
hexlet-codebattle/battle_asserts
squares_and_cubes.clj
(ns battle-asserts.issues.squares-and-cubes (:require [clojure.test.check.generators :as gen])) (def level :elementary) (def tags ["math"]) (def description {:en "Create a function that takes two numbers and checks if the square root of the first number is equal to the cube root of the second number." ...
null
https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/654200475b9c84ee8e0a77649e714956480ec5c8/src/battle_asserts/issues/squares_and_cubes.clj
clojure
(ns battle-asserts.issues.squares-and-cubes (:require [clojure.test.check.generators :as gen])) (def level :elementary) (def tags ["math"]) (def description {:en "Create a function that takes two numbers and checks if the square root of the first number is equal to the cube root of the second number." ...
7212619eabc3ba343a23fab833a320238730193b928c0045ecb4b8583fff49dd
udem-dlteam/ribbit
30-cadddr.scm
(putchar (cadddr (cons 65 (cons 66 (cons 67 (cons 68 69)))))) (putchar 10) ;;;options: -l min ;;;expected: ;;;D
null
https://raw.githubusercontent.com/udem-dlteam/ribbit/3e88b58706dba9eac2bbb841f947b4cd9c47d6ec/src/tests/30-cadddr.scm
scheme
options: -l min expected: D
(putchar (cadddr (cons 65 (cons 66 (cons 67 (cons 68 69)))))) (putchar 10)
6262dcdc6a5ce72d47f9f88e603a8e833966602b62cbfc771f454aa60937a3b5
JoelSanchez/ventas
description_test.clj
(ns ventas.server.api.description-test (:require [clojure.test :refer [deftest is testing use-fixtures]] [spec-tools.data-spec :as data-spec] [ventas.database.entity :as entity] [ventas.server.api :as api] [ventas.server.pagination :as pagination] [ventas.server.ws :as server.ws] [ventas.test-too...
null
https://raw.githubusercontent.com/JoelSanchez/ventas/dc8fc8ff9f63dfc8558ecdaacfc4983903b8e9a1/test/clj/ventas/server/api/description_test.clj
clojure
(ns ventas.server.api.description-test (:require [clojure.test :refer [deftest is testing use-fixtures]] [spec-tools.data-spec :as data-spec] [ventas.database.entity :as entity] [ventas.server.api :as api] [ventas.server.pagination :as pagination] [ventas.server.ws :as server.ws] [ventas.test-too...
f2135872c593cbfa25f4635d4aeedba45ca2f42d459094e449d6fea23d1c60f1
gfZeng/time.clj
chime.cljc
(ns time.chime (:require [time.core :as t] #?(:cljs [cljs.core.async :as a :refer [timeout chan]] :clj [clojure.core.async :as a :refer [timeout chan]]))) (defn chime-ch* [periods ch] (if-let [p (first periods)] (a/take! (timeout (- (.getTime p) (t/now-ms))) (fn [_]...
null
https://raw.githubusercontent.com/gfZeng/time.clj/874bb2c7a1b4debc07818f4a25e241f8cfa8c5f8/src/time/chime.cljc
clojure
(ns time.chime (:require [time.core :as t] #?(:cljs [cljs.core.async :as a :refer [timeout chan]] :clj [clojure.core.async :as a :refer [timeout chan]]))) (defn chime-ch* [periods ch] (if-let [p (first periods)] (a/take! (timeout (- (.getTime p) (t/now-ms))) (fn [_]...
748496253ea71a62f5b3945f0ee2edb1f6199c3fa5a8a8d497e722c63ea0e87f
clojure/data.zip
xml.clj
Copyright ( c ) , April 2008 . 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 agreeing to be bound b...
null
https://raw.githubusercontent.com/clojure/data.zip/552be2917f51f18f3c5fe72a6bb1344a6262ec5c/src/main/clojure/clojure/data/zip/xml.clj
clojure
The use and distribution terms for this software are covered by the 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. Spe...
Copyright ( c ) , April 2008 . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) (ns clojure.data.zip.xml (:require [clojure.string :as string] [clojure.data.zip :as zf] [clojure.zip :as zip])) (declare xml->) (defn attr "Returns the xml attribute named attrname, of the ...
8c20f3b96373a2c551ebc9d78b191faed1a95c5eaa8c6d53de2e8703442cf45d
ktakashi/sagittarius-scheme
primality_test.scm
(test-prime "primality_test" '(#(1 "small non prime integer" 255 #f ()) #(2 "small non prime integer" 0 #f ()) #(3 "small non prime integer" 1 #f ()) #(4 "Non-prime Mersenne number that is pseudoprime to base 2" 147573952589676412927 #f ()) #(5 "Non-prime Mersenne numbe...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/e1f6d39aeefd556b1ca7f23da812ffd8f3d2d1c0/ext/crypto/tests/testvectors/prime/primality_test.scm
scheme
(test-prime "primality_test" '(#(1 "small non prime integer" 255 #f ()) #(2 "small non prime integer" 0 #f ()) #(3 "small non prime integer" 1 #f ()) #(4 "Non-prime Mersenne number that is pseudoprime to base 2" 147573952589676412927 #f ()) #(5 "Non-prime Mersenne numbe...
637e73f942684f76e3b53ad357cd6a788948cd3941f026bd98b5e51fa0fc4b29
artyom-poptsov/guile-smc
context.scm
(define-module (context) #:use-module (ice-9 textual-ports)) (define-public (guard:non-space? ctx ch) (not (char=? ch #\space))) (define-public (action:end ctx ch) (list->string (reverse ctx))) (define-public (action:cons ctx ch) (cons ch ctx)) (define-public (custom-event-source context) (get-char (curre...
null
https://raw.githubusercontent.com/artyom-poptsov/guile-smc/004aa372087877b74ae21aada8723b0c07cc6210/examples/compiler/context.scm
scheme
(define-module (context) #:use-module (ice-9 textual-ports)) (define-public (guard:non-space? ctx ch) (not (char=? ch #\space))) (define-public (action:end ctx ch) (list->string (reverse ctx))) (define-public (action:cons ctx ch) (cons ch ctx)) (define-public (custom-event-source context) (get-char (curre...