_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 |
|---|---|---|---|---|---|---|---|---|
55c224f2a6dea41bcc9da7dab57d9fd8d4f72786655afead833f1d07fa3619a5 | HaskellEmbedded/data-stm32 | Pins.hs | {-# LANGUAGE Rank2Types #-}
module Ivory.BSP.STM32.Peripheral.UART.Pins
(UARTPins(..)) where
import Ivory.BSP.STM32.Peripheral.GPIO
data UARTPins = UARTPins
{ uartPinTx :: GPIOPin
, uartPinRx :: GPIOPin
}
| null | https://raw.githubusercontent.com/HaskellEmbedded/data-stm32/204aff53eaae422d30516039719a6ec7522a6ab7/templates/STM32/Peripheral/UART/Pins.hs | haskell | # LANGUAGE Rank2Types # |
module Ivory.BSP.STM32.Peripheral.UART.Pins
(UARTPins(..)) where
import Ivory.BSP.STM32.Peripheral.GPIO
data UARTPins = UARTPins
{ uartPinTx :: GPIOPin
, uartPinRx :: GPIOPin
}
|
e7429c350fc389a69de5e58d8ec84933d8aea51810c30a1f11649e312d7c0af8 | boot-clj/boot-new | new_helpers.clj | (ns boot.new-helpers
"The top-level logic for the new task. This namespace is dynamically
loaded into the new task so as to reduce and delay dependencies."
(:require [clojure.string :as str]
[boot.core :as core]
[boot.new.templates :as bnt]
[boot.util :as util]
this is Boot '... | null | https://raw.githubusercontent.com/boot-clj/boot-new/b614968036693285588fdb325fcf224011b16de7/src/boot/new_helpers.clj | clojure | (ns boot.new-helpers
"The top-level logic for the new task. This namespace is dynamically
loaded into the new task so as to reduce and delay dependencies."
(:require [clojure.string :as str]
[boot.core :as core]
[boot.new.templates :as bnt]
[boot.util :as util]
this is Boot '... | |
01c9cdc7a7b38c9bd48f1284dcfe73a4729035ba56794bb15c37b070482b5de3 | cjlarose/de-jong | fa_icon.cljs | (ns de-jong.components.fa-icon
(:require [om.dom :as dom]))
(defn fa-icon [icon]
(dom/i #js { :className (str "fa fa-" icon) } ))
| null | https://raw.githubusercontent.com/cjlarose/de-jong/b627e46e3e3c42ca3fa3cf786218086211a1e6d7/src/de_jong/components/fa_icon.cljs | clojure | (ns de-jong.components.fa-icon
(:require [om.dom :as dom]))
(defn fa-icon [icon]
(dom/i #js { :className (str "fa fa-" icon) } ))
| |
1ea9a03a7ee37cf964a6e76d5941ce40ea46c8ea9579899c7e4e50447ba546bb | Schol-R-LEA/Thelema | tokenizer-test.scm | #!r6rs
(import
(rnrs base (6))
(rnrs r5rs (6))
(srfi :41)
(srfi :64)
(rnrs records syntactic (6))
(rnrs io simple (6))
(bootstrap tokens)
(bootstrap tokenizer))
(test-begin "simple token definition")
(let ((a (make-token "symbol" 'symbol)))
(test-assert (token? a)))
(test-end "simple token definition")
(... | null | https://raw.githubusercontent.com/Schol-R-LEA/Thelema/7ad4b23150ba6eadd841191374e83c4f043b721d/tests/bootstrap/tokenizer-test.scm | scheme | #!r6rs
(import
(rnrs base (6))
(rnrs r5rs (6))
(srfi :41)
(srfi :64)
(rnrs records syntactic (6))
(rnrs io simple (6))
(bootstrap tokens)
(bootstrap tokenizer))
(test-begin "simple token definition")
(let ((a (make-token "symbol" 'symbol)))
(test-assert (token? a)))
(test-end "simple token definition")
(... | |
840774f59d6a2f18935ebbdafa10774293f4b630945ecca27dc9a864be65856c | elaforge/karya | Wayang.hs | Copyright 2015
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
-- | Gender wayang patches.
module User.Elaforge.Instrument.Kontakt.Wayang where
import qualified Cmd.Instrument.Bali as Bali
import qualified Cmd.Instrument.MidiInst as MidiInst
import q... | null | https://raw.githubusercontent.com/elaforge/karya/8ea15e6a5fb57e2f15f8c19836751e315f9c09f2/User/Elaforge/Instrument/Kontakt/Wayang.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
| Gender wayang patches.
- eu - a --- io --- eu - a --- i
--------------------|
---------------------------------------------|
- eu - a --- io --- eu - a --- i
--------------------|
-----------------------... | Copyright 2015
module User.Elaforge.Instrument.Kontakt.Wayang where
import qualified Cmd.Instrument.Bali as Bali
import qualified Cmd.Instrument.MidiInst as MidiInst
import qualified Derive.Args as Args
import qualified Derive.Attrs as Attrs
import qualified Derive.C.Bali.Gangsa as Gangsa
import qualified Derive.C... |
f756cbc3578f4ce030b63d0f32ff23d8e2b23a4f676497e09493add0646943c4 | ucsd-progsys/nate | htmlErrorReport.ml | open EzyUtils
open EzyUtils.Infix
open EzyOcamlmodules
open EzyTypingCoreTypes
open EzyErrors
open Format
let logger = new EzyUtils.Logger.logger "htmlErrorReport"
let template () = format_of_string "
<div>
<span id='reset' onclick='javascript:reset()' class='othererror'>reset</span>
<p class='errorlistparagraph'... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/easyocaml-additional/htmlErrorReport.ml | ocaml | open EzyUtils
open EzyUtils.Infix
open EzyOcamlmodules
open EzyTypingCoreTypes
open EzyErrors
open Format
let logger = new EzyUtils.Logger.logger "htmlErrorReport"
let template () = format_of_string "
<div>
<span id='reset' onclick='javascript:reset()' class='othererror'>reset</span>
<p class='errorlistparagraph'... | |
ae853592c3b50c0cbab26605455cff707857e25258f205a5848dc842d36201e8 | purescript/purescript | Common.hs | module Language.PureScript.Sugar.Operators.Common where
import Prelude
import Control.Monad.State
import Control.Monad.Except
import Data.Either (rights)
import Data.Functor.Identity
import Data.List (sortOn)
import Data.Maybe (mapMaybe, fromJust)
import qualified Data.List.NonEmpty as NEL
import qualified Data.Map ... | null | https://raw.githubusercontent.com/purescript/purescript/02bd6ae60bcd18cbfa892f268ef6359d84ed7c9b/src/Language/PureScript/Sugar/Operators/Common.hs | haskell | Generating a good error message involves a bit of work here, as the parser
can't provide one for us.
We examine the expression chain, plucking out the operators and then
grouping them by shared precedence, then if any of the following conditions
are met, we have something to report:
1. any of the groups have m... | module Language.PureScript.Sugar.Operators.Common where
import Prelude
import Control.Monad.State
import Control.Monad.Except
import Data.Either (rights)
import Data.Functor.Identity
import Data.List (sortOn)
import Data.Maybe (mapMaybe, fromJust)
import qualified Data.List.NonEmpty as NEL
import qualified Data.Map ... |
b41f2736978b00c2edb15af46dc6bfe35dd430a729393e2cecebc8d0427add37 | stumpwm/stumpwm-contrib | net.lisp | net.lisp
(in-package #:net)
;;; "net" goes here. Hacks and glory await!
;;; Network activity formatter for the mode-line
;;;
Copyright 2009
;;;
;;; Maintainer:
;;;
;; Install formatters.
(add-screen-mode-line-formatter #\l 'net-modeline)
nil means auto . or specify explicitly , i.e. " "
(defvar *net-ipv4*... | null | https://raw.githubusercontent.com/stumpwm/stumpwm-contrib/a7dc1c663d04e6c73a4772c8a6ad56a34381096a/modeline/net/net.lisp | lisp | "net" goes here. Hacks and glory await!
Network activity formatter for the mode-line
Maintainer:
Install formatters.
stuff for parsing /proc/net/route
skip desc
cut off old values | net.lisp
(in-package #:net)
Copyright 2009
(add-screen-mode-line-formatter #\l 'net-modeline)
nil means auto . or specify explicitly , i.e. " "
(defvar *net-ipv4* nil)
(defvar *net-ipv6* nil)
(defvar *net-last-rx* 0)
(defvar *net-last-tx* 0)
(defvar *net-last-time* nil)
(defvar *net-rx* nil)
(defvar *net-... |
3d0228a4de53541ac8b79fcaaa5f636f5fdf3e3c53800c6f40ff11751b1f7ccf | qmuli/qmuli | Main.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Main where
import Control.Lens hiding (view, (.=))
import Control.Monad (forM, void)
import Data.Aeson
import Data.Aeson.Lens
import Data.Default ... | null | https://raw.githubusercontent.com/qmuli/qmuli/6ca147f94642b81ab3978d502397efb60a50215b/examples/cognito-lambda/src/Main.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE ScopedTypeVariables #
module Main where
import Control.Lens hiding (view, (.=))
import Control.Monad (forM, void)
import Data.Aeson
import Data.Aeson.Lens
import Data.Default (def)
import Dat... |
b341c31a48244711f3148bbf421fd990610a73c84cb87bf3a203a9beb19e907d | ocaml/dune | e.ml | let () =
print_endline
"e"
| null | https://raw.githubusercontent.com/ocaml/dune/aa05250c5a8cfa1d59812910a56482ba4b75716e/test/blackbox-tests/test-cases/formatting/feature.t/lang2/default/e.ml | ocaml | let () =
print_endline
"e"
| |
53ea07abfb5abbb200824f9db35629e0f94459cc7950f735d4f8375a1977d887 | weavery/clarc | print.mli | (* This is free and unencumbered software released into the public domain. *)
val print_program_as_bytecode : Format.formatter -> program -> unit
val print_program_as_opcode : Format.formatter -> program -> unit
val print_opcodes : Format.formatter -> opcode list -> unit
val print_opcode : Format.formatter -> opcod... | null | https://raw.githubusercontent.com/weavery/clarc/1fb1c43210f52b4022e7f0ae30b7c7d4a9e7ca01/lib/EVM/print.mli | ocaml | This is free and unencumbered software released into the public domain. |
val print_program_as_bytecode : Format.formatter -> program -> unit
val print_program_as_opcode : Format.formatter -> program -> unit
val print_opcodes : Format.formatter -> opcode list -> unit
val print_opcode : Format.formatter -> opcode -> unit
val to_string : opcode -> string
|
e25fab1d3e73fead039cd1de8cbf38c2f57783fed7259cd399e111e44f7a2837 | shirok/Gauche | srfi-217-test.scm | Copyright ( C ) 2020
;;;
;;; Permission is hereby granted, free of charge, to any person obtaining a
;;; copy of this software and associated documentation files (the
" Software " ) , to deal in the Software without restriction , including
;;; without limitation the rights to use, copy, modify, merge, publish,
... | null | https://raw.githubusercontent.com/shirok/Gauche/fa64f4a42e242d93013283f44785546838235e35/test/include/srfi-217-test.scm | scheme |
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
without limitation the rights to use, copy, modify, merge, publish,
the following conditions:
The above copyright notice and this permission notice shall be included
OR IMPLIED,... | Copyright ( C ) 2020
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , and to
permit persons to whom the Software is furnished to do so , subject to
in all copies or substantial portions of the Software .
THE SOFTWARE ... |
27e5fe24bd5d13746191a0354883ffb9d512d8139eb78fd46a2366873d406d27 | RunOrg/RunOrg | json.mli | (* © 2014 RunOrg *)
type t = Json_type.t =
| Null
| Array of t list
| Object of (string * t) list
| Float of float
| Int of int
| Bool of bool
| String of string
exception Error of string list * string
val error : string -> exn
val to_json : t -> t
val of_json : t -> t
val pack : t -> Pack.Pack.t -... | null | https://raw.githubusercontent.com/RunOrg/RunOrg/b53ee2357f4bcb919ac48577426d632dffc25062/server/json.mli | ocaml | © 2014 RunOrg |
type t = Json_type.t =
| Null
| Array of t list
| Object of (string * t) list
| Float of float
| Int of int
| Bool of bool
| String of string
exception Error of string list * string
val error : string -> exn
val to_json : t -> t
val of_json : t -> t
val pack : t -> Pack.Pack.t -> unit
val unpack : ... |
d020d34fa7882cc031203c786b032e5047fd0d9201d503903cafc549aa0d0af8 | gwkkwg/cl-graph | macros.lisp | ;;;-*- Mode: Lisp; Package: metabang.graph -*-
(in-package #:metabang.graph)
? ? 2006 - 01 - 30 :
;;?? Face it, I have no idea why we need this anymore... but i'm sure we do
(defmacro with-changing-vertex ((vertex) &body body)
"This is used to maintain consistency when changing the value of vertex elements while ... | null | https://raw.githubusercontent.com/gwkkwg/cl-graph/3cb786797b24883d784b7350e7372e8b1e743508/dev/macros.lisp | lisp | -*- Mode: Lisp; Package: metabang.graph -*-
?? Face it, I have no idea why we need this anymore... but i'm sure we do |
(in-package #:metabang.graph)
? ? 2006 - 01 - 30 :
(defmacro with-changing-vertex ((vertex) &body body)
"This is used to maintain consistency when changing the value of vertex elements while iterating over the vertexes..."
(with-variables (v g)
`(let* ((,v ,vertex)
(,g (graph ,v)))
(dele... |
1c0491ba93c170db84fb1d60e75349d9959a5f91999fb581eeea89f57e8ce01f | meta-ex/ignite | prophet.clj | (ns meta-ex.prophet
(:use [overtone.live]
[meta-ex.keyboard]
[meta-ex.kit.mixer])
(:require [meta-ex.kit.timing :as tim]))
(defsynth prophet2
"The Prophet Speaks (page 2)
Dark and swirly, this synth uses Pulse Width Modulation (PWM) to
create a timbre which continually moves around. This e... | null | https://raw.githubusercontent.com/meta-ex/ignite/b9b1ed7ae2fa01d017c23febabb714a6389a98dd/src/meta_ex/prophet.clj | clojure | (ns meta-ex.prophet
(:use [overtone.live]
[meta-ex.keyboard]
[meta-ex.kit.mixer])
(:require [meta-ex.kit.timing :as tim]))
(defsynth prophet2
"The Prophet Speaks (page 2)
Dark and swirly, this synth uses Pulse Width Modulation (PWM) to
create a timbre which continually moves around. This e... | |
8da0536e1c337ad28319b90529229b4992a2211fcd0d99d280d0033ec4fc5498 | OCamlPro/freeton_wallet | main.ml | (**************************************************************************)
(* *)
Copyright ( c ) 2022 OCamlPro SAS
(* *)
(* All right... | null | https://raw.githubusercontent.com/OCamlPro/freeton_wallet/c87d75a2b652a83dad143fc43a4d5535187be58b/src/ft/main.ml | ocaml | ************************************************************************
All rights reserved.
This file is distributed u... | Copyright ( c ) 2022 OCamlPro SAS
Public License version 2.1 , with the special exception on linking
let () = Freeton_wallet_lib.Main.main ()
|
69889aa08e5ce71daa925e2812bf56931cfff78fd0037fa333959327fe2f27c6 | racket/macro-debugger | regression.rkt | #lang racket/base
(require rackunit)
(require macro-debugger/model/debug
macro-debugger/model/steps
macro-debugger/model/stx-util
"../test-setup.rkt")
(provide regression-tests)
(define regression-tests
(test-suite "Regression tests"
Fixed 9/2006 : mismatched binding+bound variables
... | null | https://raw.githubusercontent.com/racket/macro-debugger/d4e2325e6d8eced81badf315048ff54f515110d5/macro-debugger/tests/macro-debugger/tests/regression.rkt | racket | Error in module (pass1)
Fixed 11/13/2006: lifting in module
problem seems to come from define-syntax -> letrec-syntaxes+values
transformation, undoes expansion of srhss (so rename fails) | #lang racket/base
(require rackunit)
(require macro-debugger/model/debug
macro-debugger/model/steps
macro-debugger/model/stx-util
"../test-setup.rkt")
(provide regression-tests)
(define regression-tests
(test-suite "Regression tests"
Fixed 9/2006 : mismatched binding+bound variables
... |
493ee24529ed98f3ad856ad9f9fb9f485cf54841385a30a34a3a06182a3e8ad3 | namin/reflection-schemes | load_lib.scm | (load "utils.scm")
(load "os.scm")
(load "lang.scm")
(load "metalang.scm")
(load "tower.scm")
(load "metaenvtower.scm")
(load "metatower.scm")
| null | https://raw.githubusercontent.com/namin/reflection-schemes/d3fd61aa7edc8af5f7f2c9783b4e3c5356cd2bd5/02-toyos-failed-towers/load_lib.scm | scheme | (load "utils.scm")
(load "os.scm")
(load "lang.scm")
(load "metalang.scm")
(load "tower.scm")
(load "metaenvtower.scm")
(load "metatower.scm")
| |
1aa33d0f2f16511e2310140f58be6ad93fbf9900f418cc6429f65e021afbe4e4 | gonzojive/elephant | serializer2.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;
;;; serializer2.lisp -- convert Lisp data to/from byte arrays
;;;
By , common - lisp net >
Adapted from serializer1 by < >
;;;
;;; part of
;;;
Elephant : an object - oriented database for Common Lisp
;;;
Copyright ( c ) 2004 by and... | null | https://raw.githubusercontent.com/gonzojive/elephant/b29a012ab75ccea2fc7fc4f1e9d5e821f0bd60bf/src/elephant/serializer2.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
serializer2.lisp -- convert Lisp data to/from byte arrays
part of
<> <>
Elephant users are granted the rights to distribute and use this software
(), also known as the LLGPL.
make-oid-pair
oid-pair
oid-pair-left
oid-pair-right
Constants
Save consta... | By , common - lisp net >
Adapted from serializer1 by < >
Elephant : an object - oriented database for Common Lisp
Copyright ( c ) 2004 by and
Portions Copyright ( c ) 2005 - 2007 by and
< common - lisp net > < ieslick common - lisp net >
as governed by the terms of the Lisp Lesser GNU Publ... |
8a1420578dffe6d749d2da35e9d39b341309570c64f0c65e1d3f1c336e73c9a8 | abdulapopoola/SICPBook | Ex2.19.scm | #lang planet neil/sicp
(define us-coins (list 50 25 10 5 1))
(define uk-coins (list 100 50 20 10 5 2 1 0.5))
(define (cc amount coin-values)
(cond ((= amount 0) 1)
((or (< amount 0) (no-more? coin-values)) 0)
(else
(+ (cc amount
(except-first-denomination coin-values))
... | null | https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%202/2.2/Ex2.19.scm | scheme | Order does not matter as all combinations are evaluated recursively | #lang planet neil/sicp
(define us-coins (list 50 25 10 5 1))
(define uk-coins (list 100 50 20 10 5 2 1 0.5))
(define (cc amount coin-values)
(cond ((= amount 0) 1)
((or (< amount 0) (no-more? coin-values)) 0)
(else
(+ (cc amount
(except-first-denomination coin-values))
... |
172bb14ec260633deb4c032f79393a8646bd1278595b9215a81d86e18030c4d5 | Beluga-lang/Beluga | coverage.ml | open Support.Equality
* Coverage checker
@author
@author Brigitte Pientka
*)
open Support
module F = Fun
module Comp = Syntax.Int.Comp
module LF = Syntax.Int.LF
module Loc = Syntax.Loc
module Types = Store.Cid.Typ
module Const = Store.Cid.Term
module S = Substitution
module U = Unify.EmptyTrail
mo... | null | https://raw.githubusercontent.com/Beluga-lang/Beluga/520c41534820e12a52d640f3151480e790baa17e/src/core/coverage.ml | ocaml | ******************************************************************************
Coverage problem
indicates if % not appeared after ``case...of''
type and context of scrutinee
The normal LF object begin analyzed by the case.
This is used as the initial term to split on in
order to avoid considering cer... | open Support.Equality
* Coverage checker
@author
@author Brigitte Pientka
*)
open Support
module F = Fun
module Comp = Syntax.Int.Comp
module LF = Syntax.Int.LF
module Loc = Syntax.Loc
module Types = Store.Cid.Typ
module Const = Store.Cid.Term
module S = Substitution
module U = Unify.EmptyTrail
mo... |
7a52257c8117ea3b788a451ce9ebaa6379b92dce0997c0dc3c5205bc8de39ac8 | serefayar/ayatori | service.clj | (ns example.service
(:require [reitit.ring :as ring]
[ring.util.response :as resp]
[ring.adapter.jetty :as jetty]
[clj-http.client :as client]
[muuntaja.core :as m]
[reitit.coercion.spec]
[reitit.ring.coercion :as rrc]
[reitit.ring.mi... | null | https://raw.githubusercontent.com/serefayar/ayatori/4ae80d64439850b7e515526554d9ff29ee078fc9/examples/service2/src/example/service.clj | clojure | (ns example.service
(:require [reitit.ring :as ring]
[ring.util.response :as resp]
[ring.adapter.jetty :as jetty]
[clj-http.client :as client]
[muuntaja.core :as m]
[reitit.coercion.spec]
[reitit.ring.coercion :as rrc]
[reitit.ring.mi... | |
ab0566b5e4dacff6a342dc7388e4d3f17134d86df86fa8638d23cbc61239156a | ghc/ghc | Monad.hs | # LANGUAGE CPP #
# LANGUAGE DeriveFunctor #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
# OPTIONS_GHC -Wno - orphans #
| Monadic definitions for th... | null | https://raw.githubusercontent.com/ghc/ghc/c6432eacdac8e8fd135e52b2fb51bcb43b6913c3/compiler/GHC/Tc/Solver/Monad.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE RankNTypes #
Tracing etc
Evidence creation and transformation
Getting the environments
The Model
Inert Safe Haskell safe-overlap failures
Inert solved dictionaries
Irreds
The family application cache
Instantiation
MetaTyVars
References
Misc
if the whole instance matcher s... | # LANGUAGE CPP #
# LANGUAGE DeriveFunctor #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
# OPTIONS_GHC -Wno - orphans #
| Monadic definitions for the constraint solver
module GHC.Tc.Solver.Monad (
The ... |
46d6fe909c5492dcbd8e919b292f6023e8b0b0928885e9584ffb2c5d7b3e1a9d | AbstractMachinesLab/caramel | compl.ml | open Import
module Resolve = struct
type t = CompletionParams.t
let uri (t : t) = Uri.t_of_yojson (`String t.textDocument.uri)
let yojson_of_t = CompletionParams.yojson_of_t
let t_of_yojson = CompletionParams.t_of_yojson
let of_completion_item (ci : CompletionItem.t) =
match ci.data with
| Some j... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/src/compl.ml | ocaml | * [prefix_of_position ~short_path source position] computes prefix before
given [position].
@param short_path determines whether we want full prefix or cut at ["."],
e.g. [List.m<cursor>] returns ["m"] when [short_path] is set vs ["List.m"]
when not.
@return prefix of [position] in [source] and its... | open Import
module Resolve = struct
type t = CompletionParams.t
let uri (t : t) = Uri.t_of_yojson (`String t.textDocument.uri)
let yojson_of_t = CompletionParams.yojson_of_t
let t_of_yojson = CompletionParams.t_of_yojson
let of_completion_item (ci : CompletionItem.t) =
match ci.data with
| Some j... |
c1f54840dc5313d9a9e43ea881294adae96ffa80750ae405a6de6abf4b099ec1 | TyOverby/mono | main.ml | open! Core
open! Bonsai_web
module PRT_example = Bonsai_partial_render_table_example
let (_ : _ Start.Handle.t) =
let input = Value.return (PRT_example.Row.many_random 100_000) in
let component = PRT_example.component input in
Start.start Start.Result_spec.just_the_view ~bind_to_element_with_id:"app" component
;... | null | https://raw.githubusercontent.com/TyOverby/mono/9f361de248f67441dd1486419ba19044b6fa4fad/app/bonsai-examples/partial_render_table/bin/main.ml | ocaml | open! Core
open! Bonsai_web
module PRT_example = Bonsai_partial_render_table_example
let (_ : _ Start.Handle.t) =
let input = Value.return (PRT_example.Row.many_random 100_000) in
let component = PRT_example.component input in
Start.start Start.Result_spec.just_the_view ~bind_to_element_with_id:"app" component
;... | |
50686976ea91723f9ecc9675e82515f0f75267d024a51501a9386b4a93778dc5 | rescript-lang/rescript-compiler | lam_primitive.ml | Copyright ( C ) 2018 , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later versi... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/7dc4441661f56210e2a6f9f44d623aa5c7eb9b6a/jscomp/core/lam_primitive.ml | ocaml | Operations on heap blocks
could have field info at least for record
External call
Exceptions
Float operations
[f; [...]]
String operations
Array operations
Test if the argument is a block or an immediate integer
Test if the (integer) argument is outside an interval
Compile time constants
no info ... | Copyright ( C ) 2018 , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later versi... |
03e3a849ee89cec3ea85282eac196aabcd607e5a18951598f0ced0f038af7212 | dybber/fcl | Instantiate.hs | module FCL.Instantiate (
instantiate,
InstantiateError(..)
) where
import FCL.Core.Polytyped
import FCL.Core.PolyLevel
import FCL.Substitution
-------------------
-- Instantiation --
-------------------
data InstantiateError = TypeMismatch Type Type
| LevelMismatch Level Level
... | null | https://raw.githubusercontent.com/dybber/fcl/e794a4b9d3ab6207fbe89fcddaafe97ae0d379dd/src/FCL/Instantiate.hs | haskell | -----------------
Instantiation --
----------------- | module FCL.Instantiate (
instantiate,
InstantiateError(..)
) where
import FCL.Core.Polytyped
import FCL.Core.PolyLevel
import FCL.Substitution
data InstantiateError = TypeMismatch Type Type
| LevelMismatch Level Level
deriving (Show, Eq)
getLvlSubstitutions :: Level ->... |
bd1e9c3d75bca4d8509f659f09c58bd03095a3c92b1b09b18d39a8083266706e | mzp/ocaml-hoogle | base.mli | external ( @@ ) : ('a -> 'b) -> 'a -> 'b = "%apply"
* 's ( $ )
external ( +> ) : 'a -> ('a -> 'b) -> 'b = "%revapply"
(** F#'s (|>) *)
val ( $ ) : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b
* 's ( . )
val ( !$ ) : 'a Lazy.t -> 'a
* Lazy.force
external id : 'a -> 'a = "%identity"
(** Identity *)
val uncurry : ('a * 'b... | null | https://raw.githubusercontent.com/mzp/ocaml-hoogle/dbfb2e970d65e41936baa0ba51c7f7596cc6c369/base.mli | ocaml | * F#'s (|>)
* Identity
* List.assoc with option
* Format for lists
* Format for lists in OCaml style [ a; b; ... ] | external ( @@ ) : ('a -> 'b) -> 'a -> 'b = "%apply"
* 's ( $ )
external ( +> ) : 'a -> ('a -> 'b) -> 'b = "%revapply"
val ( $ ) : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b
* 's ( . )
val ( !$ ) : 'a Lazy.t -> 'a
* Lazy.force
external id : 'a -> 'a = "%identity"
val uncurry : ('a * 'b -> 'c) -> 'a -> 'b -> 'c
val cur... |
a637fdd3dc339d74d6da772e6c06a911d3e27de695b98bde9258111247711306 | MaxBittker/cljsconlang | prod.cljs | (ns conlang.prod
(:require [conlang.core :as core]))
;;ignore println statements in prod
(set! *print-fn* (fn [& _]))
(core/init!)
| null | https://raw.githubusercontent.com/MaxBittker/cljsconlang/9410cc5f3a9f298e6527054f3cede860ba9d82f0/env/prod/cljs/conlang/prod.cljs | clojure | ignore println statements in prod | (ns conlang.prod
(:require [conlang.core :as core]))
(set! *print-fn* (fn [& _]))
(core/init!)
|
86c964c941504c50514c4f4916f836d93492a1e0374a8c111748108bed5e7893 | larrychristensen/orcpub | constants.cljc | (ns orcpub.constants)
(def header-height 227)
| null | https://raw.githubusercontent.com/larrychristensen/orcpub/e83995857f7e64af1798009a45a0b03abcd3a4be/src/cljc/orcpub/constants.cljc | clojure | (ns orcpub.constants)
(def header-height 227)
| |
1554e43a87d74f1fac9d6bb4bc51f4eae192cd6ab8e23762ab93bcb575401760 | mfoemmel/erlang-otp | CosNaming_NamingContext_NotEmpty.erl | %%------------------------------------------------------------
%%
%% Implementation stub file
%%
Target : CosNaming_NamingContext_NotEmpty
Source : /net / isildur / ldisk / daily_build / otp_prebuild_r13b02.2009 - 09 - 21_11 / otp_src_R13B02 / lib / orber / COSS / CosNaming / cos_naming.idl
%% IC vsn: 4.2.22
%%
%... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/orber/COSS/CosNaming/CosNaming_NamingContext_NotEmpty.erl | erlang | ------------------------------------------------------------
Implementation stub file
IC vsn: 4.2.22
This file is automatically generated. DO NOT EDIT IT.
------------------------------------------------------------
returns type code
returns id
returns name | Target : CosNaming_NamingContext_NotEmpty
Source : /net / isildur / ldisk / daily_build / otp_prebuild_r13b02.2009 - 09 - 21_11 / otp_src_R13B02 / lib / orber / COSS / CosNaming / cos_naming.idl
-module('CosNaming_NamingContext_NotEmpty').
-ic_compiled("4_2_22").
-include("CosNaming_NamingContext.hrl").
-export... |
0bf3d9d8f04f421133a8535391dd38cb3564e8cdca2e8da972c04678486a76a4 | exercism/common-lisp | space-age-test.lisp | Ensures that space-age.lisp and the testing library are always loaded
(eval-when (:compile-toplevel :load-toplevel :execute)
(load "space-age")
(quicklisp-client:quickload :fiveam))
;; Defines the testing package with symbols from space-age and FiveAM in scope
;; The `run-tests` function is exported for use by b... | null | https://raw.githubusercontent.com/exercism/common-lisp/6967e9224b5eeda3c50c9771d54cbfcfce64ad91/exercises/practice/space-age/space-age-test.lisp | lisp | Defines the testing package with symbols from space-age and FiveAM in scope
The `run-tests` function is exported for use by both the user and test-runner
Enter the testing package
Define and enter a new FiveAM test-suite | Ensures that space-age.lisp and the testing library are always loaded
(eval-when (:compile-toplevel :load-toplevel :execute)
(load "space-age")
(quicklisp-client:quickload :fiveam))
(defpackage :space-age-test
(:use :cl :fiveam)
(:export :run-tests))
(in-package :space-age-test)
(def-suite* space-age-suite... |
a73b3b849eaa8141421aace8ab1d3d5ac6fd966514df8d5fb433a67f4d4e30fe | fortytools/holumbus | Utils.hs | -- ----------------------------------------------------------------------------
|
Module : Holumbus . Common . : Copyright ( C ) 2008
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.1
Some nice functions , needed everyw... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/distribution/source/Holumbus/Common/Utils.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
, lookupList
, cutMaybePair
, filterBlanks
, prettyResultLine
exception handling for all exceptions
import qualified Data.Map as Map
import System.... |
|
Module : Holumbus . Common . : Copyright ( C ) 2008
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.1
Some nice functions , needed everywhere .
Module : Holumbus.Common.Utils
Copyright : Copyright (C) 2008... |
321e21573ca7a0e1f30a99bde762b472b96c5a58e8e89811e674173f50b5b832 | destenson/ConsenSys--Fae | Types.hs | module Blockchain.Fae.Internal.Types where
import Blockchain.Fae.Internal.Crypto
import Blockchain.Fae.Internal.Lens
import Control.Applicative
import Control.Exception.Safe
import Control.Monad
import Control.Monad.Fix
import Control.Monad.State
import Data.Dynamic
import Data.Functor
import Data.IORef.Lifted
impo... | null | https://raw.githubusercontent.com/destenson/ConsenSys--Fae/9ba10ed3299f517ac5e44836ea8ee984dd41d0f4/src/Blockchain/Fae/Internal/Types.hs | haskell | We use the IORef to implement state commits when handling exceptions
:: accumT -> Fae valT
:: argT -> accumT -> accumT
:: accumT
all transitive dependencies
privT
pubT
tokT
Signature -> EscrowID tokT pubT privT | module Blockchain.Fae.Internal.Types where
import Blockchain.Fae.Internal.Crypto
import Blockchain.Fae.Internal.Lens
import Control.Applicative
import Control.Exception.Safe
import Control.Monad
import Control.Monad.Fix
import Control.Monad.State
import Data.Dynamic
import Data.Functor
import Data.IORef.Lifted
impo... |
c78e7e21b34d42a5d3bbf30f5a9e63bd41343500a96e06673b055839fe28430c | acl2/acl2 | utilities@useless-runes.lsp | (ACL2-PC::REPEAT-UNTIL-DONE)
(ACL2-PC::CLAIM-SIMPLE)
(ACL2-PC::PRO-OR-SKIP)
(ACL2-PC::DROP-OR-SKIP)
(ACL2-PC::RETAIN-OR-SKIP)
(ACL2-PC::INSTANTIATE)
(ACL2-PC::SPLIT-IN-THEORY)
(ACL2-PC::BY)
(ACL2-PC::CG-OR-SKIP)
(PKGP)
(ACL2S::GEN-ACL2S-LOCAL-FN)
(ACL2S::BEST-PACKAGE)
(ACL2S::BEST-PACKAGE-SYMBL-LIST
(4 4 (:REWRITE DEF... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/acl2s/.sys/utilities%40useless-runes.lsp | lisp | (ACL2-PC::REPEAT-UNTIL-DONE)
(ACL2-PC::CLAIM-SIMPLE)
(ACL2-PC::PRO-OR-SKIP)
(ACL2-PC::DROP-OR-SKIP)
(ACL2-PC::RETAIN-OR-SKIP)
(ACL2-PC::INSTANTIATE)
(ACL2-PC::SPLIT-IN-THEORY)
(ACL2-PC::BY)
(ACL2-PC::CG-OR-SKIP)
(PKGP)
(ACL2S::GEN-ACL2S-LOCAL-FN)
(ACL2S::BEST-PACKAGE)
(ACL2S::BEST-PACKAGE-SYMBL-LIST
(4 4 (:REWRITE DEF... | |
782d805c646b7433f58d753b89d26995c46b4a66bf610ce2fbdd96d0d32ee282 | Clozure/ccl-tests | ceiling.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Tue Aug 19 06:50:44 2003
;;;; Contains: Tests of CEILING
(in-package :cl-test)
(compile-and-load "numbers-aux.lsp")
(compile-and-load "ceiling-aux.lsp")
(deftest ceiling.error.1
(signals-error (ceiling) program-error)
t)
(deftest ceiling.error.2
(signals-e... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/ceiling.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of CEILING
To add: tests that involve adding/subtracting EPSILON constants
(suitably scaled) to floated integers. | Author :
Created : Tue Aug 19 06:50:44 2003
(in-package :cl-test)
(compile-and-load "numbers-aux.lsp")
(compile-and-load "ceiling-aux.lsp")
(deftest ceiling.error.1
(signals-error (ceiling) program-error)
t)
(deftest ceiling.error.2
(signals-error (ceiling 1.0 1 nil) program-error)
t)
(deftest ... |
737a05134faa7336263260544efe477ef946bb7aaa2cb1ed6cd5574f6da24d1a | adventuring/tootsville.net | world.lisp | ;;;; -*- lisp -*-
;;;
src / world.lisp is part of
;;;
Copyright © 2008 - 2017 Bruce - Robert Pocock ; © 2018 - 2021 The
Corporation for Inter - World Tourism and Adventuring ( ciwta.org ) .
;;;
This program is Free Software : you can redistribute it and/or
modify it under the term... | null | https://raw.githubusercontent.com/adventuring/tootsville.net/985c11a91dd1a21b77d7378362d86cf1c031b22c/src/world.lisp | lisp | -*- lisp -*-
© 2018 - 2021 The
either version 3 of
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more det... | src / world.lisp is part of
Corporation for Inter - World Tourism and Adventuring ( ciwta.org ) .
This program is Free Software : you can redistribute it and/or
modify it under the terms of the GNU Affero General Public License
the License , or ( at your option ) any later version .
You shoul... |
39317f8c05a812c15ed79333a4d014ed3f219e7e76df6827ec59ea1841a6ef80 | potapenko/playphraseme-site | delete_user_permission.clj | (ns playphraseme.api.route-functions.permission.delete-user-permission
(:require [playphraseme.api.queries.user.user-permission :as user-prm]
[ring.util.http-response :as respond]))
(defn delete-user-permission
"Remove user permission"
[id permission]
(let [deleted-permission (user-prm/delete-user-... | null | https://raw.githubusercontent.com/potapenko/playphraseme-site/d50a62a6bc8f463e08365dca96b3a6e5dde4fb12/src/clj/playphraseme/api/route_functions/permission/delete_user_permission.clj | clojure | (ns playphraseme.api.route-functions.permission.delete-user-permission
(:require [playphraseme.api.queries.user.user-permission :as user-prm]
[ring.util.http-response :as respond]))
(defn delete-user-permission
"Remove user permission"
[id permission]
(let [deleted-permission (user-prm/delete-user-... | |
de7fd24db60d99b06dc4cbca14af83e59bb21ec3ca623f3abf2946a57113b37c | phantomics/seed | package.lisp | package.lisp
(defpackage #:seed.foreign.browser-spec.style.base
(:export #:foundational-browser-style-base)
(:use #:cl #:lass))
| null | https://raw.githubusercontent.com/phantomics/seed/f128969c671c078543574395d6b23a1a5f2723f8/seed.foreign.browser-spec.style.base/package.lisp | lisp | package.lisp
(defpackage #:seed.foreign.browser-spec.style.base
(:export #:foundational-browser-style-base)
(:use #:cl #:lass))
| |
b6b46d1480fe2eeab8b27f6643df2c496079f0b7eec57c41a09501876cbd2b9c | kowainik/smuggler | Loc.hs | module Smuggler.Loc
( showLoc
, showL
, unL
) where
import SrcLoc (GenLocated (L), Located, SrcSpan (RealSrcSpan), srcSpanStartCol, srcSpanStartLine,
unLoc)
| Returns location in the way of : col@.
showLoc :: SrcSpan -> String
showLoc (RealSrcSpan r) = show (srcSpanStartL... | null | https://raw.githubusercontent.com/kowainik/smuggler/b2ddcdad06a270e0b956f2203f9bebcd72301c53/src/Smuggler/Loc.hs | haskell | | Shows 'Located' in brackets.
| Shorter synonim for 'unLoc'. | module Smuggler.Loc
( showLoc
, showL
, unL
) where
import SrcLoc (GenLocated (L), Located, SrcSpan (RealSrcSpan), srcSpanStartCol, srcSpanStartLine,
unLoc)
| Returns location in the way of : col@.
showLoc :: SrcSpan -> String
showLoc (RealSrcSpan r) = show (srcSpanStartL... |
adadb040b5250605ace1fa881a5e5faa1f30d571640f4e4f81f72ddb25705d60 | tiensonqin/lymchat | db.cljs | (ns lymchat.db
(:require [schema.core :as s :include-macros true]
[lymchat.realm :as realm]))
(def NavigationState
{:key s/Keyword
:title s/Str
s/Keyword s/Any})
(def NavigationParentState
{:index s/Int
:routes [NavigationState]})
;; schema of app-db
(def schema {:nav NavigationParentSt... | null | https://raw.githubusercontent.com/tiensonqin/lymchat/824026607d30c12bc50afb06f677d1fa95ff1f2f/src/lymchat/db.cljs | clojure | schema of app-db
new message while in conversation
initial state of app-db
posts
chat
video call | (ns lymchat.db
(:require [schema.core :as s :include-macros true]
[lymchat.realm :as realm]))
(def NavigationState
{:key s/Keyword
:title s/Str
s/Keyword s/Any})
(def NavigationParentState
{:index s/Int
:routes [NavigationState]})
(def schema {:nav NavigationParentState
:cu... |
466526e9fefd70846654bbcbe1dd155ae3968fa914032e8c78023ec092212b67 | jaredly/belt | belt_SortArray.ml | module Int = Belt_SortArrayInt
module String = Belt_SortArrayString
module A = Belt_Array
let rec sortedLengthAuxMore xs prec acc len lt =
if acc >= len
then acc
else
(let v = A.getUnsafe xs acc in
if lt v prec then sortedLengthAuxMore xs v (acc + 1) len lt else acc)
let rec sortedLengthAuxLess xs prec a... | null | https://raw.githubusercontent.com/jaredly/belt/4d07f859403fdbd3fbfc5a9547c6066d657a2131/belt/belt_SortArray.ml | ocaml | module Int = Belt_SortArrayInt
module String = Belt_SortArrayString
module A = Belt_Array
let rec sortedLengthAuxMore xs prec acc len lt =
if acc >= len
then acc
else
(let v = A.getUnsafe xs acc in
if lt v prec then sortedLengthAuxMore xs v (acc + 1) len lt else acc)
let rec sortedLengthAuxLess xs prec a... | |
9e2e488166bf1054ca6cd8c9c991334aca9d6dd73723b5ead1f9c9cd2f623945 | aloiscochard/sarsi | SBTSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module Codec.Sarsi.SBTSpec (spec) where
import Codec.Sarsi (Level (..), Location (..), Message (..))
import qualified Codec.Sarsi.SBT.Machine as SBT
import qualified Codec.Sarsi.Scala as Scala
import Codec.Sarsi.Spec (parsingFile)
import Data.Attoparsec.Text.Machine (streamParser)
i... | null | https://raw.githubusercontent.com/aloiscochard/sarsi/6d4ed5077d4e10b626accb7b2952b6f41fd3dd75/tests/Codec/Sarsi/SBTSpec.hs | haskell | # LANGUAGE OverloadedStrings #
- <~ (auto traceShowId) - |
module Codec.Sarsi.SBTSpec (spec) where
import Codec.Sarsi (Level (..), Location (..), Message (..))
import qualified Codec.Sarsi.SBT.Machine as SBT
import qualified Codec.Sarsi.Scala as Scala
import Codec.Sarsi.Spec (parsingFile)
import Data.Attoparsec.Text.Machine (streamParser)
import Data.Machine ((<~))
import Sa... |
ee4499757b30a902ff3e1df993e38646228b07051b2cf12d58959753d1aa898b | celsobonutti/real_world_ocaml | counter.ml | open Base
type t = (string, int, String.comparator_witness) Map.t
let empty = Map.empty (module String)
let to_list t = Map.to_alist t
let touch counts line =
Map.update counts line ~f:(function
| None -> 1
| Some x -> x + 1)
type median =
| Median of string
| Before_and_after of string * string
let... | null | https://raw.githubusercontent.com/celsobonutti/real_world_ocaml/b829900f33575deb9a358f6defff7c949071be0e/ch4/counter.ml | ocaml | open Base
type t = (string, int, String.comparator_witness) Map.t
let empty = Map.empty (module String)
let to_list t = Map.to_alist t
let touch counts line =
Map.update counts line ~f:(function
| None -> 1
| Some x -> x + 1)
type median =
| Median of string
| Before_and_after of string * string
let... | |
801cb1271b9ffde1460498decd29e6927f37bfa3967a2c6cb7f15e7f5a7088c3 | clojure-interop/aws-api | CapacityManager.clj | (ns com.amazonaws.util.CapacityManager
"Manages capacity of a finite resource. Capacity can be acquired and
released."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.util CapacityManager]))
(defn ->capacity-manager
"Constructor.
Creates a CapacityManager.
max-capacity - maxim... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.util/src/com/amazonaws/util/CapacityManager.clj | clojure | (ns com.amazonaws.util.CapacityManager
"Manages capacity of a finite resource. Capacity can be acquired and
released."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.util CapacityManager]))
(defn ->capacity-manager
"Constructor.
Creates a CapacityManager.
max-capacity - maxim... | |
b4996079b63b0d2aee623883416828584acad0d2ac500a60f18ade13675efd88 | openeuler-mirror/secGear | GentrustPL.ml |
* Copyright ( c ) IPADS@SJTU 2021 . Modification to support ( RISC - V TEE )
* Copyright ( c ) Huawei Technologies Co. , Ltd. 2020 . All rights reserved .
* secGear is licensed under the Mulan PSL v2 .
* You can use this software according to the terms and conditions of the Mulan PSL v2 .
* You may obta... | null | https://raw.githubusercontent.com/openeuler-mirror/secGear/1f5e804c28732c58b283ed8667688cf809bfc165/tools/codegener/penglai/GentrustPL.ml | ocaml |
* Copyright ( c ) IPADS@SJTU 2021 . Modification to support ( RISC - V TEE )
* Copyright ( c ) Huawei Technologies Co. , Ltd. 2020 . All rights reserved .
* secGear is licensed under the Mulan PSL v2 .
* You can use this software according to the terms and conditions of the Mulan PSL v2 .
* You may obta... | |
7dbff6ceb5e0bb3037ba53d7d6f934e3f5652cde77fd9e082b3f410d113529a0 | karlhof26/gimp-scheme | FU_effects_fog.scm | FU_effects_fog.scm
version 2.8 [ gimphelp.org ]
last modified / tested by
02/14/2014 on GIMP-2.8.10
; 03/09/2020 on GIMP-2.10.20
;
02/14/2014 - convert to RGB if needed , option to merge layers
;==============================================================
;
; Installation:
; This script sh... | null | https://raw.githubusercontent.com/karlhof26/gimp-scheme/2a1258bc3771287f83bd0ae94b6e7341a7bb4371/FU_effects_fog.scm | scheme | 03/09/2020 on GIMP-2.10.20
==============================================================
Installation:
This script should be placed in the user or system-wide script folder.
Windows Vista/7/8)
or
or
C:\Documents and Settings\yourname\.gimp-2.8\scripts
Linux
or
Linux system-wide
... | FU_effects_fog.scm
version 2.8 [ gimphelp.org ]
last modified / tested by
02/14/2014 on GIMP-2.8.10
02/14/2014 - convert to RGB if needed , option to merge layers
C:\Program Files\GIMP 2\share\gimp\2.0\scripts
C:\Users\YOUR - NAME\.gimp-2.8\scripts
Windows XP
C:\Program Files\GIMP 2... |
ec942d734e8722abf4d43fe6ca27495e0154b47b84b0808a61f44767a0347451 | patricoferris/ocaml-multicore-monorepo | caqti_type.ml | Copyright ( C ) 2017 - -2021 Petter A. Urkedal < >
*
* 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 3 of the License , or ( at your
* option ) any la... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/ocaml-caqti/lib/caqti_type.ml | ocaml | Copyright ( C ) 2017 - -2021 Petter A. Urkedal < >
*
* 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 3 of the License , or ( at your
* option ) any la... | |
4d58852b688cd1463a456bb26f46f634868c062cc6bbbb64f91b42966153e1d9 | racket/htdp | type-env-ext.rkt | #lang racket/base
(require typed-racket/utils/utils
(prefix-in ce: test-engine/racket-tests)
(for-syntax
racket/base syntax/parse
typed-racket/utils/tc-utils
typed-racket/env/init-envs
typed-racket/rep/filter-rep
typed-racket/rep/object-rep
... | null | https://raw.githubusercontent.com/racket/htdp/f17d911ca7be7e17fd0e3213653019060fc843fc/htdp-lib/typed/test-engine/type-env-ext.rkt | racket | test* | #lang racket/base
(require typed-racket/utils/utils
(prefix-in ce: test-engine/racket-tests)
(for-syntax
racket/base syntax/parse
typed-racket/utils/tc-utils
typed-racket/env/init-envs
typed-racket/rep/filter-rep
typed-racket/rep/object-rep
... |
f54f9d4c706c544672634a54fea2a12a7b0cd17a26b5c2e59648676a723a06a6 | ejgallego/coq-serapi | sertop_async.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ejgallego/coq-serapi/dd9e3fbf7faaf3bf365fa3eff134641055151a9b/sertop/sertop_async.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
************************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Copyright 2016 MINES ParisT... |
8234e1a92c248b558db96485ce9e3e6b519bccd0da06380639068a81b65c8109 | langston-barrett/CoverTranslator | AgdaQueue.hs | module AgdaQueue where
import Property
import PropPrelude
type Queue a = [a]
empty = []
add x q = q ++ [x]
isEmpty q = null q
front (x:q) = x
remove (x:q) = q
type QueueI a = ([a], [a])
emptyI = ([],[])
addI x (f,b) = flipQ (f, x:b)
isEmptyI (f,b) = null f
... | null | https://raw.githubusercontent.com/langston-barrett/CoverTranslator/4172bef9f4eede7e45dc002a70bf8c6dd9a56b5c/examples/queue/AgdaQueue.hs | haskell | prop_null_1, prop_null_2 ] $
prop_reverse_nil, prop_reverse_cons ] $
using [ prop_append_assoc, prop_reverse_cons ] $
using [ ] $
using [ ] $
prop_null_1, prop_null_2, prop_null_true_inv,
prop_null_false_inv ] $
prop_null_1, prop_null_2, prop_null_true_inv,
prop_null_f... | module AgdaQueue where
import Property
import PropPrelude
type Queue a = [a]
empty = []
add x q = q ++ [x]
isEmpty q = null q
front (x:q) = x
remove (x:q) = q
type QueueI a = ([a], [a])
emptyI = ([],[])
addI x (f,b) = flipQ (f, x:b)
isEmptyI (f,b) = null f
... |
78029b716f107a9fa65620813774d117eca54b3e31645bddb4a699ce2655d065 | ygrek/extunix | testba.ml | open OUnit
open ExtUnix.All.BA
module LargeFile = ExtUnix.All.LargeFile.BA
let with_unix_error f () =
try
f ()
with
| Unix.Unix_error(e,f,a) ->
let message = Printf.sprintf "Unix_error : %s(%s) : %s" f a (Unix.error_message e) in
libc may raise Not implemented , not an error in extunix
assert_failu... | null | https://raw.githubusercontent.com/ygrek/extunix/9b84a56702d7b7ebc6ca70fecae62d581c242645/test/testba.ml | ocaml | open OUnit
open ExtUnix.All.BA
module LargeFile = ExtUnix.All.LargeFile.BA
let with_unix_error f () =
try
f ()
with
| Unix.Unix_error(e,f,a) ->
let message = Printf.sprintf "Unix_error : %s(%s) : %s" f a (Unix.error_message e) in
libc may raise Not implemented , not an error in extunix
assert_failu... | |
5c331c949134741df2d7dc3089743266091c2eccaafbd832907803c902fdcc7f | darrenldl/ocaml-SeqBox | int64_ops.ml | let (<+>) = Int64.add;;
let (<->) = Int64.sub;;
let (<*>) = Int64.mul;;
let (</>) = Int64.div;;
| null | https://raw.githubusercontent.com/darrenldl/ocaml-SeqBox/658c623db8745ae1d804c75880b29fb53435860f/src/int64_ops.ml | ocaml | let (<+>) = Int64.add;;
let (<->) = Int64.sub;;
let (<*>) = Int64.mul;;
let (</>) = Int64.div;;
| |
a529dd16a382b8ea205c9c8b1767510aab6617a082ddb562457ffb509e0cc21b | hypernumbers/hypernumbers | hnfuns_site.erl | @author
( C ) 2012 - 2014 , Hypernumbers Ltd ( Vixo )
%%% @doc Functions for administering the site
%%%
%%% @end
Created : 21 Apr 2012 by
%%%-------------------------------------------------------------------
%%%
%%% LICENSE
%%%
%%% This program is free software: you can redistribute it and/or modi... | null | https://raw.githubusercontent.com/hypernumbers/hypernumbers/281319f60c0ac60fb009ee6d1e4826f4f2d51c4e/lib/formula_engine-1.0/src/hnfuns_site.erl | erlang | @doc Functions for administering the site
@end
-------------------------------------------------------------------
LICENSE
This program is free software: you can redistribute it and/or modify
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the impli... | @author
( C ) 2012 - 2014 , Hypernumbers Ltd ( Vixo )
Created : 21 Apr 2012 by
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3
You should have received a copy of the GNU Affero General Public License
-module(hnfuns_site).
-include... |
dd738b62c2aed6f4acb2a42a818db10f8ce3d7dabe2d065257b77dd5b56d3bfa | nkaretnikov/OOHaskell | Rectangle.hs |
( C ) 2004 - 2005 , Oleg Kiselyov &
's overlooked object system
module Rectangle where
import Shape
-- The delta for rectangles
data RectangleDelta w =
RectangleDelta { getWidth' :: Int
, getHeight' :: Int
, setWidth' :: Int -> Rectangle w
... | null | https://raw.githubusercontent.com/nkaretnikov/OOHaskell/ddf42cfa62f8bd27643ff6db136dec6c14466232/repository/shapes/Haskell/Shapes3/Rectangle.hs | haskell | The delta for rectangles
An extension of Shape
Closed constructor for rectangles
Hide nested position of rectangle accessors |
( C ) 2004 - 2005 , Oleg Kiselyov &
's overlooked object system
module Rectangle where
import Shape
data RectangleDelta w =
RectangleDelta { getWidth' :: Int
, getHeight' :: Int
, setWidth' :: Int -> Rectangle w
, setHeight' ::... |
ba448d3b4af32b99ee1277faf468fea4d9e2bc5fd82bd8b139fa3cb636ba9a2a | hoplon/demos | websocket.cljs | (ns app.websocket
(:require
[taoensso.sente :as sente]
))
(let [{:keys [chsk ch-recv send-fn state]}
(sente/make-channel-socket! "/chsk" ; Note the same URL as before
{})]
(def chsk chsk)
ChannelSocket 's receive channel
ChannelSocket 's send API fn
, ... | null | https://raw.githubusercontent.com/hoplon/demos/50d613892db0624a4f0326c1427d82f5b8e2390f/ws-simple/src/app/websocket.cljs | clojure | Note the same URL as before
Routing handlers
Dispatch on event-id
Wrap for logging, catching, etc.:
(.log js/console (str "Handshake: " ?data)) | (ns app.websocket
(:require
[taoensso.sente :as sente]
))
(let [{:keys [chsk ch-recv send-fn state]}
{})]
(def chsk chsk)
ChannelSocket 's receive channel
ChannelSocket 's send API fn
, read - only atom
)
(defn event-msg-handler* [{:as ev-msg :key... |
a87c02c647d8f430e24c1a0972714fb4b58d5d6311b40da459af7986285fac99 | ludat/conferer | Types.hs | -- |
Copyright : ( c ) 2019
-- License: MPL-2.0
Maintainer : < >
-- Stability: unstable
-- Portability: portable
--
Core types for Config ( here because of depedency cycles )
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE DataKinds #
# LANGUAGE UndecidableInstances #
# LANGUAGE StandaloneD... | null | https://raw.githubusercontent.com/ludat/conferer/a9880936d238fbde16d2b41e4e7489134265eb67/packages/conferer/src/Conferer/Config/Internal/Types.hs | haskell | |
License: MPL-2.0
Stability: unstable
Portability: portable
is to expose a uniform interface into multiple configuration sources (such as
env vars, cli args, and many others including use defined ones using the
'Source' interface)
| Result of a key lookup in a 'Config'
This is indexed by 'LookupTarget... | Copyright : ( c ) 2019
Maintainer : < >
Core types for Config ( here because of depedency cycles )
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE DataKinds #
# LANGUAGE UndecidableInstances #
# LANGUAGE StandaloneDeriving #
module Conferer.Config.Internal.Types where
import Data.Map (Map)... |
dc4df94a439a917b689f6de08547588798b178ec1a6d5b1c6ea3fd2866390851 | russ/openpoker | limit.erl | Copyright ( C ) 2005 - 2008 Wager Labs , SA
%%%%
%%%% THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS
CREATIVE COMMONS PUBLIC LICENSE ( " CCPL " OR " LICENSE " ) . THE WORK IS
%%%% PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF
%%%% THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICE... | null | https://raw.githubusercontent.com/russ/openpoker/62edd72a35b9ef52f55da9303cf1e06142e95895/src/limit.erl | erlang |
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS
PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF
THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT
LAW IS PROHIBITED.
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT
AND AGREE TO BE BOUND BY THE TERM... | Copyright ( C ) 2005 - 2008 Wager Labs , SA
CREATIVE COMMONS PUBLIC LICENSE ( " CCPL " OR " LICENSE " ) . THE WORK IS
-nc-sa/3.0/us/
-module(limit).
-export([behaviour_info/1]).
behaviour_info(callbacks) ->
[{raise, 5}, {blinds, 2}].
|
2b8aef7592a61a320568bbef4d81b59d01cd6bc929447af8e38a5601e7bfe2d4 | emqx/mria | mria_status.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/mria/ae9726bda1b332f1b06e3b173b18457e349f36a8/src/mria_status.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@doc This module holds status of the RLOG replicas and manages
-module(mria_status).
-behavio... |
2e405b2e3827014999290867cb64d1311e753bc87e2237f85c39543cb293668b | coq/bot | GitHub_queries.mli | open GitHub_types
val get_pull_request_milestone_and_cards :
bot_info:Bot_info.t
-> owner:string
-> repo:string
-> number:int
-> (project_card list * milestone option, string) result Lwt.t
val get_backported_pr_info :
bot_info:Bot_info.t
-> int
-> string
-> (mv_card_to_column_input option, str... | null | https://raw.githubusercontent.com/coq/bot/76d71306d2ea5977b0db3437f98b8175ae478a60/bot-components/GitHub_queries.mli | ocaml | N.B. the [bool option] is [None] for in progress and [Some success_status] for finished
TODO: Should we use a type for this instead of [bool option]?
Can return [None] if the label is not found | open GitHub_types
val get_pull_request_milestone_and_cards :
bot_info:Bot_info.t
-> owner:string
-> repo:string
-> number:int
-> (project_card list * milestone option, string) result Lwt.t
val get_backported_pr_info :
bot_info:Bot_info.t
-> int
-> string
-> (mv_card_to_column_input option, str... |
aec77f06b635a33000b156ed7e4a7ec250035ceb76c6ea792ec25f26185f722c | cyverse-archive/DiscoveryEnvironmentBackend | user_saved_searches_queries.clj | (ns kameleon.user-saved-searches-queries
(:use [kameleon.core]
[kameleon.entities]
[kameleon.uuids]
[kameleon.misc-queries]
[korma.core]))
(defn saved-searches-seq
"Returns a seq of all of the saved searches associated with the user.
There should only be one record for each user.... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/libs/kameleon/src/kameleon/user_saved_searches_queries.clj | clojure | (ns kameleon.user-saved-searches-queries
(:use [kameleon.core]
[kameleon.entities]
[kameleon.uuids]
[kameleon.misc-queries]
[korma.core]))
(defn saved-searches-seq
"Returns a seq of all of the saved searches associated with the user.
There should only be one record for each user.... | |
476071349d27c0638eae95d61330d23a722f821d97bd607359b98db1d3a9e033 | omnyway-labs/re-crud | notifications.cljs | (ns re-crud.notifications
(:require [re-frame.core :refer [reg-event-db dispatch reg-sub]]))
(reg-event-db
:crud-notify
(fn [db [_ operation-id status response]]
(.log js/console (str "Failed:" operation-id " Status:" status " Response:" response))
db))
| null | https://raw.githubusercontent.com/omnyway-labs/re-crud/2fe9cbcf0a19d8c09a86d9025577e6271e9dd5a3/src/cljs/re_crud/notifications.cljs | clojure | (ns re-crud.notifications
(:require [re-frame.core :refer [reg-event-db dispatch reg-sub]]))
(reg-event-db
:crud-notify
(fn [db [_ operation-id status response]]
(.log js/console (str "Failed:" operation-id " Status:" status " Response:" response))
db))
| |
370263a0e12378a3b2d0ef337dba72b9f7b9b81a87d586829c7a9ba7cfe53acd | klajo/eunit_addons | eunit_addons_tests.erl | %%%===================================================================
Copyright ( c ) 2011 ,
%%% All rights reserved.
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the following conditions are
%%% met:
%%%
%%% * Redistributions of sourc... | null | https://raw.githubusercontent.com/klajo/eunit_addons/da628a2521cc2f2aceaf9ba29680712fcf098143/test/eunit_addons_tests.erl | erlang | ===================================================================
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notic... | Copyright ( c ) 2011 ,
HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , DATA , OR
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
-modu... |
fc487d6f36022296b6dd925dc568b70749f78cfa519a394b171226bf6595f862 | ghc/ghc | Printer.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE LambdaCase #
# LANGUAGE MagicHash #
-----------------------------------------------------------------------------
-- |
-- Module : GHC.StgToJS.Printer
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file LICENSE)
--
Main... | null | https://raw.githubusercontent.com/ghc/ghc/a9912de75400b7006fc2eb6cb31c9bf5ae6dacd6/compiler/GHC/StgToJS/Printer.hs | haskell | # LANGUAGE OverloadedStrings #
---------------------------------------------------------------------------
|
Module : GHC.StgToJS.Printer
License : BSD-style (see the file LICENSE)
Stability : experimental
the work
---------------------------------------------------------------------------
Fresh... | # LANGUAGE LambdaCase #
# LANGUAGE MagicHash #
Copyright : ( c ) The University of Glasgow 2001
Maintainer : < >
Luite Stegeman < >
>
Custom prettyprinter for JS AST uses the JS PPr module for most of
module GHC.StgToJS.Printer
( pretty
, ghcjsRenderJs
... |
b2e092879df6eb601eb2684536d647e88a7dd7e95ea691f6fce076362ff9ae26 | SevereOverfl0w/aleph-yada-ssl | aleph.clj | (ns jkdjka.aleph
(:require
[aleph.http :as http]
[aleph.netty :as aleph.netty]
[clojure.java.io :as io]
[mount.core :refer [defstate]])
(:import
[io.netty.handler.ssl SslContextBuilder]))
(defn handler [req]
{:status 200
:headers {"content-type" "text/plain"}
:body "hello from aleph!"})... | null | https://raw.githubusercontent.com/SevereOverfl0w/aleph-yada-ssl/bdadf407caba6a7921e34febee7b046caf2af1f2/src/jkdjka/aleph.clj | clojure | (ns jkdjka.aleph
(:require
[aleph.http :as http]
[aleph.netty :as aleph.netty]
[clojure.java.io :as io]
[mount.core :refer [defstate]])
(:import
[io.netty.handler.ssl SslContextBuilder]))
(defn handler [req]
{:status 200
:headers {"content-type" "text/plain"}
:body "hello from aleph!"})... | |
c8145baa5e0be83211c469b698057f9bcda3750e771bcdcbc4eb8aabc3b20732 | theodormoroianu/SecondYearCourses | lab13-sol_20210115190249.hs |
import Data.Char
prelStr strin = map toUpper strin
ioString = do
strin <- getLine
putStrLn $ "Intrare\n" ++ strin
let strout = prelStr strin
putStrLn $ "Iesire\n" ++ strout
prelNo noin = sqrt noin
ioNumber = do
noin <- readLn :: IO Double
putStrLn ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/l/.history/lab13/lab13-sol_20210115190249.hs | haskell |
import Data.Char
prelStr strin = map toUpper strin
ioString = do
strin <- getLine
putStrLn $ "Intrare\n" ++ strin
let strout = prelStr strin
putStrLn $ "Iesire\n" ++ strout
prelNo noin = sqrt noin
ioNumber = do
noin <- readLn :: IO Double
putStrLn ... | |
25108dc38ce6e1eb1d47209e155975725e113166fa5d9ce419380bfdffc580a2 | bradparker/bradparker.com | Feed.hs | # LANGUAGE BlockArguments #
# LANGUAGE DataKinds #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE NoFieldSelectors #
# LANGUAGE OverloadedRecordDot #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# OPTIONS_GHC -Wall #
module Feed (render) where
import Control.Applicative ... | null | https://raw.githubusercontent.com/bradparker/bradparker.com/843775de5d7939939c67043d9233706df2d7fd63/bradparker.com/usr/local/src/bradparker.com/builder/Feed.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes # | # LANGUAGE BlockArguments #
# LANGUAGE DataKinds #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE NoFieldSelectors #
# LANGUAGE OverloadedRecordDot #
# OPTIONS_GHC -Wall #
module Feed (render) where
import Control.Applicative ((<|>))
import qualified Data.ByteString.Lazy as LBS
import Dat... |
0eae9e880d3229882a4c31533c7384613ff5d93a4c50a5f2db413cbee95cb8ff | ytomino/headmaster | test_parser.ml | open C_define_parser;;
open C_filename;;
open C_lexical;;
open C_parser;;
open C_preprocessor;;
open C_scanner;;
open C_syntax;;
open Environment;;
open Environment_gcc;;
open Known_errors;;
open Position;;
open Value_ocaml;;
let source_filename = ref "../c-lib.h";;
let gcc_command = ref "gcc";;
let tab_width = 3;;
le... | null | https://raw.githubusercontent.com/ytomino/headmaster/11571992e480aa9fbc5821fe1be1b62edf5f924f/examples/parser/test_parser.ml | ocaml | open C_define_parser;;
open C_filename;;
open C_lexical;;
open C_parser;;
open C_preprocessor;;
open C_scanner;;
open C_syntax;;
open Environment;;
open Environment_gcc;;
open Known_errors;;
open Position;;
open Value_ocaml;;
let source_filename = ref "../c-lib.h";;
let gcc_command = ref "gcc";;
let tab_width = 3;;
le... | |
2304c0f8860be515be48025f39f79fa9849daee4992df6fc7b2ec43a45794436 | OCamlPro/ocplib-endian | endianBytes.cppo.mli | (************************************************************************)
(* ocplib-endian *)
(* *)
(* Copyright 2014 OCamlPro *)
(* ... | null | https://raw.githubusercontent.com/OCamlPro/ocplib-endian/4f9fc814497b09da84f94ddf85cb20c9777887c2/src/endianBytes.cppo.mli | ocaml | **********************************************************************
ocplib-endian
Copyright 2014 OCamlPro
... | Public License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later version ,
module type EndianBytesSig = sig
* Functions reading according to Big Endian byte order
val get_char : Bytes.t -> int -> char
* [ i ] reads 1 byte at offset i as a ch... |
845ba74b140fd0378ff0a3acbbdf95354bcd6a308560a784aaf954db067a2d0e | nionita/Barbarossa | Pattern.hs | module Moves.Pattern (
genArray,
row1, row2, row3, row4, row5, row6, row7, row8,
fileA, fileB, fileC, fileD, fileE, fileF, fileG, fileH,
bbLeft, bbRight,
rowBB, colBB, rookFiles, lightSquares, darkSquares
) where
import Data.Bits
import Data.Array.Unboxed
... | null | https://raw.githubusercontent.com/nionita/Barbarossa/81032b17ac36dc01771cbcfaaae88c30e7661d7b/Moves/Pattern.hs | haskell | Arrays of rows and files
| module Moves.Pattern (
genArray,
row1, row2, row3, row4, row5, row6, row7, row8,
fileA, fileB, fileC, fileD, fileE, fileF, fileG, fileH,
bbLeft, bbRight,
rowBB, colBB, rookFiles, lightSquares, darkSquares
) where
import Data.Bits
import Data.Array.Unboxed
... |
f0b51bfd1adacfc10b402e69840b0475b0ae6f68eea8aa14059393aaf34194c3 | clojure-interop/aws-api | AWSServiceCatalog.clj | (ns com.amazonaws.services.servicecatalog.AWSServiceCatalog
"Interface for accessing AWS Service Catalog.
Note: Do not directly implement this interface, new methods are added to it regularly. Extend from
AbstractAWSServiceCatalog instead.
AWS Service Catalog
AWS Service Catalog enables organizations to c... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.servicecatalog/src/com/amazonaws/services/servicecatalog/AWSServiceCatalog.clj | clojure | (ns com.amazonaws.services.servicecatalog.AWSServiceCatalog
"Interface for accessing AWS Service Catalog.
Note: Do not directly implement this interface, new methods are added to it regularly. Extend from
AbstractAWSServiceCatalog instead.
AWS Service Catalog
AWS Service Catalog enables organizations to c... | |
d0c4abd3cd432dea05a61cfeeb096748bccf0ff3de3ef62e7229ba3444457be7 | CrossRef/cayenne | graph.clj | (ns cayenne.api.v1.graph
(:require [cayenne.conf :as conf]
[cayenne.util :refer [update-vals parse-int-safe]]
[cayenne.api.v1.types :as t]
[cayenne.api.v1.response :as r]
[cayenne.api.v1.query :as q]
[cayenne.data.work :as work]
[cayenne.ids.doi ... | null | https://raw.githubusercontent.com/CrossRef/cayenne/02321ad23dbb1edd3f203a415f4a4b11ebf810d7/src/cayenne/api/v1/graph.clj | clojure | Implements the graph API
Handle resolution of IDs of implicit type
Our query definitions
handle multiple relations
Take our datomic queries above and turn results into presentable
documents. Here, we bind our query database.
TODO sort order
Wrap our responses in standard response containers
Define our re... | (ns cayenne.api.v1.graph
(:require [cayenne.conf :as conf]
[cayenne.util :refer [update-vals parse-int-safe]]
[cayenne.api.v1.types :as t]
[cayenne.api.v1.response :as r]
[cayenne.api.v1.query :as q]
[cayenne.data.work :as work]
[cayenne.ids.doi ... |
79f03ec3a4059080689385e1738fce359e71f9d2716ef106b008150f3b22e5bb | ocurrent/ocurrent | current_docker_test.mli | (* Some dummy build primitives. *)
type source = Fpath.t
module Image : sig type t = string end
val build : ?on:string -> source Current.t -> Image.t Current.t
* [ build : platform src ] builds a image from source .
val run : Image.t Current.t -> cmd:string list -> unit Current.t
* [ run image ~cmd ] runs [ cmd ]... | null | https://raw.githubusercontent.com/ocurrent/ocurrent/344af83279e9ba17f5f32d0a0351c228a6f42863/test/plugins/docker/current_docker_test.mli | ocaml | Some dummy build primitives.
* Marks a previous [run] as complete.
* [update_pull tag] checks for updates to [tag] in the background.
* Reset state for tests.
* Check all containers are stopped. |
type source = Fpath.t
module Image : sig type t = string end
val build : ?on:string -> source Current.t -> Image.t Current.t
* [ build : platform src ] builds a image from source .
val run : Image.t Current.t -> cmd:string list -> unit Current.t
* [ run image ~cmd ] runs [ cmd ] in image [ image ] .
val complet... |
59a145531ab97b376086c8704e4db0f9cc19e7f371e970f066883b622c10f4be | mightybyte/zeus | Gitlab.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Backend.Gitlab where
------------------------------------------------------------------------------
import Control.Lens hiding ((.=))
import Control.Monad
import Control.Monad.IO.Clas... | null | https://raw.githubusercontent.com/mightybyte/zeus/5566e3244f1ab0cd245e4c36be315a5abddb5810/backend/src/Backend/Gitlab.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
TODO what should this number be?
liftIO $ print p
Left ... | # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
module Backend.Gitlab where
import Control.Lens hiding ((.=))
import Control.Monad
import Control.Monad.IO.Class
import Data.Aeson
import Data.Aeson.Lens
import Data.ByteString (ByteString)
impor... |
638f0db0a2049012183f84846e987ed41220efa41a923d3e92b69de286611693 | camsaul/toucan2 | cloverage_runner.clj | (ns toucan2.cloverage-runner
(:require cloverage.coverage))
(defn run-project
"Shim for running tests using Cloverage to get code coverage metrics. See comments in `deps.edn` for more
information."
[options]
parse regex lists into actual regex Patterns since regex literals are n't allowed in EDN .
(let [op... | null | https://raw.githubusercontent.com/camsaul/toucan2/a273fbd0d5eb259c1e7441ce0143bd22df399168/test/toucan2/cloverage_runner.clj | clojure | (ns toucan2.cloverage-runner
(:require cloverage.coverage))
(defn run-project
"Shim for running tests using Cloverage to get code coverage metrics. See comments in `deps.edn` for more
information."
[options]
parse regex lists into actual regex Patterns since regex literals are n't allowed in EDN .
(let [op... | |
7b9d0bf2d9da7b96205186f05acb45c708daea11f71d4a0973696866211718d8 | hiroshi-unno/coar | copy2.ml | let rec copy x =
if x = 0 then
0
else
1 + copy (x - 1)
let main x = assert (copy x = x)
[@@@assert "typeof(main) <: int -> unit"]
| null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/benchmarks/OCaml/safety/tacas2015/copy2.ml | ocaml | let rec copy x =
if x = 0 then
0
else
1 + copy (x - 1)
let main x = assert (copy x = x)
[@@@assert "typeof(main) <: int -> unit"]
| |
12fb7e60ec2eb7af1d551c5d9b1e91502a61ad441a7252db791913bc98e9eef2 | cl-plus-ssl/cl-plus-ssl | alpn.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; indent - tabs - mode : nil ; coding : utf-8 ; show - trailing - whitespace : t -*-
;;;
;;; Copyright (C) contributors as per cl+ssl git history
;;;
;;; See LICENSE for details.
(in-package :cl+ssl.test)
(def-suite :cl+ssl.alpn :in :cl+ssl
:description "ALPN tests")
(in-... | null | https://raw.githubusercontent.com/cl-plus-ssl/cl-plus-ssl/5f124bd97b41df846c23142ac88163921ffe9d54/test/alpn.lisp | lisp | Syntax : COMMON - LISP ; indent - tabs - mode : nil ; coding : utf-8 ; show - trailing - whitespace : t -*-
Copyright (C) contributors as per cl+ssl git history
See LICENSE for details. |
(in-package :cl+ssl.test)
(def-suite :cl+ssl.alpn :in :cl+ssl
:description "ALPN tests")
(in-suite :cl+ssl.alpn)
(test alpn-client
(when (cl+ssl::openssl-is-at-least 1 0 2)
(flet ((test-alpn-result (target proposed expected)
(usocket:with-client-socket (socket stream target 443
... |
925f80cfc6c4e115e309e0ab24faf220aedaed00d79c5df18ae6ef27127c827b | billstclair/Lisplog | csv.lisp | ; -*- mode: lisp -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
Parser for the comma - separate - value ( csv ) files dumped by PHPMyAdmin
;;;
(in-package :lisplog)
(defvar *csv-delimiter* #\")
(defvar *csv-separator* #\;)
(defvar *csv-escape* #\\)
(defvar *csv-ignore-characters* '(... | null | https://raw.githubusercontent.com/billstclair/Lisplog/827e737062b4873ecf86c255649d44aca4b4f48f/src/csv.lisp | lisp | -*- mode: lisp -*-
)
Export from the "Export" tab on a table's page in PHPMyAdmin
Choose "CSV" in the "Export" box
Change "Replace NULL by" from "NULL" to blank
Click the "Go" button.
============ =============
node $NODES
url_alias $NODES (the :aliases property of each)
comments $COMME... |
Parser for the comma - separate - value ( csv ) files dumped by PHPMyAdmin
(in-package :lisplog)
(defvar *csv-delimiter* #\")
(defvar *csv-escape* #\\)
(defvar *csv-ignore-characters* '(#\return))
(defun parse-csv (file &optional line-function)
(let* ((res nil)
(line-function (or line-function (lambda ... |
f5549b1d80cdef4607f698a5570eb39bca3b8c3fcf1fac5f058bbf3845f3777b | rabbitmq/rabbitmq-erlang-client | amqp_rpc_client.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
%% @doc This module allows the simple execution o... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-erlang-client/2022e01c515d93ed1883e9e9e987be2e58fe15c9/src/amqp_rpc_client.erl | erlang |
@doc This module allows the simple execution of an asynchronous RPC over
plumbing. Note that the this module does not handle any data encoding,
accordingly.
--------------------------------------------------------------------------
API
--------------------------------------------------------------------------
@s... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
AMQP . It frees a client programmer of the necessary ... |
8ac48ec174d43b2f1e162f2ae93db65c68d86b7d95d2fbab2c78cfef3285def1 | zenspider/schemers | exercise.2.39.scm | #lang racket/base
(require "../lib/test.rkt")
(require "../lib/myutils.scm")
Exercise 2.39
;; Complete the following definitions of `reverse' (*Note Exercise
2 - 18 : :) in terms of ` fold - right ' and ` fold - left ' from * Note
;; Exercise 2-38:::
;; (define (reverse sequence)
;; (fold-right (lam... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_2/exercise.2.39.scm | scheme | Complete the following definitions of `reverse' (*Note Exercise
Exercise 2-38:::
(define (reverse sequence)
(fold-right (lambda (x y) <??>) nil sequence))
(define (reverse sequence)
(fold-left (lambda (x y) <??>) nil sequence)) | #lang racket/base
(require "../lib/test.rkt")
(require "../lib/myutils.scm")
Exercise 2.39
2 - 18 : :) in terms of ` fold - right ' and ` fold - left ' from * Note
(define (reverse1 sequence)
(fold-right (lambda (x y) (append y (list x))) null sequence))
(define (reverse2 sequence)
(fold-left (lambda (x ... |
6bb9a21325e2a9d8be8809c2850c852d3aa6f7a8b8b052397310d5e1bd872746 | UBTECH-Walker/WalkerSimulationFor2020WAIC | DigitalIOStates.lisp | ; Auto-generated. Do not edit!
(cl:in-package baxter_core_msgs-msg)
;//! \htmlinclude DigitalIOStates.msg.html
(cl:defclass <DigitalIOStates> (roslisp-msg-protocol:ros-message)
((names
:reader names
:initarg :names
:type (cl:vector cl:string)
:initform (cl:make-array 0 :element-type 'cl:string :in... | null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_18.04_v1.2_20200616/walker_install/share/common-lisp/ros/baxter_core_msgs/msg/DigitalIOStates.lisp | lisp | Auto-generated. Do not edit!
//! \htmlinclude DigitalIOStates.msg.html |
(cl:in-package baxter_core_msgs-msg)
(cl:defclass <DigitalIOStates> (roslisp-msg-protocol:ros-message)
((names
:reader names
:initarg :names
:type (cl:vector cl:string)
:initform (cl:make-array 0 :element-type 'cl:string :initial-element ""))
(states
:reader states
:initarg :states
... |
92c9bc2de1021bd5851265c63e167a9a1075b103308f5377ddf5ed2df84d6e2a | onyx-platform/onyx-benchmark | bench_plugin_backpressure_test.clj | (ns onyx.plugin.bench-plugin-backpressure-test
(:require [clojure.core.async :refer [chan dropping-buffer put! >! <! <!! go >!!]]
[taoensso.timbre :refer [info warn trace fatal] :as timbre]
[onyx.peer.pipeline-extensions :as p-ext]
[onyx.plugin.bench-plugin]
[taoensso.t... | null | https://raw.githubusercontent.com/onyx-platform/onyx-benchmark/bad93b27b9d7139330697616b04c31f4f040034b/test/onyx/plugin/bench_plugin_backpressure_test.clj | clojure | (info "Received segment " segment)
:onyx/tenancy-ident :onyx.plugin.RandomInputPlugin
:onyx/fn :onyx.plugin.JavaFn/testFn
:onyx/fn :onyx.plugin.JavaFn/testFn
:onyx/fn :onyx.plugin.JavaFn/testFn
TO TEST | (ns onyx.plugin.bench-plugin-backpressure-test
(:require [clojure.core.async :refer [chan dropping-buffer put! >! <! <!! go >!!]]
[taoensso.timbre :refer [info warn trace fatal] :as timbre]
[onyx.peer.pipeline-extensions :as p-ext]
[onyx.plugin.bench-plugin]
[taoensso.t... |
5c1effcad11059a551c55c4a27c1a64684f9c637866057909553680fb756de73 | stevebleazard/ocaml-jsonxt | strict.ml | module Compliance = struct
type json = Json.Strict.json
type json_stream = Json_stream.Strict.json
open Tokens
let lex_string s = Lexxer_utils.unescape_string s
let lex_number = function
| INFINITY -> COMPLIANCE_ERROR "inf not supported"
| NEGINFINITY -> COMPLIANCE_ERROR "-inf not supported"
| NAN ->... | null | https://raw.githubusercontent.com/stevebleazard/ocaml-jsonxt/fe982b6087dd76ca003d8fbc19ae9a519f54b828/lib/strict.ml | ocaml | module Compliance = struct
type json = Json.Strict.json
type json_stream = Json_stream.Strict.json
open Tokens
let lex_string s = Lexxer_utils.unescape_string s
let lex_number = function
| INFINITY -> COMPLIANCE_ERROR "inf not supported"
| NEGINFINITY -> COMPLIANCE_ERROR "-inf not supported"
| NAN ->... | |
f47084cbe0c7e79b022d688195c07c4631296f51c1202ba2200aa679114bf5cb | komadori/HsQML | AutoListTest.hs | # LANGUAGE DeriveDataTypeable , FlexibleInstances , TypeFamilies #
module Graphics.QML.Test.AutoListTest where
import Graphics.QML.Marshal
import Graphics.QML.Objects
import Graphics.QML.Test.Framework
import Graphics.QML.Test.MayGen
import Graphics.QML.Test.TestObject
import Graphics.QML.Test.ScriptDSL (Expr, Prog)
... | null | https://raw.githubusercontent.com/komadori/HsQML/f57cffe4e3595bdf743bdbe6f44bf45a4001d35f/test/Graphics/QML/Test/AutoListTest.hs | haskell | # LANGUAGE DeriveDataTypeable , FlexibleInstances , TypeFamilies #
module Graphics.QML.Test.AutoListTest where
import Graphics.QML.Marshal
import Graphics.QML.Objects
import Graphics.QML.Test.Framework
import Graphics.QML.Test.MayGen
import Graphics.QML.Test.TestObject
import Graphics.QML.Test.ScriptDSL (Expr, Prog)
... | |
a569bc134bc18cdabde32f8465b714d366cb6108760ccef35fe0f0f87fb8a5a1 | dmoverton/finite-domain | Queens.hs | module Queens (queens) where
import Control.Monad (zipWithM_)
import FD
queens n = runFD $ do
vars <- news n (1, n)
allDifferent vars
diagonals vars
labelling vars
diagonals :: [FDExpr] -> FDConstraint
diagonals [] = return ()
diagonals (x:xs) = do
zipWithM_ (diag x) xs [1..]
diagonals xs... | null | https://raw.githubusercontent.com/dmoverton/finite-domain/65373e30aa3f72031bd41d19ebf9684bfa1e01f0/src/Queens.hs | haskell | module Queens (queens) where
import Control.Monad (zipWithM_)
import FD
queens n = runFD $ do
vars <- news n (1, n)
allDifferent vars
diagonals vars
labelling vars
diagonals :: [FDExpr] -> FDConstraint
diagonals [] = return ()
diagonals (x:xs) = do
zipWithM_ (diag x) xs [1..]
diagonals xs... | |
5a16c0bfe3b16dd6ac49406745c7f057659715644768f0f8c1cc7ceece7b799b | SquidDev/illuaminate | test.ml | open IlluaminateCore
let regex =
let open Re in
let code_block lang =
seq [ bol; str ("```" ^ lang); char '\n'; group (non_greedy (rep1 any)); str "\n```"; eol ]
in
seq [ code_block "lua"; repn (char '\n') 1 (Some 2); opt (code_block "txt"); opt (char '\n') ]
|> compile
let parse str =
match Illuamina... | null | https://raw.githubusercontent.com/SquidDev/illuaminate/cd06555892d353f8dd6672c484d6455dac4c8ee5/test/parser/test.ml | ocaml | open IlluaminateCore
let regex =
let open Re in
let code_block lang =
seq [ bol; str ("```" ^ lang); char '\n'; group (non_greedy (rep1 any)); str "\n```"; eol ]
in
seq [ code_block "lua"; repn (char '\n') 1 (Some 2); opt (code_block "txt"); opt (char '\n') ]
|> compile
let parse str =
match Illuamina... | |
8995a890c38210d0a00cef484ea946a46a9ac10793eef8fa4a5aba87c82acd29 | edbutler/nonograms-rule-synthesis | sketch.rkt | #lang rosette/safe
; creating symbolic programs
(provide
current-sketch-features
current-max-sketch-depth
most-specific-patterns-of-line
build-pattern-graph
serialize-pattern-graph
deserialize-pattern-graph
program-sketch)
(require
(only-in racket match-define error local-require make-parameter set-m... | null | https://raw.githubusercontent.com/edbutler/nonograms-rule-synthesis/16f8dacb17bd77c9d927ab9fa0b8c1678dc68088/src/nonograms/sketch.rkt | racket | creating symbolic programs
(parameterof (setof symbol?))
The allowed features that can be used in program-sketch.
[(_ element:element ...) #'(list element.value ...)]))
creates a graph of all possible patterns climbing up the generality ladder
Other parts of the code rely on this returning patterns in a consistent... | #lang rosette/safe
(provide
current-sketch-features
current-max-sketch-depth
most-specific-patterns-of-line
build-pattern-graph
serialize-pattern-graph
deserialize-pattern-graph
program-sketch)
(require
(only-in racket match-define error local-require make-parameter set-member? parameterize)
(for-s... |
2f9f3dfacccc0c93ee733356520e2ea794cccc8452674e7c4fbf61bce0a6fd99 | lmj/lfarm | 1am.lisp | Copyright ( c ) 2014 , . All rights reserved .
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this list of c... | null | https://raw.githubusercontent.com/lmj/lfarm/f7ba49f1ec01fb99a7aeb8f18e245a44411c361b/lfarm-test/1am.lisp | lisp |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary... | Copyright ( c ) 2014 , . All rights reserved .
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR T... |
252f000198281f6a8517631ba7366bffc5acfda1da51a209236657ed167e2898 | hellonico/origami-fun | face_recognition2.clj | (ns opencv4.video.face-recognition2
(:require [opencv4.core :refer :all])
(:require [opencv4.video :refer :all])
(:require [opencv4.utils :as u]))
(defn draw-rects! [buffer rects]
(let[ copy (-> buffer clone (cvt-color! COLOR_BGR2GRAY) (cvt-color! COLOR_GRAY2BGR)) ]
(doseq [r (.toArray rects)]
(let [ s (.... | null | https://raw.githubusercontent.com/hellonico/origami-fun/80117788530d942eaa9a80e2995b37409fa24889/test/opencv4/video/face_recognition2.clj | clojure | (ns opencv4.video.face-recognition2
(:require [opencv4.core :refer :all])
(:require [opencv4.video :refer :all])
(:require [opencv4.utils :as u]))
(defn draw-rects! [buffer rects]
(let[ copy (-> buffer clone (cvt-color! COLOR_BGR2GRAY) (cvt-color! COLOR_GRAY2BGR)) ]
(doseq [r (.toArray rects)]
(let [ s (.... | |
5f70c5243898a7e10e11c20809d4e9b9175a4d292aa4edbea860894f4e71d41f | bobzhang/ocaml-book | testtie.ml | open Format
class ['a] value_ring values = object
val mutable values = (values : 'a list)
method get =
match values with
| h::t -> values <- t @[h] ; h
| [] -> raise Not_found
method add value =
values <- value :: values
end
Magic hash that autoappends .
class ['a, 'b] append_hash size = ... | null | https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/code/tie/testtie.ml | ocaml | * syntax support ....
Hash that permits key *or* value lookups.
-----------------------------
Tee-like class that outputs to multiple channels at once. | open Format
class ['a] value_ring values = object
val mutable values = (values : 'a list)
method get =
match values with
| h::t -> values <- t @[h] ; h
| [] -> raise Not_found
method add value =
values <- value :: values
end
Magic hash that autoappends .
class ['a, 'b] append_hash size = ... |
7ca8af8fdfe3e43d4c60e7749bf96d90b9e66e076fe343b2da96e8f34d6af9d2 | daigotanaka/mern-cljs | mongoose.cljs | (ns mern-utils.mongoose
(:require-macros
[mern-utils.macros :refer [node-require]])
(:require
[cljs.nodejs :as nodejs]))
(node-require mongoose "mongoose")
(defn schema [fields]
(.Schema mongoose (clj->js fields)))
(defn in?
"true if coll contains elm"
[coll elm]
(some #(= elm %) coll))
(defn mo... | null | https://raw.githubusercontent.com/daigotanaka/mern-cljs/a9dedbb3b622f96dd0b06832733b4fd961e6437d/mern_utils/src/mern_utils/mongoose.cljs | clojure | (ns mern-utils.mongoose
(:require-macros
[mern-utils.macros :refer [node-require]])
(:require
[cljs.nodejs :as nodejs]))
(node-require mongoose "mongoose")
(defn schema [fields]
(.Schema mongoose (clj->js fields)))
(defn in?
"true if coll contains elm"
[coll elm]
(some #(= elm %) coll))
(defn mo... | |
6d84ca4a7a41883b44dea5222850614dbad5df6a2d135d08f2cc8f9efd0a5e8a | LonoCloud/step.async | step_listen.clj | (ns lonocloud.step.async.step-listen
"Deals with processes that are listening for a step machine to reach a specified state."
(:require [clojure.tools.logging :refer [errorf]]
[lonocloud.step.async.pschema :as s]
[lonocloud.step.async.step-model :refer [Channel]]))
(def ListenerMap {:step-l... | null | https://raw.githubusercontent.com/LonoCloud/step.async/31dc58f72cb9719a11a97dc36992c67cf3efb766/src/lonocloud/step/async/step_listen.clj | clojure | machine listeners | (ns lonocloud.step.async.step-listen
"Deals with processes that are listening for a step machine to reach a specified state."
(:require [clojure.tools.logging :refer [errorf]]
[lonocloud.step.async.pschema :as s]
[lonocloud.step.async.step-model :refer [Channel]]))
(def ListenerMap {:step-l... |
a11344dcec049434017527bd2aec591e9dde77fea7b503d041b18942474d467d | mirage/orm | array_simple.ml | pp camlp4orf
type s = {
foo: int array;
bar: string
} with orm
open OUnit
open Test_utils
let name = "array_simple.db"
let t1 = { foo=[|1|]; bar="t1" }
let t2 = { foo=[|1;2;3|]; bar="t2" }
let t3 = { foo=[||]; bar="t3" }
let test_init () =
ignore(open_db s_init name);
ignore(open_db ~rm:false s_init name);
... | null | https://raw.githubusercontent.com/mirage/orm/24c2e0e3157853b2328d09feacdbe637e34d354c/lib_test/array_simple.ml | ocaml | pp camlp4orf
type s = {
foo: int array;
bar: string
} with orm
open OUnit
open Test_utils
let name = "array_simple.db"
let t1 = { foo=[|1|]; bar="t1" }
let t2 = { foo=[|1;2;3|]; bar="t2" }
let t3 = { foo=[||]; bar="t3" }
let test_init () =
ignore(open_db s_init name);
ignore(open_db ~rm:false s_init name);
... | |
623b0551561b505a6ccc8267534cee06e51d8be7d807892492dfcbf249fff7c0 | processone/ejabberd | mod_shared_roster_sql.erl | %%%-------------------------------------------------------------------
%%% File : mod_shared_roster_sql.erl
Author : < >
Created : 14 Apr 2016 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
modify it under the ... | null | https://raw.githubusercontent.com/processone/ejabberd/c103182bc7e5b8a8ab123ce02d1959a54e939480/src/mod_shared_roster_sql.erl | erlang | -------------------------------------------------------------------
File : mod_shared_roster_sql.erl
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without... | Author : < >
Created : 14 Apr 2016 by < >
ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along
... |
36c1e22fa814e8053337095180b13c7d3d0baa0c4cbe23c07a5e931e5946f156 | bluegraybox/examples | server.erl | -module(server).
-export([start/1]).
%% Abstract server process; all business functionality is provided by a plugin module.
start(PluginModule) ->
State = PluginModule:init(),
EventHandler = fun() -> event_handler(PluginModule, State) end,
Pid = spawn(EventHandler),
Return our Remote Procedure Call ( rp... | null | https://raw.githubusercontent.com/bluegraybox/examples/20f238be10e2e987687d7289b2f4897cc7d95abd/erlang_servers/anonymous/server.erl | erlang | Abstract server process; all business functionality is provided by a plugin module.
Synchronous call to server process.
This is the server process; PluginModule:handle/2 does all the work. | -module(server).
-export([start/1]).
start(PluginModule) ->
State = PluginModule:init(),
EventHandler = fun() -> event_handler(PluginModule, State) end,
Pid = spawn(EventHandler),
Return our Remote Procedure Call ( rpc/1 ) function as a closure
fun(Request) ->
Pid ! {self(), Request},
... |
c5686e8a7190051e91b8946742faff5d99881c727f1c4f469d5ab29ed92542a6 | rems-project/cerberus | floating.ml | Floating point operations indirection , since does not support ' + . ' , ' * . ' ....
let add = (+.)
let sub = (-.)
let mul = (+.)
let div = (/.)
let of_string str =
let l = String.length str in
if String.get str (l-1) == 'f' then
float_of_string (String.sub str 0 (l-1))
else
float_of_string str
| null | https://raw.githubusercontent.com/rems-project/cerberus/124c93f10cb4c235f6396adec82ebf9563daeb7e/util/floating.ml | ocaml | Floating point operations indirection , since does not support ' + . ' , ' * . ' ....
let add = (+.)
let sub = (-.)
let mul = (+.)
let div = (/.)
let of_string str =
let l = String.length str in
if String.get str (l-1) == 'f' then
float_of_string (String.sub str 0 (l-1))
else
float_of_string str
| |
fdf5aeee86854366a235339da8e93015f2b3c13c4c952bb5224ff591742d71f0 | leepike/Copilot | PTLTLExamples.hs | | The examples are for testing the ptLTL library
module PTLTLExamples ( ptltlExamples ) where
import Language.Copilot
import Prelude ()
import qualified Data.List as L
-- | test of previous
previousTestData :: Stream Bool
previousTestData = [ True, False ] ++ previousTestData
previousTest :: Spec
previousTest =... | null | https://raw.githubusercontent.com/leepike/Copilot/18a71502c5c9e7262f14bb8167f3b4a09c9c6a8b/Examples/PTLTLExamples.hs | haskell | | test of previous
| test of alwaysBeen
| test of eventuallyPrevious
| test of since
| test since with external variables
| external variables | | The examples are for testing the ptLTL library
module PTLTLExamples ( ptltlExamples ) where
import Language.Copilot
import Prelude ()
import qualified Data.List as L
previousTestData :: Stream Bool
previousTestData = [ True, False ] ++ previousTestData
previousTest :: Spec
previousTest = do
observer "previo... |
91e4f76acbe9f25d25c07459eee1943dc3b44ac3dcc14ff60063736db064489d | btmura/b1 | RangeTest.hs | module B1.Data.RangeTest
( getTestGroup
) where
import Data.Time
import Test.Framework
import qualified Test.Framework.Providers.API
import Test.Framework.Providers.HUnit
import Test.Framework.Providers.QuickCheck2
import Test.HUnit
import Test.QuickCheck
import B1.Data.Range
getTestGroup :: Test.Framework.Provi... | null | https://raw.githubusercontent.com/btmura/b1/9cf0514ba1e03e9f4da05be9231acde07b199864/tests/B1/Data/RangeTest.hs | haskell | module B1.Data.RangeTest
( getTestGroup
) where
import Data.Time
import Test.Framework
import qualified Test.Framework.Providers.API
import Test.Framework.Providers.HUnit
import Test.Framework.Providers.QuickCheck2
import Test.HUnit
import Test.QuickCheck
import B1.Data.Range
getTestGroup :: Test.Framework.Provi... | |
b37771d5c38c56df701c1aba1394accc6e56bd07a0817a7c3aa41852ac69df29 | scrintal/heroicons-reagent | bell_slash.cljs | (ns com.scrintal.heroicons.solid.bell-slash)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:d "M3.53 2.47a.75.75 0 00-1.06 1.06l18 18a.75.75 0 101.06-1.06l-18-18zM20.57 16.476c-.223.082-.448.161-.674.238L7.319 4.... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/bell_slash.cljs | clojure | (ns com.scrintal.heroicons.solid.bell-slash)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:d "M3.53 2.47a.75.75 0 00-1.06 1.06l18 18a.75.75 0 101.06-1.06l-18-18zM20.57 16.476c-.223.082-.448.161-.674.238L7.319 4.... | |
729914ade16982ceee7d94d03487ed6d13064ebab0ae1005816e6bdf26233b04 | FlogFr/FlashCard | Form.hs | module Form where
import Protolude
import Servant.Multipart
-- | Lookup a textual input with the given @name@ attribute.
lookupInputs :: Text -> MultipartData tag -> Maybe [Text]
lookupInputs iname = Just . fmap iValue . filter ((==iname) . iName) . inputs
data UserLoginForm = UserLoginForm {
userLoginFormEma... | null | https://raw.githubusercontent.com/FlogFr/FlashCard/17029f9b84f23c43f67702b77bd7418cdf0a9d28/src/Form.hs | haskell | | Lookup a textual input with the given @name@ attribute. | module Form where
import Protolude
import Servant.Multipart
lookupInputs :: Text -> MultipartData tag -> Maybe [Text]
lookupInputs iname = Just . fmap iValue . filter ((==iname) . iName) . inputs
data UserLoginForm = UserLoginForm {
userLoginFormEmail :: Text
, userLoginFormPassword :: Text
} deriving ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.