_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 |
|---|---|---|---|---|---|---|---|---|
8ba289e8f7aed91f52e203214dff43190a4fa528b0a6a04178566696296e4842 | sheepduke/clop | conditions.lisp | (defpackage clop.conditions
(:use #:cl)
(:export #:toml-parse-error
#:toml-invalid-text-error
#:toml-invalid-utf8-error
#:toml-table-error
#:toml-redefine-table-error
#:toml-redefine-property-error
#:toml-modify-inline-table-error
#:toml-d... | null | https://raw.githubusercontent.com/sheepduke/clop/c45d037de32dd923849df7541c3ace00c085f723/src/conditions.lisp | lisp | (defpackage clop.conditions
(:use #:cl)
(:export #:toml-parse-error
#:toml-invalid-text-error
#:toml-invalid-utf8-error
#:toml-table-error
#:toml-redefine-table-error
#:toml-redefine-property-error
#:toml-modify-inline-table-error
#:toml-d... | |
b4d5a7947d190d20cc31d934e9f298f23afbfb8081176a2da540bb87523fd728 | codedownio/sandwich | TerminalUI.hs | {-# LANGUAGE RankNTypes #-}
{-# LANGUAGE MultiWayIf #-}
# LANGUAGE CPP #
module Test.Sandwich.Formatters.TerminalUI (
-- | The terminal UI formatter produces an interactive UI for running tests and inspecting their results.
defaultTerminalUIFormatter
-- * Options
, terminalUIVisibilityThreshold
, terminalUI... | null | https://raw.githubusercontent.com/codedownio/sandwich/80c5244a47a29c3ec20d68afec89297e014847b9/sandwich/unix-src/Test/Sandwich/Formatters/TerminalUI.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE MultiWayIf #
| The terminal UI formatter produces an interactive UI for running tests and inspecting their results.
* Options
* Auxiliary types
* Util
A subsequent RunTreeUpdated will pick up the new open nodes
Column 1
Scrolling in toggled items
Column 2
Get the set of IDs f... | # LANGUAGE CPP #
module Test.Sandwich.Formatters.TerminalUI (
defaultTerminalUIFormatter
, terminalUIVisibilityThreshold
, terminalUIShowRunTimes
, terminalUIShowVisibilityThresholds
, terminalUILogLevel
, terminalUIInitialFolding
, terminalUIDefaultEditor
, terminalUIOpenInEditor
, terminalUICustom... |
f3ecd69295812a857d55dc372b281a90a02967952a9ac42f41d7778661e98c9b | CodyReichert/qi | parser.lisp | (in-package :cl-user)
(defpackage yaml.parser
(:use :cl)
(:import-from :alexandria
:destructuring-case)
(:import-from :libyaml.macros
:with-parser
:with-event)
(:export :parse-string)
(:documentation "The YAML parser."))
(in-package :yaml.parser)
;;; The parser... | null | https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/cl-yaml-latest/src/parser.lisp | lisp | The parser
Decide what to do with the event
Stream events
Do nothing
Document events, push them to the output list
the output list. Disabled since they are not supported.
((eql type :alias-event)
(add-to-output
(cons type
... | (in-package :cl-user)
(defpackage yaml.parser
(:use :cl)
(:import-from :alexandria
:destructuring-case)
(:import-from :libyaml.macros
:with-parser
:with-event)
(:export :parse-string)
(:documentation "The YAML parser."))
(in-package :yaml.parser)
(defun signal... |
bef7d3889611679fafa552be59ad64ed978febfcf9953b1d1b7f0cd6d958823c | MailOnline/s-metric | combined_test.clj | (ns s-metric.combined-test
(:require [midje.sweet :refer :all]
[s-metric.combined]
[s-metric.naive-match]
[s-metric.padded-hamming]
[s-metric.protocols :as p])
(:import [s_metric.padded_hamming HammingDistance]
[s_metric.naive_match NaiveDistance]
... | null | https://raw.githubusercontent.com/MailOnline/s-metric/991c84f3cc1c8c3ac55981f7eb1788385927fba0/test/s_metric/combined_test.clj | clojure | (ns s-metric.combined-test
(:require [midje.sweet :refer :all]
[s-metric.combined]
[s-metric.naive-match]
[s-metric.padded-hamming]
[s-metric.protocols :as p])
(:import [s_metric.padded_hamming HammingDistance]
[s_metric.naive_match NaiveDistance]
... | |
6585f586959d22452c3c07da53ac3e54bf543df0eb5d3de1463ad4fe1d43ce3e | facebook/infer | BuiltinDefn.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/28e867254f6dc8c2a26d749575b472ca0ae27a0f/infer/src/biabduction/BuiltinDefn.ml | ocaml | * Models for the builtin functions supported
* model va_arg as always returning 0
Make a rearranged array. As it is rearranged when it appears in a precondition
it requires that the function is called with the array allocated. If not infer
return a null pointer deref
* Return a result from a procedure call.
... |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
ef890c5c142727518490d39dd2e99371b5ff1140f3f9c954e38f22d7170fa198 | aelve/guide | Run.hs | {-# LANGUAGE FlexibleContexts #-}
module Guide.Logger.Run
(
withLogger,
)
where
-- Shared imports
import Imports
import Say (sayErr, hSay)
import Control.Monad.Extra
import Data.Time.Clock.System
import System.IO
import qualified Data.Text as T
import qualified Df1
import qualified Di.Core
import Guide.Config... | null | https://raw.githubusercontent.com/aelve/guide/96a338d61976344d2405a16b11567e5464820a9e/back/src/Guide/Logger/Run.hs | haskell | # LANGUAGE FlexibleContexts #
Shared imports
| Create a 'Logger' for the given 'Config' and run an action with that
or both.
variable.
/Exception handling:/
Uncaught exceptions are caught, logged, and rethrown. Since Servant
exceptions don't escape Servant, they are logged where they are thrown
(see @inst... |
module Guide.Logger.Run
(
withLogger,
)
where
import Imports
import Say (sayErr, hSay)
import Control.Monad.Extra
import Data.Time.Clock.System
import System.IO
import qualified Data.Text as T
import qualified Df1
import qualified Di.Core
import Guide.Config
import Guide.Logger.Types
import Guide.Logger.Function... |
3f352234fbbf1a4b057f5133ebc25bf0addeff9a47aa647f822b54984ef4a8ba | fukamachi/clozure-cl | x86-pred.lisp | -*- Mode : Lisp ; Package : CCL -*-
;;;
Copyright ( C ) 2009 Clozure Associates
Copyright ( C ) 1994 - 2001 Digitool , Inc
This file is part of Clozure CL .
;;;
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure CL as the
... | null | https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/level-0/X86/x86-pred.lisp | lisp | Package : CCL -*-
file "LICENSE". The LLGPL consists of a preamble and the LGPL,
conflict, the preamble takes precedence.
Clozure CL is referenced in the preamble as the "LIBRARY."
The LLGPL is also available online at
context, and can just tail call ourselves on the CDRs.
if that fails ,
dis... | Copyright ( C ) 2009 Clozure Associates
Copyright ( C ) 1994 - 2001 Digitool , Inc
This file is part of Clozure CL .
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure CL as the
which is distributed with Clozure CL as ... |
c4a0f4cce45ddde1b362c7ebdda1f2a10c4871a7ec7a73de26b5b7b0fba80ac7 | ekmett/discrimination | WordMap.hs | # LANGUAGE CPP #
{-# LANGUAGE BangPatterns #-}
# LANGUAGE UnboxedTuples #
# LANGUAGE MagicHash #
# LANGUAGE PatternGuards #
# LANGUAGE TypeFamilies #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE Trustworthy #
{-# OPTIONS_GHC -Wall -funbox-strict-fields -fno-warn-orphans -fno-warn-type-defaults -O2 #-}
#ifdef ST_HACK
# OPTION... | null | https://raw.githubusercontent.com/ekmett/discrimination/65de58fc7abf0194a6056d8670091e32714aec60/src/Data/Discrimination/Internal/WordMap.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE RankNTypes #
# OPTIONS_GHC -Wall -funbox-strict-fields -fno-warn-orphans -fno-warn-type-defaults -O2 #
------------------------------------------------------------------------------
|
License : BSD-style
Portability : non-portable
This module suppose a Word64-based array-ma... | # LANGUAGE CPP #
# LANGUAGE UnboxedTuples #
# LANGUAGE MagicHash #
# LANGUAGE PatternGuards #
# LANGUAGE TypeFamilies #
# LANGUAGE Trustworthy #
#ifdef ST_HACK
# OPTIONS_GHC -fno - full - laziness #
#endif
Copyright : ( c ) 2015
Maintainer : < >
module Data.Discrimination.Internal.WordMap
( WordMap
, ... |
311e16746300b2473fc90668a7631e0266f7cef2a8be400ebaa028676ee6805e | eccentric-j/cljs-tui-template | resize.cljs | (ns {{main-ns}}.resize
(:require
[re-frame.core :as rf]))
(defn size
"Get hash-map with the rows and cols of the screen size."
[screen]
{:rows (.-rows screen)
:cols (.-cols screen)})
(defn setup
[screen]
(.on screen "resize"
(fn handle-resize
[_]
(rf/dispatch [:update {:te... | null | https://raw.githubusercontent.com/eccentric-j/cljs-tui-template/6ad22eb0d069666a072c58709fc82e6f1a2ca8c3/resources/leiningen/new/cljs_tui/src/resize.cljs | clojure | (ns {{main-ns}}.resize
(:require
[re-frame.core :as rf]))
(defn size
"Get hash-map with the rows and cols of the screen size."
[screen]
{:rows (.-rows screen)
:cols (.-cols screen)})
(defn setup
[screen]
(.on screen "resize"
(fn handle-resize
[_]
(rf/dispatch [:update {:te... | |
8a63caa6799451b285c68a5f3e6fde2cf1bc7f0060bf9e942b53fbe3cccf22fd | zcaudate/hara | meta.clj | (ns hara.deploy.package.meta
(:require [hara.io.file :as fs]
[hara.lib.jsoup :as html]
[hara.module.artifact :as artifact]))
(def HEADER
{"xmlns"
""
"xmlns:xsi"
"-instance"
"xsi:schemaLocation"
(str ""
" "
"-4.0.0.xsd")})
(defn pom-properties
"creates a p... | null | https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/src/hara/deploy/package/meta.clj | clojure | (ns hara.deploy.package.meta
(:require [hara.io.file :as fs]
[hara.lib.jsoup :as html]
[hara.module.artifact :as artifact]))
(def HEADER
{"xmlns"
""
"xmlns:xsi"
"-instance"
"xsi:schemaLocation"
(str ""
" "
"-4.0.0.xsd")})
(defn pom-properties
"creates a p... | |
35b18aa2922628cfaed391a6504b5bf372328204472da36555d663f80812b972 | well-typed-lightbulbs/ocaml-esp32 | parse.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/parsing/parse.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
let last_token = ref Parser.EOF
let token lexbuf =
let token = Lexer.token lexbuf in
last_token :=... |
5c2b6c631c91c05a4e031b60f117edfc13a2800649eb7c1398f81049aaed2ca2 | typedclojure/typedclojure | method_return_nilables.clj | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/4fb7224598729e823e8b59e1c05115c4fe7ebca4/typed/clj.checker/src/typed/clj/checker/method_return_nilables.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns typed.clj.checker.method-return-nilables
(:require [typed.cljc.runtime.env :as env]
[clojure.core.typed.current-impl :as impl]
[typed.cljc.runtime.env-utils :as env-utils]))
(def add-nonnilable-method-return impl/add-nonnilable-method-return)
... |
4ed76b7afcae8d854fafa8a2f3bd342f1941584d4fd1704323b1b4612f8867a5 | FlowForwarding/loom | part_louvain.erl | %%------------------------------------------------------------------------------
%%
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 la... | null | https://raw.githubusercontent.com/FlowForwarding/loom/86a9c5aa8b7d4776062365716c9a3dbbf3330bc5/tapestry/apps/tapestry/src/part_louvain.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, eithe... | Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author Erlang Solutions Ltd. < >
2014 FlowForwarding.org
Community detection based on the Louvain algorithm . Based on a
python implementation by .
Fast unfoldi... |
3a7d5d3d8bc21fbd945cb6f4eaca33ef0309c1dd95cea4f34dc489253d55a24d | awakesecurity/spectacle | Hyper.hs | {-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Control.Hyper
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see LICENSE
--
-- Stability : stable
Portability : non - portable ( GHC extensions )
--
Hyperfunction transformer .
--
-- @since 1.0.0
mod... | null | https://raw.githubusercontent.com/awakesecurity/spectacle/430680c28b26dabb50f466948180eb59ba72fc8e/src/Control/Hyper.hs | haskell | # OPTIONS_HADDOCK show-extensions #
|
Module : Control.Hyper
Stability : stable
@since 1.0.0
---------------------------------------------------------------------------------------------------------------------
| Hyperfunction transformer.
@since 1.0.0 |
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see LICENSE
Portability : non - portable ( GHC extensions )
Hyperfunction transformer .
module Control.Hyper
( HyperM (HyperM, invokeM),
)
where
import Data.Kind (Type)
newtype HyperM :: (Type -> Type) -> Type -... |
0a912e32cef07f8c7b1e474edc5df4d3313da215caa9bbab2cd07304442df54c | DestructHub/cats | package.lisp | ;;; cat Package definition
(defpackage #:cats
(:use :cl)
(:export #:generate-main-readme
#:generate-cats-readmes
#:get-cats-names))
| null | https://raw.githubusercontent.com/DestructHub/cats/5620a38a23bee46eb709992a6747ba670f2ebf8d/src/package.lisp | lisp | cat Package definition |
(defpackage #:cats
(:use :cl)
(:export #:generate-main-readme
#:generate-cats-readmes
#:get-cats-names))
|
a6f5bc8e3e75eaf60436f4fe48d1fa1d2b6e8e82b51581a64ce04211f1c6d6f1 | mwotton/squealgen | Public.hs | | This code was originally created by squealgen . Edit if you know how it got made and are willing to own it now .
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE OverloadedLabels #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PolyKinds #
# LANGUAGE TypeApplications #
# LAN... | null | https://raw.githubusercontent.com/mwotton/squealgen/72ebca82f75534e806851b8336fc3e2400f801f6/test/Enums/Public.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE GADTs #
enums
decls
schema
VIEWS
functions | | This code was originally created by squealgen . Edit if you know how it got made and are willing to own it now .
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE OverloadedLabels #
# LANGUAGE FlexibleContexts #
# LANGUAGE PolyKinds #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
# OPTIONS_GHC... |
64d794304c0c7df9e8800f9872371ca439779c175bad8aa9d5571707769a0e9f | tvraman/aster-math | 05-block-structure.lisp | ;;; -*- Mode: LISP -*- ;;;
Copyright ( C ) 1990 , 1991 , 1992 , 1993 , 1994by T. V. Raman
;;; All Rights Reserved
;;;
(in-package :afl)
(export
'(*current-speech-state*
local-set-state new-block))
;;; Contains definition of new-block as a macro.
;;; and associated assignment operators.
;;{{{ *current... | null | https://raw.githubusercontent.com/tvraman/aster-math/96fe67bdc2f4c0d0509fc0a6166c282a423f7805/lisp/afl/05-block-structure.lisp | lisp | -*- Mode: LISP -*- ;;;
All Rights Reserved
Contains definition of new-block as a macro.
and associated assignment operators.
{{{ *current-speech-state*
Variable: *CURRENT-SPEECH-STATE* Author: raman
}}}
{{{ new-block
generate block name automatically.
restore state
}}}
{{{ assignments
Variable: *SPEECH... |
Copyright ( C ) 1990 , 1991 , 1992 , 1993 , 1994by T. V. Raman
(in-package :afl)
(export
'(*current-speech-state*
local-set-state new-block))
Created : Fri Aug 14 10:29:11 1992
(defvar *current-speech-state* nil
"Records current state of the audio formatter ")
Macro : NEW - BLOCK ... |
da98d2a17b81afbe3250c4615dde72459de8779bccbc35cc9f1112639994f607 | eponai/sulolive | start_store.cljc | (ns eponai.web.ui.start-store
(:require
#?(:cljs
[cljs.spec.alpha :as s]
:clj
[clojure.spec.alpha :as s])
#?(:cljs
[eponai.web.utils :as utils])
[eponai.client.utils :as client-utils]
[eponai.common.ui.dom :as dom]
[om.next :as om :refer [defui]]
[e... | null | https://raw.githubusercontent.com/eponai/sulolive/7a70701bbd3df6bbb92682679dcedb53f8822c18/src/eponai/web/ui/start_store.cljc | clojure | (ns eponai.web.ui.start-store
(:require
#?(:cljs
[cljs.spec.alpha :as s]
:clj
[clojure.spec.alpha :as s])
#?(:cljs
[eponai.web.utils :as utils])
[eponai.client.utils :as client-utils]
[eponai.common.ui.dom :as dom]
[om.next :as om :refer [defui]]
[e... | |
ca377e6363ff4af4aeb09cf7d30fb24fcb477d59225140262a2330860b35d5c3 | racket/redex | tut-subst.rkt | #lang racket/base
#|
The substitution function in this file has been designed
to work with any expression language so long as the only
binding form is λ and the shape of λ terms is:
(λ (x any) ... e)
(for types) or
(λ x ... e)
for untyped.
|#
(require racket/set racket/match
redex/reducti... | null | https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-lib/redex/tut-subst.rkt | racket |
The substitution function in this file has been designed
to work with any expression language so long as the only
binding form is λ and the shape of λ terms is:
(λ (x any) ... e)
(for types) or
(λ x ... e)
for untyped.
| #lang racket/base
(require racket/set racket/match
redex/reduction-semantics)
(provide subst/proc fvs)
(define (subst/proc x? vars replacements body)
(define replacements-ht
(for/fold ([m (hash)])
([v (in-list vars)]
[rep (in-list replacements)])
(hash-set m v rep)))... |
b4d3b02da728868ad7ef64d38953234e650903fc800ec14972ffc1fd482affe0 | Enecuum/Node | Interpreters.hs | module Enecuum.Core.Interpreters
( module X
) where
import Enecuum.Core.CoreEffect.Interpreter as X
import Enecuum.Core.Crypto.Interpreter as X
import Enecuum.Core.Database.Interpreter as X
import Enecuum.Core.FileSystem.Interpreter as X
import Enecuum.Co... | null | https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/src/Enecuum/Core/Interpreters.hs | haskell | module Enecuum.Core.Interpreters
( module X
) where
import Enecuum.Core.CoreEffect.Interpreter as X
import Enecuum.Core.Crypto.Interpreter as X
import Enecuum.Core.Database.Interpreter as X
import Enecuum.Core.FileSystem.Interpreter as X
import Enecuum.Co... | |
3ab1da1ea85f9f641954e8f24c29a86baaf4d61eed3cbe164220ae70d3b811cf | LeventErkok/sbv | Jugs.hs | -----------------------------------------------------------------------------
-- |
-- Module : Documentation.SBV.Examples.Puzzles.Jugs
Copyright : ( c )
-- License : BSD3
-- Maintainer:
-- Stability : experimental
--
Solves the classic water jug puzzle : We have 3 jugs . The capacity of the jugs are 8 , 5 ,... | null | https://raw.githubusercontent.com/LeventErkok/sbv/279aab6c907620d2f6a43c6bfa22e12eb07b9890/Documentation/SBV/Examples/Puzzles/Jugs.hs | haskell | ---------------------------------------------------------------------------
|
Module : Documentation.SBV.Examples.Puzzles.Jugs
License : BSD3
Maintainer:
Stability : experimental
from any jug to any other, completely topping off the latter. We want to end with
moves should we execute in order to do so?
--... | Copyright : ( c )
Solves the classic water jug puzzle : We have 3 jugs . The capacity of the jugs are 8 , 5 ,
and 3 gallons . We begin with the 8 gallon jug full , the other two empty . We can transfer
4 gallons of water in the first and second jugs , and with an empty third jug . What
module Documentation... |
5d7aa6c1a7d63cf3f5a63cc44cdb46d23cf5cd508ad5dcca8795124e23370bab | awslabs/s2n-bignum | bignum_mod_p256k1_4.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/x86/proofs/bignum_mod_p256k1_4.ml | ocaml | =========================================================================
Reduction modulo p_256k1, the field characteristic for secp256k1.
=========================================================================
*** print_literal_from_elf "x86/secp256k1/bignum_mod_p256k1_4.o";;
***
AND (% rax) (% r8) ... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
let bignum_mod_p256k1_4_mc =
define_assert_from_elf "bignum_mod_... |
04a398610be168e9343939c48b41c35907992c5d05ed2df36c39ebcb94aed6b6 | lexi-lambda/racket-pvector | info.rkt | #lang info
(define collection 'multi)
(define name "pvector")
(define version "1.0")
(define deps
'("base"
"collections"
"rackunit-lib"))
(define build-deps
'("racket-doc"
"scribble-lib"))
| null | https://raw.githubusercontent.com/lexi-lambda/racket-pvector/d0132809b4da6e48c3e3087dc35cda1c47565e5e/info.rkt | racket | #lang info
(define collection 'multi)
(define name "pvector")
(define version "1.0")
(define deps
'("base"
"collections"
"rackunit-lib"))
(define build-deps
'("racket-doc"
"scribble-lib"))
| |
3f296c767a3157769bdd7bf70651ec89bc222e01ce38da4bdceb6fdb3dddc2fe | DuoSRX/ocamnes | vram.ml | open Core
type t = {
mapper : Mapper.t;
nametables : int array;
palettes : int array;
}
let make ~mapper =
{
mapper;
nametables = Array.create ~len:0x800 0;
palettes = Array.create ~len:32 0;
}
let mirrors = function
| Cartridge.Horizontal -> [|0; 0; 1; 1|]
| Cartridge.Vertical -> [|0; 1; 0; ... | null | https://raw.githubusercontent.com/DuoSRX/ocamnes/58886a3f327516dcab9622637afac14c3c50738a/lib/vram.ml | ocaml | open Core
type t = {
mapper : Mapper.t;
nametables : int array;
palettes : int array;
}
let make ~mapper =
{
mapper;
nametables = Array.create ~len:0x800 0;
palettes = Array.create ~len:32 0;
}
let mirrors = function
| Cartridge.Horizontal -> [|0; 0; 1; 1|]
| Cartridge.Vertical -> [|0; 1; 0; ... | |
0bb304150af9247a4bef1a3ea48b52328a2c26b77419ae8e4f935d5fdf18a77a | langford/clj-aws-lambda-example | db.clj | (ns arctic-fun-times.db
(:require
[taoensso.faraday :as far]
[environ.core :refer [env]]))
;You generally want to never put keys in source files. Use profile.clj or
a manager like awspm . If you use a profile.clj , do your team a favor
and include a profile.clj.template file in source control
(de... | null | https://raw.githubusercontent.com/langford/clj-aws-lambda-example/de04b767c42f1ffa9e14e8b01cdd861cfd7c763c/src/arctic_fun_times/db.clj | clojure | You generally want to never put keys in source files. Use profile.clj or
endpoint is datacenter/region specific
This isn't used, but is an example
range-keydef is used to make a secondary part of the query key
you can only query on the primary key or range-keydef keys
consider using a relational database if you n... | (ns arctic-fun-times.db
(:require
[taoensso.faraday :as far]
[environ.core :refer [env]]))
a manager like awspm . If you use a profile.clj , do your team a favor
and include a profile.clj.template file in source control
(def client-opts
{:access-key (:ddb-access env)
:secret-key (:ddb-secre... |
613571cdb5b08b43b5a5ebfb64532e498bf649fdd313fca2eb52c07f14dc9ed4 | Tclv/HaskellBook | intermission.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleInstances #
data DogueDeBordeaux doge = DogueDeBordeaux doge
data Doggies a =
Husky a
| Mastiff a
deriving (Eq, Show)
1 Type constructor
2 * - > *
3 *
4 Num a = > Doggies a
5 Doggies Integer
6 Doggies String
7 both
-- 8 DogueDeBordeaux a
... | null | https://raw.githubusercontent.com/Tclv/HaskellBook/78eaa5c67579526b0f00f85a10be3156bc304c14/ch11/intermission.hs | haskell | 8 DogueDeBordeaux a
Will raise an exception if a Plane is feeded.
Unique inhabitants from all possible implementations | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleInstances #
data DogueDeBordeaux doge = DogueDeBordeaux doge
data Doggies a =
Husky a
| Mastiff a
deriving (Eq, Show)
1 Type constructor
2 * - > *
3 *
4 Num a = > Doggies a
5 Doggies Integer
6 Doggies String
7 both
9 DogueDeBordeaux Str... |
5024b242fa86e66293ff7f87a84dccaf850b6cf5538330b1fc47bb0661facd97 | pedropramos/PyonR | ackermann.rkt | #lang racket
(define (ackermann m n)
(cond
[(= m 0) (+ n 1)]
[(and (> m 0) (= n 0)) (ackermann (- m 1) 1)]
[else (ackermann (- m 1) (ackermann m (- n 1)))]))
(time (ackermann 3 9)) | null | https://raw.githubusercontent.com/pedropramos/PyonR/16edd14f3950fd5a01f8b0237e023536ef48d17b/examples/ackermann/ackermann.rkt | racket | #lang racket
(define (ackermann m n)
(cond
[(= m 0) (+ n 1)]
[(and (> m 0) (= n 0)) (ackermann (- m 1) 1)]
[else (ackermann (- m 1) (ackermann m (- n 1)))]))
(time (ackermann 3 9)) | |
0835666de0bdc12bece355b2d297ba4cc3d9b89ef3edaeecf80a26a4ac351ed2 | ugglan/cljaws | s3_test.clj | (ns cljaws.s3-test
(:use (cljaws s3 core core-test helpers) :reload-all)
(:use [clojure.test]
[clojure.contrib.duck-streams]))
(def timeout-seconds 15)
(deftest buckets-test
(let [bucket-name (make-unique-name "bucket")]
(with-aws :s3
; create bucket
(with-bucket bucket-name
; verify that it exists... | null | https://raw.githubusercontent.com/ugglan/cljaws/0df2312d61e6c7d52520479b3c103858c72e9f5b/test/cljaws/s3_test.clj | clojure | create bucket
verify that it exists
put a simple textobject
verify it exists
create a file and put it
verify it exists
delete them
verify they're gone
delete bucket
verify the bucket is gone | (ns cljaws.s3-test
(:use (cljaws s3 core core-test helpers) :reload-all)
(:use [clojure.test]
[clojure.contrib.duck-streams]))
(def timeout-seconds 15)
(deftest buckets-test
(let [bucket-name (make-unique-name "bucket")]
(with-aws :s3
(with-bucket bucket-name
(is (while-or-timeout
false? ti... |
cb525a19f62fe300733c9677f0b919ec92eaee72da8691bc5cad0e499bef35f2 | OCamlPro/ocplib-endian | test_string.cppo.ml | open EndianString
[@@@warning "-52"]
(* Allow testing deprecated string_set functions *)
[@@@warning "-3"]
let to_t = Bytes.unsafe_to_string
(* do not allocate to avoid breaking tests *)
module BE = BigEndian
module LE = LittleEndian
module NE = NativeEndian
let big_endian = Sys.big_endian
let s = Bytes.make 10 '\... | null | https://raw.githubusercontent.com/OCamlPro/ocplib-endian/10292cd3ffa4d23d737e3f855ad04f22d3d95460/tests/test_string.cppo.ml | ocaml | Allow testing deprecated string_set functions
do not allocate to avoid breaking tests
in [-128; -1]
outside of the [-127;255] range | open EndianString
[@@@warning "-52"]
[@@@warning "-3"]
let to_t = Bytes.unsafe_to_string
module BE = BigEndian
module LE = LittleEndian
module NE = NativeEndian
let big_endian = Sys.big_endian
let s = Bytes.make 10 '\x00'
let assert_bound_check2 f v1 v2 =
try
ignore(f v1 v2);
assert false
with
| ... |
7449d9f1481a31f2bb4c92f25706824ff6cfa8f0407d0f093ddca5b7b7fa7dbf | UBTECH-Walker/WalkerSimulationFor2020WAIC | HeadState.lisp | ; Auto-generated. Do not edit!
(cl:in-package ubt_core_msgs-msg)
// ! \htmlinclude HeadState.msg.html
(cl:defclass <HeadState> (roslisp-msg-protocol:ros-message)
((pan
:reader pan
:initarg :pan
:type cl:float
:initform 0.0)
(isTurning
:reader isTurning
:initarg :isTurning
:type cl:... | null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_16.04_v1.2_20200616/walker_install/share/common-lisp/ros/ubt_core_msgs/msg/HeadState.lisp | lisp | Auto-generated. Do not edit! |
(cl:in-package ubt_core_msgs-msg)
// ! \htmlinclude HeadState.msg.html
(cl:defclass <HeadState> (roslisp-msg-protocol:ros-message)
((pan
:reader pan
:initarg :pan
:type cl:float
:initform 0.0)
(isTurning
:reader isTurning
:initarg :isTurning
:type cl:boolean
:initform cl:nil)
... |
cdcb38223dba79a57527ac40e13a25e2dfaca89ec856331071de7219de3ad22a | slipset/deps-deploy | gpg.clj | (ns deps-deploy.gpg
(:import [java.lang Runtime]))
(defn gpg-program []
(or (System/getenv "DEPS_DEPLOY_GPG") "gpg"))
(defn read-passphrase []
(let [console (System/console)]
(String. (.readPassword console "%s" (into-array ["gpg passphrase: "])))))
(defn gpg [{:keys [passphrase args]}]
(try
(let [ru... | null | https://raw.githubusercontent.com/slipset/deps-deploy/abc7a76b0263e6b70e056710aaa91ef3bc29a0fc/src/deps_deploy/gpg.clj | clojure | (ns deps-deploy.gpg
(:import [java.lang Runtime]))
(defn gpg-program []
(or (System/getenv "DEPS_DEPLOY_GPG") "gpg"))
(defn read-passphrase []
(let [console (System/console)]
(String. (.readPassword console "%s" (into-array ["gpg passphrase: "])))))
(defn gpg [{:keys [passphrase args]}]
(try
(let [ru... | |
183c9c4cc21d26b7e224c7cbcdc7cecd6c30a52940b595fa2cafeb21b125f67f | janestreet/accessor_base | accessor_set.mli | open! Base
open! Import
(** Access whether a key is present in the set. [true] means the key is present, and
[false] means it is absent. *)
val mem : 'key -> (_, bool, ('key, _) Set.t, [< field ]) Accessor.t
val at : 'key -> (_, bool, ('key, _) Set.t, [< field ]) Accessor.t
[@@deprecated "[since 2020-09] Use [mem... | null | https://raw.githubusercontent.com/janestreet/accessor_base/c5e532a52c02f9b9094185f431bb99b2594e4041/src/accessor_set.mli | ocaml | * Access whether a key is present in the set. [true] means the key is present, and
[false] means it is absent.
* The indexed version of [mem] adds the given key to the index.
* Access [()] iff the set contains the given key.
* The indexed version of [found] adds the given key to the index.
* Access every elemen... | open! Base
open! Import
val mem : 'key -> (_, bool, ('key, _) Set.t, [< field ]) Accessor.t
val at : 'key -> (_, bool, ('key, _) Set.t, [< field ]) Accessor.t
[@@deprecated "[since 2020-09] Use [mem] instead of [at]"]
val memi : 'key -> ('key * _, bool, ('key, _) Set.t, [< field ]) Accessor.Indexed.t
val ati : 'key... |
fcb9cf77d7b03debafc5c737d48212ffb1f47e4bdbed58f10d7792ab6e52526c | haskell/network | SocketSpec.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
module Network.SocketSpec (main, spec) where
import Control.Concurrent (threadDelay, forkIO)
import Control.Concurrent.MVar (readMVar)
import Control.Monad
import Data.Maybe (fromJust)
import Data.List (nub)
import Network.Socket
import Network.Socket.ByteString
imp... | null | https://raw.githubusercontent.com/haskell/network/58f1dcd7ebaa12f6b97c5106711a26733ba360b1/tests/Network/SocketSpec.hs | haskell | # LANGUAGE OverloadedStrings #
Unix systems tend to leave the file existing, which is
why our `bind` does its workaround. however if any
system in the future does fix this issue, we don't want
this test to fail, since that would defeat the purpose
of our workaround. but you can uncomment the below lines
if you wa... | # LANGUAGE CPP #
module Network.SocketSpec (main, spec) where
import Control.Concurrent (threadDelay, forkIO)
import Control.Concurrent.MVar (readMVar)
import Control.Monad
import Data.Maybe (fromJust)
import Data.List (nub)
import Network.Socket
import Network.Socket.ByteString
import Network.Test.Common
import Syst... |
a1c2c93d6d25f32c8013413334c27d9a4cbbaf3677a087bac2ec187dbef7050a | CryptoKami/cryptokami-core | BHelpers.hs | # LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
| Definition of ' BlockchainHelpers ' for the main blockchain .
module Pos.Block.BHelpers
(
) where
import Universum
import Control.Monad.Except (MonadError (throwError))
import Pos.Binary.Class (Bi)
import ... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/block/src/Pos/Block/BHelpers.hs | haskell | # LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
| Definition of ' BlockchainHelpers ' for the main blockchain .
module Pos.Block.BHelpers
(
) where
import Universum
import Control.Monad.Except (MonadError (throwError))
import Pos.Binary.Class (Bi)
import ... | |
c202942341cb21c26e10e0c0116c94a40da5686c562c06d30c6de3b46fe6bd22 | janestreet/universe | blocking_reader.mli | open Sexplib
*
The [ load ... ] functions of this module mirror the corresponding functions of
the [ Sexp ] module except that they do macro - expansion in the loaded file and
may throw additional exceptions .
The [load...] functions of this module mirror the corresponding functions of
the [Sexp... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/sexp_macro/src/blocking_reader.mli | ocaml | * [load_sexps file] like [{!Sexp.load_sexps} file], but resolves the macros
contained in [file].
If [allow_includes] is [false] then this raises an exception if [file] contains any
:include macros. The default is [true].
* [load_sexp_conv file f] uses {!load_sexp} and converts the result using
[f].
*... | open Sexplib
*
The [ load ... ] functions of this module mirror the corresponding functions of
the [ Sexp ] module except that they do macro - expansion in the loaded file and
may throw additional exceptions .
The [load...] functions of this module mirror the corresponding functions of
the [Sexp... |
9baa9e30bc8e38fb970697583050c7087208902f1dca83f70b2e9674e1833be0 | leafclick/pgmig | sci.clj | (ns pgmig.migration.sci
(:require [clojure.string :as string]
[migratus.protocols :as proto]
[next.jdbc :as njdbc]
[next.jdbc.datafy :as ndatafy]
[next.jdbc.date-time :as ndate-time]
[next.jdbc.optional :as noptional]
[next.jdbc.plan :as nplan]
... | null | https://raw.githubusercontent.com/leafclick/pgmig/60dcbe719d83479cf8c4df39d3eeba28dcfad8f5/src/clj/pgmig/migration/sci.clj | clojure |
'next.jdbc.specs nspecs-namespace | (ns pgmig.migration.sci
(:require [clojure.string :as string]
[migratus.protocols :as proto]
[next.jdbc :as njdbc]
[next.jdbc.datafy :as ndatafy]
[next.jdbc.date-time :as ndate-time]
[next.jdbc.optional :as noptional]
[next.jdbc.plan :as nplan]
... |
87bbac08dcf9f1bc788beca78b0b1d2098584d1b02b746679b8ed8a2c5c02432 | realworldocaml/book | action_builder.ml | open Import
include Action_builder0
open O
open struct
module List = Stdune.List
end
let register_action_deps :
type a. a eval_mode -> Dep.Set.t -> a Dep.Map.t Memo.t =
fun mode deps ->
match mode with
| Eager -> Build_system.build_deps deps
| Lazy -> Memo.return deps
let deps d =
of_thunk
{ f =
... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_engine/action_builder.ml | ocaml | CR-someday amokhov: The set of targets is accumulated using information from
multiple sources by calling [Targets.combine], which performs set union and
hence duplicate declarations of the very same target can go unnoticed. I
think such redeclarations are not erroneous but are merely redundant; perhaps
we ... | open Import
include Action_builder0
open O
open struct
module List = Stdune.List
end
let register_action_deps :
type a. a eval_mode -> Dep.Set.t -> a Dep.Map.t Memo.t =
fun mode deps ->
match mode with
| Eager -> Build_system.build_deps deps
| Lazy -> Memo.return deps
let deps d =
of_thunk
{ f =
... |
72dd0bef662bb1a82e4983d988f2e2db69d007cf2cfe462c2fe6265cbaf57fe8 | OCamlPro/ocp-build | buildWarnings.mli | (**************************************************************************)
(* *)
(* Typerex Tools *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/tools/ocp-build/misc/buildWarnings.mli | ocaml | ************************************************************************
Typerex Tools
... | Copyright 2011 - 2017 OCamlPro SAS
the GNU General Public License version 3 described in the file
type set
type 'a warning = set -> 'a -> unit
val empty_set : unit -> set
val add : set -> string -> unit
val iter : (string -> unit) -> set -> unit
val count : set -> ... |
7027bf29c31f42b5149044c54a8a91bce15acae11061ebba3b3c4609337627e6 | vikram/lisplibraries | strings.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 ; Package : UFFI -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
;;;; Name: strings.lisp
Purpose : UFFI source to handle strings , cstring and foreigns
Programmer :
... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/uffi-1.5.17/src/strings.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 ; Package : UFFI -*-
*************************************************************************
FILE IDENTIFICATION
Name: strings.lisp
*************************************************************************
Foreign string functions
Either length or null-term... | Purpose : UFFI source to handle strings , cstring and foreigns
Programmer :
Date Started : Feb 2002
$ I d : strings.lisp 11023 2006 - 08 - 14 06:25:09Z kevin $
This file , part of UFFI , is Copyright ( c ) 2002 - 2005 by
(in-package #:uffi)
(def-pointer-var +null-cstring-pointer+
#+(... |
956924bffcc916bfc6943a9b83b9696528ce6b55ce69a934ce3d01f94e371186 | shayne-fletcher/zen | deals.mli | (** Deals *)
include Deals_sig.S
| null | https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/curve/deals.mli | ocaml | * Deals | include Deals_sig.S
|
ac6755f2f81264d034e849e778dfd210be485e11db1803fbd193075c6dda109a | patrikja/AFPcourse | Machine.hs | module Compiler.Machine(Instruction(..), exec) where
import Data.Array(Array, array, (!))
import Compiler.Behaviour (Trace(..))
import Compiler.Value (Value(..), Op1, uno, Op2, duo)
data Instruction
= Push Value
| Pop
| Fetch Int
| Store Int
| Instr1 Op1
| Instr2 Op2
| Display
| Jump Int
| JumpU... | null | https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/L10/src/Compiler/Machine.hs | haskell | Bug example
run pc' (take n stack ++ | module Compiler.Machine(Instruction(..), exec) where
import Data.Array(Array, array, (!))
import Compiler.Behaviour (Trace(..))
import Compiler.Value (Value(..), Op1, uno, Op2, duo)
data Instruction
= Push Value
| Pop
| Fetch Int
| Store Int
| Instr1 Op1
| Instr2 Op2
| Display
| Jump Int
| JumpU... |
b755db3c9bc8c77a249c0b178de392cc154f6b8ba45bf17800d35d0e0db59df1 | facebookarchive/pfff | graph_code_tags.ml |
*
* Copyright ( C ) 2012 Facebook
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file licens... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/graph_code/graph_code_tags.ml | ocaml | ***************************************************************************
Prelude
***************************************************************************
Generating a set of TAGS from a graph_code.
*
* alternatives:
* - could start from the prolog facts (themselves generated from graph_code)
* to fact... |
*
* Copyright ( C ) 2012 Facebook
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file licens... |
da5b457cbb216642cee5f86b233d158b4cc5b33eff417d8000dca86079056d7e | CryptoKami/cryptokami-core | FollowTheSatoshiBench.hs | # OPTIONS_GHC -fno - warn - orphans #
module Bench.Pos.Criterion.FollowTheSatoshiBench
( runBenchmark
) where
import Criterion.Main (Benchmark, bench, defaultConfig, defaultMainWith, env, whnf)
import Criterion.Types (Config (..))
import Formatting (int, sformat, (%))
import ... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/lib/bench/Bench/Pos/Criterion/FollowTheSatoshiBench.hs | haskell | [CSL-192]: make a trick and use special unsafe arbitrary instances
for generation of such things | # OPTIONS_GHC -fno - warn - orphans #
module Bench.Pos.Criterion.FollowTheSatoshiBench
( runBenchmark
) where
import Criterion.Main (Benchmark, bench, defaultConfig, defaultMainWith, env, whnf)
import Criterion.Types (Config (..))
import Formatting (int, sformat, (%))
import ... |
b6686e91487616899d11842a1ef5c927a8a81ac2bb9df816847dbb995fe3d929 | janestreet/sexp_diff_kernel | diff.mli | open Core_kernel
(** This type is intended to be used by OCaml code to produce a visual representation
of the diff. If you want to display this diff, take a look at [Sexp_diff_display].
*)
type t =
| Same of Sexp.t
| Add of Sexp.t
| Delete of Sexp.t
| Replace of Sexp.t * Sexp.t
| Enclose of t list
[@@der... | null | https://raw.githubusercontent.com/janestreet/sexp_diff_kernel/7b98745bb6f969568fd5fa8283691fe11755bd5d/src/diff.mli | ocaml | * This type is intended to be used by OCaml code to produce a visual representation
of the diff. If you want to display this diff, take a look at [Sexp_diff_display].
| open Core_kernel
type t =
| Same of Sexp.t
| Add of Sexp.t
| Delete of Sexp.t
| Replace of Sexp.t * Sexp.t
| Enclose of t list
[@@deriving sexp, hash, compare]
val invert : t -> t
val apply : t -> Sexp.t -> Sexp.t Or_error.t
val apply_exn : t -> Sexp.t -> Sexp.t
val print_for_test : t -> unit
|
dc0010c78fa5283bd2eca855b70d863405b913f4524370da73948f08f841c25b | con-kitty/categorifier | Plugins.hs | # LANGUAGE CPP #
module Categorifier.GHC.Plugins
( module Plugins,
)
where
#if MIN_VERSION_ghc(9, 0, 0)
import GHC.Plugins as Plugins
#else
import GhcPlugins as Plugins
#endif
| null | https://raw.githubusercontent.com/con-kitty/categorifier/18f4f2c21381e6c15f4f0bbaec54e442a858d859/ghc/Categorifier/GHC/Plugins.hs | haskell | # LANGUAGE CPP #
module Categorifier.GHC.Plugins
( module Plugins,
)
where
#if MIN_VERSION_ghc(9, 0, 0)
import GHC.Plugins as Plugins
#else
import GhcPlugins as Plugins
#endif
| |
74f9f33860f53533b4a490663516d7f49a64bdf97621748375141f92793eb799 | rfkm/zou | logging_test.clj | (ns zou.logging-test
(:require [clojure.test :as t]
[io.aviso.logging :as pretty]
[midje.sweet :refer :all]
[unilog.config :as unilog]
[zou.logging :as sut]))
(t/deftest logging-test
(facts "start-logging!"
(fact "with pretty printer"
(sut/start-logging! {:... | null | https://raw.githubusercontent.com/rfkm/zou/228feefae3e008f56806589cb8019511981f7b01/common/test/zou/logging_test.clj | clojure | (ns zou.logging-test
(:require [clojure.test :as t]
[io.aviso.logging :as pretty]
[midje.sweet :refer :all]
[unilog.config :as unilog]
[zou.logging :as sut]))
(t/deftest logging-test
(facts "start-logging!"
(fact "with pretty printer"
(sut/start-logging! {:... | |
1f03a433540d7d74ca4e71057e00ce80997a519de4633a72c69b6f8d8ed5e5bb | vbrankov/hdf5-ocaml | layout.ml | type t =
| COMPACT
| CONTIGUOUS
| CHUNKED
| NLAYOUTS
| null | https://raw.githubusercontent.com/vbrankov/hdf5-ocaml/7abc763189767cd6c92620f29ce98f6ee23ba88f/src/raw/layout.ml | ocaml | type t =
| COMPACT
| CONTIGUOUS
| CHUNKED
| NLAYOUTS
| |
73be599488c96b0bb4977637561d6d01e0760d9ddfaba81d3a44283f9444bbf8 | tsloughter/kakapo | kakapo_app.erl | -module(kakapo_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%% ===================================================================
%% Application callbacks
%% ===================================================================
start(_StartType, _StartArgs) ->
case kakapo_s... | null | https://raw.githubusercontent.com/tsloughter/kakapo/7f2062029a2a26825055ef19ebe8d043d300df6b/apps/kakapo/src/kakapo_app.erl | erlang | Application callbacks
===================================================================
Application callbacks
=================================================================== | -module(kakapo_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
case kakapo_sup:start_link() of
{ok, Pid} ->
{ok, Pid};
{error, Reason} ->
{error, Reason}
end.
stop(_State) ->
ok.
|
719e3bea4ffa8b690d48fe6356b63a2a6ec63fa7a4919b3228616af8dd3bb824 | bmeurer/ocaml-arm | printval.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Cr... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/debugger/printval.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
OCaml port by and
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
... |
5d76bb71aa428ca91eb22a0d3fde9e49acb9a9046c7e512223a6dcf81f6dc8aa | lexi-lambda/racket-curly-fn | info.rkt | #lang info
(define collection 'multi)
(define deps
'(["base" #:version "6.3"]
"namespaced-transformer-lib"))
(define build-deps
'())
| null | https://raw.githubusercontent.com/lexi-lambda/racket-curly-fn/d64cd71d5b386be85f5979edae6f6b6469a4df86/curly-fn-lib/info.rkt | racket | #lang info
(define collection 'multi)
(define deps
'(["base" #:version "6.3"]
"namespaced-transformer-lib"))
(define build-deps
'())
| |
0fde0cbfb4e4444fa814c92379288025084b5b6330f87031bdb40b3f366ab64e | witch-house/pronoun.is | project.clj | (defproject witch-house/pronouns "1.12.0-SNAPSHOT"
:description "Pronoun.is is a website for personal pronoun usage examples"
:url ""
:license "GNU Affero General Public License 3.0"
:dependencies [[compojure "1.6.1"]
[environ "1.1.0"]
[hiccup "1.0.5"]
[lambdai... | null | https://raw.githubusercontent.com/witch-house/pronoun.is/082bbc6e4a3cf3a647c35ad61d07ba5c998f42e5/project.clj | clojure | Is this production profile used for anything? | (defproject witch-house/pronouns "1.12.0-SNAPSHOT"
:description "Pronoun.is is a website for personal pronoun usage examples"
:url ""
:license "GNU Affero General Public License 3.0"
:dependencies [[compojure "1.6.1"]
[environ "1.1.0"]
[hiccup "1.0.5"]
[lambdai... |
3ff0563a1fb4c812f907f132046c873da09bf1fd399b99858a6b57a465a1286d | leanil/LambdaGen | PerformanceTest.hs | module Test.PerformanceTest where
import Expr
import LinAlg
import Replace
import Transformation
import Type
import Typecheck
import Utility
matVecMul, vecSum, tensorProd, matMatMul, matMatMulTrans :: Expr0
matVecMul =
let a = 2^13
b = 2^13 in
mkMap
(app (dotProd b) [vecView "vec" [b]])
... | null | https://raw.githubusercontent.com/leanil/LambdaGen/aff49962759c1ce1fcfb2a1cc4a9a11d78e713a9/src/Test/PerformanceTest.hs | haskell | module Test.PerformanceTest where
import Expr
import LinAlg
import Replace
import Transformation
import Type
import Typecheck
import Utility
matVecMul, vecSum, tensorProd, matMatMul, matMatMulTrans :: Expr0
matVecMul =
let a = 2^13
b = 2^13 in
mkMap
(app (dotProd b) [vecView "vec" [b]])
... | |
65abc4e0385c2f6e29266865c5f2fb9c7fcb8637b9c81304e880a919a2cde0af | jordanthayer/ocaml-search | reverse_cleanup_framework.ml | * Generic framework for performing reverse cleanup search
Jordan - August 2009
Jordan - August 2009 *)
let no_record = (fun _ _ _ -> ())
let rec exploratory_expansions record fq pq i sface update_pq continue
get_ppos =
* Exploratory expanisons performs the first f - ordered expansions .
[ recor... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/reverse_cleanup/reverse_cleanup_framework.ml | ocaml | Verb.pe Verb.toplvl "Found Goal\n";
Verb.pe Verb.toplvl "Found Goal\n";
Continue is false if solution is within bound | * Generic framework for performing reverse cleanup search
Jordan - August 2009
Jordan - August 2009 *)
let no_record = (fun _ _ _ -> ())
let rec exploratory_expansions record fq pq i sface update_pq continue
get_ppos =
* Exploratory expanisons performs the first f - ordered expansions .
[ recor... |
342c01a961b78d4e147c901375de31a290514ee140a453350e29fa59f0421105 | janestreet/ocaml-probes | probes_lib.mli | * Mutable representation of OCaml probes in the traced program . Not thread safe .
Use with only one tracer thread .
Use with only one tracer thread. *)
type t
exception Error of string
type pid = int
type probe_name = string
type probe_state =
{ name : probe_name
; enabled : bool
}
type pattern
(*... | null | https://raw.githubusercontent.com/janestreet/ocaml-probes/cc716bb80284371de5acf7be7460aedeb568578d/lib/probes_lib.mli | ocaml | * Constructor for patterns from string using Str.regexp notation.
* start and end probes semantics
* all probe names that match the regexp pattern
* all probe names for which the predicate is true
* does not require knowing the available probe names
* Returns the names of probes available in the program associate... | * Mutable representation of OCaml probes in the traced program . Not thread safe .
Use with only one tracer thread .
Use with only one tracer thread. *)
type t
exception Error of string
type pid = int
type probe_name = string
type probe_state =
{ name : probe_name
; enabled : bool
}
type pattern
va... |
596ff663e6d27beae40ed2dfbf7e86fb04a20a6ba918848ba70d78faa2d731df | input-output-hk/ouroboros-network | Conversions.hs | module Ouroboros.Consensus.Byron.Ledger.Conversions (
* From @cardano - ledger - byron@ to @ouroboros - consensus@
fromByronBlockCount
, fromByronBlockNo
, fromByronEpochSlots
, fromByronSlotLength
, fromByronSlotNo
-- * From @ouroboros-consensus@ to @cardano-ledger-byron@
, toByronBlockCount
, to... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/c82309f403e99d916a76bb4d96d6812fb0a9db81/ouroboros-consensus-byron/src/Ouroboros/Consensus/Byron/Ledger/Conversions.hs | haskell | * From @ouroboros-consensus@ to @cardano-ledger-byron@
* Extract info from the genesis config
----------------------------------------------------------------------------
----------------------------------------------------------------------------
---------------------------------------------------------------------... | module Ouroboros.Consensus.Byron.Ledger.Conversions (
* From @cardano - ledger - byron@ to @ouroboros - consensus@
fromByronBlockCount
, fromByronBlockNo
, fromByronEpochSlots
, fromByronSlotLength
, fromByronSlotNo
, toByronBlockCount
, toByronSlotLength
, toByronSlotNo
, genesisNumCoreNodes
, ... |
56265c4d76f12365b22df6f8c7b1f1ac162ed864897c011a5d47c01a0043397a | GaloisInc/daedalus | Projection.hs | {-# LANGUAGE OverloadedStrings #-}
module Talos.Analysis.Projection where
import Daedalus.Core
import Daedalus.Core.Free
import Daedalus.Core.Type
import qualified Data.Map as Map
import Data.Maybe (fromMaybe, mapMaybe)
import Dat... | null | https://raw.githubusercontent.com/GaloisInc/daedalus/eea51d5ca992bc5af8bc408529ed0b15c509ad7a/talos/src/Talos/Analysis/Projection.hs | haskell | # LANGUAGE OverloadedStrings #
-----------------------------------------------------------------------------
Expression level analysis
Calculate the EVs used in an expression relative to a given
projection (field set) on the result. We can always just return
freeVars for the argument, but the hope is that we can... |
module Talos.Analysis.Projection where
import Daedalus.Core
import Daedalus.Core.Free
import Daedalus.Core.Type
import qualified Data.Map as Map
import Data.Maybe (fromMaybe, mapMaybe)
import Data.Set (Set)
imp... |
26f7ee248f519e4798132013d106a8af567b2ed658e3ea9dd56950675a94d6c2 | dinosaure/carton | fformat.ml | type elt =
| Kind
| String of string
| Uid
| Percent
type t = elt list
module Pretty = struct
type ('uid, 'x) g =
| Kind : ('uid, [ `A | `B | `C | `D ]) g
| String : string -> ('uid, string) g
| Uid : ('uid, 'uid) g
| Percent : ('uid, percent) g
| Product : ('uid, 'a) g * ('uid, 'b) g ->... | null | https://raw.githubusercontent.com/dinosaure/carton/8cb8b3685fab477594b2d83c70b2fc965d1d59b9/bin/fformat.ml | ocaml | type elt =
| Kind
| String of string
| Uid
| Percent
type t = elt list
module Pretty = struct
type ('uid, 'x) g =
| Kind : ('uid, [ `A | `B | `C | `D ]) g
| String : string -> ('uid, string) g
| Uid : ('uid, 'uid) g
| Percent : ('uid, percent) g
| Product : ('uid, 'a) g * ('uid, 'b) g ->... | |
ee0a47f480f233f65b46ac5ce0d867f0037864ba10561f62b0f5b8b23af1dbde | ocsigen/js_of_ocaml | gh_1307.ml | let test content =
Printf.printf "input: %S\n" content;
flush_all ();
match Parser_1307.root Lexer_1307.token (Lexing.from_string content) with
| n ->
Printf.printf "%d\n" n;
print_endline "success"
| exception e ->
print_endline (Printexc.to_string e);
print_endline "failure"
let%exp... | null | https://raw.githubusercontent.com/ocsigen/js_of_ocaml/1121f1d69dc21aad856336c2dc05f453fffc92f6/compiler/tests-jsoo/gh_1307.ml | ocaml | let test content =
Printf.printf "input: %S\n" content;
flush_all ();
match Parser_1307.root Lexer_1307.token (Lexing.from_string content) with
| n ->
Printf.printf "%d\n" n;
print_endline "success"
| exception e ->
print_endline (Printexc.to_string e);
print_endline "failure"
let%exp... | |
1b3a71cdb2a47e22d1e429b8f33c81efa12577ef055305703431f6e6bcdc685f | swarmpit/swarmpit | api.clj | (ns swarmpit.api
(:require [clojure.set :refer [rename-keys]]
[buddy.hashers :as hashers]
[digest :refer [digest]]
[swarmpit.utils :refer [merge-data]]
[swarmpit.config :as cfg]
[swarmpit.time :as time]
[swarmpit.stats :as stats]
[swa... | null | https://raw.githubusercontent.com/swarmpit/swarmpit/38ffbe08e717d8620bf433c99f2e85a9e5984c32/src/clj/swarmpit/api.clj | clojure | User API
Secret API
Config API
Network API
Volume API
Dockerhub registry API
Public repository API
Registry v2 API
Registry AWS ECR API
Registry Azure ACR API
Registry Gitlab API
Registry lookup API
Repository Tags API
Repository Ports API
Repository Digest API
Service API
Node API
Labels API
Plugin ... | (ns swarmpit.api
(:require [clojure.set :refer [rename-keys]]
[buddy.hashers :as hashers]
[digest :refer [digest]]
[swarmpit.utils :refer [merge-data]]
[swarmpit.config :as cfg]
[swarmpit.time :as time]
[swarmpit.stats :as stats]
[swa... |
0a7ca0573ff67414f70037adff583071e80275bef3f72e8752f3dfde89dc8c2c | xmonad/xmonad-contrib | XMonad.hs | -----------------------------------------------------------------------------
-- |
-- Module : XMonad.Prompt.XMonad
Description : A prompt for running XMonad commands .
Copyright : ( C ) 2007
-- License : BSD3
--
-- Maintainer :
-- Stability : unstable
-- Portability : unportable
--
A p... | null | https://raw.githubusercontent.com/xmonad/xmonad-contrib/571d017b8259340971db1736eedc992a54e9022c/XMonad/Prompt/XMonad.hs | haskell | ---------------------------------------------------------------------------
|
Module : XMonad.Prompt.XMonad
License : BSD3
Maintainer :
Stability : unstable
Portability : unportable
---------------------------------------------------------------------------
* Usage
$usage
$usage
You can u... | Description : A prompt for running XMonad commands .
Copyright : ( C ) 2007
A prompt for running XMonad commands
module XMonad.Prompt.XMonad (
xmonadPrompt,
xmonadPromptC,
xmonadPromptCT,
... |
eb909c7cf303d1d924a65be05dcdadcebafa8fcb19938de5e4b1bbcf9d68b8cc | antono/guix-debian | python.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 < >
Copyright © 2013 , 2014 < >
Copyright © 2013 < >
Copyright © 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... | null | https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/gnu/packages/python.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 < >
Copyright © 2013 , 2014 < >
Copyright © 2013 < >
Copyright © 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 < / > .
(d... |
08fdf0cb09e712f23a61a990388dfb5de784a268a944221b833e0284bc96f35b | gafiatulin/codewars | MoveZeroes.hs | -- Move Zeros
module MoveZeroes where
import Data.List (partition)
move_zeroes :: Bool -> [Int] -> [Int]
move_zeroes isRight = (\(z, xs)-> if isRight then xs ++ z else z++xs) . partition (==0)
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/7%20kyu/MoveZeroes.hs | haskell | Move Zeros |
module MoveZeroes where
import Data.List (partition)
move_zeroes :: Bool -> [Int] -> [Int]
move_zeroes isRight = (\(z, xs)-> if isRight then xs ++ z else z++xs) . partition (==0)
|
50c03f04ee052c08bec571f74ef5c5abd40e769bdc5e7905d628f7312b5ceb94 | tenderlove/chicken-yaml | run.scm | (import scheme)
(cond-expand
(chicken-4
(use yaml test srfi-1 sql-null posix))
(chicken-5
(import yaml test srfi-1 sql-null)
(import (chicken file posix))
(import (chicken process))
(import (chicken io))
(import (chicken condition))
(import (chicken port))))
(test-begin "yaml")
(define (call-with-read... | null | https://raw.githubusercontent.com/tenderlove/chicken-yaml/2d42d9169a479db520cb1068fa56dddb8cd9d2b4/tests/run.scm | scheme | (import scheme)
(cond-expand
(chicken-4
(use yaml test srfi-1 sql-null posix))
(chicken-5
(import yaml test srfi-1 sql-null)
(import (chicken file posix))
(import (chicken process))
(import (chicken io))
(import (chicken condition))
(import (chicken port))))
(test-begin "yaml")
(define (call-with-read... | |
5d2ba9f1569f87f52dc0efc44bc4e50d16e05b87f35640fd48145a3ee03f8083 | waymonad/waymonad | Render.hs |
waymonad A wayland compositor in the spirit of xmonad
Copyright ( C ) 2018
This 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 2.1 of the License , or ( at your op... | null | https://raw.githubusercontent.com/waymonad/waymonad/18ab493710dd54c330fb4d122ed35bc3a59585df/src/Waymonad/Output/Render.hs | haskell | # LANGUAGE BangPatterns #
| Take a surface an render it onto the output frame buffer
^ The output to render to
^ The accumulated damage region on the output
^ The texture to render onto the output
^ The Transformation value of the texture
^ The scale factor of the surface (for scaling geometry)
^ The rectangle o... |
waymonad A wayland compositor in the spirit of xmonad
Copyright ( C ) 2018
This 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 2.1 of the License , or ( at your op... |
7e472453ec479f48038c1f4d4a216226226a77ff2fdee52ec558cf35f97c240d | skanev/playground | 10-tests.scm | (require rackunit rackunit/text-ui)
(load "helpers/simulator.scm")
(load "../10.scm")
(define sicp-5.10-tests
(test-suite
"Tests for SICP exercise 5.10"
(test-case "(fibonacci 8)"
(set-register-contents! fibonacci-machine 'n 8)
(start fibonacci-machine)
(check-eq? (get-register-contents f... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/05/tests/10-tests.scm | scheme | (require rackunit rackunit/text-ui)
(load "helpers/simulator.scm")
(load "../10.scm")
(define sicp-5.10-tests
(test-suite
"Tests for SICP exercise 5.10"
(test-case "(fibonacci 8)"
(set-register-contents! fibonacci-machine 'n 8)
(start fibonacci-machine)
(check-eq? (get-register-contents f... | |
fa815f41ea2ba6036974733c5f019a7a22b4c1e4943e01ab7b5822f3a508b9ae | zadean/xqerl | fn_apply_SUITE.erl | -module('fn_apply_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['fn-apply-01'/1]).
-export(['fn-apply-02'/1]).
-export(['fn-apply-03'/1]).
-export(['f... | null | https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/fn/fn_apply_SUITE.erl | erlang | -module('fn_apply_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['fn-apply-01'/1]).
-export(['fn-apply-02'/1]).
-export(['fn-apply-03'/1]).
-export(['f... | |
94a48c6151e44c78a6bb488defd30ba2c8374ceb2e6f253e646007c5739621fd | cburgmer/buildviz | builds_test.clj | (ns buildviz.controllers.builds-test
(:require [buildviz
[handler :as handler]
[test-utils :refer :all]]
[clj-time
[coerce :as tc]
[core :as t]]
[buildviz.data.results :as results]
[cheshire.core :as json]
[clojure.str... | null | https://raw.githubusercontent.com/cburgmer/buildviz/320f2bf4782e10824f8b3a3a80250992e29f9c42/test/buildviz/controllers/builds_test.clj | clojure | Different jobs should not interfere with each other | (ns buildviz.controllers.builds-test
(:require [buildviz
[handler :as handler]
[test-utils :refer :all]]
[clj-time
[coerce :as tc]
[core :as t]]
[buildviz.data.results :as results]
[cheshire.core :as json]
[clojure.str... |
ec3516f218170882e947c89d00c3f48c764672cbe1b5f664f138d5bd1ebf9d99 | gfour/gic | exmh9.hs | result = third f sq 3;
third g f x = g f x;
f h x = twice h x;
sq z = z * z;
twice h y = h (h y)
| null | https://raw.githubusercontent.com/gfour/gic/d5f2e506b31a1a28e02ca54af9610b3d8d618e9a/Examples/Num/exmh9.hs | haskell | result = third f sq 3;
third g f x = g f x;
f h x = twice h x;
sq z = z * z;
twice h y = h (h y)
| |
6aab56f55d13cb28db507f219fc5f8f6723eff550953666e9ad43a42f1f37d93 | boot-clj/boot | pom.clj | (ns boot.pom
(:refer-clojure :exclude [name])
(:require
[clojure.java.io :as io]
[boot.pod :as pod]
[boot.file :as file]
[boot.util :as util]
[boot.xml :as xml]
[clojure.xml :refer [parse]]
[clojure.zip :refer [xml-zip]]
[c... | null | https://raw.githubusercontent.com/boot-clj/boot/64334b4d5744b1444634f4a5a5a52b3ae67dddeb/boot/worker/src/boot/pom.clj | clojure | elements ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
private ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
public ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | (ns boot.pom
(:refer-clojure :exclude [name])
(:require
[clojure.java.io :as io]
[boot.pod :as pod]
[boot.file :as file]
[boot.util :as util]
[boot.xml :as xml]
[clojure.xml :refer [parse]]
[clojure.zip :refer [xml-zip]]
[c... |
cc2d641529d691d5124d3c4726247dade3f3e6b8f75e4932c6c3298cccfecd28 | pnathan/pp-toml | pp-toml-tests.lisp | (defpackage :pp-toml-tests
(:use :common-lisp
:pp-toml
:fiveam
:generic-comparability)
(:export :run-tests))
(in-package :pp-toml-tests)
(use-package :pp-toml)
(def-suite pp-toml-suite
:description "The tests.")
(in-suite pp-toml-suite)
(defun run-tests ()
(let ((results (run 'pp-tom... | null | https://raw.githubusercontent.com/pnathan/pp-toml/bff2eadb735daa88560b26d838b4210f2073e57f/pp-toml-tests.lisp | lisp |
Let's go hardmode
string equality checks
\"
(is (equalp (list
:string
| (defpackage :pp-toml-tests
(:use :common-lisp
:pp-toml
:fiveam
:generic-comparability)
(:export :run-tests))
(in-package :pp-toml-tests)
(use-package :pp-toml)
(def-suite pp-toml-suite
:description "The tests.")
(in-suite pp-toml-suite)
(defun run-tests ()
(let ((results (run 'pp-tom... |
9493cd824669fdc42cf5754b265bc8b74cfb321c409bfb32c59f9dc23f0c81e6 | Yume-Labs/prism | metadata_test.clj | (ns prism.metadata-test
(:require [clojure.test :refer :all]
[clojure.core.async :refer [chan]]
[clojure.java.io :refer [reader delete-file]]
[prism.metadata :refer :all]
[prism.db :refer [retrieve-nft store-nft]]
[prism.helpers :refer [<!!?
... | null | https://raw.githubusercontent.com/Yume-Labs/prism/1dd2c0f4eac8bbd32877a40617b36c1319d8f114/t/prism/metadata_test.clj | clojure | (ns prism.metadata-test
(:require [clojure.test :refer :all]
[clojure.core.async :refer [chan]]
[clojure.java.io :refer [reader delete-file]]
[prism.metadata :refer :all]
[prism.db :refer [retrieve-nft store-nft]]
[prism.helpers :refer [<!!?
... | |
432f528c51ee3c8182e279ba5df58c4744d1685414f648e5116dd5c42e6893bc | racket/web-server | dispatch-logresp.rkt | #lang racket/base
(require racket/contract
web-server/dispatchers/dispatch
web-server/http
web-server/http/response
"private/log.rkt"
(submod web-server/dispatchers/dispatch-log private))
(define format-reqresp/c
(or/c (-> request? string?)
(-> request? response?... | null | https://raw.githubusercontent.com/racket/web-server/d9b8fe5c4adec0493b7e2f9af46215305f34c8f1/web-server-lib/web-server/dispatchers/dispatch-logresp.rkt | racket | #lang racket/base
(require racket/contract
web-server/dispatchers/dispatch
web-server/http
web-server/http/response
"private/log.rkt"
(submod web-server/dispatchers/dispatch-log private))
(define format-reqresp/c
(or/c (-> request? string?)
(-> request? response?... | |
ee985d27bf91b96970fb3a4c487e98bd68932c31379d20b9883bb826b571881a | hemio-ev/crag | Error.hs | module Network.ACME.Error where
import Crypto.JOSE
import qualified Data.ByteString.Lazy.Char8 as L
import Network.ACME.Object
import Network.HTTP.Client
import Network.HTTP.Types
type JwsError = Error
errBadNonce :: AcmeErr -> Bool
errBadNonce AcmeErrDetail {acmeErrProblemDetail = d}
| (show <$> problemDetailTyp... | null | https://raw.githubusercontent.com/hemio-ev/crag/5adaae099c0c1a240b7e7831dcf1f5072ed1f5e4/src/Network/ACME/Error.hs | haskell | | Server reported an error with structured details
| Wrapper for catched HTTP exceptions
| Wanted challenge type to available
| Challenge did not contain a "token" field
|
| Request not supported by the server (not in 'AcmeObjDirectory')
API violations: The following errors should not occur
| Expected HTTP st... | module Network.ACME.Error where
import Crypto.JOSE
import qualified Data.ByteString.Lazy.Char8 as L
import Network.ACME.Object
import Network.HTTP.Client
import Network.HTTP.Types
type JwsError = Error
errBadNonce :: AcmeErr -> Bool
errBadNonce AcmeErrDetail {acmeErrProblemDetail = d}
| (show <$> problemDetailTyp... |
c411ed7df3bf28d98d67c483bb91304d7a9e809acebf6b9ca7518b4b45a9fb17 | clckwrks/clckwrks | IOThread.hs | |this module provides a simple mechanism for adding IO operations
-- to a queue and running them in a single thread. This is useful if
the IO operations have side - effects which could collide if run from
-- multiple threads. For example, creating an image thumbnail and
storing it on disk , running LaTeX , etc .
... | null | https://raw.githubusercontent.com/clckwrks/clckwrks/dd4ea1e2f41066aa5779f1cc22f3b7a0ca8a0bed/Clckwrks/IOThread.hs | haskell | to a queue and running them in a single thread. This is useful if
multiple threads. For example, creating an image thumbnail and
WARNING: no attempt is made to wait for the queue to empty... we should probably have safer version that waits for the operations to complete?
if the thread function throws an exception ... | |this module provides a simple mechanism for adding IO operations
the IO operations have side - effects which could collide if run from
storing it on disk , running LaTeX , etc .
module Clckwrks.IOThread where
import Control.Concurrent (ThreadId, forkIO, killThread)
import Control.Concurrent.Chan (Chan,newChan, ... |
6b57189825c267eedaba374f8e2a6395b8312b865db6c462a35bbcc500e195a7 | hyperfiddle/electric | missionary_relieve.cljc | (ns user.missionary.missionary-relieve
(:require [hyperfiddle.rcf :as rcf :refer [tests tap % with]]
[missionary.core :as m]))
(hyperfiddle.rcf/enable!)
; m/relieve is a dangerous primitive, yes it converts a discrete flow into a continuous flow BUT it does so by consuming
; the upstream flow as fast as... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/src-docs/user/missionary/missionary_relieve.cljc | clojure | m/relieve is a dangerous primitive, yes it converts a discrete flow into a continuous flow BUT it does so by consuming
the upstream flow as fast as possible and reducing it into an accumulator. In other words it "relieves" backpressure.
This is appropriate for event sources like user interactions (typing into a dom... | (ns user.missionary.missionary-relieve
(:require [hyperfiddle.rcf :as rcf :refer [tests tap % with]]
[missionary.core :as m]))
(hyperfiddle.rcf/enable!)
HOWEVER , by disabling backpressure you 've ... lost all the benefits of backpressure , the whole point of backpressure
(tests
(def <spinner
(... |
8e7597138fa1c4dbf2c7bb5b51b36708fc28d9d574efb5aff418c054501ea5ef | roburio/caldav | webdav_config.ml | type config = {
principals : string ;
calendars : string ;
host : Uri.t ;
do_trust_on_first_use : bool ;
}
let admin_acl config = [
(`Href (Uri.of_string @@ "/" ^ config.principals ^ "/root/"), `Grant [ `All ]) ;
(`All, `Grant [ `Read ])
]
let calendars_acl config = [
(`Href (Uri.of_string @@ "/" ^ conf... | null | https://raw.githubusercontent.com/roburio/caldav/badc3268ec40667649a77ce3dea521c47500c02e/src/webdav_config.ml | ocaml | type config = {
principals : string ;
calendars : string ;
host : Uri.t ;
do_trust_on_first_use : bool ;
}
let admin_acl config = [
(`Href (Uri.of_string @@ "/" ^ config.principals ^ "/root/"), `Grant [ `All ]) ;
(`All, `Grant [ `Read ])
]
let calendars_acl config = [
(`Href (Uri.of_string @@ "/" ^ conf... | |
54098363d18d4d34be6e8a3f3b5b2ac37f341e12426a2d510d690a3a4836d376 | ocsigen/obrowser | main.ml | let int_input name value =
let res = Js.Fragment.create () in
Js.Fragment.append res (Js.Node.text name) ;
let input = Js.Node.element "input" in
Js.Node.set_attribute input "type" "text" ;
Js.Node.set_attribute input "value" (string_of_int !value) ;
Js.Node.register_event input "onchange"
... | null | https://raw.githubusercontent.com/ocsigen/obrowser/977c09029ea1e4fde4fb0bf92b4d893835bd9504/examples/minesweeper/main.ml | ocaml | let int_input name value =
let res = Js.Fragment.create () in
Js.Fragment.append res (Js.Node.text name) ;
let input = Js.Node.element "input" in
Js.Node.set_attribute input "type" "text" ;
Js.Node.set_attribute input "value" (string_of_int !value) ;
Js.Node.register_event input "onchange"
... | |
ff01e930fc6ea0a6988eafc3d259ea7dba8175353512b049715287db350c3fba | m4b/bin2json | B2J_ByteCoverage.ml | open ByteCoverage
open B2J_Json
let data2json (data:data) =
`O [
"size" , to_hex data.size;
"tag" , `String (tag_to_string data.tag);
"range_start", to_hex data.range_start;
"range_end", to_hex data.range_end;
"extra", `String data.extra;
"understood", `Bool data.understood;
]
let to_json ... | null | https://raw.githubusercontent.com/m4b/bin2json/9aeeef017a4446cfc134e593aca76e8ac573b7f7/lib/json/B2J_ByteCoverage.ml | ocaml | open ByteCoverage
open B2J_Json
let data2json (data:data) =
`O [
"size" , to_hex data.size;
"tag" , `String (tag_to_string data.tag);
"range_start", to_hex data.range_start;
"range_end", to_hex data.range_end;
"extra", `String data.extra;
"understood", `Bool data.understood;
]
let to_json ... | |
d672fd96ad658d560330b3689982586076393054a96a3e4f281fd348d9dd907a | malcolmreynolds/GSLL | numerical-integration-with-tables.lisp | ;; Numerical integration techniques that require tables
2009 - 04 - 04 15:24:05EDT
Time - stamp : < 2009 - 05 - 25 13:22:13EDT numerical-integration-with-tables.lisp >
;; $Id: $
(in-package :gsl)
/usr / include / gsl / gsl_integration.h
;;;;********************************************************************... | null | https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/calculus/numerical-integration-with-tables.lisp | lisp | Numerical integration techniques that require tables
$Id: $
****************************************************************************
****************************************************************************
This defines the reinitialize-instance but causes the make-qaws-table
to initialize twice.
***********... | 2009 - 04 - 04 15:24:05EDT
Time - stamp : < 2009 - 05 - 25 13:22:13EDT numerical-integration-with-tables.lisp >
(in-package :gsl)
/usr / include / gsl / gsl_integration.h
QAWS adaptive integration for singular functions
(defmobject qaws-table
"gsl_integration_qaws_table"
((alpha :double) (beta :doub... |
7aca92760932456b91cea9b30c418cd8f9b356b0628e5c436f54a18966788bac | slyrus/mcclim-old | graft.lisp | ;;; -*- Mode: Lisp; Package: CLIM-GRAPHIC-FORMS -*-
( c ) 2006 - 2007 Jack D. Unrue ( jdunrue ( at ) gmail ( dot ) com )
;;; based on the null backend by:
( c ) 2005 ( )
;;; This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as... | null | https://raw.githubusercontent.com/slyrus/mcclim-old/354cdf73c1a4c70e619ccd7d390cb2f416b21c1a/Backends/Graphic-Forms/graft.lisp | lisp | -*- Mode: Lisp; Package: CLIM-GRAPHIC-FORMS -*-
based on the null backend by:
This library is free software; you can redistribute it and/or
either
This library 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 PARTI... |
( c ) 2006 - 2007 Jack D. Unrue ( jdunrue ( at ) gmail ( dot ) com )
( c ) 2005 ( )
modify it under the terms of the GNU Library General Public
version 2 of the License , or ( at your option ) any later version .
Library General Public License for more details .
You should have received a copy of the ... |
92f17ca331173892cba48ebeea1b09820a889951704e4114a155239b4c32ac89 | leithaus/rhocaml | loadall.ml | (* -*- mode: Tuareg;-*- *)
(* Filename: loadall.ml *)
(* Authors: lgm *)
Creation : Mon Mar 7 11:52:24 2005
Co... | null | https://raw.githubusercontent.com/leithaus/rhocaml/7b0c7bfa99dd98059a1e8899007c4b5d258f99ed/loadall.ml | ocaml | -*- mode: Tuareg;-*-
Filename: loadall.ml
Authors: lgm
See LICENSE.BIOSIM in the license directory.
Description: ... | Creation : Mon Mar 7 11:52:24 2005
Copyright : Biosimilarity LLC 2004 - 2006 . All rights reserved .
#use "topfind";;
#require "json-wheel";;
let run_command com f =
match Sys.command (com ^ " " ^ f) with
| 0 -> ()
| _ -> failwith (Printf.sprintf "Cannot su... |
051782b79f106bdee65f2ee4a83d9c14c5d170de28d6dfd56916afdd0b663d87 | rtoy/cmucl | timer-support.lisp | ;;; -*- Mode: CLtL -*-
(ext:file-comment "$Header: src/motif/lisp/timer-support.lisp $")
;;; timers-support.lisp --
;;; Extension to CMUCL Motif Interface. Adding missing call for
;;; 'XtAppAddTimeOut'.
;;;
Copyright ( C ) 1994
;;;
Author :
;;;
;;; Address: Robotics Laboratory
Courant Institute of... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/motif/lisp/timer-support.lisp | lisp | -*- Mode: CLtL -*-
timers-support.lisp --
Extension to CMUCL Motif Interface. Adding missing call for
'XtAppAddTimeOut'.
Address: Robotics Laboratory
----------------------------------------------------------------------------
Timers
&rest for 'args' would be nicer, but it would
mess up the actual interface... |
(ext:file-comment "$Header: src/motif/lisp/timer-support.lisp $")
Copyright ( C ) 1994
Author :
Courant Institute of Mathematical Sciences
719 Broadway , Room 1220
New York , NY , 10003
(in-package "TOOLKIT")
(defvar *timers-count* 0
"The serial number associated to new ... |
29d6e3f4a6a21c2b68e24a18356ec0e03aa74504d100140c4703931ebd6c0ba0 | Lovesan/clave | color-primaries.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
Copyright ( C ) 2017 , < lovesan.ru at gmail.com >
;;; 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, inclu... | null | https://raw.githubusercontent.com/Lovesan/clave/3b08ed4c4cb3fa885739355821f73bbfd75a2a7d/src/color-primaries.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
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... |
Copyright ( C ) 2017 , < lovesan.ru at gmail.com >
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 KI... |
d4ebf0b8796a0875e8e512f96e53684cd89436b4ef764c12def3e46cf47a7250 | mk270/archipelago | game.ml |
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2013
This programme is free software ; you may redistribute and/or modify
it under the terms of the GNU Affero General Public Licence as published by
the Free Software Foundation , either version 3 of said Licence , or
( ... | null | https://raw.githubusercontent.com/mk270/archipelago/4241bdc994da6d846637bcc079051405ee905c9b/src/game/game.ml | ocaml | let emitl mo msg = Socket.emitl mo msg |
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2013
This programme is free software ; you may redistribute and/or modify
it under the terms of the GNU Affero General Public Licence as published by
the Free Software Foundation , either version 3 of said Licence , or
( ... |
a1ece6b86cd3b27648c9577573122e2c3e4730d97a9c587192cb758df94b3c85 | blindglobe/clocc | bufmac.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*-
This file contains macro definitions for the BUFFER object for Common - Lisp
X windows version 11
;;;
TEXAS INSTRUMENTS INCORPORATED
;;; P.O. BOX 2909
AUSTIN , TEXAS 78769
;;;
Copyright ( C ) 1987 ... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/gui/clx/bufmac.lisp | lisp | Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*-
P.O. BOX 2909
Permission is granted to any individual or institution to use, copy, modify,
and distribute this software, provided that this complete copyright and
permission notice is maintained, intact, in all copies and supporting
... |
This file contains macro definitions for the BUFFER object for Common - Lisp
X windows version 11
TEXAS INSTRUMENTS INCORPORATED
AUSTIN , TEXAS 78769
Copyright ( C ) 1987 Texas Instruments Incorporated .
Texas Instruments Incorporated provides this software " as is " without
#+cmu
(ext:file-co... |
531db0a236cf9a72765290287f3bf803f7be4998034c1372401acb770175eb68 | ninenines/cowboy | rfc7538_SUITE.erl | Copyright ( c ) 2018 , < >
%%
%% 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 IS " AND THE AUTHOR DISCLAIMS A... | null | https://raw.githubusercontent.com/ninenines/cowboy/8795233c57f1f472781a22ffbf186ce38cc5b049/test/rfc7538_SUITE.erl | erlang |
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.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2018 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(rfc7538_SUITE).
-compile(export_all).
-compile(nowar... |
7d90cf1957a422389ecad25dc943e4659e11deb62ff72b5a1f698b364c213d72 | exercism/clojurescript | example-lazy.cljs | (ns pascals-triangle
"Calculates the `Pascal Triangle` in lazy way."
{:author [:LeaveNhA "Seçkin KÜKRER"]
:last-update-date "24-09-2019"})
(defn row [r]
(if (vector? r)
(lazy-seq (cons r
(row (vec (concat [1N] (map (partial apply +) (partition 2N 1N r)) [1N])))))
(last (take r (row... | null | https://raw.githubusercontent.com/exercism/clojurescript/0135bc589c556557397650fe5e52ac7df3d4ddb5/exercises/practice/pascals-triangle/src/example-lazy.cljs | clojure | (ns pascals-triangle
"Calculates the `Pascal Triangle` in lazy way."
{:author [:LeaveNhA "Seçkin KÜKRER"]
:last-update-date "24-09-2019"})
(defn row [r]
(if (vector? r)
(lazy-seq (cons r
(row (vec (concat [1N] (map (partial apply +) (partition 2N 1N r)) [1N])))))
(last (take r (row... | |
21cd4f693ac92c50fd7b2de13b592f026634c18a3b1eeeb8e9c63673199a0546 | nikodemus/SBCL | move.lisp | the PPC VM definition of operand loading / saving and the Move VOP
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The softw... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/compiler/ppc/move.lisp | lisp | more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
doesn't think it is a hairy type. This also allows checking of a
few of the values in a continuation to fall out.
frame for argument or know... | the PPC VM definition of operand loading / saving and the Move VOP
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!VM")
(define-move-fun (load-immediate 1... |
21912adac69b40c19fbba3ab077d5ffeddf23395e06f72acbc4f584b7aba5a1c | haskell-mafia/tinfoil | Constraints.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NoImplicitPrelude #
# LANGUAGE GeneralizedNewtypeDeriving #
This module contains constraints on message lengths and message counts
which apply to AES256 - GCM as implemented in tinfoil . The constraints
are mostly the same as the recommendations in
< dx.doi.org/10.... | null | https://raw.githubusercontent.com/haskell-mafia/tinfoil/f46b2ea0b9984ac9a97073932b5584ce0a2e0554/src/Tinfoil/AEAD/AESGCM/Constraints.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
Number of bytes. Assumes that bytes are equivalent to octets; this is
|
Count (number) of messages.
|
Converts blocks to bytes (octets).
|
this, so we use the literal.
|
Upper bound on number of messages encrypted with the same key. This is
due to the length of the coun... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE GeneralizedNewtypeDeriving #
This module contains constraints on message lengths and message counts
which apply to AES256 - GCM as implemented in tinfoil . The constraints
are mostly the same as the recommendations in
< dx.doi.org/10.6028/NIST.SP.800-38D NIST Special P... |
45c490420983809324eb895d10606f14253a459a6cddb94f3f5fc24c3532ca2d | DougHamil/threeagent | entity_lifecycle_test.cljs | (ns threeagent.e2e.entity-lifecycle-test
(:require [cljs.test :refer-macros [deftest is use-fixtures]]
["three" :as three]
[threeagent.e2e.fixture :as fixture]
[threeagent.entity :refer [IEntityType IUpdateableEntityType]]
[threeagent.core :as th]))
(defonce canvas (at... | null | https://raw.githubusercontent.com/DougHamil/threeagent/8f8b158bcbbf484b41d6f4a87436ce6f81ca7c04/src/test/threeagent/e2e/entity_lifecycle_test.cljs | clojure | Ensure the object was not recreated | (ns threeagent.e2e.entity-lifecycle-test
(:require [cljs.test :refer-macros [deftest is use-fixtures]]
["three" :as three]
[threeagent.e2e.fixture :as fixture]
[threeagent.entity :refer [IEntityType IUpdateableEntityType]]
[threeagent.core :as th]))
(defonce canvas (at... |
c7d6246a1c96fc46f114d492ff49ae9e44fadbada0f4ee30dffc45c408af592c | markbastian/partsbin | core.clj | (ns partsbin.next.jdbc.core
(:require [partsbin.next.jdbc.alpha :as jdbc]
[next.jdbc :as j]
[next.jdbc.sql :as sql]
[integrant.core :as ig]))
(derive ::connection ::jdbc/connection)
(derive ::datasource ::jdbc/datasource)
(def config
{::connection {:dbtype "h2:mem" :dbname "mem... | null | https://raw.githubusercontent.com/markbastian/partsbin/8dc159327f296c9625d129b5943ec79433019e54/src/partsbin/next/jdbc/core.clj | clojure | (ns partsbin.next.jdbc.core
(:require [partsbin.next.jdbc.alpha :as jdbc]
[next.jdbc :as j]
[next.jdbc.sql :as sql]
[integrant.core :as ig]))
(derive ::connection ::jdbc/connection)
(derive ::datasource ::jdbc/datasource)
(def config
{::connection {:dbtype "h2:mem" :dbname "mem... | |
abb7ec949edd163f4a8914db679ca7a7e8bdb91e61e352902c1c90e4155b52d1 | pleasetrythisathome/bardo | ease.cljc | (ns bardo.ease
(:require [clojure.string :as str]))
(defn interpolator
"canonical definition of a higher order interpolator function"
[f]
(fn [t]
(f t)))
(defn wrap
"useful for wrapping easers in other easers, especially in theading macros"
[f ease]
(interpolator (comp f ease)))
(defn clamp
"clam... | null | https://raw.githubusercontent.com/pleasetrythisathome/bardo/d400efa828d3ccfae5d4f058200bff1fbfd8f66b/src/bardo/ease.cljc | clojure | needed?
adapted from and
and | (ns bardo.ease
(:require [clojure.string :as str]))
(defn interpolator
"canonical definition of a higher order interpolator function"
[f]
(fn [t]
(f t)))
(defn wrap
"useful for wrapping easers in other easers, especially in theading macros"
[f ease]
(interpolator (comp f ease)))
(defn clamp
"clam... |
753510a42711fd9659cf6781af9a037ae53664b1eaffdc4de6717fe88a0af4a7 | astro/prittorrent | model_torrents.erl | -module(model_torrents).
-export([add_torrent/5, get_torrent/1, get_info/1, exists/1, calculate_names_sizes/0]).
-include("../include/model.hrl").
-define(POOL, pool_torrents).
-define(Q(Stmt, Params), model_sup:equery(?POOL, Stmt, Params)).
-define(T(Fun), model_sup:transaction(?POOL, Fun)).
add_torrent(InfoHash, ... | null | https://raw.githubusercontent.com/astro/prittorrent/5173eeb8b00fd9ab7c0d347c9e361052023faebd/apps/model/src/model_torrents.erl | erlang | Maintenance | -module(model_torrents).
-export([add_torrent/5, get_torrent/1, get_info/1, exists/1, calculate_names_sizes/0]).
-include("../include/model.hrl").
-define(POOL, pool_torrents).
-define(Q(Stmt, Params), model_sup:equery(?POOL, Stmt, Params)).
-define(T(Fun), model_sup:transaction(?POOL, Fun)).
add_torrent(InfoHash, ... |
d0df9f7e7c476a86db30603d43fc78aaf8fab31d13dc94215b4c02fea05834c1 | squirrel-prover/squirrel-prover | smt.mli | val literals_unsat :
slow:bool ->
Symbols.table ->
SystemExpr.fset ->
Vars.var list ->
Term.xatom list ->
Term.literals ->
Term.term list ->
bool
| null | https://raw.githubusercontent.com/squirrel-prover/squirrel-prover/d25b6dab570ea0e99915059a67599fd3a38caa8b/src/smt.mli | ocaml | val literals_unsat :
slow:bool ->
Symbols.table ->
SystemExpr.fset ->
Vars.var list ->
Term.xatom list ->
Term.literals ->
Term.term list ->
bool
| |
cbfc1afd395ae685186f4890e2074304782fb66ab129eb6d00dd05227cf79e82 | nick8325/equinox | AtMostOne.hs | module AtMostOne where
import Data.List
type Cost = (String,Integer,Integer)
cost :: Integer -> Cost
cost n = costs !! fromIntegral n
costs :: [Cost]
costs = [ cost' i | i <- [0..] ]
cost' :: Integer -> Cost
cost' n = best $ [ costNaive n, costBinary n ] ++ [ costMatrix n k | k <- [2,3] ]
where
best = minimumBy... | null | https://raw.githubusercontent.com/nick8325/equinox/67351fbc4358fdea931b4c1dfb659f5527b40917/Haskell/Symmetry/AtMostOne.hs | haskell | module AtMostOne where
import Data.List
type Cost = (String,Integer,Integer)
cost :: Integer -> Cost
cost n = costs !! fromIntegral n
costs :: [Cost]
costs = [ cost' i | i <- [0..] ]
cost' :: Integer -> Cost
cost' n = best $ [ costNaive n, costBinary n ] ++ [ costMatrix n k | k <- [2,3] ]
where
best = minimumBy... | |
b3c7dfe75eeca6f6dd7bfbd28fa319927a993776f83c2af748864b2acd69e64e | cardmagic/lucash | srfi-25.scm | ;;; array
1997 - 2001
;; This file is the result of
cat array.scm as-srfi-9-record.scm ix-ctor.scm op-ctor.scm > srfi-25.scm
;;; --- Intro ---
This interface to arrays is based on array.scm of
1993 ( earlier version in the Internet Repository and another
;;; version in SLIB). This is a complete rewrit... | null | https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scheme/srfi/srfi-25.scm | scheme | array
This file is the result of
--- Intro ---
version in SLIB). This is a complete rewrite, to be consistent
with the rest of Scheme and to make arrays independent of lists.
(array? obj)
(make-array shape [obj]) changed arguments
(shape bound ...) new
(array shape obj ...) ... | 1997 - 2001
cat array.scm as-srfi-9-record.scm ix-ctor.scm op-ctor.scm > srfi-25.scm
This interface to arrays is based on array.scm of
1993 ( earlier version in the Internet Repository and another
Some modifications are due to discussion in srfi-25 mailing list .
in arlib though .
is whate... |
d9ec80903134dc6197887a568a375c39bfff7f87b8699a7df649d24b2583d821 | jasonstolaruk/CurryMUD | Make.hs | # LANGUAGE OverloadedStrings , RecordWildCards , ViewPatterns #
module Mud.Data.State.Util.Make ( EntTemplate(..)
, InvId
, MobTemplate(..)
, ObjTemplate(..)
, PlaTemplate(..)
... | null | https://raw.githubusercontent.com/jasonstolaruk/CurryMUD/f9775fb3ede08610f33f27bb1fb5fc0565e98266/lib/Mud/Data/State/Util/Make.hs | haskell | ==================================================
Armor
==================================================
Clothing
==================================================
==================================================
Corpse
==================================================
Entity
==========================... | # LANGUAGE OverloadedStrings , RecordWildCards , ViewPatterns #
module Mud.Data.State.Util.Make ( EntTemplate(..)
, InvId
, MobTemplate(..)
, ObjTemplate(..)
, PlaTemplate(..)
... |
0f036e30fa6c4158d8c9ae5574b96e74b22f81af68fa6da3f961986c9e92ff66 | city41/mario-review | progress_bar.cljs | (ns daisy.client.components.progress-bar
(:require [om.core :as om :include-macros true]
[sablono.core :as html :refer-macros [html]]))
(defn get-display [lp]
""
#_(if (or (= lp 0) (>= lp 1)) "none" ""))
(defn cmp [{:keys [load-progress] :as app} owner]
(reify
om/IRender
(render [_]
... | null | https://raw.githubusercontent.com/city41/mario-review/1b6ebfff88ad778a52865a062204cabb8deed0f9/cropping-app/src/client/progress_bar.cljs | clojure | (ns daisy.client.components.progress-bar
(:require [om.core :as om :include-macros true]
[sablono.core :as html :refer-macros [html]]))
(defn get-display [lp]
""
#_(if (or (= lp 0) (>= lp 1)) "none" ""))
(defn cmp [{:keys [load-progress] :as app} owner]
(reify
om/IRender
(render [_]
... | |
e6beab2e3adaee62601a2e29cefd77f1da4fb330c16ae67e5bdce1f5a3fdeff5 | mrkkrp/megaparsec | LexerSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module Text.Megaparsec.Byte.LexerSpec (spec) where
import Control.Applicative
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as B8
import Data.Char (intToDigit, toUpper)
import Data.Scientific (Scientific, fromFloatDi... | null | https://raw.githubusercontent.com/mrkkrp/megaparsec/a804c07ff3887c3c60ab41bfb3faa71291ef82dc/megaparsec-tests/tests/Text/Megaparsec/Byte/LexerSpec.hs | haskell | # LANGUAGE OverloadedStrings #
--------------------------------------------------------------------------
Helpers
| Parser to run
| Input for the parser
| Result of parsing
| Parser to run
| Input for the parser
| Result of parsing |
module Text.Megaparsec.Byte.LexerSpec (spec) where
import Control.Applicative
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as B8
import Data.Char (intToDigit, toUpper)
import Data.Scientific (Scientific, fromFloatDigits)
import Data.Void
import Data.... |
4e44be69a61bf63dc918197dbb5646c1b5932b961daacadf0682eaca2d3e2f00 | pontarius/pontarius-xmpp | SendReceive.hs | # LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE PatternGuards #
# LANGUAGE LambdaCase #
module Run.SendReceive where
import Control.Applicative
import Control.Concurrent
import Control.Monad
import qualified Data.Configurator as Con... | null | https://raw.githubusercontent.com/pontarius/pontarius-xmpp/08e4a24e6408adb6320b4e73f7be691de060b583/tests/Run/SendReceive.hs | haskell | # LANGUAGE OverloadedStrings #
| reflect messages to their origin
check message responsiveness | # LANGUAGE ScopedTypeVariables #
# LANGUAGE QuasiQuotes #
# LANGUAGE PatternGuards #
# LANGUAGE LambdaCase #
module Run.SendReceive where
import Control.Applicative
import Control.Concurrent
import Control.Monad
import qualified Data.Configurator as Conf
import qualified Data.Configurato... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.