_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
5fac9460e7ee2afa6a5cc765c421f99f56ee2dbf49cf6d52926cf7a295dbfb53
bhaskara/programmable-reinforcement-learning
calisp-observer.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; concurrent-alisp/calisp-observer.lisp ;; Defines the <calisp-observer> abstract class and some generic functions. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-package calisp) ;;;;;;;;;;...
null
https://raw.githubusercontent.com/bhaskara/programmable-reinforcement-learning/8afc98116a8f78163b3f86076498d84b3f596217/lisp/concurrent-alisp/calisp-observer.lisp
lisp
concurrent-alisp/calisp-observer.lisp Defines the <calisp-observer> abstract class and some generic functions. kinds of messages that can be sent to an calisp-observer messages for debugging observers only
(in-package calisp) class defs (defclass <calisp-observer> (<rl-observer>) () (:documentation "Class <calisp-observer>. Subclass of rl:<rl-observer>. See calisp-observer package for documentation.")) (defclass <calisp-debugging-observer> (<calisp-observer>) () (:documentation "A kind of ob...
1aa196a30b1e22290880f074e0feccb141667be39b5bc0b8bd432a567458b514
csabahruska/jhc-components
Lint.hs
module Grin.Lint( lintCheckGrin, typecheckGrin, transformGrin, dumpGrin ) where import Control.Exception import Control.Monad.Reader import Data.Monoid import System.IO import qualified Data.Set as Set import Doc.DocLike import Grin.Grin import Grin.Show import Options import Support.CanType impor...
null
https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-grin/src/Grin/Lint.hs
haskell
f [Left b] (Store (NodeC n vs)) = hPrintf h "store(%s,%s,%s).\n" (dshow b) (dshow n) (if tagIsWHNF n then "true" else "false") f [Right (Var b _)] (Store (NodeC n vs)) = hPrintf h "store(%s,%s,%s).\n" (dshow b) (dshow n) (if tagIsWHNF n then "true" else "false") >> app n vs f [b] (Store x@Var {}) = do assig...
module Grin.Lint( lintCheckGrin, typecheckGrin, transformGrin, dumpGrin ) where import Control.Exception import Control.Monad.Reader import Data.Monoid import System.IO import qualified Data.Set as Set import Doc.DocLike import Grin.Grin import Grin.Show import Options import Support.CanType impor...
9b959fa8c925799e61429c0a68e31abacb4c4e293ca8d141df0b490b87216be1
Tritlo/spectacular
Operations.hs
# LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} For the ' Pathable ' instance for ' Node ' # OPTIONS_GHC -Wno - orphans # module Data.ECTA.Internal.ECTA.Operations ( -- * Traversal nodeMapChildren , pathsMatching , mapNodes , crush , onNormalNodes -- * Unfolding , unfoldOuterRe...
null
https://raw.githubusercontent.com/Tritlo/spectacular/00621f4f0f03e5d0afea3c730434a8842e473546/src/Data/ECTA/Internal/ECTA/Operations.hs
haskell
# LANGUAGE OverloadedStrings # * Traversal * Unfolding * Size operations * Union * Membership * Membership of templates * Intersection * Path operations * Reduction * Debugging instead of our single-threaded hashtable-based reimplementation. -----------------------------------------------------------------...
# LANGUAGE CPP # For the ' Pathable ' instance for ' Node ' # OPTIONS_GHC -Wno - orphans # module Data.ECTA.Internal.ECTA.Operations ( nodeMapChildren , pathsMatching , mapNodes , crush , onNormalNodes , unfoldOuterRec , refold , nodeEdges , unfoldBounded , nodeCount , edgeC...
77a4ab15070417457002556322a0d2e75c13ba9260cf4c6417004ef5b1778d8a
teamwalnut/graphql-ppx
multi_visitor.ml
module NullVisitor : Traversal_utils.VisitorSig = struct type t = unit include Traversal_utils.AbstractVisitor let make_self _ = () end module Visitor (H : Traversal_utils.VisitorSig) (T : Traversal_utils.VisitorSig) : Traversal_utils.VisitorSig = struct type t = H.t * T.t let make_self () = (H.make_sel...
null
https://raw.githubusercontent.com/teamwalnut/graphql-ppx/8276452ebe8d89a748b6b267afc94161650ab620/src/graphql_compiler/multi_visitor.ml
ocaml
module NullVisitor : Traversal_utils.VisitorSig = struct type t = unit include Traversal_utils.AbstractVisitor let make_self _ = () end module Visitor (H : Traversal_utils.VisitorSig) (T : Traversal_utils.VisitorSig) : Traversal_utils.VisitorSig = struct type t = H.t * T.t let make_self () = (H.make_sel...
08ba663f115968cd1ffaf3b438a7984bf897a1fde3517def79e1c2df2d07a081
LaurentMazare/ocaml-torch
wrapper.ml
open Ctypes let ptr_of_string str = let len = String.length str in let carray = CArray.make Ctypes.char (1 + len) in String.iteri (fun i char -> CArray.set carray i char) str; CArray.set carray len '\x00'; CArray.start carray let ptr_of_strings strings = let strings = List.map ptr_of_string strings in l...
null
https://raw.githubusercontent.com/LaurentMazare/ocaml-torch/46df099de0ba5f1ab92d2ca1fe8b6c5f25a0db62/src/wrapper/wrapper.ml
ocaml
open Ctypes let ptr_of_string str = let len = String.length str in let carray = CArray.make Ctypes.char (1 + len) in String.iteri (fun i char -> CArray.set carray i char) str; CArray.set carray len '\x00'; CArray.start carray let ptr_of_strings strings = let strings = List.map ptr_of_string strings in l...
9fb630a69122e15fb5f2fb7b62ddd3ae8e7b8ad2f7229faed2abdf8a0dd92e09
onedata/op-worker
bagit_archive.erl
%%%------------------------------------------------------------------- @author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%------------------------------------------------------------------- %%% @doc %%% This module is used to create an a...
null
https://raw.githubusercontent.com/onedata/op-worker/03ce55a83681d2bc2e80fd3d1723c67197f440ad/src/modules/archive/layouts/bagit/bagit_archive.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- @doc This module is used to create an archive which is compliant with Bagit format (RFC 8493). In case of this layout, files' JSON metadata are also archived. They are stor...
@author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . |--- f2.txt ( DS3 ) | | | | ( SL - > dataset_DS2 / archive_1234 / data / f.txt ) | |--- f2.txt ( SL - > dataset_...
5269b10496c19e5de2f37587f1cf8832c03f04b87717d6eb918c6c8272a72607
nikita-volkov/cases
Cases.hs
module Cases ( -- * Processor process, -- ** Case Transformers CaseTransformer, lower, upper, title, * * Delimiter, spinal, snake, whitespace, camel, -- * Default Processors spinalize, snakify, camelize, ) where import Cases.Prelude hiding (Word) import qualified Data.Attoparsec.Text...
null
https://raw.githubusercontent.com/nikita-volkov/cases/35832ed68f4b297199d6559d0ee3d7fa35ab6150/library/Cases.hs
haskell
* Processor ** Case Transformers * Default Processors * Part ----------------------- | A parsed info and a text of a part. ----------------------- | A parser, which does in-place processing, using the supplied 'Folder'. * Folders ----------------------- * CaseTransformers ----------------------- * API -------...
module Cases ( process, CaseTransformer, lower, upper, title, * * Delimiter, spinal, snake, whitespace, camel, spinalize, snakify, camelize, ) where import Cases.Prelude hiding (Word) import qualified Data.Attoparsec.Text as A import qualified Data.Text as T data Part = Word Case T.T...
75a89a61afbe8eea0aa0859a704811b606f802259131a7a83d9e7b06a5f3e31a
Dretch/foundationdb-explorer
Search.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # {-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # {-# LANGUAGE RankNTypes #-} # LANGUAGE TemplateHaskell # module FDBE.Component.Search (search) where impo...
null
https://raw.githubusercontent.com/Dretch/foundationdb-explorer/ec1e1592e72daa8b4f546f7a4413b0360e79b24d/src/FDBE/Component/Search.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE GADTs # # LANGUAGE RankNTypes # todo: allow selecting "Start"/"End" tuples?
# LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE TemplateHaskell # module FDBE.Component.Search (search) where import Control.Exception (displayException) import Control.Lens import qualified Data.F...
8bf30b527dbd1dbdeba39253c401bed71c34a602fa92a82a03ac71cca711f3b2
huangz1990/SICP-answers
p229-scale-stream.scm
;;; p229-scale-stream.scm (define (scale-stream stream factor) (stream-map (lambda (x) (* x factor)) stream))
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp3/code/p229-scale-stream.scm
scheme
p229-scale-stream.scm
(define (scale-stream stream factor) (stream-map (lambda (x) (* x factor)) stream))
6f7763c6641908a259b42b7e3aa792e67f1040d87372b8e45f69a040f8221168
typeclasses/assoc-list
test-with-hedgehog.hs
# LANGUAGE TemplateHaskell # import Data.AssocList.List.Concept import qualified Data.AssocList.List.Comparison import qualified Data.AssocList.List.Eq import qualified Data.AssocList.List.Equivalence import qualified Data.AssocList.List.Ord import qualified Data.AssocList.List.Predicate -- base import ...
null
https://raw.githubusercontent.com/typeclasses/assoc-list/c22ff8ba2057545015bccf24d71a14358b01627e/assoc-list/test/test-with-hedgehog.hs
haskell
base contravariant hedgehog ------------------------------------------------------------------------------ Data.AssocList.List.Comparison ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Data.AssocList.Li...
# LANGUAGE TemplateHaskell # import Data.AssocList.List.Concept import qualified Data.AssocList.List.Comparison import qualified Data.AssocList.List.Eq import qualified Data.AssocList.List.Equivalence import qualified Data.AssocList.List.Ord import qualified Data.AssocList.List.Predicate import GH...
5169cf5cf5fef1a8594c382cf0c85554f761555c77810eaa71a058c0b011c165
testcontainers/testcontainers-hs
Hspec.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # module TestContainers.Hspec ( -- * Running containers for tests withContainers, -- * Re-exports for convenience module Reexports, ) where import Control.Exception (bracket) import Control.Monad.IO.Class (liftIO...
null
https://raw.githubusercontent.com/testcontainers/testcontainers-hs/363a5c213698de9590eb65e7ae01f81dd8613aa2/src/TestContainers/Hspec.hs
haskell
# LANGUAGE RankNTypes # * Running containers for tests * Re-exports for convenience initialization and de-initialization of the containers. @ containers = do _redis <- TestContainers.run $ TestContainers.containerRequest TestContainers.redis _kafka <- TestContainers.run $ TestContainers.containerRequest Te...
# LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # module TestContainers.Hspec withContainers, module Reexports, ) where import Control.Exception (bracket) import Control.Monad.IO.Class (liftIO) import Control.Monad.Trans.Resource ( InternalState, getInternalState, liftResourceT, ) ...
a5d307fb47d985d13146b6069cb90fc5a8fef65e7daa17c0800f6b290b0d88f1
ghc/ghc
AArch64.hs
# OPTIONS_GHC -fno - warn - orphans # -- | Native code generator for AArch64 architectures module GHC.CmmToAsm.AArch64 ( ncgAArch64 ) where import GHC.Prelude import GHC.CmmToAsm.Instr import GHC.CmmToAsm.Monad import GHC.CmmToAsm.Config import GHC.CmmToAsm.Types import GHC.Utils.Outputable (ftext) import qualif...
null
https://raw.githubusercontent.com/ghc/ghc/37cfe3c0f4fb16189bbe3bb735f758cd6e3d9157/compiler/GHC/CmmToAsm/AArch64.hs
haskell
| Native code generator for AArch64 architectures | Instruction instance for aarch64
# OPTIONS_GHC -fno - warn - orphans # module GHC.CmmToAsm.AArch64 ( ncgAArch64 ) where import GHC.Prelude import GHC.CmmToAsm.Instr import GHC.CmmToAsm.Monad import GHC.CmmToAsm.Config import GHC.CmmToAsm.Types import GHC.Utils.Outputable (ftext) import qualified GHC.CmmToAsm.AArch64.Instr as AArch64 import qu...
c23ca0f34ff466a7aa6daa5bc85776a1b9b222aa21cb4983beb649a7543ea65e
malcolmreynolds/GSLL
laguerre.lisp
Regression test LAGUERRE for GSLL , automatically generated (in-package :gsl) (LISP-UNIT:DEFINE-TEST LAGUERRE (LISP-UNIT::ASSERT-NUMERICAL-EQUAL (LIST -1.0d0 2.220446049250313d-15) (MULTIPLE-VALUE-LIST (LAGUERRE-1 1.0d0 3.0d0))) ...
null
https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/tests/laguerre.lisp
lisp
Regression test LAGUERRE for GSLL , automatically generated (in-package :gsl) (LISP-UNIT:DEFINE-TEST LAGUERRE (LISP-UNIT::ASSERT-NUMERICAL-EQUAL (LIST -1.0d0 2.220446049250313d-15) (MULTIPLE-VALUE-LIST (LAGUERRE-1 1.0d0 3.0d0))) ...
d30d9233ab9dc8f694fefff08afaa24c7c95cc8078872a0f6c28c24c84b38ff9
spurious/sagittarius-scheme-mirror
sre.scm
#!read-macro=sagittarius/regex #!read-macro=sagittarius/debug ;; #!debug (import (rnrs) (text sre) (srfi :14) (srfi :64) (sagittarius) (sagittarius control) (sagittarius debug) (sagittarius regex)) (define (write-to-string o) (call-with-string-output-port (lambda (out) (write o out)))) (define (ast-equal? a...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/tests/text/sre.scm
scheme
#!debug for debugging to regard 'any as equal to char-set:full a bit awkward... regexp compiler is not so smart... | | | this doesn't work because of optimisation issue... (test-assert "embeded regexp" (re-equal? #/(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+(?:[1-9]|[12]\d|30|31)/ date)) ...
#!read-macro=sagittarius/regex #!read-macro=sagittarius/debug (import (rnrs) (text sre) (srfi :14) (srfi :64) (sagittarius) (sagittarius control) (sagittarius debug) (sagittarius regex)) (define (write-to-string o) (call-with-string-output-port (lambda (out) (write o out)))) (define (ast-equal? ast1 ast2) ...
84237bacfc10ce11f46fa8497bfc5bd32505a4bcfd3bdf0d32e8b1d825228f28
tolbrino/hotwheels
t.erl
Copyright ( c ) 2009 Oortle , Inc %%% Permission is hereby granted, free of charge, to any person %%% obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without restriction , %%% including without limitation the rights to use, copy, modify, merge, ...
null
https://raw.githubusercontent.com/tolbrino/hotwheels/8dca95a1f8e80e9d09c39158577588b40663a313/src/t.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation including without limitation the rights to use, copy, modify, merge, subject to the following conditions: The above copyright notice and this permission notice shall be included OR IMPLIE...
Copyright ( c ) 2009 Oortle , Inc files ( the " Software " ) , to deal in the Software without restriction , publish , distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is furnished to do so , in all copies or substantial portions of the Software . ...
2e9da33d8c81fcc385d6d6a49dafec6d81110c8ee460fcd749c15b27b8f9d503
clojure-interop/aws-api
AmazonLexModelBuildingAsyncClient.clj
(ns com.amazonaws.services.lexmodelbuilding.AmazonLexModelBuildingAsyncClient "Client for accessing Amazon Lex Model Building Service asynchronously. Each asynchronous method will return a Java overloads which accept an AsyncHandler can be used to receive notification when an asynchronous operation completes. ...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.lexmodelbuilding/src/com/amazonaws/services/lexmodelbuilding/AmazonLexModelBuildingAsyncClient.clj
clojure
(ns com.amazonaws.services.lexmodelbuilding.AmazonLexModelBuildingAsyncClient "Client for accessing Amazon Lex Model Building Service asynchronously. Each asynchronous method will return a Java overloads which accept an AsyncHandler can be used to receive notification when an asynchronous operation completes. ...
93f36c58e432ea38f419e26af4db961bcf8a5f517ece57d335a7db7fbdc6adfd
ygmpkk/house
ReceiverEvent.hs
-- #hide ----------------------------------------------------------------------------- -- | -- Module : OS.ReceiverEvent Copyright : ( c ) 2002 -- License : BSD-style -- -- Maintainer : -- Stability : provisional -- Portability : portable -- -- OS.ReceiverEvent defines the DeviceEventFunctio...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/ObjectIO/Graphics/UI/ObjectIO/OS/ReceiverEvent.hs
haskell
#hide --------------------------------------------------------------------------- | Module : OS.ReceiverEvent License : BSD-style Maintainer : Stability : provisional Portability : portable OS.ReceiverEvent defines the DeviceEventFunction for the receiver device. This function is placed in...
Copyright : ( c ) 2002 module Graphics.UI.ObjectIO.OS.ReceiverEvent where import Graphics.UI.ObjectIO.Device.Events import Graphics.UI.ObjectIO.Process.IOState import Graphics.UI.ObjectIO.OS.Event import Graphics.UI.ObjectIO.Id(IdParent(..)) import Data.IORef(readIORef) import Data.FiniteMap(lookupFM) ...
b61a5029fd7d303a7af784409dc3921c91f4faa42490ea2fae3645b7a028aa66
Decentralized-Pictures/T4L3NT
test_gas_properties.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2020 Nomadic Labs , < > (* ...
null
https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_112_Pt4FJEL6/lib_protocol/test/test_gas_properties.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2020 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 A...
041b8399b8cc13cbb664d09970acdff30046a8f26ba607adaa59fbe121a20ae2
facebook/infer
domain_used_globals.mli
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/facebook/infer/9d9a3a42b75697db86bc0da3092137f175782773/sledge/src/domain_used_globals.mli
ocaml
* Used-globals abstract domain * map of functions to globals they or their callees use * set of declared globals used in the program
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
3072ea0c95a6f5855ce15501c494823c0852d04007dc963cb81e5c1e916b2976
GU-CLASP/TypedFlow
TF.hs
# LANGUAGE InstanceSigs # | Module : TypedFlow . TF Description : Binding to tensorflow functions Copyright : ( c ) , 2017 License : LGPL-3 Maintainer : : experimental This module provides direct access to the most commonly used TensorFlow functions . Higher - level functions ar...
null
https://raw.githubusercontent.com/GU-CLASP/TypedFlow/710de52bb9dc43760cc0cf2c9a47bd8bd5dbf25f/TypedFlow/TF.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DeriveTraversable # # LANGUAGE GADTs # # LANGUAGE RankNTypes # # LANGUAGE TypeInType # * Variables, Parameters ** Parameters ** Persistent variables placeholder, peekAt, peekAtMany, * Operations ** Constants ** indexwise unary operators ** Indexwise binary operators **...
# LANGUAGE InstanceSigs # | Module : TypedFlow . TF Description : Binding to tensorflow functions Copyright : ( c ) , 2017 License : LGPL-3 Maintainer : : experimental This module provides direct access to the most commonly used TensorFlow functions . Higher - level functions ar...
29af7c237f8f312bbde2018e9ef50ba4312d33c86aab9d03f7812d6bb3b5f2d3
charlieg/Sparser
bbc.lisp
French swans have deadly bird flu. Three swans found dead in eastern France were victims of the H5N1 bird flu virus that can be fatal to humans, tests have confirmed. French officials raised the bird flu threat to high from moderate after the tests near the German border. This is only the second outbreak of H5N...
null
https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/corpus/bird-flu/french-swans/bbc.lisp
lisp
French swans have deadly bird flu. Three swans found dead in eastern France were victims of the H5N1 bird flu virus that can be fatal to humans, tests have confirmed. French officials raised the bird flu threat to high from moderate after the tests near the German border. This is only the second outbreak of H5N...
fb594a412a47ea75d0347763d4989b052899b34fc38edf335c60a2a659e84018
jml/servant-template
Main.hs
-- | Launch {{ cookiecutter.project_name }} server. module Main ( main ) where import Protolude import {{ cookiecutter.module_name }}.Server (startApp) main :: IO () main = startApp
null
https://raw.githubusercontent.com/jml/servant-template/d2a44b6466ad8091da8aad39027dbb995e02b3d2/%7B%7B%20cookiecutter.project_name%20%7D%7D/%7B%7B%20cookiecutter.project_name%20%7D%7D-server/cmd/Main.hs
haskell
| Launch {{ cookiecutter.project_name }} server.
module Main ( main ) where import Protolude import {{ cookiecutter.module_name }}.Server (startApp) main :: IO () main = startApp
726a02ea56cb7b35092f2fa787d1457ec06f209519963307a379ebd3832a2aa9
composewell/streamly
Async.hs
# LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - deprecations # #include "inline.hs" -- | Module : Streamly . Internal . Data . Stream . Async Copyright : ( c ) 2017 Composewell Technologies -- -- License : BSD3 -- Maintainer : -- Stability : experimental Portability : GHC -- -- To...
null
https://raw.githubusercontent.com/composewell/streamly/8629a0e806f5eea87d23650c540aa04176f25c43/src/Streamly/Internal/Data/Stream/Async.hs
haskell
| License : BSD3 Maintainer : Stability : experimental To run examples in this module: >>> import Control.Concurrent (threadDelay) >>> :{ delay n = do sleep for n seconds print " n sec " return n -- IO Int :} $setup >>> :set -fno-warn-deprecations >>> import Control.C...
# LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - deprecations # #include "inline.hs" Module : Streamly . Internal . Data . Stream . Async Copyright : ( c ) 2017 Composewell Technologies Portability : GHC > > > import qualified Streamly . Prelude as Stream # DEPRECATED " Please use . Int...
19f7d281dca46836d8007370105f894a7eb2c2b0c3e578957be8d355e1523a1b
pgj/mirage-kfreebsd
pa_cstruct.ml
* Copyright ( c ) 2012 Anil Madhavapeddy < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS...
null
https://raw.githubusercontent.com/pgj/mirage-kfreebsd/0ff5b2cd7ab0975e3f2ee1bd89f8e5dbf028b102/packages/cstruct/syntax/pa_cstruct.ml
ocaml
Generate functions of the form {get/set}_<struct>_<field>
* Copyright ( c ) 2012 Anil Madhavapeddy < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS...
c0a938240c18f00d6494d70066d40d14c7da88469668ed6189f00612de66e59b
mcorbin/tour-of-clojure
reduce.clj
;; sum of the element of a vector (println (reduce + [1 2 3 4 5])) ;; same thing using an anonymous function (println (reduce #(+ %1 %2) [1 2 3 4 5])) ;; Use an initial value (println (reduce + 30 [1 2 3 4 5])) Example of reduced : stop the computation if the accumulator is > 5 (println (reduce (fn [acc elem] (if ...
null
https://raw.githubusercontent.com/mcorbin/tour-of-clojure/57f97b68ca1a8c96904bfb960f515217eeda24a6/resources/public/pages/code/reduce.clj
clojure
sum of the element of a vector same thing using an anonymous function Use an initial value another example of reduce : filter non-even elements. In real world, you probably want to use filter instead of reduce for this.
(println (reduce + [1 2 3 4 5])) (println (reduce #(+ %1 %2) [1 2 3 4 5])) (println (reduce + 30 [1 2 3 4 5])) Example of reduced : stop the computation if the accumulator is > 5 (println (reduce (fn [acc elem] (if (> (+ acc elem) 5) (reduced elem) ...
4952fb7a34d6764f0ee15130627e078d95a0174b22668a4474a25abe9b2bd16f
finnishtransportagency/harja
tierekisteri_test.clj
(ns harja.domain.tierekisteri-test (:require [clojure.test :refer :all] [harja.testi :refer :all] [harja.domain.tierekisteri :as tierekisteri])) (deftest laske-tien-pituus (is (thrown-with-msg? AssertionError #"osien-pituudet oltava map tai nil" (tierekisteri/laske-t...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/ad8b7cb9fef894f715bf07bdc4858bc2b58c4716/test/clj/harja/domain/tierekisteri_test.clj
clojure
Tie puuttuu Vain osittainen tienumero
(ns harja.domain.tierekisteri-test (:require [clojure.test :refer :all] [harja.testi :refer :all] [harja.domain.tierekisteri :as tierekisteri])) (deftest laske-tien-pituus (is (thrown-with-msg? AssertionError #"osien-pituudet oltava map tai nil" (tierekisteri/laske-t...
b533d0f5190c31a5914a253f3e84b1b7a86a0d2d3aa461e7de802beeb57f8a5c
gadfly361/reagent-figwheel
model.cljs
(ns {{ns-name}}.models.bin.persist.model (:require [reagent.core :as reagent] [{{ns-name}}.models.app.navigation.model :as nav-model])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Cursor (def cursor-path [:bin :persist]) (defn app-state->cursor "Store data related to a given page in the bin that should persist eve...
null
https://raw.githubusercontent.com/gadfly361/reagent-figwheel/4c40657b31a2b358be5697add2e96e8cac6f8535/src/leiningen/new/reagent_figwheel/gadfly/src/app/models/bin/persist/model.cljs
clojure
(ns {{ns-name}}.models.bin.persist.model (:require [reagent.core :as reagent] [{{ns-name}}.models.app.navigation.model :as nav-model])) Cursor (def cursor-path [:bin :persist]) (defn app-state->cursor "Store data related to a given page in the bin that should persist even after navigating to and from ...
6955bcf16e7889cb83f7da251c84f339daa9958e7f2f42b16974bde8c644e509
LeifAndersen/interactive-syntax-clojure
prod.cljs
(ns interactive-syntax.prod (:require [interactive-syntax.core :as core])) ;;ignore println statements in prod (set! *print-fn* (fn [& _])) (core/init!)
null
https://raw.githubusercontent.com/LeifAndersen/interactive-syntax-clojure/1a74c7e42d828dc32faf49b2ccebb946304524e0/env/interactive_syntax/prod.cljs
clojure
ignore println statements in prod
(ns interactive-syntax.prod (:require [interactive-syntax.core :as core])) (set! *print-fn* (fn [& _])) (core/init!)
9823a1b38df1f645cb0682b73b43ccfe6c1e8f8eb302760ad9ab61df504fefcd
myuon/refluxive
Color.hs
# LANGUAGE CPP # module Data.Material.UI.Foundation.Color where import qualified SDL.Primitive as SDL #define COLOR(p,v) pattern p :: SDL.Color; pattern p = v COLOR(Red50, 0xffebee) COLOR(Red100, 0xffcdd2) COLOR(Red200, 0xef9a9a) COLOR(Red300, 0xe57373) COLOR(Red400, 0xef5350) COLOR(Red500, 0xf44336) COLOR(Red600, 0...
null
https://raw.githubusercontent.com/myuon/refluxive/611f891ccefa5d0289d15b11060e14a5e9e91a12/src/Data/Material/UI/Foundation/Color.hs
haskell
# LANGUAGE CPP # module Data.Material.UI.Foundation.Color where import qualified SDL.Primitive as SDL #define COLOR(p,v) pattern p :: SDL.Color; pattern p = v COLOR(Red50, 0xffebee) COLOR(Red100, 0xffcdd2) COLOR(Red200, 0xef9a9a) COLOR(Red300, 0xe57373) COLOR(Red400, 0xef5350) COLOR(Red500, 0xf44336) COLOR(Red600, 0...
b10f018f90a8c216fff7901a3615d84e94d1c7e617a01bdc68e9c822404bd485
slipstream/SlipStreamServer
internal_test.clj
(ns com.sixsq.slipstream.auth.internal-test (:require [clojure.test :refer :all] [com.sixsq.slipstream.auth.internal :as t] [com.sixsq.slipstream.auth.test-helper :as th] [com.sixsq.slipstream.ssclj.resources.lifecycle-test-utils :as ltu])) (use-fixtures :each ltu/with-test-server-fixture) (def vali...
null
https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi/test/com/sixsq/slipstream/auth/internal_test.clj
clojure
no users added FIXME: it's not possible to create a super user with auto template.
(ns com.sixsq.slipstream.auth.internal-test (:require [clojure.test :refer :all] [com.sixsq.slipstream.auth.internal :as t] [com.sixsq.slipstream.auth.test-helper :as th] [com.sixsq.slipstream.ssclj.resources.lifecycle-test-utils :as ltu])) (use-fixtures :each ltu/with-test-server-fixture) (def vali...
4258ababd488d63196e72ca92c51b6846a08ffbef9b7d5e68b6416aef1a34baa
raviksharma/bartosz-basics-of-haskell
tokenize2.hs
import Data.Char data Operator = Plus | Minus | Times | Div deriving (Show, Eq) data Token = TokOp Operator | TokIdent String | TokNum Int | TokSpace deriving (Show, Eq) operator :: Char -> Operator operator c | c == '+' = Plus | c == '-' = Minus | c == ...
null
https://raw.githubusercontent.com/raviksharma/bartosz-basics-of-haskell/86d40d831f61415ef0022bff7fe7060ae6a23701/07-tokenizer-higher-order-functions/tokenize2.hs
haskell
import Data.Char data Operator = Plus | Minus | Times | Div deriving (Show, Eq) data Token = TokOp Operator | TokIdent String | TokNum Int | TokSpace deriving (Show, Eq) operator :: Char -> Operator operator c | c == '+' = Plus | c == '-' = Minus | c == ...
d6406fb8b6c686baaa0e7c848cc40586b203ffe583cd681ffbb6cd690955c72a
urbanslug/graphite
matrix.rkt
#lang racket (require math/matrix) (provide display-matrix) (define (display-matrix m) (let-values ([(rows cols) (matrix-shape m)]) (for ([col (build-list cols values)]) (for ([row (build-list rows values)]) (printf "~a " (matrix-ref m row col))) (displayln ""))))
null
https://raw.githubusercontent.com/urbanslug/graphite/bcac6bd61172c52d1cc89c0bd0abe8ad3c6a6576/graphite/utils/matrix.rkt
racket
#lang racket (require math/matrix) (provide display-matrix) (define (display-matrix m) (let-values ([(rows cols) (matrix-shape m)]) (for ([col (build-list cols values)]) (for ([row (build-list rows values)]) (printf "~a " (matrix-ref m row col))) (displayln ""))))
01dd43d75dd93691658fc0c8ea3bd6710e98e26a157ccdbf3452a01242063180
darkleaf/effect
state.cljc
(ns darkleaf.effect.middleware.state (:require [darkleaf.generator.proto :as p])) (defn wrap-state [f*] (fn [initial & args] (let [state (atom initial) gen (apply f* args) process #(when (not (p/-done? gen)) (let [{:keys [tag args]} (p/-value gen) ...
null
https://raw.githubusercontent.com/darkleaf/effect/8a0bbc48eb55a93464d8668c67a4e94e06840423/src/darkleaf/effect/middleware/state.cljc
clojure
(ns darkleaf.effect.middleware.state (:require [darkleaf.generator.proto :as p])) (defn wrap-state [f*] (fn [initial & args] (let [state (atom initial) gen (apply f* args) process #(when (not (p/-done? gen)) (let [{:keys [tag args]} (p/-value gen) ...
b693b759e59e6b607d00f1183a7efe482537895d431a27df4fd60b722839e40d
secYOUre/taider
taider_caldate_SUITE.erl
Copyright ( c ) 2006 - 2011 , , Security Pillar Ltd ( secYOUre ) %% All rights reserved. %% %% Redistribution and use in source and binary forms, with or without %% modification, are permitted provided that the following conditions %% are met: %% %% * Redistributions of source code must retain the above %...
null
https://raw.githubusercontent.com/secYOUre/taider/1ce911af49f8f881b868f4a86bf7594dc0235e58/test/taider_caldate_SUITE.erl
erlang
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer...
Copyright ( c ) 2006 - 2011 , , Security Pillar Ltd ( secYOUre ) * Neither the name of Security Pillar Ltd nor the names of its " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT COPYRIGHT OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGE...
882515a74baee6e8703a48dd978d8cb09ece92a4da837654160ab4c388797a9e
cabol/cross_db
xdb_mnesia_adapter.erl
%%%------------------------------------------------------------------- %%% @doc Mnesia adapter . %%% Based on SumoDB mnesia adapter ` sumo_store_mnesia ' 2012 Inaka & lt;&gt ; %%% @reference See < a href=" / / sumo_db">SumoDB</a > %%% @end %%% @end %%%----------------------------------------------------------...
null
https://raw.githubusercontent.com/cabol/cross_db/365bb3b6cffde1b4da7109ed2594a0a3f1a4a949/src/adapters/xdb_mnesia_adapter.erl
erlang
------------------------------------------------------------------- @doc @reference See @end @end ------------------------------------------------------------------- =================================================================== Adapter callbacks ==============================================================...
Mnesia adapter . Based on SumoDB mnesia adapter ` sumo_store_mnesia ' 2012 Inaka & lt;&gt ; < a href=" / / sumo_db">SumoDB</a > -module(xdb_mnesia_adapter). -behaviour(xdb_adapter). -behaviour(xdb_adapter_transaction). -export([ insert/4, insert_all/4, update/5, delete/4, execute/5 ]). -export([ ...
31ffc6e8247af0048c0bd18ea5005f52416d5a94f589902c71f3c49168e0987b
agocorona/TCache
DefaultPersistence.hs
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE FlexibleInstances , UndecidableInstances , MultiParamTypeClasses , ExistentialQuantification , ScopedTypeVariables # MultiParamTypeClasses, ExistentialQuantification, ScopedTypeVariables #-} | This module decouples the ' IResource " class in two classes ...
null
https://raw.githubusercontent.com/agocorona/TCache/72158de657f72c3b480cea1878b5cebfbfd65d13/Data/TCache/DefaultPersistence.hs
haskell
| By default the index of a `Serializable` data persist with the data.
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE FlexibleInstances , UndecidableInstances , MultiParamTypeClasses , ExistentialQuantification , ScopedTypeVariables # MultiParamTypeClasses, ExistentialQuantification, ScopedTypeVariables #-} | This module decouples the ' IResource " class in two classes ...
42827a13c651e19adb386e697f4504ac526491eea5aa66249a541c207430d1b7
travelping/ergw_aaa
diameter_nasreq_SUITE.erl
Copyright 2017 - 2020 , Travelping GmbH < > %% This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . -module(diameter_...
null
https://raw.githubusercontent.com/travelping/ergw_aaa/d1efc6097afce19159dbdc2dee78accc22dbafdd/test/diameter_nasreq_SUITE.erl
erlang
This program is free software; you can redistribute it and/or Common Test callbacks =================================================================== Common Test callbacks =================================================================== =================================================================== Test c...
Copyright 2017 - 2020 , Travelping GmbH < > modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . -module(diameter_nasreq_SUITE). -compile([export_all, nowarn_export_all]). -incl...
5ed12900bd302a3785f83e45ca6f9deb369be215fcc4cb44962d06c68c4ab81a
janestreet/ecaml
test_auto_mode_alist.ml
open! Core open! Async_kernel open! Import open! Auto_mode_alist let%expect_test "[add]" = add [ { delete_suffix_and_recur = false ; filename_match = "foo" |> Regexp.quote ; function_ = Some ("foo-mode" |> Symbol.intern) } ]; print_s [%sexp (List.take (Current_buffer.value_exn auto_mode_a...
null
https://raw.githubusercontent.com/janestreet/ecaml/25a5a2972b3a94f5529a46363b37670a6c1de195/test/test_auto_mode_alist.ml
ocaml
open! Core open! Async_kernel open! Import open! Auto_mode_alist let%expect_test "[add]" = add [ { delete_suffix_and_recur = false ; filename_match = "foo" |> Regexp.quote ; function_ = Some ("foo-mode" |> Symbol.intern) } ]; print_s [%sexp (List.take (Current_buffer.value_exn auto_mode_a...
4cb3a6a2ff3cf495af6a3db4ede9978bb9bedd91b66af0f2820bbf65821015ff
skulup/pulserl
pulserl_consumer.erl
%%%------------------------------------------------------ Copyright 2022 Monime Ltd , licensed under the Apache License , Version 2.0 ( the " License " ) ; %%%------------------------------------------------------- -module(pulserl_consumer). -author("Alpha Umaru Shaw <>"). -include("pulserl.hrl"). -include("...
null
https://raw.githubusercontent.com/skulup/pulserl/97b8eb16d466f5c7591e5e7e06d825ff0c648901/src/pulserl_consumer.erl
erlang
------------------------------------------------------ ------------------------------------------------------- Producer API gen_Server API Consumer API gen_server callbacks Initial Positions Subscription types Local Messages Error Replies @deprecated start of consumer stuff end of consumer stuff Number of ...
Copyright 2022 Monime Ltd , licensed under the Apache License , Version 2.0 ( the " License " ) ; -module(pulserl_consumer). -author("Alpha Umaru Shaw <>"). -include("pulserl.hrl"). -include("pulsar_api.hrl"). -behaviour(gen_server). -export([start_link/2]). -export([create/2, close/1, close/2]). -export([...
c28b79611e017b453dc5ee86cf2207d56eab6fac723e1fba19603667b66f557d
billstclair/trubanc-lisp
swank-ccl.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; openmcl-swank.lisp --- SLIME backend for OpenMCL . ;;; Copyright ( C ) 2003 , < > ;;; ;;; This program is licensed under the terms of the Lisp Lesser GNU ;;; Public License, known as the LLGPL, and distributed with OpenMCL ;;; as the file "LICENSE". The LLGPL...
null
https://raw.githubusercontent.com/billstclair/trubanc-lisp/5436d2eca5b1ed10bc47eec7080f6cb90f98ca65/systems/slime/swank-ccl.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- This program is licensed under the terms of the Lisp Lesser GNU Public License, known as the LLGPL, and distributed with OpenMCL as the file "LICENSE". The LLGPL consists of a preamble and the LGPL, which is distributed with OpenMCL as the file "LGPL". Where these co...
openmcl-swank.lisp --- SLIME backend for OpenMCL . Copyright ( C ) 2003 , < > tested only with OpenMCL version 0.14 - 030901 on --- I would * Evaluation of forms with C - M - x. * File compilation with C - c C - k. * Most of the debugger functionality , except EVAL - IN - FRAME , * Macroexpanding w...
1df1fe01a44e22b7fb5350401fca7c50a4bfa17f33f94de72d98672102708458
GrammaTech/sel
sessions.lisp
;;; sessions.lisp --- Interface for managing RESTful sessions. ;;; ;;; This defines abilites to create new sessions and lookup existing sessions, ;;; managed by session client ID. ;;; ;;; @subsubsection Dependencies ;;; The Rest API leverages a number of Common Lisp components , which are open - source and generall...
null
https://raw.githubusercontent.com/GrammaTech/sel/a59174c02a454e8d588614e221cf281260cf12f8/rest/sessions.lisp
lisp
sessions.lisp --- Interface for managing RESTful sessions. This defines abilites to create new sessions and lookup existing sessions, managed by session client ID. @subsubsection Dependencies file for a full description and how to start a rest server. @subsubsection Resources and Operations underlying clien...
The Rest API leverages a number of Common Lisp components , which are open - source and generally available via Quicklisp . See the core REST A standard SEL Rest API supports logical resources , all driven by an - @code{max - population - size ( integer ) } : ( see - - chance ( float ) } : Cross...
5a12f38f5e7b84fa14b344b512b95c2915e4489aa08291db3719426e6295fd31
chaoxu/fancy-walks
GCD2.hs
import Control.Monad main = do cases <- liftM read getLine forM [1..cases] $ \_ -> do [a,b] <- liftM (map read.words) getLine print $ gcd a b
null
https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/codechef.com/GCD2.hs
haskell
import Control.Monad main = do cases <- liftM read getLine forM [1..cases] $ \_ -> do [a,b] <- liftM (map read.words) getLine print $ gcd a b
5463f17bd340a22a731809c7dc8f6124699560c358d4c39e4824d325026eaa82
ghilesZ/picasso
scale.ml
open Picasso open Colors open Apronext let env = Environmentext.make_s [||] [|"x1"; "x2"|] let mk_gen l = Generatorext.of_float_point env l let translate_gen dx dy = function | [x; y] -> [x +. dx; y +. dy] | _ -> invalid_arg "was a expecting a 2d generator" let _ = let r = Rendering.create ~abciss:"x1" ~o...
null
https://raw.githubusercontent.com/ghilesZ/picasso/ccb72ad62ff79bb3a4ec43238778333a682fe88a/examples/scale.ml
ocaml
open Picasso open Colors open Apronext let env = Environmentext.make_s [||] [|"x1"; "x2"|] let mk_gen l = Generatorext.of_float_point env l let translate_gen dx dy = function | [x; y] -> [x +. dx; y +. dy] | _ -> invalid_arg "was a expecting a 2d generator" let _ = let r = Rendering.create ~abciss:"x1" ~o...
282deae4b36bce7c97032a087fa44a80d4376edbc36630278cbff5ad9d214b58
Apress/beg-haskell
SimpleFunctions.hs
module Chapter2.SimpleFunctions where firstOrEmpty :: [[Char]] -> [Char] firstOrEmpty lst = if not (null lst) then head lst else "empty" (+++) :: [a] -> [a] -> [a] lst1 +++ lst2 = if null lst1 {- check emptyness -} then lst2 -- base case else (head lst1) : (tail lst1 +++ lst2) reve...
null
https://raw.githubusercontent.com/Apress/beg-haskell/aaacbf047d553e6177c38807e662cc465409dffd/chapter2/src/Chapter2/SimpleFunctions.hs
haskell
check emptyness base case
module Chapter2.SimpleFunctions where firstOrEmpty :: [[Char]] -> [Char] firstOrEmpty lst = if not (null lst) then head lst else "empty" (+++) :: [a] -> [a] -> [a] else (head lst1) : (tail lst1 +++ lst2) reverse2 :: [a] -> [a] reverse2 list = if null list then [] else ...
e6c41129953e84c7642aa818e55437a6be4542a5fed3fc5ee9b5e7e1f1c7fef4
input-output-hk/rscoin-haskell
ExplorerOptions.hs
| Command line options for Explorer module ExplorerOptions ( Options (..) , getOptions ) where import Options.Applicative (Parser, auto, execParser, fullDesc, help, helper, info, long, metavar, option...
null
https://raw.githubusercontent.com/input-output-hk/rscoin-haskell/109d8f6f226e9d0b360fcaac14c5a90da112a810/src/Explorer/ExplorerOptions.hs
haskell
| Command line options for Explorer module ExplorerOptions ( Options (..) , getOptions ) where import Options.Applicative (Parser, auto, execParser, fullDesc, help, helper, info, long, metavar, option...
04035935ad45db5e919bd17e8d1813d289f931e978c0ad4f79c4c225087c362d
saturn-lab/BDMI-2019S
fibonacci-卢星宇.hs
fibonacci :: ( Integral a) =>a->a fibonacci 0=0 fibonacci 1=1 fibonacci x=fibonacci (x-1) + fibonacci (x-2)
null
https://raw.githubusercontent.com/saturn-lab/BDMI-2019S/77f1e7a341a894f1c673e0f2340ccc37184c04b6/haskell/homework/fibonacci-%E5%8D%A2%E6%98%9F%E5%AE%87.hs
haskell
fibonacci :: ( Integral a) =>a->a fibonacci 0=0 fibonacci 1=1 fibonacci x=fibonacci (x-1) + fibonacci (x-2)
6738e440e3415e665a5f8caea7bc0642d09a3112ac8dba8b7f4411985ea6c497
simoncourtenage/quanthas
Currency.hs
module QuantHas.Currency (module QuantHas.Currency) where type Currency = String currencySymbol :: Currency -> String currencySymbol "GBP" = "£" currencySymbol "USD" = "$" currencySymbol "EUR" = "€"
null
https://raw.githubusercontent.com/simoncourtenage/quanthas/6e0b2cc9a60bb7d1709f98ed10d09aa6c071c8dd/src/QuantHas/Currency.hs
haskell
module QuantHas.Currency (module QuantHas.Currency) where type Currency = String currencySymbol :: Currency -> String currencySymbol "GBP" = "£" currencySymbol "USD" = "$" currencySymbol "EUR" = "€"
f9224ce77a0f33aa2e349f772e1ff03fc97dcc8db8d96f7a4028aa14b7aa2d88
Simre1/hero
Component.hs
module Hero.Component ( module Hero.Component.Component, module Hero.Component.Capabilities, module Hero.Component.Basic, module Hero.Component.Store.SparseSet, module Hero.Component.Store.Global, ) where import Hero.Component.Basic import Hero.Component.Capabilities import Hero.Component.Component...
null
https://raw.githubusercontent.com/Simre1/hero/61e18ad87e93b349c0bc453c405bfa76feda62bc/src/Hero/Component.hs
haskell
module Hero.Component ( module Hero.Component.Component, module Hero.Component.Capabilities, module Hero.Component.Basic, module Hero.Component.Store.SparseSet, module Hero.Component.Store.Global, ) where import Hero.Component.Basic import Hero.Component.Capabilities import Hero.Component.Component...
e552cfa104b31d10af430f71d618912db9b5d9b89eb1a50f9dfb1fc4df51769b
tanakh/Peggy
Arith.hs
# LANGUAGE QuasiQuotes # module Main (main) where data Parser s a = Parser parse :: (StringLike s) => Parser s a -> s -> a [peggy| php = stmtEmbed' : stmt* stmtEmbed' = (!"<?php" .)* <* ("<?php" / eof) stmt = "for" "(" exp? ";" exp? ";" exp? ")" stmt { StmtFor $1 $2 $3 $4 } / exp sep { StmtExp $1 } / stm...
null
https://raw.githubusercontent.com/tanakh/Peggy/78280548d137c9ada703de0e4c9af1cd3cb8f728/example/Arith.hs
haskell
# LANGUAGE QuasiQuotes # module Main (main) where data Parser s a = Parser parse :: (StringLike s) => Parser s a -> s -> a [peggy| php = stmtEmbed' : stmt* stmtEmbed' = (!"<?php" .)* <* ("<?php" / eof) stmt = "for" "(" exp? ";" exp? ";" exp? ")" stmt { StmtFor $1 $2 $3 $4 } / exp sep { StmtExp $1 } / stm...
4d32adadc811c2c4b0155309ecbaf7ba09630b7d8de458eecae73efa2245612e
commercialhaskell/rio
Types.hs
module RIO.Prelude.Types ( -- * @base@ -- ** Types * * * -- | Re-exported from "Data.Bool": Data.Bool.Bool(..) -- *** @Char@ (@String@) | Re - exported from " Data . " : , Data.Char.Char -- | Re-exported from "Data.String": , Data.String.String -- | Re-exported from "System.IO": ...
null
https://raw.githubusercontent.com/commercialhaskell/rio/4eba306d37a60a20f0bed27f40afc23a7c892c40/rio/src/RIO/Prelude/Types.hs
haskell
* @base@ ** Types | Re-exported from "Data.Bool": *** @Char@ (@String@) | Re-exported from "Data.String": | Re-exported from "System.IO": *** @Ordering@ | Re-exported from "Data.Ord": *** Numbers **** @Int@ | Re-exported from "Data.Int": ***** @Int16@ ***** @Int32@ ***** @Int64@ **** @Word@ | Re-exporte...
module RIO.Prelude.Types ( * * * Data.Bool.Bool(..) | Re - exported from " Data . " : , Data.Char.Char , Data.String.String , System.IO.FilePath , Data.Ord.Ordering(..) , Data.Int.Int * * * * * , Data.Int.Int8 , Data.Int.Int16 , Data.Int.Int32 , Data.Int.Int64 , Data.Word.Word , Dat...
0edcc64f289694a26d4350fe08e69d1d59433e9bd8ecd8a9da7dd1473027e6c3
mzp/coq-ruby
ppconstr.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ...
null
https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/parsing/ppconstr.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 **********************************************************************
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * i $ I d : ppconstr.mli 11...
336c38e9eabce790201996a69855dc105a14dad023441159d050546721113fed
alanz/ghc-exactprint
TH_unresolvedInfix.hs
# LANGUAGE TypeOperators # # LANGUAGE NoStarIsType # # LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # module Main where import TH_unresolvedInfix_Lib import Language.Haskell.TH -------------------------------------------------------------------------------- -- Expressions ...
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc810/TH_unresolvedInfix.hs
haskell
------------------------------------------------------------------------------ Expressions -- ------------------------------------------------------------------------------ ------------ Completely-unresolved bindings VarE version ------------- Completely-...
# LANGUAGE TypeOperators # # LANGUAGE NoStarIsType # # LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # module Main where import TH_unresolvedInfix_Lib import Language.Haskell.TH exprs = [ $( n +? (n *? n) ), $( (n +? n) *? n ), $( n +? (n +? n) ), $( (n +? n) +? n ), $( uInfixE n plus2 (uInfixE n plus2...
b0e1402451d2d8617a52bf5da55ae939e77e1c118d46734f9fcb3b119f7bd560
kbaird/consensus
consensus_party.erl
-module(consensus_party). %% API exports -export([ effective_number/1, make/2, make/3, name/1, seat_share/1, vote_share/1 ]). -include("include/parties.hrl"). %%==================================================================== %% API functions %%============================================...
null
https://raw.githubusercontent.com/kbaird/consensus/37a8e1e502435c8537e5dd3d3dff23bec5b95e2f/src/consensus_party.erl
erlang
API exports ==================================================================== API functions ==================================================================== See consensus:effective_num_parties for references ==================================================================== =================================...
-module(consensus_party). -export([ effective_number/1, make/2, make/3, name/1, seat_share/1, vote_share/1 ]). -include("include/parties.hrl"). -spec effective_number([party_result()]) -> number(). effective_number(PartyShares) -> 1 / sum_for(PartyShares). -spec make(party_name(), seat_shar...
3a1d8baf475ca2746b88669a7b3966d317959611c702886d3e8578f84566676c
titola/incudine
sndfile.lisp
Copyright ( c ) 2013 - 2021 ;;; ;;; This library is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your option ) any later version . ;;; ;;; This libra...
null
https://raw.githubusercontent.com/titola/incudine/624fc28c5df2f2b4804070297015d672ff773b0b/contrib/cl-sndfile/sndfile.lisp
lisp
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See...
Copyright ( c ) 2013 - 2021 version 2.1 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 USA (in-package :sndfile) (defclass info () ((frames :init...
e98ae419aeea2e974fc1f55c30e277422af53ccc100e12783ae979ac735e78ad
40ants/reblocks-text-editor
progress.lisp
(uiop:define-package #:reblocks-text-editor/blocks/progress (:use #:cl) (:import-from #:common-doc #:define-node)) (in-package #:reblocks-text-editor/blocks/progress) (define-node progress (common-doc:document-node) ((percent :initform 0 :accessor percent)) (:...
null
https://raw.githubusercontent.com/40ants/reblocks-text-editor/b80a3fd75a527c7be8615c19ba4d6e2951c9d3e4/src/blocks/progress.lisp
lisp
(uiop:define-package #:reblocks-text-editor/blocks/progress (:use #:cl) (:import-from #:common-doc #:define-node)) (in-package #:reblocks-text-editor/blocks/progress) (define-node progress (common-doc:document-node) ((percent :initform 0 :accessor percent)) (:...
b0f6de57be2e652769d779cfecbab6b0aaedf165bf3d6a119ddea6633f1bb3e1
fetburner/Coq2SML
polynomial.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/plugins/micromega/polynomial.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * : A reflexive tactic using ...
7b21ed39a1bfe1a7eecf6141a3aa326a23e3de0406d6f046ec7c703087482082
Elzair/nazghul
abandoned-farm.scm
;;---------------------------------------------------------------------------- ;; Abandoned Farm ;; The abandoned farm is a wrecked homestead . Not long ago ( weeks or at most ;; months) renegade trolls attacked, killing the husband and wife who lived ;; here. On start-of-game the trolls are still here, but they are ...
null
https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.001/abandoned-farm.scm
scheme
---------------------------------------------------------------------------- Abandoned Farm months) renegade trolls attacked, killing the husband and wife who lived here. On start-of-game the trolls are still here, but they are locked in a life-and-death battle with a group of giant wood spiders. The farm has a ...
The abandoned farm is a wrecked homestead . Not long ago ( weeks or at most burying their remains a quest item if I can , since the woman is 's daughter and 's mother . One or two very frightened sheep might also remain , and quite a few have (kern-mk-map 'm_abandoned_farm 32 32 pal_expanded (list "tt t...
95da9d609e4c9e9d89134893bdf26fcd53ee3f281839cb9ef98e9e54582f9a37
haskell-numerics/random-fu
Find.hs
- ` ` Data / Random / Internal / Find '' - Utilities for searching fractional domains . Needs cleanup , testing , - and such . Used for constructing generic ziggurats . - ``Data/Random/Internal/Find'' - Utilities for searching fractional domains. Needs cleanup, testing, - and such. ...
null
https://raw.githubusercontent.com/haskell-numerics/random-fu/68716ae55b960a978866991d89a024f5f1b0ba80/random-fu/src/Data/Random/Internal/Find.hs
haskell
|Given an upward-closed predicate on an ordered Fractional type, find the smallest value satisfying the predicate. |Given an upward-closed predicate on an ordered Fractional type, find the smallest value satisfying the predicate. Starts at the specified point with the specified stepsize, performs an exponential ...
- ` ` Data / Random / Internal / Find '' - Utilities for searching fractional domains . Needs cleanup , testing , - and such . Used for constructing generic ziggurats . - ``Data/Random/Internal/Find'' - Utilities for searching fractional domains. Needs cleanup, testing, - and such. ...
0b3064385b157fa0940894e26aa002ff04c064598d7c53b0947f8ad071e6f276
tek/ribosome
QuitReason.hs
module Ribosome.Menu.Data.QuitReason where data QuitReason = Aborted | Error Text deriving stock (Eq, Show)
null
https://raw.githubusercontent.com/tek/ribosome/a676b4f0085916777bfdacdcc761f82d933edb80/packages/menu/lib/Ribosome/Menu/Data/QuitReason.hs
haskell
module Ribosome.Menu.Data.QuitReason where data QuitReason = Aborted | Error Text deriving stock (Eq, Show)
2a6a4ed09f5111f94d9c588790d1db564ded0e1bedd91647f6ab4cb3c1db1a0f
Ball/ErlangMud
stubs.erl
-module(stubs). -include("src/records.hrl"). -export([fake_rooms/0,stop_fake_rooms/0,login_with_rooms/0]). fake_rooms() -> room:start_room(lobby, "Lobby", "It's a lobby", [#room_exit{direction="north", description="an archway", location_key=kitchen}]), room:start_room(kitchen, "Kitchen", "It's a ...
null
https://raw.githubusercontent.com/Ball/ErlangMud/13f1b68c046e470a26ebbfaf09077d209e572296/src/stubs.erl
erlang
-module(stubs). -include("src/records.hrl"). -export([fake_rooms/0,stop_fake_rooms/0,login_with_rooms/0]). fake_rooms() -> room:start_room(lobby, "Lobby", "It's a lobby", [#room_exit{direction="north", description="an archway", location_key=kitchen}]), room:start_room(kitchen, "Kitchen", "It's a ...
55a9e0676606047f86825008ad3f7f173941a9b9cf1674c62da1f1e5e51c0d56
clojure-quant/infra-guix
ntp.scm
(define-module (awb99 config ntp) #:use-module (oop goops) ; Defining classes and methods. #:use-module (gnu) #:use-module (gnu services networking) #:export (service-ntp) ) ; ntp is already in guix desktop services ; this ntp service is for bootstrapping only ;used in embedded machines (define service-nt...
null
https://raw.githubusercontent.com/clojure-quant/infra-guix/54783cba5333fad5cc105f5279f6b94285f980c7/modules/awb99/config/ntp.scm
scheme
Defining classes and methods. ntp is already in guix desktop services this ntp service is for bootstrapping only used in embedded machines (sensor '("udcf0 correction 70000")) Prevent moving to year 2116.
(define-module (awb99 config ntp) #:use-module (gnu) #:use-module (gnu services networking) #:export (service-ntp) ) (define service-ntp (service openntpd-service-type (openntpd-configuration (listen-on '("127.0.0.1" "::1")) (constraint-from '("www.gnu.org")) (constraints-from '("/"))...
792c7583760f4e811fd64873b420320ae5d4d2a3c3d9819cb0af050cc34bc25d
DanielG/cabal-helper
Sandbox.hs
cabal - helper : Simple interface to Cabal 's configuration state Copyright ( C ) 2015 - 2017 < > -- SPDX - License - Identifier : Apache-2.0 -- 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...
null
https://raw.githubusercontent.com/DanielG/cabal-helper/0e9df088226d80669dd0882ed743bca871dce61c/src/CabalHelper/Compiletime/Sandbox.hs
haskell
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 | Module : CabalHelper.Shared.Sandbox Description : Extracting information from @cabal.sandbox.config@ files License : Apache-2.0 | Get the path to the sandbox package-db in a project ^ Pa...
cabal - helper : Simple interface to Cabal 's configuration state Copyright ( C ) 2015 - 2017 < > SPDX - License - Identifier : Apache-2.0 Licensed under the Apache License , Version 2.0 ( the " License " ) ; module CabalHelper.Compiletime.Sandbox where import Control.Applicative import Data.Char import...
ac00953b2dd95c0daa424e28dd34716e48fbf6badbf8f017746fe9da5a03bf7f
krestenkrab/triq
triq_autoexport.erl
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- %% ex: ts=4 sw=4 et %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicabl...
null
https://raw.githubusercontent.com/krestenkrab/triq/c7306b8eaea133d52140cb828817efb5e50a3d52/src/triq_autoexport.erl
erlang
ex: ts=4 sw=4 et 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 langu...
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > @author Kresten < > 2006 - 2014 @private @doc Parse transform for automatic expor...
98e80d313693862953eb9e6e7069b024b1a51dba9004f73de4d55becac5fa930
jserot/hocl
dif.ml
(**********************************************************************) (* *) This file is part of the HOCL package (* *) Copyright ( c ) 2019 - prese...
null
https://raw.githubusercontent.com/jserot/hocl/7ab1dba918e64c3cdbc446e5f2c0cba37181bccf/src/dif.ml
ocaml
******************************************************************** All rights reserved. ...
This file is part of the HOCL package Copyright ( c ) 2019 - present , ( ) . DIF backend open Printf open Interm open Semval open Backend type dif_config = { node_prefix: string; edge_prefix: string; } let cfg = { node_prefix = "n"; edge_prefix = "e"; } let node_id...
13513f4f938b2d0f3be3d9f22a0b644d617223bb65d389ce80013bce351b4855
johnlawrenceaspden/hobby-code
word-count.clj
(use 'clojure.contrib.duck-streams) (use 'clojure.contrib.pprint) (require 'clojure.contrib.str-utils2) (defn count-line [line] (reduce (fn [m s] (assoc m s (inc (get m s 0)))) {} (clojure.contrib.str-utils2/split line #"\W+"))) (count-line "you suck you do") (defn find-widely [filename] (apply merge-...
null
https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/word-count.clj
clojure
(use 'clojure.contrib.duck-streams) (use 'clojure.contrib.pprint) (require 'clojure.contrib.str-utils2) (defn count-line [line] (reduce (fn [m s] (assoc m s (inc (get m s 0)))) {} (clojure.contrib.str-utils2/split line #"\W+"))) (count-line "you suck you do") (defn find-widely [filename] (apply merge-...
6598e94670a0bcf49cb3d68ea07fb640d76c08e350d0a4e6cd23ea99044badf4
toolslive/camltc
camltc.mli
Copyright ( 2010 - 2014 ) INCUBAID BVBA Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software distribut...
null
https://raw.githubusercontent.com/toolslive/camltc/0f23bfb5b98e481f69c1ed548b3fc48376f8967c/src/camltc.mli
ocaml
* [put db key value] add to [db] the [key] to [value] binding. * [get db key] retrieve from [db] the value associated with [key]. @raise DOCUMENT_ME in case [key] was not found in [db]. * [get3 db key] DOCUMENT_ME * create a bdb for standalone use * close given bdb * delete given bdb (must have been closed b...
Copyright ( 2010 - 2014 ) INCUBAID BVBA Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software distribut...
40bc77136e0b43f4cce76362b9ab37f8b92ff24cc0eb4ab730b1ab4978450ff1
martintrojer/frinj
core.clj
Copyright ( c ) . All rights reserved . ;; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( -1.0.php ) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;; ...
null
https://raw.githubusercontent.com/martintrojer/frinj/e588c8e022f13a59e529c19bc78657a4284d4e72/src/frinj/core.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 ( c ) . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) (ns frinj.core (:require [frinj.cross :as cross])) (def ^:dynamic *debug* (atom false)) (defn enable-debug! [] (reset! *debug* true)) (def state (atom nil)) (declare clean-us) fjv is the core type representing values w/ UO...
ec4205e5d3c54150249f97a6165a2428f1dfad022310826ea715f6997e29cdea
jmgimeno/okasaki-clojure
leftist_heap.clj
(ns okasaki.leftist-heap (:refer-clojure :exclude [merge]) (:use datatype.core)) (defdatatype ::LeftistHeap Empty (Node rank min left right)) (declare merge rank makeT insert findMin deleteMin) (defun ^:private merge ;;[heap1 heap2] [h Empty] h [Empty h] h [([Node _ x a1 b1] :...
null
https://raw.githubusercontent.com/jmgimeno/okasaki-clojure/f3e8031d490f5505b74f4a7593f0f9e2e5fe79f3/src/okasaki/leftist_heap.clj
clojure
[heap1 heap2] [heap] [heap] [heap]
(ns okasaki.leftist-heap (:refer-clojure :exclude [merge]) (:use datatype.core)) (defdatatype ::LeftistHeap Empty (Node rank min left right)) (declare merge rank makeT insert findMin deleteMin) (defun ^:private merge [h Empty] h [Empty h] h [([Node _ x a1 b1] :as h1) ([Node _ y a2...
5033d4168d4fdcfa0bb77c709ca3e6921d89a985788f935d8757fc2cc975bebf
anonymous-admin/anonymous
msg_sender.erl
-module(msg_sender). -compile(export_all). register_nickname(Nickname) -> Pid = spawn(msg_sender, handle_messages, [Nickname]), msg_controller:register_nick(Nickname, Pid). unregister_nickname(Nickname) -> msg_controller:unregister_nick(Nickname). init_reciever(ProcessName) -> msg_controller ! {reg...
null
https://raw.githubusercontent.com/anonymous-admin/anonymous/0d178f8f02dce74d5f76d78f81f70da9229a77cd/run%20Torrent%20client/msg_sender.erl
erlang
-module(msg_sender). -compile(export_all). register_nickname(Nickname) -> Pid = spawn(msg_sender, handle_messages, [Nickname]), msg_controller:register_nick(Nickname, Pid). unregister_nickname(Nickname) -> msg_controller:unregister_nick(Nickname). init_reciever(ProcessName) -> msg_controller ! {reg...
631bb571092cffebf30ddb1d566981696e71140e09e3ce0439129822f3aefa5a
mdsebald/link_blox_app
lblx_i2c_hd44780.erl
%%% @doc BLOCKTYPE %%% LCD driver for display using HD44780 chip, with I2C interface %%% DESCRIPTION %%% Drive a LCD connected to the I2C bus %%% Input value strings are displayed on the LCD. %%% The display may be divided into an arbitrary number of segments. %%% Each segment has a separate block input, and the %%...
null
https://raw.githubusercontent.com/mdsebald/link_blox_app/64034fa5854759ad16625b93e3dde65a9c65f615/src/block_types/lblx_i2c_hd44780.erl
erlang
@doc LCD driver for display using HD44780 chip, with I2C interface DESCRIPTION Drive a LCD connected to the I2C bus Input value strings are displayed on the LCD. The display may be divided into an arbitrary number of segments. Each segment has a separate block input, and the starting row and column number fie...
BLOCKTYPE -module(lblx_i2c_hd44780). -author("Mark Sebald"). -include("../block_state.hrl"). -export([groups/0, version/0]). -export([create/2, create/4, create/5, upgrade/1, initialize/1, execute/2, delete/1]). groups() -> [output, display, i2c_device]. version() -> "0.1.0". -spec default_configs(BlockN...
df8f291a5520f2cd6be69fc554f449f9a9b4aa28dbe56b439c598e2b84cc3f75
scalar-labs/scalar-jepsen
core_test.clj
(ns cassandra.core-test (:require [clojure.test :refer :all] [jepsen.control :as c] [jepsen.db :as db] [jepsen.control.util :as cu] [jepsen.generator :as gen] [jepsen.os.debian :as debian] [cassandra.core :as cass] [qbits.alia :as ali...
null
https://raw.githubusercontent.com/scalar-labs/scalar-jepsen/66b08cccad256241e09ac4140a58e2d1574df517/cassandra/test/cassandra/core_test.clj
clojure
(ns cassandra.core-test (:require [clojure.test :refer :all] [jepsen.control :as c] [jepsen.db :as db] [jepsen.control.util :as cu] [jepsen.generator :as gen] [jepsen.os.debian :as debian] [cassandra.core :as cass] [qbits.alia :as ali...
62932b3675a8b4af4e469c7e144e4796bd2be9fc001e3ab4d596ced6be4a3f38
exercism/erlang
series_tests.erl
Generated with ' v0.2.0 ' %% Revision 1 of the exercises generator was used -specifications/raw/42dd0cea20498fd544b152c4e2c0a419bb7e266a/exercises/series/canonical-data.json %% This file is automatically generated from the exercises canonical data. -module(series_tests). -include_lib("erl_exercism/include/exerci...
null
https://raw.githubusercontent.com/exercism/erlang/57ac2707dae643682950715e74eb271f732e2100/exercises/practice/series/test/series_tests.erl
erlang
Revision 1 of the exercises generator was used This file is automatically generated from the exercises canonical data.
Generated with ' v0.2.0 ' -specifications/raw/42dd0cea20498fd544b152c4e2c0a419bb7e266a/exercises/series/canonical-data.json -module(series_tests). -include_lib("erl_exercism/include/exercism.hrl"). -include_lib("eunit/include/eunit.hrl"). '1_slices_of_one_from_one_test_'() -> {"slices of one from one", ...
e10187f33e428daeded46607c3f91a3e73556d17da60269c9ff17dbf715bb1a9
sadiqj/ocaml-esp32
toploop.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/toplevel/toploop.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Format Accessors for the table of toplevel value bindings . These functions must appear as...
d65a90d360305f568dc7ff506e320e830eeb1fe33b1aa5e749b850ad26732f4a
sneerteam/sneer
blocking.clj
(ns rx.lang.clojure.blocking "Blocking operators and functions. These should never be used in production code except at the end of an async chain to convert from rx land back to sync land. For example, to produce a servlet response. If you use these, you're a bad person. " (:refer-clojure :exclude [first i...
null
https://raw.githubusercontent.com/sneerteam/sneer/b093c46321a5a42ae9418df427dbb237489b7bcb/core/src/main/clojure/rx/lang/clojure/blocking.clj
clojure
(ns rx.lang.clojure.blocking "Blocking operators and functions. These should never be used in production code except at the end of an async chain to convert from rx land back to sync land. For example, to produce a servlet response. If you use these, you're a bad person. " (:refer-clojure :exclude [first i...
791758759c31ce6c46e89e420dde59933aac03ad7fd24598ad612a0381878790
fresnel/fresnel
Prism.hs
{-# LANGUAGE RankNTypes #-} # LANGUAGE TupleSections # module Fresnel.Prism ( -- * Prisms Prism , Prism' , IsPrism -- * Construction , prism , prism' -- * Elimination , withPrism , matching , matching' , is , isn't -- * Relations , only , nearly -- * Combinators , without , below , aside -- * Unpacked , Unp...
null
https://raw.githubusercontent.com/fresnel/fresnel/1e67954d750f0a71806419194b3e377b7f60f0d8/fresnel/src/Fresnel/Prism.hs
haskell
# LANGUAGE RankNTypes # * Prisms * Construction * Elimination * Relations * Combinators * Unpacked Construction Elimination Relations Combinators Unpacked
# LANGUAGE TupleSections # module Fresnel.Prism Prism , Prism' , IsPrism , prism , prism' , withPrism , matching , matching' , is , isn't , only , nearly , without , below , aside , UnpackedPrism(..) , unpackedPrism ) where import Control.Monad (guard) import Data.Bifunctor (Bifunctor(..)) import Data.Profunctor imp...
31fe7dfacd41f2b5e96f9f8d1b90d3b903683fc04a4645298e3168f39aead094
manuel-serrano/bigloo
server.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / bdb / bdb / Patient / server.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/bdb/bdb/Patient/server.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ *=====================================================================*/ *---------------------------...
* serrano / prgm / project / bigloo / bdb / bdb / Patient / server.scm * / * Author : * / * Creation : Tue Jul 27 17:12:42 1999 * / * Last change : Sun Mar 20 14:54:45 2005 ( serrano ) * / * Es...
37089a124e74b0250d062f2416c3743016f4e37ac7eaa97d276c38bbd47fdad3
tomgstevensphd/Common-Lisp-Utilities-in-Lispworks
U-capi-multi-column-list-panels.lisp
;;********************* U-capi-multi-column-list-panels.lisp *********** ;;---------------------------------------------------------------------------- ;; ;; examples/capi/choice/multi-column-list-panels.lisp ;; This example demonstrates the uses of multi - column list - panels in the CAPI . ;; To try it, co...
null
https://raw.githubusercontent.com/tomgstevensphd/Common-Lisp-Utilities-in-Lispworks/a937e4f5f0ecc2430ac50560b14e87ec3b56ea37/U-capi-multi-column-list-panels.lisp
lisp
********************* U-capi-multi-column-list-panels.lisp *********** ---------------------------------------------------------------------------- examples/capi/choice/multi-column-list-panels.lisp To try it, compile and load this file and then execute: ---------------------------------------------------...
This example demonstrates the uses of multi - column list - panels in the CAPI . ( CL - USER::TEST - MULTI - COLUMN - LIST - PANELS ) Copyright ( c ) 1987 - -2015 LispWorks Ltd. All rights reserved . (in-package "CL-USER") (defstruct multi-column-test-item name priority stat...
0fdde6a35dcf88f355c70d333c53a397d4b9fec74909c98d61abed10108cb181
phaazon/luminance
Texture1D.hs
# LANGUAGE CPP # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # ----------------------------------------------------------------------------- -- | Copyright : ( C ) 2015 , 2016 -- License : BSD3 -- Maintainer : < > -- Stability : experimental -- Portability : portable ------------------...
null
https://raw.githubusercontent.com/phaazon/luminance/88b8f40b8d1ceec1f8fd1a111ccaffec5d9283a8/src/Graphics/Luminance/Core/Texture1D.hs
haskell
--------------------------------------------------------------------------- | License : BSD3 Stability : experimental Portability : portable ---------------------------------------------------------------------------
# LANGUAGE CPP # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # Copyright : ( C ) 2015 , 2016 Maintainer : < > module Graphics.Luminance.Core.Texture1D where import Data.Foldable ( for_ ) import Data.Proxy ( Proxy(..) ) import Data.Vector.Storable ( unsafeWith ) import Foreign.Ptr ( castPtr...
d8a70a0395d1104adaa30df583e8215fa3bd635b6c0deb500d7eb61ed2f3e905
jbracker/supermonad
PPTAMCode.hs
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * H M T C * * ...
null
https://raw.githubusercontent.com/jbracker/supermonad/2595396a225a65b1dce6ed9a1ce59960f392a55b/examples/monad/hmtc/original/PPTAMCode.hs
haskell
[TAMInst] -> String TAMInst -> [MTInt] -> String Column widths ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- | Converts TAM code to a nicely laid-out textual representation for display purposes. ------------...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * H M T C * * ...
44e443df805c2a1d38c2f29897d4582b93fcbb24177725013cbe1776d985ed88
benoitc/opencouch
couch_btree.erl
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not % use this file except in compliance with the License. You may obtain a copy of % the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an " A...
null
https://raw.githubusercontent.com/benoitc/opencouch/fef7be42f37515a6f73e2dfbab74fea75188e415/src/couch_btree.erl
erlang
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 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(couch_btree). -export([open/2, open/3, query_modify/4, add/2, add_remove/3]). -export([fold/4, full_reduce/1, final_reduce/2, size/1, foldl/3, fold...
864e8d791e76bfc1060db839896010a7d53cd858233417d13648f0325d5ed044
ghc/testsuite
tcfail028.hs
! ! ! tests for ArityErr module TcFail where data A a b = B (A a)
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail028.hs
haskell
! ! ! tests for ArityErr module TcFail where data A a b = B (A a)
96ede69de19b61b3e0bbc6a2bb96e87f31f4d1ac33d436d5a0d75c6870fd10dd
lamdu/hypertypes
Infer.hs
# LANGUAGE FlexibleContexts # module Hyper.Infer ( infer , InferResultsConstraint , inferUVarsApplyBindings , module Hyper.Class.Infer , module Hyper.Class.Infer.Env , module Hyper.Class.Infer.InferOf , module Hyper.Infer.ScopeLevel , module Hyper.Infer.Result -- | Exported only f...
null
https://raw.githubusercontent.com/lamdu/hypertypes/161142e0d9f503194b85fb6f5b2a5907a1ae3783/src/Hyper/Infer.hs
haskell
| Exported only for SPECIALIZE pragmas | Perform Hindley-Milner type inference of a term
# LANGUAGE FlexibleContexts # module Hyper.Infer ( infer , InferResultsConstraint , inferUVarsApplyBindings , module Hyper.Class.Infer , module Hyper.Class.Infer.Env , module Hyper.Class.Infer.InferOf , module Hyper.Infer.ScopeLevel , module Hyper.Infer.Result , inferH ) where ...
ef9cc6bc7a16e446646629f15ef0c223526156836f83549c52dbba2daa627b60
uents/sicp
ch4-ambeval.scm
#lang racket ;;;;AMB EVALUATOR FROM SECTION 4.3 OF ;;;; STRUCTURE AND INTERPRETATION OF COMPUTER PROGRAMS ;;;;Matches code in ch4.scm. ;;;; To run the sample programs and exercises, code below also includes ;;;; -- enlarged primitive-procedures list -- support for Let ( as noted in footnote 56 , p.428 ) ;;;;This f...
null
https://raw.githubusercontent.com/uents/sicp/c29b2582feee452ec0714fdc1eec6b406b94cd27/ch4.3-amb-operator/ch4-ambeval.scm
scheme
AMB EVALUATOR FROM SECTION 4.3 OF STRUCTURE AND INTERPRETATION OF COMPUTER PROGRAMS Matches code in ch4.scm. To run the sample programs and exercises, code below also includes -- enlarged primitive-procedures list This file can be loaded into Scheme as a whole. **NOTE**This file loads the metacircular evaluator of ...
#lang racket -- support for Let ( as noted in footnote 56 , p.428 ) sections 4.1.1 - 4.1.4 , since it uses the expression representation , the two lines at the end of the file ch4-mceval.scm Note : It is loaded first so that the section 4.2 definition of eval overrides the definition from 4.1.1 (require...
936acae7af439c61474577937459b2b7ed09274735b589618148a3dc99cfaaf8
artyom-poptsov/guile-smc
run.scm
(use-modules (fsm)) (display (run-fsm '())) (newline)
null
https://raw.githubusercontent.com/artyom-poptsov/guile-smc/004aa372087877b74ae21aada8723b0c07cc6210/examples/compiler/run.scm
scheme
(use-modules (fsm)) (display (run-fsm '())) (newline)
d0b9602af8b41fa3074292bf1aebd811f586a479ef6be6fc45707b2f8eb84f56
noss/pgsql
pgsql_helper.erl
-module(pgsql_helper). -author(''). -export([prepare_insert/3, prepare_select/3, do_insert/2, transaction/3]). join(_Sep, [ Head ]) -> Head; join(Sep, [ Head | Tail ]) -> Head ++ Sep ++ join(Sep, Tail). times(1, Of) -> [ Of ]; times(N, Of) -> [ Of ] ++ times(N - 1, Of). columns(I, I) -> "$" ++ i...
null
https://raw.githubusercontent.com/noss/pgsql/c029f7895a3a1479c439d73b6ef1f3be598ea281/src/pgsql_helper.erl
erlang
-module(pgsql_helper). -author(''). -export([prepare_insert/3, prepare_select/3, do_insert/2, transaction/3]). join(_Sep, [ Head ]) -> Head; join(Sep, [ Head | Tail ]) -> Head ++ Sep ++ join(Sep, Tail). times(1, Of) -> [ Of ]; times(N, Of) -> [ Of ] ++ times(N - 1, Of). columns(I, I) -> "$" ++ i...
94ae2ba77218ff331626cdd8f52ba8eae4a04bb1419bc6ad0eb72379dd69681d
siers/zn
Version.hs
# LANGUAGE TemplateHaskell # {-# LANGUAGE OverloadedStrings #-} # OPTIONS_GHC -fforce - recomp # module Zn.Commands.Version where import Language.Haskell.TH import Zn.Commands.VersionInternal import Data.Text version :: Text version = $(LitE . StringL <$> runIO getVersion)
null
https://raw.githubusercontent.com/siers/zn/b78692910fc5c4c725b3133cb91f5e1e3da94808/src/Zn/Commands/Version.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # # OPTIONS_GHC -fforce - recomp # module Zn.Commands.Version where import Language.Haskell.TH import Zn.Commands.VersionInternal import Data.Text version :: Text version = $(LitE . StringL <$> runIO getVersion)
2b14348bc4408b3af4f053005af499bd32e7ef9fbb83f979dddb262479400493
synduce/Synduce
int_to_bool_list_pred.ml
* @synduce type ilist = INil | ICons of int * ilist type blist = BNil | BCons of bool * blist let rec ilist_to_blist = function | INil -> BNil | ICons(hd, tl) -> BCons(hd = 1, ilist_to_blist tl) let rec pred1 = function | BCons(hd, tl) -> hd && pred1_aux tl | BNil -> true and pred1_aux = function | B...
null
https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/benchmarks/unrealizable/int_to_bool_list_pred.ml
ocaml
* @synduce type ilist = INil | ICons of int * ilist type blist = BNil | BCons of bool * blist let rec ilist_to_blist = function | INil -> BNil | ICons(hd, tl) -> BCons(hd = 1, ilist_to_blist tl) let rec pred1 = function | BCons(hd, tl) -> hd && pred1_aux tl | BNil -> true and pred1_aux = function | B...
df09fedde2dbf7c8ee3208bc125f1f9507562987032b740f6c510f42f971aec3
Opetushallitus/ataru
phone.cljc
(ns ataru.fixtures.phone) (def phone-list {nil false "" false "05012345" true "+3585012345" true "050" false "+3585" true "050 1234 56" true "+358 50 1234 56" true "+358 50 12 34 56" ...
null
https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/test/cljc/unit/ataru/fixtures/phone.cljc
clojure
(ns ataru.fixtures.phone) (def phone-list {nil false "" false "05012345" true "+3585012345" true "050" false "+3585" true "050 1234 56" true "+358 50 1234 56" true "+358 50 12 34 56" ...
c7b3c2b6d550fc985d68b6b74f9d87dcd4341aeb4e0f7b74b9e6fdc4d9b65430
xh4/web-toolkit
connection.lisp
(in-package :websocket) (defclass connection () ((input-stream :initarg :input-stream :initform nil) (output-stream :initarg :output-stream :initform nil) (handshake-request :initarg :handshake-request :initform nil) (handshake-response :initarg :handshake-response :initform ...
null
https://raw.githubusercontent.com/xh4/web-toolkit/0876bd2a2d97da6738253ec3cfe7bf6502b39231/websocket/connection.lisp
lisp
:open, :closing, :closed (format t "Close connection with code: ~A, reason: ~A~%" code reason) A binary message was received Ping Pong Close
(in-package :websocket) (defclass connection () ((input-stream :initarg :input-stream :initform nil) (output-stream :initarg :output-stream :initform nil) (handshake-request :initarg :handshake-request :initform nil) (handshake-response :initarg :handshake-response :initform ...
9c4037bf72e2cd5eda1d88e830415aa98914052f8d77acfd40266d9ffeaf4ce9
zudov/haskell-comark
Syntax.hs
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} | A definition of Commonmark 's AST...
null
https://raw.githubusercontent.com/zudov/haskell-comark/b84cf1d5623008673402da3a5353bdc5891d3a75/comark-syntax/src/Comark/Syntax.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveTraversable # # LANGUAGE OverloadedStrings # # LANGUAGE ViewPatterns # * Block Elements * Inline Elements | A Document | Block elements | Thematic break | Block of code: info string, literal co...
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # | A definition of Commonmark 's AST module Comark.Syntax ( Doc(..) , Blocks , Block(..) , HeadingLevel(..) , ListType(..) , Delimiter(..) , BulletMarker(..) , Inlines , Inline(..) , normalize , asText )...
1f93c2f3ebd1d8bec3ba06bd97e6f7cc50eb455c03a4a3d78ef81778c9a759f5
timbertson/vdoml
event.mli
open Js_of_ocaml type response = Event_types_.response type 'msg result = 'msg Event_types_.result val get_response : 'msg result -> response val get_message : 'msg result -> 'msg option (* constructors *) val respond : response -> 'msg result val handle : 'msg -> 'msg result val return : response -> 'msg -> 'msg res...
null
https://raw.githubusercontent.com/timbertson/vdoml/fcbf81e89df989206bdad4a92327e593078525b2/src/event.mli
ocaml
constructors preconstructed messge-less responses
open Js_of_ocaml type response = Event_types_.response type 'msg result = 'msg Event_types_.result val get_response : 'msg result -> response val get_message : 'msg result -> 'msg option val respond : response -> 'msg result val handle : 'msg -> 'msg result val return : response -> 'msg -> 'msg result val handled : ...
137a959a987f6a16578dcea6f9ba6b1db19e5f269ff2c8a1c18889fde40b7fe6
input-output-hk/ouroboros-network
Storage.hs
# LANGUAGE CPP # module Test.Ouroboros.Storage (tests) where import qualified Test.Ouroboros.Storage.ChainDB as ChainDB import qualified Test.Ouroboros.Storage.FS as FS import qualified Test.Ouroboros.Storage.ImmutableDB as ImmutableDB import qualified Test.Ouroboros.Storage.LedgerDB as LedgerDB import qualified Test....
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/c82309f403e99d916a76bb4d96d6812fb0a9db81/ouroboros-consensus-test/test-storage/Test/Ouroboros/Storage.hs
haskell
The list of all tests
# LANGUAGE CPP # module Test.Ouroboros.Storage (tests) where import qualified Test.Ouroboros.Storage.ChainDB as ChainDB import qualified Test.Ouroboros.Storage.FS as FS import qualified Test.Ouroboros.Storage.ImmutableDB as ImmutableDB import qualified Test.Ouroboros.Storage.LedgerDB as LedgerDB import qualified Test....
1f741633f4fd63ef64a48a755bc3ea4fe0c184ae89ea8cd46d7f4d1bf8e8e09e
ormf/cm
dk1.lisp
(in-package :cm) ;;; Etude 1: Write a counterpoint receiver that plays back a ;;; transposed version of whatever the performer plays on the ;;; disklavier at a specified time interval in the future. (Risset) ;;; Etude 2: Change the receiver to play a "warped" (rescaled) version ;;; of the pianists input (Risset) ;;;...
null
https://raw.githubusercontent.com/ormf/cm/26843eec009bd6c214992a8e67c49fffa16d9530/doc/404B-SoundSynth-AlgoComp/www-camil.music.uiuc.edu_16080/classes/404B/lisp/dk1.lisp
lisp
Etude 1: Write a counterpoint receiver that plays back a transposed version of whatever the performer plays on the disklavier at a specified time interval in the future. (Risset) Etude 2: Change the receiver to play a "warped" (rescaled) version of the pianists input (Risset) Etude 3: Change the receiver to treat...
(in-package :cm) performed playse around some specfiied Etude 6 : Change the receiver to also accept input from the JV . JV keydowns will set the inversion point for the processing . Working with DK Pedal information . Pedal data is encoded as MIDI right pedal : 0 to 127 ( if DK in half - pedal m...
9436511750dacd7418d100e2b66d43934f658ed33bc63a6c7185ded2b454799b
Stratus3D/programming_erlang_exercises
nano_client.erl
-module(nano_client). -export([send_msg/3, receive_msgs/2, send/3]). % Define addresses as username - hostname tuples instead of an email address % {username, hostname} % Simple function for sending messages to a recipient identified by % username/hostname combination. send_msg(Username, Hostname, Msg) -> send(U...
null
https://raw.githubusercontent.com/Stratus3D/programming_erlang_exercises/e4fd01024812059d338facc20f551e7dff4dac7e/chapter_17/exercise_5/nano_client.erl
erlang
Define addresses as username - hostname tuples instead of an email address {username, hostname} Simple function for sending messages to a recipient identified by username/hostname combination. Receive all messages sent to a specific address
-module(nano_client). -export([send_msg/3, receive_msgs/2, send/3]). send_msg(Username, Hostname, Msg) -> send(Username, Hostname, {send_msg, Msg}). receive_msgs(Username, Hostname) -> send(Username, Hostname, get_all_msgs). send(Username, Hostname, Msg) -> {ok, Socket} = gen_tcp:connect(Hostname, 2345...
8d3e6bf7f51a3cde0cc3c2b726369675fd4de2769fd8314a78f822017592bde5
bufferswap/ViralityEngine
cube-map.lisp
(in-package #:virality.texture) (defmethod load-texture-data ((texture-type (eql :texture-cube-map)) texture context) ;; TODO: Validate that all mip_0 cube faces are the same size. The width and height must be identical ( square ) but need not be powers of two . (let* ((use-mipmaps-...
null
https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/src/texture/cube-map.lisp
lisp
TODO: Validate that all mip_0 cube faces are the same size. The width and TODO: This is not safe, need to check all of them. Check to ensure they all fit into texture memory. TODO: Refactor out of each method into validate-mipmap-images and generalize. TODO: print out the location of the failing image. Figure ou...
(in-package #:virality.texture) (defmethod load-texture-data ((texture-type (eql :texture-cube-map)) texture context) height must be identical ( square ) but need not be powers of two . (let* ((use-mipmaps-p (get-computed-applied-attribute texture :use-mipmaps)) (immutable-p ...
8c6a331a298b190f1068d7659995d5a84299a9a38c515037e897e0def75ad967
foreverbell/project-euler-solutions
18.hs
fromString :: [[String]] -> [[Int]] fromString s = map (\x -> map (\y -> read y) x) s dp :: Int -> [[Int]] -> [Int] dp 0 triangle = head triangle dp level triangle = zipWith (+) row (zipWith max (0 : bak) (bak ++ [0])) where row = head triangle bak = dp (level - 1) (tail triangle) solve :: Strin...
null
https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/18.hs
haskell
fromString :: [[String]] -> [[Int]] fromString s = map (\x -> map (\y -> read y) x) s dp :: Int -> [[Int]] -> [Int] dp 0 triangle = head triangle dp level triangle = zipWith (+) row (zipWith max (0 : bak) (bak ++ [0])) where row = head triangle bak = dp (level - 1) (tail triangle) solve :: Strin...
a7802f923242d893540216634b7c4a00ee59d6fb5988654c00dcbbb02ba48a9b
brendanhay/terrafomo
Resources.hs
-- This module is auto-generated. # LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - unused - imports # -- | Module : . ProfitBricks . Resources Copyright : ( c ) 2017 - 2018 License ...
null
https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-profitbricks/gen/Terrafomo/ProfitBricks/Resources.hs
haskell
This module is auto-generated. | Stability : auto-generated * profitbricks_datacenter * profitbricks_firewall * profitbricks_group * profitbricks_ipblock * profitbricks_ipfailover * profitbricks_lan * profitbricks_loadbalancer * profitbricks_server * profitbricks_share * profitbricks_snapshot * profitb...
# LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - unused - imports # Module : . ProfitBricks . Resources Copyright : ( c ) 2017 - 2018 License : Mozilla Public License , v. 2.0 ...
208759f77e4c449e251041f66f6bcee4acc040525b30797807af87f8e525aed2
reactorlabs/sourir
transform_assumption.ml
open Instr open Types open Transform_utils Inserts checkpoints at all program points * A checkpoint is a well - formed assumption point and a matching label . * For example : * checkpoint_1 : * assume [ ] ( func , version , checkpoint_1 ) [ mut x = & x ] * Initially the checkpoint is self refe...
null
https://raw.githubusercontent.com/reactorlabs/sourir/381289c294157e58b257ec8edb9d5005b8a66daf/transform_assumption.ml
ocaml
Can only insert checkpoints into an unoptimized function Removes all empty checkpoints with no incoming references Collect the targets (including the extra frames continuations) of all non empty checkpoints. * This is a fixedpoint computation since even when there are no guards it might be a target itself * ...
open Instr open Types open Transform_utils Inserts checkpoints at all program points * A checkpoint is a well - formed assumption point and a matching label . * For example : * checkpoint_1 : * assume [ ] ( func , version , checkpoint_1 ) [ mut x = & x ] * Initially the checkpoint is self refe...
a544abfc49ce771c893c06eac0df0e1813c43d231c8698541026b6f6e46f6abd
pouriya/sockerl
sockerl_server.erl
-module(sockerl_server). -export([start_link/3 ,start_link/4 ,listen_init/2 ,connector_init/2 ,handle_packet/3 ,handle_event/3 ,handle_call/4 ,handle_cast/3 ,handle_disconnect/2 ,code_change/3 ,timeout/2 ,srtimeout/2 ,termin...
null
https://raw.githubusercontent.com/pouriya/sockerl/77570b6a8769f5876fc9b44a7934bc101a909ad1/test/sockerl_SUITE_data/src/sockerl_server.erl
erlang
-module(sockerl_server). -export([start_link/3 ,start_link/4 ,listen_init/2 ,connector_init/2 ,handle_packet/3 ,handle_event/3 ,handle_call/4 ,handle_cast/3 ,handle_disconnect/2 ,code_change/3 ,timeout/2 ,srtimeout/2 ,termin...
3744223e57d6cd7ebf0ddae2a91099153921a85a12d06d81cfbbe85d4a2056ab
Stratus3D/programming_erlang_exercises
python_datetime.erl
-module(python_datetime). Since I am not really familiar with Python 's datetime class % I had to spend some time browsing the documentation to figure out what Erlang lacked . % Python 's datetime methods and Erlang 's equivalent function : % Python Erlang % __add__ None % __...
null
https://raw.githubusercontent.com/Stratus3D/programming_erlang_exercises/e4fd01024812059d338facc20f551e7dff4dac7e/chapter_4/exercise_4/python_datetime.erl
erlang
I had to spend some time browsing the documentation to figure Python Erlang __add__ None __eq__ == __ge__ >= __getattribute__ Not needed __gt__ > __hash__ Not needed __le__ ...
-module(python_datetime). Since I am not really familiar with Python 's datetime class out what Erlang lacked . Python 's datetime methods and Erlang 's equivalent function : All the other datetime methods are provided by Erlang functions in the erlang