_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
a636c50231e88a91525cab661f77cde8716673e7bb4707658f6b1d15258fbbcd
kazu-yamamoto/test-framework-th-prime
Parser.hs
# LANGUAGE CPP # module Test.Framework.TH.Prime.Parser ( unitPropTests , symbol, string ) where import Control.Applicative import Data.List import Language.Haskell.Exts.Extension import Language.Haskell.Exts.Parser #if MIN_VERSION_haskell_src_exts(1, 18, 0) import Language.Haskell.Exts.SrcLoc #endif import Lan...
null
https://raw.githubusercontent.com/kazu-yamamoto/test-framework-th-prime/2bdddeebeb88ce9824cf1c6c30cc8a2d1e3e1826/Test/Framework/TH/Prime/Parser.hs
haskell
-------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- to prevent "Ambiguous infix expression" ---------------------------...
# LANGUAGE CPP # module Test.Framework.TH.Prime.Parser ( unitPropTests , symbol, string ) where import Control.Applicative import Data.List import Language.Haskell.Exts.Extension import Language.Haskell.Exts.Parser #if MIN_VERSION_haskell_src_exts(1, 18, 0) import Language.Haskell.Exts.SrcLoc #endif import Lan...
ad7a2f2d1bca3a12c8c0a4286a8041bb511e7ba77657afca68078dc9f7671dcc
GaloisInc/elf-edit
Tag.hs
Copyright : ( c ) Galois , Inc 2016 - 2019 Maintainer : < > Defines the tags used in the dynamic section . Copyright : (c) Galois, Inc 2016-2019 Maintainer : Joe Hendrix <> Defines the tags used in the dynamic section. -} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE Patter...
null
https://raw.githubusercontent.com/GaloisInc/elf-edit/fb4699a2bba68c4d46ea3dee436f640c328fb682/src/Data/ElfEdit/Dynamic/Tag.hs
haskell
| Flags for the object being loaded | Start of encoded range (also DT_PREINIT_ARRAY) | Size in bytes of DT_PREINIT_ARRAY | The start of OS specific tags. Linux uses this value for DT_LOOS | The start of OS specific tags. | Prelinking timestamp | Size of conflict section. | Size of lbirary list | Feature sel...
Copyright : ( c ) Galois , Inc 2016 - 2019 Maintainer : < > Defines the tags used in the dynamic section . Copyright : (c) Galois, Inc 2016-2019 Maintainer : Joe Hendrix <> Defines the tags used in the dynamic section. -} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE Patter...
dc1ff0e3b1c80e7500b8b87702b6377094b1799ca236c183d6b931a2945c0bbd
inria-parkas/sundialsml
idas_sens_skel.ml
open Sundials TODO : write a proper and working example ... (* TODO: include the quadrature module in this skeleton. *) Initialize a session [ s ] per the skeleton at { ! Ida.session } or { ! Idas.Quadrature.init } {!Ida.session} or {!Idas.Quadrature.init} *) module Sens = Idas.Sensitivity ... (* Initial...
null
https://raw.githubusercontent.com/inria-parkas/sundialsml/0c46b0c6c067677af6ef8006260b9e697cc0562b/examples/ocaml/skeletons/idas_sens_skel.ml
ocaml
TODO: include the quadrature module in this skeleton. Initial value correction, if needed, should be held off until sensitivity calculations are activated below. Define the sensitivity problem Set sensitivity initial conditions Correct initial values (optional) Set optional inputs Advance the solution in...
open Sundials TODO : write a proper and working example ... Initialize a session [ s ] per the skeleton at { ! Ida.session } or { ! Idas.Quadrature.init } {!Ida.session} or {!Idas.Quadrature.init} *) module Sens = Idas.Sensitivity ... let p = Ida.RealArray.make np in let sp = { pvals = Some p; pbar = .....
264d46d55894709e1005f6f6c08e03e319ff6bf7386897208ae80e4c00f3a890
goldfirere/thesis
nonexample.hs
# LANGUAGE GADTs , DataKinds , PolyKinds , TemplateHaskell , TypeFamilies , ConstraintKinds , TypeOperators , MultiParamTypeClasses , FlexibleInstances , FlexibleContexts # ConstraintKinds, TypeOperators, MultiParamTypeClasses, FlexibleInstances, FlexibleContexts...
null
https://raw.githubusercontent.com/goldfirere/thesis/22f066bc26b1147530525aabb3df686416b3e4aa/hs/dephs/nonexample.hs
haskell
# LANGUAGE GADTs , DataKinds , PolyKinds , TemplateHaskell , TypeFamilies , ConstraintKinds , TypeOperators , MultiParamTypeClasses , FlexibleInstances , FlexibleContexts # ConstraintKinds, TypeOperators, MultiParamTypeClasses, FlexibleInstances, FlexibleContexts...
964c526eb48ff03e2ecaaba01aa12b846ae3af4844dcb8cdb4d0fd770696029d
ygmpkk/house
HughesPJ.hs
Hand converted to standard Haskell -- jcp * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * and ...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/HaXml/src/Text/PrettyPrint/HughesPJ.hs
haskell
jcp Line length Ribbons per line What to do with text What to do at the end Result jcp Line length Ribbons per line What to do with text What to do at the end Result Abstract renderStyle, -- Haskell 1.3 only Combining @Doc@ values Beside List version of <> Beside, separated by sp...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * and Pretty Printer Combinators * * ...
7be500a80ba9f73f8c4f9e483c699b51dc8814ce85f2aeb7921fa5ed72302c87
Beluga-lang/Beluga
monad.ml
module type MONAD = sig type +'a t val return : 'a -> 'a t val bind : ('a -> 'b t) -> 'a t -> 'b t val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t val compose : ('b -> 'c t) -> ('a -> 'b t) -> 'a -> 'c t val ( >=> ) : ('a -> 'b t) -> ('b -> 'c t) -> 'a -> 'c t end module Make (Monad : sig type +'a t v...
null
https://raw.githubusercontent.com/Beluga-lang/Beluga/4d1c1bd917daac43c304c527b155c12dba76391a/src/support/monad.ml
ocaml
module type MONAD = sig type +'a t val return : 'a -> 'a t val bind : ('a -> 'b t) -> 'a t -> 'b t val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t val compose : ('b -> 'c t) -> ('a -> 'b t) -> 'a -> 'c t val ( >=> ) : ('a -> 'b t) -> ('b -> 'c t) -> 'a -> 'c t end module Make (Monad : sig type +'a t v...
1f5f8ad0685feaa61473a45a6b657a5d7b75fd53b25298a3d074080924178359
ChrisPenner/comonads-by-example
Examples.hs
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveFoldable # {-# LANGUAGE DeriveTraversable #-} module Comonads.Cofree.Examples where import Comonads.Cofree import Data.Functor.Identity import Data.Functor.Const import Data.Functor.Compose import System.Directory import Control.Applicative import qualified Data.List.NonEmpt...
null
https://raw.githubusercontent.com/ChrisPenner/comonads-by-example/1d7626f759e59ac8019322612ed6d7ff00da75c9/src/Comonads/Cofree/Examples.hs
haskell
# LANGUAGE DeriveTraversable # When `m` is a Monoid - - Just return an empty list if reading children fails, or if it's a file not a dir. -
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveFoldable # module Comonads.Cofree.Examples where import Comonads.Cofree import Data.Functor.Identity import Data.Functor.Const import Data.Functor.Compose import System.Directory import Control.Applicative import qualified Data.List.NonEmpty as NE type Env e a = Cofree (Co...
fce6dff8d79a8313556ed577258ea256394211391bc85c5b99e5b50c4b85acb5
dylanmc/Haskell-PDF-Parsing-Library
Types.hs
-------------------------------------------------------------------- -- | Module : Text . -- Description : Representing PDF content Copyright : ( c ) , 2008 , 2009 -- License : BSD3 -- -- Maintainer: Dylan McNamee <> -- Stability : provisional -- Portability: portable -- -- Representing PDF content ...
null
https://raw.githubusercontent.com/dylanmc/Haskell-PDF-Parsing-Library/b62fb60dc645dba18d4370941ffa5fbf5dba8c0b/Text/PDF/Types.hs
haskell
------------------------------------------------------------------ | Description : Representing PDF content License : BSD3 Maintainer: Dylan McNamee <> Stability : provisional Portability: portable Representing PDF content ------------------------------------------------------------------ the following ar...
Module : Text . Copyright : ( c ) , 2008 , 2009 module Text.PDF.Types where import Data.Map as Map newtype PDFKey = PDFKey String deriving (Show, Ord, Eq) type PDFDictionaryMap = Map PDFKey PDFObject type PDFObjectMap = Map Int PDFObject type PDFPageList = [PDFPageParsed] type PDFDocumentRoot = PDF...
1e08092170ffa819d18366090a00932cd7cd6bbe2d9d108b923d99618388c4b5
coalton-lang/coalton
debug.lisp
(in-package #:coalton-impl) (defun coalton:print-value-db (&optional package) "Print the global value environment" (tc:print-value-db *global-environment* package)) (defun coalton:print-type-db (&optional package) "Print the global type environment" (tc:print-type-db *global-environment* package)) (defun coa...
null
https://raw.githubusercontent.com/coalton-lang/coalton/f4b810e78501345ae82a74eb4de761bd4b6924f0/src/debug.lisp
lisp
(in-package #:coalton-impl) (defun coalton:print-value-db (&optional package) "Print the global value environment" (tc:print-value-db *global-environment* package)) (defun coalton:print-type-db (&optional package) "Print the global type environment" (tc:print-type-db *global-environment* package)) (defun coa...
34c1b3c9e775a29dd3f99282072644422040fd18fa224b0bce2da876f824faef
fakedata-haskell/fakedata
TheItCrowd.hs
# LANGUAGE TemplateHaskell # {-# LANGUAGE OverloadedStrings #-} module Faker.TvShow.TheItCrowd where import Data.Text import Faker import Faker.Internal import Faker.Provider.TheItCrowd import Faker.TH $(generateFakeField "theItCrowd" "actors") $(generateFakeField "theItCrowd" "characters") $(generateFakeField "th...
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/e6fbc16cfa27b2d17aa449ea8140788196ca135b/src/Faker/TvShow/TheItCrowd.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # module Faker.TvShow.TheItCrowd where import Data.Text import Faker import Faker.Internal import Faker.Provider.TheItCrowd import Faker.TH $(generateFakeField "theItCrowd" "actors") $(generateFakeField "theItCrowd" "characters") $(generateFakeField "theItCrowd" "emails") $(generateFake...
80c942d3c135b6852ac27231df460d0957bfb93db81a8456aea4b1717c5276e1
sameerlal/OMakeMeAMarket
gui.ml
open Pervasives (* Make market around this value *) let tutorial_value = 100 (* TUTORIAL ALGORITHM TO ENSURE PLAYER MAKES PROGRESS TOWARDS THE PROPER INTERVAL *) (*Feedback type to be returned to player. *) type trade_feedback = Low | High | BigSpread | Okay [ check_good_interval bid ask ] is an option of...
null
https://raw.githubusercontent.com/sameerlal/OMakeMeAMarket/3bc5dcb8e58607ac199920243ea2564ad7f9b5f2/gui.ml
ocaml
Make market around this value TUTORIAL ALGORITHM TO ENSURE PLAYER MAKES PROGRESS TOWARDS THE PROPER INTERVAL Feedback type to be returned to player. [eval_trade bid ask] is a string message that acts as feedback to a [bid] and [ask]. *[parse_input_tut str] is the option that represents the commands i...
open Pervasives let tutorial_value = 100 type trade_feedback = Low | High | BigSpread | Okay [ check_good_interval bid ask ] is an option of either None or Some bool option . If interval is bad , then None . If interval is good but spread too large then Some false . Otherwise Some true . opti...
97a342a25635c6ae53410816c950e59de8333ca915c3141d7dabfe94d2e85de9
eyedouble/couchdb
couchdb_app.erl
%% @hidden -module(couchdb_app). -behaviour(application). -export([start/2, stop/1]). %%-------------------------------------------------------------------- %% Func: start/2 Returns : { ok , Pid } | { ok , Pid , State } | %% {error, Reason} %%--------------------------------------------...
null
https://raw.githubusercontent.com/eyedouble/couchdb/39830e536e803dfb492bfdb8b3644839cdd7e356/src/couchdb_app.erl
erlang
@hidden -------------------------------------------------------------------- Func: start/2 {error, Reason} -------------------------------------------------------------------- -------------------------------------------------------------------- Func: stop/1 Returns: any -----------------------------------...
-module(couchdb_app). -behaviour(application). -export([start/2, stop/1]). Returns : { ok , Pid } | { ok , Pid , State } | start(_Type, _StartArgs) -> application:ensure_all_started(hackney), couchdb_util:start_app_deps(couchdb), couchdb_sup:start_link(). stop(_State) -> ok.
faedf04bf4e000210821aa15ac3d085fe5a25ba0cd7191b57d42cc4cb0767086
heroku/logplex
logplex_report_handler.erl
Copyright ( c ) 2010 < > %% %% 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, publis...
null
https://raw.githubusercontent.com/heroku/logplex/fc520c44cf4687726d5d51464d3264ddc6abb0ba/src/logplex_report_handler.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell Software is furnished to do so, subject to the following condi...
Copyright ( c ) 2010 < > files ( the " Software " ) , to deal in the Software without copies of the Software , and to permit persons to whom the included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , -module(logplex_report_handle...
6342d70999574327dc6f840b787dfa66c6465d74ac676f9737541d04327e36ae
spurious/sagittarius-scheme-mirror
port.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; ;;; tls.scm - TLS 1.0 - 1.2 protocol library. ;;; Copyright ( c ) 2010 - 2013 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;;...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/rfc/tls/port.scm
scheme
coding : utf-8 ; -*- tls.scm - TLS 1.0 - 1.2 protocol library. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this lis...
Copyright ( c ) 2010 - 2013 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING (library (rfc tls port) (export tls-sock...
cd99bba9ab3a4dc6f09e3c6b8fd1ffe664bd882a33865384ee4bfc8cc7293d95
ndmitchell/extra
Partial.hs
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE CPP #-} -- | ConstraintKind synonym for marking partial functions module Partial(Partial) where -- Originally taken from the @safe@ package GHC has changed its opinion on the location a few times v0 : GHC 7.4.1 , has Constr...
null
https://raw.githubusercontent.com/ndmitchell/extra/dffea9e28d7adf9f4dd59236220d0c26f7d28ee4/src/Partial.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE KindSignatures # # LANGUAGE CPP # | ConstraintKind synonym for marking partial functions Originally taken from the @safe@ package extension and above produces a stack trace on failure. For example: @ myHead :: 'Partial' => [a] -> a myHead [] = error \"bad\"...
module Partial(Partial) where GHC has changed its opinion on the location a few times v0 : GHC 7.4.1 , has ConstraintKinds v1 : GHC 7.10.2 , base 4.8.1.0 = CallStack v2 : GHC 8.0.1 , base 4.9.0.0 = HasCallStack We never support GHC 7.10.2 style because that requires users to pass the FlexibleContexts #if ...
aeca0d9d971e64f58cfae96785c62fd393346cd1b35bc194720b1694d83bc3ea
emillon/bulletml
syntax.ml
* Abstract syntax of BulletML programs . (** Binary operations *) type op = | Add | Sub | Mul | Div | Mod type expr = | Num of float (** Constant *) | Op of op * expr * expr (** Binary operation *) | Param of int (** Function parameter *) * Random value between 0.0 and 1.0 * Difficulty factor , betwee...
null
https://raw.githubusercontent.com/emillon/bulletml/41f0509cd7d44aec0ca3bafec2dcb44de0df6a8a/bulletml/syntax.ml
ocaml
* Binary operations * Constant * Binary operation * Function parameter
* Abstract syntax of BulletML programs . type op = | Add | Sub | Mul | Div | Mod type expr = * Random value between 0.0 and 1.0 * Difficulty factor , between 0.0 and 1.0 let rec show_expr = let p_op = function | Add -> " +@ " | Sub -> " -@ " | Mul -> " *@ " | Div -> " /@ " | Mod -> " ...
490373bdec57ac9a3f98af325639dd686b67c43e272c7001fa48a4afc09275d7
josefs/Gradualizer
map_entry.erl
-module(map_entry). -export([f/0, g/0]). -spec f() -> #{bepa := apa}. f() -> #{apa => bepa}. -type typed_map() :: #{field_a := atom()}. -spec g() -> typed_map(). g() -> #{field_a => <<"ala ma kota">>}.
null
https://raw.githubusercontent.com/josefs/Gradualizer/208f5816b0157f282212fc036ba7560f0822f9fc/test/should_fail/map_entry.erl
erlang
-module(map_entry). -export([f/0, g/0]). -spec f() -> #{bepa := apa}. f() -> #{apa => bepa}. -type typed_map() :: #{field_a := atom()}. -spec g() -> typed_map(). g() -> #{field_a => <<"ala ma kota">>}.
67eec3d8c03b59ffef99db4e7f86f16b814d8bf40323f9b71c434ebf2f0c6700
korya/efuns
wX_tree.ml
(***********************************************************************) (* *) (* WXlib *) (* *) Fabrice Le Fessa...
null
https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/toolkit/wX_tree.ml
ocaml
********************************************************************* WXlib ...
Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt Copyright 1999 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . open Xtypes open WX_types type desc = node list and node = { mutable leaf_widget : contained; ...
d0cc2afe69e8c3257c685f67b5432a7c42bfccb19dde58a815e52aea86f6aa30
WhatsApp/erlt
rebar_prv_erlt.erl
Copyright ( c ) Facebook , Inc. and its affiliates . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing,...
null
https://raw.githubusercontent.com/WhatsApp/erlt/616a4adc628ca8754112e659701e57f1cd7fecd1/erltc/src/rebar_prv_erlt.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright ( c ) Facebook , Inc. and its affiliates . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , This code was adapted from earlier work by -module(rebar_prv_erlt). -export([init/1, run/3, compile_app/1, clean_ap...
3d975edf99947efced604e2036469e58a62e573c9be3955c5e382b0be6556f96
lpgauth/swirl
swirl_flow_example.erl
-module(swirl_flow_example). -include("../include/swirl.hrl"). -behavior(swirl_flow). -export([ map/3, reduce/3, output/4 ]). %% swirl_flow callbacks map(StreamName, Event, _MapperOpts) -> {{?L(type, Event), StreamName, ?L(exchange_id, Event), ?L(bidder_id, Event)}, {1, 10}}. reduce(_Flow, Ro...
null
https://raw.githubusercontent.com/lpgauth/swirl/0b6cbe6979d65d28c17fa13b7dbc798e9413806a/test/swirl_flow_example.erl
erlang
swirl_flow callbacks
-module(swirl_flow_example). -include("../include/swirl.hrl"). -behavior(swirl_flow). -export([ map/3, reduce/3, output/4 ]). map(StreamName, Event, _MapperOpts) -> {{?L(type, Event), StreamName, ?L(exchange_id, Event), ?L(bidder_id, Event)}, {1, 10}}. reduce(_Flow, Row, _ReducerOpts) -> ...
2e53410720e44654e8e5a073331f1f38061bbea0f0e68763ec951d41fe5fc889
dyzsr/ocaml-selectml
x86_dsl.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/asmcomp/x86_dsl.mli
ocaml
************************************************************************ OCaml ...
, projet Gallium , INRIA Rocquencourt Copyright 2014 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the * Helpers for Intel code generators The DSL * modules expose functions to emit x86 / x86_64 instructions ...
854851ebf5b95ab2abeb09bc9789f4cf692d56fc4096c10ec9ce2d4da36b9b01
abooij/haskell-wayland
Wayland.hs
# LANGUAGE ScopedTypeVariables # module Graphics.Wayland ( version, Fixed256, Precision256, Time, Result(..), errToResult, diffTimeToTime, timeToDiffTime, ProtocolVersion(..), scannedVersionOf ) where import Foreign.C.Types import Data.Proxy import Graphics.Wayland.Internal.Util import Graphics.Wayland.Interna...
null
https://raw.githubusercontent.com/abooij/haskell-wayland/4afbc5a5c05bc436ca74dabe3c02dd1247a91304/Graphics/Wayland.hs
haskell
# LANGUAGE ScopedTypeVariables # module Graphics.Wayland ( version, Fixed256, Precision256, Time, Result(..), errToResult, diffTimeToTime, timeToDiffTime, ProtocolVersion(..), scannedVersionOf ) where import Foreign.C.Types import Data.Proxy import Graphics.Wayland.Internal.Util import Graphics.Wayland.Interna...
14eb5081f96adf6ebc92fb9c389b2471446a84bcc58fec2031851800027bf730
Simre1/haskell-game
Utils.hs
module Polysemy.Plugin.Fundep.Utils where import Control.Applicative import Data.Bifunctor import Data.List ------------------------------------------------------------------------------ | Returns the head of the list iff there is exactly one element . singleListToJust :: [a] -> Maybe a singleListToJust [a] = Ju...
null
https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/polysemy/polysemy-plugin/src/Polysemy/Plugin/Fundep/Utils.hs
haskell
---------------------------------------------------------------------------- ---------------------------------------------------------------------------- | Like 'Control.Monad.when', but in the context of an 'Alternative'. ---------------------------------------------------------------------------- | Count the number...
module Polysemy.Plugin.Fundep.Utils where import Control.Applicative import Data.Bifunctor import Data.List | Returns the head of the list iff there is exactly one element . singleListToJust :: [a] -> Maybe a singleListToJust [a] = Just a singleListToJust _ = Nothing whenA :: (Monad m, Alternative z) =...
9c46342cc7ca733f58981e02ca5ea86bf843d37058b1e81a5c3d49ae97b528cf
JuliaIDE/Juno-LT
tutorial.cljs
(ns lt.plugins.juno.tutorial (:require [lt.object :as object] [lt.objs.command :as cmd] [lt.objs.files :as files] [lt.objs.plugins :as plugins] [lt.objs.editor :as editor] [lt.objs.editor.pool :as pool] [lt.objs.opener :as opener] [lt...
null
https://raw.githubusercontent.com/JuliaIDE/Juno-LT/9c1608c9afca9ac2ce8c3d153d7ce277a37a0bb0/src/tutorial.cljs
clojure
(ns lt.plugins.juno.tutorial (:require [lt.object :as object] [lt.objs.command :as cmd] [lt.objs.files :as files] [lt.objs.plugins :as plugins] [lt.objs.editor :as editor] [lt.objs.editor.pool :as pool] [lt.objs.opener :as opener] [lt...
c863058ebf35deeb843255cce3638928e303abcd9d2cd96086c29aedd5f6587e
mirage/ocaml-vchan
port.mli
* Copyright ( c ) 2013 Citrix Systems Inc * * 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 IS ...
null
https://raw.githubusercontent.com/mirage/ocaml-vchan/69de0287d4eb732b42873f10c346f8473032591f/lib/port.mli
ocaml
* Copyright ( c ) 2013 Citrix Systems Inc * * 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 IS ...
bb51a0a995f9877f906101b2840717c1fba44bf4d00821caa8639d72ac71ce50
DomainDrivenArchitecture/dda-pallet
group_2_1.clj
Licensed to the Apache Software Foundation ( ASF ) under one ; or more contributor license agreements. See the NOTICE file ; distributed with this work for additional information ; regarding copyright ownership. The ASF licenses this file to you under the Apache License , Version 2.0 ( the ; "License"); you may not...
null
https://raw.githubusercontent.com/DomainDrivenArchitecture/dda-pallet/aa251ac1c678a46ef9183d9fb2d447c4f77a99d3/main/src/dda/cm/group_2_1.clj
clojure
or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required b...
Licensed to the Apache Software Foundation ( ASF ) under one to you under the Apache License , Version 2.0 ( the distributed under the License is distributed on an " AS IS " BASIS , (ns dda.cm.group-2-1 {:deprecated "2.1"} (:require [pallet.api :as api])) (defn group-spec [app-config server-specs] (let...
be24f290ccea5413bf5d56a50a40c8eebbfc77c66d2d5a3d3e6d55a97d1f3d9b
helium/blockchain-etl
be_db_account.erl
-module(be_db_account). -include("be_db_follower.hrl"). -include("be_db_worker.hrl"). -include_lib("blockchain/include/blockchain_vars.hrl"). -behavior(be_db_worker). -behavior(be_db_follower). be_db_worker -export([prepare_conn/1]). %% be_db_follower -export([init/1, load_block/6]). %% hooks -export([incremental_...
null
https://raw.githubusercontent.com/helium/blockchain-etl/1fcf7209d735049164c4d814e68c8573a6fd0479/src/be_db_account.erl
erlang
be_db_follower hooks transaction actors Merge in any accounts that are indirectly updated by the ledger and stashed in the module ets table
-module(be_db_account). -include("be_db_follower.hrl"). -include("be_db_worker.hrl"). -include_lib("blockchain/include/blockchain_vars.hrl"). -behavior(be_db_worker). -behavior(be_db_follower). be_db_worker -export([prepare_conn/1]). -export([init/1, load_block/6]). -export([incremental_commit_hook/1, end_commit_h...
341ac216802f534d25176d337beea806ad224900f4bb05cb58fc95f4727ef58b
Idorobots/spartan
freevars.rkt
#lang racket ;; Free vars computation. (require "../testing.rkt") (require "../../src/compiler/ast.rkt") (require "../../src/compiler/passes/freevars.rkt") (require "../../src/compiler/utils/set.rkt") (describe "free-vars" (it "handles values correctly" (define l (location 5 23)) (assert (compute-free-va...
null
https://raw.githubusercontent.com/Idorobots/spartan/ef3b032906655585d284f1c9a33a58f1e35cb180/test/compiler/freevars.rkt
racket
Free vars computation.
#lang racket (require "../testing.rkt") (require "../../src/compiler/ast.rkt") (require "../../src/compiler/passes/freevars.rkt") (require "../../src/compiler/utils/set.rkt") (describe "free-vars" (it "handles values correctly" (define l (location 5 23)) (assert (compute-free-vars (make-ast-number l 23))...
9c4c379bbadec373987045d4cb9f8169ace3c319a6f712b968dc75c81d9acd21
aggieben/weblocks
textarea.lisp
(in-package :weblocks) (export '(*textarea-rows* *textarea-cols* *max-textarea-input-length* textarea textarea-presentation textarea-presentation-rows textarea-presentation-cols)) ;;; some defaults (defparameter *textarea-rows* 5 "Default number of rows rendered in textarea") (defparameter *textarea-cols* 2...
null
https://raw.githubusercontent.com/aggieben/weblocks/8d86be6a4fff8dde0b94181ba60d0dca2cbd9e25/src/views/types/presentations/textarea.lisp
lisp
some defaults textarea
(in-package :weblocks) (export '(*textarea-rows* *textarea-cols* *max-textarea-input-length* textarea textarea-presentation textarea-presentation-rows textarea-presentation-cols)) (defparameter *textarea-rows* 5 "Default number of rows rendered in textarea") (defparameter *textarea-cols* 20 "Default numbe...
2d2168005e752731ebabf70e3dca1e819c3fa568ffd580ef137bee73fed4a48f
erikd/haskell-big-integer-experiment
karatsuba.hs
-- import Control.Monad import Data.Bits main :: IO () main = do isValidBase let result = karatsuba 123543512412 234452434456 expected = 28965077246238452467872 if result == expected then putStrLn "Good" else putStrLn $ " Result " ++ show result ++ " should be " ++ show expected ...
null
https://raw.githubusercontent.com/erikd/haskell-big-integer-experiment/7841ec3fcc5be219fa16963849bd12137112f8a9/karatsuba.hs
haskell
import Control.Monad import Data.Bits main :: IO () main = do isValidBase let result = karatsuba 123543512412 234452434456 expected = 28965077246238452467872 if result == expected then putStrLn "Good" else putStrLn $ " Result " ++ show result ++ " should be " ++ show expected kar...
49deed28f6f9463c701aa4733930de597e3824192f98ed194b224c1f2a34bf74
simplex-chat/simplexmq
M20220322_notifications.hs
# LANGUAGE QuasiQuotes # module Simplex.Messaging.Agent.Store.SQLite.Migrations.M20220322_notifications where import Database.SQLite.Simple (Query) import Database.SQLite.Simple.QQ (sql) m20220322_notifications :: Query m20220322_notifications = [sql| CREATE TABLE ntf_servers ( ntf_host TEXT NOT NULL, ntf_port...
null
https://raw.githubusercontent.com/simplex-chat/simplexmq/e75846aa38dd26fa70e3faa38ec780edf245e022/src/Simplex/Messaging/Agent/Store/SQLite/Migrations/M20220322_notifications.hs
haskell
apns ! this field is mislabeled and is actually saved as binary token ID assigned by notifications server client's public key to verify token commands (used by server, for repeat registraions) client's private key to sign token commands this is to check token status periodically to know when it was last checked
# LANGUAGE QuasiQuotes # module Simplex.Messaging.Agent.Store.SQLite.Migrations.M20220322_notifications where import Database.SQLite.Simple (Query) import Database.SQLite.Simple.QQ (sql) m20220322_notifications :: Query m20220322_notifications = [sql| CREATE TABLE ntf_servers ( ntf_host TEXT NOT NULL, ntf_port...
c053f92425e0966c899a29354e915080f42cbe0f13b64db391e39f91540f7cf1
commsor/titanoboa
channel.clj
Copyright ( c ) Commsor Inc. All rights reserved . ; The use and distribution terms for this software are covered by the ; GNU Affero General Public License v3.0 (/#AGPL) ; which can be found in the LICENSE at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; th...
null
https://raw.githubusercontent.com/commsor/titanoboa/ffe3e1e58f89169092d7b6a3a45e1707a0ecc9ee/src/clj/titanoboa/channel.clj
clojure
The use and distribution terms for this software are covered by the GNU Affero General Public License v3.0 (/#AGPL) which can be found in the LICENSE 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,...
Copyright ( c ) Commsor Inc. All rights reserved . (ns titanoboa.channel (:require [com.stuartsierra.component :as component] [clojure.core.async :as async :refer [>!! <!!]] [clojure.core.async.impl.protocols :refer [ReadPort WritePort]] [taoensso.nippy :as nippy] ...
6da9772a17234a66d001dd87fb9d0476b94ccb40b3e0711924612b175a6fed21
mattmundell/nightshade
packed.lisp
;;; Package and package directory editor, and package manager. (in-package "ED") (defvar *list-packages-max-indent* 25) (defun list-packages (packages stream) (let ((indent (min (+ (apply #'longest-length (mapcar #'package-name packages)) 2) *list-packages-max-indent*))) (mapc (lambda (pack...
null
https://raw.githubusercontent.com/mattmundell/nightshade/68e960eff95e007462f2613beabc6cac11e0dfa1/src/ed/packed.lisp
lisp
Package and package directory editor, and package manager. Packed mode. FIX offer to install FIX prompt Package management. FIX another in code:mh.lisp FIX improve sort-lines and sort the buffer lines instead of buffering here too Buffer meta info. Sort meta info. Insert meta info. FIX mv to package:commit...
(in-package "ED") (defvar *list-packages-max-indent* 25) (defun list-packages (packages stream) (let ((indent (min (+ (apply #'longest-length (mapcar #'package-name packages)) 2) *list-packages-max-indent*))) (mapc (lambda (package) (let ((nicks (package-nicknames package)) (packag...
cd5351fbe51d50546687910724881ad28995301460bddebd6b131b87b2355ee2
typelead/eta
TH_finalizer2.hs
import TH_finalizer2M main = print (f 0)
null
https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/templateHaskell/run/TH_finalizer2/TH_finalizer2.hs
haskell
import TH_finalizer2M main = print (f 0)
8e3a65b76bea01fab1dfd9b0362c7219cc6130c537d21a6e61230a4edee4a632
mark-watson/loving-common-lisp
nested.lisp
(flet ((add-one (x) (+ x 1)) (add-two (x) (+ x 2))) (format t "redefined variables: ~A ~A~%" (add-one 100) (add-two 100))) (let ((a 3.14)) (defun test2 (x) (print x)) (test2 a)) (test2 50) (let ((x 1) (y 2)) ;; define a test function nested inside a let statement: (flet ...
null
https://raw.githubusercontent.com/mark-watson/loving-common-lisp/32f6abf3d2e500baeffd15c085a502b03399a074/src/code_snippets_for_book/nested.lisp
lisp
define a test function nested inside a let statement: define a helper function nested inside a let/function/let: print a few blank lines, then test function 'test':
(flet ((add-one (x) (+ x 1)) (add-two (x) (+ x 2))) (format t "redefined variables: ~A ~A~%" (add-one 100) (add-two 100))) (let ((a 3.14)) (defun test2 (x) (print x)) (test2 a)) (test2 50) (let ((x 1) (y 2)) (flet ((test (a b) (let ((z (+ a b))) (fl...
c5df5b5916a992c9bacc99e9d0429a2fd7d2bf65d1289aadd0659e761fa9bff6
gedge-platform/gedge-platform
jose_json_jsx.erl
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- %% vim: ts=4 sw=4 ft=erlang noet %%%------------------------------------------------------------------- @author < > 2014 - 2015 , %%% @doc %%% %%% @end Created : 14 Aug 2015 by < > %%%---------------------------...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/jose/src/json/jose_json_jsx.erl
erlang
vim: ts=4 sw=4 ft=erlang noet ------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- jose_json callbacks ==================================================================== jose_json callbacks =============================...
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- @author < > 2014 - 2015 , Created : 14 Aug 2015 by < > -module(jose_json_jsx). -behaviour(jose_json). -export([decode/1]). -export([encode/1]). decode(Binary) -> jsx:decode(Binary, [return_maps]). encode(Te...
e52e1e13df2cdfb194f52cce79d45d0c7f3dd27bef8e4b84d56eb9cd217bcba9
viebel/google-api-clj
net_utils.clj
(ns google-api-clj.net-utils (:require [google-api-clj.google-utils :refer [error-code]] [taoensso.timbre :as timbre] [clojure.pprint :as pp] [clojure.java.io :as io])) Overall the request should take less than 30 seconds (def grace-period 1000) (defn execute [request] ;; exponential backoff accordi...
null
https://raw.githubusercontent.com/viebel/google-api-clj/c868e80d6be2c97e721b946013d1dbc9a2f796c2/src/google_api_clj/net_utils.clj
clojure
exponential backoff according to -errors#exponential-backoff
(ns google-api-clj.net-utils (:require [google-api-clj.google-utils :refer [error-code]] [taoensso.timbre :as timbre] [clojure.pprint :as pp] [clojure.java.io :as io])) Overall the request should take less than 30 seconds (def grace-period 1000) (defn execute [request] (loop [attempt 1] (let [[s...
da65593edf9058a8be3e7392cd478bbfb9a7f6c8db9470752c51c3d4929ff322
zack-bitcoin/verkle
basics.erl
-module(basics). , gcd_binary/2 , %to_bits_list/1, %eea/2, lrpow/3, rlpow/3, inverse/2, %inverse_fermat/2, %inverse_euler/2, %is_prime/1, %prime_factors/1, %carmichael/1, %carmichael_number/1, test/0 ]). Algorithms from...
null
https://raw.githubusercontent.com/zack-bitcoin/verkle/46bf69f17170a71829f9243faea06ee42f224687/src/crypto/basics.erl
erlang
to_bits_list/1, eea/2, inverse_fermat/2, inverse_euler/2, is_prime/1, prime_factors/1, carmichael/1, carmichael_number/1, bezout coefficients for A and B are S and T modular exponentiation with the binary method. math:pow(B, E) rem N now right to left math:pow(B, E) rem N multiplicative inverse using EEA multiplicat...
-module(basics). , gcd_binary/2 , lrpow/3, rlpow/3, test/0 ]). Algorithms from the book " Partially Homomorphic Encryption " , by , , and Ozger . divides(A, B) -> (B rem A) == 0. gcd_euclid(A, B) when ((A < 0) or (B < 0)) -> undefined; gcd_euclid(A, 0) -> A; gcd_euclid...
168b78dd92c0c1a5495e34aedb00556ba8590a4650bd4af3fae182954ceba9fd
crategus/cl-cffi-gtk
rtest-glib-main-loop.lisp
(def-suite glib-main-loop :in glib-suite) (in-suite glib-main-loop) (defvar *verbose-glib-main-loop* nil) ;;; A callback function for use as a source function (let ((counter 0)) (defun timeout-callback (loop) (incf counter) (when *verbose-glib-main-loop* (format t "~&timout-callback called ~d times~%...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/ba198f7d29cb06de1e8965e1b8a78522d5430516/test/rtest-glib-main-loop.lisp
lisp
A callback function for use as a source function Reset the counter Stop the main loop from running Stop the source Continue the source GMainLoop instead of gtk-main-quit GMainContext GPollFD GSource GSourceFuncs g_main_loop_new g_main_loop_ref g_main_loop_quit g_main_loop_is_runni...
(def-suite glib-main-loop :in glib-suite) (in-suite glib-main-loop) (defvar *verbose-glib-main-loop* nil) (let ((counter 0)) (defun timeout-callback (loop) (incf counter) (when *verbose-glib-main-loop* (format t "~&timout-callback called ~d times~%" counter)) (if (>= counter 10) (progn ...
11b2689cc4eea2170efa5cbd86796e08441746aa8e827f6aad2ce937b9e2eaf8
RickMoynihan/lein-tools-deps
file_attributes.clj
(ns lein-tools-deps.file-attributes (:require [clojure.java.io :as io]) (:import (java.io File))) (defn ^File absolute-file "Takes an absolute base path and a potentially relative file and returns an absolute file, using the base to to form the absolute file if needed." [base-path path] (let [file (io/file...
null
https://raw.githubusercontent.com/RickMoynihan/lein-tools-deps/ee3acdfb9b03b1891618acb8eaee5956886f1743/src/lein_tools_deps/file_attributes.clj
clojure
(ns lein-tools-deps.file-attributes (:require [clojure.java.io :as io]) (:import (java.io File))) (defn ^File absolute-file "Takes an absolute base path and a potentially relative file and returns an absolute file, using the base to to form the absolute file if needed." [base-path path] (let [file (io/file...
40450e5e671450e967a6973d3545485d2911ce95b73b48d45f9ccb97e8e05c7a
prestancedesign/usermanager-reitit-example
handler.clj
(ns usermanager.handler (:require [reitit.ring :as ring] [reitit.ring.middleware.parameters :as parameters] [ring.util.response :as resp] [usermanager.controllers.user :as user-ctl] [ring.middleware.keyword-params :refer [wrap-keyword-params]])) (defn my-middleware "...
null
https://raw.githubusercontent.com/prestancedesign/usermanager-reitit-example/9aee971a096f39df4fb892c0157080c9ee385964/src/usermanager/handler.clj
clojure
(ns usermanager.handler (:require [reitit.ring :as ring] [reitit.ring.middleware.parameters :as parameters] [ring.util.response :as resp] [usermanager.controllers.user :as user-ctl] [ring.middleware.keyword-params :refer [wrap-keyword-params]])) (defn my-middleware "...
be21073ecb063f15199ecb0d89152c65a8cec1cd51bdca7013e98dd599aff567
EasyCrypt/easycrypt
ecPhlHiCond.mli
(* -------------------------------------------------------------------- *) open EcParsetree open EcCoreGoal.FApi (* -------------------------------------------------------------------- *) val process_cond : pcond_info -> backward val process_match : matchmode -> backward
null
https://raw.githubusercontent.com/EasyCrypt/easycrypt/f87695472e70c313ef2966e20979b1afcc2e543e/src/phl/ecPhlHiCond.mli
ocaml
-------------------------------------------------------------------- --------------------------------------------------------------------
open EcParsetree open EcCoreGoal.FApi val process_cond : pcond_info -> backward val process_match : matchmode -> backward
1c0a619d396e1bc937751cfecb69f207d8362a577a0d8fb1e1bb86dd266f008b
tokiwoousaka/CatCat
Parser.hs
module Language.CatCat.Parser where import Language.CatCat.Parser.TypeParser import Text.Trifecta
null
https://raw.githubusercontent.com/tokiwoousaka/CatCat/3ecc40781f70e48bbb9b4bede01afc8f1e1e2304/src/Language/CatCat/Parser.hs
haskell
module Language.CatCat.Parser where import Language.CatCat.Parser.TypeParser import Text.Trifecta
cef17347f08ce7b0a4ae2180e8f14e6f0aef1ee9376ab75adc9849b30ce4b893
herbelin/coq-hh
nameops.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/library/nameops.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** Identifiers ident made of _ and d...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Pp open Util open Names ...
112e1101750c13e81e6415eeffdc476decf0d3b1ab1194829b5ebe8aea6b3ebc
ryanpbrewster/haskell
2048.hs
-- Virus.hs {- - Implementation of the virus game -} import Data.Array import Data.List (intercalate) import Prelude hiding (Left, Right) import Graphics.Vty.Widgets.All import Graphics.Vty import qualified Data.Text as T import Data.List (intercalate) import System.Exit (exitSuccess) import System.Random dump _ x ...
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/VTY/2048.hs
haskell
Virus.hs - Implementation of the virus game ---------------------------------------------------------- Underlying data structures: the board is a Grid of Tiles ---------------------------------------------------------- Breaks a grid into a list-of-lists along the given direction --------------------------------...
import Data.Array import Data.List (intercalate) import Prelude hiding (Left, Right) import Graphics.Vty.Widgets.All import Graphics.Vty import qualified Data.Text as T import Data.List (intercalate) import System.Exit (exitSuccess) import System.Random dump _ x = x data Tile = Tile Integer deriving (Eq, Ord) instanc...
aac40621112a44a9c59205cf392c747c1df5b2e629491af078a054d78b0466df
markandrus/twilio-haskell
Twilio.hs
{-#LANGUAGE DeriveDataTypeable #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-#LANGUAGE RankNTypes #-} ------------------------------------------------------------------------------- -- | Module : Control . . Twilio Copyright : ( C ) 2017- -- License : BSD-style (see t...
null
https://raw.githubusercontent.com/markandrus/twilio-haskell/00704dc86dbf2117b855b1e2dcf8b6c0eff5bfbe/src/Control/Monad/Twilio.hs
haskell
#LANGUAGE DeriveDataTypeable # #LANGUAGE RankNTypes # ----------------------------------------------------------------------------- | License : BSD-style (see the file LICENSE) Stability : provisional ----------------------------------------------------------------------------- * The Twilio monad * Types ...
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # Module : Control . . Twilio Copyright : ( C ) 2017- Maintainer : < > module Control.Monad.Twilio Twilio , runTwilio , runTwilio' * The Twilio monad transformer , TwilioT(..) , runTwilioT , runTwilioT' , Cr...
6e772d541b0e7a569558e88d63f7d0ba301204c532f8aa9d5ed9d07ba7fc4724
input-output-hk/project-icarus-importer
Mode.hs
# LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE RankNTypes #-} module Cardano.Wallet.Kernel.Mode ( WalletMode , WalletContext -- opaque , runWalletMode , getWallet ) where import Control.Lens (makeLensesWith) import qualified Control.Monad.Reader as Mtl import ...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet-new/src/Cardano/Wallet/Kernel/Mode.hs
haskell
# LANGUAGE RankNTypes # opaque ------------------------------------------------------------------------------ The wallet context and monad ------------------------------------------------------------------------------ | The monad that the wallet runs in NOTE: I'd prefer to @newtype@ this but it's ...
# LANGUAGE GeneralizedNewtypeDeriving # module Cardano.Wallet.Kernel.Mode ( WalletMode , runWalletMode , getWallet ) where import Control.Lens (makeLensesWith) import qualified Control.Monad.Reader as Mtl import Universum import Mockable import Pos.Block.BListe...
9bedbbcfdeefed6796d72f3139757c898bf1e87d5de4d567512ba89e402f2519
karamellpelle/grid
Shade.hs
grid is a game written in Haskell Copyright ( C ) 2018 -- -- This file is part of grid. -- -- grid is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or -- (at your optio...
null
https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/source/OpenGL/Shade.hs
haskell
This file is part of grid. grid is free software: you can redistribute it and/or modify (at your option) any later version. grid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GN...
grid is a game written in Haskell Copyright ( C ) 2018 it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License module OpenGL.Shade ( tex0, tex1, tex...
a018cf12c76e7e6bf99e4e10d11e300895fc8aaa471f9233cff872933aed573a
xach/vectometry
vectometry.lisp
;;;; vectometry.lisp (in-package #:vectometry) (defun move-to (p) (vecto:move-to (x p) (y p))) (defun line-to (p) (vecto:line-to (x p) (y p))) (defun curve-to (control1 control2 end) (vecto:curve-to (x control1) (y control1) (x control2) (y control2) (x end) (y end))) ...
null
https://raw.githubusercontent.com/xach/vectometry/786854b3dd27e4dee67392a3e7b3be500c6d75db/vectometry.lisp
lisp
vectometry.lisp
(in-package #:vectometry) (defun move-to (p) (vecto:move-to (x p) (y p))) (defun line-to (p) (vecto:line-to (x p) (y p))) (defun curve-to (control1 control2 end) (vecto:curve-to (x control1) (y control1) (x control2) (y control2) (x end) (y end))) (defun quadratic-to ...
94b514542019a461e7d4c856641b1cb40384301ffbb3db8125188355242e6182
janestreet/hardcaml
ppx_deriving_hardcaml_zero.ml
open Base open Ppxlib open Ppxlib.Ast_builder.Default let deriver = "hardcaml" let raise_errorf = Location.raise_errorf (* * Option parsing *) type options_t = { rtlprefix : expression option; rtlsuffix : expression option; rtlmangle : expression option; ast : bool; } let parse_rtlmangle expr ~loc = ...
null
https://raw.githubusercontent.com/janestreet/hardcaml/a9b1880ca2fb1a566eac66d935cacf344ec76b13/ppx/src/ppx_deriving_hardcaml_zero.ml
ocaml
* Option parsing * Attribute definition and parsing * Identifier manipulation * Code generation utility functions * Expand t label 'a Default 'a Default * Expand map label 'a Default 'a Default 'a Default * Expand map2 label 'a Default 'a Default 'a Default * Expan...
open Base open Ppxlib open Ppxlib.Ast_builder.Default let deriver = "hardcaml" let raise_errorf = Location.raise_errorf type options_t = { rtlprefix : expression option; rtlsuffix : expression option; rtlmangle : expression option; ast : bool; } let parse_rtlmangle expr ~loc = match expr with | [%e...
a00160a298ed6be09d5748d8568ceccca5d9e8d87f19d683e91e2f71bbf0d599
pingles/clj-kafka
admin.clj
(ns ^{:doc "Administration operations."} clj-kafka.admin (:require [clj-kafka.core :refer [as-properties]]) (:import [kafka.admin AdminUtils] [kafka.utils ZKStringSerializer$] [org.I0Itec.zkclient ZkClient])) (defn- zk-string-serializer [] (ZKStringSerializer$/MODULE$)) (defn zk-client "...
null
https://raw.githubusercontent.com/pingles/clj-kafka/321f2d6a90a2860f4440431aa835de86a72e126d/src/clj_kafka/admin.clj
clojure
(ns ^{:doc "Administration operations."} clj-kafka.admin (:require [clj-kafka.core :refer [as-properties]]) (:import [kafka.admin AdminUtils] [kafka.utils ZKStringSerializer$] [org.I0Itec.zkclient ZkClient])) (defn- zk-string-serializer [] (ZKStringSerializer$/MODULE$)) (defn zk-client "...
804064f0c2626b4a5b33b1e7b5071c69b849d3a76e8a7e401e3dd82693459085
ijvcms/chuanqi_dev
luckdraw_exchange_config.erl
%%%------------------------------------------------------------------- @author zhengsiying %%% @doc %%% 自动生成文件,不要手动修改 %%% @end Created : 2016/10/12 %%%------------------------------------------------------------------- -module(luckdraw_exchange_config). -include("common.hrl"). -include("config.hrl"). -compile([...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/config/luckdraw_exchange_config.erl
erlang
------------------------------------------------------------------- @doc 自动生成文件,不要手动修改 @end -------------------------------------------------------------------
@author zhengsiying Created : 2016/10/12 -module(luckdraw_exchange_config). -include("common.hrl"). -include("config.hrl"). -compile([export_all]). get_list_conf() -> [ luckdraw_exchange_config:get(X) || X <- get_list() ]. get_list() -> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ...
ed0df8d0a8e250cffe8151a35d647d05f1500c1f64ba4e3749405ebab8f6d8c9
rescript-lang/rescript-compiler
js_packages_info.mli
Copyright ( C ) 2017 - , Authors of ReScript * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later ver...
null
https://raw.githubusercontent.com/rescript-lang/rescript-compiler/e60482c6f6a69994907b9bd56e58ce87052e3659/jscomp/core/js_packages_info.mli
ocaml
* used by command line option e.g [-bs-package-output commonjs:xx/path] * Note here we compare the package info by order in theory, we can compare it by set semantics
Copyright ( C ) 2017 - , Authors of ReScript * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later ver...
7d6cfd47310f0f153a6f6e78a4a0a9decd7c114c62e5a87edde867fea2ffa475
stumpwm/paulownia
gui.lisp
;; Defines the generic methods for gui interaction so that paulownia ;; can call out to various constructs without worrying about how they ;; are created and rendered. paulownia provides its own implementation in , but others can be written in any ;; framework available in common lisp (in-package :paulownia) (expo...
null
https://raw.githubusercontent.com/stumpwm/paulownia/310b0d174ff389aa3d7f5b1dfcb41b807d918391/backends/gui.lisp
lisp
Defines the generic methods for gui interaction so that paulownia can call out to various constructs without worrying about how they are created and rendered. paulownia provides its own framework available in common lisp
implementation in , but others can be written in any (in-package :paulownia) (export '(message )) (defgeneric message (control-string &rest args) (:documentation "Run @var{control-string} and @{args} through `format' and echo the result on the screen. ")) (defgeneric restarts-menu (err) (:documentation "D...
795a4727943b95bd17e9df8c4bd4b5b11ce6cb39afb07ca19e305b2066ddd502
mirage/ocaml-asl
reporter_file.ml
* Copyright ( c ) 2016 Docker Inc * * 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 IS " AND TH...
null
https://raw.githubusercontent.com/mirage/ocaml-asl/95732a5d3a4f066ba14477e0621f3d946aff2ad4/examples/reporter_file.ml
ocaml
* Copyright ( c ) 2016 Docker Inc * * 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 IS " AND TH...
965940d41d990a81383a9ce9ea80fc18a9a0d011054b331b1a6886dcbceb4a80
Mbodin/murder-generator
attribute.ml
open Libutils module type Attribute = sig type attribute type constructor type constructor_map val empty_constructor_map : constructor_map val attribute_name : constructor_map -> attribute -> string option val constructor_name : constructor_map -> constructor -> string option val construc...
null
https://raw.githubusercontent.com/Mbodin/murder-generator/2024a924ffb4ee12d1b7119b699346b21e098892/src/attribute.ml
ocaml
* Attribute names * The map storing each constructor. The attribute is part of the constructor, with the constructor name. * Which constructors is associated to which attribute. * For each constructor, what is its compatibility list. * For each attribute, what is its internal status. ...
open Libutils module type Attribute = sig type attribute type constructor type constructor_map val empty_constructor_map : constructor_map val attribute_name : constructor_map -> attribute -> string option val constructor_name : constructor_map -> constructor -> string option val construc...
cea010c72dee1643b49f856de2c3ee715936f238de6c0b1db2ba37f2d7a88082
ijvcms/chuanqi_dev
misc_pp.erl
%%%------------------------------------------------------------------- @author zhengsiying ( C ) 2016 , < COMPANY > %%% @doc %%% %%% @end Created : 29 . 二月 2016 下午12:09 %%%------------------------------------------------------------------- -module(misc_pp). -include("common.hrl"). -include("record.hrl"). -inclu...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/misc/misc_pp.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API ==================================================================== API functions ==================================================================== 回收道具 game_...
@author zhengsiying ( C ) 2016 , < COMPANY > Created : 29 . 二月 2016 下午12:09 -module(misc_pp). -include("common.hrl"). -include("record.hrl"). -include("proto.hrl"). -include("cache.hrl"). -include("button_tips_config.hrl"). -export([ handle/3 ]). handle(9000, PlayerState, _Data) -> button_tips_lib:get...
ef8c251fa545ce6885402a5fd9a2f2d408e29cd1f6bd9da7e97dab663baee7b0
xxyzz/SICP
Exercise_3_58.rkt
#lang racket/base (require racket/stream) (define (expand num den radix) (stream-cons (quotient (* num radix) den) (expand (remainder (* num radix) den) den radix))) (stream->list (stream-take (expand 1 7 10) 7)) ; '(1 4 2 8 5 7 1) ( expand 1 7 10 ): 1 4 2 8 5 7 1 4 2 8 5 7 ... 1/7 = 0.142857142857 ... (...
null
https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/3_Modularity_Objects_and_State/3.5_Streams/Exercise_3_58.rkt
racket
'(1 4 2 8 5 7 1)
#lang racket/base (require racket/stream) (define (expand num den radix) (stream-cons (quotient (* num radix) den) (expand (remainder (* num radix) den) den radix))) (stream->list (stream-take (expand 1 7 10) 7)) ( expand 1 7 10 ): 1 4 2 8 5 7 1 4 2 8 5 7 ... 1/7 = 0.142857142857 ... (stream->list (strea...
14bae3659c45bdf7f65ec4fb6b1ff4f5d64aa394fc9a360e0b37a1c0b452e5a3
tormaroe/ropy
ropy.lisp
(in-package :cl-user) (defpackage ropy (:use cl ropy-util ropy-state ropy-direction ropy-operation anaphora) (:export #:parse #:parse-file #:execute #:result)) (in-package :ropy) (defun result (p) "Returns the top of the stack, which is the result of a program run to it's comp...
null
https://raw.githubusercontent.com/tormaroe/ropy/95a27abd4838687d9e11418a16cfcaa19b34f4e8/common_lisp/ropy.lisp
lisp
(in-package :cl-user) (defpackage ropy (:use cl ropy-util ropy-state ropy-direction ropy-operation anaphora) (:export #:parse #:parse-file #:execute #:result)) (in-package :ropy) (defun result (p) "Returns the top of the stack, which is the result of a program run to it's comp...
22393e69cc4be4bcb4b7bad4f6ec333946efa5fec8257b761e2e1f9da1d63d90
SNePS/SNePS2
result-layout.lisp
-*- Mode : Lisp ; Syntax : Common - Lisp ; Package : XGINSENG ; Base : 10 -*- Copyright ( C ) 1984 - -2013 Research Foundation of State University of New York ;; Version: $Id: result-layout.lisp,v ;; This file is part of SNePS. $ BEGIN LICENSE$ The contents of this file are subject to the University at ...
null
https://raw.githubusercontent.com/SNePS/SNePS2/d3862108609b1879f2c546112072ad4caefc050d/demo/activation/result-layout.lisp
lisp
Syntax : Common - Lisp ; Package : XGINSENG ; Base : 10 -*- Version: $Id: result-layout.lisp,v This file is part of SNePS. you may not use this file except in compliance with the License. You may obtain a copy of the License at . edu/sneps/Downloads/ubpl.pdf. or implied. See the License for the specific lan...
Copyright ( C ) 1984 - -2013 Research Foundation of State University of New York $ BEGIN LICENSE$ The contents of this file are subject to the University at Software distributed under the License is distributed on an " AS IS " basis , WITHOUT WARRANTY OF ANY KIND , either express The Original Code is...
eaf43ba79408f1ed8d2f6642c49c5f0e27b7b5da722d5a576c490a0eed7ce4ad
amnh/poy5
sufTree.ml
POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies . Copyright ( C ) 2014 , , , Ward Wheeler , and the American Museum of Natural History . (* *) (* This program is free softwa...
null
https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/sufTree.ml
ocaml
This program is free software; you can redistribute it and/or modify (at your option) any later version. This progra...
POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies . Copyright ( C ) 2014 , , , Ward Wheeler , and the American Museum of Natural History . it under the terms of the GNU General Public License as published by the Free Software Foundation ; ...
646d09632f3beb39ba6d4ce5e0f0d364508da6e6a679a817bb5e023cae55f464
giorgidze/HCodecs
Builder.hs
----------------------------------------------------------------------------- -- | -- Module : Data.ByteString.Builder Copyright : , , -- License : BSD3 -- Maintainer : < /~ggg/ > -- Stability : experimental -- Portability : Portable -- -- Efficient construction of lazy bytestrings. -- -----...
null
https://raw.githubusercontent.com/giorgidze/HCodecs/deada21b19b2063a60027535f0f8bb303f08e302/src/Codec/ByteString/Builder.hs
haskell
--------------------------------------------------------------------------- | Module : Data.ByteString.Builder License : BSD3 Stability : experimental Portability : Portable Efficient construction of lazy bytestrings. --------------------------------------------------------------------------- * The...
Copyright : , , Maintainer : < /~ggg/ > module Codec.ByteString.Builder ( Builder , toLazyByteString , empty , singleton , putWord8 , putInt8 , append , putString , flush : : Builder : : Word32 - > Builder : : Word32 - > Builder : : Builder : ...
1c356dae7dfe9019c12f88f21f4602680a7687149183543d06caba75631cdc2a
anoma/juvix
Setup.hs
module Juvix.Compiler.Pipeline.Setup where import Juvix.Compiler.Concrete.Translation.FromParsed.Analysis.PathResolver import Juvix.Compiler.Pipeline.EntryPoint import Juvix.Extra.Paths import Juvix.Extra.Stdlib import Juvix.Prelude entrySetup :: (Members '[Reader EntryPoint, Files, PathResolver] r) => Sem r Entr...
null
https://raw.githubusercontent.com/anoma/juvix/807b3b1770289b8921304e92e7305c55c2e11f8f/src/Juvix/Compiler/Pipeline/Setup.hs
haskell
module Juvix.Compiler.Pipeline.Setup where import Juvix.Compiler.Concrete.Translation.FromParsed.Analysis.PathResolver import Juvix.Compiler.Pipeline.EntryPoint import Juvix.Extra.Paths import Juvix.Extra.Stdlib import Juvix.Prelude entrySetup :: (Members '[Reader EntryPoint, Files, PathResolver] r) => Sem r Entr...
9144f51594f15160c8289d7c3d7efff30393e4ac76e5c0bdb79bdeaf8ab53b18
top-gg/cyclone
DiscordCommands.hs
module Cyclone.Provider.DiscordCommands where import Control.Monad import Control.Monad.IO.Class import Cyclone.Helper (codeblock) import Data.Aeson.Encode.Pretty (encodePretty) import Data.Aeson.TH (defaultOptions) import qualified Data.Text as T import qualified Data.Text.Lazy as TL import qualified Data.Text.Lazy.E...
null
https://raw.githubusercontent.com/top-gg/cyclone/6c4993239ed535e06099f8a176641caf4f9c954a/src/Cyclone/Provider/DiscordCommands.hs
haskell
| Checks to see if the message being replied to is a valid response
module Cyclone.Provider.DiscordCommands where import Control.Monad import Control.Monad.IO.Class import Cyclone.Helper (codeblock) import Data.Aeson.Encode.Pretty (encodePretty) import Data.Aeson.TH (defaultOptions) import qualified Data.Text as T import qualified Data.Text.Lazy as TL import qualified Data.Text.Lazy.E...
a2c83e077d781a7b554e74939ab2f619b5f86b1cbaf10f1e3d2bff3fa22a6478
BekaValentine/SimpleFP
Elaboration.hs
{-# OPTIONS -Wall #-} module Dependent.Unification.Elaboration where import Control.Applicative ((<$>)) import Control.Monad.Except import Control.Monad.State import Scope import TypeChecker (extendDefinitions) import Dependent.Core.Abstraction import Dependent.Core.ConSig import Dependent.Core.Program import Depend...
null
https://raw.githubusercontent.com/BekaValentine/SimpleFP/3cff456be9f0b99509e5cbe809be1055009b32df/src/Dependent/Unification/Elaboration.hs
haskell
# OPTIONS -Wall #
module Dependent.Unification.Elaboration where import Control.Applicative ((<$>)) import Control.Monad.Except import Control.Monad.State import Scope import TypeChecker (extendDefinitions) import Dependent.Core.Abstraction import Dependent.Core.ConSig import Dependent.Core.Program import Dependent.Core.Term import ...
d83a9c6a5a036dbe891feffd8fcf1b9f99e63d7b70da1cc986a5d8a1a7f45665
wdebeaum/step
zeta.lisp
;;;; ;;;; w::zeta ;;;; (define-words :pos W::value :boost-word t :words ( (w::zeta (senses ((lf-parent ont::greek-letter-symbol) (templ value-templ) ) ) ) ))
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/zeta.lisp
lisp
w::zeta
(define-words :pos W::value :boost-word t :words ( (w::zeta (senses ((lf-parent ont::greek-letter-symbol) (templ value-templ) ) ) ) ))
8ce2025f1dfe5234c8201ac97c3e177c1f5791b77a3d50d2d954bf11374370ea
kompendium-ano/factom-haskell-client
SignTransaction.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # {-# LANGUAGE TypeOperators #-} module Factom.RPC.Types.SignTransaction where import Control.Applicative import Contro...
null
https://raw.githubusercontent.com/kompendium-ano/factom-haskell-client/87a73bb9079859f6223f8259da0dc9da568d1233/src/Factom/RPC/Types/SignTransaction.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RecordWildCards # # LANGUAGE TypeOperators # ------------------------------------------------------------------------------
# LANGUAGE DeriveGeneric # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # module Factom.RPC.Types.SignTransaction where import Control.Applicative import Control.Monad (forM_, join, mzero) import Data.Aeson (FromJSON (..),...
2b787c0e35b29279a111842f0526a7172c88f62d8a68bdc89a36f138623907da
oakes/play-cljc-examples
start_dev.clj
(ns ui-gallery.start-dev (:require [ui-gallery.start :as start] [ui-gallery.core :as c] [clojure.spec.test.alpha :as st] [clojure.spec.alpha :as s] [play-cljc.gl.core :as pc]) (:import [org.lwjgl.glfw GLFW] [ui_gallery.start Window])) (defn start [] (st/...
null
https://raw.githubusercontent.com/oakes/play-cljc-examples/11d16e9d113184665345508ba6ce4a91b6d6b52d/ui-gallery/src/ui_gallery/start_dev.clj
clojure
(ns ui-gallery.start-dev (:require [ui-gallery.start :as start] [ui-gallery.core :as c] [clojure.spec.test.alpha :as st] [clojure.spec.alpha :as s] [play-cljc.gl.core :as pc]) (:import [org.lwjgl.glfw GLFW] [ui_gallery.start Window])) (defn start [] (st/...
0e3e989a6348a4cb6493deea5ce7a3cb61d2cd0ffc1ad60dbcf8de1afb3b6fff
fukamachi/legion
queue.lisp
(defpackage #:legion/queue (:use #:cl) (:import-from #:cl-speedy-queue) (:import-from #:bordeaux-threads) (:export #:queue #:make-queue #:enqueue #:dequeue #:queue-empty-p #:queue-count)) (in-package #:legion/queue) (defstruct (queue (:constructor %make-qu...
null
https://raw.githubusercontent.com/fukamachi/legion/599cca19f0e34246814621f7fe90322221c2e263/queue.lisp
lisp
(defpackage #:legion/queue (:use #:cl) (:import-from #:cl-speedy-queue) (:import-from #:bordeaux-threads) (:export #:queue #:make-queue #:enqueue #:dequeue #:queue-empty-p #:queue-count)) (in-package #:legion/queue) (defstruct (queue (:constructor %make-qu...
f6a71ab0269359fbd89fd878fe072433aec7c87e2111c6b135124fdac737e190
defclass/sasori
utils.clj
(ns sasori.utils (:require [clojure.string :as str]) (:refer-clojure :exclude [boolean?])) (defn error! [msg & [map]] (let [map (or map {})] (throw (ex-info msg map)))) (defn not-blank? [x] (and (string? x) (not (str/blank? x)))) (defn join [& strings] (str/join " " strings)) (defn join-not-b...
null
https://raw.githubusercontent.com/defclass/sasori/86806d12db85598a08289902662e9b81b107871c/src/sasori/utils.clj
clojure
(ns sasori.utils (:require [clojure.string :as str]) (:refer-clojure :exclude [boolean?])) (defn error! [msg & [map]] (let [map (or map {})] (throw (ex-info msg map)))) (defn not-blank? [x] (and (string? x) (not (str/blank? x)))) (defn join [& strings] (str/join " " strings)) (defn join-not-b...
74a8f39a44c281503a3332222684d5a608447fea9cb24bdd3b2b345f5df6e6c9
erlangonrails/devdb
gen_server2.erl
This file is a copy of gen_server.erl from the R13B-1 Erlang / OTP %% distribution, with the following modifications: %% 1 ) the module name is gen_server2 %% 2 ) more efficient handling of selective receives in callbacks %% gen_server2 processes drain their message queue into an internal %% buffer before invokin...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/rabbitmq-server-1.8.0/src/gen_server2.erl
erlang
distribution, with the following modifications: gen_server2 processes drain their message queue into an internal buffer before invoking any callback module functions. Messages are dequeued from the buffer for processing. Thus the effective message queue of a gen_server2 process is the concatenation of the intern...
This file is a copy of gen_server.erl from the R13B-1 Erlang / OTP 1 ) the module name is gen_server2 2 ) more efficient handling of selective receives in callbacks 3 ) gen_server2 : cast is guaranteed to be order - preserving 4 ) The new functions gen_server2 : pcall/3 , pcall/4 , and pcast/3 5 ) The callb...
f9a0ccb8bc166669da6bd2920f636ae3f4c2d88d8b92ab76f898337125bafd58
district0x/district0x-network-token
project.clj
(defproject contribution "0.1.0-SNAPSHOT" :description "Contribution period for district0x" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[cljs-react-material-ui "0.2.44"] [cljs-web3 "0.19.0-0-5"] [day8.re-frame/async-flow-fx "0.0...
null
https://raw.githubusercontent.com/district0x/district0x-network-token/a002f39312989d4099468d155c68feeedd708c16/project.clj
clojure
(defproject contribution "0.1.0-SNAPSHOT" :description "Contribution period for district0x" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[cljs-react-material-ui "0.2.44"] [cljs-web3 "0.19.0-0-5"] [day8.re-frame/async-flow-fx "0.0...
bb104f83afc7ae3d84ab54b92b6a6c43be260a1ca0a72a41878cc82b9e51c9de
clj-commons/rewrite-cljs
whitespace.cljs
(ns rewrite-clj.node.whitespace (:require [rewrite-clj.node.protocols :as node])) # # Newline Modifiers (def ^:dynamic *newline-fn* "This function is applied to every newline string." identity) (def ^:dynamic *count-fn* "This function is applied to every newline string and should produce the eventual ch...
null
https://raw.githubusercontent.com/clj-commons/rewrite-cljs/5b0fdea43a6748519d0b0ad3d7eaa98aa541de35/src/rewrite_clj/node/whitespace.cljs
clojure
(defmacro with-newline-fn [f & body] `(binding [*newline-fn* (comp *newline-fn* ~f)] ~@body)) (defmacro with-count-fn [f & body] `(binding [*count-fn* (comp *count-fn* ~f)] ~@body)) (node/make-printable! WhitespaceNode) ## Utilities ## Predicates
(ns rewrite-clj.node.whitespace (:require [rewrite-clj.node.protocols :as node])) # # Newline Modifiers (def ^:dynamic *newline-fn* "This function is applied to every newline string." identity) (def ^:dynamic *count-fn* "This function is applied to every newline string and should produce the eventual ch...
03c1eb7b9b9dbb3c9efa26bb57eb9a94d440fac863de5d1f8167506bcecbc92b
raimohanska/rump
RumpInfo.hs
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-} module RumpInfo where import Data.Typeable import Data.Data import GeoLocation data RumpInfo = RumpInfo { userId :: String, displayName :: String, location :: GeoLoc} deriving (Data, Typeable) instance Show RumpInfo where show (R...
null
https://raw.githubusercontent.com/raimohanska/rump/f64c95fe80bb37dedb3f55627c3450c878c66e80/src/RumpInfo.hs
haskell
# LANGUAGE OverloadedStrings, DeriveDataTypeable #
module RumpInfo where import Data.Typeable import Data.Data import GeoLocation data RumpInfo = RumpInfo { userId :: String, displayName :: String, location :: GeoLoc} deriving (Data, Typeable) instance Show RumpInfo where show (RumpInfo userId _ loc) = userId ++ "@" ++ (show loc)
f8e088ead8779849f67c11b8a3a746e79ee2793d9cafd758b34ad044e09ccb1a
zoomhub/zoomhub
Schema4.hs
# LANGUAGE DataKinds # # LANGUAGE OverloadedLabels # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PartialTypeSignatures # # LANGUAGE QuasiQuotes # # LANGUAGE TypeOperators # {-# OPTIONS_GHC -O0 #-} {-# OPTIONS_GHC -Wno-partial-type-signatures #-} {-# OPTIONS_GHC -fomit-interface-pragmas #-} module ZoomHub.Storage.Pos...
null
https://raw.githubusercontent.com/zoomhub/zoomhub/bc65176f08703aec33b387ec71dc702dc1bcaec9/src/ZoomHub/Storage/PostgreSQL/Schema/Schema4.hs
haskell
# LANGUAGE OverloadedStrings # # OPTIONS_GHC -O0 # # OPTIONS_GHC -Wno-partial-type-signatures # # OPTIONS_GHC -fomit-interface-pragmas #
# LANGUAGE DataKinds # # LANGUAGE OverloadedLabels # # LANGUAGE PartialTypeSignatures # # LANGUAGE QuasiQuotes # # LANGUAGE TypeOperators # module ZoomHub.Storage.PostgreSQL.Schema.Schema4 ( Schema4, migration, ) where import Squeal.PostgreSQL ( Definition, Manipulation (UnsafeManipulation), Public,...
6f569f433f6998cc1ea4dd7a904859bba8b650196c3bbb0c9d22389a7b14f72c
SNePS/SNePS2
generator.lisp
-*- Mode : Lisp ; Syntax : Common - Lisp ; Package : SNEPSLOG ; Base : 10 -*- Copyright ( C ) 1984 - -2013 Research Foundation of ;; State University of New York Version : $ I d : generator.lisp , v 1.4 2013/08/28 19:07:26 shapiro Exp $ ;; This file is part of SNePS. $ BEGIN LICENSE...
null
https://raw.githubusercontent.com/SNePS/SNePS2/d3862108609b1879f2c546112072ad4caefc050d/snepslog/generator/generator.lisp
lisp
Syntax : Common - Lisp ; Package : SNEPSLOG ; Base : 10 -*- State University of New York This file is part of SNePS. you may not use this file except in compliance with the License. You may obtain a copy of the License at . edu/sneps/Downloads/ubpl.pdf. or implied. See the License fo...
Copyright ( C ) 1984 - -2013 Research Foundation of Version : $ I d : generator.lisp , v 1.4 2013/08/28 19:07:26 shapiro Exp $ $ BEGIN LICENSE$ The contents of this file are subject to the University at Software distributed under the License is distributed on an " AS IS " basis , WITHOUT WARRANTY OF AN...
b2d4fa3f83a4e8e704c7a57f6b657d3fe88e9f3d4b35f0e13e97c909b7547d14
AntidoteDB/antidote
inter_dc_txn.erl
%% ------------------------------------------------------------------- %% Copyright < 2013 - 2018 > < Technische Universität Kaiserslautern , Germany , France Universidade NOVA de Lisboa , Portugal Université catholique de Louvain ( UCL ) , Belgique , Portugal %% > %% This file is provided...
null
https://raw.githubusercontent.com/AntidoteDB/antidote/32a89d42be644d3ba616ebf705fce4fa43e781ab/apps/antidote/src/inter_dc_txn.erl
erlang
------------------------------------------------------------------- > Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either expressed or implied. See the License for the specific language governing perm...
Copyright < 2013 - 2018 > < Technische Universität Kaiserslautern , Germany , France Universidade NOVA de Lisboa , Portugal Université catholique de Louvain ( UCL ) , Belgique , Portugal This file is provided to you under the Apache License , except in compliance with the License . You...
adffa5796230f4c961ef5730b0b137e0817cf73eb2a0d86fe4400d5e2f5c45f1
lambe-lang/mitch
render.ml
open Mitch_utils open Objcode let render_value ppf = let open Format in function INT i -> fprintf ppf "INT %d" i | UNIT -> fprintf ppf "UNIT" let rec render ppf = let open Format in function | [] -> () | [ a ] -> render_t ppf a | a :: l -> fprintf ppf "%a; %a" render_t a render l and render_t ppf = l...
null
https://raw.githubusercontent.com/lambe-lang/mitch/2c47f6627c3a219c31afd078836e9e7be3e26719/lib/mitch/ir/render.ml
ocaml
open Mitch_utils open Objcode let render_value ppf = let open Format in function INT i -> fprintf ppf "INT %d" i | UNIT -> fprintf ppf "UNIT" let rec render ppf = let open Format in function | [] -> () | [ a ] -> render_t ppf a | a :: l -> fprintf ppf "%a; %a" render_t a render l and render_t ppf = l...
490b9e0edbf64632813a38fb8458cd53d0ff11433be90721b6f435388b7405bd
hstreamdb/hstream
Table.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # module HStream.Processing.Table ( Table (..), toStream, ) where import HStream.Processing.Encoding import HStream.Processing.Stream.Internal import RIO import qualified RIO.Text ...
null
https://raw.githubusercontent.com/hstreamdb/hstream/35b2284d122202a6ad7efc98e6c6304b68a0e49d/hstream-processing/src/HStream/Processing/Table.hs
haskell
# LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # module HStream.Processing.Table ( Table (..), toStream, ) where import HStream.Processing.Encoding import HStream.Processing.Stream.Internal import RIO import qualified RIO.Text ...
8649e796417df87c1d3ff1ab89aa8bfd6ed0ef941c7aff15449c6874b39eb9eb
thattommyhall/offline-4clojure
p62.clj
;; Re-implement Iterate - Easy ;; Given a side-effect free function f and an initial value x write a function which returns an infinite lazy sequence of x, (f x), (f (f x)), (f (f (f x))), etc. ;; tags - seqs:core-functions ;; restricted - iterate (ns offline-4clojure.p62 (:use clojure.test)) (def __ ;; your solutio...
null
https://raw.githubusercontent.com/thattommyhall/offline-4clojure/73e32fc6687816aea3c514767cef3916176589ab/src/offline_4clojure/p62.clj
clojure
Re-implement Iterate - Easy Given a side-effect free function f and an initial value x write a function which returns an infinite lazy sequence of x, (f x), (f (f x)), (f (f (f x))), etc. tags - seqs:core-functions restricted - iterate your solution here
(ns offline-4clojure.p62 (:use clojure.test)) (def __ ) (defn -main [] (are [soln] soln (= (take 5 (__ #(* 2 %) 1)) [1 2 4 8 16]) (= (take 100 (__ inc 0)) (take 100 (range))) (= (take 9 (__ #(inc (mod % 3)) 1)) (take 9 (cycle [1 2 3]))) ))
4ca2e129c1092772bf18c10dcc05fd8e2ece86ccbb977f12326201cec6eaf81f
jimcrayne/jhc
T2478.hs
{-# OPTIONS -fglasgow-exts #-} {-# LANGUAGE RankNTypes #-} module ShouldCompile where data Eq t => TrafoE t = forall env2 . TrafoE Int t newSRef () = TrafoE
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/2_pass/ghc/T2478.hs
haskell
# OPTIONS -fglasgow-exts # # LANGUAGE RankNTypes #
module ShouldCompile where data Eq t => TrafoE t = forall env2 . TrafoE Int t newSRef () = TrafoE
67bfeb7796026695221c04357534687f049307af6acd3803cd66a5205d8e3ff5
ghc/packages-dph
Combinators.hs
# LANGUAGE CPP # {-# OPTIONS -fno-spec-constr #-} #include "fusion-phases.h" -- | Closure converted lifted array combinators. -- The vectoriser produces code that uses these combinators directly. -- -- All of the combinators in this module are polymorphic, work on `PArray`, and -- take `PA` dictionaries. Combin...
null
https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-lifted-boxed/Data/Array/Parallel/Lifted/Combinators.hs
haskell
# OPTIONS -fno-spec-constr # | Closure converted lifted array combinators. The vectoriser produces code that uses these combinators directly. All of the combinators in this module are polymorphic, work on `PArray`, and take `PA` dictionaries. Combinators that are specific to a certain element type, like ...
# LANGUAGE CPP # #include "fusion-phases.h" eg " Data . Array . Parallel . Prelude . Int " . module Data.Array.Parallel.Lifted.Combinators fromPArrayPP , toPArrayPP , fromNestedPArrayPP , emptyPP , singletonPP , replicatePP , appendPP , l...
663f72b354a5e39e02d31ad0e4aa078de3536786d8813cb36d897c265cf7de4a
samoht/camloo
builtins.scm
;; Le module (module __caml_builtins (library camloo-runtime) (import __caml_misc __caml_const __caml_globals __caml_modules) (export (builtin_44@builtins x1) (2-58-builtin_44@builtins x1 x2) (builtin_constr_146@builtins x1) constr_type_unit_143@builtins constr_type_exn_222@...
null
https://raw.githubusercontent.com/samoht/camloo/29a578a152fa23a3125a2a5b23e325b6d45d3abd/src/camloo/Llib.bootstrap/builtins.scm
scheme
Le module Les variables globales Les expressions globales
(module __caml_builtins (library camloo-runtime) (import __caml_misc __caml_const __caml_globals __caml_modules) (export (builtin_44@builtins x1) (2-58-builtin_44@builtins x1 x2) (builtin_constr_146@builtins x1) constr_type_unit_143@builtins constr_type_exn_222@builtins c...
dde161de844316aebfd4095c5b7e9ebff074e025407d05d027f826b26b64815e
mbutterick/aoc-racket
14input.rkt
#lang reader (submod "14.rkt" reader) 1 FVBHS, 29 HWPND => 4 CPXDX 5 TNWDG, 69 VZMS, 1 GXSD, 48 NCLZ, 3 RSRZ, 15 HWPND, 25 SGPK, 2 SVCQ => 1 FUEL 1 PQRLB, 1 TWPMQ => 4 QBXC 9 QBXC => 7 RNHQ 12 VZMS => 6 MGQRZ 6 QBVG, 10 XJWX => 6 BWLZ 4 MVGN => 6 BHZH 2 LKTWD => 7 FVBHS 2 BWFK => 7 TFPQ 15 VZBJ, 9 TSVN, 2 BWLZ => 2 TNW...
null
https://raw.githubusercontent.com/mbutterick/aoc-racket/2c6cb2f3ad876a91a82f33ce12844f7758b969d6/2019/14input.rkt
racket
#lang reader (submod "14.rkt" reader) 1 FVBHS, 29 HWPND => 4 CPXDX 5 TNWDG, 69 VZMS, 1 GXSD, 48 NCLZ, 3 RSRZ, 15 HWPND, 25 SGPK, 2 SVCQ => 1 FUEL 1 PQRLB, 1 TWPMQ => 4 QBXC 9 QBXC => 7 RNHQ 12 VZMS => 6 MGQRZ 6 QBVG, 10 XJWX => 6 BWLZ 4 MVGN => 6 BHZH 2 LKTWD => 7 FVBHS 2 BWFK => 7 TFPQ 15 VZBJ, 9 TSVN, 2 BWLZ => 2 TNW...
57e981c4e25bff4942d1bac7f742889de71dd613a740d115442ab91c17988353
prepor/condo
test.ml
--------------------------------------------------------------------------- Copyright ( c ) 2016 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) 2...
null
https://raw.githubusercontent.com/prepor/condo/b9a16829e6ffef10df2fefdadf143b56d33f0b97/test/test.ml
ocaml
--------------------------------------------------------------------------- Copyright ( c ) 2016 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) 2...
5eade7f20f9a2b7c54d3e46003c45e65179a315c2bce15dcdf20c10ce8b6d80a
OCamlPro/ezjs
ezjs_xhr.ml
open Js_of_ocaml let unoptf f def x = match Js.Opt.to_option x with | None -> def | Some x -> f x let get ?error msg url f = if msg <> "" then Firebug.console##log (Js.string @@ Printf.sprintf "[>%s GET %s]" msg url); let xhr = XmlHttpRequest.create () in xhr##(_open (Js.string "GET") (Js.string url) (J...
null
https://raw.githubusercontent.com/OCamlPro/ezjs/4dc09b1e9eeecd46f3717036303ac704cc49b9a1/libs/utils/ezjs_xhr.ml
ocaml
open Js_of_ocaml let unoptf f def x = match Js.Opt.to_option x with | None -> def | Some x -> f x let get ?error msg url f = if msg <> "" then Firebug.console##log (Js.string @@ Printf.sprintf "[>%s GET %s]" msg url); let xhr = XmlHttpRequest.create () in xhr##(_open (Js.string "GET") (Js.string url) (J...
be0865846c8cd8ab2d3985e44fadb2570380481c6c7dbd31c7db77af3a0bc679
let-def/cuite
example_1.ml
open Cuite (*let root = ref []*) let () = let _app = QApplication.new' Sys.argv in let widget = QWidget.new' None in QWidget.show widget; let button = QPushButton.new''from'string'QWidget "Push me" None in QAbstractButton.setText button "Push me"; QWidget.setParent'from'QWidget button (Some widget); QWi...
null
https://raw.githubusercontent.com/let-def/cuite/42629a91c573ecbf1b01f213f1bf35a456d2b1af/examples/example_1.ml
ocaml
let root = ref [] root := [Obj.repr app; Obj.repr widget];
open Cuite let () = let _app = QApplication.new' Sys.argv in let widget = QWidget.new' None in QWidget.show widget; let button = QPushButton.new''from'string'QWidget "Push me" None in QAbstractButton.setText button "Push me"; QWidget.setParent'from'QWidget button (Some widget); QWidget.show button; le...
b504388aac4afa86823852c4cd4948aaa448ff508bf33a814f4025bf15b105a6
bravit/hid-examples
conc-hello.hs
import Control.Concurrent (getNumCapabilities) main :: IO () main = do n <- getNumCapabilities putStrLn $ "This program runs over " ++ show n ++ " capabilities"
null
https://raw.githubusercontent.com/bravit/hid-examples/913e116b7ee9c7971bba10fe70ae0b61bfb9391b/ch16/conc-hello.hs
haskell
import Control.Concurrent (getNumCapabilities) main :: IO () main = do n <- getNumCapabilities putStrLn $ "This program runs over " ++ show n ++ " capabilities"
613e6728962aba295e2df0ba7dd950453e4e53248378c8eca43fc79644f2023b
jadeallenx/udon_ng
udon_sup.erl
-module(udon_sup). -behaviour(supervisor). %% API -export([start_link/0]). %% Supervisor callbacks -export([init/1]). %% =================================================================== %% API functions %% =================================================================== start_link() -> supervisor:start_l...
null
https://raw.githubusercontent.com/jadeallenx/udon_ng/14519df8cc79d9c9793c3f80b8fba7875fe99e81/apps/udon/src/udon_sup.erl
erlang
API Supervisor callbacks =================================================================== API functions =================================================================== =================================================================== Supervisor callbacks ================================================...
-module(udon_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). init(_Args) -> VMaster = { udon_vnode_master, {riak_core_vnode_master, start_link, [udon_vnode]}, permanent, 500...
4e68d5cc3003fdf13878999cb6b12224153a227b8ffa24117efbeddfa2936613
witan-org/witan
hashtbl_hetero.ml
(*************************************************************************) This file is part of Witan . (* *) Copyright ( C ) 2017 CEA ( Commi...
null
https://raw.githubusercontent.com/witan-org/witan/d26f9f810fc34bf44daccb91f71ad3258eb62037/src/stdlib/hashtbl_hetero.ml
ocaml
*********************************************************************** alternatives) Automatique) ...
This file is part of Witan . Copyright ( C ) 2017 CEA ( Commissariat à l'énergie atomique et aux énergies ( Institut National de Recherche en Informatique et en CNRS ( Centre nation...
fd5d1d4e373d39c917080cf332334e5b0cc2c1771ea2cf8f04f1e74504a574e8
joelburget/Cologne
AssimpImport.hs
module Cologne.AssimpImport where import Data.Maybe (catMaybes) import Control.Monad (liftM) import Data.Vect (Vec3(Vec3), (&*), (&^)) import Graphics.Formats.Assimp (importFile, Scene(Scene), cameraPosition, lookAt, Light, Face, Mesh, indices, cameras, meshes, faces, vertices, lightPosition, PostProcessSteps(C...
null
https://raw.githubusercontent.com/joelburget/Cologne/60b22f44fc8c983c6a0c322fd9885d8f7e469840/Cologne/AssimpImport.hs
haskell
module Cologne.AssimpImport where import Data.Maybe (catMaybes) import Control.Monad (liftM) import Data.Vect (Vec3(Vec3), (&*), (&^)) import Graphics.Formats.Assimp (importFile, Scene(Scene), cameraPosition, lookAt, Light, Face, Mesh, indices, cameras, meshes, faces, vertices, lightPosition, PostProcessSteps(C...
12d0882ca19b974b0813fe39403dbf3c0c260b0bb197f5c208194dcf27fb970a
nikita-volkov/deque
Defs.hs
# LANGUAGE CPP # -- | Definitions of lazy . -- -- The typical `toList` and `fromList` conversions are provided by means of the ` Foldable ` and ` IsList ` instances . module Deque.Lazy.Defs where import Control.Monad (fail) import qualified Data.List as List import Deque.Prelude hiding (dropWhile, filter, head, ...
null
https://raw.githubusercontent.com/nikita-volkov/deque/d502228de73bd6e68b0ead258a27be4d0db3812c/library/Deque/Lazy/Defs.hs
haskell
| The typical `toList` and `fromList` conversions are provided by means of | | \(\mathcal{O}(1)\). | \(\mathcal{O}(n)\). Leave only the elements satisfying the predicate. | \(\mathcal{O}(n)\). | \(\mathcal{O}(n)\). | \(\mathcal{O}(n)\). | \(\mathcal{O}(n)\). | \(\mathcal{O}(n)\). Perform `takeWhile`...
# LANGUAGE CPP # Definitions of lazy . the ` Foldable ` and ` IsList ` instances . module Deque.Lazy.Defs where import Control.Monad (fail) import qualified Data.List as List import Deque.Prelude hiding (dropWhile, filter, head, init, last, null, reverse, tail, take, takeWhile) import qualified Deque.Prelude as ...
19fb94c710d11864271466533e0f8d9c718651b3a01b12727bf356e1969dc3fd
AlacrisIO/legicash-facts
signing.mli
(** Signing data using Secp256k1 public-key cryptography *) open Lib open Yojsoning open Marshaling open Digesting open Persisting open Types open Action * Address identifying a party ( user , operator ) . Per Ethereum , use the low 160 - bits of the Keccak256 digest of the party 's public key Per Ethereum, ...
null
https://raw.githubusercontent.com/AlacrisIO/legicash-facts/5d3663bade68c09bed47b3f58fa12580f38fdb46/src/legilogic_lib/signing.mli
ocaml
* Signing data using Secp256k1 public-key cryptography * Private key in Secp256k1 public-key cryptography * Public key in Secp256k1 public-key cryptography with type t = Secp256k1.Key.public Secp256k1.Key.t Do we really need this "short" name as an alias? password to use for signing JSON RPC, until we get rid o...
open Lib open Yojsoning open Marshaling open Digesting open Persisting open Types open Action * Address identifying a party ( user , operator ) . Per Ethereum , use the low 160 - bits of the Keccak256 digest of the party 's public key Per Ethereum, use the low 160-bits of the Keccak256 digest of the party's ...
ecea9c7a635f58f6750bb5fdd7a403e88f274be1a5ccf0e47e70ea13ef465d2f
rd--/hsc3
soundIn.help.hs
soundIn ; composite of in ' and numOutputBuses soundIn 0 * 0.5 soundIn ; copy input from 1 & 0 to outputs 0 & 1 . soundIn (mce2 1 0) * 0.5 ; io matrix ( 0->0,1->2,2->1,3->3 ) -- -- 0 1 2 3 -- 0 * 1 * 2 * 3 * soundIn (mce [0, 2, 1, 3])
null
https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/soundIn.help.hs
haskell
0 1 2 3 0 *
soundIn ; composite of in ' and numOutputBuses soundIn 0 * 0.5 soundIn ; copy input from 1 & 0 to outputs 0 & 1 . soundIn (mce2 1 0) * 0.5 ; io matrix ( 0->0,1->2,2->1,3->3 ) 1 * 2 * 3 * soundIn (mce [0, 2, 1, 3])
907b3d9b6633bcd47292c741dfd1271d01ff9ad08f13d65ce2c340e4ec04c04d
GaloisInc/argo
ReST.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # module Argo.Doc.ReST (restructuredText) where import Control.Monad.Reader import Control.Monad.Writer import Data.Char import Data.Foldable import Data.Text (Text) import qualified Data.Text as T import Numeric.Natural...
null
https://raw.githubusercontent.com/GaloisInc/argo/b9b3edd992e57ca31224530f763f313fcf24bab7/argo/src/Argo/Doc/ReST.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE ScopedTypeVariables # module Argo.Doc.ReST (restructuredText) where import Control.Monad.Reader import Control.Monad.Writer import Data.Char import Data.Foldable import Data.Text (Text) import qualified Data.Text as T import Numeric.Natural import Argo.Doc data ReSTContext...
5e845d1299b44d8f79ba2344c8728247952c6d72827994e0ae949eb03044fed0
zcaudate/hara
hook.clj
(ns hara.function.base.hook (:require [hara.state.base.cache :refer [defcache]] [hara.state.base.common :as state] [hara.state.base.impl :deps true])) (defcache +original "cache for storing original functions which have been patched" {:added "3.0"} [:atom {:tag "hooks" :displa...
null
https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/src/hara/function/base/hook.clj
clojure
(ns hara.function.base.hook (:require [hara.state.base.cache :refer [defcache]] [hara.state.base.common :as state] [hara.state.base.impl :deps true])) (defcache +original "cache for storing original functions which have been patched" {:added "3.0"} [:atom {:tag "hooks" :displa...
10c0a48dc35749a4dc8824eea26bbd8165eddf09337d19131b46b0fb82bbae09
chenyukang/rubytt
gen_dump.ml
open Core let () = let dump_str = In_channel.read_all "dump.rb" in let escaped = String.escaped dump_str in Out_channel.write_all "dump.ml" ~data:("let dump_str = \"\n" ^ escaped ^ "\"\n")
null
https://raw.githubusercontent.com/chenyukang/rubytt/3b9898cd9e180594ee30fb74cea9a8356a6e0c14/src/gen_dump.ml
ocaml
open Core let () = let dump_str = In_channel.read_all "dump.rb" in let escaped = String.escaped dump_str in Out_channel.write_all "dump.ml" ~data:("let dump_str = \"\n" ^ escaped ^ "\"\n")
29a7c7ce641bd48a91c79f8d5c2f49bc01c24bb6377b0c11697027908d2f0510
tezos/tezos-mirror
global_constants_storage_benchmarks.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Marigold < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/cdc7a4382ef6dfcd6c73f86d9a29b829b33d18d4/src/proto_016_PtMumbai/lib_benchmarks_proto/global_constants_storage_benchmarks.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 Marigold < > 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 , WHETHE...
62ff0f8bc00a84f57c2caa66e08989d25ce71ccf3a9bf86a2a58f541f9d0a55e
serokell/importify
Runner.hs
module Main where import Universum import Data.List (partition) import System.Environment (withArgs) import System.Wlog (infoPlus) import Test.Hspec (hspec) import Extended.System.Wlog (initImportifyLogger) import Importify.Environment (runCache) import Importify.Main (importifyCacheProject) import qualified Test....
null
https://raw.githubusercontent.com/serokell/importify/09f31d851b2152ae6ce880b81abc3554ade29f37/test/hspec/Runner.hs
haskell
module Main where import Universum import Data.List (partition) import System.Environment (withArgs) import System.Wlog (infoPlus) import Test.Hspec (hspec) import Extended.System.Wlog (initImportifyLogger) import Importify.Environment (runCache) import Importify.Main (importifyCacheProject) import qualified Test....
303c33f4a9b6b48670979af0f72111d91a1d62080282b63183b15615e73ad582
flatironinstitute/flathub
ECSV.hs
{-# LANGUAGE OverloadedStrings #-} module Ingest.ECSV ( loadECSV , ingestECSV ) where import Control.Arrow ((&&&), first) import Control.Monad (unless) import Control.Monad.IO.Class (liftIO) import qualified Data.ByteString as BS import qualified Data.Csv.Streaming as CSV import ...
null
https://raw.githubusercontent.com/flatironinstitute/flathub/00c7967c6c9a69baf9805014515a4876b1fa6b7b/src/Ingest/ECSV.hs
haskell
# LANGUAGE OverloadedStrings # allow string for any type
module Ingest.ECSV ( loadECSV , ingestECSV ) where import Control.Arrow ((&&&), first) import Control.Monad (unless) import Control.Monad.IO.Class (liftIO) import qualified Data.ByteString as BS import qualified Data.Csv.Streaming as CSV import Data.Function (on) import ...