_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
1d2c81663da9d4c1d95fed0e0683c2eb975d77ee48518cfbc118e29dfb186fdd
seek-oss/serverless-haskell
Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import AWSLambda.Events.APIGateway import Control.Lens import qualified Data.HashMap.Strict as HashMap import Data.Semigroup import Data.Text (Text) main :: IO () main = apiGatewayMain hello hello :...
null
https://raw.githubusercontent.com/seek-oss/serverless-haskell/dbea96e657e23fd4a3fef03bdf182f060dc2590d/example-project/apigw-app/Main.hs
haskell
# LANGUAGE OverloadedStrings #
module Main where import AWSLambda.Events.APIGateway import Control.Lens import qualified Data.HashMap.Strict as HashMap import Data.Semigroup import Data.Text (Text) main :: IO () main = apiGatewayMain hello hello :: APIGatewayProxyRequest Text -> IO...
f79fa25eebd7150d33f70073f3275c5334f9bd4ca096fd2433ecbf44397d24d2
clash-lang/clash-compiler
Module.hs
| Copyright : ( C ) 2022 Google Inc. License : BSD2 ( see the file LICENSE ) Maintainer : QBayLogic B.V. < > Copyright: (C) 2022 Google Inc. License: BSD2 (see the file LICENSE) Maintainer: QBayLogic B.V. <> -} module Clash.FFI.VPI.Module ( Module(..) , topModules , findTopModule ...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/17b9f807ee01c7ee7b5379ee5f6e9ff60aeab4a6/clash-ffi/src/Clash/FFI/VPI/Module.hs
haskell
@vpiModule@ object type. This wrapper exposes operations which are known to be safe on objects specifically. Modules can be unsafely created from 'Object', although this is only safe if can be safely converted to the base object type using 'moduleObject'. | Iterate the top-level of a design, finding all the modu...
| Copyright : ( C ) 2022 Google Inc. License : BSD2 ( see the file LICENSE ) Maintainer : QBayLogic B.V. < > Copyright: (C) 2022 Google Inc. License: BSD2 (see the file LICENSE) Maintainer: QBayLogic B.V. <> -} module Clash.FFI.VPI.Module ( Module(..) , topModules , findTopModule ...
806655c2001210ff06e6193a500d3bc46c64a8d9c6a3fca20d8e8462a124aa1a
aryx/lfs
size_logic.ml
open Common open Common_logic type interval = Val of int | Sup of int | Inf of int | In of (int * int) let parse = fun s -> match s with | s when s =~ "^[0-9]+$" -> Val (s_to_i s) | s when s =~ "^>\\([0-9]+\\)$" -> Sup (s_to_i (matched1 s)) | s when s =~ "^<\\([0-9]+\\)$" -> Inf (s_to_i (matched1 s)) | s...
null
https://raw.githubusercontent.com/aryx/lfs/b931530c7132b77dfaf3c99d452dc044fce37589/p_logic/size_logic.ml
ocaml
sugar
open Common open Common_logic type interval = Val of int | Sup of int | Inf of int | In of (int * int) let parse = fun s -> match s with | s when s =~ "^[0-9]+$" -> Val (s_to_i s) | s when s =~ "^>\\([0-9]+\\)$" -> Sup (s_to_i (matched1 s)) | s when s =~ "^<\\([0-9]+\\)$" -> Inf (s_to_i (matched1 s)) | s...
390205ed1170e79f4108799e9de79cec67cd6d7e7fa28b2e800f4f808313d2f4
blindglobe/lisp-matrix
fixed-types.lisp
It 's easier to unroll a DOTIMES than it is to unroll a general LOOP or ITERATE macro . DOTIMES looks like ( DOTIMES ( var bound [ optional - return - value ] ) & body ) ;;; ;;; FIXME: what about declarations in the body? Those will break ;;; the code below. (defmacro unroll-dotimes (the-dotimes) (destruc...
null
https://raw.githubusercontent.com/blindglobe/lisp-matrix/f9c88dae132baf52884dd54612581d1331b82b40/src/experimental/fixed-types.lisp
lisp
FIXME: what about declarations in the body? Those will break the code below. routines that factor the matrix in place using partial pivoting. The goal is to produce fully unrolled factorization routines, though that can increase code size a lot. For now we just produce loops. Find max pivot Swap row j and...
It 's easier to unroll a DOTIMES than it is to unroll a general LOOP or ITERATE macro . DOTIMES looks like ( DOTIMES ( var bound [ optional - return - value ] ) & body ) (defmacro unroll-dotimes (the-dotimes) (destructuring-bind (var bound &optional retval) (cadr the-dotimes) (assert (constantp b...
db810f71901624c985488e2cc8ce34e403eccfc1156e829f3a53cbcf8b79eb46
grin-compiler/ghc-wpc-sample-programs
Parser.hs
| Module : . Description : ' parser . License : : The Idris Community . Module : Idris.Parser Description : Idris' parser. License : BSD3 Maintainer : The Idris Community. -} # LANGUAGE ConstraintKinds , FlexibleContexts , GeneralizedNewtypeDeriving , PatternGuards...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/idris-1.3.3/src/Idris/Parser.hs
haskell
# OPTIONS_GHC -O0 # FIXME: {-# OPTIONS_GHC -fwarn-incomplete-patterns #-} * Main grammar | Parses an import statement @ Import ::= 'import' Identifier_t ';'?; @ | Parses program source @ Prog ::= Decl* EOF; @ | Parses a top-level declaration @ Decl ::= Decl' | Using | Params | Mutual | Name...
| Module : . Description : ' parser . License : : The Idris Community . Module : Idris.Parser Description : Idris' parser. License : BSD3 Maintainer : The Idris Community. -} # LANGUAGE ConstraintKinds , FlexibleContexts , GeneralizedNewtypeDeriving , PatternGuards...
5af2dde40ef5ad7b6ac3c2173c589e5fa75c634f484e23f35eabc7db76281a6f
hpyhacking/openpoker
counter.erl
-module(counter). -export([bump/1, bump/2, reset/1, reset/2]). -include("openpoker.hrl"). bump(Type) -> bump(Type, 1). bump(Type, Inc) -> mnesia:dirty_update_counter(tab_counter, Type, Inc). reset(Type) -> reset(Type, 0). reset(Type, Count) -> Counter = #tab_counter { type = Type, value ...
null
https://raw.githubusercontent.com/hpyhacking/openpoker/643193c94f34096cdcfcd610bdb1f18e7bf1e45e/src/counter.erl
erlang
-module(counter). -export([bump/1, bump/2, reset/1, reset/2]). -include("openpoker.hrl"). bump(Type) -> bump(Type, 1). bump(Type, Inc) -> mnesia:dirty_update_counter(tab_counter, Type, Inc). reset(Type) -> reset(Type, 0). reset(Type, Count) -> Counter = #tab_counter { type = Type, value ...
e622fc9d771c7dcc78217b7ed055b51d2c189c522c3d2c4178ecd128da4eaeae
mirage/ocaml-qcow
qemu.ml
* Copyright ( C ) 2016 Unikernel Systems * * Permission to use , copy , modify , and/or distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS I...
null
https://raw.githubusercontent.com/mirage/ocaml-qcow/2418c66627dcce8420bcb06d7547db171528060a/lib_test/qemu.ml
ocaml
* Copyright ( C ) 2016 Unikernel Systems * * Permission to use , copy , modify , and/or distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS I...
d918c823e429e46659eb1f342f1e73585ae85fb63f345d8b617d488ea7fff029
erszcz/learning
gsw_server.erl
-module(gsw_server). -behaviour(gen_server). %% API -export([ start_link/0 ]). %% gen_server callbacks -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -define(SERVER, ?MODULE). -record(state, {}). %%%========...
null
https://raw.githubusercontent.com/erszcz/learning/b21c58a09598e2aa5fa8a6909a80c81dc6be1601/erlang-reply-from-gen-server-worker/src/gsw_server.erl
erlang
API gen_server callbacks =================================================================== API =================================================================== =================================================================== gen_server callbacks ==============================================================...
-module(gsw_server). -behaviour(gen_server). -export([ start_link/0 ]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -define(SERVER, ?MODULE). -record(state, {}). start_link() -> gen_server:start_link...
e2278fffdb81cee7fab85eda7e8f6bf4905fceddd8405071ed9f04c3d4dcc99c
juspay/atlas
Ride.hs
# LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE QuasiQuotes # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # OPTIONS_GHC -Wno - orphans # | Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you m...
null
https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/app-backend/src/Storage/Tabular/Ride.hs
haskell
# LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE QuasiQuotes # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # OPTIONS_GHC -Wno - orphans # | Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you m...
2ad0207f6d8b5c99ae36e5b2306b998a0dac9b10a0311cc37ea3565d6c1ef706
tmfg/mmtis-national-access-point
theme.cljs
(ns taxiui.theme "Shared styling and theming elements for entire Taxi UI" (:require [clojure.string :as str])) (defn grid-template-areas "Small helper to produce properly quoted CSS grid template area string. Provide areas as 1D vector. - `areas` Grid of areas as vector" [styles areas] (assoc styles ...
null
https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/cd3706053ea6c743ccec678073c508d97f8ed2aa/ote/src/cljs/taxiui/theme.cljs
clojure
(ns taxiui.theme "Shared styling and theming elements for entire Taxi UI" (:require [clojure.string :as str])) (defn grid-template-areas "Small helper to produce properly quoted CSS grid template area string. Provide areas as 1D vector. - `areas` Grid of areas as vector" [styles areas] (assoc styles ...
cab3cfeecfc16e5c30b6c5815cd7437abb87fae6b5ac7e80bdb195c1d8a9e55d
bugczw/Introduction-to-Functional-Programming-in-OCaml
when.ml
let rec push_max_at_the_end = function | ([] | [_]) as l -> l | x :: ((y :: _) as l) when x <= y -> x :: push_max_at_the_end l | x :: y :: ys -> y :: push_max_at_the_end (x :: ys);; let l = push_max_at_the_end [3;2;1]
null
https://raw.githubusercontent.com/bugczw/Introduction-to-Functional-Programming-in-OCaml/13c4d1f92e7479f8eb10ea5d4c43a598b6676d0f/OCaml_MOOC_W3_ALL/when.ml
ocaml
let rec push_max_at_the_end = function | ([] | [_]) as l -> l | x :: ((y :: _) as l) when x <= y -> x :: push_max_at_the_end l | x :: y :: ys -> y :: push_max_at_the_end (x :: ys);; let l = push_max_at_the_end [3;2;1]
46d6683a56c625613480f525e491d59a8c5c75b40986c0268089f39cb20b7095
MinaProtocol/mina
snark_work_debugger.ml
open Core open Async type single_spec = ( Transaction_witness.Stable.Latest.t , Transaction_snark.Stable.Latest.t ) Snark_work_lib.Work.Single.Spec.Stable.Latest.t [@@deriving sexp] let rec sexp_to_sexp : Sexp.t -> Sexplib0.Sexp.t = function | Atom s -> Atom s | List xs -> List (List.map ~f:sexp...
null
https://raw.githubusercontent.com/MinaProtocol/mina/3803869b1fb03e60fbfeac31648bbfa80a7bf731/src/app/snark_work_debugger/snark_work_debugger.ml
ocaml
open Core open Async type single_spec = ( Transaction_witness.Stable.Latest.t , Transaction_snark.Stable.Latest.t ) Snark_work_lib.Work.Single.Spec.Stable.Latest.t [@@deriving sexp] let rec sexp_to_sexp : Sexp.t -> Sexplib0.Sexp.t = function | Atom s -> Atom s | List xs -> List (List.map ~f:sexp...
69d6b8679fa99338c079e7015674d2822a3a64d8643dbcd3cc19d2216956ee59
Elzair/nazghul
console-attack.scm
(load "tests/session.scm")
null
https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.001/tests/console-attack.scm
scheme
(load "tests/session.scm")
2108fbdea0625e8f3130bb6e74c6692f2b848ebb219a69fb4be67c0c609d2b78
MastodonC/witan.ui
configuration.clj
(ns witan.ui.style.components.configuration (:require [garden.units :refer [px em percent]] [witan.ui.style.colour :as colour] [witan.ui.style.values :as values])) (def style [[:#configuration [:#no-data {:margin (em 1)}] [:table {:width (...
null
https://raw.githubusercontent.com/MastodonC/witan.ui/5ea6baaff52824ac61737911dd2c11b451157bad/src/styles/witan/ui/style/components/configuration.clj
clojure
(ns witan.ui.style.components.configuration (:require [garden.units :refer [px em percent]] [witan.ui.style.colour :as colour] [witan.ui.style.values :as values])) (def style [[:#configuration [:#no-data {:margin (em 1)}] [:table {:width (...
d3bb4bc43beced1cb660380d2f43ea7ad56c919362b28b3f58e4ba6f42cf6b6b
takano-akio/fast-builder
Fast.hs
# LANGUAGE CPP # #define LIB Data.ByteString.FastBuilder #define NAME Fast #include "template.hs"
null
https://raw.githubusercontent.com/takano-akio/fast-builder/d499ffb338300c1df5479e3d8918d986803a7243/benchmarks/aeson/Fast.hs
haskell
# LANGUAGE CPP # #define LIB Data.ByteString.FastBuilder #define NAME Fast #include "template.hs"
9d6df73e280297f31c29308e0f529dddcb0e737d48c371b1c28341a02cc5464b
madvas/cljs-react-material-ui-example
state.cljs
(ns cljs-react-material-ui-example.state) (defonce init-state {:person/list [[:person/by-id 1] [:person/by-id 2]] :person/by-id {1 {:db/id 1 :person/name "John" :person/date #inst "2...
null
https://raw.githubusercontent.com/madvas/cljs-react-material-ui-example/55a1ecda8f0ff2348f9d424a2c758bf24fef531c/src/cljs/cljs_react_material_ui_example/state.cljs
clojure
(ns cljs-react-material-ui-example.state) (defonce init-state {:person/list [[:person/by-id 1] [:person/by-id 2]] :person/by-id {1 {:db/id 1 :person/name "John" :person/date #inst "2...
3d878abf4524f01580bfad34365761993793a6fb42ae6ac28d281cddaa5fa074
haskell-repa/repa
Distro.hs
module Data.Array.Repa.Distro ( Distro (..) , balanced , fragStart , fragLength) where import GHC.Exts -- | Describes the size of a vector, and how the elements are distributed -- across the gang. -- -- We have separate 'distroFragLength' and 'distroFragStart' functions -- for p...
null
https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/icebox/abandoned/repa-stream/Data/Array/Repa/Distro.hs
haskell
| Describes the size of a vector, and how the elements are distributed across the gang. We have separate 'distroFragLength' and 'distroFragStart' functions for performance reasons, and they must give coherent results, else undefined. | Total length of chain. | Number of fragments the chain is split into. ...
module Data.Array.Repa.Distro ( Distro (..) , balanced , fragStart , fragLength) where import GHC.Exts data Distro = Distro distroLength :: Int# , distroFrags :: Int# , distroFragLength :: Int# -> Int# , distroFragSt...
5a1d4bb3005fe2b7fad2519f6104cfa9cbcc478b2161c732e903ac11f76e0c3d
yesodweb/wai
ApprootSpec.hs
{-# LANGUAGE OverloadedStrings #-} module Network.Wai.Middleware.ApprootSpec ( main , spec ) where import Data.ByteString (ByteString) import Network.HTTP.Types (RequestHeaders, status200) import Network.Wai import Test.Hspec import Network.Wai.Middleware.Approot (fromRequest, getApproot) import Network.W...
null
https://raw.githubusercontent.com/yesodweb/wai/5d1fd4926d0f210eb77c2bc0e546cb3cca6bc197/wai-extra/test/Network/Wai/Middleware/ApprootSpec.hs
haskell
# LANGUAGE OverloadedStrings #
module Network.Wai.Middleware.ApprootSpec ( main , spec ) where import Data.ByteString (ByteString) import Network.HTTP.Types (RequestHeaders, status200) import Network.Wai import Test.Hspec import Network.Wai.Middleware.Approot (fromRequest, getApproot) import Network.Wai.Test (SResponse (simpleHeaders),...
266aebcca1ec91de0f73b7736eb13dc5995191db94d9170e0c8338efc373ba2d
guicho271828/trivial-signal
signals.lisp
(in-package :trivial-signal.signals) (defvar *signal-keyword* (make-hash-table)) (defun constant->keyword (symbol) "+SIGHUP+ -> :HUP " (let ((name (symbol-name symbol))) (intern (subseq name 4 (1- (length name))) :keyword))) (defun constant->sigkeyword (symbol) "+SIGHUP+ -> :SIGHUP " (let ((name (symbol...
null
https://raw.githubusercontent.com/guicho271828/trivial-signal/bd123bf618e7c8e0dd489401944d7ce409aa8583/src/signals.lisp
lisp
:hup non-posix realtime
(in-package :trivial-signal.signals) (defvar *signal-keyword* (make-hash-table)) (defun constant->keyword (symbol) "+SIGHUP+ -> :HUP " (let ((name (symbol-name symbol))) (intern (subseq name 4 (1- (length name))) :keyword))) (defun constant->sigkeyword (symbol) "+SIGHUP+ -> :SIGHUP " (let ((name (symbol...
0c2c165cbe87b1af88ab24cdf81b34545e5d8f55491c095325284e6e8f679068
astrada/ocaml-extjs
ext.mli
* The Ext namespace ( global object ) encapsulates all ... { % < p > The Ext namespace ( global object ) encapsulates all classes , singletons , and utility methods provided by Sencha 's libraries.</p > < p > Most user interface Components are at a lower level of nesting in the namespace , but many common...
null
https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/ext.mli
ocaml
* {% <p>A reusable empty function</p> %} * {% <p>True if the detected browser uses a Gecko 5.0+ layout engine (e.g. Firefox 5.x).</p> %} * {% <p>True if the detected browser uses a Gecko 2.0+ layout engine (e.g. Firefox 4.x).</p> %} * {% <p>True if the detected browser uses a Gecko 5.0+ layout engine (e....
* The Ext namespace ( global object ) encapsulates all ... { % < p > The Ext namespace ( global object ) encapsulates all classes , singletons , and utility methods provided by Sencha 's libraries.</p > < p > Most user interface Components are at a lower level of nesting in the namespace , but many common...
76a91fb430fd6e14deb94089d9015df5cfecbd460e70ca1b3460f1886d8b6c81
danilkolikov/dfl
Pattern.hs
| Module : Frontend . Desugaring . Checking . Pattern Description : Ambiguity checks for patterns Copyright : ( c ) , 2019 License : MIT Functions for disambiguation of patterns Module : Frontend.Desugaring.Checking.Pattern Description : Ambiguity checks for patterns Copyri...
null
https://raw.githubusercontent.com/danilkolikov/dfl/698a8f32e23b381afe803fc0e353293a3bf644ba/src/Frontend/Desugaring/Checking/Pattern.hs
haskell
| Gets variables of a pattern | Gets variables of an infix pattern | Gets variables of a pattern binding | Checks idents in a pattern for ambiguity | Checks idents in an infix pattern for ambiguity | Checks idents in a pattern binding for ambiguity
| Module : Frontend . Desugaring . Checking . Pattern Description : Ambiguity checks for patterns Copyright : ( c ) , 2019 License : MIT Functions for disambiguation of patterns Module : Frontend.Desugaring.Checking.Pattern Description : Ambiguity checks for patterns Copyri...
f565e87fd0554670c29e75f32cb786153a04327b4f64dfa88d4c841c5cf5130b
clckwrks/clckwrks
ClckwrksApp.hs
{-# LANGUAGE QuasiQuotes, OverloadedStrings #-} module Clckwrks.JS.ClckwrksApp where import Language.Javascript.JMacro clckwrksAppJS :: Bool -> JStat clckwrksAppJS True = [jmacro| { var clckwrksApp = angular.module('clckwrksApp', [ 'happstackAuthentication', 'usernamePassword', 'openId', ...
null
https://raw.githubusercontent.com/clckwrks/clckwrks/dd4ea1e2f41066aa5779f1cc22f3b7a0ca8a0bed/Clckwrks/JS/ClckwrksApp.hs
haskell
# LANGUAGE QuasiQuotes, OverloadedStrings #
module Clckwrks.JS.ClckwrksApp where import Language.Javascript.JMacro clckwrksAppJS :: Bool -> JStat clckwrksAppJS True = [jmacro| { var clckwrksApp = angular.module('clckwrksApp', [ 'happstackAuthentication', 'usernamePassword', 'openId', 'ngRoute' ]); clckwrksApp.config(['$ro...
e648e9f5d2953bd26493545cc306a5c03f34d63850bb0a3adaeb487299d5f812
Decentralized-Pictures/T4L3NT
test_activation.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > (* ...
null
https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_112_Pt4FJEL6/lib_protocol/test/test_activation.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETH...
06ef3a25352b0a3b9f3019f644136e2c768086d18bbb90f2889d1cf3a2cface4
GaloisInc/curl
Code.hs
# LANGUAGE ForeignFunctionInterface # -------------------------------------------------------------------- -- | -- Module : Network.Curl.Code Copyright : ( c ) Galois Inc 2007 - 2009 , 2011 -- License : BSD3 -- -- Maintainer: Sigbjorn Finne <> -- Stability : provisional -- Portability: portable -- Representing...
null
https://raw.githubusercontent.com/GaloisInc/curl/185c5370fc5ee7bd6b5e75d9a90033932b4afe71/Network/Curl/Code.hs
haskell
------------------------------------------------------------------ | Module : Network.Curl.Code License : BSD3 Maintainer: Sigbjorn Finne <> Stability : provisional Portability: portable ------------------------------------------------------------------
# LANGUAGE ForeignFunctionInterface # Copyright : ( c ) Galois Inc 2007 - 2009 , 2011 Representing Curl 's status codes as a type . module Network.Curl.Code where import Foreign.C.Types data CurlCode = CurlOK | CurlUnspportedProtocol | CurlFailedInit | CurlUrlMalformat | CurlUrlMalformatUser | CurlCouldnt...
f397f45a3769e72f1396b8e04a7b2540e0da9d40c11854fd3a1258a0c23dc94d
gheber/kenzo
cartesian-products-test.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 - * (in-package :kenzo-test-7) (in-suite :kenzo-7) (test extract-common-dgop (dotimes (i 100) (dotimes (j 100) (multiple-value-bind (dgop dgop1 dgop2) (cat-7:extract-common-dgop i j) (unless (and (= i (cat-7:dgop*dgop d...
null
https://raw.githubusercontent.com/gheber/kenzo/48e2ea398b80f39d3b5954157a7df57e07a362d7/test/kenzo-7/cartesian-products-test.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 - *
(in-package :kenzo-test-7) (in-suite :kenzo-7) (test extract-common-dgop (dotimes (i 100) (dotimes (j 100) (multiple-value-bind (dgop dgop1 dgop2) (cat-7:extract-common-dgop i j) (unless (and (= i (cat-7:dgop*dgop dgop dgop1)) (= j (cat-7:dgop*dgop dgop dg...
3bd5bac4034d6d5dac990b98861d7e1522ad4268c92b8dfef1e8846d1537c103
mitchellwrosen/planet-mitchell
Partial.hs
module ByteString.Short.Partial * ShortByteString index ) where import Data.ByteString.Short (index)
null
https://raw.githubusercontent.com/mitchellwrosen/planet-mitchell/18dd83204e70fffcd23fe12dd3a80f70b7fa409b/planet-mitchell/src/ByteString/Short/Partial.hs
haskell
module ByteString.Short.Partial * ShortByteString index ) where import Data.ByteString.Short (index)
6cc462a2735f63a2df448b4d68b6a3eaaf55f6dd5c38343f5904cb787f7aa819
connerirwin/musfix
Syntax.hs
{-# LANGUAGE OverloadedStrings #-} -- | This module contains the declarations of the main data types, all gathered into one convenient place . It pulled declarations out of Logic.hs , Util.hs , as well as containing additional declarations unique to musfix . -- -- It also contains various helper functions for mani...
null
https://raw.githubusercontent.com/connerirwin/musfix/97edf67693d6ee3ea7dc234b20db560af92d95c3/src/Language/SMT/Syntax.hs
haskell
# LANGUAGE OverloadedStrings # | This module contains the declarations of the main data types, all gathered It also contains various helper functions for manipulating these data types, allow the targeting of specific values without having to worry about recursing on all variations. Utility functions | Top-level...
into one convenient place . It pulled declarations out of Logic.hs , Util.hs , as well as containing additional declarations unique to musfix . most notably mapFormula and mapSort , which are higher - order - functions that module Language.SMT.Syntax where import Language.Synquid.Util import qualified Data.Ma...
fe667058b57c74e3cff97099aab0c45aaf3f745d2c012bb21be47bebd5c4acf3
Opetushallitus/ataru
birth_date_converter.clj
(ns ataru.person-service.birth-date-converter (:require [clj-time.format :as f])) (def finnish-format (f/formatter "dd.MM.yyyy")) (def default-format (f/formatters :year-month-day)) (defn convert-birth-date [finnish-format-date] (->> finnish-format-date (f/parse finnish-format) (f/unparse default-fo...
null
https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/src/clj/ataru/person_service/birth_date_converter.clj
clojure
(ns ataru.person-service.birth-date-converter (:require [clj-time.format :as f])) (def finnish-format (f/formatter "dd.MM.yyyy")) (def default-format (f/formatters :year-month-day)) (defn convert-birth-date [finnish-format-date] (->> finnish-format-date (f/parse finnish-format) (f/unparse default-fo...
9256cc220fe64c082061c504ca1e7dec12f6d1c660ecafb2566a8f8686ef8291
tqtezos/minter-sdk
Allowlisted.hs
-- | Tests on the swaps contract. module Test.Swaps.Allowlisted where import Prelude hiding (swap) import Test.Tasty (TestTree, testGroup) import GHC.Exts (fromList) import Morley.Nettest import Morley.Nettest.Tasty (nettestScenarioCaps) import Lorentz.Contracts.Swaps.Allowlisted import Lorentz.Contracts.Swaps.Basi...
null
https://raw.githubusercontent.com/tqtezos/minter-sdk/175ca4afd17fc548422bc450453b403018ab9e62/packages/minter-contracts/test-hs/Test/Swaps/Allowlisted.hs
haskell
| Tests on the swaps contract. Check that storage updates work
module Test.Swaps.Allowlisted where import Prelude hiding (swap) import Test.Tasty (TestTree, testGroup) import GHC.Exts (fromList) import Morley.Nettest import Morley.Nettest.Tasty (nettestScenarioCaps) import Lorentz.Contracts.Swaps.Allowlisted import Lorentz.Contracts.Swaps.Basic import Test.Swaps.Util import Te...
cefbb03b3d8ef2903e0a71550c40a3e315fec8d242a038011e4de0a78762d387
ghc/testsuite
Good.hs
module Good (Good(..)) where class Good a where isGood :: a -> Bool
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/stranal/should_run/T8425/Good.hs
haskell
module Good (Good(..)) where class Good a where isGood :: a -> Bool
d84614c82be8f2f9068776ec307a46d3e3e6b99ad89668b71beff079ee1f50af
schell/odin
Main.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-} module Main where import Control . Monad ( void ) import Data.Char.FontAwesome import Data.Function (fix) im...
null
https://raw.githubusercontent.com/schell/odin/97ae1610a7abd19aa150bc7dfc132082d88ca9ea/odin-engine/app/Main.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE TypeOperators # Checkpoints are persistent through recompilations (with halive).
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # module Main where import Control . Monad ( void ) import Data.Char.FontAwesome import Data.Function (fix) import Odin.Engine import Odin.Engine.Checkpoint imp...
44e7bb42206dbcca26286b4a9378512a0f82aa813b5eb0b6d71a690aa46c08b9
xclerc/ocamljava
number-template.ml
* This file is part of library . * Copyright ( C ) 2007 - 2015 . * * library is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation ; either version 3 of the License , or * ( at yo...
null
https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/library/javalib/templates/number-template.ml
ocaml
Instance creation Null value Miscellaneous
* This file is part of library . * Copyright ( C ) 2007 - 2015 . * * library is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation ; either version 3 of the License , or * ( at yo...
5ceed3b39965ca5f9ac1033c479d83cf8e1a707745f71b7867228462abddb2fe
0install/0install
logging.mli
Copyright ( C ) 2013 , the README file for details , or visit . * See the README file for details, or visit . *) (** Simple logging support *) type level = Debug | Info | Warning type time = float type entry = time * exn option * level * string val string_of_level : level -> string val threshold : le...
null
https://raw.githubusercontent.com/0install/0install/22eebdbe51a9f46cda29eed3e9e02e37e36b2d18/src/support/logging.mli
ocaml
* Simple logging support If set, we call this before logging anything and then set it to None. This is used to clear progress displays. * Write a message to stderr if verbose logging is on. * Write a message to stderr, prefixed with "warning: ". * If set, record all log messages (at all levels) in memory and dump ...
Copyright ( C ) 2013 , the README file for details , or visit . * See the README file for details, or visit . *) type level = Debug | Info | Warning type time = float type entry = time * exn option * level * string val string_of_level : level -> string val threshold : level ref val will_log : level ...
9a5e026020625b353e302ba33597ab167acc199376d417946099507daab93a96
cedlemo/OCaml-GI-ctypes-bindings-generator
Fixed_child.ml
open Ctypes open Foreign type t let t_typ : t structure typ = structure "Fixed_child" let f_widget = field t_typ "widget" (ptr Widget.t_typ) let f_x = field t_typ "x" (int32_t) let f_y = field t_typ "y" (int32_t) let _ = seal t_typ
null
https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Fixed_child.ml
ocaml
open Ctypes open Foreign type t let t_typ : t structure typ = structure "Fixed_child" let f_widget = field t_typ "widget" (ptr Widget.t_typ) let f_x = field t_typ "x" (int32_t) let f_y = field t_typ "y" (int32_t) let _ = seal t_typ
be0a5dc8429d1caffa0716002948db81c18bcc468a20f8c825fe112bad05cdf6
craigfe/compact
test.ml
open! Compact let check_bool pos ~expected actual = Alcotest.(check ~pos bool) "" expected actual let check_invalid_arg pos f = let fail got = Alcotest.failf ~pos "Expected function to raise `Invalid_argument`, but raised: %a" Fmt.(Dump.option exn) got in match f () with | _ -> fail No...
null
https://raw.githubusercontent.com/craigfe/compact/fcce0432d267babeb90dbdf4f49e2d2d067b2b0f/test/test.ml
ocaml
Add a new element. Pick a random existing element and check [mem] is true. Pick a random non-existing element and check [mem] is false.
open! Compact let check_bool pos ~expected actual = Alcotest.(check ~pos bool) "" expected actual let check_invalid_arg pos f = let fail got = Alcotest.failf ~pos "Expected function to raise `Invalid_argument`, but raised: %a" Fmt.(Dump.option exn) got in match f () with | _ -> fail No...
ff1625485be79d402753a192297757c0066b9a1f85ddd222137f72ba5cff5bae
exercism/ocaml
test.ml
(* palindrome-products - 1.2.0 *) open OUnit2 open Palindrome_products let show_result printer = function | Error e -> "Error " ^ e | Ok a -> "Ok " ^ printer a let eq_results eq x y = match (x, y) with | (Error e1, Error e2) -> String.equal e1 e2 | (Ok x, Ok y) -> eq x y | _ -> false let ae exp got _test_c...
null
https://raw.githubusercontent.com/exercism/ocaml/e1138c6e3e530bcb22e4d4457d0d80839bde9236/exercises/practice/palindrome-products/test.ml
ocaml
palindrome-products - 1.2.0
open OUnit2 open Palindrome_products let show_result printer = function | Error e -> "Error " ^ e | Ok a -> "Ok " ^ printer a let eq_results eq x y = match (x, y) with | (Error e1, Error e2) -> String.equal e1 e2 | (Ok x, Ok y) -> eq x y | _ -> false let ae exp got _test_ctxt = assert_equal ~printer:(sho...
501ce1397ae70b329f98e6deff7ef9fa036896f8ec6ee119edeaa6bdd82ae883
solita/mnt-teet
localization.cljc
(ns teet.localization "Message localization. The interface to translate messages is the `tr` function which takes a message and possible parameters. On the frontend a global `selected-language` atom is used. On the backend the `*language*` dynamic binding is used." (:require #?(:cljs [reagent.core :as r]) ...
null
https://raw.githubusercontent.com/solita/mnt-teet/3ba40ff933caf6a26962b72db138ac5c52868c65/app/common/src/cljc/teet/localization.cljc
clojure
Direct column name Link to a localized text code, like {:table "activity" :select ["name"]} return table name Specific field name Common field name
(ns teet.localization "Message localization. The interface to translate messages is the `tr` function which takes a message and possible parameters. On the frontend a global `selected-language` atom is used. On the backend the `*language*` dynamic binding is used." (:require #?(:cljs [reagent.core :as r]) ...
030fae9bf1370049d4f73be24e203af1647d1de5102df804240b449a5e57e4ec
ledyba/language-krkr
Tree.hs
module Language.KAG.Tree ( Kag(..) , KagValue(..) module Language . TJS.Tree , SrcSpan(..) , SourcePos , SourceName, Line, Column , sourceName, sourceLine, sourceColumn ) where import Data.Text import Language.TJS.Tree ( SrcSpan(..) ,SourcePos ,SourceName, Line, Column ,sourceName, sourceLine,...
null
https://raw.githubusercontent.com/ledyba/language-krkr/da01694ff6322fe187ca1be8eedc378e4c5d9a8c/lib/Language/KAG/Tree.hs
haskell
module Language.KAG.Tree ( Kag(..) , KagValue(..) module Language . TJS.Tree , SrcSpan(..) , SourcePos , SourceName, Line, Column , sourceName, sourceLine, sourceColumn ) where import Data.Text import Language.TJS.Tree ( SrcSpan(..) ,SourcePos ,SourceName, Line, Column ,sourceName, sourceLine,...
21b7a2333defe1f868b5414a517d71c4417b369caefeb4fda91f6f6765f82709
robrix/Manifold
Evaluator.hs
# LANGUAGE DataKinds , FlexibleContexts , FlexibleInstances , GeneralizedNewtypeDeriving , MultiParamTypeClasses , StandaloneDeriving , UndecidableInstances # module Manifold.Abstract.Evaluator ( Evaluator(..) , Alternative(..) , module X ) where import Control.Applicative import Control.Effect as X newtype Evaluator...
null
https://raw.githubusercontent.com/robrix/Manifold/3cc7a49c90b9cc7d1da61c532d0ee526ccdd3474/src/Manifold/Abstract/Evaluator.hs
haskell
# LANGUAGE DataKinds , FlexibleContexts , FlexibleInstances , GeneralizedNewtypeDeriving , MultiParamTypeClasses , StandaloneDeriving , UndecidableInstances # module Manifold.Abstract.Evaluator ( Evaluator(..) , Alternative(..) , module X ) where import Control.Applicative import Control.Effect as X newtype Evaluator...
d5c08fd670ef6840c0a0325b81a52b51c1debfea0b80060f0142e921df940b4f
Incubaid/arakoon
lwt_socket_test.ml
Copyright ( 2010 - 2014 ) INCUBAID BVBA Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software distribut...
null
https://raw.githubusercontent.com/Incubaid/arakoon/43a8d0b26e4876ef91d9657149f105c7e57e0cb0/src/tools/lwt_socket_test.ml
ocaml
supposedly connection completely closed, actually shutdown will fail
Copyright ( 2010 - 2014 ) INCUBAID BVBA Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software distribut...
fabc676d7519c8fbe448c8afc1e00192dd96c7ae69dd6b4c2786abdc35ebdba8
simingwang/emqx-plugin-kafkav5
user.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2020 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/rel/emqx_plugin_kafka/lib/kernel-8.3/src/user.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 1996 - 2020 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(user). -compile(inline). -export([start/0, start/1, start_out/0]). -export([interfaces/1]). -define(NAME, ...
40df77acfd21dd65d4b6b0d1be10ef8c7e0cf457ce99a3d31ecf5c9ab5f7ad39
incanter/incanter
stats_tests.clj
core-test-cases.clj -- Unit tests of Incanter functions by October 31 , 2009 Copyright ( c ) , 2009 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse ;; Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this...
null
https://raw.githubusercontent.com/incanter/incanter/e0a03aac237fcc60587278a36bd2e76266fc6356/modules/incanter-core/test/incanter/stats_tests.clj
clojure
Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. to run these tests: (use 'tests core-t...
core-test-cases.clj -- Unit tests of Incanter functions by October 31 , 2009 Copyright ( c ) , 2009 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse (ns incanter.stats-tests (:use clojure.test (incanter core stats)) (:require [clojur...
0dd84e7db4783143fbc9b097718dd4f0a58a5e2ea98e7830d5cbc506f4a7238a
anonymous-admin/anonymous
parser.erl
-module(parser). -export([decode/1, encode/1]). -define(DICT, dict). decode(Data) -> dec(Data). case catch dec(Data ) of { ' EXIT ' , _ } - > % {error, unparsed}; % {Res, _} -> % {ok, Res} % end. encode(Struct) -> iolist_to_binary(enc(Struct)). %%-----------------...
null
https://raw.githubusercontent.com/anonymous-admin/anonymous/0d178f8f02dce74d5f76d78f81f70da9229a77cd/run%20Torrent%20client/parser.erl
erlang
{error, unparsed}; {Res, _} -> {ok, Res} end. -------------------------------------------------------------------- Decoding -------------------------------------------------------------------- -------------------------------------------------------------------- Encoding -----------------------...
-module(parser). -export([decode/1, encode/1]). -define(DICT, dict). decode(Data) -> dec(Data). case catch dec(Data ) of { ' EXIT ' , _ } - > encode(Struct) -> iolist_to_binary(enc(Struct)). dec(<<$l, Tail/binary>>) -> dec_list(Tail, []); dec(<<$d, Tail/binary>>) -> dec_dict(Tail, ?DICT:new(...
b7d11f8246b9a3e21134477590feab90cab28d480bad95f556ebd8cf9d23a65d
ndpar/erlang
frequency.erl
%% F.Cesarini & S.Thomson , Erlang Programming , p.121 . %% Client/Server Pattern. %% 1 > frequency : start ( ) . 2 > frequency : allocate ( ) . %% ... 8 > frequency : allocate ( ) . 9 > frequency : deallocate(11 ) . 10 > frequency : allocate ( ) . 11 > frequency : stop ( ) . %% -module(frequency). -...
null
https://raw.githubusercontent.com/ndpar/erlang/e215841a1d370e0fc5eb6b9ff40ea7ae78fc8763/src/frequency.erl
erlang
Client/Server Pattern. ... Start function to create and initialize the server Client functions
F.Cesarini & S.Thomson , Erlang Programming , p.121 . 1 > frequency : start ( ) . 2 > frequency : allocate ( ) . 8 > frequency : allocate ( ) . 9 > frequency : deallocate(11 ) . 10 > frequency : allocate ( ) . 11 > frequency : stop ( ) . -module(frequency). -export([start/0, stop/0]). -export([allocat...
fbbb29f88d7264e9ec68379eb725d922b47576ef0b56d4bfe48ecf0514b3b37d
emqx/emqx
emqx_cm.erl
%%------------------------------------------------------------------- Copyright ( c ) 2017 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of...
null
https://raw.githubusercontent.com/emqx/emqx/0a5b221984030c3b2915a4669347b1d95de47f64/apps/emqx/src/emqx_cm.erl
erlang
------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express o...
Copyright ( c ) 2017 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_cm). -behaviour(gen_server). -include("logger.hrl"). -include("types.hrl"). -incl...
19d6d728a01f56a97d7a09ffd83aa618eab3ace9c17fbbbf95e4ccee5be7b7ab
purebred-mua/hs-notmuch
Files.hs
This file is part of hs - notmuch - binding Copyright ( C ) 2017 Fraser Tweedale -- -- hs-notmuch is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or -- (at your optio...
null
https://raw.githubusercontent.com/purebred-mua/hs-notmuch/a89bb229c78271d9782f9d5a7f191d42b0dcfd25/tools/Files.hs
haskell
hs-notmuch is free software: you can redistribute it and/or modify (at your option) any later version. 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 GNU General Public L...
This file is part of hs - notmuch - binding Copyright ( C ) 2017 Fraser Tweedale 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 # LANGUAGE LambdaCas...
c439b5a2d114e19dfa6f2981a0a54890db3e9ede4ac00ae07221ebfec6e1b212
thizanne/tiger
semant.mli
type venv = Env.entry Symbol.Table.t type tenv = Types.t Symbol.Table.t type expty = { exp : Translate.exp; ty : Types.t; } val trans_exp : venv -> tenv -> Syntax.exp Location.loc -> expty val trans_dec : venv -> tenv -> Syntax.dec -> venv * tenv val trans_ty : tenv -> Syntax.ty -> Types.t
null
https://raw.githubusercontent.com/thizanne/tiger/14e4c9a6005d1455122f366a965e487434219f47/src/semant.mli
ocaml
type venv = Env.entry Symbol.Table.t type tenv = Types.t Symbol.Table.t type expty = { exp : Translate.exp; ty : Types.t; } val trans_exp : venv -> tenv -> Syntax.exp Location.loc -> expty val trans_dec : venv -> tenv -> Syntax.dec -> venv * tenv val trans_ty : tenv -> Syntax.ty -> Types.t
0cadda818667e4d45b6094ef15d8d70b6404c7d1d0ce2e616e4b2a010642d349
caribou/caribou-core
collection.clj
(ns caribou.field.collection (:require [clojure.string :as string] [caribou.field :as field] [caribou.util :as util] [caribou.logger :as log] [caribou.db :as db] [caribou.config :as config] [caribou.validation :as validation] [caribou...
null
https://raw.githubusercontent.com/caribou/caribou-core/6ebd9db4e14cddb1d6b4e152e771e016fa9c55f6/src/caribou/field/collection.clj
clojure
(ns caribou.field.collection (:require [clojure.string :as string] [caribou.field :as field] [caribou.util :as util] [caribou.logger :as log] [caribou.db :as db] [caribou.config :as config] [caribou.validation :as validation] [caribou...
e0cdd7bf06b54f72d6a18ca9ec6987d033a28adb4e7e7819165712124b255bf8
spell-music/csound-sampler
Core.hs
-- | The core types/ They are not imported by default. # Language DeriveFunctor , TypeSynonymInstances , FlexibleInstances # module Csound.Sam.Core ( Sam, runSam, Sample(..), S(..), Dur(..), Bpm, liftSam, mapBpm, mapBpm2, bindSam, bindBpm, bindBpm2, withBpm ) where import Control.Applicative import Control.Monad.Tra...
null
https://raw.githubusercontent.com/spell-music/csound-sampler/dd5f2eeef186f42dc802e6a9737f123b205a7028/src/Csound/Sam/Core.hs
haskell
| The core types/ They are not imported by default. | The main type. A stereo sample. | The generic type for samples. Lifters | Hides the effects inside sample. | Lifts bind on stereo signals to samples.
# Language DeriveFunctor , TypeSynonymInstances , FlexibleInstances # module Csound.Sam.Core ( Sam, runSam, Sample(..), S(..), Dur(..), Bpm, liftSam, mapBpm, mapBpm2, bindSam, bindBpm, bindBpm2, withBpm ) where import Control.Applicative import Control.Monad.Trans.Reader import Control.Monad.Trans.Class import Csou...
05b6360f888d84afc6db821bed4c6f9e29bbbbf186f29edd93f026d5882190e6
janestreet/sexp_grammar
sexp_grammar_validation.ml
include Validate_grammar module Private = struct module Disobedient_generator = Disobedient_generator module Obedient_generator = Obedient_generator module Sexp_index = Sexp_index end
null
https://raw.githubusercontent.com/janestreet/sexp_grammar/2906f35acd036522f6d9dc4d4229673f05f2ea56/validation/src/sexp_grammar_validation.ml
ocaml
include Validate_grammar module Private = struct module Disobedient_generator = Disobedient_generator module Obedient_generator = Obedient_generator module Sexp_index = Sexp_index end
9cee27ae6bf1f9c0cae3009b75a0d19fbe2f9009b6d700c35e4576f6614116c2
kingcons/advent-of-code
day09.lisp
(mgl-pax:define-package :aoc.2021.09 (:nicknames :2021.09) (:use :cl :aoc.util :mgl-pax) (:import-from :aoc.parsers #:parse-grid) (:import-from :alexandria #:define-constant) (:import-from :serapeum #:op)) (in-package :2021.09) (defsummary (:title "Smoke Basin") "**Part 1** - Follow the Smoke" (sum-risk...
null
https://raw.githubusercontent.com/kingcons/advent-of-code/46a442d2329a7cf62b9bb713482fc170173b0dd6/src/2021/day09.lisp
lisp
(mgl-pax:define-package :aoc.2021.09 (:nicknames :2021.09) (:use :cl :aoc.util :mgl-pax) (:import-from :aoc.parsers #:parse-grid) (:import-from :alexandria #:define-constant) (:import-from :serapeum #:op)) (in-package :2021.09) (defsummary (:title "Smoke Basin") "**Part 1** - Follow the Smoke" (sum-risk...
4884d57032a597399922e053b50e9c0eca8be9dcc4237fb777e40b3ab03ce132
c089/haskell-craft3e
PerformanceI.hs
----------------------------------------------------------------------- -- Haskell : The Craft of Functional Programming ( c ) Addison - Wesley , 1996 - 2011 . -- PerformanceI.hs -- ----------------------------------------------------------------------- module Main where main = putStrLn (show (sumI 1 10...
null
https://raw.githubusercontent.com/c089/haskell-craft3e/869e382601cab50559c4473dfa9c7480f1acba58/Chapter20/PerformanceI.hs
haskell
--------------------------------------------------------------------- --------------------------------------------------------------------- main = putStrLn (show (sumIA 1 1000000))
Haskell : The Craft of Functional Programming ( c ) Addison - Wesley , 1996 - 2011 . PerformanceI.hs module Main where main = putStrLn (show (sumI 1 1000000)) main = putStrLn ( show ( sumIS 1 1000000 ) ) sumI :: Integer -> Integer -> Integer sumI n m | n>m = 0 | otherwise = n + sumI (n+1) m ...
717fb554bc6076bce09de59484bff8ee01eee16db662aecba5129d7d911acb66
xapi-project/xen-api
http_client.ml
* Copyright ( C ) 2006 - 2010 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
null
https://raw.githubusercontent.com/xapi-project/xen-api/47fae74032aa6ade0fc12e867c530eaf2a96bf75/ocaml/libs/http-svr/http_client.ml
ocaml
A very simple HTTP client * Thrown when we get a non-HTTP response * Thrown when we get a specific HTTP failure * Thrown when we fail to parse a particular part of the HTTP message Tediously read an HTTP header byte-by-byte. At some point we need to add buffering but we'll need to encapsulate our file descript...
* Copyright ( C ) 2006 - 2010 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
d53ff359d0473419100946615711776155059f9806d1cc98d2d27cb1c620a1c6
mikera/alchemy
test_world.clj
(ns mikera.alchemy.test-world (:use mikera.alchemy.world) (:require [mikera.alchemy.engine :as engine]) (:require [mikera.alchemy.lib :as lib]) (:use mikera.orculje.core) (:use clojure.test)) (deftest test-game (let [game (new-game)] (is (some #(= (:name %) "you") (lib/all-...
null
https://raw.githubusercontent.com/mikera/alchemy/57d47eea6ecbef20e97c9a360b57d50985039bf0/src/test/clojure/mikera/alchemy/test_world.clj
clojure
(ns mikera.alchemy.test-world (:use mikera.alchemy.world) (:require [mikera.alchemy.engine :as engine]) (:require [mikera.alchemy.lib :as lib]) (:use mikera.orculje.core) (:use clojure.test)) (deftest test-game (let [game (new-game)] (is (some #(= (:name %) "you") (lib/all-...
d0d7e59f0dad85bf07a0e48d6ccf1ec0f743ec0fc95c7a813ffae44584c62613
khibino/haskell-invertible-syntax-poly
Data.hs
-- | -- Module : Control.Isomorphism.Partial.Ext.Data Copyright : 2012 -- License : BSD3 -- -- Maintainer : -- Stability : experimental -- Portability : unknown -- -- This module contains isomorphism definitions of basic data types for Control . Isomorphism . Partial . module Control.Isomorphism....
null
https://raw.githubusercontent.com/khibino/haskell-invertible-syntax-poly/03409b9d5f7767f33863ea8ae8b6787ddf99e29a/src/Control/Isomorphism/Partial/Ext/Data.hs
haskell
| Module : Control.Isomorphism.Partial.Ext.Data License : BSD3 Maintainer : Stability : experimental Portability : unknown This module contains isomorphism definitions of basic | Church number succ isomorphism | A value and singleton list | Isomorphism from read and show | Negate number | Neg...
Copyright : 2012 data types for Control . Isomorphism . Partial . module Control.Isomorphism.Partial.Ext.Data ( succ, singleton, readShow, negate, not, reverse, digitInt, chrOrd, oct, hex, signumAbs, digitsFloat, floatTripleDigits, floatTriple ) where import Prelude hiding (id, succ, pred, negate, ...
39306e7f638ca5971b06d2131270a3bd74d736c2e6a4ecb9971610c5e282d659
ftovagliari/ocamleditor
generate_oebuild_script.ml
OCamlEditor Copyright ( C ) 2010 - 2014 This file is part of OCamlEditor . OCamlEditor is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at y...
null
https://raw.githubusercontent.com/ftovagliari/ocamleditor/79669e14163420170e3e2ebb8da54ebe4e5a3dce/src/generate_oebuild_script.ml
ocaml
OCamlEditor Copyright ( C ) 2010 - 2014 This file is part of OCamlEditor . OCamlEditor is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at y...
71709b2ceec9ddfa327373daf092e0397d6ef8014b25e93d18ac5cafdbe0094f
SanderSpies/ocaml-gist
logger.ml
{ { { COPYING * ( This file is part of Merlin , an helper for ocaml editors Copyright ( C ) 2013 - 2015 < frederic.bour(_)lakaban.net > refis.thomas(_)gmail.com > < simon.castellan(_)iuwt.fr > Permission is hereby granted , free...
null
https://raw.githubusercontent.com/SanderSpies/ocaml-gist/7dc229aebdf51310e8c7dae12df0cb55b5de5a32/ocaml_webworker/merlin_lite/src/utils/logger.ml
ocaml
{ { { COPYING * ( This file is part of Merlin , an helper for ocaml editors Copyright ( C ) 2013 - 2015 < frederic.bour(_)lakaban.net > refis.thomas(_)gmail.com > < simon.castellan(_)iuwt.fr > Permission is hereby granted , free...
d9b98765f8ab51f43e1194b2ddf85823e3447feed7db0efc3a560f20b485f8f0
quchen/stgi
Programs.hs
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} -- | Tests of medium size, defined by terminating within a certain number of -- steps (configured in 'defSpec'). -- These tests will be run with garbage collection enabled, and should have the scope of small fun...
null
https://raw.githubusercontent.com/quchen/stgi/dacd45cb0247f73889713dc92a911aaa835afd19/test/Testsuite/Test/Machine/Evaluate/Programs.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE OverloadedStrings # # LANGUAGE QuasiQuotes # | Tests of medium size, defined by terminating within a certain number of steps (configured in 'defSpec'). These tests will be run with garbage collection enabled, and should have the
scope of small functions a beginner might play around with . module Test.Machine.Evaluate.Programs (tests) where import Data.Foldable import Stg.Machine.Types import Stg.Marshal import Stg.Parser.QuasiQuoter import qualified Stg.Prelude as Stg import Test.Mac...
c154d839ee00243d3c0a439b5d33e452d0f10a4bbbf85fa2ef2a0a41710ad77c
thheller/shadow-cljsjs
gu.cljs
(ns cljsjs.moment.locale.gu (:require ["moment/locale/gu"]))
null
https://raw.githubusercontent.com/thheller/shadow-cljsjs/eaf350d29d45adb85c0753dff77e276e7925a744/src/main/cljsjs/moment/locale/gu.cljs
clojure
(ns cljsjs.moment.locale.gu (:require ["moment/locale/gu"]))
3eb15d31e33a7e38574f1cdb1291a5cda8429c78687d80401bd08a4e16987dbe
VisionsGlobalEmpowerment/webchange
create_multiple_choice_text.cljc
(ns webchange.question.create-multiple-choice-text (:require [webchange.question.common.check-button :as check-button] [webchange.question.common.layout-markup :refer [get-layout-coordinates]] [webchange.question.common.options-list :as options-list] [webchange.question.common.substrate :as substrate]...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/b49f78c28d1d71fa08cb40be286b38313a1aa6bc/src/cljc/webchange/question/create_multiple_choice_text.cljc
clojure
(ns webchange.question.create-multiple-choice-text (:require [webchange.question.common.check-button :as check-button] [webchange.question.common.layout-markup :refer [get-layout-coordinates]] [webchange.question.common.options-list :as options-list] [webchange.question.common.substrate :as substrate]...
d83e08be66b9b2aed832d9c6142e7f7c29a7678f8b4c4267f8105678653fab29
sadiqj/ocaml-esp32
builtin_modifiers.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/ocamltest/builtin_modifiers.mli
ocaml
************************************************************************ OCaml ...
, projet Gallium , INRIA Paris Copyright 2016 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the val expect : Environments.modifiers val principal : Environments.modifiers val testing : Environments.modifi...
b2a232e5da64d4dffa73f11135ebd64293acf71268a0c353786f4dc39d68466a
parapluu/Concuerror
sleeping_races_3_read.erl
-module(sleeping_races_3_read). -export([sleeping_races_3_read/0]). -export([scenarios/0]). scenarios() -> [{?MODULE, inf, dpor}]. sleeping_races_3_read() -> ets:new(table, [public, named_table]), ets:insert(table, {x, 0}), ets:insert(table, {y, 0}), spawn(fun() -> ets:insert(table, {y, 1}) end), ...
null
https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests/suites/dpor_tests/src/sleeping_races_3_read.erl
erlang
-module(sleeping_races_3_read). -export([sleeping_races_3_read/0]). -export([scenarios/0]). scenarios() -> [{?MODULE, inf, dpor}]. sleeping_races_3_read() -> ets:new(table, [public, named_table]), ets:insert(table, {x, 0}), ets:insert(table, {y, 0}), spawn(fun() -> ets:insert(table, {y, 1}) end), ...
ba0aad42d050c44c07b52311b8a78e5e3ebfdcdbcd47dc6aaeda9464588175fc
BillHallahan/G2
Test44.hs
{-@ LIQUID "--short-names" @-} {-@ LIQUID "--no-termination" @-} {-@ LIQUID "--prune-unsorted" @-} module Test44 ( List, mapReduce) where import Prelude hiding (foldr, foldr1) {-@ die :: {v:String | false} -> a @-} die str = error ("Oops, I died!" ++ str) data List a = Emp | C a (List a) @ measure size...
null
https://raw.githubusercontent.com/BillHallahan/G2/21c648d38c380041a9036d0e375ec1d54120f6b4/tests_lh/test_files/Pos/Test44.hs
haskell
@ LIQUID "--short-names" @ @ LIQUID "--no-termination" @ @ LIQUID "--prune-unsorted" @ @ die :: {v:String | false} -> a @ @ invariant {v:List a | 0 <= size v} @
module Test44 ( List, mapReduce) where import Prelude hiding (foldr, foldr1) die str = error ("Oops, I died!" ++ str) data List a = Emp | C a (List a) @ measure size : : List a - > Int size ( Emp ) = 0 size ( C x xs ) = 1 + size xs @ size (Emp) = 0 size (C x xs)...
6d0bd48fe58a4af81db9bdeb2787cce86b0642a0dd6aa0c51665fa9157d00c95
bcc32/projecteuler-ocaml
sol_006.ml
open! Core open! Import let hund = List.range ~stop:`inclusive 1 100 let sum = List.sum (module Int) ~f:Fn.id let sqr x = x * x let main () = sqr (sum hund) - sum (List.map ~f:sqr hund) |> printf "%d\n" let%expect_test "answer" = main (); [%expect {| 25164150 |}] ;; include (val Solution.make ~problem:(Number 6)...
null
https://raw.githubusercontent.com/bcc32/projecteuler-ocaml/712f85902c70adc1ec13dcbbee456c8bfa8450b2/sol/sol_006.ml
ocaml
open! Core open! Import let hund = List.range ~stop:`inclusive 1 100 let sum = List.sum (module Int) ~f:Fn.id let sqr x = x * x let main () = sqr (sum hund) - sum (List.map ~f:sqr hund) |> printf "%d\n" let%expect_test "answer" = main (); [%expect {| 25164150 |}] ;; include (val Solution.make ~problem:(Number 6)...
7a675c6fca696c534018fb4c93054b6b10c59a7ae13a22eea351e9a7214b8ea0
mirage/irmin
gc.ml
* Copyright ( c ) 2022 Tarides < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND ...
null
https://raw.githubusercontent.com/mirage/irmin/101dccffc33a72c97691dc2301ac6b844a7fbfea/examples/irmin-pack/gc.ml
ocaml
* Make schema * Define configuration parameters for pack store * This is the recommended sorting algorithm for new stores * Throw an error (or not) if an empty tree is persisted * Make pack store * Define configuration for repo * Choose what to do when the index log is full and a merge is in-progress. - [B...
* Copyright ( c ) 2022 Tarides < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND ...
33c1ba4d0e343c86faf57a07f2f8cf6f99620c9b8bb75702dd750e10fe3b4bf5
prikhi/wai-middleware-clacks
Clacks.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} | The @Clacks@ middleware adds a @X - Clacks - Overhead@ header to every response served by a server . To use this package to keep the legacy of alive , simply pass your application to @clacks gnuTerryPratchett@ before passing it to the @r...
null
https://raw.githubusercontent.com/prikhi/wai-middleware-clacks/a42a4690f929874067a41c3a10fc902c7bc497bb/src/Network/Wai/Middleware/Clacks.hs
haskell
# LANGUAGE OverloadedStrings # | A "Network.Wai" 'Middleware' that adds a @X-Clacks-Overhead@ header | Configuration for the Clacks WAI Middleware.
# LANGUAGE NoImplicitPrelude # | The @Clacks@ middleware adds a @X - Clacks - Overhead@ header to every response served by a server . To use this package to keep the legacy of alive , simply pass your application to @clacks gnuTerryPratchett@ before passing it to the @run@ function : > import Network ...
bc61522f322b37cb4035f7b55946efe7ae410664e1c95d0e08d5cb42cf093c78
jumarko/clojure-experiments
reader-and-printer.clj
(ns clojure-experiments.compiler.reader-and-printer) Stuart Sierra 's presentation : -11-10-clojure-next-steps.pdf - start on p. 10 (defn serialize [x] (binding [*print-dup* true] (pr-str x))) (defn deserialize [string] (read-string string)) (serialize {:a 1 :b [1 2 3]}) = > " # =( clojure.lang . / cr...
null
https://raw.githubusercontent.com/jumarko/clojure-experiments/1452106f9e447a3e3360f4f05799724013836297/src/clojure_experiments/compiler/reader-and-printer.clj
clojure
notice that java.sql.Timestamp is special in this regard and serializaing and deserializing it again will return java.util.Date see -and-reading-date-types => java.util.Date => nil => false ... here they are proper strings => true but #= can be prohibited: Rich: Yes, please consider print/read. It is readabl...
(ns clojure-experiments.compiler.reader-and-printer) Stuart Sierra 's presentation : -11-10-clojure-next-steps.pdf - start on p. 10 (defn serialize [x] (binding [*print-dup* true] (pr-str x))) (defn deserialize [string] (read-string string)) (serialize {:a 1 :b [1 2 3]}) = > " # =( clojure.lang . / cr...
6108409a0c67ff88b395f382f02a331c463fdade2540a9444c092dcce9fcc77b
ghuysmans/api-cohttp-lwt
comparator.ml
let () = Lwt_main.run ( Index.modules |> Lwt_list.iter_s (fun (module P : Api.Client.C) -> if P.name = Sys.argv.(1) then let module M = Api.Client.Make (Cohttp_lwt_unix.Client) (P) in let%lwt l = M.list () in l |> Lwt_list.iter_s (fun e -> Lwt_io.printl e.Api.Types.employee_name ) ...
null
https://raw.githubusercontent.com/ghuysmans/api-cohttp-lwt/4edfcb4d24deeeaca5786cb0e440fe295ef05b6f/demo/conv/comparator/comparator.ml
ocaml
let () = Lwt_main.run ( Index.modules |> Lwt_list.iter_s (fun (module P : Api.Client.C) -> if P.name = Sys.argv.(1) then let module M = Api.Client.Make (Cohttp_lwt_unix.Client) (P) in let%lwt l = M.list () in l |> Lwt_list.iter_s (fun e -> Lwt_io.printl e.Api.Types.employee_name ) ...
e4e6f3929bed716602a5f973ac40595181ca79fe3b12fa04340fdcbafb24e0a3
rtrusso/scp
machine.scm
(define (nasm-x86-machine) (append (nasm-x86-machine-base) (nasm-x86-standard-twoarg-binop 'add "add") (nasm-x86-standard-twoarg-binop 'sub "sub") (nasm-x86-standard-twoarg-binop 'bit-xor "xor") (nasm-x86-standard-twoarg-binop 'bit-or "or") (nasm-x86-standard-tw...
null
https://raw.githubusercontent.com/rtrusso/scp/2051e76df14bd36aef81aba519ffafa62b260f5c/src/sasm/nasmx86/machine.scm
scheme
(define (nasm-x86-machine) (append (nasm-x86-machine-base) (nasm-x86-standard-twoarg-binop 'add "add") (nasm-x86-standard-twoarg-binop 'sub "sub") (nasm-x86-standard-twoarg-binop 'bit-xor "xor") (nasm-x86-standard-twoarg-binop 'bit-or "or") (nasm-x86-standard-tw...
aae8bf371ffe575ce7ece101cce01d35872ed2ff8cb60ae8e2f7bd54a81f074d
dylex/haskell-nfs
Setup.hs
import Distribution.Simple import Network.ONCRPC.XDR.Cabal main :: IO () main = defaultMainWithHooks simpleUserHooks { hookedPreProcessors = [ppRPCGenSuffixHandler] }
null
https://raw.githubusercontent.com/dylex/haskell-nfs/07d213e09f7bf9e6fe3200aca3de494c3dcd54f7/nfs/Setup.hs
haskell
import Distribution.Simple import Network.ONCRPC.XDR.Cabal main :: IO () main = defaultMainWithHooks simpleUserHooks { hookedPreProcessors = [ppRPCGenSuffixHandler] }
de59b93a5d40fd0e3b5731f5fcfe54b6bfb446042602180df60e67425de08a12
socrata-platform/ssync
Conduit.hs
# LANGUAGE ScopedTypeVariables , LambdaCase , BangPatterns # module SSync.Util.Conduit ( awaitNonEmpty , rechunk ) where import Conduit import Control.Monad (unless) import Data.ByteString (ByteString) import qualified Data.ByteString as BS import Data.Monoid (mconcat) import qualified Data.DList as DL awaitNonEmp...
null
https://raw.githubusercontent.com/socrata-platform/ssync/2bd47cb59e98249396b914bb3d9371d133bc5436/src/main/haskell/SSync/Util/Conduit.hs
haskell
# LANGUAGE ScopedTypeVariables , LambdaCase , BangPatterns # module SSync.Util.Conduit ( awaitNonEmpty , rechunk ) where import Conduit import Control.Monad (unless) import Data.ByteString (ByteString) import qualified Data.ByteString as BS import Data.Monoid (mconcat) import qualified Data.DList as DL awaitNonEmp...
3080e77c2c43b79b224c7bc72e5b07d49a84a4a194fa81848b76e650e8c63c89
gedge-platform/gedge-platform
rabbit_mgmt_wm_reset.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . %% -module(rabbit_mgmt_wm_reset). -export([init/2, ...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_management/src/rabbit_mgmt_wm_reset.erl
erlang
--------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit_mgmt_wm_reset). -export([init/2, is_aut...
80935e84853a7f087999bda08890edf7ce2a84ab638d3849639a35486107d2ec
DaMSL/K3
TypeSystem.hs
# LANGUAGE ViewPatterns , GeneralizedNewtypeDeriving , TemplateHaskell , TupleSections # module Language.K3.TypeSystem ( typecheck , typecheckProgram , TypecheckResult(..) ) where import Control.Applicative import Control.Arrow import Control.Monad.Writer import Control.Monad.Trans.Either import qualified Data.Foldab...
null
https://raw.githubusercontent.com/DaMSL/K3/51749157844e76ae79dba619116fc5ad9d685643/src/Language/K3/TypeSystem.hs
haskell
declaration and typechecks it. The result is a pair between the typechecking result and a sequence of errors which occurred. The result is the result will contain only @Just@ values. ^The environment defining existing type bindings. ^The environment defining existing bindings. ^The polymorphism bounding info...
# LANGUAGE ViewPatterns , GeneralizedNewtypeDeriving , TemplateHaskell , TupleSections # module Language.K3.TypeSystem ( typecheck , typecheckProgram , TypecheckResult(..) ) where import Control.Applicative import Control.Arrow import Control.Monad.Writer import Control.Monad.Trans.Either import qualified Data.Foldab...
18bb36a5c0f4e493d346b2d840a4bf9e6231f6bbc9dc12403d618d9bd5ef5735
tweag/lagoon
SqlIndex.hs
Copyright 2020 Pfizer Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -2.0 -- Unless required by applicable law or agreed to in writing, software distributed under th...
null
https://raw.githubusercontent.com/tweag/lagoon/2ef0440db810f4f45dbed160b369daf41d92bfa4/src/backend/src/Lagoon/Util/PostgreSQL/Schema/SqlIndex.hs
haskell
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permiss...
Copyright 2020 Pfizer Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , module Lagoon.Util.PostgreSQL.Schema.SqlIndex ( SqlIndex(..) ) where import Data.Monoid ((<>)) import Lagoon.Interface import Lagoon.Util...
2886ed4d3a4e420123583d71caeee40cc0dfac4693b8d6af3f7e137fe83130dd
maxhbr/LDBcollector
LicenseObligations.hs
# LANGUAGE ExistentialQuantification # # LANGUAGE TypeFamilies # {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE DeriveGeneric # module Model.LicenseProperties.LicenseObligations where import qualified Prelude as P import MyPrelude import qualified Data.Text as T import qualified Da...
null
https://raw.githubusercontent.com/maxhbr/LDBcollector/51d940f0af00b2acdd7de246b2be16fa30fc8a6b/src/Model/LicenseProperties/LicenseObligations.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # = License_Unknown | OpenSourceLicense_Unknown | NonOpenSourceLicense | PublicDomain | ProprietaryFreeLicense
# LANGUAGE ExistentialQuantification # # LANGUAGE TypeFamilies # # LANGUAGE DeriveGeneric # module Model.LicenseProperties.LicenseObligations where import qualified Prelude as P import MyPrelude import qualified Data.Text as T import qualified Data.Vector as V import qualified Data.Map as M import quali...
055b28f1080b507f010e62ce58d90076d8ea54ca870cae7b0e54e501642061d9
takikawa/racket-ppa
info.rkt
(module info setup/infotab (#%module-begin (define collection (quote multi)) (define build-deps (quote ("scribble-lib" "html-lib" "racket-doc"))) (define deps (quote ("base"))) (define update-implies (quote ("html-lib"))) (define pkg-desc "documentation part of \"html\"") (define pkg-authors (quote (jay mflatt))) (defi...
null
https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/share/pkgs/html-doc/info.rkt
racket
(module info setup/infotab (#%module-begin (define collection (quote multi)) (define build-deps (quote ("scribble-lib" "html-lib" "racket-doc"))) (define deps (quote ("base"))) (define update-implies (quote ("html-lib"))) (define pkg-desc "documentation part of \"html\"") (define pkg-authors (quote (jay mflatt))) (defi...
d6f7801974e558debeb5bb3be1084b8ff0bd8c175ff403ffee185889b6a3e3f4
prg-titech/Kani-CUDA
diffusion2d-seq-synth.rkt
#lang rosette (require "../../lang.rkt" "diffusion2d-baseline.rkt" (rename-in rosette/lib/synthax [choose ?]) racket/hash) 9 - points stencil computation example . Parallel diffusion program (define switch 0) (define switch-seq #f) (define switch-w (or (eq? switch 0) (eq? switch-seq #f...
null
https://raw.githubusercontent.com/prg-titech/Kani-CUDA/e97c4bede43a5fc4031a7d2cfc32d71b01ac26c4/Emulator/Examples/Diffusion2d/diffusion2d-seq-synth.rkt
racket
Shared memory Index of a element to be updated on a shared memory (? (syncthreads) (void)) (:= int w (if switch-w [in ((? +/LS -/LS) c 1)] (*/LS cw (?: (eq?/LS i 0) [in c] [in (-/LS c 1)])))) (:= int e (if switc...
#lang rosette (require "../../lang.rkt" "diffusion2d-baseline.rkt" (rename-in rosette/lib/synthax [choose ?]) racket/hash) 9 - points stencil computation example . Parallel diffusion program (define switch 0) (define switch-seq #f) (define switch-w (or (eq? switch 0) (eq? switch-seq #f...
e2c985777966b35d032be06a92f84571a1d67ab2559a01c304234d72c02318dd
replikativ/datahike
transact_test.cljc
(ns datahike.test.transact-test (:require #?(:cljs [cljs.test :as t :refer-macros [is are deftest testing]] :clj [clojure.test :as t :refer [is are deftest testing]]) [datahike.api :as d] [datahike.db :as db] [datahike.datom :as dd] [datahike.constants :as const] [datahike.tools :as...
null
https://raw.githubusercontent.com/replikativ/datahike/35773c5882227707a94047a2a97ea8ce5f98c658/test/datahike/test/transact_test.cljc
clojure
idempotency TODO: check for :db/ident support within hhtree
(ns datahike.test.transact-test (:require #?(:cljs [cljs.test :as t :refer-macros [is are deftest testing]] :clj [clojure.test :as t :refer [is are deftest testing]]) [datahike.api :as d] [datahike.db :as db] [datahike.datom :as dd] [datahike.constants :as const] [datahike.tools :as...
3fd5828b34403cda035fa113638d9e2cbe779625d4408f43ce414eb15dee751c
lambdabot/lambdabot
Compose.hs
# LANGUAGE PatternGuards # Copyright ( c ) 2005 GPL version 2 or later ( see ) Another progressive plugin . Compose two ( for now ) plugins transparently -- A sort of mini interpreter. Could do with some more thinking. module Lambdabot.Plugin.Core.Compose (composePlugin) where import Lambdabot.Command impo...
null
https://raw.githubusercontent.com/lambdabot/lambdabot/de01f362c7a8fc6f85c37e604168dcccb1283a0e/lambdabot-core/src/Lambdabot/Plugin/Core/Compose.hs
haskell
A sort of mini interpreter. Could do with some more thinking. ---------------------------------------------------------------------- | Lookup the `process' method we're after, and apply it to the dummy args ---------------------------------------------------------------------- | More interesting composition/evaluat...
# LANGUAGE PatternGuards # Copyright ( c ) 2005 GPL version 2 or later ( see ) Another progressive plugin . Compose two ( for now ) plugins transparently module Lambdabot.Plugin.Core.Compose (composePlugin) where import Lambdabot.Command import Lambdabot.Module import Lambdabot.Monad import Lambdabot.Plugi...
bb5067547b1de1e9072917de654dc814df189bca9bb939199ec21f2c3efb0d30
tschady/advent-of-code
d24.clj
(ns aoc.2015.d24 (:require [aoc.file-util :as file-util] [clojure.math.combinatorics :as combo])) (def input (file-util/read-ints "2015/d24.txt")) (defn qe-score [pkgs] (reduce * 1 pkgs)) (defn find-target-pkg-group-score [pkgs groups] (let [target-weight (/ (reduce + pkgs) groups) max-group-...
null
https://raw.githubusercontent.com/tschady/advent-of-code/63db07edf0c60f2a575f9f4a1852d3b06dbb82f9/src/aoc/2015/d24.clj
clojure
(ns aoc.2015.d24 (:require [aoc.file-util :as file-util] [clojure.math.combinatorics :as combo])) (def input (file-util/read-ints "2015/d24.txt")) (defn qe-score [pkgs] (reduce * 1 pkgs)) (defn find-target-pkg-group-score [pkgs groups] (let [target-weight (/ (reduce + pkgs) groups) max-group-...
e49821633d015254b5bd535700d466ccdc4e2ae369746c7f35540dd85a598038
ml-in-barcelona/jsoo-react
HelloWorldOCaml.ml
open React.Dom.Dsl open Html let%component make () = fragment [ a [| href "-react-realworld-example-app" ; target "_blank" |] [ i [| className "ion-social-github" |] []; string "Fork on GitHub" ] ; footer [||] [ div [| className "container" |] ...
null
https://raw.githubusercontent.com/ml-in-barcelona/jsoo-react/4cae40f36bb9f4b7980e9ca11e63a992b01d3a8f/example/src/HelloWorldOCaml.ml
ocaml
open React.Dom.Dsl open Html let%component make () = fragment [ a [| href "-react-realworld-example-app" ; target "_blank" |] [ i [| className "ion-social-github" |] []; string "Fork on GitHub" ] ; footer [||] [ div [| className "container" |] ...
824b235ae461d6690b4376f81d0f5bc26493682f1a9bc3ad9be32c7266fcfbf9
cgrand/xforms
project.clj
(defproject net.cgrand/xforms "0.19.4" :description "Extra transducers for Clojure" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :plugins [[lein-tools-deps "0.4.5"]] :middleware [lein-tools-deps.plugin/resolve-dependencies-with-deps-edn] :lein-tools-deps/config {:config-fi...
null
https://raw.githubusercontent.com/cgrand/xforms/550dbc150a79c6ecc148d8a7e260e10bc36321c6/project.clj
clojure
(defproject net.cgrand/xforms "0.19.4" :description "Extra transducers for Clojure" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :plugins [[lein-tools-deps "0.4.5"]] :middleware [lein-tools-deps.plugin/resolve-dependencies-with-deps-edn] :lein-tools-deps/config {:config-fi...
ff46d873c4342a08d914e37e2d1c5819fe78534179e67b5d3f24d7241fb677b8
locusmath/locus
morphism.clj
(ns locus.partial-algebra.partial-magmoid.morphism (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.con.core.setpart :refer :all] [locus.set.mapping.general.core.object :ref...
null
https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/partial_algebra/partial_magmoid/morphism.clj
clojure
homomorphism is defined by an existence homomorphism of the underlying partial path Composition and identities in the category of partial magmoids
(ns locus.partial-algebra.partial-magmoid.morphism (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.con.core.setpart :refer :all] [locus.set.mapping.general.core.object :ref...
471857e161bfada2c159f9471216388aca360c8d6e1d9f6401cd02e61fe87a81
richhickey/clojure-contrib
prxml.clj
;;; prxml.clj -- compact syntax for generating XML by , / March 29 , 2009 Copyright ( c ) 2009 Stuart Sierra . All rights reserved . The use and distribution terms for this software are covered by the Eclipse ;; Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of th...
null
https://raw.githubusercontent.com/richhickey/clojure-contrib/40b960bba41ba02811ef0e2c632d721eb199649f/src/main/clojure/clojure/contrib/prxml.clj
clojure
prxml.clj -- compact syntax for generating XML Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this so...
by , / March 29 , 2009 Copyright ( c ) 2009 Stuart Sierra . All rights reserved . The use and distribution terms for this software are covered by the Eclipse March 29 , 2009 : added * prxml - indent * January 4 , 2009 : initial version (ns #^{:author "Stuart Sierra", :doc "Compact syntax...
5577f33f0a95ea1d54c09291b48b522e5ebf1e2f4649d043a139a47d77395e45
ocaml/ocaml
ocamlcp_common.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml/ocaml/440e4b0028eca2fde7fbe6ef31921532203fc6db/tools/ocamlcp_common.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1998 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the module type Ocamlcp_args = sig val _a : unit -> unit val _impl : string -> unit val _intf : string ...
4c6eb915a902ed7df9cddd9a3da6defb8902a86ede7a8236d7e81109e09ab2f9
tov/dssl2
range.rkt
#lang dssl2 def vec_of_iter(iter): [ x for x in iter ] assert vec_of_iter(range(5)) == [0, 1, 2, 3, 4] assert vec_of_iter(range(0)) == [] assert vec_of_iter(range(3, 8)) == [3, 4, 5, 6, 7] assert vec_of_iter(range(8, 3)) == [] assert vec_of_iter(range(8, 8)) == [] assert vec_of_iter(range(0, 10, 2)) == [0, 2, ...
null
https://raw.githubusercontent.com/tov/dssl2/105d18069465781bd9b87466f8336d5ce9e9a0f3/test/dssl2/range.rkt
racket
#lang dssl2 def vec_of_iter(iter): [ x for x in iter ] assert vec_of_iter(range(5)) == [0, 1, 2, 3, 4] assert vec_of_iter(range(0)) == [] assert vec_of_iter(range(3, 8)) == [3, 4, 5, 6, 7] assert vec_of_iter(range(8, 3)) == [] assert vec_of_iter(range(8, 8)) == [] assert vec_of_iter(range(0, 10, 2)) == [0, 2, ...
27ef70e7606d3d960e05e768b6fa4f3c3606841c66860a211e90f646760af7f9
coq/coq
cAst.ml
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * *...
null
https://raw.githubusercontent.com/coq/coq/94963e85e3ac29324cdca0a30ae7afeb5704c572/lib/cAst.ml
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team // * This file is distributed under the terms of the * (see LICENSE file for the text of the license) ************************************...
v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser Gener...
e2e31b9f5b15d6d1459110ce442bb59309cd383e7460ca4bc0ad7cee203a1bec
tkych/lisp-dojo
030.lisp
Last modified : 2013 - 10 - 15 17:29:40 tkych (define-practice :id 030 :name sublist :level 1 :problem " SUBLIST list start &optional end => result-list Make function SUBLIST. It returns a list that is a copy of the sublist of `list' bounded by `start' and `end'. Examples: (subl...
null
https://raw.githubusercontent.com/tkych/lisp-dojo/ba83d025bc03101eec43ec6be44585d7b076caf6/practices/030.lisp
lisp
Last modified : 2013 - 10 - 15 17:29:40 tkych (define-practice :id 030 :name sublist :level 1 :problem " SUBLIST list start &optional end => result-list Make function SUBLIST. It returns a list that is a copy of the sublist of `list' bounded by `start' and `end'. Examples: (subl...
39fe6ab9295593704cbe0c91bc146976b1a3a49cbd17a0b3f1acc3155830dab2
rururu/rete4frames
grid3x3-p11.clj
;;; The puzzle is: ;;; 8 * * * 1 * * 5 4 7 * * * 4 * 6 * * 2 * * 5 * * * * * ;;; * * * * * 1 * 9 * 3 * 7 * * * 4 * 8 * 5 * 4 * * * * * ;;; * * * * * 3 * * 2 * * 1 * 7 * * * 9 9 2 * * 6 * * * 7 ;;; ;;; The solution is: ;;; 8 3 6 7 1 ...
null
https://raw.githubusercontent.com/rururu/rete4frames/b4c19af125db0918c1cf57240b1dafd768ffc52a/examples/sudoku/grid3x3-p11.clj
clojure
The puzzle is: The solution is: Rules used: Naked Single Locked Candidate Single Line Naked Triples
8 * * * 1 * * 5 4 7 * * * 4 * 6 * * 2 * * 5 * * * * * * * * * * 1 * 9 * 3 * 7 * * * 4 * 8 * 5 * 4 * * * * * * * * * * 3 * * 2 * * 1 * 7 * * * 9 9 2 * * 6 * * * 7 8 3 6 7 1 2 9 5 4 7 1 5 8 4 9 6 2 3 2 4 9 5 3 6 8 ...
5538a6cc4f4b767e1d863d180e4a170bc1755effce0bd92b7aa74e4286330591
kana/sicp
ex-4.53.scm
Exercise 4.53 . With permanent - set ! as described in exercise 4.51 and if - fail as in exercise 4.52 , what will be the result of evaluating ;;; ;;; (let ((pairs '())) ( if - fail ( let ( ( p ( prime - sum - pair ' ( 1 3 5 8) ' ( 20 35 110 ) ) ) ) ;;; (permanent-set! pairs (cons p p...
null
https://raw.githubusercontent.com/kana/sicp/912bda4276995492ffc2ec971618316701e196f6/ex-4.53.scm
scheme
(let ((pairs '())) (permanent-set! pairs (cons p pairs)) (amb)) pairs)) Output: ------------------------------------------------------------ *** No more values *** ------------------------------------------------------------
Exercise 4.53 . With permanent - set ! as described in exercise 4.51 and if - fail as in exercise 4.52 , what will be the result of evaluating ( if - fail ( let ( ( p ( prime - sum - pair ' ( 1 3 5 8) ' ( 20 35 110 ) ) ) ) (load "./ex-4.51.scm") (load "./ex-4.52.scm") (define (main args) (ambtest `(be...
3c4f5486f8bcdec11aeeaa02b2cf4f5bd28440a16de0e765e417dcb701068cb2
soegaard/sketching
sketch-pong.rkt
#lang sketching (require metapict/pt-vec metapict/structs) (define pos (pt 0 0)) (define velocity (vec 4 4)) (define (flipx v) (vec (- (vec-x v)) (vec-y v))) (define (flipy v) (vec (vec-x v) (- (vec-y v)))) (define (show-ball b) (no-stroke) (fill "red") (circle (pt-x b) (pt-y b) 4)) (define (se...
null
https://raw.githubusercontent.com/soegaard/sketching/3773cb790ac69201c967201a2fa1727d90a4ad62/sketching-examples/examples/sketch-pong.rkt
racket
find new position p if out of bounds, reverse velocity store the new position
#lang sketching (require metapict/pt-vec metapict/structs) (define pos (pt 0 0)) (define velocity (vec 4 4)) (define (flipx v) (vec (- (vec-x v)) (vec-y v))) (define (flipy v) (vec (vec-x v) (- (vec-y v)))) (define (show-ball b) (no-stroke) (fill "red") (circle (pt-x b) (pt-y b) 4)) (define (se...
199480a03cfd75798824cd041d9661d333dcc7ea5f22d0fec6cad4a2886d3ca6
jgpc42/insn
core_test.clj
(ns insn.core-test (:require [insn.core :as core] [insn.op :as op] [clojure.test :refer :all]) (:import [org.objectweb.asm ClassReader ClassVisitor MethodVisitor Opcodes] [java.lang.annotation Retention RetentionPolicy Target ElementType] [javax.annotation.processing Su...
null
https://raw.githubusercontent.com/jgpc42/insn/3c12bb3c70e54e5091b79764c9776f72726266be/test/insn/core_test.clj
clojure
List<String> foo <T extends Iterable> List<T> bar (List<T> arg)
(ns insn.core-test (:require [insn.core :as core] [insn.op :as op] [clojure.test :refer :all]) (:import [org.objectweb.asm ClassReader ClassVisitor MethodVisitor Opcodes] [java.lang.annotation Retention RetentionPolicy Target ElementType] [javax.annotation.processing Su...
806762186996fdd4dbe3d8811d16605eaead63b6330ada5cac9b6c65875fd888
screenshotbot/screenshotbot-oss
remote.lisp
;;;; Copyright 2018-Present Modern Interpreters Inc. ;;;; This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (defpackage :screenshotbot/replay/remote (:use #:cl) (:nicknames :screenshotbot/p...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/8f9640e4776cf6407761f1ac4d9b3c7f64a83c38/src/screenshotbot/replay/remote.lisp
lisp
Copyright 2018-Present Modern Interpreters Inc. If the block in with-open-file signals, then the log file will be deleted. This prevents that. todo: move to unwind-protect (log:info "~a" (encode-run (make-testing-run))) (send-remote-run (make-testing-run)) Update this in websocket-logs.js too
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (defpackage :screenshotbot/replay/remote (:use #:cl) (:nicknames :screenshotbot/pro/replay/remote) (:import-from #:screenshotbot/replay/i...
24c7e80e680b8b0d9d04e6e6aad3fae0ce5ee799481e7ddd89fc530de5a0ed3c
mhuebert/maria
html.cljs
(ns maria.html (:require [chia.view.hiccup :as hiccup])) (def html hiccup/element)
null
https://raw.githubusercontent.com/mhuebert/maria/15586564796bc9273ace3101b21662d0c66b4d22/editor/src/maria/html.cljs
clojure
(ns maria.html (:require [chia.view.hiccup :as hiccup])) (def html hiccup/element)
a44a9cb5077b307e6395d7089341e8d81a9328baae92922c5fb201475e82ece0
practicalli/clojure-through-code
benchmark.clj
(ns clojure-through-code.benchmark (:require [criterium.core :refer [quick-bench]])) ;; cond (let [number 5] (quick-bench (cond = 5 1 1 2 2 3 3 4 4 5 5))) Evaluation count : 50788488 in 6 samples of calls . Execution time mean : 2.535916 ns Execution time std - deviation : 0.096838 ns Execution time low...
null
https://raw.githubusercontent.com/practicalli/clojure-through-code/82834cdab6b5315aea630386c851200f98d5e48f/src/clojure_through_code/benchmark.clj
clojure
cond
(ns clojure-through-code.benchmark (:require [criterium.core :refer [quick-bench]])) (let [number 5] (quick-bench (cond = 5 1 1 2 2 3 3 4 4 5 5))) Evaluation count : 50788488 in 6 samples of calls . Execution time mean : 2.535916 ns Execution time std - deviation : 0.096838 ns Execution time lower quant...
a0f6668900a76922ab6e85584413140781911133b4132302f984015d86a1ed17
tcsprojects/ocaml-sat-solvers
configure.ml
print_string "FOOBAR\n\n\n"; let parameters = [( "PICOSAT", "Picosat Library file (usually called libpicosat.a)", ref "", ["Picosat"; "Picosatwrapper"], "picosatSolverFactory" ); ( "ZCHAFF", "ZChaff Library file (usually called libsat.a)", ref "", ["Zchaff"; "Zchaffwrapper"], "zchaffSolverFactory" ); ( "MI...
null
https://raw.githubusercontent.com/tcsprojects/ocaml-sat-solvers/2c36605fb3e38a1bee41e079031ab5b173794910/deprecated/configure.ml
ocaml
`ocamlfind printconf stdlib`
print_string "FOOBAR\n\n\n"; let parameters = [( "PICOSAT", "Picosat Library file (usually called libpicosat.a)", ref "", ["Picosat"; "Picosatwrapper"], "picosatSolverFactory" ); ( "ZCHAFF", "ZChaff Library file (usually called libsat.a)", ref "", ["Zchaff"; "Zchaffwrapper"], "zchaffSolverFactory" ); ( "MI...
d173e7dab8243e89de3d17fe111692a771dd3ca7bb772e6b0436e6b8cb3ffcc6
clj-kafka/franzy
defaults.clj
(ns franzy.admin.zookeeper.defaults (:require [franzy.admin.serializers :as serializers])) (defn zk-connection-defaults [] from ZkConnection default }) (defn zk-client-defaults [] {:connection-timeout 30000 from ZkConnection default from ZkClient default :serializer (serializers/zk-string-...
null
https://raw.githubusercontent.com/clj-kafka/franzy/6c2e2e65ad137d2bcbc04ff6e671f97ea8c0e380/admin/src/franzy/admin/zookeeper/defaults.clj
clojure
from the divine
(ns franzy.admin.zookeeper.defaults (:require [franzy.admin.serializers :as serializers])) (defn zk-connection-defaults [] from ZkConnection default }) (defn zk-client-defaults [] {:connection-timeout 30000 from ZkConnection default from ZkClient default
9b58dd669dfb9dfe3b8604c60a0728187fba4d3e34c4b52555ba306f579276d1
p2pcollab/ocaml-p2p
p2p_ringcast.ml
Copyright ( C ) 2019 TG x This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License . This program is distributed in the hope that it will be usef...
null
https://raw.githubusercontent.com/p2pcollab/ocaml-p2p/121e86efff0e6edd7c498d17bf4cab7787991888/lib/p2p-ringcast/p2p_ringcast.ml
ocaml
* find the closest neighbour with lower ID to [dst] from [view] * find the closest neighbour with lower ID to [dst] from [view] remove recvd nodes already seen msg from self msg from successor, fwd to predecessor msg from predecessor fwd to successor msg from self, fwd to both successor & predecessor * Si...
Copyright ( C ) 2019 TG x This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License . This program is distributed in the hope that it will be usef...
cb233339dea42d10d6b2aa43d7d3bc8cdf6b61f28fe3ef9cffbafcc9c1ac43fc
tweag/webauthn
PendingCeremonies.hs
# LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} # LANGUAGE NamedFieldPuns # {-# LANGUAGE RankNTypes #-} # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # -- | This module implements a secure and efficient way to temporarily store webauthn options for the create / register and get / login webauthn operation...
null
https://raw.githubusercontent.com/tweag/webauthn/eee53e3657615574ec9bde42fb50d7efb710e82e/server/src/PendingCeremonies.hs
haskell
# LANGUAGE GADTs # # LANGUAGE RankNTypes # | This module implements a secure and efficient way to temporarily store along with generating the challenge needed for them. | Configuration for the pending ceremony management This is exposed to the clients, but this is not a vulnerability, see <-exposing-the-server-tim...
# LANGUAGE DataKinds # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # webauthn options for the create / register and get / login webauthn operations module PendingCeremonies ( PendingCeremoniesConfig (..), defaultPendingCeremoniesConfig, newPendingCeremonies, ...
8be920182c298d8f5bea0bfe96c29c82f130b22629886618e7fb8e1da4b47498
sdiehl/elliptic-curve
Curve.hs
module Data.Curve ( -- * Elliptic curves Curve(..) , mul , mul' -- ** Elliptic curve forms , Form(..) -- ** Elliptic curve coordinates , Coordinates(..) ) where import Protolude import Control.Monad.Random (MonadRandom, Random(..), getRandom) import Data.Field.Galois (GaloisField, PrimeField, fr...
null
https://raw.githubusercontent.com/sdiehl/elliptic-curve/445e196a550e36e0f25bd4d9d6a38676b4cf2be8/src/Data/Curve.hs
haskell
* Elliptic curves ** Elliptic curve forms ** Elliptic curve coordinates ----------------------------------------------------------------------------- Types ----------------------------------------------------------------------------- | Elliptic curves. | Curve point. Parameters | Curve characteristic. | Curve ...
module Data.Curve ( Curve(..) , mul , mul' , Form(..) , Coordinates(..) ) where import Protolude import Control.Monad.Random (MonadRandom, Random(..), getRandom) import Data.Field.Galois (GaloisField, PrimeField, fromP) import Data.Group (Group(..)) import GHC.Natural (Natural) import Test.QuickCheck ...