_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
4eb834dbb37c69099f8e4fa7b33542f3e1b65d391da8e93354eaac608064d168
nuvla/api-server
credential_template_infrastructure_service_kubernetes.clj
(ns sixsq.nuvla.server.resources.credential-template-infrastructure-service-kubernetes " This credential-template creates a credential for a Kubernetes service. These credentials include a certificate authority's public certificate ('ca'), the user's public certificate ('cert'), and the user's private key ('key'). " ...
null
https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/src/sixsq/nuvla/server/resources/credential_template_infrastructure_service_kubernetes.clj
clojure
No reasonable defaults for :parent, :ca, :cert, :key. Do not provide values for those in the template multimethods for validation initialization: register this credential-template
(ns sixsq.nuvla.server.resources.credential-template-infrastructure-service-kubernetes " This credential-template creates a credential for a Kubernetes service. These credentials include a certificate authority's public certificate ('ca'), the user's public certificate ('cert'), and the user's private key ('key'). " ...
f0b3fa131745719727f5ef351e1a4f5a2254234621b20d721a3f460f4c5b3c1a
DaMSL/K3
SQL.hs
{-# LANGUAGE DoAndIfThenElse #-} # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE TupleSections # # LANGUAGE ViewPatterns # -- TODO: 3 . chain simplification 5 . expression case completion 6 . pushdown in subqueries 7 . subqueries in gbs , prjs , aggs 8 . correlated subqueries , and query de...
null
https://raw.githubusercontent.com/DaMSL/K3/51749157844e76ae79dba619116fc5ad9d685643/src/Language/K3/Parser/SQL.hs
haskell
# LANGUAGE DoAndIfThenElse # TODO: x. more groupByPushdown, subquery and distributed plan testing | Relation names and types. | Attribute dependency graph. | Scope frames are mappings of name paths (qualified or unqualified) to attributes. | Scope environments store bindings throughout a query's subexpressions. ...
# LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE TupleSections # # LANGUAGE ViewPatterns # 3 . chain simplification 5 . expression case completion 6 . pushdown in subqueries 7 . subqueries in gbs , prjs , aggs 8 . correlated subqueries , and query decorrelation module Language.K3.Parser.SQL...
34c668e981e3ae5fe914409a8461d672856b10e2c29da77fc3d02707bc169bb7
raviksharma/bartosz-basics-of-haskell
trace.hs
Ex 2 . Define a monad instance for Trace ( no need to override fail ) . The idea is to create a trace of execution by sprinkling you code with calls to put . The result of executing this code should look something like this : -- -- ["fact 3","fact 2","fact 1","fact 0"] 6 Hint : List concatenation is done using + ...
null
https://raw.githubusercontent.com/raviksharma/bartosz-basics-of-haskell/86d40d831f61415ef0022bff7fe7060ae6a23701/10-error-handling/trace.hs
haskell
["fact 3","fact 2","fact 1","fact 0"]
Ex 2 . Define a monad instance for Trace ( no need to override fail ) . The idea is to create a trace of execution by sprinkling you code with calls to put . The result of executing this code should look something like this : 6 Hint : List concatenation is done using + + ( we 've seen it used for string concatena...
d4875e90bab521ec63499378715fb0129e01aad79ec896d9aadb0a1e86f2f5a4
exoscale/clojure-kubernetes-client
v1_subject_access_review_status.clj
(ns clojure-kubernetes-client.specs.v1-subject-access-review-status (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] ) (:import (java.io File))) (declare v1-subject-access-review-status-data v1-subject-access-review-status) (def v1-subject-access-review-status-data { ...
null
https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_subject_access_review_status.clj
clojure
(ns clojure-kubernetes-client.specs.v1-subject-access-review-status (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] ) (:import (java.io File))) (declare v1-subject-access-review-status-data v1-subject-access-review-status) (def v1-subject-access-review-status-data { ...
456354bb4627b97c76c0743f4dbbe0f9526efaab0e1578251c24443d7ea69199
rescript-lang/rescript-compiler
matching.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/rescript-lang/rescript-compiler/5da6c88fb9237fbc4d61640187b82627690ccf39/jscomp/ml/matching.ml
ocaml
************************************************************************ OCaml ...
, 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 Types open Typedtree open Lambda open Parmatch open Printf let dbg = fals...
540183582ffb3145dafe5b58e3df9ad3af0f7e39ecd8ee3638d5d32cfdf4fa73
fetburner/Coq2SML
bigint.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/lib/bigint.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Arbitrary large integer numbers *...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * type bigint val of_string :...
57f9b90206f747a03531b32e6b1eaffd587e8567dfb0de767bc2a611fc29f720
fluree/ledger
test_helpers.clj
(ns fluree.db.test-helpers (:require [clojure.test :refer :all] [clojure.core.async :as async :refer [<!!]] [fluree.db.server :as server] [fluree.db.api :as fdb] [fluree.db.server-settings :as setting] [fluree.db.util.log :as log] [clojure.java.i...
null
https://raw.githubusercontent.com/fluree/ledger/af93dd2f0261cabed58fadedbe215e828d38cb44/test/fluree/db/test_helpers.clj
clojure
seeing some intermittent failures to initialize sometimes so this starts outputting some diagnostic messages once if we figure out what 's wrong, can remove the (when ...) form below and the (do ...) wrapper check for any immediate errors (like invalid names) in create requests Sometimes even when this node is t...
(ns fluree.db.test-helpers (:require [clojure.test :refer :all] [clojure.core.async :as async :refer [<!!]] [fluree.db.server :as server] [fluree.db.api :as fdb] [fluree.db.server-settings :as setting] [fluree.db.util.log :as log] [clojure.java.i...
e87e659c8aef844a6fd66f4786baeba44c2e090baa92e24ffc8dcbfa832fe38f
kaznum/programming_in_ocaml_exercise
comb.ml
let rec comb (n, m) = if m = 0 || m = n then 1 else comb(n - 1, m) + comb(n - 1, m - 1);;
null
https://raw.githubusercontent.com/kaznum/programming_in_ocaml_exercise/6f6a5d62a7a87a1c93561db88f08ae4e445b7d4e/ex3.11/comb.ml
ocaml
let rec comb (n, m) = if m = 0 || m = n then 1 else comb(n - 1, m) + comb(n - 1, m - 1);;
f0a5dec0040ba600a8aff1d88d6dfa6629085012e7b395c52a230eea6a39033a
lpgauth/foil
foil_bench.erl
-module(foil_bench). -export([ run/0 ]). -define(B, 1000). % batch size -define(C, 2048). % concurrency -define(N, 2048). % iterations -define(T, [ {atom, test}, {binary, <<0:1024>>}, {complex, {test, [<<"test">>, "test"]}}, {list, "test"}, {tuple, {test, test2}} ]). %% public -spec run() -> ...
null
https://raw.githubusercontent.com/lpgauth/foil/e462829855a745d8f20fb0508ae3eb8e323b03bd/test/foil_bench.erl
erlang
batch size concurrency iterations public private
-module(foil_bench). -export([ run/0 ]). -define(T, [ {atom, test}, {binary, <<0:1024>>}, {complex, {test, [<<"test">>, "test"]}}, {list, "test"}, {tuple, {test, test2}} ]). -spec run() -> ok. run() -> error_logger:tty(false), foil_app:start(), io:format("~23s ~6s ~6s ~6s~n",...
3c443843b60b492a2e174bba1db9b90992cb8a98886207a9639b2bbad2264d35
vascokk/rivus_cep
basho_bench_driver_rivus.erl
-module(basho_bench_driver_rivus). -compile([{parse_transform, lager_transform}]). -export([new/1, run/4]). -include("basho_bench.hrl"). -record(state, { host, port, socket, client_num }). new(Id) -> {Host, Port, Socket} = connect(), deploy_queries(Socket, Id), {ok, #state{ host...
null
https://raw.githubusercontent.com/vascokk/rivus_cep/e9fe6ed79201d852065f7fb2a24a880414031d27/priv/basho_bench_driver_rivus.erl
erlang
new(_Id) -> {Host, Port, Socket} = connect(), {ok, #state{ host = Host, port = Port, socket = Socket}}. Send message
-module(basho_bench_driver_rivus). -compile([{parse_transform, lager_transform}]). -export([new/1, run/4]). -include("basho_bench.hrl"). -record(state, { host, port, socket, client_num }). new(Id) -> {Host, Port, Socket} = connect(), deploy_queries(Socket, Id), {ok, #state{ host...
734536ed465573f1dabb699d15e4b9b7060a95bc9329c575d74c75f8b19dd39f
typedclojure/typedclojure
pred.clj
(ns clojure.core.typed.test.pred (:require [clojure.test :refer :all] [clojure.core.typed :as t])) (def Number? (t/pred Number)) (t/defalias NumberAlias Number) (deftest class-pred-test (is (Number? 1)) (is (not (Number? nil)))) (deftest hmap-pred-test (is ((every-pred (t/pred ...
null
https://raw.githubusercontent.com/typedclojure/typedclojure/3aa381a764df3cc39dc0a312a1d9823eb6b7c564/typed/clj.checker/test/clojure/core/typed/test/pred.clj
clojure
only supports clojure collections
(ns clojure.core.typed.test.pred (:require [clojure.test :refer :all] [clojure.core.typed :as t])) (def Number? (t/pred Number)) (t/defalias NumberAlias Number) (deftest class-pred-test (is (Number? 1)) (is (not (Number? nil)))) (deftest hmap-pred-test (is ((every-pred (t/pred ...
ec4504097241d5654f4285813c10ec23d49680f3654288e83e55f5e78cd8136f
EwenG/replique
omniscient.clj
(ns replique.omniscient (:require [replique.utils :as utils] [replique.environment :as env] [replique.omniscient-runtime] [replique.elisp-printer :as elisp] [replique.meta] [replique.watch :as watch])) (def ^:private cljs-compiler-env (utils/dynaload 'repli...
null
https://raw.githubusercontent.com/EwenG/replique/45719ec95f463107f4c4ca79b7f83a7882b450cb/src/replique/omniscient.clj
clojure
clojure.core/*data-readers* clojure.core/*default-data-reader-fn* Prevent dynamic vars used by the REPL/system from beeing captured exclude dynamic vars that are used by the REPL/system exclude dynamic vars that are used by the REPL/system :repl-env may be nil when compiling files
(ns replique.omniscient (:require [replique.utils :as utils] [replique.environment :as env] [replique.omniscient-runtime] [replique.elisp-printer :as elisp] [replique.meta] [replique.watch :as watch])) (def ^:private cljs-compiler-env (utils/dynaload 'repli...
ab669a50822af429548133bceea5aadef50ebaa34cca9e2aa224e777c33c2cc2
hansroland/reflex-dom-inbits
dropdown01.hs
{-# LANGUAGE OverloadedStrings #-} import Reflex.Dom import qualified Data.Text as T import qualified Data.Map as Map import Data.Monoid((<>)) import Data.Maybe (fromJust) main :: IO () main = mainWidget bodyElement bodyElement :: MonadWidget t m => m () bodyElement = el "div" $ do el...
null
https://raw.githubusercontent.com/hansroland/reflex-dom-inbits/3bf4ccf43aa45c5df7d3ce42dae38955f657ca33/src/dropdown01.hs
haskell
# LANGUAGE OverloadedStrings #
import Reflex.Dom import qualified Data.Text as T import qualified Data.Map as Map import Data.Monoid((<>)) import Data.Maybe (fromJust) main :: IO () main = mainWidget bodyElement bodyElement :: MonadWidget t m => m () bodyElement = el "div" $ do el "h2" $ text "Dropdown" text "Sel...
ba92d62d5208944c0b3ddb43c9b6604a4200a831a0afc0bbb2f184d1553eb9cd
lsrcz/grisette
Mergeable.hs
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE DerivingVia # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE KindSignatures # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE QuantifiedConstraints # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedType...
null
https://raw.githubusercontent.com/lsrcz/grisette/1d2fab89acb160ee263a41741454a5825094bd33/src/Grisette/Core/Data/Class/Mergeable.hs
haskell
# LANGUAGE GADTs # # LANGUAGE RankNTypes # | License : BSD-3-Clause (see the LICENSE file) Maintainer : Stability : Experimental * Merging strategy * Combinators for manually building merging strategies # SOURCE # | Helper type for combining arbitrary number of indices into one. Useful when tryin...
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE DerivingVia # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE QuantifiedConstraints # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGU...
ea50f219f940d6a976fb2db2be9e8cf219163ffa2e6dd9f3b8e6c77879192fc3
docker-in-aws/docker-in-aws
list.cljs
(ns swarmpit.component.network.list (:require [material.component :as comp] [material.component.label :as label] [material.component.panel :as panel] [material.component.list-table :as list] [swarmpit.component.mixin :as mixin] [swarmpit.component.state :as ...
null
https://raw.githubusercontent.com/docker-in-aws/docker-in-aws/bfc7e82ac82ea158bfb03445da6aec167b1a14a3/ch16/swarmpit/src/cljs/swarmpit/component/network/list.cljs
clojure
(ns swarmpit.component.network.list (:require [material.component :as comp] [material.component.label :as label] [material.component.panel :as panel] [material.component.list-table :as list] [swarmpit.component.mixin :as mixin] [swarmpit.component.state :as ...
b40ef31b5d2179647dded05ad4b48edbc93640672eea666b1fb4a5fd9ea1024a
reborg/clojure-essential-reference
3.clj
< 1 > { \newline " \\n " \tab " \\t " \return " \\r " ;; \" "\\\"" ;; \\ "\\\\" ;; \formfeed "\\f" \backspace " \\b " } < 2 > (println s) ;; Type backslash-t ' ' followed by backslash-n ' ;; ' (println (s/escape s char-escape-string)) ; <3> ;; Type backslash-t '\t' followed by backslash-n '...
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/OtherFunctions/StringsandRegularExpressions/escape%2Cchar-name-string%2Cchar-escape-string/3.clj
clojure
\" "\\\"" \\ "\\\\" \formfeed "\\f" Type backslash-t ' ' followed by backslash-n ' ' <3> Type backslash-t '\t' followed by backslash-n '\n'
< 1 > { \newline " \\n " \tab " \\t " \return " \\r " \backspace " \\b " } < 2 > (println s)
f896bc60448961b5190f53c6db8a5e27f6fe042fd08b42a74ea28bb9039cfc68
tfausak/patrol
RuntimeContext.hs
module Patrol.Type.RuntimeContext where import qualified Data.Aeson as Aeson import qualified Data.Text as Text import qualified Patrol.Extra.Aeson as Aeson -- | <-payloads/types/#runtimecontext> data RuntimeContext = RuntimeContext { build :: Text.Text, name :: Text.Text, rawDescription :: Text.Text, v...
null
https://raw.githubusercontent.com/tfausak/patrol/1cae55b3840b328cda7de85ea424333fcab434cb/source/library/Patrol/Type/RuntimeContext.hs
haskell
| <-payloads/types/#runtimecontext>
module Patrol.Type.RuntimeContext where import qualified Data.Aeson as Aeson import qualified Data.Text as Text import qualified Patrol.Extra.Aeson as Aeson data RuntimeContext = RuntimeContext { build :: Text.Text, name :: Text.Text, rawDescription :: Text.Text, version :: Text.Text } deriving (Eq,...
d9ada2e0b839b51eb9b5ea79b5ea749acd2f4ab7cb190c0693e2fac9b5953151
hipsleek/hipsleek
shares_z3_lib.ml
#include "xdebug.cppo" open Share_prover module PrvComms = struct type proc = {name:string; pid: int; inchannel: in_channel; outchannel: out_channel; errchannel: in_channel } exception Timeout external set_close_on_exec : Unix.file_descr -> unit = "unix_set_close_on_exec";; let try_set_close_on_exec fd = tr...
null
https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/bef_indent/shares_z3_lib.ml
ocaml
same as maybe_raise_timoeut just that it treats the timeout exception with the with_timeout function closes the pipes of the named process to delete struct type nz_cons = t_var list list | C_top type eq_syst = (t_var*t_var*p_var) list let stringofTvar = Sv.string_of let mkTop () = C_top ...
#include "xdebug.cppo" open Share_prover module PrvComms = struct type proc = {name:string; pid: int; inchannel: in_channel; outchannel: out_channel; errchannel: in_channel } exception Timeout external set_close_on_exec : Unix.file_descr -> unit = "unix_set_close_on_exec";; let try_set_close_on_exec fd = tr...
a033a05b7ad875363969db6a26cb9af8c6722080686ca9eb5bc06113361800bd
eareese/htdp-exercises
140-all-true.rkt
#lang htdp/bsl Exercise 140 . Design the function all - true , which consumes a list of Boolean values and determines whether all of them are # true . In other words , if there is any # false on the list , the function produces # false . ; A List-of-booleans is one of: ; – '() ; – (cons Boolean List-of-booleans) ...
null
https://raw.githubusercontent.com/eareese/htdp-exercises/a85ff3111d459dda0e94d9b463d01a09accbf9bf/part02-arbitrarily-large-data/140-all-true.rkt
racket
A List-of-booleans is one of: – '() – (cons Boolean List-of-booleans) List-of-booleans -> Boolean determines whether all of the list items are true. If there is any #false on the list, the function produces #false. List-of-booleans -> Boolean
#lang htdp/bsl Exercise 140 . Design the function all - true , which consumes a list of Boolean values and determines whether all of them are # true . In other words , if there is any # false on the list , the function produces # false . (check-expect (all-true (cons #t '())) #t) (check-expect (all-true (cons #t ...
b4ec461ed5d7f937c300697d78732fcc76c30ae3460fe61fd4af2bed742ca5f0
e-bigmoon/haskell-blog
RequestInformation.hs
#!/usr/bin/env stack {- stack repl --resolver lts-15.4 --package text --package yesod -} # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} # LANGUAGE TypeFamilies # import Data.List (sortOn) im...
null
https://raw.githubusercontent.com/e-bigmoon/haskell-blog/5c9e7c25f31ea6856c5d333e8e991dbceab21c56/sample-code/yesod/ch13/RequestInformation.hs
haskell
stack repl --resolver lts-15.4 --package text --package yesod # LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell #
#!/usr/bin/env stack # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # # LANGUAGE TypeFamilies # import Data.List (sortOn) import Data.Text (Text) import Yesod data Person = Person { personName :: Text , personAge :: Int } people :: [Person] pe...
71121af594b68b89fc2410603cd4154c0331c18bdc0447131f2a8b41f6bf857f
bondy-io/bondy
bondy_jobs_worker.erl
%% ============================================================================= %% bondy_jobs_worker .erl - %% Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the Licens...
null
https://raw.githubusercontent.com/bondy-io/bondy/a1267e7e5526db24f278e12315020753f3168b44/apps/bondy/src/bondy_jobs_worker.erl
erlang
============================================================================= bondy_jobs_worker .erl - 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 ...
Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(bondy_jobs_worker). -behaviour(gen_server). -include("bondy.hrl"). -define(SERVER_NAME(Index), {?MO...
db5731c31e101b0f27e105651bf063831df6603544ec84ad56ad0450d016b873
lambdaisland/uniontypes
uniontypes_test.cljc
(ns lambdaisland.uniontypes-test (:require [clojure.spec.alpha :as s] [clojure.test :refer [deftest is testing]] [lambdaisland.uniontypes #?(:clj :refer :cljs :refer-macros) [case-of]] [lambdaisland.uniontypes.core :refer [case-of*]] ...
null
https://raw.githubusercontent.com/lambdaisland/uniontypes/d290ad10f9126c0336446d88675d9fa57dc4ca55/test/lambdaisland/uniontypes_test.cljc
clojure
(ns lambdaisland.uniontypes-test (:require [clojure.spec.alpha :as s] [clojure.test :refer [deftest is testing]] [lambdaisland.uniontypes #?(:clj :refer :cljs :refer-macros) [case-of]] [lambdaisland.uniontypes.core :refer [case-of*]] ...
878752f5b3ee56cde9e519a75cc2defbf5e547e15375d65c2e6ccca7c6b073e3
naoiwata/sicp
2.1.4.scm
;; ;; @author naoiwata SICP Chapter2 ;; 2.1.4 Extended Exercise: Interval Arithmetic ;; (define (add-interval x y) (make-interval (+ (lower-bound x) (lower-bound y)) (+ (upper-bound x) (upper-bound y)))) (define (mul-interval x y) (let ((p1 (* (lower-bound x) (lower-bound y))) (p2 (* (lower-bound x) (upp...
null
https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter2/pages/2.1.4.scm
scheme
@author naoiwata 2.1.4 Extended Exercise: Interval Arithmetic END
SICP Chapter2 (define (add-interval x y) (make-interval (+ (lower-bound x) (lower-bound y)) (+ (upper-bound x) (upper-bound y)))) (define (mul-interval x y) (let ((p1 (* (lower-bound x) (lower-bound y))) (p2 (* (lower-bound x) (upper-bound y))) (p3 (* (upper-bound x) (lower-bound y))) (p4 (* (upper-b...
e28940010ce8fc564643531bc5cf8be99d5e633259f24d5c1ca4bf9652da4557
cnuernber/dtype-next
primitive.clj
(ns tech.v3.datatype.primitive (:require [tech.v3.datatype.protocols :as dtype-proto] [tech.v3.datatype.casting :as casting] [tech.v3.datatype.const-reader :refer [const-reader]])) (defmacro implement-scalar-primitive [cls prim-cls datatype] `(do (.put casting/class->datatype-map ~...
null
https://raw.githubusercontent.com/cnuernber/dtype-next/4e43212942aafa0145640cf6b655bb83855f567d/src/tech/v3/datatype/primitive.clj
clojure
Reader conversion of primitives is inefficient so we allow it but do not advertise it
(ns tech.v3.datatype.primitive (:require [tech.v3.datatype.protocols :as dtype-proto] [tech.v3.datatype.casting :as casting] [tech.v3.datatype.const-reader :refer [const-reader]])) (defmacro implement-scalar-primitive [cls prim-cls datatype] `(do (.put casting/class->datatype-map ~...
87535ad66264236cceed02eb1db1d90e1c391bca55d96085d3c9e13a8f2dfb4d
TrustInSoft/tis-interpreter
pdg_state.mli
Modified by TrustInSoft (**************************************************************************) (* *) This file is part of Frama - C. (* ...
null
https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/pdg/pdg_state.mli
ocaml
************************************************************************ alternatives) ...
Modified by TrustInSoft This file is part of Frama - C. Copyright ( C ) 2007 - 2015 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Softwa...
fe92a7fdd0374d5a8a7c4acb818068ebe6cca57906c4f4246468afe09ba443b6
eckyputrady/haskell-scotty-realworld-example-app
Types.hs
module Feature.Comment.Types where import ClassyPrelude import Feature.User.Types import Database.PostgreSQL.Simple.FromRow import Platform.AesonUtil type CommentId = Integer type Slug = Text data Comment = Comment { commentId :: CommentId , commentCreatedAt :: UTCTime , commentUpdatedAt :: UTCTime , comme...
null
https://raw.githubusercontent.com/eckyputrady/haskell-scotty-realworld-example-app/366a1eec021fb1bfcbc2d8e0485b59cbedba10e5/src/Feature/Comment/Types.hs
haskell
module Feature.Comment.Types where import ClassyPrelude import Feature.User.Types import Database.PostgreSQL.Simple.FromRow import Platform.AesonUtil type CommentId = Integer type Slug = Text data Comment = Comment { commentId :: CommentId , commentCreatedAt :: UTCTime , commentUpdatedAt :: UTCTime , comme...
f14b09387df899299a8ea34d74a2a9a0e65d3af6740e07f156363c18dfaf9957
larsen/wiz
Main.hs
module Main where import Wiz.Types import Wiz.Environment import Wiz.Parser import Wiz.EvalApply import Text.Parsec (parse) import Text.Printf import System.Console.Haskeline import Data.Maybe (fromMaybe) import Control.Monad.IO.Class (liftIO) main :: IO () main = do prg <- loadProgram "init.scm" env <- runPro...
null
https://raw.githubusercontent.com/larsen/wiz/59b8c5fa5a1bde0a5ed83261599407e2d80efb25/src/Main.hs
haskell
module Main where import Wiz.Types import Wiz.Environment import Wiz.Parser import Wiz.EvalApply import Text.Parsec (parse) import Text.Printf import System.Console.Haskeline import Data.Maybe (fromMaybe) import Control.Monad.IO.Class (liftIO) main :: IO () main = do prg <- loadProgram "init.scm" env <- runPro...
72e5944053d9e81baf5c117140a3dd72a581d6716e7b4a2f4b3d54dd6a6880e7
mbutterick/typesetting
hacs-cryptarithmetic.rkt
#lang debug racket (require "hacs.rkt" sugar/debug) (module+ test (require rackunit)) (define (word-value d str) (define xs (for/list ([c (in-string str)]) (dict-ref d (string->symbol (string c))))) (for/sum ([(x idx) (in-indexed (reverse xs))]) (* x (expt 10 idx)))) (define (math-csp s...
null
https://raw.githubusercontent.com/mbutterick/typesetting/93a682a1581f3c1564b6f39fc05a5fe1a09a5ccb/csp/csp/hacs-cryptarithmetic.rkt
racket
all letters have different values (solve (math-csp "DUCK DUCK GOOSE")) (solve (math-csp "TICK TICK BOOM")) (solve (math-csp "SEND MORE MONEY"))
#lang debug racket (require "hacs.rkt" sugar/debug) (module+ test (require rackunit)) (define (word-value d str) (define xs (for/list ([c (in-string str)]) (dict-ref d (string->symbol (string c))))) (for/sum ([(x idx) (in-indexed (reverse xs))]) (* x (expt 10 idx)))) (define (math-csp s...
6c57bb817629d18b5e64cfc3865921e72b77ad172325f256e515530bcf44fefc
scrintal/heroicons-reagent
banknotes.cljs
(ns com.scrintal.heroicons.mini.banknotes) (defn render [] [:svg {:xmlns "" :viewBox "0 0 20 20" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M1 4a1 1 0 011-1h16a1 1 0 011 1v8a1 1 0 01-1 1H2a1 1 0 01-1-1V4zm12 4a3 3 0 11-6 ...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/mini/banknotes.cljs
clojure
(ns com.scrintal.heroicons.mini.banknotes) (defn render [] [:svg {:xmlns "" :viewBox "0 0 20 20" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M1 4a1 1 0 011-1h16a1 1 0 011 1v8a1 1 0 01-1 1H2a1 1 0 01-1-1V4zm12 4a3 3 0 11-6 ...
0cd36c0aba0a72559145d0cebb769b28309898791725085fb507076b11b611f4
jorinvo/letsdo.events
topic.clj
(ns lde.web.pages.topic (:refer-clojure :exclude [new]) (:require [hiccup.core :refer [h]] [reitit.core :refer [match->path]] [reitit.ring :refer [get-match]] [lde.web.components :as components] [lde.web.util :refer [render escape-with-br multipart-image-to-data-uri goto-url]] [lde.web.pages...
null
https://raw.githubusercontent.com/jorinvo/letsdo.events/4cd2a5d401d37524c0bac265f48923ab5f91b220/src/lde/web/pages/topic.clj
clojure
(ns lde.web.pages.topic (:refer-clojure :exclude [new]) (:require [hiccup.core :refer [h]] [reitit.core :refer [match->path]] [reitit.ring :refer [get-match]] [lde.web.components :as components] [lde.web.util :refer [render escape-with-br multipart-image-to-data-uri goto-url]] [lde.web.pages...
513ac0fe55ee9ca79b6cbb49aa422b70586260d1f33a02a10500a45e7142e2d7
ninenines/cowboy
charset_in_content_types_provided_h.erl
%% This module has a media type provided with an explicit charset. -module(charset_in_content_types_provided_h). -export([init/2]). -export([content_types_provided/2]). -export([charsets_provided/2]). -export([get_text_plain/2]). init(Req, Opts) -> {cowboy_rest, Req, Opts}. content_types_provided(Req, State) -> {...
null
https://raw.githubusercontent.com/ninenines/cowboy/8795233c57f1f472781a22ffbf186ce38cc5b049/test/handlers/charset_in_content_types_provided_h.erl
erlang
This module has a media type provided with an explicit charset.
-module(charset_in_content_types_provided_h). -export([init/2]). -export([content_types_provided/2]). -export([charsets_provided/2]). -export([get_text_plain/2]). init(Req, Opts) -> {cowboy_rest, Req, Opts}. content_types_provided(Req, State) -> {[ {{<<"text">>, <<"plain">>, [{<<"charset">>, <<"utf-8">>}]}, get...
98e5d6ad0f16289f414f0e2956a32c9562dd6e585a2762c5424536f9ffaf7278
flybot-sg/lasagna-pull
option.cljc
Copyright 2022 , Flybot Pte . Ltd. Apache License 2.0 , / (ns sg.flybot.pullable.core.option "support for decorate query options" (:require [sg.flybot.pullable.util :as u :refer [data-error]])) (defmulti apply-post "create a post processor by ::pp-type, returns a function takes k-v pair, returns the same...
null
https://raw.githubusercontent.com/flybot-sg/lasagna-pull/b163e44fe47414040f54782a1787a6d0ba2a2b00/src/sg/flybot/pullable/core/option.cljc
clojure
Takes a pred function as its argument (:proc/val) when the return value not fullfil `pred`, it is not included in result. when everything ok, it returns the original data => [:a nil] Takes any value as its argument (:proc/val) When a value not found, it gets replaced by not-found value => [:a :default] Takes a vec...
Copyright 2022 , Flybot Pte . Ltd. Apache License 2.0 , / (ns sg.flybot.pullable.core.option "support for decorate query options" (:require [sg.flybot.pullable.util :as u :refer [data-error]])) (defmulti apply-post "create a post processor by ::pp-type, returns a function takes k-v pair, returns the same...
33f011881564945a56b833fdfc68b06bade56429a2574f08d79703b161a3b837
JohnLato/iteratee
test_wc.hs
import qualified Data.ByteString.Char8 as C import qualified Data.Iteratee as I import System cnt :: I.Iteratee C.ByteString IO Int cnt = I.liftI (step 0) where step acc (I.Chunk s) | C.null s = I.icont (step acc) Nothing | True = let acc' = acc + C.count '\n' s in acc' `seq` I.icont (step acc')...
null
https://raw.githubusercontent.com/JohnLato/iteratee/83852cebab1051999d70d2abce86f5ab88c6d7ec/Examples/test_wc.hs
haskell
import qualified Data.ByteString.Char8 as C import qualified Data.Iteratee as I import System cnt :: I.Iteratee C.ByteString IO Int cnt = I.liftI (step 0) where step acc (I.Chunk s) | C.null s = I.icont (step acc) Nothing | True = let acc' = acc + C.count '\n' s in acc' `seq` I.icont (step acc')...
4cf3978162d2872173576ba592a0b6c0da34b7ca0d8841922f9fb0d54bbde96b
AdRoll/rebar3_typer
rebar3_typer_prv_SUITE.erl
%%% @doc Test module for rebar3_typer_prv -module(rebar3_typer_prv_SUITE). -behaviour(ct_suite). -export([all/0, init_per_testcase/2, end_per_testcase/2]). -export([no_options/1, recursive/1, includes/1, files/1, good_modes/1, colliding_modes/1, show_success_typings/1, no_spec/1, edoc/1, plt/1, typespec_file...
null
https://raw.githubusercontent.com/AdRoll/rebar3_typer/a77f3311e3bc0c94836226c343ecbe215180f896/test/rebar3_typer_prv_SUITE.erl
erlang
@doc Test module for rebar3_typer_prv @doc Just try to run typer without options @doc --recursive / recursive @doc Proper include folder discovery @doc --files / files @doc --show|show_exported|annotate|annotate_inc_files / mode without changes in rebar.config @doc --show|show_exported|annotate|annotate_inc_fil...
-module(rebar3_typer_prv_SUITE). -behaviour(ct_suite). -export([all/0, init_per_testcase/2, end_per_testcase/2]). -export([no_options/1, recursive/1, includes/1, files/1, good_modes/1, colliding_modes/1, show_success_typings/1, no_spec/1, edoc/1, plt/1, typespec_files/1, unrecognized_opt/1, format_e...
21238db9366ea539f3e70a2709ad7f0c2ebee6bdb72e8d75cc175c510d5c269c
pflanze/chj-schemelib
utils.scm
Copyright 2013 - 2017 by < > ;;; This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License ( GPL ) as published by the Free Software Foundation , either version 2 of the License , or ;;; (at your option) any later version. (require eas...
null
https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/math/image/effects/utils.scm
scheme
This file is free software; you can redistribute it and/or modify (at your option) any later version.
Copyright 2013 - 2017 by < > it under the terms of the GNU General Public License ( GPL ) as published by the Free Software Foundation , either version 2 of the License , or (require easy constants) (define-inline (square@ x) (declare (flonum) (not safe)) (fl* x x)) (define-inline (freqmod@ x...
37be31c6ae778aef42f0edb1ccbfdbfc589e21894f51b132993cc8d9b62546d4
csgordon/cayenne
GetPid.hs
module Libs.GetPid(getPid) where import System.Posix getPid :: IO Int getPid = do p <- getProcessID return (read (show p))
null
https://raw.githubusercontent.com/csgordon/cayenne/7fdf59b5e21124b5caa9f776199a30cd0e5d88b2/Libs/GetPid.hs
haskell
module Libs.GetPid(getPid) where import System.Posix getPid :: IO Int getPid = do p <- getProcessID return (read (show p))
ebc1fa391d18d3e284977ed15fa6199003dc4067578bca39b0d13185a7efc210
martinsumner/leveled
leveled_penciller.erl
%% -------- PENCILLER --------- %% %% The penciller is responsible for writing and re-writing the ledger - a %% persisted, ordered view of non-recent Keys and Metadata which have been %% added to the store. %% - The penciller maintains a manifest of all the files within the current %% Ledger. - The Penciller provide...
null
https://raw.githubusercontent.com/martinsumner/leveled/e06d2a538fac9669145f1d226ff049d1ab1f9294/src/leveled_penciller.erl
erlang
-------- PENCILLER --------- The penciller is responsible for writing and re-writing the ledger - a persisted, ordered view of non-recent Keys and Metadata which have been added to the store. - The penciller maintains a manifest of all the files within the current Ledger. requested snapshots of the Ledger - T...
- The Penciller provides re - write ( compaction ) work up to be managed by the Penciller 's Clerk - The Penciller can be cloned and maintains a register of clones who have an array of hash - listing binaries ) from the Bookie , and responds either ' ok ' to the bookie if the information is accepted nad the B...
11822951415820557e142cf6df49830b28be1ee96cdffd2795ac96c858b9be49
TatriX/cl-sdl2-tutorial
13-alpha-blending.lisp
(defpackage #:sdl2-tutorial-13-alpha-blending (:use :cl) (:export :run) (:import-from :sdl2-tutorial-utils :asset-pathname)) (in-package #:sdl2-tutorial-13-alpha-blending) (defparameter *screen-width* 640) (defparameter *screen-height* 480) (defclass tex () ((renderer :initarg :renderer :initform (er...
null
https://raw.githubusercontent.com/TatriX/cl-sdl2-tutorial/ac3613160df0120c4b12de6f7989add0e81c9e63/13-alpha-blending.lisp
lisp
(defpackage #:sdl2-tutorial-13-alpha-blending (:use :cl) (:export :run) (:import-from :sdl2-tutorial-utils :asset-pathname)) (in-package #:sdl2-tutorial-13-alpha-blending) (defparameter *screen-width* 640) (defparameter *screen-height* 480) (defclass tex () ((renderer :initarg :renderer :initform (er...
3ea7ef51bda9790f309608ab20d15406b83f6608481ab3a8a6853483f937eb79
ogaml/ogaml
model.mli
module Vertex : sig type t val create : position:OgamlMath.Vector3f.t -> ?normal:OgamlMath.Vector3f.t -> ?uv:OgamlMath.Vector2f.t -> ?color:Color.t -> unit -> t val position : t -> OgamlMath.Vector3f.t val normal : t -> OgamlMath.Vector3f.t option val u...
null
https://raw.githubusercontent.com/ogaml/ogaml/5e74597521abf7ba2833a9247e55780eabfbab78/src/graphics/model/model.mli
ocaml
Creation Transformation Iterators
module Vertex : sig type t val create : position:OgamlMath.Vector3f.t -> ?normal:OgamlMath.Vector3f.t -> ?uv:OgamlMath.Vector2f.t -> ?color:Color.t -> unit -> t val position : t -> OgamlMath.Vector3f.t val normal : t -> OgamlMath.Vector3f.t option val u...
54d1b8779c04118feb0c58bd8342f7efd98778c5bdb8bdf2621ddb71b5e66b62
MaskRay/99-problems-ocaml
28.ml
let lsort = List.sort (fun a b -> compare (List.length a) (List.length b))
null
https://raw.githubusercontent.com/MaskRay/99-problems-ocaml/652604f13ba7a73eee06d359b4db549b49ec9bb3/21-30/28.ml
ocaml
let lsort = List.sort (fun a b -> compare (List.length a) (List.length b))
67e569e754dd2fae2ffec5a2c0ccae1644927be5fc49b10ca0bdfc04f6214a61
uw-unsat/leanette-popl22-artifact
ex2.rkt
#lang rosette (require "lang.rkt") (define (ex2) (synthesize-program (lambda (grid) (begin (grid-set! grid (point 0 0) 'a) (grid-set! grid (point 0 2) 'b))) (lambda (grid) (and (equal? 'a (grid-ref grid (point 4 2))) (equal? 'b (grid-ref grid (point 0 0))))))) (time (ex2))...
null
https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-4/fluidics/ex2.rkt
racket
#lang rosette (require "lang.rkt") (define (ex2) (synthesize-program (lambda (grid) (begin (grid-set! grid (point 0 0) 'a) (grid-set! grid (point 0 2) 'b))) (lambda (grid) (and (equal? 'a (grid-ref grid (point 4 2))) (equal? 'b (grid-ref grid (point 0 0))))))) (time (ex2))...
4330e53a4d3176e2129d02080373164100bb7dfe37a6bce2ba172107b0b25ff7
ocaml/opam
print_config.ml
#directory "+compiler-libs";; #load "ocamlcommon.cma";; set_binary_mode_out stdout true;; match List.tl (Array.to_list Sys.argv) with | ["dll"] -> print_endline Config.ext_dll | ["obj"] -> print_endline Config.ext_obj | ["lib"] -> print_endline Config.ext_lib | ["arch"] -> print_endline Config.architecture | ["ccomp_ty...
null
https://raw.githubusercontent.com/ocaml/opam/074df6b6d87d4114116ea41311892b342cfad3de/shell/print_config.ml
ocaml
#directory "+compiler-libs";; #load "ocamlcommon.cma";; set_binary_mode_out stdout true;; match List.tl (Array.to_list Sys.argv) with | ["dll"] -> print_endline Config.ext_dll | ["obj"] -> print_endline Config.ext_obj | ["lib"] -> print_endline Config.ext_lib | ["arch"] -> print_endline Config.architecture | ["ccomp_ty...
d808c8d3973c33aca4c1619de8267e5af9f348f3b7b1c04bfa81747db69afe16
podenv/podenv
Spec.hs
# LANGUAGE ImportQualifiedPost # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE NoImplicitPrelude # module Main where import Data.Text qualified as Text import Data.Text.IO qualified as Text import Podenv hiding (loadConfig) import Podenv.Capability (AppMode (..)) import Podenv.Capability qualified import Podenv.Confi...
null
https://raw.githubusercontent.com/podenv/podenv/9f5d2aec7a7af8b9e68b6dbb1716753e62b89991/test/Spec.hs
haskell
# LANGUAGE OverloadedStrings # work around typed-process display bug selector is removed from arg because it match the single app selector the single app is automatically selected image selector nix selector run with name run net default run no-network run net private run net host run shared net hostfile ar...
# LANGUAGE ImportQualifiedPost # # LANGUAGE NoImplicitPrelude # module Main where import Data.Text qualified as Text import Data.Text.IO qualified as Text import Podenv hiding (loadConfig) import Podenv.Capability (AppMode (..)) import Podenv.Capability qualified import Podenv.Config import Podenv.Context import Pode...
84442848590c4f5f7c7b6133768f3257ba21080500da9a3cd8cd3e0ffc1ba784
Daniel-Diaz/HaTeX
AMSSymb.hs
-- | Module for the package @amssymb@. module Text.LaTeX.Packages.AMSSymb ( -- * AMSSymb package amssymb -- * Arrows , vartriangleleft, vartriangleright , leftleftarrows, rightrightarrows , rightleftarrows, leftrightarrows , upuparrows, downdownarrows , leftarrowtail, rightarrowtail , curvearrowle...
null
https://raw.githubusercontent.com/Daniel-Diaz/HaTeX/aae193763157378500ebedc733c913e74f53b060/Text/LaTeX/Packages/AMSSymb.hs
haskell
| Module for the package @amssymb@. * AMSSymb package * Arrows * Other | AMSSymb package. Example: | \(\vartriangleleft\) symbol. | \(\vartriangleleft\) symbol. | \(\leftleftarrows\) symbol - double left arrows. | \(\rightrightarrows\) symbol - double right arrows | \(\rightleftarrows\) symbol - right arro...
module Text.LaTeX.Packages.AMSSymb amssymb , vartriangleleft, vartriangleright , leftleftarrows, rightrightarrows , rightleftarrows, leftrightarrows , upuparrows, downdownarrows , leftarrowtail, rightarrowtail , curvearrowleft, curvearrowright , twoheadleftarrow, twoheadrightarrow , rightleftharpo...
2a0ee28d2856d4d5a7a876e9062466a25fe2a18ab63107a7c368eb2fcc2f5c45
lispbuilder/lispbuilder
gl-info-sdl.lisp
(in-package #:rm-examples) (defun gl-info-sdl () (make-instance 'rm::sdl-window :width 320 :height 240) (format t "GL-VERSION: ~A~%" (rm::gl-version)) (format t "GL-VENDOR: ~A~%" (rm::gl-vendor)) (format t "GL-RENDERER: ~A~%" (rm::gl-renderer)) (format t "GL-EXTENSIONS: ~%") (format t "=...
null
https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-openrm/examples/gl-info-sdl.lisp
lisp
(in-package #:rm-examples) (defun gl-info-sdl () (make-instance 'rm::sdl-window :width 320 :height 240) (format t "GL-VERSION: ~A~%" (rm::gl-version)) (format t "GL-VENDOR: ~A~%" (rm::gl-vendor)) (format t "GL-RENDERER: ~A~%" (rm::gl-renderer)) (format t "GL-EXTENSIONS: ~%") (format t "=...
528a0e2b5c799c144c24514f6e6904670753b7a0f2a378446793c68d0894bbca
fukamachi/clozure-cl
ppc64-backend.lisp
-*- Mode : Lisp ; Package : CCL -*- ;;; Copyright ( C ) 2009 Clozure Associates Copyright ( C ) 2004 , 2005 Clozure Associates This file is part of Clozure CL . ;;; Clozure CL is licensed under the terms of the Lisp Lesser GNU Public License , known as the LLGPL and distributed with Clozure CL as ...
null
https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/compiler/PPC/PPC64/ppc64-backend.lisp
lisp
Package : CCL -*- file "LICENSE". The LLGPL consists of a preamble and the LGPL, conflict, the preamble takes precedence. Clozure CL is referenced in the preamble as the "LIBRARY." The LLGPL is also available online at and a TOC, but it's not clear that we need to care about that here. Coerce...
Copyright ( C ) 2009 Clozure Associates Copyright ( C ) 2004 , 2005 Clozure Associates This file is part of Clozure CL . Clozure CL is licensed under the terms of the Lisp Lesser GNU Public License , known as the LLGPL and distributed with Clozure CL as the which is distributed with Clozure CL...
5ba0d8795e777e6d18f2d535aba7bdb1489d76c273aa38e7b7f8b5b9101952c7
kupl/LearnML
original.ml
type aexp = | Const of int | Var of string | Power of (string * int) | Times of aexp list | Sum of aexp list let rec diff ((e : aexp), (x : string)) : aexp = match e with | Const i -> Const 0 | Var s -> if s = x then Const 1 else Const 0 | Power (s, i) -> if s = x then Times [ Const i; Power (s...
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/diff/sub146/original.ml
ocaml
type aexp = | Const of int | Var of string | Power of (string * int) | Times of aexp list | Sum of aexp list let rec diff ((e : aexp), (x : string)) : aexp = match e with | Const i -> Const 0 | Var s -> if s = x then Const 1 else Const 0 | Power (s, i) -> if s = x then Times [ Const i; Power (s...
c199caabbb6c58add1824ef6266f5e313591cfdc8147336e7210313d8440384f
lazerwalker/clojurescript-koans
14_destructuring.cljs
(ns koans.meditations.destructuring) (def koans '( "Destructuring is an arbiter: it breaks up arguments" (= :__ ((fn [[a b]] (str b a)) [:foo :bar])) "Whether in function definitions" (= (str "First comes love, " "then comes marriage, " "then comes Clojure with the baby carriage")...
null
https://raw.githubusercontent.com/lazerwalker/clojurescript-koans/c4713e3ccafad2229c5eae038d8bbf433d0d026e/src/koans/meditations/14_destructuring.cljs
clojure
(ns koans.meditations.destructuring) (def koans '( "Destructuring is an arbiter: it breaks up arguments" (= :__ ((fn [[a b]] (str b a)) [:foo :bar])) "Whether in function definitions" (= (str "First comes love, " "then comes marriage, " "then comes Clojure with the baby carriage")...
af84783febca53a593eba5e03f7c72adfd41b25e0bf151194bbcf61856c284f3
ashinn/chibi-scheme
cxr.scm
;; provide c[ad]{3,4}r (define (caaar x) (car (car (car x)))) (define (caadr x) (car (car (cdr x)))) (define (cadar x) (car (cdr (car x)))) (define (caddr x) (car (cdr (cdr x)))) (define (cdaar x) (cdr (car (car x)))) (define (cdadr x) (cdr (car (cdr x)))) (define (cddar x) (cdr (cdr (car x)))) (define (cdddr x) (cdr...
null
https://raw.githubusercontent.com/ashinn/chibi-scheme/8b27ce97265e5028c61b2386a86a2c43c1cfba0d/lib/scheme/cxr.scm
scheme
provide c[ad]{3,4}r
(define (caaar x) (car (car (car x)))) (define (caadr x) (car (car (cdr x)))) (define (cadar x) (car (cdr (car x)))) (define (caddr x) (car (cdr (cdr x)))) (define (cdaar x) (cdr (car (car x)))) (define (cdadr x) (cdr (car (cdr x)))) (define (cddar x) (cdr (cdr (car x)))) (define (cdddr x) (cdr (cdr (cdr x)))) (defin...
a869aa2c4bf67c93b36f44eb36c6b184bf872301399ac900b0acac6ab4671fd7
marcoheisig/Petalisp
karmarkar-karp.lisp
© 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*- (defpackage #:petalisp.karmarkar-karp (:use #:common-lisp #:petalisp.utilities)) (in-package #:petalisp.karmarkar-karp) ;; A function that returns the weight of an object being processed. (defvar *weight*) ;; The number of partitions to be c...
null
https://raw.githubusercontent.com/marcoheisig/Petalisp/a1c85cf71da445ef9c7913cd9ddb5149373211a7/code/utilities/karmarkar-karp.lisp
lisp
A function that returns the weight of an object being processed. The number of partitions to be created.
© 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*- (defpackage #:petalisp.karmarkar-karp (:use #:common-lisp #:petalisp.utilities)) (in-package #:petalisp.karmarkar-karp) (defvar *weight*) (defvar *k*) (defstruct (subset (:constructor make-subset)) (elements '() :type list) ...
5b6dac56d7c700488660f3f574940eff955e13b6ca6713ea6659626c7eae9bae
andreas/ocaml-graphql-server
graphql.ml
module Schema = Graphql_schema.Make (struct type +'a t = 'a let bind t f = f t let return t = t module Stream = struct type 'a t = 'a Seq.t let map t f = Seq.map f t let iter t f = Seq.iter f t let close _t = () end end) (struct typ...
null
https://raw.githubusercontent.com/andreas/ocaml-graphql-server/d615cbb164d4ddfdc2efeb246a198dfe114adf24/graphql/src/graphql.ml
ocaml
module Schema = Graphql_schema.Make (struct type +'a t = 'a let bind t f = f t let return t = t module Stream = struct type 'a t = 'a Seq.t let map t f = Seq.map f t let iter t f = Seq.iter f t let close _t = () end end) (struct typ...
0286b5702c3ea5f7a12fb5140e6f65b004b9c065ecfbaf8e4e0560f4131eaede
informatimago/lisp
hello.lisp
(defpackage "H" (:use "CL") (:export "ELLO")) (in-package "H") (defun ello () (prin1 'hello))
null
https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/driver/test-ll/hello.lisp
lisp
(defpackage "H" (:use "CL") (:export "ELLO")) (in-package "H") (defun ello () (prin1 'hello))
eba99a910bdf2607b8ad23e9c41a85c381b1af6425bb39e1d1e096e4d76702ed
Darkkey/erlamsa
erlamsa_mutations.erl
Copyright ( c ) 2011 - 2014 Copyright ( c ) 2014 - 2019 % % Permission is hereby granted, free of charge, to any person obtaining a copy % of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation the rights % to...
null
https://raw.githubusercontent.com/Darkkey/erlamsa/16c74f32743a3153e330a62945f9880e53549ab1/src/erlamsa_mutations.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnished to do so, subject to the following conditions: The above copyright n...
Copyright ( c ) 2011 - 2014 Copyright ( c ) 2014 - 2019 in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS "...
688b45e0dee86e0ab36212696beae4b1c2242539767c801efbb4118066117a2e
Bogdanp/deta
books.rkt
#lang racket/base (require db deta threading) (define-schema book ([id id/f #:primary-key #:auto-increment] [title string/f] [author string/f] [year-published integer/f #:nullable])) (define conn (sqlite3-connect #:database 'memory)) (void (create-table! conn 'book) (insert! conn ...
null
https://raw.githubusercontent.com/Bogdanp/deta/503860156f5cb1dbecb4339e299ee86a10b66d32/examples/books.rkt
racket
#lang racket/base (require db deta threading) (define-schema book ([id id/f #:primary-key #:auto-increment] [title string/f] [author string/f] [year-published integer/f #:nullable])) (define conn (sqlite3-connect #:database 'memory)) (void (create-table! conn 'book) (insert! conn ...
34d4191f664328d4bd1876518ec671c83f2d710eacfe9971a0c125d23ece53b1
ayazhafiz/plts
load.ml
let string_of_position ({ pos_lnum; pos_cnum; pos_bol; _ } : Lexing.position) = Printf.sprintf "%d:%d" pos_lnum (pos_cnum - pos_bol + 1) let parse_safe s = let lexbuf = Lexing.from_string ~with_positions:true s in try let parsed = Parser.formula_entry Lexer.read lexbuf in Ok parsed with | Lexer.Synta...
null
https://raw.githubusercontent.com/ayazhafiz/plts/ea0cb5ab8f5fb98e421c4a2dc8577b2454d86442/logic/load.ml
ocaml
let string_of_position ({ pos_lnum; pos_cnum; pos_bol; _ } : Lexing.position) = Printf.sprintf "%d:%d" pos_lnum (pos_cnum - pos_bol + 1) let parse_safe s = let lexbuf = Lexing.from_string ~with_positions:true s in try let parsed = Parser.formula_entry Lexer.read lexbuf in Ok parsed with | Lexer.Synta...
87a23649ac2c602484df45ffea68970d057a4fb08dddc938a274a724ea93508a
dbuenzli/hyperbib
suggestion_html.mli
--------------------------------------------------------------------------- Copyright ( c ) 2022 The hyperbib programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright ...
null
https://raw.githubusercontent.com/dbuenzli/hyperbib/a1def764f7f58b29bd732dacaa167e73497f6175/src/html/suggestion_html.mli
ocaml
--------------------------------------------------------------------------- Copyright ( c ) 2022 The hyperbib programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright ...
4ec54abee64878b1274eb68b98f241891ef903717301c1ff35631b17d83b7166
ItsMeijers/Lambdabox
Extended.hs
{-# LANGUAGE OverloadedStrings #-} module Data.Aeson.Extended ( module Data.Aeson , module Data.Aeson.Types , typeToKindOptions , Unit(..) ) where import Data.Aeson import Data.Aeson.Types typeToKindOptions :: Options typeToKindOptions = defaultOptions { fieldLabelModifier = t2k } wh...
null
https://raw.githubusercontent.com/ItsMeijers/Lambdabox/c19a8ae7d37b9f8ab5054d558fe788a5d4483092/src/Data/Aeson/Extended.hs
haskell
# LANGUAGE OverloadedStrings #
module Data.Aeson.Extended ( module Data.Aeson , module Data.Aeson.Types , typeToKindOptions , Unit(..) ) where import Data.Aeson import Data.Aeson.Types typeToKindOptions :: Options typeToKindOptions = defaultOptions { fieldLabelModifier = t2k } where t2k "kind" = "type" t...
d082df553e73ea25a71f68b1b6a149fef0cf6b027eb87c918b003b7881fe2382
hspec/sensei
HTTPSpec.hs
{-# LANGUAGE OverloadedStrings #-} module HTTPSpec (spec) where import Helper import Test.Hspec.Wai import HTTP spec :: Spec spec = do describe "app" $ do with (return $ app $ return (True, "hello")) $ do it "returns 200 on success" $ do get "/" `shouldRespondWith` ...
null
https://raw.githubusercontent.com/hspec/sensei/1af44981b3448d1298e6a363e037ea2978cc6392/test/HTTPSpec.hs
haskell
# LANGUAGE OverloadedStrings #
module HTTPSpec (spec) where import Helper import Test.Hspec.Wai import HTTP spec :: Spec spec = do describe "app" $ do with (return $ app $ return (True, "hello")) $ do it "returns 200 on success" $ do get "/" `shouldRespondWith` 200 with (return $ app $ retur...
f42a45f2e9ba7b4934be2e48f03f440c24dba2771454c414963f3ecdc5a0d24f
patoline/patoline
UTF16.ml
open UChar include UTF.Make( struct * Encode a unicode character into a UTF16 string . * Argument : * i : the unicode character . * Returns a string of size either 2 or 4 . * Raise invalid_arg if i is not in the U+0000 .. U+10FFFF range . * Encode a unicode character...
null
https://raw.githubusercontent.com/patoline/patoline/3dcd41fdff64895d795d4a78baa27d572b161081/unicodelib/UTF16.ml
ocaml
* Decode a UTF16 character at a given position in a string. * Arguments: * s : the string, * i : index where to look. * Returns a couple (c, l) where c is the code of the character and l is the * number of bytes read. * Raise invalid_arg if no valid UTF16 character starts at pois...
open UChar include UTF.Make( struct * Encode a unicode character into a UTF16 string . * Argument : * i : the unicode character . * Returns a string of size either 2 or 4 . * Raise invalid_arg if i is not in the U+0000 .. U+10FFFF range . * Encode a unicode character...
774cbd7c452870040fcc84b6398f007587b34aa8ffe4dc3af4486d95126c4962
McCLIM/McCLIM
sequence.lisp
;;; --------------------------------------------------------------------------- ;;; License: LGPL-2.1+ (See file 'Copyright' for details). ;;; --------------------------------------------------------------------------- ;;; ( c ) copyright 2019 - 2020 Jan Moringen < > ;;; ;;; --------------------------------------...
null
https://raw.githubusercontent.com/McCLIM/McCLIM/7c890f1ac79f0c6f36866c47af89398e2f05b343/Apps/Clouseau/test/objects/sequence.lisp
lisp
--------------------------------------------------------------------------- License: LGPL-2.1+ (See file 'Copyright' for details). --------------------------------------------------------------------------- --------------------------------------------------------------------------- Smoke test for inspecting s...
( c ) copyright 2019 - 2020 Jan Moringen < > (cl:in-package #:clouseau.test) (def-suite* :clouseau.objects.sequence :in :clouseau) (defclass my-sequence (sequence standard-object) ()) (defmethod sequence:length ((sequence my-sequence)) 3) (defmethod sequence:elt ((sequence my-sequence) (index t)) (case...
e3d02779b5f6c9a61d2bb376a8cb4869834ce9260e9636610ca7c56b888e0e5e
robert-strandh/Cluster
generation-test.lisp
(cl:in-package #:cluster-test.disassembler) (defun test-all-x86 () (let* ((generator (make-code-command-generator)) (test-program (generate-test-commands generator c::*instruction-descriptors*))) (assert-assembler-equal-encoding test-program)))
null
https://raw.githubusercontent.com/robert-strandh/Cluster/370410b1c685f2afd77f959a46ba49923a31a33c/Test/Disassembler/generation-test.lisp
lisp
(cl:in-package #:cluster-test.disassembler) (defun test-all-x86 () (let* ((generator (make-code-command-generator)) (test-program (generate-test-commands generator c::*instruction-descriptors*))) (assert-assembler-equal-encoding test-program)))
852d44519f86f647355354b024233397a7f1ededf8067be810094ed0c9edc5f1
sicmutils/sicmutils
simplify.cljc
#_"SPDX-License-Identifier: GPL-3.0" (ns sicmutils.simplify (:require [sicmutils.expression :as x] [sicmutils.expression.analyze :as a] [sicmutils.polynomial :as poly] [sicmutils.polynomial.factor :as factor] [sicmutils.rational-function :as rf] [sicmutils....
null
https://raw.githubusercontent.com/sicmutils/sicmutils/ce763b31153eb9253f165bd5b4e4e6a6087bf730/src/sicmutils/simplify.cljc
clojure
everything else is done. It's not right to get operator multiplication going and then attempt to canonicalize the expression, even if it sort of works.
#_"SPDX-License-Identifier: GPL-3.0" (ns sicmutils.simplify (:require [sicmutils.expression :as x] [sicmutils.expression.analyze :as a] [sicmutils.polynomial :as poly] [sicmutils.polynomial.factor :as factor] [sicmutils.rational-function :as rf] [sicmutils....
6f0d0ec3c5b0ce9405eff317a32f3d644f5aef4a5de63b4127ef6ed416767d95
clojure-quant/infra-guix
sysctl.scm
; -to-set-sysctl-fs-notify-max-user-watches-in-guix-guix-system-error-servi/1639697#1639697 ; -Services.html#Miscellaneous-Services The service type for sysctl , which modifies kernel parameters under /proc / sys/ (modify-services %desktop-services (sysctl-service-type config => (sysctl-configuration (set...
null
https://raw.githubusercontent.com/clojure-quant/infra-guix/586142652a67909d3bcfa84f17bfe4cd0d7c7b72/modules/awb99/config/sysctl.scm
scheme
-to-set-sysctl-fs-notify-max-user-watches-in-guix-guix-system-error-servi/1639697#1639697 -Services.html#Miscellaneous-Services
The service type for sysctl , which modifies kernel parameters under /proc / sys/ (modify-services %desktop-services (sysctl-service-type config => (sysctl-configuration (settings (append '(("fs.file-max" . "500000") ("fs.inotify.max_user_watches" . "524288")) ...
db2fba3a007b1a55ddec32d580edb3d4ab985a6bb88641888d3afe5755c7604c
mbj/stratosphere
ResourceProperties.hs
module Stratosphere.ResourceProperties ( ResourceProperties(..) , ToResourceProperties(..) , resourcePropertiesJSON ) where import Stratosphere.Prelude import qualified Data.Aeson as JSON import qualified Data.Aeson.Types as JSON data ResourceProperties = ResourceProperties { awsType :: Text ...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/src/Stratosphere/ResourceProperties.hs
haskell
module Stratosphere.ResourceProperties ( ResourceProperties(..) , ToResourceProperties(..) , resourcePropertiesJSON ) where import Stratosphere.Prelude import qualified Data.Aeson as JSON import qualified Data.Aeson.Types as JSON data ResourceProperties = ResourceProperties { awsType :: Text ...
9169cf1ec2e5007f4a1f24286b88665ea54fcf3ff9c6b102cb1c7f3c7f853623
Storkle/clj-forex
gui.clj
(clojure.core/use 'nstools.ns) (ns+ forex.gui (:clone clj.core) (:import (javax.swing JScrollPane JFrame JPanel JTextArea JLabel JButton SwingUtilities)) (:use forex.util.general forex.util.gui clojure.contrib.miglayout) (:use forex.util.core forex.util.emacs forex.util.log) (:use forex.module.error ...
null
https://raw.githubusercontent.com/Storkle/clj-forex/1800b982037b821732b9df1e2e5ea1eda70f941f/src/forex/gui.clj
clojure
(clojure.core/use 'nstools.ns) (ns+ forex.gui (:clone clj.core) (:import (javax.swing JScrollPane JFrame JPanel JTextArea JLabel JButton SwingUtilities)) (:use forex.util.general forex.util.gui clojure.contrib.miglayout) (:use forex.util.core forex.util.emacs forex.util.log) (:use forex.module.error ...
1b443a24629ec5f53c02206a4f34f4c0aede7a0ae5feed5ef2a4fe1b34038fff
broadinstitute/firecloud-ui
auth.cljs
(ns broadfcui.auth (:require [dmohs.react :as react] [clojure.string :as string] [broadfcui.common :refer [login-scopes]] [broadfcui.common :as common] [broadfcui.common.icons :as icons] [broadfcui.common.links :as links] [broadfcui.common.markdown :as markdown] [broadfcui.common.style :as sty...
null
https://raw.githubusercontent.com/broadinstitute/firecloud-ui/8eb077bc137ead105db5665a8fa47a7523145633/src/cljs/main/broadfcui/auth.cljs
clojure
fetch_basic_profile defaults to true, and adds "openid email profile" to the list of requested scopes. it than removing it from the page. Borked servers often return HTML pages instead of JSON, so suppress JSON parsing exceptions because they are useless ("Unexpected token T in JSON...") status code 0 typically ...
(ns broadfcui.auth (:require [dmohs.react :as react] [clojure.string :as string] [broadfcui.common :refer [login-scopes]] [broadfcui.common :as common] [broadfcui.common.icons :as icons] [broadfcui.common.links :as links] [broadfcui.common.markdown :as markdown] [broadfcui.common.style :as sty...
47a85b0d9ca8279117649830004b4d4337649bf8b87be37993fbcf2ffaf9660c
PhDP/Akarui
Properties.hs
import Test.QuickCheck import Test.QuickCheck.Test (isSuccess) import Control.Monad import System.Exit (exitFailure) import PredicateSpec import FOLSpec main :: IO () main = do let tests = [ quickCheckResult prop_predicate_eq_itself , quickCheckResult prop_predicate_cmp_itself , quickCheckResul...
null
https://raw.githubusercontent.com/PhDP/Akarui/4ad888d011f7115677e8f9ba18887865f5150746/tests/Properties.hs
haskell
, quickCheckResult prop_parsing_back -- Will be reinstated once I figure out how to handle top/bot printing.
import Test.QuickCheck import Test.QuickCheck.Test (isSuccess) import Control.Monad import System.Exit (exitFailure) import PredicateSpec import FOLSpec main :: IO () main = do let tests = [ quickCheckResult prop_predicate_eq_itself , quickCheckResult prop_predicate_cmp_itself , quickCheckResul...
bf0f1d313a1060ec6d7c9d9325ccc51d4830c95b8408dcc489a2c5ad6332e752
bytekid/mkbtt
nodeState.ml
Copyright 2010 * GNU Lesser General Public License * * This file is part of MKBtt . * * is free software : you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the * Free Software Foundation , either version 3 of the License , or (...
null
https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mkbtt/nodeState.ml
ocaml
** OPENS ************************************************************** ** OPENS ************************************************************** ** FUNCTIONS ********************************************************** log2 "index_add_closed_node" >> let rewrite_index = M.NodeTermIndex.rewrite_index
Copyright 2010 * GNU Lesser General Public License * * This file is part of MKBtt . * * is free software : you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the * Free Software Foundation , either version 3 of the License , or (...
bb7e19ed8500a49799fc5e6003dfd183018f859ac969d35a108f385755fd18ec
arcfide/chez-srfi
srfi-51-impl.scm
;; Reference implementation of SRFI 51 ;; Copyright ( C ) ( 2004 ) . All Rights Reserved . ;; ;; Permission is hereby granted, free of charge, to any person obtaining a copy ;; of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without l...
null
https://raw.githubusercontent.com/arcfide/chez-srfi/96fb553b6ba0834747d5ccfc08c181aa8fd5f612/%253a51/srfi-51-impl.scm
scheme
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to rights to use, copy, modify, merge, publish, distribute, sublicense, and/or furnished to do so, subject to the following conditions: The above copyright notice a...
Reference implementation of SRFI 51 Copyright ( C ) ( 2004 ) . All Rights Reserved . deal in the Software without restriction , including without limitation the sell copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS ...
0f6bc9365a64d96d3ad69bddf5c17e8e8785566efd05e0afc48c2398e4aeb455
snoyberg/http-client
test.hs
{-# LANGUAGE OverloadedStrings #-} import Network.HTTP.Conduit import Network import qualified Data.ByteString as S import qualified Data.ByteString.Lazy as L import System.Environment.UTF8 (getArgs, getEnv) import Data.CaseInsensitive (original) import Data.Conduit import Control.Monad.IO.Class (liftIO) import Control...
null
https://raw.githubusercontent.com/snoyberg/http-client/106951809b3e1c796ffd6cccefc4c1fad16df7c9/http-conduit/test.hs
haskell
# LANGUAGE OverloadedStrings # let req = urlEncodedBody [ ("foo", "bar") , ("baz%%38**.8fn", "bin") ] _req2
import Network.HTTP.Conduit import Network import qualified Data.ByteString as S import qualified Data.ByteString.Lazy as L import System.Environment.UTF8 (getArgs, getEnv) import Data.CaseInsensitive (original) import Data.Conduit import Control.Monad.IO.Class (liftIO) import Control.Exception (finally) import Network...
e5eef3c1af4f1026b31e147f260c067ae8d6a0e9cec0f10e61f72ee32dc75351
robstewart57/rdf4h
TList.hs
# LANGUAGE CPP # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE TypeFamilies # # LANGUAGE DeriveGeneric # {-# LANGUAGE EmptyDataDecls #-} -- |"TriplesGraph" contains a list-backed graph implementation suitable -- for smallish graphs or for temporary graphs that will n...
null
https://raw.githubusercontent.com/robstewart57/rdf4h/22538a916ec35ad1c46f9946ca66efed24d95c75/src/Data/RDF/Graph/TList.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE EmptyDataDecls # |"TriplesGraph" contains a list-backed graph implementation suitable for smallish graphs or for temporary graphs that will not be queried. It maintains the triples in the order that they are given in, and is especially useful for holding N-Triples, where it is...
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE TypeFamilies # # LANGUAGE DeriveGeneric # module Data.RDF.Graph.TList (TList) where import Prelude #if MIN_VERSION_base(4,9,0) #if !MIN_VERSION_base(4,11,0) import Data.Semigroup #else #endif #else #endif import Control.DeepSeq (NFData...
fb75a43f6ffbd15a1c976fca284f93d0087c2c9c9e772678afef05c5025dea7b
CSCfi/rems
test_audit_log.clj
(ns ^:integration rems.api.test-audit-log (:require [clj-time.core :as time] [clojure.test :refer :all] [rems.api.testing :refer :all] [rems.db.api-key :as api-key] [rems.db.test-data-helpers :as test-helpers] [rems.handler :refer [handler]] [rin...
null
https://raw.githubusercontent.com/CSCfi/rems/490087c4d58339c908da792111029fbaf817a26f/test/clj/rems/api/test_audit_log.clj
clojure
this is actually a {:success false} response since the application doesn't exist, but here we only care about the HTTP status.
(ns ^:integration rems.api.test-audit-log (:require [clj-time.core :as time] [clojure.test :refer :all] [rems.api.testing :refer :all] [rems.db.api-key :as api-key] [rems.db.test-data-helpers :as test-helpers] [rems.handler :refer [handler]] [rin...
0637d6a69749ad874b4ae8902409f6117e63d001c870231f4c1ce6cd14b48fd1
kahaani/TINY-in-Haskell
TypeCheck.hs
module TypeCheck ( typeCheck ) where import Control.Monad.Error import Scan (Token(..)) import Parse (Stmt(..), Exp(..)) data ExpType = VoidT | IntegerT | BooleanT deriving (Eq) typeCheck :: [Stmt] -> [Stmt] typeCheck stmts = case typeCheckStmts stmts of Right () -> stmts Left err -> error $ "Type Error: " ++ err...
null
https://raw.githubusercontent.com/kahaani/TINY-in-Haskell/9149c71faa09d33a18b00a08180cefeb6359de77/v2/TypeCheck.hs
haskell
module TypeCheck ( typeCheck ) where import Control.Monad.Error import Scan (Token(..)) import Parse (Stmt(..), Exp(..)) data ExpType = VoidT | IntegerT | BooleanT deriving (Eq) typeCheck :: [Stmt] -> [Stmt] typeCheck stmts = case typeCheckStmts stmts of Right () -> stmts Left err -> error $ "Type Error: " ++ err...
e88f1cc6b8a6f8135fee9cb29057a5b110f8f319008014bbb8af42b2d9d27b97
jbclements/RSound
test-make-tone.rkt
#lang racket (module+ test (require "../main.rkt" "../integral-cycles.rkt" rackunit rackunit/text-ui) (run-tests (test-suite "make-tone" (let () ;; tests of integral-cycles: (check-equal? (cycles-to-use 441 44100.0) 1) (check-equal? (cycles-to...
null
https://raw.githubusercontent.com/jbclements/RSound/c699db1ffae4cf0185c46bdc059d7879d40614ce/rsound/test/test-make-tone.rkt
racket
tests of integral-cycles: this is a performance test, to see whether caching and caching of cycles is working correctly.
#lang racket (module+ test (require "../main.rkt" "../integral-cycles.rkt" rackunit rackunit/text-ui) (run-tests (test-suite "make-tone" (let () (check-equal? (cycles-to-use 441 44100.0) 1) (check-equal? (cycles-to-use 440 44100.0) 22) (check-...
bd8c11fdced73cda4a1bdc807ef683b3671e67ea78ac1648a815e4547e9701d1
oakes/play-clj-examples
project.clj
(defproject super-koalio "0.0.1-SNAPSHOT" :description "FIXME: write description" :dependencies [[com.badlogicgames.gdx/gdx "1.9.3" :use-resources true] [com.badlogicgames.gdx/gdx-backend-android "1.9.3"] [com.badlogicgames.gdx/gdx-box2d "1.9.3"] [com.badlogicga...
null
https://raw.githubusercontent.com/oakes/play-clj-examples/449a505a068faeeb35d4ee4622c6a05e3fff6763/super-koalio/android/project.clj
clojure
Specify the path to your private keystore and the the alias of the key you want to sign APKs with. :keystore-path "/home/user/.android/private.keystore" :key-alias "mykeyalias" Specify the path to the Android SDK directory either here or in your ~/.lein/profiles.clj file. :sdk-path "/home/user/path/to/android-s...
(defproject super-koalio "0.0.1-SNAPSHOT" :description "FIXME: write description" :dependencies [[com.badlogicgames.gdx/gdx "1.9.3" :use-resources true] [com.badlogicgames.gdx/gdx-backend-android "1.9.3"] [com.badlogicgames.gdx/gdx-box2d "1.9.3"] [com.badlogicga...
07b3be5de04087fc69accc6989936252070a42dff3e5fc31c7868cbd53a8b924
ekmett/coda
Meta2.hs
module Meta2 where data Neutral = S0 | S1 !Term | S2 !Term !Term | K0 | K1 !Term | I0 deriving Show data Term = N Neutral | A Neutral !Term !Term instance Show Term where showsPrec d (N l) = showsPrec d l showsPrec d (A _ l r) = showParen (d > 10) $ showString "A " . showsPrec 11 l . showChar ' ' . showsPrec 11 r...
null
https://raw.githubusercontent.com/ekmett/coda/bca7e36ab00036f92d94eb86298712ab1dbf9b8d/ref/ski/Meta2.hs
haskell
SK=KI application with opportunistic optimization SK=KI
module Meta2 where data Neutral = S0 | S1 !Term | S2 !Term !Term | K0 | K1 !Term | I0 deriving Show data Term = N Neutral | A Neutral !Term !Term instance Show Term where showsPrec d (N l) = showsPrec d l showsPrec d (A _ l r) = showParen (d > 10) $ showString "A " . showsPrec 11 l . showChar ' ' . showsPrec 11 r...
d474bf8143811792f5fdee9854c31d377c03b5536a3128b031260c1c5d6056a0
nibbula/yew
parse-util-test.lisp
;;; parse-util-test.lisp - Tests for parse - util ;;; (defpackage :parse-util-test (:documentation "Tests for parse-util") (:use :cl :test :parse-util) (:export #:run )) (in-package :parse-util-test) (defmacro parse-eq (value expr) `(multiple-value-bind (status result) ,expr (and status (equal re...
null
https://raw.githubusercontent.com/nibbula/yew/8ce7130b1d6c58fe44a38ed58a1f59285a71935c/lib/parse-util-test.lisp
lisp
This is so we can distinguish between relative and absolute paths. End
parse-util-test.lisp - Tests for parse - util (defpackage :parse-util-test (:documentation "Tests for parse-util") (:use :cl :test :parse-util) (:export #:run )) (in-package :parse-util-test) (defmacro parse-eq (value expr) `(multiple-value-bind (status result) ,expr (and status (equal result ,va...
938dd8ad98414842b53bc05698c1bc458ee3cca59abfeba4d4897caadc489b39
ocsigen/lwt
test_lwt_engine.ml
This file is part of Lwt , released under the MIT license . See LICENSE.md for details , or visit . details, or visit . *) open Test open Lwt.Infix let selection_tests = [ test "libev: default when enabled in build bot" (fun () -> if not Lwt_config._HAVE_LIBEV then Lwt.return_true else ...
null
https://raw.githubusercontent.com/ocsigen/lwt/aa9d18a550da444e1a889867dad52a32f162b262/test/unix/test_lwt_engine.ml
ocaml
The test itself is already running under Lwt_main.run, so we just have to call it once and make sure we get an exception. Make sure we are running in a callback called by Lwt_main.run, not synchronously when the testing executable is loaded.
This file is part of Lwt , released under the MIT license . See LICENSE.md for details , or visit . details, or visit . *) open Test open Lwt.Infix let selection_tests = [ test "libev: default when enabled in build bot" (fun () -> if not Lwt_config._HAVE_LIBEV then Lwt.return_true else ...
1c280e27d7a611dcb79f8ade0ee076bb6c0f6ab66173d2188f9a4443623b0f76
bcc32/advent-of-code
a.ml
open! Core let rec dfs grid i j di dj back ~f = let turn () = match [ i - 1, j; i, j - 1; i, j + 1; i + 1, j ] |> List.filter ~f:(fun (x, y) -> 0 <= x && x < Array.length grid && 0 <= y && y < String.length grid.(x)) |> List.filter ~f:(fun (x, y) -> not ([%equal: (int * int) opt...
null
https://raw.githubusercontent.com/bcc32/advent-of-code/653c0f130e2fb2f599d4e76804e02af54c9bb19f/2017/19/a.ml
ocaml
done
open! Core let rec dfs grid i j di dj back ~f = let turn () = match [ i - 1, j; i, j - 1; i, j + 1; i + 1, j ] |> List.filter ~f:(fun (x, y) -> 0 <= x && x < Array.length grid && 0 <= y && y < String.length grid.(x)) |> List.filter ~f:(fun (x, y) -> not ([%equal: (int * int) opt...
f7f85aabb47e1c3fa198c554c809165458901f9602330599f7cf079b34a6f876
ygmpkk/house
MemRegion.hs
| Memory regions for memory - mapped IO and other reserved memory ( section 3.4 in the paper ) module H.MemRegion( H, withTempRegion , pokeByteOff,peekByteOff,pokeElemOff,peekElemOff,moveBytes,copyArray, fillRegion,pokeArray, uncheckedPokeElemOff, Storable,SafePtr,safePtr,peek,pok...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/kernel/H/MemRegion.hs
haskell
* Deprecated ------------------------ INTERFACE ------------------------------------------- -- Memory regions ---- unsafe! withTempRegion :: Size -> (MemRegion->H ()) -> H () It's unsafe to return the temporary region. - Accessing a memory region, requires dynamic safety checks: unsafe! - Accessing memory with signe...
| Memory regions for memory - mapped IO and other reserved memory ( section 3.4 in the paper ) module H.MemRegion( H, withTempRegion , pokeByteOff,peekByteOff,pokeElemOff,peekElemOff,moveBytes,copyArray, fillRegion,pokeArray, uncheckedPokeElemOff, Storable,SafePtr,safePtr,peek,pok...
a6072ab640dc074e487da82883a63671db473f8e10ed5b197cd8e012a5bfa1de
tek/chiasma
ProcessError.hs
module Chiasma.Data.ProcessError where data ProcessError = Terminated Text deriving stock (Eq, Show)
null
https://raw.githubusercontent.com/tek/chiasma/51751e19a416a9afe12f7797df8a67990b266240/packages/chiasma/lib/Chiasma/Data/ProcessError.hs
haskell
module Chiasma.Data.ProcessError where data ProcessError = Terminated Text deriving stock (Eq, Show)
10f325e583476f0e8b4bd2be4fc37f22ead597af37b91125fbefeb79650c7fb7
mbj/stratosphere
CloudWatchDestinationProperty.hs
module Stratosphere.SES.ConfigurationSetEventDestination.CloudWatchDestinationProperty ( module Exports, CloudWatchDestinationProperty(..), mkCloudWatchDestinationProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/ses/gen/Stratosphere/SES/ConfigurationSetEventDestination/CloudWatchDestinationProperty.hs
haskell
# SOURCE #
module Stratosphere.SES.ConfigurationSetEventDestination.CloudWatchDestinationProperty ( module Exports, CloudWatchDestinationProperty(..), mkCloudWatchDestinationProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import...
ada2ff384cc53fe89d8b86ebcdbc9fa71e9475e72cd02a31ef1f90d7e5bdfe49
josefs/Gradualizer
map_literal.erl
-module(map_literal). -export([f/0]). -spec f() -> ok. f() -> #{apa => bepa}.
null
https://raw.githubusercontent.com/josefs/Gradualizer/208f5816b0157f282212fc036ba7560f0822f9fc/test/should_fail/map_literal.erl
erlang
-module(map_literal). -export([f/0]). -spec f() -> ok. f() -> #{apa => bepa}.
33bfe90530f21463f60ae3af7a71cace23464025a110fce6758a64da3bb4bd15
AdRoll/rebar3_format
long_specs.erl
-module(long_specs). -compile(export_all). -callback handle_call(term(), {pid(), reference()}, state()) -> {reply, Reply, state()} | {stop, unexpected_call, state()} when Reply :: ok | {error, {already_registered, pid()}}. -spec handle_call(term(), {pid(), reference()}, state()) -> {reply, Reply, state()} | {stop, ...
null
https://raw.githubusercontent.com/AdRoll/rebar3_format/5ffb11341796173317ae094d4e165b85fad6aa19/test_app/src/long_specs.erl
erlang
-module(long_specs). -compile(export_all). -callback handle_call(term(), {pid(), reference()}, state()) -> {reply, Reply, state()} | {stop, unexpected_call, state()} when Reply :: ok | {error, {already_registered, pid()}}. -spec handle_call(term(), {pid(), reference()}, state()) -> {reply, Reply, state()} | {stop, ...
8b67f12085e77b4f66677c13e40db02676d4976d6791f7022d72ee480d44c0c9
aeternity/mnesia_leveled
mnesia_leveled_conv_bigtab.erl
%%---------------------------------------------------------------- Copyright ( c ) 2013 - 2016 Klarna AB %% 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 License at %% %% ...
null
https://raw.githubusercontent.com/aeternity/mnesia_leveled/11c480b5546ed6087ae688e8596bd596a1f7bdd1/test/mnesia_leveled_conv_bigtab.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 permissions an...
Copyright ( c ) 2013 - 2016 Klarna AB 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(mnesia_leveled_conv_bigtab). -e...
a81e61b7a1c78f967bd8b4f22b1e79b019f952af1c00d722a5dd5ec89189cab8
janestreet/memtrace_viewer_with_deps
test_day_of_week.ml
open! Core_kernel open! Import open! Day_of_week let num_days_in_week = 7 let%test_module "Day_of_week.V1" = (module Stable_unit_test.Make (struct include Stable.V1 let equal = [%compare.equal: t] let tests = [ Sun, "SUN", "\000" ; Mon, "MON", "\001" ; Tue, "TUE", "...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/core_kernel/test/src/test_day_of_week.ml
ocaml
open! Core_kernel open! Import open! Day_of_week let num_days_in_week = 7 let%test_module "Day_of_week.V1" = (module Stable_unit_test.Make (struct include Stable.V1 let equal = [%compare.equal: t] let tests = [ Sun, "SUN", "\000" ; Mon, "MON", "\001" ; Tue, "TUE", "...
960fc5458f83f0ffe5248524b06a2a06f5073cc870d5b628f39ae4f7ec82b203
ndmitchell/shake
Cache.hs
module Test.Cache(main) where import Development.Shake import Development.Shake.FilePath import System.Directory import Data.Char import Test.Type main = testBuild test $ do vowels <- newCache $ \file -> do src <- readFile' file liftIO $ appendFile "trace.txt" "1" pure $ length $ filter ...
null
https://raw.githubusercontent.com/ndmitchell/shake/1e8c1db2a55b70c1e2ba404c1eb476c7b6d9c8ac/src/Test/Cache.hs
haskell
Bug fixed in
module Test.Cache(main) where import Development.Shake import Development.Shake.FilePath import System.Directory import Data.Char import Test.Type main = testBuild test $ do vowels <- newCache $ \file -> do src <- readFile' file liftIO $ appendFile "trace.txt" "1" pure $ length $ filter ...
8c5f9e7fc13a4fce67b710314040947037991c7a9b831a8aa2757b409dd19a19
jesperes/aoc_erlang
aoc2017_day14.erl
-module(aoc2017_day14). -behavior(aoc_puzzle). -include_lib("eunit/include/eunit.hrl"). -export([parse/1, solve1/1, solve2/1, info/0]). -include("aoc_puzzle.hrl"). -spec info() -> aoc_puzzle(). info() -> #aoc_puzzle{module = ?MODULE, year = 2017, day = 14, name = ...
null
https://raw.githubusercontent.com/jesperes/aoc_erlang/14c654288993c54f5385956bc6c8cecce3c1d6c3/src/2017/aoc2017_day14.erl
erlang
-module(aoc2017_day14). -behavior(aoc_puzzle). -include_lib("eunit/include/eunit.hrl"). -export([parse/1, solve1/1, solve2/1, info/0]). -include("aoc_puzzle.hrl"). -spec info() -> aoc_puzzle(). info() -> #aoc_puzzle{module = ?MODULE, year = 2017, day = 14, name = ...
2574b3ac67aca7a143949ba995dbc7df42b056fa4122d78cec461d3dec932554
joearms/elib1
elib1_mysql.erl
Copyright ( c ) 2006 - 2009 See MIT - LICENSE for licensing information . -module(elib1_mysql). %% File: mysql2.erl %% Description: MySQL driver Started : 4 Aug 2005 Time - stamp : < 2009 - 09 - 22 21:04:13 joe > Notes Origonal author : Origonal Copyright : ( c ) 2001 - 2004 Ku...
null
https://raw.githubusercontent.com/joearms/elib1/d617d0ec70a058ef102749eadf51c024444c28d9/src/elib1_mysql.erl
erlang
File: mysql2.erl Description: MySQL driver Testing: 1) You have to provide your own password module like this -module(password). username(mysql) -> "<User>". password(mysql) -> "<Password>". 2) You must me able to access mysql with the above username and passwo...
Copyright ( c ) 2006 - 2009 See MIT - LICENSE for licensing information . -module(elib1_mysql). Started : 4 Aug 2005 Time - stamp : < 2009 - 09 - 22 21:04:13 joe > Notes Origonal author : Origonal Copyright : ( c ) 2001 - 2004 Kungliga Tekniska Högskolan Modifications : < > ...
45e606d79ea98eb28961f260b2865ff916dcd48b5f810dd6a2be479baac60299
tuura/graph-visualisation
Visualise.hs
----------------------------------------------------------------------------- -- | -- Module: Visualise -- Description : Provides a series of functions for drawing algebraic graphs. Copyright : ( c ) 2018 -- Provides two graph drawing functions - ' drawGraph ' and ' drawGraph '' - that -- can invoke various grap...
null
https://raw.githubusercontent.com/tuura/graph-visualisation/5609ec225de197d25283e15057a7bcdfbfc280bb/src/Visualise.hs
haskell
--------------------------------------------------------------------------- | Module: Visualise Description : Provides a series of functions for drawing algebraic graphs. can invoke various graph drawing functions depending on their 'Method' parameter. 'drawGraph' draws a graph with default settings whereas 'dra...
Copyright : ( c ) 2018 Provides two graph drawing functions - ' drawGraph ' and ' drawGraph '' - that The five graph drawing ' Method 's defined for ' Method ' can be used for both drawing functions , apart from ' ExpressionTree ' which can only be used for " Visualise . ExpressionTree " . " Visualise . G...
992e4f758bce263d5a5f09394e5fd39af556ab2628515549029f6afe53df6037
mokus0/junkbox
NewtypeInlining.hs
module NewtypeInlining where import Unsafe.Coerce newtype Foo a = Foo a deriving (Eq, Show) data FunctOr a = Nil | Cons a (FunctOr a) | WhoKnows a [Either a (FunctOr [a])] deriving (Eq, Show) instance Functor FunctOr where fmap f Nil = Nil fmap f (Cons a b) = Cons (f a) (fmap f b) fmap f...
null
https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/TypeExperiments/NewtypeInlining.hs
haskell
question - does foo automatically become bar when compiling? what about unFoo? eep?
module NewtypeInlining where import Unsafe.Coerce newtype Foo a = Foo a deriving (Eq, Show) data FunctOr a = Nil | Cons a (FunctOr a) | WhoKnows a [Either a (FunctOr [a])] deriving (Eq, Show) instance Functor FunctOr where fmap f Nil = Nil fmap f (Cons a b) = Cons (f a) (fmap f b) fmap f...
c25b3ab30e753fbced3e29d500025e879ae7157f12d67f11500555c54efbd9fb
tonymorris/geo-osm
Changeset.hs
# LANGUAGE FlexibleInstances , MultiParamTypeClasses # | The @changeset@ element of a OSM file . module Data.Geo.OSM.Changeset ( Changeset , changeset ) where import Text.XML.HXT.Arrow.Pickle import Data.Geo.OSM.Tag import Data.Geo.OSM.Lens.TagsL import Control.Lens.Lens import Control.Newtype | The @changeset...
null
https://raw.githubusercontent.com/tonymorris/geo-osm/776542be2fd30a05f0f9e867128eca5ad5d66bec/src/Data/Geo/OSM/Changeset.hs
haskell
| Constructs a @changeset@ with tags. ^ The list of tags (@tag@ elements).
# LANGUAGE FlexibleInstances , MultiParamTypeClasses # | The @changeset@ element of a OSM file . module Data.Geo.OSM.Changeset ( Changeset , changeset ) where import Text.XML.HXT.Arrow.Pickle import Data.Geo.OSM.Tag import Data.Geo.OSM.Lens.TagsL import Control.Lens.Lens import Control.Newtype | The @changeset...
29078c5b27031c1e2de98abb859b0c81017d1d06c159423198ee6cfd4b97d602
lamdu/lamdu
Expression.hs
# LANGUAGE TemplateHaskell , TypeFamilies , MultiParamTypeClasses , UndecidableInstances , DataKinds , GADTs , ConstraintKinds , FlexibleInstances # module Lamdu.Sugar.Types.Expression ( Expr, Body , Term(..) , _BodyLam, _BodyLabeledApply, _BodySimpleApply , _BodyRecord, _BodyFragment, _BodyLeaf...
null
https://raw.githubusercontent.com/lamdu/lamdu/2ff69bf3abfa1f2d512265919210176cda94e48e/src/Lamdu/Sugar/Types/Expression.hs
haskell
Binders Holes Fragments If/else Record & Cases Returns whether fragment were added or removed TODO: func + specialArgs into a single sum type so that field order | An expression marked for transformation. Holds an expression to be transformed but acts like a hole. An option to apply (with a hole). See commen...
# LANGUAGE TemplateHaskell , TypeFamilies , MultiParamTypeClasses , UndecidableInstances , DataKinds , GADTs , ConstraintKinds , FlexibleInstances # module Lamdu.Sugar.Types.Expression ( Expr, Body , Term(..) , _BodyLam, _BodyLabeledApply, _BodySimpleApply , _BodyRecord, _BodyFragment, _BodyLeaf...
f3ece0b3e318014873096550b3a6b1036eb56ecfbcd5792f2d9cef2be4c457a7
Liqwid-Labs/liqwid-plutarch-extra
Script.hs
module Plutarch.Extra.Script (applyArguments) where import Control.Lens (over) import Plutarch.Script (Script (Script)) import PlutusCore.Data qualified as PLC import PlutusCore.MkPlc qualified as PLC import UntypedPlutusCore qualified as UPLC | Applys ' Data ' to Script @since 3.20.0 @since 3.20.0 -} apply...
null
https://raw.githubusercontent.com/Liqwid-Labs/liqwid-plutarch-extra/79604ece6d24c1e5d6e11c02e88f9e7907a19399/src/Plutarch/Extra/Script.hs
haskell
module Plutarch.Extra.Script (applyArguments) where import Control.Lens (over) import Plutarch.Script (Script (Script)) import PlutusCore.Data qualified as PLC import PlutusCore.MkPlc qualified as PLC import UntypedPlutusCore qualified as UPLC | Applys ' Data ' to Script @since 3.20.0 @since 3.20.0 -} apply...
88b665032ef8faea022db02bb4fbe063f5c75a228c5ecbe7fe197e0c7c54920a
larcenists/larceny
16with-win3.scm
(bits 16) (text (label foo (ret)) (label bar (ret)) (if (while (!= ax 3) (seq (pop ax) (inc ax) (< ax 10))) (with-win bar (alt z! a!)) (with-win foo (push bx)))) 00000000 C3 ret 00000001 C3 ret 00000002 EB07 short 0xb ...
null
https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/tests/prims16/16with-win3.scm
scheme
00000006 3D0A00 cmp ax,0xa
(bits 16) (text (label foo (ret)) (label bar (ret)) (if (while (!= ax 3) (seq (pop ax) (inc ax) (< ax 10))) (with-win bar (alt z! a!)) (with-win foo (push bx)))) 00000000 C3 ret 00000001 C3 ret 00000002 EB07 short 0xb ...
a777275a0c07edf0aab17aba0282c4be62a9a62ca0a094d87174cb3714a880d1
Hendekagon/clique
core.clj
(ns clique.core " Function dependency graph generation " (:require [clojure.tools.namespace.find :as nsf] [clojure.java.io :as io] [loom [graph :as lg] [attr :as la] [io :as lio]])) (defn get-namespace-forms [filename] (let [read-params {:eof nil}] (with-open [r (java.io...
null
https://raw.githubusercontent.com/Hendekagon/clique/29859d561e27d4e6b9444798f385a7840a259a52/src/clj/clique/core.clj
clojure
(ns clique.core " Function dependency graph generation " (:require [clojure.tools.namespace.find :as nsf] [clojure.java.io :as io] [loom [graph :as lg] [attr :as la] [io :as lio]])) (defn get-namespace-forms [filename] (let [read-params {:eof nil}] (with-open [r (java.io...
fc3a775c9a82203286024b35e0dd665c9e4abedf8f2f96c70e474bc1777138c4
donaldsonjw/bigloo
evutils.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / runtime / Eval / evutils.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/runtime/Eval/evutils.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * Utility functions for eval */ *===========================...
* serrano / prgm / project / bigloo / runtime / Eval / evutils.scm * / * Author : * / * Creation : Fri Jul 30 08:07:53 2010 * / * Last change : Sat Sep 7 09:28:41 2013 ( serrano ) * / * Cop...
e606b6c20496b5bda45eeab8ebfd62fe55b7f68d58e3d5eaa47b1b78f86e1b41
wdhowe/telegrambot-lib
project.clj
(defproject telegrambot-lib "2.5.0" :description "A library for interacting with the Telegram Bot API." :url "-lib" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "-2.0/"} :dependencies [[clj-http "3.12.3"] [environ "1.2.0"] [org.clo...
null
https://raw.githubusercontent.com/wdhowe/telegrambot-lib/1ec60bd8fa6d83a9057933a4d04254cbe0b6d4d6/project.clj
clojure
only edit :profiles/* in profiles.clj logback-classic must be 1.3.x due to jdk8 support. See: -lib/pull/120/commits/015d31621a3fd5a7f69dcf7c230d76d55f7a47c1
(defproject telegrambot-lib "2.5.0" :description "A library for interacting with the Telegram Bot API." :url "-lib" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "-2.0/"} :dependencies [[clj-http "3.12.3"] [environ "1.2.0"] [org.clo...
698ccc33a8deef6cde0d045eb0d5e8f6e2cc56704df0f8ec1cbf8594db83e983
acieroid/scala-am
fermat.scm
Fermat and Solovay - Strassen primality testing in Scheme . Author : ;; Site: / Mathematical support . square(x ) = x^2 (define (square x) (* x x)) ; modulo-power: a fast modular exponentiation routine. ; modulo-power(base,exp,n) = base^exp [mod n] (define (modulo-power base exp n) (if (= exp 0) ...
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/WeiChenRompf2019/fermat.scm
scheme
Site: / modulo-power: a fast modular exponentiation routine. modulo-power(base,exp,n) = base^exp [mod n] Random number utilities. (define (random-char) (call-with-input-file "/dev/random" (lambda (port) (read-char port)))) (define (random-num) (let ((n (char->integer (random-char)))) (rando...
Fermat and Solovay - Strassen primality testing in Scheme . Author : Mathematical support . square(x ) = x^2 (define (square x) (* x x)) (define (modulo-power base exp n) (if (= exp 0) 1 (if (odd? exp) (modulo (* base (modulo-power base (- exp 1) n)) n) (modulo (square (m...
141e6b8cf34d60bad65ae427b7babcbc36a76aae17a4d73e451460c55aba3f0b
tel/serv
Ex1.hs
# LANGUAGE DataKinds # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-} import Data.Aeson (Value (..)) import Data.Maybe (fromMaybe) import Data.Text (Text) import Network.Wai.Handler.Warp (run) import Serv.Api.Prelude import Se...
null
https://raw.githubusercontent.com/tel/serv/7967761d6c47f13f0edd567f8af9b1c7dc8b9a23/serv-wai/exe/Ex1.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE TypeOperators #
# LANGUAGE DataKinds # import Data.Aeson (Value (..)) import Data.Maybe (fromMaybe) import Data.Text (Text) import Network.Wai.Handler.Warp (run) import Serv.Api.Prelude import Serv.Wai.Prelude type RawBody = HasBody '[TextPlain] Text type JSONBody...