_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
3b3707ea4d236a1ddc4a9da0b33d54f3d4794d45ff4cffccee749792f5066b03
project-fifo/vmwebadm
core.cljs
(ns client.core (:use-macros [clojure.core.match.js :only [match]]) (:require [cljs.reader :as reader] [clojure.string :as c.s] [cljs.nodejs :as node])) (def dbfile "/var/db/vmwebadm/db.clj") (def fs (node/require "fs")) (def crypto (node/require "crypto")) (def util (node/require "util")) (def cp (n...
null
https://raw.githubusercontent.com/project-fifo/vmwebadm/55d83bbc0ac6db8ea1d784c73d91bf4f228fa04a/src/client/core.cljs
clojure
(ns client.core (:use-macros [clojure.core.match.js :only [match]]) (:require [cljs.reader :as reader] [clojure.string :as c.s] [cljs.nodejs :as node])) (def dbfile "/var/db/vmwebadm/db.clj") (def fs (node/require "fs")) (def crypto (node/require "crypto")) (def util (node/require "util")) (def cp (n...
c5fcba6a002f67088f0599390fb3566fa474ab527b116b7850ed75c92992457a
JeffreyBenjaminBrown/hode
Graph.hs
module Graph where import Data.Map (Map) import qualified Data.Map as M import Data.Set (Set) import qualified Data.Set as S type Graph = Map Int (Set Int) children :: Graph -> Int -> Set Int children g i = maybe S.empty id $ M.lookup i g parents :: Graph -> Int -> Set Int parents g i = M.keys...
null
https://raw.githubusercontent.com/JeffreyBenjaminBrown/hode/79a54a6796fa01570cde6903b398675c42954e62/earlier-work/unify-subst/src/Graph.hs
haskell
module Graph where import Data.Map (Map) import qualified Data.Map as M import Data.Set (Set) import qualified Data.Set as S type Graph = Map Int (Set Int) children :: Graph -> Int -> Set Int children g i = maybe S.empty id $ M.lookup i g parents :: Graph -> Int -> Set Int parents g i = M.keys...
59091b08254f11edc9bbf2b1afb58523d6546df8401299420a591cfeeffc7673
fetburner/Coq2SML
cemitcodes.mli
open Names open Cbytecodes type reloc_info = | Reloc_annot of annot_switch | Reloc_const of structured_constant | Reloc_getglobal of constant type patch = reloc_info * int (* A virer *) val subst_patch : Mod_subst.substitution -> patch -> patch type emitcodes val copy : emitcodes -> emitcodes val length : e...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/kernel/cemitcodes.mli
ocaml
A virer * init code, fun code, fv
open Names open Cbytecodes type reloc_info = | Reloc_annot of annot_switch | Reloc_const of structured_constant | Reloc_getglobal of constant type patch = reloc_info * int val subst_patch : Mod_subst.substitution -> patch -> patch type emitcodes val copy : emitcodes -> emitcodes val length : emitcodes -> in...
fa4621af2db86d88226e96ea32a742ad649e7cd8a3f1d24d8c601b2380e3cb53
mfoemmel/erlang-otp
snmpm_user_old.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public Lic...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/snmp/src/manager/snmpm_user_old.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(snmpm_user_old). -export([behaviour_info...
e5cabbf40b7d8a993e661ae4a6b2c15bf1f01cd7d29c10fe4ca4880307721671
haskell-webgear/webgear
OpenApi.hs
| Main module for WebGear OpenAPI support . Import this module to get all required types and functions for generating OpenAPI documentation . Alternatively , import individual modules under @WebGear . OpenApi@. Typical usage to generate OpenAPI : @ import WebGear . OpenApi import Data . OpenApi...
null
https://raw.githubusercontent.com/haskell-webgear/webgear/60e5547f9450aac36727e8d9980e0a8cbdb69660/webgear-openapi/src/WebGear/OpenApi.hs
haskell
| Main module for WebGear OpenAPI support . Import this module to get all required types and functions for generating OpenAPI documentation . Alternatively , import individual modules under @WebGear . OpenApi@. Typical usage to generate OpenAPI : @ import WebGear . OpenApi import Data . OpenApi...
1bfe52d87eed17eb4f14bdff227040e117a5081ca776f4ffbf1bc467a88e5528
pixlsus/registry.gimp.org_static
octave-sharpening.scm
;octave-sharpening.scm ; by ; ; found at -127-octave-sharpening/ ; more information at ; ; Version 1.0 (20091209) ; ; License: ; ; 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 ; e...
null
https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/octave-sharpening.scm
scheme
octave-sharpening.scm found at -127-octave-sharpening/ more information at Version 1.0 (20091209) License: 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 tha...
by it under the terms of the GNU General Public License as published by The GNU Public License is available at (define (script-fu-octave-sharpening img drw) (let* ( (layer1 0) (layer2 0) (layer3 0) (layer4 0) (layer_os 0) ) (gimp-context-push) (gimp-image-undo-group-start img)...
9c48b047fe9c6f755cbc270db9caddea5227bcc946a947bb05af96ccdd2c63b7
PolyB/kvm
Args.hs
# LANGUAGE ViewPatterns # module Args (parseArgs, OptionMonad) where import System.Linux.Kvm.Components.Init import System.Linux.Kvm.Components.Ram import Data.List import Options.Applicative type OptionMonad = ConfigRamT (InitT IO) data Options = Options { file :: String , initrd :: (Maybe String) , ram...
null
https://raw.githubusercontent.com/PolyB/kvm/a0431d6558906ec90376864ac665a27978a6a671/app/Args.hs
haskell
# LANGUAGE ViewPatterns # module Args (parseArgs, OptionMonad) where import System.Linux.Kvm.Components.Init import System.Linux.Kvm.Components.Ram import Data.List import Options.Applicative type OptionMonad = ConfigRamT (InitT IO) data Options = Options { file :: String , initrd :: (Maybe String) , ram...
84d95747222932ba34761438930656d4bd15a0d9dd9b045e1b4657d399a4e8fd
Stratus3D/programming_erlang_exercises
web_profiler.erl
-module(web_profiler). -export([ping/2, receive_response/2]). ping(URL, Timeout) -> {_Protocol, Host, Port, Path} = parse_url(URL), {ok, Socket} = gen_tcp:connect(Host, Port, [binary, {packet, 0}, {active, false}]), % Send the request ok = gen_tcp:send(Socket, io_lib:format("HEAD ~s HTTP/1.0\r\n\r\n",...
null
https://raw.githubusercontent.com/Stratus3D/programming_erlang_exercises/e4fd01024812059d338facc20f551e7dff4dac7e/chapter_26/exercise_1/web_profiler.erl
erlang
Send the request Format the return value of the function And receive the response We ignore the query string for simplicity here
-module(web_profiler). -export([ping/2, receive_response/2]). ping(URL, Timeout) -> {_Protocol, Host, Port, Path} = parse_url(URL), {ok, Socket} = gen_tcp:connect(Host, Port, [binary, {packet, 0}, {active, false}]), ok = gen_tcp:send(Socket, io_lib:format("HEAD ~s HTTP/1.0\r\n\r\n", [Path])), Time the r...
b3889dc35cd85ee4ebad312427b6edd7ae35a511ee2dbb02b9ba67329f77b886
nasa/Common-Metadata-Repository
tag_association_test.clj
(ns cmr.system-int-test.search.tagging.tag-association-test "This tests associating tags with collections." (:require [clojure.test :refer :all] [cmr.common.util :refer [are2] :as util] [cmr.mock-echo.client.echo-util :as echo-util] [cmr.system-int-test.data2.collection :as collection] [cmr.system-in...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/78e9ab2403d35fc1b8480c00463695b79f0ff7e0/system-int-test/test/cmr/system_int_test/search/tagging/tag_association_test.clj
clojure
{:entry-id "S1_V1", :entry_title "ET1", :short-name "S1", :version-id "V1"} {:entry-id "S1_V1", :entry_title "ET1", :short-name "S1", :version-id "V1"} {:entry-id "S1_V1", :entry_title "ET1", :short-name "S1", :version-id "V1"} Associate the tag with every collection dissociate tag again is OK. Since there is no e...
(ns cmr.system-int-test.search.tagging.tag-association-test "This tests associating tags with collections." (:require [clojure.test :refer :all] [cmr.common.util :refer [are2] :as util] [cmr.mock-echo.client.echo-util :as echo-util] [cmr.system-int-test.data2.collection :as collection] [cmr.system-in...
da03cd9d1ed3ab0532b45cc477fe3947e56835b912a88d92b85f61b8058277d9
gator1/jepsen
core_test.clj
(ns block.core-test (:require [clojure.test :refer :all] [block.core :refer :all] [jepsen.core :as jepsen] [jepsen.generator :as gen] [jepsen.checker :as checker] [jepsen.tests :as tests] [jepsen.nemesis :as nemesis] [knossos.model :r...
null
https://raw.githubusercontent.com/gator1/jepsen/1932cbd72cbc1f6c2a27abe0fe347ea989f0cfbb/block/test/block/core_test.clj
clojure
:checker checker/linearizable) block consistency testing
(ns block.core-test (:require [clojure.test :refer :all] [block.core :refer :all] [jepsen.core :as jepsen] [jepsen.generator :as gen] [jepsen.checker :as checker] [jepsen.tests :as tests] [jepsen.nemesis :as nemesis] [knossos.model :r...
9550c78f5a67dafe9098f98f4eb7190d64e60fa344e5a7870e983ada6b6c5c1e
mitchellwrosen/planet-mitchell
Lens.hs
module Optic.Lens ( -- * Lens Lens , Lens' , lens -- * At , At(..) , sans , Index , IxValue -- * Contains , Contains(..) ) where import Control.Lens.At (At(at), Contains(contains), Index, IxValue, sans) import Control.Lens.Lens ...
null
https://raw.githubusercontent.com/mitchellwrosen/planet-mitchell/18dd83204e70fffcd23fe12dd3a80f70b7fa409b/planet-mitchell/src/Optic/Lens.hs
haskell
* Lens * At * Contains
module Optic.Lens Lens , Lens' , lens , At(..) , sans , Index , IxValue , Contains(..) ) where import Control.Lens.At (At(at), Contains(contains), Index, IxValue, sans) import Control.Lens.Lens (Lens, Lens', lens)
8916f89dd8a24815458091f7d56a80b56045a7a7ffd7b129f07f51d751ced68b
helvm/helma
Main.hs
module Main where import qualified Spec import Test.Hspec (hspec) import Test.Hspec.Slow main :: IO () main = (hspec . flip timeThese Spec.spec) =<< configure 4
null
https://raw.githubusercontent.com/helvm/helma/a32648cf77dbcf3f5fd3c1bd365b9bc55fbab125/hs/test/Main.hs
haskell
module Main where import qualified Spec import Test.Hspec (hspec) import Test.Hspec.Slow main :: IO () main = (hspec . flip timeThese Spec.spec) =<< configure 4
6e471ba46ef5ee1f992f3edc2c9c9f8f0aebccae03434cf2d742b931d599da98
EMSL-NMR-EPR/Haskell-MFAPipe-Executable
Lens.hs
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # ----------------------------------------------------------------------------- -- | -- Module : Data.Graph.Inductive.Graph.Lens Copyright : 2016 - 17 Pacific Northwest National Laborato...
null
https://raw.githubusercontent.com/EMSL-NMR-EPR/Haskell-MFAPipe-Executable/8a7fd13202d3b6b7380af52d86e851e995a9b53e/fgl-lens/src/Data/Graph/Inductive/Graph/Lens.hs
haskell
--------------------------------------------------------------------------- | Module : Data.Graph.Inductive.Graph.Lens License : ECL-2.0 (see the LICENSE file in the distribution) Maintainer : Stability : experimental Portability : portable Lenses for labeled, inductive graphs. --------------...
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # Copyright : 2016 - 17 Pacific Northwest National Laboratory module Data.Graph.Inductive.Graph.Lens AsEdge(..) , _Graph , mconcatEdgeLabels ) where import Control.Applicative (l...
2d1d48d3a576a30de59e4bc5304a5e47156487188c463dca0c7a1a1b77bec627
NetComposer/nksip
nksip_parse_via.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2019 . 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/NetComposer/nksip/7fbcc66806635dc8ecc5d11c30322e4d1df36f0a/src/nksip_parse_via.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 ) 2019 . 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 @doc SIP Via Parser @pri...
dae3103b60ff2ab43e81f4ae07b13d382f0b0f908332af5ba6391d908fcc459c
snoyberg/conduit
TextSpec.hs
# LANGUAGE FlexibleContexts , OverloadedStrings # module Data.Conduit.TextSpec (spec) where import Data.Conduit ((.|), runConduit, runConduitPure) import Control.Exception (SomeException) import qualified Data.Conduit.Text as CT import qualified Data.Conduit as C import Data.Conduit.Lift (runCatchC, catchCatchC) impor...
null
https://raw.githubusercontent.com/snoyberg/conduit/1771780ff4b606296924a28bf5d4433ae6a916f3/conduit-extra/test/Data/Conduit/TextSpec.hs
haskell
Check whether raw bytes are decoded correctly, in particular that Text decoding produces an error if
# LANGUAGE FlexibleContexts , OverloadedStrings # module Data.Conduit.TextSpec (spec) where import Data.Conduit ((.|), runConduit, runConduitPure) import Control.Exception (SomeException) import qualified Data.Conduit.Text as CT import qualified Data.Conduit as C import Data.Conduit.Lift (runCatchC, catchCatchC) impor...
80a29b1306a438f3e3dd9ca64366fc0ce01174e1818b8d1f742d8bb62bd8e903
marick/Midje
t_zip.clj
(ns midje.parsing.util.t-zip (:require [midje.parsing.util.zip :refer :all] [midje.sweet :refer :all] [midje.test-util :refer :all] [clojure.zip :as zip])) (defn node [expected] (fn [actual] (= expected (zip/node actual)))) (fact "can position loc at rightmost leaf" (let [z (zi...
null
https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/test/midje/parsing/util/t_zip.clj
clojure
(ns midje.parsing.util.t-zip (:require [midje.parsing.util.zip :refer :all] [midje.sweet :refer :all] [midje.test-util :refer :all] [clojure.zip :as zip])) (defn node [expected] (fn [actual] (= expected (zip/node actual)))) (fact "can position loc at rightmost leaf" (let [z (zi...
a84cc3f8ec91ebb1e170a6c68815e401006d99fe1d23833c8f9791768e1a4076
jwiegley/notes
MonoTraversable.hs
class (MonoFunctor c, MonoFunctor d) => MonoTransform c d where mtransform :: c -> d instance (MonoFunctor c, MonoFoldable c, MonoFunctor d, FromList d, Convertible (Element c) (Element d)) => MonoTransform c d where mtransform xs = fromList (foldr (\x -> (convert x :)) [] xs) insta...
null
https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/6493463/MonoTraversable.hs
haskell
class (MonoFunctor c, MonoFunctor d) => MonoTransform c d where mtransform :: c -> d instance (MonoFunctor c, MonoFoldable c, MonoFunctor d, FromList d, Convertible (Element c) (Element d)) => MonoTransform c d where mtransform xs = fromList (foldr (\x -> (convert x :)) [] xs) insta...
706aea4da83e8e74288d28f980b117de15925c9de656f2d53495adbc5a275aad
bmeurer/ocaml-arm
typemod.mli
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/typing/typemod.mli
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ Id$ open Types open Format val t...
dce8779e5d25208f8fa420dbbfa75f77879f54f943833f0b4a4ce069363ac966
juxt/edge
main.cljs
(ns ^:figwheel-hooks {{root-ns}}.frontend.main) (js/console.log "Hello, world") ;; This is called once (defonce init (do (set! (.-innerHTML (js/document.getElementById "app")) "<p>Loaded {{name}}!</p> <p>Edit <strong><code>src/{{sanitized}}/frontend/main.cljs</code></strong> to change this m...
null
https://raw.githubusercontent.com/juxt/edge/dfda42e035714279642b359a8610f57154efd002/lib/edge-app-template/resources/clj/new/app.template/main.cljs
clojure
This is called once This is called every time you make a code change
(ns ^:figwheel-hooks {{root-ns}}.frontend.main) (js/console.log "Hello, world") (defonce init (do (set! (.-innerHTML (js/document.getElementById "app")) "<p>Loaded {{name}}!</p> <p>Edit <strong><code>src/{{sanitized}}/frontend/main.cljs</code></strong> to change this message.</p>") tru...
943c8cf4aa21beb2e97b94d5bec89407c90b910a8f8b3f47dcaeee72972ba3f0
ivan-m/Graphalyze
Directed.hs
| Module : Data . Graph . Analysis . Algorithms . Directed Description : Algorithms for directed graphs . Copyright : ( c ) 2009 License : 2 - Clause BSD Maintainer : Defines algorithms that work on directed graphs . Module : Data.Graph.Analysis.Algorithms...
null
https://raw.githubusercontent.com/ivan-m/Graphalyze/812f76bb45a77252ed74a8d028bffbae38b240f6/Data/Graph/Analysis/Algorithms/Directed.hs
haskell
* Ending nodes $ends ** Root nodes ** Leaf nodes * Subgraphs * Clustering * Node accessibility * Other ----------------------------------------------------------------------------- $ends Find starting/ending nodes. We define an ending node as one where, given a function: @ f :: (Graph g) => g ...
| Module : Data . Graph . Analysis . Algorithms . Directed Description : Algorithms for directed graphs . Copyright : ( c ) 2009 License : 2 - Clause BSD Maintainer : Defines algorithms that work on directed graphs . Module : Data.Graph.Analysis.Algorithms...
35bddb5f73c9bcc8582dc6e51f9226c8135545ec8bf06258503afc4eca7fdf42
zack-bitcoin/verkle
ff.erl
-module(ff). -export([sub/3, add/3, mul/3, divide/3, pow/3, add_all/2, mod/2, inverse/2, batch_inverse/2, neg/2]). mod(X,Y)->(X rem Y + Y) rem Y. symetric_view([], _) -> []; symetric_view([H|T], Y) -> [symetric_view(H, Y)| symetric_view(T, Y)]; symetric_view(X, Y) -> Y2 = Y div...
null
https://raw.githubusercontent.com/zack-bitcoin/verkle/46bf69f17170a71829f9243faea06ee42f224687/src/crypto/ff.erl
erlang
-module(ff). -export([sub/3, add/3, mul/3, divide/3, pow/3, add_all/2, mod/2, inverse/2, batch_inverse/2, neg/2]). mod(X,Y)->(X rem Y + Y) rem Y. symetric_view([], _) -> []; symetric_view([H|T], Y) -> [symetric_view(H, Y)| symetric_view(T, Y)]; symetric_view(X, Y) -> Y2 = Y div...
4cc881a6d58111560c51551020d1f85584116f1350ecd4aec447498a50b0b8df
7bridges-eu/clj-odbp
buffer.clj
Copyright 2017 7bridges s.r.l . ;; 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 u...
null
https://raw.githubusercontent.com/7bridges-eu/clj-odbp/5a92515c2e4c6198bd1093ace83da96e30b90829/src/clj_odbp/binary/deserialize/buffer.clj
clojure
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 permiss...
Copyright 2017 7bridges s.r.l . distributed under the License is distributed on an " AS IS " BASIS , (ns clj-odbp.binary.deserialize.buffer (:require [clj-odbp.utils :refer [take-upto]])) (defn to-buffer "Transform a sequence into a rewindable buffer." [data] (atom {:position 0 :data data ...
f62c813e02db955e63e6018635802f7b17e36d3b57522ff4f14d841306add7c6
ghc/testsuite
TcNullaryTC.hs
# LANGUAGE NullaryTypeClasses # module Main where class R where f :: Int -> Int g :: a -> a instance R where f = (+1) g = id main = print (g (f 0))
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_run/TcNullaryTC.hs
haskell
# LANGUAGE NullaryTypeClasses # module Main where class R where f :: Int -> Int g :: a -> a instance R where f = (+1) g = id main = print (g (f 0))
0b8987512ac65d106b9fd91489786529541d5eeee25cfcc24567bf4ffa15c773
melisgl/mgl
test-gaussian-process.lisp
(in-package :mgl-test) (defun test-gp-simple () (flet ((v (&rest args) (array-to-mat (apply #'vector (mapcar (lambda (x) (flt x)) args)) :ctype flt-ctype))) (let* ((prior (make-instance 'prior-gp :mean-fn (c...
null
https://raw.githubusercontent.com/melisgl/mgl/27a2552632a6a9330c1a133e519e676d9c6ca714/test/test-gaussian-process.lisp
lisp
(in-package :mgl-test) (defun test-gp-simple () (flet ((v (&rest args) (array-to-mat (apply #'vector (mapcar (lambda (x) (flt x)) args)) :ctype flt-ctype))) (let* ((prior (make-instance 'prior-gp :mean-fn (c...
a9af7a2393412f52e006b868123685ca191c9d3b7fdc179b4a4963542f6ada3f
ocaml/ocaml-re
re_emacs.ml
[@@@deprecated "Use Re.Emacs"] include Re.Emacs
null
https://raw.githubusercontent.com/ocaml/ocaml-re/09c2745a2d8d1517b3d597396e82e122903b0017/deprecated/re_emacs.ml
ocaml
[@@@deprecated "Use Re.Emacs"] include Re.Emacs
03633716dca863e15da4a350f03f1673fe3cf4f0d24b756a4c56229c4a1c667a
haskell-cryptography/libsodium-bindings
XChaCha20.hs
# LANGUAGE CApiFFI # # LANGUAGE Trustworthy # -- | Module : LibSodium . Bindings . XChaCha20 -- Description: Direct bindings to XChaCha20 primitives Copyright : ( C ) 2022 -- License: BSD-3-Clause -- Maintainer: -- Stability: Stable Portability : GHC only -- -- Direct bindings to XChaCha20 primitives. module ...
null
https://raw.githubusercontent.com/haskell-cryptography/libsodium-bindings/127113199e7b3f91305cc34b169b06a2622d65da/libsodium-bindings/src/LibSodium/Bindings/XChaCha20.hs
haskell
| Description: Direct bindings to XChaCha20 primitives License: BSD-3-Clause Maintainer: Stability: Stable Direct bindings to XChaCha20 primitives. * Constants * Functions | Generate and store a given number of pseudorandom bytes, using a nonce and a secret key. The amount of data read from the nonce locati...
# LANGUAGE CApiFFI # # LANGUAGE Trustworthy # Module : LibSodium . Bindings . XChaCha20 Copyright : ( C ) 2022 Portability : GHC only module LibSodium.Bindings.XChaCha20 cryptoStreamXChaCha20KeyBytes , cryptoStreamXChaCha20NonceBytes , cryptoStreamXChaCha20 , cryptoStreamXChaCha20Xor , cryptoStrea...
21529bf5ba6390f98c83bb0a907f09a724c923b1ecae90db2c1d14b3d8c0a6fd
kupl/LearnML
patch.ml
type formula = | True | False | Not of formula | AndAlso of (formula * formula) | OrElse of (formula * formula) | Imply of (formula * formula) | Equal of (exp * exp) and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp) let rec eval (f : formula) : bool = match f with | True -> true | ...
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/formula/sub32/patch.ml
ocaml
type formula = | True | False | Not of formula | AndAlso of (formula * formula) | OrElse of (formula * formula) | Imply of (formula * formula) | Equal of (exp * exp) and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp) let rec eval (f : formula) : bool = match f with | True -> true | ...
93f7a86bca9ac1834e5d86a8f6640b29ffbd26a59e5732972b042d86af8022fa
mt-caret/io_uring
echo_tcp.ml
open Core (* a port of -echo-server/blob/master/io_uring_echo_server.c *) module User_data = struct type t = | Accept | Recv of Unix.File_descr.t * (Bigstring.t[@sexp.opaque]) | Send of Unix.File_descr.t * (Bigstring.t[@sexp.opaque]) * int * int [@@deriving sexp_of] let prepare t ~io_uring ~sockfd ...
null
https://raw.githubusercontent.com/mt-caret/io_uring/78012a69a55faf81ab2fbb710c6d5ae71f6b44f0/example/echo_tcp.ml
ocaml
a port of -echo-server/blob/master/io_uring_echo_server.c TODO: fix handling?
open Core module User_data = struct type t = | Accept | Recv of Unix.File_descr.t * (Bigstring.t[@sexp.opaque]) | Send of Unix.File_descr.t * (Bigstring.t[@sexp.opaque]) * int * int [@@deriving sexp_of] let prepare t ~io_uring ~sockfd ~queued_sockaddr_ref = match t with | Accept -> le...
f2b22bb1d7a07cbdccb1f9b299b237ebe8769d3b8235317f0ad2cff1622e6a6a
emqx/emqx-lwm2m
emqx_tlv_SUITE.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. 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 L...
null
https://raw.githubusercontent.com/emqx/emqx-lwm2m/6b02495beebe3b3596c75f730f4e64f3e92dd3a2/test/emqx_tlv_SUITE.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 ...
Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. 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(emqx_tlv_SUITE). -compile(export_all). -compile(nowarn_export_all). -define(LOGT(Format, Args...
66c1f0c2a57d076930628f5012dfe3447f336dd5893cc95cef2968b5ea8b0763
spurious/snd-mirror
nrev.scm
NREV ( the most popular Samson box reverb ) (provide 'snd-nrev.scm) (if (provided? 'snd) (require snd-ws.scm) (require sndlib-ws.scm)) (definstrument (nrev (reverb-factor 1.09) (lp-coeff 0.7) (volume 1.0)) ;; reverb-factor controls the length of the decay -- it should not exceed (/ 1.0 .823) ;; lp-coe...
null
https://raw.githubusercontent.com/spurious/snd-mirror/8e7a643c840592797c29384ffe07c87ba5c0a3eb/nrev.scm
scheme
reverb-factor controls the length of the decay -- it should not exceed (/ 1.0 .823) lp-coeff controls the strength of the low pass filter inserted in the feedback loop output-scale can be used to boost the reverb output
NREV ( the most popular Samson box reverb ) (provide 'snd-nrev.scm) (if (provided? 'snd) (require snd-ws.scm) (require sndlib-ws.scm)) (definstrument (nrev (reverb-factor 1.09) (lp-coeff 0.7) (volume 1.0)) (let ((dly-len (if (= (floor *clm-srate*) 44100) #i(2467 2753 3217 3533 3877 4127 599 197 ...
81738e6bca3dd6025b441e85a5b453074213d16715f76bef4c7c95fabeb5934a
ghc/nofib
Infer.hs
module Infer (inferTerm) where import Data.List(nub) import MyList (minus) import Type (TVarId, TConId, MonoType (..), PolyType (All), arrow, freeTVarMono) import Term (VarId, Term (Var, Abs, App, Let)) import Substitution ...
null
https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/real/infer/Infer.hs
haskell
module Infer (inferTerm) where import Data.List(nub) import MyList (minus) import Type (TVarId, TConId, MonoType (..), PolyType (All), arrow, freeTVarMono) import Term (VarId, Term (Var, Abs, App, Let)) import Substitution ...
cb80d64ac3ba72b0d58efebb0be4d295f9ab30cfb37f7071d6b7897c7f2b281c
otherjoel/tabloid
test-program.rkt
#lang tabloid YOU WON'T WANT TO MISS 'Hello, World!' DISCOVER HOW TO factorial WITH n RUMOR HAS IT WHAT IF n IS ACTUALLY 0 SHOCKING DEVELOPMENT 1 LIES! SHOCKING DEVELOPMENT n TIMES factorial OF n MINUS 1 END OF STORY EXPERTS CLAIM result TO BE factorial OF 10 YOU WON'T WANT TO MIS...
null
https://raw.githubusercontent.com/otherjoel/tabloid/6ae438880b050686bc1e437f95f7635026016939/test-program.rkt
racket
#lang tabloid YOU WON'T WANT TO MISS 'Hello, World!' DISCOVER HOW TO factorial WITH n RUMOR HAS IT WHAT IF n IS ACTUALLY 0 SHOCKING DEVELOPMENT 1 LIES! SHOCKING DEVELOPMENT n TIMES factorial OF n MINUS 1 END OF STORY EXPERTS CLAIM result TO BE factorial OF 10 YOU WON'T WANT TO MIS...
f8ffa1faa83aa524d17a552e7c11cafb529a7d77288a7ee5bd7dcc6bede3c7b0
mirage/ocaml-dns
dns_server_mirage.ml
( c ) 2018 , all rights reserved open Lwt.Infix let src = Logs.Src.create "dns_server_mirage" ~doc:"effectful DNS server" module Log = (val Logs.src_log src : Logs.LOG) module Make (P : Mirage_clock.PCLOCK) (M : Mirage_clock.MCLOCK) (TIME : Mirage_time.S) (S : Tcpip.Stack.V4V6) = struct let inc = let f = ...
null
https://raw.githubusercontent.com/mirage/ocaml-dns/e8703c5e7d679b5242b064c009bd0f195422883d/mirage/server/dns_server_mirage.ml
ocaml
( c ) 2018 , all rights reserved open Lwt.Infix let src = Logs.Src.create "dns_server_mirage" ~doc:"effectful DNS server" module Log = (val Logs.src_log src : Logs.LOG) module Make (P : Mirage_clock.PCLOCK) (M : Mirage_clock.MCLOCK) (TIME : Mirage_time.S) (S : Tcpip.Stack.V4V6) = struct let inc = let f = ...
96df0e02035382819ef7375a489ed443dad2d4f85c94453ed91ff1723ef97ac9
monadicsystems/okapi
Main.hs
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # # LANGUAGE RecordWildCards # {-# LA...
null
https://raw.githubusercontent.com/monadicsystems/okapi/8a0c17485b3778d819d0cf38b63a2e20406f466a/experimental/chess/Main.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings # # LANGUAGE StrictData # # LANGUAGE TypeSynonymInstances # todo: Add timestamp get p1 get p2 delete p1 from pool delete p2 from pool add new match API home <|> register <|> stream <|> confirm <|> select <|> move
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE QuasiQuotes # # LANGUAGE RecordWildCards # # LANGUAGE TypeApplications # # LANGUAGE UnicodeSyntax # module Main where import Chess import Control.A...
91014556741cc667434c72907d4ec9977b58c3d97d30434065f9cb0b1c12b4ae
AccelerateHS/accelerate-llvm
Cache.hs
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK hide #-} -- | -- Module : Data.Array.Accelerate.LLVM.Link.Cache Copyright : [ 2017 .. 2020 ] The Accelerate Team -- License : BSD3 -- Maintainer : < > -- Stability : experimental Portability : non - portable ( GHC extensions ) -- module D...
null
https://raw.githubusercontent.com/AccelerateHS/accelerate-llvm/1da65b5951b1410b5e4e1a646fbe1b17bee780a8/accelerate-llvm/src/Data/Array/Accelerate/LLVM/Link/Cache.hs
haskell
# LANGUAGE OverloadedStrings # # OPTIONS_HADDOCK hide # | Module : Data.Array.Accelerate.LLVM.Link.Cache License : BSD3 Stability : experimental Simple reference-counted linker cache for function tables 'f' implemented by object code 'o'. # UNPACK # # UNPACK # Create a new linker cache Return the...
Copyright : [ 2017 .. 2020 ] The Accelerate Team Maintainer : < > Portability : non - portable ( GHC extensions ) module Data.Array.Accelerate.LLVM.Link.Cache ( LinkCache, new, dlsym, ) where import Data.Array.Accelerate.Debug.Internal import Data.Array.Accelerate.Lifetime import Data.Array.Accel...
f522c432776a7bba1275295f0724863da1a5c707ec01d894525d7429f145c7ef
ml4tp/tcoq
type_errors.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/checker/type_errors.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** i i Type errors. \label{typeerrors}...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Cic open Envi...
2e388dad373e356e2d3ca2d3f7acd7f698684739df6af397fa2c2115fc7baf6b
google/mlir-hs
ControlFlow.hs
Copyright 2022 Google LLC -- 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 un...
null
https://raw.githubusercontent.com/google/mlir-hs/b2b23d156caf824cecf00b8616108659702bad52/src/MLIR/AST/Dialect/ControlFlow.hs
haskell
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing per...
Copyright 2022 Google LLC Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , module MLIR.AST.Dialect.ControlFlow ( module MLIR.AST.Dialect.ControlFlow, module MLIR.AST.Dialect.Generated.ControlFlow ) where import Pre...
fec59628bfdfc3fd9780d1e80a1592159f09893aa6200cd68f061ce03dae3d82
hadolint/hadolint
DL3046.hs
module Hadolint.Rule.DL3046 (rule) where import qualified Data.Text as Text import Hadolint.Rule import Hadolint.Shell (ParsedShell) import qualified Hadolint.Shell as Shell import Language.Docker.Syntax (Instruction (..), RunArgs (..)) rule :: Rule ParsedShell rule = dl3046 <> onbuild dl3046 # INLINEABLE rule # dl...
null
https://raw.githubusercontent.com/hadolint/hadolint/6c4632387a3485a9b7e1bf46c58da697178e02e2/src/Hadolint/Rule/DL3046.hs
haskell
module Hadolint.Rule.DL3046 (rule) where import qualified Data.Text as Text import Hadolint.Rule import Hadolint.Shell (ParsedShell) import qualified Hadolint.Shell as Shell import Language.Docker.Syntax (Instruction (..), RunArgs (..)) rule :: Rule ParsedShell rule = dl3046 <> onbuild dl3046 # INLINEABLE rule # dl...
63cd2f1f38d3d64b42478c1e90a153c1deef1bda3875f13b44e6df0eb6793d18
simmsb/calamity
Permissions.hs
-- | Permission utilities module Calamity.Utils.Permissions ( basePermissions, applyOverwrites, PermissionsIn (..), PermissionsIn' (..), ) where import Calamity.Client.Types import Calamity.Internal.SnowflakeMap qualified as SM import Calamity.Types.Model.Channel.Guild import Calamity.Types.Model.Guild.Guild i...
null
https://raw.githubusercontent.com/simmsb/calamity/be310255b446e87e7432673de1fbc67ef46de3ae/calamity/Calamity/Utils/Permissions.hs
haskell
| Permission utilities | Calculate a 'Member'\'s 'Permissions' in a 'Guild' | Apply any 'Overwrite's for a 'GuildChannel' onto some 'Permissions' | Things that 'Member's have 'Permissions' in | Calculate a 'Member'\'s 'Permissions' in something If permissions could not be calculated because something couldn't be...
module Calamity.Utils.Permissions ( basePermissions, applyOverwrites, PermissionsIn (..), PermissionsIn' (..), ) where import Calamity.Client.Types import Calamity.Internal.SnowflakeMap qualified as SM import Calamity.Types.Model.Channel.Guild import Calamity.Types.Model.Guild.Guild import Calamity.Types.Model...
3133fa0dbc4105f0a7f11d1d461a903e81477f97272eee2edd62a91aefff80cc
bnoordhuis/chicken-core
test-finalizers.scm
;;;; test-finalizers.scm (##sys#eval-debug-level 0) ; disable keeping trace-buffer with frameinfo (define x (list 1 2 3)) (define y (list 4 5 6)) (define x-f #f) (define y-f #f) (begin (set-finalizer! x (lambda (o) (format #t "Delete: ~A (y: ~a)~%" o y-f) (set! x-f #t))) #t) (begin (set-fin...
null
https://raw.githubusercontent.com/bnoordhuis/chicken-core/56d30e3be095b6abe1bddcfe10505fa726a43bb5/tests/test-finalizers.scm
scheme
test-finalizers.scm disable keeping trace-buffer with frameinfo This ought to work, see patches/finalizer.closures.diff for a fix that unfortunately disables finalizers in the interpreter (probably due to the different closure representation). (assert (not y-f)) (set! x #f) (gc #t) (assert (not x-f)) (assert (not ...
(define x (list 1 2 3)) (define y (list 4 5 6)) (define x-f #f) (define y-f #f) (begin (set-finalizer! x (lambda (o) (format #t "Delete: ~A (y: ~a)~%" o y-f) (set! x-f #t))) #t) (begin (set-finalizer! y (let ((p x)) (lambda (o) (format #t "Delete: ~A: ~A~%" o p) (s...
e4d05b86613b9c00e978999ae9454e94078f1443fc77ff759e16c94821b427e6
dgtized/shimmers
garden_hose.cljs
(ns shimmers.sketches.garden-hose "Concept is a randomly generated hose and then slowly unwind as water flows through it." (:require [quil.core :as q :include-macros true] [quil.middleware :as m] [shimmers.algorithm.kinematic-chain :as chain] [shimmers.common.framerate :as framerate] [shimmers.common...
null
https://raw.githubusercontent.com/dgtized/shimmers/0113e089ce894b20831c26cbb79b3b87a22c7146/src/shimmers/sketches/garden_hose.cljs
clojure
this could be better, basically trying to keep a and c apart instead of folding them together into inflection points.
(ns shimmers.sketches.garden-hose "Concept is a randomly generated hose and then slowly unwind as water flows through it." (:require [quil.core :as q :include-macros true] [quil.middleware :as m] [shimmers.algorithm.kinematic-chain :as chain] [shimmers.common.framerate :as framerate] [shimmers.common...
eef00abb33bb35c9ba9d0d73fc038aeb907eb636f066536fd7d33bca7626ba12
mstksg/advent-of-code-2021
Day10.hs
-- | -- Module : AOC.Challenge.Day10 -- License : BSD3 -- -- Stability : experimental -- Portability : non-portable -- Day 10 . See " AOC.Solver " for the types used in this module ! module AOC.Challenge.Day10 ( day10a , day10b ) where import AOC.Solver ((:~>)(..)) import Co...
null
https://raw.githubusercontent.com/mstksg/advent-of-code-2021/7c14ffc5bdbdeecd6b0592c1718419b01f4a7e9e/src/AOC/Challenge/Day10.hs
haskell
| Module : AOC.Challenge.Day10 License : BSD3 Stability : experimental Portability : non-portable | Left: error (with offending bracket) Right: no error, but a list of leftover incompletes
Day 10 . See " AOC.Solver " for the types used in this module ! module AOC.Challenge.Day10 ( day10a , day10b ) where import AOC.Solver ((:~>)(..)) import Control.DeepSeq (NFData) import GHC.Generics (Generic) import Data.Maybe (mapMaybe) import AOC.Common ...
ab192132b26053ba08caa6b2e23b47ce61861c714309f12da543c1f9a84185b0
jackdoe/bzzz
filtered.clj
(ns bzzz.queries.filtered (:import (org.apache.lucene.search FilteredQuery QueryWrapperFilter))) (defn parse [generic input analyzer ] (let [{:keys [query filter boost] :or {boost 1}} input q (FilteredQuery. (generic query analyzer) (QueryWrapperFilter. (generic filte...
null
https://raw.githubusercontent.com/jackdoe/bzzz/ae98708056e39ada28f22aad9e43ea91695b346b/src/bzzz/queries/filtered.clj
clojure
(ns bzzz.queries.filtered (:import (org.apache.lucene.search FilteredQuery QueryWrapperFilter))) (defn parse [generic input analyzer ] (let [{:keys [query filter boost] :or {boost 1}} input q (FilteredQuery. (generic query analyzer) (QueryWrapperFilter. (generic filte...
63f202db66134e34e71f5f245083c95a4a8054ad049c6b438ed76565e06a3656
cstar/erldis
erldis_list_tests.erl
-module(erldis_list_tests). -include_lib("eunit/include/eunit.hrl"). queue_test() -> Client = setup(), % queue api ?assertEqual(true, erldis_list:is_empty(<<"foo">>, Client)), ?assertEqual(0, erldis_list:len(<<"foo">>, Client)), ?assertEqual(empty, erldis_list:out(<<"foo">>, Client)), erldis_list:in(<<"a">>, <<...
null
https://raw.githubusercontent.com/cstar/erldis/375260795e6a3de2600e297658f364deedbe6f1b/test/erldis_list_tests.erl
erlang
queue api this last call always produces a timeout error TODO: test negative sublist start index to_list uses foldr reverse uses foldl from_list overwrites current list if it exists setup
-module(erldis_list_tests). -include_lib("eunit/include/eunit.hrl"). queue_test() -> Client = setup(), ?assertEqual(true, erldis_list:is_empty(<<"foo">>, Client)), ?assertEqual(0, erldis_list:len(<<"foo">>, Client)), ?assertEqual(empty, erldis_list:out(<<"foo">>, Client)), erldis_list:in(<<"a">>, <<"foo">>, Clie...
18b5c6c18dce0028490d04da3b0f4699f2b9f51b3ad90623eda9999f93947b70
yav/hobbit
Type.hs
module AST.Type ( ModName, QName(..), Name(..) , Type(..), Kind, TyVar(..), Pred(..), Poly(..), Schema, Rule(..), RuleEnv(..) , Goal(..), DGoal(..), FunDep' , sSort, sFun , kType, kArea, kNat, kLab, kPred, kFun , tcFun , tBool, tString, tChar, tSub, subName , tFun, tTup, tBit, tIx, tARef, tM , tNat, ...
null
https://raw.githubusercontent.com/yav/hobbit/31414ba1188f4b39620c2553b45b9e4d4aa40169/src/AST/Type.hs
haskell
^ User variables ^ User constructors ^ Qualified name ^ Record selector ^ record updator ^ An 'if' clause ^ Tuple constructors Sort names ^ Function scpace ^ Sort ^ A natural number types ^ A label type ^ Bitdata constructor types ^ No empty kinds (Spec.hs) Introduced during specialization. ^ Type appli...
module AST.Type ( ModName, QName(..), Name(..) , Type(..), Kind, TyVar(..), Pred(..), Poly(..), Schema, Rule(..), RuleEnv(..) , Goal(..), DGoal(..), FunDep' , sSort, sFun , kType, kArea, kNat, kLab, kPred, kFun , tcFun , tBool, tString, tChar, tSub, subName , tFun, tTup, tBit, tIx, tARef, tM , tNat, ...
6c083e11867ff82a21e49d035cfaa79c64a0941b71edf22bb7ef8fa3673c4be0
CatalaLang/catala
compile_without_exceptions.ml
This file is part of the Catala compiler , a specification language for tax and social benefits computation rules . Copyright ( C ) 2020 - 2022 Inria , contributor : Tixeuil < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in complianc...
null
https://raw.githubusercontent.com/CatalaLang/catala/5bd140ae5fb2a997a578b9cd67a932c4a8733526/compiler/lcalc/compile_without_exceptions.ml
ocaml
* Hoists definition. It represent bindings between [A.Var.t] and [D.expr]. * information context about variables in the current scope let _ = Format.asprintf "Searching for variable %a inside context %a" Print.var n pp_ctx ctx |> Cli.debug_print in catala is not polymorphic todo: for now, every unpure (such...
This file is part of the Catala compiler , a specification language for tax and social benefits computation rules . Copyright ( C ) 2020 - 2022 Inria , contributor : Tixeuil < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in complianc...
57a48f9dc976308847fcf4a6353bcbdf4a95f69d67556fa2cbcf977b8c9bf48e
ocsigen/ojwidgets
ojw_hammer_swipe.ml
Hammer . JS - v1.0.6dev - 2013 - 07 - 31 Binding by Copyright ( c ) 2013 < > ; Licensed under the MIT license Binding by Arnaud Parant Copyright (c) 2013 Jorik Tangelder <>; Licensed under the MIT license *) (* Fake type to hide js obj type *) type t = int Js.t let c...
null
https://raw.githubusercontent.com/ocsigen/ojwidgets/4be2233980bdd1cae187c749bd27ddbfff389880/src/ojw_hammer_swipe.ml
ocaml
Fake type to hide js obj type let jq_carousel = Ojquery.jQelt dom_carousel in * it will be better to use jq_carousel, but js code do not allow it.
Hammer . JS - v1.0.6dev - 2013 - 07 - 31 Binding by Copyright ( c ) 2013 < > ; Licensed under the MIT license Binding by Arnaud Parant Copyright (c) 2013 Jorik Tangelder <>; Licensed under the MIT license *) type t = int Js.t let create panes_list = let ul_elt = Do...
6963352ad6556848057f50538b76f86a68a49349fa970f1db91dc155b5845241
onyx-platform/onyx
queryable_state_manager.clj
(ns onyx.peer.queryable-state-manager (:require [clojure.core.async :refer [chan close! poll! >!!]] [onyx.state.serializers.utils] [com.stuartsierra.component :as component] [onyx.peer.window-state :as ws] [onyx.state.protocol.db :as db] [onyx.peer.grouping ...
null
https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/src/onyx/peer/queryable_state_manager.clj
clojure
(println "CMD" cmd)
(ns onyx.peer.queryable-state-manager (:require [clojure.core.async :refer [chan close! poll! >!!]] [onyx.state.serializers.utils] [com.stuartsierra.component :as component] [onyx.peer.window-state :as ws] [onyx.state.protocol.db :as db] [onyx.peer.grouping ...
8d4bf0c0e9a59e59639a22e38d1ebd43d8fdf70cf10b21ab04c2ba44874b33f0
yogthos/config
project.clj
(defproject yogthos/config "1.2.0" :description "library for managing configuration using environment variables/EDN configuration files" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.10.3"]])
null
https://raw.githubusercontent.com/yogthos/config/62f39a5a7adc934787d6a57f4829791f54fe01ba/project.clj
clojure
(defproject yogthos/config "1.2.0" :description "library for managing configuration using environment variables/EDN configuration files" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.10.3"]])
f4b8c42bafc5e2235c80a7e2bb8881c8d039879f29ba7f6fe791ba0f499dfd1b
slyrus/clem
macros.lisp
(in-package :clem) (defmacro def-unary-op (name op type-1 accumulator-type &key suffix) (let ((element-type-1 (element-type (find-class `,type-1))) (accumulator-element-type (element-type (find-class `,accumulator-type)))) `(progn (defmethod ,(make-intern (concatenate 'string name "-range" suffix)) ...
null
https://raw.githubusercontent.com/slyrus/clem/5eb055bb3f45840b24fd44825b975aa36bd6d97c/src/macros.lisp
lisp
(in-package :clem) (defmacro def-unary-op (name op type-1 accumulator-type &key suffix) (let ((element-type-1 (element-type (find-class `,type-1))) (accumulator-element-type (element-type (find-class `,accumulator-type)))) `(progn (defmethod ,(make-intern (concatenate 'string name "-range" suffix)) ...
bb42a70dc0b0c1d725038ac278bc2fbd148adb0f4d2aee4c08052e000232b7dc
haskell/haskell-language-server
GhcIde.hs
# LANGUAGE DuplicateRecordFields # # LANGUAGE OverloadedStrings # | Exposes the ghcide features as an HLS plugin module Development.IDE.Plugin.HLS.GhcIde ( descriptors , Log(..) ) where import Control.Monad.IO.Class import Development.IDE import Development.IDE.LSP.HoverD...
null
https://raw.githubusercontent.com/haskell/haskell-language-server/6f5a73507f8d9266a486feaf8695c052362b9b95/ghcide/src/Development/IDE/Plugin/HLS/GhcIde.hs
haskell
--------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- ---------------------------------------------------------------------
# LANGUAGE DuplicateRecordFields # # LANGUAGE OverloadedStrings # | Exposes the ghcide features as an HLS plugin module Development.IDE.Plugin.HLS.GhcIde ( descriptors , Log(..) ) where import Control.Monad.IO.Class import Development.IDE import Development.IDE.LSP.HoverD...
1aabd6b7ea0c99e58b4a5143e01a3da0abee2b3f11fd0862563e9e49c925752b
gfngfn/otfed
encode.ml
open Basic open EncodeOperation.Open include EncodeTable include EncodeBasic let get_table_tag (table : table) = table.tag let get_contents (table : table) : string = table.contents let compare_table (table1 : table) (table2 : table) = Value.Tag.compare table1.tag table2.tag type relative_offset = int...
null
https://raw.githubusercontent.com/gfngfn/otfed/2f7bd15456a8326f03ca7b20ff251d7ac24c475d/src/encode.ml
ocaml
`e_single_table` is used as a folding function in `enc_tables`. `enc_tables tables` writes the tables `tables` and returns the pair of - an offset to `CheckSumAdjustment` relative to the position immediately after the table directory, and - all the entries for the construction of the table directory. `first_...
open Basic open EncodeOperation.Open include EncodeTable include EncodeBasic let get_table_tag (table : table) = table.tag let get_contents (table : table) : string = table.contents let compare_table (table1 : table) (table2 : table) = Value.Tag.compare table1.tag table2.tag type relative_offset = int...
fe768b746223c370a8d0d882040219c6f433a76f8f6bc68b1949b1a84368e15e
ndmitchell/catch
CmdLine.hs
module Front.CmdLine(cmdLine, CmdLineState(..), Action(..)) where import Control.Exception import System.IO import System.Directory import System.FilePath import Data.List import Data.Char import Control.Monad data CmdLineState = CmdLineState {cmdLineHandle :: Handle -- the handle of the open file ,cmdLine...
null
https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/src/Front/CmdLine.hs
haskell
the handle of the open file generate a log file near this file options passed the name that you started from
module Front.CmdLine(cmdLine, CmdLineState(..), Action(..)) where import Control.Exception import System.IO import System.Directory import System.FilePath import Data.List import Data.Char import Control.Monad data CmdLineState = CmdLineState } data Action val = Action {actionName :: String ,acti...
148880a58258fe9f22e1c72ef14e59011738e6f283d5b5cced05c59fea816ef9
cram2/cram
generic.lisp
;; Define generic functions used across chapters 2016 - 06 - 12 15:37:54EDT generic.lisp Time - stamp : < 2016 - 06 - 12 16:38:57EDT > Copyright 2016 Distributed under the terms of the GNU General Public License ;; ;; This program is free software: you can redistribute it and/or modify it under the ter...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/init/generic.lisp
lisp
Define generic functions used across chapters This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A P...
2016 - 06 - 12 15:37:54EDT generic.lisp Time - stamp : < 2016 - 06 - 12 16:38:57EDT > Copyright 2016 Distributed under the terms of the GNU General Public License it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ...
6f4a192158789377b07dbddba0fc457086d74bb4364ddaf7af439db89efcd831
re-xyr/cleff
Mask.hs
# LANGUAGE Trustworthy # -- | Copyright : ( c ) 2021 -- License: BSD3 -- Maintainer: -- Stability: experimental Portability : non - portable ( GHC only ) module Cleff.Mask ( -- * Effect Mask (..) -- * High-level operations , bracket , bracketOnError , bracket_ , bracketOnError_ , onError , ...
null
https://raw.githubusercontent.com/re-xyr/cleff/28c74f3c6dd473e6b773ba26b785980ee5607234/src/Cleff/Mask.hs
haskell
| License: BSD3 Maintainer: Stability: experimental * Effect * High-level operations * Primitive operations * Interpretations * Effect particular, this effects allows the use of 'bracket'. === Technical details Regarding the nuances of 'bracket' semantics, this effect uses the semantics of "UnliftIO.Exce...
# LANGUAGE Trustworthy # Copyright : ( c ) 2021 Portability : non - portable ( GHC only ) module Cleff.Mask Mask (..) , bracket , bracketOnError , bracket_ , bracketOnError_ , onError , finally , mask , uninterruptibleMask , onException , mask_ , uninterruptibleMask_ , runMask ) wher...
6d76f1e1f30b8f00ed80aa0ec0cc6a199660472711107c484f97edf921a3befc
cram2/cram
generate-tests.lisp
;; Make tests from examples. 2008 - 09 - 07 21:00:48EDT generate-tests.lisp Time - stamp : < 2009 - 12 - 27 10:12:12EST generate-tests.lisp > ;; Copyright 2008 , 2009 Distributed under the terms of the GNU General Public License ;; ;; This program is free software: you can redistribute it and/or modify i...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/test-unit/generate-tests.lisp
lisp
Make tests from examples. This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ...
2008 - 09 - 07 21:00:48EDT generate-tests.lisp Time - stamp : < 2009 - 12 - 27 10:12:12EST generate-tests.lisp > Copyright 2008 , 2009 Distributed under the terms of the GNU General Public License it under the terms of the GNU General Public License as published by the Free Software Foundation , either...
aee5986af4fe2b188bbd0cb7e5ffc219ec15699ab809dcf7c18c3c1f425a2c48
expipiplus1/vulkan
VK_KHR_external_semaphore_fd.hs
{-# language CPP #-} -- | = Name -- VK_KHR_external_semaphore_fd - device extension -- = = VK_KHR_external_semaphore_fd -- -- [__Name String__] -- @VK_KHR_external_semaphore_fd@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] 80 -- -- [__Revision__] 1 -- --...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/ebc0dde0bcd9cf251f18538de6524eb4f2ab3e9d/src/Vulkan/Extensions/VK_KHR_external_semaphore_fd.hs
haskell
# language CPP # | = Name [__Name String__] @VK_KHR_external_semaphore_fd@ [__Extension Type__] Device extension [__Registered Extension Number__] [__Revision__] [__Extension and Version Dependencies__] - Requires @VK_KHR_external_semaphore@ to be enabled for any device-level fu...
VK_KHR_external_semaphore_fd - device extension = = VK_KHR_external_semaphore_fd 80 1 - Requires support for Vulkan 1.0 - < -Docs/issues/new?body=[VK_KHR_external_semaphore_fd ] @cubanismo%0A*Here describe the issue or question you have about the VK_KHR_external_semaphore_f...
015546de1981ee71d760449c1872583c14be21593ea2ab83c368f7f03a0a10e3
mzp/coq-ide-for-ios
proof_trees.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/proofs/proof_trees.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** Functions on goals Functions on p...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * $ I d : 2010 - 07 - 24 15...
c449a2456a482dc51244182f86e5b87f99d7bad42234b064765e40aa86b9e11d
joeltg/mit-scheme-kernel
canvas.scm
(define *canvas-size* 300) (define *frame-height* 400) (define *frame-width* 400) (define *foreground-color* "white") (define *background-color* "black") (define *can-use-colors* #t) (define *frame-x-position* (if (eq? 'unix microcode-id/operating-system) -10 532)) (define *frame-y-position* 0) (define *frame-width* (i...
null
https://raw.githubusercontent.com/joeltg/mit-scheme-kernel/b8ed3443a075e46567570062d73d3eb775b8743f/src/runtime/canvas/canvas.scm
scheme
*silence*)
(define *canvas-size* 300) (define *frame-height* 400) (define *frame-width* 400) (define *foreground-color* "white") (define *background-color* "black") (define *can-use-colors* #t) (define *frame-x-position* (if (eq? 'unix microcode-id/operating-system) -10 532)) (define *frame-y-position* 0) (define *frame-width* (i...
63707c7b3bdb0d5f04bc1165b98989f711a7941955f359b8f28f8b5e59031d55
MinaProtocol/mina
dlog_plonk_based_keypair.ml
module Poly_comm0 = Poly_comm open Unsigned.Size_t module type Stable_v1 = sig module Stable : sig module V1 : sig type t [@@deriving version, bin_io, sexp, compare, yojson, hash, equal] end module Latest = V1 end type t = Stable.V1.t [@@deriving sexp, compare, yojson] end module type Inputs...
null
https://raw.githubusercontent.com/MinaProtocol/mina/a40d965ae6b39ca93d9eed17efcbf77e0778de0a/src/lib/crypto/kimchi_backend/common/dlog_plonk_based_keypair.ml
ocaml
* does this convert a backend.verifier_index to a pickles_types.verifier_index?
module Poly_comm0 = Poly_comm open Unsigned.Size_t module type Stable_v1 = sig module Stable : sig module V1 : sig type t [@@deriving version, bin_io, sexp, compare, yojson, hash, equal] end module Latest = V1 end type t = Stable.V1.t [@@deriving sexp, compare, yojson] end module type Inputs...
99bd48bdcb83dbdc4a0f8bb9e51eb5c65c52b9f1846a4f1534a73784e74e7a8a
runtimeverification/haskell-backend
WarnIfLowProductivity.hs
# LANGUAGE NoStrict # # LANGUAGE NoStrictData # | Copyright : ( c ) Runtime Verification , 2020 - 2021 License : BSD-3 - Clause Copyright : (c) Runtime Verification, 2020-2021 License : BSD-3-Clause -} module Kore.Log.WarnIfLowProductivity ( WarnIfLowProductivity (..), warnIfLowProductivi...
null
https://raw.githubusercontent.com/runtimeverification/haskell-backend/c86e9d2c0a2d7800a3cb49443d962463f88175d1/kore/src/Kore/Log/WarnIfLowProductivity.hs
haskell
# LANGUAGE NoStrict # # LANGUAGE NoStrictData # | Copyright : ( c ) Runtime Verification , 2020 - 2021 License : BSD-3 - Clause Copyright : (c) Runtime Verification, 2020-2021 License : BSD-3-Clause -} module Kore.Log.WarnIfLowProductivity ( WarnIfLowProductivity (..), warnIfLowProductivi...
7373f0a4438ae32d66e2789fa2bdb776024919e041204efadeb31c73c74105fc
nklein/cl-reactive
reduce-t.lisp
;;;; reduce-t.lisp (in-package #:cl-reactive/tests) (nst:def-test-group reduce-tests () (nst:def-test simple-reduce-test (:equal 7) (signal-let ((sig-x 3 :type integer) (sig-y 4 :type integer)) (with-signal-values ((s (signal-reduce #'+ (list sig-x sig-y)))) s))) (nst:def-test ...
null
https://raw.githubusercontent.com/nklein/cl-reactive/e322391f553989add18e6755e810351085c28197/src/reduce-t.lisp
lisp
reduce-t.lisp
(in-package #:cl-reactive/tests) (nst:def-test-group reduce-tests () (nst:def-test simple-reduce-test (:equal 7) (signal-let ((sig-x 3 :type integer) (sig-y 4 :type integer)) (with-signal-values ((s (signal-reduce #'+ (list sig-x sig-y)))) s))) (nst:def-test reduce-subseq-test ...
32a5ccca213b0371bc3cd9ae59dfbf28fde604fb56ae9ffbc05fa09f3bae49e6
apache/couchdb-rebar
simpleevent.erl
-module({{eventid}}). -behaviour(gen_event). %% ------------------------------------------------------------------ %% API Function Exports %% ------------------------------------------------------------------ -export([start_link/0, add_handler/2]). %% --------------------------------------------------------...
null
https://raw.githubusercontent.com/apache/couchdb-rebar/8578221c20d0caa3deb724e5622a924045ffa8bf/priv/templates/simpleevent.erl
erlang
------------------------------------------------------------------ API Function Exports ------------------------------------------------------------------ ------------------------------------------------------------------ gen_event Function Exports -----------------------------------------------------------------...
-module({{eventid}}). -behaviour(gen_event). -export([start_link/0, add_handler/2]). -export([init/1, handle_event/2, handle_call/2, handle_info/2, terminate/2, code_change/3]). -record(state, {}). start_link() -> gen_event:start_link({local, ?MODULE}). ...
be5cf06814c69dff8def24dd32911a21fdba886118e5f5a00ff239d30c78fcc7
samply/blaze
cql_translator_spec.clj
(ns blaze.cql-translator-spec (:require [blaze.anomaly-spec] [blaze.cql-translator :as cql-translator] [blaze.elm.spec] [clojure.spec.alpha :as s] [cognitect.anomalies :as anom])) (s/fdef cql-translator/translate :args (s/cat :cql string?) :ret (s/or :library :elm/library :anomaly ::anom/ano...
null
https://raw.githubusercontent.com/samply/blaze/b3207ccad998607052c5155df1319872ccf77326/modules/cql/src/blaze/cql_translator_spec.clj
clojure
(ns blaze.cql-translator-spec (:require [blaze.anomaly-spec] [blaze.cql-translator :as cql-translator] [blaze.elm.spec] [clojure.spec.alpha :as s] [cognitect.anomalies :as anom])) (s/fdef cql-translator/translate :args (s/cat :cql string?) :ret (s/or :library :elm/library :anomaly ::anom/ano...
b7c8a75d4319a3d320730595fd0fb02d2de9a972cee5e0d4da73fa85dc340e11
glebec/haskell-programming-allen-moronuki
Ex22_11.hs
module Ex22_11 where import Control.Applicative import Data.Maybe x = [1, 2, 3] y = [4, 5, 6] z = [7, 8, 9] xs :: Maybe Integer xs = lookup 3 $ zip x y ys :: Maybe Integer ys = lookup 6 $ zip y z zs :: Maybe Integer zs = lookup 4 $ zip x y z' :: Integer -> Maybe Integer z' n = lookup n $ zip x z x1 :: Maybe (Int...
null
https://raw.githubusercontent.com/glebec/haskell-programming-allen-moronuki/99bd232f523e426d18a5e096f1cf771228c55f52/22-reader/Ex22_11.hs
haskell
print $ sequenceA [x, y] print $ sequenceA [xs, ys] print $ fmap bolt z
module Ex22_11 where import Control.Applicative import Data.Maybe x = [1, 2, 3] y = [4, 5, 6] z = [7, 8, 9] xs :: Maybe Integer xs = lookup 3 $ zip x y ys :: Maybe Integer ys = lookup 6 $ zip y z zs :: Maybe Integer zs = lookup 4 $ zip x y z' :: Integer -> Maybe Integer z' n = lookup n $ zip x z x1 :: Maybe (Int...
2d857c7ca3c33b67a9fc0f9420500048f42be3130a8dded6ab056e3181efc691
ijvcms/chuanqi_dev
equips_stren_config.erl
%%%------------------------------------------------------------------- @author zhengsiying %%% @doc %%% 自动生成文件,不要手动修改 %%% @end Created : 2016/10/12 %%%------------------------------------------------------------------- -module(equips_stren_config). -include("common.hrl"). -include("config.hrl"). -compile([expor...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/config/equips_stren_config.erl
erlang
------------------------------------------------------------------- @doc 自动生成文件,不要手动修改 @end -------------------------------------------------------------------
@author zhengsiying Created : 2016/10/12 -module(equips_stren_config). -include("common.hrl"). -include("config.hrl"). -compile([export_all]). get_list_conf() -> [ equips_stren_config:get(X) || X <- get_list() ]. get_list() -> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23...
4555bb83a763ede4b7da05df060a6cf08d3ccdec1c26b26f0ced07e66761e572
nominolo/lambdachine
Read.hs
# LANGUAGE NoImplicitPrelude # module GHC.Read ( Read(..) -- class -- ReadS type , ReadS -- :: *; = String -> [(a,String)] -- H98 compatibility , lex -- :: ReadS String , lexLitChar -- :: ReadS String : : ReadS , lexDigits -- :: ReadS String -- defining readers : : ReadPrec Lex...
null
https://raw.githubusercontent.com/nominolo/lambdachine/49d97cf7a367a650ab421f7aa19feb90bfe14731/libraries/base/GHC/Read.hs
haskell
class ReadS type :: *; = String -> [(a,String)] H98 compatibility :: ReadS String :: ReadS String :: ReadS String defining readers :: ReadPrec a -> ReadPrec a :: ReadPrec a -> ReadPrec a :: ReadPrec a -> ReadPrec [a] Temporary XXX Can this be removed? # SOURCE # import GHC.Float () A Haskell 98 function ...
# LANGUAGE NoImplicitPrelude # module GHC.Read : : ReadS : : ReadPrec Lexeme : : [ ( String , ReadPrec a ) ] - > ReadPrec a , readListDefault, readListPrecDefault , readParen , readp ) where import qualified Text.ParserCombinators.ReadP as P import qualified Text.Read.Lex as L import Text.ParserCo...
b0fa52beb6a023c37e783b765efc3c3f10035fc5dee132ca334e5904e924d58e
samth/tr-tutorial
2.rkt
#lang typed/racket Report each unique line from stdin (: saw : (HashTable String Boolean)) (define saw (make-hash)) (for ([line (in-lines)]) (unless (hash-ref saw line (λ () #f)) (displayln line)) (hash-set! saw line #t))
null
https://raw.githubusercontent.com/samth/tr-tutorial/3457df465921274f410bfa0ec0a623410fb22b47/2.rkt
racket
#lang typed/racket Report each unique line from stdin (: saw : (HashTable String Boolean)) (define saw (make-hash)) (for ([line (in-lines)]) (unless (hash-ref saw line (λ () #f)) (displayln line)) (hash-set! saw line #t))
757117384ab1e0e2f682a91006310e45856b30b7d004de72c6408d33f7fc2ecf
GillianPlatform/Gillian
config.ml
let include_dirs = ref ([] : string list) let source_paths = ref ([] : string list) let burn_csm = ref false let hide_genv = ref false let warnings = ref true let hide_undef = ref false let hide_mult_def = ref false let verbose_compcert = ref false let pp_full_tree = ref false let allocated_functions = ref false
null
https://raw.githubusercontent.com/GillianPlatform/Gillian/1c8d65120c04ef87cda689a9d41268e25b5ffa7e/Gillian-C/lib/config.ml
ocaml
let include_dirs = ref ([] : string list) let source_paths = ref ([] : string list) let burn_csm = ref false let hide_genv = ref false let warnings = ref true let hide_undef = ref false let hide_mult_def = ref false let verbose_compcert = ref false let pp_full_tree = ref false let allocated_functions = ref false
09462a4f5cab8f9f867a8981908cbc187cacabe83f28078de14304205f3df081
cognitect-labs/aws-api
validation.clj
Copyright ( c ) Cognitect , Inc. ;; All rights reserved. (ns ^:skip-wiki cognitect.aws.client.validation "For internal use. Don't call directly." (:require [cognitect.aws.client.protocol :as client.protocol] [cognitect.aws.dynaload :as dynaload] [cognitect.aws.service :as service])) (set...
null
https://raw.githubusercontent.com/cognitect-labs/aws-api/e262aac7a5cd2c1214a632ba851f95b6686a9b0f/src/cognitect/aws/client/validation.clj
clojure
All rights reserved.
Copyright ( c ) Cognitect , Inc. (ns ^:skip-wiki cognitect.aws.client.validation "For internal use. Don't call directly." (:require [cognitect.aws.client.protocol :as client.protocol] [cognitect.aws.dynaload :as dynaload] [cognitect.aws.service :as service])) (set! *warn-on-reflection* t...
ba28806c92e0340c39f9cfb7739faf24223eebe8dbb620568ce3e0fb3f8ab454
typedclojure/typedclojure
track.cljc
Copyright ( c ) , contributors . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;...
null
https://raw.githubusercontent.com/typedclojure/typedclojure/82be8b54924ba5ccd0c1cebd509eabc9905ebf32/typed/clj.annotator/src/typed/clj/annotator/track.cljc
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) , contributors . (ns typed.clj.annotator.track (:require #?@(:clj [[potemkin.collections :as pot]]) [typed.clj.annotator.rep :refer [-val key-path map-vals-path infer-results -class -any ...
80e151f665e9dffa2abbfe9b7cb130090dfd3431dac553acc6fdc3f6d3d01db4
schemeorg-community/index.scheme.org
srfi.156.scm
(((name . "is") (signature syntax-rules (_) ((is val1 predicate-or-comparator val2 ...) (or boolean? procedure?))) (subsigs (val (pattern _ obj)) (predicate-or-comparator (value procedure?)))) ((name . "isnt") (signature syntax-rules (_) ((isnt val1 predicate-or-comparator val2 ...) (or boolean...
null
https://raw.githubusercontent.com/schemeorg-community/index.scheme.org/32e1afcfe423a158ac8ce014f5c0b8399d12a1ea/types/srfi.156.scm
scheme
(((name . "is") (signature syntax-rules (_) ((is val1 predicate-or-comparator val2 ...) (or boolean? procedure?))) (subsigs (val (pattern _ obj)) (predicate-or-comparator (value procedure?)))) ((name . "isnt") (signature syntax-rules (_) ((isnt val1 predicate-or-comparator val2 ...) (or boolean...
62ecc71ec077147d5174c6a4c66d6f965f073d095a6de44343db4b15eda3a955
magnars/realize
core_test.clj
(ns realize.core-test (:require [clojure.data.generators :as gen] [clojure.test.generative :as test :refer [defspec]] [clojure.test.generative.runner :as runner] [clojure.test :refer [deftest testing is]] [datomic.api :as d] [realize.core :as sut])) (defn i...
null
https://raw.githubusercontent.com/magnars/realize/801a9d5c24e116ee7a703937a9ad4672f27a5f33/test/realize/core_test.clj
clojure
(ns realize.core-test (:require [clojure.data.generators :as gen] [clojure.test.generative :as test :refer [defspec]] [clojure.test.generative.runner :as runner] [clojure.test :refer [deftest testing is]] [datomic.api :as d] [realize.core :as sut])) (defn i...
4ffe9fbadb2b0ee31675266838fceebbe1d476f86347c732e3d9542406ddbc5a
Nutr1t07/wl-bot
Misc.hs
{-# LANGUAGE OverloadedStrings #-} module Utils.Misc where import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString.Lazy.Search as BL import qualified Data.List as List import Data.String ...
null
https://raw.githubusercontent.com/Nutr1t07/wl-bot/4d9db61613a3819d0addbc7e04d77bb2f57892f0/src/Utils/Misc.hs
haskell
# LANGUAGE OverloadedStrings #
module Utils.Misc where import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString.Lazy.Search as BL import qualified Data.List as List import Data.String ( IsString ) import qualified Dat...
77122baed3998d1799fc9d642aa3b2166ba8c151855f1f3650aabd8cb8f12474
ghilesZ/geoml
triangle.mli
(** Triangles manipulation *) (** the type of triangles *) type t = private Point.t * Point.t * Point.t val tri_map : (Point.t -> Point.t) -> t -> t (** tri_map f t applies function f in turn to all the points of t and stores the results in a new triangle that is returned. *) val tri_exists : (Point.t -> bool) -...
null
https://raw.githubusercontent.com/ghilesZ/geoml/19af3bcc3e9e8c865ad5a3ea73e3736c0c7b7e7b/src/triangle.mli
ocaml
* Triangles manipulation * the type of triangles * tri_map f t applies function f in turn to all the points of t and stores the results in a new triangle that is returned. * Higher order utilities over the triangles * affine transformation of a triangle * tests if a point is in a triangle * rotation, angle in...
type t = private Point.t * Point.t * Point.t val tri_map : (Point.t -> Point.t) -> t -> t val tri_exists : (Point.t -> bool) -> t -> bool val tri_find : (Point.t -> bool) -> t -> Point.t val tri_forall : (Point.t -> bool) -> t -> bool val tri_iter : (Point.t -> unit) -> t -> unit val transform : t -> Affine.t ->...
c9cc6dd64651cc3428e29b3537913ee558d0c24f9c16b020088c15730fede862
martintrojer/datalog
magic.clj
Copyright ( c ) . All rights reserved . The use and ;; distribution terms for this software are covered by the Eclipse Public ;; License 1.0 (-1.0.php) which can ;; be found in the file epl-v10.html at the root of this distribution. By ;; using this software in any fashion, you are agreeing to be bound by t...
null
https://raw.githubusercontent.com/martintrojer/datalog/bd64e76ceb02c0494a654010c0221ada5fc2a002/src/datalog/magic.clj
clojure
distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or an...
Copyright ( c ) . All rights reserved . The use and A Clojure implementation of Datalog -- Magic Sets straszheimjeffrey ( gmail ) Created 18 Feburary 2009 Converted to Clojure1.4 by 2012 . (ns datalog.magic (:use [datalog.util] [datalog.literals] [datalog.rules]) (:use [clojure...
e2eb3b74c3c24cd554c0cfabfff96b85fafd66ae26e1d990585d18bd927ac25b
patricoferris/ocaml-multicore-monorepo
httpaf_lwt_unix.mli
---------------------------------------------------------------------------- Copyright ( c ) 2018 Inhabited Type LLC . Copyright ( c ) 2018 ( c ) 2019 All rights reserved . Redistribution and use in source and binary forms , with or without modification , are permitted provided th...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/dream/src/vendor/httpaf/lwt-unix/httpaf_lwt_unix.mli
ocaml
The function that results from [create_connection_handler] should be passed to [Lwt_io.establish_server_with_client_socket]. For an example, see [examples/lwt_echo_server.ml]. For an example, see [examples/lwt_get.ml].
---------------------------------------------------------------------------- Copyright ( c ) 2018 Inhabited Type LLC . Copyright ( c ) 2018 ( c ) 2019 All rights reserved . Redistribution and use in source and binary forms , with or without modification , are permitted provided th...
1cf09788761250f2a4a880d7e806bcaaf6fb254e7cb3a42cf56abd657775100b
johnwickerson/memalloy
archs.ml
MIT License Copyright ( c ) 2017 by . Permission is hereby granted , free of charge , to any person obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without restriction , including without limitation the rights to use , copy , modify , m...
null
https://raw.githubusercontent.com/johnwickerson/memalloy/aa15776873fe3440cb7f5dae8e174466689d4fba/src/archs.ml
ocaml
* The architectures supported by the tool * Defining a hierarchy of architectures * Convert architecture to Alloy module name * Convert Alloy signature name to architecture * All supported architectures * Pre-defined fence sets for given architecture * Pre-defined fence relations for given architecture * Pre-def...
MIT License Copyright ( c ) 2017 by . Permission is hereby granted , free of charge , to any person obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without restriction , including without limitation the rights to use , copy , modify , m...
8876d04768abb327ddbd991900436a674876d3f70151740daa2463a3c338a5f2
babashka/pod-registry
bbssh.clj
#!/usr/bin/env bb (require '[babashka.pods :as pods] '[clojure.java.io :as io]) (pods/load-pod 'epiccastle/bbssh "0.3.0") (require '[pod.epiccastle.bbssh.core :as bbssh] '[pod.epiccastle.bbssh.scp :as scp]) (let [session (bbssh/ssh "remote-host" {:username "remote-user"})] ;; execute (-> (bbs...
null
https://raw.githubusercontent.com/babashka/pod-registry/1e1aea4774987d1f6d78325fec51e96dd07cf032/examples/bbssh.clj
clojure
execute copy to remote multiple sources file directory string data byte-array data input stream remote path options copy to local
#!/usr/bin/env bb (require '[babashka.pods :as pods] '[clojure.java.io :as io]) (pods/load-pod 'epiccastle/bbssh "0.3.0") (require '[pod.epiccastle.bbssh.core :as bbssh] '[pod.epiccastle.bbssh.scp :as scp]) (let [session (bbssh/ssh "remote-host" {:username "remote-user"})] (-> (bbssh/exec sessi...
07b2e54768b80ad621d5ed2a19cc7899239fc2ed8f13cf10b321a9a67366160c
fetburner/Coq2SML
sml.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/plugins/extraction/sml.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** s Some utility functions. Beware o...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * s Production of Sml syntax . ...
be18968f134d8dc7af51925f66be0b60a880e3e41194d5853ff8bd97b2ce3161
kthielen/stlcc
Check.hs
module STLC.Check where import STLC.Term import STLC.Type import Util.Annotated checkDefinitions :: (Annotation a, TypeEnv tenv a) => tenv -> Definitions a -> b -> IO b checkDefinitions tenv defs result = chooseErr (concatMap (checkDefinition tenv) defs) where chooseErr [] = return result chooseErr m...
null
https://raw.githubusercontent.com/kthielen/stlcc/369492daad6498a93c00f5924a99ceb65b5f1062/STLC/Check.hs
haskell
module STLC.Check where import STLC.Term import STLC.Type import Util.Annotated checkDefinitions :: (Annotation a, TypeEnv tenv a) => tenv -> Definitions a -> b -> IO b checkDefinitions tenv defs result = chooseErr (concatMap (checkDefinition tenv) defs) where chooseErr [] = return result chooseErr m...
4eda03ab980523258c114ff32a1b99759641fb7b51872439c1b6ab435144232b
TrustInSoft/tis-kernel
upper.ml
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/share/src/upper.ml
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 let () = Printf.printf "%s" (String.capitalize Sys.argv.(1))
91138b91310d284d58f19d6d412b877c46ada0ebe0cbeddcf98c6e086e2f9dfe
AndrasKovacs/ELTE-func-lang
Notes06.hs
{-# LANGUAGE DeriveFunctor, MonadComprehensions #-} module Notes06 where import Control.Monad (ap, forM, forM_, liftM2) -------------------------------------------------------------------------------- Also in Control . Monad . State newtype State s a = State { runState :: s -> (s, a) } deriving(F...
null
https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/88d41930999d6056bdd7bfaa85761a527cce4113/2020-21-1/gyak_3/Notes06.hs
haskell
# LANGUAGE DeriveFunctor, MonadComprehensions # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ The function labelTree should label the leaves of a tree with increasing integers: labelTree (Leaf ()) == Lea...
module Notes06 where import Control.Monad (ap, forM, forM_, liftM2) Also in Control . Monad . State newtype State s a = State { runState :: s -> (s, a) } deriving(Functor) execState :: State s a -> s -> s execState (State f) s = fst (f s) evalState :: State s a -> s -> a evalState (State f) s =...
1bf3771ed37e7032ec8646429f6047b3fde8c4f41673e24146eae3f181604740
tomhanika/conexp-clj
project.clj
;; Copyright ⓒ the conexp-clj developers; 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 LICENSE at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bou...
null
https://raw.githubusercontent.com/tomhanika/conexp-clj/24dafecd1add05ca311d7e0ef66493e93cc96dc6/project.clj
clojure
Copyright ⓒ the conexp-clj developers; all rights reserved. The use and distribution terms for this software are covered by the which can be found in the file LICENSE at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not re...
Eclipse Public License 1.0 ( -1.0.php ) (defproject conexp-clj "2.3.1-SNAPSHOT" :min-lein-version "2.0.0" :description "A ConExp rewrite in clojure -- and so much more ..." :url "-clj/" :scm {:url ":tomhanika/conexp-clj.git"} :license {:name "Eclipse Public License" :url "-v10.html"} :depend...
0c31e4ee46c89d2127f26cd57c0d5d684c6c1bf4e7017d9645588c8ec9809c83
ucsd-progsys/liquidhaskell
StateConstraints.hs
module StateConstraints where data ST s a = ST {runState :: s -> (a,s)} @ data ST s a < p : : s - > Bool , q : : s - > s - > Bool , r : : s - > a - > Bool > = ST ( runState : : x : s < p > - > ( a < r x > , s < q x > ) ) @ = ST (runState :: x:s<p> -> (a<r x>, s<q x>)) @-} @ runState : : forall < p :...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/20cd67af038930cb592d68d272c8eb1cbe3cb6bf/tests/pos/StateConstraints.hs
haskell
module StateConstraints where data ST s a = ST {runState :: s -> (a,s)} @ data ST s a < p : : s - > Bool , q : : s - > s - > Bool , r : : s - > a - > Bool > = ST ( runState : : x : s < p > - > ( a < r x > , s < q x > ) ) @ = ST (runState :: x:s<p> -> (a<r x>, s<q x>)) @-} @ runState : : forall < p :...
9eb0db72045297d2ef9700192bcedd51f24ec4faaeb48ea5f95d9b6d72dac05d
garrigue/lablgtk
xml_lexer.mli
(**************************************************************************) Lablgtk - Camlirc (* *) (* * You are free to do anything you want with this code as long *) (* as it i...
null
https://raw.githubusercontent.com/garrigue/lablgtk/504fac1257e900e6044c638025a4d6c5a321284c/applications/camlirc/xml_lexer.mli
ocaml
************************************************************************ * You are free to do anything you want with this code as long as it is for personal use. ...
Lablgtk - Camlirc < > < > $ Id$ type error = | Illegal_character of char | Bad_entity of string | Unterminated of string | Tag_expected | Other of string exception Error of error * int...
9a06801266964f87a9e21aa9353aff79b2f1e0c6ad9778fec49f9b26ad027cd2
FranklinChen/hugs98-plus-Sep2006
Pen.hs
----------------------------------------------------------------------------- -- | -- Module : Graphics.HGL.Draw.Pen Copyright : ( c ) , 1999 - 2003 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- Stability : provisional -- Portability : non-portable (requi...
null
https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/HGL/Graphics/HGL/Draw/Pen.hs
haskell
--------------------------------------------------------------------------- | Module : Graphics.HGL.Draw.Pen License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : provisional Portability : non-portable (requires concurrency) Pens, used for drawing lines. Portab...
Copyright : ( c ) , 1999 - 2003 * On , the pen is also used to draw a line round all the filled * On , the ' Style ' is ignored ( i.e. treated as ' Solid ' ) for pens of width greater than 1 . This problem does not apply to X11 . #include "HsHGLConfig.h" module Graphics.HGL.Draw.Pen ( Pen , Sty...
d6542f690292092b548fc5a85df89a533b4b849de015ff483d79c7356d0961c5
pflanze/chj-schemelib
define-strict-and-lazy.scm
Copyright ( < ) 2011 - 2018 by < > ;;; This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License ( GPL ) as published by the Free Software Foundation , either version 2 of the License , or ;;; (at your option) any later version. (requi...
null
https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/define-strict-and-lazy.scm
scheme
This file is free software; you can redistribute it and/or modify (at your option) any later version. list of `(name strict-name stream-name) stream-name
Copyright ( < ) 2011 - 2018 by < > it under the terms of the GNU General Public License ( GPL ) as published by the Free Software Foundation , either version 2 of the License , or (require (define-macro-star) (simple-match)) (define-macro* (define-strict-and-lazy strict-name stream-name #...
ca20c937447fa3b0480a59a11840022fbcae5502e017721d93e51dcabaa178c0
anishathalye/knox
lib.rkt
#lang rosette/safe (require (only-in rosette/base/core/bool [@true? true?]) (only-in rosette/base/core/polymorphic ite) (for-syntax syntax/parse racket/syntax) (prefix-in ! (combine-in racket/base racket/match)) syntax/parse/define "parameters.rkt" "libopt.rkt" rosutil) (provide = distinct _ select store bvx...
null
https://raw.githubusercontent.com/anishathalye/knox/161cda3e5274cc69012830f477749954ddcf736d/yosys/lib.rkt
racket
constants logical types comparison bitwise arithmetic conversion when it's not necessary. `if` eventually calls `eval-assuming` to evaluate the then and else expressions. before doing so, `eval-assuming` augments the verification condition with the guard; sometimes, this immediately results in an exception d...
#lang rosette/safe (require (only-in rosette/base/core/bool [@true? true?]) (only-in rosette/base/core/polymorphic ite) (for-syntax syntax/parse racket/syntax) (prefix-in ! (combine-in racket/base racket/match)) syntax/parse/define "parameters.rkt" "libopt.rkt" rosutil) (provide = distinct _ select store bvx...
1557c549501eaa88d352a362764eede55167305ed6f1bb15f5bfcec8d76062e3
geophf/1HaskellADay
Solution.hs
# LANGUAGE QuasiQuotes # module Y2018.M01.D09.Solution where - Okay , we 've parsed articles from JSON and we 've stored those articles . Let 's start expanding the scope here both in breath and in depth . Depth first . What happens when we do n't parse an article ? Or we ca n't store one ? We 've logge...
null
https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M01/D09/Solution.hs
haskell
} to the database (also, the Logger m should be cleared, so you don't keep reentering them. down the road, we will enhance the logger to be application-specific and tailor behavior around severity. You know, like log4h ('log for haskell') moving LogEntry etc to Data.Logger moving SQL marshalling to Store.SQL.Util...
# LANGUAGE QuasiQuotes # module Y2018.M01.D09.Solution where - Okay , we 've parsed articles from JSON and we 've stored those articles . Let 's start expanding the scope here both in breath and in depth . Depth first . What happens when we do n't parse an article ? Or we ca n't store one ? We 've logge...
cbc5c3338900e34f47bbf68ab2d672539f80460b4b9f19a5e383e7f879a62c8d
fccm/OCamlSDL2
test_surf_ba.ml
open Sdl open Sdlba let color_of_rgb ~surf ~rgb = let fmt_kind = Surface.get_pixelformat_t surf in let fmt = Pixel.alloc_format fmt_kind in let color = Pixel.map_RGB fmt ~rgb in Pixel.free_format fmt; (color) let fill_rect surf x y w h ~rgb = let color = color_of_rgb ~surf ~rgb in let rect = Rect.make4 ...
null
https://raw.githubusercontent.com/fccm/OCamlSDL2/01fa29187cab90052d2581eb509d1bca1a85418f/tests/test_surf_ba.ml
ocaml
open Sdl open Sdlba let color_of_rgb ~surf ~rgb = let fmt_kind = Surface.get_pixelformat_t surf in let fmt = Pixel.alloc_format fmt_kind in let color = Pixel.map_RGB fmt ~rgb in Pixel.free_format fmt; (color) let fill_rect surf x y w h ~rgb = let color = color_of_rgb ~surf ~rgb in let rect = Rect.make4 ...
d36b4c202820d0bc89032d644d3c33bbf528fc004fccddbe4662788c582797d7
fluree/db
core.cljc
(ns fluree.db.util.core (:require [clojure.string :as str] #?@(:clj [[fluree.db.util.clj-exceptions :as clj-exceptions] [fluree.db.util.cljs-exceptions :as cljs-exceptions]])) #?(:cljs (:require-macros [fluree.db.util.core :refer [case+]])) #?(:clj (:import (java.util UUID Date) ...
null
https://raw.githubusercontent.com/fluree/db/9e9718b11e954c47621ea2c4651105f6d0765535/src/fluree/db/util/core.cljc
clojure
(ns fluree.db.util.core (:require [clojure.string :as str] #?@(:clj [[fluree.db.util.clj-exceptions :as clj-exceptions] [fluree.db.util.cljs-exceptions :as cljs-exceptions]])) #?(:cljs (:require-macros [fluree.db.util.core :refer [case+]])) #?(:clj (:import (java.util UUID Date) ...
411055e066ea5f82501cd85c5f72bb457add3d6a1e1da8e4a4e16553da920be3
Decentralized-Pictures/T4L3NT
cache_repr.mli
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Nomadic Labs < > (* ...
null
https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_012_Psithaca/lib_protocol/cache_repr.mli
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 AN...
5063ebc632858238e53be462418eff13d806abaf0f520aee17aa57eaf9d50ef8
ujamjar/hardcaml
eventsim2.mli
* hardcaml - hardware design in OCaml * * ( c ) 2014 MicroJamJar Ltd * * Author(s ): * Description : * * hardcaml - hardware design in OCaml * * (c) 2014 MicroJamJar Ltd * * Author(s): * Description: * *) open HardCaml module B : Comb.S type value = B.t type time = int modul...
null
https://raw.githubusercontent.com/ujamjar/hardcaml/65f32f543348e81cbb7f6d0e77f1f1203bf4e335/staging/eventsim2.mli
ocaml
current value time of last transition debug name time of even value of event signal to change
* hardcaml - hardware design in OCaml * * ( c ) 2014 MicroJamJar Ltd * * Author(s ): * Description : * * hardcaml - hardware design in OCaml * * (c) 2014 MicroJamJar Ltd * * Author(s): * Description: * *) open HardCaml module B : Comb.S type value = B.t type time = int modul...
4a53ed9c9c441cdc5f8b867a927a134663b814aa6215ecffd331f38163eab7b3
mit-plv/riscv-semantics
RunFast.hs
{-# OPTIONS -Wall #-} module Platform.RunFast where import System.IO import System.Environment import System.Exit import Data.Int import Data.IORef import Data.Array.IO import Data.List import Data.Word import Data.Bits import Utility.Utility import Spec.Machine import Platform.CleanTest import Utility.Elf import quali...
null
https://raw.githubusercontent.com/mit-plv/riscv-semantics/1c0da3cac9d3f8dd813d26c0d2fbaccbb2210313/src/Platform/RunFast.hs
haskell
# OPTIONS -Wall # Check external interrupt Restore state to nothing pc <- getPC Predecode pcPacket <- lift $ readIORef (pcPacket refs) instruction <- lift $ readIORef (instruction refs) exception <- lift $ readIORef (exception refs) interrupt <- li...
module Platform.RunFast where import System.IO import System.Environment import System.Exit import Data.Int import Data.IORef import Data.Array.IO import Data.List import Data.Word import Data.Bits import Utility.Utility import Spec.Machine import Platform.CleanTest import Utility.Elf import qualified Spec.CSRField as ...
8ea6d02bbb4cee47b3a0004363a04b0c436cb955e715e7384196cf627040fd67
kushidesign/kushi
core.cljs
(ns kushi.ui.input.checkbox.core (:require-macros [kushi.core :refer (sx)]) (:require [kushi.core :refer (merge-attrs)] [kushi.ui.core :refer (opts+children)])) TODO outlines for ally (defn checkbox {:desc ["Checkboxes are used to provide multiple options for selection. One or more checkboxes can be c...
null
https://raw.githubusercontent.com/kushidesign/kushi/3759d5762e07588721276cd026c7c98d3ae5bdac/src/kushi/ui/input/checkbox/core.cljs
clojure
(ns kushi.ui.input.checkbox.core (:require-macros [kushi.core :refer (sx)]) (:require [kushi.core :refer (merge-attrs)] [kushi.ui.core :refer (opts+children)])) TODO outlines for ally (defn checkbox {:desc ["Checkboxes are used to provide multiple options for selection. One or more checkboxes can be c...
0f61062b52b78e61af9696536c593447024eb9f1fb7e3ce104cafb79fb566d14
6502/JSLisp
bigfib.lisp
(defconstant +BASE+ 10000000) (defun L+ (a b) "Sum of two large integers [a] and [b]" (do ((result (list)) (carry 0) (na (length a)) (nb (length b)) (i 0 (1+ i))) ((and (>= i na) (>= i nb) (= carry 0)) result) (let ((x (+ (or (aref a i) 0) (or (aref b i)...
null
https://raw.githubusercontent.com/6502/JSLisp/9a4aa1a9116f0cfc598ec9f3f30b59d99810a728/examples/bigfib.lisp
lisp
a b e f c d g h
(defconstant +BASE+ 10000000) (defun L+ (a b) "Sum of two large integers [a] and [b]" (do ((result (list)) (carry 0) (na (length a)) (nb (length b)) (i 0 (1+ i))) ((and (>= i na) (>= i nb) (= carry 0)) result) (let ((x (+ (or (aref a i) 0) (or (aref b i)...
b43107cbea08951a1cea0715e13016ae95c4db77861396e11ced4958d1f71920
lambdaisland/webstuff
http.clj
(ns lambdaisland.webstuff.http "Provide all the building blocks for setting up Jetty/Sieppari/Reitit In particular this provides a setup where routes can easily use content negotiation to return either data (as EDN/JSON/Transit/etc), or to run that same data through a view function (data->hiccup) to render HTM...
null
https://raw.githubusercontent.com/lambdaisland/webstuff/5d5669e7f7829c65fdd00b19ef826565ce41b7ea/src/lambdaisland/webstuff/http.clj
clojure
(ns lambdaisland.webstuff.http "Provide all the building blocks for setting up Jetty/Sieppari/Reitit In particular this provides a setup where routes can easily use content negotiation to return either data (as EDN/JSON/Transit/etc), or to run that same data through a view function (data->hiccup) to render HTM...
b7e40ed1714cd6e7e1e7ea8dea1af53af350712b66f1f9135a71bb17281ac495
jlouis/graphql-erlang
dungeon_enum.erl
-module(dungeon_enum). -export([input/2, output/2]). input(<<"Mood">>, <<Bin/bitstring>>) -> {ok, binary_to_existing_atom(Bin, utf8)}; input(<<"Mood">>, X) -> {error, {invalid_mood, X}}. output(<<"Mood">>, 'DODGY') -> {ok, <<"DODGY">>}; output(<<"Mood">>, 'TRANQUIL') -> {ok, <<"TRANQUIL">>}; output(<<"Mood...
null
https://raw.githubusercontent.com/jlouis/graphql-erlang/4fd356294c2acea42a024366bc5a64661e4862d7/test/dungeon_enum.erl
erlang
This is a deliberate error case
-module(dungeon_enum). -export([input/2, output/2]). input(<<"Mood">>, <<Bin/bitstring>>) -> {ok, binary_to_existing_atom(Bin, utf8)}; input(<<"Mood">>, X) -> {error, {invalid_mood, X}}. output(<<"Mood">>, 'DODGY') -> {ok, <<"DODGY">>}; output(<<"Mood">>, 'TRANQUIL') -> {ok, <<"TRANQUIL">>}; output(<<"Mood...
e3cf4b2d743b88f3e094c29faa082f36577a8333902382b0b4631d1e7e004e0a
ku-fpg/remote-monad
Alternative.hs
# LANGUAGE GADTs # {-# LANGUAGE KindSignatures #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # {-# LANGUAGE TypeOperators #-} | Module : Control . Remote . Monad . Packet . Alternative Copyright : ( C ) 2016 , The University of Kansas License : BS...
null
https://raw.githubusercontent.com/ku-fpg/remote-monad/79d22ea2bde876e6640a25472d90fc3d7dd82a3a/src/Control/Remote/Packet/Alternative.hs
haskell
# LANGUAGE KindSignatures # # LANGUAGE RankNTypes # # LANGUAGE TypeOperators # * The remote applicative | A Remote Applicative, that can encode both commands and procedures, bundled together.
# LANGUAGE GADTs # # LANGUAGE ScopedTypeVariables # | Module : Control . Remote . Monad . Packet . Alternative Copyright : ( C ) 2016 , The University of Kansas License : BSD - style ( see the file LICENSE ) Maintainer : Stability : Alpha Portability : GHC Module: ...