_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
92896e038d1afbf8cc8f3fdf6d67abff2ddf09f80c0ab75ba741d007cbd8b06a
lasp-lang/partisan
partisan_peer_discovery_agent.erl
%% ============================================================================= %% partisan_peer_discovery_agent.erl - %% Copyright ( c ) 2022 . 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. ...
null
https://raw.githubusercontent.com/lasp-lang/partisan/c78f0d6acdb820ab7e7a59555282cddac4a61fb3/src/partisan_peer_discovery_agent.erl
erlang
============================================================================= partisan_peer_discovery_agent.erl - 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 ...
Copyright ( c ) 2022 . 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(partisan_peer_discovery_agent). -behaviour(gen_statem). -include_lib("kernel/include/logger.hrl"). -include("parti...
ac2957f67b77997450d064e2d429f31dc8bd127603178e545b31a2dcaaa4f4c1
cdepillabout/servant-checked-exceptions
Util.hs
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # | Module : Servant . Checked . Exceptions . Internal . Util Copyright : 2017 License : BSD3 Maintainer : ( ) Stability : experimental Portability : unknown Additiona...
null
https://raw.githubusercontent.com/cdepillabout/servant-checked-exceptions/8ec4e831e45e51f3404790496f036a42c7349afa/servant-checked-exceptions-core/src/Servant/Checked/Exceptions/Internal/Util.hs
haskell
| A type-level @snoc@. Append to an empty list: Refl Append to a non-empty list: Refl $setup >>> :set -XDataKinds >>> :set -XTypeOperators >>> import Data.Type.Equality ((:~:)(Refl))
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # | Module : Servant . Checked . Exceptions . Internal . Util Copyright : 2017 License : BSD3 Maintainer : ( ) Stability : experimental Portability : unknown Additiona...
bc8dd1af24b161b3553830f54c1bb79071b75a7515b248fa63063cd06547f51e
facebookarchive/pfff
test_parsing_python.ml
open Common module Ast = Ast_python module Flag = Flag_parsing_python (*****************************************************************************) (* Subsystem testing *) (*****************************************************************************) let test_tokens_python file = if not (file =~ ".*\\.py") ...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_python/parsing/test_parsing_python.ml
ocaml
*************************************************************************** Subsystem testing *************************************************************************** *************************************************************************** Unit tests ***********************************************************...
open Common module Ast = Ast_python module Flag = Flag_parsing_python let test_tokens_python file = if not (file =~ ".*\\.py") then pr2 "warning: seems not a python file"; Flag.verbose_lexing := true; Flag.verbose_parsing := true; let toks = Parse_python.tokens file in toks +> List.iter (fun x -> pr2...
740c5b7dbc64874caefe3f99c97cc932664fc5e66d30fb09986e595af139b912
ryukzak/nitta
SimpleIO.hs
# LANGUAGE DuplicateRecordFields # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # | Module : NITTA.Model . ProcessorUnits . IO.SimpleIO Description : Copyright : ( c ) , 2019 License : : Stability : experimental ...
null
https://raw.githubusercontent.com/ryukzak/nitta/1e1e571fd73b2cb9bea4e5781bf658e7edd264c0/src/NITTA/Model/ProcessorUnits/IO/SimpleIO.hs
haskell
# LANGUAGE OverloadedStrings # ^ if 'Nothing' then size should defined by algorithm ^ set if send buffer overlap receive buffer \|this flag which indicates an end of the data transaction requires for stop computational process while data transferring to avoid loses
# LANGUAGE DuplicateRecordFields # # LANGUAGE QuasiQuotes # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # | Module : NITTA.Model . ProcessorUnits . IO.SimpleIO Description : Copyright : ( c ) , 2019 License : : Stability : experimental Module : NITTA.Model.Processor...
baa27f2d8b071dabeb7218bbd9fcaa207eec45a76e228faafff9dd034d9f2417
takikawa/racket-ppa
arith.rkt
#lang racket (require syntax/readerr) (provide read read-syntax) (define (read in) (syntax->datum (read-syntax #f in))) (define (read-syntax src in) (skip-whitespace in) (read-arith src in)) (define (skip-whitespace in) (regexp-match #px"^\\s*" in)) (define (read-arith src in) (define-values (line ...
null
https://raw.githubusercontent.com/takikawa/racket-ppa/5f2031309f6359c61a8dfd1fec0b77bbf9fb78df/share/pkgs/racket-doc/scribblings/guide/arith.rkt
racket
Match an operand followed by any number of operator--operand sequences, and prohibit an additional operator from following immediately:
#lang racket (require syntax/readerr) (provide read read-syntax) (define (read in) (syntax->datum (read-syntax #f in))) (define (read-syntax src in) (skip-whitespace in) (read-arith src in)) (define (skip-whitespace in) (regexp-match #px"^\\s*" in)) (define (read-arith src in) (define-values (line ...
1b39322b358b94b9d400cfbc192c5d320903407a2cb92015577738fd5eb1f89f
nvim-treesitter/nvim-treesitter
folds.scm
[ (comment) (block) (heredoc_template) (object) ] @fold
null
https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/9bcf658ca427665445a67c4b01d71c64d6f7e165/queries/hcl/folds.scm
scheme
[ (comment) (block) (heredoc_template) (object) ] @fold
28111b08b0cb4e8edfb3b7ba3c4e035ad4be464657543bb90d073ade7e8c2efa
kraison/vivace-graph-v2
functor.lisp
(in-package #:vivace-graph-v2) (defstruct (functor (:constructor %make-functor) (:predicate functor?)) name fn clauses (lock (make-recursive-lock))) (defun lookup-functor (name) (gethash name *user-functors*)) (defun make-functor (&key name clauses) (or (lookup-functor name) (let ((functor (%...
null
https://raw.githubusercontent.com/kraison/vivace-graph-v2/f5fcc60caa1e5b33ac3f618311e8876a94508818/functor.lisp
lisp
(in-package #:vivace-graph-v2) (defstruct (functor (:constructor %make-functor) (:predicate functor?)) name fn clauses (lock (make-recursive-lock))) (defun lookup-functor (name) (gethash name *user-functors*)) (defun make-functor (&key name clauses) (or (lookup-functor name) (let ((functor (%...
7b685abc94d9b0298f78901ee9d2a9bc9dde0dda44de5a5847816f00f6255ef9
jimrthy/frereth
specs.cljc
(ns frereth.apps.shared.specs "These are really more general" (:require [clojure.core.async :as async] [clojure.core.async.impl.protocols :as async-protocols] [clojure.spec.alpha :as s])) (defn class-predicate "Returns a predicate to check whether an object is an instance of the suppl...
null
https://raw.githubusercontent.com/jimrthy/frereth/e1c4a5c031355ff1ff3bb60741eb03dff2377e1d/apps/racing/roadblocks/src/cljc/frereth/apps/shared/specs.cljc
clojure
It's tempting to make this a limited set. But it's not like specifying that here would make runtime callers any more reliable. That really gets into things like runtime message validation. Which, honestly, should be pretty strict and happen ASAP on both sides. Called to disconnect renderer from a running world ...
(ns frereth.apps.shared.specs "These are really more general" (:require [clojure.core.async :as async] [clojure.core.async.impl.protocols :as async-protocols] [clojure.spec.alpha :as s])) (defn class-predicate "Returns a predicate to check whether an object is an instance of the suppl...
d869994f4492ef739b5f91051aea6289649c81d0aa67d37cbf3b3f418308f6d2
cryptosense/pkcs11
pkcs11_CK_ATTRIBUTE_TYPE.ml
open Ctypes include P11_attribute_type.Encoding type t = P11_ulong.t [@@deriving eq, ord] let view (ul : t) : P11_attribute_type.pack = let it_is c = equal ul c in let open P11_attribute_type in match () with | _ when it_is _CKA_CLASS -> Pack CKA_CLASS | _ when it_is _CKA_TOKEN -> Pack CKA_TOKEN | _ when ...
null
https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/driver/pkcs11_CK_ATTRIBUTE_TYPE.ml
ocaml
open Ctypes include P11_attribute_type.Encoding type t = P11_ulong.t [@@deriving eq, ord] let view (ul : t) : P11_attribute_type.pack = let it_is c = equal ul c in let open P11_attribute_type in match () with | _ when it_is _CKA_CLASS -> Pack CKA_CLASS | _ when it_is _CKA_TOKEN -> Pack CKA_TOKEN | _ when ...
e88e527153edd5473cd1347a9db6da68f004862a857d6d901805f17b4e9c9d1a
mirleft/ocaml-nocrypto
speed.ml
open Nocrypto open Uncommon open Cipher_block open Hash module Time = struct let time ~n f a = let t1 = Sys.time () in for _ = 1 to n do ignore (f a) done ; let t2 = Sys.time () in (t2 -. t1) let warmup () = let x = ref 0 in let rec go start = if Sys.time () -. start < 1. then beg...
null
https://raw.githubusercontent.com/mirleft/ocaml-nocrypto/ed7bb8d911dc340e36d85d335d9edb8339f0932d/bench/speed.ml
ocaml
open Nocrypto open Uncommon open Cipher_block open Hash module Time = struct let time ~n f a = let t1 = Sys.time () in for _ = 1 to n do ignore (f a) done ; let t2 = Sys.time () in (t2 -. t1) let warmup () = let x = ref 0 in let rec go start = if Sys.time () -. start < 1. then beg...
6475e8fb7bcfb70b36fdd86f6823fc62b9a5431c1d8017192ba710c1617796e8
commonlispbr/quicksys
package.lisp
package.lisp (defpackage #:quicksys (:use #:cl) (:nicknames :qs) (:export #:*dists* #:install-dist #:installedp #:uninstall-dist #:dist-name #:dist-url #:dist-properties #:get-dist #:get-dists-urls #:get-dists-na...
null
https://raw.githubusercontent.com/commonlispbr/quicksys/f9ab771c209142926645939294b42e40b631eafd/src/package.lisp
lisp
search for a dist install a dist install a dist temporary just to load a system
package.lisp (defpackage #:quicksys (:use #:cl) (:nicknames :qs) (:export #:*dists* #:install-dist #:installedp #:uninstall-dist #:dist-name #:dist-url #:dist-properties #:get-dist #:get-dists-urls #:get-dists-na...
e67a46a8f808a8edab4a68a5330d29fe0377275cc7827b355a87b857628c7c5c
jarcane/merkki
core_test.cljc
Merkki - a Clojure library for Markdown generation ;;; Copyright ( c ) 2016 ;;; ;;; This file is licensed under the Eclipse Public License v1.0. See LICENSE for more details (ns merkki.core-test (:require #?(:clj [clojure.test :refer :all] :cljs [cljs.test :refer-macros [deftest testing is]]) ...
null
https://raw.githubusercontent.com/jarcane/merkki/49b6614a4a488a6455bdc8e501e938cab6abc9c3/test/merkki/core_test.cljc
clojure
This file is licensed under the Eclipse Public License v1.0. See LICENSE for more details Markdown test
Merkki - a Clojure library for Markdown generation Copyright ( c ) 2016 (ns merkki.core-test (:require #?(:clj [clojure.test :refer :all] :cljs [cljs.test :refer-macros [deftest testing is]]) [merkki.core :refer [markdown]])) (def md-sample "Markdown Test ============= This is...
c0c988ae06978edc918822870da405616fa1a7c7ae398c6c542419024754ef81
ngless-toolkit/ngless
Batch.hs
Copyright 2015 - 2020 NGLess Authors - License : MIT - License: MIT -} module Utils.Batch ( getNcpus ) where import Text.Read (readMaybe) import System.Environment (lookupEnv) import Control.Monad.Extra (firstJustM) getNcpus :: IO (Maybe Int) getNcpus = firstJustM getIntFromEnv [ "O...
null
https://raw.githubusercontent.com/ngless-toolkit/ngless/6522017c229fa3796d3abbee85547b76b6c4f41d/NGLess/Utils/Batch.hs
haskell
Copyright 2015 - 2020 NGLess Authors - License : MIT - License: MIT -} module Utils.Batch ( getNcpus ) where import Text.Read (readMaybe) import System.Environment (lookupEnv) import Control.Monad.Extra (firstJustM) getNcpus :: IO (Maybe Int) getNcpus = firstJustM getIntFromEnv [ "O...
837ad4de747c142af04687994c4b449978719bc7d229732607e3a11288a9ef69
luke-clifton/barbly
AppKit.hs
# LANGUAGE ForeignFunctionInterface # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ExtendedDefaultRules # module AppKit where import Control.Exception (finally, handle, SomeException(..)) import Control.Monad.Cont import Data.ByteString (useAsCString) import Data.Text (Text) import qualified Data.Text.Encoding as Tex...
null
https://raw.githubusercontent.com/luke-clifton/barbly/b190496125ec1e4f9ca5a4157a68e32dc0d8ef44/src/AppKit.hs
haskell
# LANGUAGE OverloadedStrings # We simply handle any exceptions by printing them. No need to take down the whole process. Does not need to be released, it's a constant.
# LANGUAGE ForeignFunctionInterface # # LANGUAGE ExtendedDefaultRules # module AppKit where import Control.Exception (finally, handle, SomeException(..)) import Control.Monad.Cont import Data.ByteString (useAsCString) import Data.Text (Text) import qualified Data.Text.Encoding as Text import Foreign hiding (newForeign...
559f05ddc1acee3a083dbdefab9a805e04b90fe55a3481b6d3d9923a4882c0d7
emqx/emqx
emqx_observer_cli_tests.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_modules/test/emqx_observer_cli_tests.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_observer_cli_tests). -include_lib("eunit/include/eunit.hrl"). start_observer_cli_...
8beb94f213091a4e1b80a66c252902b5d15c49d43ff066dc451ac17071ff4fc2
shmookey/solpb
Generator.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module Generator where import Data.Map (Map) import Data.Text (pack, strip) import Data.Semigroup ((<>)) import qualified Data.Text as T import qualified Data.Map as Map import Control.Monad.Result import Types import Util import qualified Library impor...
null
https://raw.githubusercontent.com/shmookey/solpb/4263050f9436e0a1d541ac99ab52970e9c2132c6/src/Generator.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # module Generator where import Data.Map (Map) import Data.Text (pack, strip) import Data.Semigroup ((<>)) import qualified Data.Text as T import qualified Data.Map as Map import Control.Monad.Result import Types import Util import qualified Library import qualified Build banner = pack ...
5ad092ba56b0d01e7653806b9744fbccd0ae6ba1710d96858d2e44a1fedfde7d
yakaz/yamerl
stream.erl
-module(stream). -include_lib("eunit/include/eunit.hrl"). setup() -> application:start(yamerl). simple_test_() -> {setup, fun setup/0, [ ?_assertMatch( ["Hello!"], begin Stream_St1 = yamerl_constr:new("<stdin>"), {continue, Stream_St2} = yam...
null
https://raw.githubusercontent.com/yakaz/yamerl/0032607a7b27fa2b548fc9a02d7ae6b53469c0c5/test/construction/stream.erl
erlang
-module(stream). -include_lib("eunit/include/eunit.hrl"). setup() -> application:start(yamerl). simple_test_() -> {setup, fun setup/0, [ ?_assertMatch( ["Hello!"], begin Stream_St1 = yamerl_constr:new("<stdin>"), {continue, Stream_St2} = yam...
fd4a9e641c15f70f2b40d1b8284b4ed33cd1ea251de5407b893b9f0efe139ecc
MyDataFlow/ttalk-server
toppage_handler.erl
%% Feel free to use, reuse and abuse the code in this file. %% @doc Cookie handler. -module(toppage_handler). -export([init/3]). -export([handle/2]). -export([terminate/3]). init(_Transport, Req, []) -> {ok, Req, undefined}. handle(Req, State) -> NewValue = integer_to_list(random:uniform(1000000)), Req2 = cowboy...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/cowboy/examples/cookie/src/toppage_handler.erl
erlang
Feel free to use, reuse and abuse the code in this file. @doc Cookie handler.
-module(toppage_handler). -export([init/3]). -export([handle/2]). -export([terminate/3]). init(_Transport, Req, []) -> {ok, Req, undefined}. handle(Req, State) -> NewValue = integer_to_list(random:uniform(1000000)), Req2 = cowboy_req:set_resp_cookie( <<"server">>, NewValue, [{path, <<"/">>}], Req), {ClientCoo...
8e3f675250e5c9866c08c0056ce822130c4c8dfe89b3c9e6439fedb6c04d1828
crate/craterl
craterl_blob.erl
%%%------------------------------------------------------------------- ( C ) 2014 , CRATE Technology GmbH Licensed to CRATE Technology GmbH ( " Crate " ) under one or more contributor %%% license agreements. See the NOTICE file distributed with this work for %%% additional information regarding copyright ownershi...
null
https://raw.githubusercontent.com/crate/craterl/2b90bf61c3c3a0a62e82f8c1710d7825c879fb10/src/craterl_blob.erl
erlang
------------------------------------------------------------------- license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Crate licenses obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, sof...
( C ) 2014 , CRATE Technology GmbH Licensed to CRATE Technology GmbH ( " Crate " ) under one or more contributor this file 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 distributed under the License is distribut...
357eb29680e71fca531aab1269f2f7ab7345a072407ca545d19a174bfb05e859
MyDataFlow/ttalk-server
riak_pb_codec.erl
%% ------------------------------------------------------------------- %% %% riak_pb_codec: Protocol Buffers encoding/decoding helpers %% Copyright ( c ) 2012 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use ...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/riak_pb/src/riak_pb_codec.erl
erlang
------------------------------------------------------------------- riak_pb_codec: Protocol Buffers encoding/decoding helpers 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. Se...
Copyright ( c ) 2012 Basho Technologies , Inc. 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 @doc ...
f7b0cbfbf6154d968c5e213660734a9fb0b64d9640435fe3ff2baef7af9c8f20
fpco/ide-backend
Types.hs
# LANGUAGE DeriveGeneric # ----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Program.Types Copyright : 2006 , 2007 - 2009 -- -- Maintainer : -- Portability : portable -- -- This provides an abstraction which deals with configuring an...
null
https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/TestSuite/inputs/Cabal-1.22.0.0/Distribution/Simple/Program/Types.hs
haskell
--------------------------------------------------------------------------- | Module : Distribution.Simple.Program.Types Maintainer : Portability : portable This provides an abstraction which deals with configuring and running programs. A 'Program' is a static notion of a known program. A 'Configured...
# LANGUAGE DeriveGeneric # Copyright : 2006 , 2007 - 2009 module Distribution.Simple.Program.Types ( Program(..), ProgramSearchPath, ProgramSearchPathEntry(..), simpleProgram, ConfiguredProgram(..), programPath, suppressOverrideArgs, ProgArg, ProgramLocation(..), sim...
f5ec4534157bb42e3bf45028a3d83d82946a9dbad80f71b14d2a4cead05bc56b
McCLIM/McCLIM
geometry.lisp
;;; -*- Mode: Lisp -*- ;;; Copyright ( c ) 2005 by ( ) Clim interface by is in the public domain ;;; ;;; Permission is hereby granted, free of charge, to any person obtaining a ;;; copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction , includi...
null
https://raw.githubusercontent.com/McCLIM/McCLIM/7c890f1ac79f0c6f36866c47af89398e2f05b343/Apps/Functional-Geometry/geometry.lisp
lisp
-*- Mode: Lisp -*- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, publish, distribute, sublicense, Software is furnished to do so, subject to the following conditions: The...
Copyright ( c ) 2005 by ( ) Clim interface by is in the public domain to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS "...
e6cc5927423acc290e1b0318cecfa81a1305f944663513dbe71c211622fed80b
kaizhang/bioinformatics-toolkit
Types.hs
# LANGUAGE TemplateHaskell # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FunctionalDependencies # {-# LANGUAGE OverloadedStrings #-} module Bio.Data.Types where ( FileFormat(..) , File(..) , emptyFile , location , replication , form...
null
https://raw.githubusercontent.com/kaizhang/bioinformatics-toolkit/89b8d1cdf4fa7b075794c37c070cab8ac27acfaf/bioinformatics-toolkit/src/Bio/Data/Types.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FunctionalDependencies # module Bio.Data.Types where ( FileFormat(..) , File(..) , emptyFile , location , replication , format , keywords , Experiment(...
6e9bf9abff03c1e0eac1e1c61c6f74bf7c29c1dd01aadc580cd0601a0d9e393c
ocaml-gospel/ortac
failure.ml
open Ppxlib open Builder let eterm t = estring t let term_kind kind = (match kind with | `Check -> "Check" | `Pre -> "Pre" | `Post -> "Post" | `XPost -> "XPost" | `Invariant -> "Invariant") |> lident |> fun c -> pexp_construct c None let register ~register_name e = [%expr [%e e] |> Ortac_runtime.Er...
null
https://raw.githubusercontent.com/ocaml-gospel/ortac/8843becd4be3dc9d828a7175153332f490581025/src/core/failure.ml
ocaml
open Ppxlib open Builder let eterm t = estring t let term_kind kind = (match kind with | `Check -> "Check" | `Pre -> "Pre" | `Post -> "Post" | `XPost -> "XPost" | `Invariant -> "Invariant") |> lident |> fun c -> pexp_construct c None let register ~register_name e = [%expr [%e e] |> Ortac_runtime.Er...
58c0d310421c4adfa653c3b34c1870fd3dd3c18b4e51dc98476e9e013dc22feb
lambdacube3d/lambdacube-quake3
World.hs
# LANGUAGE TemplateHaskell , DeriveGeneric # module World where import GHC.Generics (Generic) import Data.Binary import Lens.Micro.Platform import System.Random.Mersenne.Pure64 import Visuals import Entities import qualified Items data Input = Input { forwardmove :: !Float , sidemove :: !Float , sho...
null
https://raw.githubusercontent.com/lambdacube3d/lambdacube-quake3/2fbc17eeea7567f2876d86a7ccce4bd8c8e1927c/game/World.hs
haskell
server side snapshot move to client recived input (for all clients) snapshot
# LANGUAGE TemplateHaskell , DeriveGeneric # module World where import GHC.Generics (Generic) import Data.Binary import Lens.Micro.Platform import System.Random.Mersenne.Pure64 import Visuals import Entities import qualified Items data Input = Input { forwardmove :: !Float , sidemove :: !Float , sho...
716ed80907f07716702970a7e9cc73d84a9151f6f3d16c6a5544e5cc66a5d844
robashton/cravendb
stream.clj
(ns cravendb.stream (:require [cravendb.documents :as docs] [cravendb.storage :as s] [cravendb.database :as db] [cravendb.core :refer [zero-synctag]])) (defn expand-document [instance id] { :doc (db/load-document instance id) :id id :metadata (db/load-document-metadata ...
null
https://raw.githubusercontent.com/robashton/cravendb/461e80c7c028478adb4287922db6ee4d2593a880/src/cravendb/stream.clj
clojure
(ns cravendb.stream (:require [cravendb.documents :as docs] [cravendb.storage :as s] [cravendb.database :as db] [cravendb.core :refer [zero-synctag]])) (defn expand-document [instance id] { :doc (db/load-document instance id) :id id :metadata (db/load-document-metadata ...
a2e58e3f2f043c89a82241a10953a3cd5bcfe47a49ed4635faccf8270f8783d6
clojure/tools.trace
trace.clj
;;; trace.clj -- simple call - tracing macros for Clojure by , / December 3 , 2008 Copyright ( c ) , 2008 . 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...
null
https://raw.githubusercontent.com/clojure/tools.trace/ab89a9058125ff947871e57c5010680e8bba305d/src/main/clojure/clojure/tools/trace.clj
clojure
Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. This file defines simple "tracing...
trace.clj -- simple call - tracing macros for Clojure by , / December 3 , 2008 Copyright ( c ) , 2008 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse CHANGE LOG Aug 23thd , 2013 : December 1st , 2012 : * added traced ? and traceabl...
c9b1485ec36ad9e2f503e432fd922ce9e985e2cde278b538e12965a6c39438e0
the2pizza/authorizer
integration_test.clj
(ns authorizer.integration-test (:require [clojure.test :refer :all] [authorizer.account :as account] [authorizer.state :refer :all])) (def record-seq-ok [{:account {:available-limit 1000 :active-card true}} {:transaction {:merchant "KFC" :amount 20, :time "2019-02-13T12:02:0...
null
https://raw.githubusercontent.com/the2pizza/authorizer/024f9760621a9187337b5ef326d9b51795a4bdee/test/authorizer/integration_test.clj
clojure
(ns authorizer.integration-test (:require [clojure.test :refer :all] [authorizer.account :as account] [authorizer.state :refer :all])) (def record-seq-ok [{:account {:available-limit 1000 :active-card true}} {:transaction {:merchant "KFC" :amount 20, :time "2019-02-13T12:02:0...
f74ac365ffede7624a513bf6c7180be6a80b53fcdaf3762254fb9ad6d210e0d3
privet-kitty/cl-competitive
find-argopt.lisp
(defpackage :cp/find-argopt (:use :cl) (:export #:find-argopt)) (in-package :cp/find-argopt) (declaim (inline find-argopt)) (defun find-argopt (iterable predicate &key start end (key #'identity)) "Returns an index (or key) x at which ITERABLE takes the minimum (or maximum, depending on PREDICATE), and returns IT...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/find-argopt.lisp
lisp
(defpackage :cp/find-argopt (:use :cl) (:export #:find-argopt)) (in-package :cp/find-argopt) (declaim (inline find-argopt)) (defun find-argopt (iterable predicate &key start end (key #'identity)) "Returns an index (or key) x at which ITERABLE takes the minimum (or maximum, depending on PREDICATE), and returns IT...
9ef019c43e5caa21ffc0750d7104f7292971729c347a549cdf147e09899e88f9
jrh13/hol-light
arithprov.ml
(* ========================================================================= *) Proof that provability is definable ; weak form of Godel 's theorem . (* ========================================================================= *) prioritize_num();; (* --------------------------------------------------------...
null
https://raw.githubusercontent.com/jrh13/hol-light/ea44a4cacd238d7fa5a397f043f3e3321eb66543/Arithmetic/arithprov.ml
ocaml
========================================================================= ========================================================================= ------------------------------------------------------------------------- Auxiliary predicate: all numbers in an iterated-pair "list". ---------------...
Proof that provability is definable ; weak form of Godel 's theorem . prioritize_num();; let ALLN_DEF = let th = prove (`!P. ?ALLN. !z. ALLN z <=> if ?x y. z = NPAIR x y then P (@x. ?y. NPAIR x y = z) /\ ALLN (@y. ?x. NPAIR x y = z) ...
84a6e40279cdd2007cce8b44a42ade73dce615b9dcf9d4cd8c22c9d8ec2f7b55
Simre1/haskell-game
GPipe.hs
# LANGUAGE TemplateHaskell # # LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE KindSignatures # {-# LANGUAGE GADTs #-} # LANGUAGE DeriveFunctor # # LANGUAGE TypeApplications # # LANGUAGE DataKinds # # LANGUAGE TypeOperators # module Window.GPipe ( WindowIO , WindowAc...
null
https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/src/Window/GPipe.hs
haskell
# LANGUAGE GADTs #
# LANGUAGE TemplateHaskell # # LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE KindSignatures # # LANGUAGE DeriveFunctor # # LANGUAGE TypeApplications # # LANGUAGE DataKinds # # LANGUAGE TypeOperators # module Window.GPipe ( WindowIO , WindowAction , makeWindowActi...
cb1bb81c4f92c8b916261c37160830c1d8a24cb65830d23388c664e5a96d5b0d
haskellfoundation/matchmaker
Form.hs
module Web.Form ( module Web.Form, module Web.Form.Types, ) where import Data.Map hiding (fold, toList) import ImportYesod import Templates.Partials.FlashAlerts import Web.FlashAlerts import Web.Form.Types fieldError :: e -> FormValidation e a fieldError err = FieldErrors $ err :| [] lookupFormFieldTextError :: ...
null
https://raw.githubusercontent.com/haskellfoundation/matchmaker/d64a1f0782a6be121a5df6038297e72f8d19fe4c/src/Web/Form.hs
haskell
module Web.Form ( module Web.Form, module Web.Form.Types, ) where import Data.Map hiding (fold, toList) import ImportYesod import Templates.Partials.FlashAlerts import Web.FlashAlerts import Web.Form.Types fieldError :: e -> FormValidation e a fieldError err = FieldErrors $ err :| [] lookupFormFieldTextError :: ...
499648c6676568e96511f69e3ad78bab692c4c7b874cae5db8304365e1d829b9
bmourad01/ocamlchess
test_fen.ml
open Core_kernel [@@warning "-D"] open OUnit2 open Chess let cmp_bitboard = Bitboard.equal let cmp_active = Piece.Color.equal let cmp_castle = Castling_rights.equal let cmp_en_passant = Option.equal Square.equal let test_starting_position () = let pos = Position.start in assert_equal (Position.white pos) Bitboard...
null
https://raw.githubusercontent.com/bmourad01/ocamlchess/6c7214f5b709d9b1327b384a057fbdb2b5a9c3db/chess/test/test_fen.ml
ocaml
open Core_kernel [@@warning "-D"] open OUnit2 open Chess let cmp_bitboard = Bitboard.equal let cmp_active = Piece.Color.equal let cmp_castle = Castling_rights.equal let cmp_en_passant = Option.equal Square.equal let test_starting_position () = let pos = Position.start in assert_equal (Position.white pos) Bitboard...
c7cff7d08aab06d03cd6c485cef96f68e7fd88542ae73bdaf33fa7c506454535
Clojure2D/clojure2d-examples
ray.clj
(ns rt4.the-next-week.ch02.ray (:require [fastmath.vector :as v] [fastmath.core :as m])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defprotocol RayProto (at [ray t])) (defrecord Ray [origin direction ^double time] RayProto (at [_ t] (v/add...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch02/ray.clj
clojure
(ns rt4.the-next-week.ch02.ray (:require [fastmath.vector :as v] [fastmath.core :as m])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defprotocol RayProto (at [ray t])) (defrecord Ray [origin direction ^double time] RayProto (at [_ t] (v/add...
5c70d905ada44ceb37206c3f4ac06a0ca312d8f023b83e0f22cc3ee7291eeb44
databrary/databrary
Context.hs
# LANGUAGE GeneralizedNewtypeDeriving # module Context ( ActionContext(..) , ActionContextM , runContextM , BackgroundContext(..) , BackgroundContextM , withBackgroundContextM , SolrIndexingContext(..) , SolrIndexingContextM , mkSolrIndexingContext ) where import Control.Monad.Trans.Reader (Reader...
null
https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Context.hs
haskell
| This is the context for when you don't have an identity, but you have a fully initialized, "command line" access to the system. ^ All initialized services; "the imperative shell" ^ When the ActionContextM action is running (i.e., NOW) ^ Optimization for MonadResource ^ The specific connection chosen for the run...
# LANGUAGE GeneralizedNewtypeDeriving # module Context ( ActionContext(..) , ActionContextM , runContextM , BackgroundContext(..) , BackgroundContextM , withBackgroundContextM , SolrIndexingContext(..) , SolrIndexingContextM , mkSolrIndexingContext ) where import Control.Monad.Trans.Reader (Reader...
727363a32ec95f0b7fd6f95cf619a8ca2a555d866eefdc1b24dc3381bc3ce1dc
wenkokke/fgg-gen
Named.hs
{-# LANGUAGE OverloadedStrings #-} module Language.FGG.Named where import Data.Text (Text) import qualified Data.Text as T import Data.List (intersperse) -- * Named FG type Name = Text data Type = Par Name | Con Name [Type] deriving (Show) data Expr = Var Name -- ^ Variable name | Struc...
null
https://raw.githubusercontent.com/wenkokke/fgg-gen/2beadebaf7d46b947c1deb7b6e4b2c0084251343/src/Language/FGG/Named.hs
haskell
# LANGUAGE OverloadedStrings # * Named FG ^ Variable name ^ Struct name ^ Type arguments ^ Field values ^ Struct ^ Field name ^ Struct ^ Method name ^ Type arguments ^ Arguments ^ Struct ^ Asserted type ^ Method name ^ Type parameters and bounds ^ Method arguments and types ^ Return type ^ Struct name...
module Language.FGG.Named where import Data.Text (Text) import qualified Data.Text as T import Data.List (intersperse) type Name = Text data Type = Par Name | Con Name [Type] deriving (Show) data Expr = Var | Struct | Select | Call | Assert deriving (Show) data Sig = Sig deriving (Show) ...
5d76431a418a784e1aaf3ca78cf10eeaca8496374e07c84ad3e306c914fffc95
chrisdone/prana
TH.hs
# LANGUAGE NamedFieldPuns # # LANGUAGE TemplateHaskell # # LANGUAGE MagicHash # # LANGUAGE EmptyCase # {-# LANGUAGE BangPatterns #-} # LANGUAGE UnboxedTuples # # LANGUAGE MagicHash # # LANGUAGE RecursiveDo # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE StandaloneD...
null
https://raw.githubusercontent.com/chrisdone/prana/f2e45538937d326aff562b6d49296eaedd015662/prana-interpreter/src/Prana/Interpreter/PrimOps/TH.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE OverloadedStrings # | | Wrap up an unboxed tuple, boxing its arguments. That's our design decision. TODO: Re-visit boxing unboxed arguments? Maybe only do polymorphic ones? ------------------------------------------------------------------------------ Type deconstruction -------...
# LANGUAGE NamedFieldPuns # # LANGUAGE TemplateHaskell # # LANGUAGE MagicHash # # LANGUAGE EmptyCase # # LANGUAGE UnboxedTuples # # LANGUAGE MagicHash # # LANGUAGE RecursiveDo # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE StandaloneDeriving # module Prana.Interpreter.PrimOps.TH where import ...
cce86870a868b98e20f7ec555027fea6dbcfac93fd0ec71b97d263e0cb0d4da7
ThomasCrevoisier/chrome-remote-interface-haskell
Types.hs
# LANGUAGE DuplicateRecordFields # # LANGUAGE OverloadedStrings # {-# LANGUAGE TemplateHaskell #-} module Chrome.API.Profiler.Types where import Chrome.Target.Message.TH (deriveJSONMsg) import Chrome.API.Debugger.Types (Location) import Chrome.API.Runtime.Types (CallFrame) ...
null
https://raw.githubusercontent.com/ThomasCrevoisier/chrome-remote-interface-haskell/b7cb4a2367fda40a1e90bc3378a6c4e52578b2d7/src/Chrome/API/Profiler/Types.hs
haskell
# LANGUAGE TemplateHaskell #
# LANGUAGE DuplicateRecordFields # # LANGUAGE OverloadedStrings # module Chrome.API.Profiler.Types where import Chrome.Target.Message.TH (deriveJSONMsg) import Chrome.API.Debugger.Types (Location) import Chrome.API.Runtime.Types (CallFrame) data SamplingIntervalParam = SamplingI...
1e1c9863159a0f73510f9f87261e07080a903fa023d5fa1805f8248b0dc3e94e
danieljharvey/mimsa
Module.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE MonoLocalBinds # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE StandaloneDeriving # # LANGUAGE UndecidableInstances # module Smol.Core.Types.Module.Module ( M...
null
https://raw.githubusercontent.com/danieljharvey/mimsa/296ab9bcbdbaf682fa76921ce3c80d4bbafb52ae/smol-core/src/Smol/Core/Types/Module/Module.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings # it defines some datatypes, infixes and definitions | typeless argument `a` | argument with type `(a: String) ->` | type with no binding `String` item parsed from file, kept like this so we can order them and have duplicates we will remove duplicates when...
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE MonoLocalBinds # # LANGUAGE StandaloneDeriving # # LANGUAGE UndecidableInstances # module Smol.Core.Types.Module.Module ( Module (..), DefPart (..), ModuleItem (..), Import (..),...
074fb2b09bd06a2d68a60193ad1e9695124e30734e4b5b5cc6abbc0675ff55ea
kmi/irs
soap-grounding.lisp
Copyright ( C ) Open University 2007 , 2008 . This is a grounding from IRS to SOAP 1.1 . It is currently a ( huge ) kludge for two reasons : ;;; 1 . Shortcomings in IRS 's generic grounding support . 2 . It was written quickly and only to support LHDL services . ;;; ;;; Neither is acceptable long-term. ;;...
null
https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/src/grounding/soap-grounding.lisp
lisp
Neither is acceptable long-term. We use a new grounding signature. The choreography's has-grounding slot takes the sexp '((grounded-to-soap1.1)), but everything goes through the new slot has-earthing. That takes an instance of soap-grounding. See the WSMO ontology for details.
Copyright ( C ) Open University 2007 , 2008 . This is a grounding from IRS to SOAP 1.1 . It is currently a ( huge ) kludge for two reasons : 1 . Shortcomings in IRS 's generic grounding support . 2 . It was written quickly and only to support LHDL services . (in-package :irs.grounding.soap) (defun soap-...
b7d9b3af25f7aac45049cd083ff2322aff475ce12dfe01155a2e4a2a8efb1aa1
viercc/kitchen-sink-hs
MonadLaws.hs
# LANGUAGE QuantifiedConstraints # {-# LANGUAGE RankNTypes #-} module MonadLaws ( Enum1, skolem1, skolem3, propMonadUnitL, propMonadUnitR, propMonadAssoc, checkMonad, checkMonadIO, ) where import Control.Applicative import Control.Monad.State import Data.Functor.Compose type Enum1 m =...
null
https://raw.githubusercontent.com/viercc/kitchen-sink-hs/cef9de308d77c23f9e3b36510b30fb4bf7f770eb/monads-collection/src/MonadLaws.hs
haskell
# LANGUAGE RankNTypes # -------------- --------------
# LANGUAGE QuantifiedConstraints # module MonadLaws ( Enum1, skolem1, skolem3, propMonadUnitL, propMonadUnitR, propMonadAssoc, checkMonad, checkMonadIO, ) where import Control.Applicative import Control.Monad.State import Data.Functor.Compose type Enum1 m = forall f a. (Alternative f)...
b42725d49842bf9cf6533226c3ab4e0687b0395bb95edfdcdff395cb202ec930
Holworth/SICP_Solutions
exercise3-1.rkt
#lang sicp (define (make-accumulator init) (lambda (incre) (set! init (+ init incre)) init)) (define A (make-accumulator 5)) (A 10) (A 20)
null
https://raw.githubusercontent.com/Holworth/SICP_Solutions/ef0c454b11c8d1ac49c3fd7d328e0ac5ac142105/solutions/chap3/code/exercise3-1.rkt
racket
#lang sicp (define (make-accumulator init) (lambda (incre) (set! init (+ init incre)) init)) (define A (make-accumulator 5)) (A 10) (A 20)
819f7e9833e1e725421203f55b3d478a29d3c861abd3759f430cd8834a680229
PLTools/Lama-devel
p.ml
open Language class pp_pattern fself = object inherit [Pattern.t] Pattern.fmt_t_t fself method! c_Wildcard ppf _ = Format.fprintf ppf "_" method! c_Const ppf _ = Format.fprintf ppf "%d" method! c_Named ppf _ name _ = (* TODO: should I ignore another argument? *) Format.fprintf ppf "%s" name method! ...
null
https://raw.githubusercontent.com/PLTools/Lama-devel/7eb3e223b8b289394ae23622ec117aeff879afaf/bench/p.ml
ocaml
TODO: should I ignore another argument?
open Language class pp_pattern fself = object inherit [Pattern.t] Pattern.fmt_t_t fself method! c_Wildcard ppf _ = Format.fprintf ppf "_" method! c_Const ppf _ = Format.fprintf ppf "%d" method! c_Named ppf _ name _ = Format.fprintf ppf "%s" name method! c_Sexp ppf _ name xs = match name,xs with ...
569d6a8017a05db188efb954742b6052ff2756579569024ca8d45c82ca24a4e5
askvortsov1/hardcaml-mips
delay_test_io.mli
include Io_intf.Io_intf For testing purposes , delay writes by 2 clock cycles , * and reads by 3 clock cycles . * Used to test datapath pausing . * and reads by 3 clock cycles. * Used to test datapath pausing. *)
null
https://raw.githubusercontent.com/askvortsov1/hardcaml-mips/c94e0a8907ba4214f05e615a8e1407acc1777f15/lib/io/delay_test_io.mli
ocaml
include Io_intf.Io_intf For testing purposes , delay writes by 2 clock cycles , * and reads by 3 clock cycles . * Used to test datapath pausing . * and reads by 3 clock cycles. * Used to test datapath pausing. *)
ea704ca886b65bebf6653bfe788a37aa2713b70ed9e90a2755dbdc22f66fbaa7
ocaml-flambda/ocaml-jst
ocamltest_config.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/1bb6c797df7c63ddae1fc2e6f403a0ee9896cc8e/ocamltest/ocamltest_config.mli
ocaml
************************************************************************ OCaml ...
, projet Gallium , INRIA Paris Copyright 2017 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the Interface for ocamltest 's configuration module val arch : string val afl_instrument : bool val asm : stri...
b44f3e0d78e516bea8bad03058ff945c3636d05d0b73feebfab67ceb01af91c4
abailly/hs-word2vec
Repa.hs
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # # LANGUAGE InstanceSigs # {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeSynonymInstances #-} | An implementation of ` Model . NN ` based on Repa arrays module Model.Repa where import Control.Monad.Trans (MonadIO, liftIO...
null
https://raw.githubusercontent.com/abailly/hs-word2vec/894e401325dbb7c35c45e9ed546b0914f93c900f/src/Model/Repa.hs
haskell
# LANGUAGE TypeFamilies # # LANGUAGE TypeSynonymInstances # | Used for vector computations | More efficient to update part of a map than a complete matrix Number of words in the model Size of the model or number of dimensions each word is mapped to also called number of features The input -> hidden connec...
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # # LANGUAGE InstanceSigs # | An implementation of ` Model . NN ` based on Repa arrays module Model.Repa where import Control.Monad.Trans (MonadIO, liftIO) import qualified Data.Aeson as J import Data.Array.Repa...
9314191fa3985f62f3273e46ac9452eb19327176901d80879f359657d7bf996b
tsloughter/kuberl
kuberl_apiextensions_v1_service_reference.erl
-module(kuberl_apiextensions_v1_service_reference). -export([encode/1]). -export_type([kuberl_apiextensions_v1_service_reference/0]). -type kuberl_apiextensions_v1_service_reference() :: #{ 'name' := binary(), 'namespace' := binary(), 'path' => binary(), 'port' => integer() }. encode(#...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_apiextensions_v1_service_reference.erl
erlang
-module(kuberl_apiextensions_v1_service_reference). -export([encode/1]). -export_type([kuberl_apiextensions_v1_service_reference/0]). -type kuberl_apiextensions_v1_service_reference() :: #{ 'name' := binary(), 'namespace' := binary(), 'path' => binary(), 'port' => integer() }. encode(#...
c723207ec1edd2843dac70f91a763b52d4b3c2809bb4365635fa874cf3c42eb0
lpeterse/koka
IdNice.hs
----------------------------------------------------------------------------- Copyright 2012 Microsoft Corporation . -- -- This is free software; you can redistribute it and/or modify it under the terms of the Apache License , Version 2.0 . A copy of the License can be found in the file " license.txt " at the roo...
null
https://raw.githubusercontent.com/lpeterse/koka/43feefed258b9a533f07967d3f8867b02384df0e/src/Common/IdNice.hs
haskell
--------------------------------------------------------------------------- This is free software; you can redistribute it and/or modify it under the --------------------------------------------------------------------------- | Make "nice" names. -------------------------------------------------------------- ---...
Copyright 2012 Microsoft Corporation . terms of the Apache License , Version 2.0 . A copy of the License can be found in the file " license.txt " at the root of this distribution . module Common.IdNice ( Nice, niceEmpty, niceExtend, niceShow, nicePretty ) where import Prelude hiding ( ...
17cabb4dcf977b4a752abe7c97aa5475c180a3115253d5dfa158eabcf56f1fa8
dmvianna/haskellbook
Ch07-Penguin.hs
module RegisteredUser where newtype Username = Username String newtype AccountNumber = AccountNumber Integer data User = UnregisteredUser | RegisteredUser Username AccountNumber printUser :: User -> IO () printUser UnregisteredUser = putStrLn "UnregisteredUser" printUser (RegisteredUser (Username name) ...
null
https://raw.githubusercontent.com/dmvianna/haskellbook/b1fdce66283ccf3e740db0bb1ad9730a7669d1fc/src/Ch07-Penguin.hs
haskell
module RegisteredUser where newtype Username = Username String newtype AccountNumber = AccountNumber Integer data User = UnregisteredUser | RegisteredUser Username AccountNumber printUser :: User -> IO () printUser UnregisteredUser = putStrLn "UnregisteredUser" printUser (RegisteredUser (Username name) ...
15622e97085ef861c375af118ae128dc2de3ba0eea5fb347d40cb4cebd759b49
takikawa/racket-ppa
like-ambiguous-binding.rkt
#lang racket/base (require "../compile/serialize-property.rkt") (provide (struct-out like-ambiguous-binding)) (struct like-ambiguous-binding () #:authentic #:transparent #:property prop:serialize (lambda (b ser-push! state) (ser-push! 'tag '#:like-ambiguous-binding)))
null
https://raw.githubusercontent.com/takikawa/racket-ppa/d336bb10e3e0ec3a20020e9ade9e77d2f6f80b6d/src/expander/syntax/like-ambiguous-binding.rkt
racket
#lang racket/base (require "../compile/serialize-property.rkt") (provide (struct-out like-ambiguous-binding)) (struct like-ambiguous-binding () #:authentic #:transparent #:property prop:serialize (lambda (b ser-push! state) (ser-push! 'tag '#:like-ambiguous-binding)))
e4c01bc3b93c9000564df2238e3edeb7e5ef91f76b01879d4f0ae6969b626334
slyrus/mcclim-old
pointer-doc-hack.lisp
;;; -*- Mode: Lisp; Package: CLIM-INTERNALS -*- ( c ) copyright 2003 by ( ) ;;; This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your op...
null
https://raw.githubusercontent.com/slyrus/mcclim-old/354cdf73c1a4c70e619ccd7d390cb2f416b21c1a/Experimental/pointer-doc-hack.lisp
lisp
-*- Mode: Lisp; Package: CLIM-INTERNALS -*- This library is free software; you can redistribute it and/or either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Licen...
( c ) copyright 2003 by ( ) modify it under the terms of the GNU Library General Public version 2 of the License , or ( at your option ) any later version . Library General Public License for more details . You should have received a copy of the GNU Library General Public Free Software Foundation , In...
d0297dcff382e9910e5365903c8c13b3f3c39392f631cbdddaae97d0e6f01549
e-bigmoon/haskell-blog
Synopsis.hs
#!/usr/bin/env stack -- stack script --resolver lts-16.29 {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} import qualified Data.Map as M import Prelude hiding (readFile, writeFile) import Text.Hamlet.XML import Text.XML main :: IO () main = do -- r...
null
https://raw.githubusercontent.com/e-bigmoon/haskell-blog/5c9e7c25f31ea6856c5d333e8e991dbceab21c56/sample-code/yesod/appendix/ap5/Synopsis.hs
haskell
stack script --resolver lts-16.29 # LANGUAGE OverloadedStrings # # LANGUAGE QuasiQuotes # readFile will throw any parse errors as runtime exceptions def uses the default settings root is the root element of the document, let's modify it And now we write out. Let's indent our output We'll turn out <document>...
#!/usr/bin/env stack import qualified Data.Map as M import Prelude hiding (readFile, writeFile) import Text.Hamlet.XML import Text.XML main :: IO () main = do Document prologue root epilogue <- readFile def "input.xml" let root' = transform root writeFile def ...
aa445c7c3de51c7375597ecddcfc0ba8f6b98ddd45cb7eeafb61ac0ee293f07f
reborg/clojure-essential-reference
4.clj
(require '[criterium.core :refer [quick-bench]]) < 1 > Execution time mean : 309.609565 µs < 2 > Execution time mean : 117.814547 µs (let [r (range 10000)] (quick-bench (into [] (filter odd?) r))) ; <3> Execution time mean : 196.445960 µs
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/Vectors/filterv/4.clj
clojure
<3>
(require '[criterium.core :refer [quick-bench]]) < 1 > Execution time mean : 309.609565 µs < 2 > Execution time mean : 117.814547 µs Execution time mean : 196.445960 µs
23216d4bfa724e62d59db7a81f9fb2852d686aa04d927dbd8a74aea01ec035a0
rabbitmq/rabbitmq-federation
rabbit_federation_db.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . %% -module(rabbit_federation_db). -include("rabbit_...
null
https://raw.githubusercontent.com/rabbitmq/rabbitmq-federation/960b8214487ae2495cd39afbbd3a2c4d9ea37985/src/rabbit_federation_db.erl
erlang
----------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit_federation_db). -include("rabbit_federa...
3f9f10a6a0edb2d5c80ac15121784aeec7ff2ad75c6dd46e38f6879d3e0e241e
aws-beam/aws-erlang
aws_polly.erl
%% WARNING: DO NOT EDIT, AUTO-GENERATED CODE! See -beam/aws-codegen for more details . @doc Amazon Polly is a web service that makes it easy to synthesize speech %% from text. %% The Amazon Polly service provides API operations for synthesizing %% high-quality speech from plain text and Speech Synthesis Markup L...
null
https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_polly.erl
erlang
WARNING: DO NOT EDIT, AUTO-GENERATED CODE! from text. high-quality speech from plain text and Speech Synthesis Markup Language (SSML), along with managing pronunciations lexicons that enable you to get the best results for your application domain. ==================================================================...
See -beam/aws-codegen for more details . @doc Amazon Polly is a web service that makes it easy to synthesize speech The Amazon Polly service provides API operations for synthesizing -module(aws_polly). -export([delete_lexicon/3, delete_lexicon/4, describe_voices/1, describe_voices/3, ...
ab4eb1473e244a3c401eed671995bd1f4a2588a3ea97dc260d1333912011dfde
binaryage/cljs-devtools
toolbox.cljs
(ns devtools-sample.tests.toolbox (:require-macros [devtools-sample.logging :refer [log info]]) (:require [devtools-sample.boot :refer [boot!]] [devtools.toolbox :as toolbox])) (boot! "/src/tests/devtools_sample/tests/toolbox.cljs") ; --- MEAT STARTS HERE --> ; note: (log ...) expands to (.log js/cons...
null
https://raw.githubusercontent.com/binaryage/cljs-devtools/d07fc6d404479b1ddd32cecc105009de77e3cba7/examples/lein/src/tests/devtools_sample/tests/toolbox.cljs
clojure
--- MEAT STARTS HERE --> note: (log ...) expands to (.log js/console ...) -- toolbox/envelope ------------------------------------------------------------------------------------------------------- -- toolbox/force-format ----------------------------------------------------------------------------------------------...
(ns devtools-sample.tests.toolbox (:require-macros [devtools-sample.logging :refer [log info]]) (:require [devtools-sample.boot :refer [boot!]] [devtools.toolbox :as toolbox])) (boot! "/src/tests/devtools_sample/tests/toolbox.cljs") (info "toolbox/envelope tests:") (def busy-obj (js-obj "a" 1 "s" "...
1cf3d1b0f8ff258a08cfdbf64092adb86eb588db3686f2ab72bba3b9656ec9c7
lisp/de.setf.resource
vocabulary.lisp
-*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : de.setf.resource.implementation ; -*- (in-package :de.setf.resource.implementation) (:documentation "This file defines tests for RDF vocabularies." (copyright "Copyright 2010 [james anderson](mailto:) All Rights Reserved" "'de.setf.r...
null
https://raw.githubusercontent.com/lisp/de.setf.resource/27bf6dfb3b3ca99cfd5a6feaa5839d99bfb4d29e/test/vocabulary.lisp
lisp
Syntax : ansi - common - lisp ; Base : 10 ; Package : de.setf.resource.implementation ; -*- without even the (test:execute-test :resource.vocabulary.**)
(in-package :de.setf.resource.implementation) (:documentation "This file defines tests for RDF vocabularies." (copyright "Copyright 2010 [james anderson](mailto:) All Rights Reserved" "'de.setf.resource' is free software: you can redistribute it and/or modify it under the terms of version 3 of the GNU Af...
8b9004cd0eb951662b6d01791b7f86cd55b565aad69a0fbfff45fb5c51686bc5
mfikes/fifth-postulate
ns204.cljs
(ns fifth-postulate.ns204) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
null
https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns204.cljs
clojure
(ns fifth-postulate.ns204) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
3c2442ec9db9c69426d110729690052a31af9cd90381b6fb959e995f807c7539
ichistmeinname/free-theorems
PrettyTypes.hs
| Pretty printer for declarations . -- It provides functions to transform declarations and especially type -- signatures into documents. -- -- See the module \"Text.PrettyPrint\" for more details about the used -- document type. module Language.Haskell.FreeTheorems.PrettyTypes where import Prelude hidin...
null
https://raw.githubusercontent.com/ichistmeinname/free-theorems/9a84f28d6a0d1e141932d61d30f01254b465ea1e/free-theorems/src/Language/Haskell/FreeTheorems/PrettyTypes.hs
haskell
It provides functions to transform declarations and especially type signatures into documents. See the module \"Text.PrettyPrint\" for more details about the used document type. ----- Declarations ---------------------------------------------------------- | Pretty-prints a declaration. | Pretty-prints a ...
| Pretty printer for declarations . module Language.Haskell.FreeTheorems.PrettyTypes where import Prelude hiding ((<>)) import Text.PrettyPrint import Language.Haskell.FreeTheorems.BasicSyntax import Language.Haskell.FreeTheorems.PrettyBase prettyDeclaration :: Declaration -> Doc prettyDeclaration (Type...
0ae74dcf11797d9fbf2be51946adcf7a1bd08b34fea6fffb2900c5dfe51916fc
raghavkarol/edt
edt_http.erl
%% Copyright 2020 . %% -module(edt_http). -export([ allowed_methods/2, content_types_provided/2, init/2, resource_exists/2 ]). -export([ to_text/2, to_json/2 ]). -include("edt_profile.hrl"). %% --------------------------------------------------------- %% Callbacks %% --------------------...
null
https://raw.githubusercontent.com/raghavkarol/edt/619bb788767dbb0d8e144e1c58af9e6e4925460c/src/edt_http.erl
erlang
--------------------------------------------------------- Callbacks --------------------------------------------------------- --------------------------------------------------------- Handlers ---------------------------------------------------------
Copyright 2020 . -module(edt_http). -export([ allowed_methods/2, content_types_provided/2, init/2, resource_exists/2 ]). -export([ to_text/2, to_json/2 ]). -include("edt_profile.hrl"). init(Req, State) -> {cowboy_rest, Req, State}. allowed_methods(Req, State) -> {[<<"GET">>], Re...
282cc3dab1a23bd9599feef6d07f2c9c880bcffae4222ec03dd96efa34c73887
themattchan/advent-of-code
day1.hs
#! /usr/bin/env runhaskell -i../../ import Utils solve :: Int -> [Int] -> Int solve n = getSum . foldMap (foldMap Sum) . filter (uncurry (==)) . uncurry zip . (id &&& drop n . cycle) main :: IO () main = do ints <- map digitToInt . filter isDigit <$> getContents print $ solve 1 int...
null
https://raw.githubusercontent.com/themattchan/advent-of-code/0b08a4fbadf7e713d40044523af3debb7d0cb6b9/2017/day1/day1.hs
haskell
#! /usr/bin/env runhaskell -i../../ import Utils solve :: Int -> [Int] -> Int solve n = getSum . foldMap (foldMap Sum) . filter (uncurry (==)) . uncurry zip . (id &&& drop n . cycle) main :: IO () main = do ints <- map digitToInt . filter isDigit <$> getContents print $ solve 1 int...
37a5ffa6a7bbc810cfa2741f37a34c3e73b56cc8e58443dae0ab743eff935f9a
kupl/LearnML
original.ml
type aexp = | Const of int | Var of string | Power of (string * int) | Times of aexp list | Sum of aexp list let rec diff ((aexp : aexp), (x : string)) : aexp = match aexp with | Const n -> Const 0 | Var chars -> Var chars | Power (chars, n) -> if n > 2 then Times [ Const n; Power (chars, n - 1...
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/diff/sub49/original.ml
ocaml
type aexp = | Const of int | Var of string | Power of (string * int) | Times of aexp list | Sum of aexp list let rec diff ((aexp : aexp), (x : string)) : aexp = match aexp with | Const n -> Const 0 | Var chars -> Var chars | Power (chars, n) -> if n > 2 then Times [ Const n; Power (chars, n - 1...
2fbfd189681faba671ddaa5d5fdf47c009c47b8dcf0c6269e839ffe94967b8c9
petro-rudenko/cdr-analysis
cdr_generator.clj
(ns com.cybervisiontech.cdr.realtime.cdr-generator [:require [clojure.data.json :as json]] [:require [clj-time.core :as time]] [:use [clj-time.format :only [formatter unparse]]] [:require [clojure.string :as str :only [replace]]]) (def country-codes ^{:doc "Map country name -> dial code"} (into {} Read...
null
https://raw.githubusercontent.com/petro-rudenko/cdr-analysis/5e583b0cca30c4faf474507998bd7a9a0380f569/src/com/cybervisiontech/cdr/realtime/cdr_generator.clj
clojure
Filter non empty dial codes Replace + and spaces in code number
(ns com.cybervisiontech.cdr.realtime.cdr-generator [:require [clojure.data.json :as json]] [:require [clj-time.core :as time]] [:use [clj-time.format :only [formatter unparse]]] [:require [clojure.string :as str :only [replace]]]) (def country-codes ^{:doc "Map country name -> dial code"} (into {} Read...
a4c7e926fa2f3ebbd1c167fa614e8d7962c6c47b45a2e90a09399a66cbda5a3c
haskell/lsp
Parsing.hs
{-# LANGUAGE GADTs #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} # LANGUAGE TypeFamilies # {-# LANGUAGE RankNTypes #-} # LANGUAGE FlexibleContexts # # LANGUAGE DuplicateRecordFields # {-# LANGUAGE Constrai...
null
https://raw.githubusercontent.com/haskell/lsp/184dae1da47123ff338c547e557503bc4907d918/lsp-types/src/Language/LSP/Types/Parsing.hs
haskell
# LANGUAGE GADTs # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # # LANGUAGE RankNTypes # # LANGUAGE ConstraintKinds # # LANGUAGE TypeInType # # LANGUAGE DeriveGeneric # # LANGUAGE OverloadedStrings # ...
# LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # # LANGUAGE DuplicateRecordFields # # LANGUAGE StandaloneDeriving # # LANGUAGE FlexibleInstances # # LANGUAGE TupleSections # # LANGUAGE TypeApplications # # OPTIONS_GHC -Wno - unticked - p...
7bed0b6223a1812bd91a94d41ed81bbb08bd4c1d8f87ae34d15cfe75b7b5ba74
esl/MongooseIM
mod_ping_SUITE.erl
%%============================================================================== Copyright 2015 Erlang Solutions Ltd. %% 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 %% ...
null
https://raw.githubusercontent.com/esl/MongooseIM/997ce8cc01dacf8bf1f1f4e3a984ee10f0ce5dd6/big_tests/tests/mod_ping_SUITE.erl
erlang
============================================================================== you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either ex...
Copyright 2015 Erlang Solutions Ltd. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(mod_ping_SUITE). -compile([export_all, nowarn_export_all]). -include_lib("escalus/include/escalus.hrl"). -include_lib("escalus/in...
091f7cce84fa3e39bf8bcb323bc44b231325bb7dc07e696cc81390f2a00b8a44
binsec/binsec
smt_options.mli
(**************************************************************************) This file is part of BINSEC . (* *) Copyright ( C ) 2016 - 2022 CEA ( Co...
null
https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/smt/smt_options.mli
ocaml
************************************************************************ alternatives) you can redistribute it an...
This file is part of BINSEC . Copyright ( C ) 2016 - 2022 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ve...
6d71aeea39786d6c168a1ea7f2604c5e774c1cce661db84ad5963ae1517e7df4
s-expressionists/Concrete-Syntax-Tree
generic-functions.lisp
(cl:in-package #:concrete-syntax-tree) ;;;; Generally speaking, these functions collectively take a macro lambda list or portion thereof , and a variable , and return two ;;;; values: a list of LET* bindings that will bind the variables in ;;;; that lambda list to the value in that variable, and a list of variable...
null
https://raw.githubusercontent.com/s-expressionists/Concrete-Syntax-Tree/a56a5246fbaa90b98a29368c011a6616f2bcb482/Destructuring/generic-functions.lisp
lisp
Generally speaking, these functions collectively take a macro values: a list of LET* bindings that will bind the variables in that lambda list to the value in that variable, and a list of Each function handles a different part of the lambda list. CLIENT is some object representing the client. ARGUMENT-VARIABLE is...
(cl:in-package #:concrete-syntax-tree) lambda list or portion thereof , and a variable , and return two variables bound in the bindings that need to be declared IGNORABLE . (defgeneric destructuring-lambda-list-bindings (client lambda-list argument-variable)) of parameter groups , PARAMETER - GROUPS . (de...
f34eeedb1a26a87f0c920f2b51fb447c500471f470e8b87c03cdfe7f25662b11
protz/mezzo
DataTypeFlavor.ml
(* There are several flavors of algebraic data type definitions. *) At the moment , there are only two flavors : a data type can be immutable ( which implies that it is duplicable ) or mutable ( which implies that is exclusive ) . immutable (which implies that it is duplicable) or mutable (which impl...
null
https://raw.githubusercontent.com/protz/mezzo/4e9d917558bd96067437116341b7a6ea02ab9c39/typing/DataTypeFlavor.ml
ocaml
There are several flavors of algebraic data type definitions. Equality. Display. A flavor implies a mode. An adopter must be exclusive. Writing requires a mutable type.
At the moment , there are only two flavors : a data type can be immutable ( which implies that it is duplicable ) or mutable ( which implies that is exclusive ) . immutable (which implies that it is duplicable) or mutable (which implies that is exclusive). *) type flavor = | Immutable | Mutable ...
5d134a9f491e22a9d7b105b10f1e60ebd25d07db8744a6eb907d5d6e668a72ce
ujamjar/hardcaml
vcd.ml
* hardcaml - hardware design in OCaml * * ( c ) 2014 MicroJamJar Ltd * * Author(s ): * Description : * * hardcaml - hardware design in OCaml * * (c) 2014 MicroJamJar Ltd * * Author(s): * Description: * *) open Astring (** VCD (Verilog Change Dump) generation *) module Make(S :...
null
https://raw.githubusercontent.com/ujamjar/hardcaml/65f32f543348e81cbb7f6d0e77f1f1203bf4e335/src/vcd.ml
ocaml
* VCD (Verilog Change Dump) generation let name = "sim" in id generator list of signals to trace filter out 'clock' and 'reset' write the VCD header reset cycle
* hardcaml - hardware design in OCaml * * ( c ) 2014 MicroJamJar Ltd * * Author(s ): * Description : * * hardcaml - hardware design in OCaml * * (c) 2014 MicroJamJar Ltd * * Author(s): * Description: * *) open Astring module Make(S : Comb.S) = struct open S open Circ...
491c34e5122ae4431705692eae4e060c5f21bf2dd6ca659505be1e983be37909
mfoemmel/erlang-otp
megaco_erl_dist_encoder.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2000 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/megaco/src/engine/megaco_erl_dist_encoder.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2000 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " Purpose : Externalize / internalize Mega...
b4e55dd50349c4589f0f276979450bd222200d2b0101ef99546d4f7f22f39f8c
TristanCacqueray/Haxible
facts.hs
#!/usr/bin/env cabal -- Generated with haxible # LANGUAGE QuasiQuotes , , OverloadedStrings # cabal : build - depends : base , haxible ghc - options : -threaded -rtsopts -with - rtsopts=-N -with - rtsopts=-T build-depends: base, haxible ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T -} modul...
null
https://raw.githubusercontent.com/TristanCacqueray/Haxible/2097a9e7b843d96d718d8bb1f0f10e24a2a9beb4/test/playbooks/facts.hs
haskell
Generated with haxible
#!/usr/bin/env cabal # LANGUAGE QuasiQuotes , , OverloadedStrings # cabal : build - depends : base , haxible ghc - options : -threaded -rtsopts -with - rtsopts=-N -with - rtsopts=-T build-depends: base, haxible ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T -} module Main (main) where impor...
36333c9df45e18a31ac2801dce31cc2313ab68faa3629f9b34cac9de86ef5b06
binaryage/chromex
declarative_net_request.clj
(ns chromex.ext.declarative-net-request "The chrome.declarativeNetRequest API is used to block or modify network requests by specifying declarative rules. This lets extensions modify network requests without intercepting them and viewing their content, thus providing more privacy. * available since Chr...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts/chromex/ext/declarative_net_request.clj
clojure
-- properties ------------------------------------------------------------------------------------------------------------- -- events ----------------------------------------------------------------------------------------------------------------- docs: /#tapping-events -- convenience -----------------------------...
(ns chromex.ext.declarative-net-request "The chrome.declarativeNetRequest API is used to block or modify network requests by specifying declarative rules. This lets extensions modify network requests without intercepting them and viewing their content, thus providing more privacy. * available since Chr...
5aed666e8f91cf12f66580d791823b5c8a46d5990dfb0c2453b7b1e65bd4ee23
lasp-lang/partisan
prop_partisan_linearizability.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2018 . 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/partisan/fd048fc1b34309d9fa41450434a7e7b3b2fa1fb8/test/prop_partisan_linearizability.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 ) 2018 . 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(prop_partisan_linear...
5c9631589fdcd3fafba363153b7118bce6c2795ca74084b353f63f3f4e93d91a
danieljharvey/mimsa
Store.hs
module Language.Mimsa.Types.Store ( module Language.Mimsa.Types.Store.Store, module Language.Mimsa.Types.Store.ExprHash, module Language.Mimsa.Types.Store.StoreExpression, module Language.Mimsa.Types.Store.Bindings, module Language.Mimsa.Types.Store.TypeBindings, module Language.Mimsa.Types.Store....
null
https://raw.githubusercontent.com/danieljharvey/mimsa/8154c07fcd394739d6d9543dd029d06470f738c2/compiler/src/Language/Mimsa/Types/Store.hs
haskell
module Language.Mimsa.Types.Store ( module Language.Mimsa.Types.Store.Store, module Language.Mimsa.Types.Store.ExprHash, module Language.Mimsa.Types.Store.StoreExpression, module Language.Mimsa.Types.Store.Bindings, module Language.Mimsa.Types.Store.TypeBindings, module Language.Mimsa.Types.Store....
b22b562a8f86d071630f57aef8da6339aa14f900fa5906e7ea8ab434a78e84ce
fugue/fregot
Tests.hs
| Copyright : ( c ) 2020 Fugue , Inc. License : Apache License , version 2.0 Maintainer : Stability : experimental Portability : POSIX Copyright : (c) 2020 Fugue, Inc. License : Apache License, version 2.0 Maintainer : Stability : experimental Portability : POSIX -} # LANGUAGE Overlo...
null
https://raw.githubusercontent.com/fugue/fregot/c3d87f37c43558761d5f6ac758d2f1a4117adb3e/tests/hs/Fregot/Interpreter/Dependencies/Tests.hs
haskell
| Copyright : ( c ) 2020 Fugue , Inc. License : Apache License , version 2.0 Maintainer : Stability : experimental Portability : POSIX Copyright : (c) 2020 Fugue, Inc. License : Apache License, version 2.0 Maintainer : Stability : experimental Portability : POSIX -} # LANGUAGE Overlo...
1a15b659ccf5283038f7e0f9271d6010e5fa0fca4d72b04c4532840cdc2027db
xapi-project/xen-api-libs
fring.mli
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
null
https://raw.githubusercontent.com/xapi-project/xen-api-libs/d603ee2b8456bc2aac99b0a4955f083e22f4f314/stdext/fring.mli
ocaml
* Ring structures * create a ring structure with [size] record; records initialised to [init] * create a duplicate ring structure * length of the ring * get the top element of the ring * iterate over nb element of the ring, starting from the top * iterate over all elements of the ring, starting from the top * ge...
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
3dbd7362c4591858a30bd6e65eb5bf7ba589dd905c1a613e2f4121203e1d01d0
finkel-lang/finkel
tup2.hs
print (True, 'x') -- Haskell
null
https://raw.githubusercontent.com/finkel-lang/finkel/c3c7729d5228bd7e0cf76e8ff05fe2f79a0ec0a2/doc/include/language-syntax/expr/tup2.hs
haskell
Haskell
10a4c5df1bc10fb624216c1fd73693258cda4667d1bb8d5b1aa5ad2cf286cb03
jeapostrophe/exp
fusion.rkt
#lang racket/base (require racket/list racket/match (prefix-in data: "data.rkt")) (module+ test (require rackunit)) (define (fusion-result arcana level #:same? [same? #f]) (define ps (filter (λ (p) (not (memf (λ (e) (string=? (first e) (data:persona-name p))) dat...
null
https://raw.githubusercontent.com/jeapostrophe/exp/43615110fd0439d2ef940c42629fcdc054c370f9/persona/p4g/fusion.rkt
racket
#lang racket/base (require racket/list racket/match (prefix-in data: "data.rkt")) (module+ test (require rackunit)) (define (fusion-result arcana level #:same? [same? #f]) (define ps (filter (λ (p) (not (memf (λ (e) (string=? (first e) (data:persona-name p))) dat...
2d7e7e67d178082909abbaa1a4a15644b27b7f1e6bb403de63e7756f1ddd05a5
poroh/ersip_proxy
erproxy_stateless_sup.erl
%% Copyright ( c ) 2018 Dmitry Poroh %% All rights reserved. Distributed under the terms of the MIT License . See the LICENSE file . %% %% Stateless proxy worker supervisor %% %%%------------------------------------------------------------------- %% @doc erproxy top level supervisor. %% @end %%%-------------------...
null
https://raw.githubusercontent.com/poroh/ersip_proxy/8a67e676e255c07a63b88b970ef82ed4762debcb/apps/erproxy/src/erproxy_stateless_sup.erl
erlang
All rights reserved. Stateless proxy worker supervisor ------------------------------------------------------------------- @doc erproxy top level supervisor. @end ------------------------------------------------------------------- API Supervisor callbacks =======================================================...
Copyright ( c ) 2018 Dmitry Poroh Distributed under the terms of the MIT License . See the LICENSE file . -module(erproxy_stateless_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(SERVER, ?MODULE). start_link() -> supervisor:start_link({local, ?SERVER}, ?MODULE, []). ...
473fcbd1a20f49456e73e42ee63672a7986be345b44ad0c4551d57f05a7425b9
Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library
SourceTransactionAchCreditTransferData.hs
{-# LANGUAGE MultiWayIf #-} CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . {-# LANGUAGE OverloadedStrings #-} | Contains the types generated from the schema SourceTransactionAchCreditTransferData module StripeAPI.Types.SourceTransact...
null
https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/SourceTransactionAchCreditTransferData.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # | Defines the object schema located at @components.schemas.source_transaction_ach_credit_transfer_data@ in the specification. | customer_data: Customer data associated with the transfer. Constraints: | fingerprint: Bank account fingerprint associated with the...
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . | Contains the types generated from the schema SourceTransactionAchCreditTransferData module StripeAPI.Types.SourceTransactionAchCreditTransferData where import qualified Control.Monad....
dfe63485428524ad86ed2180312aa5d93ba103758a53f63ab4eceb068ba1f9de
lachenmayer/arrowsmith
CrawlProject.hs
# LANGUAGE FlexibleContexts # module CrawlProject where import qualified Data.Map as Map import qualified Elm.Compiler.Module as Module import TheMasterPlan ( ModuleID(ModuleID), PackageID, Location(Location) , PackageSummary(..), PackageData(..) , ProjectSummary(..), ProjectData(..) ) canonicalizeP...
null
https://raw.githubusercontent.com/lachenmayer/arrowsmith/34b6bdeddddb2d8b9c6f41002e87ec65ce8a701a/elm-make/src/CrawlProject.hs
haskell
# LANGUAGE FlexibleContexts # module CrawlProject where import qualified Data.Map as Map import qualified Elm.Compiler.Module as Module import TheMasterPlan ( ModuleID(ModuleID), PackageID, Location(Location) , PackageSummary(..), PackageData(..) , ProjectSummary(..), ProjectData(..) ) canonicalizeP...
7d5795ea57e82309b60c817e7744b70705debed3d24e540da3f4acd531b90609
fgalassi/cs61a-sp11
3.48.scm
; ==== SERIALIZER CODE (define (make-serializer) (let ((mutex (make-mutex))) (lambda (p) (define (serialized-p . args) (mutex 'acquire) (let ((val (apply p args))) (mutex 'release) val)) serialized-p))) (define (make-mutex) (let ((cell (list false))) ...
null
https://raw.githubusercontent.com/fgalassi/cs61a-sp11/66df3b54b03ee27f368c716ae314fd7ed85c4dba/homework/3.48.scm
scheme
==== SERIALIZER CODE just an emulation ===== SERIALIZED EXCHANGE The deadlock problem is resolved because every exchange tries to lock the same sequence locked so the other are prevented from locking any other account.
(define (make-serializer) (let ((mutex (make-mutex))) (lambda (p) (define (serialized-p . args) (mutex 'acquire) (let ((val (apply p args))) (mutex 'release) val)) serialized-p))) (define (make-mutex) (let ((cell (list false))) (define (the-mutex ...
00d5538ca5707557e3898c9cf91d707d652447c34faf621b64de1e7bda72ea34
emqx/emqx
emqx_gateway_frame.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_gateway/src/bhvrs/emqx_gateway_frame.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @doc The Gateway frame behavior -module(emqx_gateway_frame). -type parse_state() :: map(). -...
d30d07647dcec96151927a9eec0d5729536aa8df734b8eb1ebbda69e0a4e9ff8
bos/rwh
GlobRegex.hs
{-- snippet type --} -- file: GlobRegex.hs module GlobRegex ( globToRegex , matchesGlob ) where import Text.Regex.Posix ((=~)) globToRegex :: String -> String {-- /snippet type --} {-- snippet rooted --} globToRegex cs = '^' : globToRegex' cs ++ "$" {-- /snippet rooted --} {-- snippet asterisk --...
null
https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch09/GlobRegex.hs
haskell
- snippet type - file: GlobRegex.hs - /snippet type - - snippet rooted - - /snippet rooted - - snippet asterisk - - /snippet asterisk - {-- snippet last - - /snippet last - - snippet escape - - /snippet escape - - snippet charClass - - /snippet charClass - - snippet matchesGlob - - /snippet matchesGlob -
module GlobRegex ( globToRegex , matchesGlob ) where import Text.Regex.Posix ((=~)) globToRegex :: String -> String globToRegex cs = '^' : globToRegex' cs ++ "$" globToRegex' :: String -> String globToRegex' "" = "" globToRegex' ('*':cs) = ".*" ++ globToRegex' cs globToRegex' ('?':cs) = '.' : g...
d84d9a7c3fec7189808828a07f44149d719e07c14cc7c2206b1a1a61a9fb891b
seagreen/unison-code-explorer
Print.hs
module UCE.Code.Print ( printDoc, printTerm, printType, debugTerm, ) where import qualified Data.Map as Map import qualified Data.Sequence as Seq import qualified Data.Set as Set import qualified Data.Text as Text import qualified UCE.Code.DisplayDoc as DisplayDoc import UCE.Prelude import qualified Un...
null
https://raw.githubusercontent.com/seagreen/unison-code-explorer/9183f7ed4ee5d72a464ed5e3a041cd4733ccd353/src/UCE/Code/Print.hs
haskell
if the term already has an annotation, leave it alone @[include ] mTerm <- getTermWithTypeAnnotation codebase id case mTerm of Nothing -> panic (show (name, id)) Just term -> pret = showTermSource referent = do pure ( AnnotatedText ( Seq.singleton ( " term source " , Nothing ) ) ) prettyBindi...
module UCE.Code.Print ( printDoc, printTerm, printType, debugTerm, ) where import qualified Data.Map as Map import qualified Data.Sequence as Seq import qualified Data.Set as Set import qualified Data.Text as Text import qualified UCE.Code.DisplayDoc as DisplayDoc import UCE.Prelude import qualified Un...
c8cae88d47dae34561464f3b5fd499e82c0446a07531f3e9922653dd6f0e5cb7
CryptoKami/cryptokami-core
Main.hs
module Main ( main ) where import Universum import Crypto.Random (MonadRandom) import Data.ByteString.Base58 (bitcoinAlphabet, encodeBase58) import qualified Data.List as L import qualified Data.Text as T import Formatting (build, sformat, stext, string, (%)) impo...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/tools/src/keygen/Main.hs
haskell
-------------------------------------------------------------------------- Helpers -------------------------------------------------------------------------- -------------------------------------------------------------------------- Commands -------------------------------------------------------------------------- -...
module Main ( main ) where import Universum import Crypto.Random (MonadRandom) import Data.ByteString.Base58 (bitcoinAlphabet, encodeBase58) import qualified Data.List as L import qualified Data.Text as T import Formatting (build, sformat, stext, string, (%)) impo...
ec1db6d2e8e8b997c9b5e3119fef320ae2676bc68680ed9c38768a9eaa4e53d5
ideas-edu/ideas
Abstract.hs
# LANGUAGE TypeFamilies , RankNTypes # ----------------------------------------------------------------------------- Copyright 2019 , Ideas project team . This file is distributed under the terms of the Apache License 2.0 . For more information , see the files " LICENSE.txt " and " NOTICE.txt " , which are i...
null
https://raw.githubusercontent.com/ideas-edu/ideas/f84907f92a8c407b7313f99e65a08d2646dc1565/src/Ideas/Common/Strategy/Abstract.hs
haskell
--------------------------------------------------------------------------- --------------------------------------------------------------------------- | Maintainer : Stability : provisional --------------------------------------------------------------------------- * Strategy data type * Labeled ...
# LANGUAGE TypeFamilies , RankNTypes # Copyright 2019 , Ideas project team . This file is distributed under the terms of the Apache License 2.0 . For more information , see the files " LICENSE.txt " and " NOTICE.txt " , which are included in the distribution . Portability : portable ( depends on ghc ) ...
5f9871c2889ad28682417cc4bc2d8e24c2c88d748f5ade1a26a1c4e3b39359a0
amnh/PCG
Dot.hs
----------------------------------------------------------------------------- -- | -- Module : File.Format.Dot Copyright : ( c ) 2015 - 2021 Ward Wheeler -- License : BSD-style -- -- Maintainer : -- Stability : provisional -- Portability : portable -- -------------------------------------------...
null
https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/file-parsers/src/File/Format/Dot.hs
haskell
--------------------------------------------------------------------------- | Module : File.Format.Dot License : BSD-style Maintainer : Stability : provisional Portability : portable --------------------------------------------------------------------------- # LANGUAGE DerivingStrategies # # ...
Copyright : ( c ) 2015 - 2021 Ward Wheeler # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # module File.Format.Dot ( DotGraph , GraphID(..) * * a DOT file , dotStreamParser * * Get useful representations from the DOT file , dotChildMap , dotParentMap , dotNodeSet , dotEdgeS...
0a5705dced177bd9ef75a6d89ac93f3a0b348738d7d814082fc5b66bc3c0e77a
joinr/spork
slowdata.clj
(ns testgraph (:require [spork.cljgraph [flow :as flow] [core :as graph] [search :as search]] [spork.data [searchstate :as searchstate]] [spork.protocols [core :as generic]]) (:import [java.util ArrayList PriorityQueue ArrayDeque...
null
https://raw.githubusercontent.com/joinr/spork/bb80eddadf90bf92745bf5315217e25a99fbf9d6/obe/slowdata.clj
clojure
This is a chunk of data that exposes some flaws in the graph algos. Good test data for netflow stuff. spork.data.digraph.digraph - just return the resulting list. [done] Also, I use ordered maps for the digraph. Another optimization is to eliminate ordered maps and just use {} That lets us use array maps where p...
(ns testgraph (:require [spork.cljgraph [flow :as flow] [core :as graph] [search :as search]] [spork.data [searchstate :as searchstate]] [spork.protocols [core :as generic]]) (:import [java.util ArrayList PriorityQueue ArrayDeque...
0cc68ec6c41b07cc281b97dedf2fb8a8010d339eb397b7a488152466b09f7487
QDelta/fcomp
Def.hs
module Core.Def where import qualified Data.Set as S import Common.Def Core is not strongly typed data CoreExpr = GFnCE Name | GConstrCE Name | LiftedFn Ident | LVarCE Ident | IntCE Int | CTorCE CoreConstr [CoreExpr] -- saturated constructor | AppCE CoreExpr CoreExpr | CaseCE CoreExpr [CoreB...
null
https://raw.githubusercontent.com/QDelta/fcomp/37de2e84e8076549e4d98956782f01eaf832cab8/app/Core/Def.hs
haskell
saturated constructor bind, expression rec binds, expresstion tag, binds, body name, arity, tag name, params, body
module Core.Def where import qualified Data.Set as S import Common.Def Core is not strongly typed data CoreExpr = GFnCE Name | GConstrCE Name | LiftedFn Ident | LVarCE Ident | IntCE Int | AppCE CoreExpr CoreExpr | CaseCE CoreExpr [CoreBranch] | LambdaCE [Ident] CoreExpr deriving (Show) type Cor...
fa05a7ac4ecf93f3a5ee8e5be509621935ddece9411d64c925c5551af0ade0b8
chethan/SICP
Scale.hs
scale [] _ = [] scale (x:xs) value = (x*value):(scale xs value) my_map [] _ _ = [] my_map (x:xs) f value = (f x value):(my_map xs f value) scale_map (x:xs) value = my_map (x:xs) (*) value
null
https://raw.githubusercontent.com/chethan/SICP/ff83adc7e3e89e299c772080d32103f72ecf5dbf/Chapter2/Scale.hs
haskell
scale [] _ = [] scale (x:xs) value = (x*value):(scale xs value) my_map [] _ _ = [] my_map (x:xs) f value = (f x value):(my_map xs f value) scale_map (x:xs) value = my_map (x:xs) (*) value
ba69f5c21e5e7ada44230312c236facc72a0cb652e9c747eaf258636e7964cc5
serras/cat-theory-lambdaconf-wr-2017
Yoneda.hs
# language RankNTypes # module Yoneda where lemma1 :: Functor f => (forall x. (a -> x) -> f x) -> f a lemma1 yo = yo id lemma2 :: Functor f => f a -> (forall x. (a -> x) -> f x) lemma2 fa = \ax -> fmap ax fa on ( a - > ) natFun1 :: (forall x. (a -> x) -> (b -> x)) -> b -> a natFun1 = lemma1 natFun2 :: (b ...
null
https://raw.githubusercontent.com/serras/cat-theory-lambdaconf-wr-2017/106a094536bb819eb84668268ea4c6d2d47f50f7/Yoneda.hs
haskell
# language RankNTypes # module Yoneda where lemma1 :: Functor f => (forall x. (a -> x) -> f x) -> f a lemma1 yo = yo id lemma2 :: Functor f => f a -> (forall x. (a -> x) -> f x) lemma2 fa = \ax -> fmap ax fa on ( a - > ) natFun1 :: (forall x. (a -> x) -> (b -> x)) -> b -> a natFun1 = lemma1 natFun2 :: (b ...
334bf1262a955e1c8bf5b5aba27bcc2efe957ce79d4748798d1ccf2206325881
hipsleek/hipsleek
errctx.ml
open Cformula open Prooftracer open Globals let mkFailCtx_may ?(conseq=None) ln s estate pos = let conseq = match conseq with | None -> (formula_of_heap HFalse pos) | Some f -> f in let fail_ctx = mkFailContext mem_leak in let err_msg = ln^s in mkFailCtx_in (Basic_Reason (mkFailContext err_msg est...
null
https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/errctx.ml
ocaml
open Cformula open Prooftracer open Globals let mkFailCtx_may ?(conseq=None) ln s estate pos = let conseq = match conseq with | None -> (formula_of_heap HFalse pos) | Some f -> f in let fail_ctx = mkFailContext mem_leak in let err_msg = ln^s in mkFailCtx_in (Basic_Reason (mkFailContext err_msg est...
4d345deccf0d6223f0b28705f3e66a26b56a6036a04beedb62b2038c6a4de063
synduce/Synduce
long_lemma_synthesis.ml
* @synduce --no - lifting type list = | Elt of int | Cons of int * list type idx_list = | IElt of int | ICons of int * int * idx_list let rec is_sorted = function | IElt x -> true | ICons (hd, idx, tl) -> aux hd tl and aux prev = function | IElt x -> prev < x | ICons (hd, idx, tl) -> prev < hd && au...
null
https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/benchmarks/failing/long_lemma_synthesis.ml
ocaml
* @synduce --no - lifting type list = | Elt of int | Cons of int * list type idx_list = | IElt of int | ICons of int * int * idx_list let rec is_sorted = function | IElt x -> true | ICons (hd, idx, tl) -> aux hd tl and aux prev = function | IElt x -> prev < x | ICons (hd, idx, tl) -> prev < hd && au...
7f82912fe6759716cad15d010b09e4e16bd4c39e4d57d2620a57ae01c9f4ee3e
erlware/relx
force_nodetool_tests_sup.erl
%%%------------------------------------------------------------------- %% @doc force_nodetool_tests top level supervisor. %% @end %%%------------------------------------------------------------------- -module(force_nodetool_tests_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(SER...
null
https://raw.githubusercontent.com/erlware/relx/16a7972f7679778d9d7f40228b1a20351f1077bd/shelltests/force_nodetool_tests/apps/force_nodetool_tests/src/force_nodetool_tests_sup.erl
erlang
------------------------------------------------------------------- @doc force_nodetool_tests top level supervisor. @end ------------------------------------------------------------------- sup_flags() = #{strategy => strategy(), % optional intensity => non_neg_integer(), % optional optional...
-module(force_nodetool_tests_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(SERVER, ?MODULE). start_link() -> supervisor:start_link({local, ?SERVER}, ?MODULE, []). init([]) -> SupFlags = #{strategy => one_for_all, intensity => 0, period...
e549882664b56bf98a0e11bc5d09fe9a0a3d4f4a78b6260934e2bdd9bd37abf7
manavpatnaik/haskell
1.hs
calcAvg [] = 0 calcAvg l = sum l `div` length l countLessThanAvg [] = 0 countLessThanAvg l = length [x | x <- l, x < calcAvg l] isConcerning l | countLessThanAvg l > 2 = "Needs improvement" | otherwise = "Its all fine" main = do print(calcAvg [1,2,3,4,5]) print(isConcerning [1,2,3,4,5])
null
https://raw.githubusercontent.com/manavpatnaik/haskell/bb4d09c75a2894469d870408be5b0051a225366c/practice-set-3-miscellaneous/5_lists/1.hs
haskell
calcAvg [] = 0 calcAvg l = sum l `div` length l countLessThanAvg [] = 0 countLessThanAvg l = length [x | x <- l, x < calcAvg l] isConcerning l | countLessThanAvg l > 2 = "Needs improvement" | otherwise = "Its all fine" main = do print(calcAvg [1,2,3,4,5]) print(isConcerning [1,2,3,4,5])
a6e79841f3d4e350b33275d24e0459c471deb8ca66f36d0a33b043983d932d6d
codingteam/Hyperspace
simulation.clj
(ns hyperspace.library.simulation (:use clojure.tools.logging [hyperspace.library geometry gravity]) (:require [hyperspace.library.world :as world])) (def simulation-step 10) (def max-cycle 1000000) (defn kill-player "Kills the specified player." [{players :players :as world} player] (debug "...
null
https://raw.githubusercontent.com/codingteam/Hyperspace/b04ec588968f3a9c94b2992010a3a737afbe7eb5/core/src/main/clojure/hyperspace/library/simulation.clj
clojure
Sometimes game will pass players with wrong states here (dead vs alive), so just compare positions here.
(ns hyperspace.library.simulation (:use clojure.tools.logging [hyperspace.library geometry gravity]) (:require [hyperspace.library.world :as world])) (def simulation-step 10) (def max-cycle 1000000) (defn kill-player "Kills the specified player." [{players :players :as world} player] (debug "...
2be938dbc55d9249512e77dcbd7917cb9632dd65344177040fd9eb3b3b15ffdd
korya/efuns
top_window.ml
(***********************************************************************) (* *) xlib for (* *) Fabrice Le Fessant , projet Para / SOR , INRIA Rocq...
null
https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/efuns/top_window.ml
ocaml
********************************************************************* ...
xlib for Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt Copyright 1998 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . open Options open Xtypes open WX_types open Efuns open Windo...
b97aead555e905d9e60293f746cea44643904e122ba2432aa64ddc755072796e
shop-planner/shop3
p10.lisp
(IN-PACKAGE :SHOP-USER) (DEFPROBLEM STRIPS-SAT-X-1 ((SATELLITE SATELLITE0) (INSTRUMENT INSTRUMENT0) (INSTRUMENT INSTRUMENT1) (SATELLITE SATELLITE1) (INSTRUMENT INSTRUMENT2) (INSTRUMENT INSTRUMENT3) (SATELLITE SATELLITE2) (INSTRUMENT INSTRUMENT4) (INSTRUMENT INSTRUMENT5) (SATELLITE SATELLITE3) (INSTRUMENT I...
null
https://raw.githubusercontent.com/shop-planner/shop3/ba429cf91a575e88f28b7f0e89065de7b4d666a6/shop3/examples/satellite/strips/p10.lisp
lisp
(IN-PACKAGE :SHOP-USER) (DEFPROBLEM STRIPS-SAT-X-1 ((SATELLITE SATELLITE0) (INSTRUMENT INSTRUMENT0) (INSTRUMENT INSTRUMENT1) (SATELLITE SATELLITE1) (INSTRUMENT INSTRUMENT2) (INSTRUMENT INSTRUMENT3) (SATELLITE SATELLITE2) (INSTRUMENT INSTRUMENT4) (INSTRUMENT INSTRUMENT5) (SATELLITE SATELLITE3) (INSTRUMENT I...
8bb2ee80350fb2c3dc98de9e18bede8e4b6b9d8d9919b70619b82fdaff075edb
threatgrid/ctim
casebook.cljc
(ns ctim.schemas.casebook (:require [ctim.schemas.bundle :as bun] [ctim.schemas.common :as c] #?(:clj [flanders.core :as f :refer [def-entity-type def-map-type def-eq]] :cljs [flanders.core :as f :refer-macros [def-entity-type def-map-type def-eq]]))) (def type-identifier "casebook") (def-eq Caseboo...
null
https://raw.githubusercontent.com/threatgrid/ctim/2ecae70682e69495cc3a12fd58a474d4ea57ae9c/src/ctim/schemas/casebook.cljc
clojure
(ns ctim.schemas.casebook (:require [ctim.schemas.bundle :as bun] [ctim.schemas.common :as c] #?(:clj [flanders.core :as f :refer [def-entity-type def-map-type def-eq]] :cljs [flanders.core :as f :refer-macros [def-entity-type def-map-type def-eq]]))) (def type-identifier "casebook") (def-eq Caseboo...