_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
2f41f6003eb92a4b43d6dc10c0cbfc9714d02e71eade7b450e8d864d0c9b4bdb
pedestal/pedestal
project.clj
Copyright 2013 Relevance , Inc. Copyright 2014 - 2022 Cognitect , Inc. ; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( ) ; 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 ...
null
https://raw.githubusercontent.com/pedestal/pedestal/53bfe70143a22cdfd2f0d183023334a199c9e9a2/samples/helloworld-metrics/project.clj
clojure
The use and distribution terms for this software are covered by the 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. [...
Copyright 2013 Relevance , Inc. Copyright 2014 - 2022 Cognitect , Inc. Eclipse Public License 1.0 ( ) (defproject helloworld-metrics "0.5.1" :description "Demonstration of metrics support" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure...
55d1f39175d4172e7f1b6b56c439975477090fd5dcc45066fd37ee584cab23a0
ocramz/twelve
Build.hs
{-# OPTIONS_GHC -Wno-unused-imports #-} module CLI.Build (cliBuild) where -- directory import System.Directory (makeAbsolute, listDirectory) -- filepath import System.FilePath.Posix (takeExtension, (</>), replaceDirectory) import Data.Text (Text) import qualified Data.Text.Lazy as TL (Text) import Data.Text.Lazy.IO (...
null
https://raw.githubusercontent.com/ocramz/twelve/bf47a2e329ad905125a4bd97382ee5af583dda38/src/CLI/Build.hs
haskell
# OPTIONS_GHC -Wno-unused-imports # directory filepath ^ file to be processed ^ directory path of template files loadModelFromDir dp = do let fpaths = map (dp </>) $ filter (\fp -> takeExtension fp == ".yml") fps loadModel fpaths buildTest cfg@(CD din _) fp = do fpsIn <- htmlPaths din loadAndProcess c...
module CLI.Build (cliBuild) where import System.Directory (makeAbsolute, listDirectory) import System.FilePath.Posix (takeExtension, (</>), replaceDirectory) import Data.Text (Text) import qualified Data.Text.Lazy as TL (Text) import Data.Text.Lazy.IO (readFile, writeFile) import Text.Html (loadAndProcess) import C...
44ef0cd5cc21d08c0ce269fa1360d71b6b64c92cbc11cbd4c71a9e9254d9b699
mhuebert/re-view
mdc.cljs
(ns re-view.material.mdc (:require [re-view.core :as v] [re-view.view-spec :as s] [goog.dom.classes :as classes] [goog.object :as gobj] [re-view.material.util :as util] ["@material/animation" :refer [getCorrectEventName]] ["@material/drawer/util...
null
https://raw.githubusercontent.com/mhuebert/re-view/ba38cd09b78b3c6db6a2983f3e2cf1bd6294564f/material/src/re_view/material/mdc.cljs
clojure
Environment Functions to be called from a component's lifecycle methods Handling of adapter state. Adapters are stored as plain javascript properties of re-view components. as properties on itself. `:view/state` atom. Property names and state keys should be predictably named after the official Ada...
(ns re-view.material.mdc (:require [re-view.core :as v] [re-view.view-spec :as s] [goog.dom.classes :as classes] [goog.object :as gobj] [re-view.material.util :as util] ["@material/animation" :refer [getCorrectEventName]] ["@material/drawer/util...
bc1b09958ff24f9725fb2a63bcb648fa755ac38a970eb9554c3508f3fa43e0e8
godfat/sandbox
002.hs
Problem 2 19 October 2001 Each new term in the Fibonacci sequence is generated by adding the previous two terms . By starting with 1 and 2 , the first 10 terms will be : 1 , 2 , 3 , 5 , 8 , 13 , 21 , 34 , 55 , 89 , ... By considering the terms in the Fibonacci sequence whose values do not exceed four...
null
https://raw.githubusercontent.com/godfat/sandbox/eb6294238f92543339adfdfb4ba88586ba0e82b8/haskell/projecteuler.net/002.hs
haskell
Problem 2 19 October 2001 Each new term in the Fibonacci sequence is generated by adding the previous two terms . By starting with 1 and 2 , the first 10 terms will be : 1 , 2 , 3 , 5 , 8 , 13 , 21 , 34 , 55 , 89 , ... By considering the terms in the Fibonacci sequence whose values do not exceed four...
59be3580cb37a3dddeb0e28f6c8e3de36d013aa49d2f8739567570d1e68be37c
cryptosense/pkcs11
example_digest.ml
let mechanisms = [ P11.Mechanism.CKM_MD5 ; P11.Mechanism.CKM_SHA_1 ; P11.Mechanism.CKM_SHA256 ; P11.Mechanism.CKM_SHA384 ; P11.Mechanism.CKM_SHA512 ] let print_digest driver session plaintext mechanism = let digest = P11_driver.digest driver session mechanism plaintext in let (`Hex h) = Hex.of_string dig...
null
https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/test/examples/example_digest.ml
ocaml
let mechanisms = [ P11.Mechanism.CKM_MD5 ; P11.Mechanism.CKM_SHA_1 ; P11.Mechanism.CKM_SHA256 ; P11.Mechanism.CKM_SHA384 ; P11.Mechanism.CKM_SHA512 ] let print_digest driver session plaintext mechanism = let digest = P11_driver.digest driver session mechanism plaintext in let (`Hex h) = Hex.of_string dig...
49f5926f271b625d6355518c57df286af98b155c01938c8710fc0e2aa1a0011e
xapix-io/matchete
poker_hand.cljc
(ns example.poker-hand (:require [matchete.core :as m])) ;; == helpers == (defn card-comparator [card-a card-b] (if (some m/pattern? [card-a card-b]) 1 (compare card-a card-b))) ;; === rules === (def rules {'%plus (fn [s m] (fn [matches _ data] (cond (and (con...
null
https://raw.githubusercontent.com/xapix-io/matchete/ed1dee189e123272c72ece6615f31ec14ddf87e6/dev/example/poker_hand.cljc
clojure
== helpers == === rules === =============
(ns example.poker-hand (:require [matchete.core :as m])) (defn card-comparator [card-a card-b] (if (some m/pattern? [card-a card-b]) 1 (compare card-a card-b))) (def rules {'%plus (fn [s m] (fn [matches _ data] (cond (and (contains? matches s) ...
63a45d004b905b44de34da1684ad95eea3da613280dc7d2aa6ebc8d358ade0ed
tip-org/tools
Passes.hs
-- | Passes module Tip.Passes ( -- * Running passes in the Fresh monad freshPass -- * Simplifications , simplifyTheory, gently, aggressively, SimplifyOpts(..) , removeNewtype , uncurryTheory -- * Simplifying conjectures , module Tip.Pass.Conjecture , module Tip.Pass.Concretise -- * Changing s...
null
https://raw.githubusercontent.com/tip-org/tools/34350072587bd29157d18331eb895a1b2819555f/tip-lib/src/Tip/Passes.hs
haskell
| Passes * Running passes in the Fresh monad * Simplifications * Simplifying conjectures * Changing status of conjectures * Boolean builtins * Match expressions * Duplicated functions * Lambda and let lifting * Function definitions * Data types * Induction * Miscellaneous * Building pass pipelines | The ...
module Tip.Passes ( freshPass , simplifyTheory, gently, aggressively, SimplifyOpts(..) , removeNewtype , uncurryTheory , module Tip.Pass.Conjecture , module Tip.Pass.Concretise , makeConjecture , selectConjecture , provedConjecture , deleteConjecture , ifToBoolOp , boolOpToIf , theoryB...
e975865c29c28b5f950bc9c2e0d2b3e30b3fbb42215095108fb614015e12b4eb
slyrus/clem
metaclasses.lisp
(in-package :clem) Taken from KMR 's clsql package (defun remove-keyword-arg (arglist akey) (let ((mylist arglist) (newlist ())) (labels ((pop-arg (alist) (let ((arg (pop alist)) (val (pop alist))) (unless (equal arg akey) (setf newlist (append (list arg val) newlist))) (when alist ...
null
https://raw.githubusercontent.com/slyrus/clem/5eb055bb3f45840b24fd44825b975aa36bd6d97c/src/metaclasses.lisp
lisp
Taken from util so I don't need to include it here NOTE: don't use accessors here as they will return a list! FIXME! This is a hack to get around the fact that if we have a say, integer-matrix class, we can't make certain declarations. this needs to be fixed and hopefully removed be something like min-allowed-va...
(in-package :clem) Taken from KMR 's clsql package (defun remove-keyword-arg (arglist akey) (let ((mylist arglist) (newlist ())) (labels ((pop-arg (alist) (let ((arg (pop alist)) (val (pop alist))) (unless (equal arg akey) (setf newlist (append (list arg val) newlist))) (when alist ...
1f2892aeab5151f4da70e3a66ae2e19bde022c79a422ad80bc17d4a764e23196
flipstone/haskell-for-beginners
1_getting_our_feet_wet_with_maybe.hs
-- Define the applyMaybe function so we can apply -- functions that produce Maybe values to Maybe -- values -- applyMaybe :: Maybe a -> (a -> Maybe b) -> Maybe b applyMaybe = undefined Define a function that divides an integer by 2 -- if it is even, but produces Nothing if given an -- odd integer. -- byTwo :: Intege...
null
https://raw.githubusercontent.com/flipstone/haskell-for-beginners/e586a1f3ef08f21d5181171fe7a7b27057391f0b/problems/chapter_12/1_getting_our_feet_wet_with_maybe.hs
haskell
Define the applyMaybe function so we can apply functions that produce Maybe values to Maybe values if it is even, but produces Nothing if given an odd integer.
applyMaybe :: Maybe a -> (a -> Maybe b) -> Maybe b applyMaybe = undefined Define a function that divides an integer by 2 byTwo :: Integer -> Maybe Integer byTwo = undefined Try out your byTwo function on 7 and 8 sevenByTwo = undefined eightByTwo = undefined Using your byTwo function and applyMaybe , define a ...
1f6fc79f27cadcf8dafcd7575ba1bab2073fddd662f78642dd1fceea0eccad13
kuberlog/holon
tree-cybernetics.lisp
(ql:quickload :clack) (in-package :holon) (import :holon.daemons) (defparameter *tree-cybernetics* (let (( tree-inc (make-instance 'Corporation))) ;; initialize tree cybernetics here (setf (slot-value tree-inc 'share-holders) 'kuberlog) ...
null
https://raw.githubusercontent.com/kuberlog/holon/2c004239f82fce4aa6ee6512df6fc4dd391139f3/lisp/tree-cybernetics.lisp
lisp
initialize tree cybernetics here
(ql:quickload :clack) (in-package :holon) (import :holon.daemons) (defparameter *tree-cybernetics* (let (( tree-inc (make-instance 'Corporation))) (setf (slot-value tree-inc 'share-holders) 'kuberlog) (setf (slot-value tree-inc 'urls) '()) ...
4146265f1926c613f0e150d80a2d7184c692695a50c847c70b0e675dea9674d6
chrisdone/ircbrowse
XML.hs
module Snap.App.XML where import Text.XML.Light import Snap.App import qualified Data.Text as T -- | Output the given XML element. outputXML :: Element -> Controller c s () outputXML = writeText . T.pack . showElement
null
https://raw.githubusercontent.com/chrisdone/ircbrowse/d956aaf185500792224b6b0c209eb67c179322a4/upstream/snap-app/src/Snap/App/XML.hs
haskell
| Output the given XML element.
module Snap.App.XML where import Text.XML.Light import Snap.App import qualified Data.Text as T outputXML :: Element -> Controller c s () outputXML = writeText . T.pack . showElement
f5eae9a30bf52546b722a6f806c9b5f825ed83e722a535320ece721dd62f2b16
Shirakumo/speechless
package.lisp
(defpackage #:org.shirakumo.fraf.speechless.components (:use #:cl) (:shadow #:go #:speed #:setf #:eval #:map) (:local-nicknames (#:markless #:org.shirakumo.markless) (#:components #:org.shirakumo.markless.components)) (:export #:manual-newline #:jump #:placeholder #:form #:emote #:condit...
null
https://raw.githubusercontent.com/Shirakumo/speechless/86359b6592e8ff0bb2d4baff0bdeeac0d46c2bcf/package.lisp
lisp
diff.lisp instructions.lisp compiler.lisp optimizers.lisp printer.lisp vm.lisp
(defpackage #:org.shirakumo.fraf.speechless.components (:use #:cl) (:shadow #:go #:speed #:setf #:eval #:map) (:local-nicknames (#:markless #:org.shirakumo.markless) (#:components #:org.shirakumo.markless.components)) (:export #:manual-newline #:jump #:placeholder #:form #:emote #:condit...
1ae6ca87eca07da9d52affd9ce8aed2adc24e1432844996d28a35bd62e2259a8
scicloj/clojisr-examples
violin.clj
(ns clojisr-examples.graph-gallery.violin (:require [notespace.v2.note :as note :refer [note note-void note-md note-as-md note-hiccup note-as-hiccup]] [clojisr.v1.r :as r])) (def target-path (notespace.v2.note/ns->out-dir *ns*)) (note-md "# [R Graph Gallery](-graph-gallery.com/) - [Violin](...
null
https://raw.githubusercontent.com/scicloj/clojisr-examples/691c878b5916b8060d37a85af33fd338d353dfbf/src/clojisr_examples/graph_gallery/violin.clj
clojure
(ns clojisr-examples.graph-gallery.violin (:require [notespace.v2.note :as note :refer [note note-void note-md note-as-md note-hiccup note-as-hiccup]] [clojisr.v1.r :as r])) (def target-path (notespace.v2.note/ns->out-dir *ns*)) (note-md "# [R Graph Gallery](-graph-gallery.com/) - [Violin](...
923a639168766dbea45a6f109aa01d3f051d06dd952a8060d79afea5344ab3f3
geocaml/ISO3166
os.ml
let with_file path fn = let ic = open_in path in try fn ic with _ -> close_in ic let with_lines path fn = with_file path @@ fun ic -> let rec aux () = try fn (input_line ic); aux () with End_of_file -> () in aux () let get_lines path = let lines = ref [] in let run () = with_lines ...
null
https://raw.githubusercontent.com/geocaml/ISO3166/1603a8ee8fe9b6c9476560bd9877de33842fb960/src/gen/os.ml
ocaml
let with_file path fn = let ic = open_in path in try fn ic with _ -> close_in ic let with_lines path fn = with_file path @@ fun ic -> let rec aux () = try fn (input_line ic); aux () with End_of_file -> () in aux () let get_lines path = let lines = ref [] in let run () = with_lines ...
7d14065608bf2e27a7dddb976192283af1c1bfb7c2515031be10701d626245e0
McCLIM/McCLIM
medium.lisp
(in-package #:clim-tests) (def-suite* :mcclim.drawing :in :mcclim) (test make-text-style.cache "Test caching behavior of `make-text-style'." (let ((climi::*text-style-hash-table* (make-hash-table :test #'eql))) (let ((styles '())) (flet ((test-style (family face size &option...
null
https://raw.githubusercontent.com/McCLIM/McCLIM/7c890f1ac79f0c6f36866c47af89398e2f05b343/Tests/drawing/medium.lisp
lisp
(in-package #:clim-tests) (def-suite* :mcclim.drawing :in :mcclim) (test make-text-style.cache "Test caching behavior of `make-text-style'." (let ((climi::*text-style-hash-table* (make-hash-table :test #'eql))) (let ((styles '())) (flet ((test-style (family face size &option...
901fa977a93a7727b92988f819a0a956948dde6749aa6da7c064a31f6156cee0
fortytools/holumbus
Utility.hs
-- ---------------------------------------------------------------------------- | Module : Holumbus . Utility Copyright : Copyright ( C ) 2008 License : MIT Maintainer : ( ) Stability : experimental Portability : portable Version : 0.1 Small utility functions...
null
https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/searchengine/source/Holumbus/Utility.hs
haskell
---------------------------------------------------------------------------- ---------------------------------------------------------------------------- import Data.Maybe ------------------------------------------------------------ | Split a string into seperate strings at a specific character sequence....
| Module : Holumbus . Utility Copyright : Copyright ( C ) 2008 License : MIT Maintainer : ( ) Stability : experimental Portability : portable Version : 0.1 Small utility functions which are probably useful somewhere else , too . Module : Holumbus.Uti...
b11e19365b47bef92f74d4bed38612369a76a382a4d3bb9bec1215fe601d79b1
umber-lang/umber
name_bindings.ml
open Import open Names module Name_entry = struct module Type_source = struct module T = struct type t = | Placeholder | Let_inferred | Val_declared | Extern_declared [@@deriving compare, enumerate, equal, sexp, variants] end include T include Comparable.M...
null
https://raw.githubusercontent.com/umber-lang/umber/43339b87e10a704bffea16341f6285bc3cba058e/src/name_bindings.ml
ocaml
TODO: probably just make 'path the variable so we don't have to put unit for module paths Try looking at the current scope, then travel up to parent scopes to find a matching name Recursively check the parent Allow type names like [List.List] to be found as just [List] TODO: Ideally we should have consistent b...
open Import open Names module Name_entry = struct module Type_source = struct module T = struct type t = | Placeholder | Let_inferred | Val_declared | Extern_declared [@@deriving compare, enumerate, equal, sexp, variants] end include T include Comparable.M...
72586df3bcb3e0e044422d1b9237f857f30c35e422196b47b045a426542387c9
Holmusk/three-layer
Session.hs
module Lib.Core.Session ( Sessions , Session (..) , SessionExpiry (..) , sessionExpired , mkNewSession ) where import Data.Time.Clock (NominalDiffTime, UTCTime, addUTCTime, getCurrentTime) import Lib.Core.Id (AnyId) type Sessions = MVar (HashMap AnyId Session) newtype Sess...
null
https://raw.githubusercontent.com/Holmusk/three-layer/1b58ec102f206681b66a584ca4a7d18f2eb4ef81/src/Lib/Core/Session.hs
haskell
| Checks whether session expired within given interval relative to current time | Created a new 'Session'.
module Lib.Core.Session ( Sessions , Session (..) , SessionExpiry (..) , sessionExpired , mkNewSession ) where import Data.Time.Clock (NominalDiffTime, UTCTime, addUTCTime, getCurrentTime) import Lib.Core.Id (AnyId) type Sessions = MVar (HashMap AnyId Session) newtype Sess...
5748e025389fe5601926e0ced16f14c358f01f70757a6a00de25ff79e68f214a
duckyuck/flare
main.cljs
(ns flare.main)
null
https://raw.githubusercontent.com/duckyuck/flare/4d983fda75fab718b5ec0bf4e3f8ab4bfa1a2080/src/flare/main.cljs
clojure
(ns flare.main)
7d9e2f6a363f536e1d828151d508375cf3cb79628304c40367a3c51affa41a8d
xvw/preface
indexed_comonad.ml
open QCheck2 module Suite (R : Model.COVARIANT_2) (F : Preface_specs.INDEXED_COMONAD with type ('a, 'index) t = ('a, 'index) R.t) (A : Model.T0) (B : Model.T0) (C : Model.T0) (D : Model.T0) (Index : Model.T0) = struct module Functor = Indexed_functor.Suite (R) (F) (A) (B) (C) (...
null
https://raw.githubusercontent.com/xvw/preface/51892a7ce2ddfef69de963265da3617968cdb7ad/lib/preface_qcheck/indexed_comonad.ml
ocaml
open QCheck2 module Suite (R : Model.COVARIANT_2) (F : Preface_specs.INDEXED_COMONAD with type ('a, 'index) t = ('a, 'index) R.t) (A : Model.T0) (B : Model.T0) (C : Model.T0) (D : Model.T0) (Index : Model.T0) = struct module Functor = Indexed_functor.Suite (R) (F) (A) (B) (C) (...
5b37b34e1a1d9b6c29b495d251ede4b2c752467ca8b01a47cd36b77cbc76eff1
NickSeagull/drahko
Syntax.hs
module Drahko.Syntax where import Relude newtype Name = Name {unName :: Text} deriving (Eq, Show, IsString, Generic, Ord, Hashable) data BinaryOperator = Add | Subtract | Multiply | Divide | Equal | LessThan | LessThanEqual | GreaterThan | GreaterThanEqual | Concat deriving (Eq, Show) data L...
null
https://raw.githubusercontent.com/NickSeagull/drahko/cd84ee4b25f0d51900c248dfdc225370bfe19728/codegen/src/Drahko/Syntax.hs
haskell
module Drahko.Syntax where import Relude newtype Name = Name {unName :: Text} deriving (Eq, Show, IsString, Generic, Ord, Hashable) data BinaryOperator = Add | Subtract | Multiply | Divide | Equal | LessThan | LessThanEqual | GreaterThan | GreaterThanEqual | Concat deriving (Eq, Show) data L...
2e58cb208ff6622437f650cdb7db9f67b4bbccb44aea02d0cf1f231d9b25fbbe
tek/ribosome
Codes.hs
module Ribosome.Menu.Prompt.Data.Codes where import Control.Exception (evaluate) import Data.Map.Strict ((!?)) import qualified Data.Map.Strict as Map (fromList) import qualified Data.Text as Text (singleton) specialCodes :: Map Text Text specialCodes = Map.fromList [ ("\x80\xffX", "<c-@>"), ("\65533kb", "<...
null
https://raw.githubusercontent.com/tek/ribosome/a676b4f0085916777bfdacdcc761f82d933edb80/packages/menu/lib/Ribosome/Menu/Prompt/Data/Codes.hs
haskell
("\x80\xfd", "s-down"),
module Ribosome.Menu.Prompt.Data.Codes where import Control.Exception (evaluate) import Data.Map.Strict ((!?)) import qualified Data.Map.Strict as Map (fromList) import qualified Data.Text as Text (singleton) specialCodes :: Map Text Text specialCodes = Map.fromList [ ("\x80\xffX", "<c-@>"), ("\65533kb", "<...
9fa63d32ddeb5fd44a322faa66c736a934e8521d7f9581dc237188979e4a872f
hasktorch/hasktorch
Tensor.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE RankNTypes #-} # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFa...
null
https://raw.githubusercontent.com/hasktorch/hasktorch/a31ef707927cd70ea9283e3b10f2270ef3e2935a/hasktorch/src/Torch/Tensor.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE TypeSynonymInstances # do not use the constructor ------------------------------------------------------------------------------ Basic tensor properties ------------------------------------------------------------------------------ | Returns the total number of elements in the inpu...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE TypeOper...
3efeb1138b6935b1180d2f42cce9f737be9c827d9ca247cde2141788f0f0f666
emqx/emqx
emqx_banned_SUITE.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2018 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx/test/emqx_banned_SUITE.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2018 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_banned_SUITE). -compile(export_all). -compile(nowarn_export_all). -include_lib("e...
2aa5412d0230da4645edc8bee328f28fe330abb5686f6ac89140f963c39ac34f
janestreet/hardcaml
mangler.mli
(** Map a set of names to a set of unique names. *) open Base (** A mangler is a mapping from strings to the next available integer which should be added to the name to make it unique. *) type t [@@deriving sexp_of] (** Create a new mangler. *) val create : case_sensitive:bool -> t val add_identifier : t -> str...
null
https://raw.githubusercontent.com/janestreet/hardcaml/4126f65f39048fef5853ba9b8d766143f678a9e4/src/mangler.mli
ocaml
* Map a set of names to a set of unique names. * A mangler is a mapping from strings to the next available integer which should be added to the name to make it unique. * Create a new mangler. * Add a list of identifiers to the mangler table. Raises if an identifier is already in the table. * Test if the st...
open Base type t [@@deriving sexp_of] val create : case_sensitive:bool -> t val add_identifier : t -> string -> [ `Ok | `Duplicate ] val add_identifiers_exn : t -> string list -> unit val find_index : t -> string -> int option val mangle : t -> string -> string
c978bf59691235da2a2702720b3f01077f28b4c89be90dfd1d1e8a11b087957a
gregcman/lisp-in-small-pieces
chap7d-unused.lisp
#+nil (define-class primitive Object (address)) #+nil (define-class continuation Object (stack)) #+nil (progn (defun CALL0 (address) (INVOKE0 address)) (defun CALL1 (address m1) (append m1 (INVOKE1 address))) (defun CALL2 (address m1 m2) (append m1 (PUSH-VALUE) m2 (POP-ARG1) ...
null
https://raw.githubusercontent.com/gregcman/lisp-in-small-pieces/71a89aa2108dc1122a60337177ea75c5170e6828/unused/chap7d-unused.lisp
lisp
immediate value The same one with other unary primitives.
#+nil (define-class primitive Object (address)) #+nil (define-class continuation Object (stack)) #+nil (progn (defun CALL0 (address) (INVOKE0 address)) (defun CALL1 (address m1) (append m1 (INVOKE1 address))) (defun CALL2 (address m1 m2) (append m1 (PUSH-VALUE) m2 (POP-ARG1) ...
faa8cf35b738003b546914c90b1a4b58a5e0ee975e54c5480137cd1d77d67e4d
facebookarchive/pfff
lib_unparser.mli
type elt = | OrigElt of string | Removed of string | Added of string | Esthet2 of (Parse_info.esthet * string) (* helpers *) val elts_of_any: kind_and_info_of_tok:('tok -> Parse_info.token_kind * Parse_info.info) -> 'tok list -> elt list (* debugging *) val vof_elt: elt -> Ocaml.v (* heuristics *) val...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/matcher/lib_unparser.mli
ocaml
helpers debugging heuristics main entry point
type elt = | OrigElt of string | Removed of string | Added of string | Esthet2 of (Parse_info.esthet * string) val elts_of_any: kind_and_info_of_tok:('tok -> Parse_info.token_kind * Parse_info.info) -> 'tok list -> elt list val vof_elt: elt -> Ocaml.v val drop_esthet_between_removed: elt list -> elt l...
a5b60c6c51ff20a33377bc49d0cfaa17d08f5790d8f6e92c5537941d2e50831f
marick/fp-oo
t_modules.clj
(ns sources.t-modules (:use midje.sweet)) (load-file "sources/modules.clj") (fact "Anything" (let [instance (send-to Anything :new)] (send-to instance :class-name ) => 'Anything (send-to instance :class) => Anything) (send-to Anything :class-name) => 'Klass (send-to Anything :class) => Klass (send...
null
https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/test/sources/t_modules.clj
clojure
(ns sources.t-modules (:use midje.sweet)) (load-file "sources/modules.clj") (fact "Anything" (let [instance (send-to Anything :new)] (send-to instance :class-name ) => 'Anything (send-to instance :class) => Anything) (send-to Anything :class-name) => 'Klass (send-to Anything :class) => Klass (send...
27af1c613345f6e62933543b76110942c9c63a9327eaf64e6e62f6e20096d846
metametadata/carry
signals.cljs
(ns app.common.signals (:require [app.blueprint-methods :refer [on-signal]] [cljs.core.match :refer-macros [match]])) (defmethod on-signal nil [_model signal _dispatch-signal _dispatch-action] (match signal :on-start nil :on-stop nil)) (defmethod on-signal (namespace ::_) [_model...
null
https://raw.githubusercontent.com/metametadata/carry/fa5c7cd0d8f1b71edca70330acc97c6245638efb/examples/blueprint-splitting-multimethods-core-match/src/app/common/signals.cljs
clojure
(ns app.common.signals (:require [app.blueprint-methods :refer [on-signal]] [cljs.core.match :refer-macros [match]])) (defmethod on-signal nil [_model signal _dispatch-signal _dispatch-action] (match signal :on-start nil :on-stop nil)) (defmethod on-signal (namespace ::_) [_model...
4f4b1e3a1fb9ec6b0e4f87df573b819d4fddba6969149a90f2cbe41c743211e5
ghc/packages-dph
PData.hs
-- | Parallel array data. -- -- This is an interface onto the internal array types and operators defined -- by the library, and should not normally be used by client programs. module Data.Array.Parallel.PArray.PData ( -- * Parallel array types PArray (..), PData(..), PDatas(..) , length,...
null
https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-lifted-vseg/Data/Array/Parallel/PArray/PData.hs
haskell
| Parallel array data. This is an interface onto the internal array types and operators defined by the library, and should not normally be used by client programs. * Parallel array types * PR (Parallel Representation) * Extra conversions * Nested arrays * Tuple arrays | Convert a list to a PData. | Conve...
module Data.Array.Parallel.PArray.PData PArray (..), PData(..), PDatas(..) , length, takeData , PR (..) , fromListPR , toListPR , module Data.Array.Parallel.PArray.PData.Nested , module Data.Array.Parallel.PArray.PData.Tuple2 , modu...
eeff2199c4b2b96c0e453d2d3070df55a15c51077802aa0a3eaf7f6d4557638c
cojna/iota
IntModBench.hs
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE MagicHash # # LANGUAGE TypeApplications # # LANGUAGE UnboxedTuples # module Data.IntModBench (benchMain) where import Criterion import Data.GaloisField import Data.IntMod import qualified Data.Vector.Unboxed as U import GHC.Exts import System.Random.XoRoShiRo benchM...
null
https://raw.githubusercontent.com/cojna/iota/6d2ad5b71b1b50bca9136d6ed84f80a0b7713d7c/benchmark/Data/IntModBench.hs
haskell
current current
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE MagicHash # # LANGUAGE TypeApplications # # LANGUAGE UnboxedTuples # module Data.IntModBench (benchMain) where import Criterion import Data.GaloisField import Data.IntMod import qualified Data.Vector.Unboxed as U import GHC.Exts import System.Random.XoRoShiRo benchM...
bf4f7f094f47439d3f548573e721025e1d9c9e734a99faa94ee66a46416dc5d9
borodust/bodge-nanovg
x86_64-pc-windows-gnu.lisp
(uiop:define-package :%nanovg (:use)) (uiop:define-package :bodge-nanovg-gl2-bindings~pristine (:use :cl)) (common-lisp:in-package :bodge-nanovg-gl2-bindings~pristine) (cffi:defbitfield (%nanovg::align :unsigned-int) "/home/borodust/devel/repo/bodge-projects/bodge-nanovg/src/lib/nanovg/src/nanovg.h:7...
null
https://raw.githubusercontent.com/borodust/bodge-nanovg/57b72625979dfb5575720eea6ad46e0bb55f71e2/bindings/gl2/x86_64-pc-windows-gnu.lisp
lisp
(uiop:define-package :%nanovg (:use)) (uiop:define-package :bodge-nanovg-gl2-bindings~pristine (:use :cl)) (common-lisp:in-package :bodge-nanovg-gl2-bindings~pristine) (cffi:defbitfield (%nanovg::align :unsigned-int) "/home/borodust/devel/repo/bodge-projects/bodge-nanovg/src/lib/nanovg/src/nanovg.h:7...
9d5680c378b08e69515855b96e6907bfe9ccdd16e2862ff186ec670b6c28c803
arttuka/reagent-material-ui
browse_gallery_sharp.cljs
(ns reagent-mui.icons.browse-gallery-sharp "Imports @mui/icons-material/BrowseGallerySharp as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def browse-gallery-sh...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/c7cd0d7c661ab9df5b0aed0213a6653a9a3f28ea/src/icons/reagent_mui/icons/browse_gallery_sharp.cljs
clojure
(ns reagent-mui.icons.browse-gallery-sharp "Imports @mui/icons-material/BrowseGallerySharp as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def browse-gallery-sh...
49c9f4fb7071321bbd75efcf1a150bf30e65e7013ddd6b00b187754f4b74fc17
carp-lang/Carp
Types.hs
# LANGUAGE DeriveGeneric # module Types ( TypeMappings, Ty (..), showMaybeTy, unifySignatures, replaceTyVars, areUnifiable, typesDeleterFunctionType, typesCopyFunctionType, doesTypeContainTyVarWithName, replaceConflicted, lambdaEnvTy, typeEqIgnoreLifetimes, checkKinds,...
null
https://raw.githubusercontent.com/carp-lang/Carp/da25a255e99223b3d0158edede861b5f93a9f69d/src/Types.hs
haskell
SymPath imports import Debug.Trace | Carp types. the name (possibly a var) of the struct, and it's type parameters the name of a struct the type of types the type of dynamic functions (used in REPL and macros) C literals the type of types of types (the type of TypeTy) | Kinds checking unification checks are s...
# LANGUAGE DeriveGeneric # module Types ( TypeMappings, Ty (..), showMaybeTy, unifySignatures, replaceTyVars, areUnifiable, typesDeleterFunctionType, typesCopyFunctionType, doesTypeContainTyVarWithName, replaceConflicted, lambdaEnvTy, typeEqIgnoreLifetimes, checkKinds,...
9e190f25b445d0e1337e846ecf137f555ae4bcbd08f176fef6e158d35880e216
polyfy/polylith
core.clj
(ns polylith.clj.core.ws-explorer.core (:require [clojure.pprint :as pp] [clojure.string :as str] [puget.printer :as puget] [clojure.walk :as walk] [polylith.clj.core.util.interface.str :as str-util] [polylith.clj.core.util.interface.color :as color])) (def...
null
https://raw.githubusercontent.com/polyfy/polylith/addb82f4f8755625568add75162429e9b18972e1/components/ws-explorer/src/polylith/clj/core/ws_explorer/core.clj
clojure
(ns polylith.clj.core.ws-explorer.core (:require [clojure.pprint :as pp] [clojure.string :as str] [puget.printer :as puget] [clojure.walk :as walk] [polylith.clj.core.util.interface.str :as str-util] [polylith.clj.core.util.interface.color :as color])) (def...
c51c90c8392f5002e6ab42d45254ba1ea3524915118f0bf83eab9dd844bbb3a6
Frozenlock/reagent-modals
modals.cljs
(ns reagent-modals.modals (:require [reagent.core :as r :refer [atom]] [goog.dom :as dom] [goog.events :as events]) (:import [goog.events EventType])) ;;; Make sure to create the modal-window element somewhere in the dom. ;;; Recommended: at the start of the document. (def modal-id "reage...
null
https://raw.githubusercontent.com/Frozenlock/reagent-modals/16e94fe739eb862e27d0427a746a1c608d78dedf/src/reagent_modals/modals.cljs
clojure
Make sure to create the modal-window element somewhere in the dom. Recommended: at the start of the document. [:div] backward compatibility don't erase the content if we are unmounting the modal window, we are probably only reloading the app. we might need to show the modal after an app reload. main function
(ns reagent-modals.modals (:require [reagent.core :as r :refer [atom]] [goog.dom :as dom] [goog.events :as events]) (:import [goog.events EventType])) (def modal-id "reagent-modal") :shown nil :size nil})) (defn get-modal [] ...
30c0070433616e6e635ac865ea01d38800f79f7a1b2a21f103a5952f6abb42f9
layerware/hugsql
quotes.clj
(ns princess-bride.db.quotes (:require [hugsql.core :as hugsql])) (hugsql/def-db-fns "princess_bride/db/sql/quotes.sql") (hugsql/def-sqlvec-fns "princess_bride/db/sql/quotes.sql")
null
https://raw.githubusercontent.com/layerware/hugsql/052c04a2a6dc99c3c35810ddf83416c2fd93c5e5/examples/princess-bride/src/princess_bride/db/quotes.clj
clojure
(ns princess-bride.db.quotes (:require [hugsql.core :as hugsql])) (hugsql/def-db-fns "princess_bride/db/sql/quotes.sql") (hugsql/def-sqlvec-fns "princess_bride/db/sql/quotes.sql")
aba0a466f125b8bc7e8c9f0c461483bc592a693de4d7756417593e7d90983ff6
herbelin/coq-hh
eterm.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/plugins/subtac/eterm.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** env, id, evars, number of function ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Environ open Tacmach ope...
e74b419f87cbc5ab0f2336c43d151a2f7ee6c27d9e2f666b6746e7c283575776
OCamlPro/ocp-build
trie.ml
(**************************************************************************) (* *) (* Typerex Libraries *) (* *) Copyrigh...
null
https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/libs/ocplib-lang/trie.ml
ocaml
************************************************************************ Typerex Libraries ...
Copyright 2011 - 2017 OCamlPro SAS the GNU Lesser General Public License version 2.1 , with the This file belongs to module Make (M : Map.S) = struct s Then a trie is just a tree - like structure , where a possible information is stored at the node ...
4b1888bc524c4202568ec4ab43531d4d144e292a917d178c93f42df6b44546ba
Clozure/ccl
cl-ppcre-tests.lisp
-*- Mode : Lisp ; tab - width : 2 ; indent - tabs - mode : nil -*- Methods for compiling and running CL - PPCRE unit tests with code coverage analysis (in-package :code-cover-test) (require :cl-ppcre-test) ;; Compiling CL-PPCRE unit tests with code coverage analysis (maybe) enabled (defmethod asdf:perform :aro...
null
https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/examples/code-cover-test/cl-ppcre-tests.lisp
lisp
tab - width : 2 ; indent - tabs - mode : nil -*- Compiling CL-PPCRE unit tests with code coverage analysis (maybe) enabled Running unit tests with code coverage analysis (maybe) enabled see cl-ppcre-test/test/tests.lisp
Methods for compiling and running CL - PPCRE unit tests with code coverage analysis (in-package :code-cover-test) (require :cl-ppcre-test) (defmethod asdf:perform :around ((op asdf:compile-op) (system (eql (asdf:find-system :cl-ppcre)))) (with-code-coverage-compile () (call-next-method))) (defmethod asdf:...
6ccba4dda71a6fee99c7026a50d9b2b1a3404b7f74e8ac7bed674b0c5ed92aa6
hadolint/hadolint
DL3059.hs
module Hadolint.Rule.DL3059 (rule) where import Hadolint.Rule import qualified Hadolint.Shell as Shell import Language.Docker.Syntax data Acc = Acc { flags :: RunFlags, count :: Int } | Empty deriving (Eq) -- | This Rule catches multiple consecutive `RUN` instructions. -- It ignores the case where multiple co...
null
https://raw.githubusercontent.com/hadolint/hadolint/dc66e0996474b324f10649618f424fc76ca60e28/src/Hadolint/Rule/DL3059.hs
haskell
| This Rule catches multiple consecutive `RUN` instructions. It ignores the case where multiple commands are chained together (e.g. with `&&`) because in that case the programmer most likely has deliberately chosen to use multiple `RUN` instructions. Cases where --mount=xxx flags differ are excluded as well.
module Hadolint.Rule.DL3059 (rule) where import Hadolint.Rule import qualified Hadolint.Shell as Shell import Language.Docker.Syntax data Acc = Acc { flags :: RunFlags, count :: Int } | Empty deriving (Eq) rule :: Rule Shell.ParsedShell rule = customRule check (emptyState Empty) where code = "DL3059" ...
0b96d72fe2966bdafbe7e4e594471a807bd06ae38bd386327b07ccdcf4f2e0a3
schmidt73/guidescan-web
add_grna_lib.clj
(ns add-grna-lib (:require [next.jdbc :as jdbc] [honeysql.core :as sql] [honeysql.helpers :as h] [honeysql.format :as fmt] [taoensso.timbre :as timbre] [clojure.data.csv :as csv] [failjure.core :as f] [script-utils :refer :all]) (:g...
null
https://raw.githubusercontent.com/schmidt73/guidescan-web/32f001ea39bc2f738e3b45615af0803c31c06cd4/scripts/add_grna_lib.clj
clojure
(ns add-grna-lib (:require [next.jdbc :as jdbc] [honeysql.core :as sql] [honeysql.helpers :as h] [honeysql.format :as fmt] [taoensso.timbre :as timbre] [clojure.data.csv :as csv] [failjure.core :as f] [script-utils :refer :all]) (:g...
f0a7916155f564dd302b7d3fc444a5d4591d730ec935f10628f435784322cbf3
seancorfield/next-jdbc
plan_test.clj
copyright ( c ) 2020 - 2021 , all rights reserved (ns next.jdbc.plan-test "Tests for the plan helpers." (:require [clojure.test :refer [deftest is use-fixtures]] [next.jdbc.plan :as plan] [next.jdbc.specs :as specs] [next.jdbc.test-fixtures :refer [with-test-db ...
null
https://raw.githubusercontent.com/seancorfield/next-jdbc/961b880e085d56278e9ee566cf0f1beb0be87734/test/next/jdbc/plan_test.clj
clojure
copyright ( c ) 2020 - 2021 , all rights reserved (ns next.jdbc.plan-test "Tests for the plan helpers." (:require [clojure.test :refer [deftest is use-fixtures]] [next.jdbc.plan :as plan] [next.jdbc.specs :as specs] [next.jdbc.test-fixtures :refer [with-test-db ...
727ed9022db3866f7e81945907ef8f17f7dacfaa6517041ca0ef1b9d1c9fdc0e
dvingo/cljs-emotion
cljs_emotion.cljc
(ns dv.cljs-emotion (:require #?@(:cljs [["react" :as react] ["@emotion/hash" :as emotion-hash*] ["@emotion/styled" :as styled*] ["@emotion/react" :as styled-core :refer [Global ThemeProvider]] [goog.object :as g]]) [clojure.string :as str] [cloj...
null
https://raw.githubusercontent.com/dvingo/cljs-emotion/0e2d7339657bd2957f03fbf8f4bb4a97b4fefc81/src/main/dv/cljs_emotion.cljc
clojure
Support plain cljs compiler and shadow. from fulcro todo use the caching strategy seen in reagent.impl.template Another emotion styled component created with this lib. arg# is js props passed at runtime, we ship it back and forth js -> cljs -> js js->clj is resulting in an infinite recur when children contains an...
(ns dv.cljs-emotion (:require #?@(:cljs [["react" :as react] ["@emotion/hash" :as emotion-hash*] ["@emotion/styled" :as styled*] ["@emotion/react" :as styled-core :refer [Global ThemeProvider]] [goog.object :as g]]) [clojure.string :as str] [cloj...
5709e280220086869272254c3c58fc35a327569c5fe337c6fd4f4931c55c5f06
kaznum/programming_in_ocaml_exercise
sample.ml
List.fold_left;; ListLabels.fold_left;; ListLabels.fold_left ~f:(fun x y -> x + y) ~init:0 [1;2;3;4];; ListLabels.fold_left ~init:0 ~f:(fun x y -> x + y) [1;2;3;4];; type ('a, 'b) foldarg = {f: 'a -> 'b -> 'a; init: 'a};; let rec fold_left' {f=f; init=init} = function [] -> init | a::rest -> fold_left' { f = f;...
null
https://raw.githubusercontent.com/kaznum/programming_in_ocaml_exercise/6f6a5d62a7a87a1c93561db88f08ae4e445b7d4e/ch13/sample.ml
ocaml
definition duplicated labels error error optional arguments error error error succeed error
List.fold_left;; ListLabels.fold_left;; ListLabels.fold_left ~f:(fun x y -> x + y) ~init:0 [1;2;3;4];; ListLabels.fold_left ~init:0 ~f:(fun x y -> x + y) [1;2;3;4];; type ('a, 'b) foldarg = {f: 'a -> 'b -> 'a; init: 'a};; let rec fold_left' {f=f; init=init} = function [] -> init | a::rest -> fold_left' { f = f;...
80b8fc5e8428e422b8dd3af0ba93fd35718a04f3f929dbfe9c3755393d2bc01a
stritzinger/opcua
opcua_nodeset.erl
-module(opcua_nodeset). Original NodeSet from -Nodeset/tree/v1.04/Schema %%% INCLUDES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -include_lib("kernel/include/logger.hrl"). -include_lib("xmerl/include/xmerl.hrl"). -include("opcua.hrl"). -include("opcua_internal.hrl"). %%% EXPORTS %%%%%%%...
null
https://raw.githubusercontent.com/stritzinger/opcua/a9802f829f80e6961871653f4d3c932f9496ba99/src/opcua_nodeset.erl
erlang
INCLUDES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Startup Functions API Functions Behaviour gen_server callback functions % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % ...
-module(opcua_nodeset). Original NodeSet from -Nodeset/tree/v1.04/Schema -include_lib("kernel/include/logger.hrl"). -include_lib("xmerl/include/xmerl.hrl"). -include("opcua.hrl"). -include("opcua_internal.hrl"). -export([start_link/1]). -export([attributes/0]). -export([attribute_name/1]). -export([attribute_...
5d81ec8bad41556dbf60f084d73ad38ae0882f78d1eb90f51a5cf96cd46decab
fraidev/tornado
tcp_server.ml
let listen ~net ~sw ~port = let addr = `Tcp (Eio.Net.Ipaddr.V4.loopback, port) in let socket = Eio.Net.listen net ~sw ~reuse_addr:true ~backlog:5 addr in let flow, addr = Eio.Net.accept ~sw socket in flow, addr ;;
null
https://raw.githubusercontent.com/fraidev/tornado/d896911dcfddec49aa3acf53e43c03c7744a2721/test/e2e/tcp_server.ml
ocaml
let listen ~net ~sw ~port = let addr = `Tcp (Eio.Net.Ipaddr.V4.loopback, port) in let socket = Eio.Net.listen net ~sw ~reuse_addr:true ~backlog:5 addr in let flow, addr = Eio.Net.accept ~sw socket in flow, addr ;;
14945c6b291580662e224fdc9c5c7cd89baf2d67e3b312891541263783e35047
ayamada/cac2020
tween.cljs
(ns cac2020.tween (:require-macros [cac2020.macro :as m]) (:require [clojure.string :as string] [cac2020.property :as p :include-macros true] )) ;;; TODO: tweenを一時停止する機能を提供 (defn prepare-parameter [start end] (assert (number? start)) (assert (number? end)) (let [diff (- end star...
null
https://raw.githubusercontent.com/ayamada/cac2020/99d249ce9b9b0e2cf856ddeaea22796ce60d4fa7/src/main/cac2020/tween.cljs
clojure
TODO: tweenを一時停止する機能を提供 tweenは純粋に毎フレームでtarget-objを動かすだけ NB: ホットリロード等でツリー全体がdestroyされた場合はこれを呼ぶ事 TODO: これをどうするかは悩むところ。今回はなしで。しかし「何度もregister!するが、有効なのは一個だけにしたい」要件は普通にあるので、あとでルールを考える事 o (.-target-obj entry)] (when (= target-obj o) (.splice all-tween-entries i 1))))
(ns cac2020.tween (:require-macros [cac2020.macro :as m]) (:require [clojure.string :as string] [cac2020.property :as p :include-macros true] )) (defn prepare-parameter [start end] (assert (number? start)) (assert (number? end)) (let [diff (- end start)] (array ::pp start di...
36fc290a61a80220ea94d5e65a98f8a4e90511d21e3434457891fc1ad224e7ca
hyperledger-labs/fabric-chaincode-haskell
Helper.hs
{-# LANGUAGE OverloadedStrings #-} module Helper where import Common.Common as Pb import Data.Bifunctor ( first ) import Peer.Chaincode as Pb import Peer.ChaincodeShim as Pb import Peer.Proposal as Pb import Peer.ProposalRe...
null
https://raw.githubusercontent.com/hyperledger-labs/fabric-chaincode-haskell/9594e82371a9a805ad812e38fd58e063df5ca4e7/src/Helper.hs
haskell
# LANGUAGE OverloadedStrings # These are some helper functions to process the unmarshalling of different types from the chaincode message in order to populate the stub TODO : Use ChannelHeader and SignatureHeader to implement getBinding
module Helper where import Common.Common as Pb import Data.Bifunctor ( first ) import Peer.Chaincode as Pb import Peer.ChaincodeShim as Pb import Peer.Proposal as Pb import Peer.ProposalResponse as Pb import Prot...
5cc6bef9ba06133d39636af4b4579ab9afd0e6183f28e850d9cc96231b0a0092
0install/0install
gui.mli
Copyright ( C ) 2013 , the README file for details , or visit . * See the README file for details, or visit . *) (** Manage the GUI sub-process. *) type feed_description = { times : (string * float) list; summary : string option; description : string list; homepages : string list; signatures : ...
null
https://raw.githubusercontent.com/0install/0install/22eebdbe51a9f46cda29eed3e9e02e37e36b2d18/src/zeroinstall/gui.mli
ocaml
* Manage the GUI sub-process. * The GUI plugin registers itself here. * Should we use the GUI? * The input says what the user requested: * No -> we never want to use the GUI * Yes -> we always want to use the GUI, and throw an exception if it's not available * Auto -> we want to use the GUI iff it's available * ...
Copyright ( C ) 2013 , the README file for details , or visit . * See the README file for details, or visit . *) type feed_description = { times : (string * float) list; summary : string option; description : string list; homepages : string list; signatures : [ | `Valid of Support.Gpg.finge...
719f4f7c2febd339cfabf8ba3771c680c67316e3d66bdb05ecdc66865e546665
FPtje/GLuaFixer
LintMain.hs
# LANGUAGE LambdaCase # module Main where import "glualint-lib" GLua.AG.PrettyPrint import "glualint-lib" GLua.Parser import "glualint-lib" GLua.ASTInstances () import "glualint-lib" GLua.LineLimitParser (execParseLineLimits, LineLimit (LineLimit)) import "glualint-lib" GLua.TokenTypes (isWhitespace) import "glualint...
null
https://raw.githubusercontent.com/FPtje/GLuaFixer/af1020f18b2a5f78c6c64b12041f2745e2c25eb9/src/GLuaFixer/LintMain.hs
haskell
Keep track of whether process is cancelled through some signal | Command line options of glualint | Available subcommands | Metadata of the application | Defines the command line interface parser | Run subcommands | When the regulare CLI fails to parse, the legacy one might yet succeed This means the help was a...
# LANGUAGE LambdaCase # module Main where import "glualint-lib" GLua.AG.PrettyPrint import "glualint-lib" GLua.Parser import "glualint-lib" GLua.ASTInstances () import "glualint-lib" GLua.LineLimitParser (execParseLineLimits, LineLimit (LineLimit)) import "glualint-lib" GLua.TokenTypes (isWhitespace) import "glualint...
ab5f398ce7d2e8efbec2914ada5c073eb0f497481b3c0b6eae57a08bdcdb35db
heshrobe/joshua-dist
ruled-tables.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*- (in-package :clim-internals) (eval-when (:compile-toplevel :execute :load-toplevel) (export (intern (string-upcase "ruled-table-output-record") :clim) :clim) (export (intern (string-upcase "draw-rules"...
null
https://raw.githubusercontent.com/heshrobe/joshua-dist/f59f06303f9fabef3e945a920cf9a26d9c2fd55e/clim-fixes/ruled-tables.lisp
lisp
Syntax : ANSI - Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*- Calculate nrows & ncells (= ncells per row) be 0. In either case, that means we're done. Figure out max height for each row, max width for each column. Collect row heights and column widths into temp arrays. ...
(in-package :clim-internals) (eval-when (:compile-toplevel :execute :load-toplevel) (export (intern (string-upcase "ruled-table-output-record") :clim) :clim) (export (intern (string-upcase "draw-rules") :clim) :clim)) (defmethod adjust-table-cells ((table standard-table-output-record) stream) (let* ((nrows 0) ...
e44ddca6c668e7b950225a8daea40ad8b311f4036f6cd9abf27c5e309025cd65
modular-macros/ocaml-macros
t330-compact-4.ml
open Lib;; let rec f n = if n <= 0 then [] else n :: f (n-1) in Gc.compact (); let l = f 300 in if List.fold_left (+) 0 l <> 301 * 150 then raise Not_found ;; * 0 CONSTINT 42 2 PUSHACC0 3 MAKEBLOCK1 0 5 POP 1 7 9 BRANCH 746 11 RESTART 12 GRAB ...
null
https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/tool-ocaml/t330-compact-4.ml
ocaml
open Lib;; let rec f n = if n <= 0 then [] else n :: f (n-1) in Gc.compact (); let l = f 300 in if List.fold_left (+) 0 l <> 301 * 150 then raise Not_found ;; * 0 CONSTINT 42 2 PUSHACC0 3 MAKEBLOCK1 0 5 POP 1 7 9 BRANCH 746 11 RESTART 12 GRAB ...
eb29ee83abf726d9efd8eacee34078f988da37c3176ea6699b5b34c6b21e71b2
BitGameEN/bitgamex
cow_http_te.erl
Copyright ( c ) 2014 - 2018 , < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC...
null
https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/cowlib/src/cow_http_te.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2014 - 2018 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(cow_http_te). -export([stream_identity/2]). ...
d8fee67a52953b8f10a542c21a1edfc67ec12d48228c49cd6bc04d93182867e4
deadtrickster/cl-statsd
pipeline.lisp
(in-package :cl-statsd.test) (cl-interpol:enable-interpol-syntax) (plan 1) (subtest "Pipeline test" (is (with-capture-client () (statsd:pipeline () (statsd:inc "qwe") (statsd:inc "ewq"))) #?"qwe:1|c\newq:1|c")) (finalize)
null
https://raw.githubusercontent.com/deadtrickster/cl-statsd/7790c95c097f690994256519d24106b53c3e5e37/t/pipeline.lisp
lisp
(in-package :cl-statsd.test) (cl-interpol:enable-interpol-syntax) (plan 1) (subtest "Pipeline test" (is (with-capture-client () (statsd:pipeline () (statsd:inc "qwe") (statsd:inc "ewq"))) #?"qwe:1|c\newq:1|c")) (finalize)
9abfa62c6996db2cf68be9abe671b77cb8b87591a9c7e5502fdd26d589496b9a
didierverna/focus
package.lisp
;;; package.lisp --- Package definition Copyright ( C ) 2015 Author : < > This file is part of FoCus . ;; Copying and distribution of this file, with or without modification, ;; are permitted in any medium without royalty provided the copyright ;; notice and this notice are preserved. This file is offer...
null
https://raw.githubusercontent.com/didierverna/focus/bf2da0220ad0d0a08b52f88a1c843dcb4fb3fbf8/demos/quotation/package.lisp
lisp
package.lisp --- Package definition Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. Commentary: Code: package.lisp ends here
Copyright ( C ) 2015 Author : < > This file is part of FoCus . (defpackage :net.didierverna.focus.demos.quotation (:use :cl :net.didierverna.focus) (:shadowing-import-from :net.didierverna.focus :format :formatter) (:export :quotation))
3cfdd0191e5acd70fd1a462492a6e0020c1d7bd5a49a6a0e56d072bd1b212ac2
johnbender/unraverl
util.erl
-module(util). -export([find_function/2, replace/3, replace/2, find_attribute/2, args_list_form/3, to_string/1]). find_function(Form, Name) -> [Result] = [{SType, LineNum, SName, Arity, Clauses} || {SType, LineNum, SName, Arity, Clauses} <- Form, Name == SName], Result. %If the fun can ha...
null
https://raw.githubusercontent.com/johnbender/unraverl/cc8310fab4538cefd035502f95327bf894130292/util.erl
erlang
If the fun can handle both matching and replacement If the matching and replacement funs are separated
-module(util). -export([find_function/2, replace/3, replace/2, find_attribute/2, args_list_form/3, to_string/1]). find_function(Form, Name) -> [Result] = [{SType, LineNum, SName, Arity, Clauses} || {SType, LineNum, SName, Arity, Clauses} <- Form, Name == SName], Result. replace(Form, Repl...
8e7aa038d01909757f562587bf40b3189b7143dfd91d3befc5a35677e964a1ef
lambdaisland/kaocha
hello_test.clj
(ns foo.hello-test (:require [clojure.test :as t])) (t/deftest pass-1 (t/is true)) (t/deftest pass-2 (t/is true)) (t/deftest fail-1 (t/is true) (t/is false) (t/is true)) (t/deftest pass-3 (t/is true))
null
https://raw.githubusercontent.com/lambdaisland/kaocha/8f18babb732b21e7fb2231e44be4d972c7ab22bc/fixtures/c-tests/foo/hello_test.clj
clojure
(ns foo.hello-test (:require [clojure.test :as t])) (t/deftest pass-1 (t/is true)) (t/deftest pass-2 (t/is true)) (t/deftest fail-1 (t/is true) (t/is false) (t/is true)) (t/deftest pass-3 (t/is true))
8c01358ad6fd54b159f1a967dcd3caaf8880374faf1a2a0e1cd96d469c03ddc3
dbuenzli/astring
examples.ml
(* This code is in the public domain *) open Astring (* Version number (v|V).major.minor[.patch][(+|-)info] *) let parse_version : string -> (int * int * int * string option) option = fun s -> try let parse_opt_v s = match String.Sub.head s with | Some ('v'|'V') -> String.Sub.tail s | Some _ -> s | None -> r...
null
https://raw.githubusercontent.com/dbuenzli/astring/ec7a266a3a680e5d246689855c639da53d713428/test/examples.ml
ocaml
This code is in the public domain Version number (v|V).major.minor[.patch][(+|-)info] Key value bindings quoted
open Astring let parse_version : string -> (int * int * int * string option) option = fun s -> try let parse_opt_v s = match String.Sub.head s with | Some ('v'|'V') -> String.Sub.tail s | Some _ -> s | None -> raise Exit in let parse_dot s = match String.Sub.head s with | Some '.' -> String.Sub.tail s ...
98449d45ca0bf22680119b4853125db03337f13bcc922480c3c2b28dbf2baee5
apauley/hledger-flow
Main.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # module Main where import Parsing ( parseStartYear ) import Path ( reldir ) import qualified Turtle hiding (switch) import Prelude hiding (putStrLn) import Options.Applicative ( auto, optional, Alternative(many, (<|>)), Parser, f...
null
https://raw.githubusercontent.com/apauley/hledger-flow/487e456871193acdffb39d29cd4c83004053c754/app/Main.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes # module Main where import Parsing ( parseStartYear ) import Path ( reldir ) import qualified Turtle hiding (switch) import Prelude hiding (putStrLn) import Options.Applicative ( auto, optional, Alternative(many, (<|>)), Parser, flag', help, long, ...
125416b878956d8744da632004581f3bf1ab369a5cc6132113c0c3adb1db3370
SKA-ScienceDataProcessor/RC
Data.hs
{-# LANGUAGE StandaloneDeriving, DeriveDataTypeable #-} -- | Data representation definitions module Kernel.Data ( -- * Configuration Config(..), OskarInput(..), GridKernelType(..), DegridKernelType(..) , GridPar(..), GCFPar(..), GCFFile(..), CleanPar(..), StrategyPar(..) , defaultConfig, cfgParallelism , g...
null
https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS6/programs/Kernel/Data.hs
haskell
# LANGUAGE StandaloneDeriving, DeriveDataTypeable # | Data representation definitions * Configuration * Data tags * Data representations * Visibility data representations Data tags ^ Data set index ^ UV grid ^ Full UV grid ^ Image ^ Result from cleaning ^ A set of GCFs ^ Domain used for indexing data sets ...
module Kernel.Data Config(..), OskarInput(..), GridKernelType(..), DegridKernelType(..) , GridPar(..), GCFPar(..), GCFFile(..), CleanPar(..), StrategyPar(..) , defaultConfig, cfgParallelism , gridImageWidth, gridImageHeight, gridScale, gridXY2UV, gcfMaxSize, gcfGet , Index, Tag, Vis, UVGrid, FullUVGrid, Im...
423340a4acb1dcc4cc8411deb3601eb16b6f70662220cc729f88b7777ea9fadd
digitallyinduced/ihp
Types.hs
| Module : IHP.ServerSideComponent . Types Description : Types & Data Structures for IHP SSC Copyright : ( c ) digitally induced GmbH , 2021 Module: IHP.ServerSideComponent.Types Description: Types & Data Structures for IHP SSC Copyright: (c) digitally induced GmbH, 2021 -} module IHP.ServerSideComponent.Types ...
null
https://raw.githubusercontent.com/digitallyinduced/ihp/18f104da69c526ff9e8ad3a6cdaedc6d39afb38c/IHP/ServerSideComponent/Types.hs
haskell
^ If you wondered why the current rendered HTML doesn't need to be stored here for later diffing it: As our render functions are pure we can just re-render the HTML based on the state when we want to do our diffing
| Module : IHP.ServerSideComponent . Types Description : Types & Data Structures for IHP SSC Copyright : ( c ) digitally induced GmbH , 2021 Module: IHP.ServerSideComponent.Types Description: Types & Data Structures for IHP SSC Copyright: (c) digitally induced GmbH, 2021 -} module IHP.ServerSideComponent.Types ...
43fa0251a7961bc9287b7290a15962188537e5cc5e71c4182c409047f3f1689a
warmte/hi
Parser.hs
module HW3.Parser where import HW3.Base ( functions, HiFun(..), HiValue(..), HiExpr(..), HiAction (..) ) import Data.Void (Void) import Text.Megaparsec ( ParseErrorBundle, parseTest, MonadParsec(try, notFollowedBy), manyTill, (<|>), (<?>), parse, parseTest, between, choice, ...
null
https://raw.githubusercontent.com/warmte/hi/2f01ccb9cf98c6267a26c5fd7f397558c0dbc14d/src/HW3/Parser.hs
haskell
space skipping parser parser for numeric values parser for boolean values parser for null value parser for function names parser for actions which are not parser as functions parser for strings parser for lists of values parser which parses a byte parser which parses a dictionary key-value element parse...
module HW3.Parser where import HW3.Base ( functions, HiFun(..), HiValue(..), HiExpr(..), HiAction (..) ) import Data.Void (Void) import Text.Megaparsec ( ParseErrorBundle, parseTest, MonadParsec(try, notFollowedBy), manyTill, (<|>), (<?>), parse, parseTest, between, choice, ...
9ca6e196a9b0990acb0d6c483ace2b4f87bac06724185c644100a6f3d9f73bb0
cryptosense/pkcs11
p11_attribute_type.ml
type not_implemented = NOT_IMPLEMENTED of string type 'a t = | CKA_CLASS : P11_object_class.t t | CKA_TOKEN : bool t | CKA_PRIVATE : bool t | CKA_LABEL : string t | CKA_VALUE : string t | CKA_TRUSTED : bool t | CKA_CHECK_VALUE : not_implemented t | CKA_KEY_TYPE : P11_key_type.t t | CKA_SUBJECT : stri...
null
https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/lib/p11_attribute_type.ml
ocaml
type not_implemented = NOT_IMPLEMENTED of string type 'a t = | CKA_CLASS : P11_object_class.t t | CKA_TOKEN : bool t | CKA_PRIVATE : bool t | CKA_LABEL : string t | CKA_VALUE : string t | CKA_TRUSTED : bool t | CKA_CHECK_VALUE : not_implemented t | CKA_KEY_TYPE : P11_key_type.t t | CKA_SUBJECT : stri...
cc037d5bd35cf00fd8bfcad0fda36aa2ef496a7371c649fe4b8980a380b0b49f
CarlosMChica/HaskellBook
StateT.hs
# LANGUAGE UndecidableInstances # # LANGUAGE InstanceSigs # module StateT where newtype StateT s m a = StateT { runStateT :: s -> m (a, s) } instance Functor f => Functor (StateT s f) where fmap :: (a -> b) -> StateT s f a -> StateT s f b fmap h (StateT smas) = StateT $ \s -> mapFst h <$> smas s where mapFst...
null
https://raw.githubusercontent.com/CarlosMChica/HaskellBook/86f82cf36cd00003b1a1aebf264e4b5d606ddfad/chapter26/StateT.hs
haskell
(StateT sma) >>= f = StateT $ \s -> sma s >>= (\(a, s') -> runStateT (f a) s')
# LANGUAGE UndecidableInstances # # LANGUAGE InstanceSigs # module StateT where newtype StateT s m a = StateT { runStateT :: s -> m (a, s) } instance Functor f => Functor (StateT s f) where fmap :: (a -> b) -> StateT s f a -> StateT s f b fmap h (StateT smas) = StateT $ \s -> mapFst h <$> smas s where mapFst...
a077e62be843478f385c8e7abc07337179387490f941688ef183baa7dbc82915
zotonic/zotonic
mod_microsoft.erl
@author < > 2021 %% @doc Microsoft integration . Adds Microsoft / Azure login and other functionalities . Copyright 2021 %% 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...
null
https://raw.githubusercontent.com/zotonic/zotonic/ea643a112ff26ffcb15b2f9f3f9b6f8db23e52f9/apps/zotonic_mod_microsoft/src/mod_microsoft.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing per...
@author < > 2021 @doc Microsoft integration . Adds Microsoft / Azure login and other functionalities . Copyright 2021 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(mod_microsoft). -author("Marc Wor...
e9938a171da13075497eb31bed1b9ce546f7241bd233ea0dfc04d286356f68c6
ska80/thinlisp
packages.lisp
(in-package "TL") ;;;; Module PACKAGES Copyright ( c ) 1999 - 2001 The ThinLisp Group Copyright ( c ) 1996 Gensym Corporation . ;;; All rights reserved. This file is part of ThinLisp . ThinLisp is open source ; you can redistribute it and/or modify it under the terms of the ThinLisp License as published b...
null
https://raw.githubusercontent.com/ska80/thinlisp/173573a723256d901887f1cbc26d5403025879ca/tl/lisp/packages.lisp
lisp
Module PACKAGES All rights reserved. you can redistribute it and/or modify it either version 1 or ( at your option ) any later version . WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This module implements operations for symbols and packages. The...
(in-package "TL") Copyright ( c ) 1999 - 2001 The ThinLisp Group Copyright ( c ) 1996 Gensym Corporation . This file is part of ThinLisp . under the terms of the ThinLisp License as published by the ThinLisp ThinLisp is distributed in the hope that it will be useful , but For additional information se...
59530071649d60e536e14a109328fa3e5d0d75c129d96125c2f5df73d1ec8fbd
WhatsApp/eqwalizer
nowarn.erl
Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved . %%% This source code is licensed under the Apache 2.0 license found in %%% the LICENSE file in the root directory of this source tree. -module(nowarn). -compile([export_all, nowarn_export_all]). -eqwalizer({nowarn_function, nowarn_bad/0}...
null
https://raw.githubusercontent.com/WhatsApp/eqwalizer/9935940d71ef65c7bf7a9dfad77d89c0006c288e/eqwalizer/test_projects/check/src/nowarn.erl
erlang
the LICENSE file in the root directory of this source tree.
Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved . This source code is licensed under the Apache 2.0 license found in -module(nowarn). -compile([export_all, nowarn_export_all]). -eqwalizer({nowarn_function, nowarn_bad/0}). -eqwalizer({nowarn_function, nowarn_redundant/0}). -spec good() ...
02fba830595799c0e389f7b69c07bdf674ed250eee840c2b16534198c01c883d
05st/capri
OperatorDef.hs
module OperatorDef where import Data.Text (Text) data Assoc = ALeft | ARight | ANone | APrefix | APostfix deriving (Show) data OperatorDef = OperatorDef { assoc :: Assoc , prec :: Integer , oper :: Text } deriving (Show)
null
https://raw.githubusercontent.com/05st/capri/a98b7a5bbefb1b04a87eaac4285d5c3503e8b1ac/src/OperatorDef.hs
haskell
module OperatorDef where import Data.Text (Text) data Assoc = ALeft | ARight | ANone | APrefix | APostfix deriving (Show) data OperatorDef = OperatorDef { assoc :: Assoc , prec :: Integer , oper :: Text } deriving (Show)
01ae343eec9cfbc3f3e51e34185426226ca028d741c88210c3e808aa2b93dea0
rtrusso/scp
implambda.scm
(define (func a . b) (display 456) (newline) (display a) (newline) (display 123) (newline)) (display 0) (newline) (func 0) (func 1 2) (func 2 3 4)
null
https://raw.githubusercontent.com/rtrusso/scp/2051e76df14bd36aef81aba519ffafa62b260f5c/src/tests/implambda.scm
scheme
(define (func a . b) (display 456) (newline) (display a) (newline) (display 123) (newline)) (display 0) (newline) (func 0) (func 1 2) (func 2 3 4)
6fd2ae53039cfb86ed32834fba745da490be8b6d3f772b3ed7d903df49635f00
AdRoll/rebar3_hank
ignore_config.erl
-module(ignore_config). %% @doc No warnings should be emitted for this file since %% rebar.config specifically states that all of them %% should be ignored. -define(MACRO_ALL, "this macro is always ignored"). -define(MACRO_ALL(), "regardless of its arity"). -define(MACRO_ALL(It), "is never reported as unuse...
null
https://raw.githubusercontent.com/AdRoll/rebar3_hank/6035f08e74c694ae56c4c9382e74303e7b3e9018/test/files/unused_macros/ignore_config.erl
erlang
@doc No warnings should be emitted for this file since rebar.config specifically states that all of them should be ignored.
-module(ignore_config). -define(MACRO_ALL, "this macro is always ignored"). -define(MACRO_ALL(), "regardless of its arity"). -define(MACRO_ALL(It), "is never reported as unused"). -define(MACRO_ALL(Not, Even), "if it has multiple arguments"). -define(MACRO_0(), "This one should since it has 0 arguments"). -define(MAC...
900e9ec95ac517fcb4db5178aae166c5bc132bd2b191d5c7a3e35ae0fdeaf77d
adoptingerlang/service_discovery
sds_storage.erl
-module(sds_storage). -behaviour(service_discovery_storage). -export([configure_storage/1, create/1, read/1, read_endpoints/1, add_named_ports/2, list/0, register/2]). -define(STORAGE_KEY, {?MODULE, storage_module}). -define(STORAGE_MOD, (persistent_term:get(?STO...
null
https://raw.githubusercontent.com/adoptingerlang/service_discovery/03bed070048e70ce267fa4a585fa157bbc883425/apps/service_discovery_storage/src/sds_storage.erl
erlang
-module(sds_storage). -behaviour(service_discovery_storage). -export([configure_storage/1, create/1, read/1, read_endpoints/1, add_named_ports/2, list/0, register/2]). -define(STORAGE_KEY, {?MODULE, storage_module}). -define(STORAGE_MOD, (persistent_term:get(?STO...
f0a1f7dc22716172ee7ce30756bd42038fd71e02c72eb7e13f5934a5a8985f9a
ekmett/succinct-binary
Blob.hs
# options_ghc -Wno - orphans # module Data.Binary.Succinct.Blob ( Blob(..) , blob -- guts , inspectMeta , inspectShape , inspectContent , inspectBlob ) where import Data.Word import Data.Bits import Data.ByteString as Strict import Data.ByteString.Builder as Builder import Data.ByteString.Lazy as Lazy...
null
https://raw.githubusercontent.com/ekmett/succinct-binary/c8731ba6617e83ab416faffde95a118c4a3eef38/src/Data/Binary/Succinct/Blob.hs
haskell
guts deriving Show for debugging evil orphan for debugging Print out the balanced parentheses representation of our paren index Print out our raw content buffer Print out a representation of the entire blob, interleaving paren and content
# options_ghc -Wno - orphans # module Data.Binary.Succinct.Blob ( Blob(..) , blob , inspectMeta , inspectShape , inspectContent , inspectBlob ) where import Data.Word import Data.Bits import Data.ByteString as Strict import Data.ByteString.Builder as Builder import Data.ByteString.Lazy as Lazy import Da...
8f29ada2cc228e435d25ec74e18da928c3268568782f8da771b284b3fd3208e4
tweag/asterius
SymbolMap.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TupleSections # # LANGUAGE TypeFamilies # -- | Module : Asterius . Types . Copyright : ( c ) 2018 EURL Tweag -- License : All rights reserved (see LICENCE file in the distributi...
null
https://raw.githubusercontent.com/tweag/asterius/9f2574d9c2b50aa83d105741799e2f65b05e2023/asterius/src-types/Asterius/Types/SymbolMap.hs
haskell
# LANGUAGE DeriveDataTypeable # | License : All rights reserved (see LICENCE file in the distribution). corresponding to each entry, we also store it alongside each element. * SymbolMap type * Construction * Query * Size * Insertion * Filtering * Folds and Maps * Conversion ** Lists ** Maps --------...
# LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TupleSections # # LANGUAGE TypeFamilies # Module : Asterius . Types . Copyright : ( c ) 2018 EURL Tweag The @'SymbolMap ' a@ type represents a finite map / dictionary from keys of type ' EntitySymbol ' to values of...
4664bca783d2d5d3360e40a395bb545779a08e29090ff9e33a1c5757a57e7b77
tezos/tezos-mirror
lwtreslib.mli
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2020 - 2021 Nomadic Labs < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/448daee0f4ae76893ae524536e428aa0e22f1d60/src/lib_lwt_result_stdlib/lwtreslib.mli
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2020 - 2021 Nomadic Labs < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN ...
fb15a53b8388a9f34854b42a94fc082e56e2d3993087ac64f5cd282a2be6acaa
GrammaticalFramework/gf-core
ErrM.hs
# LANGUAGE CPP # # LANGUAGE DeriveFunctor # -- BNF Converter: Error Monad Copyright ( C ) 2004 Author : -- This file comes with NO WARRANTY and may be used FOR ANY PURPOSE. module GFCC.ErrM where Control . Monad . Fail import will become redundant in GHC 8.8 + import qualified Control.Monad.Fail as Fail imp...
null
https://raw.githubusercontent.com/GrammaticalFramework/gf-core/3122590e351f769ca6e60dfd4eeaafba1c5c22e8/src/tools/c/GFCC/ErrM.hs
haskell
BNF Converter: Error Monad This file comes with NO WARRANTY and may be used FOR ANY PURPOSE.
# LANGUAGE CPP # # LANGUAGE DeriveFunctor # Copyright ( C ) 2004 Author : module GFCC.ErrM where Control . Monad . Fail import will become redundant in GHC 8.8 + import qualified Control.Monad.Fail as Fail import Control.Monad (ap) the Error monad : like Maybe type with error msgs data Err a = Ok a | B...
5fa8ccd6aa7ec8bcab160ae0b77493145bf40e5649c56ae686a35afe089f6ccd
RDTK/generator
configuration.lisp
;;;; configuration.lisp --- Configuration for the commandline-interface module. ;;;; Copyright ( C ) 2013 - 2022 Jan Moringen ;;;; Author : < > (cl:in-package #:build-generator.commandline-interface) ;;; Schema (options:define-schema *global-schema* "Global configuration options." Generic ("version" ...
null
https://raw.githubusercontent.com/RDTK/generator/8d9e6e47776f2ccb7b5ed934337d2db50ecbe2f5/src/commandline-interface/configuration.lisp
lisp
configuration.lisp --- Configuration for the commandline-interface module. Schema Execution mode and feedback Directories Application-level debugging Execution mode and feedback Directories and cache Application-level debugging Configuration processing Process configuration sources other than commandline ar...
Copyright ( C ) 2013 - 2022 Jan Moringen Author : < > (cl:in-package #:build-generator.commandline-interface) (options:define-schema *global-schema* "Global configuration options." Generic ("version" :type 'boolean :default nil :documentation "Print v...
d05f897fc6e02fe7fce1b8349c16c5b9b4b30c53dad20eab94be5459ca567166
mstksg/inCode
Sequences.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} # LANGUAGE LambdaCase # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TupleSections # # LANGUAGE TypeOperators ...
null
https://raw.githubusercontent.com/mstksg/inCode/e1f80a3dfd83eaa2b817dc922fd7f331cd1ece8a/code-samples/functor-structures/Sequences.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE GADTs # # LANGUAGE KindSignatures # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # Ap(..) , liftAp , runAp , liftCoAp , runCoAp instance Invariant (Chain t i f) where invmap = undefined instance (Invariant i, Invariant (t...
# LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE TupleSections # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module Sequences ( CoAp ( .. ) Div(..) , liftDiv, runDiv , Dec(..) , liftDec, runDec , Conclude(..) , InvDay(..) , runInvDayApp...
64d13cd71a3acc0717005b7ec3ef12ccfc2bba686fd1a58373299bdadb064ea3
ssor/erlangDemos
dispatcher_prop.erl
Copyright ( c ) 2011 , < > Copyright ( c ) 2011 , < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVIDED " AS...
null
https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/cowboy_old/test/dispatcher_prop.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2011 , < > Copyright ( c ) 2011 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(dispatcher_prop). -i...
bc331e52ad3e18dbd6e272380298fa470e3bab586f4f2c3de6a1b76255544d11
engineyard/vertebra-erl
vertebra_protocol.erl
Copyright 2008 , Engine Yard , Inc. % This file is part of Vertebra . % Vertebra is free software : you can redistribute it and/or modify it under the % terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any % lat...
null
https://raw.githubusercontent.com/engineyard/vertebra-erl/cf6e7c84f6dfbf2e31f19c47e9db112ae292ec27/lib/vertebra/src/vertebra_protocol.erl
erlang
terms of the GNU Lesser General Public License as published by the Free later version. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. op({OpName, SubEls}) -> #xmlelement OpName -> string SubEls...
Copyright 2008 , Engine Yard , Inc. This file is part of Vertebra . Vertebra is free software : you can redistribute it and/or modify it under the Software Foundation , either version 3 of the License , or ( at your option ) any Vertebra is distributed in the hope that it will be useful , but WITHOUT ANY Yo...
d94d8de1a7a117ccfaef3f1ed74ed56877541ca3640becc862500a72e62642a0
PacktPublishing/Haskell-High-Performance-Programming
reactive-banana-fib.hs
-- file: reactive-banana-fib.hs # LANGUAGE RecursiveDo # import Reactive.Banana fib :: Event () -> Moment (Behavior Int) fib step = mdo fib1 <- stepper 1 (fib2 <@ step) fib2 <- accumB 1 ((+) <$> fib1 <@ step) return fib1
null
https://raw.githubusercontent.com/PacktPublishing/Haskell-High-Performance-Programming/2b1bfdb8102129be41e8d79c7e9caf12100c5556/Chapter13/reactive-banana-fib.hs
haskell
file: reactive-banana-fib.hs
# LANGUAGE RecursiveDo # import Reactive.Banana fib :: Event () -> Moment (Behavior Int) fib step = mdo fib1 <- stepper 1 (fib2 <@ step) fib2 <- accumB 1 ((+) <$> fib1 <@ step) return fib1
ebc095ec56d0a98b44aa016e0516e866647ffeb1e3a84fb5d55f34496ec438a2
emqx/ecql
ecql_tests.erl
Copyright ( c ) 2016 eMQTT.IO , All Rights Reserved . %%% %%% Permission is hereby granted, free of charge, to any person obtaining a copy %%% of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation the rights %%% to use, copy,...
null
https://raw.githubusercontent.com/emqx/ecql/f29d05fb8bdf1167877ec07ef7f0950f6feeab95/test/ecql_tests.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnished to do so, subject to the following conditions: The above copyright notice ...
Copyright ( c ) 2016 eMQTT.IO , All Rights Reserved . in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF A...
8adf0a6488b267b0c5cd0063a2e129b3cdef95421f5e88a1d1aef59b976bcafd
matterandvoid-space/subscriptions
datalevin_eql_test.clj
(ns space.matterandvoid.subscriptions.datalevin-eql-test (:require [clojure.test :refer [deftest testing is use-fixtures]] [clojure.string :as str] [datalevin.core :as d] [space.matterandvoid.subscriptions.core :refer [<sub]] [space.matterandvoid.subscriptions.datalevin-eql :as sut] [space.mat...
null
https://raw.githubusercontent.com/matterandvoid-space/subscriptions/7cfcc05fd238b6a08040bf46c8b4d0ed6688a90a/src/test/space/matterandvoid/subscriptions/datalevin_eql_test.clj
clojure
(reset! subs.impl/handler-registry_ {}) (subs/clear-subscription-cache! nil) to-one cycle to-many cycle union queries stop keeps the entity but does not recur on it, vs removing it completely from the result set. user-2 user-2 user-3 user-7 user-5
(ns space.matterandvoid.subscriptions.datalevin-eql-test (:require [clojure.test :refer [deftest testing is use-fixtures]] [clojure.string :as str] [datalevin.core :as d] [space.matterandvoid.subscriptions.core :refer [<sub]] [space.matterandvoid.subscriptions.datalevin-eql :as sut] [space.mat...
faf6dd8aec5bbda79d53a2b7f5c9fff8cf8c992e1ba9b39d4b2a9c81a2ec8d8c
GaloisInc/renovate
Relocation.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} # LANGUAGE StandaloneDeriving # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Renovate.Core.Relocation ( ArchitectureRelocation , Relocation(..) ) where import Data.Kind ( Type ) import qualified Data.Macaw.CFG as MC import qu...
null
https://raw.githubusercontent.com/GaloisInc/renovate/550f64c1119f6804967e3077dcf0cb7c57ddb603/renovate/src/Renovate/Core/Relocation.hs
haskell
# LANGUAGE GADTs # | An architecture-specific relocation extension type If this is not needed, instantiate it as 'Void' | Representations of relocations that must be resolved during instruction concretization Each operand is annotated with a relocation that contains enough information to be resolved during the c...
# LANGUAGE FlexibleContexts # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Renovate.Core.Relocation ( ArchitectureRelocation , Relocation(..) ) where import Data.Kind ( Type ) import qualified Data.Macaw.CFG as MC import qualified Renovate.Core.A...
65f17319e81932d3ad68de5a57115e945f50ddae479d646bf4808d3988b7b9c2
shimmering-void/sketches
core_test.cljs
(ns sketches.core-test (:require [cljs.test :refer-macros [deftest is testing]] [sketches.core :refer [multiply]])) (deftest multiply-test (is (= (* 1 2) (multiply 1 2)))) (deftest multiply-test-2 (is (= (* 75 10) (multiply 10 75))))
null
https://raw.githubusercontent.com/shimmering-void/sketches/84d29636a798720e8db3379c21814fe9f92686fd/test/sketches/core_test.cljs
clojure
(ns sketches.core-test (:require [cljs.test :refer-macros [deftest is testing]] [sketches.core :refer [multiply]])) (deftest multiply-test (is (= (* 1 2) (multiply 1 2)))) (deftest multiply-test-2 (is (= (* 75 10) (multiply 10 75))))
2eae85ace1f8b577c25a2bf5308449c52d5afed94b691dc917a8062168d33362
vollmerm/lalla-chess
move.lisp
;;;; move.lisp ;;;; ;;;; This file contains the procedures that generate and handle moves. Moves are stored in numbers with bitmapping. (in-package #:lalla) (declaim (optimize speed)) Moves are stored in 18 - bit words . ;; They consist of a from square, a to square, and a series of tags. ;; The following function...
null
https://raw.githubusercontent.com/vollmerm/lalla-chess/62e4068eba7f3288c6e99a7977bd0cc4f4f4190b/move.lisp
lisp
move.lisp This file contains the procedures that generate and handle moves. Moves are stored in numbers with bitmapping. They consist of a from square, a to square, and a series of tags. The following functions are short convenience functions and are marked for inlining. Create a number that represents a move Th...
(in-package #:lalla) (declaim (optimize speed)) Moves are stored in 18 - bit words . (defun* (move-from -> (unsigned-byte 7)) ((m (unsigned-byte 18))) (ldb (byte 7 0) m)) (defun* (move-to -> (unsigned-byte 7)) ((m (unsigned-byte 18))) (ldb (byte 7 7) m)) (defun* (move-tag -> (unsigned-byte 4)) ((m (unsigned-by...
143b331f6ed3f165728da0eaae0f62a1210024604dcd41f7834dcdb7e65141bc
manuel-serrano/hop
compile_optimized_boolify.scm
;*=====================================================================*/ ;* .../hop/2.5.x/scheme2js/compile_optimized_boolify.scm */ ;* ------------------------------------------------------------- */ * Author : * / * Creation : 2007 - 11 ...
null
https://raw.githubusercontent.com/manuel-serrano/hop/481cb10478286796addd2ec9ee29c95db27aa390/scheme2js/compile_optimized_boolify.scm
scheme
*=====================================================================*/ * .../hop/2.5.x/scheme2js/compile_optimized_boolify.scm */ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * Conditional expression ...
* Author : * / * Creation : 2007 - 11 * / * Last change : Thu Sep 5 16:05:44 2013 ( serrano ) * / * Copyright : 2013 * / (module compile-optimized-bool...
24b2f34a15e9ee36fa5923319333601d0bea21f9f5c930e8ae13b718384e8049
ruanpienaar/goanna
goanna_common_tests.erl
-module(goanna_common_tests). -include_lib("eunit/include/eunit.hrl"). goanna_common_unit_test_() -> {setup, % Setup Fixture fun() -> xxx end, % Cleanup Fixture fun(xxx) -> ok end, % List of tests [ % Example test {"goanna_common:prop_value/...
null
https://raw.githubusercontent.com/ruanpienaar/goanna/52d75566fd6f9760fbdebe53b2ca3c82fdb44e01/test/goanna_common_tests.erl
erlang
Setup Fixture Cleanup Fixture List of tests Example test "", lists:flatten( goanna_common:format_trace_item('n1@host', {trace_ts, self(), label, info, ReportedTS}) ) ), "", lists:flatten( goanna_common:format_trace_item('n1@host', {trace_ts, self(), label, info, extra, Re...
-module(goanna_common_tests). -include_lib("eunit/include/eunit.hrl"). goanna_common_unit_test_() -> {setup, fun() -> xxx end, fun(xxx) -> ok end, [ {"goanna_common:prop_value/0", ?_assert(unit_testing:try_test_fun(fun prop_value/0))}, {"goann...
449548b1ad83364427ca46d782cc8934b97e00ea76ce8bead27a51f43530e9ca
icfpcontest2021/icfpcontest2021.github.io
JasperSolver.hs
-- | Some ideas: -- -- * Add neighbours that preserve distances, such as move, flip, rotate -- * For pinching in an invalid state, we should pick the vertices that are the -- furthest away with a higher probability than the closer ones -- * For pinching in a valid state, we should pick the vertices that contribute --...
null
https://raw.githubusercontent.com/icfpcontest2021/icfpcontest2021.github.io/fb23fea2a8ecec7740017d3dda78d921c1df5a26/toolchain/lib/BrainWall/JasperSolver.hs
haskell
| Some ideas: * Add neighbours that preserve distances, such as move, flip, rotate * For pinching in an invalid state, we should pick the vertices that are the furthest away with a higher probability than the closer ones * For pinching in a valid state, we should pick the vertices that contribute the most to...
should make it contiuous or we should run this in two phases . # LANGUAGE RecordWildCards # module BrainWall.JasperSolver where import BrainWall.Box (Box) import qualified BrainWall.Box as Box import BrainWall.Database ...
b31feff06375198f132895b5d76795b9a06fa2dae51c4505e9730ab008075603
tonyg/kali-scheme
lu-decomp.scm
Copyright ( c ) 1993 , 1994 by and . Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING . LU Decomposition ( a rewriting of a program from ` Numerical Recipes in ' ; look there for a detailed description of what is going on ) . A is an NxN matrix that is updated in place . ; Th...
null
https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/big/lu-decomp.scm
scheme
look there for a detailed description of what is going on ) . This returns a row permutation vector and the sign of that vector. (define m (define b '#(2.0 1.0 3.0 -2.0)) (define (test m b) (let* ((a (copy-array m)) (n (car (array-shape m))) (x (make-vector n))) (do ((i 0 (+ i 1))) ...
Copyright ( c ) 1993 , 1994 by and . Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING . LU Decomposition ( a rewriting of a program from ` Numerical Recipes A is an NxN matrix that is updated in place . (define *lu-decomposition-epsilon* 1.0e-20) (define (lu-decomposition a) ...
28b9e501168d72fc80dc7cbe84428fd98435d9a9c4f43379e96709fe7ac2c39d
ku-fpg/blank-canvas
Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Data.Map (Map) import qualified Data.Map as Map import Data.Text (Text) import Graphics.Blank main :: IO () main = blankCanvas 3000 { events = ["mousedown"] } $ \ context -> loop context Map.empty X data XO = X | O deri...
null
https://raw.githubusercontent.com/ku-fpg/blank-canvas/39915c17561106ce06e1e3dcef85cc2e956626e6/examples/tictactoe/Main.hs
haskell
# LANGUAGE OverloadedStrings # print board print turn trace (show ("fx",x,r)) $ print event if no mouse location, ignore, and redraw already something here
module Main where import Data.Map (Map) import qualified Data.Map as Map import Data.Text (Text) import Graphics.Blank main :: IO () main = blankCanvas 3000 { events = ["mousedown"] } $ \ context -> loop context Map.empty X data XO = X | O deriving (Eq,Ord,Show) swap :: XO -> X...
8f2cd3ae988d962835c114daf6d9cc69203aa117d9b034ef9d4e78204f5c6977
pfdietz/ansi-test
logcount.lsp
;-*- Mode: Lisp -*- Author : Created : Thu Sep 11 23:12:56 2003 ;;;; Contains: Tests of LOGCOUNT ;;; Error tests (deftest logcount.error.1 (signals-error (logcount) program-error) t) (deftest logcount.error.2 (signals-error (logcount 0 nil) program-error) t) (deftest logcount.error.3 (che...
null
https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/numbers/logcount.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of LOGCOUNT Error tests Non-error tests
Author : Created : Thu Sep 11 23:12:56 2003 (deftest logcount.error.1 (signals-error (logcount) program-error) t) (deftest logcount.error.2 (signals-error (logcount 0 nil) program-error) t) (deftest logcount.error.3 (check-type-error #'logcount #'integerp) nil) (deftest logcount.1 (logc...
60e27eb5ee414c6c56ad32c42ed6c3a69d73ef6f89cb6388917b89188e6fdc68
windorg/app-old
User.hs
module Web.Controller.User where import Data.Text (strip) import qualified IHP.AuthSupport.Controller.Sessions as Sessions import IHP.ValidationSupport.ValidateField (matchesRegex) import Web.Controller.Authorization import Web.Controller.Prelude import Web.Helper.Common import Web.View.Sessions.LoginOrSignup import W...
null
https://raw.githubusercontent.com/windorg/app-old/ed9c5322c8ab8a0275bdcd479be12a3f230da8c9/Web/Controller/User.hs
haskell
module Web.Controller.User where import Data.Text (strip) import qualified IHP.AuthSupport.Controller.Sessions as Sessions import IHP.ValidationSupport.ValidateField (matchesRegex) import Web.Controller.Authorization import Web.Controller.Prelude import Web.Helper.Common import Web.View.Sessions.LoginOrSignup import W...
00469d2a1982e7ba8c0aab0b2c903b8fc73a6ec53a0c327244276436e2c40843
fyquah/hardcaml_zprize
twiddle_factor_stream.mli
* Computes a stream of twiddle factors ( successive powers of the initial roots ) used in the first pass of the 4 step algorithm . roots) used in the first pass of the 4 step algorithm. *) open Base open Hardcaml val pipe_length : int module I : sig type 'a t = { clock : 'a ; start_twiddles : 'a ...
null
https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/libs/hardcaml_ntt/src/twiddle_factor_stream.mli
ocaml
* Computes a stream of twiddle factors ( successive powers of the initial roots ) used in the first pass of the 4 step algorithm . roots) used in the first pass of the 4 step algorithm. *) open Base open Hardcaml val pipe_length : int module I : sig type 'a t = { clock : 'a ; start_twiddles : 'a ...
5eb9e6520a66cebc82bd91d2d4b7660d58791eb8bf2858b69228d7b2242a0390
chrovis/cljam
pileup_test.clj
(ns cljam.io.pileup-test (:require [clojure.test :refer [deftest is are testing]] [clojure.java.io :as cio] [clojure.string :as cstr] [clojure.walk :as walk] [cljam.test-common :refer [with-before-after prepare-cache! clean-cache...
null
https://raw.githubusercontent.com/chrovis/cljam/2b8e7386765be8efdbbbb4f18dbc52447f4a08af/test/cljam/io/pileup_test.clj
clojure
Reader ------ Writer ------ Read & Write ------------
(ns cljam.io.pileup-test (:require [clojure.test :refer [deftest is are testing]] [clojure.java.io :as cio] [clojure.string :as cstr] [clojure.walk :as walk] [cljam.test-common :refer [with-before-after prepare-cache! clean-cache...
ff11127cf853569b768dae26cbbd15981d360d8d6507ab54780d95f97c87865d
srdqty/talc-3.0
render.mli
val apply : (Program.v -> Program.v list -> Program.v list) ref val inline_closure : (Program.v -> Program.v) ref val optimize_scene : bool ref val f : amb:(float * float * float) -> lights: Program.v array -> obj:Program.obj -> depth:int -> fov:float -> wid:int -> ht:int -> file:string -> unit
null
https://raw.githubusercontent.com/srdqty/talc-3.0/df83dd5ff0e2b189b13280ddae233d8277199350/apps/gml/plclub/src/render.mli
ocaml
val apply : (Program.v -> Program.v list -> Program.v list) ref val inline_closure : (Program.v -> Program.v) ref val optimize_scene : bool ref val f : amb:(float * float * float) -> lights: Program.v array -> obj:Program.obj -> depth:int -> fov:float -> wid:int -> ht:int -> file:string -> unit
c2e55943faffd369466a222d69d1a58e6d9eeb98bdcc1e33057f2fd7ea67d002
felixengelmann/act-r-sentence-parser-em
sp-lv05.lisp
-*- mode : LISP ; Syntax : COMMON - LISP ; Base : 10 -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; ACT-R Sentence Parsing Model ;;; Copyright ( C ) 2006 , ;;; Extended by 2012/2013 to work with the EMMA eye ;;; movement model in ACT-R 6 ;;; ;;; Inclu...
null
https://raw.githubusercontent.com/felixengelmann/act-r-sentence-parser-em/0d063c8772a367ac57e7fc9f2e1611b2956734df/LewisVasishth2005/sp-lv05.lisp
lisp
Syntax : COMMON - LISP ; Base : 10 -*- ACT-R Sentence Parsing Model movement model in ACT-R 6 Includes the ACT-R Sentence Parsing Model processing =================================================================== The model is free software; you can redistribute it and/or modify either versi...
Copyright ( C ) 2006 , Extended by 2012/2013 to work with the EMMA eye German negative and positive polarity items as described in the Cognitive Science article , Bruessow & Lewis ( 2007 ) . The original English model is described in the Cognitive Science article Lewis & Vasishth ( 2004 ) . it unde...
dfc720847430a1fde8ad14aa13b9c23bbd8a35f9a5c06af80f8d665c13a13baf
everpeace/programming-erlang-code
a.erl
-module(a). -compile(export_all). start(Tag) -> spawn(fun() -> loop(Tag) end). loop(Tag) -> sleep(), Val = b:x(), io:format("Vsn1 (~p) b:x() = ~p~n",[Tag, Val]), loop(Tag). sleep() -> receive after 3000 -> true end.
null
https://raw.githubusercontent.com/everpeace/programming-erlang-code/8ef31aa13d15b41754dda225c50284915c29cb48/code/a.erl
erlang
-module(a). -compile(export_all). start(Tag) -> spawn(fun() -> loop(Tag) end). loop(Tag) -> sleep(), Val = b:x(), io:format("Vsn1 (~p) b:x() = ~p~n",[Tag, Val]), loop(Tag). sleep() -> receive after 3000 -> true end.
2d982b4f868e43818f6cb99ed0ff446d527fe7e1f7314a7adecc278f210c1814
harpocrates/inline-rust
FunctionPointerTypes.hs
# LANGUAGE QuasiQuotes , TemplateHaskell # module FunctionPointerTypes where import Language.Rust.Inline import Test.Hspec import Foreign.Storable import Foreign.Ptr import Data.Word ( Word ) import Data.Char ( ord ) extendContext functions extendContext basic setCrateModule [rust| extern...
null
https://raw.githubusercontent.com/harpocrates/inline-rust/5ecff8c92526000e5fc358a2dfede9b60ef59a1a/tests/FunctionPointerTypes.hs
haskell
# LANGUAGE QuasiQuotes , TemplateHaskell # module FunctionPointerTypes where import Language.Rust.Inline import Test.Hspec import Foreign.Storable import Foreign.Ptr import Data.Word ( Word ) import Data.Char ( ord ) extendContext functions extendContext basic setCrateModule [rust| extern...
e0827878ed21575816ed6b4670de093ea3beac46db1d3f3cc9982af05a1774da
rlepigre/ocaml-earley
option.mli
(**************************************************************************) (* *) (* OCaml *) (* *) (* ...
null
https://raw.githubusercontent.com/rlepigre/ocaml-earley/66d7acb2b22edae0c2f7d64ef2a50fa70d1ed112/ocaml_ast/src/option.mli
ocaml
************************************************************************ OCaml The...
Copyright 2018 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the * Option values . Option values explicitly indicate the presence or absence of a value . @since 4.08 Option values explicitly indicate the presence or ...