_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
8eaa9d5fa5348983d948e2cc96f2d72d9b52d8c2b787248206456af7334ae562
dbuenzli/fut
lwtleak.ml
(* Immediate, easy *) let rec loop n = if n = 0 then Lwt.return () else Lwt.(return (pred n) >>= loop) (* Not immediate, link trick *) let queue = Queue.create () let yield () = let t, w = Lwt.wait () in Queue.push w queue; t let rec loop n = (* proxy *) if n = 0 then Lwt.return () else Lwt.(yie...
null
https://raw.githubusercontent.com/dbuenzli/fut/907de63df12815f2df2cb796baa7fa37ac2758d4/attic/lwtleak.ml
ocaml
Immediate, easy Not immediate, link trick proxy Cancel bis, this doesn't do what I expect because pick cancels [t], which means that the whole thing may fail with cancel, because pick may return the cancelled one. leaks
let rec loop n = if n = 0 then Lwt.return () else Lwt.(return (pred n) >>= loop) let queue = Queue.create () let yield () = let t, w = Lwt.wait () in Queue.push w queue; t if n = 0 then Lwt.return () else Lwt.(yield () >>= fun () -> loop (n - 1)) let rec run () = match try Some (Queue.take queue...
a308f2961bd440ca4a0881d59da23897a1ac2544812918f46f3c2140df728c65
well-typed-lightbulbs/ocaml-esp32
lib2235.ml
module A2235 = A2235
null
https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/no-alias-deps/lib2235.ml
ocaml
module A2235 = A2235
c9b4c2d9c514cb600737dd49d02c485170684ec41654f4762b8db6571713031d
Kappa-Dev/KappaTools
replay.mli
(******************************************************************************) (* _ __ * The Kappa Language *) | |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF (* | ' / ********************************************************************...
null
https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/simulation/replay.mli
ocaml
**************************************************************************** _ __ * The Kappa Language | ' / ******************************************************************** | . \ * This file is distributed under the terms of the |_|\_\ * GN...
| |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF type state = { graph : Edges.t; time : float; event : int; connected_components : Agent.SetMap.Set.t Mods.IntMap.t option; } type summary = { unary_distances : (int * int) option; } val init_state : with_connected_components:b...
47c5cf2bc7fe615e598996e34f4e7d61418160d43cfed0bc690475c844730bc3
paurkedal/batyr
caching.ml
Copyright ( C ) 2013 - -2022 Petter A. Urkedal < > * * 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 ver...
null
https://raw.githubusercontent.com/paurkedal/batyr/814791b6ce6476b79ecddc12b7d28fa4d23dc591/batyr-core/lib/caching.ml
ocaml
Copyright ( C ) 2013 - -2022 Petter A. Urkedal < > * * 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 ver...
9873ea4e3007a1b9b81bb183c2036665ef226e9a158f3c7db61a3f26dbf1d649
reagent-project/reagent
testreagent.cljs
(ns reagenttest.testreagent (:require [clojure.test :as t :refer-macros [is deftest testing]] [react :as react] [reagent.ratom :as rv :refer [reaction]] [reagent.debug :as debug :refer [dev?]] [reagent.core :as r] [reagent.dom :as rdom] [reagent....
null
https://raw.githubusercontent.com/reagent-project/reagent/ce80585e9aebe0a6df09bda1530773aa512f6103/test/reagenttest/testreagent.cljs
clojure
should not be rendered TODO: Failing on optimized build (r/flush) (is (= 7 @ran)) (r/flush) (is (= 9 @ran)) Skip test: produces warning in new React (is (not (re-find #"enctype" (as-string [:div {"enc-type" "x"}]))) "Strings are passed through to React.") lowercase, and CommonJS with up...
(ns reagenttest.testreagent (:require [clojure.test :as t :refer-macros [is deftest testing]] [react :as react] [reagent.ratom :as rv :refer [reaction]] [reagent.debug :as debug :refer [dev?]] [reagent.core :as r] [reagent.dom :as rdom] [reagent....
53417d9ab082b46a8f23d3c6785a6563238c3d13eac3da54755f91d08a93b6c2
clj-commons/iapetos
standalone.clj
(ns iapetos.standalone (:require [iapetos.collector.ring :as ring] [clojure.java.io :as io]) (:import [com.sun.net.httpserver HttpHandler HttpServer HttpExchange] [java.net InetSocketAddress])) # # Handler (defn- write-headers! [^HttpExchange e {:keys...
null
https://raw.githubusercontent.com/clj-commons/iapetos/0fecedaf8454e17e41b05e0e14754a311b9f4ce2/src/iapetos/standalone.clj
clojure
## Server
(ns iapetos.standalone (:require [iapetos.collector.ring :as ring] [clojure.java.io :as io]) (:import [com.sun.net.httpserver HttpHandler HttpServer HttpExchange] [java.net InetSocketAddress])) # # Handler (defn- write-headers! [^HttpExchange e {:keys...
7f1a38c7a71e2eacb6175f6b7d72ff02859ab1f00728d2c2aace52f494436eb9
webcrank/webcrank.hs
HLint.hs
import "hint" HLint.Default import "hint" HLint.Generalise ignore "Use import/export shortcut"
null
https://raw.githubusercontent.com/webcrank/webcrank.hs/c611a12ea129383823cc627405819537c31730e4/HLint.hs
haskell
import "hint" HLint.Default import "hint" HLint.Generalise ignore "Use import/export shortcut"
bd66cbdf49d13a8e154c33d0fdd5e3e4687c1f293a0dbfbe5ec79239d9c188fa
webmachine/webmachine
webmachine_resource.erl
@author < > @author < > 2007 - 2014 Basho Technologies %% 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 ...
null
https://raw.githubusercontent.com/webmachine/webmachine/33f83f5db0d3a578ef607d4d5aecabeb9ba2cdf0/src/webmachine_resource.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. limitations under the License. this a...
@author < > @author < > 2007 - 2014 Basho Technologies Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , See the License for the specific language governing permissions and -module(webmachine_resource)....
da0c914e495d5638730a29ce132f5de8c89d6d39fcbf394d81e1b312d533c3aa
chrovis/cljam
gzi_test.clj
(ns cljam.io.util.bgzf.gzi-test (:require [clojure.test :refer [deftest is are]] [cljam.test-common :as common] [cljam.io.util.bgzf.gzi :as gzi])) (def ^:private medium-fa-bgz-gzi (sorted-map 0 0, 65280 21483, 130560 43102, 195840 64763, 261120 85797, 326400 106765, ...
null
https://raw.githubusercontent.com/chrovis/cljam/2b8e7386765be8efdbbbb4f18dbc52447f4a08af/test/cljam/io/util/bgzf/gzi_test.clj
clojure
(ns cljam.io.util.bgzf.gzi-test (:require [clojure.test :refer [deftest is are]] [cljam.test-common :as common] [cljam.io.util.bgzf.gzi :as gzi])) (def ^:private medium-fa-bgz-gzi (sorted-map 0 0, 65280 21483, 130560 43102, 195840 64763, 261120 85797, 326400 106765, ...
b34ed7a2b3b62bbb24a290d731ed5df1c0a3e499ab5fcd5a9b4f581146ef5a6a
zudov/haskell-comark
Prim.hs
# LANGUAGE RecordWildCards # {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} module Comark.ParserCombinators.Prim ( Position(..) , Parser() , runParser , ParserState() , ParseError(..) , withConsumed , consumedBy , string , (<?>) , runParserWithUnconsumed , getPosition , setPos...
null
https://raw.githubusercontent.com/zudov/haskell-comark/b84cf1d5623008673402da3a5353bdc5891d3a75/comark-parser/src/Comark/ParserCombinators/Prim.hs
haskell
# LANGUAGE TypeFamilies # # LANGUAGE ViewPatterns # | Returns the text that was consumed by a parser alongside with its result # INLINE (<*>) # return error for farthest match pos' == pos # INLINE empty # # INLINE (<|>) # # INLINE (>>=) # # INLINE (<?>) # # INLINE satisfy # | Get the next character without c...
# LANGUAGE RecordWildCards # module Comark.ParserCombinators.Prim ( Position(..) , Parser() , runParser , ParserState() , ParseError(..) , withConsumed , consumedBy , string , (<?>) , runParserWithUnconsumed , getPosition , setPosition , satisfy , peekChar , peekLastChar , replacing , ...
0dd469704823d7192bbdcace60458965fd055aa48d9b59fc5bea5f5a017cf4a4
jakemcc/sicp-study
ex4_47.clj
(ns ex4-37) My initial reaction is that change ; does improve the efficiency. It seems to me that because the first ' require check is ; done earlier (only after i and j have been picked, k is still ; unpicked) that the work of chosing a k will not always be done. ; Not doing the work to pick k would cut down ...
null
https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section4.3/src/ex4_47.clj
clojure
does improve the efficiency. done earlier (only after i and j have been picked, k is still unpicked) that the work of chosing a k will not always be done. Not doing the work to pick k would cut down on the number of possibilities that need to be checked and hence cause an efficiency gain
(ns ex4-37) My initial reaction is that change It seems to me that because the first ' require check is
60d3ddae6ab0e3637c4d7db20d0e1a90e835796190d42d7c174df51c1d3ad45e
jyh/metaprl
m_ir_ast.ml
doc <:doc< @spelling{AST compilable} @module[M_ir_ast] @docoff Convert AST to IR. We name all intermediate computations. @begin[license] Copyright (C) 2003 Adam Granicz, Caltech This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Publi...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/experimental/compile/m_ir_ast.ml
ocaml
*********************************************************************** * REDUCTION RESOURCE * *********************************************************************** ? Tuple size computations * Top-level conversion and tactic. * -*- * Local Variables: ...
doc <:doc< @spelling{AST compilable} @module[M_ir_ast] @docoff Convert AST to IR. We name all intermediate computations. @begin[license] Copyright (C) 2003 Adam Granicz, Caltech This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Publi...
13755b09499888697500625f0f5f641baf6aea842afd73b19399f08b096a89dc
emqx/emqx
emqx_license_cli_SUITE.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %%-------------------------------------------------------------------- -module(emqx_license_cli_SUITE). -compile(nowarn_export_all). -compile(export_all). -include_li...
null
https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/lib-ee/emqx_license/test/emqx_license_cli_SUITE.erl
erlang
-------------------------------------------------------------------- -------------------------------------------------------------------- ------------------------------------------------------------------------------ Tests ------------------------------------------------------------------------------
Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . -module(emqx_license_cli_SUITE). -compile(nowarn_export_all). -compile(export_all). -include_lib("eunit/include/eunit.hrl"). -include_lib("common_test/include/ct.hrl"). all() -> emqx_common_test_helpers:all(?MODULE). init_per_suite...
595c6aabadab16c1cff8a20bae1fa2fe90cec72c9ad77b0308f8e8d3773ff3e4
ocaml-multicore/tezos
environment_cache.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Nomadic Labs , < > (* ...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/lib_protocol_environment/environment_cache.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 Nomadic Labs , < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN A...
80b70c780dbabffa632a1f3c94b20d343ecc22d7bfb9f7a1065b0c797241196e
grin-compiler/ghc-wpc-sample-programs
EPUB.hs
# LANGUAGE TupleSections # {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE OverloadedStrings #-} | Module : Text . Pandoc . Readers . EPUB Copyright : Copyright ( C ) 2014 - 2020 License : GNU GPL , version 2 or above Maintainer : < > Stability : alpha Porta...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/src/Text/Pandoc/Readers/EPUB.hs
haskell
# LANGUAGE ViewPatterns # # LANGUAGE OverloadedStrings # runEPUB :: Except PandocError a -> Either PandocError a runEPUB = runExcept Note that internal reference are aggressively normalised so that all ids are of the form "filename#id" root is path to folder with manifest file in No need to collapse here as...
# LANGUAGE TupleSections # | Module : Text . Pandoc . Readers . EPUB Copyright : Copyright ( C ) 2014 - 2020 License : GNU GPL , version 2 or above Maintainer : < > Stability : alpha Portability : portable Conversion of EPUB to ' Pandoc ' document . ...
7103ea57af2902a5b6c33646c2bdbb397b18697bbfc2f64c3f1dc451e4f8a5b3
wireapp/wire-server
UserSpec.hs
# LANGUAGE QuasiQuotes # -- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , eithe...
null
https://raw.githubusercontent.com/wireapp/wire-server/09cfa0e602321ef753f771a7171ba6c39b5ac976/libs/hscim/test/Test/Class/UserSpec.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTI...
# LANGUAGE QuasiQuotes # Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along module...
76ce7eb3173eb4b4c74434b1ac0c86904031995aae70e43c6bb35947e2d6e152
LCBH/UKano
terms.ml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
null
https://raw.githubusercontent.com/LCBH/UKano/13c046ddaca48b45d3652c3ea08e21599e051527/proverif2.01/src/terms.ml
ocaml
Basic functions for list. [starts_with s sub] is true when the string [s] starts with [sub] TO DO The current code works, but in principle, it would be nicer if [tuple_taple] was a field in [t_pi_state/t_horn_state], to avoid keeping tuple functions when they are no longer useful. That would probably c...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
df81cdc5b0895d2490b712ac48d108a38932d68567bdb525c8fb406ceafe7663
kerneis/cpc
myocamlbuild.ml
open Ocamlbuild_plugin ;; open Command ;; open Pathname ;; open Outcome ;; let find_modules builder mllib = let dirs = include_dirs_of (dirname mllib) in let modules = string_list_of_file mllib in let make_candidates m = List.map (expand_module dirs m) [["cmi"]; ["cmx"]; ["mli"; "inferred.mli"]] in let de...
null
https://raw.githubusercontent.com/kerneis/cpc/0ca695d25e58dadbd92639162338a06a517875d9/myocamlbuild.ml
ocaml
the main CIL library residual reliance on make to build some OCaml source files Build an list of files to install with ocamlfind Flags for ocamldoc
open Ocamlbuild_plugin ;; open Command ;; open Pathname ;; open Outcome ;; let find_modules builder mllib = let dirs = include_dirs_of (dirname mllib) in let modules = string_list_of_file mllib in let make_candidates m = List.map (expand_module dirs m) [["cmi"]; ["cmx"]; ["mli"; "inferred.mli"]] in let de...
cd36fb71d728aff71f2f72b15a6348eb8d0e06410299353f44c941c8c75b61ab
Opetushallitus/ataru
tutu_payment_subs.cljs
(ns ataru.virkailija.application.tutu-payment.tutu-payment-subs (:require [cljs-time.core :as time] [cljs-time.format :as format] [clojure.string :as string] [re-frame.core :as re-frame])) (re-frame.core/reg-sub :tutu-payment/tutu-form? (fn [_ [_ key]] (let [tutu-forms (string/split (aget js/con...
null
https://raw.githubusercontent.com/Opetushallitus/ataru/6483ad9d7045b7c7244b83a4483189784db07b79/src/cljs/ataru/virkailija/application/tutu_payment/tutu_payment_subs.cljs
clojure
(ns ataru.virkailija.application.tutu-payment.tutu-payment-subs (:require [cljs-time.core :as time] [cljs-time.format :as format] [clojure.string :as string] [re-frame.core :as re-frame])) (re-frame.core/reg-sub :tutu-payment/tutu-form? (fn [_ [_ key]] (let [tutu-forms (string/split (aget js/con...
5c12630e88643874ea1ad79d73627852c29f0ff2e173e80a5005bfe9fb2eb2b8
jaspervdj/redis-simple
Simple.hs
| This module is meant to make working with redis in Haskell more simple . It -- is a small layer above the full-blown @redis@ package. -- -- It only supports a small subset of the redis features. -- # LANGUAGE OverloadedStrings , module Database.Redis.Simple ( -- * Type for keys Key (..) -- * Wor...
null
https://raw.githubusercontent.com/jaspervdj/redis-simple/cf5fd568b5daa70c64b6be63fa073895c0146c1f/Database/Redis/Simple.hs
haskell
is a small layer above the full-blown @redis@ package. It only supports a small subset of the redis features. * Type for keys * Working with simple key-value pairs * Working with sets * Working with lists | Type for a key in the key-value store | Gets an item from the database ^ Redis handle ^ Key of the ...
| This module is meant to make working with redis in Haskell more simple . It # LANGUAGE OverloadedStrings , module Database.Redis.Simple Key (..) , itemGet , itemExists , itemSet , itemDelete , setAdd , setRemove , setContains , setFindAll , listRightPush , listInd...
326e40771b757155ae9eaeb87d65a0eaa2e2629918bc23a145a2456d2e3910f7
nutanix/papiea-clj
core_test.clj
(ns papiea.core-test (:require [clojure.test :refer :all]))
null
https://raw.githubusercontent.com/nutanix/papiea-clj/dd842703cf034d93b8651542892c7bd4ac204e29/test/papiea/core_test.clj
clojure
(ns papiea.core-test (:require [clojure.test :refer :all]))
4b77f6250a6146eca05d7ddd9f2bd89c6b4d796db6809d0fd5e3ac42b2a1bbe6
diffusionkinetics/open
Run.hs
| Running models Before invoking ` runStan ` , you must specify where to find the [ cmdstan]( - stan.org / interfaces / cmdstan ) install directory . Either set the CMDSTAN_HOME environment variable or symlink or use ` /opt / stan ` Simple MCMC sampling : @ runStan myModel myData sample @ Changi...
null
https://raw.githubusercontent.com/diffusionkinetics/open/673d9a4a099abd9035ccc21e37d8e614a45a1901/stanhs/lib/Stan/Run.hs
haskell
| Parameters for the sample method. | Parameters for the optimise method. call with the " sample " method call with the " optimize " method ^ the method to run with ^ the output from that method ^ the method to run with ^ the output from that method
| Running models Before invoking ` runStan ` , you must specify where to find the [ cmdstan]( - stan.org / interfaces / cmdstan ) install directory . Either set the CMDSTAN_HOME environment variable or symlink or use ` /opt / stan ` Simple MCMC sampling : @ runStan myModel myData sample @ Changi...
2a9e399201e8fca12c892d1e4502ef4537c2c54765b2a11bc2b8552e94bd3653
s-cerevisiae/leetcode-racket
17-letter-combinations-of-a-phone-number.rkt
#lang racket (define letter-map #hash((#\2 . (#\a #\b #\c)) (#\3 . (#\d #\e #\f)) (#\4 . (#\g #\h #\i)) (#\5 . (#\j #\k #\l)) (#\6 . (#\m #\n #\o)) (#\7 . (#\p #\q #\r #\s)) (#\8 . (#\t #\u #\v)) (#\9 . (#\w #\x #\y #\z)))) (define/contract (letter-combination...
null
https://raw.githubusercontent.com/s-cerevisiae/leetcode-racket/a81da53755debd5efec2d95f7c311d230ac5b3f4/17-letter-combinations-of-a-phone-number.rkt
racket
#lang racket (define letter-map #hash((#\2 . (#\a #\b #\c)) (#\3 . (#\d #\e #\f)) (#\4 . (#\g #\h #\i)) (#\5 . (#\j #\k #\l)) (#\6 . (#\m #\n #\o)) (#\7 . (#\p #\q #\r #\s)) (#\8 . (#\t #\u #\v)) (#\9 . (#\w #\x #\y #\z)))) (define/contract (letter-combination...
c8b02598e0245a82ad097ad9dcc66442171a9b5878a9a7d662ae1b7888587d47
coq/coq
evar_kinds.ml
(************************************************************************) (* * 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/engine/evar_kinds.ml
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...
6647a72cc32b5f1e14382842d347cf46b473a164b2e7d65d8eab2f61cea25ea3
dmiller/clr.core.async
timers_test.clj
(ns clojure.core.async.timers-test (:require [clojure.test :refer :all] [clojure.core.async.impl.timers :refer :all] [clojure.core.async :as async]) DM : Added (deftest timeout-interval-test System / currentTimeMillis test-timeout (timeout 500)] (is (<= (+ start-sta...
null
https://raw.githubusercontent.com/dmiller/clr.core.async/bb861242531cdd6ba727283bf3ddee73db1e1c2d/test/clojure/clojure/core/async/timers_test.clj
clojure
Add gen-delegate, remove # .Start .join
(ns clojure.core.async.timers-test (:require [clojure.test :refer :all] [clojure.core.async.impl.timers :refer :all] [clojure.core.async :as async]) DM : Added (deftest timeout-interval-test System / currentTimeMillis test-timeout (timeout 500)] (is (<= (+ start-sta...
6fdc1ac52773a0acba9aad21868b8cafde16ea7a7190c9e973966de169a0b7fe
fission-codes/fission
Ownership.hs
module Fission.Web.Server.Ownership ( module Fission.Web.Server.Ownership.Class , isOwnedBy ) where import Prelude import Fission.Web.Server.Models import Fission.Web.Server.Ownership.Class isOwnedBy :: Owned item => UserId -> item -> Bool isOwnedBy userId item = userId == ownerId...
null
https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-web-server/library/Fission/Web/Server/Ownership.hs
haskell
module Fission.Web.Server.Ownership ( module Fission.Web.Server.Ownership.Class , isOwnedBy ) where import Prelude import Fission.Web.Server.Models import Fission.Web.Server.Ownership.Class isOwnedBy :: Owned item => UserId -> item -> Bool isOwnedBy userId item = userId == ownerId...
0ae73779703d687abf97ce9ae2998c7c145ea5615b4c9efdc94238f52a5d74ff
mu-chaco/ReWire
Main.hs
module Main (main) where import qualified ReWire.Main as M import Control.Monad (unless, msum) import Data.List (isSuffixOf) import Data.Maybe (fromMaybe) import System.Console.GetOpt (getOpt, usageInfo, OptDescr (..), ArgOrder (..), ArgDescr (..)) import System.Directory (listDirectory, setCurrentDirectory) import S...
null
https://raw.githubusercontent.com/mu-chaco/ReWire/b04686a4cd6cb36ca9976a4b6c42bc195ce69462/src/rwc-test/Main.hs
haskell
module Main (main) where import qualified ReWire.Main as M import Control.Monad (unless, msum) import Data.List (isSuffixOf) import Data.Maybe (fromMaybe) import System.Console.GetOpt (getOpt, usageInfo, OptDescr (..), ArgOrder (..), ArgDescr (..)) import System.Directory (listDirectory, setCurrentDirectory) import S...
00dbeda2eb65065f4ab6ac76d2dabe025f402e7632af418b6a956e1b551d2ab5
tweag/webauthn
Encoding.hs
# LANGUAGE DataKinds # module Encoding (spec) where import Control.Monad.Reader (runReaderT) import Crypto.WebAuthn.AttestationStatementFormat (allSupportedFormats) import Crypto.WebAuthn.Encoding.Binary (encodeRawCredential) import Crypto.WebAuthn.Encoding.Internal.WebAuthnJson (Decode (decode), Encode (encode)) imp...
null
https://raw.githubusercontent.com/tweag/webauthn/349a2b408a79107d9f07c017b72b03c9c306e5fa/tests/Encoding.hs
haskell
# LANGUAGE DataKinds # module Encoding (spec) where import Control.Monad.Reader (runReaderT) import Crypto.WebAuthn.AttestationStatementFormat (allSupportedFormats) import Crypto.WebAuthn.Encoding.Binary (encodeRawCredential) import Crypto.WebAuthn.Encoding.Internal.WebAuthnJson (Decode (decode), Encode (encode)) imp...
e2bca1b0cc034141e2af099215427a5a5a9c08835757d51f2cd0a01df55853a4
esl/MongooseIM
mod_mam_rdbms_prefs.erl
%%%------------------------------------------------------------------- @author Michael < > ( C ) 2013 , Uvarov Michael @doc A backend for storing MAM preferencies using RDBMS . %%% @end %%%------------------------------------------------------------------- -module(mod_mam_rdbms_prefs). %% --------------------...
null
https://raw.githubusercontent.com/esl/MongooseIM/7b91117c0ec1018e3f847da9cfabdd89c50d358b/src/mam/mod_mam_rdbms_prefs.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- ---------------------------------------------------------------------- Exports gen_mod handlers ---------------------------------------------------------------------- gen_mo...
@author Michael < > ( C ) 2013 , Uvarov Michael @doc A backend for storing MAM preferencies using RDBMS . -module(mod_mam_rdbms_prefs). -behaviour(gen_mod). -export([start/2, stop/1, hooks/1, supported_features/0]). MAM hook handlers -behaviour(ejabberd_gen_mam_prefs). -export([get_behaviour/3, g...
c9475920d3f5dc15f91528e80175f29a0220ec256c9c021ad7e021919e8fcaa6
tpapp/cl-random
multivariate.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Coding : utf-8 -*- (in-package #:cl-random-tests) (deftestsuite multivariate-tests (cl-random-tests) ()) ;;; multivariate normal (addtest (multivariate-tests) multivariate-normal-pdf (let* ((a (dense 'lla-double (1 2) (3 4))) ...
null
https://raw.githubusercontent.com/tpapp/cl-random/5bb65911037f95a4260bd29a594a09df3849f4ea/tests/multivariate.lisp
lisp
Syntax : ANSI - Common - Lisp ; Coding : utf-8 -*- multivariate normal (ensure-same (cl-random::log-pdf-constant rv) (time (variance (clo :hermitian 'lla-double 3 0.5 :/ (rv (make-instance 'mv-normal :mean mean :variance variance)) ((:values sample-mean sample-vari...
(in-package #:cl-random-tests) (deftestsuite multivariate-tests (cl-random-tests) ()) (addtest (multivariate-tests) multivariate-normal-pdf (let* ((a (dense 'lla-double (1 2) (3 4))) (v (mm t a)) (rv (r-multivariate-normal (vec 'lla-double 1 1) v)) (*lift...
d16e9ed5732f9b46d326b1a84a37075b53b80a528c26cbd09d9eb85080043f91
racket/eopl
reader.rkt
#lang s-exp syntax/module-reader eopl #:language-info '#(scheme/language-info get-info #f)
null
https://raw.githubusercontent.com/racket/eopl/43575d6e95dc34ca6e49b305180f696565e16e0f/lang/reader.rkt
racket
#lang s-exp syntax/module-reader eopl #:language-info '#(scheme/language-info get-info #f)
2e5ccb4c4ff960cd67167699089edb60a0ebb0717b8f2733500ed6da4069899f
cgoldammer/haskell-chess
LogicTest.hs
module LogicTest (logicTests) where import Control.Lens hiding ((.=)) import Test.HUnit import qualified Data.Set as S import qualified Data.Text as Te import Data.Maybe import qualified Data.Either.Combinators as EitherC import Chess.Algorithms import Chess.Board import Chess.Logic rookPosition = Field A R1 possibl...
null
https://raw.githubusercontent.com/cgoldammer/haskell-chess/6611a29db74e80ca10f1b3122495a0f83abcb337/test/LogicTest.hs
haskell
all castling combinations should be possible, thus depend on the gamestate castling rights. where error = "Moving a rook should destroy castling rights on that side" gsNew = After a promotion, the initial pawn disappears White to move can take ep iff the gamestate has an ep pawn on e5. [Move] You can ...
module LogicTest (logicTests) where import Control.Lens hiding ((.=)) import Test.HUnit import qualified Data.Set as S import qualified Data.Text as Te import Data.Maybe import qualified Data.Either.Combinators as EitherC import Chess.Algorithms import Chess.Board import Chess.Logic rookPosition = Field A R1 possibl...
8a2bdeafcca7444b195208dd9df3686a4b42717056cdb6f465239a2bbe6aa428
NorfairKing/smos
TH.hs
# LANGUAGE QuasiQuotes # module Smos.Docs.Site.Casts.TH where import Control.Monad import Instances.TH.Lift () import Language.Haskell.TH import Language.Haskell.TH.Syntax import Path import Path.IO import Smos.Docs.Site.Constants import System.Exit import System.IO import System.Process.Typed import Yesod.EmbeddedSt...
null
https://raw.githubusercontent.com/NorfairKing/smos/f0d76460eff4c1270fd0ddd5ac6face76f6342b1/smos-docs-site/src/Smos/Docs/Site/Casts/TH.hs
haskell
To make sure the lines come out ok.
# LANGUAGE QuasiQuotes # module Smos.Docs.Site.Casts.TH where import Control.Monad import Instances.TH.Lift () import Language.Haskell.TH import Language.Haskell.TH.Syntax import Path import Path.IO import Smos.Docs.Site.Constants import System.Exit import System.IO import System.Process.Typed import Yesod.EmbeddedSt...
c3983f7ad8418f4d8e8ace06d3e9f72a15c8b7d6765cd9d93b247fbcc1f1255c
spawnfest/eep49ers
wxFontPickerCtrl.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2020 . 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/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxFontPickerCtrl.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 2008 - 2020 . 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(wxFontPickerCtrl). -include("wxe.hrl"). -export([create/3,create/4,destroy/1,getMaxPointSize/1,getSelectedFo...
72a3e6560a211f00776beb8f531f1b266a5dbffed14299b0aff61d3fdcbd3df5
input-output-hk/ouroboros-network
Serialisation.hs
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # OPTIONS_GHC -Wno - orphans # module Ouroboros.Consensus.Shelley.Node.Serialisation () where import Control.Exception (Except...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/17889be3e1b6d9b5ee86022b91729837051e6fbb/ouroboros-consensus-shelley/src/Ouroboros/Consensus/Shelley/Node/Serialisation.hs
haskell
# LANGUAGE ScopedTypeVariables # ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- -----------------------------------------------------------------------------} ---------------------------------------------------...
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # OPTIONS_GHC -Wno - orphans # module Ouroboros.Consensus.Shelley.Node.Serialisation () where import Control.Exception (Exception, throw) import qualified Data.ByteS...
7ce85e0a7d0337317103f0d9fabc30a0f795759e6ac1b5ec2de1692942a2fce9
vyorkin/tiger
escape.ml
open Core_kernel module S = Symbol module ST = Symbol_table type value = { (* Depth (nesting level) of the function that contains the variable declaration *) depth : int; (* If [true] then variable escapes *) escapes : bool ref; } (* Environment that maps variables to pairs of depth and a reference t...
null
https://raw.githubusercontent.com/vyorkin/tiger/54dd179c1cd291df42f7894abce3ee9064e18def/chapter6/lib/escape.ml
ocaml
Depth (nesting level) of the function that contains the variable declaration If [true] then variable escapes Environment that maps variables to pairs of depth and a reference to a boolean flag indicating if a particular variable escapes Whenever a variable or formal-parameter declaration [a] is fou...
open Core_kernel module S = Symbol module ST = Symbol_table type value = { depth : int; escapes : bool ref; } module Table = struct include Map.Make (Symbol) end type env = { table : value Table.t; depth : int } In general , variable escapes if : - it is passed by reference - it is accessed f...
c054f91c65353b81af6c9d05c60fe3713ec16c31fe490d5aa5ae28200b3f7387
EarnestResearch/honeycomb-haskell
RIO.hs
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE NoImplicitPrelude # {-# LANGUAGE RankNTypes #-} # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # -- | Module : Servant . Server . Honeycomb . RIO Description : Honeycomb - based tracing for Servant applications using the RIO...
null
https://raw.githubusercontent.com/EarnestResearch/honeycomb-haskell/7b3ad1cb7b89ba0c2348f2cd2a1f9c641cfe00f9/honeycomb-servant-server-rio/src/Servant/Server/Honeycomb/RIO.hs
haskell
# LANGUAGE RankNTypes # | License : Apache-2 Maintainer : Stability : alpha Portability : POSIX The current span context is also available within the service, so it may be used to pass tracing information downstream to further services. | Proxy representing Servant API | Honeycomb service name | Pro...
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE NoImplicitPrelude # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # Module : Servant . Server . Honeycomb . RIO Description : Honeycomb - based tracing for Servant applications using the RIO monad Copyright : ( c ) 202...
473e9ff06419b0fd31ff35822a35e6293250d9c8086c7a8e26b59297786518e5
brownplt/cs173-python
python-desugar.rkt
#lang plai-typed (require "python-syntax.rkt" "python-core-syntax.rkt") (define (desugar expr) (type-case PyExpr expr [PySeq (es) (foldl (lambda (e1 e2) (CSeq e2 (desugar e1))) (desugar (first es)) (rest es))] [PyNum (n) (CNum n)] [PyApp (f args) (CApp (desugar f) (map desugar args))] [PyId...
null
https://raw.githubusercontent.com/brownplt/cs173-python/d8ae026172f269282e54366f16ec42e037117cb4/python-desugar.rkt
racket
#lang plai-typed (require "python-syntax.rkt" "python-core-syntax.rkt") (define (desugar expr) (type-case PyExpr expr [PySeq (es) (foldl (lambda (e1 e2) (CSeq e2 (desugar e1))) (desugar (first es)) (rest es))] [PyNum (n) (CNum n)] [PyApp (f args) (CApp (desugar f) (map desugar args))] [PyId...
b6f4a6a71daa4957453f9ad31df721002f33d1081aea88255ef8cbf4d88c6ea3
GaloisInc/jvm-verifier
Debugger.hs
# LANGUAGE LambdaCase # | Module : Verifier . Java . Debugger Description : Debugger implementation for JSS License : BSD3 Stability : provisional Point - of - contact : acfoltzer Debugger for the JVM Symbolic Simulator . This module provides implementations of the ' ...
null
https://raw.githubusercontent.com/GaloisInc/jvm-verifier/3905dda18d0bdd5c595eef49804780f4a48c22f5/src/Verifier/Java/Debugger.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE OverloadedStrings # | Parse a string using the 'Read' instance. | Add a breakpoint to the @main@ method of the given class | Given a step handler, return a new step handler that runs it when breakpoints are encountered | Check whether we're at a transient breakpoint, and if ...
# LANGUAGE LambdaCase # | Module : Verifier . Java . Debugger Description : Debugger implementation for JSS License : BSD3 Stability : provisional Point - of - contact : acfoltzer Debugger for the JVM Symbolic Simulator . This module provides implementations of the ' ...
e3d871ed90b5e4a493925a6312969ad045d7067b3e32b697ed3f73d7d06d0b21
zachsully/dl
CodeGen.hs
module DL.DMach.CodeGen (cCompile) where import DL.Backend import DL.Flat.Syntax import DL.DMach.Syntax import DL.DMach.Translation (trans) import DL.Utils.Pretty data CLike instance Pretty CLike where pp = undefined cCompile :: Backend FlatTerm cCompile = Backend (codeGen . trans) codeGen :: DMach -> CLike code...
null
https://raw.githubusercontent.com/zachsully/dl/383bcc9d34c5e1f9787dede440a84503e5a2fd28/haskell/DL/DMach/CodeGen.hs
haskell
module DL.DMach.CodeGen (cCompile) where import DL.Backend import DL.Flat.Syntax import DL.DMach.Syntax import DL.DMach.Translation (trans) import DL.Utils.Pretty data CLike instance Pretty CLike where pp = undefined cCompile :: Backend FlatTerm cCompile = Backend (codeGen . trans) codeGen :: DMach -> CLike code...
7c4007e90d69158b7127d5d491aa6a165554145e9ff4d508b9b3f43d9d143d10
rescript-association/reanalyze
ExnLib.ml
let raisesLibTable = let table = Hashtbl.create 15 in let open Exn in let array = [ ("get", [invalidArgument]); ("set", [invalidArgument]); ("make", [invalidArgument]); ("init", [invalidArgument]); ("make_matrix", [invalidArgument]); ("fill", [invalidArgument]); ("bli...
null
https://raw.githubusercontent.com/rescript-association/reanalyze/6335ce4399ecb305e653561d2d01912fd6c8f917/src/ExnLib.ml
ocaml
bs-json
let raisesLibTable = let table = Hashtbl.create 15 in let open Exn in let array = [ ("get", [invalidArgument]); ("set", [invalidArgument]); ("make", [invalidArgument]); ("init", [invalidArgument]); ("make_matrix", [invalidArgument]); ("fill", [invalidArgument]); ("bli...
48246e200a1abe20bd3e0a939e0872859a5ff6bb98d4bd85335664b9bf8cabd8
Rober-t/apxr_run
agent_mgr_sup.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright ( C ) 2018 ApproximateReality %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%---------------------------------------------------------------------------- @doc AgentMgr top level supervisor ...
null
https://raw.githubusercontent.com/Rober-t/apxr_run/9c62ab028af7ff3768ffe3f27b8eef1799540f05/src/agent_mgr/agent_mgr_sup.erl
erlang
---------------------------------------------------------------------------- @end ---------------------------------------------------------------------------- Supervisor callbacks ============================================================================ Types ====================================================...
Copyright ( C ) 2018 ApproximateReality @doc AgentMgr top level supervisor . -module(agent_mgr_sup). -behaviour(supervisor). Start / Stop -export([ start_link/0 ]). -export([ init/1 ]). Xref -ignore_xref([ start_link/0 ]). -type sup_flags() :: #{ intensity => non_neg_integer(), period => pos_in...
8c2b89caaf14a286aed9428808b9443e14e340b9ded020aa5b2ae37b8c451653
TyOverby/mono
int_intf.ml
(** An interface to use for int-like types, e.g., {{!Base.Int}[Int]} and {{!Base.Int64}[Int64]}. *) open! Import module type Round = sig type t * [ round ] rounds an int to a multiple of a given [ to_multiple_of ] argument , according to a direction [ dir ] , with default [ dir ] being [ ` Nearest ] . ...
null
https://raw.githubusercontent.com/TyOverby/mono/7666c0328d194bf9a569fb65babc0486f2aaa40d/vendor/janestreet-base/src/int_intf.ml
ocaml
* An interface to use for int-like types, e.g., {{!Base.Int}[Int]} and {{!Base.Int64}[Int64]}. * [delimiter] is an underscore by default. * Integer exponentiation * Negation * Float division of integers. * Same as [bit_and]. * Same as [bit_or]. * Same as [bit_xor]. * Same as [bit_not]. * Same as [shift_lef...
open! Import module type Round = sig type t * [ round ] rounds an int to a multiple of a given [ to_multiple_of ] argument , according to a direction [ dir ] , with default [ dir ] being [ ` Nearest ] . [ round ] will raise if [ to_multiple_of < = 0 ] . If the result overflows ( too far positive or...
7baf97ea1c7601949d4db052350c5428d4426ee0181f9eebf1a591f83699a0fc
footprintanalytics/footprint-web
users.clj
(ns metabase.test.data.users "Code related to creating / managing fake `Users` for testing purposes." (:require [clojure.test :as t] [medley.core :as m] [metabase.db.connection :as mdb.connection] [metabase.http-client :as client] [metabase.models.permissions-group :r...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/test/data/users.clj
clojure
------------------------------------------------ User Definitions ------------------------------------------------ These users have permissions for the Test. They are lazily created as needed. * rasta * crowberto - superuser * lucky ------------------------------------------------- Test User Fns -------------...
(ns metabase.test.data.users "Code related to creating / managing fake `Users` for testing purposes." (:require [clojure.test :as t] [medley.core :as m] [metabase.db.connection :as mdb.connection] [metabase.http-client :as client] [metabase.models.permissions-group :r...
45d3795b49c090faf9b6cf58fc3c97a0c57d5d28cefe57a16a0afcf8a6245850
cognitect-labs/vase
datomic.clj
(ns com.cognitect.vase.datomic (:require [datomic.api :as d] [io.rkn.conformity :as c] [io.pedestal.interceptor :as i])) (defn new-db-uri [] (str "datomic:mem://" (d/squuid))) (defn connect "Given a Datomic URI, attempt to create the database and connect to it, returning the connection...
null
https://raw.githubusercontent.com/cognitect-labs/vase/d882bc8f28e8af2077b55c80e069aa2238f646b7/src/com/cognitect/vase/datomic.clj
clojure
(ns com.cognitect.vase.datomic (:require [datomic.api :as d] [io.rkn.conformity :as c] [io.pedestal.interceptor :as i])) (defn new-db-uri [] (str "datomic:mem://" (d/squuid))) (defn connect "Given a Datomic URI, attempt to create the database and connect to it, returning the connection...
a7572762bb4a1293dcf2138a8dbff809046f6e80edcfd829587653e96cb20244
leksah/leksah-server
Server.hs
# LANGUAGE FlexibleInstances , ScopedTypeVariables # ----------------------------------------------------------------------------- -- -- Module : IDE.Utils.Server Copyright : 2007 - 2011 , -- License : GPL -- -- Maintainer : -- Stability : provisional -- Portability : -- -- | -- ----------...
null
https://raw.githubusercontent.com/leksah/leksah-server/d4b735c17a36123dc97f79fabf1e9310d74984a6/src/IDE/Utils/Server.hs
haskell
--------------------------------------------------------------------------- Module : IDE.Utils.Server License : GPL Maintainer : Stability : provisional Portability : | ---------------------------------------------------------------------------- | Set the user and group for the process. If t...
# LANGUAGE FlexibleInstances , ScopedTypeVariables # Copyright : 2007 - 2011 , module IDE.Utils.Server ( ipAddress , Server (..) , serveOne , serveMany , ServerRoutine , UserAndGroup (..) , WaitFor (waitFor)) where import Prelude () import Prelude.C...
c428d7daee302f7ea8597bf7fa6f6cf8e5ecb033e978e9a400087f8dc3465dd6
reborg/clojure-essential-reference
7.clj
< 1 > (defn ^:dynamic y [] 9) < 2 > (future (binding [x #(rand)] (* (x) (y)))) (future (binding [y #(rand)] (* (x) (y))))) [(x) (y)] ; <3> [ 5 9 ]
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/VarsandNamespaces/alter-var-rootandwith-redefs/7.clj
clojure
<3>
< 1 > (defn ^:dynamic y [] 9) < 2 > (future (binding [x #(rand)] (* (x) (y)))) (future (binding [y #(rand)] (* (x) (y))))) [ 5 9 ]
97a87be28e00bec72e760c03a6a8e15ba08c89937fa49abcdb569d42bed59b65
ultralisp/ultralisp
file-server.lisp
(defpackage #:ultralisp/file-server (:use #:cl) (:import-from #:reblocks-file-server) (:export #:make-route)) (in-package #:ultralisp/file-server) (defun make-route (root uri) (uiop:ensure-all-directories-exist (list root)) (reblocks-file-server:make-route :uri uri :root root))
null
https://raw.githubusercontent.com/ultralisp/ultralisp/37bd5d92b2cf751cd03ced69bac785bf4bcb6c15/src/file-server.lisp
lisp
(defpackage #:ultralisp/file-server (:use #:cl) (:import-from #:reblocks-file-server) (:export #:make-route)) (in-package #:ultralisp/file-server) (defun make-route (root uri) (uiop:ensure-all-directories-exist (list root)) (reblocks-file-server:make-route :uri uri :root root))
3a5439deb3a68b2c36cae4a07bbf1db7d30af0ed691b6f2fd7b44c4f5ad22f5a
ghc/packages-Cabal
Version.hs
----------------------------------------------------------------------------- -- | -- Module : Distribution.Version Copyright : , 2003 - 2004 2008 -- License : BSD3 -- -- Maintainer : -- Portability : portable -- -- Exports the 'Version' type along with a parser and pretty p...
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/Cabal/Distribution/Version.hs
haskell
--------------------------------------------------------------------------- | Module : Distribution.Version License : BSD3 Maintainer : Portability : portable Exports the 'Version' type along with a parser and pretty printer. A version * Package versions * Version ranges ** Constructing ** In...
Copyright : , 2003 - 2004 2008 is something like @\"1.3.3\"@. It also defines the ' VersionRange ' data types . Version ranges are like @\">= 1.2 & & < 2\"@. module Distribution.Version ( Version, version0, mkVersion, mkVersion', versionNumbers, nullVersion, alterVersion...
b15f5425fe1c4381d8d4a83d52a414ffcb3d95fa369ab51254e9caece1a8c4c3
nikita-volkov/rerebase
Strict.hs
module Control.Monad.ST.Strict ( module Rebase.Control.Monad.ST.Strict ) where import Rebase.Control.Monad.ST.Strict
null
https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Control/Monad/ST/Strict.hs
haskell
module Control.Monad.ST.Strict ( module Rebase.Control.Monad.ST.Strict ) where import Rebase.Control.Monad.ST.Strict
986537a832b68bdc4ae9914aa4e9b2688a51aa4ed2f66c5b876b2131d71f33e4
alanz/ghc-exactprint
LayoutWhere.hs
foo x = r where a = 3 b = 4 r = a + a + b
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc710/LayoutWhere.hs
haskell
foo x = r where a = 3 b = 4 r = a + a + b
6d37cdf9837a3d8b822811e8fea12b25c903703ccbad4de32fac3a8343e0f313
Perry961002/SICP
exe4.39.scm
(define (multiple-dwelling) (let ((baker (amb 1 2 3 4 5)) (cooper (amb 1 2 3 4 5)) (fletcher (amb 1 2 3 4 5)) (miller (amb 1 2 3 4 5)) (smith (amb 1 2 3 4 5))) (require (distinct? (list baker cooper fletcher miller smith))) (require (not (= (abs ...
null
https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap4/exercise/exe4.39.scm
scheme
(define (multiple-dwelling) (let ((baker (amb 1 2 3 4 5)) (cooper (amb 1 2 3 4 5)) (fletcher (amb 1 2 3 4 5)) (miller (amb 1 2 3 4 5)) (smith (amb 1 2 3 4 5))) (require (distinct? (list baker cooper fletcher miller smith))) (require (not (= (abs ...
94ab19621a531d04fe7d5754e81a64818c5b96846d8219023a04496ef2016b8d
onedata/op-worker
archive_traverses_common.erl
%%%------------------------------------------------------------------- @author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%------------------------------------------------------------------- %%% @doc %%% Helper module containing common fu...
null
https://raw.githubusercontent.com/onedata/op-worker/be74364154d030cba51abae90645447a1b740429/src/modules/archive/traverse/archive_traverses_common.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- @doc Helper module containing common functions used across archivisation traverse modules. @end ------------------------------------------------------------------- API ===...
@author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . -module(archive_traverses_common). -author("Michal Stanisz"). -include("tree_traverse.hrl"). -include("modules/dataset/archive.hrl"). -include("modules/datastore/datastore_models.hrl"). -include("m...
86e72574d1211489e33fb8f8c611dec788bc485a8146ee2aa9032e6cdf32667d
kupl/LearnML
patch.ml
let rec ifequal n (l : 'a list) : bool = match l with [] -> false | hd :: tl -> hd = n || ifequal n tl let rec __s3 __s4 (__s5 : 'b list) : bool = match __s5 with | [] -> true | __s11 :: __s12 -> if __s4 = __s11 then false else __s3 __s4 __s12 let rec uniq (lst : 'c list) : 'd list = let rec l (lst : 'c l...
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/uniq/sub10/patch.ml
ocaml
let rec ifequal n (l : 'a list) : bool = match l with [] -> false | hd :: tl -> hd = n || ifequal n tl let rec __s3 __s4 (__s5 : 'b list) : bool = match __s5 with | [] -> true | __s11 :: __s12 -> if __s4 = __s11 then false else __s3 __s4 __s12 let rec uniq (lst : 'c list) : 'd list = let rec l (lst : 'c l...
b6aff231b63283892f747a297aa00a6dd73d9c851ac3fef513e7b624443ad693
zcaudate-me/lein-repack
source.clj
(ns leiningen.repack.manifest.source (:require [clojure.java.io :as io] [leiningen.repack.manifest.common :as manifest] [leiningen.repack.data.util :as util] [clojure.string :as string])) (defn child-dirs [path] (let [children (seq (.list path))] (->> children (filt...
null
https://raw.githubusercontent.com/zcaudate-me/lein-repack/1eb542d66a77f55c4b5625783027c31fd2dddfe5/src/leiningen/repack/manifest/source.clj
clojure
(ns leiningen.repack.manifest.source (:require [clojure.java.io :as io] [leiningen.repack.manifest.common :as manifest] [leiningen.repack.data.util :as util] [clojure.string :as string])) (defn child-dirs [path] (let [children (seq (.list path))] (->> children (filt...
031fff1b99d854ed61be837d7f207d808461816e7c5d56e2660836aa0f2c0914
noinia/hgeometry
StarShapedSpec.hs
{-# LANGUAGE OverloadedStrings #-} module Geometry.Polygon.StarShapedSpec where import Control.Lens import Control.Monad.Random.Strict(evalRand) import Data.Ext import Geometry import Ipe import Ipe.Color (named) import Data.Maybe import System.Random (mkStdGen) import Test.Hspec import Paths_hgeometry_test ...
null
https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry-test/src/Geometry/Polygon/StarShapedSpec.hs
haskell
# LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ correct result it "returned point in polygon" $ star shaped polygons are blue $ [ Point2 208 752 ] -- main = readInputFromFile "tests/Geometry/pointInPolygon.ipe"
module Geometry.Polygon.StarShapedSpec where import Control.Lens import Control.Monad.Random.Strict(evalRand) import Data.Ext import Geometry import Ipe import Ipe.Color (named) import Data.Maybe import System.Random (mkStdGen) import Test.Hspec import Paths_hgeometry_test spec :: Spec spec = do testCases ...
3c2444dc083b216e3ac9fc366bf1924be40ead35e3aedc89c19184ab7f1b4e26
metaocaml/ber-metaocaml
stackoverflow.ml
TEST flags = " -w a " * setup - ocamlc.byte - build - env * * ocamlc.byte * * * run * * * * check - program - output * * * setup - ocamlopt.byte - build - env * * * ocamlopt.byte * * * * run * * * * * check - program - output * libunix * * script script = " sh $ { test_source_directory}...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/runtime-errors/stackoverflow.ml
ocaml
GPR#1289
TEST flags = " -w a " * setup - ocamlc.byte - build - env * * ocamlc.byte * * * run * * * * check - program - output * * * setup - ocamlopt.byte - build - env * * * ocamlopt.byte * * * * run * * * * * check - program - output * libunix * * script script = " sh $ { test_source_directory}...
792dc1c41e9d1dfdae4cf17c8704971705f6bbda17e177f85903f3200d5d86d9
Soyn/sicp
Ex2.83.rkt
#lang racket ;; Ex2.83 Created by Soyn . 26/7/15 ;; @Brief:Suppose you are designing a generic arithmetic system for dealing with the tower of types shown in figure 2.25 : integer , rational , real , complex . For each type ( except complex ) , design a procedure that raises objects of that type one level in the...
null
https://raw.githubusercontent.com/Soyn/sicp/d2aa6e3b053f6d4c8150ab1b033a18f61fca7e1b/CH2/CH2.5/Ex2.83.rkt
racket
Ex2.83 @Brief:Suppose you are designing a generic arithmetic system for dealing with the tower of types will work for each type (except complex). put them in coersion table define a types tower go through the types-tower
#lang racket Created by Soyn . 26/7/15 shown in figure 2.25 : integer , rational , real , complex . For each type ( except complex ) , design a procedure that raises objects of that type one level in the tower . Show how to install a generic raise operation that ( define ( integer->rational integer) ( make-r...
33f84a42d76ce77b1025505a7ebd68579063e805558534a7f03b6300efa7db8c
gonzojive/hunchentoot
session.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; Package : HUNCHENTOOT ; Base : 10 -*- $ Header : /usr / local / cvsrep / hunchentoot / session.lisp , v 1.12 2008/02/13 16:02:18 edi Exp $ Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved . ;;; Redistribution and use in source and binary forms, with or witho...
null
https://raw.githubusercontent.com/gonzojive/hunchentoot/36e3a81655be0eeb8084efd853dd3ac3e5afc91b/session.lisp
lisp
Syntax : COMMON - LISP ; Package : HUNCHENTOOT ; Base : 10 -*- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and t...
$ Header : /usr / local / cvsrep / hunchentoot / session.lisp , v 1.12 2008/02/13 16:02:18 edi Exp $ Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved . DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , (in-pack...
6d90fe2448953946a8b957cd3526a9d187dde2f6116ad8052d3e4b477f9cf963
lemmaandrew/CodingBatHaskell
frontPiece.hs
From Given an int array of any length , return a new array of its first 2 elements . If the array is smaller than length 2 , use whatever elements are present . Given an int array of any length, return a new array of its first 2 elements. If the array is smaller than length 2, use whatever elements are presen...
null
https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/Array-1/frontPiece.hs
haskell
From Given an int array of any length , return a new array of its first 2 elements . If the array is smaller than length 2 , use whatever elements are present . Given an int array of any length, return a new array of its first 2 elements. If the array is smaller than length 2, use whatever elements are presen...
e9212ff3dc8163222db27b04aa79e5ada01a962cba8a11a24fd74fa43789cc4f
yogthos/yuggoth
setup.clj
(ns yuggoth.routes.setup (:require [compojure.core :refer [defroutes GET POST]] [clojure.set :refer [rename-keys]] [noir.util.crypt :as crypt] [noir.response :refer [redirect]] [yuggoth.config :refer [configured? text]] [yuggoth.layout :as layou...
null
https://raw.githubusercontent.com/yogthos/yuggoth/901541c5809fb1e77c249f26a3aa5df894c88242/src/yuggoth/routes/setup.clj
clojure
(ns yuggoth.routes.setup (:require [compojure.core :refer [defroutes GET POST]] [clojure.set :refer [rename-keys]] [noir.util.crypt :as crypt] [noir.response :refer [redirect]] [yuggoth.config :refer [configured? text]] [yuggoth.layout :as layou...
efef3397fa35228ac35654be999d339b605397e546c40e6abfe664bb48a3a0e7
zhuangxm/clj-rpc
wire_format.clj
;; Different wire formats support. (ns clj-rpc.wire-format (:require [cheshire.core :as json] [clojure.edn :as edn])) (defmulti serialization "Returns a pair of encoder, decoder function." (partial keyword "clj-rpc.wire-format")) (defmethod serialization ::clj [_] [pr-str edn/read-string]) (defme...
null
https://raw.githubusercontent.com/zhuangxm/clj-rpc/73a2f66b5ed0cce865d102acb49ba229203343ad/src/clj_rpc/wire_format.clj
clojure
Different wire formats support.
(ns clj-rpc.wire-format (:require [cheshire.core :as json] [clojure.edn :as edn])) (defmulti serialization "Returns a pair of encoder, decoder function." (partial keyword "clj-rpc.wire-format")) (defmethod serialization ::clj [_] [pr-str edn/read-string]) (defmethod serialization ::json [_] [js...
bab65354c3bc40a71af1f85566f7e0c6474d6748dbeb31e91daff5ca453c8650
scalaris-team/scalaris
db_bitcask_merge_extension.erl
2013 - 2016 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/db_bitcask_merge_extension.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...
2013 - 2016 Zuse Institute Berlin , Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > @doc Triggers periodically a merge operation for a Bitcask DB . -module(db_bitcask_merge_extension). -author(''). ...
2e4c1b4b5d4142fd96ff2d7bdc46bd8d95162087c94ca67b8552433664069e68
valderman/haste-compiler
UTC.hs
{-# OPTIONS -fno-warn-unused-imports #-} # LANGUAGE Trustworthy # #include "HsConfigure.h" -- #hide module Data.Time.Clock.UTC ( -- * UTC -- | UTC is time as measured by a clock, corrected to keep pace with the earth by adding or removing -- occasional seconds, known as \"leap seconds\". These corrections are not ...
null
https://raw.githubusercontent.com/valderman/haste-compiler/47d942521570eb4b8b6828b0aa38e1f6b9c3e8a8/libraries/time/lib/Data/Time/Clock/UTC.hs
haskell
# OPTIONS -fno-warn-unused-imports # #hide * UTC | UTC is time as measured by a clock, corrected to keep pace with the earth by adding or removing occasional seconds, known as \"leap seconds\". No table of these corrections is provided, as any program compiled with it would become and you'll be fine. | This is...
# LANGUAGE Trustworthy # #include "HsConfigure.h" module Data.Time.Clock.UTC ( These corrections are not predictable and are announced with six month 's notice . out of date in six months . If you do n't care about leap seconds , use UTCTime and NominalDiffTime for your clock calculations , UTCTime(..),NominalDi...
e578ce444ba5bedcaa70d0d1147f2e0fcf37beed6e14dbffb8eca0190f2cef94
hbr/fmlib
indent.ml
type expectation = | Indent of int | Align of int | Align_between of int * int type violation = expectation let group (lst: ('a * expectation option) list) : (expectation option * 'a list) list = let rec grp lst = match lst with | [] -> [] | (a, ...
null
https://raw.githubusercontent.com/hbr/fmlib/45ee4d2c76a19ef44557c554de30ec57d94bb9e5/src/parse/indent.ml
ocaml
lower bound of the indentation set upper bound of the indentation set Normal case. Token are all wrapped with '>=' i.e. they can appear to the right of the indentation set of the parent. However, if the token appears within the indentation set of the parent, then it restricts the u...
type expectation = | Indent of int | Align of int | Align_between of int * int type violation = expectation let group (lst: ('a * expectation option) list) : (expectation option * 'a list) list = let rec grp lst = match lst with | [] -> [] | (a, ...
a31d904ab29481f2095251da8f21514d9659c468649356e216664fa41348e718
CodyReichert/qi
packages.lisp
(in-package :cl-user) (defpackage qi.packages (:use :cl :qi.paths) (:import-from :qi.manifest :manifest-get-by-name :manifest-package :manifest-package-name :manifest-package-url) (:import-from :qi.util :download-strategy ...
null
https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/src/packages.lisp
lisp
code: This package provides data types and generic functions for working with - Local + Only takes a path to a directory on the local machine - HTTP + An http link to a tarball - Git + Git URL's are cloned, and can take a couple of extra parameters: - Version (version of the repo to che...
(in-package :cl-user) (defpackage qi.packages (:use :cl :qi.paths) (:import-from :qi.manifest :manifest-get-by-name :manifest-package :manifest-package-name :manifest-package-url) (:import-from :qi.util :download-strategy ...
90aa598176fbcbd00dd7c384ca7fd6fe2bc80731143dc6e7c91b804f141c90b3
elastic/runbld
facts.clj
(ns runbld.facts (:require [runbld.io :as io] [schema.core :as s] [slingshot.slingshot :refer [throw+]])) (defprotocol Facter (arch [_]) (cpu-type [_]) (cpus [_]) (cpus-physical [_]) (facter-provider [_]) (facter-version [_]) (hostname [_]) (ip4 ...
null
https://raw.githubusercontent.com/elastic/runbld/7afcb1d95a464dc068f95abf3ad8a7566202ce28/src/clj/runbld/facts.clj
clojure
(ns runbld.facts (:require [runbld.io :as io] [schema.core :as s] [slingshot.slingshot :refer [throw+]])) (defprotocol Facter (arch [_]) (cpu-type [_]) (cpus [_]) (cpus-physical [_]) (facter-provider [_]) (facter-version [_]) (hostname [_]) (ip4 ...
baa4ab5da748256e4548362930a593b31734f053be165f690b975f71b151f848
abailly/xxi-century-typed
NetSpec.hs
module Minilang.REPL.NetSpec where --import Control.Concurrent (threadDelay) import Control.Concurrent.Async import Control.Concurrent.STM.TVar import Control.Exception (bracket) import Control.Monad (forM) import Data.Aeson (eitherDecode, encode) import Minilang.Env import Minilang.Eval (Value (EU)...
null
https://raw.githubusercontent.com/abailly/xxi-century-typed/89df5eab3747ddb0ea37030ddb1947fb8c14265b/minilang/test/Minilang/REPL/NetSpec.hs
haskell
import Control.Concurrent (threadDelay)
module Minilang.REPL.NetSpec where import Control.Concurrent.Async import Control.Concurrent.STM.TVar import Control.Exception (bracket) import Control.Monad (forM) import Data.Aeson (eitherDecode, encode) import Minilang.Env import Minilang.Eval (Value (EU), emptyContext) import Minilang.Log import Minilang.Parser im...
1e794950a580d9f1176d3243aa7241d2e23a0a671c948e140201175a08d46409
CatalaLang/catala
from_scopelang.ml
This file is part of the Catala compiler , a specification language for tax and social benefits computation rules . Copyright ( C ) 2020 , contributor : < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . ...
null
https://raw.githubusercontent.com/CatalaLang/catala/5bd140ae5fb2a997a578b9cd67a932c4a8733526/compiler/dcalc/from_scopelang.ml
ocaml
* List of scope variables * Scope input * Scope output * Mapping between the input scope variables and the input struct fields. * Mapping between the output scope variables and the output struct fields. TODO: could likely be removed now that we have it in the program ctx Expression argument is...
This file is part of the Catala compiler , a specification language for tax and social benefits computation rules . Copyright ( C ) 2020 , contributor : < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . ...
1a7d272701b7b0d21892c0f569b87590706b7915860742ba6e0f4c5d5fdaf50c
albertoruiz/easyVision
horizon.hs
import Vision.GUI import Image import Image.Processing import Util.Options(optionFromFile,getRawOption) import Data.Traversable(traverse) import Numeric.LinearAlgebra hiding (gjoin) import Vision(estimateHomography,scaling) import Util.Geometry as G import Util.Debug(debug) import Contours(bounding , poly2roi ) main =...
null
https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/vision/geom/horizon.hs
haskell
import Vision.GUI import Image import Image.Processing import Util.Options(optionFromFile,getRawOption) import Data.Traversable(traverse) import Numeric.LinearAlgebra hiding (gjoin) import Vision(estimateHomography,scaling) import Util.Geometry as G import Util.Debug(debug) import Contours(bounding , poly2roi ) main =...
ca5669bdbc61a81ea8afba6e0cfa8ab18ae7488a708efc0a95114b2f087ee909
degree9/enterprise
profiler.cljs
(ns degree9.profiler (:require [taoensso.tufte :as tufte :refer-macros (defnp p profiled profile)])) (tufte/add-basic-println-handler! {}) (defn run-once [app] (profile {} (dotimes [_ 1] (p :app app))))
null
https://raw.githubusercontent.com/degree9/enterprise/36e4f242c18b1dde54d5a15c668b17dc800c01ff/src/degree9/profiler.cljs
clojure
(ns degree9.profiler (:require [taoensso.tufte :as tufte :refer-macros (defnp p profiled profile)])) (tufte/add-basic-println-handler! {}) (defn run-once [app] (profile {} (dotimes [_ 1] (p :app app))))
5e7a2387a30e86c625dcc8750b8a9153858d004ec2fb774e8e89bb369d97db33
jordanthayer/ocaml-search
recording_clamped.ml
(** A* search variant for recording search data online *) type 'a node = { Data Payload f : float; (* Total cost of a node*) mutable est_f : float; g : float; (* Cost of reaching a node *) h : float; d : float; depth : int; (* Depth of node in tree. Root @ 0 *) mutable q_pos ...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/recording/recording_clamped.ml
ocaml
* A* search variant for recording search data online Total cost of a node Cost of reaching a node Depth of node in tree. Root @ 0 Position info for dpq * takes a function to be applied to the data payload such as the goal-test or the domain heuristic and wraps it so that it can be applied to the en...
type 'a node = { Data Payload mutable est_f : float; h : float; d : float; } let wrap f = (fun n -> f n.data) let unwrap_sol s = match s with Limit.Nothing -> None | Limit.Incumbent (q,n) -> Some (n.data, n.g) let est_f_then_d_then_g a b = ((a.est_f = b.est_f) && a.d < b.d) || ...
9161ef935016d4f9d1a9facf8e9a6b5ec7dddae793b798d6be7b0ad03b73a26a
Liutos/Project-Euler
pro3.lisp
(defun largest-prime-factor (n) (labels ((rec (num acc) (cond ((= 1 num) acc) ((<= num 2) num) (t (let ((fac (do ((i 2 (1+ i))) ((or (>= i num) (zerop (mod num i))) i)))) (rec (/ num fac) fac)))))) (rec n 1)))
null
https://raw.githubusercontent.com/Liutos/Project-Euler/dd59940099ae37f971df1d74c4b7c78131fd5470/pro3.lisp
lisp
(defun largest-prime-factor (n) (labels ((rec (num acc) (cond ((= 1 num) acc) ((<= num 2) num) (t (let ((fac (do ((i 2 (1+ i))) ((or (>= i num) (zerop (mod num i))) i)))) (rec (/ num fac) fac)))))) (rec n 1)))
da4ae1004e17a88930d549177e0e63d8dcfcfc4627805f2b0375db9ebccf15d6
techascent/tech.resource
stack.clj
(ns tech.v3.resource.stack "Implementation of stack based resource system. Simple, predictable, deterministic, and applicable to most problems. Resource contexts are sequences of resources that need to be, at some point, released." (:require [clojure.tools.logging :as log]) (:import [java.lang Runnable] ...
null
https://raw.githubusercontent.com/techascent/tech.resource/d27e56d14f60504a343fc221d520797231fd11ba/src/tech/v3/resource/stack.clj
clojure
Avoid holding onto head. It is important the resources sequences is a list.
(ns tech.v3.resource.stack "Implementation of stack based resource system. Simple, predictable, deterministic, and applicable to most problems. Resource contexts are sequences of resources that need to be, at some point, released." (:require [clojure.tools.logging :as log]) (:import [java.lang Runnable] ...
82fbcacb272a75d919259bc99290b504011421e87852709469c446f9eddab105
alanz/ghc-exactprint
T10052-input.hs
main = let (x :: String) = "hello" in putStrLn x
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/T10052-input.hs
haskell
main = let (x :: String) = "hello" in putStrLn x
8e5ee71b1cefe54b503ed423a041ca73dec139135de06c0885f8fb170194b5cb
daigotanaka/mern-cljs
project.clj
(defproject mern-cljs-example-common "0.1.1-SNAPSHOT" :description "MERN-cljs Example" :url "-cljs" :license {:name "MIT License" :url ""} :dependencies [[org.clojure/clojure "1.7.0"] [org.clojure/clojurescript "1.7.48"] [org.clojure/core.async "0.1.346.0-17112a-al...
null
https://raw.githubusercontent.com/daigotanaka/mern-cljs/a9dedbb3b622f96dd0b06832733b4fd961e6437d/example/common/project.clj
clojure
(defproject mern-cljs-example-common "0.1.1-SNAPSHOT" :description "MERN-cljs Example" :url "-cljs" :license {:name "MIT License" :url ""} :dependencies [[org.clojure/clojure "1.7.0"] [org.clojure/clojurescript "1.7.48"] [org.clojure/core.async "0.1.346.0-17112a-al...
a068a34e2d5bb3e554194c00697d3fb7603ec69416260a776f175426bc86725e
ocaml-multicore/tezos
test_reveal.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2020 Nomadic Labs . < > (* ...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_protocol/test/integration/operations/test_reveal.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2020 Nomadic Labs . < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN A...
108370ecd9ed4915b3c876c16f126b1b0eac931391dbe5ecb944def11e038bad
rowangithub/DOrder
qpVector.ml
type 'a vector = { mutable a : 'a array; mutable u : int; d : 'a; } let obj_count = ref 0 let make size value = let res = {a = Array.make (if size < 16 then 16 else size) value; u = size; d = value} in obj_count : = ! ; Gc.finalise ( fun _ - > obj_count : = ! ) res ; Gc.finalise (fun _...
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/external/qp/qpVector.ml
ocaml
type 'a vector = { mutable a : 'a array; mutable u : int; d : 'a; } let obj_count = ref 0 let make size value = let res = {a = Array.make (if size < 16 then 16 else size) value; u = size; d = value} in obj_count : = ! ; Gc.finalise ( fun _ - > obj_count : = ! ) res ; Gc.finalise (fun _...
5a323e426eab65183ba431acc5d6b62b93e4679dbe5c043ac82321c805d7e357
heechul/crest-z3
libmaincil.ml
* * Copyright ( c ) 2001 - 2002 , * < > * < > * < > * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are * met : * * 1 . Redistributions...
null
https://raw.githubusercontent.com/heechul/crest-z3/cfcebadddb5e9d69e9956644fc37b46f6c2a21a0/cil/src/libmaincil.ml
ocaml
libmaincil a visitor to unroll all types - may need to do some magic to keep attributes variable declaration global: need to unroll fields of compinfo ChangeTo [g] register some functions - these may be called from C code
* * Copyright ( c ) 2001 - 2002 , * < > * < > * < > * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are * met : * * 1 . Redistributions...
e3766166c60b9e98d4c39cf52256530ea41598414887f80b105b9441ea86e7c7
binsec/haunted
sse.ml
(**************************************************************************) This file is part of BINSEC . (* *) Copyright ( C ) 2016 - 2019 CEA ( Co...
null
https://raw.githubusercontent.com/binsec/haunted/f670f9a02fabc64e08c9f7b091b4a71d205d89a9/src/sse/sse.ml
ocaml
************************************************************************ alternatives) you can redistribute it an...
This file is part of BINSEC . Copyright ( C ) 2016 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ve...
f46be52a305e2d7d57fd65342432f15973d3287e7bdd8ad31ef710ac9ac9092a
psilord/option-9
game.lisp
Copyright 2010 ( ) ;; 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 ...
null
https://raw.githubusercontent.com/psilord/option-9/b5f35a482a9ea637c06dfa389b3df3acc0d8ca55/game.lisp
lisp
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permis...
Copyright 2010 ( ) distributed under the License is distributed on an " AS IS " BASIS , (in-package #:option-9) #+option-9-debug (declaim (optimize (safety 3) (space 0) (speed 0) (debug 3))) (defun make-game (&key (window-width +game-width+) (window-height +game-height+) (game-width +game...
7d2c287ea84be88681b35da0f33524451005243cd8ca6b012202938d805abf36
stedolan/mlsub
location.ml
open Lexing type source = { name : string; contents : string; (* (start, end) positions of lines, including newline *) lines : (int * int) list } type t = Loc of source * int * int module type Locator = sig val pos : Lexing.position * Lexing.position -> t end Split a string by a delimiter . are in...
null
https://raw.githubusercontent.com/stedolan/mlsub/b425c8da91f45ea59780756950871b80a18ddfc2/location.ml
ocaml
(start, end) positions of lines, including newline As a special case, report the location of end-of-file as the last character contains a b -> a contains or is equal to b
open Lexing type source = { name : string; contents : string; lines : (int * int) list } type t = Loc of source * int * int module type Locator = sig val pos : Lexing.position * Lexing.position -> t end Split a string by a delimiter . are included in the result , so concatenating the output gives...
b24a9ea183e291abdbb1d61e20e04bf63fc79e960a90f21a1d341d973d15da61
richmit/mjrcalc
tst-probe.lisp
;; -*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; @file tst-probe.lisp @author < > ;; @brief Unit T...
null
https://raw.githubusercontent.com/richmit/mjrcalc/96f66d030034754e7d3421688ff201f4f1db4833/tst-probe.lisp
lisp
-*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*- @file tst-probe.lisp @brief Unit Tests.@EOL @std Common Lisp @see use-probe.lisp Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following con...
@author < > @parblock Copyright ( c ) 1995,2013,2015 , < > All rights reserved . 1 . Redistributions of source code must retain the above copyright notice , this list of conditions , and the following disclaimer . 2 . Redistributions in binary form must reproduce the above copyright notice ,...
af26aac8d86244292a47ba498a73dac3fbdcc573faced6bf486453f60b68e986
privet-kitty/cl-competitive
dopairs.lisp
(defpackage :cp/dopairs (:use :cl) (:export #:dopairs)) (in-package :cp/dopairs) ;; NOTE: not enclosed with (BLOCK NIL) (defmacro dopairs ((var1 var2 list &optional result) &body body) "Iterates BODY for each subset of LIST containing two elements." (let ((suffix (gensym)) (_list (gensym))) `(let (...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/dopairs.lisp
lisp
NOTE: not enclosed with (BLOCK NIL)
(defpackage :cp/dopairs (:use :cl) (:export #:dopairs)) (in-package :cp/dopairs) (defmacro dopairs ((var1 var2 list &optional result) &body body) "Iterates BODY for each subset of LIST containing two elements." (let ((suffix (gensym)) (_list (gensym))) `(let ((,_list ,list)) (loop for ,suffi...
a10dd9725bd07b69f24058f417676907390362462b0ce79f5d9889057dfd7435
nuttycom/aftok
AftokM.hs
# LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE TupleSections # # LANGUAGE TypeApplications # module AftokD.AftokM where import Aftok.Billing ( Billable', ContactChannel (..), Subscription', contactChannel, cu...
null
https://raw.githubusercontent.com/nuttycom/aftok/58feefe675cea908cf10619cc88ca4770152e82e/daemon/AftokD/AftokM.hs
haskell
instance P.AsPaymentError AftokDErr where networkMode = pcfg . P.networkMode signingKey = pcfg . P.signingKey paymentsConfig = pcfg TODO: other channels
# LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE TupleSections # # LANGUAGE TypeApplications # module AftokD.AftokM where import Aftok.Billing ( Billable', ContactChannel (..), Subscription', contactChannel, cu...
383437961932e335a78458a93d7685340b9ef665c009c8e1279bbd980f407322
haskell/hackage-server
HtPasswdDb.hs
-- | Parsing @.htpasswd@ files -- module Distribution.Client.HtPasswdDb ( HtPasswdDb, HtPasswdHash(..), parse, ) where import Distribution.Server.Users.Types (UserName(..)) type HtPasswdDb = [(UserName, Maybe HtPasswdHash)] newtype HtPasswdHash = HtPasswdHash String deriving (Eq, Show) parse :: String -...
null
https://raw.githubusercontent.com/haskell/hackage-server/6c8689a779b688b3e6b927614c90318936d5bb3f/src/Distribution/Client/HtPasswdDb.hs
haskell
| Parsing @.htpasswd@ files entries like "myName:$apr1$r31.....$HqJZimcKQFAMYayBlzkrA/" entries like "myName:rqXexS6ZhobKA"
module Distribution.Client.HtPasswdDb ( HtPasswdDb, HtPasswdHash(..), parse, ) where import Distribution.Server.Users.Types (UserName(..)) type HtPasswdDb = [(UserName, Maybe HtPasswdHash)] newtype HtPasswdHash = HtPasswdHash String deriving (Eq, Show) parse :: String -> Either String HtPasswdDb parse =...
1a2d7863776e83cf9c95046594f91c473c056707dffbde92ce3d3b36a1211662
chaw/r7rs-libs
priority-search-test.sps
;; Original Test Suite from converted to use SRFI 64 tests by (import (scheme base) (pfds priority-search-queue) (only (scheme list) fold filter) (srfi 64) (scheme sort)) (define (alist->psq alist key<? priority<?) (fold (lambda (kv psq) (psq-set psq (car kv) (cdr kv)...
null
https://raw.githubusercontent.com/chaw/r7rs-libs/b8b625c36b040ff3d4b723e4346629a8a0e8d6c2/pfds-tests/priority-search-test.sps
scheme
Original Test Suite from psq-set psq-delete psq-update priority-queue-functions ranged-functions with bounds outwith range in psq, is the same as psq-at-most inclusiveness check if lower bound is higher than upper, then nothing
converted to use SRFI 64 tests by (import (scheme base) (pfds priority-search-queue) (only (scheme list) fold filter) (srfi 64) (scheme sort)) (define (alist->psq alist key<? priority<?) (fold (lambda (kv psq) (psq-set psq (car kv) (cdr kv))) (make-psq key<? p...
39e9bba98f24101158ae7fe8cae6f7b6914598bd655b858180af9f089c326de7
rems-project/lem
batUTF8.ml
(** UTF-8 encoded Unicode strings. The type is normal string. *) Copyright ( C ) 2002 , 2003 . (* This library is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) as published by the Free Software Foundation ; either version 2 of the L...
null
https://raw.githubusercontent.com/rems-project/lem/5243fa8f6752dd247fce9deff97008b814f4bd7c/src/ulib/batUTF8.ml
ocaml
* UTF-8 encoded Unicode strings. The type is normal string. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License may link, statically or dynamically, a "work that uses this library" with a publicly distributed version of this library to...
Copyright ( C ) 2002 , 2003 . as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . As a special exception to the GNU Library General Public License , you additional requirements listed in clause 6 of the GNU Library General we mean...
a237963c2a037448e55aeaeea3b7d80df3c8d2c51a4b9447ed55f564223b6a32
Helium4Haskell/helium
TypeBug7.hs
module TypeBug7 where main (x,y,z) = f(concat(g(special z))) where f (a:as) = a : "|" : f as g [a] = [head a : "\n" : g (tail a)] special :: [[String]] -> [[String]] special = undefined
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeerrors/Examples/TypeBug7.hs
haskell
module TypeBug7 where main (x,y,z) = f(concat(g(special z))) where f (a:as) = a : "|" : f as g [a] = [head a : "\n" : g (tail a)] special :: [[String]] -> [[String]] special = undefined
1deddebb4f4f8897105ae9704a0660c5c836a3acaff02a9d445989e9b24b7742
avsm/eeww
pprintast.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/avsm/eeww/4834abb9a40a9f35d0d7041a61e53e3426d8886f/boot/ocaml/parsing/pprintast.ml
ocaml
************************************************************************ OCaml Fabrice L...
, OCamlPro , University of Pennsylvania Copyright 2007 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the Original Code from Ber - metaocaml , modified...
fd08f03d5a6d8a09eb4a80df0a72f8fb6332a424583ac48bd52d5c359e9b955a
Leonidas-from-XIV/orewa
resp.ml
open Core open Async type redis_error = string [@@deriving show, eq] let crlf = "\r\n" type t = | String of string | Error of redis_error | Integer of int | Bulk of string | Array of t list | Null [@@deriving show, eq] let terminator = function | true -> crlf | false -> "" let rec encode = function...
null
https://raw.githubusercontent.com/Leonidas-from-XIV/orewa/d0ed6de3581ae11d02b91cdc238216c633859960/src/resp.ml
ocaml
open Core open Async type redis_error = string [@@deriving show, eq] let crlf = "\r\n" type t = | String of string | Error of redis_error | Integer of int | Bulk of string | Array of t list | Null [@@deriving show, eq] let terminator = function | true -> crlf | false -> "" let rec encode = function...
c2196dfac7a66d99bd1ed3dd1a4d8880d047ca6bd03629c54ba78890d2461737
lasp-lang/partisan
partisan_acceptor_pool.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2016 . All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the ...
null
https://raw.githubusercontent.com/lasp-lang/partisan/fd048fc1b34309d9fa41450434a7e7b3b2fa1fb8/src/partisan_acceptor_pool.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 ) 2016 . All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(partisan_acceptor_poo...
15af790d3b51c25524013c1523976048f1d52aa0050c4dc9cb229af5a1b1e89e
flyspeck/flyspeck
pair.ml
(* ========================================================================= *) (* Syntax sugaring; theory of pairing, with a bit of support. *) (* *) , University of Cambridge Computer Laboratory (* ...
null
https://raw.githubusercontent.com/flyspeck/flyspeck/05bd66666b4b641f49e5131a37830f4881f39db9/azure/hol-light-nat/pair.ml
ocaml
========================================================================= Syntax sugaring; theory of pairing, with a bit of support. ===============...
, University of Cambridge Computer Laboratory ( c ) Copyright , University of Cambridge 1998 ( c ) Copyright , 1998 - 2007 open Parser include Impconv let LET_DEF = new_definition `LET (f:A->B) x = f x`;; let LET_END_DEF =...
00acd8a5a6690289170bc5fe31c0bdf2f4ad901c07cae95081cfead8d4819ad6
nobsun/hs-bcopl
Semantics.hs
{-# LANGUAGE GADTs #-} # LANGUAGE TypeFamilies # # LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE TypeOperators # # LANGUAGE FlexibleInstances # # LANGUAGE EmptyCase # module Language.BCoPL.TypeLevel.MetaTheory.Semantics where import Language.BCoPL.TypeLevel.Peano import Language.BCoPL.TypeLevel.Exp impor...
null
https://raw.githubusercontent.com/nobsun/hs-bcopl/d8ede46ad0f458312efffff9065bd58eb8a3e9e4/src/Language/BCoPL/TypeLevel/MetaTheory/Semantics.hs
haskell
# LANGUAGE GADTs #
# LANGUAGE TypeFamilies # # LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE TypeOperators # # LANGUAGE FlexibleInstances # # LANGUAGE EmptyCase # module Language.BCoPL.TypeLevel.MetaTheory.Semantics where import Language.BCoPL.TypeLevel.Peano import Language.BCoPL.TypeLevel.Exp import Language.BCoPL.TypeLe...
0038346d2574a80baa86636515849b160ce41ee94b9b927ab105861a75d359d1
rtoy/cmucl
vop.lisp
;;; -*- Package: C; Log: C.Log -*- ;;; ;;; ********************************************************************** This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . ;;; (ext:file-comment "$Header: src/compiler/vop.lisp $") ;;; ;;...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/compiler/vop.lisp
lisp
-*- Package: C; Log: C.Log -*- ********************************************************************** ********************************************************************** in the compiler, IR2. The largest number of TNs whose liveness changes that we can have in any block. The different policies we can u...
This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . (ext:file-comment "$Header: src/compiler/vop.lisp $") Structures for the second ( virtual machine ) intermediate representation Written by (in-package "C") (intl:textdom...
b800558a740f6c9943f43e7293164b6065cc399716a668e12a0f68691e47dbe4
dylex/haskell-nfs
String.hs
# LANGUAGE GeneralizedNewtypeDeriving # module Network.NFS.V4.String ( StrCS(..) , StrCIS(..) , StrMixed(..) ) where import qualified Data.ByteString.Char8 as BSC import qualified Data.CaseInsensitive as CI import Data.Monoid ((<>)) import Data.String (IsString(..)) import qualified Data.Te...
null
https://raw.githubusercontent.com/dylex/haskell-nfs/07d213e09f7bf9e6fe3200aca3de494c3dcd54f7/nfs/Network/NFS/V4/String.hs
haskell
|For 'NFS.Utf8str_cs'. |For 'NFS.Utf8str_cis'.
# LANGUAGE GeneralizedNewtypeDeriving # module Network.NFS.V4.String ( StrCS(..) , StrCIS(..) , StrMixed(..) ) where import qualified Data.ByteString.Char8 as BSC import qualified Data.CaseInsensitive as CI import Data.Monoid ((<>)) import Data.String (IsString(..)) import qualified Data.Te...
0111f5cb2c505bdfbedf87486ced3b6456380bb21c00c79251aab9747f6ef3e8
karamellpelle/grid
GL3D.hs
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGLHelper.OpenGL3D -- -- helper functions for 3D -- -------------------------------------------------------------------------------- module OpenGL.Helpers.GL3D ( lookAt9, vertex3, ...
null
https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/designer/source/OpenGL/Helpers/GL3D.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.Rendering.OpenGLHelper.OpenGL3D helper functions for 3D ------------------------------------------------------------------------------ | look at point p from point e, with upward direction u todo: we should...
module OpenGL.Helpers.GL3D ( lookAt9, vertex3, normal3, translate3, rotate3D, scale3, ) where import OpenGL as GL import Control.Monad.Trans lookAt9 :: MonadIO m => Double -> Double -> Double -> Double -> Double -> Double -> Double -> Dou...
597ba2ed8f2d91eb493bb392ad7889d001c3d0ea34465ef2a21d92acdf4d9e57
ujihisa/cloft
cloft.clj
(ns cloft.cloft (:require [clojure.string :as s]) (:require [clojure.set]) (:require [cloft.material :as m]) (:import [org.bukkit.util Vector]) (:import [org.bukkit Bukkit Material Location]) (:import [org.bukkit.entity Animals Arrow Blaze Boat CaveSpider Chicken ComplexEntityPart ComplexLivingE...
null
https://raw.githubusercontent.com/ujihisa/cloft/98284fa763d16280d4685478b2be2ab0efbb00b0/src/cloft/cloft.clj
clojure
(instance? ComplexLivingEntity entity) "ComplexLivingEntity" (instance? Creature entity) "Creature" (instance? Flying entity) "Flying" (instance? HumanEntity entity) "HumanEntity" (instance? Monster entity) "Monster"
(ns cloft.cloft (:require [clojure.string :as s]) (:require [clojure.set]) (:require [cloft.material :as m]) (:import [org.bukkit.util Vector]) (:import [org.bukkit Bukkit Material Location]) (:import [org.bukkit.entity Animals Arrow Blaze Boat CaveSpider Chicken ComplexEntityPart ComplexLivingE...
e22510109cc434eac5ccfd7685150fa93a09379800f6cfd15750bc40aaf879b6
cedlemo/OCaml-GI-ctypes-bindings-generator
HSVPrivate.ml
open Ctypes open Foreign type t let t_typ : t structure typ = structure "HSVPrivate"
null
https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/HSVPrivate.ml
ocaml
open Ctypes open Foreign type t let t_typ : t structure typ = structure "HSVPrivate"
1805aa8b9302bc5b43c2bd0606365391d465080f6178ccfdba2d9209295a66a8
hedgehogqa/haskell-hedgehog
Hedgehog.hs
-- | -- This module includes almost everything you need to get started writing property tests with Hedgehog . -- -- It is designed to be used alongside "Hedgehog.Gen" and "Hedgehog.Range", which should be imported qualified . You also need to enable Template Haskell so the Hedgehog test runner can find your prope...
null
https://raw.githubusercontent.com/hedgehogqa/haskell-hedgehog/f670bdf146368bb5574c256889aa25779cc0a9f8/hedgehog/src/Hedgehog.hs
haskell
| This module includes almost everything you need to get started writing It is designed to be used alongside "Hedgehog.Gen" and "Hedgehog.Range", > {-# LANGUAGE TemplateHaskell #-} > > import Hedgehog > import qualified Hedgehog.Gen as Gen Once you have your imports set up, you can write a simple p...
property tests with Hedgehog . which should be imported qualified . You also need to enable Template Haskell so the Hedgehog test runner can find your properties . > import qualified Hedgehog . Range as Range > checkParallel $ Group " Test . Example " [ > . Example > ✓ prop_reverse passed 100...