_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
699c4a904a3aee58db0397d9c92a7ebbb461dcf1d37b8f78f80b5854219e1550
CardanoSolutions/kupo
MonadOuroboros.hs
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 /. # LANGUAGE RecordWildCards # module Kupo.Control.MonadOuroboros * MonadOuroboros (..) -- * Health Reporting , Connectio...
null
https://raw.githubusercontent.com/CardanoSolutions/kupo/4904123abeed53f672eb34e0ef10c6c710bda61b/src/Kupo/Control/MonadOuroboros.hs
haskell
* Health Reporting * Types
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 /. # LANGUAGE RecordWildCards # module Kupo.Control.MonadOuroboros * MonadOuroboros (..) , ConnectionStatusToggle (..) , Ne...
47b791572cb7a56c3f0f93952f97aa44de3630fc28330a37d520d3c3446cb69f
hasufell/hpath
GetDirsFilesSpec.hs
{-# LANGUAGE OverloadedStrings #-} module System.Posix.RawFilePath.Directory.GetDirsFilesSpec where import Data.List ( sort ) import "hpath-directory" System.Posix.RawFilePath.Directory hiding (getDirsFiles') import System.Posix.FilePath import Test.Hspec import System.IO.Error ( ioeGetErrorType ) im...
null
https://raw.githubusercontent.com/hasufell/hpath/9fcc1890596e5b838bf3be9ed303165fbc692d11/hpath-directory/test/System/Posix/RawFilePath/Directory/GetDirsFilesSpec.hs
haskell
# LANGUAGE OverloadedStrings # successes -- posix failures --
module System.Posix.RawFilePath.Directory.GetDirsFilesSpec where import Data.List ( sort ) import "hpath-directory" System.Posix.RawFilePath.Directory hiding (getDirsFiles') import System.Posix.FilePath import Test.Hspec import System.IO.Error ( ioeGetErrorType ) import GHC.IO.Exception ( IOErr...
f1ab2dc0e4ff871fd41e5fff952d1986d1e4b36d9ea4a19eae73bafc2b90dccd
OCADml/OCADml
math.mli
* Various operations on floats ( { i e.g. } approximate equality , linear interpolation ) , and basic arbitrary size 2d matrix operations . interpolation), and basic arbitrary size 2d matrix operations. *) * { 1 Float operations } * [ sign v ] Return the sign of [ v ] as a float ( [ -1 . ] , [ 0 . ] ...
null
https://raw.githubusercontent.com/OCADml/OCADml/ceed2bfce640667580f7286b46864a69cdc1d4d7/lib/math.mli
ocaml
* [clamp ~min ~max v] Clamp the float [v] between [min] and [max]. * [lerpn ?endpoint a b n] Linearly interpolate [n] values between [a] and [b]. If [endpoint] is [true], the last value will be equal to [b], otherwise, it will be about [a + (b - a) * (1 - 1 / n)]. * [approx ?eps a b] Return [tr...
* Various operations on floats ( { i e.g. } approximate equality , linear interpolation ) , and basic arbitrary size 2d matrix operations . interpolation), and basic arbitrary size 2d matrix operations. *) * { 1 Float operations } * [ sign v ] Return the sign of [ v ] as a float ( [ -1 . ] , [ 0 . ] ...
767417ef4399aeb483741673bb986935daa77156a59e817d6a7d81fb6f5d509d
coq/coq
nativelibrary.mli
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * *...
null
https://raw.githubusercontent.com/coq/coq/110921a449fcb830ec2a1cd07e3acc32319feae6/kernel/nativelibrary.mli
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team // * This file is distributed under the terms of the * (see LICENSE file for the text of the license) ************************************...
v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser Gener...
eddd0b2980c41251faa281429eb895b4deddc49c1194bba7150774a7917cea03
abailly/xxi-century-typed
TypeSpec.hs
# LANGUAGE TypeApplications # module Minilang.TypeSpec where import qualified Data.Text as Text import Minilang.Env import Minilang.Eval import Minilang.Parser import Minilang.Primitives import Minilang.Type import Test.Hspec spec :: Spec spec = parallel $ describe "Type Checker" $ do describe "Typing Co...
null
https://raw.githubusercontent.com/abailly/xxi-century-typed/89df5eab3747ddb0ea37030ddb1947fb8c14265b/minilang/test/Minilang/TypeSpec.hs
haskell
nelist = (Pi (B "A") (U 0) (U 0)) ( Abs (B "A") ) let ρ' = extend nelist ρ t ( SumClos ( ] ) )
# LANGUAGE TypeApplications # module Minilang.TypeSpec where import qualified Data.Text as Text import Minilang.Env import Minilang.Eval import Minilang.Parser import Minilang.Primitives import Minilang.Type import Test.Hspec spec :: Spec spec = parallel $ describe "Type Checker" $ do describe "Typing Co...
ed63a0ec506044084fb91210c3b3a6d8f19f25c49b76c864f05d67bff08a3406
rpav/defpackage-plus
package-plus.lisp
(in-package :defpackage+-user-1) (defpackage+ :defpackage-plus-1 (:nicknames #:defpackage+-1) (:export-only The Macro #:defpackage+ #:defpackage+-dispatch ;; Ensuring package qualities #:ensure-use-only #:ensure-package #:ensure-nicknames #:ensure-export #:ensure-export-only #:ensure...
null
https://raw.githubusercontent.com/rpav/defpackage-plus/5492e27e0bdb7b75fa5177ea4388519dc7a75f11/src/package-plus.lisp
lisp
Ensuring package qualities Importing/Inheriting Utility
(in-package :defpackage+-user-1) (defpackage+ :defpackage-plus-1 (:nicknames #:defpackage+-1) (:export-only The Macro #:defpackage+ #:defpackage+-dispatch #:ensure-use-only #:ensure-package #:ensure-nicknames #:ensure-export #:ensure-export-only #:ensure-export-warning #:import-from...
21e818e1e77305a7d647af964671f9894b5ea0ea8483e4a5c74414a549413f5b
tomgr/libcspm
Types.hs
# LANGUAGE FlexibleInstances , MultiParamTypeClasses , TypeSynonymInstances # TypeSynonymInstances #-} module CSPM.Syntax.Types ( -- * Data Structures TypeVar, TypeScheme(..), Constraint(..), Type(..), TypeVarRef(..), prettyPrintTypes, isRigid, constraintImpliedBy, reduceConstraints, collectCo...
null
https://raw.githubusercontent.com/tomgr/libcspm/24d1b41954191a16e3b5e388e35f5ba0915d671e/src/CSPM/Syntax/Types.hs
haskell
* Data Structures * Creation of Types * Symbol Tables * Type Pointers ************************************************************************* Types ************************************************************************* | Comparable for equality | Orderable | Can be input on a channel | Can form sets of ...
# LANGUAGE FlexibleInstances , MultiParamTypeClasses , TypeSynonymInstances # TypeSynonymInstances #-} module CSPM.Syntax.Types ( TypeVar, TypeScheme(..), Constraint(..), Type(..), TypeVarRef(..), prettyPrintTypes, isRigid, constraintImpliedBy, reduceConstraints, collectConstraints, prettyPrintTyp...
d3cca167131f121eedf00472df45226de6069c75fd589a79165b068f92deccee
OCamlPro/alt-ergo
solving_loop.ml
(******************************************************************************) (* *) (* The Alt-Ergo theorem prover *) Copyright ( C ) 2006 - 2013 ...
null
https://raw.githubusercontent.com/OCamlPro/alt-ergo/b276f69165c4e6742817b1129b2209e98f752ad6/src/bin/common/solving_loop.ml
ocaml
**************************************************************************** The Alt-Ergo theorem prover ...
Copyright ( C ) 2006 - 2013 ...
2ea8656dafd022ccfbbcb4aaaf8ffb2c70f22267399cfda6e23204e6aa4e5557
ferdinand-beyer/refx
views.cljs
(ns todomvc.helix.views (:require [helix.core :refer [defnc $ <>]] [helix.hooks :refer [use-state]] [helix.dom :as d] [refx.alpha :refer [use-sub dispatch]] [clojure.string :as str])) (defnc todo-input [{:keys [title on-save on-stop] :as props}] (let [[val set-val!]...
null
https://raw.githubusercontent.com/ferdinand-beyer/refx/27651b5d650a9651d191326ecdb4bcb0e42e3230/examples/helix/src/todomvc/helix/views.cljs
clojure
(ns todomvc.helix.views (:require [helix.core :refer [defnc $ <>]] [helix.hooks :refer [use-state]] [helix.dom :as d] [refx.alpha :refer [use-sub dispatch]] [clojure.string :as str])) (defnc todo-input [{:keys [title on-save on-stop] :as props}] (let [[val set-val!]...
d076e4982293408397d43fa329d778beea0b5dec363ed83362a7cdbf81ac609a
clojure-emacs/sayid
recording_test.clj
(ns com.billpiel.sayid.recording-test (:require [clojure.test :as t] [com.billpiel.sayid.recording :as r] [com.billpiel.sayid.workspace :as w] [com.billpiel.sayid.test-utils :as t-utils])) (t/deftest recording (with-redefs [gensym (t-utils/mock-gensym-fn)] (let [shelf '$rec ...
null
https://raw.githubusercontent.com/clojure-emacs/sayid/27f35778de9509067716a7bed14306787334a589/test/com/billpiel/sayid/recording_test.clj
clojure
(ns com.billpiel.sayid.recording-test (:require [clojure.test :as t] [com.billpiel.sayid.recording :as r] [com.billpiel.sayid.workspace :as w] [com.billpiel.sayid.test-utils :as t-utils])) (t/deftest recording (with-redefs [gensym (t-utils/mock-gensym-fn)] (let [shelf '$rec ...
5f26002e784dea1b33c90ee3b5c0506ab0ae588061b0ad806a76eee3d84cdf6c
cstar/ejabberd-old
ejabberd_auth_anonymous.erl
%%%---------------------------------------------------------------------- %%% File : ejabberd_auth_anonymous.erl Author : < > %%% Purpose : Anonymous feature support in ejabberd Created : 17 Feb 2006 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne %%% %%% This program is free softwa...
null
https://raw.githubusercontent.com/cstar/ejabberd-old/559f8b6b0a935710fe93e9afacb4270d6d6ea00f/src/ejabberd_auth_anonymous.erl
erlang
---------------------------------------------------------------------- File : ejabberd_auth_anonymous.erl Purpose : Anonymous feature support in ejabberd 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...
Author : < > Created : 17 Feb 2006 by < > ejabberd , Copyright ( C ) 2002 - 2010 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 Founda...
2420216fbf7088e0549ee4c7ab9875952737463f360df38338af1572aa6a4146
facundoolano/advenjure
rooms.cljc
(ns advenjure.rooms (:require [advenjure.items :refer [iname describe-container print-list-item]] [clojure.string :as string] [advenjure.gettext.core :refer [_]])) (defn make [name description & {:as extras}] (merge {:name name :description description} {:items #{} :item-descriptio...
null
https://raw.githubusercontent.com/facundoolano/advenjure/2f05fdae9439ab8830753cc5ef378be66b7db6ef/src/advenjure/rooms.cljc
clojure
default args, can be overriden by extras items currently in the room items in the room with custom description string of custom descriptions (skip if blank) put a space between room and custom descriptions if any get room items with no custom description ROOM MAP BUILDING direction pairs keep visited merge per ro...
(ns advenjure.rooms (:require [advenjure.items :refer [iname describe-container print-list-item]] [clojure.string :as string] [advenjure.gettext.core :refer [_]])) (defn make [name description & {:as extras}] (merge {:name name :description description} extras)) (defn names [roo...
d473c2589322836db8581d647b6b1dd310df1092e4613b3688b7465eddee9897
brite-code/brite
ParserFramework.hs
NOTE : The Brite parser is powerful in that it can handle programs even in the face of arbitrary syntax errors . If it turns out our parser is too slow then we can write a second “ fast ” parser -- implementation which assumes the code to be correct. If the fast parser fails we can use this -- parser to capture all...
null
https://raw.githubusercontent.com/brite-code/brite/154d7fc93be050626af48051f71a446ec329f612/old/src/Brite/Syntax/ParserFramework.hs
haskell
implementation which assumes the code to be correct. If the fast parser fails we can use this parser to capture all the errors and attempt recovery. # LANGUAGE Rank2Types # custom token, location, and error types. error after looking at the current token instead of returning a value. what they do: * `ok`: We...
NOTE : The Brite parser is powerful in that it can handle programs even in the face of arbitrary syntax errors . If it turns out our parser is too slow then we can write a second “ fast ” parser # LANGUAGE GeneralizedNewtypeDeriving # module Brite.Syntax.ParserFramework ( Parser , TryParser , Recover(..) ...
6f66861427a118b125a7b424db88353ab7250d8756335896d7d9f1942b216b49
Tim-ats-d/Postem-markup
stdlib_ext.mli
* Some extension to . val prerr_with_exit : string -> 'a * Print on stderr given string and exit with code 1 . (** Extension to the [Result] module of the OCaml stdlib. *) module Result : sig include module type of Result val ( let+ ) : ('a, 'b) t -> ('a -> ('c, 'b) t) -> ('c, 'b) t end (** Containing utiliti...
null
https://raw.githubusercontent.com/Tim-ats-d/Postem-markup/95eca3820ccc375f0bbd2cfe41daa9fe2cbe808e/src/common/stdlib_ext.mli
ocaml
* Extension to the [Result] module of the OCaml stdlib. * Containing utilities for in_channel io.
* Some extension to . val prerr_with_exit : string -> 'a * Print on stderr given string and exit with code 1 . module Result : sig include module type of Result val ( let+ ) : ('a, 'b) t -> ('a -> ('c, 'b) t) -> ('c, 'b) t end module In_channel : sig val write : string -> string -> unit * [ write filename ...
22697807a51e73230069cda4f570b8e3f4d07f796c4adc93228652da0c1ab9e9
SNePS/SNePS2
fnodeset.lisp
-*- Mode : Lisp ; Syntax : Common - Lisp ; Package : SNIP ; Base : 10 -*- Copyright ( C ) 1984 - -2013 Research Foundation of ;; State University of New York Version : $ I d : fnodeset.lisp , v 1.2 2013/08/28 19:07:26 shapiro Exp $ ;; This file is part of SNePS. $ BEGIN LICENSE$ ...
null
https://raw.githubusercontent.com/SNePS/SNePS2/d3862108609b1879f2c546112072ad4caefc050d/snip/ds/fnodeset.lisp
lisp
Syntax : Common - Lisp ; Package : SNIP ; Base : 10 -*- State University of New York This file is part of SNePS. you may not use this file except in compliance with the License. You may obtain a copy of the License at . edu/sneps/Downloads/ubpl.pdf. or implied. See the License for th...
Copyright ( C ) 1984 - -2013 Research Foundation of Version : $ I d : fnodeset.lisp , v 1.2 2013/08/28 19:07:26 shapiro Exp $ $ BEGIN LICENSE$ The contents of this file are subject to the University at Software distributed under the License is distributed on an " AS IS " basis , WITHOUT WARRANTY OF ANY...
7d75efef67d05384f5110ff704714942abe6fd109f5791caa161fadd013430c8
ocramz/taco-hs
Tensor.hs
# language GADTs # {-# language DeriveFunctor #-} # language TypeOperators # {-# language PackageImports #-} {-# language TypeFamilies #-} # language FlexibleInstances # { - # language RankNTypes # - } | Module : Data . Tensor Description : Tensor data structure Copyright : ( c ) , 2018 License ...
null
https://raw.githubusercontent.com/ocramz/taco-hs/19d208e2ddc628835a816568cd32029fb0b85048/src/Data/Tensor.hs
haskell
# language DeriveFunctor # # language PackageImports # # language TypeFamilies # ( -- * Tensor Tensor(..), -- ** Constructors -- -- *** Accessors -- coIx, contraIx, -- ** Properties -- ** Tensor operations -- * Shape Sh(..), mkSh, Shape(..), -- * Dimension ) import qualified Data.Vector as V import Dat...
# language GADTs # # language TypeOperators # # language FlexibleInstances # { - # language RankNTypes # - } | Module : Data . Tensor Description : Tensor data structure Copyright : ( c ) , 2018 License : GPL-3 Maintainer : zocca.marco gmail Stability : experimental Portability : PO...
79ceb7401aabf3b9d40433710d2b147128227b58721536c5b370f1e1637b2f6a
waldheinz/bling
DifferentialGeometry.hs
module Graphics.Bling.DifferentialGeometry ( module Graphics.Bling.Transform, -- * Differential Geometry DifferentialGeometry, mkDg, mkDg', dgP, dgN, dgU, dgV, dgDPDU, dgDPDV, dgDNDU, dgDNDV, transDg, -- ** special cased for triangles mkDgTri, dgtriB ) where import Control.DeepSeq ...
null
https://raw.githubusercontent.com/waldheinz/bling/1f338f4b8dbd6a2708cb10787f4a2ac55f66d5a8/src/lib/Graphics/Bling/DifferentialGeometry.hs
haskell
* Differential Geometry ** special cased for triangles Differential Geometry # UNPACK # # UNPACK # # UNPACK # # UNPACK # # UNPACK # # UNPACK # # UNPACK # # UNPACK # barycentric coordinates for triangle hits ^ intersection point ^ u parameter ^ v parameter ^ dpdu ^ dpdv ^ dndu ^ dndv ^ intersection point ...
module Graphics.Bling.DifferentialGeometry ( module Graphics.Bling.Transform, DifferentialGeometry, mkDg, mkDg', dgP, dgN, dgU, dgV, dgDPDU, dgDPDV, dgDNDU, dgDNDV, transDg, mkDgTri, dgtriB ) where import Control.DeepSeq import Graphics.Bling.Transform data DifferentialGeometry = DG {...
aa6b39493014c1f64e13b5a15e0bdf2f99cb922b2dc747fad1aa72d3f9b20b11
5outh/chaosbox
Math.hs
module ChaosBox.Math ( lerp , lerpMany , average , clamp , resample , module X ) where import ChaosBox.Math.Matrix as X import ChaosBox.Math.Vector as X import Data.Foldable (toList) import Data.List (genericLength) | Linearly interpolate betw...
null
https://raw.githubusercontent.com/5outh/chaosbox/991ca3db48d8828287567302ba3293314b9127bd/src/ChaosBox/Math.hs
haskell
| Average a 'Foldable' collection The size of the initial interval amount "through" the intitial interval we are | Clamp a value in some range
module ChaosBox.Math ( lerp , lerpMany , average , clamp , resample , module X ) where import ChaosBox.Math.Matrix as X import ChaosBox.Math.Vector as X import Data.Foldable (toList) import Data.List (genericLength) | Linearly interpolate betw...
54d33dbe3442ba3cd406a7a88ae204fcfa1a5bc1131fea4b1e9954dd4b5dfa28
conscell/hugs-android
CPUTime.hs
{-# OPTIONS_GHC -optc-D__HUGS__ #-} {-# LINE 1 "System/CPUTime.hsc" #-} ----------------------------------------------------------------------------- {-# LINE 2 "System/CPUTime.hsc" #-} -- | Module : System . CPUTime Copyright : ( c ) The University of Glasgow 2001 -- License : BSD-style (see the ...
null
https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/packages/base/System/CPUTime.hs
haskell
# OPTIONS_GHC -optc-D__HUGS__ # # LINE 1 "System/CPUTime.hsc" # --------------------------------------------------------------------------- # LINE 2 "System/CPUTime.hsc" # | License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : provisional Portability : portable -------...
Module : System . CPUTime Copyright : ( c ) The University of Glasgow 2001 The standard CPUTime library . module System.CPUTime ( ) where import Prelude import Data.Ratio # LINE 26 " System / CPUTime.hsc " # import Hugs.Time ( getCPUTime, clockTicks ) # LINE 28 " System / CPUTime.hsc ...
9e05dcc01313dadcba87818b80c21549b7a1e6ffa55e3bd6e95d1ae98028a9d3
karlhof26/gimp-scheme
elsamuko-color-tint.scm
; The GIMP -- an image manipulation program ; Copyright ( C ) 1995 and ; ; 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 ...
null
https://raw.githubusercontent.com/karlhof26/gimp-scheme/4c0f15e5678b3e16cb353f12bc216bb600512a37/elsamuko-color-tint.scm
scheme
The GIMP -- an image manipulation program ; This program is free software; you can redistribute it and/or modify either version 3 of the License , or (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 o...
Copyright ( C ) 1995 and it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License Foundation , Inc. , 675 Mass Ave , Cambridge , , USA . Copyright ( C ) 2008 elsamuko < > Strong and inverted option added by karlhof26 2022/0...
fd0aa2a36e13e4f94426f22b6c947167c018e46b4c7d6eb3b37a522773e38e0d
jafingerhut/clojure-benchmarks
collatz.clj-1.clj
(ns collatz (:gen-class)) (set! *warn-on-reflection* true) (defn cseq [n] (if (= 1 n) [1] (cons n (cseq (if (even? n) (/ n 2) (+ (* 3 n) 1 )))))) (defn tracing-cseq [n] (if (zero? (mod n 10000)) ( if ( zero ? ( mod n 1 ) ) (println "cseq " n)) (cseq n)) ...
null
https://raw.githubusercontent.com/jafingerhut/clojure-benchmarks/474a8a4823727dd371f1baa9809517f9e0b508d4/collatz/collatz.clj-1.clj
clojure
(ns collatz (:gen-class)) (set! *warn-on-reflection* true) (defn cseq [n] (if (= 1 n) [1] (cons n (cseq (if (even? n) (/ n 2) (+ (* 3 n) 1 )))))) (defn tracing-cseq [n] (if (zero? (mod n 10000)) ( if ( zero ? ( mod n 1 ) ) (println "cseq " n)) (cseq n)) ...
ccec9d0e3f6526eaffa6a30790d91381ec3eda9ee628ffbf48ce73bad92f8fd8
nuprl/gradual-typing-performance
benchmark-data.rkt
#lang racket/base (provide assert-benchmark? benchmark-paths BASE BOTH TYPED UNTYPED BENCHMARK CONFIGURATION ) (require glob benchmark-run/utilities (only-in racket/string string-suffix?) ) ;; ============================================================================= (define BASE "base") (...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/tools/benchmark-run/benchmark-data.rkt
racket
============================================================================= Note: 'both' directory is optional String *-> Boolean =============================================================================
#lang racket/base (provide assert-benchmark? benchmark-paths BASE BOTH TYPED UNTYPED BENCHMARK CONFIGURATION ) (require glob benchmark-run/utilities (only-in racket/string string-suffix?) ) (define BASE "base") (define BOTH "both") (define TYPED "typed") (define UNTYPED "untyped") (define COM...
f8a5a7ee9813107bf476cec60ccdc3c1b5b87c2ff6502c3988a3c3078e583348
ndmitchell/uniplate
DataOnlyOperations.hs
# LANGUAGE CPP , MultiParamTypeClasses # module Data.Generics.Uniplate.Internal.DataOnlyOperations where #include "OperationsInc.hs"
null
https://raw.githubusercontent.com/ndmitchell/uniplate/7d3039606d7a083f6d77f9f960c919668788de91/Data/Generics/Uniplate/Internal/DataOnlyOperations.hs
haskell
# LANGUAGE CPP , MultiParamTypeClasses # module Data.Generics.Uniplate.Internal.DataOnlyOperations where #include "OperationsInc.hs"
0a3085a6ca2fecb1d54f083982cbacdada8073bb63936d5b54ae157c06a6d3a9
CryptoKami/cryptokami-core
Storage.hs
{-# LANGUAGE Rank2Types #-} # LANGUAGE TypeFamilies # -- | Module which defines internal structure of `acid-state` wallet database. module Pos.Wallet.Web.State.Storage ( WalletStorage (..) , WalletInfo (..) , AccountInfo (..) , AddressInfo (..) , AddressLookupMode (..) ...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/wallet/src/Pos/Wallet/Web/State/Storage.hs
haskell
# LANGUAGE Rank2Types # | Module which defines internal structure of `acid-state` wallet database. | Type alias for indices which are used to maintain order in which addresses were created. | Information about existing wallet address. | Address data, including derivation indices and address itself. | An index w...
# LANGUAGE TypeFamilies # module Pos.Wallet.Web.State.Storage ( WalletStorage (..) , WalletInfo (..) , AccountInfo (..) , AddressInfo (..) , AddressLookupMode (..) , CustomAddressType (..) , CurrentAndRemoved (..) , WalletBalances , WalBalancesAnd...
e8115b2a6ad0082a97eaaf48b7a2b4fb6c63f93586933d6a9ecf69bcfb723bde
linoscope/okasaki-book-ocaml
test_weight_biased_leftist_heap.ml
open Base open Stdio open Okasaki_book module H = Weight_biased_leftist_heap.Make(Int) let%expect_test "test" = let h = H.empty |> H.insert ~value:5 |> H.insert ~value:2 |> H.insert ~value:4 |> H.insert ~value:3 in h |> H.find_min |> printf "%d\n"; H.delete_min h |> H.find_min |> printf "...
null
https://raw.githubusercontent.com/linoscope/okasaki-book-ocaml/77eb3aaa7113e1b175fbe3c7253f8e4954acd5e9/test/ch3/test_weight_biased_leftist_heap.ml
ocaml
open Base open Stdio open Okasaki_book module H = Weight_biased_leftist_heap.Make(Int) let%expect_test "test" = let h = H.empty |> H.insert ~value:5 |> H.insert ~value:2 |> H.insert ~value:4 |> H.insert ~value:3 in h |> H.find_min |> printf "%d\n"; H.delete_min h |> H.find_min |> printf "...
de3b8f635ce143f46fd269fff68d1c669c997dc3805f1b86b19f1b0a4067b41d
chiroptical/thinking-with-types
Lib.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE TypeFamilyDependencies # module Lib where import Control.Monad.Trans.Writer impor...
null
https://raw.githubusercontent.com/chiroptical/thinking-with-types/781f90f1b08eb94ef3600c5b7da92dfaf9ea4285/Chapter15/src/Lib.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE GADTs # # LANGUAGE RankNTypes #
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE TypeFamilyDependencies # module Lib where import Control.Monad.Trans.Writer import Data.Constraint (Dict (..)) import Data.Foldable (for_) import Data.Kind (Type) d...
bc3a6fa9edf39ede48ce395ac1645884800b5c481414d333ee827e968339040a
rollacaster/sketches
core.cljs
(ns sketches.nature-of-code.vectors.core (:require [sketches.components :refer [cards-container exercise-card]] [sketches.nature-of-code.vectors.bouncing-ball :as bb] [sketches.nature-of-code.vectors.car :as c] [sketches.nature-of-code.vectors.mouse-acceleration :as ma] ...
null
https://raw.githubusercontent.com/rollacaster/sketches/ba79fccf2a37139de9193ed2ea7a6cc04b63fad0/src/sketches/nature_of_code/vectors/core.cljs
clojure
(ns sketches.nature-of-code.vectors.core (:require [sketches.components :refer [cards-container exercise-card]] [sketches.nature-of-code.vectors.bouncing-ball :as bb] [sketches.nature-of-code.vectors.car :as c] [sketches.nature-of-code.vectors.mouse-acceleration :as ma] ...
0ceee1b01745ba10c15bbc0ad404e195c8cea6bbcf11d68c1d888e0aa4866991
takenobu-hs/haskell-ethereum-assembly
Utils.hs
module Language.Evm.Utils where import Language.Evm.Types import Data.List (nub) import Text.Printf (printf) ------------------------------------------------------------------------ Utilities ------------------------------------------------------------------------ isBy...
null
https://raw.githubusercontent.com/takenobu-hs/haskell-ethereum-assembly/cdff2d298256d069f2b154550b810767412d4cf3/src/Language/Evm/Utils.hs
haskell
---------------------------------------------------------------------- ----------------------------------------------------------------------
module Language.Evm.Utils where import Language.Evm.Types import Data.List (nub) import Text.Printf (printf) Utilities isByteRange :: Int -> Integer -> Bool isByteRange nbyte x | x < 2^(8*nbyte) && x >= 0 = True | otherwise = False clipByte :: Int...
9d9e5fc04ceaeb640158c674fe601537b84a069865839c3bc769ca45b3da1ff4
hatsugai/CCLV
idCol.ml
open Printf module IdSet = struct module X = Set.Make ( struct type t = Id.t let compare = compare end) include X let add_list xs s = List.fold_left (fun s x -> add x s) s xs let remove_list xs s = List.fold_left ...
null
https://raw.githubusercontent.com/hatsugai/CCLV/c661c1814f31471ba1eba7ad1d9949e3c5ae9144/src/idCol.ml
ocaml
open Printf module IdSet = struct module X = Set.Make ( struct type t = Id.t let compare = compare end) include X let add_list xs s = List.fold_left (fun s x -> add x s) s xs let remove_list xs s = List.fold_left ...
f493c196376c167a5d957d86cf974ae23c6e53738ae674265916c2f9798be6c7
input-output-hk/plutus-apps
EcdsaSecp256k1Loop.hs
# LANGUAGE DataKinds # # LANGUAGE NoImplicitPrelude # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # {-# LANGUAGE TypeFamilies #-} module PlutusExample.PlutusVersion2.EcdsaSecp256k1Loop ( v2EcdsaLoopScript , v2EcdsaLoopScriptShortBs ) where import Cardano.Api (PlutusScript, ...
null
https://raw.githubusercontent.com/input-output-hk/plutus-apps/4bdde1d3aa53a13d2e78737224a1ac8d3d5b9f6d/plutus-example/src/PlutusExample/PlutusVersion2/EcdsaSecp256k1Loop.hs
haskell
# LANGUAGE TypeFamilies # # INLINEABLE mkValidator # large number ensures same bitsize for all counter values
# LANGUAGE DataKinds # # LANGUAGE NoImplicitPrelude # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # module PlutusExample.PlutusVersion2.EcdsaSecp256k1Loop ( v2EcdsaLoopScript , v2EcdsaLoopScriptShortBs ) where import Cardano.Api (PlutusScript, PlutusScriptV2) import Cardano.Api....
ae951a9d381d8f76ee1c03102d490de9b40f75c25340587642e344c1ad4a65d2
fendor/hsimport
ModuleTest20.hs
{-# Language PatternGuards #-} module Blub ( blub , foo , bar ) where import Ugah.Foo import Control.Applicative import Control.Monad import Ugah.Blub ddd f :: Int -> Int f = (+ 3)
null
https://raw.githubusercontent.com/fendor/hsimport/9be9918b06545cfd7282e4db08c2b88f1d8162cd/tests/goldenFiles/ModuleTest20.hs
haskell
# Language PatternGuards #
module Blub ( blub , foo , bar ) where import Ugah.Foo import Control.Applicative import Control.Monad import Ugah.Blub ddd f :: Int -> Int f = (+ 3)
df309a6a1aabc0d9d4f545be3a080d5cc1480f48b28e63fca3fff968180f6e8f
Chattered/ocaml-monad
monad.mli
* The monad library . { b Introduction } Monads in ocaml , as defined in the batteries library and lwt , are defined narrowly in terms of a type constructor , and two functions , [ return ] and [ bind ] . This misses the [ i abstraction ] , which lies in the ability to write functions th...
null
https://raw.githubusercontent.com/Chattered/ocaml-monad/2d6d1f2d443ddd517aef51d40e5cd068f456c235/src/monad.mli
ocaml
* Monads with additional monoid structure. * Your basic library functions for monads. * Library functions for monads with additional monoid structure. * This is the counterpart for the lazy version of {! BasePlus}. * Monads for collections. Stream is the current use-case for this, since it is parameterised on a...
* The monad library . { b Introduction } Monads in ocaml , as defined in the batteries library and lwt , are defined narrowly in terms of a type constructor , and two functions , [ return ] and [ bind ] . This misses the [ i abstraction ] , which lies in the ability to write functions th...
93358b7bac264b5a63ccd6584b998fd79aef69868c483cdd9321d00382e20e33
rill-event-sourcing/rill
handler_test.clj
(ns rill.handler-test (:require [rill.handler :as handler :refer [try-command]] [rill.aggregate :refer [handle-command aggregate-ids handle-event]] [rill.message :as message :refer [defcommand defevent primary-aggregate-id observers]] [clojure.test :refer [deftest testing is]] ...
null
https://raw.githubusercontent.com/rill-event-sourcing/rill/711d08e52bd331cdc2255199069b2d0aca69e8b0/test/rill/handler_test.clj
clojure
(ns rill.handler-test (:require [rill.handler :as handler :refer [try-command]] [rill.aggregate :refer [handle-command aggregate-ids handle-event]] [rill.message :as message :refer [defcommand defevent primary-aggregate-id observers]] [clojure.test :refer [deftest testing is]] ...
42d4707e783543dd6b83e9f21f313e6747d7fcfd366ef1dba15fe3e04143cbeb
FranklinChen/learn-you-some-erlang
ppool_nagger.erl
%% demo module, a nagger for tasks, %% because the previous one wasn't good enough %% %% Can take: %% - a time delay for which to nag, %% - an adress to say where the messages should be sent %% - a message to send in the mailbox telling you what to nag, %% with an id to be able to call: -> %% - a command to say the t...
null
https://raw.githubusercontent.com/FranklinChen/learn-you-some-erlang/878c8bc2011a12862fe72dd7fdc6c921348c79d6/pool/ppool_nagger.erl
erlang
demo module, a nagger for tasks, because the previous one wasn't good enough Can take: - a time delay for which to nag, - an adress to say where the messages should be sent - a message to send in the mailbox telling you what to nag, with an id to be able to call: -> - a command to say the task is done for ...
-module(ppool_nagger). -behaviour(gen_server). -export([start_link/4, stop/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, code_change/3, terminate/2]). start_link(Task, Delay, Max, SendTo) -> gen_server:start_link(?MODULE, {Task, Delay, Max, SendTo} , []). stop(Pid) -> gen_server:...
18b3a962c5ded7a67ace31ae7d72814a2fbfedde200c65ce894b010f3f7aa8a1
missingfaktor/akar
utilities_test.clj
(ns akar.internal.utilities-test (:require [akar.internal.utilities :refer :all] [clojure.test :refer :all])) (deftest internal-utilities-test (testing "append" (testing "for list" (is (= '(3 4 5) (append '(3 4) 5)))) (testing "for vector" (is (= [3 4 5] ...
null
https://raw.githubusercontent.com/missingfaktor/akar/66403b735cafab4e9fb971b4bf56e899ee84962f/akar-core/test/akar/internal/utilities_test.clj
clojure
(ns akar.internal.utilities-test (:require [akar.internal.utilities :refer :all] [clojure.test :refer :all])) (deftest internal-utilities-test (testing "append" (testing "for list" (is (= '(3 4 5) (append '(3 4) 5)))) (testing "for vector" (is (= [3 4 5] ...
37bdd13f6e3c743811083ce2b4ba748dc368a53f96d002b0af841447c018320e
odis-labs/helix
Helix.mli
* Library for building reactive Web interfaces . { 3 Example } { [ open Helix let counter ( ) = let incr = Signal.make 0 in let count = Signal.reduce ( fun total n - > total + n ) 0 incr in let open Html in fragment [ h2 [ ] [ text " Cou...
null
https://raw.githubusercontent.com/odis-labs/helix/adcdc2581b788fe6e4a28ae0e4b82a4adada94f3/src/helix/Helix.mli
ocaml
* {1 HTML} * Type for representing HTML elements and text nodes. * Type for representing HTML attributes. * {1 Signals} * Type for reactive signals. * Mouse signals. * Time signals. * [show to_html signal] is a dynamic HTML node created from [signal] values using [to_html]. * [conditional on:signal] an at...
* Library for building reactive Web interfaces . { 3 Example } { [ open Helix let counter ( ) = let incr = Signal.make 0 in let count = Signal.reduce ( fun total n - > total + n ) 0 incr in let open Html in fragment [ h2 [ ] [ text " Cou...
5d6240e7173cc4e09524b125eec32cda63038c50d82c9cfb6b7617ab69ab46f9
commercialhaskell/rio
Unchecked.hs
# LANGUAGE CPP # -- | This module contains functions from "Data.Set" that have unchecked -- preconditions on their input. If these preconditions are not satisfied, -- the data structure may end up in an invalid state and other operations -- may misbehave. Import as: -- -- > import qualified RIO.Set.Unchecked a...
null
https://raw.githubusercontent.com/commercialhaskell/rio/4eba306d37a60a20f0bed27f40afc23a7c892c40/rio/src/RIO/Set/Unchecked.hs
haskell
| This module contains functions from "Data.Set" that have unchecked preconditions on their input. If these preconditions are not satisfied, the data structure may end up in an invalid state and other operations may misbehave. Import as: > import qualified RIO.Set.Unchecked as Set' * Map * Ordered list
# LANGUAGE CPP # module RIO.Set.Unchecked ( Data.Set.mapMonotonic , Data.Set.fromAscList #if MIN_VERSION_containers(0,5,8) , Data.Set.fromDescList #endif , Data.Set.fromDistinctAscList #if MIN_VERSION_containers(0,5,8) , Data.Set.fromDistinctDescList #endif ) where import qualified Data.Set
9677ec8eb283e48cc4688acbc0fef533fe9233b8356b9d3e02f01b15c1e0b66b
retro/keechma-next-realworld-app
profile.cljs
(ns app.ui.pages.profile (:require [keechma.next.helix.core :refer [with-keechma use-sub use-meta-sub dispatch call]] [keechma.next.helix.lib :refer [defnc]] [helix.core :as hx :refer [$ <> suspense]] [helix.dom :as d] ["react" :as react] ["react-dom" :as rd...
null
https://raw.githubusercontent.com/retro/keechma-next-realworld-app/47a14f4f3f6d56be229cd82f7806d7397e559ebe/classes/production/realworld-2/app/ui/pages/profile.cljs
clojure
(ns app.ui.pages.profile (:require [keechma.next.helix.core :refer [with-keechma use-sub use-meta-sub dispatch call]] [keechma.next.helix.lib :refer [defnc]] [helix.core :as hx :refer [$ <> suspense]] [helix.dom :as d] ["react" :as react] ["react-dom" :as rd...
fe7958ca91777e4ef88b69bae9dbe88eedbd5ea3dd6bc0f878f0b62174bb2d32
rabbitmq/rabbitmq-jms-topic-exchange
rjms_topic_selector_unit_SUITE.erl
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 /. %% Copyright ( c ) 2012 - 2020 VMware , Inc. or its affiliates . All rights reserved . %% --------------------------------------------------...
null
https://raw.githubusercontent.com/rabbitmq/rabbitmq-jms-topic-exchange/484ae191b96265467408a2d35b05709813234137/test/rjms_topic_selector_unit_SUITE.erl
erlang
----------------------------------------------------------------------------- Unit test file for RJMS Topic Selector plugin ----------------------------------------------------------------------------- ------------------------------------------------------------------- Test suite setup/teardown. ----------------...
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 /. Copyright ( c ) 2012 - 2020 VMware , Inc. or its affiliates . All rights reserved . -module(rjms_topic_selector_unit_SUITE). -compile(ex...
e4a3a795d8bcc2e3ec81e4f89035dc8df5783e0b15b1ca72660336afc976386e
2600hz-archive/whistle
rabbit_binary_parser.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, WITHOUT WARRANTY OF ...
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/rabbitmq_server-2.4.1/src/rabbit_binary_parser.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. ----------------...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is VMware , Inc. Copyright ( c ) 2007 - 2011 VMware , Inc. All rights reserved . -module(rabbi...
0373312743dd8d6347fc06942014095d4a3d98c7cd4e17c74313a01a89313420
reborg/clojure-essential-reference
1.clj
(ns user) < 1 > (let [ks (keys (ns-map ns))] (doseq [k ks] (ns-unmap ns k)))) (ns myns) (#'user/clean-ns 'myns) < 2 > (c/ns-map 'myns) ; <3> ;; {}
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/VarsandNamespaces/ns-publics%2Cns-interns%2Cns-imports/1.clj
clojure
<3> {}
(ns user) < 1 > (let [ks (keys (ns-map ns))] (doseq [k ks] (ns-unmap ns k)))) (ns myns) (#'user/clean-ns 'myns) < 2 >
a3df4f54419b473ca76820dbd241dd70faf773ddc7a4a0218082e15bca7291c3
gigasquid/libpython-clj-examples
spacy.clj
(ns gigasquid.spacy (:require [libpython-clj.require :refer [require-python]] [libpython-clj.python :as py :refer [py. py.. py.-]])) What is ? ;;; also natural language toolkit -101#whats-spacy opinionated library and more Object oriented than NLTK . Has word vector support ;;; better performance f...
null
https://raw.githubusercontent.com/gigasquid/libpython-clj-examples/f151c00415c82a144a13959ff7b56f58704ac6f2/src/gigasquid/spacy.clj
clojure
also natural language toolkit -101#whats-spacy better performance for tokenization and pos tagging (source /@akankshamalhotra24/introduction-to-libraries-of-nlp-in-python-nltk-vs-spacy-42d7b2f128f2) python3 -m spacy download en_core_web_sm linguistic annotations ["is" "AUX" "aux"] ["looking" "VERB" "ROOT"] ["...
(ns gigasquid.spacy (:require [libpython-clj.require :refer [require-python]] [libpython-clj.python :as py :refer [py. py.. py.-]])) What is ? opinionated library and more Object oriented than NLTK . Has word vector support Install pip3 install spacy (require-python '[spacy :as spacy]) Foll...
ccedf9fde48d2005eac89bcad84d9c2955613d97c2ec45a9a22bdcda8c8dcbcf
huangz1990/real-world-haskell-cn
SplitLines.hs
module SplitLines where splitLines :: String -> [String] splitLines [] = [] splitLines cs = let (pre, suf) = break isLineTerminator cs in pre : case suf of ('\r':'\n':rest) -> splitLines rest ('\r':rest) -> splitLines rest ('\n':rest) -> splitLines rest ...
null
https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/code/ch04/SplitLines.hs
haskell
module SplitLines where splitLines :: String -> [String] splitLines [] = [] splitLines cs = let (pre, suf) = break isLineTerminator cs in pre : case suf of ('\r':'\n':rest) -> splitLines rest ('\r':rest) -> splitLines rest ('\n':rest) -> splitLines rest ...
5c4b66e99a4206f8d28834328d89d016699bf89dc91aa522212b6f7a98d08d3d
kmi/ocml
frames.lisp
-*- Mode : LISP ; Syntax : Common - lisp ; Base : 10 ; Package : OCML ; -*- (in-package "OCML") (in-ontology base-ontology) ;;;CLASS (def-class CLASS (relation) "The class of OCML classes" :lisp-fun #'(lambda (x env) (let ((y (unbound-variable? x env))) (if y ...
null
https://raw.githubusercontent.com/kmi/ocml/90b0b173f588c580c26393c94f9970282c640f4d/library/basic/frames.lisp
lisp
Syntax : Common - lisp ; Base : 10 ; Package : OCML ; -*- CLASS RELATION INSTANCE-OF DIRECT-INSTANCE-OF ALL-INSTANCES ALL-DIRECT-INSTANCES NEW-INSTANCE should be discontinued SUBCLASS-OF DIRECT-SUBCLASS-OF () :lisp-fun #'(lambda (x env) (let ((rel (get-relation (instantiate x env)))) ...
(in-package "OCML") (in-ontology base-ontology) (def-class CLASS (relation) "The class of OCML classes" :lisp-fun #'(lambda (x env) (let ((y (unbound-variable? x env))) (if y (mapcar #'(lambda (rel) (cons (cons y rel) env))...
2808fb20b4b0ea7728cbc38e35a28cfb77f3e55608082d097f1ee2907522effa
erlang/otp
tls_record.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2007 - 2022 . 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 applicab...
null
https://raw.githubusercontent.com/erlang/otp/753bc31e99861b13d82b3e182b324ea57fc5802f/lib/ssl/src/tls_record.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 lan...
Copyright Ericsson AB 2007 - 2022 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , Purpose : Handle TLS / SSL record protocol . ( Parts that are not shared with DTLS ) -module(tls_record). -inclu...
32985a4be4e57c8be4fc7872138d5d78c42104a2905202f1eee487f4d155bff8
philnguyen/soft-contract
tak.rkt
#lang racket (require soft-contract/fake-contract) (define (tak x y z) (if (false? (< y x)) z (tak (tak (- x 1) y z) (tak (- y 1) z x) (tak (- z 1) x y)))) (provide/contract [tak (integer? integer? integer? . -> . integer?)])
null
https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/softy/tak.rkt
racket
#lang racket (require soft-contract/fake-contract) (define (tak x y z) (if (false? (< y x)) z (tak (tak (- x 1) y z) (tak (- y 1) z x) (tak (- z 1) x y)))) (provide/contract [tak (integer? integer? integer? . -> . integer?)])
95d244e6a6ad757c35b3b255263ec996611303b1d142d0e990853fb831ad9554
epicallan/hreq
RunClient.hs
| The ' ' module provides a class which any client must instantiate in order to -- run HTTP requests. -- # LANGUAGE DeriveFunctor # module Hreq.Core.Client.RunClient where import Hreq.Core.Client.ClientError import Hreq.Core.Client.Request import Hreq.Core.Client.Response -- | Provides the capability to run a requ...
null
https://raw.githubusercontent.com/epicallan/hreq/f12fcb9b9dd1ad903c6b36a8cf850edb213d4792/hreq-core/src/Hreq/Core/Client/RunClient.hs
haskell
run HTTP requests. | Provides the capability to run a request and get a response. * Pure client | A pure HTTP client monad useful for testing.
| The ' ' module provides a class which any client must instantiate in order to # LANGUAGE DeriveFunctor # module Hreq.Core.Client.RunClient where import Hreq.Core.Client.ClientError import Hreq.Core.Client.Request import Hreq.Core.Client.Response class Monad m => RunClient m where runClient :: Request -> m Resp...
422347c186deccf88a1993d0964c5a93b11ff6f9ff6572be9b6914c3ef955966
bolt12/laop
Main.hs
# LANGUAGE KindSignatures # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE DerivingVia # # LANGUAGE DataKinds # {-# LANGUAGE BangPatterns #-} # LANGUAGE TypeApplications # # LANGUAGE FlexibleContexts # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE ScopedTypeVariables # module Main (main) where import LAoP.Dist.Inte...
null
https://raw.githubusercontent.com/bolt12/laop/54968c9e92e9243a731320758da7d59b98e903da/benchmark/Main.hs
haskell
# LANGUAGE BangPatterns # Composition with iden Probability selectA
# LANGUAGE KindSignatures # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE DerivingVia # # LANGUAGE DataKinds # # LANGUAGE TypeApplications # # LANGUAGE FlexibleContexts # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE ScopedTypeVariables # module Main (main) where import LAoP.Dist.Internal import LAoP.Utils import ...
d19ee1cd598743f16443552cec81dde9d144adec105ea957f36c42957911b643
tweag/asterius
PrettyShow.hs
module Asterius.Internals.PrettyShow ( prettyShow, ) where import GHC.IO (catchAny) import System.Process prettyShow :: Show a => a -> IO String prettyShow a = do let s = show a catchAny (readProcess "ppsh" [] s) (\_ -> pure s)
null
https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/src/Asterius/Internals/PrettyShow.hs
haskell
module Asterius.Internals.PrettyShow ( prettyShow, ) where import GHC.IO (catchAny) import System.Process prettyShow :: Show a => a -> IO String prettyShow a = do let s = show a catchAny (readProcess "ppsh" [] s) (\_ -> pure s)
9a17a79ccd879567438de2af80bdcc32ec45074ea01687b6710581c667bbd921
heraldry/heraldicon
bordure.cljs
(ns heraldicon.heraldry.ordinary.type.bordure (:require [heraldicon.context :as c] [heraldicon.heraldry.cottising :as cottising] [heraldicon.heraldry.field.environment :as environment] [heraldicon.heraldry.line.core :as line] [heraldicon.heraldry.ordinary.interface :as ordinary.interface] [heraldico...
null
https://raw.githubusercontent.com/heraldry/heraldicon/71126cfd7ba342dea0d1bb849be92cbe5290a6fd/src/heraldicon/heraldry/ordinary/type/bordure.cljs
clojure
TODO: calculate the actual line length?
(ns heraldicon.heraldry.ordinary.type.bordure (:require [heraldicon.context :as c] [heraldicon.heraldry.cottising :as cottising] [heraldicon.heraldry.field.environment :as environment] [heraldicon.heraldry.line.core :as line] [heraldicon.heraldry.ordinary.interface :as ordinary.interface] [heraldico...
1d1632679d9732410090c6756534a0902a22214448d4975b1082becb2ecb5fdd
clj-commons/kibit
equality.clj
(ns kibit.test.equality (:require [kibit.check :as kibit] [clojure.test :refer [deftest are]])) (deftest equality-are (are [expected-alt-form test-form] (= expected-alt-form (:alt (kibit/check-expr test-form))) '(not= x b) '(not (= x b)) '(zero? x) '(= 0 x) '(zero? x) '(= x 0) '(...
null
https://raw.githubusercontent.com/clj-commons/kibit/be27e6db625564d045e71a6e13e459eb7651813b/kibit/test/kibit/test/equality.clj
clojure
(ns kibit.test.equality (:require [kibit.check :as kibit] [clojure.test :refer [deftest are]])) (deftest equality-are (are [expected-alt-form test-form] (= expected-alt-form (:alt (kibit/check-expr test-form))) '(not= x b) '(not (= x b)) '(zero? x) '(= 0 x) '(zero? x) '(= x 0) '(...
ac3568a2c0a7478e7d69da7f9f2d3dd345e26558fcef919f9fa641d23d2b8058
sadiqj/ocaml-esp32
debuginfo.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/middle_end/debuginfo.ml
ocaml
************************************************************************ OCaml ...
, projet Gallium , INRIA Rocquencourt Copyright 2006 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Lexing open Location type item = { dinfo_file: string; dinfo_line: int; dinfo_char_start: int...
45fcc810c97d4465502090f22ea6d38a032838175cdfe889fd0c5c98a155b15b
mks-m/wower
cell.erl
% TODO: this will be oct-tree based process % pool for handling objects in region -module(cell). -export([start/0, stop/0, world/0, create/0, init/1, init/2]). % size, location and object records %% @type vector() = {vector, float(), float(), float()} -record(vector, {x, y, z}). % general info about cell % p -...
null
https://raw.githubusercontent.com/mks-m/wower/ce9724876cf57b67ce72f2a9a6f74bb1ebffd53a/realm/src/cell.erl
erlang
TODO: this will be oct-tree based process pool for handling objects in region size, location and object records @type vector() = {vector, float(), float(), float()} general info about cell p - parent cell n - navigation record or neighbours record l - location of center of the cell s - size of cell @ty...
-module(cell). -export([start/0, stop/0, world/0, create/0, init/1, init/2]). -record(vector, {x, y, z}). -record(info, {p, n, l, s}). -define(MAX_PER_CELL, 1000). -define(MIN_CELL_SIZE, 500). @spec start ( ) - > ok . start() -> Pid = spawn(?MODULE, world, []), register(world, Pid), ok. world ( ) ...
d041549104138f1f6073febe66093bbacae90ee7bbabbd3fce60165a7161ae6b
avieth/diplomacy
SupplyCentreDeficit.hs
| Module : Diplomacy . SupplyCentreDeficit Description : Compute the supply centre deficit for a ' GreatPower ' . Copyright : ( c ) , 2015 Licence : : Stability : experimental Portability : non - portable ( GHC only ) Module : Diplomacy.SupplyCentreDeficit Description : Compu...
null
https://raw.githubusercontent.com/avieth/diplomacy/b8868322e59264f8210962dc357c657b86add588/src/Diplomacy/SupplyCentreDeficit.hs
haskell
| Module : Diplomacy . SupplyCentreDeficit Description : Compute the supply centre deficit for a ' GreatPower ' . Copyright : ( c ) , 2015 Licence : : Stability : experimental Portability : non - portable ( GHC only ) Module : Diplomacy.SupplyCentreDeficit Description : Compu...
5d1620058b625fa0e3583e277306a47a575f15f17bc0427d1526d64eeacbcd97
ajhc/ajhc
SegvMarkGcRoot.hs
module Main where import Data.Word foreign import primitive "const.sizeof(unsigned long)" sizeOfULong :: Word32 foreign import primitive "const.sizeof(char)" sizeOfChar :: Word32 foreign export ccall "xxxxxxxxx_f" f :: IO Word32 foreign export ccall "xxxxxxxxx_g" g :: IO Word32 foreign import ccall "xxxxxxxxx_f" fx :: ...
null
https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/regress/tests/6_fixed_bugs/SegvMarkGcRoot/SegvMarkGcRoot.hs
haskell
- Add some objects to root_stack. - Use block contains some pointers. call jhc_alloc_fini and jhc_alloc_init
module Main where import Data.Word foreign import primitive "const.sizeof(unsigned long)" sizeOfULong :: Word32 foreign import primitive "const.sizeof(char)" sizeOfChar :: Word32 foreign export ccall "xxxxxxxxx_f" f :: IO Word32 foreign export ccall "xxxxxxxxx_g" g :: IO Word32 foreign import ccall "xxxxxxxxx_f" fx :: ...
c7d403dbc1d74d2a6dfbe764f6bf95ff0c0e8e55a13ae5d8a823afbd9805eeec
scheme/scsh
file-name-manipulation-test.scm
Test for function in section 5.1 of the scsh - manual " file - name- ... , diretory- ... , ... " Author : ;; for now just the examples from the manual will be tested ;; for testing: (certainly the path will be an other on other systems...) ;; ,open define-record-types handle , config , load C:/cygwin / home...
null
https://raw.githubusercontent.com/scheme/scsh/114432435e4eadd54334df6b37fcae505079b49f/test/file-name-manipulation-test.scm
scheme
for now just the examples from the manual will be tested for testing: (certainly the path will be an other on other systems...) ,open define-record-types handle load this file (test-all) *** tests *** (add-test! 'home-dir 'file-name-manipulation was tested with resolve-file-name
Test for function in section 5.1 of the scsh - manual " file - name- ... , diretory- ... , ... " Author : , config , load C:/cygwin / home / mephisto / cvs - scsh / scsh / scsh / test / test - packages.scm , load C:/cygwin / home / mephisto / cvs - scsh / scsh / scsh / test / test - base.scm (add-test! '...
0e82e4c77171610757740af2f33b5d8e3c78ecdee206bdab04533491591bf1f5
luxingwen/emqx_persistence_plugin
emqx_persistence_mysql.erl
-module(emqx_persistence_mysql). -include("emqx_persistence_mysql.hrl"). -include_lib("emqx/include/emqx.hrl"). -include_lib("emqx/include/logger.hrl"). -define(PERSISTENCE_KEY, "$MYSQL"). -export([ load/1, unload/0]). -export([ on_client_connected/3, on_client_disconnected/4, on_client...
null
https://raw.githubusercontent.com/luxingwen/emqx_persistence_plugin/a1cd228e96d88c03a49a20af0af3ed134d1710d3/src/emqx_persistence_mysql.erl
erlang
-------------------------------------------------------------------- Client subscribe -------------------------------------------------------------------- -------------------------------------------------------------------- Client connected -------------------------------------------------------------------- --------...
-module(emqx_persistence_mysql). -include("emqx_persistence_mysql.hrl"). -include_lib("emqx/include/emqx.hrl"). -include_lib("emqx/include/logger.hrl"). -define(PERSISTENCE_KEY, "$MYSQL"). -export([ load/1, unload/0]). -export([ on_client_connected/3, on_client_disconnected/4, on_client...
213ae2d050b887c91b44c6a001801be53fdad6a1c2db4216ce1737625285554f
AliasQli/GramHs
Main.hs
# LANGUAGE OverloadedLists # module Main where import Control.Concurrent (forkIO) import Control.Monad import Data.Either import qualified GI.Gdk as Gdk import qualified GI.Gtk as Gtk import GI.Gtk.Declarative.App.Simple ...
null
https://raw.githubusercontent.com/AliasQli/GramHs/b34bd59a8ccf7552513204cdccce31b25eebfdaa/app/Main.hs
haskell
# LANGUAGE OverloadedLists # module Main where import Control.Concurrent (forkIO) import Control.Monad import Data.Either import qualified GI.Gdk as Gdk import qualified GI.Gtk as Gtk import GI.Gtk.Declarative.App.Simple ...
b2fd67d9815462d94caf7c9465f06b6430068b8dcfb698e60e11d9c08a11395b
mwand/5010-examples
10-1-communicating-objects.rkt
#lang racket (require rackunit) (require "extras.rkt") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Balls Communicating with an external agent this is considered poor OO design ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define Ball0<%> (interface () ...
null
https://raw.githubusercontent.com/mwand/5010-examples/ac24491ec2e533d048e11087ccc30ff1c087c218/10-1-communicating-objects.rkt
racket
-> Integer return x, y coords of center and radius, all in pixels interpretation omitted... Ball0<%> Ball0<%> -> Boolean This is an ordinary function, outside of any class. Would balls with these coordinates intersect? BALLS COMMUNICATING BY PULL computation gets done in this ball -> Integer ...
#lang racket (require rackunit) (require "extras.rkt") Balls Communicating with an external agent this is considered poor OO design (define Ball0<%> (interface () get-x get-y get-r)) (define Ball0% (class* object% (Ball0<%>) (super-new) (define/public (get-x) x) (...
0aeae37451404a2911378cd054b60c7b2eeb7bf252a3a0bfd32d1bfba793110e
ghc/ghc
Dict.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE DataKinds # {-# LANGUAGE ImpredicativeTypes #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE NoImplicitPrelude # # LANGUAGE PolyKinds # {-# LANGUAGE RankNTypes #-} # LANGUAGE AllowAmbiguousTypes # # LANGUAGE Unsafe # ---------------------------------------------------------...
null
https://raw.githubusercontent.com/ghc/ghc/31462d98c31e3ef48af2f6c6f2d379d74ccc63f5/libraries/ghc-prim/GHC/Magic/Dict.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE ImpredicativeTypes # # LANGUAGE RankNTypes # --------------------------------------------------------------------------- | Maintainer : Stability : internal Defines the 'withDict' function. For more information, see The definition of 'withDict' is located in a separa...
# LANGUAGE DataKinds # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NoImplicitPrelude # # LANGUAGE PolyKinds # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE Unsafe # Module : GHC.Magic . Dict Copyright : ( c ) The University of Glasgow 2009 License : see libraries / ghc - prim / LICENSE Port...
ad9a436f3a6d818f3e19fa17a87865de137df3d227821ea16a0e62d2c37b01df
codinuum/volt
configurationNew.mli
* This file is part of Bolt . * Copyright ( C ) 2009 - 2012 . * * Bolt 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 ) ...
null
https://raw.githubusercontent.com/codinuum/volt/546207693ef102a2f02c85af935f64a8f16882e6/src/library/configurationNew.mli
ocaml
* Loads the configuration from the passed file. Raises [Sys_error] if an i/o error occurs, and [Configuration.Exception] if file cannot be parsed.
* This file is part of Bolt . * Copyright ( C ) 2009 - 2012 . * * Bolt 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 ) ...
4c01dee43e64b3adade0f20fcb55d6534aabd38053b60d8164c0897a7328d23c
bsansouci/bsb-native
lambda.mli
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/bytecomp/lambda.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 . open Asttypes type compile_time_const...
9aa1d39c6c388d5965dfc461464c865d21e3ec890581a2d991102a981fd879cc
ctdean/iter
macros.clj
(ns iter.macros "Iter macros. @ctdean" (:refer-clojure :exclude [when while let])) ;;; Shadow clojure builtins ;;; (defmacro xlet [& forms] `(clojure.core/let ~@forms)) (defmacro xwhen [& forms] `(clojure.core/when ~@forms)) ;;; ;;; Define the iter macros ;;; (defmacro define-iter-op "Define an iter macro...
null
https://raw.githubusercontent.com/ctdean/iter/32d87991d73d48ba74edc248c3cf2eb499d9eb06/src/iter/macros.clj
clojure
Define the iter macros gensym variables - since the macros can be expanded together, we variable collisions.
(ns iter.macros "Iter macros. @ctdean" (:refer-clojure :exclude [when while let])) Shadow clojure builtins (defmacro xlet [& forms] `(clojure.core/let ~@forms)) (defmacro xwhen [& forms] `(clojure.core/when ~@forms)) (defmacro define-iter-op "Define an iter macro. The only difference between iter macros ...
35a373acf2b3fcf69d2b92069daf9361de2390e097ec835d899b21bce930049b
lem-project/lem
self-insert-command.lisp
(in-package :lem) (define-editor-variable self-insert-before-hook '()) (define-editor-variable self-insert-after-hook '()) (defun get-self-insert-char () (insertion-key-p (last-read-key-sequence))) (defclass self-insert-advice () ()) (defmethod execute :before (mode (command self-insert-advice) argument) (unles...
null
https://raw.githubusercontent.com/lem-project/lem/4d8a9422ba961d9d32206e0435abfa762dceff0a/src/self-insert-command.lisp
lisp
(in-package :lem) (define-editor-variable self-insert-before-hook '()) (define-editor-variable self-insert-after-hook '()) (defun get-self-insert-char () (insertion-key-p (last-read-key-sequence))) (defclass self-insert-advice () ()) (defmethod execute :before (mode (command self-insert-advice) argument) (unles...
9e4ec27d2f19ac477eeb0a4e39bd246f4203efe712b7a4843bc303864bbc3302
reljr/reljr
table_test.cljs
(ns reljr.table-test (:require [cljs.test :refer-macros [deftest is]] [reljr.table :as table] [clojure.string :as s])) (def table-one #{{:R/a 1 :R/b 2 :R/c 3} {:R/a 1 :R/b 7 :R/c 2} {:R/a 2 :R/b 5 :R/c 1}}) (def table-two #{{:R/a 154 :R/b 3452 :R/d 43} {:R/a 133 :R/b 7345 :R/...
null
https://raw.githubusercontent.com/reljr/reljr/2ed55b0bd513b2964cd43ea8864873e5ad122d30/tests/reljr/table_test.cljs
clojure
(ns reljr.table-test (:require [cljs.test :refer-macros [deftest is]] [reljr.table :as table] [clojure.string :as s])) (def table-one #{{:R/a 1 :R/b 2 :R/c 3} {:R/a 1 :R/b 7 :R/c 2} {:R/a 2 :R/b 5 :R/c 1}}) (def table-two #{{:R/a 154 :R/b 3452 :R/d 43} {:R/a 133 :R/b 7345 :R/...
a90235c67e6d2f7bc01e9f0850b5a5f710538a3fa0f433fb0dda10d6afa23832
ocaml-sf/learn-ocaml-corpus
at_most_once_id.ml
let return (x : 'a) : 'a m = Seq.singleton x let (>>=) (m1 : 'a m) (f2 : 'a -> 'b m) : 'b m = m1 |> Seq.map f2 |> Seq.flatten let fail : 'a m = Seq.nil let choose (m1 : 'a m) (m2 : 'a m) : 'a m = Seq.concat m1 m2 let sols (m : 'a m) : 'a Seq.t = m let at_most_once (m : 'a m) : 'a m = (* Basic attempt t...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/nondet_monad_seq/wrong/at_most_once_id.ml
ocaml
Basic attempt to cheat!
let return (x : 'a) : 'a m = Seq.singleton x let (>>=) (m1 : 'a m) (f2 : 'a -> 'b m) : 'b m = m1 |> Seq.map f2 |> Seq.flatten let fail : 'a m = Seq.nil let choose (m1 : 'a m) (m2 : 'a m) : 'a m = Seq.concat m1 m2 let sols (m : 'a m) : 'a Seq.t = m let at_most_once (m : 'a m) : 'a m = m
0877baebac2556d462353b63f86f4bb2b716bdf5977f62c1cce8f979a80e3c32
PJK/haskell-pattern-matching
Lists.hs
module Lists where length :: [Int] -> Int length [_, _, _] = 3 length (x:xs) = 1 + (length xs) length [] = 0
null
https://raw.githubusercontent.com/PJK/haskell-pattern-matching/7ef4a45731beba92ee01614ae563df65be36e8ba/data/exact/Lists.hs
haskell
module Lists where length :: [Int] -> Int length [_, _, _] = 3 length (x:xs) = 1 + (length xs) length [] = 0
80eb9fd67064a3e5d4b33c8fa9771977989b32a722107243ece0715c99fdde80
gedge-platform/gedge-platform
jose_json_poison_lexical_encoder.erl
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- %% vim: ts=4 sw=4 ft=erlang noet %%%------------------------------------------------------------------- @author < > 2014 - 2016 , %%% @doc %%% %%% @end Created : 14 Aug 2015 by < > %%%---------------------------...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/jose/src/json/jose_json_poison_lexical_encoder.erl
erlang
vim: ts=4 sw=4 ft=erlang noet ------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- jose_json callbacks ==================================================================== jose_json callbacks =============================...
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- @author < > 2014 - 2016 , Created : 14 Aug 2015 by < > -module(jose_json_poison_lexical_encoder). -behaviour(jose_json). -compile(inline_list_funcs). -export([decode/1]). -export([encode/1]). decode(Binary) ...
fcb3603c288c71e6c6ed4292c23e2d1700e14ad0e7675236a06eb77069ae1559
lpeterse/haskell-hummingbird
SysInfo.hs
{-# LANGUAGE OverloadedStrings #-} module Hummingbird.SysInfo ( run ) where -------------------------------------------------------------------------------- -- | -- Module : Main Copyright : ( c ) 2017 License : MIT -- -- Maintainer : -- Stability : experimental -----------------------...
null
https://raw.githubusercontent.com/lpeterse/haskell-hummingbird/1e380d53cc5bc06ca2cbac2ff8359dc5aab6b199/src/Hummingbird/SysInfo.hs
haskell
# LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ | Module : Main Maintainer : Stability : experimental ------------------------------------------------------------------------------
module Hummingbird.SysInfo ( run ) where Copyright : ( c ) 2017 License : MIT import Control.Concurrent import Control.Monad (forM_) import Data.String import qualified System.Clock as Clock import qualified Network.MQTT.Broker as Broker import ...
a070665399a969b351077e0e301e094afd6d45f1bcc4f0c71124df7638c7b9c5
naoiwata/sicp
2.4.3.scm
;; @author naoiwata SICP Chapter2 2.4.3 Data - Directed Programming and Additivity ;; (put <op> <type> <item>) (define (install-rectangular-package) ;; internal procedures (define (real-part z) (car z)) (define (imag-part z) (cdr z)) (define (make-from-real-imag x y) (cons x y)) (define (magnitude z)...
null
https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter2/pages/2.4.3.scm
scheme
@author naoiwata (put <op> <type> <item>) internal procedures interface to the rest of the system internal procedures interface to the rest of the system apply what is apply:( use this example message passing ;; END
SICP Chapter2 2.4.3 Data - Directed Programming and Additivity (define (install-rectangular-package) (define (real-part z) (car z)) (define (imag-part z) (cdr z)) (define (make-from-real-imag x y) (cons x y)) (define (magnitude z) (sqrt (+ (square (real-part z)) (square (imag-part z)))...
98575ac211bfe90173d66c72341f0b0afd8e3828beb79e4203228e23b2e6f593
titola/incudine
gen-partials.lisp
(in-package :incudine-tests) (defun gen-partials-test-1 (lst) (cffi:with-foreign-object (arr 'sample 64) (funcall (gen:partials lst) arr 64) (loop for i below 64 collect (sample->fixnum (smp-ref arr i))))) (deftest gen-partials.1 (gen-partials-test-1 '(100)) (0 9 19 29 38 47 55 63 70 77 83 88 92 95 98...
null
https://raw.githubusercontent.com/titola/incudine/325174a54a540f4daa67bcbb29780073c35b7b80/tests/gen-partials.lisp
lisp
(in-package :incudine-tests) (defun gen-partials-test-1 (lst) (cffi:with-foreign-object (arr 'sample 64) (funcall (gen:partials lst) arr 64) (loop for i below 64 collect (sample->fixnum (smp-ref arr i))))) (deftest gen-partials.1 (gen-partials-test-1 '(100)) (0 9 19 29 38 47 55 63 70 77 83 88 92 95 98...
97d6d90d442cfa7a3411fef71fcaa4a35a82d872250401ee67b7fc024f1b4f3c
nkpart/kit
Main.hs
module Kit.Main where import qualified Kit.CmdArgs as KA import Kit.Commands import Kit.Spec import Kit.Package import Kit.Project import Kit.Util import Kit.Contents import Kit.Dependency import Kit.WorkingCopy import Data.Yaml (encodeFile) import Kit.Util.FSAction import System.Exit import...
null
https://raw.githubusercontent.com/nkpart/kit/ed217ddbc90688350e52156503cca092c9bf8300/Kit/Main.hs
haskell
module Kit.Main where import qualified Kit.CmdArgs as KA import Kit.Commands import Kit.Spec import Kit.Package import Kit.Project import Kit.Util import Kit.Contents import Kit.Dependency import Kit.WorkingCopy import Data.Yaml (encodeFile) import Kit.Util.FSAction import System.Exit import...
a9a53be6ff64f33add26285e426964fcb85efe5bb8447764342b864222e9e39b
8c6794b6/haskell-sc-scratch
GateExample.hs
------------------------------------------------------------------------------ -- | Module to play with @gate@ message. -- module SCExamples.Pieces.GateExample where import Control.Applicative import Data.Map (Map) import Data.Monoid import qualified Data.Map as M import Sound.OpenSoundControl import Sound.SC3 -- i...
null
https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/SCExamples/Pieces/GateExample.hs
haskell
---------------------------------------------------------------------------- | Module to play with @gate@ message. import Reusable import SCSched import SCTree
module SCExamples.Pieces.GateExample where import Control.Applicative import Data.Map (Map) import Data.Monoid import qualified Data.Map as M import Sound.OpenSoundControl import Sound.SC3 import SCQuery import qualified Scratch . ControlArgs as A import Sound.SC3.Wing import qualified Sound.SC3.Wing.UGen.Con...
73f66355d7a5a8949ada1b30aff521cb009b17260e38f5c3bbcf36cb81558663
redplanetlabs/defexception
impl.clj
(ns ^:no-doc com.rpl.defexception.impl (:require [clojure.string :as string]) (:import [clojure.asm MethodVisitor ClassVisitor ClassWriter Opcodes Type] [clojure.asm.commons GeneratorAdapter Method] [clojure.lang ExceptionInfo] [com.rpl.defexception IDefException])) (de...
null
https://raw.githubusercontent.com/redplanetlabs/defexception/1dd569d733762f3fb8a18abd3c9eeb327e6f818c/src/clj/com/rpl/defexception/impl.clj
clojure
and is = clojure.asm.Opcodes/V1_7
(ns ^:no-doc com.rpl.defexception.impl (:require [clojure.string :as string]) (:import [clojure.asm MethodVisitor ClassVisitor ClassWriter Opcodes Type] [clojure.asm.commons GeneratorAdapter Method] [clojure.lang ExceptionInfo] [com.rpl.defexception IDefException])) (de...
be4a706443bfc354e30bf59813a0b5878464ba4d1c4433b52f861fe2921e9c26
mflatt/shrubbery-rhombus-0
demo.rkt
#lang rhombus import: rhombus/macro open use_static_dot // Some expressions 10 * (-3) + 2 10 + (-3) * 2 #false || !(#false || #false) "hello" & " " & "world" // define and call a function def five(x): 5 3*five(#true && #false || 2 < 3)-2 def six(x, ~plus: amt = 0): 6 + amt six("anything") six("an...
null
https://raw.githubusercontent.com/mflatt/shrubbery-rhombus-0/086a52632b67a52680c16f1cf7f4388d04e88680/demo.rkt
racket
«x mod y»): '(cons($b, $a)) $defn1 ...; $defn2 ...; $tail; ......): $defn1 ... ), '(: $tail; ......))
#lang rhombus import: rhombus/macro open use_static_dot // Some expressions 10 * (-3) + 2 10 + (-3) * 2 #false || !(#false || #false) "hello" & " " & "world" // define and call a function def five(x): 5 3*five(#true && #false || 2 < 3)-2 def six(x, ~plus: amt = 0): 6 + amt six("anything") six("an...
d57cda2ce9efd8bd0c0f4653a1def61fb26db3a24beadd7be0154259aef09139
amperity/sparkplug
core_test.clj
(ns sparkplug.core-test (:require [clojure.test :refer [deftest is testing use-fixtures]] [sparkplug.config :as conf] [sparkplug.context :as context] [sparkplug.core :as spark] [sparkplug.rdd :as rdd])) (def ^:dynamic *sc* nil) (def local-conf (-> (conf/spark-conf) (conf/master "loca...
null
https://raw.githubusercontent.com/amperity/sparkplug/c2fd192ef779994477dd589775a762383dcb2db5/sparkplug-core/test/sparkplug/core_test.clj
clojure
(ns sparkplug.core-test (:require [clojure.test :refer [deftest is testing use-fixtures]] [sparkplug.config :as conf] [sparkplug.context :as context] [sparkplug.core :as spark] [sparkplug.rdd :as rdd])) (def ^:dynamic *sc* nil) (def local-conf (-> (conf/spark-conf) (conf/master "loca...
2739366839980cf6cce8f88a71014a64948c5d9c415e48c1b65df1e2e912bdde
replikativ/konserve
cache.cljc
(ns konserve.cache "Provides core functions, but with additional caching. Still subject to internal changes. Use this namespace only if you anticipate to be the only process accessing the store, otherwise you should implement your own caching strategy." (:refer-clojure :exclude [assoc-in assoc exists? dissoc ge...
null
https://raw.githubusercontent.com/replikativ/konserve/5a1cfb3c30f5b5dfdaa0b4564a4b76d004afa585/src/konserve/cache.cljc
clojure
alias core functions without caching for convenience
(ns konserve.cache "Provides core functions, but with additional caching. Still subject to internal changes. Use this namespace only if you anticipate to be the only process accessing the store, otherwise you should implement your own caching strategy." (:refer-clojure :exclude [assoc-in assoc exists? dissoc ge...
3cb3604f906c4c4af28bb7c1de8968e321a76eb85b87fa7901ae646f7e363a0f
47degrees/org
build.clj
(ns org.build (:require [org.config] [clojure.spec.alpha :as s] [org.state :as st] [org.core :as org] [org.client :as c] [cljs.build.api :as cljs] [cuerdas.core :as str] [clojure.java.io :as io] [clojure.java.shell :refer [sh]] [rum.core :as rum])) (defn str->base64 [s] (.encodeToSt...
null
https://raw.githubusercontent.com/47degrees/org/3c5038f5f5f1bf97c5930bd94a51e171b33cd027/src/org/build.clj
clojure
Font Font sizes Import default styles Make dir structure Compile CLJS Generate HTML Generate CSS Copy static assets
(ns org.build (:require [org.config] [clojure.spec.alpha :as s] [org.state :as st] [org.core :as org] [org.client :as c] [cljs.build.api :as cljs] [cuerdas.core :as str] [clojure.java.io :as io] [clojure.java.shell :refer [sh]] [rum.core :as rum])) (defn str->base64 [s] (.encodeToSt...
28272a55bd7b3583d80da64e54175786011340b93e7498eaea92a4bcf6e093a1
ocaml-multicore/ocaml-tsan
ambiguity.ml
(* TEST * expect *) [@@@warning "-8-11-12"] (* reduce the noise. *) type ('a, 'b) eq = Refl : ('a, 'a) eq;; [%%expect{| type ('a, 'b) eq = Refl : ('a, 'a) eq |}];; let ret_e1 (type a b) (b : bool) (wit : (a, b) eq) (x : a) (y : b) = match wit with | Refl -> if b then x else y | _ -> x ;; [%%expect{| Line 3,...
null
https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/f54002470cc6ab780963cc81b11a85a820a40819/testsuite/tests/typing-gadts/ambiguity.ml
ocaml
TEST * expect reduce the noise.
type ('a, 'b) eq = Refl : ('a, 'a) eq;; [%%expect{| type ('a, 'b) eq = Refl : ('a, 'a) eq |}];; let ret_e1 (type a b) (b : bool) (wit : (a, b) eq) (x : a) (y : b) = match wit with | Refl -> if b then x else y | _ -> x ;; [%%expect{| Line 3, characters 29-30: 3 | | Refl -> if b then x else y ...
83d6d0520590c546c77c0810a155976daef0238ec10e765eae3d87d234d0b416
janestreet/core_profiler
reservoir_sampling.mli
open! Core type t [@@deriving sexp] val create : ?num_samples_to_keep:int -> unit -> t val add : t -> int -> unit val percentile : t -> float -> int Or_error.t val percentile_exn : t -> float -> int val distribution : t -> int list
null
https://raw.githubusercontent.com/janestreet/core_profiler/3d1c0e61df848f5f25f78d64beea92b619b6d5d9/offline_tool/lib/reservoir_sampling.mli
ocaml
open! Core type t [@@deriving sexp] val create : ?num_samples_to_keep:int -> unit -> t val add : t -> int -> unit val percentile : t -> float -> int Or_error.t val percentile_exn : t -> float -> int val distribution : t -> int list
e61203b7cc96e7aeb0136b46d7bf1179830f412104caf1f5b8db009aef3823cb
OCamlPro/socaml-analyzer
mk_tlambda.mli
open Common_types val lambda_to_tlambda : modname : string -> funs: ( Common_types.F.t, Tlambda.tlambda ) Hashtbl.t -> Lambda.lambda -> Tlambda.tlambda
null
https://raw.githubusercontent.com/OCamlPro/socaml-analyzer/f39121e1d05a9e5bb6f005497eaaa5a67f256d4c/src/tlambda/mk_tlambda.mli
ocaml
open Common_types val lambda_to_tlambda : modname : string -> funs: ( Common_types.F.t, Tlambda.tlambda ) Hashtbl.t -> Lambda.lambda -> Tlambda.tlambda
290fed571312b018e066ae6d20745df55552b2d9dc76f18ffc1196540d113b92
onlyshk/erlang-github-api
messages.erl
%% Copyright ( c ) < 2011 > , < > %%All rights reserved. %% -module(messages). %% %% Include files %% %% %% Exported Functions %% -export([make_gist_comment_message/1]). -export([make_add_email_message/1]). -export([make_create_gist_message/4]). -export([make_blob_message/2]). -export([make_ref_message/2]). %% %%...
null
https://raw.githubusercontent.com/onlyshk/erlang-github-api/4eb8a96edfe85c87b356e5912d729bb216d8a81d/src/messages.erl
erlang
All rights reserved. Include files Exported Functions API Functions @spec make_gist_comment_message(Message) -> Json @doc - Make json message @type - Message = String() @type - error = atom() @doc - Make json message to create new gist @type - Description = String() @type - Public = atom() @type...
Copyright ( c ) < 2011 > , < > -module(messages). -export([make_gist_comment_message/1]). -export([make_add_email_message/1]). -export([make_create_gist_message/4]). -export([make_blob_message/2]). -export([make_ref_message/2]). @type - Json = String ( ) make_gist_comment_message([]) -> error; make_gist_comme...
693a126a9c6332f7ac60ed598b2ab702e0e8e195f65cc9ad2a281021931b8676
thi-ng/demos
core.cljs
(ns ex04.core (:require-macros [reagent.ratom :refer [reaction]] [cljs-log.core :refer [debug info warn severe]]) (:require [ex04.game :as game] [thi.ng.geom.gl.webgl.animator :as anim] [thi.ng.domus.core :as dom] [reagent.core :as reagent])) (enable-console-print!) (defn gl-component [props] ...
null
https://raw.githubusercontent.com/thi-ng/demos/048cd131099a7db29be56b965c053908acad4166/ws-ldn-11/day2/ex04/src/ex04/core.cljs
clojure
(ns ex04.core (:require-macros [reagent.ratom :refer [reaction]] [cljs-log.core :refer [debug info warn severe]]) (:require [ex04.game :as game] [thi.ng.geom.gl.webgl.animator :as anim] [thi.ng.domus.core :as dom] [reagent.core :as reagent])) (enable-console-print!) (defn gl-component [props] ...
0414fa1560d2b69497f3407ade53149f2988aacb7a493930618dbe0a79ec589f
djblue/portal
build.clj
(ns tasks.build (:require [babashka.fs :as fs] [tasks.info :refer [version]] [tasks.tools :refer [*cwd* gradle npm npx shadow]])) (defn install [] (when (seq (fs/modified-since "node_modules" ["package.json" "package-lock.json"])) (npm :ci))) (defn main-js ...
null
https://raw.githubusercontent.com/djblue/portal/366dfd5f87e00863a2d645916048ff935778cca1/dev/tasks/build.clj
clojure
(ns tasks.build (:require [babashka.fs :as fs] [tasks.info :refer [version]] [tasks.tools :refer [*cwd* gradle npm npx shadow]])) (defn install [] (when (seq (fs/modified-since "node_modules" ["package.json" "package-lock.json"])) (npm :ci))) (defn main-js ...
f705baf8682caf0dea35934d6d1d10ae4556900a1dfc898b8cd53f420fbc3575
rmloveland/scheme48-0.53
read.scm
; -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*- Copyright ( c ) 1993 - 1999 by and . See file COPYING . ; A little Scheme reader. ; Nonstandard things used: Ascii stuff : char->ascii , ascii->char , ascii - whitespaces , ascii - limit ; (for dispatch table; portable definitions in alt/ascii.scm)...
null
https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/rts/read.scm
scheme
-*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*- A little Scheme reader. Nonstandard things used: (for dispatch table; portable definitions in alt/ascii.scm) reverse-list->string -- ok to define as follows: (define (reverse-list->string l n) (list->string (reverse l))) make-immutable! -- ok ...
Copyright ( c ) 1993 - 1999 by and . See file COPYING . Ascii stuff : char->ascii , ascii->char , ascii - whitespaces , ascii - limit (define (read . port-option) (let ((port (input-port-option port-option))) (let loop () (let ((form (sub-read port))) (cond ((not (reader-token? form)) ...
f494c13c1bdc204c0473e46bdf907cdef060c5a66c894c229184466888d9850f
narkisr-deprecated/core
common.clj
(comment re-core, Copyright 2012 Ronen Narkis, narkisr.com 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 distri...
null
https://raw.githubusercontent.com/narkisr-deprecated/core/85b4a768ef4b3a4eae86695bce36d270dd51dbae/src/aws/common.clj
clojure
(comment re-core, Copyright 2012 Ronen Narkis, narkisr.com 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 distri...
8ef7b31ffe1126ef49b2f23fb4cda36113c0feb0c2cbaf605547cd1b02f26dd8
sru-systems/protobuf-simple
ProtoParser.hs
-- | Module : Parser . Copyright : ( c ) 2015 - 2016 < > License : MIT Maintainer : < > -- Parser for proto files . module Parser.ProtoParser ( parseProto ) where import Control.Monad (void) import Data.Functor (($>)) import Data.Int (Int32) import Parser.EnumDesc (EnumDesc) ...
null
https://raw.githubusercontent.com/sru-systems/protobuf-simple/8d19dfc68466c1ce69e9d3af6e75df16fffd32cc/src/Parser/ProtoParser.hs
haskell
| FileDesc functions General functions
Module : Parser . Copyright : ( c ) 2015 - 2016 < > License : MIT Maintainer : < > Parser for proto files . module Parser.ProtoParser ( parseProto ) where import Control.Monad (void) import Data.Functor (($>)) import Data.Int (Int32) import Parser.EnumDesc (EnumDesc) import P...
ea2b540838426bcdea778d9967250630b0c916f08e95421922bbd4650ecbac16
eponai/sulolive
about_sulo.cljc
(ns eponai.web.ui.about-sulo (:require [om.next :as om :refer [defui]] [eponai.common.ui.router :as router] [eponai.common.ui.dom :as dom] [eponai.common.ui.elements.css :as css] [eponai.common.ui.elements.grid :as grid] [eponai.web.ui.photo :as photo] [eponai.web.social :as social])) (de...
null
https://raw.githubusercontent.com/eponai/sulolive/7a70701bbd3df6bbb92682679dcedb53f8822c18/src/eponai/web/ui/about_sulo.cljc
clojure
(ns eponai.web.ui.about-sulo (:require [om.next :as om :refer [defui]] [eponai.common.ui.router :as router] [eponai.common.ui.dom :as dom] [eponai.common.ui.elements.css :as css] [eponai.common.ui.elements.grid :as grid] [eponai.web.ui.photo :as photo] [eponai.web.social :as social])) (de...
ea508b4ba86f5c45b208ae4c095fc3383d1b211921b820b6dc26d43579b3352c
Vetd-Inc/vetd-app
db_copier.clj
(ns com.vetd.app.db-copier (:require [com.vetd.app.env :as env] [clojure.java.jdbc :as j] [clojure.java.io :as io] [clojure.string :as st] [taoensso.timbre :as log] clojure.pprint) (:import org.postgresql.copy.CopyManager [java.io Writer] [jav...
null
https://raw.githubusercontent.com/Vetd-Inc/vetd-app/9b33b1443b9d84d39305a63fc58119f8e014cf11/src/clj/com/vetd/app/db_copier.clj
clojure
(ns com.vetd.app.db-copier (:require [com.vetd.app.env :as env] [clojure.java.jdbc :as j] [clojure.java.io :as io] [clojure.string :as st] [taoensso.timbre :as log] clojure.pprint) (:import org.postgresql.copy.CopyManager [java.io Writer] [jav...
4c06d6dc8ed516c954aa3bff33a5e8714e302724ae999a7ae9a6156abb0496e4
gregtatcam/imaplet-lwt
server_config.mli
* Copyright ( c ) 2013 - 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...
null
https://raw.githubusercontent.com/gregtatcam/imaplet-lwt/d7b51253e79cffa97e98ab899ed833cd7cb44bb6/lib/commands/server_config.mli
ocaml
inbox location, default /var/mail mailboxes location, default /Users/user-name/mail irminsule location, default /tmp/irmin/test expand the contents of the database to the filesystem, default false max email size greeting name, default imaplet ssl enabled, default true pem file name, default server.pem ...
* Copyright ( c ) 2013 - 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...
19b5db97d88f0e52508232e005435ff2019e44cec8a9b9577829761b60a0b819
ntoronto/drbayes
semantic-function.rkt
#lang typed/racket (require typed/rackunit "../types.rkt" "fun-arrow.rkt" "bot-arrow.rkt" "partial-arrows.rkt" ) #; (begin (define-type (Arrow X Y) (Bot-Arrow X Y)) (define arr/a arr/bot) (define >>>/a >>>/bot) (define &&&/a &&&/bot) (define lazy/a lazy/bot) (d...
null
https://raw.githubusercontent.com/ntoronto/drbayes/e59eb7c7867118bf4c77ca903e133c7530e612a3/drbayes/direct/exact-semantics/semantic-function.rkt
racket
#lang typed/racket (require typed/rackunit "../types.rkt" "fun-arrow.rkt" "bot-arrow.rkt" "partial-arrows.rkt" ) (begin (define-type (Arrow X Y) (Bot-Arrow X Y)) (define arr/a arr/bot) (define >>>/a >>>/bot) (define &&&/a &&&/bot) (define lazy/a lazy/bot) (defi...
a604cb4dced5de98ede30a1b2962c7e76967191ae4614717081a056ff9d66ed5
bondy-io/bondy
bondy_auth_alias_SUITE.erl
%% ============================================================================= %% bondy_auth_password_SUITE.erl - %% Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the...
null
https://raw.githubusercontent.com/bondy-io/bondy/a1267e7e5526db24f278e12315020753f3168b44/apps/bondy/test/bondy_auth_alias_SUITE.erl
erlang
============================================================================= bondy_auth_password_SUITE.erl - 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 WARR...
Copyright ( c ) 2016 - 2022 Leapsight . 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(bondy_auth_alias_SUITE). -include_lib("common_test/include/ct.hrl"). -include_lib("stdlib/include/ass...
c713da157907485fe8226dce56199f12e88d67be7888fc6b7f6afa77cea939cd
reddit-archive/reddit1.0
scraper.lisp
;;;; Copyright 2018 Reddit, Inc. ;;;; ;;;; Permission is hereby granted, free of charge, to any person obtaining a copy of ;;;; this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation the rights to ;;;; use, copy, modify, merge, pu...
null
https://raw.githubusercontent.com/reddit-archive/reddit1.0/bb4fbdb5871a32709df30540685cf44c637bf203/scraper.lisp
lisp
Copyright 2018 Reddit, 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 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies so, subject to the following conditions: The a...
the Software without restriction , including without limitation the rights to of the Software , and to permit persons to whom the Software is furnished to do copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN A...
89ad9cab24c273ec022a937b1996a3180be44dee77efd58b4a829ac25aa63e18
raffy2010/grand-slam
ffmpeg.cljs
(ns ui.ffmpeg (:require [cljs.core.match :refer-macros [match]] [ui.state :refer [active-files messages convert-option tasks]] [ui.utils.common :refer [file-uid msg-uid ...
null
https://raw.githubusercontent.com/raffy2010/grand-slam/752984d606f4e201b305c6ac931dd0d03a12f4b4/ui_src/ui/ffmpeg.cljs
clojure
setup preview file
(ns ui.ffmpeg (:require [cljs.core.match :refer-macros [match]] [ui.state :refer [active-files messages convert-option tasks]] [ui.utils.common :refer [file-uid msg-uid ...
8a7bbc72527edb7e65c06895266ce4f49deef460f029e06cf297840ac35837a5
UU-ComputerScience/uhc
FractionalFromDouble1.hs
{- ---------------------------------------------------------------------------------------- what : Fractional.fromDouble for various types expected: all ok ---------------------------------------------------------------------------------------- -} module FractionalFromDouble1 where main = do let r1 = fromD...
null
https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/99/FractionalFromDouble1.hs
haskell
---------------------------------------------------------------------------------------- what : Fractional.fromDouble for various types expected: all ok ----------------------------------------------------------------------------------------
module FractionalFromDouble1 where main = do let r1 = fromDouble (10.5::Double) :: Float putStrLn (show r1) let r2 = fromDouble (10.5::Double) :: Double putStrLn (show r2) let r3 = fromDouble (10.5::Double) :: Rational putStrLn (show r3) putStrLn (show (numerator r3)) ...
c0769f084d40d50ca4b747265e3d6566684fa4c97059eaf5a9bc8f646e196bc6
k-bx/protocol-buffers
Arb.hs
# LANGUAGE MultiParamTypeClasses , FlexibleInstances # -- | The "Arb" module defined Arbitrary instances for all the basic types module Arb where import Test.QuickCheck import System.Random import qualified Data.Sequence as Seq import qualified Data.ByteString.Lazy as L import qualified Data.ByteString.Lazy.UTF8 as U ...
null
https://raw.githubusercontent.com/k-bx/protocol-buffers/89425795ac2d560c5d690714e7d206ba9f97aff2/tests/Arb.hs
haskell
| The "Arb" module defined Arbitrary instances for all the basic types arb g = do s <- getStdGen let (s1,s2) = split s setStdGen s1 let (i,s2') = random s2 return $ generate i s2' g
# LANGUAGE MultiParamTypeClasses , FlexibleInstances # module Arb where import Test.QuickCheck import System.Random import qualified Data.Sequence as Seq import qualified Data.ByteString.Lazy as L import qualified Data.ByteString.Lazy.UTF8 as U import Text.ProtocolBuffers.Basic import Text.ProtocolBuffers.Header(Unkno...
7a3736631ef02a636f18e669ae7706307f3ddab4e77a78ac74d0a93c557faa09
datodev/datodomvc
migrations.clj
(ns datodomvc.datomic.migrations (:require [datodomvc.datomic.core :as db-conn] [clojure.tools.logging :as log] [datomic.api :refer [db q] :as d]) (:import java.util.UUID)) (defn migration-entity "Finds the entity that keeps track of the migration version, there should be only one of t...
null
https://raw.githubusercontent.com/datodev/datodomvc/f6d65b61e2fe135a27e870f9a9613f204ded09a9/src/datodomvc/datomic/migrations.clj
clojure
This will set it to -1, then update-migration-version will set it to 0
(ns datodomvc.datomic.migrations (:require [datodomvc.datomic.core :as db-conn] [clojure.tools.logging :as log] [datomic.api :refer [db q] :as d]) (:import java.util.UUID)) (defn migration-entity "Finds the entity that keeps track of the migration version, there should be only one of t...
686e1ac6047cae3a336a306f31c9c19605193a18b27c5847f5bc70030a5e2c5c
thierry-martinez/metaquot
antiquot.ml
let () = match [%type: bool * char] with | [%type: [%t? b] * [%t? c]] -> begin match b with | [%type: bool] -> () | _ -> assert false end; begin match c with | [%type: char] -> () | _ -> assert false end | _ -> assert false
null
https://raw.githubusercontent.com/thierry-martinez/metaquot/bb00c62df9f63d1f3276cfca2a563c08fd54303a/tests/antiquot/antiquot.ml
ocaml
let () = match [%type: bool * char] with | [%type: [%t? b] * [%t? c]] -> begin match b with | [%type: bool] -> () | _ -> assert false end; begin match c with | [%type: char] -> () | _ -> assert false end | _ -> assert false
eb521864b3554488a192c8879a4b8acd16b51ba5e4dd06df1c6eae6b620560ca
sunshineclt/Racket-Helper
homework2-05.rkt
#lang racket (define (car num) (define (iter now) (if (= (remainder num (fast-exp 2 now)) 0) (iter (+ 1 now)) (- now 1))) (iter 0)) (define (cdr num) (define (iter now) (if (= (remainder num (fast-exp 3 now)) 0) (iter (+ 1 now)) (- now 1))) (iter 0)) (define (fast-exp a ...
null
https://raw.githubusercontent.com/sunshineclt/Racket-Helper/bf85f38dd8d084db68265bb98d8c38bada6494ec/%E9%99%88%E4%B9%90%E5%A4%A9/Week2/homework2-05.rkt
racket
#lang racket (define (car num) (define (iter now) (if (= (remainder num (fast-exp 2 now)) 0) (iter (+ 1 now)) (- now 1))) (iter 0)) (define (cdr num) (define (iter now) (if (= (remainder num (fast-exp 3 now)) 0) (iter (+ 1 now)) (- now 1))) (iter 0)) (define (fast-exp a ...
89e28463338f87789477c3de9c2e676a2c3fb917a1d4f7b67484a7d841f96017
simedw/Kandidat
OGL.hs
module Main where import Control.Concurrent import Control.Monad import Data.IORef import Graphics.Rendering.OpenGL import Graphics.UI.GLUT import qualified Graph as G data View = View { viewStartX :: GLfloat , viewStartY :: GLfloat , viewWidth :: GLfloat , viewHeight :: GLfloat } defaultView =...
null
https://raw.githubusercontent.com/simedw/Kandidat/fbf68edf5b003aba2ce13dac32ee1b94172d57d8/test/OGL.hs
haskell
module Main where import Control.Concurrent import Control.Monad import Data.IORef import Graphics.Rendering.OpenGL import Graphics.UI.GLUT import qualified Graph as G data View = View { viewStartX :: GLfloat , viewStartY :: GLfloat , viewWidth :: GLfloat , viewHeight :: GLfloat } defaultView =...