_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
675f844320c2f726a218ae58eadb0a4c06186004d774d9a4e350c40900458838
GaloisInc/msf-haskell
Event.hs
-- |Event handling framework. Supports callbacks for discovery of -- hosts, creation of sessions, discovery of credentials, etc. module MSF.Event ( module MSF.Event , HandlerRef() ) where import MSF.Event.Handler import MSF.Event.Prim import MSF.Host import MSF.Monad import RPC.DB import RPC.Session import RP...
null
https://raw.githubusercontent.com/GaloisInc/msf-haskell/76cee10771f9e9d10aa3301198e09f08bde907be/src/MSF/Event.hs
haskell
|Event handling framework. Supports callbacks for discovery of hosts, creation of sessions, discovery of credentials, etc. | Listen for new hosts. | Disconnect a host handler. | Listen for new services. | Disconnect a service handler. | Listen for new creds. | Disconnect a cred handler. | Listen for new loot. ...
module MSF.Event ( module MSF.Event , HandlerRef() ) where import MSF.Event.Handler import MSF.Event.Prim import MSF.Host import MSF.Monad import RPC.DB import RPC.Session import RPC.Job import Control.Concurrent (threadDelay) import Control.Monad (when) import qualified Data.Map as Map mkHandler :: (Handl...
63fc552da0165c3e6566b4c8b8ac0752c7f2e49b9342ac9960ab0a22d922596c
jeffshrager/biobike
see-also-html.lisp
-*- Package : help ; mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*- (in-package :help) ;;; +=========================================================================+ | Copyright ( c ) 2002 - 2006 JP , , | ;;; | | ;;; ...
null
https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Help/see-also-html.lisp
lisp
mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*- +=========================================================================+ | | | Permission is hereby granted, free of charge, to any person obtaining | | a copy of this software and as...
(in-package :help) | Copyright ( c ) 2002 - 2006 JP , , | | " Software " ) , to deal in the Software without restriction , including | | distribute , sublicense , and/or sell copies of the Software , and to | | permit persons to whom the Software is furnished to do so , subject to ...
8b3edaeefcb6d53f6c252cc86243da07cf2346a2d3de474f4f4920a88001f153
overtone/overtone
fx.clj
(ns overtone.examples.synthesis.fx (:use overtone.live)) All of these are based off the compander ugen . Of course you can just use it ; directly in your synths, but it's nice to be able to stick on ;; This file has some demos to show you what the fx in overtone.studio.fx do. These ;; are setup so you can expe...
null
https://raw.githubusercontent.com/overtone/overtone/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/src/overtone/examples/synthesis/fx.clj
clojure
directly in your synths, but it's nice to be able to stick on This file has some demos to show you what the fx in overtone.studio.fx do. These are setup so you can experiment with the parameters by moving the mouse around. Give it a try directly in your synths, but it's nice to be able to stick on (compressor-de...
(ns overtone.examples.synthesis.fx (:use overtone.live)) All of these are based off the compander ugen . Of course you can just use it First a fat synth to use as our source sound (defsynth bizzle [out-bus 10 amp 0.5] (out out-bus (* amp (+ (* (decay2 (* (impulse 10 0) ...
f5c08ad0114f9eb37f0115b6d9668a842d49a8f3d400baf7568f5feca037b978
mauny/the-functional-approach-to-programming
exp.ml
#open "lexer";; let exp_parser = let rec atom = function [< 'INT n >] -> Constant n | [< 'IDENT s >] -> Variable s | [<'LPAR; exp e ; 'RPAR >] -> e and mult = let rec restmult e1 = function [<'MULT; atom e2; (restmult (Multiplication(e1,e2))) e >] -...
null
https://raw.githubusercontent.com/mauny/the-functional-approach-to-programming/1ec8bed5d33d3a67bbd67d09afb3f5c3c8978838/cl-75/Struct/exp.ml
ocaml
#open "lexer";; let exp_parser = let rec atom = function [< 'INT n >] -> Constant n | [< 'IDENT s >] -> Variable s | [<'LPAR; exp e ; 'RPAR >] -> e and mult = let rec restmult e1 = function [<'MULT; atom e2; (restmult (Multiplication(e1,e2))) e >] -...
e0a4e1b4cbd36e5c4b8cadf1507e8b856eba5f90d735d9b9d3d77f3157e3eaa7
ocramz/thih
Assump.hs
----------------------------------------------------------------------------- Assump : Assumptions -- Part of ` Typing Haskell in ' , version of November 23 , 2000 Copyright ( c ) and the Oregon Graduate Institute of Science and Technology , 1999 - 2000 -- This program is distributed as Fre...
null
https://raw.githubusercontent.com/ocramz/thih/6c34e1ba880c0a662c00d4a1350d36acb8262112/src/Assump.hs
haskell
--------------------------------------------------------------------------- in the file "License" that is included in the distribution of this software, copies of which may be obtained from: /~mpj/thih/ --------------------------------------------------------------------------- ------------...
Assump : Assumptions Part of ` Typing Haskell in ' , version of November 23 , 2000 Copyright ( c ) and the Oregon Graduate Institute of Science and Technology , 1999 - 2000 This program is distributed as Free Software under the terms module Assump where import Id import Scheme import Subs...
3e5c366d187e3614300dcdf11dcc99fc6e363bf9deb641ab231de2b4ea087e9e
plattfot/pinentry-rofi
hall.scm
(hall-description (name "pinentry-rofi") (prefix "") (version "2.0.3") (author "Fredrik Salomonsson") (copyright (2020)) (synopsis "Rofi frontend to pinentry") (description "Simple pinentry gui using rofi, it is written in GNU guile.") (home-page "-rofi/") (license gpl3+) (dependencies `(("r...
null
https://raw.githubusercontent.com/plattfot/pinentry-rofi/feceb1dc07700de008a0317db6d1e186b31e8e7b/hall.scm
scheme
(hall-description (name "pinentry-rofi") (prefix "") (version "2.0.3") (author "Fredrik Salomonsson") (copyright (2020)) (synopsis "Rofi frontend to pinentry") (description "Simple pinentry gui using rofi, it is written in GNU guile.") (home-page "-rofi/") (license gpl3+) (dependencies `(("r...
8a3284491ef8decfbf48fab86eef26eafcae1b73c78f36c0021aca5b7e9b030c
clojure-interop/google-cloud-clients
Cors.clj
(ns com.google.cloud.storage.Cors "Cross-Origin Resource Sharing (CORS) configuration for a bucket." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.storage Cors])) (defn *new-builder "Returns a CORS configuration builder. returns: `com.google.cloud.storage.Cors$Builder`" (^com...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.storage/src/com/google/cloud/storage/Cors.clj
clojure
(ns com.google.cloud.storage.Cors "Cross-Origin Resource Sharing (CORS) configuration for a bucket." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.storage Cors])) (defn *new-builder "Returns a CORS configuration builder. returns: `com.google.cloud.storage.Cors$Builder`" (^com...
de3d6d12cabb7e2d7745a47af0a6d844d8b184bebac5022b9e9a6df1653fa6ec
EFanZh/EOPL-Exercises
exercise-4.29-test.rkt
#lang racket/base (require rackunit) (require "../solutions/exercise-4.x-mutable-pairs-lang.rkt") (check-equal? (run "let a = newarray(2, -99) p = proc (x) let v = arrayref(x, 1) in arrayset(x, 1, -(v, -1)) in begi...
null
https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/tests/exercise-4.29-test.rkt
racket
#lang racket/base (require rackunit) (require "../solutions/exercise-4.x-mutable-pairs-lang.rkt") (check-equal? (run "let a = newarray(2, -99) p = proc (x) let v = arrayref(x, 1) in arrayset(x, 1, -(v, -1)) ...
5977d8950668236f3a130f6f5bd70494b60313b96aeb6563461e618eabb39116
tcsprojects/ocaml-sat-solvers
minisatwrapper.mli
open Satwrapper;; open Minisat;; class minisatSolverFactory: object inherit solverFactory method description: string method identifier: string method short_identifier: string method copyright: string method url: string method new_instance: abstractSolver end
null
https://raw.githubusercontent.com/tcsprojects/ocaml-sat-solvers/2c36605fb3e38a1bee41e079031ab5b173794910/deprecated/minisat/minisatwrapper.mli
ocaml
open Satwrapper;; open Minisat;; class minisatSolverFactory: object inherit solverFactory method description: string method identifier: string method short_identifier: string method copyright: string method url: string method new_instance: abstractSolver end
12961f950c2a4f48a3b8677cd308dc06fb10f3e74ed26eef597ba192a089bd3c
elastic/eui-cljs
icon_timeline.cljs
(ns eui.icon-timeline (:require ["@elastic/eui/lib/components/icon/assets/timeline.js" :as eui])) (def timeline eui/icon)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_timeline.cljs
clojure
(ns eui.icon-timeline (:require ["@elastic/eui/lib/components/icon/assets/timeline.js" :as eui])) (def timeline eui/icon)
dc707d13e96303eb607ac36c7cae2ba4f59d5e45b4d5746cbc99c00785caf035
eeng/mercurius
in_memory_wallet_repository.clj
(ns mercurius.wallets.adapters.repositories.in-memory-wallet-repository (:require [mercurius.wallets.domain.repositories.wallet-repository :refer [WalletRepository find-wallet]] [mercurius.util.collections :refer [map-vals sum-by]])) (defrecord InMemoryWalletRepository [db] WalletRepository (save-wa...
null
https://raw.githubusercontent.com/eeng/mercurius/f83778ddde99aa13692e4fe2e70b2e9dc2fd70e9/src/mercurius/wallets/adapters/repositories/in_memory_wallet_repository.clj
clojure
(ns mercurius.wallets.adapters.repositories.in-memory-wallet-repository (:require [mercurius.wallets.domain.repositories.wallet-repository :refer [WalletRepository find-wallet]] [mercurius.util.collections :refer [map-vals sum-by]])) (defrecord InMemoryWalletRepository [db] WalletRepository (save-wa...
ffdffc9042988888e27afcd986e3ee6b8b434211511df100873956c3f198778e
solita/mnt-teet
main.cljs
(ns ^:figwheel-hooks teet.main "TEET frontend app." (:require react react-dom [herb.core :as herb :refer [<class]] [datafrisk.core :as df] [postgrest-ui.elements] [postgrest-ui.impl.style.material] reagent.dom [teet.app-state :as ap...
null
https://raw.githubusercontent.com/solita/mnt-teet/40f7948c1521594131ef29d83c76a06087574e7c/app/frontend/src/cljs/teet/main.cljs
clojure
Import view namespaces and needed utility namespaces (macroexpansion) See routes.edn config gets loaded when session is checked else - show spinner while config is loaded Show only login dialog else - show routing determined component surrounded by common containers
(ns ^:figwheel-hooks teet.main "TEET frontend app." (:require react react-dom [herb.core :as herb :refer [<class]] [datafrisk.core :as df] [postgrest-ui.elements] [postgrest-ui.impl.style.material] reagent.dom [teet.app-state :as ap...
b9a38656d6a9428e27ea5d520efd609e6f9163a2089a8fce88fb186419c08e93
pguillebert/pravda
spark.clj
(ns pravda.spark (:require [clojure.tools.logging :as log] [pravda.reader :as reader] [pravda.writer :as writer] [flambo.api :as f] [flambo.function :as func]) (:import [org.apache.spark Partition SparkContext TaskContext])) (defrecord FilePartition [index file] ;;...
null
https://raw.githubusercontent.com/pguillebert/pravda/e1d1db093143465cdcd48155155d17d9a45ae5fe/src/pravda/spark.clj
clojure
implement the spark Partition interface the scala "nil" class This method describes all the partitions available This method returns the actual content for a partition build the lazy-seq of events return the equivalent scala iterator on the partition iterate all the rdd and store each event return an descriptiv...
(ns pravda.spark (:require [clojure.tools.logging :as log] [pravda.reader :as reader] [pravda.writer :as writer] [flambo.api :as f] [flambo.function :as func]) (:import [org.apache.spark Partition SparkContext TaskContext])) (defrecord FilePartition [index file] Pa...
df60c4520b549d845e6c5e2969380bbead39c38432a094213864fa5e192bffa8
Opetushallitus/aipal
data_util.clj
Copyright ( c ) 2013 The Finnish National Board of Education - Opetushallitus ;; This program is free software : Licensed under the EUPL , Version 1.1 or - as soon as they will be approved by the European Commission - subsequent versions of the EUPL ( the " Licence " ) ; ;; ;; You may not use this work except...
null
https://raw.githubusercontent.com/Opetushallitus/aipal/767bd14ec7153dc97fdf688443b9687cdb70082f/e2e/src/aipal_e2e/data_util.clj
clojure
You may not use this work except in compliance with the Licence. You may obtain a copy of the Licence at: / This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Copyright ( c ) 2013 The Finnish National Board of Education - Opetushallitus This program is free software : Licensed under the EUPL , Version 1.1 or - as soon as they will be approved by the European Commission - subsequent versions European Union Public Licence for more details . (ns aipal-e2e.data-util ...
956f26b606c9079c1daffe8018957143f4208ce3a4328b12243111e5a5682e56
yallop/ocaml-re-nfa
nfa.ml
type state = int32 module StateSet = Set.Make(Int32) module CharMap = Map.Make(Char) type transitions = StateSet.t CharMap.t type nfa = { start : StateSet.t; (** the start states *) finals: StateSet.t; (** the final (or "accept") states *) next: state -> transitions; (** the transition function, that map...
null
https://raw.githubusercontent.com/yallop/ocaml-re-nfa/a9aed7e86325187d8ea5717a61a204d1978fd188/lib/nfa.ml
ocaml
* the start states * the final (or "accept") states * the transition function, that maps a state and a character to a set of states * cur is the set of all the current states -- i.e. those states at which we have arrived by examining the input up to this point. Since the automaton is non-determinis...
type state = int32 module StateSet = Set.Make(Int32) module CharMap = Map.Make(Char) type transitions = StateSet.t CharMap.t type nfa = { start : StateSet.t; finals: StateSet.t; next: state -> transitions; } let find_states sym nfa m = try CharMap.find sym (nfa.next m) with Not_found -> StateSet.empty le...
dad97f754226673cbe56f4f0abe98542148c1ce72bfa842eaabbd0cd0c7df5c2
input-output-hk/cardano-sl
Common.hs
module Pos.Core.Common ( module Pos.Core.Common.AddrAttributes , module Pos.Core.Common.Address , module Pos.Core.Common.AddressHash , module Pos.Core.Common.AddrSpendingData , module Pos.Core.Common.AddrStakeDistribution , module Pos.Core.Common.BlockCount , module Pos....
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/src/Pos/Core/Common.hs
haskell
module Pos.Core.Common ( module Pos.Core.Common.AddrAttributes , module Pos.Core.Common.Address , module Pos.Core.Common.AddressHash , module Pos.Core.Common.AddrSpendingData , module Pos.Core.Common.AddrStakeDistribution , module Pos.Core.Common.BlockCount , module Pos....
ac4f32624516a3c67e1751b53777bcebce4af82a36a6ee650fb2e820eb3fc440
mtravers/heroku-cl-example
hello-world.lisp
(in-package :net.aserve) (publish :path "/" :function #'(lambda (req ent) (with-http-response (req ent) (with-http-body (req ent) (html (:head (:title "Hello Lisp on Heroku")) ((:body :style "font-family: 'Arial'") (:h1 "(Hello 'World)") "Congratulations...
null
https://raw.githubusercontent.com/mtravers/heroku-cl-example/a471c57cc453fcd768d35e291c3dc13fa740a8fd/src/hello-world.lisp
lisp
Called at application initialization time. This has to be done at app-init rather than app-build time, to point to right directory.
(in-package :net.aserve) (publish :path "/" :function #'(lambda (req ent) (with-http-response (req ent) (with-http-body (req ent) (html (:head (:title "Hello Lisp on Heroku")) ((:body :style "font-family: 'Arial'") (:h1 "(Hello 'World)") "Congratulations...
72f3d2963ce223040ae391b708d8b2577310e49e91bb615835ff40cf1452d82a
robrix/path
Name.hs
# LANGUAGE DeriveTraversable , LambdaCase # module Path.Name where import Data.List.NonEmpty (NonEmpty (..)) import qualified Data.Set as Set import Path.Pretty import Path.Stack un :: Monad m => (t -> Maybe (m (a, t))) -> t -> m (Stack a, t) un from = unEither (\ t -> maybe (Left t) Rig...
null
https://raw.githubusercontent.com/robrix/path/4682978f63a9a5df40fa79635db30bb92ffe0dc8/src/Path/Name.hs
haskell
# LANGUAGE DeriveTraversable , LambdaCase # module Path.Name where import Data.List.NonEmpty (NonEmpty (..)) import qualified Data.Set as Set import Path.Pretty import Path.Stack un :: Monad m => (t -> Maybe (m (a, t))) -> t -> m (Stack a, t) un from = unEither (\ t -> maybe (Left t) Rig...
7591b2d9fe5a354a758bde906c35579e837314ea4fedaca1c36d163f70ad6c27
typedclojure/typedclojure
protocols.clj
(ns typed.clj.spec.protocols) (defprotocol ITypeFn (apply-typefn* [this arg-map])) (defprotocol IPoly (inst* [this arg-map]))
null
https://raw.githubusercontent.com/typedclojure/typedclojure/45556897356f3c9cbc7b1b6b4df263086a9d5803/typed/clj.spec/src/typed/clj/spec/protocols.clj
clojure
(ns typed.clj.spec.protocols) (defprotocol ITypeFn (apply-typefn* [this arg-map])) (defprotocol IPoly (inst* [this arg-map]))
29b4ce5d793b2f3d4f0be3b57a800ee2a881bbffe100e744a001932c85887488
dyzsr/ocaml-selectml
ephemeron.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/stdlib/ephemeron.mli
ocaml
************************************************************************ OCaml ...
, projet Para , INRIA Rocquencourt Copyright 1997 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the * Ephemerons and weak hash tables . and weak hash tables are useful when one wants to cache o...
a2fd36267793f6282bf2e8a039dd5a39977168289de47bf334ea5ad698ad94e2
privet-kitty/cl-competitive
fft.lisp
(defpackage :cp/test/fft (:use :cl :fiveam :cp/fft :cp/test/nearly-equal) (:import-from :cp/test/base #:base-suite)) (in-package :cp/test/fft) (in-suite base-suite) (defun to-fft-array (f) (let ((res (make-array (length f) :element-type '(complex fft-float)))) (dotimes (i (length f)) (setf (aref res i)...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/test/fft.lisp
lisp
cis table doesn't have right length boundary case
(defpackage :cp/test/fft (:use :cl :fiveam :cp/fft :cp/test/nearly-equal) (:import-from :cp/test/base #:base-suite)) (in-package :cp/test/fft) (in-suite base-suite) (defun to-fft-array (f) (let ((res (make-array (length f) :element-type '(complex fft-float)))) (dotimes (i (length f)) (setf (aref res i)...
409246fcc26ed3a6dff522c3387776d740aff6bbfd8aea6603e862de894a286a
input-output-hk/cardano-base
Bench.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE DataKinds # # LANGUAGE TypeApplications # # OPTIONS_GHC -Wno - orphans # module Main where import Foreign.Marshal.Alloc import GHC.TypeLits import Criterion.Main import Cardano.Memory.Pool import Foreign.ForeignPtr import Control.DeepSeq import UnliftIO.Async (pooledReplicateCo...
null
https://raw.githubusercontent.com/input-output-hk/cardano-base/e3a4ec3e257f1911b6512cf61077ec4a20f17c45/cardano-mempool/bench/Bench.hs
haskell
# LANGUAGE BangPatterns #
# LANGUAGE DataKinds # # LANGUAGE TypeApplications # # OPTIONS_GHC -Wno - orphans # module Main where import Foreign.Marshal.Alloc import GHC.TypeLits import Criterion.Main import Cardano.Memory.Pool import Foreign.ForeignPtr import Control.DeepSeq import UnliftIO.Async (pooledReplicateConcurrently) import Control.Mon...
03c038b6e3a5aedadf6bffccf5a3779b21e24b5cf2461a1c0ca34f18c0b386e6
nmichel/ejpet
ejpet_parser.erl
-module(ejpet_parser). -author(''). -export([parse/1]). -define(RESULT(E), {E, ejpet_memoize:build_key(E)}). parse(Tokens) -> pattern(Tokens). pattern(Tokens = [open_paren, {inject, _} | _]) -> expr(Tokens); pattern([open_paren, {capture, Name} | Tail]) -> {[close_paren | R], Expr} = expr(Tail), {R,...
null
https://raw.githubusercontent.com/nmichel/ejpet/f2cafee31582d1e538cd3623edf249d0d3fc1162/src/ejpet_parser.erl
erlang
----- ----- ----- Expr ',' Tail Expr '>' '/g' Expr '>' '>' '/g' '>' ',' Expr Tail ----- Expr ',' Tail Expr '>' '/g' Expr '>' '>' '/g' '>' ',' Expr Tail
-module(ejpet_parser). -author(''). -export([parse/1]). -define(RESULT(E), {E, ejpet_memoize:build_key(E)}). parse(Tokens) -> pattern(Tokens). pattern(Tokens = [open_paren, {inject, _} | _]) -> expr(Tokens); pattern([open_paren, {capture, Name} | Tail]) -> {[close_paren | R], Expr} = expr(Tail), {R,...
9513002bb3f741f3ccf429c245f7b7096034c2a0291e27c1114bf780871535ce
ocaml/ocaml
test_env_start.ml
TEST include runtime_events set OCAML_RUNTIME_EVENTS_START = " 1 " include runtime_events set OCAML_RUNTIME_EVENTS_START = "1" *) (* In this test the runtime_events should already be started by the environment variable that we are passing and so we should not need to start it *) let got_start = ref false ...
null
https://raw.githubusercontent.com/ocaml/ocaml/ab544472480452e600eebf1f072970d5b71d7fb2/testsuite/tests/lib-runtime-events/test_env_start.ml
ocaml
In this test the runtime_events should already be started by the environment variable that we are passing and so we should not need to start it
TEST include runtime_events set OCAML_RUNTIME_EVENTS_START = " 1 " include runtime_events set OCAML_RUNTIME_EVENTS_START = "1" *) let got_start = ref false let lifecycle domain_id ts lifecycle_event data = match lifecycle_event with | Runtime_events.EV_RING_START -> begin assert(match dat...
a06577301c60c43980879809d2ff325d7dcb6ef70c7722574bfb319421bf30a6
OCamlPro/freeton_ocaml_sdk
sdk_crypto.ml
(**************************************************************************) (* *) Copyright ( c ) 2021 OCamlPro SAS (* *) (* All right...
null
https://raw.githubusercontent.com/OCamlPro/freeton_ocaml_sdk/42a0d95252ed19c647fa86e9728af15d557fc5e3/src/freeton_ocaml_rust/sdk_crypto.ml
ocaml
************************************************************************ All rights reserved. This file is distributed u...
Copyright ( c ) 2021 OCamlPro SAS Public License version 2.1 , with the special exception on linking external generate_mnemonic_ml: unit -> string Sdk_types.reply = "generate_mnemonic_ml" let generate_mnemonic () = Sdk_types.reply (generate_mnemonic_ml ()) external...
7bb5acd9b23c7fb8102918fd2719a9a5520ae391538c29105982a77b3dd585fc
agda/agda
Order.hs
# LANGUAGE ImplicitParams # module Internal.Termination.Order ( tests ) where import Agda.Termination.CutOff import Agda.Termination.Order import Internal.Helpers import qualified Internal.Termination.Semiring as Semiring ------------------------------------------------------------------------------ instances ca...
null
https://raw.githubusercontent.com/agda/agda/f50c14d3a4e92ed695783e26dbe11ad1ad7b73f7/test/Internal/Termination/Order.hs
haskell
---------------------------------------------------------------------------- no embedded matrices generated for now . no embedded matrices generated for now. no embedded matrices generated for now. ---------------------------------------------------------------------------- -----------------------------------------...
# LANGUAGE ImplicitParams # module Internal.Termination.Order ( tests ) where import Agda.Termination.CutOff import Agda.Termination.Order import Internal.Helpers import qualified Internal.Termination.Semiring as Semiring instances can not have implicit arguments ? ! GHC manual says : 7.8.3.1 . Implicit - par...
938b5fbdca7437a2768779fc94a5eb1eef8a36f7dc07f043a583a5ad4066aa8d
jellelicht/guix
import.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2012 , 2013 , 2014 < > Copyright © 2014 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU 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 F...
null
https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/guix/scripts/import.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2012 , 2013 , 2014 < > Copyright © 2014 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (guix scripts import) #:use-module (guix ui) #:use-modu...
6d62846a56b85d49e949bb005d1666bddab5468baa95aeaff1cef41999449d18
originrose/cortex
backend.clj
(ns cortex.compute.cuda.backend (:require [cortex.compute.javacpp-datatype :as jcpp-dtype] [cortex.compute.nn.backend :as nn-backend] [cortex.compute.nn.protocols :as compute-protocols] [cortex.compute.nn.layers :as compute-layers] [cortex.compute.math :as math] ...
null
https://raw.githubusercontent.com/originrose/cortex/94b1430538e6187f3dfd1697c36ff2c62b475901/src/cortex/compute/cuda/backend.clj
clojure
Do not use with device as that enforces a resource context. This means the backend would be destroyed as it left this function. Using the unsafe function means are a explicitly relying on an outer resource context to handle release of this backend.
(ns cortex.compute.cuda.backend (:require [cortex.compute.javacpp-datatype :as jcpp-dtype] [cortex.compute.nn.backend :as nn-backend] [cortex.compute.nn.protocols :as compute-protocols] [cortex.compute.nn.layers :as compute-layers] [cortex.compute.math :as math] ...
7023b52e4f908f28a6ee3c479b997b5f6361510e8bd4e1957bbe2b4dd2d50e2d
gregr/experiments
syntax-1.rkt
#lang racket (provide std-1 ) (require "syntax-1-bootstrapping.rkt" "syntax-1-parsing.rkt" gregr-misc/either gregr-misc/function ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; syntax-1 program building ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;...
null
https://raw.githubusercontent.com/gregr/experiments/cd4c7953f45102539081077bbd6195cf834ba2fa/supercompilation/cog/syntax-1.rkt
racket
syntax-1 program building
#lang racket (provide std-1 ) (require "syntax-1-bootstrapping.rkt" "syntax-1-parsing.rkt" gregr-misc/either gregr-misc/function ) (define (std-1 prog) (let ((proc (right-x (parse-1 penv-init-1 `(lam (sym? lam? bit? uno? pair? sym-eq? 0b 1b pair pair-access ...
1a9c080a236ede830c2a893d537a7b276d982abb6dfbbc096edcd478593e96b5
examachine/parallpairs
dv_stats.ml
* * * * Author : < > * * * * Copyright ( C ) 2011 - 2017 Gok Us Sibernetik Ar&Ge Ltd. * * * * This program is free software ; you can redistribute it and/or modify it under * * the terms of the Affero GNU General Public License as published by the Free * * Software Foundation ; either version 3 of the...
null
https://raw.githubusercontent.com/examachine/parallpairs/6fafe8d6de3a55490cb8ed5ffd3493a28a914e0a/src/dv_stats.ml
ocaml
maximum dimension in a document vector printf "number of dimensions=%d\n" m;
* * * * Author : < > * * * * Copyright ( C ) 2011 - 2017 Gok Us Sibernetik Ar&Ge Ltd. * * * * This program is free software ; you can redistribute it and/or modify it under * * the terms of the Affero GNU General Public License as published by the Free * * Software Foundation ; either version 3 of the...
87d64894822365ab3fec81b13aed4980eda8044fc2be0d0c776580050b2dc81b
prestancedesign/pingcrm-clojure
organizations.clj
(ns pingcrm.models.organizations (:require [honey.sql :as h] [honey.sql.helpers :refer [where]] [next.jdbc :as jdbc] [next.jdbc.sql :as sql])) (defn list-organizations [db] (let [query (h/format {:select [:id :name] :from [:organizations] ...
null
https://raw.githubusercontent.com/prestancedesign/pingcrm-clojure/85659c6bd75d39039f9e3b3333c401547e8614ea/src/clj/pingcrm/models/organizations.clj
clojure
TODO: Use with-open for better performance
(ns pingcrm.models.organizations (:require [honey.sql :as h] [honey.sql.helpers :refer [where]] [next.jdbc :as jdbc] [next.jdbc.sql :as sql])) (defn list-organizations [db] (let [query (h/format {:select [:id :name] :from [:organizations] ...
159783f5e1574799a9d413ac26bbe2997906c26ac8935dcbe834f43ebe649b0f
akazukin5151/kpxhs
Defaults.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module Config.Defaults where import Data.FileEmbed (embedFile) import Data.Text (Text) import Data.Text.Encoding (decodeUtf8) import Config.Types ( Color (Black, Blue, Def, Green, Red, White, Yellow) , Config (..) , Style (Bold,...
null
https://raw.githubusercontent.com/akazukin5151/kpxhs/42874fa144404a51fcdf6dc54c99b49559a868b4/src/kpxhs/Config/Defaults.hs
haskell
# LANGUAGE OverloadedStrings # This is the single source of truth for the default theme Must compile (`make install`) in repo's root dir Warning: if decodeUtf8 fails, it fails at runtime (but that's a big if)
# LANGUAGE TemplateHaskell # module Config.Defaults where import Data.FileEmbed (embedFile) import Data.Text (Text) import Data.Text.Encoding (decodeUtf8) import Config.Types ( Color (Black, Blue, Def, Green, Red, White, Yellow) , Config (..) , Style (Bold, Italic) , Timeout (Seconds) ...
fb3ccea439c7e4e5bd59d0d34ed0adf8bf48c92bec7ddc8f9cde3c192cff991f
ragkousism/Guix-on-Hurd
networking.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2013 , 2014 , 2015 , 2016 , 2017 < > Copyright © 2015 < > Copyright © 2016 < > Copyright © 2016 < > Copyright © 2017 Clément < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/services/networking.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2013 , 2014 , 2015 , 2016 , 2017 < > Copyright © 2015 < > Copyright © 2016 < > Copyright © 2016 < > Copyright © 2017 Clément < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU ...
66a533917ccbcccd60be1e99e8840792f7e34dc2e99e69d881ce114a49f2267f
reborg/clojure-essential-reference
9.clj
(require '[clojure.java.io :as io]) < 1 > ;; (nil java.lang.String java.io.File java.net.URL java.net.URI) (io/file "/a/valid/file/path") ;; #object[java.io.File 0x7936d006 "/a/valid/file/path"] (io/file (io/file "/a/valid/file/path")) # object[java.io . File 0x3f46ce65 " /a / valid / file / path " ] (io/file (...
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/TheToolbox/clojure.java.io/9.clj
clojure
(nil java.lang.String java.io.File java.net.URL java.net.URI) #object[java.io.File 0x7936d006 "/a/valid/file/path"] #object[java.io.File 0x7af35ada "/valid/url"] #object[java.io.File 0x2de6a5c8 "/valid/uri"] nil
(require '[clojure.java.io :as io]) < 1 > (io/file "/a/valid/file/path") (io/file (io/file "/a/valid/file/path")) # object[java.io . File 0x3f46ce65 " /a / valid / file / path " ] (io/file (io/as-url "file")) (io/file (.toURI (io/as-url "file"))) (io/file nil)
b8178bc19b96e4ccee998ce4759c5b187c7a87d1fd69f94162eddea4b48a1048
rmloveland/scheme48-0.53
track-read.scm
; -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*- Copyright ( c ) 1994 by . See file COPYING . ; Scheme48 reader modified to annotate pairs with source line and column ; data. (define-record-type annotation ( file row column ) (form )) (define $current-annotating-port (make-fluid #f)...
null
https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/ps-compiler/prescheme/unused/track-read.scm
scheme
-*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*- Scheme48 reader modified to annotate pairs with source line and column data. A little Scheme reader. Nonstandard things needed: reverse-list->string (ok to define as list->string of reverse) really-string->symbol (ok to define this to be string->symbol) T...
Copyright ( c ) 1994 by . See file COPYING . (define-record-type annotation ( file row column ) (form )) (define $current-annotating-port (make-fluid #f)) (define-syntax define-lap (lambda (exp rename compare) (let ((spec (cadr exp)) (stuff (cddr exp))) `(define ,(car spec) ...
ee347ea7f78f8e3ab0224bce498a3b374a5634be328f5748ed99ef0c209819da
draperlaboratory/VIBES
utils.mli
open Bap.Std open Bap_core_theory open Vibes_ir.Types (** The destinations for a control-flow operation in VIBES IR. *) type dsts = { dst : Operand.t; ret : Operand.t option; } (** Translate a tid into the appropriate VIBES IR operand. *) val get_label : tid -> Operand.t KB.t * Extract the VIBES IR operands from...
null
https://raw.githubusercontent.com/draperlaboratory/VIBES/ba4fe14a355617e8d07df59578f032aa9f1f27b2/tools/vibes-select/lib/utils.mli
ocaml
* The destinations for a control-flow operation in VIBES IR. * Translate a tid into the appropriate VIBES IR operand.
open Bap.Std open Bap_core_theory open Vibes_ir.Types type dsts = { dst : Operand.t; ret : Operand.t option; } val get_label : tid -> Operand.t KB.t * Extract the VIBES IR operands from a BIR jump . val get_dsts : jmp term -> dsts option KB.t
e285f656dd03cb899bb8f8cdd2d14db2604f48d3d9bf9a00529d958741785de8
pnwamk/tr-calc
dtr-subtype.rkt
#lang racket (require redex "dtr-lang.rkt" "dtr-subst.rkt" "dtr-fme.rkt" "utils.rkt") (provide (all-defined-out)) (define (simple-Δ? Δ) (simple-Ψ? (third Δ))) (define (simple-Ψ? Ψ) (match Ψ [(list) #t] [`(,(? not?) · ,rst) (simple-Ψ? rst)] [_ #f])) (define (a...
null
https://raw.githubusercontent.com/pnwamk/tr-calc/17baa511af28139e686737c1f4c30d3b187efa2d/rtr-redex/dtr-subtype.rkt
racket
-------------------------------------------------------------- ********************************************************* overlap tests and ext-Γ ************************************************************** subtyping tests (basic (i.e. no 'proves' usage) simple subtype tests function subtyping reflexivity co...
#lang racket (require redex "dtr-lang.rkt" "dtr-subst.rkt" "dtr-fme.rkt" "utils.rkt") (provide (all-defined-out)) (define (simple-Δ? Δ) (simple-Ψ? (third Δ))) (define (simple-Ψ? Ψ) (match Ψ [(list) #t] [`(,(? not?) · ,rst) (simple-Ψ? rst)] [_ #f])) (define (a...
a270711ba9c72d1b4c2ee96639fecb9f3a44557bd5355d1850530ac199f4e7ac
barrel-db/barrel
user_default.erl
-module(user_default). -compile(export_all). -define(DB, <<"testdb3">>). setup() -> sync:go(), ok. init_db() -> barrel_httpc_eqc:init_db(). run(X) -> barrel_httpc_eqc:run(X). eqc() -> eqc(30). eqc(N) -> lager:set_loglevel(lager_console_backend, notice), [] = eqc:module({numtests,N}, ba...
null
https://raw.githubusercontent.com/barrel-db/barrel/1695ca4cfe821808526f9ecb2e019bc1b8eff48e/eqc/user_default.erl
erlang
-module(user_default). -compile(export_all). -define(DB, <<"testdb3">>). setup() -> sync:go(), ok. init_db() -> barrel_httpc_eqc:init_db(). run(X) -> barrel_httpc_eqc:run(X). eqc() -> eqc(30). eqc(N) -> lager:set_loglevel(lager_console_backend, notice), [] = eqc:module({numtests,N}, ba...
7788a35e7df546a958a7533c854ef99473738a910d99f7d360e2d56e1670da14
district0x/district-ui-router
router.cljs
(ns district.ui.router (:require [bide.core :as bide] [cljs.spec.alpha :as s] [clojure.string :as string] [district.ui.router.events :as events] [mount.core :as mount :refer [defstate]] [re-frame.core :refer [dispatch-sync dispatch]])) (declare start) (declare stop) (defstate router :start ...
null
https://raw.githubusercontent.com/district0x/district-ui-router/11f4c604200f144e528b204b174e00ef1783e63b/src/district/ui/router.cljs
clojure
(ns district.ui.router (:require [bide.core :as bide] [cljs.spec.alpha :as s] [clojure.string :as string] [district.ui.router.events :as events] [mount.core :as mount :refer [defstate]] [re-frame.core :refer [dispatch-sync dispatch]])) (declare start) (declare stop) (defstate router :start ...
1f8f3c6162ce0e5ea653c2b5bfb14e564fa196b320192ee07c0bbb80126069fe
mhallin/graphql_ppx
skip_directives.ml
open Test_shared module MyQuery = [%graphql {| query ($var: Boolean!) { v1: variousScalars { nullableString @skip(if: $var) string @skip(if: $var) } v2: variousScalars { nullableString @include(if: $var) string @include(if: $var) } } |}] type qt = < v1 : < nullableStrin...
null
https://raw.githubusercontent.com/mhallin/graphql_ppx/5796b3759bdf0d29112f48e43a2f0623f7466e8a/tests_native/skip_directives.ml
ocaml
open Test_shared module MyQuery = [%graphql {| query ($var: Boolean!) { v1: variousScalars { nullableString @skip(if: $var) string @skip(if: $var) } v2: variousScalars { nullableString @include(if: $var) string @include(if: $var) } } |}] type qt = < v1 : < nullableStrin...
0b7bfa7c4f61b95c207361cd4da86ad897c6e3b5b6f84b1d8fac16d1d3c6667d
janestreet/core_profiler
path.ml
open Core open Core_profiler type 'a point = | Direct_point of 'a | Point of 'a [@@deriving sexp, compare] type 'id t = { first : 'id point i.e. , penultimate point first ; rest_rev : 'id point list ; last : 'id } [@@deriving sexp, compare] let first t = match t.first with | Direct_point i -> i |...
null
https://raw.githubusercontent.com/janestreet/core_profiler/3d1c0e61df848f5f25f78d64beea92b619b6d5d9/offline_tool/lib/path.ml
ocaml
open Core open Core_profiler type 'a point = | Direct_point of 'a | Point of 'a [@@deriving sexp, compare] type 'id t = { first : 'id point i.e. , penultimate point first ; rest_rev : 'id point list ; last : 'id } [@@deriving sexp, compare] let first t = match t.first with | Direct_point i -> i |...
9642ce9b5e5feedbff70273a93378e54815cc840fee1b659e60424319d34d871
Zulu-Inuoe/clution
http.lisp
(in-package :cl-user) (defpackage quri.uri.http (:use :cl) (:import-from :quri.uri :uri :scheme :port :uri-query) (:import-from :quri.port :scheme-default-port) (:import-from :quri.encode :url-encode-params) (:impo...
null
https://raw.githubusercontent.com/Zulu-Inuoe/clution/b72f7afe5f770ff68a066184a389c23551863f7f/cl-clution/qlfile-libs/quri-20161204-git/src/uri/http.lisp
lisp
(in-package :cl-user) (defpackage quri.uri.http (:use :cl) (:import-from :quri.uri :uri :scheme :port :uri-query) (:import-from :quri.port :scheme-default-port) (:import-from :quri.encode :url-encode-params) (:impo...
6e9b208a1e8b8cf78b0ffff0bcecc474c23511377f68eb9babf57d6b1056e62a
LonoCloud/arrows
arrows.clj
(ns arrows (:require [arrows.proc :refer :all] [arrows.vis :refer :all]) (:refer-clojure :exclude [seq nth cond condp identity])) ;; basic arrow protocol (defprotocol Arrow (arrow-arr [_ f]) (arrow-seq [p ps]) (arrow-nth [p n])) ;; effecient parallel protocol (defprotocol ArrowPar (arrow-par [...
null
https://raw.githubusercontent.com/LonoCloud/arrows/2def9db48e684913d51da3065b010687041caf4f/src/arrows.clj
clojure
basic arrow protocol effecient parallel protocol arrow with choice protocol feedback arrow protocol 'val-and-p' is a seq of with an initial value and an optional feedback proc identity arrow protocol defining the default arrow-par behavior gets overridden when the arrow-par protocol is defined
(ns arrows (:require [arrows.proc :refer :all] [arrows.vis :refer :all]) (:refer-clojure :exclude [seq nth cond condp identity])) (defprotocol Arrow (arrow-arr [_ f]) (arrow-seq [p ps]) (arrow-nth [p n])) (defprotocol ArrowPar (arrow-par [p ps])) (defprotocol ArrowChoice (arrow-select [_ vp...
3c090aadd56c84b78c06c0abcafb7b8467a3762abeaddfa32bb64b973f9bb597
simmone/racket-simple-qr
version-information.rkt
#lang racket (require "../func/func.rkt") (require "../../../share/func.rkt") (require "../../../share/version-information.rkt") (provide (contract-out [draw-version-information (-> string? natural? hash? hash? void?)] )) (define (draw-version-information version_str modules points_map type_map) ...
null
https://raw.githubusercontent.com/simmone/racket-simple-qr/904f1491bc521badeafeabd0d7d7e97e3d0ee958/simple-qr/write/lib/version-information/version-information.rkt
racket
#lang racket (require "../func/func.rkt") (require "../../../share/func.rkt") (require "../../../share/version-information.rkt") (provide (contract-out [draw-version-information (-> string? natural? hash? hash? void?)] )) (define (draw-version-information version_str modules points_map type_map) ...
58d5349ef9ec5d149bb47c2c91e6ab3018a4c99e62d2ca49bbe66169d8ef8fcb
RDTK/generator
mixins.lisp
;;;; mixins.lisp --- Generic mixin classes used by project, templates, etc. ;;;; Copyright ( C ) 2012 - 2019 , 2022 Jan Moringen ;;;; Author : < > (cl:in-package #:build-generator.model) ;;; `named-mixin' (declaim (inline name-character?)) (defun name-character? (character) (or (alphanumericp character) ...
null
https://raw.githubusercontent.com/RDTK/generator/8d9e6e47776f2ccb7b5ed934337d2db50ecbe2f5/src/model/mixins.lisp
lisp
mixins.lisp --- Generic mixin classes used by project, templates, etc. `named-mixin' `parented-mixin' `implementation-mixin' `specification-mixin' `conditional-mixin'
Copyright ( C ) 2012 - 2019 , 2022 Jan Moringen Author : < > (cl:in-package #:build-generator.model) (declaim (inline name-character?)) (defun name-character? (character) (or (alphanumericp character) (find character "._-+/!@"))) (defun name? (thing) (and (stringp thing) (not (emptyp thing))...
b72dc824e4402d71e5f4c2f0d850740d5d9e3e64eeb38948f9640440973cf5eb
larcenists/larceny
rbtree.body.scm
Copyright ( C ) ( 2016 ) . 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 limitation the rights to use, copy, ...
null
https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/lib/SRFI/srfi/146/rbtree.body.scm
scheme
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to do so, subject to the following conditions: ...
Copyright ( C ) ( 2016 ) . All Rights Reserved . files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY K...
8bea173e2b529aa57a91795c70facea302a1a9a68629014008c21ff187e21775
RefactoringTools/HaRe
TiFresh.hs
{-# OPTIONS -fglasgow-exts #-} # LANGUAGE MultiParamTypeClasses , OverlappingInstances , UndecidableInstances , FunctionalDependencies , NoMonomorphismRestriction # module TiFresh where import TiMonad(IM,freshInt) import TiTypes import MUtils import TiKinds class Fresh a where fresh :: IM i c a freshlist n = sequen...
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/tools/base/TI/TiFresh.hs
haskell
# OPTIONS -fglasgow-exts # fresh = tvar # fresh instance Fresh QId where fresh = dictName # fresh
# LANGUAGE MultiParamTypeClasses , OverlappingInstances , UndecidableInstances , FunctionalDependencies , NoMonomorphismRestriction # module TiFresh where import TiMonad(IM,freshInt) import TiTypes import MUtils import TiKinds class Fresh a where fresh :: IM i c a freshlist n = sequence (replicate n fresh) instanc...
153d0bbd57a20ae094de07df6128af461b9c6acc57b723d83d7c2a3ba31d0ff9
protz/mezzo
MzPprint.ml
(*****************************************************************************) (* Mezzo, a programming language based on permissions *) Copyright ( C ) 2011 , 2012 and (* *) (* This program is free softwar...
null
https://raw.githubusercontent.com/protz/mezzo/4e9d917558bd96067437116341b7a6ea02ab9c39/lib/MzPprint.ml
ocaml
*************************************************************************** Mezzo, a programming language based on permissions This program is free software: you can redistribute it and/or modify (at your optio...
Copyright ( C ) 2011 , 2012 and 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 * This modules exports a modified vers...
07c88d96805a2d85d7d6796d48fe89a009850018ada66d84fd07bffbfc96b2a1
bytekid/mkbtt
indexComparison.ml
(* indexComparison.ml *) * Comapre to index implementations for equivalence @author @since 2008/11/26 @author Sarah Winkler @since 2008/11/26 *) (** This module allows to compare different implementations of indexing; only for testing purposes *) (*** MODULES *********************************************...
null
https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mkbtt/indexComparison.ml
ocaml
indexComparison.ml * This module allows to compare different implementations of indexing; only for testing purposes ** MODULES ************************************************************ ** SUBMODULES ********************************************************* ** TYPES ********************************************...
* Comapre to index implementations for equivalence @author @since 2008/11/26 @author Sarah Winkler @since 2008/11/26 *) module Pos = Rewriting.Position;; module Rewriting = Processors.Rewritingx;; module M = U.Monad;; module Term = U.Term;; open M;; module Make = functor (Entry: TermIndex.ENTRY_TYPE) -> ...
21639408a57956e1ba915e436dcfeef14084577e82867f0bf9bab38bdb5a652e
Prots/olifer
olifer_modifiers.erl
-module(olifer_modifiers). -author(""). -include("olifer.hrl"). %% API -export([ trim/3, to_uc/3, to_lc/3, remove/3, leave_only/3, default/3 ]). %% API trim(Value, [], _) when is_binary(Value) -> {filter, bstring:trim(Value)}; trim(Value, [], _) -> {filter, Value}. to_lc(Value, [], _...
null
https://raw.githubusercontent.com/Prots/olifer/ea036001811b7b3c72c60ec0945124fafb4ea2ff/src/rules/olifer_modifiers.erl
erlang
API API INTERNAL
-module(olifer_modifiers). -author(""). -include("olifer.hrl"). -export([ trim/3, to_uc/3, to_lc/3, remove/3, leave_only/3, default/3 ]). trim(Value, [], _) when is_binary(Value) -> {filter, bstring:trim(Value)}; trim(Value, [], _) -> {filter, Value}. to_lc(Value, [], _) when is_bina...
904d099e3c9869f86863e2b18eace8139d35bb2876625901eca42fc89b20e33f
mirage/conan
parse.ml
(* XXX(dinosaure): anyone can say that this parser is a sh*t and he is true. *) type s = Sub.t let string_head s = if String.length s > 0 then Some s.[0] else None let string_tail s = if String.length s > 0 then String.sub s 1 (String.length s - 1) else "" let ( >>= ) x f = match x with Ok x -> f x | Error err ->...
null
https://raw.githubusercontent.com/mirage/conan/fb144c7785ff0aa4ec6d8c87e58ca2a0c2d328db/src/parse.ml
ocaml
XXX(dinosaure): anyone can say that this parser is a sh*t and he is true. escape TODO(dinosaure): we should clear semantic of this function: "x\t" returns ("x", [])
type s = Sub.t let string_head s = if String.length s > 0 then Some s.[0] else None let string_tail s = if String.length s > 0 then String.sub s 1 (String.length s - 1) else "" let ( >>= ) x f = match x with Ok x -> f x | Error err -> Error err let ( >|= ) x f = match x with Ok x -> Ok (f x) | Error err -> Error ...
5c9f4e7dc193ea5fe903daf6caf0cebe018d62c5b02c3c77811f341c3f996d5a
simmone/racket-simple-xlsx
pie-chart-test.rkt
#lang racket (require simple-xml) (require rackunit/text-ui rackunit) (require "../../../../../xlsx/xlsx.rkt") (require "../../../../../sheet/sheet.rkt") (require "../../../../../lib/lib.rkt") (require "../../../../../xl/charts/charts.rkt") (require "../../../../../xl/charts/lib.rkt") (require racket/runtime-path) ...
null
https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/tests/xl/charts/chart/pie_chart/pie-chart-test.rkt
racket
#lang racket (require simple-xml) (require rackunit/text-ui rackunit) (require "../../../../../xlsx/xlsx.rkt") (require "../../../../../sheet/sheet.rkt") (require "../../../../../lib/lib.rkt") (require "../../../../../xl/charts/charts.rkt") (require "../../../../../xl/charts/lib.rkt") (require racket/runtime-path) ...
3a31905f60e50775afcc8b0e751218e6d301a7a2ca8077fa9fd48ab421dc4794
metosin/reitit
go_perf_test.clj
(ns reitit.go-perf-test (:require [criterium.core :as cc] [reitit.perf-utils :refer [suite title]] [reitit.ring :as ring] [clojure.string :as str])) ;; start repl with ` perf repl ` ;; perf measured with the following setup: ;; ;; Model Name: MacBook Pro ;; Model Ide...
null
https://raw.githubusercontent.com/metosin/reitit/1ab075bd353966636f154ac36ae9b7990efeb008/perf-test/clj/reitit/go_perf_test.clj
clojure
perf measured with the following setup: Model Name: MacBook Pro Model Identifier: MacBookPro113 {"PUT" "/authorizations/clients/:client_id"} {"PATCH" "/authorizations/:id"} Activity {"PATCH" "/notifications/threads/:id"} Gists {"GET" "/gists/public"} {"GET" "/gists/starred"} {"PATCH" "/gis...
(ns reitit.go-perf-test (:require [criterium.core :as cc] [reitit.perf-utils :refer [suite title]] [reitit.ring :as ring] [clojure.string :as str])) start repl with ` perf repl ` Processor Name : Intel Core i7 Processor Speed : 2,5 GHz Number of Processors ...
b98534b794e4745b566d37e35f81380ab069162e9a4d8ddae335b7dda21b5b23
rescript-lang/rescript-compiler
bs_hash_stubs.ml
#ifdef BROWSER let hash_string : string -> int = Hashtbl.hash let hash_string_int s i = Hashtbl.hash (s,i) let hash_string_small_int : string -> int -> int = hash_string_int let hash_stamp_and_name (i:int) (s:string) = Hashtbl.hash(i,s) let hash_int (i:int) = Hashtbl.hash i let string_length_based_compare (x : s...
null
https://raw.githubusercontent.com/rescript-lang/rescript-compiler/81a3dc63ca387b2af23fed297db283254ae3ab20/jscomp/ext/bs_hash_stubs.ml
ocaml
#ifdef BROWSER let hash_string : string -> int = Hashtbl.hash let hash_string_int s i = Hashtbl.hash (s,i) let hash_string_small_int : string -> int -> int = hash_string_int let hash_stamp_and_name (i:int) (s:string) = Hashtbl.hash(i,s) let hash_int (i:int) = Hashtbl.hash i let string_length_based_compare (x : s...
cff6127c5b3901e9837dabf66a9ce6b494e4fa5259d1f61e95fd74c4302b82ae
mentat-collective/sicm-scheme-exercises
ex1-3.scm
Exercise 1.3 : Fermat optics ;; :PROPERTIES: ;; :header-args+: :tangle ch1/ex1-3.scm :comments org ;; :END: (load "ch1/utils.scm") ;; Calculus ;; We can also solve this with calculus. Because the beam doesn't change media, its ;; speed $v$ stays constant, so minimizing the total distance $d$ is equivalent to ;; mi...
null
https://raw.githubusercontent.com/mentat-collective/sicm-scheme-exercises/323300c252641add067f266e23427afd0bb34d8a/ch1/ex1-3.scm
scheme
:PROPERTIES: :header-args+: :tangle ch1/ex1-3.scm :comments org :END: Calculus We can also solve this with calculus. Because the beam doesn't change media, its speed $v$ stays constant, so minimizing the total distance $d$ is equivalent to minimizing the time $t = {d \over v}$. Set $x_1 = 0$ for convenience, an...
Exercise 1.3 : Fermat optics (load "ch1/utils.scm") d(x_p ) = \sqrt{y_1 ^ 2 + x_p^2 } + \sqrt{(x_2 - x_p)^2 + y_2 ^ 2 } (define ((total-distance x1 y1 x2 y2) xp) (+ (sqrt (+ (square (+ x1 xp)) (square y1))) (sqrt (+ (square (- x2 (+ x1 xp))) (square y2))))) Here 's th...
ee65da242b0f307e9b1c33775baeb58a17d30664d56e8b4b00064c21a1d7646e
igarnier/vplot
gradient.mli
type path = (Vlayout.Color.t * float) list type t = { rarr : float array; garr : float array; barr : float array } val begins_at_zero : float list -> bool val ends_at_one : float list -> bool val list_increasing : float list -> bool val path_correct : ('a * float) list -> bool val pair_list_elts : 'a list -> ('a ...
null
https://raw.githubusercontent.com/igarnier/vplot/146467257f110f71d48415fc3ddaf0f46a71035a/lib/gradient.mli
ocaml
type path = (Vlayout.Color.t * float) list type t = { rarr : float array; garr : float array; barr : float array } val begins_at_zero : float list -> bool val ends_at_one : float list -> bool val list_increasing : float list -> bool val path_correct : ('a * float) list -> bool val pair_list_elts : 'a list -> ('a ...
aa93ec26a0b68fd82e0c57b02f7aea33b3e5a81754535c9530ee3cce398c844b
ocaml-community/obus
policy_kit.mli
* policy_kit.mli * -------------- * Copyright : ( c ) 2010 , < > * Licence : BSD3 * * This file is a part of obus , an ocaml implementation of D - Bus . * policy_kit.mli * -------------- * Copyright : (c) 2010, Jeremie Dimino <> * Licence : BSD3 * * This file is a part of obus, an oca...
null
https://raw.githubusercontent.com/ocaml-community/obus/8d38ee6750587ae6519644630b75d53a0a011acd/bindings/policykit/policy_kit.mli
ocaml
* [obtain_authorization ~action_id ~xid ~pid] tries to obtain authorization for [action_id]. It returns whether it succeed or not. @param action_id PolicyKit action identifier; see PolKitAction @param xid X11 window ID for the top-level X11 window the dialog will be transient for @...
* policy_kit.mli * -------------- * Copyright : ( c ) 2010 , < > * Licence : BSD3 * * This file is a part of obus , an ocaml implementation of D - Bus . * policy_kit.mli * -------------- * Copyright : (c) 2010, Jeremie Dimino <> * Licence : BSD3 * * This file is a part of obus, an oca...
7a9b9c420188e7258d96cf28b453867fa340cf4e92f385f6ebd4bf5240378a21
qingliangcn/mgee
mgee_virtual_world.erl
%%%---------------------------------------------------------------------- %%% File : mgee_virtual_world.erl %%% Author : Qingliang Created : 2010 - 1 - 4 Description : Ming game engine erlang %%%---------------------------------------------------------------------- -module(mgee_virtual_world). -define(VW_SLICE...
null
https://raw.githubusercontent.com/qingliangcn/mgee/b65babc3a34ef678ae2b25ce1a8fdd06b2707bb8/src/mgee_virtual_world.erl
erlang
---------------------------------------------------------------------- File : mgee_virtual_world.erl Author : Qingliang ---------------------------------------------------------------------- -------------------------------------------------------------------- Include files -------------------------------------...
Created : 2010 - 1 - 4 Description : Ming game engine erlang -module(mgee_virtual_world). -define(VW_SLICE_WIDTH, 7). -define(VW_SLICE_HEIGHT, 9). -behaviour(gen_server). -include("mgee.hrl"). -include("game_pb.hrl"). -include("global_lang.hrl"). -export([ start_link/1, broad_in_sence/3, broad_in_sence_...
f23a1037d768e2a8f01549a90d2e7c3cb18adf640b0683573328dbcbe09ae45e
cardmagic/lucash
errno.scm
;;; Errno constant definitions. Copyright ( c ) 1993 by . Copyright ( c ) 1994 by . These are the correct values for BSD4.4 - Lite - based systems such as NetBSD 1.0 and FreeBSD 2.0 . is not a legit Scheme symbol . , lose . (define-enum-constants errno ;; POSIX: (perm 1) ; Operation not permitte...
null
https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scsh/bsd/errno.scm
scheme
Errno constant definitions. POSIX: Operation not permitted No such file or directory No such process Interrupted function call Input/output error No such device or address Arg list too long Bad file descriptor No child processes BSD4.4-Lite POSIX: Not enough space Permission denied Bad address BSD4.4-L...
Copyright ( c ) 1993 by . Copyright ( c ) 1994 by . These are the correct values for BSD4.4 - Lite - based systems such as NetBSD 1.0 and FreeBSD 2.0 . is not a legit Scheme symbol . , lose . (define-enum-constants errno Exec format error Resource deadlock avoided Invalid argument Invalid ...
c33d9efaa041baaff7e3d58e89098a160c2e88bc029524cf8dd71ffecc4e63ed
bluddy/rails
mapgen.ml
open Containers open Tilemap let debug = false (* MapGen is both in the backend and the frontend. Probably needs better splitting *) let pixel_apply_mountain = function | Foothills_pixel -> Hills_pixel | Hills_pixel -> Mountain_pixel | Ocean_pixel | River_pixel | Harbor_pixel as x -> x | _ -> Foothills_p...
null
https://raw.githubusercontent.com/bluddy/rails/1c9f69b88294444dd7afdd5f55316da439530d2a/bin/mapgen.ml
ocaml
MapGen is both in the backend and the frontend. Probably needs better splitting Create a list of random mountains to add to the map, based on region Standard mountains Normal mountain placement add current and left for mid-range also add to the right move up for next round break if we went negative ran...
open Containers open Tilemap let debug = false let pixel_apply_mountain = function | Foothills_pixel -> Hills_pixel | Hills_pixel -> Mountain_pixel | Ocean_pixel | River_pixel | Harbor_pixel as x -> x | _ -> Foothills_pixel let add_mountains_list r region = let rec standard_range_loop j acc = if j...
137f5cbad7ddc72735e8ec5a816a8e58d52d13e8b6ef9c3ea4381d1e2f38dfe4
aryx/lfs
suffix_tree.ml
made by (* type of nodes in suffix trees *) type node = { seqid : int; (* sequence index in which the positions start and final are defined *) mutable start : int; (* start and final position of the word labelling the node *) final : int ref; mutable link : node; (* suffix link *) v : node_...
null
https://raw.githubusercontent.com/aryx/lfs/b931530c7132b77dfaf3c99d452dc044fce37589/commons_extra/suffix_tree.ml
ocaml
type of nodes in suffix trees sequence index in which the positions start and final are defined start and final position of the word labelling the node suffix link for non-leaves: children nodes for the key '\000', all values are relevant (use Hashtbl.find_all) for leaves: position of recognized suffix t...
made by type node = { final : int ref; v : node_value } and node_value = type t = string array * node let empty : unit -> node = fun () -> let rec root = {seqid= -1; start=0; final=ref (-1); link=root; v=Children (Hashtbl.create 2)} in root non - significant subseq let subseq_is_empty ...
3552e0504fedfa8ed22d4b465f4a894c5cc1f9136d3b4541caf175ca1491b9e9
cloudfuji/taika
core_test.clj
(ns taika.core-test (:require [midje.sweet :refer :all] [taika.core :as taika])) Firebase database URL used in tests (def url "-db.firebaseIO.com/users.json") (fact "`db-url` should return a proper Firebase database URL" (taika/db-url "test-db" "/users") => url) (fact "`request` should call client ...
null
https://raw.githubusercontent.com/cloudfuji/taika/055c48424fe3359c4fcf75c1540e0dfb1ab72316/test/taika/core_test.clj
clojure
(ns taika.core-test (:require [midje.sweet :refer :all] [taika.core :as taika])) Firebase database URL used in tests (def url "-db.firebaseIO.com/users.json") (fact "`db-url` should return a proper Firebase database URL" (taika/db-url "test-db" "/users") => url) (fact "`request` should call client ...
df015c399b8ae6d7e7793a5426d701defc1f415cfcbe41a84d3994b3bf7df964
GillianPlatform/Gillian
Test262_filtering.ml
let non_strict_tests = [ "language/expressions/this/S11.1.1_A4.1.js"; "language/function-code/10.4.3-1-13-s.js"; "language/function-code/10.4.3-1-13gs.js"; "language/function-code/10.4.3-1-15-s.js"; "language/function-code/10.4.3-1-15gs.js"; "language/function-code/10.4.3-1-19-s.js"; "lang...
null
https://raw.githubusercontent.com/GillianPlatform/Gillian/12f0d50bb3c407bfbce34cc5c08f5d60c71466be/Gillian-JS/lib/Test262/Test262_filtering.ml
ocaml
* These are the tests non covered by our compiler * These are the tests that we fail to pass because of unicode strings. We do not filter them when reporting our results, but we do filter them in CI because we are expecting them to fail and do not intend to fix them for now.
let non_strict_tests = [ "language/expressions/this/S11.1.1_A4.1.js"; "language/function-code/10.4.3-1-13-s.js"; "language/function-code/10.4.3-1-13gs.js"; "language/function-code/10.4.3-1-15-s.js"; "language/function-code/10.4.3-1-15gs.js"; "language/function-code/10.4.3-1-19-s.js"; "lang...
bbe8aa023d0d30c5a5162346ba27291f02129cde707cec038d97c66dfaa5323d
EmileTrotignon/embedded_ocaml_templates
primitive.mli
type t = | Textual of {code: string; startpos: Lexing.position; endpos: Lexing.position} | Parsed of Parsetree.expression val build : string -> Lexing.position -> Lexing.position -> t val with_dummy_pos : string -> t val is_empty : t -> bool
null
https://raw.githubusercontent.com/EmileTrotignon/embedded_ocaml_templates/1ddee779f0410820d9e9f03150e4ae73e1deb835/src/common/mocaml/primitive.mli
ocaml
type t = | Textual of {code: string; startpos: Lexing.position; endpos: Lexing.position} | Parsed of Parsetree.expression val build : string -> Lexing.position -> Lexing.position -> t val with_dummy_pos : string -> t val is_empty : t -> bool
b1fdc1d32f26dec04d0a47a88c28db5fdea2de46312ddd4ecf030051283f9fc4
HealthSamurai/unit-map
util.cljc
(ns unit-map.impl.util (:refer-clojure :exclude [infinite?]) (:require [clojure.string :as str] [clojure.math :as math])) (defn infinite? [x] (and (double? x) (clojure.core/infinite? x))) (def finite? (complement infinite?)) (defn try-parse-long [s] (some->> s str (re-matches #"[-+]?\d+...
null
https://raw.githubusercontent.com/HealthSamurai/unit-map/bd7dad9b30b732c469d921f526dd229c7d69a01c/src/unit_map/impl/util.cljc
clojure
(ns unit-map.impl.util (:refer-clojure :exclude [infinite?]) (:require [clojure.string :as str] [clojure.math :as math])) (defn infinite? [x] (and (double? x) (clojure.core/infinite? x))) (def finite? (complement infinite?)) (defn try-parse-long [s] (some->> s str (re-matches #"[-+]?\d+...
5833f0ccd78942663ba8daabeb3c311763ec9bc4ee6c98008718ed74a0b2c172
avsm/platform
gen_case.ml
--------------------------------------------------------------------------- Copyright ( c ) 2014 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...
null
https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/uucp.12.0.0%2Bdune/support/gen_case.ml
ocaml
--------------------------------------------------------------------------- Copyright ( c ) 2014 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...
38132d2c5bdeddeb851eb8e09198014cf531d6beed13e74df45a9eeaaac6292b
Tclv/HaskellBook
intermission.hs
import Data.Time import Data.Scientific 1 b c 2 ( 3 * ( 2 * ( 1 * 1 ) ) ) 3 c 4 a 5 a = foldr (++) "" ["woot", "WOOT", "woot"] b = foldr max ' ' "fear is the little death" c = foldr (&&) True [False, True] d = foldr (||) False [False, True] e = foldr ((++) . show ) "" [1..5] f = foldl const 'a' [1..5] g = fol...
null
https://raw.githubusercontent.com/Tclv/HaskellBook/78eaa5c67579526b0f00f85a10be3156bc304c14/ch10/intermission.hs
haskell
import Data.Time import Data.Scientific 1 b c 2 ( 3 * ( 2 * ( 1 * 1 ) ) ) 3 c 4 a 5 a = foldr (++) "" ["woot", "WOOT", "woot"] b = foldr max ' ' "fear is the little death" c = foldr (&&) True [False, True] d = foldr (||) False [False, True] e = foldr ((++) . show ) "" [1..5] f = foldl const 'a' [1..5] g = fol...
8cfdd8c9b3a6d9e0c5a97a40be7f5d112f41d4b2350e624a20f47270e5210101
blynn/compiler
assembly.hs
-- Disassembler. infixr 9 .; infixl 7 * , / , %; infixl 6 + , -; infixr 5 ++; infixl 4 <*> , <$> , <* , *>; infix 4 == , /= , <=; infixl 3 && , <|>; infixl 2 ||; infixl 1 >> , >>=; infixr 0 $; foreign import ccall "putchar" putChar :: Int -> IO Int; foreign import ccall "getchar" getChar :: IO Int; foreign import ccal...
null
https://raw.githubusercontent.com/blynn/compiler/b9fe455ad4ee4fbabe77f2f5c3c9aaa53cffa85b/assembly.hs
haskell
Disassembler. Map. Parsing. | Instance environment. | Either top-level or instance definitions. | Typed ASTs, ready for compilation, including ADTs and methods, e.g. (==), (Eq a => a -> a -> Bool, select-==) | Data constructor table. | FFI declarations. | Exports. Primitives. Definitions like "t = t;" must ...
infixr 9 .; infixl 7 * , / , %; infixl 6 + , -; infixr 5 ++; infixl 4 <*> , <$> , <* , *>; infix 4 == , /= , <=; infixl 3 && , <|>; infixl 2 ||; infixl 1 >> , >>=; infixr 0 $; foreign import ccall "putchar" putChar :: Int -> IO Int; foreign import ccall "getchar" getChar :: IO Int; foreign import ccall "getargcount" g...
465039840bc52bd2f13db94982e85a4a801c770f96f9f924f5f9e665f79fe93d
haskell-lisp/yale-haskell
cfn.scm
cfn.scm -- module definition for CFN phase ;;; author : date : 11 Mar 1992 ;;; (define-compilation-unit cfn (source-filename "$Y2/cfn/") (require ast haskell-utils) (unit main (source-filename "main.scm")) (unit misc (source-filename "misc.scm") (require main)) (unit pattern (source-filen...
null
https://raw.githubusercontent.com/haskell-lisp/yale-haskell/4e987026148fe65c323afbc93cd560c07bf06b3f/cfn/cfn.scm
scheme
cfn.scm -- module definition for CFN phase author : date : 11 Mar 1992 (define-compilation-unit cfn (source-filename "$Y2/cfn/") (require ast haskell-utils) (unit main (source-filename "main.scm")) (unit misc (source-filename "misc.scm") (require main)) (unit pattern (source-filename "pat...
b0854ffc992bb6986425e4066e82656ea870a90b729f70312d3397908f0a258a
glondu/belenios
site_admin_sig.mli
(**************************************************************************) (* BELENIOS *) (* *) Copyright © 2012 - 2022 (* ...
null
https://raw.githubusercontent.com/glondu/belenios/5306402c15c6a76438b13b8b9da0f45d02a0563d/src/web/server/common/site_admin_sig.mli
ocaml
************************************************************************ BELENIOS This program is free softw...
Copyright © 2012 - 2022 it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the exemption that compiling , linking , and/or using OpenSSL is allowed . You should have rece...
7f3764fe190105a4f7a0fd0b6b34dfd47b9f16789cf6c96e1bf466b3aca551c6
kadena-io/kadenamint
Pact.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeOperators # module Kadenamint.Pact where import Control.Arrow ((&&&)) import Control.Concurrent.MVar (M...
null
https://raw.githubusercontent.com/kadena-io/kadenamint/00c99eca71c4107d1ed31754e26d9e552237e3bd/src/Kadenamint/Pact.hs
haskell
# LANGUAGE OverloadedStrings # Simple cors with actually simpleHeaders which includes content-type.
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeOperators # module Kadenamint.Pact where import Control.Arrow ((&&&)) import Control.Concurrent.MVar (MVar, newEmptyMVar, readMVar, tryRea...
7e03617e14ce245f89647a6b50bbcfaa3c72ac940b61fe27827f2dcf20ee4f25
craigl64/clim-ccl
make-classes.lisp
;; -*- mode: Lisp; Syntax: ANSI-Common-Lisp; package: tk -*- ;; See the file LICENSE for the full license governing this code. ;; (in-package :tk) (defun get-foreign-variable-value (x) (let ((ep #-dlfcn (ff:get-extern-data-address x) #+dlfcn (ff:get-entry-point x #-(version>= 5 0) :note-shared-li...
null
https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/tk/make-classes.lisp
lisp
-*- mode: Lisp; Syntax: ANSI-Common-Lisp; package: tk -*- See the file LICENSE for the full license governing this code. This is only called to fill in the cache, so it can be (real) slow. --- Perhaps we can just do this when we want to grab the resources. --- In this way we would only have to do one the display is...
(in-package :tk) (defun get-foreign-variable-value (x) (let ((ep #-dlfcn (ff:get-extern-data-address x) #+dlfcn (ff:get-entry-point x #-(version>= 5 0) :note-shared-library-references #-(version>= 5 0) nil))) (unless ep (error "Entry point ~S not found" x)) (class-array ep 0))) (d...
5fe85f9a06597bcbea81d979c2db451b7ccea18c8f6e102888e81c044fb8df18
mattsta/er
er_pool_switcher.erl
-module(er_pool_switcher). -behaviour(gen_server). %% gen_server callbacks -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). %% api callbacks -export([start_link/2]). Pid of er_pool and }). %%==============================================...
null
https://raw.githubusercontent.com/mattsta/er/7ac6dccf4952ddf32d921b6548026980a3db70c7/src/er_pool_switcher.erl
erlang
gen_server callbacks api callbacks ==================================================================== api callbacks ==================================================================== ==================================================================== gen_server callbacks =======================================...
-module(er_pool_switcher). -behaviour(gen_server). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -export([start_link/2]). Pid of er_pool and }). start_link(GenServerName, PoolsWithArgs) when is_atom(GenServerName) andalso is_list(...
cb0d5583a771f2b2bcf1b493034d7d51eb1bf68a0be519038c33198672b13c56
ChrisPenner/proton
Review.hs
# LANGUAGE QuantifiedConstraints # # LANGUAGE TypeApplications # # LANGUAGE PartialTypeSignatures # # LANGUAGE DataKinds # # LANGUAGE PolyKinds # module Proton.Review where import Data.Profunctor import Data.Tagged import Data.Bifunctor import Proton.Getter import Data.Void type Review s t a b = forall p. (Profuncto...
null
https://raw.githubusercontent.com/ChrisPenner/proton/4ce22d473ce5bece8322c841bd2cf7f18673d57d/src/Proton/Review.hs
haskell
# LANGUAGE QuantifiedConstraints # # LANGUAGE TypeApplications # # LANGUAGE PartialTypeSignatures # # LANGUAGE DataKinds # # LANGUAGE PolyKinds # module Proton.Review where import Data.Profunctor import Data.Tagged import Data.Bifunctor import Proton.Getter import Data.Void type Review s t a b = forall p. (Profuncto...
c9936aca54a04f8342228482b8a0a3bf78b84d518b6716459c8b2433027cea15
gerlion/secure-e-voting-with-coq
lib.ml
type __ = Obj.t let __ = let rec f _ = Obj.repr f in Obj.repr f * negb : bool - > bool * let negb = function | true -> false | false -> true type nat = | O | S of nat (** val fst : ('a1 * 'a2) -> 'a1 **) let fst = function | (x, _) -> x * snd : ( ' a1 * ' a2 ) - > ' a2 * let snd = function | (_, y) -> y type...
null
https://raw.githubusercontent.com/gerlion/secure-e-voting-with-coq/c85f58f5759b960cc9d90a96fe7970e038523a9a/OCamlCHVote/lib.ml
ocaml
* val fst : ('a1 * 'a2) -> 'a1 * singleton inductive, whose constructor was exist * val pred : nat -> nat * * val succ_double_mask : mask -> mask * * val sub_mask_carry : Big.big_int -> Big.big_int -> mask * * val compare_cont : comparison -> Big.big_int -> Big.big_int -> comparison * * val compare : Big.big_in...
type __ = Obj.t let __ = let rec f _ = Obj.repr f in Obj.repr f * negb : bool - > bool * let negb = function | true -> false | false -> true type nat = | O | S of nat let fst = function | (x, _) -> x * snd : ( ' a1 * ' a2 ) - > ' a2 * let snd = function | (_, y) -> y type comparison = | Eq | Lt | Gt type 'a...
9ceeb6b2f75ced2d86da27e263c4cac5126f2c37dba47c1126e6574ef7bbcfc8
restyled-io/restyler
Display.hs
module GitHub.Request.Display ( DisplayGitHubRequest , displayGitHubRequest ) where import Prelude import Data.Text (Text, pack) import qualified Data.Text as T import Data.Text.Encoding (decodeUtf8) import GitHub.Request newtype DisplayGitHubRequest = DisplayGitHubRequest { _unDisplayGitHubRequest :...
null
https://raw.githubusercontent.com/restyled-io/restyler/3da7d1cb62ec078c03794d4a2c5fbeb5c26fd005/src/GitHub/Request/Display.hs
haskell
module GitHub.Request.Display ( DisplayGitHubRequest , displayGitHubRequest ) where import Prelude import Data.Text (Text, pack) import qualified Data.Text as T import Data.Text.Encoding (decodeUtf8) import GitHub.Request newtype DisplayGitHubRequest = DisplayGitHubRequest { _unDisplayGitHubRequest :...
a784cbc4716acb3f65f98b76e723a5fae42fb7e7ff573f220de84b71d2c25724
helium/router
router_xor_filter_worker.erl
%%%------------------------------------------------------------------- %% @doc %% == Router xor filter worker == %% @end %%%------------------------------------------------------------------- -module(router_xor_filter_worker). -behavior(gen_server). %% -----------------------------------------------------------------...
null
https://raw.githubusercontent.com/helium/router/2a9fc72e07b913015f9bcd29df83f23b2505d683/src/router_xor_filter_worker.erl
erlang
------------------------------------------------------------------- @doc == Router xor filter worker == @end ------------------------------------------------------------------- ------------------------------------------------------------------ API Function Exports -------------------------------------------------...
-module(router_xor_filter_worker). -behavior(gen_server). -export([ start_link/1, estimate_cost/0, check_filters/0, rebalance_filters/0, migrate_filter/3, move_to_front/2, get_balanced_filters/0, commit_groups_to_filters/1, refresh_cache/0, get_device_updates/0, reset_db/1 ...
9e3d45a4614edc593325d57cbe1e1f3d379328db40eb46a7f0af8b7f0facccbb
hercules-ci/hercules-ci-agent
Env.hs
module Hercules.Agent.Worker.Env where import Control.Concurrent.STM (TVar) import Data.IORef (IORef) import Data.UUID (UUID) import Hercules.Agent.Worker.HerculesStore (HerculesStore) import qualified Hercules.Agent.WorkerProtocol.Command.BuildResult as BuildResult import Hercules.Agent.WorkerProtocol.Event (Event) i...
null
https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/2437ff55720063dcbb9f85a63c40e2589867a29b/hercules-ci-agent/hercules-ci-agent-worker/Hercules/Agent/Worker/Env.hs
haskell
module Hercules.Agent.Worker.Env where import Control.Concurrent.STM (TVar) import Data.IORef (IORef) import Data.UUID (UUID) import Hercules.Agent.Worker.HerculesStore (HerculesStore) import qualified Hercules.Agent.WorkerProtocol.Command.BuildResult as BuildResult import Hercules.Agent.WorkerProtocol.Event (Event) i...
a19613c57e3340e20a42922437b21f75f209b423fb2cf16621592a857bcdcc4b
jtdaugherty/vty
interactive_terminal_test.hs
# LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # module Main where import Graphics.Vty import Graphics.Vty.Attributes import Graphics.Vty.Inline import Graphics.Vty.Picture import Graphics.Vty.Output import Control.Concurrent (threadDelay) import Control.Exception import Control.Monad import Data.List ( loo...
null
https://raw.githubusercontent.com/jtdaugherty/vty/a4cb4cfc386a4bc0e46921d878b808e76567ebc9/examples/interactive_terminal_test.hs
haskell
-----------| -----------| Explicitly define the bytes that encode each example text. This avoids any issues with how the compiler represents string literals. reference comments ;-) txt0 = ↑↑↓↓←→←→BA
# LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # module Main where import Graphics.Vty import Graphics.Vty.Attributes import Graphics.Vty.Inline import Graphics.Vty.Picture import Graphics.Vty.Output import Control.Concurrent (threadDelay) import Control.Exception import Control.Monad import Data.List ( loo...
7754480937337ef8fbf066c611ec75820d8a84127d112c4f7a70eace24ffee1a
nasa/PRECiSA
AbsRawSpecLang.hs
-- Notices: -- Copyright 2020 United States Government as represented by the Administrator of the National Aeronautics and Space Administration . All Rights Reserved . -- Disclaimers No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTO...
null
https://raw.githubusercontent.com/nasa/PRECiSA/91e1e7543c5888ad5fb123d3462f71d085b99741/PRECiSA/src/AbsRawSpecLang.hs
haskell
Notices: Disclaimers
Copyright 2020 United States Government as represented by the Administrator of the National Aeronautics and Space Administration . All Rights Reserved . No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTORY , INCLUDING , BUT NOT LIMIT...
e4773233869305bd623909a022674d6a97801a8988b42499bec9e73094a34616
namin/metamk
ex-path.scm
(define-rel (patho x y) ((patho-clause patho)) () (conde [(edgeo x y)] [(fresh (z) (edgeo x z) (patho z y))])) (defmatche (edgeo x y) [(a b)] [(b c)] [(c a)])
null
https://raw.githubusercontent.com/namin/metamk/568c44903460f933eca8995425ebe7db5125fdda/ex-path.scm
scheme
(define-rel (patho x y) ((patho-clause patho)) () (conde [(edgeo x y)] [(fresh (z) (edgeo x z) (patho z y))])) (defmatche (edgeo x y) [(a b)] [(b c)] [(c a)])
c163e2187a8f8115f5806337bcba7d891018edfb2f6ceaf0c1512bc617809ab6
theangelperalta/cl-objc
msg-send.lisp
(in-package "OBJC-CFFI") ;;; Method calls (defcfun ("objc_msgSend" objc-msg-send) :pointer (id objc-id) (sel objc-sel) &rest) (cffi:defcfun ("objc_msgSend_fpret" objc-msg-send-fpret) :double (id objc-id) (sel objc-sel) &rest) (cffi:defcfun ("objc_msgSend_fpret" objc-msg-send-sfpret) :float (id objc-id...
null
https://raw.githubusercontent.com/theangelperalta/cl-objc/6daf2edf6d922e7ee1acaf259ea5510b16580379/src/msg-send.lisp
lisp
Method calls Building foreign function declarations for each objc primitive type e.g. char-objc-msg-send, unsigned-int-objc-msg-send, etc. big struct passed by value as argument big struct as return value passed by value small struct as return value passed by value general case All rights reserved. Redistri...
(in-package "OBJC-CFFI") (defcfun ("objc_msgSend" objc-msg-send) :pointer (id objc-id) (sel objc-sel) &rest) (cffi:defcfun ("objc_msgSend_fpret" objc-msg-send-fpret) :double (id objc-id) (sel objc-sel) &rest) (cffi:defcfun ("objc_msgSend_fpret" objc-msg-send-sfpret) :float (id objc-id) (sel objc-sel...
3a5ed1d494d702c150aa567a664acf9eac23875f0fe738e079b78a59696f2ffb
ndmitchell/catch
Main.hs
module Main where import System.FilePath import Yhc.Core import System.Environment import System.Directory import Data.Maybe import Data.List import Data.Char import Debug.Trace import qualified Data.Set as Set main = do x <- getArgs mapM_ f x where f fil = do file <- findFi...
null
https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/firstify/Main.hs
haskell
module Main where import System.FilePath import Yhc.Core import System.Environment import System.Directory import Data.Maybe import Data.List import Data.Char import Debug.Trace import qualified Data.Set as Set main = do x <- getArgs mapM_ f x where f fil = do file <- findFi...
bb9a53439ed92dd848d883e7abf9d8b8033ac77ae0fcfb29fe12a365d737ba35
nineties/Choco
Arch.hs
------------------------------------------------- Choco -- Chikadzume Oriented Compiler -- Copyright 2007 - 2008 by Basement fairy -- ------------------------------------------------- module Arch ( archName, sizeAddr, sizeInt, sizeFloat, A...
null
https://raw.githubusercontent.com/nineties/Choco/0081351d0b556ff74f096accb65c9ab45d29ddfe/tsubaki/Arch.hs
haskell
----------------------------------------------- -----------------------------------------------
module Arch ( archName, sizeAddr, sizeInt, sizeFloat, AddressingMode(..), hsramSize ) where archName = "tsubaki" sizeAddr, sizeInt, sizeFloat :: Int sizeAddr = 4 sizeInt = 4 sizeFloat = 4 data AddressingMode = Ibased String Int | Iindexed Int deriving (Eq, Ord, Show) hsramSi...
483ef89fee0a70045ed51cbb35e8a1c625a08e9aff18ed7c77d32722f2caf567
sile/ppg
ppg_group_sup.erl
Copyright ( c ) 2016 , < > %% This software is released under the MIT License . %% See the LICENSE file in the project root for full license information. %% %% @doc Supervisor for local groups @private -module(ppg_group_sup). -behaviour(supervisor). %%---------------------------------------------------------...
null
https://raw.githubusercontent.com/sile/ppg/2bf2a6ddb0b21f4661eeb22b04cf5e1ad44f7af9/src/ppg_group_sup.erl
erlang
See the LICENSE file in the project root for full license information. @doc Supervisor for local groups ---------------------------------------------------------------------------------------------------------------------- Exported API -------------------------------------------------------------------------------...
Copyright ( c ) 2016 , < > This software is released under the MIT License . @private -module(ppg_group_sup). -behaviour(supervisor). -export([start_link/0]). -export([start_child/1]). -export([stop_child/1]). -export([find_child/1]). -export([which_children/0]). -export([init/1]). -spec start_link() -> {o...
00073cf63bbe3ed281956ccba4afff2de6b789ba67e91dee6c4016cd40f67f52
mzp/websocket-ocaml
logger.mli
-*- coding : utf-8 -*- type t val cError : t val cInfo : t val cDebug : t (** 出力レベルの設定 *) val set_level : t -> unit (** ログを吐く方法の指定。(複数指定できる) *) val add_handler : (string -> unit) -> unit (** デフォルトの出力レベル、Handlerに設定する *) val setup : unit -> unit (** 出力レベルがError,Info,Debugなら出力 *) val error : string -> unit (** 出力レ...
null
https://raw.githubusercontent.com/mzp/websocket-ocaml/b584bd20dfe6d95f65bc6e1ba8838b1ecfa8ec0e/webSocket/logger.mli
ocaml
* 出力レベルの設定 * ログを吐く方法の指定。(複数指定できる) * デフォルトの出力レベル、Handlerに設定する * 出力レベルがError,Info,Debugなら出力 * 出力レベルがInfo,Debugなら出力 * 出力レベルがDebugなら出力
-*- coding : utf-8 -*- type t val cError : t val cInfo : t val cDebug : t val set_level : t -> unit val add_handler : (string -> unit) -> unit val setup : unit -> unit val error : string -> unit val info : string -> unit val debug : string -> unit val __set_time : float -> unit
04b10eebcf53b3cd54865887b9124ebb21763e93b30a62b4622c427e1403d0e5
SimulaVR/godot-haskell
VisualShaderNodeTextureUniform.hs
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.VisualShaderNodeTextureUniform (Godot.Core.VisualSha...
null
https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/VisualShaderNodeTextureUniform.hs
haskell
| Sets the default color if no texture is assigned to the uniform. | Sets the default color if no texture is assigned to the uniform. | Defines the type of data provided by the source texture. See @enum TextureType@ for options. | Defines the type of data provided by the source texture. See @enum TextureType@ for o...
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.VisualShaderNodeTextureUniform (Godot.Core.VisualSha...
5e12d240bf2a68f5546283d39c790aa03d6b69775b3f4f89fbd493b90fbc1ca6
bjornbm/astro
Parser.hs
# LANGUAGE NamedFieldPuns # module Astro.Celestrak.Parser (parseEOPFile) where import Astro.Celestrak import Data.Time import Text.Parsec import Text.Parsec.String import Text . Parsec . ByteString . Lazy import qualified Text.Parsec.Token as P import Text.Parsec.Language (haskellDef) import Numeric.Units.Dimensional...
null
https://raw.githubusercontent.com/bjornbm/astro/336e89778bf98f30aeaf94e09802748b190eee09/src/Astro/Celestrak/Parser.hs
haskell
-------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- --------------------...
# LANGUAGE NamedFieldPuns # module Astro.Celestrak.Parser (parseEOPFile) where import Astro.Celestrak import Data.Time import Text.Parsec import Text.Parsec.String import Text . Parsec . ByteString . Lazy import qualified Text.Parsec.Token as P import Text.Parsec.Language (haskellDef) import Numeric.Units.Dimensional...
209393e3a84971ea55c864489c0fc201def46cb048f118f6a6f4329e593bafda
LexiFi/menhir
GraphNumbering.mli
(******************************************************************************) (* *) (* Fix *) (* ...
null
https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/fix/src/GraphNumbering.mli
ocaml
**************************************************************************** Fix ...
, Paris . All rights reserved . This file is distributed under the terms of the GNU Library General Public License version 2 , with a open Sigs * [ ) ] produces a numbering of the graph [ G ] , or more precisely , of the subset of the vertic...
58c4c03e1af622bf40dd18dceb58bf186dde317e9497105e0bd3ff3ae338002a
eerohele/tab
log.clj
(ns tab.log "Log things." (:require [clojure.edn :as edn] [clojure.set :as set]) (:import (java.util Date) (java.util.logging ConsoleHandler Formatter Handler Logger Level LogRecord))) (set! *warn-on-reflection* true) (def ^Level keyword->level {:finest Level/FINEST :finer Level/FINE...
null
https://raw.githubusercontent.com/eerohele/tab/212f58af8eb10fcb788a72b6e8ff20c44863bfb6/src/tab/log.clj
clojure
(ns tab.log "Log things." (:require [clojure.edn :as edn] [clojure.set :as set]) (:import (java.util Date) (java.util.logging ConsoleHandler Formatter Handler Logger Level LogRecord))) (set! *warn-on-reflection* true) (def ^Level keyword->level {:finest Level/FINEST :finer Level/FINE...
877d18dd8a685abcc55fc885de1e1a51a9f9ae89ebcac144787d616b08777f05
GentlemanHal/ring-curl
core_test.clj
(ns ring-curl.core-test (:require [midje.sweet :refer :all] [ring-curl.core :as subject])) (facts "adds the request method" (fact "converted to uppercase" (subject/method {:request-method :get}) => "-X GET" (subject/method {:request-method :post}) => "-X POST" ...
null
https://raw.githubusercontent.com/GentlemanHal/ring-curl/ea1f6d5b5626e58d3d586392eeccbf69ad2892a8/test/ring_curl/core_test.clj
clojure
\"")
(ns ring-curl.core-test (:require [midje.sweet :refer :all] [ring-curl.core :as subject])) (facts "adds the request method" (fact "converted to uppercase" (subject/method {:request-method :get}) => "-X GET" (subject/method {:request-method :post}) => "-X POST" ...
3b7cc332687d8c4b6a6bd0a82535fd8a10500d5c4f73df540a7c137866ddd347
input-output-hk/cardano-ledger
Babbage.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -Wno - orphans # module Cardano.Ledger.Babbage ( Babbage...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/e0947b0c2e99ef929d20593be03e199560392f42/eras/babbage/impl/src/Cardano/Ledger/Babbage.hs
haskell
# LANGUAGE OverloadedStrings # =====================================================
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -Wno - orphans # module Cardano.Ledger.Babbage ( Babbage, BabbageEra, BabbageTxOut, B...
b39b13cf90faf40b7c3b699bd4fc42b0170c091455e03b851d102b2c443e2ab8
cram2/cram
perform.lisp
;;; Copyright ( c ) 2016 , < > ;;; All rights reserved. ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions are met: ;;; ;;; * Redistributions of source code must retain the above copyright ;;; notice, this list...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_core/cram_executive/src/perform.lisp
lisp
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redi...
Copyright ( c ) 2016 , < > * Neither the name of the Institute for Artificial Intelligence/ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR ...
213bc304e2355c9637361449105a012d469aed26931ee604207adafcaf898e0a
alex-gutev/wasm-encoder
package.lisp
package.lisp ;;; Copyright ( c ) 2020 < > ;;; ;;; 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 use, copy, modify...
null
https://raw.githubusercontent.com/alex-gutev/wasm-encoder/92c7f82d60ed741985a693b706c860ab5b4757cd/src/package.lisp
lisp
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 notice...
package.lisp Copyright ( c ) 2020 < > in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , E...
76001376008b278cf944ee711fd4dd9a316662f62be80aba04738a19c5f14ee8
tweag/webauthn
Authentication.hs
# LANGUAGE ApplicativeDo # # LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} -- | Stability: experimental -- This module implements assertion of the received authenticator response. See the WebAuthn -- [specification](-2/#sctn-verifying-assertion) -- for the algorithm implemented in this module. -- Assertion is typicall...
null
https://raw.githubusercontent.com/tweag/webauthn/b9341781bc82ed32a8b729036ae96f636198542f/src/Crypto/WebAuthn/Operation/Authentication.hs
haskell
# LANGUAGE GADTs # | Stability: experimental This module implements assertion of the received authenticator response. [specification](-2/#sctn-verifying-assertion) for the algorithm implemented in this module. Assertion is typically represented as a "login" or "authentication" action in the front-end. describes ...
# LANGUAGE ApplicativeDo # # LANGUAGE DataKinds # See the WebAuthn [ Section 7 of the specification]( / TR / webauthn-2/#sctn - rp - operations ) module Crypto.WebAuthn.Operation.Authentication ( verifyAuthenticationResponse, AuthenticationError (..), AuthenticationResult (..), SignatureCounterResult...
9f81cf64eae79617f10b0d4f18136ef8813301efe008fa76c3431683b2f3e1c6
qitab/pyjure
clarification_test.clj
(ns pyjure.clarification-test (:use [clojure.test] [clojure.core.match :only [match]] [pyjure.core] [pyjure.core-test] [pyjure.debug] [pyjure.passes] [pyjure.utilities] [pyjure.parsing] [pyjure.clarification])) (deftest clarification-test (testing "Ev...
null
https://raw.githubusercontent.com/qitab/pyjure/b9aa49b4f74c85f2b617e924f61eaddb194119bf/test/pyjure/clarification_test.clj
clojure
(ns pyjure.clarification-test (:use [clojure.test] [clojure.core.match :only [match]] [pyjure.core] [pyjure.core-test] [pyjure.debug] [pyjure.passes] [pyjure.utilities] [pyjure.parsing] [pyjure.clarification])) (deftest clarification-test (testing "Ev...
620bcfad74212dc8ed1b32b0c65fa4d2f591e583dac5fce97484b5bc8052eef8
aws-beam/aws-erlang
aws_kafka.erl
%% WARNING: DO NOT EDIT, AUTO-GENERATED CODE! See -beam/aws-codegen for more details . @doc The operations for managing an Amazon MSK cluster . -module(aws_kafka). -export([batch_associate_scram_secret/3, batch_associate_scram_secret/4, batch_disassociate_scram_secret/3, batch_disassoci...
null
https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_kafka.erl
erlang
WARNING: DO NOT EDIT, AUTO-GENERATED CODE! ==================================================================== API ==================================================================== serverless type. in the request. The configuration must be in the ACTIVE or DELETE_FAILED state. request. @doc Returns a descri...
See -beam/aws-codegen for more details . @doc The operations for managing an Amazon MSK cluster . -module(aws_kafka). -export([batch_associate_scram_secret/3, batch_associate_scram_secret/4, batch_disassociate_scram_secret/3, batch_disassociate_scram_secret/4, create_cluster/2,...
8289ef7b455fc4d42308b47872ce93cc0eb6ff5cd7fa7be4bf575dc08a1eb9e2
ghc/ghc
BaseDir.hs
# LANGUAGE CPP # -- | Note [Base Dir] -- ~~~~~~~~~~~~~~~~~ GHC 's base directory or top directory containers miscellaneous settings and -- the package database. The main compiler of course needs this directory to read those settings and read and write packages . ghc - pkg uses it to find the -- global package dat...
null
https://raw.githubusercontent.com/ghc/ghc/13d627bbd0bc3dd30d672de341aa7f471be0aa2c/libraries/ghc-boot/GHC/BaseDir.hs
haskell
| Note [Base Dir] ~~~~~~~~~~~~~~~~~ the package database. The main compiler of course needs this directory to global package database too. and so needs the top dir location to do that too. See Note [Why do we import Prelude here?] POSIX | Expand occurrences of the @$topdir@ interpolation in a string. | @expa...
# LANGUAGE CPP # GHC 's base directory or top directory containers miscellaneous settings and read those settings and read and write packages . ghc - pkg uses it to find the In the interest of making GHC builds more relocatable , many settings also will expand ` $ { top_dir } ` inside strings so GHC does n't n...
9acb471a084622536991508b2540603fd9b52f63208bf50f4e54eb598756e1e8
zarkone/stumpwm.d
commands.lisp
(in-package :stumpwm) (export '(loadrc-forget now-playing sh-time sdcv set-backlight)) (defcommand loadrc-forget () () "Reload the @file{~/.stumpwmrc} file without remember current state." (handler-case (progn (with-restarts-menu (load-rc-file nil))) (error (c) ...
null
https://raw.githubusercontent.com/zarkone/stumpwm.d/021e51c98a80783df1345826ac9390b44a7d0aae/commands.lisp
lisp
(in-package :stumpwm) (export '(loadrc-forget now-playing sh-time sdcv set-backlight)) (defcommand loadrc-forget () () "Reload the @file{~/.stumpwmrc} file without remember current state." (handler-case (progn (with-restarts-menu (load-rc-file nil))) (error (c) ...
1aba6fa164adb64266d4bcd9e7b04ab96b425a3391c3cd6d93faa72006464fce
flipstone/haskell-for-beginners
2_applicative_functors.hs
import Control.Applicative import Data.Char -- Define getIntLine as in the previous -- problems, but use Applicative functions -- instead of fmap (no cheating and using -- <$> either!) -- getIntLine :: IO Int getIntLine = pure read <*> getLine Define addition for Applicatives using -- the 'Applicative style'. Exer...
null
https://raw.githubusercontent.com/flipstone/haskell-for-beginners/e586a1f3ef08f21d5181171fe7a7b27057391f0b/answers/chapter_11/2_applicative_functors.hs
haskell
Define getIntLine as in the previous problems, but use Applicative functions instead of fmap (no cheating and using <$> either!) the 'Applicative style'. Exercise your in GHCI to see how it behaves. Try Maybe, lists, Reimplement the encrypt and decrypt functions from Pick an Applicative and demonstrate that...
import Control.Applicative import Data.Char getIntLine :: IO Int getIntLine = pure read <*> getLine Define addition for Applicatives using definition with different Applicatives IO , and functions . aPlus :: (Num a, Applicative f) => f a -> f a -> f a aPlus x y = (+) <$> x <*> y Use lists an Applicatives to...