_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
827314dddeebad43cbbde6d6db8163e68e7dcb2a6f1e57657b57868f64910123
zclj/test.check.insights
coverage.cljc
(ns test.check.insights.coverage) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Inverse normal cumulative distribution function ( same as QuickCheck ) ;; #L606 ;; Algorithm taken from ;; /~pjacklam/notes/invnorm/ Accurate to about one part in 10 ^ 9 . ;; The 'erf' package uses the same algorithm, but with an extra s...
null
https://raw.githubusercontent.com/zclj/test.check.insights/8a91b1c4094f74768ff79ee938b98f13f07f1c9a/src/test/check/insights/coverage.cljc
clojure
#L606 Algorithm taken from /~pjacklam/notes/invnorm/ The 'erf' package uses the same algorithm, but with an extra step to get a fully accurate result, which we skip because it requires the 'erfc' function. Coverage checks Reporting
(ns test.check.insights.coverage) Inverse normal cumulative distribution function ( same as QuickCheck ) Accurate to about one part in 10 ^ 9 . (def p-low 0.02425) (def p-high (- 1 p-low)) (def a1 -3.969683028665376e+01) (def a2 2.209460984245205e+02) (def a3 -2.759285104469687e+02) (def a4 1.38357751867269...
f45ce83a565a48c82a7720197a6ef18dd1c21bf1953864fab2cd9e9d69bcdb77
Incubaid/arakoon
log_extra.ml
Copyright ( 2010 - 2014 ) INCUBAID BVBA Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software distribut...
null
https://raw.githubusercontent.com/Incubaid/arakoon/43a8d0b26e4876ef91d9657149f105c7e57e0cb0/src/tools/log_extra.ml
ocaml
Copyright ( 2010 - 2014 ) INCUBAID BVBA Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software distribut...
32b30ffdc3d73153adaf672f9dab5cb5e37ceaccce0016eaa69b7b94ea04f366
tweag/ormolu
list-notation-3-out.hs
foo = reportSDoc "tc.cc" 30 $ sep $ do (prettyTCM q <+> " before compilation") : do map (prettyTCM . map unArg . clPats) cls foo = reportSDoc "tc.cc" 30 $ sep $ do (prettyTCM q <+> " before compilation") : do map (prettyTCM . map unArg . clPats) cls
null
https://raw.githubusercontent.com/tweag/ormolu/1f63136d047205f95b7d3c0f6aa34c34bb29ac7f/data/examples/declaration/value/function/list-notation-3-out.hs
haskell
foo = reportSDoc "tc.cc" 30 $ sep $ do (prettyTCM q <+> " before compilation") : do map (prettyTCM . map unArg . clPats) cls foo = reportSDoc "tc.cc" 30 $ sep $ do (prettyTCM q <+> " before compilation") : do map (prettyTCM . map unArg . clPats) cls
6fb28c0997160ea0923a868bfff9c15505f92215b7939c1ce32d9f971244208f
jfeser/castor
simple_tactics.ml
open Castor open Ast open Collections module A = Abslayout module Config = struct module type S = sig include Ops.Config.S end end module Make (Config : Config.S) = struct open Config open Ops.Make (Config) let row_store r = (* Relation has no free variables that are bound at runtime. *) if Is_...
null
https://raw.githubusercontent.com/jfeser/castor/e9f394e9c0984300f71dc77b5a457ae4e4faa226/eopt/simple_tactics.ml
ocaml
Relation has no free variables that are bound at runtime.
open Castor open Ast open Collections module A = Abslayout module Config = struct module type S = sig include Ops.Config.S end end module Make (Config : Config.S) = struct open Config open Ops.Make (Config) let row_store r = if Is_serializable.is_static ~params r then let scope = Fresh.name G...
c46056f874e579cd7a3849c0144c8bf2d6ca54061f90146d7e21ee82ebf62aa4
sionescu/iolib
gray-streams.lisp
;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- ;;; ;;; --- GRAY stream mixin. ;;; (in-package :iolib/common-lisp) (defclass trivial-gray-stream-mixin () ((%open :initform t))) (defmethod close ((s trivial-gray-stream-mixin) &key abort) (declare (ignore abort)) (prog1 (slot-value s '%open) (setf (slot-value...
null
https://raw.githubusercontent.com/sionescu/iolib/dac715c81db55704db623d8b2cfc399ebcf6175f/src/new-cl/gray-streams.lisp
lisp
-*- Mode: Lisp; indent-tabs-mode: nil -*- --- GRAY stream mixin. Implementations should provide this default method, I believe, but at least sbcl and allegro don't.
(in-package :iolib/common-lisp) (defclass trivial-gray-stream-mixin () ((%open :initform t))) (defmethod close ((s trivial-gray-stream-mixin) &key abort) (declare (ignore abort)) (prog1 (slot-value s '%open) (setf (slot-value s '%open) nil))) (defmethod open-stream-p ((s trivial-gray-stream-mixin)) (slo...
48cc6082723432e2098770993822904eec0b03cebbe8bfa1c76f777d60cacff5
tmfg/mmtis-national-access-point
email_notification_settings.cljs
(ns ote.app.controller.email-notification-settings "Controller for email notification settings" (:require [tuck.core :as tuck :refer-macros [define-event]] [ote.communication :as comm] [ote.app.routes :as routes] [ote.db.transit :as transit] [ote.ui.form :as form] ...
null
https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/a86cc890ffa1fe4f773083be5d2556e87a93d975/ote/src/cljs/ote/app/controller/email_notification_settings.cljs
clojure
On Navigate to :email-settings -> load data User have saved settings - so no need to do anything No settings in db, so act like all regions are selected Region id's are strings in db. Change them to keywords Create new route Change keywords to strings
(ns ote.app.controller.email-notification-settings "Controller for email notification settings" (:require [tuck.core :as tuck :refer-macros [define-event]] [ote.communication :as comm] [ote.app.routes :as routes] [ote.db.transit :as transit] [ote.ui.form :as form] ...
479d239b36fc5c8cf0e387e8cbab67d87d5d1257f8f7c2761dfb367bccbf04ef
ruricolist/cloture
errors.lisp
(in-package :cloture) (in-readtable clojure-shortcut) (defcondition clojure-condition () ()) (defgeneric #_.getMessage (condition) (:method ((c condition)) (princ-to-string c))) (defcondition clojure-error (error clojure-condition) ((message :initarg :message) (cause :initarg :cause :reader #_.getCause)) ...
null
https://raw.githubusercontent.com/ruricolist/cloture/623c15c8d2e5e91eb87f46e3ecb3975880109948/errors.lisp
lisp
Skipping some parents.
(in-package :cloture) (in-readtable clojure-shortcut) (defcondition clojure-condition () ()) (defgeneric #_.getMessage (condition) (:method ((c condition)) (princ-to-string c))) (defcondition clojure-error (error clojure-condition) ((message :initarg :message) (cause :initarg :cause :reader #_.getCause)) ...
549b9b76e2ce4f7c7225d1a406ab0e1da65b3d495466028aade561071d9a3ba1
tfausak/patrol
DebugMetaSpec.hs
# LANGUAGE QuasiQuotes # module Patrol.Type.DebugMetaSpec where import qualified Data.Aeson as Aeson import qualified Data.Aeson.QQ.Simple as Aeson import qualified Data.Map as Map import qualified Data.Text as Text import qualified Patrol.Type.DebugImage as DebugImage import qualified Patrol.Type.DebugMeta as DebugM...
null
https://raw.githubusercontent.com/tfausak/patrol/1cae55b3840b328cda7de85ea424333fcab434cb/source/test-suite/Patrol/Type/DebugMetaSpec.hs
haskell
# LANGUAGE QuasiQuotes # module Patrol.Type.DebugMetaSpec where import qualified Data.Aeson as Aeson import qualified Data.Aeson.QQ.Simple as Aeson import qualified Data.Map as Map import qualified Data.Text as Text import qualified Patrol.Type.DebugImage as DebugImage import qualified Patrol.Type.DebugMeta as DebugM...
c19027770b2b93c539cad817d1b525781fe104fade2d275788e27e721cbbb92e
int-index/slay
Prim.hs
module Slay.Vty.Prim ( Prim(..), image, space, string, empty ) where import qualified Graphics.Vty as Vty import Data.String import Inj import Slay.Core data Prim = Prim { primExtents :: Extents, primImage :: Vty.Image } deriving (Eq, Show) instance p ~ Prim => Inj p Prim imag...
null
https://raw.githubusercontent.com/int-index/slay/1c9d39b8cb4f32f0b4778677c21ebb85cc1cddf7/vty/src/Slay/Vty/Prim.hs
haskell
module Slay.Vty.Prim ( Prim(..), image, space, string, empty ) where import qualified Graphics.Vty as Vty import Data.String import Inj import Slay.Core data Prim = Prim { primExtents :: Extents, primImage :: Vty.Image } deriving (Eq, Show) instance p ~ Prim => Inj p Prim imag...
c29617f915c225ff640d9309a3196ddd7e5adb908d15531348412651a757de90
eutro/racket-raylib
enums.rkt
#lang scribble/text @(require racket/match raylib/codegen/objects) @(provide generate-enums) @(define (generate-enums enums-parsed #:module _this-mod) @list{ #lang racket/base (require ffi/unsafe) (provide (all-defined-out)) @splice{ @(for/list ([parsed-enum (in-list enums-parsed)]) ...
null
https://raw.githubusercontent.com/eutro/racket-raylib/8c477bec5708018b8ef067a7a6c36c1bbfb58132/configs/templates/enums.rkt
racket
@|description| (intentional)
#lang scribble/text @(require racket/match raylib/codegen/objects) @(provide generate-enums) @(define (generate-enums enums-parsed #:module _this-mod) @list{ #lang racket/base (require ffi/unsafe) (provide (all-defined-out)) @splice{ @(for/list ([parsed-enum (in-list enums-parsed)]) ...
c9acba65ebe0ee8ef8b6ea395409763bd16f76a12d3c53412981cf01d93fedbf
mejgun/haskell-tdlib
PaymentProvider.hs
{-# LANGUAGE OverloadedStrings #-} -- | module TD.Data.PaymentProvider where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U -- | Contains information about a payment provider data PaymentProvider | Smart Glocal payment provider @public_token Public payment token...
null
https://raw.githubusercontent.com/mejgun/haskell-tdlib/dc380d18d49eaadc386a81dc98af2ce00f8797c2/src/TD/Data/PaymentProvider.hs
haskell
# LANGUAGE OverloadedStrings # | | Contains information about a payment provider | | Stripe payment provider | True, if the cardholder name must be provided | True, if the user ZIP/postal code must be provided | True, if the user country must be provided | Stripe API publishable key | Some other payment provid...
module TD.Data.PaymentProvider where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U data PaymentProvider | Smart Glocal payment provider @public_token Public payment token PaymentProviderSmartGlocal public_token :: Maybe String } PaymentPro...
a4d463a853bde01c5da1329ded7cc7e16281ae537c156046c51a2873bdb2e822
armedbear/abcl
defmacro.lisp
;;; defmacro.lisp ;;; Copyright ( C ) 2003 - 2006 $ I d : defmacro.lisp 13696 2011 - 11 - 15 22:34:19Z astalla $ ;;; ;;; 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 o...
null
https://raw.githubusercontent.com/armedbear/abcl/0631ea551523bb93c06263e772fbe849008e2f68/src/org/armedbear/lisp/defmacro.lisp
lisp
defmacro.lisp This program is free software; you can redistribute it and/or either version 2 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 PURPOSE. See the GNU General Public License f...
Copyright ( C ) 2003 - 2006 $ I d : defmacro.lisp 13696 2011 - 11 - 15 22:34:19Z astalla $ modify it under the terms of the GNU General Public License of the License , or ( at your option ) any later version . You should have received a copy of the GNU General Public License Foundation , Inc. , 59 Temple ...
edefa0ca8e96f16cd01058e0712bf2a6fd0dca24bddb7d279658a0cf73287781
achirkin/vulkan
AccessFlags.hs
# OPTIONS_HADDOCK ignore - exports # {-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE KindSignatures # {-# LANGUAGE PatternSynonyms #-} # LANGUAGE StandaloneDeriving # {-# LANGUAGE Strict ...
null
https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Types/Enum/AccessFlags.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE PatternSynonyms # # LANGUAGE Strict # # LANGUAGE TypeSynonymInstances # | Controls coherency of indirect command reads | Controls coherency of index reads | Controls coherency of vertex attribute reads | Controls coherency of...
# OPTIONS_HADDOCK ignore - exports # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE KindSignatures # # LANGUAGE StandaloneDeriving # module Graphics.Vulkan.Types.Enum.AccessFlags (VkAccessBitmask(VkAccessBitmask, VkAccessFlags, VkAccessFlagBits, ...
536263c9a87a9465253463afc64f4a4413eebeee3811737bc66ab5e87b5c8b67
debasishg/erlang-string-lambda
lib_lambda_utils.erl
%% Ported from the String Lambdas in Functional Javascript / %% This work is licensed under the MIT License : %% ( c ) 2007 Portions Copyright ( c ) 2006 %% %% Permission is hereby granted, free of charge, to any person obtaining %% a copy of this software and associated documentation files (the " S...
null
https://raw.githubusercontent.com/debasishg/erlang-string-lambda/392206ee0908c4edde86dc599494996ea317ee11/lib_lambda_utils.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the without limitation the rights to use, copy, modify, merge, publish, the following conditions: The above copyright notice and this permission notice shall be EXPRESS OR IMP...
Ported from the String Lambdas in Functional Javascript / This work is licensed under the MIT License : ( c ) 2007 Portions Copyright ( c ) 2006 " Software " ) , to deal in the Software without restriction , including distribute , sublicense , and/or sell copies of the Software , and to permit pe...
969eecb0c9566dfaced9985dd7f8c563dc3e22135b4698711eb2d717ed200014
protz/pippo
pippo.ml
(*****************************************************************************) pippo , a pretty interesting pre - processor using Copyright ( C ) 2013 (* *) (* This program is free software: you can...
null
https://raw.githubusercontent.com/protz/pippo/5ce9a117c8b3298d25dd3cc3927dacabee778b93/pippo.ml
ocaml
*************************************************************************** This program is free software: you can redistribute it and/or modify (at your option) any later version. ...
pippo , a pretty interesting pre - processor using Copyright ( C ) 2013 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 ...
5f848bbfa4ab261b94da829e9ffc5b0e7cf99857a17aacce408ef5d61ebee73c
torkve/melange-seawar
game.mli
type turn = Own | Opp;; type state = GameOver | Wait | OwnTurn | OppTurn;; type sendable_message = < xmit_statecall : Message.Message.statecalls >;; type sm_constr = message_id:int -> Mpl_stdlib.env -> sendable_message;; type t = < tick : Protocol.s -> unit; is_server : bool; is_ai : bool; message_display...
null
https://raw.githubusercontent.com/torkve/melange-seawar/e1633ef088a2dbf893536a7ba2fa8a72eac198ec/game.mli
ocaml
type turn = Own | Opp;; type state = GameOver | Wait | OwnTurn | OppTurn;; type sendable_message = < xmit_statecall : Message.Message.statecalls >;; type sm_constr = message_id:int -> Mpl_stdlib.env -> sendable_message;; type t = < tick : Protocol.s -> unit; is_server : bool; is_ai : bool; message_display...
2622acb3ef1ad3c060a9674a1e41cb96076de9ff1691fa320572432fa9934e7e
divs1210/streamer
core_test.clj
(ns streamer.core-test (:require [clojure.test :refer :all] [streamer.core :refer :all] [net.cgrand.xforms :as x])) (deftest tests (testing "anaphoric macro bindings" (is (= (filter odd? (range 10)) (=> (range 10) (filter odd?) (sequence %xform %...
null
https://raw.githubusercontent.com/divs1210/streamer/5e6976c5025007c7f6afa55251bc6081b43a78f4/test/streamer/core_test.clj
clojure
(ns streamer.core-test (:require [clojure.test :refer :all] [streamer.core :refer :all] [net.cgrand.xforms :as x])) (deftest tests (testing "anaphoric macro bindings" (is (= (filter odd? (range 10)) (=> (range 10) (filter odd?) (sequence %xform %...
efbe7927cbe18705db2f95b8f01be67caa62e85bf1484460e5bc72f2ad4d132f
owickstrom/gi-gtk-declarative
ManyBoxes.hs
{-# LANGUAGE OverloadedLabels #-} # LANGUAGE OverloadedLists # {-# LANGUAGE OverloadedStrings #-} module ManyBoxes where import Control.Monad ( void ) import Data.Functor ( (<&>) ) import Data.Text ( pack ) import Data...
null
https://raw.githubusercontent.com/owickstrom/gi-gtk-declarative/205351a54698be7b583dd34d189a89470ee2b11b/examples/ManyBoxes.hs
haskell
# LANGUAGE OverloadedLabels # # LANGUAGE OverloadedStrings #
# LANGUAGE OverloadedLists # module ManyBoxes where import Control.Monad ( void ) import Data.Functor ( (<&>) ) import Data.Text ( pack ) import Data.Vector ( Vector ) import qualified Data.Vector ...
72571eb9a930f33797cebf3cd8324b67eb13638195b3efda22d6d90bc4858a3a
ndmitchell/shake
Lexer.hs
# LANGUAGE PatternGuards # { - # OPTIONS_GHC -O2 # - } -- fails with GHC 7.10 -- {-# OPTIONS_GHC -ddump-simpl #-} | Lexing is a slow point , the code below is optimised module Development.Ninja.Lexer(Lexeme(..), lexerFile) where import Data.Tuple.Extra import Data.Char import qualified Data.ByteString.Char8 as BS...
null
https://raw.githubusercontent.com/ndmitchell/shake/99c5a7a4dc1d5a069b13ed5c1bc8e4bc7f13f4a6/src/Development/Ninja/Lexer.hs
haskell
fails with GHC 7.10 {-# OPTIONS_GHC -ddump-simpl #-} ------------------------------------------------------------------- null terminated The predicate must return true for '\0' ------------------------------------------------------------------- ACTUAL LEXER [indent]foo = bar include file include file rule name...
# LANGUAGE PatternGuards # | Lexing is a slow point , the code below is optimised module Development.Ninja.Lexer(Lexeme(..), lexerFile) where import Data.Tuple.Extra import Data.Char import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.Unsafe as BS import Development.Ninja.Type import quali...
4b26ecb0d6044facc044967d90456dbfc6c1be30040cde2e4d6c65d005b9e49f
clojurecup2014/parade-route
genclass.clj
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; ...
null
https://raw.githubusercontent.com/clojurecup2014/parade-route/adb2e1ea202228e3da07902849dee08f0bb8d81c/Assets/Clojure/Internal/Plugins/clojure/test_clojure/genclass.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (ns ^{:doc "Tests for clojure.core/gen-class" :author "Stuart Halloway, Daniel Solano Gómez"} clojure.test-clojure.genclass (:use clojure.test clojure.test-helper) (:import [clojure.test_clojure.genclass.examples ExampleClass ArrayDefInte...
58bb8eed795e1f062b2245299e856e5f15d1d82828f12ed3ff3acc1da00e0a33
etoroxlabs/lira
LiraParserPropTest.hs
MIT License -- Copyright ( c ) 2019 eToroX Labs -- -- 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, modi...
null
https://raw.githubusercontent.com/etoroxlabs/lira/33fae6d37c5467d0a59ab9e9759636f2468b3653/test/LiraParserPropTest.hs
haskell
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnished to do so, subject to the following conditions: The above copyright not...
MIT License Copyright ( c ) 2019 eToroX Labs in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIN...
318e2bf60e6b20967b51dc322e2263271590171078ea242f2c11eab5135ccba6
clash-lang/clash-compiler
Poly2.hs
module Poly2 where import Clash.Prelude topEntity :: (a ~ Bool) => a -> b -> a topEntity x y = x
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/dd52247633ab73f1960b401ea953580cfaf4f6ef/tests/shouldfail/Poly2.hs
haskell
module Poly2 where import Clash.Prelude topEntity :: (a ~ Bool) => a -> b -> a topEntity x y = x
e394106117a1ad4235a14c962b6099d4707c17284c801432d926fb0d08509a69
Dexterminator/imperimetric
core_card.cljs
(ns imperimetric.core-card (:require-macros [devcards.core :as dc]) (:require [imperimetric.cards])) (dc/start-devcard-ui!)
null
https://raw.githubusercontent.com/Dexterminator/imperimetric/57e975c470490724f69cc43c2f5d0fa2359745d0/src/devcards/core_card.cljs
clojure
(ns imperimetric.core-card (:require-macros [devcards.core :as dc]) (:require [imperimetric.cards])) (dc/start-devcard-ui!)
5602524bb10ef9f84cfa6ede3f0126af5f3468d94283ae4358c432814a8d3379
facebookarchive/pfff
token_views_opa.mli
type token = Parser_opa.token type tree = | T of token | Paren of tree list list (* grouped by comma *) grouped by comma too , as in type defs | Bracket of tree list list | Xml of tree list (* attributes *) * tree list (* children *) val mk_tree: Parser_opa.token list -> tree list val vof_tree_list: ...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_opa/parsing/token_views_opa.mli
ocaml
grouped by comma attributes children
type token = Parser_opa.token type tree = | T of token grouped by comma too , as in type defs | Bracket of tree list list val mk_tree: Parser_opa.token list -> tree list val vof_tree_list: tree list -> Ocaml.v
b373318b52664eb7e0cf779b057afc8f20881653ba38b4a35fa17fffa8b57a70
input-output-hk/cardano-ledger
EpochNumber.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE UndecidableInstances # module Cardano.Chain.Slotting.EpochNumber ( Epoch...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/b9aa1ad1728c0ceeca62657ec94d6d099896c052/eras/byron/ledger/impl/src/Cardano/Chain/Slotting/EpochNumber.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE OverloadedStrings # | Index of epoch. Used for debugging purposes only | Bootstrap era is ongoing until stakes are unlocked. The reward era starts from the epoch specified as the epoch that unlocks stakes: @ [unlock stake epoch] ...
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # module Cardano.Chain.Slotting.EpochNumber ( EpochNumber (..), isBootstrapEra, ) where import Cardano.Ledger.Binary ( ...
1cb950ac8485e3abf09ac6f1ca2b40c2f827cad81e4ca13b7a3cc4fc4bb5389b
scicloj/notespace
watch.clj
(ns scicloj.notespace.v4.watch (:require [clojure.pprint :as pp] [nextjournal.beholder :as beholder] [scicloj.notespace.v4.events.pipeline :as v4.pipeline] [scicloj.notespace.v4.path :as v4.path] [scicloj.notespace.v4.config :as v4.config]) (:import sun.nio.fs.UnixPat...
null
https://raw.githubusercontent.com/scicloj/notespace/5235aefd2d9b472d1d06204128089d41885034f3/src/scicloj/notespace/v4/watch.clj
clojure
(ns scicloj.notespace.v4.watch (:require [clojure.pprint :as pp] [nextjournal.beholder :as beholder] [scicloj.notespace.v4.events.pipeline :as v4.pipeline] [scicloj.notespace.v4.path :as v4.path] [scicloj.notespace.v4.config :as v4.config]) (:import sun.nio.fs.UnixPat...
31761eb0aa2b8852d954a92fb8c066ea475d63f528cd8547f190bf87bf75bd14
softwarelanguageslab/maf
R5RS_ad_qstand-3.scm
; Changes: * removed : 0 * added : 1 * swaps : 1 ; * negated predicates: 0 ; * swapped branches: 0 * calls to i d fun : 1 (letrec ((quick-sort (lambda (vector) (letrec ((swap (lambda (vector index1 index2) (let ((temp (vector-ref vector index1))) ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_ad_qstand-3.scm
scheme
Changes: * negated predicates: 0 * swapped branches: 0
* removed : 0 * added : 1 * swaps : 1 * calls to i d fun : 1 (letrec ((quick-sort (lambda (vector) (letrec ((swap (lambda (vector index1 index2) (let ((temp (vector-ref vector index1))) (vector-set! vector ...
da6c56b00230667564f3d12705851f8fcdbb7812b12b19e252351e3da7cf2c86
nc6/tabula
Options.hs
Copyright ( c ) 2014 Genome Research Ltd. Author : < > 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/nc6/tabula/f76524bbe56b45b125707cf1f4f9526817c4e6e8/Tabula/Options.hs
haskell
# LANGUAGE DataKinds, TypeOperators # ------------ Options ------------------ Common options -- | Verbosity (logging level) | Quiet mode (disable all logging) Shared options -- | Specify which project | Use global namespace? Default options -- | Resume a session | Set buffer size ----------- Parsers ---------...
Copyright ( c ) 2014 Genome Research Ltd. Author : < > 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 . ...
782cef19fffed242a282b545e5333f81f2a44019d129606ef13bec3783d95169
BinRoot/Haskell-Data-Analysis-Cookbook
Main.hs
import Data.Algorithm.MaximalCliques main = do print $ getMaximalCliques edges nodes edges 1 5 = True edges 1 2 = True edges 2 3 = True edges 2 5 = True edges 4 5 = True edges 3 4 = True edges 4 6 = True edges _ _ = False nodes = [1..6]
null
https://raw.githubusercontent.com/BinRoot/Haskell-Data-Analysis-Cookbook/f8c46987d78f4a6c1828b353c5f906b9314c2ef9/Ch06/Code09_cliq/Main.hs
haskell
import Data.Algorithm.MaximalCliques main = do print $ getMaximalCliques edges nodes edges 1 5 = True edges 1 2 = True edges 2 3 = True edges 2 5 = True edges 4 5 = True edges 3 4 = True edges 4 6 = True edges _ _ = False nodes = [1..6]
c203e724236602d190159e528a1b5978f8856fc5173b26cfdb3ef0b465476d16
fluree/ledger
open_test.clj
(ns fluree.db.ledger.api.open-test (:require [clojure.test :refer :all] [fluree.db.test-helpers :as test] [org.httpkit.client :as http] [fluree.db.util.json :as json] [fluree.db.api :as fdb] [fluree.db.query.http-signatures :as http-signatures]) (:import (...
null
https://raw.githubusercontent.com/fluree/ledger/af93dd2f0261cabed58fadedbe215e828d38cb44/test/fluree/db/ledger/api/open_test.clj
clojure
Utility vars and functions chat$1 -> 13, nestedComponent$1 ->12, _user$jdoe, :_user$zsmith, _rule$viewAllPeople, _rule$editOwnChats, _rule$viewAllChats The keys in the response are -> :opts :body :headers :status Are all the collection names what we expect? Are some of the predicates we expect returned? Are some...
(ns fluree.db.ledger.api.open-test (:require [clojure.test :refer :all] [fluree.db.test-helpers :as test] [org.httpkit.client :as http] [fluree.db.util.json :as json] [fluree.db.api :as fdb] [fluree.db.query.http-signatures :as http-signatures]) (:import (...
53bfa40c9b3499bdc728dac339f8d905c78b0408967f9056bf2fa749b8312d74
euhmeuh/web-galaxy
_base.rkt
#lang racket/base (provide base-page) (require racket/string web-galaxy/entities web-galaxy/translate) (define basic-links (list (link "/" "Home") (link "#about" "About"))) (define (render-navigation links) `(nav ([role "navigation"]) (ul ,@(map (lambda (link) `(li ,...
null
https://raw.githubusercontent.com/euhmeuh/web-galaxy/2d9d5710aec25d961dcfc37a2e88c3c0f435021f/web-galaxy-test/tests/web-galaxy/pony-blog/pages/_base.rkt
racket
#lang racket/base (provide base-page) (require racket/string web-galaxy/entities web-galaxy/translate) (define basic-links (list (link "/" "Home") (link "#about" "About"))) (define (render-navigation links) `(nav ([role "navigation"]) (ul ,@(map (lambda (link) `(li ,...
5b1686f8c21da0e671f5749f8f92d3bef0291bc3c6bb50da0962fd41246be331
haroldcarr/learn-haskell-coq-ml-etc
Lib.hs
module Lib where -- /#free-monads import Control.Monad.Free Pure : : a - > Free f a Free : : f ( Free f a ) - > Free f a liftF : : ( Functor f , ) = > f a - > m a retract : : Monad f = > Free f a - > f a Free monads : monads that - instead of havin...
null
https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/66dc7ac85e46635daa8b225cff2bc7f6f23a3d06/haskell/topic/fix-free/stephen-diehl-free-monds/src/Lib.hs
haskell
/#free-monads Non-termination.
module Lib where import Control.Monad.Free Pure : : a - > Free f a Free : : f ( Free f a ) - > Free f a liftF : : ( Functor f , ) = > f a - > m a retract : : Monad f = > Free f a - > f a Free monads : monads that - instead of having a join operatio...
a37ac023bbb3118316cd8b78747d332ff36b5af7b79d95083dfdc16d53bb4ccf
amnh/poy5
build.ml
POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies . Copyright ( C ) 2014 , , , Ward Wheeler , and the American Museum of Natural History . (* *) (* This program is free softwa...
null
https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/build.ml
ocaml
This program is free software; you can redistribute it and/or modify (at your option) any later version. This progra...
POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies . Copyright ( C ) 2014 , , , Ward Wheeler , and the American Museum of Natural History . it under the terms of the GNU General Public License as published by the Free Software Foundation ; ...
0ed8288761ddeae678c358bb0d72396d86a4c7ced2377beeb54ba6c94e2aacb9
AbstractMachinesLab/caramel
uri0.mli
open! Import include Json.Jsonable.S val equal : t -> t -> bool val to_dyn : t -> Dyn.t val hash : t -> int val to_path : t -> string val of_path : string -> t val to_string : t -> string val pp : Format.formatter -> t -> unit
null
https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/lsp/src/uri0.mli
ocaml
open! Import include Json.Jsonable.S val equal : t -> t -> bool val to_dyn : t -> Dyn.t val hash : t -> int val to_path : t -> string val of_path : string -> t val to_string : t -> string val pp : Format.formatter -> t -> unit
701692e9ea646abf39cefd36689b80cec75f67229f605119535f3cb7261a4067
stuarthalloway/programming-clojure
chain_4.clj
(ns examples.test.macros.chain-4 (:use clojure.test examples.macros.chain-4)) (deftest test-chain-4 (are [x y] (= x y) (macroexpand-1 '(examples.macros.chain-4/chain a b)) '(. a b) (macroexpand-1 '(examples.macros.chain-4/chain a b c)) '(examples.macros.chain-4/chain (. a b) (c))))
null
https://raw.githubusercontent.com/stuarthalloway/programming-clojure/192e2f28d797fd70e50778aabd031b3ff55bd2b9/test/examples/test/macros/chain_4.clj
clojure
(ns examples.test.macros.chain-4 (:use clojure.test examples.macros.chain-4)) (deftest test-chain-4 (are [x y] (= x y) (macroexpand-1 '(examples.macros.chain-4/chain a b)) '(. a b) (macroexpand-1 '(examples.macros.chain-4/chain a b c)) '(examples.macros.chain-4/chain (. a b) (c))))
68e359d7b5498a731645eedd5735053904b82ed703206dc7878b8d388ca53e63
yansh/MoanaML
moana.ml
* Copyright ( c ) 2014 * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAI...
null
https://raw.githubusercontent.com/yansh/MoanaML/c9843c10a0624e1c06e185e3dd1e7d877270d0d7/moana.ml
ocaml
SIGNATURES storage name provide a graph query as list of tuples and returns list of tuples matching it return stored graph as set of tuples backend storage. type tuple add fact as a tuple s...
* Copyright ( c ) 2014 * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAI...
a02a805c813d1025bb7770e747dd1849fd21a3e8e9fabe21c5c079fefdd004ba
shterrett/haskell-road
IAR.hs
# LANGUAGE NoMonomorphismRestriction # module Book.IAR where import Data.List import Book.STAL (display) sumOdds' :: Integer -> Integer sumOdds' n = sum [ 2*k - 1 | k <- [1..n] ] sumOdds :: Integer -> Integer sumOdds n = n^2 sumEvens' :: Integer -> Integer sumEvens' n = sum [ 2*k | k <- [1..n] ] sumEvens :: Inte...
null
https://raw.githubusercontent.com/shterrett/haskell-road/4af8253fc4475e5689b0ce59da468a3a6c92872e/src/Book/IAR.hs
haskell
# LANGUAGE NoMonomorphismRestriction # module Book.IAR where import Data.List import Book.STAL (display) sumOdds' :: Integer -> Integer sumOdds' n = sum [ 2*k - 1 | k <- [1..n] ] sumOdds :: Integer -> Integer sumOdds n = n^2 sumEvens' :: Integer -> Integer sumEvens' n = sum [ 2*k | k <- [1..n] ] sumEvens :: Inte...
2297de22512d87fb57d3492158f43bb80b57f76be972a48f10dd4b405c0ea13e
cky/guile
server.scm
;;; Web server Copyright ( C ) 2010 , 2011 , 2012 , 2013 , 2015 Free Software Foundation , Inc. ;; 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 ...
null
https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/module/web/server.scm
scheme
Web server This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PU...
Copyright ( C ) 2010 , 2011 , 2012 , 2013 , 2015 Free Software Foundation , Inc. version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 USA loop...
70cb244781ed79c42c147baa5d5e7d9eabf1e1af3de4c208e4ae75e536ea5fce
nd/sicp
interpreter.scm
(define apply-in-underlying-scheme apply) (define (eval exp env) (cond ((self-evaluating? exp) exp) ((variable? exp) (lookup-variable-value exp env)) ((quoted? exp) (text-of-quotation exp)) ((assignment? exp) (eval-assignment exp env)) ((definition? exp) (ev...
null
https://raw.githubusercontent.com/nd/sicp/d8587a0403d95af7c7bcf59b812f98c4f8550afd/ch04/interpreter.scm
scheme
formal parameters body ==== --- let --- no `else' clause
(define apply-in-underlying-scheme apply) (define (eval exp env) (cond ((self-evaluating? exp) exp) ((variable? exp) (lookup-variable-value exp env)) ((quoted? exp) (text-of-quotation exp)) ((assignment? exp) (eval-assignment exp env)) ((definition? exp) (ev...
788f39c9da2b6d9247aeddef493bd81e1687ab09e3bf0d13975e877ae68054ce
v-kolesnikov/sicp
1_44_test.clj
(ns sicp.chapter01.1-44-test (:require [clojure.test :refer :all] [sicp.test-helper :refer :all] [sicp.common :refer [square]] [sicp.chapter01.1-44 :refer :all])) (deftest test-smooth (let [dx 0.00001] (assert-equal 4.0 ((smooth square dx) 2)) (assert-equal 9.0 ((smooth ...
null
https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/test/sicp/chapter01/1_44_test.clj
clojure
(ns sicp.chapter01.1-44-test (:require [clojure.test :refer :all] [sicp.test-helper :refer :all] [sicp.common :refer [square]] [sicp.chapter01.1-44 :refer :all])) (deftest test-smooth (let [dx 0.00001] (assert-equal 4.0 ((smooth square dx) 2)) (assert-equal 9.0 ((smooth ...
8cb3f9b54dc7398eda31976b5e61d80aad3173c26d3deb8be8f02c923a33e446
OCamlPro/ez_pgocaml
thread.ml
module type E = sig type err val from_exn : exn -> err end module Make(E : E) = struct type 'a t = ('a, E.err) Result.t Lwt.t let (>>=) p f = Lwt.bind p (function Error e -> Lwt.return_error e | Ok x -> f x) let fail exn = Lwt.return_error (E.from_exn exn) let catch = Lwt.catch let return = Lwt.return_ok ...
null
https://raw.githubusercontent.com/OCamlPro/ez_pgocaml/e84e6835e6048a27fcdfdc58403ca3a8ce16d744/src/impl/rp/thread.ml
ocaml
module type E = sig type err val from_exn : exn -> err end module Make(E : E) = struct type 'a t = ('a, E.err) Result.t Lwt.t let (>>=) p f = Lwt.bind p (function Error e -> Lwt.return_error e | Ok x -> f x) let fail exn = Lwt.return_error (E.from_exn exn) let catch = Lwt.catch let return = Lwt.return_ok ...
310b0ea99cd38ed49444d6b6a9f7d355a7be5053811b84a33f090b5986aeac45
DavidAlphaFox/RabbitMQ
rabbit_mgmt_wm_definitions.erl
The contents of this file are subject to the Mozilla Public License Version 1.1 ( the " License " ) ; you may not use this file except in %% compliance with the License. You may obtain a copy of the License at %% / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITH...
null
https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_definitions.erl
erlang
compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -------------------------------------------------------------------- Su...
The contents of this file are subject to the Mozilla Public License Version 1.1 ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ Management Plugin . The Initial Developer of the Original Code...
486cca85404a3dcce68b6f6638ff58a7a01c0120299e50e6bdf81197ba4733cc
metosin/komponentit
core.cljs
(ns example.core (:require [clojure.string :as str])) (defn header [module module-name] (str "# " module-name "\n## [view source](" "/" (name module) ".cljs" "), [view example source](" "-src/cljs/example/" (name module) ".cljs" ")\n"))
null
https://raw.githubusercontent.com/metosin/komponentit/d962ce1d69ccc3800db0d6b4fc18fc2fd30b494a/example-src/cljs/example/core.cljs
clojure
(ns example.core (:require [clojure.string :as str])) (defn header [module module-name] (str "# " module-name "\n## [view source](" "/" (name module) ".cljs" "), [view example source](" "-src/cljs/example/" (name module) ".cljs" ")\n"))
2dab33215a78fed768333857e953c6809cd0126fa47db13a91603aa6b1e6d1ba
haskell-suite/haskell-src-exts
ForeignImportJavascript.hs
# LANGUAGE JavascriptFFI # foreign import javascript unsafe "somethingUseful_ = $1" js_set_somethingUseful :: JSFun a -> IO ()
null
https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/ForeignImportJavascript.hs
haskell
# LANGUAGE JavascriptFFI # foreign import javascript unsafe "somethingUseful_ = $1" js_set_somethingUseful :: JSFun a -> IO ()
dd93cf09768e97e1518894349d0d48aedf77958140406a0e7e47f577b1b3e079
WorksHub/client
views.cljs
(ns wh.admin.tags.views (:require [reagent.core :as r] [wh.admin.tags.events :as events] [wh.admin.tags.subs :as subs] [wh.common.text :as text] [wh.common.subs] [wh.components.forms.views :refer [text-field select-field]] [wh.components.icons :refer [icon]] [wh.components.not-found :a...
null
https://raw.githubusercontent.com/WorksHub/client/77e4212a69dad049a9e784143915058acd918982/client/src/wh/admin/tags/views.cljs
clojure
(ns wh.admin.tags.views (:require [reagent.core :as r] [wh.admin.tags.events :as events] [wh.admin.tags.subs :as subs] [wh.common.text :as text] [wh.common.subs] [wh.components.forms.views :refer [text-field select-field]] [wh.components.icons :refer [icon]] [wh.components.not-found :a...
697ae7d569507eeddc3b9620af743c30002fdf83eb74f38273ddc7c1bd6185d3
marigold-dev/deku
v128.mli
(* Types *) type t type bits = string type ('i8x16, 'i16x8, 'i32x4, 'i64x2, 'f32x4, 'f64x2) laneop = | I8x16 of 'i8x16 | I16x8 of 'i16x8 | I32x4 of 'i32x4 | I64x2 of 'i64x2 | F32x4 of 'f32x4 | F64x2 of 'f64x2 type shape = (unit, unit, unit, unit, unit, unit) laneop (* Basics *) val bitwidth : int val n...
null
https://raw.githubusercontent.com/marigold-dev/deku/a26f31e0560ad12fd86cf7fa4667bb147247c7ef/deku-c/interpreter/exec/v128.mli
ocaml
Types Basics String conversion Shape-based operations Special shapes Conversions
type t type bits = string type ('i8x16, 'i16x8, 'i32x4, 'i64x2, 'f32x4, 'f64x2) laneop = | I8x16 of 'i8x16 | I16x8 of 'i16x8 | I32x4 of 'i32x4 | I64x2 of 'i64x2 | F32x4 of 'f32x4 | F64x2 of 'f64x2 type shape = (unit, unit, unit, unit, unit, unit) laneop val bitwidth : int val num_lanes : ('a, 'b, 'c, '...
55f46fc47a70a45900b4102eb4a4eea9e93573643b7fdada1bec30f5ab99ead1
serperu/secer
roman.erl
-module(roman). -compile(export_all). to_roman(0) -> []; to_roman(X) when X >= 1000 -> [$M | to_roman(X - 1000)]; to_roman(X) when X >= 100 -> digit(X div 100, $C, $D, $M) ++ to_roman(X rem 100); to_roman(X) when X >= 10 -> digit(X div 10, $X, $L, $C) ++ to_roman(X rem 10); to_roman(X) when X >= 1 ->...
null
https://raw.githubusercontent.com/serperu/secer/ffe2f9602356c34c9465c44534c82cc758b809b5/benchmarks/roman/roman.erl
erlang
digit(8, X, Y, _) -> [Y, X, X, X]; %RIGHT WRONG
-module(roman). -compile(export_all). to_roman(0) -> []; to_roman(X) when X >= 1000 -> [$M | to_roman(X - 1000)]; to_roman(X) when X >= 100 -> digit(X div 100, $C, $D, $M) ++ to_roman(X rem 100); to_roman(X) when X >= 10 -> digit(X div 10, $X, $L, $C) ++ to_roman(X rem 10); to_roman(X) when X >= 1 ->...
4ed7c496efc4f9628998da79601acc146e684151a48516b10170f39b32b00f19
melange-re/melange
NumberAdder.ml
let addNumbers a b = a + b
null
https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/build_tests/monorepo/libs/number-adder/src/NumberAdder.ml
ocaml
let addNumbers a b = a + b
f55a83808693f11d6c7f1c85ef73f6a11724b439ec1b310b4a9484b9e8be300e
AbstractMachinesLab/caramel
env.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/upstream/ocaml_409/typing/env.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Cmi_format open Misc open Asttypes open Longident open Path open Types open Btype module String = ...
0d0d6835c1af8c615e2018d6ce7ac56714be10f45bf172fb7dfb2ea5004d034b
b0-system/b0
test.ml
let main () = let tid = Thread.create (fun () -> print_endline "Ha!") () in Thread.join tid; print_endline "Ho!" let () = main ()
null
https://raw.githubusercontent.com/b0-system/b0/2e7fa30e7e565e8edf831ea5e62c578eeca7c626/examples/ocaml-threads/test.ml
ocaml
let main () = let tid = Thread.create (fun () -> print_endline "Ha!") () in Thread.join tid; print_endline "Ho!" let () = main ()
73efe9191e6caeb77aa26a6fe0cdc83920dc8bc21d751f6942c80e811ebc4bc0
karlhof26/gimp-scheme
AutoColorize_FlavorE_6_02.scm
; Auto colorize image into random number of colors of random hues author : date : 2015 (define (script-fu-auto-colorize-e image layer hatches ) (let* ( (color-map 0) (colors 0) (image-width) (image-height) ...
null
https://raw.githubusercontent.com/karlhof26/gimp-scheme/b1e836958cd24a085b245e7a7b9dbce50b6a8a70/AutoColorize_FlavorE_6_02.scm
scheme
Auto colorize image into random number of colors of random hues constants for calculating luminance (B 0.0722) (0.299*R + 0.587*G + 0.114*B) (G 0.587) (B (/ 18.0 255)) how my camera sees black and white (B (/ 147 479)) (R (/ 138 479)) randomly generated r g b values luminance original (gimp-image-undo-dis...
author : date : 2015 (define (script-fu-auto-colorize-e image layer hatches ) (let* ( (color-map 0) (colors 0) (image-width) (image-height) ( G 0.7152 ) ( R 0.299 ) ( B 0.114 ) sqrt ( 0.299*R^2 + 0.587...
b581c6fbcda5be5eb5f12f0d623c96a178b4004881e0a6e8660e1261019dcdab
whamtet/ctmx
project.clj
(defproject ctmx "1.4.9" :description "Backend helpers for htmx" :url "" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "-2.0/"} :dependencies [[org.clojure/clojure "1.10.0"] [hiccup "2.0.0-alpha2"] [org.clojure/clojurescript "1.10.7...
null
https://raw.githubusercontent.com/whamtet/ctmx/dc2324658d3da702b98c5014ba5f733e972957fb/project.clj
clojure
TODO reitit-ring
(defproject ctmx "1.4.9" :description "Backend helpers for htmx" :url "" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "-2.0/"} :dependencies [[org.clojure/clojure "1.10.0"] [hiccup "2.0.0-alpha2"] [org.clojure/clojurescript "1.10.7...
8bebcd49be15c9b8d6a992a6d92bb399fe3e7e23e3d19f65adaac8199dfc1f64
xray-tech/xorc-xray
persistence.clj
(ns re.stage.persistence (:require [integrant.core :as ig] [re.boundary.states :as states] [re.effects :as effects])) (defmethod ig/init-key :re.stage/persistence [_ _] {:enter (fn [{:keys [:core/state-id :core/state-meta :core/program :oam/state] :as data}] ...
null
https://raw.githubusercontent.com/xray-tech/xorc-xray/ee1c841067207c5952473dc8fb1f0b7d237976cb/src/re/stage/persistence.clj
clojure
(ns re.stage.persistence (:require [integrant.core :as ig] [re.boundary.states :as states] [re.effects :as effects])) (defmethod ig/init-key :re.stage/persistence [_ _] {:enter (fn [{:keys [:core/state-id :core/state-meta :core/program :oam/state] :as data}] ...
88ff880b49bae737b2b6530cf20dd15e64e682707d11e355c42565b39f193f2a
stchang/macrotypes
stlc+rec-iso-tests.rkt
#lang s-exp turnstile/examples/optimize/stlc+rec-iso (require rackunit/turnstile) (define-type-alias IntList (μ (X) (∨ [nil : Unit] [cons : (× Int X)]))) (define-type-alias ILBody (∨ [nil : Unit] [cons : (× Int IntList)])) ;; nil (define nil (fld {IntList} (var nil = (void) as ILBody))) (check-type nil : IntList) ;;...
null
https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-test/tests/turnstile/optimize/stlc%2Brec-iso-tests.rkt
racket
nil cons isnil hd tl define-type-alias error , Complex undefined records (ie labeled tuples) no records, only tuples variants not enough clauses wrong clause too many clauses mismatched branch types previous tests: ------------------------------------------------------------ tests for tuples -----------...
#lang s-exp turnstile/examples/optimize/stlc+rec-iso (require rackunit/turnstile) (define-type-alias IntList (μ (X) (∨ [nil : Unit] [cons : (× Int X)]))) (define-type-alias ILBody (∨ [nil : Unit] [cons : (× Int IntList)])) (define nil (fld {IntList} (var nil = (void) as ILBody))) (check-type nil : IntList) (define c...
4fb96b0ca89325fbaeab13b4f9641eb80a8aa1089986f04afdd684ad220d68bd
janestreet/hardcaml_verify
uid.ml
open Base module type S = sig type t [@@deriving sexp] include Comparable.S with type t := t include Stringable.S with type t := t val create : int -> (unit -> t) Staged.t end module Int = struct include Int let create starts_at = let uid = ref starts_at in Staged.stage (fun () -> let ret...
null
https://raw.githubusercontent.com/janestreet/hardcaml_verify/5d4f1622335caa2ec7db67de2adcddb13aa7c855/src/uid.ml
ocaml
open Base module type S = sig type t [@@deriving sexp] include Comparable.S with type t := t include Stringable.S with type t := t val create : int -> (unit -> t) Staged.t end module Int = struct include Int let create starts_at = let uid = ref starts_at in Staged.stage (fun () -> let ret...
a405dd94e35fc89f0a728af2c4a1ece1700338dd317f8c5d33879b001f57f9c3
jackdoe/bzzz
term.clj
(ns bzzz.queries.term (use bzzz.util) (:import (org.apache.lucene.search TermQuery) (org.apache.lucene.index Term))) (defn parse [generic input analyzer] (let [{:keys [field value boost] :or {boost 1}} input q (TermQuery. (Term. ^String (need field "need <field>") ^String value))] ...
null
https://raw.githubusercontent.com/jackdoe/bzzz/ae98708056e39ada28f22aad9e43ea91695b346b/src/bzzz/queries/term.clj
clojure
(ns bzzz.queries.term (use bzzz.util) (:import (org.apache.lucene.search TermQuery) (org.apache.lucene.index Term))) (defn parse [generic input analyzer] (let [{:keys [field value boost] :or {boost 1}} input q (TermQuery. (Term. ^String (need field "need <field>") ^String value))] ...
8f395a2d6354dddc796a46f7fae87b30fab54265e49bd4c9dde3c640294e1445
xvw/ocamlectron
Versions.mli
(** Versions allowed *) open Js_of_ocaml open Js class type versions = object method chrome : (js_string t) readonly_prop method electron : (js_string t) readonly_prop end type t = versions Js.t
null
https://raw.githubusercontent.com/xvw/ocamlectron/3e0cb9575975e69ab34cb7e0e3549d31c07141c2/lib/electron_plumbing/Versions.mli
ocaml
* Versions allowed
open Js_of_ocaml open Js class type versions = object method chrome : (js_string t) readonly_prop method electron : (js_string t) readonly_prop end type t = versions Js.t
19cf12115cb030189a328157f1c4082d7705153cdf48420f32dc26321445ef16
TrustInSoft/tis-kernel
unify.mli
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/qed/top/unify.mli
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 WP plug - in of Frama - C. Copyright ( C ) 2007 - 2015 ...
ab645942770feee7c93fcfa0d233f6a52809835cede963d16c7b89e1ba1c0195
tomjridge/tjr_simple_earley
examples.ml
(** Some examples *) (** Internal: grammmars defined abstractly *) module Internal = struct let example_grammars p = let ( --> ) = p#make_rule in let _1,_2,_3 = p#_1,p#_2,p#_3 in let _E,_S,a = p#_E,p#_S,p#a in let [one;eps;x] = List.map a ["1";"";"x"] in let _EEE = p#grammar ~na...
null
https://raw.githubusercontent.com/tomjridge/tjr_simple_earley/ca558e0e7f4ddba4cd6573bf180710cd02f25ba4/_archive/.dockerfile/tjr_simple_earley/src/examples.ml
ocaml
* Some examples * Internal: grammmars defined abstractly * A named tuple for tagging grammars in a slightly more digestible form than a plain tuple * Example instantiation with strings for symbols * NOTE nonterminals and terminals are represented by strings * We also want to get grammars with type [grammar_etc]...
module Internal = struct let example_grammars p = let ( --> ) = p#make_rule in let _1,_2,_3 = p#_1,p#_2,p#_3 in let _E,_S,a = p#_E,p#_S,p#a in let [one;eps;x] = List.map a ["1";"";"x"] in let _EEE = p#grammar ~name:"EEE" ~descr:"Very ambiguous grammar, for testing Earley...
941dc35686b6bae4830d84a4edc34f6ce5dd6573a7128a7394526858462d7428
GracielaUSB/graciela
Monad.hs
| Module : Language . . . Monad Description : The parsing monad for Graciela Copyright : © 2015 - 2016 moises+ Stability : experimental Portability : POSIX This is a modified ParsecT monad with a custom state , operating on a stream of TokenPos . Module : Language.Graciela.Pars...
null
https://raw.githubusercontent.com/GracielaUSB/graciela/db69c8b225d6172aaa0ff90a67f4a997e4d8a0c6/src/Haskell/Language/Graciela/Parser/Monad.hs
haskell
# LANGUAGE DeriveFunctor # # LANGUAGE UndecidableInstances # # OPTIONS_HADDOCK show-extensions # , block ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ---------------------------------...
| Module : Language . . . Monad Description : The parsing monad for Graciela Copyright : © 2015 - 2016 moises+ Stability : experimental Portability : POSIX This is a modified ParsecT monad with a custom state , operating on a stream of TokenPos . Module : Language.Graciela.Pars...
06581c1f8f6e055c477b497080feab6d38c07b49133cadfbe9a5a4ce57c44294
stuartsierra/mapgraph
readme.clj
(ns com.stuartsierra.mapgraph.readme "Examples used in documentation" (:require [com.stuartsierra.mapgraph :as mg] [com.stuartsierra.mapgraph.examples :as examples])) (def db (atom (mg/new-db))) (swap! db mg/add-id-attr :user/id :color/hex) (swap! db mg/add {:user/id 1 :user/name "Pat"...
null
https://raw.githubusercontent.com/stuartsierra/mapgraph/15886ad6f2f5b1c49df0970c9cccc9e72f2afe6e/test/com/stuartsierra/mapgraph/readme.clj
clojure
:user/favorite-color [:color/hex "D50000"]} :user/favorite-color {:color/name "Red"}} :user/profession "Programmer"} => nil :user/friends #{}} :host/connections {"database" {:host/name "db"}, #error {:reason ::mg/mixed-collection, ::mg/attribute :user/friends,
(ns com.stuartsierra.mapgraph.readme "Examples used in documentation" (:require [com.stuartsierra.mapgraph :as mg] [com.stuartsierra.mapgraph.examples :as examples])) (def db (atom (mg/new-db))) (swap! db mg/add-id-attr :user/id :color/hex) (swap! db mg/add {:user/id 1 :user/name "Pat"...
cbbd284c84ae7ef1e9a9e48d0fb8177605143977c5ba163b01909e033e47b55d
ssardina/ergo
basic-elevator.scm
This is a version of the elevator domain , formalized as in original in , where the actions take numeric arguments . The basic action theory : two fluents and three actions (define-fluents floor 7 ; where the elevator is located on-buttons '(3 5)) ; the list of call buttons...
null
https://raw.githubusercontent.com/ssardina/ergo/4225ebb95779d1748f377cf2e4d0a593d6a2a103/Examples/basic-elevator.scm
scheme
where the elevator is located the list of call buttons that are on go up to floor n go down to floor n turn off the call button for floor n Get to floor n using an up action, a down action, or no action Main program: run the elevator using the above procedure
This is a version of the elevator domain , formalized as in original in , where the actions take numeric arguments . The basic action theory : two fluents and three actions (define-fluents #:prereq (< floor n) floor n) #:prereq (> floor n) floor n) on-buttons (remove n on-buttons)) (de...
da2d5e213a6868856bfc66cad5b8853b970e7c331d6d570dc9a86320420eb37f
jimcrayne/jhc
tc230.hs
{-# OPTIONS -fglasgow-exts #-} Trac # 1445 module Bug where f :: () -> (?p :: ()) => () -> () f _ _ = () g :: (?p :: ()) => () g = f () ()
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/2_pass/ghc/uncat/tc230.hs
haskell
# OPTIONS -fglasgow-exts #
Trac # 1445 module Bug where f :: () -> (?p :: ()) => () -> () f _ _ = () g :: (?p :: ()) => () g = f () ()
02871c9806ee6a9c2e8d8f49af967a71ee9cf5b415c532de80a25e3c485a58e9
diagrams/diagrams-lib
Direction.hs
# LANGUAGE DeriveFunctor # # LANGUAGE FlexibleContexts # {-# LANGUAGE TypeFamilies #-} # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # ----------------------------------------------------------------------------- -- | -- Module : Diagrams.Direction Copyright : ( c ...
null
https://raw.githubusercontent.com/diagrams/diagrams-lib/ed8276e7babecace51aad34b3dfd608847be2c47/src/Diagrams/Direction.hs
haskell
# LANGUAGE TypeFamilies # --------------------------------------------------------------------------- | Module : Diagrams.Direction License : BSD-style (see LICENSE) Maintainer : Type for representing directions, polymorphic in vector space --------------------------------------------------...
# LANGUAGE DeriveFunctor # # LANGUAGE FlexibleContexts # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # Copyright : ( c ) 2014 diagrams - lib team ( see LICENSE ) module Diagrams.Direction ( Direction , _Dir , direction, dir, fromDirection, fromDir ...
d788e3bae172ff6ebae51f5fe645e7bb5e7cb6937e137441d4c476bc2f8deff1
sealchain-project/sealchain
Repl.hs
# LANGUAGE CPP # -- | Copyright : ( C ) 2016 -- License : BSD-style (see the file LICENSE) -- module Main where #if !defined(ghcjs_HOST_OS) import qualified Pact.Main as Repl #endif main :: IO () main = #if defined(ghcjs_HOST_OS) error "Error: command line REPL does not exist in GHCJS mode" #else ...
null
https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/pact/executables/Repl.hs
haskell
| License : BSD-style (see the file LICENSE)
# LANGUAGE CPP # Copyright : ( C ) 2016 module Main where #if !defined(ghcjs_HOST_OS) import qualified Pact.Main as Repl #endif main :: IO () main = #if defined(ghcjs_HOST_OS) error "Error: command line REPL does not exist in GHCJS mode" #else Repl.main #endif
22f761b4994b1261271df71422bc791a12c20e66742c8a43a3964e90b02539c5
input-output-hk/marlowe-cardano
Codec.hs
----------------------------------------------------------------------------- -- -- Module : $Headers License : Apache 2.0 -- -- Stability : Experimental Portability : Portable -- -- | Coding and decoding. -- ----------------------------------------------------------------------------- # LANGUAG...
null
https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/78a3dbb1cd692146b7d1a32e1e66faed884f2432/marlowe-cli/src/Language/Marlowe/CLI/Codec.hs
haskell
--------------------------------------------------------------------------- Module : $Headers Stability : Experimental | Coding and decoding. --------------------------------------------------------------------------- * Codecs | Decode Bech32 data. ^ The Bech32 data. ^ Action to print the decoded da...
License : Apache 2.0 Portability : Portable # LANGUAGE FlexibleContexts # module Language.Marlowe.CLI.Codec decodeBech32 , encodeBech32 ) where import Control.Monad.Except (MonadError, MonadIO, liftIO) import Language.Marlowe.CLI.IO (liftCli, liftCliMaybe) import Language.Marlowe.CLI.Types (C...
24fdbba51101517b80d52b550fd97901d284bf0e5b083d489e69a43b25c929a0
cnuernber/avclj
av_pixfmt.clj
(ns avclj.av-pixfmt Autogenerated from avclj.av - pixfmt - data-- DO NOT EDIT "" (:require [avclj.av-pixfmt-data])) (def ^{:tag 'long} AV_PIX_FMT_0BGR avclj.av-pixfmt-data/AV_PIX_FMT_0BGR) (def ^{:tag 'long} AV_PIX_FMT_0BGR32 avclj.av-pixfmt-data/AV_PIX_FMT_0BGR32) (def ^{:tag 'long} AV_PIX_FMT_0RGB avclj.av-pixfm...
null
https://raw.githubusercontent.com/cnuernber/avclj/d0ea7338110712f29d3f0b6f127d71d59fa4552b/src/avclj/av_pixfmt.clj
clojure
(ns avclj.av-pixfmt Autogenerated from avclj.av - pixfmt - data-- DO NOT EDIT "" (:require [avclj.av-pixfmt-data])) (def ^{:tag 'long} AV_PIX_FMT_0BGR avclj.av-pixfmt-data/AV_PIX_FMT_0BGR) (def ^{:tag 'long} AV_PIX_FMT_0BGR32 avclj.av-pixfmt-data/AV_PIX_FMT_0BGR32) (def ^{:tag 'long} AV_PIX_FMT_0RGB avclj.av-pixfm...
873640d609b2b13ca408d0c6e3a09bffbe8f8222e623bc96375dbf2782662d9f
matsen/pplacer
r_plots.ml
open Ppatteries open Multiset (* the percent extra to stretch the x limits *) let relax_factor = 0.05 let int_div x y = (float_of_int x) /. (float_of_int y) let min_list l = List.reduce min l let max_list l = List.reduce max l let min_x all_dists = (1. -. relax_factor) *. (min_list all_dists) let max_x all_dists =...
null
https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/pplacer_src/r_plots.ml
ocaml
the percent extra to stretch the x limits density shows where the sample sits in the shuffled distances the data the r file
open Ppatteries open Multiset let relax_factor = 0.05 let int_div x y = (float_of_int x) /. (float_of_int y) let min_list l = List.reduce min l let max_list l = List.reduce max l let min_x all_dists = (1. -. relax_factor) *. (min_list all_dists) let max_x all_dists = (1. +. relax_factor) *. (max_list all_dists) l...
6389b95babf785153c5cf8b597d5e3fa91c668d62ef184843eadad42ccf3e8a4
evturn/haskellbook
18.02-bind.hs
import Control.Monad (join) -- Write `bind` in terms of `fmap` and `join`. bind :: Monad m => (a -> m b) -> m a -> m b bind f x = join $ f <$> x
null
https://raw.githubusercontent.com/evturn/haskellbook/3d310d0ddd4221ffc5b9fd7ec6476b2a0731274a/18/18.02-bind.hs
haskell
Write `bind` in terms of `fmap` and `join`.
import Control.Monad (join) bind :: Monad m => (a -> m b) -> m a -> m b bind f x = join $ f <$> x
279bd2f6f3504d1d623c23b6cae80d7e159ad83a1e22ae23c570fba125513e80
brownplt/lambda-py
lambdapy-test-skull.rkt
#lang racket (require "lambdapy-test-util.rkt") (full-expect ((let (x local = (undefined-val)) in (id x local)) () ()) ((err val_err) ε Σ)) (full-expect ((let (x local = (undefined-val)) in (seq (assign (id x local) := (sym "testval")) (id x local))) () ()) ((sym "testval") ε Σ)) (full-exp...
null
https://raw.githubusercontent.com/brownplt/lambda-py/c3ee39502c8953d36b886e5a203f2eb51d2f495b/redex/lambdapy-test-skull.rkt
racket
#lang racket (require "lambdapy-test-util.rkt") (full-expect ((let (x local = (undefined-val)) in (id x local)) () ()) ((err val_err) ε Σ)) (full-expect ((let (x local = (undefined-val)) in (seq (assign (id x local) := (sym "testval")) (id x local))) () ()) ((sym "testval") ε Σ)) (full-exp...
0d7e9e7358a52c6aa36cb649956572651822f2d12a9f6563ab91163e616957c2
Clozure/ccl-tests
make-broadcast-stream.lsp
;-*- Mode: Lisp -*- Author : Created : Thu Jan 29 21:28:25 2004 ;;;; Contains: Tests of MAKE-BROADCAST-STREAM (in-package :cl-test) (deftest make-broadcast-stream.1 (let ((s (make-broadcast-stream))) (assert (typep s 'stream)) (assert (typep s 'broadcast-stream)) (assert (output-stream-p ...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/make-broadcast-stream.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of MAKE-BROADCAST-STREAM (assert (not (input-stream-p s))) (assert (eq (stream-element-type s) t)) (assert (not (input-stream-p s))) (assert (not (input-stream-p s))) Add tests for: close, peek-char, read-char-no-hang, terpri, fresh-line, unread-char, read-line, write-li...
Author : Created : Thu Jan 29 21:28:25 2004 (in-package :cl-test) (deftest make-broadcast-stream.1 (let ((s (make-broadcast-stream))) (assert (typep s 'stream)) (assert (typep s 'broadcast-stream)) (assert (output-stream-p s)) (assert (open-stream-p s)) (assert (streamp s)) (value...
0b91cd8ab441cd7b16004a0c547b80105034134366eae48b348e21cb812b7e4d
hiroshi-unno/coar
synthesizer.ml
open Core open Common open Common.Util open PCSatCommon module Config = struct type strategy = | Template of TBSynthesizer.Config.t (** configuration for TBSynthesizer *) * configuration for CBSynthesizer [ DT / GSC / SCQM / LTB ] * configuration for PASynthesizer [ PASAT / PASID ] [@@ deriving yojson] type ...
null
https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/PCSat/synthesis/synthesizer.ml
ocaml
* configuration for TBSynthesizer * check whether candidates satisfy the examples * refine candidates until they satisfy the examples Or_error.error_string "Error in Synthesizer.check_candidates"
open Core open Common open Common.Util open PCSatCommon module Config = struct type strategy = * configuration for CBSynthesizer [ DT / GSC / SCQM / LTB ] * configuration for PASynthesizer [ PASAT / PASID ] [@@ deriving yojson] type t = { verbose: bool; strategy: strategy; } [@@ deriving yojson] let...
aca1db8b79fb717b108ee420b41e0d6ab9f1f0ad0afb106861a2ed2b549e69a0
orionsbelt-battlegrounds/obb-rules
raptor.cljc
(ns obb-rules.units.raptor) (def metadata {:name "raptor" :code "rp" :attack 280 :defense 400 :range 2 :value 20 :bonus {:attack {:category {:light 1000}}} :type :mechanic :category :light :displacement :air :movement-type :all :movement-cost 1})
null
https://raw.githubusercontent.com/orionsbelt-battlegrounds/obb-rules/97fad6506eb81142f74f4722aca58b80d618bf45/src/obb_rules/units/raptor.cljc
clojure
(ns obb-rules.units.raptor) (def metadata {:name "raptor" :code "rp" :attack 280 :defense 400 :range 2 :value 20 :bonus {:attack {:category {:light 1000}}} :type :mechanic :category :light :displacement :air :movement-type :all :movement-cost 1})
848c8d16c89b524d3e97250e137e0e0753495206bab908768ea3a1cc1bcc32dc
gafiatulin/codewars
Employee.hs
-- Disgruntled Employee -- / module Codewars.Kata.Employee where off :: Integer -> [Integer] off n = takeWhile (<=n) . map (^2) $ [1..]
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/6%20kyu/Employee.hs
haskell
Disgruntled Employee /
module Codewars.Kata.Employee where off :: Integer -> [Integer] off n = takeWhile (<=n) . map (^2) $ [1..]
e5ec4704b8c8c7548d477700eae267bbef51c02689c37461f6332b879b821450
turnbullpress/aom-code
collectd.clj
(ns examplecom.etc.collectd (:require [clojure.tools.logging :refer :all] [riemann.streams :refer :all] [clojure.string :as str] [clojure.walk :as walk])) (defn docker-attribute-map [attributes] (let [instance (str/split (str/replace attributes #"^.*\[(.*)\]$" "$1") #",")] ...
null
https://raw.githubusercontent.com/turnbullpress/aom-code/2c016cab87d81bcd1f04ab41b6824798eb09e780/9/riemann/examplecom/etc/collectd.clj
clojure
(ns examplecom.etc.collectd (:require [clojure.tools.logging :refer :all] [riemann.streams :refer :all] [clojure.string :as str] [clojure.walk :as walk])) (defn docker-attribute-map [attributes] (let [instance (str/split (str/replace attributes #"^.*\[(.*)\]$" "$1") #",")] ...
2c332fc19eaeb9e23f811859d872fe9de11d31d77da2cae94d3af169c2f1418b
gren-lang/compiler
Build.hs
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -Wno-unused-do-bind #-} module Build ( fromExposed, fromPaths, fromRepl, Artifacts (..), Root (..), Module (..), CachedInterface (..), ReplArtifacts (..), DocsGoal (..), getRoot...
null
https://raw.githubusercontent.com/gren-lang/compiler/5ec14c10db01438d7dd51539908abb9a377090e6/builder/src/Build.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # OPTIONS_GHC -Wno-unused-do-bind # ENVIRONMENT FORK PERF try using IORef semephore on file crawl phase? FROM EXPOSED crawl compile FROM PATHS crawl compile GET ROOT NAMES CHECK MODULE TO IMPORT ERROR LOAD CACHED INTERFACES CHECK...
module Build ( fromExposed, fromPaths, fromRepl, Artifacts (..), Root (..), Module (..), CachedInterface (..), ReplArtifacts (..), DocsGoal (..), getRootNames, ) where import AST.Canonical qualified as Can import AST.Optimized qualified as Opt import AST.Source qualified as Src...
50da040e6dbfd3fea0d2df6b3771ea6726117c935f9119131651f23eeae02d03
webyrd/n-grams-for-synthesis
compare-code-and-srfi.scm
(define code-names (with-input-from-file "generic-arrays.scm" (lambda () (let loop ((result '()) (obj (read))) ;; (pp obj) ;;; make sure all functions are defined with (define (a b) ...) (if (##eof-object? obj) result (if (and (list? obj) (not (null? obj)) (eq? (car obj) 'defin...
null
https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-122/compare-code-and-srfi.scm
scheme
(pp obj) ;;; make sure all functions are defined with (define (a b) ...) (pp obj) ;;; make sure all functions are defined with (define (a b) ...)
(define code-names (with-input-from-file "generic-arrays.scm" (lambda () (let loop ((result '()) (obj (read))) (if (##eof-object? obj) result (if (and (list? obj) (not (null? obj)) (eq? (car obj) 'define) (not (null? (cdr obj))) (list? (cadr obj)) (not (null?...
85bd620baa3572805d28274d6969ee3b02cafb6ccf08b9f22058bf1b0f3607ac
mokus0/junkbox
BiQuad.hs
Digital biquadratic filters -- {-# LANGUAGE BangPatterns #-} # LANGUAGE DeriveFunctor # # LANGUAGE FlexibleContexts # # LANGUAGE RecordWildCards # module Math.BiQuad where import Control.Monad import Control.Monad.Trans import Control.Monad.Trans.State import Data.Bits import Data.Complex import Data.IORef import D...
null
https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/Math/BiQuad.hs
haskell
# LANGUAGE BangPatterns # sigbits/exponent accounting (in {- s/e -} comments) should be thorough enough that, assuming no silly errors, it can pretty easily be extended to a proof that overflow is impossible. Rounding can be improved slightly in a couple places by adding terms before rounding, but I didn't d...
Digital biquadratic filters # LANGUAGE DeriveFunctor # # LANGUAGE FlexibleContexts # # LANGUAGE RecordWildCards # module Math.BiQuad where import Control.Monad import Control.Monad.Trans import Control.Monad.Trans.State import Data.Bits import Data.Complex import Data.IORef import Data.Int import Data.Random import ...
0022e871b9d8096e16001b262306c2a5c0c45f8667bee4d1d29e97e69760cd8b
bitemyapp/fp-course
Extend.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE ScopedTypeVariables # # LANGUAGE InstanceSigs # module Course.Extend where import Course.Core import Course.ExactlyOne import Course.List import Course.Optional import Course.Functor | All instances of the ` Extend ` type - class must satisfy one law . This law -- is not c...
null
https://raw.githubusercontent.com/bitemyapp/fp-course/a9a325cd895a0953151ec3d02f40006eb7993fb8/src/Course/Extend.hs
haskell
is not checked by the compiler. This law is given as: * The law of associativity `∀f g. (f <<=) . (g <<=) ≅ (<<=) (f . (g <<=))` Pronounced, extend. >>> id <<= ExactlyOne 7 >>> length <<= ('a' :. 'b' :. 'c' :. Nil) [3,2,1] [[1,2,3,4],[2,3,4],[3,4],[4]] [[[4,5,6],[1,2,3]],[[4,5,6]]] >>> id <<= Empty ...
# LANGUAGE NoImplicitPrelude # # LANGUAGE ScopedTypeVariables # # LANGUAGE InstanceSigs # module Course.Extend where import Course.Core import Course.ExactlyOne import Course.List import Course.Optional import Course.Functor | All instances of the ` Extend ` type - class must satisfy one law . This law class Funct...
64bb5aa2fe08472a78a1abd1258a6a812e3167b906ec7a2a6b3140d93d094e77
herbelin/coq-hh
evar_tactics.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/tactics/evar_tactics.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** The instantiate tactic
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Term open Util open Evar...
b147e21940452bae26c71610c4eb5d4227f72c6a828ca30585896c1a2013a5b3
ergenekonyigit/trendcat
dev.cljs
(ns ^:figwheel-no-load trendcat.dev (:require [trendcat.core :as core] [devtools.core :as devtools])) (enable-console-print!) (devtools/install!) (core/init!)
null
https://raw.githubusercontent.com/ergenekonyigit/trendcat/6e12fa78df75f1421a1c32c88bd27ac11a599d86/env/dev/cljs/trendcat/dev.cljs
clojure
(ns ^:figwheel-no-load trendcat.dev (:require [trendcat.core :as core] [devtools.core :as devtools])) (enable-console-print!) (devtools/install!) (core/init!)
97ab2ca9994511e9d0dd96faaad7d0c039163b8eb9e4d423353f85a27e41de24
wireapp/wire-server
User.hs
# LANGUAGE DeriveGeneric # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE RecordWildCards # -- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero Genera...
null
https://raw.githubusercontent.com/wireapp/wire-server/7cd0a9c1dc423f87d46ad86fccaced93c6147fb1/libs/wire-api/src/Wire/API/User.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under 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 PARTI...
# LANGUAGE DeriveGeneric # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE RecordWildCards # Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have...
a92fd16cf7a921dec1d78f61d8594e0b4d64882a926bd4acc53e43d639cabf35
spawnfest/eep49ers
tftp_test_lib.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2007 - 2018 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applic...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/tftp/test/tftp_test_lib.erl
erlang
%CopyrightBegin% 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 l...
Copyright Ericsson AB 2007 - 2018 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(tftp_test_lib). -compile(export_all). -include("tftp_test_lib.hrl"). init_per_testcase(_Case, Config) wh...
6ad0146cdd0ceb6def0b3d8c1f66ddeebce3ce3cf0664df4329f3e715a31f6a6
pierric/fei-nn
Class.hs
# LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # module MXNet.NN.DataIter.Class where import GHC.Exts (Constraint) import RIO import RIO.Prelude.Types (MonadTrans) Available instances include ' LVec ' and mxnet data - iters in package < -dataiter mxnet - dataiter > class Dataset (d :: (* ->...
null
https://raw.githubusercontent.com/pierric/fei-nn/dccc6e3ed9f029862e61ae78e52eb7e9896c8550/src/MXNet/NN/DataIter/Class.hs
haskell
| Create Dataset from `[]`. note that depending on the instance, it may or may not work with infinitive list. | Get number of elements | Get the batch size of the dataset
# LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # module MXNet.NN.DataIter.Class where import GHC.Exts (Constraint) import RIO import RIO.Prelude.Types (MonadTrans) Available instances include ' LVec ' and mxnet data - iters in package < -dataiter mxnet - dataiter > class Dataset (d :: (* ->...
17036972c0c493220256983f644dec18b5a3a70eb717da716c8fd4843deb92a5
tov/shcaml
anyShtream.mli
vim : set (** * Functor to create type-aware shtream modules. The base shtream * module {!Shtream} is indifferent to the element type. The functor * {!AnyShtream.Make}, on the other hand, produces a module with shtream * functions that know how read shtream from and write shtreams to * channels without a u...
null
https://raw.githubusercontent.com/tov/shcaml/43ae852a00e3a11520f90f2451baa71863409774/lib/anyShtream.mli
ocaml
* * Functor to create type-aware shtream modules. The base shtream * module {!Shtream} is indifferent to the element type. The functor * {!AnyShtream.Make}, on the other hand, produces a module with shtream * functions that know how read shtream from and write shtreams to * channels without a user-supplied reade...
vim : set module type ELEM = sig type 'a elem type initial * The parameter to { ! elem } for values returned by conversions from * strings . That is , [ initial elem ] is the type of shtream elements when * first read from a string or channel . * strings. That is, [initial elem] is the type ...
39c729dbba0a972bfdfca25be04b802c00c116c53ff777343a3fae0d71827098
tari3x/csec-modex
simplify1.mli
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
null
https://raw.githubusercontent.com/tari3x/csec-modex/5ab2aa18ef308b4d18ac479e5ab14476328a6a50/deps/cryptoverif1.12/src/simplify1.mli
ocaml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
ed0fd08231c04e560dfcfbb98ecba515bb947fd001b1529032fdb860ff9ddd85
qkrgud55/ocamlmulti
location.mli
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/parsing/location.mli
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ I d : location.mli 12800 2012 - 07 ...
6a8ff316ff05755f08695e4f0e03524b125852eae2cb5221d43488e4a2ff1c68
tezos/tezos-mirror
main_dac.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2022 Nomadic Labs , < > Copyright ( c ) 2023...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/e80cd05842991197ea613a937434a9cd43026b04/src/bin_dac_node/main_dac.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2022 Nomadic Labs , < > Copyright ( c ) 2023 TriliTech , < > 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 " , WITH...
eb481ffd8b4d413885b431596b733ac756c4d0b17854a690d6d549e35dd0b9e1
GAumala/TranslateJPBot
JMdictEntryTree.hs
{-# LANGUAGE OverloadedStrings #-} module Data.JMdictEntryTree (EntryNode, jmdictEntryTreeFromFile, lookupWord, printLookup, showLookupResult) where import Text.XML.JMdictParser import Data.List (foldl') import Data.Maybe import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.IO as TextIO...
null
https://raw.githubusercontent.com/GAumala/TranslateJPBot/af008f0f3a2a13079982b8de5966a3903194380d/src/Data/JMdictEntryTree.hs
haskell
# LANGUAGE OverloadedStrings #
module Data.JMdictEntryTree (EntryNode, jmdictEntryTreeFromFile, lookupWord, printLookup, showLookupResult) where import Text.XML.JMdictParser import Data.List (foldl') import Data.Maybe import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.IO as TextIO import Data.RedBlackTree data Ent...
c96f83dae19e948060d49deeb3d660905f3d1d06add30ee96c3d8712c7e39940
BekaValentine/SimpleFP-v2
Unification.hs
{-# OPTIONS -Wall #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE UndecidableInstances # -- | This module defines unification of dependent types. module Require.Unification.Unification where import Utils.ABT im...
null
https://raw.githubusercontent.com/BekaValentine/SimpleFP-v2/ae00ec809caefcd13664395b0ae2fc66145f6a74/src/Require/Unification/Unification.hs
haskell
# OPTIONS -Wall # # LANGUAGE TypeSynonymInstances # | This module defines unification of dependent types. | Equating terms by trivial structural equations. | Equating case motives as a special helper for the main 'equate' method. Equating clauses as a special helper for the main 'equate' method.
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # module Require.Unification.Unification where import Utils.ABT import Utils.Elaborator import Utils.Names import Utils.Pretty import Utils.Telescope import Utils.Unifier import Requi...
7fe7e34be0daa119722d824ac388ead1dd07b393776344388f5538c6e2e75436
thephoeron/quipper-language
SimpleOracleSimulation.hs
This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the -- file COPYRIGHT for a list of authors, copyright holders, licensing, -- and other details. All rights reserved. -- -- ====================================================================== -- | A test file to simulate various decompositio...
null
https://raw.githubusercontent.com/thephoeron/quipper-language/15e555343a15c07b9aa97aced1ada22414f04af6/tests/SimpleOracleSimulation.hs
haskell
file COPYRIGHT for a list of authors, copyright holders, licensing, and other details. All rights reserved. ====================================================================== | A test file to simulate various decompositions of the simple oracle circuit, from the BWT algorithm. | Extract the circuit from an ...
This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the import Quipper import QuipperLib.Simulation import QuipperLib.Decompose import other Quipper stuff import Algorithms.BWT.Alternative import Libraries.Auxiliary oracleCircuit :: Oracle -> Int -> Int -> Circ (Qubit,[Qubit]) oracleCircuit ...
9518df78e2ef21a07eb787d6a72b9614757bdd2ecc332646689096a3724953e4
rd--/hsc3
bGen.help.hs
-- bGenSin1Tbl ; osc let tbl = bGenSine1Tbl ("tbl", 0, 8192) [1, 1/2, 1/3, 1/4, 1/5] in osc ar tbl 220 0 * 0.1 bGenSin1Tbl ; bufRd let tbl = bGenSine1Tbl ("tbl", 0, 8192) [1, 1/2, 1/3, 1/4, 1/5] x = mouseX kr 220 440 Exponential 0.2 phase = linLin (lfSaw ar x 0) (-1) 1 0 1 * bufFrames kr tbl in bufRdC 1 ar t...
null
https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Ugen/bGen.help.hs
haskell
bGenSin1Tbl ; osc -- ; sine1 table setup ; allocate and generate wavetable buffer ; sin harmonics -- ; print scsynth, the interpreter value that holds the reference that stores the end brackets
let tbl = bGenSine1Tbl ("tbl", 0, 8192) [1, 1/2, 1/3, 1/4, 1/5] in osc ar tbl 220 0 * 0.1 bGenSin1Tbl ; bufRd let tbl = bGenSine1Tbl ("tbl", 0, 8192) [1, 1/2, 1/3, 1/4, 1/5] x = mouseX kr 220 440 Exponential 0.2 phase = linLin (lfSaw ar x 0) (-1) 1 0 1 * bufFrames kr tbl in bufRdC 1 ar tbl phase Loop * 0.1 ...
e349e63742edf2ddff4771749300cdd4e29fbff1d05fa90ce39f284a4a9f019b
haskell/cabal
cabal.test.hs
import Test.Cabal.Prelude -- Absolute path. main = cabalTest $ fails $ cabal "check" []
null
https://raw.githubusercontent.com/haskell/cabal/1cfe7c4c7257aa7ae450209d34b4a359e6703a10/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Paths/AbsolutePath/cabal.test.hs
haskell
Absolute path.
import Test.Cabal.Prelude main = cabalTest $ fails $ cabal "check" []
1f1195284659170491eb08b432fa958c3376c7b7536c285e4ef82703496b7ef6
seriyps/mtproto_proxy
mtp_handler.erl
@author < > ( C ) 2018 , %%% @doc MTProto proxy network layer %%% @end Created : 9 Apr 2018 by < > -module(mtp_handler). -behaviour(gen_server). -behaviour(ranch_protocol). %% API -export([start_link/4, send/2]). -export([hex/1, unhex/1]). -export([keys_str/0]). %% Callbacks -export([ranch_init/1]...
null
https://raw.githubusercontent.com/seriyps/mtproto_proxy/9cb198488915f76055ad5955cdcb2cdcd0f4fd98/src/mtp_handler.erl
erlang
@doc @end API Callbacks Decrease if CPU is cheaper than RAM IP/Port of remote side APIs Callbacks Custom gen_server init {recbuf, ?MAX_SOCK_BUF_SIZE}, telegram server -> proxy srv_error_filter is 'off' telegram server -> proxy Server replied with server error; it might be another kind of replay attack; D...
@author < > ( C ) 2018 , MTProto proxy network layer Created : 9 Apr 2018 by < > -module(mtp_handler). -behaviour(gen_server). -behaviour(ranch_protocol). -export([start_link/4, send/2]). -export([hex/1, unhex/1]). -export([keys_str/0]). -export([ranch_init/1]). -export([init/1, handle_call/3, han...
3488c4c2a781a67c2005c449d1b1700a8f214f2527152b29cb55b058950f5f0f
kovasb/gamma-driver
plot.cljs
(ns gamma.webgl.plot (:require [gamma.api :as g] [gamma.program :as p] [gamma.webgl.routines.basic :as r] [gamma.webgl.shader :as shader] [gamma.webgl.drivers.basic :as driver] [clojure.walk :as walk])) (def x (g/varying "x" :float :mediump)) (def y (g/varying "y" :float :mediump)) (def co...
null
https://raw.githubusercontent.com/kovasb/gamma-driver/abe0e1dd01365404342f4e8e04263e48c4648b6e/test/gamma/webgl/plot.cljs
clojure
(ns gamma.webgl.plot (:require [gamma.api :as g] [gamma.program :as p] [gamma.webgl.routines.basic :as r] [gamma.webgl.shader :as shader] [gamma.webgl.drivers.basic :as driver] [clojure.walk :as walk])) (def x (g/varying "x" :float :mediump)) (def y (g/varying "y" :float :mediump)) (def co...
ece9305ba3171955e6004476e79a6b58ee4a53f5e7d858ede82b7748c6398732
typeclasses/leanpub
createCoupons.hs
{-# LANGUAGE OverloadedStrings #-} import Leanpub.Concepts import Leanpub.Wreq import Data.Text.IO (appendFile) import Prelude hiding (appendFile) -- Read the API key from a file config = configKeyFile "/home/chris/.config/typeclasses/leanpub-api-key.txt" -- Which book we're creating coupons for slug = BookSlug "fi...
null
https://raw.githubusercontent.com/typeclasses/leanpub/d7c70148bb2bf3acf0500a5b7f1e014138af5585/examples/createCoupons.hs
haskell
# LANGUAGE OverloadedStrings # Read the API key from a file Which book we're creating coupons for A note reminding us why the coupon was issued Each coupon can be used at most twice After creating each coupon, append it to a file
import Leanpub.Concepts import Leanpub.Wreq import Data.Text.IO (appendFile) import Prelude hiding (appendFile) config = configKeyFile "/home/chris/.config/typeclasses/leanpub-api-key.txt" slug = BookSlug "finding-success-in-haskell" note = CouponNote "Free for Type Classes subscriber" uses = CouponMaxUses 2 sav...
8f6bc62667d2753813f09aff7e4a1b6d9fa65c67f6b021cf138db23b57047fa4
CryptoKami/cryptokami-core
PriorityLock.hs
{-| Module: Pos.Util.Concurrent.PriorityLock Description: Provides a prioritised lock Provides a lock that can be taken with either high or low precedence. Within each precedence, the lock is taken in FIFO order. -} module Pos.Util.Concurrent.PriorityLock ( PriorityLock , Priority (..) , new...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/util/Pos/Util/Concurrent/PriorityLock.hs
haskell
| Module: Pos.Util.Concurrent.PriorityLock Description: Provides a prioritised lock Provides a lock that can be taken with either high or low precedence. Within each precedence, the lock is taken in FIFO order. ^ locked, with a queue of contenders with high precedence, and uncontended, acquire lock, no one is ...
module Pos.Util.Concurrent.PriorityLock ( PriorityLock , Priority (..) , newPriorityLock , withPriorityLock ) where import Control.Concurrent.STM (TMVar, newEmptyTMVar, putTMVar, takeTMVar) import Universum import Pos.Util.Queue (Q, dequeue, enqueue, q...
cfd629edd4581e3b34f246499fdbd3ff923fe0bc3ca0227f71a76d9768178dc6
softwarelanguageslab/maf
R5RS_WeiChenRompf2019_the-little-schemer_ch1-2.scm
; Changes: * removed : 2 * added : 0 * swaps : 1 ; * negated predicates: 0 ; * swapped branches: 0 * calls to i d fun : 1 (letrec ((atom? (lambda (x) (if (not (pair? x)) (not (null? x)) #f)))) (atom? 'atom) (atom? 'turkey) (atom? 1942) (atom? 'u) (atom? '*abc$) (<change> ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_WeiChenRompf2019_the-little-schemer_ch1-2.scm
scheme
Changes: * negated predicates: 0 * swapped branches: 0
* removed : 2 * added : 0 * swaps : 1 * calls to i d fun : 1 (letrec ((atom? (lambda (x) (if (not (pair? x)) (not (null? x)) #f)))) (atom? 'atom) (atom? 'turkey) (atom? 1942) (atom? 'u) (atom? '*abc$) (<change> (list? (__toplevel_cons 'atom ())) ((lambda (x) x) (l...
7d5932f12ffce851975e247d0f093d4d87fea639c41a88c9bab4760aa5472ccd
TorXakis/TorXakis
TxsUtils.hs
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} # LANGUAGE FlexibleContexts # # LANG...
null
https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/defs/src/TxsUtils.hs
haskell
# LANGUAGE OverloadedStrings # ----------------------------------------------------------------------------------------- -- -- -- ------...
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} # LANGUAGE FlexibleContexts # # LANG...
41a9656b84fbf9b402385ce3aefd19fa15831e86cc1142e5a2c6cb937f4e022e
lopusz/langlab
ngrams.clj
(ns langlab.core.ngrams "Module contains n-gram generation function.") (defn gen-ngrams "Function generates n-grams from a given 'tokens' sequence. The following invocations are possible: - `(gen-n-grams n tokens)` - generates all n-grams - `(gen-n-grams n m tokens)` - generates all n-grams,(n+1)-grams,...
null
https://raw.githubusercontent.com/lopusz/langlab/dd075c9f4ef3594defe16b88bab8460db23c7c75/src/main/clojure/langlab/core/ngrams.clj
clojure
(ns langlab.core.ngrams "Module contains n-gram generation function.") (defn gen-ngrams "Function generates n-grams from a given 'tokens' sequence. The following invocations are possible: - `(gen-n-grams n tokens)` - generates all n-grams - `(gen-n-grams n m tokens)` - generates all n-grams,(n+1)-grams,...