_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 |
|---|---|---|---|---|---|---|---|---|
44118337a6914d155f1119f018c49c331da03cd3002df969f5b9b0e6d037a4c7 | glotcode/glot-www | Handler.hs | module Util.Handler (
urlDecode',
title,
titleConcat,
addDomainToTitle,
maybeApiUser,
pageNo,
apiRequestHeaders,
setCanonicalUrl,
lookupApiUser,
lookupLanguage,
getLanguage,
JsonErrorResponse(..),
fromMaybeOrJsonError,
) where
import Import
import Prelude (read)
impo... | null | https://raw.githubusercontent.com/glotcode/glot-www/cef0d7d00c0b0501fa2fdc407a26d13b19b84bd9/Util/Handler.hs | haskell | module Util.Handler (
urlDecode',
title,
titleConcat,
addDomainToTitle,
maybeApiUser,
pageNo,
apiRequestHeaders,
setCanonicalUrl,
lookupApiUser,
lookupLanguage,
getLanguage,
JsonErrorResponse(..),
fromMaybeOrJsonError,
) where
import Import
import Prelude (read)
impo... | |
78b45459e3ac2bdd91ae4e9cfa3d9d33c1c01ce6a49f988559cfadecef0db604 | digital-asset/ghc | T2806.hs |
# LANGUAGE MagicHash #
{-# OPTIONS_GHC -Wunbanged-strict-patterns #-}
-- Trac #2806
module Foo where
import GHC.Base
foo :: Int
foo = 3
where (I# _x) = 4
| null | https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/typecheck/should_fail/T2806.hs | haskell | # OPTIONS_GHC -Wunbanged-strict-patterns #
Trac #2806 |
# LANGUAGE MagicHash #
module Foo where
import GHC.Base
foo :: Int
foo = 3
where (I# _x) = 4
|
ea0282d7004259f4141731a01682b77cb3d29687beb618b72572bdd70f1fb57e | starbelly/hydro | prop_hydro_api.erl | -module(prop_hydro_api).
-include_lib("proper/include/proper.hrl").
%%%%%%%%%%%%%%%%%%
%%% Properties %%%
%%%%%%%%%%%%%%%%%%
prop_random_uniform() ->
?FORALL({I},{non_neg_integer()},
begin
is_integer(hydro_api:random_uniform(I))
end).
prop_random_u32() ->
?FORALL({}, {},
begin
is_integer(hydro_api:... | null | https://raw.githubusercontent.com/starbelly/hydro/ca408c3fbf196d6028fd7af2d71c4348812bf757/test/prop_hydro_api.erl | erlang |
Properties %%%
Helpers %%%
Generators %%%
| -module(prop_hydro_api).
-include_lib("proper/include/proper.hrl").
prop_random_uniform() ->
?FORALL({I},{non_neg_integer()},
begin
is_integer(hydro_api:random_uniform(I))
end).
prop_random_u32() ->
?FORALL({}, {},
begin
is_integer(hydro_api:random_u32())
end).
prop_random_ratchet() ->
?FORALL... |
f96d95917eda9bc61c377d7d87d520e79b868d01f54f16aee63a8b0ab84f1b52 | ledger/ledger4 | Commodity.hs | # LANGUAGE DefaultSignatures #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module Ledger.Commodity
( Commodity
, Commodit... | null | https://raw.githubusercontent.com/ledger/ledger4/0dd4d772dbd6a94ef83398e79e9acab2029a5a3a/commodities/Ledger/Commodity.hs | haskell | # LANGUAGE OverloadedStrings #
| Commodities are simply indices into a commodity info map, which relates
such commodities to the information known about them.
| All of the information known about a commodity.
immediately.
| A commodities map, relating commodity indices to information about
those commodities... | # LANGUAGE DefaultSignatures #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module Ledger.Commodity
( Commodity
, CommodityInfo(..), HasCommodityInfo(..)
... |
8d9375294af7d1a4c3ef4ed597c1eb5706a45011b636c8b4ec351a6812f51b88 | hypirion/swearjure | Reader.hs | {-# OPTIONS_GHC -Wall -Werror #-}
module Swearjure.Reader where
import Control.Applicative ((<$>), (<*>))
import Control.Monad.Except
import Control.Monad.State
import qualified Data.Generics.Fixplate as F
import Data.Generics.Fixplate hiding (mapM)
import Data.List (... | null | https://raw.githubusercontent.com/hypirion/swearjure/ee0db2f95e112820aba54daa643688c58c861ae1/src/Swearjure/Reader.hs | haskell | # OPTIONS_GHC -Wall -Werror #
-^ if we could move nses, this would've forced this fn to be of
traversal is over a desugared ast.
randomization of sets and hash maps
TODO: This is hacky. |
module Swearjure.Reader where
import Control.Applicative ((<$>), (<*>))
import Control.Monad.Except
import Control.Monad.State
import qualified Data.Generics.Fixplate as F
import Data.Generics.Fixplate hiding (mapM)
import Data.List (elemIndex)
import qualified Data.M... |
e77bfaa7d2dc555a14ce418c93c6b7a0c8ac69d317f27a1d9c6986a28c4ee8cb | 23Skidoo/ghc-parmake | B.hs | module B
where
bString :: String
bString = "another string"
| null | https://raw.githubusercontent.com/23Skidoo/ghc-parmake/c4d7fb042f5138588fa54d0153be1aee93db3835/tests/data/executable-lhs/B.hs | haskell | module B
where
bString :: String
bString = "another string"
| |
36caf285d7b7e1015e9fb74618cceb38fa42279b606e173b7f6af75234def7c9 | BranchTaken/Hemlock | u8.ml | (* Partial Rudiments. *)
open RudimentsInt0
module T = struct
module U = struct
type t = uns
let bit_length = 8L
end
include U
include Intnb.MakeU(U)
end
include T
module UZ = Convert.Make_nbU_wZ(T)(Zint)
let trunc_of_zint = UZ.trunc_of_x
let extend_to_zint = UZ.extend_to_x
let narrow_of_zint_opt = UZ... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/53da5c0d9cf0c94d58b4391735d917518eec67fa/bootstrap/src/basis/u8.ml | ocaml | Partial Rudiments. | open RudimentsInt0
module T = struct
module U = struct
type t = uns
let bit_length = 8L
end
include U
include Intnb.MakeU(U)
end
include T
module UZ = Convert.Make_nbU_wZ(T)(Zint)
let trunc_of_zint = UZ.trunc_of_x
let extend_to_zint = UZ.extend_to_x
let narrow_of_zint_opt = UZ.narrow_of_x_opt
let narr... |
cba4214c164f3cc4ca878ec7f0a7f6b31cf0fbf2446184eda1f4c03e301d650c | wedesoft/aiscm | xorg_scale_image.scm | (use-modules (aiscm magick) (aiscm xorg) (aiscm image) (aiscm core))
(show (to-image (read-image "fubk.png")) #:shape '(576 768))
| null | https://raw.githubusercontent.com/wedesoft/aiscm/2c3db8d00cad6e042150714ada85da19cf4338ad/tests/integration/xorg_scale_image.scm | scheme | (use-modules (aiscm magick) (aiscm xorg) (aiscm image) (aiscm core))
(show (to-image (read-image "fubk.png")) #:shape '(576 768))
| |
7a8213efeeba4e41c897560213b04ffcad19170404ab8f85237103b8fb7a8a3f | ayamada/cac2020 | status.cljs | (ns cac2020.game.status
(:require-macros [cac2020.macro :as m])
(:require [clojure.string :as string]
["pixi.js" :as pixi]
["va5" :as va5]
[cac2020.property :as p :include-macros true]
[cac2020.util :as util]
[cac2020.space :as space]
[cac2020.... | null | https://raw.githubusercontent.com/ayamada/cac2020/99d249ce9b9b0e2cf856ddeaea22796ce60d4fa7/src/main/cac2020/game/status.cljs | clojure | (ns cac2020.game.status
(:require-macros [cac2020.macro :as m])
(:require [clojure.string :as string]
["pixi.js" :as pixi]
["va5" :as va5]
[cac2020.property :as p :include-macros true]
[cac2020.util :as util]
[cac2020.space :as space]
[cac2020.... | |
5ad63bad7964a68eaba04e5cb85a36b22d4756b480d6e2c8fd96c0b92c9cafa2 | MLstate/opalang | qmlTracker.mli |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/libqmlcompil/qmlTracker.mli | ocaml | *
Regular ast printer:
print the full code using the Pretty Printer of the language
and insering multiple new lines so that meld can better do
the correspondancy between values.
*
Outputs only the toplevel values without the bodies, like :
{[
type toto
dbval ...
a
b
... |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... |
14471dbb3bdaee1c6f7c8e0f4e3a08a7828dc855db0b7160dbc6a8f6eeb32253 | WhatsApp/erlfmt | assert_diagnostic_SUITE.erl | Copyright ( c ) Facebook , Inc. and its affiliates .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing,... | null | https://raw.githubusercontent.com/WhatsApp/erlfmt/8efa327491aef58f149c032b24588e211975862d/test/assert_diagnostic_SUITE.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 or implied.
See the License for the specific language governing perm... | Copyright ( c ) Facebook , Inc. and its affiliates .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(assert_diagnostic_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("stdlib/include/assert.hrl").
... |
6b6ecf2ecc6f4543eaf2b733c17054c55abebe4e01aff65e4034bbeb3680c9d4 | abrantesasf/sicp-abrantes-study-guide | exercise-m1.2.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Structure and Interpretation of Computer Programs , 2 . ed . ; ; ; ; ;
Instructor Manual , Section 1.1 , Exercise M1.2 ; ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Student : ... | null | https://raw.githubusercontent.com/abrantesasf/sicp-abrantes-study-guide/c8d41093ed3d9944f003e88b7e1b7b29fbb6874a/1/1.1/sicp-im/exercise-m1.2.scm | scheme |
; ; ; ;
; ; ; ;
; ; ; ;
; ; ; ;
Use the evaluation rule of section 1.1.3 to describe the process
of evaluating the expression:
subexpressions *, pi, (* radius radius), in any order.
* => compound procedure to multiply
pi => value associated with the name "pi"
(* radius radius) => t... |
(* pi (* radius radius))
1 ) This is a combination , so the interpreter evaluates the
2 ) The result of this initial evaluation is :
Now the interpreter APPLY the value of the first subexpression
Now the interpreter APPLY the value of the first subexpression
3 ) The " tree accumulation " is as ... |
06d165cf035d5739eea9289d0a14f55f587fc07714ab47ea5046c0ae6cd4ae20 | facebookincubator/retrie | Golden.hs | Copyright ( c ) Facebook , Inc. and its affiliates .
--
This source code is licensed under the MIT license found in the
-- LICENSE file in the root directory of this source tree.
--
# LANGUAGE RecordWildCards #
module Golden
( RetrieTest(..)
, runQueryTest
, runTest
, displayAndAssertEqual
, withTmpCopyOf... | null | https://raw.githubusercontent.com/facebookincubator/retrie/4b59de66e2b04b7e737c23592c86f6253e5e7a53/tests/Golden.hs | haskell |
LICENSE file in the root directory of this source tree.
A 'writeFn' is only executed if the module changes, so add empty imports
to trip the Changed flag.
Copies input dir, mapping *.test to *.hs,
and provides a filepath to the root
of the copy. Deletes the copy when done.
^ Keep the contents when done
^ Dire... | Copyright ( c ) Facebook , Inc. and its affiliates .
This source code is licensed under the MIT license found in the
# LANGUAGE RecordWildCards #
module Golden
( RetrieTest(..)
, runQueryTest
, runTest
, displayAndAssertEqual
, withTmpCopyOfInputs
, listDir
) where
import Control.DeepSeq (force)
impo... |
5bac5e4d59f5678a918b9d2a33c62a56406b026950eba31a3bb795d59d3da202 | Clozure/ccl | cocoa-defaults.lisp | ;;;-*-Mode: LISP; Package: GUI -*-
;;;
;;; Copyright 2004 Clozure Associates
;;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;;; you may not use this file except in compliance with the License.
;;; You may obtain a copy of the License at
;;;
;;; -2.0
;;;
;;; Unless required by applicable... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/cocoa-ide/cocoa-defaults.lisp | lisp | -*-Mode: LISP; Package: GUI -*-
Copyright 2004 Clozure Associates
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 ... | distributed under the License is distributed on an " AS IS " BASIS ,
(in-package "GUI")
(defstruct cocoa-default
)
(let* ((cocoa-defaults ()))
(defun %get-cocoa-default (name)
(find name cocoa-defaults :key #'cocoa-default-symbol))
(defun %put-cocoa-default (default)
(push default cocoa-defaults))
... |
fb88bb937497da331ba23e049dc95d9911921d13e7124de4ae74ff8259bf308e | geoffder/dometyl-keyboard | connect.mli | open OCADml
open OSCADml
(** Shape(s) connecting walls together, and the points along the outside and inside of the
foot. *)
type t =
{ scad : Scad.d3
; outline : Path3.t
; inline : Path3.t
}
[@@deriving cad]
type config
(** An empty connection (shapeless with empty paths) *)
val empty : t
(** [clockwis... | null | https://raw.githubusercontent.com/geoffder/dometyl-keyboard/1c11268ef4babe10a066ac83d6f488fa9ffad0ab/lib/connect.mli | ocaml | * Shape(s) connecting walls together, and the points along the outside and inside of the
foot.
* An empty connection (shapeless with empty paths)
* [clockwise_union ts]
Create a union of [ts]. They should be provided in clockwise
order, such that the outline and inline of the resulting {!t} are continous... | open OCADml
open OSCADml
type t =
{ scad : Scad.d3
; outline : Path3.t
; inline : Path3.t
}
[@@deriving cad]
type config
val empty : t
val clockwise_union : t list -> t
val outline_2d : t -> Path2.t
val inline_2d : t -> Path2.t
* [ full_join ? slices ? max_angle ? ( ) ]
Configure a full joining (... |
6c358ffa3a9308ef8b3eed4e60424a70f8f5103371e54df059825ab239c5eba9 | sshirokov/hinge | request.lisp | (in-package :hinge.http)
(defclass http-request (emitter)
((peer :initarg :peer :accessor peer)
(http-method :initarg :http-method :accessor http-method)
(resource :initarg :resource :accessor resource)
(version :initarg :version :accessor version)
(headers :initarg :headers :accessor headers)
(body :... | null | https://raw.githubusercontent.com/sshirokov/hinge/4b1d4d2a9b17948402ccc670342cc5684c633226/src/http/request.lisp | lisp | Response API
Response methods | (in-package :hinge.http)
(defclass http-request (emitter)
((peer :initarg :peer :accessor peer)
(http-method :initarg :http-method :accessor http-method)
(resource :initarg :resource :accessor resource)
(version :initarg :version :accessor version)
(headers :initarg :headers :accessor headers)
(body :... |
1be0d58dd76d06b0231f2e268095108bc5d373fe54297ce92fbae881a1938aa3 | leanil/LambdaGen | Recursion.hs | # LANGUAGE AllowAmbiguousTypes , DataKinds , FlexibleContexts , PatternSynonyms , TypeFamilies , TypeOperators #
module Recursion where
import Control.Applicative ((<$>))
import Control.Comonad (extract)
import Control.Comonad.Cofree (Cofree ((:<)))
import qualified Control.Comonad.Trans.Cofree as CofreeT (CofreeF ((... | null | https://raw.githubusercontent.com/leanil/LambdaGen/aff49962759c1ce1fcfb2a1cc4a9a11d78e713a9/src/Recursion.hs | haskell | ignoreAlg :: Algebra t a -> Algebra (Cofree (Base t) b) a | # LANGUAGE AllowAmbiguousTypes , DataKinds , FlexibleContexts , PatternSynonyms , TypeFamilies , TypeOperators #
module Recursion where
import Control.Applicative ((<$>))
import Control.Comonad (extract)
import Control.Comonad.Cofree (Cofree ((:<)))
import qualified Control.Comonad.Trans.Cofree as CofreeT (CofreeF ((... |
af15f8e0c8522b2988b6106bffc49f292546867e03c7d233ab913a9d323f4e5d | radian628/lispsmos | procedure2.lisp | ; Configure procedural/action code
(procedureConfig
(desmosEntryPoint main)
(pointerStack ps)
(programCounter pc)
)
(= a 0)
(procedure main
(while (< a 10)
(if (> a 5)
(-> a (+ a 1))
)
)
) | null | https://raw.githubusercontent.com/radian628/lispsmos/d876f7e81129c1990ea1007dadb04cf5d1641d9d/test/internal/procedure2.lisp | lisp | Configure procedural/action code | (procedureConfig
(desmosEntryPoint main)
(pointerStack ps)
(programCounter pc)
)
(= a 0)
(procedure main
(while (< a 10)
(if (> a 5)
(-> a (+ a 1))
)
)
) |
f5cf4836f5d68736a8eb06c12298bf132b9a027ad5d4254d9d0777d9e6dc1fad | racket/racket7 | tcp-port.rkt | #lang racket/base
(require "../common/check.rkt"
"../host/rktio.rkt"
"../port/port.rkt"
"../port/input-port.rkt"
"../port/output-port.rkt"
"../port/fd-port.rkt")
(provide open-input-output-tcp
tcp-port?
tcp-abandon-port)
(struct tcp-data (abandon-in? aban... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/io/network/tcp-port.rkt | racket | in atomic mode
in atomic mode | #lang racket/base
(require "../common/check.rkt"
"../host/rktio.rkt"
"../port/port.rkt"
"../port/input-port.rkt"
"../port/output-port.rkt"
"../port/fd-port.rkt")
(provide open-input-output-tcp
tcp-port?
tcp-abandon-port)
(struct tcp-data (abandon-in? aban... |
549e02ad19bc8b4bc33e3a2b024493f9b04069c373edcc8f1b349965c12bdad4 | fjvallarino/monomer | Split.hs | |
Module : . Widgets . Containers . Split
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Splits the assigned space into two areas , vertically or horizontally , which are
assigned to its ... | null | https://raw.githubusercontent.com/fjvallarino/monomer/b8d3b82b50719204385179614f06bae283f90303/src/Monomer/Widgets/Containers/Split.hs | haskell | # LANGUAGE StrictData #
* Configuration
* Constructors
| Lens to a model field which provides the handle position.
| Value which provides the handle position.
| Width of the handle.
| Whether to ignore changes in size to its children.
^ The child nodes.
^ The created split.
^ The config options.
^ The child n... | |
Module : . Widgets . Containers . Split
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Splits the assigned space into two areas , vertically or horizontally , which are
assigned to its ... |
4420675608a9a4a5b9289b32a0f3ec88ee944817453ccf9582bcdb1a2473a8ac | RedPRL/asai | Span.ml | type position = {
file_path : string;
offset : int;
start_of_line : int;
line_num : int;
}
type t = {
file_path : string;
begin_offset : int;
begin_start_of_line : int;
begin_line_num : int;
end_offset : int;
end_start_of_line : int;
end_line_num : int;
}
let make (begin_ : position) (end_ : pos... | null | https://raw.githubusercontent.com/RedPRL/asai/9c3bf78637abdd6157c5f582a9bcbac28eec0978/src/core/Span.ml | ocaml | type position = {
file_path : string;
offset : int;
start_of_line : int;
line_num : int;
}
type t = {
file_path : string;
begin_offset : int;
begin_start_of_line : int;
begin_line_num : int;
end_offset : int;
end_start_of_line : int;
end_line_num : int;
}
let make (begin_ : position) (end_ : pos... | |
e42c7e2bf118031a6c4da54eccbf3bcf923627e75a41da8b61b52110b930c0a5 | softwarelanguageslab/maf | R5RS_various_kcfa3-2.scm | ; Changes:
* removed : 0
* added : 2
* swaps : 0
; * negated predicates: 0
; * swapped branches: 0
; * calls to id fun: 0
(let ((res ((lambda (f1) (letrec ((a (f1 #t))) (f1 #f)))
(lambda (x1)
((lambda (f2) (letrec ((b (f2 #t))) (f2 #f)))
(lambda (x2)
... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_various_kcfa3-2.scm | scheme | Changes:
* negated predicates: 0
* swapped branches: 0
* calls to id fun: 0 | * removed : 0
* added : 2
* swaps : 0
(let ((res ((lambda (f1) (letrec ((a (f1 #t))) (f1 #f)))
(lambda (x1)
((lambda (f2) (letrec ((b (f2 #t))) (f2 #f)))
(lambda (x2)
((lambda (f3) (letrec ((c (f3 #t))) (f3 #f)))
(lambd... |
fe0c7f49d87e768d1dcd77f652af92200bb43f87fbb60179ed1b0b38e7c02cad | liquidz/clj-xmas | build.clj | (ns build
(:require
[clojure.tools.build.api :as b]))
(def ^:private class-dir "target/classes")
(def ^:private uber-file "target/clj-xmas.jar")
(def ^:private main 'xmas.core)
(def ^:private basis (b/create-basis {:project "deps.edn"}))
(defn uberjar
"clojure -T:build uberjar"
[_]
(b/copy-dir... | null | https://raw.githubusercontent.com/liquidz/clj-xmas/c399dd472c696cf265b989762b9ed4d6361817c3/build.clj | clojure | (ns build
(:require
[clojure.tools.build.api :as b]))
(def ^:private class-dir "target/classes")
(def ^:private uber-file "target/clj-xmas.jar")
(def ^:private main 'xmas.core)
(def ^:private basis (b/create-basis {:project "deps.edn"}))
(defn uberjar
"clojure -T:build uberjar"
[_]
(b/copy-dir... | |
5b9b03dd68353101e7ed3b918d0883cc7173c5c55c75b29a9365c192d144acd2 | jfaure/Irie-lang | Prim.hs | -- Primitives: literals and instructions
conversions from Prim to instructions / types
PrimInstr is a superset of LLVM.AST.Instruction
module Prim where
import Prelude hiding (show)
import GHC.Show (Show(..))
data Literal
= Char Char
| I32 Int
| Int Integer -- convenience
| Fin Int Integer
-- | Frac Rational
... | null | https://raw.githubusercontent.com/jfaure/Irie-lang/186640a095d14560ff102ef613648e558e5b3f1e/compiler/Prim.hs | haskell | Primitives: literals and instructions
convenience
| Frac Rational
gmp
gmp
incl. tuples ?
| Tuple [Literal]
| WildCard -- errors on evaluation
---------
types --
---------
typeBits
=~ gmp int
POSIXTypes require the backend to include C headers
----------------
Instructions --
----------------
no-op ca... | conversions from Prim to instructions / types
PrimInstr is a superset of LLVM.AST.Instruction
module Prim where
import Prelude hiding (show)
import GHC.Show (Show(..))
data Literal
= Char Char
| I32 Int
| Fin Int Integer
| String [Char]
data PrimType
| PrimNat !Int
| PrimBigNat
| PrimFloat !FloatTy
| ... |
a7ce197b6ee95f5f26bc79e232e9db2d15cf2661c38278c13de56eff7c94bb1f | eeng/mercurius | trade_processor.clj | (ns mercurius.trading.adapters.processes.trade-processor
(:require [taoensso.timbre :as log]
[mercurius.core.domain.messaging.event-bus :refer [listen]]))
(defn new-trade-processor [{:keys [event-bus process-trade]}]
(log/info "Starting trade processor")
(listen event-bus
:trade-made
... | null | https://raw.githubusercontent.com/eeng/mercurius/f83778ddde99aa13692e4fe2e70b2e9dc2fd70e9/src/mercurius/trading/adapters/processes/trade_processor.clj | clojure | (ns mercurius.trading.adapters.processes.trade-processor
(:require [taoensso.timbre :as log]
[mercurius.core.domain.messaging.event-bus :refer [listen]]))
(defn new-trade-processor [{:keys [event-bus process-trade]}]
(log/info "Starting trade processor")
(listen event-bus
:trade-made
... | |
36741f7cdf4360f999be846eeb036586e4507e65e836a20244866b657adaaa68 | andrei-dubovik/centrality | linked-hash-table.lisp | Copyright ( c ) 2020 < >
;; Linked hash tables (ordered dictionaries)
;; Structure: a linked hash table is a cons of a doubly-linked list
;; and a hash table. The elements of the list are (key . value). The
;; elements of the hash table are references to the respective list
;; nodes.
(in-package :centrality)
(... | null | https://raw.githubusercontent.com/andrei-dubovik/centrality/b2f86bc045fe3712b543ae28843127781ffee80f/src/linked-hash-table.lisp | lisp | Linked hash tables (ordered dictionaries)
Structure: a linked hash table is a cons of a doubly-linked list
and a hash table. The elements of the list are (key . value). The
elements of the hash table are references to the respective list
nodes. | Copyright ( c ) 2020 < >
(in-package :centrality)
(defmacro dict-hash (dict)
`(car ,dict))
(defmacro dict-chain (dict)
`(cdr ,dict))
(defun make-dict (&rest rest)
"Make an empty ordered dictionary"
(cons (apply #'make-hash-table rest) (make-chain)))
(defun getkey (key dict &optional default)
"Retr... |
de17488610be015cd5484a570007245a7a7a8c872074da2192b169f1f96df7b7 | OlivierSohn/hamazed | World.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NoImplicitPrelude #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
module Imj.Game.Hamazed.World
( -- * Level
| There are 12 levels in Hamazed , numbered from 1 to 12 .
-}
Level(..)
-- ** Level termination
| [ Target number ]
Ea... | null | https://raw.githubusercontent.com/OlivierSohn/hamazed/6c2b20d839ede7b8651fb7b425cb27ea93808a4a/imj-game-hamazed/src/Imj/Game/Hamazed/World.hs | haskell | # LANGUAGE OverloadedStrings #
* Level
** Level termination
* World
** World size
** Update World
are updated according to their speeds.
** Draw World
* Space
** Simple creation
** Randomized creation
** Collision detection
| 'location' is the standard collision detection function that considers
that ... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
module Imj.Game.Hamazed.World
| There are 12 levels in Hamazed , numbered from 1 to 12 .
-}
Level(..)
| [ Target number ]
Each level has a different /target number/ which represents the sum of shot
... |
250033391c42934e2d9439c395514bc2161aa71ee88ba1fb928147dfc9150736 | modular-macros/ocaml-macros | inline_test.ml |
(* A test for inlined stack backtraces *)
let f x =
raise (Failure "test") + 1
let g x =
f x + 1
let h x =
print_int (g x); print_endline "h"
let i x =
if h x = () then ()
let () =
Printexc.record_backtrace true;
i ()
| null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/backtrace/inline_test.ml | ocaml | A test for inlined stack backtraces |
let f x =
raise (Failure "test") + 1
let g x =
f x + 1
let h x =
print_int (g x); print_endline "h"
let i x =
if h x = () then ()
let () =
Printexc.record_backtrace true;
i ()
|
daf192e43fc1504e5fc3f333197851297dc20d9f023fdc3027fa60976107d9fc | mfikes/coal-mine | problem_14.cljc | (ns coal-mine.problem-14
(:require [coal-mine.checks :refer [defcheck-14] :rename {defcheck-14 defcheck}]
[clojure.test]))
(defcheck solution-166c2c8b
8 8 8 8)
(defcheck solution-34c147e7
((fn add-five [x] (+ x 5)) 3))
(defcheck solution-4f825ac4
8)
(defcheck solution-5d05a2fe
(#(+ % 5) 3))
(... | null | https://raw.githubusercontent.com/mfikes/coal-mine/0961d085b37f4e59489a8cf6a2b8fef0a698d8fb/src/coal_mine/problem_14.cljc | clojure | (ns coal-mine.problem-14
(:require [coal-mine.checks :refer [defcheck-14] :rename {defcheck-14 defcheck}]
[clojure.test]))
(defcheck solution-166c2c8b
8 8 8 8)
(defcheck solution-34c147e7
((fn add-five [x] (+ x 5)) 3))
(defcheck solution-4f825ac4
8)
(defcheck solution-5d05a2fe
(#(+ % 5) 3))
(... | |
bf78469ee7684afd1ab0f11208dae8e3b06fad2bb0b337ab028d5d12325c5c22 | qitab/pyjure | eval.clj | (ns pyjure.eval
(:use [clojure.core.match :only [match]]
[pyjure.debug]
[pyjure.utilities]
[pyjure.parsing]
[pyjure.runtime]))
(defn evaluate- [x]
(binding [*ns* (find-ns (or (:namespace (meta x)) 'pyjure.user))]
(eval x)))
| null | https://raw.githubusercontent.com/qitab/pyjure/b9aa49b4f74c85f2b617e924f61eaddb194119bf/src/pyjure/eval.clj | clojure | (ns pyjure.eval
(:use [clojure.core.match :only [match]]
[pyjure.debug]
[pyjure.utilities]
[pyjure.parsing]
[pyjure.runtime]))
(defn evaluate- [x]
(binding [*ns* (find-ns (or (:namespace (meta x)) 'pyjure.user))]
(eval x)))
| |
6c61725a71df5839d57486f118e63eb1d0ab67a8c4ecf01071e77f25eefe472f | facebook/duckling | Rules.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
module Duckling.AmountOfMo... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/AmountOfMoney/EN/TT/Rules.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
# LANGUAGE LambdaCase #
module Duckling.AmountOfMoney.EN.TT.Rules
( rules
) where
import Data.HashMap.Strict (HashMap)
import Data.String
import Data.Text (Text)
import Prelude
import Duckling.AmountOfMoney.Helpers
import Duckling.AmountOfMoney.Types (Currency(... |
3460d28d791d7931155f589df42c5251940f6f457f8fe24ff8925e11c1c37ec1 | pixlsus/registry.gimp.org_static | sample-gradient-along-path.scm | ; sample-gradient-along-path.scm
by
;
Version 1.2 ( 20100625 )
; Description
;
; Script to create a gradient by sampling along a path
Will appear in the Gradients Menu
;
; Changes
1.1 - Added option to sample alpha as well .
; 1.2 - Clamp on image boundaries to fix error when path is outsi... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/sample-gradient-along-path.scm | scheme | sample-gradient-along-path.scm
Description
Script to create a gradient by sampling along a path
Changes
1.2 - Clamp on image boundaries to fix error when path is outside image
License:
This program is free software; you can redistribute it and/or modify
either version 2 of the License , or
... | by
Version 1.2 ( 20100625 )
Will appear in the Gradients Menu
1.1 - Added option to sample alpha as well .
it under the terms of the GNU General Public License as published by
The GNU Public License is available at
(define (script-fu-sample-gradient-along-path img inLayer inPath inSample... |
497a5d3aab0d946afac0e30950fbe107ae1ce6ea387177c2e99e3a9925870f09 | patricoferris/ocaml-multicore-monorepo | alpn.ml | type 'c capability = Rd : [ `read ] capability | Wr : [ `write ] capability
type body =
| Body_HTTP_1_1 : 'c capability * 'c httpaf_body -> body
| Body_HTTP_2_0 : 'c capability * 'c H2.Body.t -> body
and _ httpaf_body =
| Body_wr : Httpaf.Body.Writer.t -> [ `write ] httpaf_body
| Body_rd : Httpaf.Body.Reader.... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/dream/src/vendor/paf/lib/alpn.ml | ocaml | type 'c capability = Rd : [ `read ] capability | Wr : [ `write ] capability
type body =
| Body_HTTP_1_1 : 'c capability * 'c httpaf_body -> body
| Body_HTTP_2_0 : 'c capability * 'c H2.Body.t -> body
and _ httpaf_body =
| Body_wr : Httpaf.Body.Writer.t -> [ `write ] httpaf_body
| Body_rd : Httpaf.Body.Reader.... | |
da019c6304c55547d062c21d816c1a0fbe13b214985c1d47fa4534175bca296a | craigfe/sink | indexable.ml | module type General = sig
type 'a t
type 'a elt
val length : 'a t -> int
val get : 'a t -> int -> 'a elt
end
module type Functional = sig
include General
* @inline
val sort : 'a elt Ord.t -> 'a t -> 'a t
end
module type Mutable = sig
include General
* @inline
val sort : 'a elt Ord.t -> 'a t -> unit... | null | https://raw.githubusercontent.com/craigfe/sink/c5431edfa1b06f1a09845a481c4afcb3e92f0667/src/sink/indexable.ml | ocaml | module type General = sig
type 'a t
type 'a elt
val length : 'a t -> int
val get : 'a t -> int -> 'a elt
end
module type Functional = sig
include General
* @inline
val sort : 'a elt Ord.t -> 'a t -> 'a t
end
module type Mutable = sig
include General
* @inline
val sort : 'a elt Ord.t -> 'a t -> unit... | |
8b937cc17fd5b819873dff52cca8ab0cbb334fb668f499edd30f7f2216410279 | a9032676/Codewars-Haskell | ShortestList.hs | module ShortestList where
import Data.List hiding (tails)
shortestList :: [[a]] -> [a]
shortestList [] = []
shortestList xs = let l = dropEnd xs in shortest (repeat []) l
where
heads = map (take 1)
tails = map (drop 1)
shortest r l = maybe (shortest (zipWith (++) r (heads l)) $ tails l) (r... | null | https://raw.githubusercontent.com/a9032676/Codewars-Haskell/6eccd81e9b6ae31b5c0a28ecc16b933f3abae1a5/src/ShortestList.hs | haskell | shortest' :: [[a]] -> [[a]] -> [a]
shortest' r l = case findIndex null l of
Nothing -> shortest' (zipWith (++) r (heads l)) (tails l)
Just i -> r !! i
[[1,2,3], [4,5,6], [7,8]]
[
[4,5,6,4,5,6,4,5,6,4,5,6,...],
[]
] | module ShortestList where
import Data.List hiding (tails)
shortestList :: [[a]] -> [a]
shortestList [] = []
shortestList xs = let l = dropEnd xs in shortest (repeat []) l
where
heads = map (take 1)
tails = map (drop 1)
shortest r l = maybe (shortest (zipWith (++) r (heads l)) $ tails l) (r... |
f23ccc268f9e6205f7ae620e1782b9aa58e2080a6cad0d4b40db9e16af5da641 | ocamllabs/ocaml-modular-implicits | printexc.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/stdlib/printexc.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
open Printf;;
let printers = ref []
l... |
3b8a36f9534f3f6908ee87139c7e67f93e3373682cdc316e506f22b45f7cb492 | ghcjs/ghcjs-dom | AudioParam.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.AudioParam
(js_setValueAtTime, setValueAtTime, js_linearRampToValueAtTime,
line... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/AudioParam.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/AudioParam.exponentialRampToValueAtTime Mozilla AudioParam.exponentialRampToValueAtTime documentation> | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.AudioParam
(js_setValueAtTime, setValueAtTime, js_linearRampToValueAtTime,
linearRampToValueAtTime, js_exponentialRampToValueAtTime,
exponentialRampToValueAtTime, js_setT... |
d223c270084bb0aa4aa2fa7e2e87aad2d322b1cfb43dbe0e3ab6a712958c52a4 | k-stz/arcsynthesis | ortho-cube.lisp | (in-package #:arc-4)
(defvar *data-directory*
(merge-pathnames #p "4-chapter/data/" (asdf/system:system-source-directory :arcsynthesis)))
;; TODO: if external terminal runs lisp image, for slime output:
(defvar out *standard-output*) (defvar dbg *debug-io*) (defvar err *error-output*)
the first 36 values are v... | null | https://raw.githubusercontent.com/k-stz/arcsynthesis/586943e74a88b60bfb9d0e16de42635a0904bf5f/4-chapter/ortho-cube.lisp | lisp | TODO: if external terminal runs lisp image, for slime output:
vertices:
colors:
buffer object handle
program object
oh c'mon how to make it local
vertex array-buffer
color array-buffer
new hot code:
enables "face culling" i.e. certain triangles won't be rendered -- performace boostaaa
the "back" side of a tria... | (in-package #:arc-4)
(defvar *data-directory*
(merge-pathnames #p "4-chapter/data/" (asdf/system:system-source-directory :arcsynthesis)))
(defvar out *standard-output*) (defvar dbg *debug-io*) (defvar err *error-output*)
the first 36 values are vertices the next 36 colors
(defparameter *verts* #(
0.25 0.... |
5d5119e8425124ae1bbc060561e9c72098f67badb5afbf6bba83efe3f8f5ba95 | coq/coq | nativenorm.mli | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/00f1bee788b07fdb28082b0ae2d4669c464e78d9/pretyping/nativenorm.mli | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
15e29e81e401e248af013a0f3abdee79bb760e0e4309229bc2465686b89ed7ff | OCamlPro/freeton_ocaml_sdk | mod_debot_lwt.ml | (**************************************************************************)
(* *)
Copyright ( c ) 2021 OCamlPro SAS
(* *)
(* All right... | null | https://raw.githubusercontent.com/OCamlPro/freeton_ocaml_sdk/42a0d95252ed19c647fa86e9728af15d557fc5e3/src/freeton_client_lwt/mod_debot_lwt.ml | ocaml | ************************************************************************
All rights reserved.
This file is distributed u... | Copyright ( c ) 2021 OCamlPro SAS
Public License version 2.1 , with the special exception on linking
open Ton_client_lwt
include Ton_client.DEBOT
|
6992a6add8d39a918330192f63652fad356b7836461e11e9a063b491968baae9 | mariaschett/syrup-backend | params.ml | Copyright 2020 under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
distributed under the Li... | null | https://raw.githubusercontent.com/mariaschett/syrup-backend/8152b9e8f4e3e92f8d7837077442231ba4ccc06d/lib/params.ml | ocaml | words on source stack, top of stack at postion 0
"forall quantified" variables | Copyright 2020 under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
distributed under the Li... |
0d5d05212d515ae68cfa12743b8b0074ea48a837073847c4f687adf35c3fd4d2 | blindglobe/common-lisp-stat | plot-clplot.lisp | ;;; -*- mode: lisp -*-
Time - stamp : < 2009 - 04 - 23 17:23:56 >
Creation : < 2009 - 03 - 10 16:59:37 tony >
;;; File: plot.lisp
Author : < >
Copyright : ( c)2009 - - , . BSD , LLGPL , or GPLv2 , depending
;;; on how it arrives.
;;; Purpose: visualization and plotting ... | null | https://raw.githubusercontent.com/blindglobe/common-lisp-stat/0c657e10a4ee7e8d4ef3737f8c2d4e62abace2d8/src/visualize/plot-clplot.lisp | lisp | -*- mode: lisp -*-
File: plot.lisp
on how it arrives.
Purpose: visualization and plotting generics and methods.
What is this talk of 'release'? Klingons do not make software
'releases'. Our software 'escapes', leaving a bloody trail of
designers and quality assurance people in its wake.
... |
Time - stamp : < 2009 - 04 - 23 17:23:56 >
Creation : < 2009 - 03 - 10 16:59:37 tony >
Author : < >
Copyright : ( c)2009 - - , . BSD , LLGPL , or GPLv2 , depending
CL - PLPLOT experiments using the lispy interface .
all work for 2 - d graphics .
(asdf:oos 'asdf:load-op 'cl-plplot)... |
ae8e2f23ae15eff9a167f4d81c64504319ea73bc8c7e58fde075490737ea2ab5 | emqx/emqx | emqx_mqtt_caps_SUITE.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2018 - 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/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx/test/emqx_mqtt_caps_SUITE.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 ) 2018 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_mqtt_caps_SUITE).
-compile(export_all).
-compile(nowarn_export_all).
-include_lib... |
3ece15761680c3f220fad63224d475a7c5663091079e2f977eaba9d166a9a22b | Ptival/chick | Term.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - orphans #
module PrettyPrinting.Chick.Term
( boundTermDocBinder,
boundTermDocVariable,
)
where
import Bound.Name (instantiate1Name)
import Control.L... | null | https://raw.githubusercontent.com/Ptival/chick/a5ce39a842ff72348f1c9cea303997d5300163e2/backend/lib/PrettyPrinting/Chick/Term.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# OPTIONS_GHC -fno - warn - orphans #
module PrettyPrinting.Chick.Term
( boundTermDocBinder,
boundTermDocVariable,
)
where
import Bound.Name (instantiate1Name)
import Control.Lens (view)
import Control.Monad.Rea... |
4f50233e3aa41f99ff0198cd4e3e5d8fc2b108620f3951c86cc648e2db9faafb | aaronallen8455/inventory | Spec.hs | import Data.Bifunctor
import Data.Map.Append.Strict (AppendMap(..))
import qualified Data.Map.Strict as M
import Data.Monoid
import Test.Tasty
import Test.Tasty.HUnit
import DefCounts.ProcessHie
import GHC.Api
import GHC.DynFlags
import ... | null | https://raw.githubusercontent.com/aaronallen8455/inventory/e16244f2c3b920ec0caffc4b81d236219b78bd91/test/Spec.hs | haskell | import Data.Bifunctor
import Data.Map.Append.Strict (AppendMap(..))
import qualified Data.Map.Strict as M
import Data.Monoid
import Test.Tasty
import Test.Tasty.HUnit
import DefCounts.ProcessHie
import GHC.Api
import GHC.DynFlags
import ... | |
29bab8588d3df49a6c0adb603b66595ef9b061c2b085eda436eefa0a23788b16 | caadxyz/caad4lisp | package.lisp | (defpackage caad4lisp
(:use :cl)
(:export
#:Util-Working
#:Util-Functionp
#:Util-Symbolp
#:Util-Math-Odd?
#:Util-Data-GetDataByKey
#:Util-Data-GetEntType
#:Geom-X
#:Geom-Y
#:Geom-Z
#:Geom-Line-MakeStruct
#:Geom-Line-Flip
#:Geom-Line-GetParamAtIntersection
#:Geom... | null | https://raw.githubusercontent.com/caadxyz/caad4lisp/393eaa7893bdbf307a3615573fe22a8c1e2b9412/package.lisp | lisp | (defpackage caad4lisp
(:use :cl)
(:export
#:Util-Working
#:Util-Functionp
#:Util-Symbolp
#:Util-Math-Odd?
#:Util-Data-GetDataByKey
#:Util-Data-GetEntType
#:Geom-X
#:Geom-Y
#:Geom-Z
#:Geom-Line-MakeStruct
#:Geom-Line-Flip
#:Geom-Line-GetParamAtIntersection
#:Geom... | |
43b4972e78e7b3f6f317f8d484f2fbaf16482c7bcfdea0f90a783a7b929bd798 | TerrorJack/ghc-alter | Boot.hs | # LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module Language.Haskell.GHC.Alter.Boot
( BootTask(..)
, defaultBootTask
, bootLib
, boot
) where
import Control.Monad
import qualified Language.Haskell.GHC.Alter.BuildInfo as P
import qualified
Language.Haskell.GHC.Alter.BuildInfo.Splices.Unty... | null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/src/Language/Haskell/GHC/Alter/Boot.hs | haskell | # LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module Language.Haskell.GHC.Alter.Boot
( BootTask(..)
, defaultBootTask
, bootLib
, boot
) where
import Control.Monad
import qualified Language.Haskell.GHC.Alter.BuildInfo as P
import qualified
Language.Haskell.GHC.Alter.BuildInfo.Splices.Unty... | |
d586ba6e28aa7247b98d58ff8442d1654a6d25dafc42c4de91195bbfcb2a6843 | manetu/temporal-clojure-sdk | async.clj | Copyright © 2022 , Inc. All rights reserved
(ns temporal.test.async
(:require [clojure.test :refer :all]
[clojure.core.async :refer [go]]
[taoensso.timbre :as log]
[temporal.client.core :as c]
[temporal.workflow :refer [defworkflow]]
[temporal.activity... | null | https://raw.githubusercontent.com/manetu/temporal-clojure-sdk/a982c2d3d0161225998f32211f2d5c67b7419984/test/temporal/test/async.clj | clojure | Copyright © 2022 , Inc. All rights reserved
(ns temporal.test.async
(:require [clojure.test :refer :all]
[clojure.core.async :refer [go]]
[taoensso.timbre :as log]
[temporal.client.core :as c]
[temporal.workflow :refer [defworkflow]]
[temporal.activity... | |
265ca6135e083cfa2c1fc66d00255204325bea2faad7d9ffe3113d1136a9567b | iokasimov/pandora | Setoid.hs | module Pandora.Pattern.Object.Setoid (Setoid (..)) where
import Pandora.Paradigm.Primary.Object.Boolean (Boolean (False, True))
infix 8 ==, !=, ?=
{- |
> When providing a new instance, you should ensure it satisfies:
> * Reflexivity: x == x ≡ True
> * Symmetry: x == y ≡ y == x
> * Transitivity: x == y * y == z ≡ Tru... | null | https://raw.githubusercontent.com/iokasimov/pandora/4309c46c601ed371f4fd363f55c5dbce37eecccd/Pandora/Pattern/Object/Setoid.hs | haskell | |
> When providing a new instance, you should ensure it satisfies:
> * Reflexivity: x == x ≡ True
> * Symmetry: x == y ≡ y == x
> * Transitivity: x == y * y == z ≡ True ===> x == z ≡ True
> * Negation: x != y ≡ invert (x == y)
# MINIMAL (==) # | module Pandora.Pattern.Object.Setoid (Setoid (..)) where
import Pandora.Paradigm.Primary.Object.Boolean (Boolean (False, True))
infix 8 ==, !=, ?=
class Setoid a where
(==) :: a -> a -> Boolean
(!=) :: a -> a -> Boolean
(!=) x y = case x == y of
True -> False
False -> True
(?=) :: a -> a -> r -> r -> r
(... |
dae90cf2924d6b5caa6405dddb33393889d6257a932ebce2720bd22fc27c5e6f | noinia/hgeometry | GeneratePlanarSubdivisions.hs | # LANGUAGE ScopedTypeVariables #
module Demo.GeneratePlanarSubdivision where
import Algorithms.Geometry.DelaunayTriangulation.DivideAndConqueror
import Algorithms.Geometry.DelaunayTriangulation.Types
import Control.Lens
import Data.Data
import Data.Ext
import ... | null | https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry-examples/src/Demo/GeneratePlanarSubdivisions.hs | haskell | # LANGUAGE ScopedTypeVariables #
module Demo.GeneratePlanarSubdivision where
import Algorithms.Geometry.DelaunayTriangulation.DivideAndConqueror
import Algorithms.Geometry.DelaunayTriangulation.Types
import Control.Lens
import Data.Data
import Data.Ext
import ... | |
dd01409b49c818bd38938096e07977d92f18eb2a00c8486cf4304b3881cab9ab | wireapp/wire-server | Cassandra.hs | -- Disabling to stop warnings on HasCallStack
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
-- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General P... | null | https://raw.githubusercontent.com/wireapp/wire-server/72a03a776d4a8607b0a9c3e622003467be914894/services/spar/src/Spar/Sem/ScimUserTimesStore/Cassandra.hs | haskell | Disabling to stop warnings on HasCallStack
# OPTIONS_GHC -Wno-redundant-constraints #
This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY... |
Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module Spar.Sem.ScimUserTimesSt... |
816000c02d917eef09862091b84d8b48e67d1891e698722095ae6ca70c2bf5db | craigfe/sink | ref.mli | open! Import
type 'a t = 'a ref [@@implements Branded.S]
| null | https://raw.githubusercontent.com/craigfe/sink/c5431edfa1b06f1a09845a481c4afcb3e92f0667/src/sink/ref.mli | ocaml | open! Import
type 'a t = 'a ref [@@implements Branded.S]
| |
097dcdaee8aabae046430c1fdb900f7ae6fd7a165791399182937f4708999d21 | lisp-korea/sicp2014 | ex-1-07.scm | #lang planet neil/sicp
(define (square x)
(* x x))
(define (average x y)
(/ (+ x y) 2))
(define (sqrt-iter old-guess guess x)
(if (good-enough? old-guess guess x)
guess
(sqrt-iter guess (improve guess x) x)))
(define (good-enough? old-guess guess x)
(and
(< (abs (- (square guess) x)) 0.001)
... | null | https://raw.githubusercontent.com/lisp-korea/sicp2014/9e60f70cb84ad2ad5987a71aebe1069db288b680/vvalkyrie/1.1/ex-1-07.scm | scheme | #lang planet neil/sicp
(define (square x)
(* x x))
(define (average x y)
(/ (+ x y) 2))
(define (sqrt-iter old-guess guess x)
(if (good-enough? old-guess guess x)
guess
(sqrt-iter guess (improve guess x) x)))
(define (good-enough? old-guess guess x)
(and
(< (abs (- (square guess) x)) 0.001)
... | |
455ba46fccec0bff9fe35874533f6ba142ebf620af178cead1c51c9ee1efe47f | heshrobe/joshua-dist | sysdcl.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CL - USER ; Base : 10 ; Lowercase : Yes -*-
Copyright ( c ) 1994 - 2000 , .
Copyright ( c ) 2001 - 2003 , and .
;;; All rights reserved. No warranty is expressed or implied.
;;; See COPYRIGHT for full copyright and terms of use.
(in-package #-an... | null | https://raw.githubusercontent.com/heshrobe/joshua-dist/f59f06303f9fabef3e945a920cf9a26d9c2fd55e/clim-env/portable-lisp-environment/sysdcl.lisp | lisp | Syntax : ANSI - Common - Lisp ; Package : CL - USER ; Base : 10 ; Lowercase : Yes -*-
All rights reserved. No warranty is expressed or implied.
See COPYRIGHT for full copyright and terms of use.
Patches to the various Lisp systems...
Various utilities
The various "free-standing" commands
The various tools
Vari... |
Copyright ( c ) 1994 - 2000 , .
Copyright ( c ) 2001 - 2003 , and .
(in-package #-ansi-90 :user #+ansi-90 :common-lisp-user)
CLIM Environment system declaration
(eval-when (:load-toplevel :execute)
(let* ((loading-file *load-truename*)
(host (pathname-host loading-file))
(de... |
6084f74267e9e99ef7db45943511ecbe6967fdb7b57fc3475756d13f887ca578 | squaresLab/genprog-code | cdiff.ml |
* Structural Diff on C Programs
*
* --generate : given two C files , produce a data file and a text patch file
* that can be used to turn one into the other
*
* --use : given the data file and some subset of the text file , apply that
* subset of the changes to turn the first file into ( some... | null | https://raw.githubusercontent.com/squaresLab/genprog-code/7982415b347529efee02190ab9ba6bd7eda6195e/tools/ga/cdiff.ml | ocaml | Are we calling cdiff from repair?
Toggled if an exception is thrown in applydiff,
* meaning that the line being removed by minimization
* is necessary.
*** For doing line numbers of nodes... ***
Visit each expression, etc... print current location's line
Called by lineRangeVisitor to get the line numbers from ... |
* Structural Diff on C Programs
*
* --generate : given two C files , produce a data file and a text patch file
* that can be used to turn one into the other
*
* --use : given the data file and some subset of the text file , apply that
* subset of the changes to turn the first file into ( some... |
1e7349c76f7d795825f0c852f6eb07e4c94cbca9924746f74d137704d6b37fa0 | steffan-westcott/clj-otel | puzzle_service.clj | (ns example.manual-instrument.middleware.puzzle-service
"Example application demonstrating using `clj-otel` to add telemetry to a
synchronous Ring HTTP service that is run without the OpenTelemetry
instrumentation agent."
(:require [clj-http.client :as client]
[clojure.string :as str]
[e... | null | https://raw.githubusercontent.com/steffan-westcott/clj-otel/ed5c20a468fb2b8b3f4674382f57e031609f20a6/examples/manual-instrument/middleware/puzzle-service/src/example/manual_instrument/middleware/puzzle_service.clj | clojure | Wrap the synchronous body in a new client span.
Propagate context containing client span to remote
server by injecting headers. This enables span
correlation to make distributed traces.
Add HTTP response data to the client span.
Wrap the synchronous body in a new internal span.
Use `doall` to force lazy sequence... | (ns example.manual-instrument.middleware.puzzle-service
"Example application demonstrating using `clj-otel` to add telemetry to a
synchronous Ring HTTP service that is run without the OpenTelemetry
instrumentation agent."
(:require [clj-http.client :as client]
[clojure.string :as str]
[e... |
5250c284dbe08cf57d69b6893d3887ecc7c0232d2a6239a8fe178d3c6244474f | jeannekamikaze/Spear | StaticModel.hs | module Spear.Render.StaticModel
( -- * Data types
StaticModelResource,
StaticModelRenderer,
-- * Construction and destruction
staticModelResource,
staticModelRenderer,
-- * Manipulation
box,
modelRes,
-- * Rendering
bind,
render,
-- * Collision
... | null | https://raw.githubusercontent.com/jeannekamikaze/Spear/8f2ec33e8c15e523b2b60d3bfd8e6360313a0657/Spear/Render/StaticModel.hs | haskell | * Data types
* Construction and destruction
* Manipulation
* Rendering
* Collision
| Create a model resource from the given model.
| Create a renderer from the given model resource.
| Get the model's ith bounding box.
| Get the renderer's model resource.
| Bind the given renderer to prepare it for re... | module Spear.Render.StaticModel
StaticModelResource,
StaticModelRenderer,
staticModelResource,
staticModelRenderer,
box,
modelRes,
bind,
render,
mkColsFromStatic,
)
where
import qualified Data.Vector as V
import Spear.Assets.Model
import Spear.GL
import Spe... |
ec3a62cc86788c758e95e266c8df764caee4409a769f4e92e96bd2198d77648c | lispbuilder/lispbuilder | util-rm.lisp |
OpenRM library using CFFI for foreign function interfacing ...
;; OpenRM 1.6.0-2
( C)2006 < >
Thanks to and
;; see COPYING for license
This file contains some useful functions for using OpenRM from Common lisp
(in-package #:lispbuilder-openrm)
(defvar *default-light* nil)
(defvar *default-camera* nil... | null | https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-openrm/openrm/util-rm.lisp | lisp | OpenRM 1.6.0-2
see COPYING for license
The following functions should be placed into a general 'util' package.
w
End.
(defun rmvertex-3d+ (x y z &key (vertex (make-rmvertex-3d)))
(fli:with-foreign-slots (rm::x rm::y rm::z) vertex
(error "rmvertex-3d+ : x, y, z must be of type 'float"))
vertex)
... |
OpenRM library using CFFI for foreign function interfacing ...
( C)2006 < >
Thanks to and
This file contains some useful functions for using OpenRM from Common lisp
(in-package #:lispbuilder-openrm)
(defvar *default-light* nil)
(defvar *default-camera* nil)
(defvar *default-color* nil)
(defmacro c... |
20f5cf060fa2ee384b47e6caf6ee5fbd3545252d3ce159df77580f93619d7bdb | dfithian/dfdb | Database.hs | module DFDB.Database where
import ClassyPrelude hiding (index)
import Control.Lens
( _1, _2, _Just, assign, at, each, has, modifying, over, toListOf, use, uses, view
)
import Control.Monad.Except (throwError)
import Data.Aeson (encode)
import Data.List ((!!))
import qualified Data.List as List
import qualified DF... | null | https://raw.githubusercontent.com/dfithian/dfdb/72320317216f95df70cbf246375418503df4f150/src/DFDB/Database.hs | haskell | |Simple implementation of a query planner. Check the index, and if it matches the where clause exactly use it.
|Select using an index.
|Select using a whole table scan.
execute a select
execute a select by primary key
execute an insert
execute a create table
execute a create index
execute a table drop
execute... | module DFDB.Database where
import ClassyPrelude hiding (index)
import Control.Lens
( _1, _2, _Just, assign, at, each, has, modifying, over, toListOf, use, uses, view
)
import Control.Monad.Except (throwError)
import Data.Aeson (encode)
import Data.List ((!!))
import qualified Data.List as List
import qualified DF... |
3e75fe05afff98432d04b59416a17d33050cac9e4d9194287b032cb6b0037168 | metabase/metabase | yaml.clj | (ns metabase-enterprise.serialization.v2.storage.yaml
(:require
[clojure.java.io :as io]
[metabase-enterprise.serialization.v2.storage :as storage]
[metabase-enterprise.serialization.v2.utils.yaml :as u.yaml]
[metabase.models.serialization.base :as serdes.base]
[metabase.util.date-2 :as u.date]
[met... | null | https://raw.githubusercontent.com/metabase/metabase/b656922923a03e93f79cc6ed636d7daac21848cb/enterprise/backend/src/metabase_enterprise/serialization/v2/storage/yaml.clj | clojure | (ns metabase-enterprise.serialization.v2.storage.yaml
(:require
[clojure.java.io :as io]
[metabase-enterprise.serialization.v2.storage :as storage]
[metabase-enterprise.serialization.v2.utils.yaml :as u.yaml]
[metabase.models.serialization.base :as serdes.base]
[metabase.util.date-2 :as u.date]
[met... | |
c6f6223a3a7ae645e44ce9e2040ffc59ddc287759898f6b9dcfcbebcc0818c28 | haskell/haskell-language-server | AutoInfixApplyMany.expected.hs | test :: (a -> b -> x -> c) -> a -> (a -> b) -> x -> c
test (/:) a f x = (a /: f a) x
| null | https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/golden/AutoInfixApplyMany.expected.hs | haskell | test :: (a -> b -> x -> c) -> a -> (a -> b) -> x -> c
test (/:) a f x = (a /: f a) x
| |
e73060ccec83f3740fc47a59ede749bdb4e5b1645eb15374bd34ae4a01f4d7eb | kivra/giallo | giallo_app.erl | %% ----------------------------------------------------------------------------
%%
%% giallo: A small and flexible web framework
%%
Copyright ( c ) 2013 KIVRA
%%
%% Permission is hereby granted, free of charge, to any person obtaining a
%% copy of this software and associated documentation files (the "Software"),
t... | null | https://raw.githubusercontent.com/kivra/giallo/bec3539fb3e0d01177c87c302188fe231f647125/src/giallo_app.erl | erlang | ----------------------------------------------------------------------------
giallo: A small and flexible web framework
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
the rights to use, copy, modify, merge, publi... | Copyright ( c ) 2013 KIVRA
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIA... |
c77535a422412b2ce6e7a5386e8fa5507c3b5ecbb36fb2a282d408bca1a59ee0 | opennars/Narjure | defaults.clj | (ns narjure.defaults)
(def belief-frequency 1.0)
(def belief-confidence 0.9)
(def truth-value
[belief-frequency belief-confidence])
(def belief-priority 0.99)
(def belief-durability 0.9)
;todo clarify this
(def belief-quality 0.5)
(def belief-budget
[belief-priority belief-durability belief-quality])
(def ques... | null | https://raw.githubusercontent.com/opennars/Narjure/cd5a72e6777fc47271d721fef8362aa2dad664ca/src/narjure/defaults.clj | clojure | todo clarify this
todo clarify this
set higher than potential quality rewards in the system (best-operation-selection, structural reinforcement)
default concept priority
personality factor for evidential horizon
maximum length of evidence trail
number of system cycles to consider as concurrent
todo a better budget ... | (ns narjure.defaults)
(def belief-frequency 1.0)
(def belief-confidence 0.9)
(def truth-value
[belief-frequency belief-confidence])
(def belief-priority 0.99)
(def belief-durability 0.9)
(def belief-quality 0.5)
(def belief-budget
[belief-priority belief-durability belief-quality])
(def question-priority 0.9)
... |
fcbdfd625fa3b3903ea9d1dcf1d8360febafb2ad30340735477dd343fc6ed63f | qiao/sicp-solutions | 4.21.scm | ;; a.
((lambda (n)
((lambda (fib)
(fib fib n))
(lambda (fb k)
(cond ((= k 0) 1)
((= k 1) 1)
(else
(+ (fb fb (- k 1))
(fb fb (- k 2))))))))
5)
;; b.
(define (f x)
((lambda (even? odd?)
(even? even? odd? x))
(lambda (ev? od? n)
(if ... | null | https://raw.githubusercontent.com/qiao/sicp-solutions/a2fe069ba6909710a0867bdb705b2e58b2a281af/chapter4/4.21.scm | scheme | a.
b. | ((lambda (n)
((lambda (fib)
(fib fib n))
(lambda (fb k)
(cond ((= k 0) 1)
((= k 1) 1)
(else
(+ (fb fb (- k 1))
(fb fb (- k 2))))))))
5)
(define (f x)
((lambda (even? odd?)
(even? even? odd? x))
(lambda (ev? od? n)
(if (= n 0)
... |
4b44faa102ca744ac6b0e79a6e375e84fe21c0e08d48f28accc50e15502c8f47 | rwmjones/guestfs-tools | sysprep_operation_dhcp_server_state.ml | virt - sysprep
* Copyright ( C ) 2012 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ver... | null | https://raw.githubusercontent.com/rwmjones/guestfs-tools/3a498512f58bc431db490e96cdb712b19389bda4/sysprep/sysprep_operation_dhcp_server_state.ml | ocaml | virt - sysprep
* Copyright ( C ) 2012 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ver... | |
20cbc58e43eee8764eb2330a27b770300e370e1aa1bbea8d31211419eac2c2db | footprintanalytics/footprint-web | driver_deprecation_test.clj | (ns metabase.plugins.driver-deprecation-test
(:require [clojure.test :refer :all]
[metabase.models.setting :as setting]
[metabase.test :as mt]
[metabase.test.fixtures :as fixtures]))
(use-fixtures :once (fixtures/initialize :db :plugins :test-drivers))
(deftest driver-deprecation... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/plugins/driver_deprecation_test.clj | clojure | (ns metabase.plugins.driver-deprecation-test
(:require [clojure.test :refer :all]
[metabase.models.setting :as setting]
[metabase.test :as mt]
[metabase.test.fixtures :as fixtures]))
(use-fixtures :once (fixtures/initialize :db :plugins :test-drivers))
(deftest driver-deprecation... | |
56e5636a51d30e871383a0a8e9f67702680d300fffb1a8c810810f23bdcf560f | GaloisInc/semmc | ParamFormulaTests.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
module ParamFormulaTests where
import Control.Monad ( join, void )
import quali... | null | https://raw.githubusercontent.com/GaloisInc/semmc/a3b8b89b9e88c94aab2ec6e06f993edcc9126cea/semmc/tests/semstore/ParamFormulaTests.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
TBD: something (manything?) to test literal vars here
TBD: needs other tests
generate a formula
ensure that formula compares as equivalent to itself
now print the formula to a text string
convert the printed text string back into a formula
... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
module ParamFormulaTests where
import Control.Monad ( join, void )
import qualified Control.Monad.Catch as E
import Control.Monad.IO.Class ( MonadIO, liftI... |
99176e25106b100058cafbb4a1a248608013e6e7caf9049720bbb835ccb4736f | grin-compiler/grin | BindingPatternSimplificationSpec.hs | # LANGUAGE LambdaCase , QuasiQuotes #
module Transformations.Simplifying.BindingPatternSimplificationSpec where
import Transformations.Simplifying.BindingPatternSimplification
import Transformations.BindNormalisation
import Transformations.Names (ExpChanges(..))
import Test.Test
import Grin.TH
import Grin.Grin
import... | null | https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/test/Transformations/Simplifying/BindingPatternSimplificationSpec.hs | haskell | # LANGUAGE LambdaCase , QuasiQuotes #
module Transformations.Simplifying.BindingPatternSimplificationSpec where
import Transformations.Simplifying.BindingPatternSimplification
import Transformations.BindNormalisation
import Transformations.Names (ExpChanges(..))
import Test.Test
import Grin.TH
import Grin.Grin
import... | |
083b5b950f510435131581c33ad0718ad292fc62ed3fb9d2cdcab48dff5ffc89 | billstclair/trubanc-lisp | functions.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; functions.lisp --- High-level interface to foreign functions.
;;;
Copyright ( C ) 2005 - 2006 , < >
Copyright ( C ) 2005 - 2007 ,
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated... | null | https://raw.githubusercontent.com/billstclair/trubanc-lisp/5436d2eca5b1ed10bc47eec7080f6cb90f98ca65/systems/cffi_0.10.4/src/functions.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
functions.lisp --- High-level interface to foreign functions.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, pu... | Copyright ( C ) 2005 - 2006 , < >
Copyright ( C ) 2005 - 2007 ,
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOU... |
27d1faa42a02a35d44b1a09e9be5be4ceb1ec1d7241ac0cb0fa9212768367cff | helium/blockchain-core | blockchain_txn_bundle_SUITE.erl | -module(blockchain_txn_bundle_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("kernel/include/inet.hrl").
-include_lib("blockchain/include/blockchain_vars.hrl").
-export([
init_per_testcase/2,
end_per_testcase/2,
all/0
]).
-export([
basic_test... | null | https://raw.githubusercontent.com/helium/blockchain-core/94ae05e52f35c485e72d2a792a90ac6ad9583667/test/blockchain_txn_bundle_SUITE.erl | erlang | Setup ----------------------------------------------------------------------
Cases ----------------------------------------------------------------------
Reversed order of nonces, invalidating the bundle:
Balances should not have changed since the bundle was invalid:
bad txn: double-spend = same nonce, diff dst
A... | -module(blockchain_txn_bundle_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("kernel/include/inet.hrl").
-include_lib("blockchain/include/blockchain_vars.hrl").
-export([
init_per_testcase/2,
end_per_testcase/2,
all/0
]).
-export([
basic_test... |
4307fbd563b5e7ca0252c75eddbb4687c580de98232f51b928c590cc9d247be8 | tweag/ormolu | HackageInfoSpec.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TupleSections #
module Ormolu.HackageInfoSpec (spec) where
import qualified Data.Map.Strict as Map
import Data.Maybe (mapMaybe)
import qualified Data.Set as Set
import Distribution.Types.PackageName (PackageName)
import Ormolu.Fixity
import Test.Hspec
| Build a fixity ... | null | https://raw.githubusercontent.com/tweag/ormolu/f0b8690ae138b96a284f7d72204ca72382724e97/tests/Ormolu/HackageInfoSpec.hs | haskell | # LANGUAGE OverloadedStrings #
package list, and then check the fixity of the specified subset of
operators.
| List of dependencies
| Threshold to choose the conflict resolution strategy
| Associative list representing a subset of the resulting fixity map
that should be checked.
| Build a fixity map from a custo... | # LANGUAGE TupleSections #
module Ormolu.HackageInfoSpec (spec) where
import qualified Data.Map.Strict as Map
import Data.Maybe (mapMaybe)
import qualified Data.Set as Set
import Distribution.Types.PackageName (PackageName)
import Ormolu.Fixity
import Test.Hspec
| Build a fixity map using the Hackage / Hoogle data... |
0fe9c6a19bf9e1acc8682d56b31a11c8d7bc4136f70aaf02719c65a9b78e59ad | wireapp/wire-server | Cache.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
-- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the ... | null | https://raw.githubusercontent.com/wireapp/wire-server/e084f131c4fec095ee62d703d7a21638d89cbf24/libs/api-bot/src/Network/Wire/Bot/Cache.hs | haskell | # LANGUAGE OverloadedStrings #
This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANT... | # LANGUAGE LambdaCase #
Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module ... |
b78cefeacd45af41a68f0352c9dc1994858be442fd3e7c162a3e5a0732e8d31b | ovotech/kafka-avro-confluent | schema_registry_client.clj | (ns kafka-avro-confluent.v2.schema-registry-client
(:require [abracad.avro :as avro]
[cheshire.core :as json]
[clj-http.client :as http]
[clojure.core.memoize :refer [memo]]
[clojure.pprint :as pprint]
[clojure.spec.alpha :as s]
[clojure.tools.lo... | null | https://raw.githubusercontent.com/ovotech/kafka-avro-confluent/b014de61d2bc217ab5c8962c2a3d3f61f3553dd5/src/kafka_avro_confluent/v2/schema_registry_client.clj | clojure | (ns kafka-avro-confluent.v2.schema-registry-client
(:require [abracad.avro :as avro]
[cheshire.core :as json]
[clj-http.client :as http]
[clojure.core.memoize :refer [memo]]
[clojure.pprint :as pprint]
[clojure.spec.alpha :as s]
[clojure.tools.lo... | |
c92f57bdfdf6ffbbffd6f7f827f9222533ee782e11d2f236ba77a9db9a97c0a4 | taffybar/status-notifier-item | Service.hs | {-# LANGUAGE OverloadedStrings #-}
module StatusNotifier.Item.Service where
import Control.Monad.Trans.Class
import Control.Monad.Trans.Except
import DBus
import DBus.Client
import qualified DBus.TH as DBusTH
import qualified Data.ByteString as BS
import Data.Int
impor... | null | https://raw.githubusercontent.com/taffybar/status-notifier-item/fe6fddc6827635a5c9cc450e502dcd28b11d7fba/src/StatusNotifier/Item/Service.hs | haskell | # LANGUAGE OverloadedStrings # | module StatusNotifier.Item.Service where
import Control.Monad.Trans.Class
import Control.Monad.Trans.Except
import DBus
import DBus.Client
import qualified DBus.TH as DBusTH
import qualified Data.ByteString as BS
import Data.Int
import Data.String
import qual... |
6425e23bc7a08298ab7f19ae5e0f8d20527c61d537bcf966892ec3ba439cc278 | Apress/beg-haskell | Main.hs | # LANGUAGE RecursiveDo #
module Main where
import Control.Monad.Tardis
main :: IO ()
main = print $ sumListTardis [1,2,3,4]
sumListTardis :: [Int] -> [(Int,Int)]
sumListTardis lst = evalTardis (sumListTardis' lst) (0, 0)
sumListTardis' :: [Int] -> Tardis Int Int [(Int,Int)]
sumListTardis' (x:xs) = do
sumFw <- ge... | null | https://raw.githubusercontent.com/Apress/beg-haskell/aaacbf047d553e6177c38807e662cc465409dffd/appendixB/src/Main.hs | haskell | # LANGUAGE RecursiveDo #
module Main where
import Control.Monad.Tardis
main :: IO ()
main = print $ sumListTardis [1,2,3,4]
sumListTardis :: [Int] -> [(Int,Int)]
sumListTardis lst = evalTardis (sumListTardis' lst) (0, 0)
sumListTardis' :: [Int] -> Tardis Int Int [(Int,Int)]
sumListTardis' (x:xs) = do
sumFw <- ge... | |
42006daf7ffcc6a54997c592f90250458a1992fdb173f158ae36664393da8b83 | phronmophobic/membrane | webgltest.cljs | (ns membrane.webgltest
(:require-macros [membrane.webgl-macros
:refer [add-image!]])
(:require
[membrane.component :refer [defui]
:as component]
membrane.audio
[membrane.webgl :as webgl]
[com.rpl.specter :as spec
:refer [ATOM ALL FIRST LAST MAP-VALS META]]
membrane.basic-c... | null | https://raw.githubusercontent.com/phronmophobic/membrane/a685c0225bec61676ae95c799c396692cb8c8bfd/src/membrane/webgltest.cljs | clojure | (ns membrane.webgltest
(:require-macros [membrane.webgl-macros
:refer [add-image!]])
(:require
[membrane.component :refer [defui]
:as component]
membrane.audio
[membrane.webgl :as webgl]
[com.rpl.specter :as spec
:refer [ATOM ALL FIRST LAST MAP-VALS META]]
membrane.basic-c... | |
daba1baf800426f0d2054b7aa6e42b70355a40d2c48f275734999ed6ffb79750 | launchdarkly/erlang-server-sdk | ldclient_update_requestor.erl | %%-------------------------------------------------------------------
%% @doc `ldclient_update_requestor' module
@private
%% This is a behavior that event dispatchers must implement. It is used to send
event batches to LaunchDarkly .
%% @end
%%-------------------------------------------------------------------
-mo... | null | https://raw.githubusercontent.com/launchdarkly/erlang-server-sdk/fabbcae4953020a0c93bce99e80c1729ebd447d5/src/ldclient_update_requestor.erl | erlang | -------------------------------------------------------------------
@doc `ldclient_update_requestor' module
This is a behavior that event dispatchers must implement. It is used to send
@end
-------------------------------------------------------------------
`all' must request and return all flags and segments, alon... | @private
event batches to LaunchDarkly .
-module(ldclient_update_requestor).
-type response() :: {ok, binary() | not_modified}
| {error, errors()}.
-type errors() :: {bad_status, httpc:status_code(), string()}
| network_error.
-export_type([response/0, errors/0]).
state valu... |
ca418c296aed46f813d74f60743db33e2330abd6c6bffe24d6b280cdea75556d | samrushing/irken-compiler | t30.scm | ;; -*- Mode: Irken -*-
(include "lib/core.scm")
;; test op_rset.
(define (^fun1 p)
(set! p.y 1001)
(+ p.x 10)
)
(let ((thing1 {a=0 x=1 y=2 b="what?"})
(thing2 {x=3 y=4 z=7}))
(set! thing1.x 27)
(set! thing2.x 19)
(print (^fun1 thing1))
(print (^fun1 thing2))
(print thing1)
(print thing2)
)... | null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/vm/tests/t30.scm | scheme | -*- Mode: Irken -*-
test op_rset. |
(include "lib/core.scm")
(define (^fun1 p)
(set! p.y 1001)
(+ p.x 10)
)
(let ((thing1 {a=0 x=1 y=2 b="what?"})
(thing2 {x=3 y=4 z=7}))
(set! thing1.x 27)
(set! thing2.x 19)
(print (^fun1 thing1))
(print (^fun1 thing2))
(print thing1)
(print thing2)
)
|
915490211760419490cbcaab0f4ef758b423135030e497ac499694a1c453a5e8 | processone/grapherl | gen_db.erl | -module(gen_db).
%% behaviour module for implementing custom caching/storage modules
%%
-type data() :: binary().
-type dataL() :: [data()].
-type db_name() :: any().
-type db_fd() :: any().
-type client() :: binary().
-type arg() :: {any(), any()}.
-type args() :: [arg()].
-callback in... | null | https://raw.githubusercontent.com/processone/grapherl/a45174ff9ffc8b68877b6985d6d05c4fbb868620/grapherl/apps/graph_db/src/gen_db.erl | erlang | behaviour module for implementing custom caching/storage modules
| -module(gen_db).
-type data() :: binary().
-type dataL() :: [data()].
-type db_name() :: any().
-type db_fd() :: any().
-type client() :: binary().
-type arg() :: {any(), any()}.
-type args() :: [arg()].
-callback init_db(db_name(), args()) -> {ok, db_fd()}.
-callback ope... |
9012e1cbeeadc577bfc1b9ae7f4a63eceb4ab8f1e03748036d1cd8b617be7e91 | WhatsApp/eqwalizer | trace.erl | Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved .
%%%
This source code is licensed under the Apache 2.0 license found in
%%% the LICENSE file in the root directory of this source tree.
-module(trace).
-export([mk_result_erlang/0]).
-spec mk_result_erlang() ->
erlang:trace_info_retu... | null | https://raw.githubusercontent.com/WhatsApp/eqwalizer/9935940d71ef65c7bf7a9dfad77d89c0006c288e/eqwalizer/test_projects/check/src/trace.erl | erlang |
the LICENSE file in the root directory of this source tree. | Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved .
This source code is licensed under the Apache 2.0 license found in
-module(trace).
-export([mk_result_erlang/0]).
-spec mk_result_erlang() ->
erlang:trace_info_return().
mk_result_erlang() ->
{call_count, 1}.
|
16cc94fd8640fd58e47882864dc20cd8f1e403c425199e048c56f9ed7c214f9b | samsara/samsara-mqtt | ping.clj | (ns samsara-mqtt.service.ping
(:require [samsara-mqtt.domain.ping :refer [mqtt-pingresp->bytes]]
[samsara-mqtt.handler :refer [mqtt-handler]]))
(defmethod mqtt-handler :ping [_ data _]
(mqtt-pingresp->bytes true))
| null | https://raw.githubusercontent.com/samsara/samsara-mqtt/2866818775526072f94db65e9d16a7777286a292/src/samsara_mqtt/service/ping.clj | clojure | (ns samsara-mqtt.service.ping
(:require [samsara-mqtt.domain.ping :refer [mqtt-pingresp->bytes]]
[samsara-mqtt.handler :refer [mqtt-handler]]))
(defmethod mqtt-handler :ping [_ data _]
(mqtt-pingresp->bytes true))
| |
1932c623392b4e8a950b1b345a6a0d34b92b1303671cf3a8f4cc0ddfbf967a64 | Concordium/concordium-client | ParseSpec.hs | module SimpleClientTests.ParseSpec where
import Concordium.Client.Parse
import Test.Hspec
parseSpec :: Spec
parseSpec = describe "parse" $ do
parseExpirySpec
parseExpirySpec :: Spec
parseExpirySpec = describe "expiry" $ do
specify "empty" $ p "" `shouldBe` Left "non-numeric prefix"
specify "space" $ p " " `sh... | null | https://raw.githubusercontent.com/Concordium/concordium-client/2ae3b56c384ac6803ec96a078e5d99de14b42ce2/test/SimpleClientTests/ParseSpec.hs | haskell | module SimpleClientTests.ParseSpec where
import Concordium.Client.Parse
import Test.Hspec
parseSpec :: Spec
parseSpec = describe "parse" $ do
parseExpirySpec
parseExpirySpec :: Spec
parseExpirySpec = describe "expiry" $ do
specify "empty" $ p "" `shouldBe` Left "non-numeric prefix"
specify "space" $ p " " `sh... | |
7e938daf78727e2fe019ffeb054044debb6769b274d8d3dfa0570a6f6be6b83d | dinosaure/carton | sigs.mli | module type FUNCTOR = sig type +'a t end
type (+'a, 's) io
type 's scheduler =
{ bind : 'a 'b. ('a, 's) io -> ('a -> ('b, 's) io) -> ('b, 's) io
; return : 'a. 'a -> ('a, 's) io }
module type SCHEDULER = sig
type +'a s
type t
external inj : 'a s -> ('a, t) io = "%identity"
external prj : ('a, t) io -> '... | null | https://raw.githubusercontent.com/dinosaure/carton/8cb8b3685fab477594b2d83c70b2fc965d1d59b9/lib/sigs.mli | ocaml | module type FUNCTOR = sig type +'a t end
type (+'a, 's) io
type 's scheduler =
{ bind : 'a 'b. ('a, 's) io -> ('a -> ('b, 's) io) -> ('b, 's) io
; return : 'a. 'a -> ('a, 's) io }
module type SCHEDULER = sig
type +'a s
type t
external inj : 'a s -> ('a, t) io = "%identity"
external prj : ('a, t) io -> '... | |
0e06c40eac85258a8748cd2965699818fb9cd0d4f4d7ecd7e1273443b77d9ae2 | pmundkur/flowcaml | fkind.ml | (**************************************************************************)
(* *)
(* *)
, Projet C... | null | https://raw.githubusercontent.com/pmundkur/flowcaml/ddfa8a37e1cb60f42650bed8030036ac313e048a/src-flowcaml/types/fkind.ml | ocaml | ************************************************************************
et en Automatique. All ri... |
, Projet Cristal , INRIA Rocquencourt
Copyright 2002 , 2003 Institut National de Recherche en Informatique
under the terms of the Q Public License version 1.0 .
$ I d : fkind.ml , v 1.2 2003/06/26 13:... |
12853f9d0d906511d1011aaf540184dc1fc0aede49a3f7b69e09489f32dee169 | favila/crinkle | deploy.clj | #!/bin/sh
#_(
#_DEPS is same format as deps.edn. Multiline is okay.
DEPS='
{:deps {org.clojure/clojure {:mvn/version "1.10.1"}
badigeon/badigeon {:git/url ""
:sha "e7f62a60d8e890fc84a47bcfdd59137e11ff1c95"
:tag "0.0.7"}}... | null | https://raw.githubusercontent.com/favila/crinkle/7c24c7cc31bdf507f2e9ab72b547ba52ef692ddc/deploy.clj | clojure | The jar file produced.
The jar file to be installed
The local repository where the jar should be installed.
Artifacts are maps with a required :file-path key and an optional :extension key
Artifacts must be signed when deploying non-snapshot versions of artifacts.
:id is used to match the repository in the ~/.m2/... | #!/bin/sh
#_(
#_DEPS is same format as deps.edn. Multiline is okay.
DEPS='
{:deps {org.clojure/clojure {:mvn/version "1.10.1"}
badigeon/badigeon {:git/url ""
:sha "e7f62a60d8e890fc84a47bcfdd59137e11ff1c95"
:tag "0.0.7"}}... |
1492b93fd1de591e6d3e6ad59583d6a64064ca30c0281b282d3a3f69b12f97af | GumTreeDiff/cgum | oassocbdb_string.mli | ! ! take care ! ! : this class does side effect , not a pure oassoc .
*
* Also can not put structure with ref or mutable field because when
* you will modify those refs or fields , you will modify it in the memory ,
* not in the disk . The only way to modify on the disk is to call
* # add or # replace ... | null | https://raw.githubusercontent.com/GumTreeDiff/cgum/8521aa80fcf4873a19e60ce8c846c886aaefb41b/commons/ocollection/oassocbdb_string.mli | ocaml | db name, for profiling
transaction handler
ocollection concrete instantiation of virtual methods
oassoc concrete instantiation of virtual methods | ! ! take care ! ! : this class does side effect , not a pure oassoc .
*
* Also can not put structure with ref or mutable field because when
* you will modify those refs or fields , you will modify it in the memory ,
* not in the disk . The only way to modify on the disk is to call
* # add or # replace ... |
f5ec2455881b65ee36825f48c509f8074273fa0388f54487e8f7d325a9c1b1f6 | project-oak/hafnium-verification | ClangLogging.mli |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/clang/ClangLogging.mli | ocaml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | |
d7715fbac9f2f523b4856b8884f4910072080e1058c571dda7317a5a22a649ab | iand675/hs-opentelemetry | Detector.hs | {-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
|
Module : OpenTelemetry . Resource . OperatingSystem . Detector
Copyright : ( c ) , 2021
License ... | null | https://raw.githubusercontent.com/iand675/hs-opentelemetry/b08550db292ca0d8b9ce9156988e6d08dd6a2e61/sdk/src/OpenTelemetry/Resource/OperatingSystem/Detector.hs | haskell | # LANGUAGE OverloadedStrings #
---------------------------------------------------------------------------
--------------------------------------------------------------------------- |
|
Module : OpenTelemetry . Resource . OperatingSystem . Detector
Copyright : ( c ) , 2021
License : BSD-3
Maintainer :
Stability : experimental
Portability : non - portable ( GHC extensions )
Detect information about the current system 's OS .
Module ... |
e77f1f8ab11e6658952857bc615a8f8fee01ec422766b42607f2850d34db1094 | jubnzv/iec-checker | plcopen_cp4.mli | (** PLCOPEN-CP4: Direct addressing should not overlap *)
open IECCheckerCore
module S = Syntax
val do_check : S.iec_library_element list -> Warn.t list
| null | https://raw.githubusercontent.com/jubnzv/iec-checker/666cd8a28cb1211465a900862df84d70460c2742/src/lib/plcopen_cp4.mli | ocaml | * PLCOPEN-CP4: Direct addressing should not overlap | open IECCheckerCore
module S = Syntax
val do_check : S.iec_library_element list -> Warn.t list
|
84082bc37b29fa4734d57104a57d64a2bff1731d19c46ff78141a8e07797a6ef | manu291/dypgen | sharp.ml | let () = print_endline "
Example of dynamic changes to the grammar
Initial grammar :
S -> E
E -> int
E -> ( E )
E -> A E
A -> & * { action : add rule E -> E # E
which action is multiplication and
no shift if the action is executed }
A -> & + { action : add rule E -> E # E
whic... | null | https://raw.githubusercontent.com/manu291/dypgen/59d11b4c70b8d0971348ca6913839ff1fb4f9b5f/demos/sharp/sharp.ml | ocaml | let () = print_endline "
Example of dynamic changes to the grammar
Initial grammar :
S -> E
E -> int
E -> ( E )
E -> A E
A -> & * { action : add rule E -> E # E
which action is multiplication and
no shift if the action is executed }
A -> & + { action : add rule E -> E # E
whic... | |
2f15e796a80e6f547ff8aaa3b96a08ee7f75c960a79455fa24254a91d773fbf2 | static-analysis-engineering/codehawk | bCHELFProgramHeader.mli | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : and
------------------------------------------------------------------------------
The MIT License ( MIT ... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/c1b3158e0d73cda7cfc10d75f6173f4297991a82/CodeHawk/CHB/bchlibelf/bCHELFProgramHeader.mli | ocaml | bchlibelf | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : and
------------------------------------------------------------------------------
The MIT License ( MIT ... |
827aa1e04b0f03e7d1201b9ff975fa5048580e80c68a29804862bae367631274 | dimitri/pgloader | api.lisp | ;;;
Generic API for pgloader data loading and database migrations .
;;;
(in-package :pgloader.load)
(defgeneric copy-from (source &key)
(:documentation
"Load data from SOURCE into its target as defined by the SOURCE object."))
;; That one is more an export than a load. It always export to a single very
;; well... | null | https://raw.githubusercontent.com/dimitri/pgloader/3047c9afe141763e9e7ec05b7f2a6aa97cf06801/src/load/api.lisp | lisp |
That one is more an export than a load. It always export to a single very
well defined format, the importing utility is defined in
src/pgsql-copy-format.lisp
The next generic function is only to get instanciated for sources
actually containing more than a single source item (tables, collections,
etc) | Generic API for pgloader data loading and database migrations .
(in-package :pgloader.load)
(defgeneric copy-from (source &key)
(:documentation
"Load data from SOURCE into its target as defined by the SOURCE object."))
(defgeneric copy-to (source filename)
(:documentation
"Load data from SOURCE and seria... |
f9f9b11426d4bc634cb1aaf61b21632fd145755787d3a37d9aec6ca61f159429 | leandrosilva/cameron | misultin_get_variable.erl | % ==========================================================================================================
MISULTIN - Example : Gets the GET variable ' value ' and prints it out as XML if found .
%
% >-|-|-(°>
%
Copyright ( C ) 2011 , < >
% All rights reserved.
%
% BSD License
%
% Redistribution and use in s... | null | https://raw.githubusercontent.com/leandrosilva/cameron/34051395b620d2c3cb2cb63c854e65234786a176/deps/misultin/examples/misultin_get_variable.erl | erlang | ==========================================================================================================
>-|-|-(°>
All rights reserved.
BSD License
Redistribution and use in source and binary forms, with or without modification, are permitted provided
that the following conditions are met:
* Redistribu... | MISULTIN - Example : Gets the GET variable ' value ' and prints it out as XML if found .
Copyright ( C ) 2011 , < >
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS OR
PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR FOR
ANY DIRE... |
c3f32b60a9d91bd7f75d30452e9bdf8724a88c74df39f72824da88060d519c13 | antifuchs/sbcl | backend-parms.lisp | that part of the parms.lisp file from original CMU CL which is defined in
terms of the BACKEND structure
;;;;
FIXME : When we break up the BACKEND structure , this might be mergeable
;;;; back into the parms.lisp file.
This software is part of the SBCL system . See the README file for
;;;; more information.
;;... | null | https://raw.githubusercontent.com/antifuchs/sbcl/789bf105edca031aff991ad16a5fd207812336a0/src/compiler/x86-64/backend-parms.lisp | lisp |
back into the parms.lisp file.
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
compiler constants
general have our C runtime code running to ask, so instead we set
Actually any informati... | that part of the parms.lisp file from original CMU CL which is defined in
terms of the BACKEND structure
FIXME : When we break up the BACKEND structure , this might be mergeable
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
wr... |
7ebbd8c44008cd6a2416cd6e6c53be8db09f7f70fabb54fabe0204330fd232d8 | jlouis/etorrent_core | etorrent_udp_tracker_sup.erl | @author < >
@doc Supervise the UDP tracker communication
%% <p>This supervisor is responsible for managing communication with
one or more UDP trackers . It manager a protocol decoder , a general
%% manager (which is the entry point for API users) and a Supervisor
pool of processes that handles a specific UD... | null | https://raw.githubusercontent.com/jlouis/etorrent_core/7db7f4ef36c1d055812504f00df92c6a67c2e4af/src/etorrent_udp_tracker_sup.erl | erlang | <p>This supervisor is responsible for managing communication with
manager (which is the entry point for API users) and a Supervisor
API
Supervisor callbacks
====================================================================
@doc Start the supervisor
@end
=========================================================... | @author < >
@doc Supervise the UDP tracker communication
one or more UDP trackers . It manager a protocol decoder , a general
pool of processes that handles a specific UDP tracker >
-module(etorrent_udp_tracker_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?M... |
9c1bd93e6757efac8d3eac2e81a29a102947b912ffe99e0aa41b1ab5f2aab1b0 | Apress/beg-haskell | UnderAMonad.hs | module Chapter7.UnderAMonad where
import Control.Monad
import Control.Monad.Reader
import Control.Monad.Writer
addPrefix :: String -> Reader String String
addPrefix s = ask >>= \p -> return $ p ++ s
-- ask >>= return . (++ s)
addPrefixL :: [String] -> Reader String [String]
addPrefixL = mapM addPrefix... | null | https://raw.githubusercontent.com/Apress/beg-haskell/aaacbf047d553e6177c38807e662cc465409dffd/chapter7/src/Chapter7/UnderAMonad.hs | haskell | ask >>= return . (++ s) | module Chapter7.UnderAMonad where
import Control.Monad
import Control.Monad.Reader
import Control.Monad.Writer
addPrefix :: String -> Reader String String
addPrefix s = ask >>= \p -> return $ p ++ s
addPrefixL :: [String] -> Reader String [String]
addPrefixL = mapM addPrefix
logInformation :: [String] -> Writer St... |
adfe9cec9f7967947956b496db0cd40529d4c696f4e135a0c818b60c8350c0c1 | mfoemmel/erlang-otp | snmp_note_store.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pu... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/snmp/src/misc/snmp_note_store.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limit... | Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(snmp_note_store).
-behaviour(gen_... |
aa4390ccd1007715c22e701a29d55ce7a7fd1878816621349fb04b741f75aed0 | silviucpp/ebeanstalkd | ebeanstalkd_utils.erl | -module(ebeanstalkd_utils).
-export([
lookup/3,
to_bin/1,
env/1
]).
lookup(Key, List, Default) ->
case lists:keyfind(Key, 1, List) of
{Key, Result} ->
Result;
false ->
Default
end.
env(Attr) ->
case application:get_env(ebeanstalkd, Attr) of
{ok,... | null | https://raw.githubusercontent.com/silviucpp/ebeanstalkd/ff151a728be50388b272287948f05a0581e5baaf/src/ebeanstalkd_utils.erl | erlang | -module(ebeanstalkd_utils).
-export([
lookup/3,
to_bin/1,
env/1
]).
lookup(Key, List, Default) ->
case lists:keyfind(Key, 1, List) of
{Key, Result} ->
Result;
false ->
Default
end.
env(Attr) ->
case application:get_env(ebeanstalkd, Attr) of
{ok,... | |
990217692f906630ec11e1655e8dfaec679bde50e3d6993cc6bba0796476998a | funkywork/nightmare | method_test.ml | MIT License
Copyright ( c ) 2023 funkywork
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... | null | https://raw.githubusercontent.com/funkywork/nightmare/05858823d01925cb8cb02a6b29ed8a223822a0e8/test/service_test/method_test.ml | ocaml | MIT License
Copyright ( c ) 2023 funkywork
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... | |
490a149ad469f53997749cee96390c5591e7913de6c6e51ad44b6cffab3c81d4 | Clozure/ccl-tests | make-echo-stream.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Thu Feb 12 04:34:42 2004
;;;; Contains: Tests of MAKE-ECHO-STREAM
(in-package :cl-test)
(deftest make-echo-stream.1
(let* ((is (make-string-input-stream "foo"))
(os (make-string-output-stream))
(s (make-echo-stream is os)))
(values
(read-char s)
... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/make-echo-stream.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of MAKE-ECHO-STREAM
Tests of READ-BYTE on echo streams
unread-char + echo streams is tested in unread-char.lsp
Add tests for clear-input, file-position(?)
Also, add tests for output operations (since echo-streams are
bidirectional)
Error tests | Author :
Created : Thu Feb 12 04:34:42 2004
(in-package :cl-test)
(deftest make-echo-stream.1
(let* ((is (make-string-input-stream "foo"))
(os (make-string-output-stream))
(s (make-echo-stream is os)))
(values
(read-char s)
(get-output-stream-string os)))
#\f "f")
(deftest make-echo-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.