_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
9ba776ac3f6d92fcd9a6af89e1f75682ab8fc79bc1eb4ae73a6c68984ea924d2
mzp/coq-ruby
vernacexpr.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/toplevel/vernacexpr.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** true = Rec; false = NoRec...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * i $ I d : vernacexpr.ml 121...
d0755d89e7e6d1243870787b9a8cd988925271588d21a5fe56d39d22e11e8437
cedlemo/OCaml-GI-ctypes-bindings-generator
Message_type.mli
open Ctypes type t = Info | Warning | Question | Error | Other val of_value: Unsigned.uint32 -> t val to_value: t -> Unsigned.uint32 val t_view: t typ
null
https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Message_type.mli
ocaml
open Ctypes type t = Info | Warning | Question | Error | Other val of_value: Unsigned.uint32 -> t val to_value: t -> Unsigned.uint32 val t_view: t typ
b731d6be8ef306ad147672b0be218d886628d7ebb0b195802ff5597dcd2f7082
technomancy/leiningen
project.clj
(defproject overlapped-sourcepaths "0.1.0" :dependencies [[org.clojure/clojure "1.3.0"]] :java-source-paths ["src"])
null
https://raw.githubusercontent.com/technomancy/leiningen/24fb93936133bd7fc30c393c127e9e69bb5f2392/test_projects/overlapped-sourcepaths/project.clj
clojure
(defproject overlapped-sourcepaths "0.1.0" :dependencies [[org.clojure/clojure "1.3.0"]] :java-source-paths ["src"])
a375c6958b3a1388eab0306d40fd4669ea1900b289ddc7929a320d7e2a72e564
Th30n/cl-shake
shiva-test.lisp
Copyright ( C ) 2016 ;;;; ;;;; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ;;;; (at your option) any later version. ;;;; ;;;; This program is distribu...
null
https://raw.githubusercontent.com/Th30n/cl-shake/80550dba138fee977bf2f6deb62739dc7f381216/shiva/shiva-test.lisp
lisp
This program is free software; you can redistribute it and/or modify either version 2 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 of MERCHANTABILITY or FITNESS FOR A PARTICULAR...
Copyright ( C ) 2016 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 along 51 Franklin Street , Fifth Floor , Boston , USA . (in-package #:cl-user) (defpackage #:shiva-test (:use #:cl #:prove #:shiva...
9b0bee9b661ebcc10d98e16b4cdba1401901abf823d90b0278db082cfebdef6e
onaio/vega-viewer
horizontal_bar_chart_test.cljs
(ns vega-viewer.vega.specs.horizontal-bar-chart-test (:require-macros [cljs.test :refer [deftest testing]]) (:require [vega-viewer.vega.specs-test-utils :refer [test-validity]] [vega-viewer.vega.specs.horizontal-bar-chart :refer [generate-horizontal-bar-chart-vega-spec]])) (de...
null
https://raw.githubusercontent.com/onaio/vega-viewer/591c310131d2b662d96aef21546a718fcc0752a8/test/vega_viewer/vega/specs/horizontal_bar_chart_test.cljs
clojure
(ns vega-viewer.vega.specs.horizontal-bar-chart-test (:require-macros [cljs.test :refer [deftest testing]]) (:require [vega-viewer.vega.specs-test-utils :refer [test-validity]] [vega-viewer.vega.specs.horizontal-bar-chart :refer [generate-horizontal-bar-chart-vega-spec]])) (de...
e4435c31075d1da731865de225432f6f979851eb52ab525078955135b5137130
prikhi/solana-staking-csvs
Api.hs
| Solana Beach API requests & responses . TODO : Extract into a @solana - beach - api@ package . TODO: Extract into a @solana-beach-api@ package. -} # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # module Console.SolanaStaking.Api ...
null
https://raw.githubusercontent.com/prikhi/solana-staking-csvs/cda2eae217b3421a19688568524fdd209f2de480/src/Console/SolanaStaking/Api.hs
haskell
* Configuration * Requests / Responses ** Get Stake Accounts ** Get Staking Rewards ** Get Block * General API Types | Solana Beach API Configuration ^ Your API Key. Get one here: -beach/api separate package. pubkey. | Get the staking accounts for the 'cAccountPubKey'. | Single Result Page of Staking Accou...
| Solana Beach API requests & responses . TODO : Extract into a @solana - beach - api@ package . TODO: Extract into a @solana-beach-api@ package. -} # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # module Console.SolanaStaking.Api ...
c43fa9ab31f9fe753399ea2ed5650067c546f1f8a847110ed161ece860d97edb
probprob/probabilisticprogramming
Examples1.hs
Various simple examples of using Hakaru10 module Examples1 where import Syntax import Util import Control.Applicative -- Simple models pbern = dist bern 0.4 pbern_run = mcmC 10 pbern pnorm = dist normal 10 0.5 pdep1 = do x <- pnorm diracN (x+1) -- Literally the same samples pdep_run = mcmC 100 (dist normal...
null
https://raw.githubusercontent.com/probprob/probabilisticprogramming/59c96d9e25bf6067ff57f488d3049dbdc5b4e5dd/hakaru10/Examples1.hs
haskell
Simple models Literally the same samples True Fig 3 of Hur et al double x; i = i+1; } return x; Dependencies Conditionals (mixing) fromList [(10,246),(11,222),(20,240),(21,292)] fromList [(10,2481),(11,2394),(20,2565),(21,2560)] fromList [(1,500),(20,214),(21,286)] Mixing model Conditioning coin bias ...
Various simple examples of using Hakaru10 module Examples1 where import Syntax import Util import Control.Applicative pbern = dist bern 0.4 pbern_run = mcmC 10 pbern pnorm = dist normal 10 0.5 pdep1 = do x <- pnorm diracN (x+1) pdep_run = mcmC 100 (dist normal 11 0.5) == mcmC 100 pdep1 pdepR = do x <- p...
e11843f9ca6c9a25f06166ac3fa0e42a065ee65850b442156306f6f5b0c84f6b
aeolus-project/zephyrus
load_model.ml
(****************************************************************************) (* *) This file is part of Zephyrus . (* *) Z...
null
https://raw.githubusercontent.com/aeolus-project/zephyrus/0b52de4038bbab724e6a9628430165a7f09f77ae/src/input/load_model.ml
ocaml
************************************************************************** (at your option) any later version. ...
This file is part of Zephyrus . Zephyrus 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 Zephyru...
7890e4f26b85fbb24c3b72f78c1ca035c49b1d71235338609a86cbab0693c574
puffnfresh/lam
Gen.hs
# LANGUAGE FlexibleContexts # module Main where import Control.Lens hiding ((<.>)) import Control.Monad (guard) import Control.Monad.State (StateT, evalStateT, get, modify) import Control.Monad.Reader (Reader, asks, runReader) import Data.Char (isSpace) import Data.Foldable (traverse_) import Data.Maybe (fromMaybe) im...
null
https://raw.githubusercontent.com/puffnfresh/lam/7c6036b529d48ac7d94bae50eb165a1f32e127cd/Gen.hs
haskell
Derived methods Lenses Main
# LANGUAGE FlexibleContexts # module Main where import Control.Lens hiding ((<.>)) import Control.Monad (guard) import Control.Monad.State (StateT, evalStateT, get, modify) import Control.Monad.Reader (Reader, asks, runReader) import Data.Char (isSpace) import Data.Foldable (traverse_) import Data.Maybe (fromMaybe) im...
cb899a11bc30d13a4eb9f28b44e31ee61dd6fc64a1dff8313a6ef00f0196e4f7
Tener/deeplearning-thesis
gg-exp10.hs
# LANGUAGE ViewPatterns , TemplateHaskell , TypeFamilies , UndecidableInstances , Rank2Types , FlexibleContexts # -- tournament between neural networks - each working with the same DBN. module Main where import Prelude hiding (putStr, putStrLn) import GenericGameExperiments import GenericGame import AgentGeneric imp...
null
https://raw.githubusercontent.com/Tener/deeplearning-thesis/c56866bf6f48db3185b4b62348d292bf39a7a2af/src/gg-exp10.hs
haskell
tournament between neural networks - each working with the same DBN. NN1 comes from here score reporting evolution params scoreParams = ((readIORef agentsRef),(readIORef gamesRef)) populateGamesRef populateAgentsRef (map snd $ (esPopulation esParams ++ esArchive esParams)) threads <- getNumCapabilities setNumC...
# LANGUAGE ViewPatterns , TemplateHaskell , TypeFamilies , UndecidableInstances , Rank2Types , FlexibleContexts # module Main where import Prelude hiding (putStr, putStrLn) import GenericGameExperiments import GenericGame import AgentGeneric import BreakthroughGame import Matlab import MinimalNN import MinimalGA imp...
325215461ef11e7dc560da92350ecdcb0f95f38aa7d6053935f9b8a195df191b
alephcloud/hs-yet-another-logger
Logger.hs
Copyright ( c ) 2014 - 2015 PivotCloud , Inc. -- -- System.Logger -- -- Please feel free to contact us at with any -- contributions, additions, or other feedback; we would love to hear from -- you. -- Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may -- not use this file except in compl...
null
https://raw.githubusercontent.com/alephcloud/hs-yet-another-logger/bdeb95980b69839b1acf1a8cef53426bbd073531/src/System/Logger.hs
haskell
System.Logger Please feel free to contact us at with any contributions, additions, or other feedback; we would love to hear from you. 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 WAR...
Copyright ( c ) 2014 - 2015 PivotCloud , Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may distributed under the License is distributed on an " AS IS " BASIS , WITHOUT Copyright : Copyright © 2015 PivotCloud , Inc. Maintainer : < > # LANGUAGE DeriveGeneric # # LANGUAGE Fl...
dd2a1661ff405700b63153e2184af2089017c415c70162d1b8e1028fad3466d9
tommaisey/aeon
blip.help.scm
(import (rsc3)) (audition (out 0 (mul (blip ar 440 200) 0.15))) ;; Modulate frequency (let ((f (x-line kr 20000 200 6 remove-synth))) (audition (out 0 (mul (blip ar f 100) 0.2)))) ;; Modulate number of harmonics. (let ((h (line kr 1 100 20 remove-synth))) (audition (out 0 (mul (blip ar 200 h) 0.2))))
null
https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/oscillators/blip.help.scm
scheme
Modulate frequency Modulate number of harmonics.
(import (rsc3)) (audition (out 0 (mul (blip ar 440 200) 0.15))) (let ((f (x-line kr 20000 200 6 remove-synth))) (audition (out 0 (mul (blip ar f 100) 0.2)))) (let ((h (line kr 1 100 20 remove-synth))) (audition (out 0 (mul (blip ar 200 h) 0.2))))
e12af1fd94fa7970cfe503c6a453254a2a386df89e407b19a1701b0dc6747d48
odis-labs/onix
Pin_depends.mli
val collect_from_opam_files : Opam_utils.opam_details OpamTypes.name_map -> Opam_utils.opam_details OpamTypes.name_map (** Given all root packages find their pins. *)
null
https://raw.githubusercontent.com/odis-labs/onix/81cc82953ef062425656ac9bf80474f2ce642f5b/src/onix_core/Pin_depends.mli
ocaml
* Given all root packages find their pins.
val collect_from_opam_files : Opam_utils.opam_details OpamTypes.name_map -> Opam_utils.opam_details OpamTypes.name_map
5fbe39ef83cc3ef6dcaa63b7863529f76e7feb5f77c99df96349feb0fd4f2701
ocaml-flambda/ocaml-jst
Tests.ml
(* TEST * expect *) (* Subtyping is "syntactic" *) fun (x : < x : int >) y z -> (y :> 'a), (x :> 'a), (z :> 'a);; [%%expect{| - : < x : int > -> < x : int > -> < x : int > -> < x : int > * < x : int > * < x : int > = <fun> |}];; (* - : (< x : int > as 'a) -> 'a -> 'a * 'a = <fun> *) (* Quirks of class typing. ...
null
https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/e0129921e4260713d5bb8a748c8b78ac485134e4/testsuite/tests/typing-objects/Tests.ml
ocaml
TEST * expect Subtyping is "syntactic" - : (< x : int > as 'a) -> 'a -> 'a * 'a = <fun> Quirks of class typing. class ['a] c : unit -> object constraint 'a = int method f : 'a c end and ['a] d : unit -> object constraint 'a = int method f : 'a c end 'a free in class d Create instance #c class virtu...
fun (x : < x : int >) y z -> (y :> 'a), (x :> 'a), (z :> 'a);; [%%expect{| - : < x : int > -> < x : int > -> < x : int > -> < x : int > * < x : int > * < x : int > = <fun> |}];; class ['a] c () = object method f = (new c (): int c) end and ['a] d () = object inherit ['a] c () end;; [%%expect{| class ['a] c : ...
178148427a5b6eda345dfb361a2dcfa73ad3626912d36b0404e3a2fd90dfa5c7
airalab/hs-web3
Contracts.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} -- | -- Module : Network.Polkadot.Rpc.Contracts Copyright : 2016 - 2021 -- License : Apache-2.0 -- -- Maintainer : -- Stability : experimental -- Portability : portable -- -- Polkadot RPC methods with `contracts` prefix. -- ...
null
https://raw.githubusercontent.com/airalab/hs-web3/c03b86eb621f963886a78c39ee18bcec753f17ac/packages/polkadot/src/Network/Polkadot/Rpc/Contracts.hs
haskell
# LANGUAGE OverloadedStrings # | Module : Network.Polkadot.Rpc.Contracts License : Apache-2.0 Maintainer : Stability : experimental Portability : portable Polkadot RPC methods with `contracts` prefix. | Executes a call to a contract. ^ Contract call ^ Block hash or nothing for head | Ret...
# LANGUAGE FlexibleContexts # Copyright : 2016 - 2021 module Network.Polkadot.Rpc.Contracts where import Data.ByteArray.HexString (HexString) import Data.Text (Text) import Network.JsonRpc.TinyClient (JsonRpc (..)) import Network.Polkadot.Rpc.Typ...
c56ec8e117d04ad698f5a610668b3a63eb0884d16fedc7c785ba725bdddfa96d
Toxaris/pts
Tests.hs
module PTS.File.Tests ( testFile , testFileWithOptions ) where import Control.Monad.Assertions (collectAssertions) import Control.Monad.Errors import qualified Data.Map as Map import PTS.Error (showErrors) import PTS.Process.File (processFile) import PTS.Process.Main (runOptMonads, withEmptyState) import PTS.O...
null
https://raw.githubusercontent.com/Toxaris/pts/1700024f47bc9d28528b68fc815d2421f5d25b84/src-test/PTS/File/Tests.hs
haskell
module PTS.File.Tests ( testFile , testFileWithOptions ) where import Control.Monad.Assertions (collectAssertions) import Control.Monad.Errors import qualified Data.Map as Map import PTS.Error (showErrors) import PTS.Process.File (processFile) import PTS.Process.Main (runOptMonads, withEmptyState) import PTS.O...
c03a129a3dfdcb8465dc0bb98c4ec3f53ba97e6471f33029e0286f5a71e61e04
athos/parabola
adapter_loader.clj
(ns parabola.adapter-loader (:require [parabola.adapter :as adapter] [com.stuartsierra.component :as comp] [bultitude.core :as bult] [taoensso.timbre :as timbre] [clojure.string :as str])) (defn symbol-concat [& syms] (symbol (apply str syms))) (defn load-adapter [r...
null
https://raw.githubusercontent.com/athos/parabola/b6ea2d9108a97f9470f2f107c1f5fc71ea23f7e3/src/parabola/adapter_loader.clj
clojure
(ns parabola.adapter-loader (:require [parabola.adapter :as adapter] [com.stuartsierra.component :as comp] [bultitude.core :as bult] [taoensso.timbre :as timbre] [clojure.string :as str])) (defn symbol-concat [& syms] (symbol (apply str syms))) (defn load-adapter [r...
1df12d9ef7f6e7ba1b85db5f63ce27afe904d21664cb7a4e768b8fedf69d4822
TorXakis/TorXakis
LPEContextIds.hs
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and University of Twente See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and University of Twente See LICENSE at root directory of this repository. -} -----------------------------------...
null
https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/lpeops/src/core/LPEContextIds.hs
haskell
--------------------------------------------------------------------------- | Module : LPEContextIds License : BSD3 Maintainer : Stability : experimental --------------------------------------------------------------------------- getNextIds getModelIds Gathers all ids that are used in the give...
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and University of Twente See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and University of Twente See LICENSE at root directory of this repository. -} Copyright : TNO and Universi...
923c8678c8fc1680e8ef06441f4121b56008ac66539750c57f1a0052004a0eec
openbadgefactory/salava
tickets.cljs
(ns salava.admin.ui.tickets (:require [reagent.core :refer [atom cursor]] [reagent.session :as session] [reagent-modals.modals :as m] [clojure.set :as set :refer [intersection]] [clojure.string :refer [trim split]] [salava.core.ui.ajax-utils :as ajax] ...
null
https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/cljs/salava/admin/ui/tickets.cljs
clojure
:id (if open? "" "closed")} :id (if open? "" "closed")} [:label
(ns salava.admin.ui.tickets (:require [reagent.core :refer [atom cursor]] [reagent.session :as session] [reagent-modals.modals :as m] [clojure.set :as set :refer [intersection]] [clojure.string :refer [trim split]] [salava.core.ui.ajax-utils :as ajax] ...
733ed71591897bd6e7c13936b6a4841d9c0edce3a099bfbe47a35788c6fb9eca
gwkkwg/cl-containers
copying.lisp
(in-package #:containers) (defgeneric copy-container (abstract-container) (:method ((container abstract-container)) (metacopy:copy-thing container))) (metacopy:defcopy-methods container-node-mixin :copy-all t) (metacopy:defcopy-methods keyed-container-mixin :copy-all t) (metacopy:defcopy-methods typ...
null
https://raw.githubusercontent.com/gwkkwg/cl-containers/3d1df53c22403121bffb5d553cf7acb1503850e7/dev/copying.lisp
lisp
*************************************************************************** * End of File * ***************************************************************************
(in-package #:containers) (defgeneric copy-container (abstract-container) (:method ((container abstract-container)) (metacopy:copy-thing container))) (metacopy:defcopy-methods container-node-mixin :copy-all t) (metacopy:defcopy-methods keyed-container-mixin :copy-all t) (metacopy:defcopy-methods typ...
6810990723c9659dfae8d42280c4fc0d1e0124b71692ba0849df2a7bcaf70d66
pveber/bistro
cisbp.ml
open Core open Bistro module Sys = Sys_unix let fetch_pwm_archive : [`cisbp] directory = Bistro_unix.wget Biotk.Cisbp.pwm_archive_url |> Bistro_unix.unzip |> Fn.flip Workflow.select ["pwms"] let fetch_tf_information : tsv file = Bistro_unix.wget Biotk.Cisbp.tf_information_archive_url |> Bistro_unix.unzip ...
null
https://raw.githubusercontent.com/pveber/bistro/d363bd2d8257babbcb6db15bd83fd6465df7c268/lib/bio/cisbp.ml
ocaml
open Core open Bistro module Sys = Sys_unix let fetch_pwm_archive : [`cisbp] directory = Bistro_unix.wget Biotk.Cisbp.pwm_archive_url |> Bistro_unix.unzip |> Fn.flip Workflow.select ["pwms"] let fetch_tf_information : tsv file = Bistro_unix.wget Biotk.Cisbp.tf_information_archive_url |> Bistro_unix.unzip ...
f93ec6e343db1a3c57ab697e430f4fe712f8167cb42fffa0c2ca3dca5b2cb91c
ankushdas/Nomos
Typecheck.mli
module A = Ast val esync_tp : (A.decl * 'a) list -> A.stype -> ((int * int) * (int * int) * string) option -> unit val ssync_tp : (A.decl * 'a) list -> A.stype -> ((int * int) * (int * int) * string) option -> unit val contractive : A.stype -> bool val is_tpdef : (A.decl * 'a) list -> string -> bool val is_expd...
null
https://raw.githubusercontent.com/ankushdas/Nomos/db678f3981e75a1b3310bb55f66009bb23430cb1/nomos/nomos-lib/Typecheck.mli
ocaml
module A = Ast val esync_tp : (A.decl * 'a) list -> A.stype -> ((int * int) * (int * int) * string) option -> unit val ssync_tp : (A.decl * 'a) list -> A.stype -> ((int * int) * (int * int) * string) option -> unit val contractive : A.stype -> bool val is_tpdef : (A.decl * 'a) list -> string -> bool val is_expd...
6f2cde653038f6a261db9b1896c411cdd618d4129612d6f0aaefff371b60329f
binaryage/clearcut
runner.clj
(ns clearcut.runner (:require [environ.core :refer [env]])) (defmacro ansi-enabled? [] (not (:clearcut-disable-test-runner-ansi env)))
null
https://raw.githubusercontent.com/binaryage/clearcut/7f44705cd8743f8679199cb78a215487eb411ed4/test/src/runner/clearcut/runner.clj
clojure
(ns clearcut.runner (:require [environ.core :refer [env]])) (defmacro ansi-enabled? [] (not (:clearcut-disable-test-runner-ansi env)))
ee2318eeaa739f5d607ee007c3c2b45f0bf6d21fc1d854737489839d9d96b606
d-cent/objective8
storage.clj
(ns objective8.integration.db.storage (:require [midje.sweet :refer :all] [objective8.back-end.storage.storage :as storage] [objective8.back-end.storage.database :as db] [objective8.integration.integration-helpers :refer [truncate-tables ...
null
https://raw.githubusercontent.com/d-cent/objective8/db8344ba4425ca0b38a31c99a3b282d7c8ddaef0/test/objective8/integration/db/storage.clj
clojure
GENERAL USERS OBJECTIVES COMMENTS QUESTIONS ANSWERS UP-DOWN-VOTES INVITATIONS WRITERS INVITATIONS STARS RETRIEVING MANY RESULTS
(ns objective8.integration.db.storage (:require [midje.sweet :refer :all] [objective8.back-end.storage.storage :as storage] [objective8.back-end.storage.database :as db] [objective8.integration.integration-helpers :refer [truncate-tables ...
5a7a6dc6cac79e9cdb256429d64246a090c61946470f3aa1dc0f515dac71f234
janestreet/base
shadow_stdlib.ml
include Stdlib
null
https://raw.githubusercontent.com/janestreet/base/1462b7d5458e96569275a1c673df968ecbf3342f/shadow-stdlib/src/shadow_stdlib.ml
ocaml
include Stdlib
7b8731767ba909e6631edadb2de1925933a80018bdd4bbf5cdcf768984e254a9
8c6794b6/haskell-sc-scratch
Tree.hs
------------------------------------------------------------------------------ -- | -- Module : $Header$ -- License : BSD3 Maintainer : -- Stability : unstable -- Portability : non-portable -- -- Tree data type. -- module LearnYour.Zipper.Tree where data Tree a = Empty | Node a (Tree a) (T...
null
https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/LearnYour/Zipper/Tree.hs
haskell
---------------------------------------------------------------------------- | Module : $Header$ License : BSD3 Stability : unstable Portability : non-portable Tree data type.
Maintainer : module LearnYour.Zipper.Tree where data Tree a = Empty | Node a (Tree a) (Tree a) deriving (Eq, Show) freeTree :: Tree Char freeTree = Node 'P' (Node 'O' (Node 'L' (Node 'N' Empty Empty) (Node 'T' Empty Empty)) (Node 'Y' (Nod...
0f1fdb0a9d893adeac057611dbcfc9c68ead0ca51257e0a047a48c17c363b120
yurug/ocaml4.04.0-copatterns
static_float_array_flambda_opaque.ml
external is_in_static_data : 'a -> bool = "caml_is_in_static_data" let a = [|0.; 1.|] let f = 1.23 let b = [|0.; f; f|] let g = Sys.opaque_identity 1.23 let c = [|0.; g|] let d = [|0.; Simple_float_const_opaque.f|] let () = assert(is_in_static_data a) let () = assert(is_in_static_data f) let () = assert(is_in_static_...
null
https://raw.githubusercontent.com/yurug/ocaml4.04.0-copatterns/b3ec6a3cc203bd2cde3b618546d29e10f1102323/testsuite/tests/asmcomp/static_float_array_flambda_opaque.ml
ocaml
The dependency Simple_float_const_opaque is built with opaque, hence the value of Simple_float_const_opaque.f cannot be known preventing the static allocation of d
external is_in_static_data : 'a -> bool = "caml_is_in_static_data" let a = [|0.; 1.|] let f = 1.23 let b = [|0.; f; f|] let g = Sys.opaque_identity 1.23 let c = [|0.; g|] let d = [|0.; Simple_float_const_opaque.f|] let () = assert(is_in_static_data a) let () = assert(is_in_static_data f) let () = assert(is_in_static_...
c901d5db21b4dbff5797486ef44c32875800f57282902a02893454b567a2730d
jmgimeno/okasaki-clojure
batched_queue.clj
(ns okasaki.batched-queue (:refer-clojure :exclude [empty? split-at]) (:use datatype.core okasaki.list)) (defdatatype ::BatchedQueue (Pair front rear)) (def Empty (->Pair Nil Nil)) (defun empty? ;;[queue] [[Pair Nil _]] true :else false) (defun checkf ;;[queue] ...
null
https://raw.githubusercontent.com/jmgimeno/okasaki-clojure/f3e8031d490f5505b74f4a7593f0f9e2e5fe79f3/src/okasaki/batched_queue.clj
clojure
[queue] [queue] [queue elem] [queue] [queue]
(ns okasaki.batched-queue (:refer-clojure :exclude [empty? split-at]) (:use datatype.core okasaki.list)) (defdatatype ::BatchedQueue (Pair front rear)) (def Empty (->Pair Nil Nil)) (defun empty? [[Pair Nil _]] true :else false) (defun checkf [[Pair Nil r]] (->Pair (rev...
4ca7cef83f06e4e6e701f36b70ca312402015830e0dfcd22d165461513881c1e
drewnoff/openintro-gorilla-incanter
project.clj
(defproject probability "0.1.0-SNAPSHOT" :description "OenIntro lab 'Probability'" :url "-repl.org/view.html?source=github&user=drewnoff&repo=openintro-gorilla-incanter&path=/probability/src/openintro/probability.clj" :license {:name "CC-BY-SA" :url "-sa/3.0/"} :dependencies [[org.clojure/clojure "1...
null
https://raw.githubusercontent.com/drewnoff/openintro-gorilla-incanter/cb9688d5624bb54649073fdf0e1672047dbff391/probability/project.clj
clojure
(defproject probability "0.1.0-SNAPSHOT" :description "OenIntro lab 'Probability'" :url "-repl.org/view.html?source=github&user=drewnoff&repo=openintro-gorilla-incanter&path=/probability/src/openintro/probability.clj" :license {:name "CC-BY-SA" :url "-sa/3.0/"} :dependencies [[org.clojure/clojure "1...
05e4e4a5154f7a6fc9b6b6123c4e0f765215e23663b87fe70c463dde6e3851ca
quicklisp/quicklisp-client
config.lisp
;;;; config.lisp (in-package #:ql-config) (defun config-value-file-pathname (path) (let ((bad-position (position #\Space path))) (when bad-position (error "Space not allowed at position ~D in ~S" bad-position path))) (let* ((space-path (substitute #\Space #\/ path)) (s...
null
https://raw.githubusercontent.com/quicklisp/quicklisp-client/8b63e00b3a2b3f96e24c113d7601dd03a128ce94/quicklisp/config.lisp
lisp
config.lisp
(in-package #:ql-config) (defun config-value-file-pathname (path) (let ((bad-position (position #\Space path))) (when bad-position (error "Space not allowed at position ~D in ~S" bad-position path))) (let* ((space-path (substitute #\Space #\/ path)) (split (split-space...
89a68222d92917b75b1c52d524ef3627440bc9db94ee34c902996b44dea3e9db
alevy/simple
Spec.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Monad import Control.Monad.IO.Class import Control.Monad.Trans import Control.Monad.Trans.Control import Test.Hspec import Test.Hspec.Contrib.HUnit import Network.Wai import Web.Simple.Controller.Trans import Web.Simple.Responses main :: IO () main =...
null
https://raw.githubusercontent.com/alevy/simple/7091a592635999b3d60799b70c85bceda3905a9f/simple/test/Spec.hs
haskell
# LANGUAGE OverloadedStrings #
module Main where import Control.Monad import Control.Monad.IO.Class import Control.Monad.Trans import Control.Monad.Trans.Control import Test.Hspec import Test.Hspec.Contrib.HUnit import Network.Wai import Web.Simple.Controller.Trans import Web.Simple.Responses main :: IO () main = hspec $ do describe "ControllerT...
3988c853731a4f8791d5253f54f847178f3be497d686cb810f0d4d5a6fb3858c
weavejester/compojure
handler.clj
(ns compojure.handler "Functions to create Ring handlers from routes. This namespace has been **DEPRECATED** in favor of the [ring-defaults][] library. [ring-defaults]: -clojure/ring-defaults" {:deprecated "1.2"} (:use [ring.middleware params keyword-params ...
null
https://raw.githubusercontent.com/weavejester/compojure/bdf6c8cf630e160967a5e1e8cf8f60688e85c24f/src/compojure/handler.clj
clojure
(ns compojure.handler "Functions to create Ring handlers from routes. This namespace has been **DEPRECATED** in favor of the [ring-defaults][] library. [ring-defaults]: -clojure/ring-defaults" {:deprecated "1.2"} (:use [ring.middleware params keyword-params ...
3185ab341ef9bdbb55ecd490db6b29af4b9cd6b76efbba43b5b8c198ad2c4920
vincenthz/hs-cryptohash
BenchHMAC.hs
import Criterion.Main import Crypto.Hash import qualified Data.ByteString as B import Data.Byteable main = do let b32 = B.replicate 32 0 defaultMain [ bench "hmac-md5" $ whnf (toBytes . hmacAlg MD5 b32) b32 , bench "hmac-sha1" $ whnf (toBytes . hmacAlg SHA1 b32) b32 ]
null
https://raw.githubusercontent.com/vincenthz/hs-cryptohash/bc7993c104964a2a593265266730ebc78ef59774/Bench/BenchHMAC.hs
haskell
import Criterion.Main import Crypto.Hash import qualified Data.ByteString as B import Data.Byteable main = do let b32 = B.replicate 32 0 defaultMain [ bench "hmac-md5" $ whnf (toBytes . hmacAlg MD5 b32) b32 , bench "hmac-sha1" $ whnf (toBytes . hmacAlg SHA1 b32) b32 ]
4586e652bb76483d1b5823303047f842f73c0e8a15ba1b303b2dc794ad51f12a
S8A/htdp-exercises
ex047.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex047) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex047.rkt
racket
about the language level of this file in a form that our tools can easily process. ..:: Constants ::.. ..:: Functions ::.. A Happiness is a Number interpretation the "level of happiness" measured by the gauge, Happiness -> Number Converts happiness to a number representing the width of the happiness bar of the ...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex047) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t ...
51c95584a8afc1c9aeffd678156ecc565916fe633d7d718279fa3ad1335a393c
JAremko/spacetools
node.clj
(ns spacetools.spacedoc.node "Node specs and constructors. All public functions are constructors." (:require [clojure.core.reducers :as r] [clojure.set :as set :refer [map-invert]] [clojure.spec.alpha :as s] [clojure.spec.gen.alpha :as gen] [clojure.string :as str] ...
null
https://raw.githubusercontent.com/JAremko/spacetools/d047e99689918b5a4ad483022f35802b2015af5f/components/spacedoc/src/spacetools/spacedoc/node.clj
clojure
inline leaf kbd node line-break node text node verbatim node inline element inline-container children bold node italic node strike-through node underline node link TODO: It can be a problem that link type and path aren't synchronized. For example the generator will generate "file: foo" links for ...
(ns spacetools.spacedoc.node "Node specs and constructors. All public functions are constructors." (:require [clojure.core.reducers :as r] [clojure.set :as set :refer [map-invert]] [clojure.spec.alpha :as s] [clojure.spec.gen.alpha :as gen] [clojure.string :as str] ...
c54b5d272c7135f5921d4303160b6ced653a232ebc79baf6b668c2f6722b6469
hammerlab/coclobas
error.ml
open Internal_pervasives let to_string = let exn = Printexc.to_string in function | `Shell_command e -> sprintf "Shell-command failed:\n%s" (Hyper_shell.Error.to_display_string e) | `Storage e -> Storage.Error.to_string e | `Log e -> Log.Error.to_string e | `IO (`Write_file_exn (path, e)) -> sprin...
null
https://raw.githubusercontent.com/hammerlab/coclobas/5341ea53fdb5bcea0dfac3e4bd94213b34a48bb9/src/lib/error.ml
ocaml
open Internal_pervasives let to_string = let exn = Printexc.to_string in function | `Shell_command e -> sprintf "Shell-command failed:\n%s" (Hyper_shell.Error.to_display_string e) | `Storage e -> Storage.Error.to_string e | `Log e -> Log.Error.to_string e | `IO (`Write_file_exn (path, e)) -> sprin...
451a1e51da8e71b32e4390463d2329eb71c1a4d387382e64ec4d143731312db4
elpinal/modules
Config.hs
# LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE OverloadedStrings #-} module Language.Modules.Ros2018.Package.Config ( Config(..) , Import(..) , configFile , parseConfig , ConfigParseError , C(..) ) where import Control.Comonad import Data.Char import Data.Coerce import Data.Monoid import qualified...
null
https://raw.githubusercontent.com/elpinal/modules/aa8f2725a770edb06626aeaf8716da90dfa06823/src/Language/Modules/Ros2018/Package/Config.hs
haskell
# LANGUAGE OverloadedStrings # Space consumer.
# LANGUAGE GeneralizedNewtypeDeriving # module Language.Modules.Ros2018.Package.Config ( Config(..) , Import(..) , configFile , parseConfig , ConfigParseError , C(..) ) where import Control.Comonad import Data.Char import Data.Coerce import Data.Monoid import qualified Data.Text as T import Data.Void im...
7ad94080310c247f38355d3bc6339ea748a28c9f4f818fe6d5aaf97d8721b7ce
cloudant/fabric
fabric_view_all_docs.erl
Copyright 2010 Cloudant % 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 distributed under the Lice...
null
https://raw.githubusercontent.com/cloudant/fabric/217d0b00bc4301bd834e76d902edf9c052e18b87/src/fabric_view_all_docs.erl
erlang
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 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitation...
Copyright 2010 Cloudant Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(fabric_view_all_docs). -export([go/4]). -include("fabric.hrl"). -include_lib("mem3/include/mem3.hrl"). -include_lib("cou...
9dabec8cfd94a68feaf5517fe70161795b5cfe2b7f9efc482d3bc170d81768b4
nvim-treesitter/nvim-treesitter
indents.scm
[ (array) (object) ] @indent "}" @indent_end [ "{" "}" ] @branch [ "[" "]" ] @branch [ "(" ")" ] @branch [ (ERROR) (comment) (diagnostic_comment) ] @auto
null
https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/028b7dfbddffdd4738a25a76b280d9b26f38ce42/queries/bicep/indents.scm
scheme
[ (array) (object) ] @indent "}" @indent_end [ "{" "}" ] @branch [ "[" "]" ] @branch [ "(" ")" ] @branch [ (ERROR) (comment) (diagnostic_comment) ] @auto
e39d1e9f8bdcca5a7825039c67fc1ee100c0d960604cbc446a048ffd59473b06
leftaroundabout/manifolds
LinDevFind.hs
-- | Helpers for estimating the inverse /O/(/δx/²) remainders -- of linearisations of elementary functions. import Data.MacLaurin import Data.LinearMap | For a “ sufficiently simple ” function to be evaluated at @x₀@ , find the abs - smallest @q@ with the same sign as @f''(x)@ such that the -- inequality...
null
https://raw.githubusercontent.com/leftaroundabout/manifolds/6f4d3ed71497074ad4cef2874a2d9fe73a14a377/manifolds/proof/elemfuns-lindevs/LinDevFind.hs
haskell
| Helpers for estimating the inverse /O/(/δx/²) remainders of linearisations of elementary functions. inequality @f(x₀) + δ·f'(x₀) + δ²·q ≥ f(x₀+δ)@ holds (for positive @f''@, This method doesn't (and can't) perform any rigorous proofs of an ideal solution, but merely adjusts test parabolas so they just do...
import Data.MacLaurin import Data.LinearMap | For a “ sufficiently simple ” function to be evaluated at @x₀@ , find the abs - smallest @q@ with the same sign as @f''(x)@ such that the otherwise the LHS should be /less/ than the RHS ) , hopefully for all δ . In other words , modify the 2nd - order ex...
a13280491e246da51a9d5ef04df93477538c7253b01532172b6e05969d11c2a6
clojure/test.check
results_test.cljc
; All rights reserved. ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; the terms of this li...
null
https://raw.githubusercontent.com/clojure/test.check/c05034f911fa140913958b79aa51017d3f2f4426/src/test/clojure/clojure/test/check/results_test.cljc
clojure
All rights reserved. The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license....
(ns clojure.test.check.results-test (:require #?(:cljs [cljs.test :as test :refer-macros [are deftest testing is]]) #?(:clj [clojure.test :refer :all]) [clojure.test.check.results :as results])) (deftest default-passing-values (is (not (results/pass? nil))) ...
185dbe1f0f9d07d05fd2dc31680cbb4c43ece3f6c8730a7c427aa30807375243
ocaml/oasis
BaseSetup.ml
(******************************************************************************) OASIS : architecture for building OCaml libraries and applications (* *) Copyright ( C ) 2011 - 2016 , Copyrig...
null
https://raw.githubusercontent.com/ocaml/oasis/3d1a9421db92a0882ebc58c5df219b18c1e5681d/src/base/BaseSetup.ml
ocaml
**************************************************************************** This library is free software; you can redistribute it and/or modify it under the t...
OASIS : architecture for building OCaml libraries and applications Copyright ( C ) 2011 - 2016 , Copyright ( C ) 2008 - 2011 , OCamlCore SARL the Free Software Foundation ; either version 2.1 of the License , or ( at You s...
afa4aa4e608c924688f60640aed20f9a31eac92b494b43dcb17827b97b79aeaa
ekmett/discrimination
Internal.hs
# LANGUAGE CPP # # LANGUAGE TupleSections # # LANGUAGE ParallelListComp # # LANGUAGE MagicHash # module Data.Discrimination.Internal ( runs , groupNum , bdiscNat , updateBag , updateSet , spanEither , integerCases , naturalCases ) where import Data.Array as Array import Data.Functor import Data.Int i...
null
https://raw.githubusercontent.com/ekmett/discrimination/91f90c8fcb401b8538eb8768cd3d70212ef9422d/src/Data/Discrimination/Internal.hs
haskell
------------------------------------------------------------------------------ * Utilities ------------------------------------------------------------------------------ | Optimized and CPS'd version of 'Data.Either.partitionEithers', where all lefts are known to come before all rights -------------------------------...
# LANGUAGE CPP # # LANGUAGE TupleSections # # LANGUAGE ParallelListComp # # LANGUAGE MagicHash # module Data.Discrimination.Internal ( runs , groupNum , bdiscNat , updateBag , updateSet , spanEither , integerCases , naturalCases ) where import Data.Array as Array import Data.Functor import Data.Int i...
08b0bd389fbdbe7016a6345f17b741f5aee07516b226ed8dab36535194406216
Gabriella439/managed
Safe.hs
{-# LANGUAGE RankNTypes #-} | This module is a safer subset of " Control . Monad . Managed " that only lets you unwrap the ` Managed ` type using ` runManaged ` . This enforces that you never leak acquired resources from a ` Managed ` computation . In general , you should strive to propagate the `...
null
https://raw.githubusercontent.com/Gabriella439/managed/7a1d457f3021ab67259bf9033b9792e2ed9e6acc/src/Control/Monad/Managed/Safe.hs
haskell
# LANGUAGE RankNTypes # * Managed * Re-exports $reexports
| This module is a safer subset of " Control . Monad . Managed " that only lets you unwrap the ` Managed ` type using ` runManaged ` . This enforces that you never leak acquired resources from a ` Managed ` computation . In general , you should strive to propagate the ` Managed ` type as much as ...
d978fc4c58d65ed10dbfac7ac39a941b70374fd6d1152641b75e4ad8c4ef9fb8
diku-kmc/kleenexlang
OutputEquivalence.hs
# LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # module KMC.SymbolicFST.OutputEquivalence where import Data.Foldable import Data.Map (Map, (!)) import qualified Data.Map as M import Data.Maybe (fromMaybe) import Data.Set (Set) import qualified Data.Set as S import ...
null
https://raw.githubusercontent.com/diku-kmc/kleenexlang/d474c6015339c261b2e7bf37061175fd69185baf/src/KMC/SymbolicFST/OutputEquivalence.hs
haskell
| Takes a transducer and forgets all transitions with non-epsilon output labels, and considers the result as a control-flow graph. Based on this defined by the following data-flow equation: PDom(p) = ⋂{ PDom(q) | p --> q } ∪ { p } | Given a post dominator map, computes for each state s the /last/ post-dominator...
# LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # module KMC.SymbolicFST.OutputEquivalence where import Data.Foldable import Data.Map (Map, (!)) import qualified Data.Map as M import Data.Maybe (fromMaybe) import Data.Set (Set) import qualified Data.Set as S import ...
fba9d079ba91093e867b54980bea75ee456ca0ff5978cd46922447a5246e0cd4
haskell-tools/haskell-tools
C.hs
# LANGUAGE TemplateHaskell # module C where import A import Language.Haskell.TH c' :: Q [Dec] c' = [d| type X = A'' |]
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/daemon/examples/Project/th-imports-normal/C.hs
haskell
# LANGUAGE TemplateHaskell # module C where import A import Language.Haskell.TH c' :: Q [Dec] c' = [d| type X = A'' |]
2e477790416bed7bfd449d0f58f2bd1c7b3c9c83e5196ac6bf7f8b95abe3afbc
essen/egs
egs_char.erl
-module(egs_char). -export([new/6]). -include_lib("erlson/include/erlson.hrl"). %% @todo Add the current location for backtopreviousfield new(Slot, Name, Race, Gender, Class, Appearance) -> #{ type=player, slot=Slot, name=Name, race=Race, gender=Gender, class=Class, appearance=Appearance, level=1,...
null
https://raw.githubusercontent.com/essen/egs/ceea04c3b438cee9a8470f2abc6297429bf347c5/apps/egs/src/egs_char.erl
erlang
@todo Add the current location for backtopreviousfield current_uni, current location + entryid previous location + entryid pids for such
-module(egs_char). -export([new/6]). -include_lib("erlson/include/erlson.hrl"). new(Slot, Name, Race, Gender, Class, Appearance) -> #{ type=player, slot=Slot, name=Name, race=Race, gender=Gender, class=Class, appearance=Appearance, level=1, exp=0, hunter_level=1, hunter_exp=0, ranger_leve...
4aa54b8211da4054d046cc527728d83237b9e62f1f660b70b43f1c69521fcc76
scalaris-team/scalaris
gossip_load_default.erl
2010 - 2015 Zuse Institute Berlin 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 d...
null
https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/src/gossip_load_default.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language gov...
2010 - 2015 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(gossip_load_default). -vsn('$Id$'). -behaviour(gossip_load_beh). -export([get_load/1, init_histo/2]). -spec get_load(node_d...
6fea72910f2e6d30a2ae5026119642be7f1f1f153b8b19406ce6e4f0b8c146b3
tsloughter/kuberl
kuberl_v1alpha1_volume_attachment.erl
-module(kuberl_v1alpha1_volume_attachment). -export([encode/1]). -export_type([kuberl_v1alpha1_volume_attachment/0]). -type kuberl_v1alpha1_volume_attachment() :: #{ 'apiVersion' => binary(), 'kind' => binary(), 'metadata' => kuberl_v1_object_meta:kuberl_v1_object_meta(), 'spec' := kuberl_v1...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1alpha1_volume_attachment.erl
erlang
-module(kuberl_v1alpha1_volume_attachment). -export([encode/1]). -export_type([kuberl_v1alpha1_volume_attachment/0]). -type kuberl_v1alpha1_volume_attachment() :: #{ 'apiVersion' => binary(), 'kind' => binary(), 'metadata' => kuberl_v1_object_meta:kuberl_v1_object_meta(), 'spec' := kuberl_v1...
ca1c7779e7fd2b2d345e031bce373801f4beaa1fd8d7dc5aac07f6025401f022
DSLsofMath/BScProj2018
Quantity2.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE KindSignatures # {-# LANGUAGE TypeOperators #-} # LANGUAGE UndecidableInstances # # LANGUAGE MultiParamTypeClasses # module Dimensions.Quantity2 where import Dimension...
null
https://raw.githubusercontent.com/DSLsofMath/BScProj2018/410f185c61b31c7671e60db873ba7b3afee44c30/Physics/src/Dimensions/Quantity2.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # -------------------------------- -------------------------------- doMult = (*)
# LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE KindSignatures # # LANGUAGE UndecidableInstances # # LANGUAGE MultiParamTypeClasses # module Dimensions.Quantity2 where import Dimensions.TypeLevel as T import qualified Dimensions.ValueLevel as V import ...
a298558b687153ee18810121d159b56f58863be2e0ed93bc05757e4d225546bb
puzza007/katipo
katipo_SUITE.erl
-module(katipo_SUITE). -compile(export_all). -include_lib("common_test/include/ct.hrl"). -define(POOL, katipo_test_pool). -define(POOL_SIZE, 2). suite() -> [{timetrap, {seconds, 30}}]. init_per_suite(Config) -> application:ensure_all_started(katipo), application:ensure_all_started(meck), {ok, _} = ...
null
https://raw.githubusercontent.com/puzza007/katipo/5c9cb3108aef2cc15cab8b302f245c5271b28a8d/test/katipo_SUITE.erl
erlang
TODO :Fix this test. See verify_host_verify_peer_error, TODO: Fix this test. See cacert_self_signed, TODO: this could be made to reflect the ifdef from katipo.c... Certificate provided but no key This key requires a passphrase
-module(katipo_SUITE). -compile(export_all). -include_lib("common_test/include/ct.hrl"). -define(POOL, katipo_test_pool). -define(POOL_SIZE, 2). suite() -> [{timetrap, {seconds, 30}}]. init_per_suite(Config) -> application:ensure_all_started(katipo), application:ensure_all_started(meck), {ok, _} = ...
78ee6e67f0fdacbf1be4d3a8fc77e02102af0f79c090e7e4d15042acf1dc3207
rurban/clisp
wrap.lisp
;;; Lisp wrappers for the Matlab API ;;; <> (require "matlab") (in-package "MATLAB") (pushnew :matlab *features*) (defun matfile-content (mf) "return the vector of strings naming variables in MATfile" (multiple-value-bind (buf num) (matGetDir mf) (unwind-protect (memory-as buf (parse-c-type `(c-array c-stri...
null
https://raw.githubusercontent.com/rurban/clisp/75ed2995ff8f5364bcc18727cde9438cca4e7c2c/modules/matlab/wrap.lisp
lisp
Lisp wrappers for the Matlab API <>
(require "matlab") (in-package "MATLAB") (pushnew :matlab *features*) (defun matfile-content (mf) "return the vector of strings naming variables in MATfile" (multiple-value-bind (buf num) (matGetDir mf) (unwind-protect (memory-as buf (parse-c-type `(c-array c-string ,num))) (mxFree buf)))) (defvar *c...
67170b047466e55df9ace08e1c49f03304c34d5e43f3969422709e4634737d10
RichiH/git-annex
FreeDesktop.hs
Freedesktop.org specifications - - -spec/latest/ - -entry-spec/latest/ - -spec/latest/ - -theme-spec/latest/ - - Copyright 2012 < > - - License : BSD-2 - clause - - -spec/latest/ - -entry-spec/latest/ - -spec/latest/ - -theme-spec/latest/ - - Copyright 2012 Joey Hess <> - - L...
null
https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Utility/FreeDesktop.hs
haskell
Path to use for a desktop menu file, in either the systemDataDir or - the userDataDir Path to use for a desktop autostart file, in either the systemDataDir - or the userDataDir Filename of an icon, given the iconDir to use. - - The resolution is something like "48x48" or "scalable". Directory used for instal...
Freedesktop.org specifications - - -spec/latest/ - -entry-spec/latest/ - -spec/latest/ - -theme-spec/latest/ - - Copyright 2012 < > - - License : BSD-2 - clause - - -spec/latest/ - -entry-spec/latest/ - -spec/latest/ - -theme-spec/latest/ - - Copyright 2012 Joey Hess <> - - L...
aa829da6a2a6bcbd2c486b72d76da36eaee1a66d9ba09f269d2f4e85172e1ecc
ekmett/trifecta
Spec.hs
module Main where import qualified RFC2616 import Control.Monad.IO.Class (liftIO) import Test.Hspec import Text.Trifecta -- Just [(Request {requestMethod = "GET", requestUri = "/", requestProtocol = "1.1"},[Header {headerName = "foo", headerValue = ["this is a test"]}]),(Request {reques...
null
https://raw.githubusercontent.com/ekmett/trifecta/09bced0aed5ae54d22fa2caba4e3f04d1825f538/examples/Spec.hs
haskell
Just [(Request {requestMethod = "GET", requestUri = "/", requestProtocol = "1.1"},[Header {headerName = "foo", headerValue = ["this is a test"]}]),(Request {requestMethod = "GET", requestUri = "/", requestProtocol = "1.0"},[Header {headerName = "foo", headerValue = ["of the emergency broadcast system"]}])] result :: ...
module Main where import qualified RFC2616 import Control.Monad.IO.Class (liftIO) import Test.Hspec import Text.Trifecta main :: IO () main = hspec $ do describe "RFC2616.hs should be able to parse RFC2616" $ do it "parses the RFC2616.txt file successfully" $ do result <- l...
e0212798af31a45b36ecea12aff82ce3dd6f51b2745551ec2a3c5ce8cd35fe2d
unison-code/uni-instr-sel
Base.hs
| Copyright : Copyright ( c ) 2012 - 2017 , < > License : BSD3 ( see the LICENSE file ) Maintainer : Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <> License : BSD3 (see the LICENSE file) Maintainer : -} Main authors : < > Contributing authors : ...
null
https://raw.githubusercontent.com/unison-code/uni-instr-sel/2edb2f3399ea43e75f33706261bd6b93bedc6762/hlib/instr-sel/Language/InstrSel/OpTypes/Base.hs
haskell
-------------- Type classes -------------- | A class for providing useful information about an operation. | Gets the number of values that this operation takes as input. | Whether this operation is commutative. If the operation takes less than | Whether this operation produces a value. | Whether this operation ma...
| Copyright : Copyright ( c ) 2012 - 2017 , < > License : BSD3 ( see the LICENSE file ) Maintainer : Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <> License : BSD3 (see the LICENSE file) Maintainer : -} Main authors : < > Contributing authors : ...
1e189d63867196ea97d63ce176b0b95400cf4452fc195b5d7bdc18d5e29298fc
vasilisp/inez
logic.mli
(* atomic formulas *) module rec A : (Logic_intf.Atom with type ('i, 's) term_plug := ('i, 's) M.t) and M : (Logic_intf.Term_with_ops with type 'i atom = 'i A.t) (* boxed terms *) module Box : Box_intf.T2 with type ('i, 's) b := ('i, 's) M.t (* mostly infix operators; that's the module "logic in e" uses ...
null
https://raw.githubusercontent.com/vasilisp/inez/3bbbbb82a12918c1557f5fb0b49a8c73ab8d6da1/frontend/logic.mli
ocaml
atomic formulas boxed terms mostly infix operators; that's the module "logic in e" uses under the hood
module rec A : (Logic_intf.Atom with type ('i, 's) term_plug := ('i, 's) M.t) and M : (Logic_intf.Term_with_ops with type 'i atom = 'i A.t) module Box : Box_intf.T2 with type ('i, 's) b := ('i, 's) M.t module Ops : (Ops_intf.All with type ('i, 's) t := ('i, 's) M.t and type 'i atom_plug := 'i A....
12b9d0cc20fd012e882572927de1fefbeaee27f83c0bd6711cd05fc410430ea1
cl21/cl21
array.lisp
(in-package :cl-user) (defpackage cl21.core.array (:use :cl) (:shadow :vector) (:import-from :alexandria :copy-array :define-constant) (:shadowing-import-from :cl21.core.generic :coerce) (:export :array :simple-array :vector ...
null
https://raw.githubusercontent.com/cl21/cl21/c36644f3b6ea4975174c8ce72de43a4524dd0696/src/core/array.lisp
lisp
Variables defining a new 'atomic type specifier' is not possible in common lisp, except it is defined by defstruct and defclass.
(in-package :cl-user) (defpackage cl21.core.array (:use :cl) (:shadow :vector) (:import-from :alexandria :copy-array :define-constant) (:shadowing-import-from :cl21.core.generic :coerce) (:export :array :simple-array :vector ...
d6f1709437852d144feae858258823241efa7a80cbd3be3f5ad2c8b04f0d8fe4
nineties/puref
option.ml
* puref - * Copyright ( C ) 2010 nineties * * $ I d : option.ml 2010 - 07 - 30 04:01:43 nineties $ * puref - * Copyright (C) 2010 nineties * * $Id: option.ml 2010-07-30 04:01:43 nineties $ *) let input = ref "" let dump_parse = ref false let dump_insn = ref false let mark = ref 2 let visualize =...
null
https://raw.githubusercontent.com/nineties/puref/4cd5d92a5f02468929bc2dd2ddafbd363251c86c/option.ml
ocaml
* puref - * Copyright ( C ) 2010 nineties * * $ I d : option.ml 2010 - 07 - 30 04:01:43 nineties $ * puref - * Copyright (C) 2010 nineties * * $Id: option.ml 2010-07-30 04:01:43 nineties $ *) let input = ref "" let dump_parse = ref false let dump_insn = ref false let mark = ref 2 let visualize =...
2b7b6cba91f1a113558d82f1f2e11d64d8f55304050c05c5b4fb9c053feea340
Rhywun/get-programming-with-haskell
glitcher.hs
import System.Environment import System.Random import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as BC main :: IO () main = do args <- getArgs let fileName = head args imageFile <- BC.readFile fileName glitched <- randomReplaceByte imageFile...
null
https://raw.githubusercontent.com/Rhywun/get-programming-with-haskell/b9cf06f725b2ef038d69ed49f7d2900f55e98ca3/Unit04/Lesson25/glitcher.hs
haskell
Pure code Convert an Int to a valid ASCII byte ' i ' 'i' " i " "i" Insert charVal at loc in bytes Sort size bytes at start Impure code Applies random numbers to `replaceByte` QC3 Get a random char randomChar -- 'R' randomChar -- '\RS' randomChar -- '='
import System.Environment import System.Random import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as BC main :: IO () main = do args <- getArgs let fileName = head args imageFile <- BC.readFile fileName glitched <- randomReplaceByte imageFile...
05685c956c36651de2fc06836b2dd69898af71655b97a09fdf7e37db70eaddb0
mhuebert/shadow-bootstrap-example
wrap_2.cljc
(ns bootstrap-test.wrap-2 #?(:cljs (:require-macros bootstrap-test.wrap-2))) (defmacro wrap [expr] `[:wrap-2 ~expr])
null
https://raw.githubusercontent.com/mhuebert/shadow-bootstrap-example/931f90a07381c0d2143fd2015325d9b71398ed83/src/bootstrap_test/wrap_2.cljc
clojure
(ns bootstrap-test.wrap-2 #?(:cljs (:require-macros bootstrap-test.wrap-2))) (defmacro wrap [expr] `[:wrap-2 ~expr])
6be755de797d550a64b376ef2d0d9def05b07738792462455f49e0d31627311d
well-typed-lightbulbs/ocaml-esp32
callstack.ml
(* TEST flags = "-g" * hassysthreads include systhreads compare_programs = "false" ** no-flambda reference = "${test_source_directory}/callstack.reference" *** native *** bytecode *) let[@inline never] f0 () = Printexc.print_raw_backtrace stdout (Printexc.get_callstack 100); () let[@inline nev...
null
https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/backtrace/callstack.ml
ocaml
TEST flags = "-g" * hassysthreads include systhreads compare_programs = "false" ** no-flambda reference = "${test_source_directory}/callstack.reference" *** native *** bytecode
let[@inline never] f0 () = Printexc.print_raw_backtrace stdout (Printexc.get_callstack 100); () let[@inline never] f1 () = f0 (); () let[@inline never] f2 () = f1 (); () let[@inline never] f3 () = f2 (); () let () = Printf.printf "main thread:\n" let () = f3 () let () = Printf.printf "new thread:\n" let () = Thread.j...
af45089c9d784be9bddb728f1d761885b6634c4a0fe84f691a026d365c9dd292
rleonid/oml
iris_test.ml
open Oml.Classification module P = Probabilities module IrisEncoded = struct type clas = [ `setosa | `versicolor | `virginica ] type feature = float array let encoding arr = arr let size = 4 end module IrisMlr = Logistic_regression.Multiclass(IrisEncoded) (* #require dsfo *) let irismlr = IrisMlr....
null
https://raw.githubusercontent.com/rleonid/oml/a857d67708827ed00df3f175a942044601ca50cf/scripts/iris_test.ml
ocaml
#require dsfo
open Oml.Classification module P = Probabilities module IrisEncoded = struct type clas = [ `setosa | `versicolor | `virginica ] type feature = float array let encoding arr = arr let size = 4 end module IrisMlr = Logistic_regression.Multiclass(IrisEncoded) let irismlr = IrisMlr.estimate Iris.iris l...
e3ec3a504ee1155bfc9cc3eceefd601a88cd6837c2be74ba72f40856c3419654
BinaryAnalysisPlatform/bap
x86_utils.ml
open Core_kernel[@@warning "-D"] open Bap.Std open X86_types open X86_env let tmp ?(name="v") ty = Var.create ~fresh:true ~is_virtual:true name ty let index_ofq elt lst = match List.findi lst ~f:(fun _ e -> Var.equal e elt) with | None -> raise Caml.Not_found | Some (i,_) -> i let concat_explist elist = L...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/plugins/x86/x86_utils.ml
ocaml
exp from int eflags 00 A list of functions for assigning each bit in rflags exp helpers exp from big int Get elemt from low opcode bits converts a register number to the corresponding register variable R/M byte
open Core_kernel[@@warning "-D"] open Bap.Std open X86_types open X86_env let tmp ?(name="v") ty = Var.create ~fresh:true ~is_virtual:true name ty let index_ofq elt lst = match List.findi lst ~f:(fun _ e -> Var.equal e elt) with | None -> raise Caml.Not_found | Some (i,_) -> i let concat_explist elist = L...
2523292cbb170f8ecb4ef447728c45fab979c1b42a97a813f7f453613375b3be
andrewthad/country
TrieByte.hs
module Country.Unexposed.TrieByte ( TrieByte , trieByteFromList , trieByteParser ) where import Data.HashMap.Strict (HashMap) import Data.Word (Word16,Word8) import Data.ByteString (ByteString) import Data.Semigroup (Semigroup) import Control.Applicative ((<|>)) import qualified Data.ByteString as B import qua...
null
https://raw.githubusercontent.com/andrewthad/country/e03df9d4528b030f30c233dd1b60942fd7d6ad05/country/src/Country/Unexposed/TrieByte.hs
haskell
# UNPACK # for being able to commit to consuming a certain amount of input once your certain that it will be consumed, but I cannot find a way to use the api to do this.
module Country.Unexposed.TrieByte ( TrieByte , trieByteFromList , trieByteParser ) where import Data.HashMap.Strict (HashMap) import Data.Word (Word16,Word8) import Data.ByteString (ByteString) import Data.Semigroup (Semigroup) import Control.Applicative ((<|>)) import qualified Data.ByteString as B import qua...
371d045a83684028e5fdd34c558d053667f086d83f9d3158b2c744e220572580
phadej/cabal-refact
PopulateExtraSourceFiles.hs
{-# LANGUAGE OverloadedStrings #-} module Distribution.Refact.Refactoring.PopulateExtraSourceFiles ( populateExtraSourceFilesRefactoring, getDirectoryContentsRecursive', notDistsStackWork, ) where import Prelude () import Distribution.Refact.Internal.Prelude import Distribution.Refact.Types.Pos import ...
null
https://raw.githubusercontent.com/phadej/cabal-refact/9442736429e498f95dc24866c97be587113206ab/src/Distribution/Refact/Refactoring/PopulateExtraSourceFiles.hs
haskell
# LANGUAGE OverloadedStrings # We could use trifecta here as well. Shouldn't we? We don't need any/good error reporting though. glob pattern | Returns 'False' for: * '.git' * 'dist' * 'dist-newstyle' * '.stack-work' | List all the files in a directory and all subdirectories. The order places files in sub...
module Distribution.Refact.Refactoring.PopulateExtraSourceFiles ( populateExtraSourceFilesRefactoring, getDirectoryContentsRecursive', notDistsStackWork, ) where import Prelude () import Distribution.Refact.Internal.Prelude import Distribution.Refact.Types.Pos import Distribution.Refact.Types.Refactori...
f643297cfcd68da5cf850a965c8651d4bc58d17f03890a88ad34dcb848c76640
iambrj/imin
type-check-Cvar.rkt
#lang racket (require "utilities.rkt" "type-check-Rvar.rkt") (provide type-check-Cvar type-check-Cvar-mixin) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; type-check-Cvar (define (type-check-Cvar-mixin super-class) (class super-class (super-new) (inherit type-check-exp...
null
https://raw.githubusercontent.com/iambrj/imin/baf9e829c2aa85b69a2e86bfba320969ddf05f95/type-check-Cvar.rkt
racket
type-check-Cvar
#lang racket (require "utilities.rkt" "type-check-Rvar.rkt") (provide type-check-Cvar type-check-Cvar-mixin) (define (type-check-Cvar-mixin super-class) (class super-class (super-new) (inherit type-check-exp type-equal? check-type-equal?) (define/public ((type-check-stmt env) s) (match s ...
ffcdf7b759cd247544fcd9aa603657aeabfc69a301431dfb99306e75fcbcf1bd
tomjridge/kv-hash
test_frontend.ml
open Kv_hash.Frontend open Kv_hash.Private.Util module Test() = struct let lim = 10_000_000 let _ = Printf.printf "%s: test starts\n%!" __MODULE__; let t = Writer.create ~max_log_len:32_000_000 () in begin 0 |> iter_k (fun ~k:kont i -> match i < lim with | false -> () ...
null
https://raw.githubusercontent.com/tomjridge/kv-hash/5f017256d84a606db65e5837829ff7ebcbdd79ce/test/test_frontend.ml
ocaml
open Kv_hash.Frontend open Kv_hash.Private.Util module Test() = struct let lim = 10_000_000 let _ = Printf.printf "%s: test starts\n%!" __MODULE__; let t = Writer.create ~max_log_len:32_000_000 () in begin 0 |> iter_k (fun ~k:kont i -> match i < lim with | false -> () ...
f884d2973438242fb2cc0a25b386dec0e2f4b6e4e5cc1c09dbb89a3c8a2f3618
jeromesimeon/Galax
norm_util.ml
(***********************************************************************) (* *) (* GALAX *) (* XQuery Engine *) (* ...
null
https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/normalization/norm_util.ml
ocaml
********************************************************************* GALAX XQuery Engine ...
Copyright 2001 - 2007 . $ I d : , v 1.89 2008/03/21 19:02:32 simeon Exp $ open Debug open Error open Finfo open Namespace_names open Namespace_symbols open Namespace_builtin open Namespace_util open Schema_util open Datatypes open Norm_context open Xquery_comm...
7e814c91c7d31205be2962dd810ed0751954e2f26b60c3b668f73d0aa5de5654
ogaml/ogaml
flat.ml
open OgamlGraphics open OgamlMath let settings = OgamlCore.ContextSettings.create ~msaa:8 ~resizable:true ~fullscreen:true () let window = Window.create ~width:900 ~height:600 ~settings ~title:"Flat Example" () let rectangle1 = Shape.create_rectangle ~position:Vector2f.({ x = 50. ; y = 75. ...
null
https://raw.githubusercontent.com/ogaml/ogaml/5e74597521abf7ba2833a9247e55780eabfbab78/examples/flat.ml
ocaml
Moving around all shapes Do a slow barrel roll Resizing This is thick! Resizing the window
open OgamlGraphics open OgamlMath let settings = OgamlCore.ContextSettings.create ~msaa:8 ~resizable:true ~fullscreen:true () let window = Window.create ~width:900 ~height:600 ~settings ~title:"Flat Example" () let rectangle1 = Shape.create_rectangle ~position:Vector2f.({ x = 50. ; y = 75. ...
9e798cc7bb17eacbea41f4efa5ce28bca067617b0ec043d527d6847c78dc8193
rotatef/json-streams
fail15.lisp
() (:begin-array :error) (:raw-strings t) (:begin-array :error)
null
https://raw.githubusercontent.com/rotatef/json-streams/5da012e8133affbf75024e7500feb37394690752/tests/json.org/fail15.lisp
lisp
() (:begin-array :error) (:raw-strings t) (:begin-array :error)
a1a68dd294724bde676d1de4bd0c9ff293c0613ecb1a4a366f0f4332191b3edd
angavrilov/cl-linux-debug
executable.lisp
;;; -*- mode: Lisp; indent-tabs-mode: nil; -*- (in-package :cl-linux-debug.code-info) (defvar *executables* nil) (defvar *shared-executables* '("/usr/bin/wine" "/usr/bin/wine-preloader" "/usr/bin/wine32" "/usr/bin/wine32-preloader") "Executables to treat as shared libraries.") (defun get-executable-image (path) ...
null
https://raw.githubusercontent.com/angavrilov/cl-linux-debug/879da2dcd14918bb8ffab003e934f4b01fba12ff/code-info/executable.lisp
lisp
-*- mode: Lisp; indent-tabs-mode: nil; -*-
(in-package :cl-linux-debug.code-info) (defvar *executables* nil) (defvar *shared-executables* '("/usr/bin/wine" "/usr/bin/wine-preloader" "/usr/bin/wine32" "/usr/bin/wine32-preloader") "Executables to treat as shared libraries.") (defun get-executable-image (path) (or (find path *executables* :key #'path-of :t...
3aa4659d5f853cf33b85c21f67d6917d514d6ab8c19e33a106a3e8b461cc1cff
mejgun/haskell-tdlib
GetPremiumState.hs
{-# LANGUAGE OverloadedStrings #-} -- | module TD.Query.GetPremiumState where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U -- | Returns state of Telegram Premium subscription and promotion videos for Premium features data GetPremiumState = GetPremiumState { ...
null
https://raw.githubusercontent.com/mejgun/haskell-tdlib/eba1ae3f364d43aabc4f5d2a56ffb1ffb88fe482/src/TD/Query/GetPremiumState.hs
haskell
# LANGUAGE OverloadedStrings # | |
module TD.Query.GetPremiumState where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U Returns state of Telegram Premium subscription and promotion videos for Premium features data GetPremiumState = GetPremiumState { } deriving (Eq) instance Show GetPremium...
e5ff2b91bfef8d614e06f44d56efabd584ecc5affa2510a8548e14e406a6d276
phadej/dlist-nonempty
NonEmpty.hs
# LANGUAGE CPP # #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 708 # LANGUAGE PatternSynonyms # #endif {-# LANGUAGE Safe #-} -- | Non-empty difference lists: a data structure for /O(1)/ append on non-empty lists. module Data.DList.NonEmpty #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 800 (...
null
https://raw.githubusercontent.com/phadej/dlist-nonempty/44df702ace01075ee9b6456e1532a279f87e4fe6/src/Data/DList/NonEmpty.hs
haskell
# LANGUAGE Safe # | Non-empty difference lists: a data structure for /O(1)/ append on non-empty lists. * Conversion * Construction * Other functions * Pattern Synonyms
# LANGUAGE CPP # #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 708 # LANGUAGE PatternSynonyms # #endif module Data.DList.NonEmpty #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 800 ( NonEmptyDList(Cons) #else ( NonEmptyDList #endif , toNonEmpty , apply , toList , toDList , toEnd...
ac610b6f28cf54c2339b9fe9e7043be3c6cc11dc3217f244ae935a3e4abe3f19
gregtatcam/imaplet-lwt
replica_maint.mli
* Copyright ( c ) 2013 - 2015 < > * * 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/replica_maint.mli
ocaml
* Copyright ( c ) 2013 - 2015 < > * * 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...
1963de851aae1c174e6d841cdf1078c52cfdcc7a3e17fc364b6c2bee8c3a7d54
grin-compiler/grin
CaseHoistingSpec.hs
# LANGUAGE OverloadedStrings , QuasiQuotes , ViewPatterns # module Transformations.Optimising.CaseHoistingSpec where import Transformations.Optimising.CaseHoisting import Transformations.Names (ExpChanges(..)) import Test.Hspec import Grin.TH import Test.Test hiding (newVar) import Test.Assertions import Grin.TypeChe...
null
https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/test/Transformations/Optimising/CaseHoistingSpec.hs
haskell
# LANGUAGE OverloadedStrings , QuasiQuotes , ViewPatterns # module Transformations.Optimising.CaseHoistingSpec where import Transformations.Optimising.CaseHoisting import Transformations.Names (ExpChanges(..)) import Test.Hspec import Grin.TH import Test.Test hiding (newVar) import Test.Assertions import Grin.TypeChe...
e51e0de7d1aee3dcade8d45c5d4ffa5483195c79493c54b077e645d641a5715e
UU-ComputerScience/uhc
GetOpt.hs
# EXCLUDE_IF_TARGET js # # LANGUAGE GenericDeriving # ----------------------------------------------------------------------------- -- | Module : System . Console . Copyright : ( c ) 2002 - 2005 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- Stability ...
null
https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/ehclib/base/System/Console/GetOpt.hs
haskell
--------------------------------------------------------------------------- | License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : experimental Portability : portable This library provides facilities for parsing the command-line options @getopt@ library. ------------...
# EXCLUDE_IF_TARGET js # # LANGUAGE GenericDeriving # Module : System . Console . Copyright : ( c ) 2002 - 2005 in a standalone program . It is essentially a Haskell port of the GNU < > Oct. 1996 ( small changes Dec. 1997 ) Two rather obscure features are missing : The Bash 2.0 non -...
3afab9d49bb802cd5b79fa529bd5f7e015404b118daf8e403194392ac1d9dee8
erlangonrails/devdb
fd_pinger.erl
2007 - 2010 fuer Informationstechnik Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; % you may not use this file except in compliance with the License. % You may obtain a copy of the License at % % -2.0 % % Unless required by applicable law or agreed to in writing,...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/src/fd_pinger.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language gov...
2007 - 2010 fuer Informationstechnik Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > @doc process for fd.erl . @version $ I d : fd_pinger.erl 940 2010 - 07 - 28 16:01:02Z -mod...
062cd6c3e0a98bb36b5660e54930c0948309ae9ca50cf7a1528ceb5b29ce472f
theodormoroianu/SecondYearCourses
HaskellChurch_20210415163315.hs
{-# LANGUAGE RankNTypes #-} module HaskellChurch where A boolean is any way to choose between two alternatives newtype CBool = CBool {cIf :: forall t. t -> t -> t} An instance to show as regular Booleans instance Show CBool where show b = "cBool " <> show $ cIf b True False) The boolean constant true always...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurch_20210415163315.hs
haskell
# LANGUAGE RankNTypes # The boolean negation switches the alternatives The boolean conjunction can be built as a conditional The boolean disjunction can be built as a conditional a pair is a way to compute something based on the values contained within the pair. a function to be applied on the values, it will apply i...
module HaskellChurch where A boolean is any way to choose between two alternatives newtype CBool = CBool {cIf :: forall t. t -> t -> t} An instance to show as regular Booleans instance Show CBool where show b = "cBool " <> show $ cIf b True False) The boolean constant true always chooses the first alternati...
a31b850203a9ef259853e5f9a40ac11101a8e5f8f5afdbce6d71f1fdf27c9a1d
launchdarkly/erlang-server-sdk
ldclient_instance.erl
%%------------------------------------------------------------------- %% @doc `ldclient_instance' module @private %% @end %%------------------------------------------------------------------- -module(ldclient_instance). %% API -export([start/3]). -export([stop/1]). -export([stop_all/0]). -export([update_processor_i...
null
https://raw.githubusercontent.com/launchdarkly/erlang-server-sdk/d9a4442a8a214bf950dec8182b26cd042436f4c8/src/ldclient_instance.erl
erlang
------------------------------------------------------------------- @doc `ldclient_instance' module @end ------------------------------------------------------------------- API Options for starting an SDK instance =================================================================== API =============================...
@private -module(ldclient_instance). -export([start/3]). -export([stop/1]). -export([stop_all/0]). -export([update_processor_initialized/1]). -export([feature_store_initialized/1]). -type options() :: #{ base_uri => string(), stream_uri => string(), feature_store => atom(), events_capacity => pos_i...
0ef365a77f2aad1e9dca165cce8699e94595a837f50a5a320833d0fce990500d
gafiatulin/codewars
Postfix.hs
-- A Simple Postfix Language -- / # LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NoMonomorphismRestriction # module Postfix where data Add = Add data Push = Push data End = End class Postfix stack...
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/2%20kyu/Postfix.hs
haskell
A Simple Postfix Language /
# LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NoMonomorphismRestriction # module Postfix where data Add = Add data Push = Push data End = End class Postfix stack result where run :: stack -> ...
6bca9b4a01fe486da308f0dd70825c6565d37a0f5ddd6ba50980eba7cf0b572b
aharisu/Gauche-CV
squares.scm
(use cv) (define-constant thresh 50) (define (angle pt1 pt2 pt0) (let ([dx1 (- (ref pt1 'x) (ref pt0 'x))] [dy1 (- (ref pt1 'y) (ref pt0 'y))] [dx2 (- (ref pt2 'x) (ref pt0 'x))] [dy2 (- (ref pt2 'y) (ref pt0 'y))]) (/. (+ (* dx1 dx2) (* dy1 dy2)) (sqrt (+ (* (+ (* dx1 dx1) (* dy...
null
https://raw.githubusercontent.com/aharisu/Gauche-CV/5e4c51501431c72270765121ea4d92693f11d60b/sample/squares.scm
scheme
(use cv) (define-constant thresh 50) (define (angle pt1 pt2 pt0) (let ([dx1 (- (ref pt1 'x) (ref pt0 'x))] [dy1 (- (ref pt1 'y) (ref pt0 'y))] [dx2 (- (ref pt2 'x) (ref pt0 'x))] [dy2 (- (ref pt2 'y) (ref pt0 'y))]) (/. (+ (* dx1 dx2) (* dy1 dy2)) (sqrt (+ (* (+ (* dx1 dx1) (* dy...
8da2326d19fa41db5c0830ca470e61d3459db2812e62fdfb78a0d4ddbf416861
danlentz/clj-wbtree
tree_test.clj
(ns wbtree.tree-test (:require [clojure.test :refer :all] [wbtree.tree :refer :all])) (deftest a-test (testing "FIXME." (is (= 0 0))))
null
https://raw.githubusercontent.com/danlentz/clj-wbtree/ec7bf2bbc156fce5da8044fa9f2fd4eb7e5f1238/test/wbtree/tree_test.clj
clojure
(ns wbtree.tree-test (:require [clojure.test :refer :all] [wbtree.tree :refer :all])) (deftest a-test (testing "FIXME." (is (= 0 0))))
468049a3a74cd0b0fdc31162f59704a7a61d0da502513f7271a7e3d85c4d8c0b
robert-strandh/SICL
binary-subtract-defmethods.lisp
(cl:in-package #:sicl-arithmetic) (defmethod binary-subtract ((minuend fixnum) (subtrahend fixnum)) (cleavir-primop:let-uninitialized (z) (if (cleavir-primop:fixnum-sub minuend subtrahend z) z (convert-fixnum-to-bignum z)))) (defmethod binary-subtract ((x integer) (y ratio)) (let ((num (numera...
null
https://raw.githubusercontent.com/robert-strandh/SICL/e4cba4056739c85dad730e8c6492d51cc8f2e465/Code/Arithmetic/binary-subtract-defmethods.lisp
lisp
(cl:in-package #:sicl-arithmetic) (defmethod binary-subtract ((minuend fixnum) (subtrahend fixnum)) (cleavir-primop:let-uninitialized (z) (if (cleavir-primop:fixnum-sub minuend subtrahend z) z (convert-fixnum-to-bignum z)))) (defmethod binary-subtract ((x integer) (y ratio)) (let ((num (numera...
a9beace0cfdd2f367b1da092a6d3ee5dd700d9a8f24d0eb2c1513136a8b1cf03
MaskRay/OJHaskell
restack.hs
import Control.Monad import Control.Monad.State import Data.Char import Data.Int import Data.List import Data.Maybe import qualified Data.ByteString.Char8 as B parse = do n <- readInt ds <- replicateM n (liftM2 (-) readInt readInt) return ds where readInt = state $ fromJust . B.readInt . B.dropWhile isSpac...
null
https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/USACO/mar12/restack.hs
haskell
import Control.Monad import Control.Monad.State import Data.Char import Data.Int import Data.List import Data.Maybe import qualified Data.ByteString.Char8 as B parse = do n <- readInt ds <- replicateM n (liftM2 (-) readInt readInt) return ds where readInt = state $ fromJust . B.readInt . B.dropWhile isSpac...
221208dbb09be06fb288c6586d78fd46744a2527aa74f0b936b89f812e7535e0
CmdrDats/clj-minecraft
recipes.clj
(ns cljminecraft.recipes (:require [cljminecraft.player :as plr]) (:require [cljminecraft.bukkit :as bk]) (:require [cljminecraft.items :as items]) (:import [org.bukkit.inventory ShapedRecipe ShapelessRecipe ItemStack])) (defn shapeless [material-map result ingredients qty] (let [result (ShapelessRecipe. (it...
null
https://raw.githubusercontent.com/CmdrDats/clj-minecraft/d69a1453e6b3cbb2c08b6a2ba554520a0265c43d/src/cljminecraft/recipes.clj
clojure
Wow, dumb idea to throw an exception if the ingredient doesn't appear in a shape.
(ns cljminecraft.recipes (:require [cljminecraft.player :as plr]) (:require [cljminecraft.bukkit :as bk]) (:require [cljminecraft.items :as items]) (:import [org.bukkit.inventory ShapedRecipe ShapelessRecipe ItemStack])) (defn shapeless [material-map result ingredients qty] (let [result (ShapelessRecipe. (it...
05bd776409c550d964cf0fbe0b623a9bfddf7777a3d5954000e5f5b982e4a479
monadbobo/ocaml-core
unique_id.ml
open Std_internal (* Only "make" can cause a context-switch that might lead to a race. Thus we have to check whether the contents of the cell remained unchanged across this call. The subsequent comparison, dereferencing and assignment cannot cause context switches. If the contents of the cell had changed...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/unique_id.ml
ocaml
Only "make" can cause a context-switch that might lead to a race. Thus we have to check whether the contents of the cell remained unchanged across this call. The subsequent comparison, dereferencing and assignment cannot cause context switches. If the contents of the cell had changed, we will have to try...
open Std_internal let rec race_free_create_loop cell make = let x = !cell in let new_x = make x in if phys_equal !cell x then begin cell := new_x; x end else race_free_create_loop cell make module Int (Z : Unit) = struct include Core_int let current = ref zero let create () = race_free_create_loop curr...
0dcf5a412ff708ed002162e667d5116c831561d555021b466a49ae4bc21ffe1b
aiya000/haskell-examples
Insert.hs
{-# LANGUAGE EmptyDataDecls #-} # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateH...
null
https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Database/Persist/Sqlite/Insert.hs
haskell
# LANGUAGE EmptyDataDecls # # LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # ":memory:" or sqlite filename...for example -> "person.db"
# LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # import Control.Monad.IO.Class (liftIO) import Database.Persist import Database.Persist.Sqlite import Database.Persist.TH share [mkPersist sqlSettings, mkMi...
971570c9795ff7e1d66235ed7bf561dd385ab97a32247ee8874c2e77940bc6bf
logseq/mldoc
prelude.ml
let ( << ) f g x = f (g x) (* TODO: group using modules *) let identity x = x (* list *) let repeat n x = let rec go acc = function | 0 -> acc | n when n >= 1 -> go (x :: acc) (n - 1) | _ -> raise (Invalid_argument "List.repeat") in go [] n let hd_opt = function | h :: _ -> Some h | _ -> None...
null
https://raw.githubusercontent.com/logseq/mldoc/adec8d9c4f1193a1d87f6e271b9a12e1bc1dfe1f/lib/prelude.ml
ocaml
TODO: group using modules list array string max depth for direct recursion Create a compressed reverse-list representation using tuples @param tuple_acc a reverse list of chunks mapped with [f] Reverse direction, finishing off with a direct map * Copied from -cube/ocaml-containers/blob/master/src/c...
let ( << ) f g x = f (g x) let identity x = x let repeat n x = let rec go acc = function | 0 -> acc | n when n >= 1 -> go (x :: acc) (n - 1) | _ -> raise (Invalid_argument "List.repeat") in go [] n let hd_opt = function | h :: _ -> Some h | _ -> None let rec last_opt = function | [] -> Non...
5e9bdc6a914adf01ec93f4af0ac94fae3d69fc83a060ef23726a1674623f1327
VictorNicollet/99-Problems-OCaml
p15.ml
(* Duplicate the elements of a list a given number of times *) let replicate list n = let rec prepend n acc x = if n = 0 then acc else prepend (n-1) (x :: acc) x in let rec aux acc = function | [] -> acc | h :: t -> aux (prepend n acc h) t in (* This could also be written as: List.fold_lef...
null
https://raw.githubusercontent.com/VictorNicollet/99-Problems-OCaml/a13e625545d54d4d927b39b18ab1ffba7de6b7e6/11-20/p15.ml
ocaml
Duplicate the elements of a list a given number of times This could also be written as: List.fold_left (prepend n) [] (List.rev list)
let replicate list n = let rec prepend n acc x = if n = 0 then acc else prepend (n-1) (x :: acc) x in let rec aux acc = function | [] -> acc | h :: t -> aux (prepend n acc h) t in aux [] (List.rev list) ;; assert (replicate [`a;`b;`c] 3 = [`a;`a;`a;`b;`b;`b;`c;`c;`c]) ;;
c1f282c3b9b88582237ea6a98917575367bcc4f26382a32e733b3de0394eae34
ucsd-progsys/nate
type_synonym_expansion.2.ml
(*F*) type ('a, 'b) t = 'a * 'b type 'a s = ('a, int) t type u = float s let unspecified = assert false let _ = let x : (unit, int) t = unspecified in let y : u = unspecified in x = y
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/easyocaml-additional/exams/type_synonym_expansion.2.ml
ocaml
F
type ('a, 'b) t = 'a * 'b type 'a s = ('a, int) t type u = float s let unspecified = assert false let _ = let x : (unit, int) t = unspecified in let y : u = unspecified in x = y
adcfc294042649f5ce43648125f6508ede8c5a777a13906a3136a820c94e003a
pirapira/coq2rust
unification.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/pretyping/unification.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * The "unique" unification fonction ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Term open Environ open E...
b57f469d0ef7e7bb8bc95cc35a41ba27134a2f440ebf7d929ea773f4cacbd86f
locusmath/locus
morphism.clj
(ns locus.cmon.semimodule.morphism (:require [locus.set.logic.core.set :refer :all] [locus.set.mapping.general.core.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.copresheaf.structure.core.protocols :refer :all] [locus.set.quiver.struct...
null
https://raw.githubusercontent.com/locusmath/locus/12061072ccfe6a28f87eb8bd4489397dcf4b93d8/src/clojure/locus/cmon/semimodule/morphism.clj
clojure
Identities and composition in categories of semimodules Semimodule hom monoids
(ns locus.cmon.semimodule.morphism (:require [locus.set.logic.core.set :refer :all] [locus.set.mapping.general.core.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.copresheaf.structure.core.protocols :refer :all] [locus.set.quiver.struct...
c949e622d41e0a7f9dd4c6d1bd4e260cc62030c9f9f32322c07fde20874b2eda
tnelson/Forge
univIdenRTC.rkt
#lang forge option run_sterling off -- In Kodkod/Pardinus, univ and iden refer to the meta-universe (i.e. what atoms are -- generated by the bounds), and so are incorrect when considering instances don't fully -- populate sigs. -- Alloy's univ and iden (AND REFLEXIVE TRANSITIIVE CLOSURE) are defined involving the -...
null
https://raw.githubusercontent.com/tnelson/Forge/a7187ef110f46493c1d45011035b05646b9ccd22/forge/tests/forge/other/univIdenRTC.rkt
racket
#lang forge option run_sterling off -- In Kodkod/Pardinus, univ and iden refer to the meta-universe (i.e. what atoms are -- generated by the bounds), and so are incorrect when considering instances don't fully -- populate sigs. -- Alloy's univ and iden (AND REFLEXIVE TRANSITIIVE CLOSURE) are defined involving the -...
8eb09f55342c2662c7d2c1c132e128af288a7f5ad89b20926121554fd0de1472
silentsignal/DirBustErl
bust_resource.erl
-module(bust_resource). -export([init/1, content_types_provided/2, delete_resource/2, to_json/2, content_types_accepted/2, allowed_methods/2, from_json/2, post_is_create/2, create_path/2]). -include_lib("webmachine/include/webmachine.hrl"). init([Format]) -> {ok, Format}. content_types_provided(ReqData, State) -> ...
null
https://raw.githubusercontent.com/silentsignal/DirBustErl/bbdfdebb93241036500794e7055aae45a7ac9514/src/bust_resource.erl
erlang
Not Implemented XXX
-module(bust_resource). -export([init/1, content_types_provided/2, delete_resource/2, to_json/2, content_types_accepted/2, allowed_methods/2, from_json/2, post_is_create/2, create_path/2]). -include_lib("webmachine/include/webmachine.hrl"). init([Format]) -> {ok, Format}. content_types_provided(ReqData, State) -> ...
46a876004bdd419c58c828827abc0d1ee3036d3e9891b67cf415c768bb42f8ba
chenyukang/eopl
pairvals.scm
(module pairvals (lib "eopl.ss" "eopl") choose one of the following : ;; (require "pairval1.scm") ;; (provide (all-from "pairval1.scm")) ;; or (require "pairval2.scm") (provide (all-from "pairval2.scm")) )
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/base/chapter4/mutable-pairs/pairvals.scm
scheme
(require "pairval1.scm") (provide (all-from "pairval1.scm")) or
(module pairvals (lib "eopl.ss" "eopl") choose one of the following : (require "pairval2.scm") (provide (all-from "pairval2.scm")) )
0be7e2e1263a03da8bb2742c5cc6c74b1259283b854dbf4fab7a47c2812b9f55
ardoq/compojure-swagger
private.clj
(ns compojure-swagger.private) (defrecord Route [path method info children]) (defmacro routes [& handlers] `(map->Route {:path nil :children (list ~@handlers) })) (defmacro context [path args & body] `(map->Route {:path ~path :children (list ~@body) })) (de...
null
https://raw.githubusercontent.com/ardoq/compojure-swagger/dba0decefb817c2db87bbe71dc34b5aa37af0de4/src/compojure_swagger/private.clj
clojure
(ns compojure-swagger.private) (defrecord Route [path method info children]) (defmacro routes [& handlers] `(map->Route {:path nil :children (list ~@handlers) })) (defmacro context [path args & body] `(map->Route {:path ~path :children (list ~@body) })) (de...
e5729e8d6a03b20775d966f668cf08b7c5ecf1b43789f071b07aad07acba8cb2
manavpatnaik/haskell
3_km_to_m.hs
convertKmToM :: (Num a) => a -> a convertKmToM a = 1000 * a main = do print(convertKmToM 5) print(convertKmToM 1.23) print(convertKmToM 0.2)
null
https://raw.githubusercontent.com/manavpatnaik/haskell/af45c3eb5c3461aa77cf25610dfcb3b41c7f7ef9/practice-set-1-basics/3_km_to_m.hs
haskell
convertKmToM :: (Num a) => a -> a convertKmToM a = 1000 * a main = do print(convertKmToM 5) print(convertKmToM 1.23) print(convertKmToM 0.2)
eedd9790698195953daebc5f3fe04d6cf70ccd4a50609ea7855fd7650b4a6f37
eamsden/Animas
AFRPTestsKSwitch.hs
$ I d : AFRPTestsKSwitch.hs , v 1.2 2003/11/10 21:28:58 antony Exp $ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * A F R P * * ...
null
https://raw.githubusercontent.com/eamsden/Animas/2404d1de20982a337109fc6032cb77b022514f9d/tests/AFRPTestsKSwitch.hs
haskell
---------------------------------------------------------------------------- ---------------------------------------------------------------------------- The correct strictness properties of dkSwitch are crucial here.
$ I d : AFRPTestsKSwitch.hs , v 1.2 2003/11/10 21:28:58 antony Exp $ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * A F R P * * ...
e31a9597f0a15d541117a5363eb3fb4129f389233f4f2409a849c5501c4d479b
basho-labs/wriaki
wiki_creole_sup.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2009 - 2010 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You...
null
https://raw.githubusercontent.com/basho-labs/wriaki/cd437737fda7f47cbbb27fab4ec86d0e7c0ff57d/apps/wiki_creole/src/wiki_creole_sup.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2009 - 2010 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY ...
a924cdfeba6bd17c8fefed473e27854ac77c36e54f8755e66d9d5312f9adeb64
yav/hobbit
PP.hs
module PP (module PP, module Pretty) where import Text.PrettyPrint.HughesPJ as Pretty hiding (TextDetails(..)) class Pr a where pr :: a -> Doc pr x = prn 0 x prn :: Int -> a -> Doc prn _ x = pr x prShow :: Pr a => a -> String prShow x ...
null
https://raw.githubusercontent.com/yav/hobbit/31414ba1188f4b39620c2553b45b9e4d4aa40169/src/PP.hs
haskell
cdot = char '*' tris d = char '<' <> d <> char '>'
module PP (module PP, module Pretty) where import Text.PrettyPrint.HughesPJ as Pretty hiding (TextDetails(..)) class Pr a where pr :: a -> Doc pr x = prn 0 x prn :: Int -> a -> Doc prn _ x = pr x prShow :: Pr a => a -> String prShow x ...