_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
d264d18f147320b95ccf91c83a8dd5169649f84bb25ad7ead70d23f4ffc8c776
tezos/tezos-mirror
dac_node.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2022 Nomadic Labs , < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/e80cd05842991197ea613a937434a9cd43026b04/tezt/lib_tezos/dac_node.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2022 Nomadic Labs , < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN A...
ffc26ba6cc4f3a1631091e09f720b4ac54158ef7263fc0a44bfcf4783b22f5c2
LeventErkok/sbv
Int_Yices.hs
----------------------------------------------------------------------------- -- | -- Module : TestSuite.Queries.Int_Yices Copyright : ( c ) -- License : BSD3 -- Maintainer: -- Stability : experimental -- -- Testing Yices specific interactive features. ---------------------------------------------------------...
null
https://raw.githubusercontent.com/LeventErkok/sbv/cfaa40b8c8ff8e1b7ff9ab71304654f6f531ba72/SBVTestSuite/TestSuite/Queries/Int_Yices.hs
haskell
--------------------------------------------------------------------------- | Module : TestSuite.Queries.Int_Yices License : BSD3 Maintainer: Stability : experimental Testing Yices specific interactive features. --------------------------------------------------------------------------- # OPTIONS_GHC -Wall...
Copyright : ( c ) # LANGUAGE ScopedTypeVariables # module TestSuite.Queries.Int_Yices (tests) where import Data.SBV.Control import Control.Monad (unless) import Utils.SBVTestFramework tests :: TestTree tests = testGroup "Basics.QueryIndividual" [ goldenCapturedIO "query_yices" $ \rf -> runSMTWith yice...
147ba4ed0736716c55582ac4a1cea21b73af76abc3eeae2fc141bf0a5f20dc2a
bhaskara/programmable-reinforcement-learning
stat-gatherer.lisp
(defpackage stat-gatherer (:documentation "Package for the <stat-gatherer> subclass of <rl-observer>. Exports ------- <stat-gatherer> make-stat-gatherer total-reward num-episodes-started num-episodes-finished num-env-steps") (:use common-lisp rl-obs utils) (:export <stat-gatherer> make-st...
null
https://raw.githubusercontent.com/bhaskara/programmable-reinforcement-learning/8afc98116a8f78163b3f86076498d84b3f596217/lisp/rl/obs/stat-gatherer.lisp
lisp
class def methods overridden from <rl-observer>
(defpackage stat-gatherer (:documentation "Package for the <stat-gatherer> subclass of <rl-observer>. Exports ------- <stat-gatherer> make-stat-gatherer total-reward num-episodes-started num-episodes-finished num-env-steps") (:use common-lisp rl-obs utils) (:export <stat-gatherer> make-st...
78aab096fc76f0f274618e127d5d6c2a6e1acd37a1e6ad946d94fe492cc0e4f5
earl-ducaine/cl-garnet
run-read.lisp
(run-
null
https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/src/contrib/garnet-desktop-lab/run-read.lisp
lisp
(run-
7ad5d637f0eebad4f49e8ecc08296aa71249671dd2e16bb4f640ff8fd554e633
rfindler/lindenmayer
run.rkt
#lang typed/racket (provide run-lindenmayer cell Lindenmayer-Dag) (struct (α) cell ([item : (Lindenmayer-Dag α)]) #:mutable) (define-type (Lindenmayer-Dag α) (U (-> α α) (Listof (cell α)))) (: run-lindenmayer (All (α) (-> Natural (cell α) (Listof (cell α)) (Listo...
null
https://raw.githubusercontent.com/rfindler/lindenmayer/2ef7b4535d8ae1eb7cc2e16e2b630c30a4b9a34d/simple/run.rkt
racket
#lang typed/racket (provide run-lindenmayer cell Lindenmayer-Dag) (struct (α) cell ([item : (Lindenmayer-Dag α)]) #:mutable) (define-type (Lindenmayer-Dag α) (U (-> α α) (Listof (cell α)))) (: run-lindenmayer (All (α) (-> Natural (cell α) (Listof (cell α)) (Listo...
77b8fa5f7c4f21c9a50fd1c1d490e85fce30e55e86c04887e3fbfdcf89d041b7
bootstrapworld/curr
choose.rkt
#lang racket (require (for-syntax syntax/parse)) (provide (all-defined-out)) ;;;;;;;;;;;; language-specific require ;;;;;;;;;;;;;;;;;;;;;;; (define-for-syntax language (getenv "LANGUAGE")) (define-syntax (choose stx) (syntax-parse stx [(_ a b) (case language [("en-us") #'a] [("es-mx") #'b] ...
null
https://raw.githubusercontent.com/bootstrapworld/curr/443015255eacc1c902a29978df0e3e8e8f3b9430/lib/choose.rkt
racket
language-specific require ;;;;;;;;;;;;;;;;;;;;;;;
#lang racket (require (for-syntax syntax/parse)) (provide (all-defined-out)) (define-for-syntax language (getenv "LANGUAGE")) (define-syntax (choose stx) (syntax-parse stx [(_ a b) (case language [("en-us") #'a] [("es-mx") #'b] [else #'a])]))
7c085ade73a71306126a0206859c80293fd69d8f397e5f40ba834c713e0371e6
yallop/ocaml-asp
pgn_tokens.ml
* Copyright ( c ) 2018 and * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2018 Neelakantan Krishnaswami and Jeremy Yallop * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *...
null
https://raw.githubusercontent.com/yallop/ocaml-asp/a092f17ea55d427c63414899e39a8fe80b30db14/benchmarks/pgn/pgn_tokens.ml
ocaml
* Copyright ( c ) 2018 and * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2018 Neelakantan Krishnaswami and Jeremy Yallop * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *...
842703afae28b8fa2ebf3f2e5e00516519f9ca55c2537b7c8bab54b65397e2eb
coinmetrics/haskell-tools
Monero.hs
# LANGUAGE DeriveGeneric , OverloadedLists , OverloadedStrings , StandaloneDeriving , TemplateHaskell , TypeFamilies , ViewPatterns # module CoinMetrics.Monero ( Monero(..) , MoneroBlock(..) , MoneroTransaction(..) , MoneroTransactionInput(..) , MoneroTransactionOutput(..) ) where import qualified Data.Ae...
null
https://raw.githubusercontent.com/coinmetrics/haskell-tools/94d59497b6c4d829dd680df82c71fe607877ae76/coinmetrics-monero/CoinMetrics/Monero.hs
haskell
# UNPACK # # UNPACK # # UNPACK # # UNPACK # # UNPACK # # UNPACK # # UNPACK # # UNPACK # # UNPACK # # UNPACK # # UNPACK # # UNPACK # conservative rewrite limit
# LANGUAGE DeriveGeneric , OverloadedLists , OverloadedStrings , StandaloneDeriving , TemplateHaskell , TypeFamilies , ViewPatterns # module CoinMetrics.Monero ( Monero(..) , MoneroBlock(..) , MoneroTransaction(..) , MoneroTransactionInput(..) , MoneroTransactionOutput(..) ) where import qualified Data.Ae...
f08411932d7687b824561c21235b31ae383efee4e6a58eadb3da1c9c4da1cc98
doomeer/kalandralang
JSON.ml
USES ezjsonm type origin_item = | File of string | Object_field of string | Array_item of int let show_origin_item = function | File s -> s | Object_field s -> "." ^ s | Array_item i -> "." ^ string_of_int i type t = { json: Ezjsonm.value; origin_rev: origin_item list; } let make origin js...
null
https://raw.githubusercontent.com/doomeer/kalandralang/b3bfc4be4b2a07350ea0fc7a99e15fa869473ac6/src/JSON.ml
ocaml
USES ezjsonm type origin_item = | File of string | Object_field of string | Array_item of int let show_origin_item = function | File s -> s | Object_field s -> "." ^ s | Array_item i -> "." ^ string_of_int i type t = { json: Ezjsonm.value; origin_rev: origin_item list; } let make origin js...
dd7b7d6834864f49465b8df50a596812bd5d21147716a88e35a2024275874173
luqui/experiments
gnd.hs
# LANGUAGE GADTs , GeneralizedNewtypeDeriving # data Switch b a where SwitchA :: Switch b A SwitchB :: b -> Switch b B class Switchable c where switch :: c -> Switch b c data A = A instance Switchable A where switch A = SwitchA newtype B = B A deriving (Switchable) unSwitchB :: Switch b B -> ...
null
https://raw.githubusercontent.com/luqui/experiments/c0b9153c41507afbfdeb2b32bfc65fd1ac83fb26/gnd.hs
haskell
# LANGUAGE GADTs , GeneralizedNewtypeDeriving # data Switch b a where SwitchA :: Switch b A SwitchB :: b -> Switch b B class Switchable c where switch :: c -> Switch b c data A = A instance Switchable A where switch A = SwitchA newtype B = B A deriving (Switchable) unSwitchB :: Switch b B -> ...
130c8af368d6d2fb7835b05e25fc06cd21cc3747d529967fad8fa0ae92c7d76d
RyanGlScott/ghc-software-foundations
Axiom.hs
module SF.LF.Axiom where import Data.Type.Equality import Unsafe.Coerce -- | Assert an equality to be true. Ideally, this wouldn't be necessary, but alas , there are certain points in the code where GHC 's typechecker is n't -- quite smart enough to figure certain things out, so this is our escape -- hatch. -- -- T...
null
https://raw.githubusercontent.com/RyanGlScott/ghc-software-foundations/ce7b8958e0aed4fb2c8611d71e7e0f1a2ef83222/logical-foundations/src/SF/LF/Axiom.hs
haskell
| Assert an equality to be true. Ideally, this wouldn't be necessary, but quite smart enough to figure certain things out, so this is our escape hatch. This can break type safety if wielded improperly. Use with care.
module SF.LF.Axiom where import Data.Type.Equality import Unsafe.Coerce alas , there are certain points in the code where GHC 's typechecker is n't axiom :: forall a b. a :~: b axiom = unsafeCoerce (Refl @a)
0d1ebba8c5b9c7c334fb8f703acb8e3d07c9509e0e539cb9270cec6c2101aab0
robstewart57/rdf4h
Xmlbf.hs
# LANGUAGE CPP # # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE UndecidableInstances # Files Xmlbf and have...
null
https://raw.githubusercontent.com/robstewart57/rdf4h/22538a916ec35ad1c46f9946ca66efed24d95c75/src/Text/RDF/RDF4H/XmlParser/Xmlbf.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # | XML back and forth! @xmlbf@ provides tools like 'dfpos' and 'dfposM' for finding a fixpoint of an XML fragment. package. @xmlbf@ doesn't do any parsing of raw XML on its own. Instead, one should use @xmlbf@ together with libraries like [xmlbf-xeno](-xe...
# LANGUAGE CPP # # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PatternSynonyms # # LANGUAGE ScopedTypeVariables # # LANGUAGE UndecidableInstances # Files Xmlbf and have been taken from : Which is licensed under Apache Lic...
8044f79e97e483b8b66a1f9cc2c126adaa6dbea5163f3290871a3c8f8fb877c6
binghe/cl-net-snmp
timeticks.lisp
;;;; -*- Mode: Lisp -*- $ Id$ (in-package :asn.1) (defclass timeticks (number-type) () (:documentation "Timeticks: per second/100")) (defun timeticks (time) (make-instance 'timeticks :value time)) (defmethod print-object ((object timeticks) stream) (let (hours minutes seconds seconds/100 (ticks (value-of ...
null
https://raw.githubusercontent.com/binghe/cl-net-snmp/3cf053bce75734097f0d7e2245a53fa0c45f5e05/runtime/timeticks.lisp
lisp
-*- Mode: Lisp -*- hours minutes
$ Id$ (in-package :asn.1) (defclass timeticks (number-type) () (:documentation "Timeticks: per second/100")) (defun timeticks (time) (make-instance 'timeticks :value time)) (defmethod print-object ((object timeticks) stream) (let (hours minutes seconds seconds/100 (ticks (value-of object))) (multiple-...
b6e39a0ed60d37f940ced77e8fae516ddfa82aad7bcc9db187d8b394e5a06de5
i-am-tom/higgledy
Types.hs
# OPTIONS_HADDOCK not - home # # LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE InstanceSigs # {-# LANGUAGE RankNTyp...
null
https://raw.githubusercontent.com/i-am-tom/higgledy/9b19fb002d9e134ac7cbe729f8a621dc5243d1ca/src/Data/Generic/HKD/Types.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # | Higher-kinded data (HKD) is the design pattern in which every fie...
# OPTIONS_HADDOCK not - home # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE InstanceSigs # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilyDependencies # # LANGUAGE UndecidableInstances # | Module : Data . Gene...
62dd09828039dbccc4d92f524210707ef6121ccb9318b4c7044d4d779a8c4a9d
tsloughter/kuberl
kuberl_v1_flocker_volume_source.erl
-module(kuberl_v1_flocker_volume_source). -export([encode/1]). -export_type([kuberl_v1_flocker_volume_source/0]). -type kuberl_v1_flocker_volume_source() :: #{ 'datasetName' => binary(), 'datasetUUID' => binary() }. encode(#{ 'datasetName' := DatasetName, 'datasetUUID' := DatasetUUID ...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_flocker_volume_source.erl
erlang
-module(kuberl_v1_flocker_volume_source). -export([encode/1]). -export_type([kuberl_v1_flocker_volume_source/0]). -type kuberl_v1_flocker_volume_source() :: #{ 'datasetName' => binary(), 'datasetUUID' => binary() }. encode(#{ 'datasetName' := DatasetName, 'datasetUUID' := DatasetUUID ...
8c0ba07d7b18d7b7b4a0dc2bb3be36797af4f303915505f5cc7d832e82bbd092
gcross/LogicGrowsOnTrees
test-RequestQueue.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # # LANGUAGE RecursiveDo # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TupleSections ...
null
https://raw.githubusercontent.com/gcross/LogicGrowsOnTrees/4befa81eb7152d877a7c78338d21bed61b06db66/LogicGrowsOnTrees/tests/test-RequestQueue.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE GADTs # # LANGUAGE TypeSynonymInstances # intentional for test purposes
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # # LANGUAGE RecursiveDo # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TupleSections # # LANGUAGE UnicodeSyntax # # LANGUAGE ViewPatterns # imp...
e43f5693ebf712d29399b04e738440544554f18bbc0dae233547e25513c24ce6
owickstrom/komposition
VideoStreamer.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} # LANGUAGE ScopedTypeVariables # module Komposition.UserInterface.GtkInterface.VideoStreamer ( DesiredState(..) , StreamURI , StreamerEvent(..) , StreamerProperties(.....
null
https://raw.githubusercontent.com/owickstrom/komposition/64893d50941b90f44d77fea0dc6d30c061464cf3/src/Komposition/UserInterface/GtkInterface/VideoStreamer.hs
haskell
# LANGUAGE OverloadedLabels # # LANGUAGE OverloadedStrings # # LANGUAGE RecordWildCards # TODO: Implement patch Modify $ \widget -> do playbin <- Gst.Element <$> GI.objectGetData widget "user_data" Just uri -> void $ do Gst.elementSetState playbin Gst.StatePlaying Nothing -> return () ...
# LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # module Komposition.UserInterface.GtkInterface.VideoStreamer ( DesiredState(..) , StreamURI , StreamerEvent(..) , StreamerProperties(..) , videoStreamer ) where import Komposition.Prelude import qualified Prelude import qualified ...
a99e936b71a97b9ff98bcf751b4526271e6a52b3172bd0b4e86bab9b0c121e5c
jfacorro/fp-interpreter-in-lisp
main-dev.lisp
;(defparameter *filepath* "C:\\Juan\\02.Personal\\Dropbox\\Facultad\\2011.1er.75.14.Lenguajes.Formales\\fp-interpreter-in-lisp\\") (defparameter *filepath* "C:\\JF\\My DropBox\\Facultad\\2011.1er.75.14.Lenguajes.Formales\\fp-interpreter-in-lisp\\") ;---------------------------------------------------- (defun compile...
null
https://raw.githubusercontent.com/jfacorro/fp-interpreter-in-lisp/b0c520593e98cce83b571939a22d7efd7926c711/src/main-dev.lisp
lisp
(defparameter *filepath* "C:\\Juan\\02.Personal\\Dropbox\\Facultad\\2011.1er.75.14.Lenguajes.Formales\\fp-interpreter-in-lisp\\") ---------------------------------------------------- ---------------------------------------------------- (load-code "tests.lisp") ----------------------------------------- -----------...
(defparameter *filepath* "C:\\JF\\My DropBox\\Facultad\\2011.1er.75.14.Lenguajes.Formales\\fp-interpreter-in-lisp\\") (defun compile-load (file-name &optional (v nil) (p nil)) (load (compile-file (format nil "~asrc\\~a" *filepath* file-name) :verbose v :print p) :verbose v :print p)) (progn (compile-load "package...
fcb98415c46156a3f1e4be6d92e1404bfcae1e5579486f59e1f9ac41d90b9658
tidalcycles/konnakol-gsoc
Diagrams.hs
module Konnakol.Diagrams where import Diagrams.Prelude hiding (P) import Diagrams.Backend.SVG.CmdLine import Data.List.Split ( chunksOf ) import Data.Colour.SRGB.Linear ( rgb ) import qualified Data.Data as Data.Typeable.Internal import Konnakol.Define ( calculateCount, genKorvai, getCountPerBeat, ...
null
https://raw.githubusercontent.com/tidalcycles/konnakol-gsoc/c8c39b857a51d06c8f748d45d6b0db14a6a5a998/Konnakol/Diagrams.hs
haskell
of the phrase/ gap | Core function to generate a picture a Korvai | Core function to draw the grid for the Korvai | Function to obtain equivalent symbols for representation of a thala on top of the grid | To create a sector with the size based on the element's index and the total array size | To convert the given...
module Konnakol.Diagrams where import Diagrams.Prelude hiding (P) import Diagrams.Backend.SVG.CmdLine import Data.List.Split ( chunksOf ) import Data.Colour.SRGB.Linear ( rgb ) import qualified Data.Data as Data.Typeable.Internal import Konnakol.Define ( calculateCount, genKorvai, getCountPerBeat, ...
63ccd38426180e10267e2e7cadab456b96bff6125df8a62e0ce0ccd8e24fce43
dinosaure/paf-le-chien
paf_cohttp.mli
val scheme : [ `HTTP | `HTTPS ] Mimic.value val port : int Mimic.value val domain_name : [ `host ] Domain_name.t Mimic.value val ipaddr : Ipaddr.t Mimic.value val with_uri : Uri.t -> Mimic.ctx -> Mimic.ctx include Cohttp_lwt.S.Client with type ctx = Mimic.ctx
null
https://raw.githubusercontent.com/dinosaure/paf-le-chien/11c4aa30438d795e765063db61531944d988a516/lib/paf_cohttp.mli
ocaml
val scheme : [ `HTTP | `HTTPS ] Mimic.value val port : int Mimic.value val domain_name : [ `host ] Domain_name.t Mimic.value val ipaddr : Ipaddr.t Mimic.value val with_uri : Uri.t -> Mimic.ctx -> Mimic.ctx include Cohttp_lwt.S.Client with type ctx = Mimic.ctx
3f6239a6b93a920437f24df9cfea7eb23f9e04b7bfa1058d7d15547633e34a05
unicode-org/unilex
verb_stem_test.clj
(ns dict-data-builder.verb-stem-test (:require [clojure.test :refer :all] [dict-data-builder.data :as data :refer [map->Verb]] [dict-data-builder.verb-stem :as vs :refer :all]) (:import dict_data_builder.data.Verb)) (def இடம்பெறு (map->Verb {:root "இடம்பெறு" :verb-class "4"})) (def இடம்பெற...
null
https://raw.githubusercontent.com/unicode-org/unilex/aa6847b510cb75133d281fd742f6065f86e59de7/data/stems/ta/dict-data-builder/test/dict_data_builder/verb_stem_test.clj
clojure
(ns dict-data-builder.verb-stem-test (:require [clojure.test :refer :all] [dict-data-builder.data :as data :refer [map->Verb]] [dict-data-builder.verb-stem :as vs :refer :all]) (:import dict_data_builder.data.Verb)) (def இடம்பெறு (map->Verb {:root "இடம்பெறு" :verb-class "4"})) (def இடம்பெற...
8c1fa50fb9fbdc229846a6fc5e638c62376947febfe2f645b3e7d999f085280a
fortytools/holumbus
Client.hs
module Main ( main ) where import Crawl2.Examples2.MRIndexer import Crawl2.Examples2.Common import Crawl2.Examples2.SimpleDMapReduceIO import Holumbus.DCrawler.URIs import Holumbus.DCrawler.Robots import Holumbus.DCrawler.Core import Holumbus.Common.Logging import System.Log.Logger import System.Environment import Sys...
null
https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/crawl2/Examples2/Re_2/Client.hs
haskell
_ <- readline "Press a key" do another loop infoM localLogger ("\n~~~~~~~~~\niteration: " ++ show count) split toBeProcessed uris by num of workers tbps and give each uri an unique id :: [(URI, Int)] tbps = partition num (idoffset `div` num) (zip uris [nextId..]) <<<<<<<<------------------------------- ????????...
module Main ( main ) where import Crawl2.Examples2.MRIndexer import Crawl2.Examples2.Common import Crawl2.Examples2.SimpleDMapReduceIO import Holumbus.DCrawler.URIs import Holumbus.DCrawler.Robots import Holumbus.DCrawler.Core import Holumbus.Common.Logging import System.Log.Logger import System.Environment import Sys...
f42dad751c2fcdafc7b24b86637a1b95841bfc71b6f40dfba64e215f7fe24414
franks42/clj-ns-browser
utils.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 COPYING at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;; the terms ...
null
https://raw.githubusercontent.com/franks42/clj-ns-browser/c5fc570f9c8aeb6dd1cc9383fcf32bdaa9b936e3/src/clj_ns_browser/utils.clj
clojure
The use and distribution terms for this software are covered by the which can be found in the file COPYING 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. r)...
Copyright ( c ) . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) (ns clj-ns-browser.utils (:require [clojure.set] [cd-client.core] [clojure.java.shell] [clojure.java.io] [clojure.string :as str] [clojure.tools.namespace] [cl...
1f44bb52ca79b828972ae8608982afeab8d5503fff736ad1c7d5e9269c6052a5
startalkIM/ejabberd
node_private.erl
%%%---------------------------------------------------------------------- %%% File : node_private.erl Author : %%% Purpose : Created : 1 Dec 2007 by %%% %%% ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne %%% %%% This program is free software; you can redistribute it and/or modify it unde...
null
https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/node_private.erl
erlang
---------------------------------------------------------------------- File : node_private.erl Purpose : This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; w...
Author : Created : 1 Dec 2007 by ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public License along wit...
b12d31a5ccd96faa8df65c3b6cc8967e4d56278fd1cdbd101cebec1999b493d3
mmark-md/mmark-ext
PunctuationPrettifierSpec.hs
{-# LANGUAGE OverloadedStrings #-} module Text.MMark.Extension.PunctuationPrettifierSpec (spec) where import Test.Hspec import Text.MMark.Extension.PunctuationPrettifier import Text.MMark.Extension.TestUtils spec :: Spec spec = describe "punctuationPrettifier" $ do let to = withExt punctuationPrettifier co...
null
https://raw.githubusercontent.com/mmark-md/mmark-ext/cc7d035224d32a6133789d65cd0e130bcdbf8d2c/tests/Text/MMark/Extension/PunctuationPrettifierSpec.hs
haskell
# LANGUAGE OverloadedStrings #
module Text.MMark.Extension.PunctuationPrettifierSpec (spec) where import Test.Hspec import Text.MMark.Extension.PunctuationPrettifier import Text.MMark.Extension.TestUtils spec :: Spec spec = describe "punctuationPrettifier" $ do let to = withExt punctuationPrettifier context "on plain inlines" $ do ...
2059e36f923a3af9139c048c822e55b866cca54c333a7ec1ffc435dfc6bdfd36
paurkedal/ocaml-caqti
caqti_blocking.mli
Copyright ( C ) 2018 - -2022 Petter A. Urkedal < > * * 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 3 of the License , or ( at your * option ) any la...
null
https://raw.githubusercontent.com/paurkedal/ocaml-caqti/601723929a52326ed98e01c63dafd2db20ea5f52/caqti/lib-blocking/caqti_blocking.mli
ocaml
* Blocking API based on the Unix module. This module implements a blocking API. It is not designed for preemptive threading. That is, connections and connection pools must be created and used within a single thread, and any limitation on multithreading from the driver or client library applies. ...
Copyright ( C ) 2018 - -2022 Petter A. Urkedal < > * * 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 3 of the License , or ( at your * option ) any la...
a5a172e03b62dbfd28d1d33785f910987b0b3a29f59b69b49150746c39c3d859
lisp-korea/sicp2014
ex-2.2.scm
(define (make-segment a b c d) (cons (make-point a b) (make-point c d))) (define (start-segment l) (car l)) (define (end-segment l) (cdr l)) (define (make-point x y) (cons x y)) (define (x-point p) (car p)) (define (y-point p) (cdr p)) (define (midpoint-segment l) (cons (/ (+ (x-point (start-segment l)) (x...
null
https://raw.githubusercontent.com/lisp-korea/sicp2014/9e60f70cb84ad2ad5987a71aebe1069db288b680/soulawaker/2.1/ex-2.2.scm
scheme
(define (make-segment a b c d) (cons (make-point a b) (make-point c d))) (define (start-segment l) (car l)) (define (end-segment l) (cdr l)) (define (make-point x y) (cons x y)) (define (x-point p) (car p)) (define (y-point p) (cdr p)) (define (midpoint-segment l) (cons (/ (+ (x-point (start-segment l)) (x...
cd69b951f530f1a4d0578f9a8f69739833826dc06698013a5bb3c5a41dcb65b5
quil-lang/magicl
row-column-matrices.lisp
;;;; row-column-matrices.lisp ;;;; Author : (in-package #:magicl) (macrolet ((define-vector-matrix-conversion (type) (let* ((vec-type (alexandria:symbolicate "VECTOR/" type)) (mat-type (alexandria:symbolicate "MATRIX/" type)) (make-vec (alexandria:symbolicate "...
null
https://raw.githubusercontent.com/quil-lang/magicl/c7730fba6614652ae291053566a9c2b6696ad737/src/high-level/matrix-functions/row-column-matrices.lisp
lisp
row-column-matrices.lisp
Author : (in-package #:magicl) (macrolet ((define-vector-matrix-conversion (type) (let* ((vec-type (alexandria:symbolicate "VECTOR/" type)) (mat-type (alexandria:symbolicate "MATRIX/" type)) (make-vec (alexandria:symbolicate "MAKE-" vec-type)) ...
2670e7b3d3d3a5c8c0b19614d56c81d41b35efb6a4f869f61f72aec0e195e690
Rhywun/get-programming-with-haskell
Lesson28.hs
module Lesson28 where -- -- A command-line application for calculating the distance between cities -- see dist.hs -- Using a multi - argument function in IO using < $ > and < * > -- see min3.hs -- -- Using <*> to create data in a context -- data User = User { name :: String , gamerId :: Int , score :: ...
null
https://raw.githubusercontent.com/Rhywun/get-programming-with-haskell/b9cf06f725b2ef038d69ed49f7d2900f55e98ca3/Unit05/Lesson28/Lesson28.hs
haskell
A command-line application for calculating the distance between cities see dist.hs see min3.hs Using <*> to create data in a context Note the we can create a User with regular function syntax: User { name = " " , gamerId = 1337 , score = 9001 } User {name = "Sue", gamerId = 1337, score = 9001} Maybe conte...
module Lesson28 where Using a multi - argument function in IO using < $ > and < * > data User = User { name :: String , gamerId :: Int , score :: Int } deriving (Show) -} sue :: User sue = User "Sue" 1337 9001 maybeUsername :: Maybe String maybeUsername = Just "Sue" maybeGamerId :: Maybe Int may...
424ab10f1b77c376416b061e64ab7e2b9db57a7a9008f6de632642fb0e939049
haskelling/aoc2020
10b.hs
import AOC main = interact $ f . map read f :: [Int] -> Int f xs = summarize (all, getChildren) calc 0 where all = 0:sort xs ++ [maximum xs + 3] getChildren j = [(1, k) | k <- [j + 1 .. j + 3], k `elem` all] calc [] = 1 calc xs = sum $ map snd xs
null
https://raw.githubusercontent.com/haskelling/aoc2020/0f0e44ad16d3eda4add1f05684070dd161010d75/10b.hs
haskell
import AOC main = interact $ f . map read f :: [Int] -> Int f xs = summarize (all, getChildren) calc 0 where all = 0:sort xs ++ [maximum xs + 3] getChildren j = [(1, k) | k <- [j + 1 .. j + 3], k `elem` all] calc [] = 1 calc xs = sum $ map snd xs
c57cd7d9b3b8fc8cdf7a77c1d1b74e2764622e640ce184fd678fa5c7fe6e609a
Practical-Formal-Methods/adiff
InputStream.hs
# LANGUAGE CPP , BangPatterns # {-# OPTIONS -Wall #-} ----------------------------------------------------------------------------- -- | Module : Language . C.Data . InputStream -- Copyright : (c) 2008,2011 Benedikt Huber -- License : BSD-style -- Maintainer : -- Stability : experimental Porta...
null
https://raw.githubusercontent.com/Practical-Formal-Methods/adiff/c18872faf3e31572437686d766f9972e00274588/language-c-extensible/src/Language/C/Data/InputStream.hs
haskell
# OPTIONS -Wall # --------------------------------------------------------------------------- | Copyright : (c) 2008,2011 Benedikt Huber License : BSD-style Maintainer : Stability : experimental byte based access to the input stream. -----------------------------------------------------------------...
# LANGUAGE CPP , BangPatterns # Module : Language . C.Data . InputStream Portability : ghc Compile time input abstraction for the parser , relying on ByteString . The String interface only supports Latin-1 since alex-3 , as now requires module Language.C.Data.InputStream ( InputStream, readInputS...
fe02930b94f271c316e9eaa541576d62d9038ea637bd4b99b455f197e0f7037c
robert-strandh/CLIMatis
text-packages.lisp
(defpackage #:clim3-text (:use #:common-lisp) (:export #:text #:style #:chars ))
null
https://raw.githubusercontent.com/robert-strandh/CLIMatis/4949ddcc46d3f81596f956d12f64035e04589b29/Text/text-packages.lisp
lisp
(defpackage #:clim3-text (:use #:common-lisp) (:export #:text #:style #:chars ))
db02e9ad479ae5f0a158f9dff1c08f5b3d8e18d4e7c5e8ba296902663fa17c34
TrustInSoft/tis-kernel
value_callstack.ml
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/value_types/value_callstack.ml
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 This file is part of Frama - C. Copyright ( C ) 2007 - 2015 ...
326ee725624dfb841322cd511449b5785b6a137c7230e89f02cb3721dbd5bdb4
Timothy-G-Griffin/cc_cl_cam_ac_uk
front_end.mli
val front_end : string -> Ast.expr
null
https://raw.githubusercontent.com/Timothy-G-Griffin/cc_cl_cam_ac_uk/aabaf64c997301ea69060a1b69e915b9d1031573/slang/front_end.mli
ocaml
val front_end : string -> Ast.expr
b16d83e65cf040f6e699697d5e5f70b91077f79b0cbbe0d1516b780350f4f272
ml4tp/tcoq
pretyping.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/pretyping/pretyping.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** Secondary maintenance: collective ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This file contains the synt...
78caa8a2a9fa3316b233c0afb492ea51ceb30746e413221ac7844907c1aaeb49
plt-amy/ahc
parsers.ml
open import "prelude.ml" open import "./monads.ml" private type consumed = C | E private type error = Unexpected of string * list string instance show error begin let show = function | Unexpected (s, []) -> s | Unexpected (s, ms) -> "Unexpected " ^ s ^ "\n" ^ "Expecting one of " ^ foldl (^) "...
null
https://raw.githubusercontent.com/plt-amy/ahc/5595b4946a2cd17c31f1877d3914d77a97cafb1e/lib/parsers.ml
ocaml
shut up, amc
open import "prelude.ml" open import "./monads.ml" private type consumed = C | E private type error = Unexpected of string * list string instance show error begin let show = function | Unexpected (s, []) -> s | Unexpected (s, ms) -> "Unexpected " ^ s ^ "\n" ^ "Expecting one of " ^ foldl (^) "...
2b61ce80e3149b9b66e7f194ff45fa4a41ebd6417161edafc5b09fb51c5c4bf0
provinciesincijfers/gebiedsniveaus
0 maak_politiezone.sps
* Encoding: windows-1252. GET DATA /TYPE=XLSX /FILE= 'C:\github\gebiedsniveaus\kerntabellen\gemeente_politiezone.xlsx' /SHEET=name 'Blad1' /CELLRANGE=FULL /READNAMES=ON /DATATYPEMIN PERCENTAGE=95.0 /HIDDEN IGNORE=YES. EXECUTE. DATASET NAME gem_pol WINDOW=FRONT. DATASET DECLARE politiezone. AGGREG...
null
https://raw.githubusercontent.com/provinciesincijfers/gebiedsniveaus/84bd86174f5e155aae431010acbb7949e0be9e80/scripts/0%20maak_politiezone.sps
scheme
* Encoding: windows-1252. GET DATA /TYPE=XLSX /FILE= 'C:\github\gebiedsniveaus\kerntabellen\gemeente_politiezone.xlsx' /SHEET=name 'Blad1' /CELLRANGE=FULL /READNAMES=ON /DATATYPEMIN PERCENTAGE=95.0 /HIDDEN IGNORE=YES. EXECUTE. DATASET NAME gem_pol WINDOW=FRONT. DATASET DECLARE politiezone. AGGREG...
aa2275594dcd2daaa53728de8bb1bb33dd99679041eeab9b06acc3c469620df2
privet-kitty/cl-competitive
binary-lca.lisp
(defpackage :cp/binary-lca (:use :cl) (:export #:get-binary-lca)) (in-package :cp/binary-lca) (declaim (inline get-binary-lca)) (defun get-binary-lca (x y) "Returns the LCA of two vertices X, Y, which are 1-based binary encoding of (infinite) perfect binary tree." (declare ((integer 1) x y)) (let* ((large (m...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/binary-lca.lisp
lisp
(defpackage :cp/binary-lca (:use :cl) (:export #:get-binary-lca)) (in-package :cp/binary-lca) (declaim (inline get-binary-lca)) (defun get-binary-lca (x y) "Returns the LCA of two vertices X, Y, which are 1-based binary encoding of (infinite) perfect binary tree." (declare ((integer 1) x y)) (let* ((large (m...
13ac87a9fc3c3db0d7f7ba6381ebce997d44a0078f4cf2ff04b4cc57a338c203
hspec/hspec
Unicode.hs
module Test.Hspec.Core.Formatters.Pretty.Unicode ( ushow , ushows ) where import Prelude () import Test.Hspec.Core.Compat import Data.Char ushow :: String -> String ushow xs = ushows xs "" ushows :: String -> ShowS ushows = uShowString uShowString :: String -> ShowS uShowString cs =...
null
https://raw.githubusercontent.com/hspec/hspec/9bc8b67603b8374261991e889177cd28564a111d/hspec-core/src/Test/Hspec/Core/Formatters/Pretty/Unicode.hs
haskell
module Test.Hspec.Core.Formatters.Pretty.Unicode ( ushow , ushows ) where import Prelude () import Test.Hspec.Core.Compat import Data.Char ushow :: String -> String ushow xs = ushows xs "" ushows :: String -> ShowS ushows = uShowString uShowString :: String -> ShowS uShowString cs =...
3703758c1d9bc991d103e20d3d978e1978002a1650791f162d44016149777503
fare/fare-quasiquote
pp-quasiquote.lisp
pretty - printing of backquote expansions #+xcvb (module (:depends-on ("quasiquote"))) This software is originally derived from the CMU CL system via SBCL . CMU CL was written at Carnegie Mellon University and released into ;;;; the public domain. The software is in the public domain and is ;;;; provided with a...
null
https://raw.githubusercontent.com/fare/fare-quasiquote/ccb0285b456c4d6bb09b9f931cf0ac5e72353ae5/pp-quasiquote.lisp
lisp
the public domain. The software is in the public domain and is provided with absolutely no warranty. represent the escape represent the escape (apply 'list* (mapcar #'(lambda (el) (quasiquote-unexpand-1 'unquote el)) x)) Given an invalid form. Instead of erroring out, revert to standard *p-p-d* (ugly). Unhappily,...
pretty - printing of backquote expansions #+xcvb (module (:depends-on ("quasiquote"))) This software is originally derived from the CMU CL system via SBCL . CMU CL was written at Carnegie Mellon University and released into (in-package :fare-quasiquote) (defun pprint-starts-with-dot-or-at-p (form) (and (...
e66be2f0f60c511fb10825f0fd2a6e48ed6111291c707f4008b8852d94dd42ba
tschady/advent-of-code
d13.clj
(ns aoc.2016.d13 (:require [aoc.file-util :as file-util] [aoc.grid :as grid] [aoc.math-util :as math-util] [ubergraph.alg :as alg] [ubergraph.core :as uber])) (def input (first (file-util/read-ints "2016/d13.txt"))) (defn *open-space? "Return true if given coord is an open space within problem boun...
null
https://raw.githubusercontent.com/tschady/advent-of-code/4efb26905e669052c0ee24f4e126e635dca33610/src/aoc/2016/d13.clj
clojure
There's a bug in my understanding of the problem description... I would say it's 0 hops from start-pos to start-pos, but only get the right answer
(ns aoc.2016.d13 (:require [aoc.file-util :as file-util] [aoc.grid :as grid] [aoc.math-util :as math-util] [ubergraph.alg :as alg] [ubergraph.core :as uber])) (def input (first (file-util/read-ints "2016/d13.txt"))) (defn *open-space? "Return true if given coord is an open space within problem boun...
65c7c8906fe5a9b7736b55997b6ba7475a1fdd101d4f9fcc07dbbc763eba6d46
noprompt/meander
epsilon_test.cljc
(ns meander.epsilon-test (:require [clojure.spec.alpha :as s :include-macros true] [clojure.spec.test.alpha :as st :include-macros true] [clojure.test :as t] [clojure.test.check.clojure-test :as tc.t :include-macros true] [clojure.test.check.generators :as tc.gen :inclu...
null
https://raw.githubusercontent.com/noprompt/meander/b8f16a303e7f8ba0180ddc833c97edb0b8adccea/test/meander/epsilon_test.cljc
clojure
--------------------------------------------------------------------- Helpers --------------------------------------------------------------------- match Primitive patterns Vectors Maps such-that is to ensure we don't get a duplicate key Sets Find subsets S1, S2, and S3 of S such that S1 = S S2 = S1 - ...
(ns meander.epsilon-test (:require [clojure.spec.alpha :as s :include-macros true] [clojure.spec.test.alpha :as st :include-macros true] [clojure.test :as t] [clojure.test.check.clojure-test :as tc.t :include-macros true] [clojure.test.check.generators :as tc.gen :inclu...
bf877f46161fcaad47c053206cd2a32a9f2984f9b95d3226b381584cbb4540a5
mstksg/advent-of-code-2019
Day12.hs
-- | -- Module : AOC.Challenge.Day12 -- License : BSD3 -- -- Stability : experimental -- Portability : non-portable -- Day 12 . See " AOC.Solver " for the types used in this module ! module AOC.Challenge.Day12 ( day12a , day12b ) where import AOC.Common ((!!!), clearOut) impor...
null
https://raw.githubusercontent.com/mstksg/advent-of-code-2019/df2b1c76ad26ad20306f705e923a09b14d538374/src/AOC/Challenge/Day12.hs
haskell
| Module : AOC.Challenge.Day12 License : BSD3 Stability : experimental Portability : non-portable | The cycle is halfway done when the velocities invert (that is, become 0)
Day 12 . See " AOC.Solver " for the types used in this module ! module AOC.Challenge.Day12 ( day12a , day12b ) where import AOC.Common ((!!!), clearOut) import AOC.Solver ((:~>)(..), dyno_) import Data.Char (isDigit) import Data.List ...
38024b690c8706283ed0fb585c6e734465bed7b3af442f24448390bfbe033cad
adobe/Chronikis
BasicModelSpec.hs
Copyright 2019 Adobe . All rights reserved . This file is licensed to you under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , sof...
null
https://raw.githubusercontent.com/adobe/Chronikis/b83b9e38341cdc1539fc7625c6355c6fd176d8a3/compiler/test/BasicModelSpec.hs
haskell
import Test.QuickCheck
Copyright 2019 Adobe . All rights reserved . This file is licensed to you under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , sof...
395eb2a82ac917ad20f46792f372a0427ea521fff6bf0b81ed7b967918125c5b
MaartenFaddegon/Hoed
t6.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE DeriveGeneric # module Main where import Debug.Hoed import System.Process(system) import System.Exit(exitWith) -- This test demonstrates that using the FPretty library we pretty print -- much bigger computation statements than with the previous implementation based on '...
null
https://raw.githubusercontent.com/MaartenFaddegon/Hoed/8769d69e309928aab439b22bc3f3dbf5452acc77/tests/Pure/t6.hs
haskell
# LANGUAGE OverloadedStrings # This test demonstrates that using the FPretty library we pretty print much bigger computation statements than with the previous implementation
# LANGUAGE DeriveGeneric # module Main where import Debug.Hoed import System.Process(system) import System.Exit(exitWith) based on 's " prettier printer " . data T = Step T | End deriving Generic instance Observable T v :: T v = foldr (\_ -> Step) End [1..1000] ends :: T -> Bool ends = observe "ends" ends' ends'...
57afa60bb62a6b538c49647db1038d596a4f757baa6ad3b5c5a8e07b7cdeae13
minio/minio-hs
Test.hs
-- MinIO Haskell SDK , ( C ) 2018 MinIO , Inc. -- Licensed under the Apache License , Version 2.0 ( the " License " ) ; -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- -2.0 -- -- Unless required by applicable law or agreed to in writing, softw...
null
https://raw.githubusercontent.com/minio/minio-hs/d59f45fec4481313cfb5fafd635558ce385e7422/test/Network/Minio/JsonParser/Test.hs
haskell
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing per...
MinIO Haskell SDK , ( C ) 2018 MinIO , Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , module Network.Minio.JsonParser.Test ( jsonParserTests, ) where import Lib.Prelude import Network.Minio.Errors import Network...
6cc00b7cd100e35094c10b2fab334f236a309a39ca18a9ffcd8e674eeec944ee
jordwalke/rehp
main.ml
Js_of_ocaml example * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of ...
null
https://raw.githubusercontent.com/jordwalke/rehp/f122b94f0a3f06410ddba59e3c9c603b33aadabf/examples/wiki/main.ml
ocaml
Js_of_ocaml example * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of ...
973195fdf3eb38f3469b921d0291bbe96b64a4e65bd65c67d08290b5bfb69813
GrammaticalFramework/gf-core
JSGF.hs
---------------------------------------------------------------------- -- | Module : GF.Speech . -- This module prints a CFG as a JSGF grammar . -- FIXME : remove \/ warn \/ fail if there are int \/ string literal -- categories in the grammar -- FIXME : convert to UTF-8 ----------------------------------...
null
https://raw.githubusercontent.com/GrammaticalFramework/gf-core/f2e52d6f2c2bc90febceebdea0268b40ea37476c/src/compiler/GF/Speech/JSGF.hs
haskell
-------------------------------------------------------------------- | categories in the grammar --------------------------------------------------------------------------- import Debug.Trace removes punctuation FIXME: quote if there is whitespace or odd chars Pretty-printing utilities prepunctuate :: Doc -> [D...
Module : GF.Speech . This module prints a CFG as a JSGF grammar . FIXME : remove \/ warn \/ fail if there are int \/ string literal FIXME : convert to UTF-8 module GF.Speech.JSGF (jsgfPrinter) where GHC 8.4.1 clash with Text . PrettyPrint import GF.Data . Utilities import GF.Infra.Option import GF.Gr...
79f8bcd84ce55e704be931870a4d47063d54853dac4763d23430bdc4278d713f
basho/mochiweb
mochifmt.erl
@author < > @copyright 2008 Mochi Media , Inc. %% %% Permission is hereby granted, free of charge, to any person obtaining a %% copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation %% the rights to use, copy, modif...
null
https://raw.githubusercontent.com/basho/mochiweb/34d3e420c3b74bde56483d8bd2896e03126314bb/src/mochifmt.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, publish, distribute, sublicense, Software is furnished to do so, subject to the following conditions: The above copyright noti...
@author < > @copyright 2008 Mochi Media , Inc. to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF AN...
223afcd3bd10fcbd333e0aa9fcb8fdbd1ea2ad9fc06e1622c34a6fc20e11d2cf
swamp-agr/proof-assistant-bot
ShowMetas.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE FlexibleContexts # module Agda.Interaction.Command.ShowMetas where import Agda.Interaction.Base (OutputConstraint (..), OutputForm (..), Rewrite (..)) import Agda.Interaction.BasicOps (outputFormId, typeOfMeta, typesOfHiddenMetas, typesOfVisibleMetas) import Agda.Syntax...
null
https://raw.githubusercontent.com/swamp-agr/proof-assistant-bot/759ded398ca7a145fecf5a094c86c7c26c9159da/src/Agda/Interaction/Command/ShowMetas.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE FlexibleContexts # module Agda.Interaction.Command.ShowMetas where import Agda.Interaction.Base (OutputConstraint (..), OutputForm (..), Rewrite (..)) import Agda.Interaction.BasicOps (outputFormId, typeOfMeta, typesOfHiddenMetas, typesOfVisibleMetas) import Agda.Syntax.Abstract.Pretty (prettyA) import A...
9152ff51f28f897daf5d89f43bdce942c03257ee5db3a800dd958c634863953e
janegca/htdp2e
2901-SP-bundle.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname 2901-SP-bundle) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor r...
null
https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/05-GenerativeRecursion/2901-SP-bundle.rkt
racket
about the language level of this file in a form that our tools can easily process. Sample Problem: Your task is to design the function bundle, which prepares the content of individual “letters” into chunks and to thus produce a list of strings— called chunks—of a given length, called chunk size. -- Example 1Str...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname 2901-SP-bundle) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ()))) 29.01 Sample Problem the definitions area for...
e665846e611eee280822b31f02dc3ab767960ed29e1f97f4c959b444de1a8fef
sealchain-project/sealchain
Client.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE RankNTypes #-} # LANGUAGE StrictData # -- | This module defines a client interface for the Cardano wallet. module Cardano.Wallet.Client ( -- * The abstract client WalletClient(..) , WalletDocClient(..) , getWalletIndex , getAccounts , getWallets ...
null
https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/wallet/src/Cardano/Wallet/Client.hs
haskell
# LANGUAGE RankNTypes # | This module defines a client interface for the Cardano wallet. * The abstract client * The type of errors that the client might return | A representation of a wallet client parameterized over some effect type @m@. The record fields serve as the API to the wallet client. Note that the...
# LANGUAGE DeriveGeneric # # LANGUAGE StrictData # module Cardano.Wallet.Client WalletClient(..) , WalletDocClient(..) , getWalletIndex , getAccounts , getWallets , getAddressIndex , getTransactionIndex , Resp , hoistClient , liftClient , onClientError , withThrott...
6a67ed675903031a2fab4e21be434ff55447d7e968ae5f46d16eec8323db6f80
brendanhay/amazonka
Tag.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE StrictData #-} # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # Derived fr...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-timestream-query/gen/Amazonka/TimeStreamQuery/Types/Tag.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Module : Amazonka.TimeStreamQuery.Types.Tag Stability : auto-generated Each tag consists of a key and an optional value, both of which you example, by purpose, owner, or environment. /See:/ 'newTag' smart constructor. | The key of the tag. Tag keys...
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # Derived from AWS service descriptions , licensed under Apache 2.0 . Co...
c7dab5f26542c6795b99325bb19474ad9b38f3f0f0b6c8e18768d424f6b51eb8
soegaard/metapict
example-graph.rkt
#lang racket use at least 512Mb memory limit for this file (require racket/draw) ;;; This draws simple graphs. ;;; Use the plot library for more advanced graphs. (provide graph ; draw the graph of a function ) (require metapict ) (define graph-join --) (define (graph f [xmin #f] [xmax #f] #:samples [...
null
https://raw.githubusercontent.com/soegaard/metapict/47ae265f73cbb92ff3e7bdd61e49f4af17597fdf/metapict/examples/example-graph.rkt
racket
This draws simple graphs. Use the plot library for more advanced graphs. draw the graph of a function x -> (x,f(x)) vector along tangent x -> (x,f(x)) vector along tangent -basics/ draw parabola and sine - fill the area between them "examples/pdf-experiment.rkt" (save-pict-as-pdf p "parabola.pdf")
#lang racket use at least 512Mb memory limit for this file (require racket/draw) ) (require metapict ) (define graph-join --) (define (graph f [xmin #f] [xmax #f] #:samples [n 50] #:diff [df/dx #f]) (defm (window Xmin Xmax Ymin Ymax) (curve-pict-window)) (unless xmin (set! xmin Xmin)) (unless xm...
fff9017dad5464d67167011572f3180d09b5714425663f80ce8688047f656999
2600hz/kazoo
pqc_cb_ips.erl
%%%----------------------------------------------------------------------------- ( C ) 2010 - 2020 , 2600Hz %%% @doc @author %%% This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %%% %%% ...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_proper/src/pqc_cb_ips.erl
erlang
----------------------------------------------------------------------------- @doc @end ----------------------------------------------------------------------------- Helpers
( C ) 2010 - 2020 , 2600Hz @author This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(pqc_cb_ips). -behaviour(proper_statem). -export([command/1 ,initial_state/0 ,...
4224a4c010559e9e32c58d05b91d3d1cbdd9f6bdd87c722bead4c89f8b6034f0
deadpendency/deadpendency
CheckRunHandler.hs
# LANGUAGE DataKinds # module FD.Handler.CheckRunHandler ( checkRunHandler, CheckRunRoute, ) where import Common.Effect.AppEventEmit.AppEventEmit import Common.Effect.AppEventEmit.Model.AppEventMessage (AppEventMessage (..)) import Common.Effect.PublishSimpleResult.Model.SimpleResult import Common.Effect.Publ...
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/front-door/src/FD/Handler/CheckRunHandler.hs
haskell
# LANGUAGE DataKinds # module FD.Handler.CheckRunHandler ( checkRunHandler, CheckRunRoute, ) where import Common.Effect.AppEventEmit.AppEventEmit import Common.Effect.AppEventEmit.Model.AppEventMessage (AppEventMessage (..)) import Common.Effect.PublishSimpleResult.Model.SimpleResult import Common.Effect.Publ...
d986ab197f8a3ee3f526e6df596f102026dc24cb2bc16c558d0c9b4a3f4fdfe8
SimulaVR/godot-haskell
UPNPDevice.hs
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.UPNPDevice (Godot.Core.UPNPDevice._IGD_STATUS_INVALI...
null
https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/UPNPDevice.hs
haskell
# NOINLINE bindUPNPDevice_get_igd_service_type # # NOINLINE bindUPNPDevice_query_external_address # # NOINLINE bindUPNPDevice_set_igd_service_type # # NOINLINE bindUPNPDevice_set_service_type #
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.UPNPDevice (Godot.Core.UPNPDevice._IGD_STATUS_INVALI...
facc8038bc0a4865511affaa1a11161b81935ca6445e593a3e7b83f0fbc8dea3
metaocaml/ber-metaocaml
placement.ml
(* TEST * expect *) (*****************************************************) (* Restrict where "exception P" patterns can appear. *) (*****************************************************) (* should be accepted *) let f x = match x () with | _ -> () | exception _ -> () ;; [%%expect{| val f : (unit -> 'a) ->...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/match-exception-warnings/placement.ml
ocaml
TEST * expect *************************************************** Restrict where "exception P" patterns can appear. *************************************************** should be accepted should be rejected
let f x = match x () with | _ -> () | exception _ -> () ;; [%%expect{| val f : (unit -> 'a) -> unit = <fun> |}] ;; let f x = match x () with | _ | exception _ -> () ;; [%%expect{| val f : (unit -> 'a) -> unit = <fun> |}] ;; let f x = match x () with | Arg.(Set _ | exception Bad _) -> () | _ -> ()...
d8d220b2cde3b10e733e19268dbec79190db1d6ebe7f7ad7f0aeb109c1d965b0
huangz1990/SICP-answers
test-p16-sqrt.scm
(load "test-manager/load.scm") (load "p16-sqrt.scm") (define-each-check (= 3 (truncate (sqrt 9))) (= 5 (truncate (sqrt 25))) ) (run-registered-tests)
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp1/code/test-p16-sqrt.scm
scheme
(load "test-manager/load.scm") (load "p16-sqrt.scm") (define-each-check (= 3 (truncate (sqrt 9))) (= 5 (truncate (sqrt 25))) ) (run-registered-tests)
8586336f0fa1fe07d51f81a9ea68b3d719df36622469887384dd1beda8ade4f3
ghc/testsuite
Instances.hs
# LANGUAGE TemplateHaskell , FlexibleInstances , MultiParamTypeClasses , UndecidableInstances , OverlappingInstances , CPP # UndecidableInstances, OverlappingInstances, CPP #-} # OPTIONS_GHC -fno - warn - orphans # -- This is a module full of orphans, so don't warn about them module T17...
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_run/T1735_Help/Instances.hs
haskell
This is a module full of orphans, so don't warn about them
# LANGUAGE TemplateHaskell , FlexibleInstances , MultiParamTypeClasses , UndecidableInstances , OverlappingInstances , CPP # UndecidableInstances, OverlappingInstances, CPP #-} # OPTIONS_GHC -fno - warn - orphans # module T1735_Help.Instances () where import T1735_Help.Basics import ...
1372d0208aea9824a4672627f7109a18a6d65902511953ab6711563959106d1b
saidone75/wa-tor
logic.cljs
Copyright ( c ) 2020 - 2022 Saidone (ns wa-tor.logic) ;; local board work copy (def board (atom (array-map))) ;; plain map, set on next-chronon function (def state {}) normally distributed random int using Box – Muller transform (defn- normal-random-int [] (Math/round (* (Math/cos (* 2 Math/PI (rand))) ...
null
https://raw.githubusercontent.com/saidone75/wa-tor/6c092ac0dd093d9681fe4d21a6fdf69637d92d74/src/wa_tor/logic.cljs
clojure
local board work copy plain map, set on next-chronon function add randomness to threshold calculate vector of neighbours for seq index n take n fish take n sharks, avoiding squares already occupied random age between 0 and fbreed random age between 0 and sbreed, random starve between 0 and starve retrieve shar...
Copyright ( c ) 2020 - 2022 Saidone (ns wa-tor.logic) (def board (atom (array-map))) (def state {}) normally distributed random int using Box – Muller transform (defn- normal-random-int [] (Math/round (* (Math/cos (* 2 Math/PI (rand))) (Math/sqrt (* -2 (Math/log (rand))))))) (defn- randomize [threshold...
820ad660dbccdcecbb1e718f4aafe6cec30f665ba37f52e4c835ca277dfa77d6
borkdude/advent-of-cljc
dfuenzalida.cljc
(ns aoc.y2018.d04.dfuenzalida (:refer-clojure :exclude [read-string format]) (:require [aoc.utils :as u :refer [deftest read-string format]] [aoc.y2018.d04.data :refer [input answer-1 answer-2]] [clojure.string :as s] [clojure.test :refer [is testing]])) (defn process-input [input] (->> input ...
null
https://raw.githubusercontent.com/borkdude/advent-of-cljc/17c8abb876b95ab01eee418f1da2e402e845c596/src/aoc/y2018/d04/dfuenzalida.cljc
clojure
find the guard that sleeps the most
(ns aoc.y2018.d04.dfuenzalida (:refer-clojure :exclude [read-string format]) (:require [aoc.utils :as u :refer [deftest read-string format]] [aoc.y2018.d04.data :refer [input answer-1 answer-2]] [clojure.string :as s] [clojure.test :refer [is testing]])) (defn process-input [input] (->> input ...
dd50d28e6a16b9e76c3ccc165f66f28376243491bd15802af7b14245aca00e27
xavi/mongologic
project.clj
(defproject mongologic "0.6.0" :description "Toolkit to develop MongoDB apps with Clojure" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.10.1"] [congomongo "1.1.0"] [clj-time "0.15.2"] [com...
null
https://raw.githubusercontent.com/xavi/mongologic/23bf287f377d0fe89160ecbcc712ae2cc4dbf549/project.clj
clojure
(defproject mongologic "0.6.0" :description "Toolkit to develop MongoDB apps with Clojure" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.10.1"] [congomongo "1.1.0"] [clj-time "0.15.2"] [com...
9fb7acbddb67ee9f86544adb717650d5074819b0484f517af644d11733b3db27
Zilliqa/scilla
Secp256k1Wrapper.ml
This file is part of scilla . Copyright ( c ) 2018 - present Zilliqa Research Pvt . Ltd. scilla is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at you...
null
https://raw.githubusercontent.com/Zilliqa/scilla/011323ac5da48ee16890b71424e057ffbc4216da/src/base/Secp256k1Wrapper.ml
ocaml
Hash the message and return result raw string raw byte string -> buffer buffer -> raw byte string
This file is part of scilla . Copyright ( c ) 2018 - present Zilliqa Research Pvt . Ltd. scilla is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at you...
a1a44e5bb4da9f9d7e8f5a675d09ccad0e6e2049436d74e9d81df017dd33c76e
nikita-volkov/rerebase
Writer.hs
module Control.Monad.Writer ( module Rebase.Control.Monad.Writer ) where import Rebase.Control.Monad.Writer
null
https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Control/Monad/Writer.hs
haskell
module Control.Monad.Writer ( module Rebase.Control.Monad.Writer ) where import Rebase.Control.Monad.Writer
efbbe78f0b671cdf2199da4fe6fd3d12a275e8aec60d495bb400fb9a76b529d5
RyanHope/ACT-R
paired.lisp
(defvar *response* nil) (defvar *response-time* nil) (defvar *model-doing-task* nil) (defvar *pairs* '(("bank" "0") ("card" "1") ("dart" "2") ("face" "3") ("game" "4") ("hand" "5") ("jack" "6") ("king" "7") ("lamb" "8") ("mask" "9") ("neck" "0") ("pipe" "1") ("quip" "2") ("rope" "3"...
null
https://raw.githubusercontent.com/RyanHope/ACT-R/c65f3fe7057da0476281ad869c7963c84c0ad735/tutorial/unit4/paired.lisp
lisp
return the list of scores
(defvar *response* nil) (defvar *response-time* nil) (defvar *model-doing-task* nil) (defvar *pairs* '(("bank" "0") ("card" "1") ("dart" "2") ("face" "3") ("game" "4") ("hand" "5") ("jack" "6") ("king" "7") ("lamb" "8") ("mask" "9") ("neck" "0") ("pipe" "1") ("quip" "2") ("rope" "3"...
d4214cc3b08fcc828df44fdae4dfa886abc6c11c0de774ca237de7371f5e02cb
2nishantg/hScraper
Tidy.hs
{- | Module for tidying Malformed html using libtidy(see README). -} module HScraper.Tidy ( tidy ) where import Data.Text as T import Data.Text.IO as TIO import System.Process import System.Directory(getCurrentDirectory) -- | Takes Malformed html and reuturns correct html if it can -- be corrected. Output is emp...
null
https://raw.githubusercontent.com/2nishantg/hScraper/d2cb0d8ee4a9729fecc06701b76c03d763e49d44/HScraper/Tidy.hs
haskell
| Module for tidying Malformed html using libtidy(see README). | Takes Malformed html and reuturns correct html if it can be corrected. Output is empty if it cannot be corrected.
module HScraper.Tidy ( tidy ) where import Data.Text as T import Data.Text.IO as TIO import System.Process import System.Directory(getCurrentDirectory) tidy :: T.Text -> IO T.Text tidy t = do pwd <- System.Directory.getCurrentDirectory let tempFile = pwd ++ "/hscraper_temp.html" let tempLogFile = pwd ++ "...
53cf362045f0e81d4b0cf22aad3a3b74a4c2da1050663cddef7512062d7858f0
okeuday/key2value
key2value.erl
-*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*- ex : set utf-8 sts=4 ts=4 sw=4 et nomod : %%% %%%------------------------------------------------------------------------ %%% @doc = = Maintain 2 lookups for 2 separate keys and 1 value . %%% The interface creates ...
null
https://raw.githubusercontent.com/okeuday/key2value/c44ee91101f19b400b1b715515cc922832f7384c/src/key2value.erl
erlang
------------------------------------------------------------------------ @doc The interface creates a bidirectional lookup where key1 can store The supplied data structure module must have dict interface functions (unless the module is maps). @end Permission is hereby granted, free of charge, to any person ob...
-*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*- ex : set utf-8 sts=4 ts=4 sw=4 et nomod : = = Maintain 2 lookups for 2 separate keys and 1 value . multiple key2 associations to the same value . MIT License Copyright ( c ) 2011 - 2020 < mjtruog at protonm...
7c99fdd5c4e9ee01ad0f57a207214e1112e6c86b72dcef614d51aca3035a738e
kupl/LearnML
patch.ml
let rec max (lst : int list) : int = let rec fold (action : int -> int -> int) (l : int list) (a : int) : int = match l with | [] -> a | [ __s9 ] -> __s9 | hd :: tl -> action hd (fold action tl a) in let max (a : int) (b : int) : int = if a > b then a else b in fold max lst 0
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/max/sub37/patch.ml
ocaml
let rec max (lst : int list) : int = let rec fold (action : int -> int -> int) (l : int list) (a : int) : int = match l with | [] -> a | [ __s9 ] -> __s9 | hd :: tl -> action hd (fold action tl a) in let max (a : int) (b : int) : int = if a > b then a else b in fold max lst 0
c8be18a2e32ade153f143a72a667de6f0a141c789e1bcff4595518a0cd872c8f
facebook/infer
Stats.mli
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/facebook/infer/b1284587e56d95c81ebdd856894563c335fffa83/infer/src/base/Stats.mli
ocaml
* collect statistics about backend/analysis operations * a query to the filesystem attempting to load a summary file * a summary file is deserialized from disk * reset all stats * get the stats so far
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
5c8de27140e95cf9091bdae0be756bd1c3db52d87e146f4b9c236fdde2845f5f
Clozure/ccl
ppc-symbol.lisp
-*- Mode : Lisp ; Package : CCL -*- ;;; Copyright 1994 - 2009 Clozure Associates ;;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;;; you may not use this file except in compliance with the License. ;;; You may obtain a copy of the License at ;;; ;;; -2.0 ;;; ;;; Unless required by appl...
null
https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/level-0/PPC/ppc-symbol.lisp
lisp
Package : CCL -*- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific la...
Copyright 1994 - 2009 Clozure Associates distributed under the License is distributed on an " AS IS " BASIS , (in-package "CCL") (eval-when (:compile-toplevel :execute) #+ppc32-target (require "PPC32-ARCH") #+ppc64-target (require "PPC64-ARCH") (require "PPC-LAPMACROS")) #+ppc32-target (defppclapfuncti...
b1a51dd1faa4eca2d14c527baf8f4277d68b144ed23dcf55891de3c43fe8a70d
ErlyORM/boss_db
boss_compiler_test.erl
-module(boss_compiler_test). -include_lib("proper/include/proper.hrl"). -include_lib("eunit/include/eunit.hrl"). -type special_chars() :: 8800|8804|8805|8712|8713|8715|8716|8764|8769|8839|8841|9745|8869|10178|8745. -define(TMODULE, boss_compiler). -define(TEST(Name, Function, Arity), Name() -> ?...
null
https://raw.githubusercontent.com/ErlyORM/boss_db/20060a061d3c4120929e4a4fedae1bb5e5830426/test/boss_compiler_test.erl
erlang
make_forms_by_version_test() -> ?assert(proper:check_spec({boss_compiler, make_forms_by_version,2}, [{to_file, user}])), ok. scan_transform_test() -> [{to_file, user}])), ok.
-module(boss_compiler_test). -include_lib("proper/include/proper.hrl"). -include_lib("eunit/include/eunit.hrl"). -type special_chars() :: 8800|8804|8805|8712|8713|8715|8716|8764|8769|8839|8841|9745|8869|10178|8745. -define(TMODULE, boss_compiler). -define(TEST(Name, Function, Arity), Name() -> ?...
c99c900b3d6088fc714f56b9decf8f82b32d464a58f872063594a479c0beaf9c
mitchellwrosen/planet-mitchell
Monad.hs
module Alg.Monad ( -- * Monad Monad((>>=), return) , (=<<) , (>=>) , (<=<) , (<$!>) , join , loopM , unlessM , whenJustM , whenM , whileM -- ** Newtypes , Kleisli(..) ) where import Control.Arrow (Kleisli(Kleisli, runKleisli)) import Control.Monad (Monad(return, (>>=)), jo...
null
https://raw.githubusercontent.com/mitchellwrosen/planet-mitchell/18dd83204e70fffcd23fe12dd3a80f70b7fa409b/planet-mitchell/src/Alg/Monad.hs
haskell
* Monad ** Newtypes
module Alg.Monad Monad((>>=), return) , (=<<) , (>=>) , (<=<) , (<$!>) , join , loopM , unlessM , whenJustM , whenM , whileM , Kleisli(..) ) where import Control.Arrow (Kleisli(Kleisli, runKleisli)) import Control.Monad (Monad(return, (>>=)), join, (<$!>), (<=<), (=<<), ...
77153c41813bebf7c9cc039ca472c4951daaaf43370142150ac241854e564224
Fresheyeball/Shpadoinkle
Remote.hs
# LANGUAGE CPP # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveTraversable #-} module Shpadoinkle.Widgets.Types.Remote where import Control.Applicative import Data.Aeson (FromJSON, ToJSON) import GHC.Generics import ...
null
https://raw.githubusercontent.com/Fresheyeball/Shpadoinkle/8e0efbb11857a1af47038dae07b8140291c251ed/widgets/Shpadoinkle/Widgets/Types/Remote.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE DeriveTraversable #
# LANGUAGE CPP # # LANGUAGE DeriveGeneric # module Shpadoinkle.Widgets.Types.Remote where import Control.Applicative import Data.Aeson (FromJSON, ToJSON) import GHC.Generics import Shpadoinkle (NFData) #ifdef TESTING import Test....
6000a6bf5b1ff06be48de335a76e5a7e179c889f9c5506280eb8593ca52b21e8
c-cube/ocaml-containers
CCHet.ml
(* This file is free software, part of containers. See file "license" for more details. *) * { 1 Associative containers with Heterogenerous Values } type 'a iter = ('a -> unit) -> unit type 'a gen = unit -> 'a option module type KEY_IMPL = sig type t exception Store of t val id : int end module Key = struct...
null
https://raw.githubusercontent.com/c-cube/ocaml-containers/d4e582e82991b88ff48f3d7d5a9c86517543ccc9/src/data/CCHet.ml
ocaml
This file is free software, part of containers. See file "license" for more details.
* { 1 Associative containers with Heterogenerous Values } type 'a iter = ('a -> unit) -> unit type 'a gen = unit -> 'a option module type KEY_IMPL = sig type t exception Store of t val id : int end module Key = struct type 'a t = (module KEY_IMPL with type t = 'a) let _n = ref 0 let create (type k) ...
d50c30408e14c1db90ad4cd62b13082d2557f004b5b99eb97701dec8c0ba86c4
aztek/tptp
Normalizers.hs
# LANGUAGE LambdaCase # -- | -- Module : Normalizers -- Description : Normalization of the Data.TPTP datatypes. Copyright : ( c ) , 2019 - 2021 -- License : GPL-3 Maintainer : -- Stability : experimental -- -- Provides functions that make applications of associative logical connectives -- ...
null
https://raw.githubusercontent.com/aztek/tptp/7b850b5680debcf2f9245a328102c4aadcb6da2c/test/QuickCheckSpec/Normalizers.hs
haskell
| Module : Normalizers Description : Normalization of the Data.TPTP datatypes. License : GPL-3 Stability : experimental Provides functions that make applications of associative logical connectives left-associative. These functions are needed for testing in the 'Main' module | 'reassociate' make...
# LANGUAGE LambdaCase # Copyright : ( c ) , 2019 - 2021 Maintainer : module Normalizers ( reassociate, normalizeType, normalizeUnit, normalizeTPTP, normalizeTSTP, normalizeSource, normalizeInfo, normalizeParent ) where import Data.Bifunctor (bimap) import Data.TPTP * First - order ...
8afb02a69c3220ebb4df3a338dfd929ac68bae4ed7773cd7989c9f15f0c3ce47
hasktorch/hasktorch
TestFunctions.hs
# LANGUAGE DeriveGeneric # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # module TestFunctions where import GHC.Generics import Torch.Autograd import Torch.Functional import Torch.NN hiding (sgd) import Torch.Tensor import Torch.TensorFactories (eye', ones', randIO', randnIO', zeros') import Prelude ...
null
https://raw.githubusercontent.com/hasktorch/hasktorch/8fa4d2a6cdb7f144484f7d24d8d4924fb0faecd2/examples/optimizers-cpp/TestFunctions.hs
haskell
Convex Quadratic
# LANGUAGE DeriveGeneric # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # module TestFunctions where import GHC.Generics import Torch.Autograd import Torch.Functional import Torch.NN hiding (sgd) import Torch.Tensor import Torch.TensorFactories (eye', ones', randIO', randnIO', zeros') import Prelude ...
a6e10ad16b34040b8720c7d5c548cc6bf2150566b52706eb4c70de4df88fbdb2
cryptosense/pkcs11
p11_session_info.mli
type t = { slotID : P11_ulong.t ; state : P11_ulong.t ; flags : P11_flags.t ; ulDeviceError : P11_ulong.t } [@@deriving eq, ord, show, yojson] val to_string : ?newlines:bool -> ?indent:string -> t -> string val to_strings : t -> string list
null
https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/lib/p11_session_info.mli
ocaml
type t = { slotID : P11_ulong.t ; state : P11_ulong.t ; flags : P11_flags.t ; ulDeviceError : P11_ulong.t } [@@deriving eq, ord, show, yojson] val to_string : ?newlines:bool -> ?indent:string -> t -> string val to_strings : t -> string list
23ab77a2d5e3d174390246ef5ba3b69b9dfa332eaa2445b85bd3cc26bc5b7f90
fendor/hsimport
ModuleTest37.hs
{-# Language PatternGuards #-} module Blub ( blub , foo , bar ) where #include "Foo.h" #ifdef FOO import Control.Applicative #endif import Control.BiFunctor f :: Int -> Int ^ Some doc One line more f = (+ 3) g :: Int -> Int g = where
null
https://raw.githubusercontent.com/fendor/hsimport/9be9918b06545cfd7282e4db08c2b88f1d8162cd/tests/inputFiles/ModuleTest37.hs
haskell
# Language PatternGuards #
module Blub ( blub , foo , bar ) where #include "Foo.h" #ifdef FOO import Control.Applicative #endif import Control.BiFunctor f :: Int -> Int ^ Some doc One line more f = (+ 3) g :: Int -> Int g = where
83c79328484789aae3cc725a9a2377d1d1ecca4150551c4ae00c58df66778a26
brendanzab/language-garden
CantorSet.mli
* Cantor ’s fractal set (** Alphabet of symbols for this system *) type symbol include FractalGrowth.LSystem.Grammar with type symbol := symbol (** @open *) (** {1 String interpretation} *) (** Convert a symbol to a string *) val string_of_symbol : symbol -> string (** Convert a word to a string *) val string...
null
https://raw.githubusercontent.com/brendanzab/language-garden/4d9c8b4c7a178f5001c5394bfd188baa72420db2/lang-fractal-growth/examples/CantorSet.mli
ocaml
* Alphabet of symbols for this system * @open * {1 String interpretation} * Convert a symbol to a string * Convert a word to a string
* Cantor ’s fractal set type symbol include FractalGrowth.LSystem.Grammar with type symbol := symbol val string_of_symbol : symbol -> string val string_of_word : symbol list -> string
c3af1ae0021ed71ff04d259b8109a504fb3176a929786f238a4fe6fee076ea76
alios/clearingstelle
Clearingstelle.hs
# LANGUAGE TemplateHaskell , QuasiQuotes , OverloadedStrings # module Handler.Clearingstelle (getCheckoutR, postCheckoutR ,getCreateKeysetR, postCreateKeysetR ,getCleanupR, postCleanupR ,getCompleteR ,getDeactivateR, post...
null
https://raw.githubusercontent.com/alios/clearingstelle/bdd8183e1fc65df014545255856a4f516687fc32/Handler/Clearingstelle.hs
haskell
# LANGUAGE TemplateHaskell , QuasiQuotes , OverloadedStrings # module Handler.Clearingstelle (getCheckoutR, postCheckoutR ,getCreateKeysetR, postCreateKeysetR ,getCleanupR, postCleanupR ,getCompleteR ,getDeactivateR, post...
ab214ae5f77c81be933cdfb36e2759e7975c65b949152da6b4855dfdb09c79f5
triffon/fp-2019-20
solutions.rkt
#lang racket ; count-digits (define (count-digits n) (if (< n 10) 1 (+ 1 (count-digits (quotient n 10))))) ; pow (define (pow x n) (if (zero? n) 1 (* x (pow x (- n 1))))) ; interval-sum (define (interval-sum a b) (if (= a b) b (+ a (interval-sum (+ a 1) b)))) ; count-digits-i (define (...
null
https://raw.githubusercontent.com/triffon/fp-2019-20/7efb13ff4de3ea13baa2c5c59eb57341fac15641/exercises/computer-science-4/02/solutions.rkt
racket
count-digits pow interval-sum count-digits-i interval-sum-i reverse-digits-i pow-i fast-pow
#lang racket (define (count-digits n) (if (< n 10) 1 (+ 1 (count-digits (quotient n 10))))) (define (pow x n) (if (zero? n) 1 (* x (pow x (- n 1))))) (define (interval-sum a b) (if (= a b) b (+ a (interval-sum (+ a 1) b)))) (define (count-digits-i n) (define (iter counter number) ...
82e30a84c666674dcbcc6da4105a033ada9637d78cc1d201a22dd49555967a43
ghcjs/ghcjs
t5113.hs
# LANGUAGE BangPatterns , FlexibleContexts # module Main where import Data.Array.Base (unsafeRead, unsafeWrite) import Data.Array.ST import Data.Array.Unboxed import Control.Monad.ST main = print (divisorCounts 1000000 ! 342) isqrt :: Int -> Int isqrt n = floor (sqrt $ fromIntegral n) divisorCounts :: Int -> UArray...
null
https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/perf/t5113.hs
haskell
# LANGUAGE BangPatterns , FlexibleContexts # module Main where import Data.Array.Base (unsafeRead, unsafeWrite) import Data.Array.ST import Data.Array.Unboxed import Control.Monad.ST main = print (divisorCounts 1000000 ! 342) isqrt :: Int -> Int isqrt n = floor (sqrt $ fromIntegral n) divisorCounts :: Int -> UArray...
f9d361aec7c95314bdf28d72ece8ae8680ac0382d80a5e5fb765bfbd74155ba3
privet-kitty/cl-competitive
mod-polynomial.lisp
(defpackage :cp/mod-polynomial (:use :cl :cp/mod-inverse) (:export #:poly-value #:poly-mult #:poly-floor! #:poly-mod! #:poly-div #:poly-div! #:poly-mod-power #:poly-differentiate! #:poly-integrate #:poly-shift! #:poly-scale!) (:documentation "Provides fundamental operations to polynomials ov...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/4a48eeb2cc6353af2a21e31aa063f72e2b186d05/module/mod-polynomial.lisp
lisp
TODO: make another modules for non-modular polynomials, or introduce some abstraction to integrate it 0 <= i <= deg1, 0 <= j <= deg2 Reference: /~cs577/handouts/polydivide.pdf m := deg(p1), n := deg(p2)
(defpackage :cp/mod-polynomial (:use :cl :cp/mod-inverse) (:export #:poly-value #:poly-mult #:poly-floor! #:poly-mod! #:poly-div #:poly-div! #:poly-mod-power #:poly-differentiate! #:poly-integrate #:poly-shift! #:poly-scale!) (:documentation "Provides fundamental operations to polynomials ov...
9edf919db5552d2f4ffbf669371de4b486a6813ad97f765e30ed41a622ff5c2a
ngless-toolkit/ngless
Bench.hs
Copyright 2016 - 2019 - Licence : MIT - Licence: MIT -} import Criterion.Main import qualified Data.Vector as V import qualified Data.Conduit.List as CL import qualified Data.Conduit.Binary as CB import Data.Conduit.Algorithms.Async (conduitPossiblyCompressedFile) import qualified Data.Conduit.Combina...
null
https://raw.githubusercontent.com/ngless-toolkit/ngless/445fd6ae8e4b945283bd8ec1c4cf94b43ea4ac1e/Execs/Bench.hs
haskell
Copyright 2016 - 2019 - Licence : MIT - Licence: MIT -} import Criterion.Main import qualified Data.Vector as V import qualified Data.Conduit.List as CL import qualified Data.Conduit.Binary as CB import Data.Conduit.Algorithms.Async (conduitPossiblyCompressedFile) import qualified Data.Conduit.Combina...
115a02083e563eae8430fa0ed6376e4a1100d20af00d0ed3a603ae16e10911a3
ocurrent/ocaml-docs-ci
opam_repository.ml
open Lwt.Infix module Log = Solver_api.Solver.Log module Store = Git_unix.Store let clone_path = "opam-repository" let open_store () = let path = Fpath.v clone_path in Git_unix.Store.v ~dotgit:path path >|= function | Ok x -> x | Error e -> Fmt.failwith "Failed to open opam-repository: %a" Store.pp_error e l...
null
https://raw.githubusercontent.com/ocurrent/ocaml-docs-ci/df08e7aa0e467d106edf1c3d2c58bbedd41ff9b5/src/solver/opam_repository.ml
ocaml
open Lwt.Infix module Log = Solver_api.Solver.Log module Store = Git_unix.Store let clone_path = "opam-repository" let open_store () = let path = Fpath.v clone_path in Git_unix.Store.v ~dotgit:path path >|= function | Ok x -> x | Error e -> Fmt.failwith "Failed to open opam-repository: %a" Store.pp_error e l...
2e665874bcf43dcb953248e9523bf2f70b15fd2301f17454f648d676be899de0
GNOME/aisleriot
spider-three-decks.scm
; AisleRiot - spider_three_decks.scm Copyright ( C ) 2005 < > ; ; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ; (at your option) any later version. ;...
null
https://raw.githubusercontent.com/GNOME/aisleriot/5ab7f90d8a196f1fcfe5a552cef4a4c1a4b5ac39/games/spider-three-decks.scm
scheme
AisleRiot - spider_three_decks.scm This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR P...
Copyright ( C ) 2005 < > it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License (use-modules (aisleriot interface) (aisleriot api)) (primitive-load-path "spide...
56084df287038e825c08e86740a11e66e332c0359030c9765e0d8a0e3a3cf28a
nasa/Common-Metadata-Repository
route.clj
(ns cmr.graph.rest.route (:require [cmr.graph.components.config :as config] [cmr.graph.components.neo4j :as neo4j] [cmr.graph.health :as health] [cmr.graph.rest.handler :as handler] [reitit.ring :as ring] [taoensso.timbre :as log])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/63001cf021d32d61030b1dcadd8b253e4a221662/other/cmr-exchange/graph/src/cmr/graph/rest/route.clj
clojure
CMR Graph Database Routes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; TBD Demo Routes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Static Routes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Adm...
(ns cmr.graph.rest.route (:require [cmr.graph.components.config :as config] [cmr.graph.components.neo4j :as neo4j] [cmr.graph.health :as health] [cmr.graph.rest.handler :as handler] [reitit.ring :as ring] [taoensso.timbre :as log])) (defn collections [httpd-component] (let [conn (neo4j/get-con...
e60b8b5ec39fd2ac3aebcc3deccee6d823a26fdaad040a8449cae6852cf9f21a
haroldcarr/learn-haskell-coq-ml-etc
FP04PatMat.hs
Created : 2013 Oct 07 ( Mon ) 14:41:15 by . Last Modified : 2014 Mar 05 ( We d ) by . Created : 2013 Oct 07 (Mon) 14:41:15 by carr. Last Modified : 2014 Mar 05 (Wed) 16:21:12 by Harold Carr. -} module FP04PatMat where import Data.List (find) data CodeTree = -- left right ...
null
https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/course/2013-11-coursera-fp-odersky-but-in-haskell/FP04PatMat.hs
haskell
left right chars weight char weight [Leaf] End of file.
Created : 2013 Oct 07 ( Mon ) 14:41:15 by . Last Modified : 2014 Mar 05 ( We d ) by . Created : 2013 Oct 07 (Mon) 14:41:15 by carr. Last Modified : 2014 Mar 05 (Wed) 16:21:12 by Harold Carr. -} module FP04PatMat where import Data.List (find) data CodeTree = Fork CodeTree CodeTr...
fb3e16bf692cf694926982c3de98012722925184655ff08127ab332b4cc8ccda
2600hz/kazoo
kapi_leader.erl
%%%----------------------------------------------------------------------------- ( C ) 2010 - 2020 , 2600Hz %%% @doc This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %%% %%% @end %%%--------...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_amqp/src/api/kapi_leader.erl
erlang
----------------------------------------------------------------------------- @doc @end ----------------------------------------------------------------------------- ------------------------------------------------------------------------------ @doc Get all API definitions of this module. @end --------------------...
( C ) 2010 - 2020 , 2600Hz This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(kapi_leader). -export([api_definitions/0, api_definition/1]). -export([whoami/0, whoami/1]). -export([qu...
43e27796ded35161de4e06a17d43e7b4a0185418f1e7d8cdc2de4b68f6c85609
fp-works/2019-winter-Haskell-school
AParserSpec.hs
module AParserSpec where import AParser import Control.Applicative (empty, liftA2, liftA3, (<|>)) import Data.Char (ord, toUpper) import Test.Hspec join3Chars :: Char -> Char -> Char -> [Char] join3Chars c1 c2 c3 = [c1, c2, c3] spec :: Spec spec = do describe "ex1"...
null
https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week10/zehua/test/AParserSpec.hs
haskell
module AParserSpec where import AParser import Control.Applicative (empty, liftA2, liftA3, (<|>)) import Data.Char (ord, toUpper) import Test.Hspec join3Chars :: Char -> Char -> Char -> [Char] join3Chars c1 c2 c3 = [c1, c2, c3] spec :: Spec spec = do describe "ex1"...
3872e65b98a3523e49143d3d5e1d379e34fc1d0c622e32f4e62b35e1444c311c
ocaml-sf/learn-ocaml-corpus
solution.ml
let is_empty s = s.length = 0 let empty = let length = 0 and get _ = raise OutOfBounds and foreach _k = () in { length; get; foreach } let singleton x = let length = 1 and get i = if i = 0 then x else raise OutOfBounds and foreach k = k x in { length; get; foreach } let sum s1 s2 = let length = ...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/symbolic_sequences_objects/solution.ml
ocaml
Such a division could occur on an out-of-bounds access.
let is_empty s = s.length = 0 let empty = let length = 0 and get _ = raise OutOfBounds and foreach _k = () in { length; get; foreach } let singleton x = let length = 1 and get i = if i = 0 then x else raise OutOfBounds and foreach k = k x in { length; get; foreach } let sum s1 s2 = let length = ...
d3a5858963385120fa752182efa715ad6f9d118c8206da8be941b9650be55cc3
donut-party/system
subsystem.clj
(ns donut.examples.subsystem (:require [donut.system :as ds])) (defn mk-print-thread [prefix stack] (doto (Thread. (fn [] (prn prefix (peek @stack)) (swap! stack pop) (Thread/sleep 1000) (recur))) (.start))) (defn print-worker-system [print-prefix] {:...
null
https://raw.githubusercontent.com/donut-party/system/ce1ca6b7f8342e478d0a436014cbb4fd140908fe/dev/donut/examples/subsystem.clj
clojure
(ns donut.examples.subsystem (:require [donut.system :as ds])) (defn mk-print-thread [prefix stack] (doto (Thread. (fn [] (prn prefix (peek @stack)) (swap! stack pop) (Thread/sleep 1000) (recur))) (.start))) (defn print-worker-system [print-prefix] {:...
6d9f613253c74837f29eb52366dc69da8c2fa915a8d938ef59e852eed1f51572
fpco/ide-backend
A.hs
module Main where import B main :: IO () main = B.b >> 42
null
https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/TestSuite/inputs/AerrorB/A.hs
haskell
module Main where import B main :: IO () main = B.b >> 42
02b7d12db87e5342086c09a93c350afd9b12a96fa45f05974ce43c80e2bc2d5a
dixel/kafkus
utils.cljs
(ns kafkus.utils (:require [taoensso.timbre :as log])) (defn ->json [data] (.stringify js/JSON (clj->js data) nil 2)) (defn json->clj [data] (js->clj (js/JSON.parse data) :keywordize-keys true)) (defn pretty-json [raw-json] (try (.stringify js/JSON (.parse js/JSON raw-json) nil 2) (catch :default e ...
null
https://raw.githubusercontent.com/dixel/kafkus/27d8f2a809f07a98645fffa9e3d2b612f7dd1991/src/cljs/kafkus/utils.cljs
clojure
(ns kafkus.utils (:require [taoensso.timbre :as log])) (defn ->json [data] (.stringify js/JSON (clj->js data) nil 2)) (defn json->clj [data] (js->clj (js/JSON.parse data) :keywordize-keys true)) (defn pretty-json [raw-json] (try (.stringify js/JSON (.parse js/JSON raw-json) nil 2) (catch :default e ...
e32c23b4ff3da517fa172b3e5a1e269d4412505c566711de865847e99495be0b
cmcl/franklyfrank
show.ml
module type SHOW = sig type t val show : t -> string end module ShowList (X : SHOW) : SHOW with type t = X.t list = struct type t = X.t list let show xs = String.concat "\n" (List.map X.show xs) ^ "\n" end
null
https://raw.githubusercontent.com/cmcl/franklyfrank/6cc1c4f7377ea2a907675ec0fae9ff32829cec83/util/show.ml
ocaml
module type SHOW = sig type t val show : t -> string end module ShowList (X : SHOW) : SHOW with type t = X.t list = struct type t = X.t list let show xs = String.concat "\n" (List.map X.show xs) ^ "\n" end
f1ceb9b25d8d64729583fb90d048049cb2ed9685a7509fd4d4a5e8c0cc18c731
ankushdas/Nomos
TokStream.mli
Interface for TokStream type 'a front = Cons of 'a * (unit -> 'a front) | Nil and 'a stream = unit -> 'a front val force : (unit -> 'a) -> 'a
null
https://raw.githubusercontent.com/ankushdas/Nomos/db678f3981e75a1b3310bb55f66009bb23430cb1/rast/TokStream.mli
ocaml
Interface for TokStream type 'a front = Cons of 'a * (unit -> 'a front) | Nil and 'a stream = unit -> 'a front val force : (unit -> 'a) -> 'a
7367253c55ffc049654b751d7ac26d2b112a709fb1f57c15b6958982b9ca1bb4
janestreet/memtrace_viewer_with_deps
pipe.ml
open Core_kernel open Import open Deferred_std module Stream = Async_stream let show_debug_messages = ref false let check_invariant = ref false module Flushed_result = struct type t = [ `Ok | `Reader_closed ] [@@deriving compare, sexp_of] let equal = [%compare.equal: t] let combine (l : t Deferr...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/async_kernel/src/pipe.ml
ocaml
[values_read] reflects whether values the consumer has read from the pipe have been sent downstream or if not, holds an ivar that is to be filled when they are. [downstream_flushed ()] returns when all prior values that the consumer has passed downstream have been flushed all the way down the chain...
open Core_kernel open Import open Deferred_std module Stream = Async_stream let show_debug_messages = ref false let check_invariant = ref false module Flushed_result = struct type t = [ `Ok | `Reader_closed ] [@@deriving compare, sexp_of] let equal = [%compare.equal: t] let combine (l : t Deferr...
6c1d03f911dd1571c79c357b254a12f9a3edd20b603beb04ba94c1bec5e563ba
unclebob/spacewar
core.cljc
(ns spacewar.core (:require [quil.core :as q #?@(:cljs [:include-macros true])] [quil.middleware :as m] [spacewar.ui.complex :as main-viewer] [spacewar.ui.view-frame :as view-frame] [spacewar.ui.protocols :as p] [spacewar.game-logic.config :as glc] ...
null
https://raw.githubusercontent.com/unclebob/spacewar/4f7dd35e746b24791ddb21698fb1501f684aa842/src/spacewar/core.cljc
clojure
{:pre [(valid-world? world)] :post [(valid-world? %)]}
(ns spacewar.core (:require [quil.core :as q #?@(:cljs [:include-macros true])] [quil.middleware :as m] [spacewar.ui.complex :as main-viewer] [spacewar.ui.view-frame :as view-frame] [spacewar.ui.protocols :as p] [spacewar.game-logic.config :as glc] ...
5e455c49455f8865de73a08fa214fcd57a94bbcc3cacf302f6c1c5e1afa4a233
tmattio/dream-cli
server.ml
module Custom_command = struct open Cmdliner let run () = print_endline "Hello World!"; 0 let info = Term.info "greet" ~doc:"Say hello!" ~exits:Term.default_exits let term = Term.(const run $ const ()) let cmd = term, info end let () = Dream_cli.run ~debug:true ~commands:[ Custom_command.cmd ] ...
null
https://raw.githubusercontent.com/tmattio/dream-cli/00a79c0993bbcb08f2b395e77a1a269134c63b62/example/server.ml
ocaml
module Custom_command = struct open Cmdliner let run () = print_endline "Hello World!"; 0 let info = Term.info "greet" ~doc:"Say hello!" ~exits:Term.default_exits let term = Term.(const run $ const ()) let cmd = term, info end let () = Dream_cli.run ~debug:true ~commands:[ Custom_command.cmd ] ...