_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 |
|---|---|---|---|---|---|---|---|---|
3d80714e6b29b68c9bac9dc3839146f9187161b58a00c95e58c8faa73acbf769 | sellout/haskerwaul | Left.hs | # language TypeApplications #
module Haskerwaul.Law.Quotient.Left where
import Data.Constraint ((\\))
import Data.Proxy (Proxy(..))
import Haskerwaul.Bifunctor
import Haskerwaul.Category.Monoidal.Cartesian
import Haskerwaul.Isomorphism
import Haskerwaul.Law
import Haskerwaul.Object
import Haskerw... | null | https://raw.githubusercontent.com/sellout/haskerwaul/bb197cacf348c0f189d218f35bf8bbb220d3e402/src/Haskerwaul/Law/Quotient/Left.hs | haskell | | @x = (x / y) y@
| @x = (x y) / y@ | # language TypeApplications #
module Haskerwaul.Law.Quotient.Left where
import Data.Constraint ((\\))
import Data.Proxy (Proxy(..))
import Haskerwaul.Bifunctor
import Haskerwaul.Category.Monoidal.Cartesian
import Haskerwaul.Isomorphism
import Haskerwaul.Law
import Haskerwaul.Object
import Haskerw... |
bc13e25ca34e2eb0bae2c407828ab66fc19506dedc54df4f23a134349b6a2f35 | johnmn3/cljs-thread | root.cljs | (ns cljs-thread.root
(:require
[cljs-thread.env :as e]
[cljs-thread.state :as s]
[cljs-thread.spawn :refer [spawn]]
[cljs-thread.on-when :refer [on-when]]
[cljs-thread.future :as f]
[cljs-thread.injest :as i]
[cljs-thread.util :as u]
[cljs-thread.repl :as repl]))
(defn after-db [config]
(sp... | null | https://raw.githubusercontent.com/johnmn3/cljs-thread/e98edc26ae71d1e17cea96a1f0e978df41b34d3f/src/cljs_thread/root.cljs | clojure | (ns cljs-thread.root
(:require
[cljs-thread.env :as e]
[cljs-thread.state :as s]
[cljs-thread.spawn :refer [spawn]]
[cljs-thread.on-when :refer [on-when]]
[cljs-thread.future :as f]
[cljs-thread.injest :as i]
[cljs-thread.util :as u]
[cljs-thread.repl :as repl]))
(defn after-db [config]
(sp... | |
9b114d495b7d3419d049e48aa7a305be1a5204b07747c21dc9936b975e27bbeb | schemeorg-community/index.scheme.org | rnrs.lists.6.scm | (((name . "find")
(signature lambda ((procedure? pred) (list? list)) *)
(subsigs (pred (lambda (obj) *)))
(tags pure)
(desc . "Proc should accept one argument and return a single value. Proc should not mutate list. The find procedure applies proc to the elements of list in order. If proc returns a true value fo... | null | https://raw.githubusercontent.com/schemeorg-community/index.scheme.org/118c698f56913a6a3c89e7dcc95b960a0b553f08/types/rnrs.lists.6.scm | scheme | (((name . "find")
(signature lambda ((procedure? pred) (list? list)) *)
(subsigs (pred (lambda (obj) *)))
(tags pure)
(desc . "Proc should accept one argument and return a single value. Proc should not mutate list. The find procedure applies proc to the elements of list in order. If proc returns a true value fo... | |
a46e21133e99147143c61901ace5eb6f7be77fdea54d602046606fcc63972ee4 | samply/blaze | measure.clj | (ns blaze.fhir.operation.evaluate-measure.measure
(:require
[blaze.anomaly :as ba :refer [if-ok when-ok]]
[blaze.coll.core :as coll]
[blaze.cql-translator :as cql-translator]
[blaze.db.api :as d]
[blaze.elm.compiler.library :as library]
[blaze.fhir.operation.evaluate-measure.measure.population... | null | https://raw.githubusercontent.com/samply/blaze/5a2b8d59a7a66f9e53d4550fdd2b10f4d0b4337d/modules/operation-measure-evaluate-measure/src/blaze/fhir/operation/evaluate_measure/measure.clj | clojure | ---- Compilation -----------------------------------------------------------
---- Evaluation ------------------------------------------------------------ | (ns blaze.fhir.operation.evaluate-measure.measure
(:require
[blaze.anomaly :as ba :refer [if-ok when-ok]]
[blaze.coll.core :as coll]
[blaze.cql-translator :as cql-translator]
[blaze.db.api :as d]
[blaze.elm.compiler.library :as library]
[blaze.fhir.operation.evaluate-measure.measure.population... |
518842c449e0dfde30d302308e3ab700cc41549f1b0c9c326903e95745efa5a4 | xvw/preface | writer.mli | (** Functors that generate a suite for a [Writer]. *)
module Suite
(Req_m : Model.COVARIANT_1)
(M : Preface_specs.MONAD with type 'a t = 'a Req_m.t)
(Req_t : Model.T0)
(Tape : Preface_specs.MONOID with type t = Req_t.t)
(A : Model.T0)
(B : Model.T0)
(C : Model.T0)
(D : Model.T0) : Model... | null | https://raw.githubusercontent.com/xvw/preface/84a297e1ee2967ad4341dca875da8d2dc6d7638c/lib/preface_qcheck/writer.mli | ocaml | * Functors that generate a suite for a [Writer]. |
module Suite
(Req_m : Model.COVARIANT_1)
(M : Preface_specs.MONAD with type 'a t = 'a Req_m.t)
(Req_t : Model.T0)
(Tape : Preface_specs.MONOID with type t = Req_t.t)
(A : Model.T0)
(B : Model.T0)
(C : Model.T0)
(D : Model.T0) : Model.SUITE
module Suite_functor
(Req_m : Model.COVARI... |
70b5c080cbf370c0661b32ec1632b88c74016e872053d7cb93e03faa00975a17 | nakagami/efirebirdsql | efirebirdsql_socket.erl | The MIT License ( MIT )
Copyright ( c ) 2016 - 2021 Hajime Nakagami< >
-module(efirebirdsql_socket).
-export([send/2, recv/2, recv_align/2, recv_null_bitmap/2]).
-include("efirebirdsql.hrl").
send(Conn, Data) when Conn#conn.write_state =:= undefined ->
gen_tcp:send(Conn#conn.sock, Data);
send(Conn, Message)... | null | https://raw.githubusercontent.com/nakagami/efirebirdsql/d28ff4024211cda37f92667bccbaa7af50d2faf0/src/efirebirdsql_socket.erl | erlang | The MIT License ( MIT )
Copyright ( c ) 2016 - 2021 Hajime Nakagami< >
-module(efirebirdsql_socket).
-export([send/2, recv/2, recv_align/2, recv_null_bitmap/2]).
-include("efirebirdsql.hrl").
send(Conn, Data) when Conn#conn.write_state =:= undefined ->
gen_tcp:send(Conn#conn.sock, Data);
send(Conn, Message)... | |
60a2abf8cedf4169391c7e633a12b99d252e3fd03363f72ad1fc70607c702270 | AccelerateHS/accelerate | Unique.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
{-# OPTIONS_HADDOCK hide #-}
-- |
-- Module : Data.Array.Accelerate.Array.Unique
Copyright : [ 2016 .. 2020 ] The Accelerate Team
-- License : BSD3
--
Maintainer : < >
-- Stability : experimen... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate/7c769b761d0b2a91f318096b9dd3fced94616961/src/Data/Array/Accelerate/Array/Unique.hs | haskell | # LANGUAGE BangPatterns #
# OPTIONS_HADDOCK hide #
|
Module : Data.Array.Accelerate.Array.Unique
License : BSD3
Stability : experimental
| A uniquely identifiable array.
For the purposes of memory management, we use arrays as keys in a table. For
this reason we need a way to uniquely identif... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
Copyright : [ 2016 .. 2020 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extensions )
module Data.Array.Accelerate.Array.Unique
where
import Data.Array.Accelerate.Lifetime
import Control.Applicative
import... |
1b427f2fc05371bfec3fb5a0f2128ceb3562e7f2b6358d3c687ef34bcc7c107b | mukul-rathi/bolt | update_identifier_capabilities.mli | open Ast.Ast_types
open Desugaring.Desugared_ast
(** Update identifiers that match the given names, filtering by
[capability list -> capability -> bool] - a function that given a list of all the
capabilities, decides whether a capability should be in the identifier. *)
val update_matching_identifier_caps_bloc... | null | https://raw.githubusercontent.com/mukul-rathi/bolt/1faf19d698852fdb6af2ee005a5f036ee1c76503/src/frontend/data_race_checker/update_identifier_capabilities.mli | ocaml | * Update identifiers that match the given names, filtering by
[capability list -> capability -> bool] - a function that given a list of all the
capabilities, decides whether a capability should be in the identifier. | open Ast.Ast_types
open Desugaring.Desugared_ast
val update_matching_identifier_caps_block_expr :
Var_name.t list -> (capability list -> capability -> bool) -> block_expr -> block_expr
|
9cbd9c6c39edd9789031498f116461ff9ce828a6172940460b57ed226e6f7ecd | danehuang/augurv2 | Main.hs | import Data.Either
import Control.Monad.Except
import AstUtil.Fresh
import AstUtil.Pretty
import qualified Core.ParseCore
import Low.ParseLowPP
import Low.LowSyn
import Core.CoreSyn
import Core.DensSyn
import Core.LintCore
-- import Low.LowpPrimSyn
import Low.RnLow
import Low .
import qualified Core.RnCore
... | null | https://raw.githubusercontent.com/danehuang/augurv2/480459bcc2eff898370a4e1b4f92b08ea3ab3f7b/compiler/augur/cmd/Main.hs | haskell | import Low.LowpPrimSyn
target = CPU
[ K, N, lam, x ]
testCompile "test/dethlr.rv" Nothing
testCompile "test/dethlr.rv" (Just "test/hlr1.infer") target
testCompile "test/dethlr.rv" (Just "test/hlr2.infer") target
testCompile "test/mvgmm.rv" Nothing
testCompile "test/mvgmm.rv" (Just "test/mvgmm1.infer") [] target... | import Data.Either
import Control.Monad.Except
import AstUtil.Fresh
import AstUtil.Pretty
import qualified Core.ParseCore
import Low.ParseLowPP
import Low.LowSyn
import Core.CoreSyn
import Core.DensSyn
import Core.LintCore
import Low.RnLow
import Low .
import qualified Core.RnCore
import Compile.Compile
imp... |
da293a919a1b7ec319cd8e10b2ca5a3394a0fd47b19b3cdf405587fb1cc0efd2 | goldfirere/units | PreciousMetals.hs | # LANGUAGE TemplateHaskell , TypeFamilies , TypeOperators #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Metrology.Units.PreciousMetals
Copyright : ( C ) 2013
-- License : BSD-style (see LICENSE)
Maintainer : ( )
-- Stability : expe... | null | https://raw.githubusercontent.com/goldfirere/units/4941c3b4325783ad3c5b6486231f395279d8511e/units-defs/Data/Units/PreciousMetals.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Metrology.Units.PreciousMetals
License : BSD-style (see LICENSE)
Stability : experimental
Portability : non-portable
Units used in the measure of precious metals.
-------------------------------------------... | # LANGUAGE TemplateHaskell , TypeFamilies , TypeOperators #
Copyright : ( C ) 2013
Maintainer : ( )
module Data.Units.PreciousMetals where
import Data.Metrology
import Data.Metrology.TH
import Data.Units.SI
import Data.Units.SI.Prefixes
import qualified Data.Units.US.Avoirdupois as Avdp
import qua... |
6a07447ef00f3eb120957ed801af3c972aa52ce79a53ac59be7ceb6326a69efd | spawnfest/eep49ers | openssl_ECC_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2018 - 2020 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/ssl/test/openssl_ECC_SUITE.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2018 - 2020 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(openssl_ECC_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("public_key/include/public_ke... |
dc143f831ad483f440cc178a75b63957b10267afee6b5eddf3472c15b9fb67f2 | ocaml/opam | opamCliMain.ml | (**************************************************************************)
(* *)
Copyright 2012 - 2019 OCamlPro
Copyright 2012 INRIA
(* ... | null | https://raw.githubusercontent.com/ocaml/opam/c53b1a83d73d05e0abd361f9bc8361dcd121b6e8/src/client/opamCliMain.ml | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2012 - 2019 OCamlPro
Copyright 2012 INRIA
GNU Lesser General Public License version 2.1 , with the special
open Cmdliner
open OpamStateTypes
open OpamTypesBase
open OpamStd.Op
exception InvalidCLI of ... |
7f3273986dfffe94ad54250895cb935130f2306d5c714da88e02129aa57dafa5 | ocaml-multicore/parafuzz | fma.ml | (* TEST *)
(* modified glibc's fma() tests *)
let error l x y z r c =
Printf.fprintf stdout
"%s FAIL!\tfma (%h, %h, %h) returned %h instead of %h.\n"
l x y z c (List.hd r)
let success l =
Printf.fprintf stdout "%s OK!\n" l
let fma_test l x y z r =
let c = Float.fma x y z in
... | null | https://raw.githubusercontent.com/ocaml-multicore/parafuzz/6a92906f1ba03287ffcb433063bded831a644fd5/testsuite/tests/fma/fma.ml | ocaml | TEST
modified glibc's fma() tests
test case description:
(string * float * float * float * float list)
| | | | |
id | | | IEEE compliant result in head,
| | | or, accepted fma emulation approximation
| | ... |
let error l x y z r c =
Printf.fprintf stdout
"%s FAIL!\tfma (%h, %h, %h) returned %h instead of %h.\n"
l x y z c (List.hd r)
let success l =
Printf.fprintf stdout "%s OK!\n" l
let fma_test l x y z r =
let c = Float.fma x y z in
if List.exists (fun i -> i = c) r
then succ... |
ec231949c4b29a4feadcf237263878f4f76ca3f77893e4a480f5ba177d695859 | DomainDrivenArchitecture/dda-pallet | versioned_plan_test.clj | Licensed to the Apache Software Foundation ( ASF ) under one
; or more contributor license agreements. See the NOTICE file
; distributed with this work for additional information
; regarding copyright ownership. The ASF licenses this file
to you under the Apache License , Version 2.0 ( the
; "License"); you may not... | null | https://raw.githubusercontent.com/DomainDrivenArchitecture/dda-pallet/aa251ac1c678a46ef9183d9fb2d447c4f77a99d3/test/src/dda/pallet/core/infra/versioned_plan_test.clj | clojure | or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
"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 b... | Licensed to the Apache Software Foundation ( ASF ) under one
to you under the Apache License , Version 2.0 ( the
distributed under the License is distributed on an " AS IS " BASIS ,
(ns dda.pallet.core.infra.versioned-plan-test
(:require
[clojure.test :refer :all]
[schema.core :as s]
[dda.pallet.co... |
7672415b575ff9512b0054fbd4ae24c6f34e0b7ba21614c88ad75a13ab11ef54 | yjqww6/racket-x64asm | helper.rkt | #lang typed/racket/base
(require racket/match
(for-syntax racket/base syntax/parse
syntax/id-table))
(provide define-struct-match)
(begin-for-syntax
(define-syntax-class kid
(pattern
id:id
#:attr kw (datum->syntax #f (string->keyword (symbol->string (syntax-e #'id)))))))
... | null | https://raw.githubusercontent.com/yjqww6/racket-x64asm/73c2b8edc7e96a6248a7ee25fd7a6ae7065ee966/x64asm-lib/x64asm/private/helper.rkt | racket | #lang typed/racket/base
(require racket/match
(for-syntax racket/base syntax/parse
syntax/id-table))
(provide define-struct-match)
(begin-for-syntax
(define-syntax-class kid
(pattern
id:id
#:attr kw (datum->syntax #f (string->keyword (symbol->string (syntax-e #'id)))))))
... | |
991bcf37d4a0103fa500579251cbcb81d30738ee5b3c78fdf256316c2f19fabe | elastic/eui-cljs | format_text.cljs | (ns eui.services.format-text
(:require ["@elastic/eui/lib/services/format/format_text.js" :as eui]))
(def formatText eui/formatText)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/services/format_text.cljs | clojure | (ns eui.services.format-text
(:require ["@elastic/eui/lib/services/format/format_text.js" :as eui]))
(def formatText eui/formatText)
| |
9ee14cab3bdde62f450d0e386f47aff2cf8baa59ac23341577630d112d0b6924 | janestreet/hardcaml_circuits | pipelined_adder.ml | open Base
open Hardcaml
open Signal
Creates an architecture that looks like
{ v
| reg | reg | + |
| reg | + | reg |
| + | reg | reg |
v }
Each adder is of size [ part_width+1 ] and sums 3 operands ( the third being a carry in
bit ) . The adder... | null | https://raw.githubusercontent.com/janestreet/hardcaml_circuits/a2c2d1ea3e6957c3cda4767d519e94c20f1172b2/src/pipelined_adder.ml | ocaml | assuming that the synthesizer will perform the carry addition for 'free'
This is the core of the architecture. It takes the carry outs for [a+b] and [a+b+1]
for each sub-part of the adder, and exposes the internal carry out as part of the
sum. See the paper for more details. | open Base
open Hardcaml
open Signal
Creates an architecture that looks like
{ v
| reg | reg | + |
| reg | + | reg |
| + | reg | reg |
v }
Each adder is of size [ part_width+1 ] and sums 3 operands ( the third being a carry in
bit ) . The adder... |
9068e9ab87d344f1b3cd64c578eafd1dbc1f3d9d99b0bd2ceaf3964906bfd836 | conjure-cp/conjure | TranslateParameter.hs | module Conjure.UI.TranslateParameter ( translateParameter ) where
-- conjure
import Conjure.Prelude
import Conjure.Bug
import Conjure.UserError
import Conjure.Language.Definition
import Conjure.Language.Domain
import Conjure.Language.Constant
import Conjure.Language.Type
import Conjure.Language.Pretty
import Conjure.L... | null | https://raw.githubusercontent.com/conjure-cp/conjure/dd5a27df138af2ccbbb970274c2b8f22ac6b26a0/src/Conjure/UI/TranslateParameter.hs | haskell | conjure
eprime model
essence param
eprime param
some sanity checks here
TODO: check if for every given there is a letting (there can be more)
TODO: check if the same letting has multiple values for it
we may be able to do better!
already sufficiently typed
empty collection, unknown type
calculate the type of... | module Conjure.UI.TranslateParameter ( translateParameter ) where
import Conjure.Prelude
import Conjure.Bug
import Conjure.UserError
import Conjure.Language.Definition
import Conjure.Language.Domain
import Conjure.Language.Constant
import Conjure.Language.Type
import Conjure.Language.Pretty
import Conjure.Language.Ins... |
e79cafd322a290206627962734c7f6d591dd22e57d526a34f2e58ae5445ce0f4 | Zulu-Inuoe/jzon | jzon-parsing.lisp | (defpackage #:com.inuoe.jzon-parsing
(:use #:cl)
(:local-nicknames
(#:jzon #:com.inuoe.jzon))
(:import-from
#:alexandria
#:eswitch
#:read-stream-content-into-string)
(:import-from #:cl-json)
(:import-from #:jonathan)
(:import-from #:json-streams)
(:import-from #:jsown)
(:import-from #:shasht... | null | https://raw.githubusercontent.com/Zulu-Inuoe/jzon/c69fa5c08dee2c4fb2c5f4a39d581943a2c4cdd8/JSONTestSuite/jzon-parsing.lisp | lisp | (defpackage #:com.inuoe.jzon-parsing
(:use #:cl)
(:local-nicknames
(#:jzon #:com.inuoe.jzon))
(:import-from
#:alexandria
#:eswitch
#:read-stream-content-into-string)
(:import-from #:cl-json)
(:import-from #:jonathan)
(:import-from #:json-streams)
(:import-from #:jsown)
(:import-from #:shasht... | |
fc9a1049baece32293dbb965a0a0226ad1ac5414d4f2742d302a6456e4fb4b04 | atolab/zenoh | zenoh_api.ml |
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* -2.0 , or the Apache License , Version 2.0
* which is available at -2.0 .
*
* SPDX - License - Ident... | null | https://raw.githubusercontent.com/atolab/zenoh/32e311aae6be93c001fd725b4d918b2fb4e9713d/src/zenoh-ocaml/zenoh_api.ml | ocaml | TODO: explicit close session... unsubscribe? unstore? |
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* -2.0 , or the Apache License , Version 2.0
* which is available at -2.0 .
*
* SPDX - License - Ident... |
b0640b5548d2335ded02c4de7d4925caa30b5f5b4a0a62fa31194f3d7283590e | gedge-platform/gedge-platform | Elixir.RabbitMQ.CLI.Ctl.Commands.DeleteShovelCommand.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module('Elixir.RabbitMQ.CLI.Ctl.Commands.DeleteS... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_shovel/src/Elixir.RabbitMQ.CLI.Ctl.Commands.DeleteShovelCommand.erl | erlang |
----------------------------------------------------------------------------
Callbacks
---------------------------------------------------------------------------- | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module('Elixir.RabbitMQ.CLI.Ctl.Commands.DeleteShovelC... |
2fdbc30df9816389a8c38044b2293e84605ee192734e1fb02bcd71f61464e4d3 | folivetti/ITEA | Eval.hs | # LANGUAGE FlexibleContexts #
|
Module : IT.Eval
Description : Evaluation function for IT expressions .
Copyright : ( c ) , 2020
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
Definition of functions pertaining to the conversion
and evaluation of an ... | null | https://raw.githubusercontent.com/folivetti/ITEA/04497e282f7b20f3c0f465bf3b2b933fe291f859/src/IT/Eval.hs | haskell | # OPTIONS_GHC -Wno-unused-matches #
| log(x+1)
* Evaluation of the Transformation functions
It supports any type that is an instance of Floating.
| Evaluate the transformation function 'f' in a data point 'x'.
| Evaluate the derivative of a transformation function.
| Evaluates the interaction 'ks' in the datase... | # LANGUAGE FlexibleContexts #
|
Module : IT.Eval
Description : Evaluation function for IT expressions .
Copyright : ( c ) , 2020
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
Definition of functions pertaining to the conversion
and evaluation of an ... |
4e5cc17ad7688352c35bdaae6f7a8c6d6e7eed0c4ddcc9b5cdfb1736eccca222 | abridgewater/nq-clim | event-queue-protocol.lisp | ;;;
nq - clim / event / event - queue - protocol
;;;
The parts of CLIM II 8.1.1 that deal with event queues proper .
;;;
(cl:defpackage :nq-clim/event/event-queue-protocol
(:use :cl)
(:export
"SHEET-EVENT-QUEUE"
"DISPATCH-EVENT"
"QUEUE-EVENT"
"HANDLE-EVENT"
"EVENT-READ"
"EVENT-READ-NO-HANG"
... | null | https://raw.githubusercontent.com/abridgewater/nq-clim/11d339fd0ac77b6d624fc5537b170294a191a3de/event/event-queue-protocol.lisp | lisp |
Technically a sheet function, not an event-queue function, but it
put it at the moment. | nq - clim / event / event - queue - protocol
The parts of CLIM II 8.1.1 that deal with event queues proper .
(cl:defpackage :nq-clim/event/event-queue-protocol
(:use :cl)
(:export
"SHEET-EVENT-QUEUE"
"DISPATCH-EVENT"
"QUEUE-EVENT"
"HANDLE-EVENT"
"EVENT-READ"
"EVENT-READ-NO-HANG"
"EVENT-PEE... |
c23c7893d4ed4ab067b3f69c9bd912ae3bad7bf1ac1154527950c26334f38dad | clojure/test.check | check.cljc | Copyright ( c ) , , and contributors .
; All rights reserved.
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are a... | null | https://raw.githubusercontent.com/clojure/test.check/c05034f911fa140913958b79aa51017d3f2f4426/src/main/clojure/clojure/test/check.cljc | clojure | All rights reserved.
The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.... | Copyright ( c ) , , and contributors .
(ns clojure.test.check
(:require [clojure.test.check.generators :as gen]
[clojure.test.check.random :as random]
[clojure.test.check.results :as results]
[clojure.test.check.rose-tree :as rose]
[clojure.test.check.impl :ref... |
9c3233ff4de3ab403e972827744df9819087f39711e5fcd860cc843a30ccbaa8 | CryptoKami/cryptokami-core | Toss.hs | -- | Binary instances for Toss types.
module Pos.Binary.Ssc.Toss
(
) where
import Pos.Binary.Class (Cons (..), Field (..), deriveSimpleBi, deriveSimpleBiCxt)
import Pos.Core.Configuration (HasConfiguration)
import Pos.Core.Ssc (CommitmentsMap, OpeningsMap, SharesMap, VssCer... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/ssc/Pos/Binary/Ssc/Toss.hs | haskell | | Binary instances for Toss types. |
module Pos.Binary.Ssc.Toss
(
) where
import Pos.Binary.Class (Cons (..), Field (..), deriveSimpleBi, deriveSimpleBiCxt)
import Pos.Core.Configuration (HasConfiguration)
import Pos.Core.Ssc (CommitmentsMap, OpeningsMap, SharesMap, VssCertificatesMap)
import Pos.Ssc... |
53853e57d266cc43c0cf4f30a72f7ab2534b5669f6e7ca447e8a01eef8b27add | orthecreedence/blackbird | util.lisp | (defpackage :blackbird-test
(:use :cl :fiveam :cl-async-base :cl-async-util :blackbird)
(:shadow blackbird:*debug-on-error*)
(:export #:run-tests))
(in-package :blackbird-test)
(defmacro async-let ((&rest bindings) &body body)
"Wrap an async op inside of a let/start-event-loop block to mimick a blocking
act... | null | https://raw.githubusercontent.com/orthecreedence/blackbird/d361f81c1411dec07f6c2dcb11c78f7aea9aaca8/test/util.lisp | lisp | define the test suite | (defpackage :blackbird-test
(:use :cl :fiveam :cl-async-base :cl-async-util :blackbird)
(:shadow blackbird:*debug-on-error*)
(:export #:run-tests))
(in-package :blackbird-test)
(defmacro async-let ((&rest bindings) &body body)
"Wrap an async op inside of a let/start-event-loop block to mimick a blocking
act... |
26d6a9d80e4c073dd96df2abdeb1314026b45bde7b8b69a27cdc792edda7df20 | thephoeron/let-over-lambda | let-over-lambda.lisp | (in-package cl-user)
(defpackage let-over-lambda-test
(:use cl let-over-lambda prove)
(:import-from named-readtables
in-readtable))
(in-package let-over-lambda-test)
(in-readtable lol-syntax)
;; NOTE: To run this test file, execute `(asdf:test-system :let-over-lambda)' in your Lisp.
(plan 8)
(... | null | https://raw.githubusercontent.com/thephoeron/let-over-lambda/481b2e3ab4646186451dfdd2062113203287d520/t/let-over-lambda.lisp | lisp | NOTE: To run this test file, execute `(asdf:test-system :let-over-lambda)' in your Lisp. | (in-package cl-user)
(defpackage let-over-lambda-test
(:use cl let-over-lambda prove)
(:import-from named-readtables
in-readtable))
(in-package let-over-lambda-test)
(in-readtable lol-syntax)
(plan 8)
(defun! fn! ()
`(let ((,g!test 123))
,g!test))
(defmacro fn-macro ()
(fn!))
(defte... |
9fa014ccb6922c8b4cc76764135344fc5e14a42175668d77c79e0e82e305dbef | louispan/data-diverse | CaseFunc.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
module Data.Diverse.CaseFunc where
import Data.Diverse.Ca... | null | https://raw.githubusercontent.com/louispan/data-diverse/4033c90c44dab5824f76d64b7128bb6dea2b5dc7/src/Data/Diverse/CaseFunc.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE RankNTypes #
| This handler stores a polymorphic function that returns a different type.
@
@
@
@
/
| This handler stores a polymorphic function that doesn't change the type.
@
@
| This handler stores a polymorphic function that work on higher kinds, eg 'Functor'
You... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
module Data.Diverse.CaseFunc where
import Data.Diverse.Case
import Data.Diverse.Reiterate
import Data.Diverse.TypeLeve... |
24645d1ae5c70447a6481d0a4f4bc972b52eac324586719802c55fe2482853ab | samrocketman/home | phillips-film-grain.scm | ;
; The GIMP -- an image manipulation program
Copyright ( C ) 1995 and
;
Film Grain script for GIMP 2.4
Copyright ( C ) 2007 < >
;
; Tags: photo, grain, noise, film
;
; Author statement:
;
Based on the tutorial at
; This script adds that gritty, art-house/street-photography/high-ISO
; grainy film lo... | null | https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/phillips-film-grain.scm | scheme |
The GIMP -- an image manipulation program
Tags: photo, grain, noise, film
Author statement:
This script adds that gritty, art-house/street-photography/high-ISO
grainy film look, especially in monochromatic photos.
--------------------------------------------------------------------
------------------------... | Copyright ( C ) 1995 and
Film Grain script for GIMP 2.4
Copyright ( C ) 2007 < >
Based on the tutorial at
Distributed by Gimp FX Foundry project
Version 1.3 ( 5th August 2007 )
Version 1.2
- Made the script compatible with GIMP 2.3
it under the terms of the GNU General Public License ... |
a185059c934b9c6e79f294ce6a1b55e98fdd4f4b9c4c2c47be2d7f57d6f91c01 | WhatsApp/erlt | erltc.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1997 - 2017 . All Rights Reserved .
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 Lice... | null | https://raw.githubusercontent.com/WhatsApp/erlt/616a4adc628ca8754112e659701e57f1cd7fecd1/erltc/src/erltc.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 1997 - 2017 . All Rights Reserved .
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(erltc).
NOTE : what you see below is based on copy... |
3c95f448c4aa23d2b7b33426f33f59ab7efa58f692ec51f3d974b7fed193bafa | ddmcdonald/sparser | ns-unknown-rd-items-phase3-10401-10800.lisp |
(IN-PACKAGE :SP)
(DEFPARAMETER SPARSER::*NS-RD-PHASE3-10401-10800*
'("2P-MRLC" "A+P" "A-172" "A-43" "A-498" "A-C" "A-D" "A-E" "A-GVGD" "A-H"
"A-allele" "A-deficiency" "A-deficient" "A-loop" "A-type" "A1" "A1-treated"
"A1062T" "A1257T" "A1315T" "A1k" "A2" "A20" "A20-1" "A20-2"
"A20-2-resistant" "A20-OTUmt... | null | https://raw.githubusercontent.com/ddmcdonald/sparser/304bd02d0cf7337ca25c8f1d44b1d7912759460f/Sparser/code/s/tools/ns-stuff/old-unknown/ns-unknown-rd-items-phase3-10401-10800.lisp | lisp |
(IN-PACKAGE :SP)
(DEFPARAMETER SPARSER::*NS-RD-PHASE3-10401-10800*
'("2P-MRLC" "A+P" "A-172" "A-43" "A-498" "A-C" "A-D" "A-E" "A-GVGD" "A-H"
"A-allele" "A-deficiency" "A-deficient" "A-loop" "A-type" "A1" "A1-treated"
"A1062T" "A1257T" "A1315T" "A1k" "A2" "A20" "A20-1" "A20-2"
"A20-2-resistant" "A20-OTUmt... | |
7c4859a3c17385b0d942624dacb69804d102137bb5c6f6a2e12429aa1517f148 | patricoferris/meio | main.ml | open Eio
let spawn ~clock min max =
Switch.run @@ fun sw ->
for i = min to max do
Fiber.fork ~sw (fun () -> Time.sleep clock (float_of_int i));
Time.sleep clock (float_of_int (max - i))
done
Based on the Tokio Console example application
let main clock =
let p, r = Promise.create () in
Switch.run ... | null | https://raw.githubusercontent.com/patricoferris/meio/635b3dcaecd84ffacb2b6f7d2990cb668d61d5bb/example/main.ml | ocaml | A long running task | open Eio
let spawn ~clock min max =
Switch.run @@ fun sw ->
for i = min to max do
Fiber.fork ~sw (fun () -> Time.sleep clock (float_of_int i));
Time.sleep clock (float_of_int (max - i))
done
Based on the Tokio Console example application
let main clock =
let p, r = Promise.create () in
Switch.run ... |
ed3d466a642f45a3c2d7ce084f171aa37fb3ac936c8b692a1cf137e226f4db0a | MarcWeber/hasktags | testcase4.hs | -- to be found logM
-- to be found debugM
-- to be found infoM
-- to be found noticeM
-- to be found warningM
-- to be found errorM
-- to be found criticalM
-- to be found alertM
-- to be found emergencyM
-- to be found traplogging
to be found
to be found getLogger
-- to be found getRootLogger
-- to be found rootL... | null | https://raw.githubusercontent.com/MarcWeber/hasktags/65bcbecb695f0d2f31c2436958480535b8193b6c/testcases/testcase4.hs | haskell | to be found logM
to be found debugM
to be found infoM
to be found noticeM
to be found warningM
to be found errorM
to be found criticalM
to be found alertM
to be found emergencyM
to be found traplogging
to be found getRootLogger
to be found rootLoggerName
to be found getLevel
to be found saveGlobalLogger
... | to be found
to be found getLogger
to be found
to be found setHandlers
to be found setLevel
arch - tag : Logger main definition
Copyright ( C ) 2004 - 2006 < >
This program is free software ; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as pu... |
e8e1bdb48fb1a800326e3eca605682caeee577a758acf72e1e2531c2cf8f33ad | koto-bank/lbge | image-loader-test.lisp | (define-test image-loader-test
((:i :lbge.image))
(testing "Loading TGA"
(let ((tga (i:load-image #P"test-file.tga")))
TGA
(ok (eq 'i:image (type-of tga)))
(ok (= 128 (i:width tga)))
(ok (= 128 (i:height tga)))))
(testing "Loading PNG"
(let ((png (i:load-image #P"test-file.png")))
... | null | https://raw.githubusercontent.com/koto-bank/lbge/6be4b3212ea87288b1ee2a655e9a1bb30a74dd27/src/image-loader/t/image-loader-test.lisp | lisp | PNG | (define-test image-loader-test
((:i :lbge.image))
(testing "Loading TGA"
(let ((tga (i:load-image #P"test-file.tga")))
TGA
(ok (eq 'i:image (type-of tga)))
(ok (= 128 (i:width tga)))
(ok (= 128 (i:height tga)))))
(testing "Loading PNG"
(let ((png (i:load-image #P"test-file.png")))
... |
a51af6f9f6e3520bc29cd09f074a2ab276abf0c6ca5a0ce3c1ec4f85b56218ad | phantomics/seed | style.base.lisp | ;;;; style.base.lisp
(in-package #:seed.foreign.browser-spec.style.base)
(defparameter *local-package-name* (package-name *package*))
(defmacro foundational-browser-style-base ()
"Generate the paths for the style source files."
(mapcar (lambda (item) (asdf:system-relative-pathname (intern *local-package-name* "K... | null | https://raw.githubusercontent.com/phantomics/seed/f128969c671c078543574395d6b23a1a5f2723f8/seed.foreign.browser-spec.style.base/style.base.lisp | lisp | style.base.lisp
"./node_modules/react-select/dist/react-select.css" |
(in-package #:seed.foreign.browser-spec.style.base)
(defparameter *local-package-name* (package-name *package*))
(defmacro foundational-browser-style-base ()
"Generate the paths for the style source files."
(mapcar (lambda (item) (asdf:system-relative-pathname (intern *local-package-name* "KEYWORD") item))
(l... |
15938e754b4c9f5406129c8a6859e41b5a2c2b25370fa4d33487712c1a64edb4 | chovencorp/erlangzmq | router_with_dealer.erl | @copyright 2016 Choven Corp.
%%
This file is part of erlangzmq .
%%
erlangzmq is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
%% (at your option) any later v... | null | https://raw.githubusercontent.com/chovencorp/erlangzmq/2be5c3b36dd78b010d1790a8f74ae2e823f5a424/examples/router_with_dealer.erl | erlang |
(at your option) any later version.
erlangzmq is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
wait workers to be established | @copyright 2016 Choven Corp.
This file is part of erlangzmq .
erlangzmq is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of ... |
88028d2ec6ab2e91950214da32c8da19758a9db4c098f39470e13a7429b478b5 | glebec/haskell-programming-allen-moronuki | Main.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
module Main where
import Control.Exception
import Control.Monad (forever)
import Data.List (intersperse)
import Data.Text (Text)
import qualified Data.Text as T
import Data.Text.Encoding (encodeUtf8, decodeUtf8)
import Data.Typ... | null | https://raw.githubusercontent.com/glebec/haskell-programming-allen-moronuki/99bd232f523e426d18a5e096f1cf771228c55f52/31-final-project/fingerd/src/Main.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
module Main where
import Control.Exception
import Control.Monad (forever)
import Data.List (intersperse)
import Data.Text (Text)
import qualified Data.Text as T
import Data.Text.Encoding (encodeUtf8, decodeUtf8)
import Data.Typeable
import Database.SQLite.Simpl... |
4751de05c8cfc3bec957a74a81d53086b859643e92e02d748136386db905c100 | modular-macros/ocaml-macros | terminfo.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/utils/terminfo.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
Basic interface to the terminfo database
type status =
| Uninitialised
| Bad_term
| Good_term of... |
f542f084992f3d37849a139c8824896f2568053a9bd30b6c54f0cda161b46c1f | sig-gis/gridfire | fuel_models_test.clj | (ns gridfire.fuel-models-test
(:require [clojure.test :refer :all]
[gridfire.fuel-models :refer :all]
[gridfire.behaveplus-results :refer :all]))
;; Checks live fuel moisture of extinction and dynamic fuel loading for the S&B40 fuel models under fully cured conditions
(deftest moisturize-test... | null | https://raw.githubusercontent.com/sig-gis/gridfire/44aeaf56fceb01f61b21db6220d2cb562a92570b/test/gridfire/fuel_models_test.clj | clojure | Checks live fuel moisture of extinction and dynamic fuel loading for the S&B40 fuel models under fully cured conditions
TODO: Add moisturize-test-wet | (ns gridfire.fuel-models-test
(:require [clojure.test :refer :all]
[gridfire.fuel-models :refer :all]
[gridfire.behaveplus-results :refer :all]))
(deftest moisturize-test-dry
(doseq [num sb40-fuel-models]
(let [gridfire-fuel-model-dry (build-fuel-model num)
gridfire-fuel-mod... |
da85c12180104b8b2d24f3952c6bb53ddc4917186cfa4af3a900f79843837d14 | Helium4Haskell/helium | DataAppTyvar.hs | module DataAppTyvar where
data A a = A (a Int)
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/staticerrors/DataAppTyvar.hs | haskell | module DataAppTyvar where
data A a = A (a Int)
| |
d7255ec5d36b36ab09c48bf98edfa9e3198e1dbc137f9b92e248ba5d9862ddfc | saikyun/clobits | ni.clj | ;; This file is autogenerated -- probably shouldn't modify it by hand
(clojure.core/ns
clobits.ncurses.ni
(:import clobits.wrappers.IWrapperNI)
(:gen-class))
(clojure.core/defn
free
[^clobits.wrappers.IWrapperNI ptr]
(clobits.ncurses.ni.interop/free (.unwrap ptr)))
(clojure.core/defn
malloc
^clobits.wrapper... | null | https://raw.githubusercontent.com/saikyun/clobits/67bc60cbf6bed8a5178d552d3485e4117fb4df10/examples/ncurses/gen-src/clj/clobits/ncurses/ni.clj | clojure | This file is autogenerated -- probably shouldn't modify it by hand | (clojure.core/ns
clobits.ncurses.ni
(:import clobits.wrappers.IWrapperNI)
(:gen-class))
(clojure.core/defn
free
[^clobits.wrappers.IWrapperNI ptr]
(clobits.ncurses.ni.interop/free (.unwrap ptr)))
(clojure.core/defn
malloc
^clobits.wrappers.WrapVoid
[^long size]
(new clobits.wrappers.WrapVoid
(clobits.nc... |
f7a93ce782e7836261338e357080c30ca7c67104268ac03abaef6605b29ea529 | bobzhang/fan | rec_patt.ml |
let f = fun ?s () -> s;
let g ?s = f ?s ();
let ? ( s=3 ) = 3 ;
| null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/testr/rec_patt.ml | ocaml |
let f = fun ?s () -> s;
let g ?s = f ?s ();
let ? ( s=3 ) = 3 ;
| |
40b28c04ffcc3f5842b7081246c95d2bff785d367e13248149ce7b5edf6b5f59 | degree9/enterprise | headers.cljs | (ns degree9.headers
(:require [goog.object :as obj]
[degree9.debug :as dbg]))
(dbg/defdebug debug "degree9:enterprise:headers")
;; Feathers Headers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn- req-headers [req]
(obj/get req "headers"))
(defn- req-feathers [req]
(obj/get req ... | null | https://raw.githubusercontent.com/degree9/enterprise/36e4f242c18b1dde54d5a15c668b17dc800c01ff/src/degree9/headers.cljs | clojure | Feathers Headers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
| (ns degree9.headers
(:require [goog.object :as obj]
[degree9.debug :as dbg]))
(dbg/defdebug debug "degree9:enterprise:headers")
(defn- req-headers [req]
(obj/get req "headers"))
(defn- req-feathers [req]
(obj/get req "feathers"))
(defn- fs-headers! [fs headers]
(obj/set fs "headers" headers))
... |
8102ad222d9785cc89a6f2ac63d6cd1f1121578b5612bccc56dc13330265ac3d | austral/austral | Cli.mli |
Part of the Austral project , under the Apache License v2.0 with LLVM Exceptions .
See LICENSE file for details .
SPDX - License - Identifier : Apache-2.0 WITH LLVM - exception
Part of the Austral project, under the Apache License v2.0 with LLVM Exceptions.
See LICENSE file for details.
SPDX... | null | https://raw.githubusercontent.com/austral/austral/69b6f7de36cc9576483acd1ac4a31bf52074dbd1/lib/Cli.mli | ocaml | * This module implements the compiler's command line interface.
* The entry point function for the compiler. |
Part of the Austral project , under the Apache License v2.0 with LLVM Exceptions .
See LICENSE file for details .
SPDX - License - Identifier : Apache-2.0 WITH LLVM - exception
Part of the Austral project, under the Apache License v2.0 with LLVM Exceptions.
See LICENSE file for details.
SPDX... |
2853456ee385d5f0c1c07adc81cc6d1c06555194d2baed0d7b23366b8e2ea828 | ghcjs/ghcjs | gEq2.hs | # LANGUAGE TypeOperators , DefaultSignatures , FlexibleInstances , DeriveGeneric #
# LANGUAGE FlexibleContexts #
module Main where
import GHC.Generics hiding (C, D)
class GEq' f where
geq' :: f a -> f a -> Bool
instance GEq' U1 where
geq' _ _ = True
instance (GEq c) => GEq' (K1 i c) where
geq' (K1 a) (K1 b) ... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/generics/geq/gEq2.hs | haskell | No instances for P or Rec because geq is only applicable to types of kind *
Base types instances (ad-hoc)
Generic instances
Generic instances
Example values
Tests | # LANGUAGE TypeOperators , DefaultSignatures , FlexibleInstances , DeriveGeneric #
# LANGUAGE FlexibleContexts #
module Main where
import GHC.Generics hiding (C, D)
class GEq' f where
geq' :: f a -> f a -> Bool
instance GEq' U1 where
geq' _ _ = True
instance (GEq c) => GEq' (K1 i c) where
geq' (K1 a) (K1 b) ... |
66fda2e756d36e4bbe4e2420ed688104131dac4c67abb1360606a37204dcaf5a | diku-dk/futhark | Futhark.hs | | Re - export the external modules for convenience .
module Language.Futhark
( module Language.Futhark.Syntax,
module Language.Futhark.Prop,
module Language.Futhark.FreeVars,
module Language.Futhark.Pretty,
Ident,
DimIndex,
Slice,
AppExp,
Exp,
Pat,
ModExp,
ModParam,
... | null | https://raw.githubusercontent.com/diku-dk/futhark/5a0507692af97edcfb392f29ae9489694ed22913/src/Language/Futhark.hs | haskell | | An identifier with type- and aliasing information.
| An index with type information.
| A slice with type information.
| An expression with type information.
| An application expression with type information.
| A pattern with type information.
| An constant declaration with type information.
| A type binding w... | | Re - export the external modules for convenience .
module Language.Futhark
( module Language.Futhark.Syntax,
module Language.Futhark.Prop,
module Language.Futhark.FreeVars,
module Language.Futhark.Pretty,
Ident,
DimIndex,
Slice,
AppExp,
Exp,
Pat,
ModExp,
ModParam,
... |
590e6523482553ae587a83e19f2cecb33fe2a8c1d63ea899b0bc54db68c2c6d2 | rd--/hsc3 | lfTri.help.hs | -- lfTri ; see <>
lfTri ar 500 1 * 0.1
lfTri ; used as both Oscillator and LFO
lfTri ar (lfTri kr 4 0 * 400 + 400) 0 * 0.1
-- lfTri ; multiple phases
let f = lfTri kr 0.4 (mce [0..3]) * 200 + 400
in mix (lfTri ar f 0 * 0.1)
lfTri ;
let x = midiCps (mouseX kr 20 72 Linear 0.2)
e = xLine kr 0.01 1 20 DoNothi... | null | https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Ugen/lfTri.help.hs | haskell | lfTri ; see <>
lfTri ; multiple phases
-- ; drawings | lfTri ar 500 1 * 0.1
lfTri ; used as both Oscillator and LFO
lfTri ar (lfTri kr 4 0 * 400 + 400) 0 * 0.1
let f = lfTri kr 0.4 (mce [0..3]) * 200 + 400
in mix (lfTri ar f 0 * 0.1)
lfTri ;
let x = midiCps (mouseX kr 20 72 Linear 0.2)
e = xLine kr 0.01 1 20 DoNothing
o1 = triAS 25 x * (1 - e)
o2 = lfT... |
31be8ce16367687328b7054cb8600f372012a4327af20dbf49e16fd434fae043 | neongreen/haskell-ex | BigInt.hs | module BigInt where
import Data.List
import Data.Monoid
data Sign = Pos | Neg
deriving (Eq, Show)
-- | A representation of a natural (non-negative) number:
0 is @[]@ , 123 is @[3,2,1]@.
type Nat = [Int]
data BigInt = BigInt {
-- | Sign (positive or negative). 0 is considered positive.
sign :: Sign,
nat ... | null | https://raw.githubusercontent.com/neongreen/haskell-ex/345115444fdf370a43390fd942e2851b9b1963ad/week2/bigint/neongreen/src/BigInt.hs | haskell | | A representation of a natural (non-negative) number:
| Sign (positive or negative). 0 is considered positive.
just use the (Pos, Neg) case | module BigInt where
import Data.List
import Data.Monoid
data Sign = Pos | Neg
deriving (Eq, Show)
0 is @[]@ , 123 is @[3,2,1]@.
type Nat = [Int]
data BigInt = BigInt {
sign :: Sign,
nat :: Nat }
deriving (Eq, Show)
instance Ord BigInt where
compare a b = case (sign a, sign b) of
(Pos, Pos) -> co... |
5d3372be949cff93665acc77ebc8389a4f22a137827b9fcc00efc67ba4ae3c64 | solita/mnt-teet | user_info.cljs | (ns teet.user.user-info
"Show user info in the UI, automatically resolved user information.
FIXME: remove after dummy users are not needed"
(:require [teet.user.user-model :as user-model]
[teet.app-state :as app-state]))
(def mock-users [{:user/id #uuid "4c8ec140-4bd8-403b-866f-d2d5db9bdf74"
... | null | https://raw.githubusercontent.com/solita/mnt-teet/7a5124975ce1c7f3e7a7c55fe23257ca3f7b6411/app/frontend/src/cljs/teet/user/user_info.cljs | clojure | (ns teet.user.user-info
"Show user info in the UI, automatically resolved user information.
FIXME: remove after dummy users are not needed"
(:require [teet.user.user-model :as user-model]
[teet.app-state :as app-state]))
(def mock-users [{:user/id #uuid "4c8ec140-4bd8-403b-866f-d2d5db9bdf74"
... | |
10bab31c297cecc5c7ca2ed6714d36fca3d91a13d1444a649f61d34eef3d9065 | webyrd/mediKanren | mk.rkt | #lang racket/base
(require racket/list
racket/include
racket/stream
)
(provide
run run* run-stream
== =/=
fresh
conde
symbolo numbero
absento
project
var?
fail
succeed
choice
inc
unify
walk
walk*
mplus
mplus*
bind
bind*
take take-stream
reify
)
;... | null | https://raw.githubusercontent.com/webyrd/mediKanren/a2b80ea94f66bcdd4305b9369ad4184c2afe9829/attic/pharos/mk.rkt | racket | extra stuff for racket
due mostly to samth
Substitution representation
Returns #f if not found, or a pair of u and the result of the lookup.
This distinguishes between #f indicating absence and being the result.
Scope object.
Used to determine whether a branch has occured between variable creation
and unificati... | #lang racket/base
(require racket/list
racket/include
racket/stream
)
(provide
run run* run-stream
== =/=
fresh
conde
symbolo numbero
absento
project
var?
fail
succeed
choice
inc
unify
walk
walk*
mplus
mplus*
bind
bind*
take take-stream
reify
)
(... |
d01dddcb487c5cd8b92bd30b123c76496aa71ab6f4a1c49a2a41e8789e418ce5 | david-broman/modelyze | bitSet.ml |
* Bitset - Efficient bit sets
* Copyright ( C ) 2003
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your option )... | null | https://raw.githubusercontent.com/david-broman/modelyze/e48c934283e683e268a9dfd0fed49d3c10277298/ext/extlib/bitSet.ml | ocaml | value used to round up index
number of shifts
Find highest set element or raise Not_found
0-y -> -1
x-y
MSBs differ, we need to scan arrays until we find a
difference
Note: rest of the array is handled automatically correct, since we
took a copy of the bigger set. |
* Bitset - Efficient bit sets
* Copyright ( C ) 2003
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your option )... |
d74c500319d096c65c896db9b22211747e34f280b73bd5c33ddee00a3228b613 | KestrelInstitute/Specware | comment-hack.lisp | -*- Mode : LISP ; Package : Parser ; Base : 10 ; Syntax : Common - Lisp -*-
(in-package :Parser4)
(defun comment-blank-lines (&optional (n 1))
;; No ";;;" prefix, just a blank line...
(format t "~&~V%" n))
(defun comment (format-string &rest format-args)
(let* ((str (apply #'format nil format-string format-a... | null | https://raw.githubusercontent.com/KestrelInstitute/Specware/2be6411c55f26432bf5c9e2f7778128898220c24/Library/Algorithms/Parsing/Chart/Handwritten/Lisp/comment-hack.lisp | lisp | Package : Parser ; Base : 10 ; Syntax : Common - Lisp -*-
No ";;;" prefix, just a blank line...
main comment routine uses this for each line to be output |
(in-package :Parser4)
(defun comment-blank-lines (&optional (n 1))
(format t "~&~V%" n))
(defun comment (format-string &rest format-args)
(let* ((str (apply #'format nil format-string format-args))
(old-i 0)
(n (length str)))
(dotimes (i n)
(let ((char (schar str i)))
(when (eq char #\newline)
... |
3d9a5940e6064e28b6f0c8a8785e606a452e4338262b41323d101ca22a27cd54 | techascent/tech.datatype | sparse_buffer_test.clj | (ns tech.v2.datatype.sparse.sparse-buffer-test
(:require [tech.v2.datatype.sparse.protocols :as sparse-proto]
[tech.v2.datatype :as dtype]
[tech.v2.datatype.sparse.sparse-buffer]
[clojure.test :refer :all]))
(defn ->pairs
[item-seq]
(->> item-seq
(mapv (fn [{:keys [data... | null | https://raw.githubusercontent.com/techascent/tech.datatype/8cc83d771d9621d580fd5d4d0625005bd7ab0e0c/test/tech/v2/datatype/sparse/sparse_buffer_test.clj | clojure | The item-by-item interfaces always check | (ns tech.v2.datatype.sparse.sparse-buffer-test
(:require [tech.v2.datatype.sparse.protocols :as sparse-proto]
[tech.v2.datatype :as dtype]
[tech.v2.datatype.sparse.sparse-buffer]
[clojure.test :refer :all]))
(defn ->pairs
[item-seq]
(->> item-seq
(mapv (fn [{:keys [data... |
c46ec93b7365083204be4f0509843cfddb02d62129d73331fa632232085ae0b3 | ertugrulcetin/procedure.async | async.clj | (ns procedure.async
(:require
[manifold.deferred :as d]
[manifold.stream :as s]
[weavejester.dependency :as dep]
[clojure.tools.logging :as log]
[clojure.string :as str]))
(defonce procedure-map (atom {}))
(defonce deps (atom (dep/graph)))
(defonce validation-fn (atom nil))
(defn dependencies [id]
... | null | https://raw.githubusercontent.com/ertugrulcetin/procedure.async/2f9af363904c297ef8332e4710db899c5c94e7cd/src/procedure/async.clj | clojure | It should not hit here ever, let's keep logging to be safe just in case
| (ns procedure.async
(:require
[manifold.deferred :as d]
[manifold.stream :as s]
[weavejester.dependency :as dep]
[clojure.tools.logging :as log]
[clojure.string :as str]))
(defonce procedure-map (atom {}))
(defonce deps (atom (dep/graph)))
(defonce validation-fn (atom nil))
(defn dependencies [id]
... |
2b53957e80ea9ce2710cf7e9b4c0c0a12853edee55611cc3409380839307f474 | roburio/albatross | vmm_resources.ml | ( c ) 2017 , 2018 , all rights reserved
open Vmm_core
let ( let* ) = Result.bind
type t = {
policies : Policy.t Vmm_trie.t ;
block_devices : (int * bool) Vmm_trie.t ;
unikernels : Unikernel.t Vmm_trie.t ;
}
let pp ppf t =
Vmm_trie.fold Name.root_path t.policies
(fun id p () ->
Fmt.pf ppf "pol... | null | https://raw.githubusercontent.com/roburio/albatross/06ce35c1386a601e92ee6282102fd775588661f6/src/vmm_resources.ml | ocaml | we should confirm the following invariant: Vm or Block have no siblings | ( c ) 2017 , 2018 , all rights reserved
open Vmm_core
let ( let* ) = Result.bind
type t = {
policies : Policy.t Vmm_trie.t ;
block_devices : (int * bool) Vmm_trie.t ;
unikernels : Unikernel.t Vmm_trie.t ;
}
let pp ppf t =
Vmm_trie.fold Name.root_path t.policies
(fun id p () ->
Fmt.pf ppf "pol... |
bc7a741dfb8e83c8b6d97b2dc342b45da55882bb3dda0b81dd675c15439df6b2 | sellout/haskerwaul | Idempotency.hs | module Haskerwaul.Law.Idempotency where
import Haskerwaul.Category.Monoidal.Cartesian
import Haskerwaul.Law
import Haskerwaul.Object
import Haskerwaul.Relation.Equality
-- | [nLab]()
idempotency :: (CartesianMonoidalCategory c, Ob c a)
=> Prod c a a `c` a -> Law c EqualityRelation a a
idempotency op' = La... | null | https://raw.githubusercontent.com/sellout/haskerwaul/cf54bd7ce5bf4f3d1fd0d9d991dc733785b66a73/src/Haskerwaul/Law/Idempotency.hs | haskell | | [nLab]() | module Haskerwaul.Law.Idempotency where
import Haskerwaul.Category.Monoidal.Cartesian
import Haskerwaul.Law
import Haskerwaul.Object
import Haskerwaul.Relation.Equality
idempotency :: (CartesianMonoidalCategory c, Ob c a)
=> Prod c a a `c` a -> Law c EqualityRelation a a
idempotency op' = Law id (op' . di... |
01e4993411055d5c89198e18abc3c1511291700af7a5801ac2a9ebb62217914e | gren-lang/compiler | Module.hs | {-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -Wall #
module Type.Constrain.Module
( constrain,
)
where
import AST.Canonical qualified as Can
import Data.Map.Strict qualified as Map
import Data.Name qualified as Name
import Gren.ModuleName qualified as ModuleName
import Reporting.Annotation qualified as A
impo... | null | https://raw.githubusercontent.com/gren-lang/compiler/49d5e5c5994a846d82c9518dcee06112c7630664/compiler/src/Type/Constrain/Module.hs | haskell | # LANGUAGE OverloadedStrings #
CONSTRAIN DECLARATIONS
PORT HELPERS
EFFECT MANAGER HELPERS | # OPTIONS_GHC -Wall #
module Type.Constrain.Module
( constrain,
)
where
import AST.Canonical qualified as Can
import Data.Map.Strict qualified as Map
import Data.Name qualified as Name
import Gren.ModuleName qualified as ModuleName
import Reporting.Annotation qualified as A
import Reporting.Error.Type qualified a... |
ca8976993c635b0fbbbd0d5a45b935a7602f5e91f1b9e1f5c693da466fb54ffc | scicloj/wadogo | index.clj | # Wadogo scales
Wadogo is the library which brings various transformations between domain and range ( codomain ) , either continuous or discrete . The idea is based on [ d3 - scale]( / d3 / d3 - scale ) and originally was a part of [ cljplot]( / generateme / cljplot ) library .
There are 13 different scales wit... | null | https://raw.githubusercontent.com/scicloj/wadogo/ae293aa28d6da55719c3f2771649c2f2e56b692b/index.clj | clojure | ## Scales
The scale is a structure which helps to transform one set of values into another. There are many different ways of mapping between domain and range, collected in the table below.
Scale acts as a mathematical function with defined inverse in most cases. Additionally there is a selection of helper functions ... | # Wadogo scales
Wadogo is the library which brings various transformations between domain and range ( codomain ) , either continuous or discrete . The idea is based on [ d3 - scale]( / d3 / d3 - scale ) and originally was a part of [ cljplot]( / generateme / cljplot ) library .
There are 13 different scales wit... |
eeade1c9098ed06f39a71610b6c7e842cdba48aecaaa72a409b127d5014ae242 | hslua/hslua | Documentation.hs | {-# LANGUAGE OverloadedStrings #-}
|
Module : HsLua . Packaging . Documentation
Copyright : © 2020 - 2023 : MIT
Maintainer : < tarleb+ >
Provides a function to print documentation if available .
Module : HsLua.Packaging.Documentation
Copyright : © 2020-2023 Albert Krewinkel
Licen... | null | https://raw.githubusercontent.com/hslua/hslua/e86d00dfa8b0915f3060c9e618fc3e373048d9c2/hslua-packaging/src/HsLua/Packaging/Documentation.hs | haskell | # LANGUAGE OverloadedStrings #
| Function that retrieves documentation.
| Function that returns the documentation of a given object, or @nil@
if no documentation is available.
| Pushes the documentation for the element at the given stack index.
Returns the type of the documentation object.
remove documentation ta... | |
Module : HsLua . Packaging . Documentation
Copyright : © 2020 - 2023 : MIT
Maintainer : < tarleb+ >
Provides a function to print documentation if available .
Module : HsLua.Packaging.Documentation
Copyright : © 2020-2023 Albert Krewinkel
License : MIT
Maintainer : Albert K... |
52bcb38a098579d661702b60dd1dac379de3b59c96c9fcf4ea43fad2ac62ab52 | fredlund/McErlang | mce_erl_analyze_project.erl | Copyright ( c ) 2009 ,
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions are met:
%% %% Redistributions of source code must retain the above copyright
%% notice, this list of conditions a... | null | https://raw.githubusercontent.com/fredlund/McErlang/25b38a38a729fdb3c3d2afb9be016bbb14237792/languages/erlang/src/mce_erl_analyze_project.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
%% Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
%% Redi... | Copyright ( c ) 2009 ,
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
@author
2006 - 2009
@private
-module(mce_erl_analyze_project).
-export([start/1,analyze/2]).
start([LibPath,Dir]) ->
... |
f4eaf1d6b398c2c3ab0995d8d156612d1dce2f4600a0748140119768a8cfa2d7 | softwarelanguageslab/maf | unsafe_send.scm | From SOTER benchmarks ( unsafe_send ) . Description from SOTER :
This example illustrates the " Verify Absence - of - Errors " mode . The server expects a tuple { REQUEST , PID - OF - SENDER } but the main sends to it an atom instead of its pid , then generating an exception when the server tries to send back a res... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/be58e02c63d25cab5b48fdf7b737b68b882e9dca/test/concurrentScheme/actors/contracts/soter/unsafe_send.scm | scheme | From SOTER benchmarks ( unsafe_send ) . Description from SOTER :
This example illustrates the " Verify Absence - of - Errors " mode . The server expects a tuple { REQUEST , PID - OF - SENDER } but the main sends to it an atom instead of its pid , then generating an exception when the server tries to send back a res... | |
7936c31821ccc37561619a8fc5f3b723ad67e61df9fabb9c1fbf24dfb0b87df7 | ekmett/categories | Braided.hs | # LANGUAGE CPP #
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
# LANGUAGE Trustworthy #
#endif
# LANGUAGE MultiParamTypeClasses #
-------------------------------------------------------------------------------------------
-- |
-- Module : Control.Category.Braided
Copyright : 2008 - 2012
-- Li... | null | https://raw.githubusercontent.com/ekmett/categories/4a02808d28b275f59d9d6c08f0c2d329ee567a97/old/src/Control/Category/Braided.hs | haskell | -----------------------------------------------------------------------------------------
|
Module : Control.Category.Braided
License : BSD
Stability : experimental
Portability: portable
-----------------------------------------------------------------------------------------
}
|
If we have a symmetric ... | # LANGUAGE CPP #
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
# LANGUAGE Trustworthy #
#endif
# LANGUAGE MultiParamTypeClasses #
Copyright : 2008 - 2012
Maintainer : < >
module Control.Category.Braided
( Braided(..)
, Symmetric
, swap
) where
import Control . Categorical . Bifunc... |
d8e220284aedd512828ab375ddd7cf42833bf6526ef1d70ae84cc577bf11f3bc | seriyps/mtproto_proxy | gen_timeout.erl | @author < >
( C ) 2018 ,
%%% @doc
%%%
%%% @end
Created : 9 Apr 2018 by < >
-module(gen_timeout).
-export([new/1,
set_timeout/2,
bump/1,
reset/1,
is_expired/1,
time_to_message/1,
time_left/1]).
-export([upgrade/1]).
-export_type([tout/0, opts/0]).
... | null | https://raw.githubusercontent.com/seriyps/mtproto_proxy/5ad7c536da57ff89dea488941c7ff4711372d858/src/gen_timeout.erl | erlang | @doc
@end
Got message, but not yet expired | @author < >
( C ) 2018 ,
Created : 9 Apr 2018 by < >
-module(gen_timeout).
-export([new/1,
set_timeout/2,
bump/1,
reset/1,
is_expired/1,
time_to_message/1,
time_left/1]).
-export([upgrade/1]).
-export_type([tout/0, opts/0]).
-record(timeout,
... |
d84e0e3ba1daf0d937abd5727beecf4283012ed36a6ae897a302b11c5038d3dc | bsansouci/bsb-native | translobj.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Cri... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/bytecomp/translobj.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 Q Public License version 1.0 .
open Misc
open Primitive
open Asttypes
ope... |
5914173f1e8841449d841e07cf448732413e6be434415e0fa626b7079d590607 | clojure-interop/java-jdk | TransformerHandler.clj | (ns javax.xml.transform.sax.TransformerHandler
"A TransformerHandler
listens for SAX ContentHandler parse events and transforms
them to a Result."
(:refer-clojure :only [require comment defn ->])
(:import [javax.xml.transform.sax TransformerHandler]))
(defn set-result
"Set the Result associated with this
... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/transform/sax/TransformerHandler.clj | clojure | (ns javax.xml.transform.sax.TransformerHandler
"A TransformerHandler
listens for SAX ContentHandler parse events and transforms
them to a Result."
(:refer-clojure :only [require comment defn ->])
(:import [javax.xml.transform.sax TransformerHandler]))
(defn set-result
"Set the Result associated with this
... | |
3e9dbf35fd4e60686ca7bce89158c6fac047b7173ce60fe00ae942fc5c93cd88 | javalib-team/sawja | jCRA.ml |
* This file is part of SAWJA
* Copyright ( c)2007 ( Université de Rennes 1 )
* Copyright ( c)2007 , 2008 , 2009 ( CNRS )
* Copyright ( c)2009 ( INRIA )
*
* This program is free software : you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as publ... | null | https://raw.githubusercontent.com/javalib-team/sawja/da39f9c1c4fc52a1a1a6350be0e39789812b6c00/src/jCRA.ml | ocaml | should only happen with [clone()] |
* This file is part of SAWJA
* Copyright ( c)2007 ( Université de Rennes 1 )
* Copyright ( c)2007 , 2008 , 2009 ( CNRS )
* Copyright ( c)2009 ( INRIA )
*
* This program is free software : you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as publ... |
9f364d8b7be73fbfe4049beed2e94bcbafb0ab60f77e27482f71045d7651b6b7 | ocsigen/eliom | eliom_lib.client.mli | Ocsigen
*
* Copyright ( C ) 2011
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your ... | null | https://raw.githubusercontent.com/ocsigen/eliom/c3e0eea5bef02e0af3942b6d27585add95d01d6c/src/lib/eliom_lib.client.mli | ocaml | * Eliom standard library
* URL manipulation
* Extracts path from a URL string. Works on a best-effort basis
for relative URLs
* Deprecated. Use Lwt_log.ign_raise_error_f instead
* Deprecated. Use Lwt_log.ign_info_f instead
* Deprecated. Use Lwt_log.ign_info_f instead | Ocsigen
*
* Copyright ( C ) 2011
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your ... |
2a3298e647a5157478843fd57a591228455ed5a0fb0bced1f572c7da2eedf264 | funimage/funimage | project.clj | (defproject funimage "0.1.100-SNAPSHOT"
:description "Functional Image Processing with ImageJ/FIJI"
:url ""
:license {:name "Apache v2.0"
:url ""}
:dependencies [[org.clojure/clojure "1.8.0"]
[seesaw "1.4.4"]
[ me.raynes/fs " 1.4.6 " ]
;[org.clojure/data.zip "0.1.1"... | null | https://raw.githubusercontent.com/funimage/funimage/397d1ed9a1c11287f8562d05c10040ce24717f04/project.clj | clojure | [org.clojure/data.zip "0.1.1"]
signing. (See "How to specify a user
it finds in your keyring.
Currently only works in :deploy-repositories
or as a top-level (global) setting.
"-javaagent:/Users/kyle/.m2/repository/net/imagej/ij1-patcher/0.12.3/ij1-patcher-0.12.3.jar=init"
:javac-options ["-target" "1.6" "-source" "... | (defproject funimage "0.1.100-SNAPSHOT"
:description "Functional Image Processing with ImageJ/FIJI"
:url ""
:license {:name "Apache v2.0"
:url ""}
:dependencies [[org.clojure/clojure "1.8.0"]
[seesaw "1.4.4"]
[ me.raynes/fs " 1.4.6 " ]
[clj-random "0.1.8"]
... |
89c9571212a6fa089040bc73621b10855fadde7f8e9edca552c4fcc855f9bfc7 | glutamate/bugpan | Database.hs | # LANGUAGE GeneralizedNewtypeDeriving #
module Database where
import EvalM
--import Eval
import Expr
import Data.Maybe
import Data.List
import Numbers
import ImpInterpret
import Compiler
import Stages
import Traverse
import Transform
import Compiler
import Stages
import Traverse
import Transform-}
import Con... | null | https://raw.githubusercontent.com/glutamate/bugpan/d0983152f5afce306049262cba296df00e52264b/Database.hs | haskell | import Eval
import Stages
print baseDir
Just mac <- MAC.new
-rnd <- asInt `fmap` randomIO
print muuid
Just uuid <- return muuid
print sigs
print (kind, sig)
v<-loadUntyped $ dir./ kind./ sig
print (kind, sig, head v )
typeOfVal $ head v)
print sessns
putStrLn "done"
mapM print sesns
liftIO $ print sconts
simpler inte... | # LANGUAGE GeneralizedNewtypeDeriving #
module Database where
import EvalM
import Expr
import Data.Maybe
import Data.List
import Numbers
import ImpInterpret
import Compiler
import Stages
import Traverse
import Transform
import Compiler
import Stages
import Traverse
import Transform-}
import Control.Monad
imp... |
320d77632e1e22b8911b897e2cd7ec6ee1e990c6d8ed1a46273dd2e03a9b40c7 | codxse/zenius-material | styles.cljs | (ns zenius-material.styles
(:require [reagent.core :as r]))
(def colors (js->clj (aget js/MaterialUI "colors") :keywordize-keys true))
;; =============================================
helper fns
(defn color [color_ level_]
(get-in colors [color_ level_] "#000000"))
| null | https://raw.githubusercontent.com/codxse/zenius-material/0e5a2c64fd3455f81b8a43ff41f407c7bcdb8ce9/src/zenius_material/styles.cljs | clojure | ============================================= | (ns zenius-material.styles
(:require [reagent.core :as r]))
(def colors (js->clj (aget js/MaterialUI "colors") :keywordize-keys true))
helper fns
(defn color [color_ level_]
(get-in colors [color_ level_] "#000000"))
|
e9d9bcc8d2b26bad11f0a1143e693dcae1cc9875951b602fb396ff6553ba563d | metabase/metabase | sqlite.clj | (ns metabase.driver.sqlite
(:require
[clojure.java.io :as io]
[clojure.string :as str]
[java-time :as t]
[metabase.config :as config]
[metabase.driver :as driver]
[metabase.driver.common :as driver.common]
[metabase.driver.sql :as driver.sql]
[metabase.driver.sql-jdbc.connection :as sql-jdbc.c... | null | https://raw.githubusercontent.com/metabase/metabase/80ba6b1a33e336e132d1714c0d9b3e5a6c626054/modules/drivers/sqlite/src/metabase/driver/sqlite.clj | clojure | we have this 'feature' so the frontend doesn't try to present the option to you.
for now we'll just skip the foreign key stuff in the tests.
e.g. NVARCHAR(100) or NUMERIC(10,5) See also
See also the [SQLite Date and Time Functions Reference]().
-> DATE('2015-11-01', '-1 months')
date literal strings instead to g... | (ns metabase.driver.sqlite
(:require
[clojure.java.io :as io]
[clojure.string :as str]
[java-time :as t]
[metabase.config :as config]
[metabase.driver :as driver]
[metabase.driver.common :as driver.common]
[metabase.driver.sql :as driver.sql]
[metabase.driver.sql-jdbc.connection :as sql-jdbc.c... |
64c0836ca4fa6cf2e0741f56c5f928855aa539efaa0debfcd8a8b48da7b34e58 | TrustInSoft/tis-interpreter | domain_lift.mli | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/value/domains/domain_lift.mli | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Softwa... |
2a351ff87566701343940f0e9b78eb1fda43a37ae345025a44e7821fb38a1f14 | jjtolton/TheDevilsInterop | core.clj | (ns metal-interop.core
(:gen-class)
(:require [clojure.data.json :as json]
[org.httpkit.client :as client]
[tech.v3.datatype.ffi :as dt-ffi]
[clojure.tools.logging :as log]
[metal-interop.util :as utils]
[camel-snake-kebab.core :as csk]
rese... | null | https://raw.githubusercontent.com/jjtolton/TheDevilsInterop/e686300a52ba1d6a895086b0efdd8f503dbc6f0d/src/metal_interop/core.clj | clojure | libpython-clj2.python.np-array
[libpython-clj2.python :as python]
use this for debug but don't include in production
(println "Available names:")
(println name))
change this to something less aggressive if you want to be able to
use get/assoc directly | (ns metal-interop.core
(:gen-class)
(:require [clojure.data.json :as json]
[org.httpkit.client :as client]
[tech.v3.datatype.ffi :as dt-ffi]
[clojure.tools.logging :as log]
[metal-interop.util :as utils]
[camel-snake-kebab.core :as csk]
rese... |
799a563af930a919baee739d93a6b6078e6b48b72ab29746eebb615971351e46 | SKA-ScienceDataProcessor/RC | DNA.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
module DNA (
-- * Definition of actors
ActorDef
, actor
, simpleOut
, rule
, scatterGather
, producer
, startingState
-- * Definition of dataflow graph
, Dataflow
, A
, buildDataflow
, use
... | null | https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS1/dna/DNA.hs | haskell | # LANGUAGE GADTs #
* Definition of actors
* Definition of dataflow graph
* Compilation
--------------------------------------------------------------
--------------------------------------------------------------
| Monad for defining actor
Transition rules
Initial state
Outbound connections
| Simple connectio... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
module DNA (
ActorDef
, actor
, simpleOut
, rule
, scatterGather
, producer
, startingState
, Dataflow
, A
, buildDataflow
, use
, connect
, compile
) where
import Control.Applicative
import Control.Monad.Trans.S... |
1c0cc5cebf0c0a075f67c338d9f68fa071f0543685c0f0a39c76959396246b26 | replikativ/kabel | transit.cljc | (ns kabel.middleware.transit
(:require
[kabel.middleware.handler :refer [handler]]
#?(:clj [kabel.platform-log :refer [debug]])
#?(:cljs [kabel.util :refer [on-node?]])
#?(:clj [superv.async :refer [go-try]])
[cognitect.transit :as t]
#?(:cljs [goog.crypt :as crypt])
[incognito.transit :refer [in... | null | https://raw.githubusercontent.com/replikativ/kabel/d3a75385b4ff60f2bbc406763e830483b324f936/src/kabel/middleware/transit.cljc | clojure | already serialized
remove if uuid problem is gone
Browser
nodejs
; Browser
NodeJS | (ns kabel.middleware.transit
(:require
[kabel.middleware.handler :refer [handler]]
#?(:clj [kabel.platform-log :refer [debug]])
#?(:cljs [kabel.util :refer [on-node?]])
#?(:clj [superv.async :refer [go-try]])
[cognitect.transit :as t]
#?(:cljs [goog.crypt :as crypt])
[incognito.transit :refer [in... |
1b1b8dfd3567bad13e9c6e696e20ed91f05ac174f2e4e55ea6eb608a1439f672 | arsalan0c/cdp-hs | Overlay.hs | {-# LANGUAGE OverloadedStrings, RecordWildCards, TupleSections #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeFamilies #
{- |
= Overlay
This domain provides various functionality related to... | null | https://raw.githubusercontent.com/arsalan0c/cdp-hs/f946d706485b0dd16360a753321c46d6f098649d/src/CDP/Domains/Overlay.hs | haskell | # LANGUAGE OverloadedStrings, RecordWildCards, TupleSections #
|
= Overlay
This domain provides various functionality related to drawing atop the inspected page.
| Type 'Overlay.SourceOrderConfig'.
Configuration data for drawing the source order of an elements children.
| the color to outline the givent element... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeFamilies #
module CDP.Domains.Overlay (module CDP.Domains.Overlay) where
import Control.Applicative ((<$>))
import Control.... |
5eece28e126625e0647b15d490f2f2bb901513747c74b1678635840fdbbff391 | spawnfest/eep49ers | mac2.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1998 - 2016 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/stdlib/test/epp_SUITE_data/mac2.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 1998 - 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-ifndef(p).
-define(p, 1).
-endif.
-ifndef('p').
-define('p', 2).
-endif.
-ifndef(P).
-define(P, 3).
-endif.
-ifnd... |
ad15874b17dd59faa1887291b7cfe0062c67d36c19e7de97f799761c89590259 | returntocorp/semgrep | Xpattern_match_spacegrep.ml |
*
* Copyright ( C ) 2021 - 2022 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file LICE... | null | https://raw.githubusercontent.com/returntocorp/semgrep/af76564cf0b6b1bc5e281eb2121b32d3186fbf05/src/engine/Xpattern_match_spacegrep.ml | ocaml | coupling: mostly copypaste of Spacegrep_main.run_all
it's actually complete, no need to re-input the file
pr (Spacegrep.Doc_AST.show doc); |
*
* Copyright ( C ) 2021 - 2022 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file LICE... |
aaef7d46aa8da6248fba734301e89be92d325fae4edfd385ff4957cb0995bc58 | lasp-lang/lasp | lasp_throughput_client.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2016 . All Rights Reserved .
%%
This file is provided to you 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... | null | https://raw.githubusercontent.com/lasp-lang/lasp/1701c8af77e193738dfc4ef4a5a703d205da41a1/src/lasp_throughput_client.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2016 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(lasp_throughput_clie... |
d2e9c8d832ad8f1ee98cf47d8885c99d0019be4fa1a489eff29f31bfdfee416b | mirage/cactus | main.ml |
* Copyright ( c ) 2021 Tarides < >
* Copyright ( c ) 2021 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SO... | null | https://raw.githubusercontent.com/mirage/cactus/3eb2a4abee79bf8f20de5b4b12a57c3421c3e2fe/tests/main.ml | ocaml | let () = Demo.snapshot () |
* Copyright ( c ) 2021 Tarides < >
* Copyright ( c ) 2021 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SO... |
e18d99d2023ed73c35985b4222db077a475b0621cf37245c9c8148e8223e5a5a | bobzhang/fan | env_plc.mli |
(** An environment mapping variables to identifiers, and capable of generating
fresh identifiers. *)
(** The type of environments. *)
type t
(** [empty f] returns an empty environment with naming function [f]. *)
val empty : (int -> string) -> t
(** [lookup env var] returns the identifier for [var] in [env], or ra... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/thirdparty/plc/env_plc.mli | ocaml | * An environment mapping variables to identifiers, and capable of generating
fresh identifiers.
* The type of environments.
* [empty f] returns an empty environment with naming function [f].
* [lookup env var] returns the identifier for [var] in [env], or raises
[Not_found] if unbound.
* [bind env var id] returns... |
type t
val empty : (int -> string) -> t
val lookup : t -> string -> string
val bind : t -> string -> string -> t
val bound : t -> string -> bool
val fresh_id : t -> t * string
val dispatch : t -> string -> (string -> 'a) -> (t -> string -> 'a) -> 'a
val bind_or_test : t -> (string * string) list -> string -> s... |
4955b8bcc70d7fe37e42c9d40360e21e681f6be3743e5997535a3c220119802c | jellelicht/guix | download.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 < >
Copyright © 2014 , 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software ... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/build-aux/download.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 , 2013 < >
Copyright © 2014 , 2015 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(use-modules (ice-9 match)
(web uri)
(web clie... |
ca73b383f48429ca491c2b5ad990384a2d9e3dbe8cb75fef1735b07e06aad17c | jordanthayer/ocaml-search | recording_tqs_v2.ml | * Tool for recording the executions of three queue search
type fp_values = {
h : float;
d : float;
h_err : float;
d_err : float;
g : float;
f : float;
est_f : float;
est_d : float;
}
type int_vals = {
mutable clean_pos : int;
mutable open_pos : int;
depth : int;
}
type 'a node = ... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/recording/recording_tqs_v2.ml | ocaml | *************** Ordering Predicates ********************
sort by fhat
break ties on low d
break ties on high g
************** Utility functions *************
************* Search functions *************
new state
this is the part that actually does the search | * Tool for recording the executions of three queue search
type fp_values = {
h : float;
d : float;
h_err : float;
d_err : float;
g : float;
f : float;
est_f : float;
est_d : float;
}
type int_vals = {
mutable clean_pos : int;
mutable open_pos : int;
depth : int;
}
type 'a node = ... |
7b07b70f14c3fa91785680ffad8bde89d655cc93d84acc16b9c9f2da14c7dc9a | avatar29A/hs-aitubots-api | Errors.hs | module Aitu.Bot.Types.Errors (
ClientError
, stringToClientError
, coerceToClientError
, coerceEitherStringToEitherCE
) where
import qualified Data.ByteString.Lazy.Char8 as BC
type HttpCode = Int
type ClientError = (HttpCode, BC.ByteString)
stringToClientError :: String -> ClientError
stringToCl... | null | https://raw.githubusercontent.com/avatar29A/hs-aitubots-api/9cc3fd1e4e9e81491628741a6bbb68afbb85704e/src/Aitu/Bot/Types/Errors.hs | haskell | module Aitu.Bot.Types.Errors (
ClientError
, stringToClientError
, coerceToClientError
, coerceEitherStringToEitherCE
) where
import qualified Data.ByteString.Lazy.Char8 as BC
type HttpCode = Int
type ClientError = (HttpCode, BC.ByteString)
stringToClientError :: String -> ClientError
stringToCl... | |
dd4a821e05509bc61557d47f3530130ac0ff3f0ec4a8af3c06a4075b6e31e6f3 | Dasudian/DSDIN | dsdhttp_api_validate.erl | -module(dsdhttp_api_validate).
-export([request/4]).
-export([response/5]).
-export([validator/0]).
-spec validator() -> jesse_state:state().
validator() ->
{ok, AppName} = application:get_application(?MODULE),
Filename = filename:join(code:priv_dir(AppName), "swagger.json"),
R = jsx:decode(element(2, f... | null | https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/dsdhttp/src/dsdhttp_api_validate.erl | erlang | unused rules
required
{type, _}
schema
enum
arythmetic
====================================================================
==================================================================== | -module(dsdhttp_api_validate).
-export([request/4]).
-export([response/5]).
-export([validator/0]).
-spec validator() -> jesse_state:state().
validator() ->
{ok, AppName} = application:get_application(?MODULE),
Filename = filename:join(code:priv_dir(AppName), "swagger.json"),
R = jsx:decode(element(2, f... |
9011ada681e15b76ea8176ae56976c9657fe0df52d96f63276a56808dcbeddf7 | racket/readline | rep.rkt | ;; This is a wrapper around "rep-start.rkt" -- use it if we're using a terminal
#lang racket/base
(require racket/runtime-path racket/file)
(define-runtime-path rep-start "rep-start.rkt")
(provide install-readline!
pre-readline-input-port)
(define pre-readline-input-port
(let ([inp (current-input-port)] ... | null | https://raw.githubusercontent.com/racket/readline/f2c01b705853dd26c51691a1fc78ee743605c8bd/readline-lib/readline/rep.rkt | racket | This is a wrapper around "rep-start.rkt" -- use it if we're using a terminal | #lang racket/base
(require racket/runtime-path racket/file)
(define-runtime-path rep-start "rep-start.rkt")
(provide install-readline!
pre-readline-input-port)
(define pre-readline-input-port
(let ([inp (current-input-port)] [outp (current-output-port)])
(and (eq? 'stdin (object-name inp))
(... |
c9186b6caedfd7784d4eec0afda6a2e6e7c10d0062c1c7c5698984190dfda863 | Bogdanp/racket-kafka | info.rkt | #lang info
(define license 'BSD-3-Clause)
(define version "0.2.1")
(define collection "confluent")
(define deps '("base"
"http-easy-lib"
"threading-lib"))
| null | https://raw.githubusercontent.com/Bogdanp/racket-kafka/30b0254e7d66e9e5e321494a1754207e18459466/confluent-schema-registry-lib/info.rkt | racket | #lang info
(define license 'BSD-3-Clause)
(define version "0.2.1")
(define collection "confluent")
(define deps '("base"
"http-easy-lib"
"threading-lib"))
| |
e119dcf21718e2f352a417fc0f71f9c9fcc7e00372e679ca46a4b53554bb07f6 | dongcarl/guix | proxy.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2020 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the Lice... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/installer/proxy.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2020 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu installer proxy)
#:use-module (gnu installer utils)
#:use-module (gnu services herd)
#:e... |
823c70e34c9e7f66aab4e92ddcaea744cd6871d0996a13035aa53fd458ff6345 | PeterDWhite/Osker | MVarInfo.hs | Copyright ( c ) , 2003
module MVarInfo
Information about MVar in threader state
Mapping MVar i d to MVar information
, mvarsStats -- Statistics about an MVars structure
, MVarGen -- Handle to generate MVars
Print out an MVar
, clobbers -- Clobber evidence of a tid from coll... | null | https://raw.githubusercontent.com/PeterDWhite/Osker/301e1185f7c08c62c2929171cc0469a159ea802f/Braid/MVarInfo.hs | haskell | Statistics about an MVars structure
Handle to generate MVars
Clobber evidence of a tid from collection of MVars
Make another tid waiting on full
Make another tid waiting on empty
Convert MVars to list
How many MVars are there?
--------------------------------------------------------------------
Information abou... | Copyright ( c ) , 2003
module MVarInfo
Information about MVar in threader state
Mapping MVar i d to MVar information
Print out an MVar
Look up MVinfo associated with an mvar i d
L hjgymmmmook up MVinfo associated with an mvar i d
Update the value associated with an MVar
Update the information associa... |
102740edacc620e870f609e7621ed8e3177b46bec56842c440eafdbe12457b3d | skanev/playground | 16.scm | SICP exercise 4.16
;
; In this exercise we implement the method just described for interpreting
; internal definitions. We assume that the evaluator supports let (see exercise
4.6 ) .
;
a. Change the lookup - variable - value ( section 4.1.3 ) to singal an error if the
; value it finds is the symbol *unassigned*.... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/04/16.scm | scheme |
In this exercise we implement the method just described for interpreting
internal definitions. We assume that the evaluator supports let (see exercise
value it finds is the symbol *unassigned*.
b. Write a procedure scan-out-defines that takes a procedure body and returns
an equivalent one that has no internal d... | SICP exercise 4.16
4.6 ) .
a. Change the lookup - variable - value ( section 4.1.3 ) to singal an error if the
(require r5rs/init)
(define (lookup-variable-value var env)
(define (env-loop env)
(define (scan vars vals)
(cond ((null? vars)
(env-loop (enclosing-environment env)))
... |
298137b72daab015a7a84a5fe46bf535b2c3d209728df2708614bf67935d1a4b | mbj/stratosphere | StreamSelectionProperty.hs | module Stratosphere.MediaPackage.OriginEndpoint.StreamSelectionProperty (
StreamSelectionProperty(..), mkStreamSelectionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratospher... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/mediapackage/gen/Stratosphere/MediaPackage/OriginEndpoint/StreamSelectionProperty.hs | haskell | module Stratosphere.MediaPackage.OriginEndpoint.StreamSelectionProperty (
StreamSelectionProperty(..), mkStreamSelectionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratospher... | |
e99405484f5815942b0103117360c79463fc39da60cf28428386fdd04a545894 | mlabs-haskell/bot-plutus-interface | ChainIndex.hs | # LANGUAGE NamedFieldPuns #
module BotPlutusInterface.ChainIndex (
handleChainIndexReq,
) where
import BotPlutusInterface.Types (
ContractEnvironment (ContractEnvironment, cePABConfig),
PABConfig,
)
import Data.Kind (Type)
import Network.HTTP.Client (
ManagerSettings (managerResponseTimeout),
defaultManage... | null | https://raw.githubusercontent.com/mlabs-haskell/bot-plutus-interface/a1f1d0ec7112b5ecde5ac31471c1a75b67b9dd9d/src/BotPlutusInterface/ChainIndex.hs | haskell | TODO: Implement DatumsAtAddress
-haskell/bot-plutus-interface/issues/164
RedeemerFromHash redeemerHash ->
pure $ RedeemerHashResponse (Maybe Redeemer)
| Query for txo's. | # LANGUAGE NamedFieldPuns #
module BotPlutusInterface.ChainIndex (
handleChainIndexReq,
) where
import BotPlutusInterface.Types (
ContractEnvironment (ContractEnvironment, cePABConfig),
PABConfig,
)
import Data.Kind (Type)
import Network.HTTP.Client (
ManagerSettings (managerResponseTimeout),
defaultManage... |
5b055669124c2b297de6df44db96230c82512fba751c021d55ffda23c9967449 | ds-wizard/engine-backend | LocaleDetailSM.hs | module Wizard.Api.Resource.Locale.LocaleDetailSM where
import Data.Swagger
import Shared.Util.Swagger
import Wizard.Api.Resource.Locale.LocaleDetailDTO
import Wizard.Api.Resource.Locale.LocaleDetailJM ()
import Wizard.Api.Resource.Locale.LocaleStateSM ()
import Wizard.Api.Resource.Registry.RegistryOrganizationSM ()
i... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/0ec94a4b0545f2de8a4e59686a4376023719d5e7/engine-wizard/src/Wizard/Api/Resource/Locale/LocaleDetailSM.hs | haskell | module Wizard.Api.Resource.Locale.LocaleDetailSM where
import Data.Swagger
import Shared.Util.Swagger
import Wizard.Api.Resource.Locale.LocaleDetailDTO
import Wizard.Api.Resource.Locale.LocaleDetailJM ()
import Wizard.Api.Resource.Locale.LocaleStateSM ()
import Wizard.Api.Resource.Registry.RegistryOrganizationSM ()
i... | |
fc08e8ce029d05d9b1d185305d264517c7011a5237d1b4b01927bd3e58e1c13f | isaksamsten/erlang-csv | csv.erl | %%
%% Very basic CSV parser of limited use.
%%
It can only handle one type of separators ( , )
%% and simple strings
%%
Version 0.2 :
%% - comment (line starting with %) and
%% annotation support (line starting with %@key value)
Version 0.1 :
%% - initial release
Author : < >
%%
-module(csv).
-comp... | null | https://raw.githubusercontent.com/isaksamsten/erlang-csv/253d2dd4da23b9245d4494d18d7198e1a5fceef9/src/csv.erl | erlang |
Very basic CSV parser of limited use.
and simple strings
- comment (line starting with %) and
annotation support (line starting with %@key value)
- initial release
, Annotation, Rest/binary>>, _, _) ->
NOTE: The last line of the file | It can only handle one type of separators ( , )
Version 0.2 :
Version 0.1 :
Author : < >
-module(csv).
-compile(export_all).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
reader(File) ->
{?MODULE, {csv_reader, spawn_link(?MODULE, spawn_parser, [File])}}.
binary_reader(File, Opts) -... |
c70b063da7dd1e51c6caf6138f112f41ff8d881ddb7bfc00eeab381ff0764d58 | realworldocaml/book | ast_pattern.ml | open! Import
include Ast_pattern0
let save_context ctx = ctx.matched
let restore_context ctx backup = ctx.matched <- backup
let incr_matched c = c.matched <- c.matched + 1
let parse_res (T f) loc ?on_error x k =
try Ok (f { matched = 0 } loc x k)
with Expected (loc, expected) -> (
match on_error with
| No... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ppxlib/src/ast_pattern.ml | ocaml | open! Import
include Ast_pattern0
let save_context ctx = ctx.matched
let restore_context ctx backup = ctx.matched <- backup
let incr_matched c = c.matched <- c.matched + 1
let parse_res (T f) loc ?on_error x k =
try Ok (f { matched = 0 } loc x k)
with Expected (loc, expected) -> (
match on_error with
| No... | |
5589e57462b09f72c607c45d8702cc08ce37d6572f9d5ba74a843cf61ab71e7a | alekcz/fire | utils.clj | (ns fire.utils
(:require [cheshire.core :as json]
[clojure.string :as str])
(:gen-class))
(set! *warn-on-reflection* true)
(def firebase-root "firebaseio.com")
(def storage-upload-root "")
(def storage-download-root "")
(def vision-root ":annotate")
(defn now []
(quot (inst-ms (java.util.Date.)) 10... | null | https://raw.githubusercontent.com/alekcz/fire/d47f47414c0efc8cac3b049a15053d8e58bf8773/src/fire/utils.clj | clojure | (ns fire.utils
(:require [cheshire.core :as json]
[clojure.string :as str])
(:gen-class))
(set! *warn-on-reflection* true)
(def firebase-root "firebaseio.com")
(def storage-upload-root "")
(def storage-download-root "")
(def vision-root ":annotate")
(defn now []
(quot (inst-ms (java.util.Date.)) 10... | |
840ac629fb258fd5b8e91ef594274f26c239987d3f246c9c2dc40699f1c5ce85 | lemmaandrew/CodingBatHaskell | loneSum.hs | From
Given 3 int values , a b c , return their sum . However , if one of the values is the
same as another of the values , it does not count towards the sum .
Given 3 int values, a b c, return their sum. However, if one of the values is the
same as another of the values, it does not count towards the sum.
-}
... | null | https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/Logic-2/loneSum.hs | haskell | From
Given 3 int values , a b c , return their sum . However , if one of the values is the
same as another of the values , it does not count towards the sum .
Given 3 int values, a b c, return their sum. However, if one of the values is the
same as another of the values, it does not count towards the sum.
-}
... | |
b3f04e4e4af5fd5296374b61325a0bfdfcc1517dafc69e0e51f7adc3c5cf9a2a | ndmitchell/catch | ConstLift.hs |
-- If a function is a constant then inline it
-- If a function only calls constant functions, then inline it
module Hite.ConstLift(cmd) where
import Hite.Type
import General.General
import Data.List
import Data.Maybe
import Hite.Normalise
cmd = cmdHitePure (const constLift) "const-lift"
"... | null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/src/Hite/ConstLift.hs | haskell | If a function is a constant then inline it
If a function only calls constant functions, then inline it
if f x = x then drop all calls to f x with x
mainly targets primString etc
|
module Hite.ConstLift(cmd) where
import Hite.Type
import General.General
import Data.List
import Data.Maybe
import Hite.Normalise
cmd = cmdHitePure (const constLift) "const-lift"
"Lift all constants"
constLift :: Hite -> Hite
constLift = resultConst . dropWrappers . normalise
res... |
9070540d60d5ec725a45c9712b45c1497f01e35c60206347e0f089de4fe2acc3 | orbitz/oort | mdb_bhv_answer.erl | File : mdb_bhv_answer.erl
Author : < >
%%% Purpose :
Created : 12 Aug 2003 by < >
%%%----------------------------------------------------------------------
%%%
This file is part of Manderlbot .
%%%
Manderlbot is free software ; you can redistribute it and/or modify
it under the terms of the GNU... | null | https://raw.githubusercontent.com/orbitz/oort/a61ec85508917ae9a3f6672a0b708d47c23bb260/manderlbot-0.9.2/src/mdb_bhv_answer.erl | erlang | Purpose :
----------------------------------------------------------------------
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
See LICENSE for detail... | File : mdb_bhv_answer.erl
Author : < >
Created : 12 Aug 2003 by < >
This file is part of Manderlbot .
Manderlbot 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 ... |
3f39165a3624d6b35a6598c47531b2bbf4810b6274529200f30a00368d4be3fc | AndrasKovacs/ELTE-func-lang | Notes06.hs |
{-# language MonadComprehensions #-}
{-# language DeriveFunctor, DeriveFoldable, DeriveTraversable #-}
Lista monád , list comprehension , sublists , guard ( Alternative )
két class : Foldable ,
Parser monád
Nagyobb példa : parser + interpreter minimális nyelvre ( " while " nyelv , int , bool + while ciklus ,... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/88d41930999d6056bdd7bfaa85761a527cce4113/2020-21-1/ea/Notes06.hs | haskell | # language MonadComprehensions #
# language DeriveFunctor, DeriveFoldable, DeriveTraversable #
------------------------------------------------------------------------------
# language DeriveFunctor #
------------------------------------------------------------------------------
return a = [a]
as >>= f = concatMa... |
Lista monád , list comprehension , sublists , guard ( Alternative )
két class : Foldable ,
Parser monád
Nagyobb példa : parser + interpreter minimális nyelvre ( " while " nyelv , int , bool + while ciklus , if - then - else , változó értékadás )
import Data.Traversable
import Control.Applicative
import Co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.