_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
b8022a955a3bd20bf7175f67b56c39a62d7948dea64c9ff9172b1d31ca58b103
tonyrog/can
can_probe.erl
%%%---- BEGIN COPYRIGHT -------------------------------------------------------- %%% Copyright ( C ) 2007 - 2012 , Rogvall Invest AB , < > %%% %%% This software is licensed as described in the file COPYRIGHT, which %%% you should have received as part of this distribution. The terms %%% are also available at . %%% %...
null
https://raw.githubusercontent.com/tonyrog/can/9f76fd57198e5531978791e0528e1798a9c08693/src/can_probe.erl
erlang
---- BEGIN COPYRIGHT -------------------------------------------------------- This software is licensed as described in the file COPYRIGHT, which you should have received as part of this distribution. The terms are also available at . You may opt to use, copy, modify, merge, publish, distribute and/or sell furn...
Copyright ( C ) 2007 - 2012 , Rogvall Invest AB , < > copies of the Software , and permit persons to whom the Software is This software is distributed on an " AS IS " basis , WITHOUT WARRANTY OF ANY @author < > ( C ) 2010 , Created : 12 Jun 2010 by < > -module(can_probe). -export([start/0,start/...
ca0797889aea232e61a0e5706b7531b3f43f860eb77fdafcdfeabbe443d11a69
racket/data
union-find.rkt
#lang racket/base (require racket/contract) (provide uf-set? uf-new) (provide (contract-out [uf-union! (-> uf-set? uf-set? void?)] [uf-find (-> uf-set? any/c)] [uf-set-canonical! (-> uf-set? any/c void?)] [uf-same-set? (-> uf-set? uf-set? boolean?)])) (struct uf-set (x rank) #:mutable #:methods gen:custom-w...
null
https://raw.githubusercontent.com/racket/data/1fe6cb389ad9a817c6abaff2d8f5ef407b5a16a2/data-lib/data/union-find.rkt
racket
#lang racket/base (require racket/contract) (provide uf-set? uf-new) (provide (contract-out [uf-union! (-> uf-set? uf-set? void?)] [uf-find (-> uf-set? any/c)] [uf-set-canonical! (-> uf-set? any/c void?)] [uf-same-set? (-> uf-set? uf-set? boolean?)])) (struct uf-set (x rank) #:mutable #:methods gen:custom-w...
e9da5ef8242e3375f14da8d0c41936fb23155f51e31d2917f6f5389c2cdb585f
knupfer/type-of-html
ExampleTypeOfHtml.hs
# OPTIONS_GHC -fno - warn - missing - signatures -fno - warn - unused - do - bind -fno - warn - name - shadowing # # LANGUAGE RebindableSyntax # module ExampleTypeOfHtml (hackageUpload) where import Prelude import Html import Html.Obsolete [ 2020 - 11 - 07 ] hackageUpload title = let (>>) = (#) in do DOCTYPE ...
null
https://raw.githubusercontent.com/knupfer/type-of-html/981e2c2c4f90e57a55e00e18db6f6c0623292851/bench/ExampleTypeOfHtml.hs
haskell
# OPTIONS_GHC -fno - warn - missing - signatures -fno - warn - unused - do - bind -fno - warn - name - shadowing # # LANGUAGE RebindableSyntax # module ExampleTypeOfHtml (hackageUpload) where import Prelude import Html import Html.Obsolete [ 2020 - 11 - 07 ] hackageUpload title = let (>>) = (#) in do DOCTYPE ...
b5414be537b6bba3424711cb90814afe12784d7599c14c3a869b5418147b354d
spechub/Hets
SymMapAna.hs
| Module : ./CspCASL / SymMapAna.hs Description : symbol map analysis for the CspCASL logic . Copyright : ( c ) , DFKI GmbH 2011 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : portable Module : ./CspCASL/SymMap...
null
https://raw.githubusercontent.com/spechub/Hets/bbaa9dd2d2e5eb1f2fd3ec6c799a6dde7dee6da2/CspCASL/SymMapAna.hs
haskell
compute the channel name map (as a Map) compute the process name map (as a Map) Anything not mapped explicitly is left unchanged now try the remaining ones with (un)kinded raw symbol Anything not mapped explicitly is left unchanged in case of ambiguities try to find an exact match
| Module : ./CspCASL / SymMapAna.hs Description : symbol map analysis for the CspCASL logic . Copyright : ( c ) , DFKI GmbH 2011 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : portable Module : ./CspCASL/SymMap...
5d9d3a5dd5966499e040222ee4e568bdbf7437fb39767da44e29c35cdbe04309
smucclaw/dsl
SVG.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # | transpiler to SVG visualization of the AnyAll and/or trees . Largely a wrapper . Most of the functionality is in the ` AnyAll ` lib . Largely a wrapper. Most of the functiona...
null
https://raw.githubusercontent.com/smucclaw/dsl/4849bbf12418817e8ca30ddf64c1fc563ffe945d/lib/haskell/natural4/src/LS/XPile/SVG.hs
haskell
# LANGUAGE OverloadedStrings # import Debug.Trace (trace) | extract the tree-structured rules from Interpreter for each rule, print as svg according to options we were given | don't show SVG diagrams if they only have a single element
# LANGUAGE RecordWildCards # # LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # | transpiler to SVG visualization of the AnyAll and/or trees . Largely a wrapper . Most of the functionality is in the ` AnyAll ` lib . Largely a wrapper. Most of the functionality is in the `AnyAll` lib. -} m...
3802798334c9558fdc59d31788339b6a11a62a3aa0feb72ff5203f8e02dc15f5
gsakkas/rite
20060408-22:49:00-d7677aecaf225da83dfe298659b3af98.seminal.ml
* * * * * Note : Problem 1 does not use ; see the assignment * * * * exception Unimplemented exception RuntimeTypeError exception BadSourceProgram exception BadPrecomputation # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060408-22%3A49%3A00-d7677aecaf225da83dfe298659b3af98.seminal.ml
ocaml
store env! ********* examples and testing **********
* * * * * Note : Problem 1 does not use ; see the assignment * * * * exception Unimplemented exception RuntimeTypeError exception BadSourceProgram exception BadPrecomputation # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ...
c9dac207cecaa7095c794b70e0bbbbc9813898c509402c904b4c7373ee3356db
keera-studios/keera-hails
Reactive.hs
-- | -- Copyright : ( C ) Keera Studios Ltd , 2013 -- License : BSD3 Maintainer : module Graphics.UI.Gtk.Reactive (module Exported) where import Graphics.UI.Gtk.Reactive.ColorButton as Exported import Graphics.UI.Gtk.Reactive.Button as Exported import Graphics.UI.Gtk.Reactive....
null
https://raw.githubusercontent.com/keera-studios/keera-hails/bf069e5aafc85a1f55fa119ae45a025a2bd4a3d0/keera-hails-reactive-gtk/src/Graphics/UI/Gtk/Reactive.hs
haskell
| License : BSD3
Copyright : ( C ) Keera Studios Ltd , 2013 Maintainer : module Graphics.UI.Gtk.Reactive (module Exported) where import Graphics.UI.Gtk.Reactive.ColorButton as Exported import Graphics.UI.Gtk.Reactive.Button as Exported import Graphics.UI.Gtk.Reactive.Entry as Export...
3bcbd9e94ff8e8f07a5850c498c7bfa2e7b097e659b1f6d4256efa7e09e26479
keera-studios/keera-hails
Builder.hs
-- | -- Copyright : ( C ) Keera Studios Ltd , 2013 -- License : BSD3 Maintainer : module Hails.MVC.View.Gtk.Builder (loadDefaultInterface) where import Graphics.UI.Gtk import Graphics.UI.Gtk.Extra.Builder -- | Returns a builder from which the objects in this part of the interface -- can be accessed...
null
https://raw.githubusercontent.com/keera-studios/keera-hails/bf069e5aafc85a1f55fa119ae45a025a2bd4a3d0/keera-hails-mvc-view-gtk3/src/Hails/MVC/View/Gtk/Builder.hs
haskell
| License : BSD3 | Returns a builder from which the objects in this part of the interface can be accessed.
Copyright : ( C ) Keera Studios Ltd , 2013 Maintainer : module Hails.MVC.View.Gtk.Builder (loadDefaultInterface) where import Graphics.UI.Gtk import Graphics.UI.Gtk.Extra.Builder loadDefaultInterface :: (String -> IO String) -> IO Builder loadDefaultInterface getDataFileName = loadInterface =<< getDa...
6eef0bf844bc6b608ba155bf60b49eadb08cdbc7a957c16f282550b9ae1f06b8
hoelzl/Snark
trie-index.lisp
;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*- ;;; File: trie-index.lisp The contents of this file are subject to the Mozilla Public License ;;; Version 1.1 (the "License"); you may not use this file except in ;;; compliance with the License. You may obtain a copy of the License at ;;; / ;;; Software d...
null
https://raw.githubusercontent.com/hoelzl/Snark/06f86a31f476b2e4c28519765ab1e1519a4cc932/src/trie-index.lisp
lisp
-*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*- File: trie-index.lisp Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific l...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is SNARK . The Initial Developer of the Original Code is SRI International . Portions created by the Initial Developer are Copyright ( C ) 1981 - 2012 . ...
400cb28493eed05b335167ca75298ca229dc2e8e551105201b5edf8b7236e6b7
UU-ComputerScience/uu-cco
Component.hs
# LANGUAGE CPP # ------------------------------------------------------------------------------- -- | -- Module : CCO.Component Copyright : ( c ) 2008 Utrecht University -- License : All rights reserved -- -- Maintainer : -- Stability : provisional Portability : non - portable ( uses CPP ) ...
null
https://raw.githubusercontent.com/UU-ComputerScience/uu-cco/cca433c8a6f4d27407800404dea80c08fd567093/uu-cco/src/CCO/Component.hs
haskell
----------------------------------------------------------------------------- | Module : CCO.Component License : All rights reserved Maintainer : Stability : provisional An arrow for constructing and composing compiler components. ---------------------------------------------------------------...
# LANGUAGE CPP # Copyright : ( c ) 2008 Utrecht University Portability : non - portable ( uses CPP ) module CCO.Component ( abstract , instance : Arrow , ArrowChoice : : Parser s a - > Component String a ) where import CCO.Feedback (Feedback, runFeedback) import CCO.Lexing (Lexer) imp...
d1bafa2afdc6bdadd7efadf6a2eb123f86a6573a2f5e994493a30f7956f60084
DerekCuevas/interview-cake-clj
core.clj
(ns second-largest-in-binary-search-tree.core (:require [second-largest-in-binary-search-tree.binary-tree :as tree]) (:gen-class)) (defn second-largest "O(lgn) time solution." [root] (loop [parent nil {:keys [value left right] :as current} root] (if (nil? right) (if (nil? left) (:v...
null
https://raw.githubusercontent.com/DerekCuevas/interview-cake-clj/f17d3239bb30bcc17ced473f055a9859f9d1fb8d/second-largest-in-binary-search-tree/src/second_largest_in_binary_search_tree/core.clj
clojure
(ns second-largest-in-binary-search-tree.core (:require [second-largest-in-binary-search-tree.binary-tree :as tree]) (:gen-class)) (defn second-largest "O(lgn) time solution." [root] (loop [parent nil {:keys [value left right] :as current} root] (if (nil? right) (if (nil? left) (:v...
84cbe28c54de0f310deda8646056b914080f10523b8954d95e91e7baeee79047
headwinds/reagent-reframe-material-ui
demo-menu.cljs
(ns example.demos.demo-menu (:require [reagent.core :as r] [re-frame.core :as re] ["material-ui" :as mui] ["material-ui-icons" :as mui-icons])) ;;-- State (def setting-selected (r/atom 0)) (defn option-people-click [ev] (re/dispatch [:option-a-click])) (defn option-keys-click ...
null
https://raw.githubusercontent.com/headwinds/reagent-reframe-material-ui/8a6fba82a026cfedca38491becac85751be9a9d4/src/example/demos/demo-menu.cljs
clojure
-- State -- People -- Keys
(ns example.demos.demo-menu (:require [reagent.core :as r] [re-frame.core :as re] ["material-ui" :as mui] ["material-ui-icons" :as mui-icons])) (def setting-selected (r/atom 0)) (defn option-people-click [ev] (re/dispatch [:option-a-click])) (defn option-keys-click [ev] (re/...
4eaf330fb99caf0d7bba6dabaec284b7e9a5e0af662442a11d589f9819b4da8c
cloojure/tupelo
safe.cljc
Copyright ( c ) . All rights reserved . The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ; (-1.0.php) which can be found in the file epl-v10.html at ; the root of this distribution. By using this software in any fashion, you are agreeing to be ; bound by th...
null
https://raw.githubusercontent.com/cloojure/tupelo/485680380b2d10727181b9c3dd198ab1e6299817/src/cljc/tupelo/string/safe.cljc
clojure
(-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. => tupelo.string.safe/walk-normalize
Copyright ( c ) . All rights reserved . The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (ns tupelo.string.safe (:require [clojure.walk :as walk] [tupelo.core :as t] [tupelo.string :as str] )) "Recursively walks a data structure. For all strin...
e8a7ead3869260a1fb748844f54275f1092728c1ef3ad9695f4f6003df8fc50a
RJ/erlang-spdy
espdy_parser_test.erl
-module(espdy_parser_test). -compile(export_all). etest macros -include_lib("eunit/include/eunit.hrl"). include espdy records -include("espdy.hrl"). test_basic_operation() -> ?assertEqual(1, 1). %% ========================================================= %% Control Frame Tests %% ==========================...
null
https://raw.githubusercontent.com/RJ/erlang-spdy/3a15f26a80db87e0d901e8f1096682f848953d75/test/espdy_parser_test.erl
erlang
========================================================= Control Frame Tests ========================================================= +----------------------------------+ +----------------------------------+ +----------------------------------+ | Data | +---------------------------...
-module(espdy_parser_test). -compile(export_all). etest macros -include_lib("eunit/include/eunit.hrl"). include espdy records -include("espdy.hrl"). test_basic_operation() -> ?assertEqual(1, 1). Control Frame Layout : Version(15bits ) | Type(16bits ) | | Flags ( 8) | Length ( 24 bits ) | |...
8959a793da562058d7030d7ae55be7bf69368092b40f7ca19939f4d9713b8118
music-suite/music-pitch
Tokawa.hs
module Music.Pitch.Tokawa where
null
https://raw.githubusercontent.com/music-suite/music-pitch/65541021ae9f5bdaad26a02e622c88d60f068f63/src/Music/Pitch/Tokawa.hs
haskell
module Music.Pitch.Tokawa where
25034d219cd62af7e016f98b03c949af4fec489eaceed8cff9bdbea890669a33
ghc/nofib
Activity.hs
module Activity (activityGraph,Activity(..)) where import GRIP import StdLib import PSlib import Graph import Parse activityGraph ordering selectpes statFile = show ( , ticks ) + + --show "DEBUG " ++ show (aggs) ++ initGraph "Processor Activity Graph" (pes,selectpes) (ticks*100,100) ("Time (ms)","% ...
null
https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/real/gg/Activity.hs
haskell
show "DEBUG " ++ show (aggs) ++
module Activity (activityGraph,Activity(..)) where import GRIP import StdLib import PSlib import Graph import Parse activityGraph ordering selectpes statFile = show ( , ticks ) + + initGraph "Processor Activity Graph" (pes,selectpes) (ticks*100,100) ("Time (ms)","% Activity") (map f ordering) ...
3d135242a8cc0dfc7e86e27a66f3b2556826000809f53c3448bcb521d10b5548
haskell/vector
Unboxed.hs
{-# LANGUAGE ConstraintKinds #-} module Tests.Vector.Unboxed (tests) where import Test.Tasty import qualified Data.Vector.Unboxed import Tests.Vector.Property testGeneralUnboxedVector :: forall a. (CommonContext a Data.Vector.Unboxed.Vector, Data.Vector.Unboxed.Unbox a, Ord a, Data a) => Data.Vector.Unboxed.Vec...
null
https://raw.githubusercontent.com/haskell/vector/b592c22e713aa8a901d9e4387ee4522632bd7d10/vector/tests/Tests/Vector/Unboxed.hs
haskell
# LANGUAGE ConstraintKinds #
module Tests.Vector.Unboxed (tests) where import Test.Tasty import qualified Data.Vector.Unboxed import Tests.Vector.Property testGeneralUnboxedVector :: forall a. (CommonContext a Data.Vector.Unboxed.Vector, Data.Vector.Unboxed.Unbox a, Ord a, Data a) => Data.Vector.Unboxed.Vector a -> [TestTree] testGeneralUn...
a94b0612450c1d2b8f98f885eb21345de6791d0272d1aa9437536c547cfe6386
jubnzv/moonsmith
context.mli
open Core_kernel (** Random code generation context. *) type t = { mutable ctx_datum_stmts: Ast.stmt list; (** Statements that defines a global data on the top-level. *) ctx_funcdef_stmts: Ast.stmt list; (** Functions and methods defined on the top-level. *) ctx_call_stmts: Ast.stmt list; (** Function ca...
null
https://raw.githubusercontent.com/jubnzv/moonsmith/2e5f76cb6e5a20a9a67e33791561c91eca3c2943/src/context.mli
ocaml
* Random code generation context. * Statements that defines a global data on the top-level. * Functions and methods defined on the top-level. * Function calls defined on the top-level. * Statements that combine and print result data. * Global environment for the top-level. * User-defined configuration. * Map tha...
open Core_kernel type t = { mutable ctx_datum_stmts: Ast.stmt list; ctx_funcdef_stmts: Ast.stmt list; ctx_call_stmts: Ast.stmt list; ctx_result_stmts: Ast.stmt list; mutable ctx_global_env: Ast.env; ctx_config : Config.t; mutable ctx_table_fields_map: (int, int list, Int.comparator_witness) Base.Ma...
4f8346b928291fc32e04174241ca4e35bd819a3721bc31f964e23909e7b83bd2
ul/ad-libitum
sets-impl.scm
Implementation of general sets and bags for SRFI 113 ;;; A "sob" object is the representation of both sets and bags. ;;; This allows each set-* and bag-* procedure to be implemented ;;; using the same code, without having to deal in ugly indirections over the field accessors . There are three fields , " sob - mu...
null
https://raw.githubusercontent.com/ul/ad-libitum/882fa5680db6341367941c40f2fa5ca1f7c0c47a/srfi/s113/sets-impl.scm
scheme
A "sob" object is the representation of both sets and bags. This allows each set-* and bag-* procedure to be implemented using the same code, without having to deal in ugly indirections "sob-hash-table", and "sob-comparator." The value of "sob-multi?" is #t for bags and #f for sets. "Sob-hash-table" maps the elem...
Implementation of general sets and bags for SRFI 113 over the field accessors . There are three fields , " sob - multi ? " , the element appears , which is always 1 for a set , any positive value Shim to convert from SRFI 69 to the future " intermediate hash tables " SRFI . Unfortunately , hash - tab...
1a229ff72579bd646703815787452e8767c3e052584f222a83c084584b58515b
haskell-suite/base
Ix.hs
# LANGUAGE Trustworthy # # LANGUAGE CPP # ----------------------------------------------------------------------------- -- | -- Module : Data.Ix Copyright : ( c ) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- Stability : stabl...
null
https://raw.githubusercontent.com/haskell-suite/base/1ee14681910c76d0a5a436c33ecf3289443e65ed/Data/Ix.hs
haskell
--------------------------------------------------------------------------- | Module : Data.Ix License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : stable Portability : portable The 'Ix' class is used to map a contiguous subrange of values in type onto integers...
# LANGUAGE Trustworthy # # LANGUAGE CPP # Copyright : ( c ) The University of Glasgow 2001 module Data.Ix ( Ix ( range , index , inRange , rangeSize ) Ix Int Ix Integer Ix Bool is the same numbering defined by the ' ' class . For exampl...
7b53b0aa6bee16e02086976bef0515240c9409a925f62c8c16e3030f37608483
VincentToups/racket-lib
burse.rkt
#lang racket (require racket/dict) (define denominations '((fifties . 50) (twenties . 20) (tens . 10) (fives . 5) (ones . 1) (quarters . 0.25) (dimes . 0.10) (nickels . 0.05) (pennies . 0.01))) (define the-empty-burse '((fifties . 0) (twenties . 0) (...
null
https://raw.githubusercontent.com/VincentToups/racket-lib/d8aed0959fd148615b000ceecd7b8a6128cfcfa8/pure-lands/chapter-01/burse.rkt
racket
#lang racket (require racket/dict) (define denominations '((fifties . 50) (twenties . 20) (tens . 10) (fives . 5) (ones . 1) (quarters . 0.25) (dimes . 0.10) (nickels . 0.05) (pennies . 0.01))) (define the-empty-burse '((fifties . 0) (twenties . 0) (...
1ac22a4116b461b895e36d2e1743eda127da1aa602be701ab200d354a835ddcc
BinaryAnalysisPlatform/bap
bap_int_conversions.ml
open Core_kernel[@@warning "-D"] open Or_error let to_int conv sexp v = match conv v with | Some v -> Ok v | None -> error "doesn't fit into int" v sexp let int_of_int64 = to_int Int64.to_int Int64.sexp_of_t let int_of_int32 = to_int Int32.to_int Int32.sexp_of_t let int_of_nativeint = to_int Nativeint.to_int Na...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/bap_types/bap_int_conversions.ml
ocaml
open Core_kernel[@@warning "-D"] open Or_error let to_int conv sexp v = match conv v with | Some v -> Ok v | None -> error "doesn't fit into int" v sexp let int_of_int64 = to_int Int64.to_int Int64.sexp_of_t let int_of_int32 = to_int Int32.to_int Int32.sexp_of_t let int_of_nativeint = to_int Nativeint.to_int Na...
2e47594a4e847d5aeb456053ae15aed105641dd941c2dcc8a38c553b6476539e
input-output-hk/cardano-sl
NodeInfo.hs
module Pos.Infra.Reporting.NodeInfo ( extendWithNodeInfo , getNodeInfo , extendRTDesc ) where import Universum import Data.Bits (Bits (..)) import Formatting (sformat, stext, (%)) import Network.Info (IPv4 (..), getNetworkInterfaces, ipv4) import Serok...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/infra/src/Pos/Infra/Reporting/NodeInfo.hs
haskell
The cardano-report-server has been switched off and removing code that depends on it makes building other projects like cardano-byron-proxy easier. We leave the API here, but turn all operations into a NO-OP. | Uses a 'Diffusion' to get a text representation of the current network state as seen by this node. Also ...
module Pos.Infra.Reporting.NodeInfo ( extendWithNodeInfo , getNodeInfo , extendRTDesc ) where import Universum import Data.Bits (Bits (..)) import Formatting (sformat, stext, (%)) import Network.Info (IPv4 (..), getNetworkInterfaces, ipv4) import Serok...
dfffc312951634c8f84dbc0dc8a8eb68864d4874cb61c16cadf303c8eb61c502
vascokk/rivus_cep
event1.erl
-module(event1). -behaviour(event_behaviour). -export([get_param_by_name/2, get_param_names/0]). get_param_by_name(Event, ParamName) -> case ParamName of name -> element(1, Event); eventparam1 -> element(2, Event); eventparam2 -> element(3, Event); eventparam3 -> element(4, Event); eventparam4 ->...
null
https://raw.githubusercontent.com/vascokk/rivus_cep/e9fe6ed79201d852065f7fb2a24a880414031d27/test/event1.erl
erlang
-module(event1). -behaviour(event_behaviour). -export([get_param_by_name/2, get_param_names/0]). get_param_by_name(Event, ParamName) -> case ParamName of name -> element(1, Event); eventparam1 -> element(2, Event); eventparam2 -> element(3, Event); eventparam3 -> element(4, Event); eventparam4 ->...
3f3ee5e7db78173d61cd87a1bc6e5e1fe9a356a9c3ad267e63e1ded6cc1bcb2d
michalkonecny/aern2
CachedUnsafe.hs
# LANGUAGE CPP # -- #define DEBUG | Module : AERN2.QA.Strategy . CachedUnsafe Description : QA net plain evaluation with unsafe IO caching Copyright : ( c ) : : Stability : experimental Portability : portable QA net plain evaluation with unsa...
null
https://raw.githubusercontent.com/michalkonecny/aern2/7ab41113ca8f73dca70d887d190ddab3b43ef084/aern2-net/src/AERN2/QA/Strategy/CachedUnsafe.hs
haskell
#define DEBUG import Text.Printf | A global variable controlling whether unsafe caching is used in QA objects in the (->) arrow name = qaName qa
# LANGUAGE CPP # | Module : AERN2.QA.Strategy . CachedUnsafe Description : QA net plain evaluation with unsafe IO caching Copyright : ( c ) : : Stability : experimental Portability : portable QA net plain evaluation with unsafe IO caching ...
68027f1bcda3b88106d47b28ea6a0d4d17b4edf0f7dd0eafbac95efff25f97aa
batsh-dev-team/Batsh
winbat_format.ml
open Core_kernel open Winbat_ast let escape (str : string) : string = let buffer = Buffer.create (String.length str) in let exclamation = match String.index str '!' with | None -> false | Some _ -> true in String.iter str ~f:(fun ch -> let escaped = match ch with | '%' -> "%%" | '...
null
https://raw.githubusercontent.com/batsh-dev-team/Batsh/5c8ae421e0eea5dcb3da01643152ad96af941f07/lib/winbat_format.ml
ocaml
open Core_kernel open Winbat_ast let escape (str : string) : string = let buffer = Buffer.create (String.length str) in let exclamation = match String.index str '!' with | None -> false | Some _ -> true in String.iter str ~f:(fun ch -> let escaped = match ch with | '%' -> "%%" | '...
dfd5a9f106385644595ad2acd308d1209a986daa569ff267b3d5ea590b453028
theodormoroianu/SecondYearCourses
LambdaChurch_20210415164404.hs
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415164404.hs
haskell
alpha-equivalence subst u x t defines [u/x]t, i.e., substituting u for x in t This substitution avoids variable captures so it is safe to be used when reducing terms with free variables (e.g., if evaluating inside lambda abstractions) ^ substitution term ^ variable to be substitutes ^ term in which the substit...
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
c13d2c7c56e1dafff5943b895d146c8ccbe5f378ef8a46f697b4949bd131d985
ott-lang/ott
main.ml
(**************************************************************************) (* Ott *) (* *) , Computer Laboratory , University of Cambridge , project , I...
null
https://raw.githubusercontent.com/ott-lang/ott/bd89321aeb74a1d35e9e6462486855fedd9e6064/src/main.ml
ocaml
************************************************************************ Ott ...
, Computer Laboratory , University of Cambridge , project , INRIA Rocquencourt Copyright 2005 - 2010 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the ...
e20d4c6e473acc18ba685203b96073a7bd004362abc34b048b1e3502a1eea614
bsansouci/bsb-native
odoc_info.ml
(***********************************************************************) (* *) (* OCamldoc *) (* *) , projet ...
null
https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/ocamldoc/odoc_info.ml
ocaml
********************************************************************* OCamldoc ...
, projet Cristal , INRIA Rocquencourt Copyright 2001 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . type ref_kind = Odoc_types.ref_kind = ...
e80e184011ed1ce9a9a8f4b8a68965abc3326c44c30491c6be0a8cf4538e8bdb
aroemers/sibiro
params.clj
(ns sibiro.params "ERPERIMENTAL! EVERYTHING IS SUBJECT TO CHANGE IN THIS NAMESPACE!") ;;; Private helpers. (defn- name-with-attrs [name [arg1 arg2 & argx :as args]] (let [[attrs args] (cond (and (string? arg1) (map? arg2)) [(assoc arg2 :doc arg1) argx] (string? arg1) ...
null
https://raw.githubusercontent.com/aroemers/sibiro/fd4728d1e496af2fbb60e37524f67faf17abb26e/src/sibiro/params.clj
clojure
Private helpers. Main macro Convenience macros
(ns sibiro.params "ERPERIMENTAL! EVERYTHING IS SUBJECT TO CHANGE IN THIS NAMESPACE!") (defn- name-with-attrs [name [arg1 arg2 & argx :as args]] (let [[attrs args] (cond (and (string? arg1) (map? arg2)) [(assoc arg2 :doc arg1) argx] (string? arg1) [{:doc arg1} (cons ar...
f9dd34f3d26b5ad3e5fda2a408992b0b88d581ed2968177e5e9b7e6f6b884adf
bract/bract.core
inducer.clj
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file LICENSE at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; the ...
null
https://raw.githubusercontent.com/bract/bract.core/625b8738554b1e1b61bd8522397fb698fb12d3d3/src/bract/core/inducer.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file 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 ...
Copyright ( c ) . All rights reserved . (ns bract.core.inducer "The inducer functions exposed by `bract.core` module." (:require [clojure.edn :as edn] [clojure.java.io :as io] [keypin.core :as keypin] [keypin.type :as kptype] [keypin.util :as kputil] [bract....
3c94895a3be43395a68aacc05456ef8867fcf504af334ddbf69a27605658ff69
joelburget/react-haskell
PropTypes.hs
# LANGUAGE CPP , FlexibleInstances # #ifdef __GHCJS__ # LANGUAGE JavaScriptFFI # #else # OPTIONS_GHC -fno - warn - missing - methods # #endif module React.PropTypes where import Data.Monoid import Data.Text (Text) import React.GHCJS import React.Imports data FPropType_ type FPropType = JSRef FPropType_ #ifdef __...
null
https://raw.githubusercontent.com/joelburget/react-haskell/5de76473b7cfdd6b85ac618bea31e658794b54e2/src/React/PropTypes.hs
haskell
| The equivalent to React propTypes. PropEnum [Text] Examples: @ @ TOOD(joel) instanceOf this
# LANGUAGE CPP , FlexibleInstances # #ifdef __GHCJS__ # LANGUAGE JavaScriptFFI # #else # OPTIONS_GHC -fno - warn - missing - methods # #endif module React.PropTypes where import Data.Monoid import Data.Text (Text) import React.GHCJS import React.Imports data FPropType_ type FPropType = JSRef FPropType_ #ifdef __...
ae2e47aeac0016490c3e02add7d0195a54a59e288403e80f2812e0a0a46d3248
PhDP/Akarui
Fmt.hs
-- | Functions to print some common data stuctures in a specific format. This is mostly convenient for playing with Sphinx in the console . module Akarui.Fmt where import qualified Data.Text as T import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import Akar...
null
https://raw.githubusercontent.com/PhDP/Akarui/4ad888d011f7115677e8f9ba18887865f5150746/Akarui/Fmt.hs
haskell
| Functions to print some common data stuctures in a specific format. This | Formats a set in the standard format (not a 'fromList'). | Formats a map. | Formats a map of sets to something | Formats a map of sets (often used to represent undirected networks). | Formats a map of maps (often used to represent networ...
is mostly convenient for playing with Sphinx in the console . module Akarui.Fmt where import qualified Data.Text as T import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import Akarui.Text import Akarui.ShowTxt fmtSet :: (ShowTxt k, Ord k) => Set k -> T.Text...
c5eabedab81eb1e6283a51e3a1f97d666f15ed30d5a3b8296a2d22a1432eac3c
fulcro-legacy/fulcro-tutorial
F_Fulcro_Client.cljs
(ns fulcro-tutorial.F-Fulcro-Client (:require [fulcro.client.primitives :as prim :refer-macros [defui]] [fulcro.client.dom :as dom] [devcards.core :as dc :refer-macros [defcard defcard-doc]])) (defcard-doc " # Building a Fulcro client We're now prepared to write a standalone Fulcro Client! Once you've under...
null
https://raw.githubusercontent.com/fulcro-legacy/fulcro-tutorial/fe9bcd19908d4e24e723954e3804ceccfd07e989/src/tutorial/fulcro_tutorial/F_Fulcro_Client.cljs
clojure
fulcro client options
(ns fulcro-tutorial.F-Fulcro-Client (:require [fulcro.client.primitives :as prim :refer-macros [defui]] [fulcro.client.dom :as dom] [devcards.core :as dc :refer-macros [defcard defcard-doc]])) (defcard-doc " # Building a Fulcro client We're now prepared to write a standalone Fulcro Client! Once you've under...
81f3772c7d4a2690a19d47a308db1908ab6710ef83c6e4cd3c3b2f8c6cc62757
nandor/llir-ocaml
t040-makeblock1.ml
TEST include tool - ocaml - lib flags = " -w a " ocaml_script_as_argument = " true " * setup - ocaml - build - env * * include tool-ocaml-lib flags = "-w a" ocaml_script_as_argument = "true" * setup-ocaml-build-env ** ocaml *) type t = { mutable a : int; };; { a = 0 };; * 0 CONST0 1...
null
https://raw.githubusercontent.com/nandor/llir-ocaml/9c019f15c444e30c825b1673cbe827e0497868fe/testsuite/tests/tool-ocaml/t040-makeblock1.ml
ocaml
TEST include tool - ocaml - lib flags = " -w a " ocaml_script_as_argument = " true " * setup - ocaml - build - env * * include tool-ocaml-lib flags = "-w a" ocaml_script_as_argument = "true" * setup-ocaml-build-env ** ocaml *) type t = { mutable a : int; };; { a = 0 };; * 0 CONST0 1...
6265732f9e63dc3525f85920bf63bebdfddee5f8fd559c65f9754bb079378674
skinkade/uniformity
pbkdf2.cljs
(ns uniformity.internals.js.pbkdf2 (:require [uniformity.internals.js.node-browser-compat :refer [crypto-type crypto]] [uniformity.internals.js.util :refer [str->utf8]] [cljs.core.async :as async] [cljs.core.async.interop :refer [p->c]] ;; [clojure.string :as string] ...
null
https://raw.githubusercontent.com/skinkade/uniformity/e9d007a7be833e70b4358c02700fd81866de775a/src/uniformity/internals/js/pbkdf2.cljs
clojure
[clojure.string :as string]
(ns uniformity.internals.js.pbkdf2 (:require [uniformity.internals.js.node-browser-compat :refer [crypto-type crypto]] [uniformity.internals.js.util :refer [str->utf8]] [cljs.core.async :as async] [cljs.core.async.interop :refer [p->c]] [async-error.core :refer-macros [...
87a3eed246bf55ac9d8edc620eee0230f393541011e97081054aa880b8cb227d
vaughnd/clojure-example-logback-integration
log.clj
(ns clojure-example-logback-integration.log (:require [clojure.pprint :as pprint]) (:import [ch.qos.logback.classic Level Logger] [java.io StringWriter] [org.slf4j LoggerFactory MDC])) (def logger ^ch.qos.logback.classic.Logger (LoggerFactory/getLogger "clojure-example-logback-integration")) ...
null
https://raw.githubusercontent.com/vaughnd/clojure-example-logback-integration/4bec2964ead9ff6f7bd1cf670572578f4421c44a/src/clojure_example_logback_integration/log.clj
clojure
(ns clojure-example-logback-integration.log (:require [clojure.pprint :as pprint]) (:import [ch.qos.logback.classic Level Logger] [java.io StringWriter] [org.slf4j LoggerFactory MDC])) (def logger ^ch.qos.logback.classic.Logger (LoggerFactory/getLogger "clojure-example-logback-integration")) ...
60107594ba86202e8b6ea787083a5c72e7baab28dbe8136b767cf88b81e0aacd
twilio/chessms
chessboard.erl
%%%------------------------------------------------------------------- @author chadrs ( C ) 2012 , %%% @doc %%% %%% @end Created : 2012 - 05 - 21 14:35:48.237300 %%%------------------------------------------------------------------- -module(chessboard). % board functions -export([board/0, board_to_fen/1, fen_to...
null
https://raw.githubusercontent.com/twilio/chessms/666c70553cf04f8f1c0bc0a77456b0b755998017/src/chessboard.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- board functions moves functions print like this: 8 9 10 11 ... print like this XXX: Implement me XXX: factor out validation so it can be used in all the places I do...
@author chadrs ( C ) 2012 , Created : 2012 - 05 - 21 14:35:48.237300 -module(chessboard). -export([board/0, board_to_fen/1, fen_to_board/1, print_board/1, render_board/2, render_board_ascii/2, render_board/5]). -export([make_move/2, short_notation/2, expanded_notation/2, play/0]). -export([unicode_piece/1, unic...
5c5cb016b2b5b2f807805cea10d6a8c1dcb6341a8e80a07028c9e8e7e2f717de
kupl/LearnML
original.ml
type formula = | True | False | Not of formula | AndAlso of (formula * formula) | OrElse of (formula * formula) | Imply of (formula * formula) | Equal of (exp * exp) and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp) let eval (f : formula) : bool = match f with | True -> true | Fals...
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/formula/sub104/original.ml
ocaml
type formula = | True | False | Not of formula | AndAlso of (formula * formula) | OrElse of (formula * formula) | Imply of (formula * formula) | Equal of (exp * exp) and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp) let eval (f : formula) : bool = match f with | True -> true | Fals...
c7bc55cf606c11012ef1d361ec61a2b4992391f91acec5e89eaa2838d5bebfe7
zyrolasting/mind-map
tcgs.rkt
#lang mind-map Deck-building trading card games Expensive if you care about tournaments and copyright laws. Free if you don't. If your child is a fan, find them a new outlet for competition NOW. Magic: The Gathering (Win conditions) Reduce your opponent's life to zero Your opponent's deck is out of card...
null
https://raw.githubusercontent.com/zyrolasting/mind-map/8401400f1dbc7956357cd27563b6926f4e429d7c/examples/tcgs.rkt
racket
#lang mind-map Deck-building trading card games Expensive if you care about tournaments and copyright laws. Free if you don't. If your child is a fan, find them a new outlet for competition NOW. Magic: The Gathering (Win conditions) Reduce your opponent's life to zero Your opponent's deck is out of card...
66544e7a5b544e5541b96eb68f7f1b818a486895479cd5b37cf361951f2794cb
jordwalke/rehp
graphics_js.ml
Js_of_ocaml library * / * Copyright ( C ) 2014 Hugo Heuzard * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of the...
null
https://raw.githubusercontent.com/jordwalke/rehp/f122b94f0a3f06410ddba59e3c9c603b33aadabf/lib/lwt/graphics/graphics_js.ml
ocaml
let ctx = get_context() in let elt = ctx##canvas in Uncaught Invalid_argument char_of_int with key € for example
Js_of_ocaml library * / * Copyright ( C ) 2014 Hugo Heuzard * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of the...
a1535afca71e247c5cfc05fab7308cd62984a1d091e44f1c48b93a3d518b6e00
RichiH/git-annex
Form.hs
git - annex assistant webapp form utilities - - Copyright 2012 < > - - Licensed under the GNU AGPL version 3 or higher . - - Copyright 2012 Joey Hess <> - - Licensed under the GNU AGPL version 3 or higher. -} # LANGUAGE FlexibleContexts , TypeFamilies , QuasiQuotes # # LANGUAGE MultiParamTypeC...
null
https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Assistant/WebApp/Form.hs
haskell
Also without required attribute. Makes a note widget be displayed after a field. Note that the toggle string must be unique on the form.
git - annex assistant webapp form utilities - - Copyright 2012 < > - - Licensed under the GNU AGPL version 3 or higher . - - Copyright 2012 Joey Hess <> - - Licensed under the GNU AGPL version 3 or higher. -} # LANGUAGE FlexibleContexts , TypeFamilies , QuasiQuotes # # LANGUAGE MultiParamTypeC...
1bf7a774135c6d584f5dda1b719692ddcd42963487c8e512ce8218a88f155a31
herbelin/coq-hh
coqtop.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/toplevel/coqtop.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 **********************************************************************
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * The Coq main module . The f...
8f5b8b4327880a9f710e31aa5bdcbfa7523a15745242c9511e59a230565f232c
akr/codegen
state.ml
Copyright ( C ) 2019- National Institute of Advanced Industrial Science and Technology ( AIST ) This library is free software ; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 2.1 of the License , ...
null
https://raw.githubusercontent.com/akr/codegen/47eab0f67b49e28d09c4b88adee03cf1643f1bf8/src/state.ml
ocaml
meaningful if c_swfnc is not None meaningful if c_swfnc is not None key is (ind args...) or (cstr args...). constructor or primitive function simplified_id (defined-constant, referred-cfuncs) The length should be equal to number of "s" in sp_sd_list constant or constructor constant or constructor s...
Copyright ( C ) 2019- National Institute of Advanced Industrial Science and Technology ( AIST ) This library is free software ; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 2.1 of the License , ...
e2d5a349b69c25d6dbb4ca8ce56d7664c61aa04c165532d124f4fc4185795fd5
lambdaisland/harvest
poke.clj
(ns repl-sessions.poke (:require [lambdaisland.harvest :as h] [lambdaisland.harvest.kernel :as hk] [clojure.string :as str])) (def short-words ["bat" "bar" "cat" "dud" "lip" "map" "pap" "sip" "fig" "wip"]) (defn rand-id [] (str/join "-" (take 3 (shuffle (con...
null
https://raw.githubusercontent.com/lambdaisland/harvest/17e601ee9718ef2c915e469ed62ea963c43db17e/repl_sessions/poke.clj
clojure
(ns repl-sessions.poke (:require [lambdaisland.harvest :as h] [lambdaisland.harvest.kernel :as hk] [clojure.string :as str])) (def short-words ["bat" "bar" "cat" "dud" "lip" "map" "pap" "sip" "fig" "wip"]) (defn rand-id [] (str/join "-" (take 3 (shuffle (con...
d4120199d5b34efc32aef669d476fa0a68e976508bd6f6896e4afde9d4c135c3
alexandergunnarson/quantum
paths.cljc
(ns quantum.untyped.core.paths (:require [clojure.string :as str] [quantum.untyped.core.core :as ucore] [quantum.untyped.core.string :as ustr] [quantum.untyped.core.system :as usys] [quantum.untyped.core.vars :refer [defalias]])) (ucore/log-this-ns) (defn path "Joins syste...
null
https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src-untyped/quantum/untyped/core/paths.cljc
clojure
(ns quantum.untyped.core.paths (:require [clojure.string :as str] [quantum.untyped.core.core :as ucore] [quantum.untyped.core.string :as ustr] [quantum.untyped.core.system :as usys] [quantum.untyped.core.vars :refer [defalias]])) (ucore/log-this-ns) (defn path "Joins syste...
6e2a650db3fabf9a5c268ab756041b3a9bc2a254459bad69f6e1b488771d4b6e
onedata/op-worker
dataset_path.erl
%%%------------------------------------------------------------------- @author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%------------------------------------------------------------------- %%% @doc %%% This module is responsible for cal...
null
https://raw.githubusercontent.com/onedata/op-worker/239b30c6510ccf0f2f429dc5c48ecf04d192549a/src/modules/dataset/dataset_path.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- @doc This module is responsible for calculating paths that identify datasets. These paths are of type file_meta:uuid_based_path() (which is basically a bug in paths_cache). ...
@author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . with only one difference : SpaceUuid is used instead of SpaceId on the first element of the path -module(dataset_path). -author("Jakub Kudzia"). -export([get/2, get_space_path/1, to_id/1]). -c...
84f019d8dca5662240c818bd066d3732ba393343c03f182fbbc9b0887f3bb1d6
tud-fop/vanda-haskell
XFSA.hs
----------------------------------------------------------------------------- -- | Copyright : ( c ) Technische Universität Dresden 2018 -- License : BSD-style -- -- Stability : unknown -- Portability : portable ----------------------------------------------------------------------------- module Vanda....
null
https://raw.githubusercontent.com/tud-fop/vanda-haskell/3214966361b6dbf178155950c94423eee7f9453e/library/Vanda/Grammar/XFSA/XFSA.hs
haskell
--------------------------------------------------------------------------- | License : BSD-style Stability : unknown Portability : portable ---------------------------------------------------------------------------
Copyright : ( c ) Technische Universität Dresden 2018 module Vanda.Grammar.XFSA.XFSA ( module Vanda.Grammar.XFSA.Internal ) where import Vanda.Grammar.XFSA.Internal (XFSA, empty, epsilon, singleton, fromList, expand)
5fe4860b4bc05dbb1756441e4a8cf3376d416ee14867e0d24441162b175d7645
remyoudompheng/hs-language-go
Syntax.hs
-- | -- Module : Language.Go.Syntax Copyright : ( c ) 2011 License : ( see COPYING ) -- -- This module contains *synthesis* functions that take an abstract syntax tree (AST), and output Go source code . For more information , see one of the submodules . module Language.Go.Syntax ( module Langu...
null
https://raw.githubusercontent.com/remyoudompheng/hs-language-go/5440485f6404356892eab4832cff4f1378c11670/Language/Go/Syntax.hs
haskell
| Module : Language.Go.Syntax This module contains *synthesis* functions that take an abstract syntax tree (AST),
Copyright : ( c ) 2011 License : ( see COPYING ) and output Go source code . For more information , see one of the submodules . module Language.Go.Syntax ( module Language.Go.Syntax.AST ) where import Language.Go.Syntax.AST
7f5d2ebb734ef5ac9a5c0192152678924616364c8f93ba0262b15c4a63de3b8d
aryx/xix
eval_const.ml
Copyright 2016 , 2017 , see copyright.txt open Common open Ast module E = Check (*****************************************************************************) (* Prelude *) (*****************************************************************************) (**********************************************************...
null
https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/compiler/eval_const.ml
ocaml
*************************************************************************** Prelude *************************************************************************** *************************************************************************** Types **************************************************************************...
Copyright 2016 , 2017 , see copyright.txt open Common open Ast module E = Check type integer = int type env = (Ast.fullname, integer * Type.integer_type) Hashtbl.t exception NotAConstant type error = Check.error exception Error of error let rec eval env e0 = match e0.e with | Int (s, inttype) -> int...
9223689e75d74e42628415c4ca0d230b0947e0baff64dddbfa2cd9c08c5dcca1
argp/bap
test_mappable.ml
open OUnit The purpose of this test file is to test properties that should be verified by all instances of a given interface , here BatInterfaces . Mappable . It is very minimal for now : it only check for one property , and only a few of the Mappable modules ( it is actually a regression t...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/testsuite/test_mappable.ml
ocaml
The property we test is that the order in which the [map] function traverse the structure (applying a given function on each element) is the same as the order of the [enum] function of the module (the order in which the elements are produced in the enumeration).
open OUnit The purpose of this test file is to test properties that should be verified by all instances of a given interface , here BatInterfaces . Mappable . It is very minimal for now : it only check for one property , and only a few of the Mappable modules ( it is actually a regression t...
b4ba04beff3286c38a86abcd76c965d147bd32935a69343547092f797564fd6e
pixlsus/registry.gimp.org_static
gimp_diving.scm
;; FILE gimp_diving.scm DATE 2008 - 09 - 25 COPYRIGHT 2008 AUTHOR and < > The credit for this process goes to a posting on DigitalDiver.net by ( nickname - " mandrake " ) . ;; and this website -kine.info/adjustments.htm ;; ;; DESCRIPTION ;; This script acts as a red fitler on diving p...
null
https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/gimp_diving.scm
scheme
FILE gimp_diving.scm and this website -kine.info/adjustments.htm DESCRIPTION This script acts as a red fitler on diving photos. To launch it, goto the menu <Image>/Script-Fu/Enhance/Diving red filter Basically, create a new layer containing the corrected picture You can adjust the red level (sometim...
DATE 2008 - 09 - 25 COPYRIGHT 2008 AUTHOR and < > The credit for this process goes to a posting on DigitalDiver.net by ( nickname - " mandrake " ) . it under the terms of the GNU General Public License as published by GNU Emacs is distributed in the hope that it will be useful , ...
e8e590361060a64e7d81401d274b6c6759d5d07a97f7cad1b1b6ef7aeb9d0565
haskell/cabal
cabal.test.hs
import Test.Cabal.Prelude -- Impossible version range for internal library. main = cabalTest $ fails $ cabal "check" []
null
https://raw.githubusercontent.com/haskell/cabal/1cfe7c4c7257aa7ae450209d34b4a359e6703a10/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Fields/ImpossibleVersionRangeLib/cabal.test.hs
haskell
Impossible version range for internal library.
import Test.Cabal.Prelude main = cabalTest $ fails $ cabal "check" []
010c6143ad6d4ce1b2bfd71aa106798a4d6e61f03f27801fcdc1408369ca0449
triffon/fp-2019-20
solutions.rkt
# lang racket 1 . length (define (length* lst) (if (null? lst) 0 (+ 1 (length* (cdr lst))))) 2 . sum (define (sum lst) (if (null? lst) 0 (+ (car lst) (sum (cdr lst))))) 3 . last (define (last* lst) (if (null? (cdr lst)) (car lst) (last (cdr lst)))) 4 . nth (define ...
null
https://raw.githubusercontent.com/triffon/fp-2019-20/7efb13ff4de3ea13baa2c5c59eb57341fac15641/exercises/computer-science-4/04/solutions.rkt
racket
# lang racket 1 . length (define (length* lst) (if (null? lst) 0 (+ 1 (length* (cdr lst))))) 2 . sum (define (sum lst) (if (null? lst) 0 (+ (car lst) (sum (cdr lst))))) 3 . last (define (last* lst) (if (null? (cdr lst)) (car lst) (last (cdr lst)))) 4 . nth (define ...
2085e4928f27baf6a436f7276b81e2b90f606f7228a69c7c19c6a32fbb581d9c
freizl/hoauth2
Dropbox.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # | [ DropBox oauth guide]( / oauth - guide ) module Network.OAuth2.Provider.Dropbox where import Data.Aeson import Data.Map.Strict qualified as Map import Data.Set qualified a...
null
https://raw.githubusercontent.com/freizl/hoauth2/8610da5ec2565e5d70c590fbde8689c6af025b78/hoauth2-providers/src/Network/OAuth2/Provider/Dropbox.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE DeriveGeneric # # LANGUAGE QuasiQuotes # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # | [ DropBox oauth guide]( / oauth - guide ) module Network.OAuth2.Provider.Dropbox where import Data.Aeson import Data.Map.Strict qualified as Map import Data.Set qualified as Set import Data.Text.Lazy (Text) ...
e381efd5362e5ac7e0bd2ef331490a9a6a7842c4c20902ff5a761e28bb99adf7
db48x/xe2
cube.lisp
(in-package :void) (defcell cube-wall (name :initform "Cube wall") (tile :initform "cube-wall") (categories :initform '(:opaque :obstacle)) (descriptions :initform "Ultra-hard yellow surface inscribed with angular marks.")) (defcell cube-floor (name :initform "Cube floor") (tile :initform "cube-floor") ...
null
https://raw.githubusercontent.com/db48x/xe2/7896fcc69f5c6e28eaf6f6abb7966d6663370a66/void/cube.lisp
lisp
Enemies of the cube The cube world drop floors create walls create border around world
(in-package :void) (defcell cube-wall (name :initform "Cube wall") (tile :initform "cube-wall") (categories :initform '(:opaque :obstacle)) (descriptions :initform "Ultra-hard yellow surface inscribed with angular marks.")) (defcell cube-floor (name :initform "Cube floor") (tile :initform "cube-floor") ...
f7cb2f9f0b74949c44a1d5b2999fb8b5b0d125320d35c23d5bcc8db64e79d494
rvantonder/hack_parallel
sys_utils.ml
* * Copyright ( c ) 2015 , Facebook , Inc. * All rights reserved . * * This source code is licensed under the BSD - style license found in the * LICENSE file in the " hack " directory of this source tree . An additional grant * of patent rights can be found in the PATENTS file in the same directory . ...
null
https://raw.githubusercontent.com/rvantonder/hack_parallel/c9d0714785adc100345835c1989f7c657e01f629/src/utils/sys_utils.ml
ocaml
* Hack_option type intead of exception throwing. This variable does not exist on windows. Same variable on windows * Returns true if substring occurs somewhere inside str. regexp_string matches only this string and nothing else. * Deletes the file given by "path". If it is a directory, recursively * deletes al...
* * Copyright ( c ) 2015 , Facebook , Inc. * All rights reserved . * * This source code is licensed under the BSD - style license found in the * LICENSE file in the " hack " directory of this source tree . An additional grant * of patent rights can be found in the PATENTS file in the same directory . ...
5e965b5581ef92b5dfc876484e32ffe996b4ce5a3d5ee084fe2d9082b19ddbf6
monadbobo/ocaml-core
string_zipper.ml
open Core.Std type t = char List_zipper.t open List_zipper let drop_before = drop_before let drop_after = drop_after let drop_all_before = drop_all_before let drop_all_after = drop_all_after let insert_before = insert_before let insert_after = insert_after let previous = previous let next = next let contents zip = ...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/extended/lib/string_zipper.ml
ocaml
open Core.Std type t = char List_zipper.t open List_zipper let drop_before = drop_before let drop_after = drop_after let drop_all_before = drop_all_before let drop_all_after = drop_all_after let insert_before = insert_before let insert_after = insert_after let previous = previous let next = next let contents zip = ...
1f42b1ac11caa826c21a6f42b557a52a7c663387ee4b2eba38a26bf70dda5566
haskoin/haskoin-core
KeysSpec.hs
{-# LANGUAGE OverloadedStrings #-} module Haskoin.KeysSpec (spec) where import Control.Lens import Control.Monad import Data.Aeson as A import Data.Aeson.Lens import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as C import Data.Bytes.Get import Data.Bytes.Put import Data.Bytes.Serial import ...
null
https://raw.githubusercontent.com/haskoin/haskoin-core/d49455a27735dbe636453e870cf4e8720fb3a80a/test/Haskoin/KeysSpec.hs
haskell
# LANGUAGE OverloadedStrings # PubKeyI PubKeyI PubKeyI github.com/bitcoin/bitcoin/blob/master/src/script.cpp from function IsCanonicalPubKey Non-canonical public key: too short Non-canonical public key: invalid length for uncompressed key Non-canonical public key: invalid length for compressed key Non-canonica...
module Haskoin.KeysSpec (spec) where import Control.Lens import Control.Monad import Data.Aeson as A import Data.Aeson.Lens import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as C import Data.Bytes.Get import Data.Bytes.Put import Data.Bytes.Serial import Data.Maybe import qualified Data.Se...
eb97efee7a01e47e8738ee2266097c485a21203c86c70379949bef9ccc4c5d59
con-kitty/categorifier-c
Prim.hs
-- | Primitive types for all C code generation systems. -- -- === Performance note -- -- A bunch of type class instances were recently converted to derived instances (from handwritten ones ) using the new @-XDerivingVia@ feature in GHC 8.6 . This has the unfortunate side effect of -- removing @INLINEABLE@ pragmas t...
null
https://raw.githubusercontent.com/con-kitty/categorifier-c/a34ff2603529b4da7ad6ffe681dad095f102d1b9/Categorifier/C/Prim.hs
haskell
| Primitive types for all C code generation systems. === Performance note A bunch of type class instances were recently converted to derived instances (from handwritten removing @INLINEABLE@ pragmas that previously qualified many of the methods. If needed, these can be re-exposed for other modules to inline by ...
ones ) using the new @-XDerivingVia@ feature in GHC 8.6 . This has the unfortunate side effect of @-fspecialize - aggressively@ flags to GHC . module Categorifier.C.Prim ( module Base, module Helpers, module Patterns, module ArrayName, module ArrayCount, module ArrayVec, module ArrayLens...
fc8f6e60828a24bf9aebba19a05a9eac831408d67438b18603d59748f233650b
yutopp/rill
scheme.ml
* Copyright yutopp 2019 - . * * Distributed under the Boost Software License , Version 1.0 . * ( See accompanying file LICENSE_1_0.txt or copy at * ) * Copyright yutopp 2019 - . * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * )...
null
https://raw.githubusercontent.com/yutopp/rill/375b67c03ab2087d0a2a833bd9e80f3e51e2694f/rillc/lib/typing/scheme.ml
ocaml
* Copyright yutopp 2019 - . * * Distributed under the Boost Software License , Version 1.0 . * ( See accompanying file LICENSE_1_0.txt or copy at * ) * Copyright yutopp 2019 - . * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * )...
1445de932611e60bb744dce818779f92c152cce1ab87ab6c9f71d91beea5ece6
webyrd/n-grams-for-synthesis
testing.scm
Copyright ( c ) 2005 , 2006 , 2007 , 2012 , 2013 Per Bothner Added " full " support for Chicken , Gauche , and SISC . , Copyright ( c ) 2005 . Modified for Scheme Spheres by , Copyright ( c ) 2012 . Support for Guile 2 by < > , Copyright ( c ) 2014 . ;; ;; Permission is hereby granted, free of ch...
null
https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-154/srfi/64/testing.scm
scheme
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 copies furnished to do so, subject to the following conditions: ...
Copyright ( c ) 2005 , 2006 , 2007 , 2012 , 2013 Per Bothner Added " full " support for Chicken , Gauche , and SISC . , Copyright ( c ) 2005 . Modified for Scheme Spheres by , Copyright ( c ) 2012 . Support for Guile 2 by < > , Copyright ( c ) 2014 . files ( the " Software " ) , to deal in the ...
54ecbe972dcd6aef7e38ba439a4f915babc3559f3135019527c8ee2422bc9414
mirage/digestif
baijiu_blake2s.ml
module By = Digestif_by module Bi = Digestif_bi let failwith fmt = Format.kasprintf failwith fmt module Int32 = struct include Int32 let ( lsl ) = Int32.shift_left let ( lsr ) = Int32.shift_right_logical let ( asr ) = Int32.shift_right let ( lor ) = Int32.logor let ( lxor ) = Int32.logxor let ( land ) ...
null
https://raw.githubusercontent.com/mirage/digestif/a94075cfec70fbcb31e15f94e28cb715c9e4d9dd/src-ocaml/baijiu_blake2s.ml
ocaml
store to little-endian store to little-endian store to little-endian XXX(dinosaure): [ctx] can not be initialized with [outlen > digest_length = max_outlen].
module By = Digestif_by module Bi = Digestif_bi let failwith fmt = Format.kasprintf failwith fmt module Int32 = struct include Int32 let ( lsl ) = Int32.shift_left let ( lsr ) = Int32.shift_right_logical let ( asr ) = Int32.shift_right let ( lor ) = Int32.logor let ( lxor ) = Int32.logxor let ( land ) ...
5cb2331715b6ddf681e7c3d65695374eefc0df780077b71720bcaf1c642b4f1e
flosell/lambdacd
state_test.cljs
(ns lambdacd.state-test (:require [cljs.test :refer-macros [deftest is testing run-tests]] [dommy.core :refer-macros [sel sel1]] [lambdacd.testdata :refer [some-build-step with-step-id with-status with-children]] [lambdacd.state :as state])) (def cwd-child-a {:name "do-stuff" ...
null
https://raw.githubusercontent.com/flosell/lambdacd/e9ba3cebb2d5f0070a2e0e1e08fc85fc99ee7135/test/cljs/lambdacd/state_test.cljs
clojure
(ns lambdacd.state-test (:require [cljs.test :refer-macros [deftest is testing run-tests]] [dommy.core :refer-macros [sel sel1]] [lambdacd.testdata :refer [some-build-step with-step-id with-status with-children]] [lambdacd.state :as state])) (def cwd-child-a {:name "do-stuff" ...
70164da0f27cd9b6f7ad5aff99a35b38857cee66d0b1cb80a26fcee0ca447d74
softwarelanguageslab/maf
R5RS_various_regex-1.scm
; Changes: * removed : 1 * added : 3 * swaps : 0 * negated predicates : 2 ; * swapped branches: 0 ; * calls to id fun: 0 (letrec ((debug-trace (lambda () 'do-nothing)) (regex-NULL #f) (regex-BLANK #t) (regex-alt? (lambda (re) (if (pair? r...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_various_regex-1.scm
scheme
Changes: * swapped branches: 0 * calls to id fun: 0
* removed : 1 * added : 3 * swaps : 0 * negated predicates : 2 (letrec ((debug-trace (lambda () 'do-nothing)) (regex-NULL #f) (regex-BLANK #t) (regex-alt? (lambda (re) (if (pair? re) (eq? (car re) 'alt) #f))) (regex-seq? (lambda ...
d04b0f059b453afcd60ba4c5451def5ece545f3bc6fea652a8082c593024c973
K2InformaticsGmbH/imem
imem_meta_ct.erl
%%%------------------------------------------------------------------- %%% File : imem_meta_ct.erl %%% Description : Common testing imem_meta. %%% %%% Created : 09.11.2017 %%% Copyright ( C ) 2017 K2 Informatics GmbH %%%------------------------------------------------------------------- -module(imem_meta_...
null
https://raw.githubusercontent.com/K2InformaticsGmbH/imem/602b6cd31ea1af00041a9318119ab0c3e4d5b59a/test/imem_meta_ct.erl
erlang
------------------------------------------------------------------- File : imem_meta_ct.erl Description : Common testing imem_meta. Created : 09.11.2017 ------------------------------------------------------------------- -------------------------------------------------------------------- Test case rel...
Copyright ( C ) 2017 K2 Informatics GmbH -module(imem_meta_ct). -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). -export([ end_per_testcase/2 , meta_concurrency/1 , meta_operations/1 , meta_partitions/1 , meta_preparations/1 , physical_tab...
3d9bed3e8dda7e07426a859d148db7bf4db61a3f81d77faa0d158a47ec18c7af
proof-ninja/ocaml-blake3
blake3.ml
external rust_hash : bytes -> bytes -> unit = "blake3_hash" [@@noalloc] external rust_hash_mc : bytes -> bytes -> unit = "blake3_hash_multicore" [@@noalloc] let hash size s = let bytes = Bytes.create size in rust_hash s bytes; bytes let hash_multicore size s = let bytes = Bytes.create size in rust_hash_mc s...
null
https://raw.githubusercontent.com/proof-ninja/ocaml-blake3/b83e491d2b71712c237264ec118b318e14176069/src/blake3.ml
ocaml
external rust_hash : bytes -> bytes -> unit = "blake3_hash" [@@noalloc] external rust_hash_mc : bytes -> bytes -> unit = "blake3_hash_multicore" [@@noalloc] let hash size s = let bytes = Bytes.create size in rust_hash s bytes; bytes let hash_multicore size s = let bytes = Bytes.create size in rust_hash_mc s...
8f909ec68a43d73dbcaa30fe516cc2c60f1536612c34e46f1470f5162ad890a4
sunshineclt/Racket-Helper
homework1-g2.rkt
#lang racket (define (dowork n m i) (define (print j) (display j) (display ",") (if (= j m) (display #\newline) (print (+ j 1)))) (print 1) (if (= i n) (void) (dowork n m (+ i 1)))) (define (loop) (let ((n (read)) (m (read))) (if (eq? n eof) (void) ...
null
https://raw.githubusercontent.com/sunshineclt/Racket-Helper/bf85f38dd8d084db68265bb98d8c38bada6494ec/%E9%99%88%E4%B9%90%E5%A4%A9/Week1/homework1-g2.rkt
racket
#lang racket (define (dowork n m i) (define (print j) (display j) (display ",") (if (= j m) (display #\newline) (print (+ j 1)))) (print 1) (if (= i n) (void) (dowork n m (+ i 1)))) (define (loop) (let ((n (read)) (m (read))) (if (eq? n eof) (void) ...
84734f494baa1fe0c1e69234f84a6518563883f80cdb407e31d4c5b7f18a858f
Deducteam/Dedukti
basic.ml
* Basic * { 2 Identifiers ( hashconsed strings ) } type ident = string let string_of_ident s = s let ident_eq s1 s2 = s1 == s2 || s1 = s2 type mident = string let string_of_mident s = s let mident_eq = ident_eq type name = mident * ident let mk_name md id = (md, id) let name_eq (m, s) (m', s') = mident_eq m ...
null
https://raw.githubusercontent.com/Deducteam/Dedukti/7124a3edbaecf2d8a9046272cbc4d0d09cc3fad0/kernel/basic.ml
ocaml
* Basic * { 2 Identifiers ( hashconsed strings ) } type ident = string let string_of_ident s = s let ident_eq s1 s2 = s1 == s2 || s1 = s2 type mident = string let string_of_mident s = s let mident_eq = ident_eq type name = mident * ident let mk_name md id = (md, id) let name_eq (m, s) (m', s') = mident_eq m ...
fe1967cf3e8c40efa318ad1dcf5b1259f336d2968fa7ba1bfce730151c78dd97
mbj/stratosphere
Application.hs
module Stratosphere.KinesisAnalyticsV2.Application ( module Exports, Application(..), mkApplication ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import {-# SOURCE #-} Stratosphere.KinesisAnalyticsV2.Application.ApplicationConfigura...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/kinesisanalyticsv2/gen/Stratosphere/KinesisAnalyticsV2/Application.hs
haskell
# SOURCE # # SOURCE # # SOURCE #
module Stratosphere.KinesisAnalyticsV2.Application ( module Exports, Application(..), mkApplication ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Tag import Stratosphere.Val...
8a2008a86f5e943be46596a49479d1942a4fe994448ee899983afb32cd3bc638
roburio/albatross
vmm_ring.mli
( c ) 2018 , all rights reserved type 'a t val create : ?size:int -> 'a -> unit -> 'a t val write : 'a t -> Ptime.t * 'a -> unit val read_last : 'a t -> ?tst:('a -> bool) -> int -> (Ptime.t * 'a) list val read_history : 'a t -> ?tst:('a -> bool) -> Ptime.t -> (Ptime.t * 'a) list
null
https://raw.githubusercontent.com/roburio/albatross/3cf3d6dc56868a800967cbca2b29e743e7b2d487/src/vmm_ring.mli
ocaml
( c ) 2018 , all rights reserved type 'a t val create : ?size:int -> 'a -> unit -> 'a t val write : 'a t -> Ptime.t * 'a -> unit val read_last : 'a t -> ?tst:('a -> bool) -> int -> (Ptime.t * 'a) list val read_history : 'a t -> ?tst:('a -> bool) -> Ptime.t -> (Ptime.t * 'a) list
d467ab9c1a6e790e96305c688f85bdb7d5cdd4f0bee25323ff704347bd2c6fd2
roehst/tapl-implementations
syntax.ml
open Format open Support.Error open Support.Pervasive (* ---------------------------------------------------------------------- *) type ty = TyTop | TyArr of ty * ty | TyRecord of (string * ty) list | TyBool type term = TmVar of info * int * int | TmAbs of info * string * ty * term | TmApp of in...
null
https://raw.githubusercontent.com/roehst/tapl-implementations/23c0dc505a8c0b0a797201a7e4e3e5b939dd8fdb/joinexercise/syntax.ml
ocaml
---------------------------------------------------------------------- ---------------------------------------------------------------------- Context management ---------------------------------------------------------------------- Shifting --------------------------------------------------------------------...
open Format open Support.Error open Support.Pervasive type ty = TyTop | TyArr of ty * ty | TyRecord of (string * ty) list | TyBool type term = TmVar of info * int * int | TmAbs of info * string * ty * term | TmApp of info * term * term | TmRecord of info * (string * term) list | TmProj of in...
e3239bd15bae69c4e64bd4d5553ac5e4c8d96c1583f1b25354c90bd9a5adca20
fujita-y/ypsilon
procedural.scm
#!nobacktrace (library (rnrs records procedural (6)) (export make-record-type-descriptor record-type-descriptor? make-record-constructor-descriptor record-constructor record-predicate record-accessor record-mutator) (import (core records)))
null
https://raw.githubusercontent.com/fujita-y/ypsilon/f742470e2810aabb7a7c898fd6c07227c14a725f/sitelib/rnrs/records/procedural.scm
scheme
#!nobacktrace (library (rnrs records procedural (6)) (export make-record-type-descriptor record-type-descriptor? make-record-constructor-descriptor record-constructor record-predicate record-accessor record-mutator) (import (core records)))
ea6b0b063751e6c60141ef29a1478fc737c11fd16fc3fe42696c69e42b35ace7
jaspervdj/advent-of-code
IntCode.hs
-- | 2019's virtual machine, IntCode. # LANGUAGE DeriveFoldable # {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveTraversable #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # module AdventOfCode.IntCode ...
null
https://raw.githubusercontent.com/jaspervdj/advent-of-code/bdc9628d1495d4e7fdbd9cea2739b929f733e751/lib/hs/AdventOfCode/IntCode.hs
haskell
| 2019's virtual machine, IntCode. # LANGUAGE DeriveFunctor # # LANGUAGE DeriveTraversable # | Points to a memory location. | Can be read but not always written to. Set up recursion in a way that preserves laziness. | Run a machine that reads and prints ASCII interactively. Mostly useful for...
# LANGUAGE DeriveFoldable # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # module AdventOfCode.IntCode ( Interrupt (..) , Program , parseProgram , makeProgram , Machine (..) , initMachine , stepMachine ...
dd51e1260fa15643f7dc96ef4b614f244464214910d67882e5302b68baa5685f
svenpanne/EOPL3
exercise-2-12.rkt
#lang eopl ; ------------------------------------------------------------------------------ Exercise 2.12 ; A variant using a triple of functions. (define make-stack (lambda (pop-func top-func empty-stack?-func) (list pop-func top-func empty-stack?-func))) (define pop-func car) (define top-func cadr) (define ...
null
https://raw.githubusercontent.com/svenpanne/EOPL3/3fc14c4dbb1c53a37bd67399eba34cea8f8234cc/chapter2/exercise-2-12.rkt
racket
------------------------------------------------------------------------------ A variant using a triple of functions. A variant using a more "OO"-like interface.
#lang eopl Exercise 2.12 (define make-stack (lambda (pop-func top-func empty-stack?-func) (list pop-func top-func empty-stack?-func))) (define pop-func car) (define top-func cadr) (define empty-stack?-func caddr) (define empty-stack (lambda () (make-stack (lambda () (report-empty-stack 'pop)) ...
0abb72fb61841e49cd601b13247eee8f9d05ca88436753609a000be41221803a
cblp/crdt
GCounter.hs
module CRDT.Cv.GCounter ( GCounter (..) , initial , query -- * Operation , increment ) where import Data.IntMap.Strict (IntMap) import qualified Data.IntMap.Strict as IntMap import Data.Semilattice (Semilattice) -- | Grow-only counter. newtype GCounter a = GCounter (IntMap ...
null
https://raw.githubusercontent.com/cblp/crdt/175d7ee7df66de1f013ee167ac31719752e0c20b/crdt/lib/CRDT/Cv/GCounter.hs
haskell
* Operation | Grow-only counter. | Increment counter ^ replica id | Initial state | Get value from the state
module CRDT.Cv.GCounter ( GCounter (..) , initial , query , increment ) where import Data.IntMap.Strict (IntMap) import qualified Data.IntMap.Strict as IntMap import Data.Semilattice (Semilattice) newtype GCounter a = GCounter (IntMap a) deriving (Eq, Show) instance Ord a ...
dca10da26fe0a623c5c734aab96530243993f6bfa2d718b5c152586642e63347
parsonsmatt/unification
Unification.hs
# LANGUAGE GeneralizedNewtypeDeriving # module Unification where import Control.Monad.State import Control.Monad.Except import Data.Map (Map) import qualified Data.Map.Strict as Map data Expr = Lit String | Var String | List [Expr] | Expr :=> Expr deriving (Eq, Ord, Show) infixr 4 :=> newtype Unifica...
null
https://raw.githubusercontent.com/parsonsmatt/unification/04093a013705d793d4d239bd9e1d5a492687306a/src/Unification.hs
haskell
# LANGUAGE GeneralizedNewtypeDeriving # module Unification where import Control.Monad.State import Control.Monad.Except import Data.Map (Map) import qualified Data.Map.Strict as Map data Expr = Lit String | Var String | List [Expr] | Expr :=> Expr deriving (Eq, Ord, Show) infixr 4 :=> newtype Unifica...
d807f3ef0267f5c9bee8ad44044eb13d84b7db604475c2725eee804783eab8d7
monadbobo/ocaml-core
extended_unix.mli
open Core.Std (** Extensions to [Core.Unix]. *) val fork_exec : ?stdin:Unix.File_descr.t -> ?stdout:Unix.File_descr.t -> ?stderr:Unix.File_descr.t -> ?path_lookup:bool -> ?env:[ `Extend of (string * string) list | `Replace of (string * string) list ] -> ?working_dir:string -> ?setuid:int -> ?set...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/extended/lib/extended_unix.mli
ocaml
* Extensions to [Core.Unix]. * file system block size * fragment size * size of fs in frsize units * # free blocks * # free blocks for non-root * # inodes * # free inodes * # free inodes for non-root * file system ID * mount flags * maximum filename length * get file system statistics * get load averages ...
open Core.Std val fork_exec : ?stdin:Unix.File_descr.t -> ?stdout:Unix.File_descr.t -> ?stderr:Unix.File_descr.t -> ?path_lookup:bool -> ?env:[ `Extend of (string * string) list | `Replace of (string * string) list ] -> ?working_dir:string -> ?setuid:int -> ?setgid:int -> string -> string li...
157bb7498aceae6e1578427db430d48bbc5d0fcf0ddde8680424b6cefa779f47
hjcapple/reading-sicp
tree_op_map.scm
#lang racket P72 - [ 树操作和树映射 ] (define (count-leaves x) (cond ((null? x) 0) ((not (pair? x)) 1) (else (+ (count-leaves (car x)) (count-leaves (cdr x)))))) (define (scale-tree tree factor) (cond ((null? tree) null) ((not (pair? tree)) (* tree factor)) (else (cons...
null
https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_2/tree_op_map.scm
scheme
#lang racket P72 - [ 树操作和树映射 ] (define (count-leaves x) (cond ((null? x) 0) ((not (pair? x)) 1) (else (+ (count-leaves (car x)) (count-leaves (cdr x)))))) (define (scale-tree tree factor) (cond ((null? tree) null) ((not (pair? tree)) (* tree factor)) (else (cons...
5d474c13aa9149fec0734bfd50d64fe7beea6d3c38b1568ceeabac22ce1ad3a7
Eduap-com/WordMat
dstoka.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $...
null
https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/odepack/src/dstoka.lisp
lisp
Compiled by f2cl version: Using Lisp CMU Common Lisp snapshot-2013-11 (20E Unicode) Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format single-float))
( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl6.l , v 1d5cbacbb9...
d022cbc9c68856efd2994b44077e5e6acf121fef3dede4426dafa455dfe1d941
ndmitchell/catch
Req.hs
module Req(module Req, module Val) where import Val import Yhc.Core import General import Data.Proposition -- DATA DEFINITIONS type Scopes = [Scope] data Scope = Scope CoreFuncName Vals type Reqs = PropSimple Req data Req = Req {reqExpr :: CoreExpr, reqVals :: Vals} | Demonic | Angelic ...
null
https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/inspect/Req.hs
haskell
DATA DEFINITIONS do not define anything, its a pretty bad PropLit!
module Req(module Req, module Val) where import Val import Yhc.Core import General import Data.Proposition type Scopes = [Scope] data Scope = Scope CoreFuncName Vals type Reqs = PropSimple Req data Req = Req {reqExpr :: CoreExpr, reqVals :: Vals} | Demonic | Angelic deriving (Ord, Eq) ...
016194e118eb65ecbd75e489714d32f6bad1a75d8ce068aa84493a6845bde2bf
serokell/ariadne
Tx.hs
-- | Part of the backend which deals with transactions. module Ariadne.Wallet.Backend.Tx ( sendTx ) where import Prelude hiding (list) import qualified Data.Text.Buildable import Control.Exception (Exception(displayException)) import Control.Lens (at, ix) import Control.Natural ((:~>)(..)) import Form...
null
https://raw.githubusercontent.com/serokell/ariadne/5f49ee53b6bbaf332cb6f110c75f7b971acdd452/ariadne/cardano/src/Ariadne/Wallet/Backend/Tx.hs
haskell
| Part of the backend which deals with transactions. | Send a transaction from selected to wallet to the list of may be used as inputs. If this list is empty and an account from the input wallet is selected, this account will be used as input. Otherwise inputs will be selected from all accounts in the wallet. Wa...
module Ariadne.Wallet.Backend.Tx ( sendTx ) where import Prelude hiding (list) import qualified Data.Text.Buildable import Control.Exception (Exception(displayException)) import Control.Lens (at, ix) import Control.Natural ((:~>)(..)) import Formatting (bprint, build, formatToString, (%)) import Text....
ebfafa71779861077bdd7f8aef897588d5cd4160f7800205823f0171d67ff4d6
zenspider/schemers
exercise.2.18.scm
#lang racket/base Exercise 2.18 : ;; Define a procedure `reverse' that takes a list as argument and ;; returns a list of the same elements in reverse order: ;; ;; (reverse (list 1 4 9 16 25)) ;; (25 16 9 4 1) (require "../lib/test.rkt") (define (reverse l) (define (iterate l r) (if (null? l) r ...
null
https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_2/exercise.2.18.scm
scheme
Define a procedure `reverse' that takes a list as argument and returns a list of the same elements in reverse order: (reverse (list 1 4 9 16 25)) (25 16 9 4 1)
#lang racket/base Exercise 2.18 : (require "../lib/test.rkt") (define (reverse l) (define (iterate l r) (if (null? l) r (iterate (cdr l) (cons (car l) r)))) (iterate l null)) (assert-equal '(3 2 1) (reverse '(1 2 3))) (done)
8eca30ff42e9938d7ac6a98f3cfae949afdeaea5ae25c2d6dad7a5d7a5eb7054
altsun/My-Lisps
od_oc_oca.lsp
;;;********************************************** CHUONG TRINH DANH SO THU TU VA COPY TANG DAN 1 . Lenh OD : , so bat ( begin ) va so ( increment ) tuy y 2 . Lenh OC : copy so co san 3 . Lenh OCA : copy chap dinh dang bang so , , so : 1 , 2 ... A , B ... , A1 , A2 ... , AB-01 , ... , AB-0...
null
https://raw.githubusercontent.com/altsun/My-Lisps/85476bb09b79ef5e966402cc5158978d1cebd7eb/Common/od_oc_oca.lsp
lisp
********************************************** ********************************************** ------------------------------------------------- Entity Type ------------------------------------------------- Write txt on graphic screen, defaul setting ------------------------------------------------- Increase number n --...
CHUONG TRINH DANH SO THU TU VA COPY TANG DAN 1 . Lenh OD : , so bat ( begin ) va so ( increment ) tuy y 2 . Lenh OC : copy so co san 3 . Lenh OCA : copy chap dinh dang bang so , , so : 1 , 2 ... A , B ... , A1 , A2 ... , AB-01 , ... , AB-01 - C1 , AB-01 - C2 ... gioi A den Z. Cac so...
c77fd821309bec3626eb58553f940751124f52405d5fcae2930f04f4a6fc3fd2
dreyk/zraft_lib
zraft_lib_sup.erl
%% ------------------------------------------------------------------- @author < > Copyright ( c ) 2015 . All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% ...
null
https://raw.githubusercontent.com/dreyk/zraft_lib/ead65c45df576be3758639e3fe3a46edefdeae1d/src/zraft_lib_sup.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permission...
@author < > Copyright ( c ) 2015 . All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(zraft...
06ac85ecd93fd56c4466918a7b6eff3ec516236055ec47d6dab8dfabce956e50
haskell/happy
ParseMonad.hs
module Happy.Frontend.ParseMonad (module X) where -- We use the bootstrapped version if it is available #ifdef HAPPY_BOOTSTRAP import Happy.Frontend.ParseMonad.Bootstrapped as X #else import Happy.Frontend.ParseMonad.Oracle as X #endif
null
https://raw.githubusercontent.com/haskell/happy/934763408f8df29180c63d7a2c69be0b84030967/packages/frontend/src/Happy/Frontend/ParseMonad.hs
haskell
We use the bootstrapped version if it is available
module Happy.Frontend.ParseMonad (module X) where #ifdef HAPPY_BOOTSTRAP import Happy.Frontend.ParseMonad.Bootstrapped as X #else import Happy.Frontend.ParseMonad.Oracle as X #endif
abdf7b3ea84a441d8e20a30dcd23405d30e1f90647b61fd922eada316e593f29
potatosalad/erlang-jose
jose_json_jason.erl
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- %% vim: ts=4 sw=4 ft=erlang noet -module(jose_json_jason). -behaviour(jose_json). %% jose_json callbacks -export([decode/1]). -export([encode/1]). %%==================================================================== %% jose_...
null
https://raw.githubusercontent.com/potatosalad/erlang-jose/43d3db467f909bbc932bd663ddcb1af93180dfd3/src/json/jose_json_jason.erl
erlang
vim: ts=4 sw=4 ft=erlang noet jose_json callbacks ==================================================================== jose_json callbacks ==================================================================== ------------------------------------------------------------------- -----------------------------------------...
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- -module(jose_json_jason). -behaviour(jose_json). -export([decode/1]). -export([encode/1]). decode(Binary) -> 'Elixir.Jason':'decode!'(Binary). encode(Term) -> 'Elixir.Jason':'encode!'(Term). Internal functions
f68873a65ea50f8871cd22b8f342968329bd9a6122f4a2ea0e5a127d3a717a3b
valerauko/gitegylet-electron
menu.cljs
(ns gitegylet.menu) (defonce remote (.-remote (js/require "electron"))) (defn build [template] (.buildFromTemplate (.-Menu remote) (clj->js template)))
null
https://raw.githubusercontent.com/valerauko/gitegylet-electron/bee01d4e70f3f1e8636bf82c0d1a78c3d640c1b7/src/cljs/gitegylet/menu.cljs
clojure
(ns gitegylet.menu) (defonce remote (.-remote (js/require "electron"))) (defn build [template] (.buildFromTemplate (.-Menu remote) (clj->js template)))
d1dfd3799ae6a7bab4f483e19214751d9c258d1e3b188508634f54880ba7c8bd
nextjournal/ssh-auth-github
ssh-auth-github.clj
#! /usr/bin/env bb (require '[babashka.curl :as curl]) (require '[cheshire.core :as json]) (require '[clojure.tools.cli :as tools.cli]) (require '[clojure.string :as str]) (require '[babashka.fs :as fs]) (defn print-usage [summary] (println (->> ["Usage: " "ssh-auth-github.clj [options]" "" "Opti...
null
https://raw.githubusercontent.com/nextjournal/ssh-auth-github/bf20e56eeea1cddeeefa71b5195c121d84f34c42/ssh-auth-github.clj
clojure
#! /usr/bin/env bb (require '[babashka.curl :as curl]) (require '[cheshire.core :as json]) (require '[clojure.tools.cli :as tools.cli]) (require '[clojure.string :as str]) (require '[babashka.fs :as fs]) (defn print-usage [summary] (println (->> ["Usage: " "ssh-auth-github.clj [options]" "" "Opti...
31b4f6c496b20a9aa247435be769c3290fffd8c5ac2a4adfd73f294e556d4050
peruukki/nhl-score-api
core_test.clj
(ns nhl-score-api.core-test (:require [clojure.test :refer :all] [nhl-score-api.core :refer :all] [nhl-score-api.cache :refer [get-cached-fn]] [clojure.data.json :as json])) (def latest-scores-fetched (atom false)) (def scores-in-date-range-fetched (atom false)) (def latest-score...
null
https://raw.githubusercontent.com/peruukki/nhl-score-api/3564975b35091c044f975cb6563fcac48ede12cc/test/nhl_score_api/core_test.clj
clojure
(ns nhl-score-api.core-test (:require [clojure.test :refer :all] [nhl-score-api.core :refer :all] [nhl-score-api.cache :refer [get-cached-fn]] [clojure.data.json :as json])) (def latest-scores-fetched (atom false)) (def scores-in-date-range-fetched (atom false)) (def latest-score...
35942705962a8eae8dd580999226f1fae6fe822d4bb17cd0ef869de5b8936504
pfdietz/ansi-test
upgraded-complex-part-type.lsp
;-*- Mode: Lisp -*- Author : Created : Sat Nov 27 21:15:46 2004 ;;;; Contains: Tests of UPGRADE-COMPLEX-PART-TYPE (defmacro def-ucpt-test (name types) `(deftest ,name (loop for type in (remove-duplicates ,types) for upgraded-type = (upgraded-complex-part-type type) for r...
null
https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/numbers/upgraded-complex-part-type.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of UPGRADE-COMPLEX-PART-TYPE environment argument Error tests
Author : Created : Sat Nov 27 21:15:46 2004 (defmacro def-ucpt-test (name types) `(deftest ,name (loop for type in (remove-duplicates ,types) for upgraded-type = (upgraded-complex-part-type type) for result = (append (check-all-subtypep type upgraded-type) ...
18ac5d6bd1d2e7ac78fee36a8b2e31e77645937866df56a2bf162b9a930760d4
mirage/ocaml-openflow
lldp.ml
* Copyright ( c ) 2011 < > * * 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 THE AU...
null
https://raw.githubusercontent.com/mirage/ocaml-openflow/dcda113745e8edc61b5508eb8ac2d1e864e1a2df/lib/lldp.ml
ocaml
Ignore ethernet headers for now chassis id Port id
* Copyright ( c ) 2011 < > * * 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 THE AU...
68424858c92f9b9513e7d8ea4f1fbb68e2b8b5cccbf81413a6fc3a53e4621a62
gsakkas/rite
3565.ml
let rec clone x n = if n > 0 then x :: ((clone x n) - 1) else [];; (* fix let rec clone x n = if n > 0 then x :: (clone x (n - 1)) else [];; *) changed spans ( 2,40)-(2,57 ) clone x ( n - 1 ) AppG [ VarG , BopG EmptyG EmptyG ] (2,40)-(2,57) clone x (n - 1) AppG [VarG,BopG EmptyG EmptyG] *) type err...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14/3565.ml
ocaml
fix let rec clone x n = if n > 0 then x :: (clone x (n - 1)) else [];;
let rec clone x n = if n > 0 then x :: ((clone x n) - 1) else [];; changed spans ( 2,40)-(2,57 ) clone x ( n - 1 ) AppG [ VarG , BopG EmptyG EmptyG ] (2,40)-(2,57) clone x (n - 1) AppG [VarG,BopG EmptyG EmptyG] *) type error slice ( 2,4)-(2,67 ) ( 2,15)-(2,65 ) ( 2,17)-(2,65 ) ( 2,21)-(2,65 )...
71f631326869dc92536279a1e3767231dce0920b746e46b3b90eeba0434d2e8c
toolslive/ordma
rsocket.ml
type rsocket = int type ba = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t external rsocket : Unix.socket_domain -> Unix.socket_type -> int -> rsocket = "ordma_rsocket" let show rsocket = string_of_int rsocket external rconnect : rsocket -> Unix.sock...
null
https://raw.githubusercontent.com/toolslive/ordma/e430cb48677a6c0c7847c00118c5eb4ebedebe2c/rsocket.ml
ocaml
type rsocket = int type ba = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t external rsocket : Unix.socket_domain -> Unix.socket_type -> int -> rsocket = "ordma_rsocket" let show rsocket = string_of_int rsocket external rconnect : rsocket -> Unix.sock...
bf354d0cc9011a8dbe0e3715cbe127826f0eed3ea9ad936532783a86e44d1a19
chef/chef-server
chef_wm_enforce_tests.erl
-module(chef_wm_enforce_tests). -include_lib("eunit/include/eunit.hrl"). max_size_test_() -> DefaultMaxSize = 1000000, TunedValue = 5, [ {"Default tests", {foreach, fun() -> meck:new(wrq), application:unset_env(oc_chef_wm, max_request_size) end, ...
null
https://raw.githubusercontent.com/chef/chef-server/6d31841ecd73d984d819244add7ad6ebac284323/src/oc_erchef/apps/oc_chef_wm/test/chef_wm_enforce_tests.erl
erlang
-module(chef_wm_enforce_tests). -include_lib("eunit/include/eunit.hrl"). max_size_test_() -> DefaultMaxSize = 1000000, TunedValue = 5, [ {"Default tests", {foreach, fun() -> meck:new(wrq), application:unset_env(oc_chef_wm, max_request_size) end, ...
797436a7424329e0b98bf04a504625e81c11609e369465ca4b0c03ce41a8c5ba
webyrd/miniKanren-hangout-summaries
intro-hangout-4.scm
(load "pmatch.scm") (define-syntax test (syntax-rules () [(test name expr expected-val) (let ((v expr)) (if (equal? v expected-val) (begin (display "passed test ") (write name) (newline)) (error 'name (format "\nTest ~s failed!...
null
https://raw.githubusercontent.com/webyrd/miniKanren-hangout-summaries/06b33ba37e298c14babb7c6c0f63fe01bc65d547/code/intro-hangouts/intro-hangout-4/intro-hangout-4.scm
scheme
lambda calculus x variable (lambda (x) expr) lambda expression (abstract) (e e) application variable lambda/abstraction application ; rator rand => (closure y (* y y) ()) ; value of the rator (proc) value of the rand ( ) (((lambda (y) (lambda (z) ...
(load "pmatch.scm") (define-syntax test (syntax-rules () [(test name expr expected-val) (let ((v expr)) (if (equal? v expected-val) (begin (display "passed test ") (write name) (newline)) (error 'name (format "\nTest ~s failed!...
3dd4ff21ee151ea357986fd73157937b8acb38338fab1685ad668d781d6d329b
dvcrn/proton
core.cljs
(ns proton.core (:require-macros [cljs.core.async.macros :refer [go go-loop]]) (:require [proton.lib.helpers :as helpers] [proton.lib.atom :as atom-env] [proton.lib.package_manager :as pm] [proton.lib.proton :as proton] [proton.lib.mode :as mode-manager] [...
null
https://raw.githubusercontent.com/dvcrn/proton/427d83ffdb61d84a04e3d30032b792a9cfbfc53f/src/cljs/proton/core.cljs
clojure
tools etc langs config-files frameworks apps Atom for holding all disposables objects Atom that holds chain timeout id append new key to chain check if the current character sequence is a action Show welcome screen if there are packages to install/remove or the option to always show is enabled wipe existing...
(ns proton.core (:require-macros [cljs.core.async.macros :refer [go go-loop]]) (:require [proton.lib.helpers :as helpers] [proton.lib.atom :as atom-env] [proton.lib.package_manager :as pm] [proton.lib.proton :as proton] [proton.lib.mode :as mode-manager] [...
14804998230dab824953b969650ee0ea982db5201b2b62e06f0756a21f548eb1
clj-kondo/clj-kondo
core.clj
(ns clj-kondo.impl.types.clojure.core {:no-doc true} (:require [clj-kondo.impl.types.utils :as tu])) ;; sorted in order of appearance in ;; a lot of this work was already figured out here: ;; (def seqable->seq {:arities {1 {:args [:seqable] :ret :seq}}}) (def seqable->boolean...
null
https://raw.githubusercontent.com/clj-kondo/clj-kondo/b5827368ea71413efa6fe9306bcdaa0c61da753b/src/clj_kondo/impl/types/clojure/core.clj
clojure
sorted in order of appearance in a lot of this work was already figured out here: arity-1 function that returns the same type 407 'sorted-map-by 695 'chunk-append 710 'chunk-cons 767 'if-not 1031 1043 1070 1286 'bit-not 1302 'bit-or 1320 'bit-and-not 1337 'bit-set 1343 'bit-flip 1356 'bit-shift-left ...
(ns clj-kondo.impl.types.clojure.core {:no-doc true} (:require [clj-kondo.impl.types.utils :as tu])) (def seqable->seq {:arities {1 {:args [:seqable] :ret :seq}}}) (def seqable->boolean {:arities {1 {:args [:seqable] :ret :boolean}}}) (def seqa...
391e2502278c91b5a50329e2617b56a736da46e06590ad2356daee6be53344e6
jwiegley/notes
IOState.hs
# LANGUAGE DeriveFunctor # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # module IOState where import Control.DeepSeq import Control.Exception import Control.Monad import Control.Monad.IO.Class import Control.Monad.State.Class import Control.Monad.Trans.State (execStateT) import Criterion import Cr...
null
https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/f719a3d41696d48f6005/misc/IOState.hs
haskell
# LANGUAGE DeriveFunctor # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # module IOState where import Control.DeepSeq import Control.Exception import Control.Monad import Control.Monad.IO.Class import Control.Monad.State.Class import Control.Monad.Trans.State (execStateT) import Criterion import Cr...
30ffc1210339fe5ba2c4da1c4dff79f2f0968364b85abf3cd27311cfa8db403b
jarohen/bounce
system.clj
(ns bounce.system (:require [clojure.set :as set] [com.stuartsierra.dependency :as deps])) (def ^:private !system (atom nil)) (defrecord StartedComponent [value stop!]) (defn ->started-component ([value] (if (instance? StartedComponent value) value (->StartedComponent valu...
null
https://raw.githubusercontent.com/jarohen/bounce/0ca5317ef2d9e43b8add9ce8d1fad2d6155493bb/src/bounce/system.clj
clojure
(ns bounce.system (:require [clojure.set :as set] [com.stuartsierra.dependency :as deps])) (def ^:private !system (atom nil)) (defrecord StartedComponent [value stop!]) (defn ->started-component ([value] (if (instance? StartedComponent value) value (->StartedComponent valu...