_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
904f8959b5a73682caac3af723aab56e2b116450e8202d8da53376f402aed4b9
AlexCharlton/glls
glls-render.scm
(module glls-render (c-prefix define-pipeline export-pipeline) (import chicken scheme) (use (prefix glls glls:) glls-renderable (prefix gl-utils gl:)) (import-for-syntax (prefix glls glls:) (prefix glls-compiler glls:) glls-renderable matchable miscmacros da...
null
https://raw.githubusercontent.com/AlexCharlton/glls/31d1124f8e7a79cea196d6d1228b26e0344c3753/glls-render.scm
scheme
Needs to be defined twice so it can be manipulated upon export (for some reason) glls-render
(module glls-render (c-prefix define-pipeline export-pipeline) (import chicken scheme) (use (prefix glls glls:) glls-renderable (prefix gl-utils gl:)) (import-for-syntax (prefix glls glls:) (prefix glls-compiler glls:) glls-renderable matchable miscmacros da...
dd36a795ab374a524e8ddaa9809cee2184cfd17af94473d188f280bee04c4af1
kmi/irs
ontoweb-ontology-rewrite.lisp
Mode : Lisp ; Package : File created in WebOnto (in-package "OCML") (in-ontology ontoweb-ontology) Automatically translated from RDF file # P"D:/users / jbd2 / code / freaky / rdf - files / ontoweb - data / ontoweb - ontology - rc1.rdfs " at 20:27:57 , on 27/10/2003 (def-class //WWW.ONTOWEB.ORG/EXTENDED\#GEN...
null
https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/ontoweb-ontology/ontoweb-ontology-rewrite.lisp
lisp
Package : complains. Is this a bug in the ontoweb ontology? there's a relate called topic so we don't load the class (def-class //WWW.ONTOWEB.ORG/EXTENDED\#TOPIC)
File created in WebOnto (in-package "OCML") (in-ontology ontoweb-ontology) Automatically translated from RDF file # P"D:/users / jbd2 / code / freaky / rdf - files / ontoweb - data / ontoweb - ontology - rc1.rdfs " at 20:27:57 , on 27/10/2003 (def-class //WWW.ONTOWEB.ORG/EXTENDED\#GENERICONTOLOGY) (def-class /...
24112d3af6a026890b868c478a0cd07e3aaa234c018766e00bae8cc80599ae7b
WorksHub/client
interceptors.cljs
(ns wh.interceptors (:require [re-frame.core :refer [trim-v]])) (def default-interceptors [trim-v])
null
https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/client/env/prod/wh/interceptors.cljs
clojure
(ns wh.interceptors (:require [re-frame.core :refer [trim-v]])) (def default-interceptors [trim-v])
4e0202334a6598e91d891b555de8b0a2de62d0a75445cc69940676756e495a48
slipstream/SlipStreamServer
test_utils.clj
(ns com.sixsq.slipstream.ssclj.resources.deployment.test-utils (:require [clojure.test :refer [deftest is]] [com.sixsq.slipstream.ssclj.resources.deployment.utils :as utils])) (def image-a {:description "descr image-a" :path "root/image-a" :name "image-a" ...
null
https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi-resources/test/com/sixsq/slipstream/ssclj/resources/deployment/test_utils.clj
clojure
:logo {:href "logolink"},
(ns com.sixsq.slipstream.ssclj.resources.deployment.test-utils (:require [clojure.test :refer [deftest is]] [com.sixsq.slipstream.ssclj.resources.deployment.utils :as utils])) (def image-a {:description "descr image-a" :path "root/image-a" :name "image-a" ...
312aadaf93db477c08a2e47e7eca6590570afc8bbed868ded3c4d6b91f3d035f
artyom-poptsov/guile-dsv
rfc4180.scm
rfc4180.scm -- DSV parser for RFC 4180 format . Copyright ( C ) 2015 , 2016 , 2020 < > ;; ;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ;; (at y...
null
https://raw.githubusercontent.com/artyom-poptsov/guile-dsv/ece5701906a900a42ab184b03c8c9e9110b7caa3/modules/dsv/rfc4180.scm
scheme
This program is free software: you can redistribute it and/or modify (at your option) any later version. The program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public ...
rfc4180.scm -- DSV parser for RFC 4180 format . Copyright ( C ) 2015 , 2016 , 2020 < > it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License A parser ...
25295760d563ad02a96790bedde728866ac24532113c8c4c8bc8a800b54a12b7
Perry961002/SICP
exe2.47-frame.scm
框架的一个可能构造函数 (define (make-frame origin edge1 edge2) (list origin edge1 edge2)) (define (origin-frame f) (car f)) (define (edge1-frame f) (cadr f)) (define (edge2-frame f) (caddr f)) 框架的另一个构造函数 (define (make-frame origin edge1 edge2) (cons origin (cons edge1 edge2))) 相应的构造函数 (define (origin-fra...
null
https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap2/exercise/exe2.47-frame.scm
scheme
框架的一个可能构造函数 (define (make-frame origin edge1 edge2) (list origin edge1 edge2)) (define (origin-frame f) (car f)) (define (edge1-frame f) (cadr f)) (define (edge2-frame f) (caddr f)) 框架的另一个构造函数 (define (make-frame origin edge1 edge2) (cons origin (cons edge1 edge2))) 相应的构造函数 (define (origin-fra...
f4faab2aec6e14200903b39f3b8dd4bfca17a8b3f45d31ee63c7b9436b88c834
sionescu/iolib
ex3-server.lisp
(in-package :iolib.examples) This file was originally written by ( ) and this code is released under the same license as IOLib . ;;;; This is a more common-lisp-like style of ex2-server, and to be ;;;; used for the rest of the examples as appropriate. We introduce ;;;; with-open-socket, which does a lot of cle...
null
https://raw.githubusercontent.com/sionescu/iolib/dac715c81db55704db623d8b2cfc399ebcf6175f/examples/ex3-server.lisp
lisp
This is a more common-lisp-like style of ex2-server, and to be used for the rest of the examples as appropriate. We introduce with-open-socket, which does a lot of cleanup on the created socket and ensures it is closed. This is usually the recommended idiom for simple clients. Also in this example we start to han...
(in-package :iolib.examples) This file was originally written by ( ) and this code is released under the same license as IOLib . conditions which can be signaled by IOLib . (defun run-ex3-server-helper (port) (with-open-socket (server :connect :passive :address-family :internet ...
d4df2190668e013716b75c2b6f271d99120054e68031c12f624f441f00181469
unclebob/AdventOfCode2020
core_spec.clj
(ns day1.core-spec (:require [speclj.core :refer :all] [day1.core :refer :all])) (describe "reading input" (it "can read a file of numbers" (spit "t-input" "1\n2\n3\n") (should= [1 2 3] (read-numbers "t-input")) )) (describe "finding pairs that add to" (it "can find a pair" (should= ...
null
https://raw.githubusercontent.com/unclebob/AdventOfCode2020/fc4ba9ad042cbcc48dfa5947373ab46b750d89e5/day1/spec/day1/core_spec.clj
clojure
(ns day1.core-spec (:require [speclj.core :refer :all] [day1.core :refer :all])) (describe "reading input" (it "can read a file of numbers" (spit "t-input" "1\n2\n3\n") (should= [1 2 3] (read-numbers "t-input")) )) (describe "finding pairs that add to" (it "can find a pair" (should= ...
7ac715c4bd26d8305651da29349afee66aeb5aae0269a4c5377969222de298aa
teamwalnut/graphql-ppx
result_decoder.mli
type query_config = { schema : string option; records : bool option; objects : bool option; inline : bool option; template_tag : string option; template_tag_location : string option; template_tag_import : string option; template_tag_return_type : string option; tagged_template : bool option; templat...
null
https://raw.githubusercontent.com/teamwalnut/graphql-ppx/8276452ebe8d89a748b6b267afc94161650ab620/src/graphql_compiler/result_decoder.mli
ocaml
* Takes a list of the AST of the GraphQL definitions (operations or \ fragments) and transforms that into a list of result structures. These result \ structures form the basis to generate the reason code for: - `query` variable - `parse` function - `serialize` function - `makeVariables` function
type query_config = { schema : string option; records : bool option; objects : bool option; inline : bool option; template_tag : string option; template_tag_location : string option; template_tag_import : string option; template_tag_return_type : string option; tagged_template : bool option; templat...
bba087e0c2517fa61013f98994eb74d3245b4c5adc404d6d86c894c8676058a3
yurug/ocaml4.04.0-copatterns
testing.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/yurug/ocaml4.04.0-copatterns/b3ec6a3cc203bd2cde3b618546d29e10f1102323/testsuite/lib/testing.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 2006 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Scanf;; let all_tests_ok = ref true;; let finish () = match !all_tests_ok with | true -> ...
a6b1ce15729c171528f4b7ead65123411416c0a2e74293d95c09c275d3a50108
kennknowles/aspcc
AstRun.mli
(** ASP/VbScript runtimes and customization/module loader *) open VbTypes type runtime = (AspAst.statement, AspAst.rvalue) Runtime.t val create_runtime : unit -> runtime * { 6 Execution entry points } (** Runs a whole page, or list of statements *) val page : runtime -> AspAst.page -> unit (** Runs a single state...
null
https://raw.githubusercontent.com/kennknowles/aspcc/951a91cc21e291b1d3c750bbbca7fa79209edd08/runtime/AstRun.mli
ocaml
* ASP/VbScript runtimes and customization/module loader * Runs a whole page, or list of statements * Runs a single statement * Evaluates a single expression. If [return_object] is [true], then it will return a raw object, otherwise it will evaluate default properties until a non-object is obtained.
open VbTypes type runtime = (AspAst.statement, AspAst.rvalue) Runtime.t val create_runtime : unit -> runtime * { 6 Execution entry points } val page : runtime -> AspAst.page -> unit val statement : runtime -> AspAst.statement -> unit val expression : runtime -> ?return_object:bool -> AspAst.rvalue -> value_t ref...
88d6ba4df2e1429741fe6934d3f3c25f477f8a2404f2c2a97ad112cefafb5f72
ajhc/ajhc
T2572.hs
# LANGUAGE RankNTypes , ScopedTypeVariables # Trac # 2572 module Foo where type GTypeFun = forall a . a -> () gmapType :: Int -> GTypeFun gmapType _ (_ :: a) = undefined
null
https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/regress/tests/1_typecheck/2_pass/ghc/T2572.hs
haskell
# LANGUAGE RankNTypes , ScopedTypeVariables # Trac # 2572 module Foo where type GTypeFun = forall a . a -> () gmapType :: Int -> GTypeFun gmapType _ (_ :: a) = undefined
4caf57ff7c6ec0f8e0bcaa490fe778216767cbaed845355d645d43ab178d46da
clojure-interop/google-cloud-clients
Storage.clj
(ns com.google.cloud.storage.Storage "An interface for Google Cloud Storage." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.storage Storage])) (defn update-acl "Updates an ACL entry on the specified bucket. Example of updating a new ACL entry on a bucket. String bucketNa...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.storage/src/com/google/cloud/storage/Storage.clj
clojure
// returns get result or throws StorageException
(ns com.google.cloud.storage.Storage "An interface for Google Cloud Storage." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.storage Storage])) (defn update-acl "Updates an ACL entry on the specified bucket. Example of updating a new ACL entry on a bucket. Example of upd...
6388bf7115321ea7778535ffda285102b5cd85f44ae027eb95596dd8dfff4688
DKurilo/hackerrank
solution.hs
# LANGUAGE OverloadedStrings , UnicodeSyntax # module Main where import Prelude.Unicode import Control.Monad import qualified Data.ByteString.Char8 as BSC import qualified Data.Map as DM import Debug.Trace import System.IO data Result = WIN | LOSE deriving (Show, Eq, Ord) data Player = A | B deriving (Show,...
null
https://raw.githubusercontent.com/DKurilo/hackerrank/37063170567b397b25a2b7123bc9c1299d34814a/bitter-chocolate/solution.hs
haskell
# LANGUAGE OverloadedStrings , UnicodeSyntax # module Main where import Prelude.Unicode import Control.Monad import qualified Data.ByteString.Char8 as BSC import qualified Data.Map as DM import Debug.Trace import System.IO data Result = WIN | LOSE deriving (Show, Eq, Ord) data Player = A | B deriving (Show,...
24bebcddc2f251d8e90692d1c881fb42ba8c86eeaf6b03f707b9f0633f17cb29
sboehler/beans
Main.hs
module Main where import qualified Beans.Command.Balance as Balance import qualified Beans.Command.Fetch as Fetch import qualified Beans.Command.Import as Import import qualified Beans.Command.Infer as Infer import qualified Beans.Command.Transcode as Transcode import Beans.Commodity (Commodity) import Beans.Date (Dat...
null
https://raw.githubusercontent.com/sboehler/beans/897fc30a602f49906eb952c4fd5c8c0bf05a6beb/app/Main.hs
haskell
module Main where import qualified Beans.Command.Balance as Balance import qualified Beans.Command.Fetch as Fetch import qualified Beans.Command.Import as Import import qualified Beans.Command.Infer as Infer import qualified Beans.Command.Transcode as Transcode import Beans.Commodity (Commodity) import Beans.Date (Dat...
2238f988d4a08230ce6ca19360f8a936443bb76af2b0f7f4504b3b63ff54ef7c
jeapostrophe/exp
letwreck.rkt
#lang racket/base (require (except-in rackunit fail) racket/list) (define f #f) (define-syntax-rule (function=? a b) (begin (set! f a) (equal? (quote a) (quote b)))) (check-false (function=? (λ (x) (+ x 1)) (λ (x) (add1 x)))) (check-equal? (f 1) 2) (define q (quote (λ (x) (+ x 1)))...
null
https://raw.githubusercontent.com/jeapostrophe/exp/43615110fd0439d2ef940c42629fcdc054c370f9/letwreck.rkt
racket
a diversion on success & failure continuations alpha renaming binding specifications this is bound here | | v v <-- this is bound here <- these are bound everywhere inside the jletrec
#lang racket/base (require (except-in rackunit fail) racket/list) (define f #f) (define-syntax-rule (function=? a b) (begin (set! f a) (equal? (quote a) (quote b)))) (check-false (function=? (λ (x) (+ x 1)) (λ (x) (add1 x)))) (check-equal? (f 1) 2) (define q (quote (λ (x) (+ x 1)))...
6f8966885e1cb82fc730c7a9eadcdcbb9443d99c7689178f3d06f922af12358d
Verites/verigraph
Derivation.hs
module Abstract.Rewriting.DPO.Derivation ( Derivation(..) , generateDerivation , getDObjects , getAllBottomObjects , getLeftBottomMorphisms , getRightBottomMorphisms ) where import Abstract.Category import Abstract.Rewriting.DPO data Derivation morph = Derivation { production :: Production morp...
null
https://raw.githubusercontent.com/Verites/verigraph/754ec08bf4a55ea7402d8cd0705e58b1d2c9cd67/src/library/Abstract/Rewriting/DPO/Derivation.hs
haskell
module Abstract.Rewriting.DPO.Derivation ( Derivation(..) , generateDerivation , getDObjects , getAllBottomObjects , getLeftBottomMorphisms , getRightBottomMorphisms ) where import Abstract.Category import Abstract.Rewriting.DPO data Derivation morph = Derivation { production :: Production morp...
bf2bc514ec4f25edf2cef5790abc81f25133982b43b1fc8f12aa80ac98bf8ee7
ocaml-flambda/ocaml-jst
env.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/7e5a626e4b4e12f1e9106564e1baba4d0ef6309a/typing/env.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 Cmi_format open Misc open Asttypes open Longident open Path open Types open Local_store module St...
7008e9c6c45b3adf5357007b07b8b38775d2b42309f719945b60e45c72348b5a
smudgelang/smudge
NoTargetAnyStates.hs
Copyright 2019 and . -- This software is released under the 3-Clause BSD License. -- The license can be viewed at # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TypeFamilies # module Language.Smudge.Passes.NoTargetAnyStates ( NoTargetAnyStates ) where import Language.Smudge.Grammar ( StateMachine(...
null
https://raw.githubusercontent.com/smudgelang/smudge/c4f4fc3c7e6344fb0dd39d4679752120c7ff83da/src/Language/Smudge/Passes/NoTargetAnyStates.hs
haskell
This software is released under the 3-Clause BSD License. The license can be viewed at
Copyright 2019 and . # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TypeFamilies # module Language.Smudge.Passes.NoTargetAnyStates ( NoTargetAnyStates ) where import Language.Smudge.Grammar ( StateMachine(StateMachine), WholeState, State(State), ) import Language.Smudge.Parsers.Id (at) ...
1fd305c92de3a53e5b6c43d00370b4054549c27546dc96f72fafbd9bb49d8f46
2600hz/kazoo
kazoo_config_app.erl
%%%----------------------------------------------------------------------------- ( C ) 2010 - 2020 , 2600Hz %%% @doc @author This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %%% %%% @end...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_config/src/kazoo_config_app.erl
erlang
----------------------------------------------------------------------------- @doc @end ----------------------------------------------------------------------------- ============================================================================== Application callbacks =================================================...
( C ) 2010 - 2020 , 2600Hz @author This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(kazoo_config_app). -behaviour(application). -include_lib("kazoo_stdlib/include/kz_types.hrl"...
efebf7b52f2ab08c0a8afad4a43c11d9cbff0674d5ad874f93bd2581ce27ba22
nuprl/gradual-typing-performance
main.rkt
#lang typed/racket stress testing run - t on 100 look ups , plus 5 [ dis|en]ables ;; =================================================================================================== (require require-typed-check) (require (only-in racket/string string-join)) (require/typed "run-t.rkt" [EOM String] ...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/paper/jfp-2016/src/worst-configurations-6.4/mbta/1110/main.rkt
racket
=================================================================================================== run the stress test n times impossible path -- (require/typed contract-profile [contract-profile-thunk (-> (-> Void) Void)]) (contract-profile-thunk main)
#lang typed/racket stress testing run - t on 100 look ups , plus 5 [ dis|en]ables (require require-typed-check) (require (only-in racket/string string-join)) (require/typed "run-t.rkt" [EOM String] [run-t (-> String String)]) (: dat->station-names (-> Path-String (Listof String))) (de...
697355682a0afdf6c79fcf8f3d9f1b66e455356de7f452ce4736e04f085807dd
RichiH/git-annex
GlobalSetter.hs
git - annex global options - - Copyright 2015 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2015 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module CmdLine.GlobalSetter where import Types.DeferredParse import Common import Annex import Opt...
null
https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/CmdLine/GlobalSetter.hs
haskell
git - annex global options - - Copyright 2015 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2015 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module CmdLine.GlobalSetter where import Types.DeferredParse import Common import Annex import Opt...
347f5ca8eec59f8ed39c31371f8ba46a7dabac0cd875bb58326321a5f8230c68
timothypratley/leaderboardx
db_firebase.cljs
(ns algopop.leaderboardx.app.db-firebase (:require [cljs.pprint :as pprint] [algopop.leaderboardx.app.firebase :as firebase] [reagent.core :as reagent] [algopop.leaderboardx.app.firebase-serialization :as s])) (defn unlisten "Stops listening to a query tree." [a t] (.off (:ref @t)) (when-let ...
null
https://raw.githubusercontent.com/timothypratley/leaderboardx/ad1719b3bb49fb7ab495ed833f1a451ebb3aec4d/src/algopop/leaderboardx/app/db_firebase.cljs
clojure
TODO: not quite right (pollutes top level because child returned without key) Need it for information about the nodes TODO: created vs modified TODO: delete old edges!
(ns algopop.leaderboardx.app.db-firebase (:require [cljs.pprint :as pprint] [algopop.leaderboardx.app.firebase :as firebase] [reagent.core :as reagent] [algopop.leaderboardx.app.firebase-serialization :as s])) (defn unlisten "Stops listening to a query tree." [a t] (.off (:ref @t)) (when-let ...
03e5c6038ce12f5e3ee091d3a72013bf9b79be5aa899add3f54b78568d78c622
mtravers/goddinpotty
roam_images.clj
(ns goddinpotty.import.roam-images (:require [org.parkerici.multitool.core :as u] [org.parkerici.multitool.cljcore :as ju] [me.raynes.fs :as fs] [goddinpotty.batadase :as bd] [goddinpotty.rendering :as render] [goddinpotty.utils :as utils] [cloju...
null
https://raw.githubusercontent.com/mtravers/goddinpotty/b0b7f4fe5781a56b226d151d11a25130224bf093/src/goddinpotty/import/roam_images.clj
clojure
Was just images, now will do arbitrary assets like pdfs regardless of where they appear in markdown. TODO if this was block-links-unparsed we could skip parse entirely Now does every content. This might be slow as shit. (roam-image-block? b) avoid confusion More general and stupider version shouldn't happen Now d...
(ns goddinpotty.import.roam-images (:require [org.parkerici.multitool.core :as u] [org.parkerici.multitool.cljcore :as ju] [me.raynes.fs :as fs] [goddinpotty.batadase :as bd] [goddinpotty.rendering :as render] [goddinpotty.utils :as utils] [cloju...
df6b49a37f47f250c54d2b9ecfcd9e23cfabb6938ed85852aa0d4a0c6802d867
input-output-hk/project-icarus-importer
Util.hs
{-# LANGUAGE RankNTypes #-} # LANGUAGE TupleSections # module Util where import Universum import Cardano.Wallet.Client.Http import Control.Lens hiding ((^..), (^?)) import System.IO.Unsafe (unsafePerformIO) import Test.Hspec import Test.QuickCheck (arbitr...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet-new/integration/Util.hs
haskell
# LANGUAGE RankNTypes #
# LANGUAGE TupleSections # module Util where import Universum import Cardano.Wallet.Client.Http import Control.Lens hiding ((^..), (^?)) import System.IO.Unsafe (unsafePerformIO) import Test.Hspec import Test.QuickCheck (arbitrary, generate) type WalletRef...
50b7d9087a59d35ecd51d5ca73a096ae26ddffb37da3d0c35dabd61eb05a4971
drlivingston/kabob
drugbank-skos.clj
;; drugbank id to other chemical id mappings ;; it would be nice if this rule just worked - unfortunately there are errors ;; in the drugbank mappings - they are NOT UNIQUE ;; `{:name "drugbank-drug-exact-mapping-assertion" ;; :head ((?/dbice skos/exactMatch ?/otherice)) ;; :body ;; (~@(kabob/rtv _/record ;; ...
null
https://raw.githubusercontent.com/drlivingston/kabob/7038076849744c959da9c8507e8a8ab7215410aa/kabob-build/src/main/resources/edu/ucdenver/ccp/kabob/build/rules/temp/drugbank-skos/drugbank-skos.clj
clojure
drugbank id to other chemical id mappings it would be nice if this rule just worked - unfortunately there are errors in the drugbank mappings - they are NOT UNIQUE `{:name "drugbank-drug-exact-mapping-assertion" :head ((?/dbice skos/exactMatch ?/otherice)) :body (~@(kabob/rtv _/record iaodrugbank/D...
`{:name "drugbank-drug-exact-mapping-assertion" :head ((?/dbice skos/exactMatch ?/otherice)) :body ((?/fv0 kiao/hasTemplate iaodrugbank/DrugBankDrugRecord_drugBankIdDataField1) (?/fv0 obo/IAO_0000219 ?/dbice) (?/record obo/has_part ?/fv0) (?/record obo/has_part ?/externalfv) (?/externalfv kiao/ha...
290ffaa2bf10e0e772d488de624ffd48f0bdf39b43e8e32d5e8777c09920336c
foreverbell/project-euler-solutions
6.hs
main = print diff where diff = sum1 - sum2 sum1 = (sum [1 .. 100]) ^ 2 sum2 = sum (map (^2) [1 .. 100])
null
https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/6.hs
haskell
main = print diff where diff = sum1 - sum2 sum1 = (sum [1 .. 100]) ^ 2 sum2 = sum (map (^2) [1 .. 100])
d2adedc8a72427790d8842bc71bf952ea57f66c488d9d8a136b3b6ed5555625d
ocaml-flambda/flambda-backend
reload.ml
# 2 "backend/amd64/reload.ml" (**************************************************************************) (* *) (* OCaml *) (* ...
null
https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/83732c05071ed4217d280881a75010f8c99105ef/backend/amd64/reload.ml
ocaml
************************************************************************ OCaml ...
# 2 "backend/amd64/reload.ml" , projet Cristal , INRIA Rocquencourt Copyright 2000 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the [@@@ocaml.warning "+4"] open Cmm open Reg open Mach Summary of instruct...
8f2eb949c796c80aadd5ff0db2d8b1cd7e77bf522b5e02965af050722410bc69
aryx/xix
common.mli
type byte = char type bytes = string type filename = string type dirname = string type ('a, 'b) either = Left of 'a | Right of 'b type compare = Equal | Inf | Sup exception Todo exception Impossible of string val spf : ('a, unit, string) format -> 'a val pr : string -> unit val pr2 : string -> unit val with_file...
null
https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/lib_core/commons/common.mli
ocaml
type byte = char type bytes = string type filename = string type dirname = string type ('a, 'b) either = Left of 'a | Right of 'b type compare = Equal | Inf | Sup exception Todo exception Impossible of string val spf : ('a, unit, string) format -> 'a val pr : string -> unit val pr2 : string -> unit val with_file...
da69b25bd2067da2eff14dc9266edf98fc822c4052c60936ca57e83d7c0095c9
belambert/cl-asr
phoneme-recognition.lisp
Copyright 2010 - 2018 Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; -2.0 ;; Unless required by applicable law or agreed to in writing, software distributed under the L...
null
https://raw.githubusercontent.com/belambert/cl-asr/a734ddb396f18bf4a504e9ecb3c91e507764358c/src/extensions/phoneme-recognition.lisp
lisp
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permis...
Copyright 2010 - 2018 distributed under the License is distributed on an " AS IS " BASIS , (in-package :cl-asr) (defun build-flat-phoneme-fsm (&key ci-only) "Build a flat bigram FSM for recognition by first constructing a pseudo vocab and using that as the list of words that can be recognized." (let ...
36ab74a2c0567666f3d031c3a1fdca4b8c3c0d732d13e42e5ab504b2671e0e92
shayne-fletcher/zen
dates.ml
# load " unix.cma " ; ; # load " str.cma " ; ; # load " calendarLib.cma " ; ; #load "unix.cma";; #load "str.cma";; #load "calendarLib.cma";; *) type t = CalendarLib.Date.t ;; let parse_date : Genlex.token Stream.t -> t = let int = parser [<'Genlex.Int i>]->i in parser [< y = int; m = int; d = int >] -> C...
null
https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/curve/dates.ml
ocaml
In this version, only weekends are holidays.
# load " unix.cma " ; ; # load " str.cma " ; ; # load " calendarLib.cma " ; ; #load "unix.cma";; #load "str.cma";; #load "calendarLib.cma";; *) type t = CalendarLib.Date.t ;; let parse_date : Genlex.token Stream.t -> t = let int = parser [<'Genlex.Int i>]->i in parser [< y = int; m = int; d = int >] -> C...
a8cbc40bf45fee857cd1bdc5136cd2e2c361cb4fda9f375ed56ca1f14e31c8c2
Silvast/valihuuto
migrations.clj
(ns valihuuto.db.migrations (:require [valihuuto.config :refer [config]]) (:import org.flywaydb.core.Flyway)) (def flyway (when-not *compile-files* (-> (Flyway/configure) (.dataSource (:database-url config) nil nil) (.load)))) (defn migrate! [] (.migrate flyway))...
null
https://raw.githubusercontent.com/Silvast/valihuuto/ad7d2cf98eebe4290fdf25479c2ff2865c1770d5/src/valihuuto/db/migrations.clj
clojure
(ns valihuuto.db.migrations (:require [valihuuto.config :refer [config]]) (:import org.flywaydb.core.Flyway)) (def flyway (when-not *compile-files* (-> (Flyway/configure) (.dataSource (:database-url config) nil nil) (.load)))) (defn migrate! [] (.migrate flyway))...
ead8a4a57a727bf4d1a4bb99e0ec93054af416aced6419ac1d42625173020025
GaloisInc/daedalus
VM.hs
{-# Language OverloadedStrings #-} module Daedalus.VM ( module Daedalus.VM , Src.Pattern(..) , Src.FName ) where import Data.Set(Set) import qualified Data.Set as Set import Data.Map(Map) import qualified Data.Map as Map import Data.Text(Text) import Data.ByteString(ByteString) import Daedalus.Panic(panic) im...
null
https://raw.githubusercontent.com/GaloisInc/daedalus/c7f2a6702157a699f88f2a374541dc3b64e106e8/daedalus-vm/src/Daedalus/VM.hs
haskell
# Language OverloadedStrings # | A program | A module | A function ^ True if this is not a parser XXX we need to know the other loop members for inlining ^ Definition for the function, if any ^ Primitive with these arguments ^ Definition | A basic block ^ How many locals we define ^ This block is used for r...
module Daedalus.VM ( module Daedalus.VM , Src.Pattern(..) , Src.FName ) where import Data.Set(Set) import qualified Data.Set as Set import Data.Map(Map) import qualified Data.Map as Map import Data.Text(Text) import Data.ByteString(ByteString) import Daedalus.Panic(panic) import Daedalus.PP import Daedalus.Re...
3c55bc82ce4a01f97f76ee5bcd1a1e06c11a3940181387bc04c0ab44d4a39115
ocaml-sf/learn-ocaml-corpus
bmove_variant.ml
open Seq (* -------------------------------------------------------------------------- *) (* The size of a tree. *) let rec size (t : tree) : int = match t with | TLeaf _ -> 1 | TNonLeaf offspring -> 1 + size_offspring offspring and size_offspring (offspring : offspring) : int = match offspring(...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/alpha_beta/right/bmove_variant.ml
ocaml
-------------------------------------------------------------------------- The size of a tree. -------------------------------------------------------------------------- The height of a tree. -------------------------------------------------------------------------- Evaluating a tree, with a sense parameter:...
open Seq let rec size (t : tree) : int = match t with | TLeaf _ -> 1 | TNonLeaf offspring -> 1 + size_offspring offspring and size_offspring (offspring : offspring) : int = match offspring() with | Nil -> 0 | Cons ((_move, t), offspring) -> size t + size_offspring offspring le...
19570a2052db263e515b9be180130c4cb0b08c5e8830175cf8df84ccac336fb4
CryptoKami/cryptokami-core
Mode.hs
{-# LANGUAGE RankNTypes #-} # LANGUAGE TemplateHaskell # {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} -- | Execution modes for block logic tests. module Test.Pos.Block.Logic.Mode ( TestParams (..) , HasTestParams (..) , TestInitModeContext (..) , BlockTestContextT...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/generator/src/Test/Pos/Block/Logic/Mode.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # | Execution modes for block logic tests. MonadSlots -------------------------------------------------------------------------- Parameters -------------------------------------------------------------------------- | This data type...
# LANGUAGE TemplateHaskell # module Test.Pos.Block.Logic.Mode ( TestParams (..) , HasTestParams (..) , TestInitModeContext (..) , BlockTestContextTag , PureDBSnapshotsVar(..) , BlockTestContext(..) , BlockTestMode , runBlockTestMode , initBlockTestContext...
3da0bf64a0c026858bb4b4bb0ce3cc6c52d2f54d0be7b075e7f863b66ee3a60d
RyanMcG/Cadence
routes.clj
(ns cadence.routes (:require [noir.response :as response] (cemerick [friend :as friend] [drawbridge :as drawbridge]) (compojure [route :as route] [core :refer :all]) [cadence.security :refer [wrap-anonymous-only]] (cadence.views [response-codes :as...
null
https://raw.githubusercontent.com/RyanMcG/Cadence/c7364cba7e2de48c8a0b90f0f4d16a8248c097d4/src/cadence/routes.clj
clojure
(ns cadence.routes (:require [noir.response :as response] (cemerick [friend :as friend] [drawbridge :as drawbridge]) (compojure [route :as route] [core :refer :all]) [cadence.security :refer [wrap-anonymous-only]] (cadence.views [response-codes :as...
8e03444d036c992869394a6ace1a76ea8bec39fc8911a8719586ab68df7c5b2f
Chris00/ANSITerminal
ANSITerminal_unix.ml
File : ANSITerminal_unix.ml Allow colors , cursor movements , erasing , ... under Unix shells . * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright 2004 by Troestler . This library is free softwar...
null
https://raw.githubusercontent.com/Chris00/ANSITerminal/21c434122c376382cc8c0a3cb7c678984b96e1c6/src/ANSITerminal_unix.ml
ocaml
man tty(4) x > 0 FIXME: make it more robust so that it ignores previous key pressed. local use only bail out as soon as enough info is present Query Cursor Position <ESC>[6n Report Cursor Position <ESC>[{ROW};{COLUMN}R Erasing Scrolling
File : ANSITerminal_unix.ml Allow colors , cursor movements , erasing , ... under Unix shells . * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright 2004 by Troestler . This library is free softwar...
ac5bca48eea54df9d2ec9b32974d8717b3f783c930bf3723fdcea7ca3feaf322
pascal-knodel/haskell-craft
E'12'44.hs
-- -- -- ------------------ Exercise 12.44 . ------------------ -- -- -- module E'12'44 where
null
https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/_/links/E'12'44.hs
haskell
---------------- ----------------
Exercise 12.44 . module E'12'44 where
a82b0858261cbe33680c91576f9d2d23d1371b501b12b53f0bb2f3b9f25419ca
ssadler/zeno
Shuffle.hs
module Zeno.Notariser.Shuffle where import Control.Monad import Control.Monad.Reader import Data.Bits import qualified Data.Map as Map import qualified Data.Set as Set import Data.Word import Data.ByteString.Short (unpack) import Data.FixedBytes import Data.Serialize (encode) import Network.Bitcoin (sha256b) import U...
null
https://raw.githubusercontent.com/ssadler/zeno/9f715d7104a7b7b00dee9fe35275fb217532fdb6/src/Zeno/Notariser/Shuffle.hs
haskell
| Shuffle a list using the round seed a random element from the list, it skips random inputs that do not produce of the random inputs, but the selection is unbiased. valid indexes are 0..n-1 mask for neccesary bits take neccesary bits from word skip if not within range | Get high bit from a number | Generate a...
module Zeno.Notariser.Shuffle where import Control.Monad import Control.Monad.Reader import Data.Bits import qualified Data.Map as Map import qualified Data.Set as Set import Data.Word import Data.ByteString.Short (unpack) import Data.FixedBytes import Data.Serialize (encode) import Network.Bitcoin (sha256b) import U...
2c8a7fd8e7d4e9ca257470d3061eb357e507848e7779def3e851365443717006
evrim/core-server
defclass+.lisp
(in-package :core-server) ;; +------------------------------------------------------------------------- ;; | Defining Classes with defclass+ ;; +------------------------------------------------------------------------- (defclass+ a () ((slot-in-the-server :host local :initform "I can win") (slot-in-the-client :ho...
null
https://raw.githubusercontent.com/evrim/core-server/200ea8151d2f8d81b593d605b183a9cddae1e82d/examples/defclass%2B.lisp
lisp
+------------------------------------------------------------------------- | Defining Classes with defclass+ +------------------------------------------------------------------------- { "coreClass": { "slotInTheClient": { "name": 'slotInTheClient', "type": 'primitive', "label": 'Sl...
(in-package :core-server) (defclass+ a () ((slot-in-the-server :host local :initform "I can win") (slot-in-the-client :host remote :initform (jobject :foo "bar" :moo "tar"))) (:ctor make-a)) (let ((a (make-a :slot-in-the-server "win can I"))) (with-js (a) (make-indented-stream *core-output*) ...
81735426ee1db38ea799f9c9c2e3aca3d4c1a0a4df4eac0f8901557fc007c2ed
footprintanalytics/footprint-web
load_and_dump_test.clj
(ns metabase.cmd.load-and-dump-test (:require [clojure.java.io :as io] [clojure.test :refer :all] [metabase.cmd.compare-h2-dbs :as compare-h2-dbs] [metabase.cmd.copy.h2 :as copy.h2] [metabase.cmd.dump-to-h2 :as dump-to-h2] [metabase.cmd.load-from-h2 :as load...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/cmd/load_and_dump_test.clj
clojure
(ns metabase.cmd.load-and-dump-test (:require [clojure.java.io :as io] [clojure.test :refer :all] [metabase.cmd.compare-h2-dbs :as compare-h2-dbs] [metabase.cmd.copy.h2 :as copy.h2] [metabase.cmd.dump-to-h2 :as dump-to-h2] [metabase.cmd.load-from-h2 :as load...
4b10339cfd91a3f669ddbaedcfe24d690da89a7d82c648c0dfc74efea95010c1
fpco/ide-backend
BuildPaths.hs
----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.BuildPaths Copyright : 2003 - 2004 , 2008 -- -- Maintainer : -- Portability : portable -- A bunch of dirs , paths and file names used for intermediate build steps . ...
null
https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/TestSuite/inputs/Cabal-1.14.0/Distribution/Simple/BuildPaths.hs
haskell
--------------------------------------------------------------------------- | Module : Distribution.Simple.BuildPaths Maintainer : Portability : portable --------------------------------------------------------------------------- Build directories and files |The directory in which we put auto-genera...
Copyright : 2003 - 2004 , 2008 A bunch of dirs , paths and file names used for intermediate build steps . All rights reserved . Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : ...
e5125673f06d24d9eec92bdbac74d5cff5205151bb583fa5387656cb53127b85
xtdb/xtdb
project.clj
(defproject com.xtdb.labs/xtdb-http-health-check "<inherited>" :description "XTDB health check server" :plugins [[lein-parent "0.3.8"]] :parent-project {:path "../../project.clj" :inherit [:version :repositories :deploy-repositories :managed-dependencies ...
null
https://raw.githubusercontent.com/xtdb/xtdb/2d7da72e3c3f6023760bc9ebce08fda0362c06c0/labs/http-health-check/project.clj
clojure
(defproject com.xtdb.labs/xtdb-http-health-check "<inherited>" :description "XTDB health check server" :plugins [[lein-parent "0.3.8"]] :parent-project {:path "../../project.clj" :inherit [:version :repositories :deploy-repositories :managed-dependencies ...
036a3c3890d8b80b6f7b6bbb63d77ddc70b85ef4b57912eb968cdb4ca8c7dd73
rabbitmq/rabbitmq-management
rabbit_mgmt_wm_queue_purge.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . %% -module(rabbit_mgmt_wm_queue_purge). -export([in...
null
https://raw.githubusercontent.com/rabbitmq/rabbitmq-management/543906f01ccd0344aff648f21bb6b5156b2a2ca2/src/rabbit_mgmt_wm_queue_purge.erl
erlang
--------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit_mgmt_wm_queue_purge). -export([init/2, ...
711b9af35a85de86d40fa87562dcee56b269cb6699de2bfafb5998f19ed16a40
byorgey/haskell-course
InClass.hs
-- f :: a -> a -> a -- f x y = x + y g : : a - > a - > a g x y = x & & y g x y = case ( ) of Int - > x + y Bool - > x & & y _ - > x g :: a -> a -> a g x y = x && y g x y = case (typeOf x) of Int -> x + y Bool -> x && y _ -> x -} Parametric polymorphism ...
null
https://raw.githubusercontent.com/byorgey/haskell-course/f928cc8031aec2147f037949826134a484414ed6/weeks/05-type-classes/InClass.hs
haskell
f :: a -> a -> a f x y = x + y error "don't call me" Type classes
g : : a - > a - > a g x y = x & & y g x y = case ( ) of Int - > x + y Bool - > x & & y _ - > x g :: a -> a -> a g x y = x && y g x y = case (typeOf x) of Int -> x + y Bool -> x && y _ -> x -} Parametric polymorphism f :: a -> a -> a f x y = y f' :: a -...
a6315f85e90af5e4a04e062071fff27f579185ad29e67584414d6daa8ded8578
lambe-lang/compiler
type_check_test.ml
open Lambe_ast open Lambe_checker let lambe_type = Alcotest.testable Lambe_render.Type.pp ( = ) let should_synthetize_int_type () = let expected = Result.Ok (Type.Variable "int") and computed = Type_check.synthetize () Term.(Literal (Integer 1)) in Alcotest.(check (result lambe_type string)) "should_synthet...
null
https://raw.githubusercontent.com/lambe-lang/compiler/79d7937c06ca30e231855ec4ce99012ca0395cd5/attic/test/checker/type_check_test.ml
ocaml
open Lambe_ast open Lambe_checker let lambe_type = Alcotest.testable Lambe_render.Type.pp ( = ) let should_synthetize_int_type () = let expected = Result.Ok (Type.Variable "int") and computed = Type_check.synthetize () Term.(Literal (Integer 1)) in Alcotest.(check (result lambe_type string)) "should_synthet...
dc4ed318a0b2ff993a26e8a2e1bdf4c4df743974b237af1325c54e7321f7aba6
nasa/Common-Metadata-Repository
service.clj
(ns cmr.indexer.data.concepts.service "Contains functions to parse and convert service and service association concepts." (:require [clojure.string :as string] [cmr.common.mime-types :as mt] [cmr.common.util :as util] [cmr.indexer.data.concept-parser :as concept-parser] [cmr.indexer.data.concepts.ser...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/431c8650185deb23583d4c471b772203fc868fe6/indexer-app/src/cmr/indexer/data/concepts/service.clj
clojure
(ns cmr.indexer.data.concepts.service "Contains functions to parse and convert service and service association concepts." (:require [clojure.string :as string] [cmr.common.mime-types :as mt] [cmr.common.util :as util] [cmr.indexer.data.concept-parser :as concept-parser] [cmr.indexer.data.concepts.ser...
ad24cd75b8921de564c0c3c64f7ac1c1db704f23896d1073521e2412e687f9ca
johnwhitington/ocamli
c.ml
let _ = ()
null
https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/ppx_interpret/example/c.ml
ocaml
let _ = ()
a94780f2000d7f203e4bbad10f92f48809e08c28fef4113ce11dd4d9e9670f57
formal-land/coq-of-ocaml
modules.ml
module List2 = struct type 'a t = | Nil | Cons of 'a * 'a t let rec sum (l : int t) : int = match l with | Nil -> 0 | Cons (x, xs) -> x + sum xs let rec of_list = function | [] -> Nil | x :: xs -> Cons (x, of_list xs) module Inside = struct let x = 12 end end let n _ = List...
null
https://raw.githubusercontent.com/formal-land/coq-of-ocaml/c9c86b08eb19d7fd023f48029cc5f9bf53f6a11c/tests/modules.ml
ocaml
module List2 = struct type 'a t = | Nil | Cons of 'a * 'a t let rec sum (l : int t) : int = match l with | Nil -> 0 | Cons (x, xs) -> x + sum xs let rec of_list = function | [] -> Nil | x :: xs -> Cons (x, of_list xs) module Inside = struct let x = 12 end end let n _ = List...
bbf074e9a643f9385c95226e92cb23361b21f52b5e0ee14813159603d03de1fc
lexi-lambda/litpub
jsexpr.rkt
#lang racket/base (require json web-server/http) (provide response/jsexpr) (define APPLICATION/JSON-CONTENT-TYPE #"application/json; charset=utf-8") (define (response/jsexpr jsexpr #:code [code 200] #:message [message #"OK"] #:secon...
null
https://raw.githubusercontent.com/lexi-lambda/litpub/2f326c1c0e0ee8cad0b8b3f7f7b4a49a02ac62b5/util/jsexpr.rkt
racket
#lang racket/base (require json web-server/http) (provide response/jsexpr) (define APPLICATION/JSON-CONTENT-TYPE #"application/json; charset=utf-8") (define (response/jsexpr jsexpr #:code [code 200] #:message [message #"OK"] #:secon...
3632ce8694cdb09a45e6a29edc09955e5c1df46a8c9cf5f59f0be59b28b83770
zkry/tessellation
tessellation.rkt
#lang racket (require metapict) (require (for-syntax racket/list racket/format)) (define node-size 0.3) (define (set-scale scale) (match scale ['small (set-curve-pict-size 500 500) (set! node-size 0.03)] ['medium (set-curve-pict-size 800 800) (set! node-size 0.03)] ...
null
https://raw.githubusercontent.com/zkry/tessellation/6f881912eb35592f96539485e7bdd62bdc329528/tessellation.rkt
racket
How do I define the same thing (constant) for multiple levels? points-deduplicate returns the set of points in a not in b. Return lambda that translates curve by x, y. Used for tessellation. We want process-curve to remove all instances of fill, so replace fill with identity. Compare every shape with every other ...
#lang racket (require metapict) (require (for-syntax racket/list racket/format)) (define node-size 0.3) (define (set-scale scale) (match scale ['small (set-curve-pict-size 500 500) (set! node-size 0.03)] ['medium (set-curve-pict-size 800 800) (set! node-size 0.03)] ...
0deed34f37532ee2edeec860d6f30668a2d1e397006815a5985e119412063a50
gmr/huesos-de-vaquero
huesos.erl
%% ------------------------------------------------------------------ %% Module used for running the development version of the app only %% ------------------------------------------------------------------ -module(huesos). -export([start/0]). -define(APPS, [crypto, ranch, cowlib, cowboy, compiler, syntax_tools, erl...
null
https://raw.githubusercontent.com/gmr/huesos-de-vaquero/de12e7e0c474fbac4bbf3dcdcb403a4cb206a1b6/src/huesos.erl
erlang
------------------------------------------------------------------ Module used for running the development version of the app only ------------------------------------------------------------------
-module(huesos). -export([start/0]). -define(APPS, [crypto, ranch, cowlib, cowboy, compiler, syntax_tools, erlydtl, huesos]). start() -> start_apps(?APPS). start_apps([]) -> ok; start_apps([App | Apps]) -> case application:start(App) of ok -> start_apps(Apps); {error, {already_started, App}} -> start_a...
45292d242638209ed6cdd389e5b2a9f3586cde206cb5ea35276482170d7ee5a2
tweag/asterius
rts.hs
import System.Environment import System.Process main :: IO () main = do args <- getArgs callProcess "ahc-link" $ ["--input-hs", "test/rts/MVar.hs", "--run"] <> args callProcess "ahc-link" $ ["--input-hs", "test/rts/FFI.hs", "--run"] <> args callProcess "ahc-link" $ ["--input-hs", "test/rts/ThreadDelay.hs",...
null
https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/rts.hs
haskell
import System.Environment import System.Process main :: IO () main = do args <- getArgs callProcess "ahc-link" $ ["--input-hs", "test/rts/MVar.hs", "--run"] <> args callProcess "ahc-link" $ ["--input-hs", "test/rts/FFI.hs", "--run"] <> args callProcess "ahc-link" $ ["--input-hs", "test/rts/ThreadDelay.hs",...
df1fb36721f9739e5596fc234b8b0926993f674b3cfa2b814ea3f47b5e80a908
philnguyen/soft-contract
match-no-check.rkt
#lang racket (provide/contract [f ((or/c (cons/c real? string?) string?) . -> . real?)]) (define (f x) (match x [(cons r s) #:when (<= r 1) (string-length s)] [(cons r s) (/ (string-length s) r)] [_ (string-length x)]))
null
https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/paper/match-no-check.rkt
racket
#lang racket (provide/contract [f ((or/c (cons/c real? string?) string?) . -> . real?)]) (define (f x) (match x [(cons r s) #:when (<= r 1) (string-length s)] [(cons r s) (/ (string-length s) r)] [_ (string-length x)]))
8f85c9160aee9c3d4cc082d433067ac7b68bba9424914536b3522c60213d49ea
OCamlPro/ocp-index
indexPredefined.mli
(**************************************************************************) (* *) (* Copyright 2013 OCamlPro *) (* *) (* All righ...
null
https://raw.githubusercontent.com/OCamlPro/ocp-index/15bcffa66584f7cc786d026757287c98780cfdbc/libs/indexPredefined.mli
ocaml
************************************************************************ Copyright 2013 OCamlPro All rights reserved. This...
the Lesser GNU Public License version 3.0 . val types: IndexTypes.info list val variants: IndexTypes.info list val exceptions: IndexTypes.info list val keywords: IndexTypes.info list val all: IndexTypes.info list
d6d50b974bb50f1b664a56d90ac58486a773745815e25e61615b2778fbe0e748
juji-io/datalevin
index.cljc
(ns datalevin.test.index (:require [datalevin.test.core :as tdc :refer [db-fixture]] [clojure.test :refer [deftest testing is use-fixtures]] [datalevin.util :as u] [datalevin.core :as d])) (use-fixtures :each db-fixture) (deftest test-datoms (let [dir (u/tmp-dir (str "reset-test-" (random-uuid))) ...
null
https://raw.githubusercontent.com/juji-io/datalevin/3a1fccc3cb40531901d51719216fdce3b1aa3483/test/datalevin/test/index.cljc
clojure
should not expect attribute in lexicographic order attributes are in order of creation should not expect attributes in lexicographic order
(ns datalevin.test.index (:require [datalevin.test.core :as tdc :refer [db-fixture]] [clojure.test :refer [deftest testing is use-fixtures]] [datalevin.util :as u] [datalevin.core :as d])) (use-fixtures :each db-fixture) (deftest test-datoms (let [dir (u/tmp-dir (str "reset-test-" (random-uuid))) ...
7f6cd5727e12129644f7648fec77e1c3e9d723e6e6e03149efd601a86bf3d3e2
freizl/dive-into-haskell
Error1.hs
# LANGUAGE ExistentialQuantification # module Error1 where data Expr a = I Int | B Bool | Add (Expr a) (Expr a) | forall b. LessThan (Expr b) (Expr b) | forall c. Cond (Expr c) (Expr a) (Expr a) int :: Int -> Expr Int int = I bool :: Bool -> Expr Bool bool = B add :: Expr Int -> Expr Int -> Expr Int add =...
null
https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/codes/GADT/Error1.hs
haskell
# LANGUAGE ExistentialQuantification # module Error1 where data Expr a = I Int | B Bool | Add (Expr a) (Expr a) | forall b. LessThan (Expr b) (Expr b) | forall c. Cond (Expr c) (Expr a) (Expr a) int :: Int -> Expr Int int = I bool :: Bool -> Expr Bool bool = B add :: Expr Int -> Expr Int -> Expr Int add =...
c3d273d0d16ac821294a41b2daf577e0ba9c6959672090039dcc9c5f161c129c
agentm/project-m36
Day.hs
module ProjectM36.DataTypes.Day where import ProjectM36.Base import ProjectM36.AtomFunctionBody import ProjectM36.AtomFunctionError import qualified Data.HashSet as HS import Data.Time.Calendar dayAtomFunctions :: AtomFunctions dayAtomFunctions = HS.fromList [ Function { funcName = "fromGregorian", ...
null
https://raw.githubusercontent.com/agentm/project-m36/f5b32001db4be8b4525d4e759e831d35a2c200f0/src/lib/ProjectM36/DataTypes/Day.hs
haskell
module ProjectM36.DataTypes.Day where import ProjectM36.Base import ProjectM36.AtomFunctionBody import ProjectM36.AtomFunctionError import qualified Data.HashSet as HS import Data.Time.Calendar dayAtomFunctions :: AtomFunctions dayAtomFunctions = HS.fromList [ Function { funcName = "fromGregorian", ...
16e5c0dbea854c3732d94ac6e723865c1c0c2d2eb82c4d71d91543ad7c6883a3
roburio/utcp
params.ml
( c ) 2019 , all rights reserved let mclbytes = 2048 and msize = 256 and sb_max = 256 * 1024 (* params:450 *) let so_sndbuf = 32 * 1024 and so_rcvbuf = 65535 and so_sndlowat = 2048 and so_rcvlowat = 1 and so_min_sndbuf = 1 and so_min_rcvbuf = 1 and so_min_sndlowat =1 and so_min_rcvlowat = 1 and so_max_sndbuf = sb...
null
https://raw.githubusercontent.com/roburio/utcp/38cd6c7fa7c1a89aa0b490a5daa815ac02c3d11f/src/params.ml
ocaml
params:450 updated from FreeBSD 13
( c ) 2019 , all rights reserved let mclbytes = 2048 and msize = 256 and sb_max = 256 * 1024 let so_sndbuf = 32 * 1024 and so_rcvbuf = 65535 and so_sndlowat = 2048 and so_rcvlowat = 1 and so_min_sndbuf = 1 and so_min_rcvbuf = 1 and so_min_sndlowat =1 and so_min_rcvlowat = 1 and so_max_sndbuf = sb_max * mclbytes /...
c6c0c3eaa9606db40093c12c3135d937039d907f13a2b930e16b61c415b927df
techascent/tech.datatype
typed_buffer.clj
(ns tech.v2.datatype.typed-buffer (:require [tech.v2.datatype.protocols :as dtype-proto] [tech.v2.datatype.casting :as casting] [tech.v2.datatype.base :as base] [tech.jna :as jna] [tech.v2.datatype.reader :as reader] [tech.v2.datatype.writer :as writer] ...
null
https://raw.githubusercontent.com/techascent/tech.datatype/8cc83d771d9621d580fd5d4d0625005bd7ab0e0c/src/tech/v2/datatype/typed_buffer.clj
clojure
No marshalling/casting on the writer side. conversions of the data in the buffer.
(ns tech.v2.datatype.typed-buffer (:require [tech.v2.datatype.protocols :as dtype-proto] [tech.v2.datatype.casting :as casting] [tech.v2.datatype.base :as base] [tech.jna :as jna] [tech.v2.datatype.reader :as reader] [tech.v2.datatype.writer :as writer] ...
57a676d9ae1888aa36cfe7ce9d1a8198437bfe98824068bbce3eb30b5fce6760
tsloughter/kuberl
kuberl_extensions_v1beta1_http_ingress_rule_value.erl
-module(kuberl_extensions_v1beta1_http_ingress_rule_value). -export([encode/1]). -export_type([kuberl_extensions_v1beta1_http_ingress_rule_value/0]). -type kuberl_extensions_v1beta1_http_ingress_rule_value() :: #{ 'paths' := list() }. encode(#{ 'paths' := Paths }) -> #{ 'paths' => Paths }....
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_extensions_v1beta1_http_ingress_rule_value.erl
erlang
-module(kuberl_extensions_v1beta1_http_ingress_rule_value). -export([encode/1]). -export_type([kuberl_extensions_v1beta1_http_ingress_rule_value/0]). -type kuberl_extensions_v1beta1_http_ingress_rule_value() :: #{ 'paths' := list() }. encode(#{ 'paths' := Paths }) -> #{ 'paths' => Paths }....
6c6d7604b28ddda97c902cfe14709719311d692a9d29b1df8162bd2c4be80026
mikera/ironclad
lib.clj
(ns lib)
null
https://raw.githubusercontent.com/mikera/ironclad/ef647bcd097eeaf45f058d43e9e5f53ce910b4b2/src/main/clojure/ic/lib.clj
clojure
(ns lib)
d5f47e3d35ae44aec7f4773c45f92604a1f317fadbe1ed286790b0259c5d041a
charlieg/Sparser
resource.lisp
;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*- Copyright ( c ) 2009 BBNT Solutions LLC . All Rights Reserved $ Id:$ ;;; ;;; File: "resource" ;;; Module: "objects;model:psi:" version : August 2009 initiated 6/19/09 on the model of the file in individuals . Exercised and tweeked 7...
null
https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/objects/model/psi/resource.lisp
lisp
-*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*- File: "resource" Module: "objects;model:psi:" --------- globals --------- these are allocated (or deallocated) but yet to be deployed these are the one's that have been allocated but not yet deallocated ---------- allocate ---------- --------...
Copyright ( c ) 2009 BBNT Solutions LLC . All Rights Reserved $ Id:$ version : August 2009 initiated 6/19/09 on the model of the file in individuals . Exercised and tweeked 7/22 . Working on through 8/24 (in-package :sparser) (defparameter *next-psi* :not-initialized "Points to the first available in...
a61ed5a7aebecbe0b1e0c659ba470d1466f978103efcf1c8c1bab50c30d6ee21
williamleferrand/aws
dynamo.ml
module M = Dynamo_factory.Make (Http_client10) include M
null
https://raw.githubusercontent.com/williamleferrand/aws/d591ef0a2b89082caac6ddd6850b2d8b7824e577/src/cohttp/dynamo.ml
ocaml
module M = Dynamo_factory.Make (Http_client10) include M
3ebe0dbe755ecdb79357b13c5819beba53860f9c3005c51c0057fffcdd2d3da7
chetmurthy/typpx
forge.mli
* This module provides convenient functions to build . This does not cover all the construction ... yet . This does not cover all the construction... yet. *) open Asttypes open Typedtree open Types val default_loc : Location.t ref val with_loc : Location.t -> (unit -> 'a) -> 'a (** Set [default_loc...
null
https://raw.githubusercontent.com/chetmurthy/typpx/a740750b75739e686da49b46ded7db7d6874e108/src/forge.mli
ocaml
* Set [default_loc] and run a function * Dummy builder. The data is set to some default and you need to override some of the fields. * Override expression's type environment field * Build [None] of the given content type. If [ty] is omitted the container type is [Dummy.type_expr]. Raises [Assert_f...
* This module provides convenient functions to build . This does not cover all the construction ... yet . This does not cover all the construction... yet. *) open Asttypes open Typedtree open Types val default_loc : Location.t ref val with_loc : Location.t -> (unit -> 'a) -> 'a val loc : 'a ->...
44e37b1bb4a7468a99ca8f0f4768d2d5cfb012ee86722e63e3091cb174768815
smeruelo/mooc-ocaml
w6_3.1_type_abstraction.ml
module Exp : sig type e val int : int -> e val mul : e -> e -> e val add : e -> e -> e val to_string : e -> string end = struct type e = EInt of int | EMul of e * e | EAdd of e * e let int x = EInt x let mul a b = match a, b with | EInt 0, _ | _, EInt 0 -> EInt 0 | EInt 1, e | e, EInt 1 -...
null
https://raw.githubusercontent.com/smeruelo/mooc-ocaml/8e2efb1632ec9dd381489a08465d5341a6c727c9/week6/w6_3.1_type_abstraction.ml
ocaml
module Exp : sig type e val int : int -> e val mul : e -> e -> e val add : e -> e -> e val to_string : e -> string end = struct type e = EInt of int | EMul of e * e | EAdd of e * e let int x = EInt x let mul a b = match a, b with | EInt 0, _ | _, EInt 0 -> EInt 0 | EInt 1, e | e, EInt 1 -...
6e6e8e197cd8e2d3330f3f16a881ef5ceab7b3e4bbbdcb4ee04acd1a9b08dc11
kowainik/tomland
Edsl.hs
| Module : Toml . Type . : ( c ) 2018 - 2022 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > Stability : Stable Portability : Portable This module introduces EDSL for manually specifying ' TOML ' data types . ...
null
https://raw.githubusercontent.com/kowainik/tomland/561aefdbcf177498c06e6c6fcee2b3fe299b3af6/src/Toml/Type/Edsl.hs
haskell
# INLINE empty # | Adds array of tables to the 'TDSL'. @since 1.0.0
| Module : Toml . Type . : ( c ) 2018 - 2022 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > Stability : Stable Portability : Portable This module introduces EDSL for manually specifying ' TOML ' data types . ...
5651cd097a4063e3f4bf707e1e91e6eea4dd4f10618c2499fd1012cc0bcf79db
elli-lib/elli
elli_example_callback_handover.erl
-module(elli_example_callback_handover). -export([init/2, handle/2, handle_event/3]). -include("elli_util.hrl"). -behaviour(elli_handler). %% @doc Return `{ok, handover}' if `Req''s path is `/hello/world', %% otherwise `ignore'. init(Req, _Args) -> case elli_request:path(Req) of [<<"hello">>, <<"world">>]...
null
https://raw.githubusercontent.com/elli-lib/elli/2f2fafb77c67244ba6237ca6b3c7238ff886c478/src/elli_example_callback_handover.erl
erlang
@doc Return `{ok, handover}' if `Req''s path is `/hello/world', otherwise `ignore'. Fetch a GET argument from the URL. @hidden
-module(elli_example_callback_handover). -export([init/2, handle/2, handle_event/3]). -include("elli_util.hrl"). -behaviour(elli_handler). init(Req, _Args) -> case elli_request:path(Req) of [<<"hello">>, <<"world">>] -> {ok, handover}; _ -> ignore end. TODO : write d...
573d1f5ede09154820d153761058ccdb99b1fbd5cafeb1ff5bfd1cb7c8405744
ibawt/tabby
cluster_test.clj
(ns tabby.cluster-test (:require [clojure.test :refer :all] [clojure.tools.logging :refer :all] [clojure.pprint :refer [pprint]] [tabby.cluster :refer :all] [tabby.utils :as utils] [tabby.server :as server])) (defn- fields-by-id [cluster field] (map field...
null
https://raw.githubusercontent.com/ibawt/tabby/19601e406ee097663b5d45d92c2ae53318baa9c3/test/tabby/cluster_test.clj
clojure
others respond to request-vote we should detect that the client term is greater than ours convert to follower and increment current-term FIXME: we should rebind the random-election-timeout to make this not so hand-wavy (pprint (ps (testy))) under election timeout TODO: revisit this assertion
(ns tabby.cluster-test (:require [clojure.test :refer :all] [clojure.tools.logging :refer :all] [clojure.pprint :refer [pprint]] [tabby.cluster :refer :all] [tabby.utils :as utils] [tabby.server :as server])) (defn- fields-by-id [cluster field] (map field...
515468a5302feb57740e6d6ddd2d7e2603370607eea2218e0beda16647b9269b
haskell-servant/servant-snap
SnapTestUtils.hs
{-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module Servant.Utils.SnapTestUtils where import Control.Lens (makeLenses) import Control.Monad ...
null
https://raw.githubusercontent.com/haskell-servant/servant-snap/b54c5da86f2f2ed994e9dfbb0694c72301b5a220/test/Servant/Utils/SnapTestUtils.hs
haskell
# LANGUAGE GADTs # # LANGUAGE KindSignatures # # LANGUAGE OverloadedStrings # ---------------------------------------------------------------------------- * Assorted Snap helpers ---------------------------------------------------------------------------- req <- State.get -- Useful for debugging ------...
# LANGUAGE LambdaCase # # LANGUAGE TemplateHaskell # module Servant.Utils.SnapTestUtils where import Control.Lens (makeLenses) import Control.Monad (forM_, unless, ...
40c5056a51a4f7d1b73cd5c86c509c9df75af77ec0ad538503454a0a9322eed8
RichiH/git-annex
Handle.hs
Persistent sqlite database handles . - - Copyright 2015 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2015 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} {-# LANGUAGE BangPatterns #-} module Database.Handle ( DbHandle, DbConcurrency(..), openDb...
null
https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Database/Handle.hs
haskell
# LANGUAGE BangPatterns # Name of a table that should exist once the database is initialized. collected, which means the whole DbHandle is not used any longer. Shutdown cleanly. Exit this sqlite transaction so the database gets updated on disk. Change is run in a separate database connection since sqlite only s...
Persistent sqlite database handles . - - Copyright 2015 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2015 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module Database.Handle ( DbHandle, DbConcurrency(..), openDb, TableName, queryDb, close...
cfa713faea332661f463e7b7ec56f0ae49df9c76159c6a35a8e0d5c76469b4e1
grin-compiler/ghc-wpc-sample-programs
Citation.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} | Module : Tests . Readers . Org . Inline . Citation Copyright : © 2014 - 2020 License : GNU GPL , version 2 or above Maintainer : > Stability : alpha Portability : portable Test parsing of citatio...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/test/Tests/Readers/Org/Inline/Citation.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE NoImplicitPrelude # | Module : Tests . Readers . Org . Inline . Citation Copyright : © 2014 - 2020 License : GNU GPL , version 2 or above Maintainer : > Stability : alpha Portability : portable Test parsing of citations in org input . Module ...
d5010e3656622691628cca97da38d83911355b6e51a0d0a76c1a261c6250d552
tomhanika/conexp-clj
implications.clj
;; Copyright ⓒ the conexp-clj developers; 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 LICENSE at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bou...
null
https://raw.githubusercontent.com/tomhanika/conexp-clj/5e4c15697f06446f925f53d1d143528155d7dd3a/src/main/clojure/conexp/fca/implications.clj
clojure
Copyright ⓒ the conexp-clj developers; all rights reserved. The use and distribution terms for this software are covered by the which can be found in the file LICENSE 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 re...
Eclipse Public License 1.0 ( -1.0.php ) (ns conexp.fca.implications "Implications for Formal Concept Analysis." (:require [clojure.core.reducers :as r] [conexp.base :refer :all] [conexp.math.algebra :refer :all] [conexp.fca.contexts :refer :all])) (deftype Implication [premi...
cb7231f6e123ea5fb94d2ecf03cce5db5b1a8f98fbbae5eb26cbc8e148a68178
NorfairKing/the-notes
Order.hs
module Functions.Order where import Notes import Data.List (intercalate, isSubsequenceOf, subsequences) import qualified Data.Text as T import qualified Prelude as P import ...
null
https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/Functions/Order.hs
haskell
module Functions.Order where import Notes import Data.List (intercalate, isSubsequenceOf, subsequences) import qualified Data.Text as T import qualified Prelude as P import ...
9885cc8793dec3179ac129e24fd4438f31307305f2e98bd6552b8c967f94e2c1
LexiFi/gen_js_api
binding_manual.mli
The gen_js_api is released under the terms of an MIT - like license . (* See the attached LICENSE file. *) Copyright 2015 by LexiFi . module M : sig type t = private Ojs.t val t_to_js: t -> Ojs.t val t_of_js: Ojs.t -> t...
null
https://raw.githubusercontent.com/LexiFi/gen_js_api/bee3b595898fdaf7db0366a9b1a009db9a6c6026/ppx-test/binding_manual.mli
ocaml
See the attached LICENSE file.
The gen_js_api is released under the terms of an MIT - like license . Copyright 2015 by LexiFi . module M : sig type t = private Ojs.t val t_to_js: t -> Ojs.t val t_of_js: Ojs.t -> t val prop_get_arg: t -> int [@@js.get "propGetArg"] val prop_get: unit -...
3a95098cfc3b57d38b98814a66f9d4da712eeedace92b023247c6b30a08456e8
hadolint/hadolint
DL3021.hs
module Hadolint.Rule.DL3021 (rule) where import qualified Data.Text as Text import Hadolint.Rule import Language.Docker.Syntax rule :: Rule args rule = simpleRule code severity message check where code = "DL3021" severity = DLErrorC message = "COPY with more than 2 arguments requires the last argument t...
null
https://raw.githubusercontent.com/hadolint/hadolint/321ffc1e00b5e97ec6b516775dae32b616fccc33/src/Hadolint/Rule/DL3021.hs
haskell
module Hadolint.Rule.DL3021 (rule) where import qualified Data.Text as Text import Hadolint.Rule import Language.Docker.Syntax rule :: Rule args rule = simpleRule code severity message check where code = "DL3021" severity = DLErrorC message = "COPY with more than 2 arguments requires the last argument t...
78945f469254bafd04485524b0516c9a55e9467536301e0fb9b30f4c8feea6ed
dbousque/lymp
reference.ml
(* example usage of an object through a reference (here a dict object) *) open Lymp let py = init "." let builtin = builtins py let () = (* create a dict *) let dict = get_ref builtin "dict" [] in dict["field1 " ] = " value1 " call dict "__setitem__" [Pystr "field1" ; Pystr "value1"] ; call dict "__setitem__...
null
https://raw.githubusercontent.com/dbousque/lymp/863d134b33499a7234ae6a5e43d40e3357867031/examples/reference.ml
ocaml
example usage of an object through a reference (here a dict object) create a dict
open Lymp let py = init "." let builtin = builtins py let () = let dict = get_ref builtin "dict" [] in dict["field1 " ] = " value1 " call dict "__setitem__" [Pystr "field1" ; Pystr "value1"] ; call dict "__setitem__" [Pystr "field2" ; Pyint 2] ; call dict "__setitem__" [Pystr "field3" ; Pyfloat 3.3] ; gett...
e1317bf9e89e776a58271a8572fe4fc7ab94794cd29208b19a1a7f1c708b59e5
tensorflow/haskell
Gradient.hs
Copyright 2016 TensorFlow authors . -- Licensed under the Apache License , Version 2.0 ( the " License " ) ; -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- -2.0 -- -- Unless required by applicable law or agreed to in writing, software distr...
null
https://raw.githubusercontent.com/tensorflow/haskell/bfd8de5582891137a50f23e160c1e65eb7d4b931/tensorflow-ops/src/TensorFlow/Gradient.hs
haskell
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright 2016 TensorFlow authors . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE ViewPatterns # ...
5d74d4287640b9d8b339f15b19aeecc797a3ce7250bf19b65e3d1b072f925dd3
bittide/bittide-hardware
StabilityChecker.hs
SPDX - FileCopyrightText : 2022 Google LLC -- SPDX - License - Identifier : Apache-2.0 {-# LANGUAGE GADTs #-} module Bittide.ClockControl.StabilityChecker where import Clash.Prelude import Bittide.ClockControl (targetDataCount) import Clash.Sized.Extra -- | Checks whether the @Signal@ of buffer occupancies from ...
null
https://raw.githubusercontent.com/bittide/bittide-hardware/b44dac8ee0fb14b0c6a94fcbe830fdd8d140bec4/bittide/src/Bittide/ClockControl/StabilityChecker.hs
haskell
# LANGUAGE GADTs # | Checks whether the @Signal@ of buffer occupancies from an elastic buffer is stable. The @Signal@ is considered stable if it stays within a @margin@ of the target buffer occupancy for @cyclesStable@ number of cycles. The next target is set to the current buffer occupancy when the current buffer...
SPDX - FileCopyrightText : 2022 Google LLC SPDX - License - Identifier : Apache-2.0 module Bittide.ClockControl.StabilityChecker where import Clash.Prelude import Bittide.ClockControl (targetDataCount) import Clash.Sized.Extra stabilityChecker :: forall dom margin cyclesStable n . (HiddenClockResetEnable dom...
d37836af4774202fcc7e78761eeeb3960a0d88f4413cda95875594b497d30182
masashi-y/abduction_kbc
message_pb.ml
[@@@ocaml.warning "-27-30-39"] type predicate_mutable = { mutable str : string; mutable nargs : int; } let default_predicate_mutable () : predicate_mutable = { str = ""; nargs = 0; } type candidate_mutable = { mutable pred1 : Message_types.predicate option; mutable pred2 : Message_types.predicate option;...
null
https://raw.githubusercontent.com/masashi-y/abduction_kbc/cee8c6fbd7cd246397243f879b9c984f6762e5d7/src/message_pb.ml
ocaml
[@@@ocaml.warning "-27-30-39"] type predicate_mutable = { mutable str : string; mutable nargs : int; } let default_predicate_mutable () : predicate_mutable = { str = ""; nargs = 0; } type candidate_mutable = { mutable pred1 : Message_types.predicate option; mutable pred2 : Message_types.predicate option;...
34decc4a876a34e202fb016d1fa95778cfc621fd5025176e52d127ee5866bc4b
basho/riak_kv
riak_kv_index_fsm_sup.erl
%% ------------------------------------------------------------------- %% %% riak_kv_index_fsm_sup: supervise the riak_kv index state machines. %% Copyright ( c ) 2007 - 2011 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); ...
null
https://raw.githubusercontent.com/basho/riak_kv/aeef1591704d32230b773d952a2f1543cbfa1889/src/riak_kv_index_fsm_sup.erl
erlang
------------------------------------------------------------------- riak_kv_index_fsm_sup: supervise the riak_kv index state machines. 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 imp...
Copyright ( c ) 2007 - 2011 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY ...
420be27af9d10244548ecbb0683d279a76921213fd48a435c889af3e90540753
aantron/luv
pid.mli
This file is part of Luv , released under the MIT license . See LICENSE.md for details , or visit . details, or visit . *) val getpid : unit -> int * Evaluates to the pid of the current process . Binds { { : #c.uv_os_getpid } [ uv_os_getpid ] } . See { { : -pages/man3/getpid.3p.html } [...
null
https://raw.githubusercontent.com/aantron/luv/4b49d3edad2179c76d685500edf1b44f61ec4be8/src/pid.mli
ocaml
This file is part of Luv , released under the MIT license . See LICENSE.md for details , or visit . details, or visit . *) val getpid : unit -> int * Evaluates to the pid of the current process . Binds { { : #c.uv_os_getpid } [ uv_os_getpid ] } . See { { : -pages/man3/getpid.3p.html } [...
2d8304e52b61c1be3a66ab5a8d2288e0afa6e976d484c636eeaddcf39c792ff7
compufox/trivial-gamekit-ui
helpers.lisp
(in-package :gamekit.ui) (defun ui-mouse-handler (x y) (setf *mouse-position* (vec2 x y))) (defun ui-click-handler () (setf *mouse-clicked* t)) (defun ui-release-handler () (setf *mouse-clicked* nil)) ;; gamekit class/state stuff (defclass with-ui () ((ui :initform (make-hash-table))) (:do...
null
https://raw.githubusercontent.com/compufox/trivial-gamekit-ui/e35aff114538b6e0f780b9a14b34dc59d28ecab5/helpers.lisp
lisp
gamekit class/state stuff
(in-package :gamekit.ui) (defun ui-mouse-handler (x y) (setf *mouse-position* (vec2 x y))) (defun ui-click-handler () (setf *mouse-clicked* t)) (defun ui-release-handler () (setf *mouse-clicked* nil)) (defclass with-ui () ((ui :initform (make-hash-table))) (:documentation "represents trivia...
5e754c762cdf1290429aa934c2979ad448fb4523ecc70aaef6531ccad7f5afad
city41/reagent-scroll-demo
handler.clj
(ns scroll-demo.handler (:require [compojure.core :refer [GET defroutes]] [compojure.route :refer [not-found resources]] [ring.middleware.defaults :refer [site-defaults wrap-defaults]] [selmer.parser :refer [render-file]] [prone.middleware :refer [wrap-exceptions]] ...
null
https://raw.githubusercontent.com/city41/reagent-scroll-demo/98af21a9f8d403f59bffe4c8a630ab32eed0e33f/src/clj/scroll_demo/handler.clj
clojure
(ns scroll-demo.handler (:require [compojure.core :refer [GET defroutes]] [compojure.route :refer [not-found resources]] [ring.middleware.defaults :refer [site-defaults wrap-defaults]] [selmer.parser :refer [render-file]] [prone.middleware :refer [wrap-exceptions]] ...
cc02d5a95bb303b70ebff2ec926147a8f29cd16158f5b9c890ba49fc5f679e5b
janestreet/bonsai
automator.mli
open! Core open! Bonsai_web (** Given values and effects for manipulating the other components in the app, [Automator.component] will run through testing scenarios, pausing after every frame to see if the results can be validated. *) val component : is_running:bool Value.t -> reset_all:unit Effect.t Valu...
null
https://raw.githubusercontent.com/janestreet/bonsai/4baeedc75bf73a0915e04dc02d8a49b78779e9b0/examples/node_with_map_children/automator.mli
ocaml
* Given values and effects for manipulating the other components in the app, [Automator.component] will run through testing scenarios, pausing after every frame to see if the results can be validated.
open! Core open! Bonsai_web val component : is_running:bool Value.t -> reset_all:unit Effect.t Value.t -> step:unit Effect.t Value.t -> is_done:bool Value.t -> unit Computation.t
4b4c160a74967b16a353faae4571cd9aef8b77d64907b2be35f9f84be83f9b2a
gergoerdi/clash-compucolor2
TMS5501.hs
# LANGUAGE ViewPatterns , LambdaCase , RecordWildCards # # LANGUAGE NumericUnderscores # module Hardware.Compucolor2.TMS5501 ( Ctl.Port , Input(..) , Output(..) , tms5501 , UART.SlowRate , UART.FastRate ) where import Clash.Prelude import RetroClash.Utils import RetroClash.Port import Retro...
null
https://raw.githubusercontent.com/gergoerdi/clash-compucolor2/e5d6835918d25d7fcf9f0a9d7d381a1220331452/src/Hardware/Compucolor2/TMS5501.hs
haskell
# LANGUAGE ViewPatterns , LambdaCase , RecordWildCards # # LANGUAGE NumericUnderscores # module Hardware.Compucolor2.TMS5501 ( Ctl.Port , Input(..) , Output(..) , tms5501 , UART.SlowRate , UART.FastRate ) where import Clash.Prelude import RetroClash.Utils import RetroClash.Port import Retro...
82feee8c4ebe7934fe098285116cf797813cbba29323fa99e6b259f7b583032b
Dexterminator/clj-templates
test_feed.clj
{:group-id "yamlparser", :artifact-id "yamlparser", :description "FIXME: write description", :homepage "", :url "", :versions ["0.1.0-SNAPSHOT"]} {:group-id "org.jmatt", :artifact-id "clojure.algo.generic", :description "clojure.algo.generic for Clojure 1.3.0. Example: (use 'clojure.algo.generic.math-functions)", :scm ...
null
https://raw.githubusercontent.com/Dexterminator/clj-templates/705e652fece2455257e5008c12c712bb9f7802d1/dev/resources/test_feed.clj
clojure
{:group-id "yamlparser", :artifact-id "yamlparser", :description "FIXME: write description", :homepage "", :url "", :versions ["0.1.0-SNAPSHOT"]} {:group-id "org.jmatt", :artifact-id "clojure.algo.generic", :description "clojure.algo.generic for Clojure 1.3.0. Example: (use 'clojure.algo.generic.math-functions)", :scm ...
58c405e418324e46c42ba4ebb9534a45f5b93c99d90a3c3a4382746ea8f267ac
semmons99/clojure-euler
prob-040.clj
problem 040 ; ; ; ; ; ; ; ; ; ; (defn prob-040 [] (let [s (apply str (range 1 1000000))] (* (Integer. (subs s 0 1)) (Integer. (subs s 99 100)) (Integer. (subs s 999 1000)) (Integer. (subs s 9999 10000)) (Integer. (subs s 99999 100000)) (Integer. (subs s 999999 1000000)))))
null
https://raw.githubusercontent.com/semmons99/clojure-euler/3480bc313b9df7f282dadf6e0b48d96230f1bfc1/prob-040.clj
clojure
; ; ; ; ; ; ; ; ;
(defn prob-040 [] (let [s (apply str (range 1 1000000))] (* (Integer. (subs s 0 1)) (Integer. (subs s 99 100)) (Integer. (subs s 999 1000)) (Integer. (subs s 9999 10000)) (Integer. (subs s 99999 100000)) (Integer. (subs s 999999 1000000)))))
f99ade00b8d1be3c8c8bd80f9d6f7775e77df7c638f249238ab29021bff899c5
ijvcms/chuanqi_dev
hook_pp.erl
%%%------------------------------------------------------------------- @author zhengsiying ( C ) 2015 , < COMPANY > %%% @doc %%% %%% @end Created : 26 . 八月 2015 上午10:55 %%%------------------------------------------------------------------- -module(hook_pp). -include("common.hrl"). -include("record.hrl"). -inclu...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/hook/hook_pp.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API ==================================================================== API functions ==================================================================== 直接切换挂机场景(不...
@author zhengsiying ( C ) 2015 , < COMPANY > Created : 26 . 八月 2015 上午10:55 -module(hook_pp). -include("common.hrl"). -include("record.hrl"). -include("proto.hrl"). -include("cache.hrl"). -include("config.hrl"). -include("language_config.hrl"). -include("button_tips_config.hrl"). -export([ handle/3 ]). handl...
9c44cfe1188f3337f4afd70ce9d2c33fec2ef2068879134467be1ac870f400d4
wdebeaum/step
whale.lisp
;;;; ;;;; w::whale ;;;; (define-words :pos w::N :words ( (w::whale (senses((LF-parent ONT::nonhuman-animal) (templ count-pred-templ) (meta-data :origin calo-ontology :entry-date 20060128 :change-date nil :comments caloy3) )) ) ))
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/whale.lisp
lisp
w::whale
(define-words :pos w::N :words ( (w::whale (senses((LF-parent ONT::nonhuman-animal) (templ count-pred-templ) (meta-data :origin calo-ontology :entry-date 20060128 :change-date nil :comments caloy3) )) ) ))
939483e4a70fe2e1c809965c988888b647e0c9692abedf1ef7fb7f7585c0918c
amalloy/aoc-2021
Main.hs
module Main where import Control.Arrow ((&&&)) import Control.Monad (replicateM) import Data.Foldable (asum) import Data.Char (toLower) import Data.Maybe (fromMaybe) import Text.Regex.Applicative data Segment = A | B | C | D | E | F | G deriving (Enum, Show, Read, Eq, Ord, Bounded) newtype Digit = Digit { segments ::...
null
https://raw.githubusercontent.com/amalloy/aoc-2021/197c9acdd2a4dca3e92993437b700e6cfedecbf2/day08/src/Main.hs
haskell
module Main where import Control.Arrow ((&&&)) import Control.Monad (replicateM) import Data.Foldable (asum) import Data.Char (toLower) import Data.Maybe (fromMaybe) import Text.Regex.Applicative data Segment = A | B | C | D | E | F | G deriving (Enum, Show, Read, Eq, Ord, Bounded) newtype Digit = Digit { segments ::...
858e56c0af6c51d3a5ef126821f29f79305efb2dfb9801627816ee7367b6aa55
Frama-C/Frama-C-snapshot
components.ml
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/security_slicing/components.ml
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
53710fe10359e628854a151e381768454f2d0b88e29234a7cf1819b00fb4997f
jonase/eastwood
constant_lifter.clj
(ns eastwood.copieddeps.dep2.clojure.tools.analyzer.passes.jvm.constant-lifter (:require [eastwood.copieddeps.dep1.clojure.tools.analyzer.passes.constant-lifter :as orig] [eastwood.copieddeps.dep1.clojure.tools.analyzer :refer [analyze-const]] [eastwood.copieddeps.dep1.clojure.tools.analyzer.u...
null
https://raw.githubusercontent.com/jonase/eastwood/c5b7d9f8ad8f8b38dc7138d853cc65f6987d6058/copied-deps/eastwood/copieddeps/dep2/clojure/tools/analyzer/passes/jvm/constant_lifter.clj
clojure
(ns eastwood.copieddeps.dep2.clojure.tools.analyzer.passes.jvm.constant-lifter (:require [eastwood.copieddeps.dep1.clojure.tools.analyzer.passes.constant-lifter :as orig] [eastwood.copieddeps.dep1.clojure.tools.analyzer :refer [analyze-const]] [eastwood.copieddeps.dep1.clojure.tools.analyzer.u...
2efcc36a65ad0bddc8d3d8efaaf05ad3b5916381d71109222b8b3fcba39ccc20
marick/Midje
checkers.clj
(ns midje.checkers "Checkers are for checking results of checkables, or checking that appropriate arguments are passed to prerequisites" (:require [such.vars :as var] [such.immigration :as immigrate]) (:require midje.checking.checkers.defining midje.checking.checkers.chatty ...
null
https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/src/midje/checkers.clj
clojure
files results in polluting the checker namespace.
(ns midje.checkers "Checkers are for checking results of checkables, or checking that appropriate arguments are passed to prerequisites" (:require [such.vars :as var] [such.immigration :as immigrate]) (:require midje.checking.checkers.defining midje.checking.checkers.chatty ...
802207868f3857ee3c3ab2216aabafe90ae428a5b94a2d164f2e99e4ab34a6bf
RefactoringTools/HaRe
examples.hs
-------------------------------------------------------------------- --- Haskell Weirdness. -------------------------------------------------------------------- data RedBlack a = Red a | Black a data OneTwo a b = One a | Two a b instance Show a => Show (RedBlack a) where show = \ x -> case x of ...
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/tools/interp/examples.hs
haskell
------------------------------------------------------------------ - Haskell Weirdness. ------------------------------------------------------------------ -> undefined -> undefined -> undefined --------------------------------------------------------- some examples --------------------------------...
data RedBlack a = Red a | Black a data OneTwo a b = One a | Two a b instance Show a => Show (RedBlack a) where show = \ x -> case x of Red v -> show v Black v -> show v omega :: Int -> (Int,Int) omega = \x -> if True then (omega x) else (omega x) h0 = (\ (Red x) ->...
4227f95cd240ab16101bb47dddf6a415d44d888aac791c798e82831b1c751126
haroldcarr/learn-haskell-coq-ml-etc
Run.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module Run ( run ) where import qualified Control.Monad.Component as CMC import qualified Data.Aeson as JSON import qualified Data.Aeson.Types as JSON import qualified Data.FileEmbed as D...
null
https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/course/2018-06-roman-gonzales-rock-solid-haskell-services-lambdaconf/hc/src/Run.hs
haskell
# LANGUAGE OverloadedStrings # ---------------------------------------------------------------------------- ------------------------------------------------------------------------------ Logging
# LANGUAGE NoImplicitPrelude # # LANGUAGE TemplateHaskell # module Run ( run ) where import qualified Control.Monad.Component as CMC import qualified Data.Aeson as JSON import qualified Data.Aeson.Types as JSON import qualified Data.FileEmbed as DFE import RIO import qual...
26b151e7ecae1eefbb72fcd479c52520436115a6902d9e67b3081f32487be9af
bvaugon/ocapic
bytes.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/lib/bytes.mli
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 * Byte sequence operations . A byte sequence is a mutable data structure that contains a fixed...
09c241f6ab3e6546c9024cd1fd30254182f7b39f0c4acf351ece0d1518db1d40
ocaml/oasis
OASISValues.ml
(******************************************************************************) OASIS : architecture for building OCaml libraries and applications (* *) Copyright ( C ) 2011 - 2016 , Copyrig...
null
https://raw.githubusercontent.com/ocaml/oasis/3d1a9421db92a0882ebc58c5df219b18c1e5681d/src/oasis/OASISValues.ml
ocaml
**************************************************************************** This library is free software; you can redistribute it and/or modify it under the t...
OASIS : architecture for building OCaml libraries and applications Copyright ( C ) 2011 - 2016 , Copyright ( C ) 2008 - 2011 , OCamlCore SARL the Free Software Foundation ; either version 2.1 of the License , or ( at You s...
0cbd0d2cfc55c503bccc1c637b4ee46d5b8455defe86f93a8a039d71adf784b6
hspec/hspec
ParserSpec.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE ConstraintKinds #-} module Test.Hspec.Core.Formatters.Pretty.ParserSpec (spec, Person(..)) where import Prelude () import Helper import Test.Hspec.Core.Formatters.Pretty.Parser data Person = Person { personName :: String , personAge :: Int } ...
null
https://raw.githubusercontent.com/hspec/hspec/58f95102acd41780c3bff2320ea49652e3247447/hspec-core/test/Test/Hspec/Core/Formatters/Pretty/ParserSpec.hs
haskell
# LANGUAGE ConstraintKinds #
# LANGUAGE FlexibleContexts # module Test.Hspec.Core.Formatters.Pretty.ParserSpec (spec, Person(..)) where import Prelude () import Helper import Test.Hspec.Core.Formatters.Pretty.Parser data Person = Person { personName :: String , personAge :: Int } deriving (Eq, Show) infix 1 `sho...
be6643b6884aab1ea374378121f1e680af9bfbabaa7470494b418d0c5ee26cf8
metosin/eines
client.cljs
(ns eines.client (:require [cognitect.transit :as t] [eines.impl :as i])) ;; ;; Defaults: ;; (def default-url (-> js/window.location.protocol {"http:" "ws:", "https:" "wss:"} (str "//" js/window.location.host "/ws"))) (def default-options {:on-message identity ...
null
https://raw.githubusercontent.com/metosin/eines/e293d0a3b29eb18fb20bdf0c234cd898e7b87ac9/modules/eines-client/src/eines/client.cljs
clojure
Defaults: Send message to server: Helpers:
(ns eines.client (:require [cognitect.transit :as t] [eines.impl :as i])) (def default-url (-> js/window.location.protocol {"http:" "ws:", "https:" "wss:"} (str "//" js/window.location.host "/ws"))) (def default-options {:on-message identity ...