_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
b1d8f7e17c275b6c6cf31119030cf930435754fb7f5f585333ea55e3f9981243
larcenists/larceny
mbrot.scm
MBROT -- Generation of set fractal . (import (scheme base) (scheme read) (scheme write) (scheme time)) (define (count r i step x y) (let ((max-count 64) (radius^2 16.0)) (let ((cr (+ r (* (inexact x) step))) (ci (+ i (* (inexact y) step)))) (let loo...
null
https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/test/Benchmarking/R7RS/src/mbrot.scm
scheme
MBROT -- Generation of set fractal . (import (scheme base) (scheme read) (scheme write) (scheme time)) (define (count r i step x y) (let ((max-count 64) (radius^2 16.0)) (let ((cr (+ r (* (inexact x) step))) (ci (+ i (* (inexact y) step)))) (let loo...
552d94481834a0dc051d79c9f4d22958b2a8132c88a577465b3fdc7f7ee15862
seriyps/xhttpc
referer_middleware.erl
@author < > ( C ) 2012 , %%% @doc %%% HTTP referer middleware %%% Install 'Referer' HTTP header %%% TODO: install only text/html responses as referer (or configure allowed %%% content-types) %%% @end Created : 8 Oct 2012 by < > -module(referer_middleware). -behaviour(xhttpc_middleware). -export([init...
null
https://raw.githubusercontent.com/seriyps/xhttpc/ae5a8ab5f1d9a301e31dcf0b0b464de747816637/src/middlewares/referer_middleware.erl
erlang
@doc HTTP referer middleware Install 'Referer' HTTP header TODO: install only text/html responses as referer (or configure allowed content-types) @end
@author < > ( C ) 2012 , Created : 8 Oct 2012 by < > -module(referer_middleware). -behaviour(xhttpc_middleware). -export([init/1, request/3, response/4, call/2, terminate/2]). -export([set_referer/2]). -include("xhttpc.hrl"). -record(state, {ref :: string()}). set_referer(Session, Url) -> xht...
aad8e6b40da432df3af054077a68b9d4251cd636de203e703e605e8cd337a6cf
dyzsr/ocaml-selectml
typecore_empty_polyvariant_error.ml
TEST readonly_files = " empty_ppx.ml " * setup - ocamlc.byte - build - env * * ocamlc.byte with ocamlcommon all_modules="empty_ppx.ml " program="ppx.exe " * * * toplevel all_modules="${test_file } " flags="-ppx ' $ { ocamlrun } $ { test_build_directory_prefix}/ocamlc.byte / ppx.exe ' "...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/typing-misc/typecore_empty_polyvariant_error.ml
ocaml
TEST readonly_files = " empty_ppx.ml " * setup - ocamlc.byte - build - env * * ocamlc.byte with ocamlcommon all_modules="empty_ppx.ml " program="ppx.exe " * * * toplevel all_modules="${test_file } " flags="-ppx ' $ { ocamlrun } $ { test_build_directory_prefix}/ocamlc.byte / ppx.exe ' "...
158949597f798018798a03941c752d1c184a7b4cc5ee1cb3a12054ee0f0735b9
seven1240/idp_proxy
idp_proxy_sup.erl
@author author < > YYYY author . %% @doc Supervisor for the idp_proxy application. -module(idp_proxy_sup). -author('author <>'). -behaviour(supervisor). -include("idp_proxy.hrl"). -include("../deps/s3erl/include/s3.hrl"). %% External exports -export([start_link/0, upgrade/0]). %% supervisor callbacks ...
null
https://raw.githubusercontent.com/seven1240/idp_proxy/bdae5f9b4f6844cb49df108a4cab7658df8e46e8/src/idp_proxy_sup.erl
erlang
@doc Supervisor for the idp_proxy application. External exports supervisor callbacks @doc API for starting the supervisor. @doc Add processes if necessary. @doc supervisor callback.
@author author < > YYYY author . -module(idp_proxy_sup). -author('author <>'). -behaviour(supervisor). -include("idp_proxy.hrl"). -include("../deps/s3erl/include/s3.hrl"). -export([start_link/0, upgrade/0]). -export([init/1]). ( ) - > ServerRet start_link() -> supervisor:start_link({local, ?M...
00de75062cc8850fb7d619f8905e61f8ab5a3bd89fdd79bf2b2c0b53bec49774
rabbitmq/rabbitmq-web-stomp
rabbit_ws_test_util.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . %% -module(rabbit_ws_test_util). -export([update_ap...
null
https://raw.githubusercontent.com/rabbitmq/rabbitmq-web-stomp/412150d1256f79de65fc6d6898c0e1c96974dfe3/test/src/rabbit_ws_test_util.erl
erlang
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit_ws_test_util). -export([update_app_env/...
83cf74ca32940b3e89383471edc65a998a56889739d5458a4e7f2157798ec1bf
privet-kitty/cl-competitive
fast-gcd.lisp
(defpackage :cp/fast-gcd (:use :cl :cp/tzcount) (:export #:fast-gcd #:fast-lcm #:%fast-gcd) (:documentation "Provides binary GCD and LCM. Reference: -way-to-compute-the-greatest-common-divisor/")) (in-package :cp/fast-gcd) (declaim (inline %fast-gcd) (ftype (function * (values (integer 1 #.most-positiv...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/52eebb79e984457ecd36e8a7e085f912b121509a/module/fast-gcd.lisp
lisp
(defpackage :cp/fast-gcd (:use :cl :cp/tzcount) (:export #:fast-gcd #:fast-lcm #:%fast-gcd) (:documentation "Provides binary GCD and LCM. Reference: -way-to-compute-the-greatest-common-divisor/")) (in-package :cp/fast-gcd) (declaim (inline %fast-gcd) (ftype (function * (values (integer 1 #.most-positiv...
735fd799c2a8d3a5009f658a7bc140235847b44eba0c70ef964bdb8c127f6e6b
ocaml-omake/omake
omake_command_digest.ml
(* * Compute the digest of a value. This works the naive way: * 1. Convert the value to a string * 2. Compute its MD5 digest * This can be fairly expensive if the value is big. The * current implementation is designed so that we can at least * compress the string a bit. *) % % MAGICBEGIN%% type code ...
null
https://raw.githubusercontent.com/ocaml-omake/omake/08b2a83fb558f6eb6847566cbe1a562230da2b14/src/env/omake_command_digest.ml
ocaml
* Compute the digest of a value. This works the naive way: * 1. Convert the value to a string * 2. Compute its MD5 digest * This can be fairly expensive if the value is big. The * current implementation is designed so that we can at least * compress the string a bit. | CodeVarScopeThis | CodeVarScop...
% % MAGICBEGIN%% type code = CodeApplyExp | CodeApplyString | CodeFunString | CodeArgv | CodeArrayOfString | CodeArrayString | CodeArrow | CodeBegin | CodeObjectString | CodeBodyString | CodeCase | CodeCaseExp | CodeCases | CodeCasesExp | CodeCasesString | CodeCaseString | CodeCommaExp | CodeCom...
e15fd58d23b52833d0c8c4910ddaba0e87152e2c9d22b040d8535d2602f4b028
Yleisradio/http-kit-aws4
http_kit.clj
(ns http-kit-aws4.http-kit (:require [clojure.java.io] [clojure.string :as string] [clojure.walk] [buddy.core.codecs :as codecs] [buddy.core.hash :as hash] [http-kit-aws4.aws-credentials :refer [get-aws-credentials]] [http-kit-aws4.core :refer [a...
null
https://raw.githubusercontent.com/Yleisradio/http-kit-aws4/a2ef738fad8a5fbfdee40df0573aa5e2ff96e324/src/http_kit_aws4/http_kit.clj
clojure
(ns http-kit-aws4.http-kit (:require [clojure.java.io] [clojure.string :as string] [clojure.walk] [buddy.core.codecs :as codecs] [buddy.core.hash :as hash] [http-kit-aws4.aws-credentials :refer [get-aws-credentials]] [http-kit-aws4.core :refer [a...
3163910491df99c327d1e70f2df2173c9ffaa58bc11392f0e3ec5e32501fab2c
sellout/haskerwaul
Pointed.hs
# language UndecidableInstances , UndecidableSuperClasses # , UndecidableSuperClasses #-} module Haskerwaul.Category.Pointed ( module Haskerwaul.Category.Pointed -- * extended modules , module Haskerwaul.Category ) where import Haskerwaul.Category import Haskerwaul.Category.Opposite im...
null
https://raw.githubusercontent.com/sellout/haskerwaul/cf54bd7ce5bf4f3d1fd0d9d991dc733785b66a73/src/Haskerwaul/Category/Pointed.hs
haskell
* extended modules | [nLab](+category) | Must be the inverse of `(!)` specialized to @`InitialObject` c@.
# language UndecidableInstances , UndecidableSuperClasses # , UndecidableSuperClasses #-} module Haskerwaul.Category.Pointed ( module Haskerwaul.Category.Pointed , module Haskerwaul.Category ) where import Haskerwaul.Category import Haskerwaul.Category.Opposite import Haskerwaul.Isomorph...
84c2b7ad93c8a7db373b6f38525a4ae635883927b80dbe6c729ed2a61b50f1d2
Thomashrb/advent-of-code-data
core.clj
(ns aocd.core (:require [aocd.api :as api] [aocd.io :as io])) (defn input "Attempt to load String input from cache if not exists request input from api to cache then load it" [year day] (or (io/load-input year day) (let [token (io/load-token) input (api/req-input year day token)...
null
https://raw.githubusercontent.com/Thomashrb/advent-of-code-data/22204ea9c6f8b51065fb720c59dd6cebb02c614f/src/aocd/core.clj
clojure
Cache the result
(ns aocd.core (:require [aocd.api :as api] [aocd.io :as io])) (defn input "Attempt to load String input from cache if not exists request input from api to cache then load it" [year day] (or (io/load-input year day) (let [token (io/load-token) input (api/req-input year day token)...
d8d373a968915336398cadee45193fa2b2841ad26dee7e63817ecefc5adefe92
udacity/geode
Main.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE DeriveGeneric # # LANGUAGE RecordWildCards # import Data.Aeson (ToJSON, toJSON, (.=), object) import Data.GeoIP2 import Data.IP (fromHostAddress) import Data.IP (IP(..)) import Data.Maybe (listToMaybe) import Network.HTTP.Types (status404) import Network.HTTP.Types.Header ...
null
https://raw.githubusercontent.com/udacity/geode/dff89334ad10b78501167ff2a329451007a9d20b/Main.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE DeriveGeneric # # LANGUAGE RecordWildCards # import Data.Aeson (ToJSON, toJSON, (.=), object) import Data.GeoIP2 import Data.IP (fromHostAddress) import Data.IP (IP(..)) import Data.Maybe (listToMaybe) import Network.HTTP.Types (status404) import Network.HTTP.Types.Header (HeaderName) import Network.Socket ...
fda1d3cadd3dc117886dde81f2c4b28ed43e6fb2882ccb444ba30f972f8656b4
arcadia-unity/catcon
counter.clj
(ns catcon.counter (:use arcadia.core) (:import [UnityEngine Debug BoxCollider])) (defcomponent Counter [] (Update [this] (set! (.. this guiText text) (str "Cats: " (count (objects-typed catcon.cat.Cat)) "\nPlatforms: " (count (objects-typed BoxCollider...
null
https://raw.githubusercontent.com/arcadia-unity/catcon/6c69f424d3c14639ff11a3ea7d9da6aa81328f8a/Arcadia/Scripts/catcon/counter.clj
clojure
(ns catcon.counter (:use arcadia.core) (:import [UnityEngine Debug BoxCollider])) (defcomponent Counter [] (Update [this] (set! (.. this guiText text) (str "Cats: " (count (objects-typed catcon.cat.Cat)) "\nPlatforms: " (count (objects-typed BoxCollider...
847561e8c9b53763a05b17844d61185926bdc3ffc1b7c4dea4a6c826575fc125
rudymatela/speculate
zip.hs
# LANGUAGE DataKinds # import QuickSpec hiding (insert) import Data.List (sort, insert) import Test.QuickCheck import Data.Dynamic import Control.Monad import Data.Proxy main = quickSpec signature { maxTermSize = Just 7 , maxTests = Just 500 , constants = [ constant "++" ((++) :: [Int] -> [Int] -> [Int]) ...
null
https://raw.githubusercontent.com/rudymatela/speculate/8ec39747d03033db4349d554467d4b78bb72935d/bench/qs2/zip.hs
haskell
# LANGUAGE DataKinds # import QuickSpec hiding (insert) import Data.List (sort, insert) import Test.QuickCheck import Data.Dynamic import Control.Monad import Data.Proxy main = quickSpec signature { maxTermSize = Just 7 , maxTests = Just 500 , constants = [ constant "++" ((++) :: [Int] -> [Int] -> [Int]) ...
badc6298142124bd4e300b6578f08b41e3cf1ff1d57ed9dce74bd20f3466b580
cxphoe/SICP-solutions
4.74.rkt
;; a) (define (simple-stream-flatmap proc s) (simple-flatten (stream-map proc s))) (define (simple-faltten stream) (stream-map stream-car (stream-filter (lambda (frame) (not (stream-null? frame))) stream))) ;; b) ;; the procedure inside stream-operations will function th...
null
https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%204-Metalinguistic%20Abstraction/4.Logical%20Programing/4.74.rkt
racket
a) b) the procedure inside stream-operations will function the same as before if we have change it into the above code.
(define (simple-stream-flatmap proc s) (simple-flatten (stream-map proc s))) (define (simple-faltten stream) (stream-map stream-car (stream-filter (lambda (frame) (not (stream-null? frame))) stream)))
e92baf889b65dd292032f69b1b016db56949aa80daa0cc54ac643ad07be598c4
fulcro-legacy/semantic-ui-wrapper
ui_list.cljs
(ns fulcrologic.semantic-ui.elements.list.ui-list (:require [fulcrologic.semantic-ui.factory-helpers :as h] ["semantic-ui-react/dist/commonjs/elements/List/List" :default List])) (def ui-list "A list groups related content. Props: - animated (bool): A list can animate to set the current item apart...
null
https://raw.githubusercontent.com/fulcro-legacy/semantic-ui-wrapper/b0473480ddfff18496df086bf506099ac897f18f/semantic-ui-wrappers-shadow/src/main/fulcrologic/semantic_ui/elements/list/ui_list.cljs
clojure
(ns fulcrologic.semantic-ui.elements.list.ui-list (:require [fulcrologic.semantic-ui.factory-helpers :as h] ["semantic-ui-react/dist/commonjs/elements/List/List" :default List])) (def ui-list "A list groups related content. Props: - animated (bool): A list can animate to set the current item apart...
6ea8ab2be24850db880ca8bfcd1b34ef5c385eb930e7a99ae0c8963dedf2cc0b
xapi-project/xen-api
xapi_sdn_controller.ml
* Copyright ( C ) 2006 - 2016 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
null
https://raw.githubusercontent.com/xapi-project/xen-api/48cc1489fff0e344246ecf19fc1ebed6f09c7471/ocaml/xapi/xapi_sdn_controller.ml
ocaml
* Copyright ( C ) 2006 - 2016 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
268bb80d0aec17381544b9b00bba0375b14ed3876c0be426074d862e2e3d67d3
brendanhay/gogol
Patch.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/77394c4e0f5bd729e6fe27119701c45f9d5e1e9a/lib/services/gogol-ml/gen/Gogol/MachineLearning/Ml/Projects/Jobs/Patch.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Updates a specific job resource. Currently the only supported fields to update are @labels@. * Resource ** Constructing a Request | A resource alias for @ml.projects.jobs.patch@ method which the 'MlProjectsJobsPatch' request ...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
689eb99b3429fa15c4e1cbf3711461fb618667fed251d3543e7035a37b6cc5bd
gilith/hol-light
holby.ml
(* ========================================================================= *) A HOL " by " tactic , doing - like things , trying something that is sufficient for HOL 's basic rules , trying a few other things like (* arithmetic, and finally if all else fails using MESON_TAC[]. *) (* ...
null
https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/Examples/holby.ml
ocaml
========================================================================= arithmetic, and finally if all else fails using MESON_TAC[]. ========================================================================= ------------------------------------------------------------------------- More refined ne...
A HOL " by " tactic , doing - like things , trying something that is sufficient for HOL 's basic rules , trying a few other things like let matching_enter tm y net = enter [] (tm,((fun tm' -> can (term_match [] tm) tm'),y)) net;; let unconditional_enter (tm,y) net = enter [] (tm,((fun t -> t...
f6f6b3e2fc0300a22fd9438012d7714e52c3314b4ddb4b61c694267fef5e52ac
andreas/ocaml-graphql-tutorial
package.mli
type relop = [`Eq | `Neq | `Geq | `Gt | `Leq | `Lt] type version_constraint = relop * string type t = { name : string; version : string; maintainer : string list; homepage : string list; authors : string list; license : string list; doc : string list; tags : string...
null
https://raw.githubusercontent.com/andreas/ocaml-graphql-tutorial/b8ec76b8b2f5a3abc5ad229cbc43587dc652f854/package.mli
ocaml
type relop = [`Eq | `Neq | `Geq | `Gt | `Leq | `Lt] type version_constraint = relop * string type t = { name : string; version : string; maintainer : string list; homepage : string list; authors : string list; license : string list; doc : string list; tags : string...
f15757ea329985203d1913e3db2e1af702810535b70c3c81306b371e73402968
nponeccop/HNC
Compiler.hs
module Test.Compiler (iotests) where import Test.HUnit hiding (test) import System.Directory import Control.Monad import System.IO import CPP.CompileTools import FFI.TypeParser (importHni) windowsLineMode = NewlineMode { inputNL = CRLF, outputNL = CRLF } readFileCRLF name = do h <- openFile name ReadMode hSetNewli...
null
https://raw.githubusercontent.com/nponeccop/HNC/d8447009a04c56ae2cba4c7c179e39384085ea00/Test/Compiler.hs
haskell
module Test.Compiler (iotests) where import Test.HUnit hiding (test) import System.Directory import Control.Monad import System.IO import CPP.CompileTools import FFI.TypeParser (importHni) windowsLineMode = NewlineMode { inputNL = CRLF, outputNL = CRLF } readFileCRLF name = do h <- openFile name ReadMode hSetNewli...
8468e95472802f685c9da7032c82f294f670ebe9aa1ea7ed7a9cd419a9300838
rzezeski/try-try-try
rts_write_fsm.erl
%% @doc The coordinator for stat write opeartions. This example will show how to properly replicate your data in Riak Core by making use %% of the _preflist_. -module(rts_write_fsm). -behavior(gen_fsm). -include("rts.hrl"). %% API -export([start_link/5, start_link/6, write/3, write/4]). %% Callbacks -export([init/...
null
https://raw.githubusercontent.com/rzezeski/try-try-try/c5d99f29fb3380f8653efdd1aa6a8f52143a9717/2011/riak-core-the-coordinator/rts/src/rts_write_fsm.erl
erlang
@doc The coordinator for stat write opeartions. This example will of the _preflist_. API Callbacks req_id: The request id so the caller can verify the response. sender: The pid of the sender so a reply can be made. client: The external entity that wrote the log entry that produced this stat. state_name: Th...
show how to properly replicate your data in Riak Core by making use -module(rts_write_fsm). -behavior(gen_fsm). -include("rts.hrl"). -export([start_link/5, start_link/6, write/3, write/4]). -export([init/1, code_change/4, handle_event/3, handle_info/3, handle_sync_event/4, terminate/3]). States -export(...
fa1477f41d7023536819108cb77b1df84eda03bfd709d896b4af3c46ae4c4525
spawnfest/eep49ers
wxSizerItem.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2020 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxSizerItem.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 2008 - 2020 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(wxSizerItem). -include("wxe.hrl"). -export([assignSizer/2,assignSpacer/2,assignSpacer/3,assignWindow/2,calcM...
2d2c69df892c90930ed7aa450f686db134db7c73d91484f97b462ba7cce8a4ec
t44k/clj-rocksdb
project.clj
(defproject kotyo/clj-rocksdb "0.1.7-SNAPSHOT" :description "Clojure bindings for facebook's rocksdbjni" :url "-rocksdb" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.rocksdb/rocksdbjni "6.8.1"] [byte-streams "0.2.4"]] :profiles {:dev {:dependencie...
null
https://raw.githubusercontent.com/t44k/clj-rocksdb/3f984bdc8dee080bca5343c2c45d8e89fb251866/project.clj
clojure
(defproject kotyo/clj-rocksdb "0.1.7-SNAPSHOT" :description "Clojure bindings for facebook's rocksdbjni" :url "-rocksdb" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.rocksdb/rocksdbjni "6.8.1"] [byte-streams "0.2.4"]] :profiles {:dev {:dependencie...
acbe16174315b5e7d3f4430ca62530f6504ccf5fd68246e64df9b300d62ec509
janestreet/lwt-async
test_lwt_signal.ml
Lightweight thread library for * Module Test_lwt_signal * Copyright ( C ) 2009 * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation , with linking exceptions ; ...
null
https://raw.githubusercontent.com/janestreet/lwt-async/c738e6202c1c7409e079e513c7bdf469f7f9984c/tests/react/test_lwt_signal.ml
ocaml
Lightweight thread library for * Module Test_lwt_signal * Copyright ( C ) 2009 * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation , with linking exceptions ; ...
177348bed4910b8c29b912b9ca5b27e83c3b371cf080bffc97b6787d728299c1
discus-lang/ddc
RunDCX.hs
module DDC.War.Job.RunDCX ( Spec (..) , Result (..) , resultSuccess , build) where import BuildBox.Command.File import BuildBox.Command.System import BuildBox.Build.Benchmark import BuildBox.Data.Physical import BuildBox.Pretty import BuildBox import System.Directory import System.F...
null
https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-tools/src/ddc-war/DDC/War/Job/RunDCX.hs
haskell
| Scratch dir to do the build in. | Compile a Haskell Source File ensure the output directory exists
module DDC.War.Job.RunDCX ( Spec (..) , Result (..) , resultSuccess , build) where import BuildBox.Command.File import BuildBox.Command.System import BuildBox.Build.Benchmark import BuildBox.Data.Physical import BuildBox.Pretty import BuildBox import System.Directory import System.F...
daf3dc2620907c2e7e141570a7c9e33b489cab20a0e6dc07dfeb37b04e19a3b5
rfkm/zou
codecov.clj
(require '[clojure.java.io :as io] '[cheshire.core :as json]) (def covfile "target/coverage/codecov.json") (def outfile "target/coverage/codecov_fixed.json") (defn fix-path [path] (str (.relativize (.toURI (io/file ".")) (.toURI (io/resource path))))) (defn fix-paths [m] (into {} (map (fn [[k v]] [(fix-...
null
https://raw.githubusercontent.com/rfkm/zou/228feefae3e008f56806589cb8019511981f7b01/etc/codecov.clj
clojure
Local Variables: End:
(require '[clojure.java.io :as io] '[cheshire.core :as json]) (def covfile "target/coverage/codecov.json") (def outfile "target/coverage/codecov_fixed.json") (defn fix-path [path] (str (.relativize (.toURI (io/file ".")) (.toURI (io/resource path))))) (defn fix-paths [m] (into {} (map (fn [[k v]] [(fix-...
44ca7a4c409f4ea3f27753aeefb77f5f01c92b1f464e165103b93e1cca0ad181
haskell-repa/repa
SegdSplit.hs
module Data.Array.Repa.Flow.Par.SegdSplit (splitSegsOnElems) where import Data.Array.Repa.Flow.Par.Distro import Control.Monad.ST import Control.Monad import Data.Bits (shiftR) import qualified Data.Vector.Unboxed as U import qualified Data.Vector.Unboxed.Mutable as...
null
https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/icebox/abandoned/repa-flow/Data/Array/Repa/Flow/Par/SegdSplit.hs
haskell
------------------------------------------------------------------------------------------------- | Split a segment descriptor across the gang, element wise. We try to put the same number of elements on each thread, which means that segments are sometimes split across threads. Example: @ segs: ----...
module Data.Array.Repa.Flow.Par.SegdSplit (splitSegsOnElems) where import Data.Array.Repa.Flow.Par.Distro import Control.Monad.ST import Control.Monad import Data.Bits (shiftR) import qualified Data.Vector.Unboxed as U import qualified Data.Vector.Unboxed.Mutable as...
b54f3fc4ed4860a565f691040fc191e860c2348bf9d560ff3200b2b540e24033
rtoal/ple
datatype_with_record.hs
import Control.Monad data Point = Point { x :: Double, y :: Double } data Polygon = Polygon { vertices :: [Point] } hypot :: Point -> Double hypot p = sqrt $ abs ((x p)^2 + (y p)^2) main = let southEast = Point {x=3, y= -4} origin = Point {x=0, y=0} south = Point {x=0, y= -4} ...
null
https://raw.githubusercontent.com/rtoal/ple/b24cab4de2beca6970833a09d05af6ef96ec3921/haskell/datatype_with_record.hs
haskell
import Control.Monad data Point = Point { x :: Double, y :: Double } data Polygon = Polygon { vertices :: [Point] } hypot :: Point -> Double hypot p = sqrt $ abs ((x p)^2 + (y p)^2) main = let southEast = Point {x=3, y= -4} origin = Point {x=0, y=0} south = Point {x=0, y= -4} ...
41ff36e6dd38116952306920e39e15732ed53e06821eae27ef683bd7fec7a24e
noinia/hgeometry
MouseExtra.hs
{-# LANGUAGE OverloadedStrings #-} module Miso.Subscription.MouseExtra where import Control.Monad.IO.Class import GHCJS.Marshal import JavaScript.Object import JavaScript.Object.Internal import Miso import Miso.FFI.Extra import Miso.String (MisoString) | Gets the mouse position relative to the element nam...
null
https://raw.githubusercontent.com/noinia/hgeometry/a6abecb1ce4a7fd96b25cc1a5c65cd4257ecde7a/hgeometry-web/src/Miso/Subscription/MouseExtra.hs
haskell
# LANGUAGE OverloadedStrings # consoleLog elem' consoleLog rect see -position-inside-autoscaled-svg
module Miso.Subscription.MouseExtra where import Control.Monad.IO.Class import GHCJS.Marshal import JavaScript.Object import JavaScript.Object.Internal import Miso import Miso.FFI.Extra import Miso.String (MisoString) | Gets the mouse position relative to the element named by the first argument relativeMouseSub ...
b6faa52484e6daeaac606cb6721290d807e67724a666ed2726a3aadf847043f7
bet365/erpc
erpc_tcp.erl
%% %% %CopyrightBegin% %% Copyright Hillside Technology Ltd. 2016 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by ap...
null
https://raw.githubusercontent.com/bet365/erpc/77c63d4398ad6baa07178e976d26eb95240e17a8/src/erpc_tcp.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Hillside Technology Ltd. 2016 . 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(erpc_tcp). -export([ listen/2, accept/1, connect/1, send/2, ...
0e1cbf409b156c2cb8700b7cf84385d381b852b18c8890804f4b82973e3d0f96
mtolly/onyxite-customs
Serialize.hs
# LANGUAGE DefaultSignatures # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} module Onyx.Harmonix.DTA.Serialize where import Control.Applicative import Control.Monad import Control.Monad.Codec import Control.Monad.Trans.Cla...
null
https://raw.githubusercontent.com/mtolly/onyxite-customs/0c8acd6248fe92ea0d994b18b551973816adf85b/haskell/packages/onyx-lib/src/Onyx/Harmonix/DTA/Serialize.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # so we can parse (fake {== $SONG_VERSION 0}) | Allows a string or symbol as input, and outputs to a string. | Allows a string or symbol as input, and outputs to a symbol.
# LANGUAGE DefaultSignatures # # LANGUAGE LambdaCase # module Onyx.Harmonix.DTA.Serialize where import Control.Applicative import Control.Monad import Control.Monad.Codec import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Reader import ...
634cc6ff0b4275f2a4e2252a7d7bd5d2579bf5fb3dbba7f1ff93233ea733739d
grin-compiler/grin
ConfluenceSpec.hs
# LANGUAGE QuasiQuotes # module Transformations.ConfluenceSpec where import Pipeline.Pipeline import Test.Hspec import Test.QuickCheck import Test.QuickCheck.Monadic import Grin.TH import Grin.PrimOpsPrelude import Test.Assertions import Data.List ( (\\) ) import Grin.Pretty (PP(..)) import Test.Test (genProg) impor...
null
https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/test/Transformations/ConfluenceSpec.hs
haskell
NOTE: This is a random test. This could make fail the build non-related to code changes. Needs better code generation.
# LANGUAGE QuasiQuotes # module Transformations.ConfluenceSpec where import Pipeline.Pipeline import Test.Hspec import Test.QuickCheck import Test.QuickCheck.Monadic import Grin.TH import Grin.PrimOpsPrelude import Test.Assertions import Data.List ( (\\) ) import Grin.Pretty (PP(..)) import Test.Test (genProg) impor...
c39bd384d7999b4d4ebf5e0ac5da6d0a81a72674e05d776ddf6b007bcf239e31
AshleyYakeley/Truth
Clock.hs
module Changes.World.Clock where import Changes.Core import Data.Fixed import Data.IORef import Data.Time import Shapes clockPremodel :: UTCTime -> NominalDiffTime -> Premodel (ROWUpdate UTCTime) () clockPremodel basetime interval pmrUpdatesTask update = do rec ref <- liftIO $ newIORef first first...
null
https://raw.githubusercontent.com/AshleyYakeley/Truth/d704b8baaa77dac002922eccecdd91018c4b7eef/Changes/changes-world/lib/Changes/World/Clock.hs
haskell
read once before opening, to keep value consistent while reference is open
module Changes.World.Clock where import Changes.Core import Data.Fixed import Data.IORef import Data.Time import Shapes clockPremodel :: UTCTime -> NominalDiffTime -> Premodel (ROWUpdate UTCTime) () clockPremodel basetime interval pmrUpdatesTask update = do rec ref <- liftIO $ newIORef first first...
14e9f59ef55c9a083ceddfd26b0680719d50b351ff984414edbcd8fe640520fd
ocamllabs/ocaml-modular-implicits
t021-pushconst1.ml
let _ = () in 1;; * 0 1 PUSHCONST1 2 POP 1 4 ATOM0 5 SETGLOBAL T021 - pushconst1 7 STOP * 0 CONST0 1 PUSHCONST1 2 POP 1 4 ATOM0 5 SETGLOBAL T021-pushconst1 7 STOP **)
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-ocaml/t021-pushconst1.ml
ocaml
let _ = () in 1;; * 0 1 PUSHCONST1 2 POP 1 4 ATOM0 5 SETGLOBAL T021 - pushconst1 7 STOP * 0 CONST0 1 PUSHCONST1 2 POP 1 4 ATOM0 5 SETGLOBAL T021-pushconst1 7 STOP **)
337f994c63b5c1e170f4979487cc555ed7032dde05c98f36d0a3ffd4810eece6
mirage/irmin
import.ml
* Copyright ( c ) 2021 < > * Copyright ( c ) 2018 - 2022 Tarides < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * *...
null
https://raw.githubusercontent.com/mirage/irmin/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/src/irmin-containers/import.ml
ocaml
* Copyright ( c ) 2021 < > * Copyright ( c ) 2018 - 2022 Tarides < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * *...
ac005829d00189c52e5ee985dac7be48c170c9c482b859a9766f1ae9abf33a62
metaocaml/ber-metaocaml
labels.ml
(* TEST * expect *) PR#5835 let f ~x = x + 1;; f ?x:0;; [%%expect{| val f : x:int -> int = <fun> Line 2, characters 5-6: 2 | f ?x:0;; ^ Warning 43: the label x is not optional. - : int = 1 |}];; PR#6352 let foo (f : unit -> unit) = ();; let g ?x () = ();; foo ((); g);; [%%expect{| val foo : (unit -> u...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-misc/labels.ml
ocaml
TEST * expect PR#5748 fails fails More examples principality warning
PR#5835 let f ~x = x + 1;; f ?x:0;; [%%expect{| val f : x:int -> int = <fun> Line 2, characters 5-6: 2 | f ?x:0;; ^ Warning 43: the label x is not optional. - : int = 1 |}];; PR#6352 let foo (f : unit -> unit) = ();; let g ?x () = ();; foo ((); g);; [%%expect{| val foo : (unit -> unit) -> unit = <fun> va...
21b1202fe95b69c6927e5c50c5aa6e5e3bed8d789b13f45738939f661305f0dd
zanderso/cil-template
tut3.ml
open Cil open Pretty open Tututil module L = List module E = Errormsg module IH = Inthash module DF = Dataflow let debug = ref false type oekind = Top | Odd | Even | Bottom type varmap = int * (varinfo * oekind) let id_of_vm (vm : varmap) : int = fst vm let vi_of_vm (vm : varmap) : vari...
null
https://raw.githubusercontent.com/zanderso/cil-template/fc2a0548b2644c53c4840df2a09c1c90b2af2aee/src/tut3.ml
ocaml
open Cil open Pretty open Tututil module L = List module E = Errormsg module IH = Inthash module DF = Dataflow let debug = ref false type oekind = Top | Odd | Even | Bottom type varmap = int * (varinfo * oekind) let id_of_vm (vm : varmap) : int = fst vm let vi_of_vm (vm : varmap) : vari...
facf973be060b2fdcd0bcf40f0687cb54cbeb9913aaded5e8128ffe85b109185
fpco/stackage-server
Blog.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # module Handler.Blog ( getBlogHomeR , getBlogPostR , getBlogFeedR ) where import Data.WebsiteContent import Import import Yesod.AtomFeed (atomLink) import RIO.Time (getCurrentTime) getAddPreview :: Handler (Route App -> (Route...
null
https://raw.githubusercontent.com/fpco/stackage-server/b707b5a0d72c44a3134a305b628c3f0b28db2697/src/Handler/Blog.hs
haskell
# LANGUAGE NoImplicitPrelude # # LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # module Handler.Blog ( getBlogHomeR , getBlogPostR , getBlogFeedR ) where import Data.WebsiteContent import Import import Yesod.AtomFeed (atomLink) import RIO.Time (getCurrentTime) getAddPreview :: Handler (Route App -> (Route...
42474954bcb5042134aa5f20fc9483aff993467376eae071433fab47ef47c913
danabr/visualize.erl
gather.erl
-module(gather). -export([dependencies/1, dependencies/2]). % Same as dependencies(App, internal). % This will gather only interdependencies between the modules, not % dependencies on external modules. dependencies(App) when is_list(App) -> dependencies(App, internal). Gather module dependencies in App . The s...
null
https://raw.githubusercontent.com/danabr/visualize.erl/abf1d35a2dcbb274792e517c0e670c40688c162a/src/dependencies/gather.erl
erlang
Same as dependencies(App, internal). This will gather only interdependencies between the modules, not dependencies on external modules. compiled with the debug_info flag, or otherwise we can not extract info. Filter = full | not_loaded | internal Remove empty dependency lists Not compiled with debug_info
-module(gather). -export([dependencies/1, dependencies/2]). dependencies(App) when is_list(App) -> dependencies(App, internal). Gather module dependencies in App . The source code in App must have been dependencies(App, Filter) when is_list(App) andalso (Filter =:= internal orel...
a85d7138b31c2407b97ffb38f277c44a7e53850a7f0abe11f8e5bb06cb8ccb86
karamellpelle/grid
Sound.hs
grid is a game written in Haskell Copyright ( C ) 2018 -- -- This file is part of grid. -- -- grid is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or -- (at your optio...
null
https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/source/MEnv/Sound.hs
haskell
This file is part of grid. grid is free software: you can redistribute it and/or modify (at your option) any later version. grid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GN...
grid is a game written in Haskell Copyright ( C ) 2018 it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License module MEnv.Sound ( #ifdef GRID_PLATFORM_IOS ...
f2ede28d647a56d345aa26b51b98769d6173975515263a460336bffbe4fd17b7
racket/algol60
tool.rkt
#lang racket/base (require drracket/tool racket/gui racket/unit racket/class "parse.rkt" "simplify.rkt" "compile.rkt" compiler/embed string-constants errortrace/errortrace-lib) (provide tool@) (define base-importing-stx (dynamic-require ...
null
https://raw.githubusercontent.com/racket/algol60/e4aebcaff66f121cf52a1f58f4f7bd285eded728/tool.rkt
racket
needs to be filled in!
#lang racket/base (require drracket/tool racket/gui racket/unit racket/class "parse.rkt" "simplify.rkt" "compile.rkt" compiler/embed string-constants errortrace/errortrace-lib) (provide tool@) (define base-importing-stx (dynamic-require ...
029dd1fb6fa0775e44ac8b7f0fe6b4868fe41d124503e69cb337d4519b8ffad1
michaelballantyne/syntax-spec
info.rkt
#lang info (define name "syntax-spec") (define version "0.1") (define deps '("ee-lib" "paren-shape" "rackunit-lib")) (define build-deps '("racket-doc" "scribble-lib" "drracket")) (define scribblings '(("scribblings/main.scrbl" () (experimental)))) (define compile-omit-paths '("design" "de...
null
https://raw.githubusercontent.com/michaelballantyne/syntax-spec/0a9d7599afb2f90a6dcfd45e625d117191a85b3d/info.rkt
racket
#lang info (define name "syntax-spec") (define version "0.1") (define deps '("ee-lib" "paren-shape" "rackunit-lib")) (define build-deps '("racket-doc" "scribble-lib" "drracket")) (define scribblings '(("scribblings/main.scrbl" () (experimental)))) (define compile-omit-paths '("design" "de...
edf80c6f3529cec74098f6ecbde98ca4ffbea69e422613237906bbf6cc5d0f99
jarmuszz/dots
meta.lisp
(defmacro strcon (&rest body) "Concatenate strings" `(concatenate 'string ,@body)) (defmacro shell-cmd-neol (cmd &key (prefix "") (affix "")) "Runs shell command and returns the result without the EOL. Can be formatted with the :PREFIX and :AFFIX arguments." `(run-shell-command (strcon "echo -n " ,prefix "$(" ...
null
https://raw.githubusercontent.com/jarmuszz/dots/90f2378b96c021ab24c95ef11a2b89f2f3817a89/stumpwm/internal/meta.lisp
lisp
``Anonymous Keymap'' for some reason...
(defmacro strcon (&rest body) "Concatenate strings" `(concatenate 'string ,@body)) (defmacro shell-cmd-neol (cmd &key (prefix "") (affix "")) "Runs shell command and returns the result without the EOL. Can be formatted with the :PREFIX and :AFFIX arguments." `(run-shell-command (strcon "echo -n " ,prefix "$(" ...
bfe2dbe5c82908978aa3efd6ec16e29470f498ef5a88ff068a02d409ec705c29
bootstrapworld/curr
translated.rkt
;; ;;The section headers refer to the sections of the output webpages generated. Note that ; there are comments for translators to indicate what each phrase is and where exactly it ; is located, and there are separate comments for developers to see where the statements ; are generated in the back end. ;Translator; Cap...
null
https://raw.githubusercontent.com/bootstrapworld/curr/443015255eacc1c902a29978df0e3e8e8f3b9430/lib/langs/en-us/translated.rkt
racket
The section headers refer to the sections of the output webpages generated. Note that there are comments for translators to indicate what each phrase is and where exactly it is located, and there are separate comments for developers to see where the statements are generated in the back end. Translator; Capitalizati...
( (btn-flip "flip") (lulu-link "") These should be the titles of languages as spoken in this language ( right now , English ) (en-us "English") (es-mx "Spanish") (copyright-names-alg "Bootstrap:Algebra by Emmanuel Schanzer, Emma Youndtsmith, Kathi Fisler, and Shriram Krish...
95377d6c811c56c06c017df1d43cd41ae5be6795b4d3762da86304cc0ea4148f
morphismtech/squeal
Inline.hs
| Module : Squeal . PostgreSQL.Expression . Inline Description : inline expressions Copyright : ( c ) , 2019 Maintainer : Stability : experimental inline expressions Module: Squeal.PostgreSQL.Expression.Inline Description: inline expressions Copyright: (c) Eitan Chatav, 2019 Maintainer: Stability: ex...
null
https://raw.githubusercontent.com/morphismtech/squeal/663ff2851dd03df3624a7e8c312b2d35121a51c7/squeal-postgresql/src/Squeal/PostgreSQL/Expression/Inline.hs
haskell
* Inline (-9223372036854775808 :: int8) even though it's a valid lowest value for int8 | Lifts `Inline` to `NullType`s. | Lifts `Inline` to fields. ^ record | Lifts `Inline` to a column entry | Haskell record field as a inline column ^ record
| Module : Squeal . PostgreSQL.Expression . Inline Description : inline expressions Copyright : ( c ) , 2019 Maintainer : Stability : experimental inline expressions Module: Squeal.PostgreSQL.Expression.Inline Description: inline expressions Copyright: (c) Eitan Chatav, 2019 Maintainer: Stability: ex...
3d3f04608a081b3000866efaaf7f1375661aa83efc1774276847b4f054855128
dizengrong/erlang_game
lager_file_backend.erl
Copyright ( c ) 2011 - 2012 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the License at %% %% -2.0 %% %% Unless required...
null
https://raw.githubusercontent.com/dizengrong/erlang_game/4598f97daa9ca5eecff292ac401dd8f903eea867/gerl_robot/deps/lager/src/lager_file_backend.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 permissions and limitations under the License. @doc File backend for lager, w...
Copyright ( c ) 2011 - 2012 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY ...
1b893b8e6cd33e0d4c57effd6743ccb670db8f6d3fd60dd1b7fa88f79df65515
nikolap/reframe-utils
core.cljs
(ns reframe-utils.core (:require [re-frame.core :refer [reg-sub reg-event-db reg-event-fx reg-fx dispatch]] [ajax.core :refer [GET HEAD POST PUT DELETE OPTIONS TRACE PATCH]] [goog.string :as gstring])) (def ^:private filter-first (comp first filter)) (defn- collify "Given an item, returns the item if ...
null
https://raw.githubusercontent.com/nikolap/reframe-utils/0ba2ab6302ef4ff35320a75f5342b496a265e567/src/reframe_utils/core.cljs
clojure
SUBSCRIPTION UTILITIES EVENT/HANDLER UTILITIES AJAX UTILITIES GENERAL UTILITIES
(ns reframe-utils.core (:require [re-frame.core :refer [reg-sub reg-event-db reg-event-fx reg-fx dispatch]] [ajax.core :refer [GET HEAD POST PUT DELETE OPTIONS TRACE PATCH]] [goog.string :as gstring])) (def ^:private filter-first (comp first filter)) (defn- collify "Given an item, returns the item if ...
75ad664522edc51c280c941726474e35857640d6472844c663561483bb1eecb3
alan-j-hu/camyll
filesystem.ml
(* If the directory already exists, does nothing. *) let touch_dir name = if not (Sys.file_exists name) then Sys.mkdir name 0o777 let split_re = Re.compile (Re.str Filename.dir_sep) (* Creates all directories in the current path. *) let create_dirs path = let split = Re.split split_re path in ignore (List.fold...
null
https://raw.githubusercontent.com/alan-j-hu/camyll/7caa78b2930e77c40c3906f383a5264a99588821/src/filesystem.ml
ocaml
If the directory already exists, does nothing. Creates all directories in the current path.
let touch_dir name = if not (Sys.file_exists name) then Sys.mkdir name 0o777 let split_re = Re.compile (Re.str Filename.dir_sep) let create_dirs path = let split = Re.split split_re path in ignore (List.fold_left (fun path name -> let path = Filename.concat path name in touch_dir path;...
d6cfa39034e613d4414e55304df2b3b19641789e29419f30210e1e0df8258b64
chenyukang/eopl
28.scm
Food for thought : imagine a CPS transformer for Scheme programs , and imagine that you apply it to the first interpreter from chapter 3 . ;; What would the result look like?
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch6/28.scm
scheme
What would the result look like?
Food for thought : imagine a CPS transformer for Scheme programs , and imagine that you apply it to the first interpreter from chapter 3 .
4c5dcd82b55899b489bdcac5c182d100f0cdb36f6a3c1cd3dfb5be41352abb88
Zulu-Inuoe/clution
version.lisp
(uiop/package:define-package :uiop/version (:recycle :uiop/version :uiop/utility :asdf) (:use :uiop/common-lisp :uiop/package :uiop/utility) (:export #:*uiop-version* #:parse-version #:unparse-version #:version< #:version<= ;; version support, moved from uiop/utility #:next-version #:deprecated-functi...
null
https://raw.githubusercontent.com/Zulu-Inuoe/clution/b72f7afe5f770ff68a066184a389c23551863f7f/cl-clution/qlfile-libs/uiop-3.3.1/version.lisp
lisp
version support, moved from uiop/utility deprecation control tell some implementations to use the compiler-macro
(uiop/package:define-package :uiop/version (:recycle :uiop/version :uiop/utility :asdf) (:use :uiop/common-lisp :uiop/package :uiop/utility) (:export #:*uiop-version* #:next-version #:deprecated-function-style-warning #:deprecated-function-warning #:deprecated-function-error #:deprecated-function-shou...
3c646d8caa1d845dc0c5c8fbb0809f9d49e2c9c6993d1f69c2ded31901e49f40
fumieval/rhythm-game-tutorial
music-only.hs
# LANGUAGE FlexibleContexts # import Call import Audiovisual.Deck as Deck import Control.Monad.State.Strict import Control.Lens main = runCallDefault $ do music <- prepareMusic "assets/Monoidal Purity.wav" playMusic music stand type Music = Instance (StateT (Deck Stereo) IO) IO prepareMusic :: Call => FilePath...
null
https://raw.githubusercontent.com/fumieval/rhythm-game-tutorial/10c36f9594e562dc086b23aee641c6b0f7c5e53c/src/music-only.hs
haskell
# LANGUAGE FlexibleContexts # import Call import Audiovisual.Deck as Deck import Control.Monad.State.Strict import Control.Lens main = runCallDefault $ do music <- prepareMusic "assets/Monoidal Purity.wav" playMusic music stand type Music = Instance (StateT (Deck Stereo) IO) IO prepareMusic :: Call => FilePath...
135893ddd2c462e407375c34c817be4f6b5ea0272d88a8c70d31ad4f50914bfb
aantron/luv
udp_hello_world.ml
let () = let address = Luv.Sockaddr.ipv4 "127.0.0.1" 7000 |> Result.get_ok in let client = Luv.UDP.init () |> Result.get_ok in let message = Luv.Buffer.from_string "Hello, world!" in Luv.UDP.send client [message] address ignore; Luv.UDP.recv_start client begin function | Error e -> Printf.eprintf ...
null
https://raw.githubusercontent.com/aantron/luv/4b49d3edad2179c76d685500edf1b44f61ec4be8/example/udp_hello_world.ml
ocaml
let () = let address = Luv.Sockaddr.ipv4 "127.0.0.1" 7000 |> Result.get_ok in let client = Luv.UDP.init () |> Result.get_ok in let message = Luv.Buffer.from_string "Hello, world!" in Luv.UDP.send client [message] address ignore; Luv.UDP.recv_start client begin function | Error e -> Printf.eprintf ...
29a15fbae91e522e19e517a0db89fe745920b3cfa0d7a6f2282c2199553dad66
matijapretnar/eff
print.ml
(** Pretty-printing functions *) let () = Format.pp_set_max_indent !Config.error_formatter 1000; Format.pp_set_margin !Config.error_formatter 1000 let message ~verbosity ?loc ~header fmt = if verbosity <= !Config.verbosity then match loc with | Some loc -> Format.fprintf !Config.error_formatter ...
null
https://raw.githubusercontent.com/matijapretnar/eff/0b0ec7a83e7db4d040ed8fdfc1ac6e3c0f344be1/src/00-utils/print.ml
ocaml
* Pretty-printing functions
let () = Format.pp_set_max_indent !Config.error_formatter 1000; Format.pp_set_margin !Config.error_formatter 1000 let message ~verbosity ?loc ~header fmt = if verbosity <= !Config.verbosity then match loc with | Some loc -> Format.fprintf !Config.error_formatter ("%s (%t):@," ^^ fmt ^^...
bd2a3109d272747cb1e0e3cf39cb7e468f8ad8e921b6fb3e7c1b9a99eb621b67
Deducteam/zenon_modulo
print.ml
Copyright 2004 INRIA Version.add "$Id$";; open Expr;; open Mlproof;; open Namespace;; open Printf;; type output = Buff of Buffer.t | Chan of out_channel;; let mybuf = Buffer.create 100;; let mychan = ref stdout;; let flush () = Buffer.output_buffer !mychan mybuf; Buffer.clear mybuf;; let printf = ();; (* FIXM...
null
https://raw.githubusercontent.com/Deducteam/zenon_modulo/9534fbdca0d009a513cb40d9a5a2a98329835c63/print.ml
ocaml
FIXME DEBUG ... ... ... if t == type_iota then print_var b v else | Eex (v, e, _) when get_type v == type_iota -> pr "(E. ((%a) " print_var v; expr o e; pr "))"; | Etau (v, e, _) when get_type v == type_iota -> (*pr "(t. ((%a) " print_var v; expr o e; pr "))"; | Eex (Evar (v, _) as v...
Copyright 2004 INRIA Version.add "$Id$";; open Expr;; open Mlproof;; open Namespace;; open Printf;; type output = Buff of Buffer.t | Chan of out_channel;; let mybuf = Buffer.create 100;; let mychan = ref stdout;; let flush () = Buffer.output_buffer !mychan mybuf; Buffer.clear mybuf;; match o with | Chan ...
72fd9ff5474728a2b5f4e1a1920f56cb2ac0a36f6329e6187a3f157b4ee6d0e3
PEZ/rich4clojure
problem_171.clj
(ns rich4clojure.medium.problem-171 (:require [hyperfiddle.rcf :refer [tests]])) ;; = Intervals = By 4Clojure user : aiba ;; Difficulty: Medium ;; ;; Write a function that takes a sequence of integers and ;; returns a sequence of "intervals". Each interval is a a vector of two integers , start and end , such th...
null
https://raw.githubusercontent.com/PEZ/rich4clojure/482f98f95408639bf3ac7a96d59b33efb443db27/src/rich4clojure/medium/problem_171.clj
clojure
= Intervals = Difficulty: Medium Write a function that takes a sequence of integers and returns a sequence of "intervals". Each interval is a a contained in the input sequence. Share your solution, and/or check how others did it:
(ns rich4clojure.medium.problem-171 (:require [hyperfiddle.rcf :refer [tests]])) By 4Clojure user : aiba vector of two integers , start and end , such that all integers between start and end ( inclusive ) are (def __ :tests-will-fail) (comment ) (tests (__ [1 2 3]) := [[1 3]] (__ [10 9 8 1 2 3]) :=...
75742e6cc4e2faa083fb716ad591feab9210a7da6146ed95ffb8b5fca6c9e31e
clojurians-org/haskell-example
ExampleData.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE QuasiQuotes # module Common.ExampleData where import Common.Types import Common.Class import Prelude import qualified Data.Text as T import qualified Data.Text.IO as T import Text.Heredoc (str) import qualified Data.Tree as TR import Data.Default (def) import Data.String.Con...
null
https://raw.githubusercontent.com/clojurians-org/haskell-example/c96b021bdef52a121e04ea203c8c3e458770a25a/conduit-ui/common/src/Common/ExampleData.hs
haskell
# LANGUAGE NoImplicitPrelude # # LANGUAGE QuasiQuotes # module Common.ExampleData where import Common.Types import Common.Class import Prelude import qualified Data.Text as T import qualified Data.Text.IO as T import Text.Heredoc (str) import qualified Data.Tree as TR import Data.Default (def) import Data.String.Con...
8d3b360cae07b2db778424aa6cbdc8b5c555fc506efbafff0821a381222d28a0
divipp/emulator-stunts
Emulate.hs
module Emulate where import Data.Word import Data.Bits hiding (bit) import Data.List import Data.Monoid import Data.Maybe import qualified Data.ByteString as BS import qualified Data.IntMap.Strict as IM import qualified Data.IntSet as IS import qualified Data.Vector.Storable as US import qualified Data.Vector.Storable...
null
https://raw.githubusercontent.com/divipp/emulator-stunts/5f7077ff04f44af24c6a95504a52818b73a7f3b1/emulate8086/Emulate.hs
haskell
import Debug.Trace ------------------------------------ TODO : tye the knot TODO: tye the knot TODO cs_ <- use cs ip_ <- use ip when (cs_ == cs') $ do checkInt 1 evalBlocks cs' ip_ e ca <- use'' cache ad-hoc hacking for stunts! trace "." . ---------...
module Emulate where import Data.Word import Data.Bits hiding (bit) import Data.List import Data.Monoid import Data.Maybe import qualified Data.ByteString as BS import qualified Data.IntMap.Strict as IM import qualified Data.IntSet as IS import qualified Data.Vector.Storable as US import qualified Data.Vector.Storable...
aef7862cb4c8e64331bfe9513be9a96e621cd2665257979eae2ddafd6c903404
stephenpascoe/hs-arrow
RecordBatchBuilder.hs
| Copyright : , and License : LGPL-2.1 Maintainer : ( ) /No description available in the introspection data./ Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria () /No description available in the introspection...
null
https://raw.githubusercontent.com/stephenpascoe/hs-arrow/86c7c452a8626b1d69a3cffd277078d455823271/gi-arrow/GI/Arrow/Objects/RecordBatchBuilder.hs
haskell
* Exported types * Methods ** getField #method:getField# ** getInitialCapacity #method:getInitialCapacity# ** getNFields #method:getNFields# ** getSchema #method:getSchema# ** setInitialCapacity #method:setInitialCapacity# * Properties ** recordBatchBuilder #attr:recordBatchBuilder# | /No description availabl...
| Copyright : , and License : LGPL-2.1 Maintainer : ( ) /No description available in the introspection data./ Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria () /No description available in the introspection...
f7f3eddf2d8fe8f09337f5d7604b0c96a37768e491a36af900b2d640db0fe948
goldfirere/glambda
Eval.hs
# LANGUAGE RankNTypes , TypeOperators , ScopedTypeVariables , DataKinds , TypeFamilies , PolyKinds , GADTs # DataKinds, TypeFamilies, PolyKinds, GADTs #-} # OPTIONS_GHC -fwarn - incomplete - patterns # -------------------------------------------------------------...
null
https://raw.githubusercontent.com/goldfirere/glambda/b1bd8306ccbb2aef865e8b092aed0b26aa5ba0d6/src/Language/Glambda/Eval.hs
haskell
--------------------------------------------------------------------------- | Module : Language.Glambda.Eval License : BSD-style (see LICENSE) Stability : experimental Glambda expression evaluators for checked expressions. -------------------------------------------------------------------------- ...
# LANGUAGE RankNTypes , TypeOperators , ScopedTypeVariables , DataKinds , TypeFamilies , PolyKinds , GADTs # DataKinds, TypeFamilies, PolyKinds, GADTs #-} # OPTIONS_GHC -fwarn - incomplete - patterns # Copyright : ( C ) 2015 Maintainer : ( ) mo...
9d07e845fe4cd25bbe26702ad35999291aa04e47760edbc0f396281fbbbf1d60
crategus/cl-cffi-gtk
glib.version.lisp
;;; ---------------------------------------------------------------------------- glib.version.lisp ;;; The documentation of this file is taken from the GLib 2.68 Reference Manual and modified to document the Lisp binding to the GLib library . ;;; See <>. The API documentation of the Lisp binding is available fr...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/27bdcefb703e7ae144f506929f1935468b6987ad/glib/glib.version.lisp
lisp
---------------------------------------------------------------------------- See <>. The API documentation of the Lisp binding is This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License for Lisp License, or (at your option) any later versi...
glib.version.lisp The documentation of this file is taken from the GLib 2.68 Reference Manual and modified to document the Lisp binding to the GLib library . available from < -cffi-gtk/ > . Copyright ( C ) 2009 - 2011 Copyright ( C ) 2011 - 2021 as published by the Free Software Foundation , either ve...
7d19edf04dda53b8d856481c6fc2576a9f11c606d73a8825c72c7cc8df9c5bb1
sgbj/MaximaSharp
schatc.lisp
-*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; The data in this file contains enhancments. ;;;;; ;;; ;;;;; ...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/schatc.lisp
lisp
Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; The data in this file contains enhancments. ;;;;; ;;;;; ; ; ; ; All rights reserved ;;;;; ; ; thesis is ava...
(in-package :maxima) (macsyma-module schatc) I think this is described in Chapter 3 of thesis , " Symbolic Integration " , MIT - LCS - TR-047 . A scanned version of the A version with the missing pages is available ( 2008 - 12 - 14 ) from is Yiddish for " matchmaker " and here is a (declare-top (spec...
a51526136f2f5dfd17d00a4dbd430988bf90146b096d75952f1a29f5cf8e8063
0xc1c4da/narjure
concept.clj
(ns narjure.memory-management.concept (:require [narjure.actor.utils :refer [defactor]] [taoensso.timbre :as t]) (:refer-clojure :exclude [promise await])) (declare concept task-req belief-req inference-req persistence-req) (defactor concept "State is a map {:name :budget :activation-level :belief-tab...
null
https://raw.githubusercontent.com/0xc1c4da/narjure/0fb047d8b2ccf0c5591703dde5afd502df49f308/src/narjure/memory_management/concept.clj
clojure
(ns narjure.memory-management.concept (:require [narjure.actor.utils :refer [defactor]] [taoensso.timbre :as t]) (:refer-clojure :exclude [promise await])) (declare concept task-req belief-req inference-req persistence-req) (defactor concept "State is a map {:name :budget :activation-level :belief-tab...
25cb7f5ebf1a0ded3a4a8872b2729f5ae50b5f3e83ff994cf82a4c3545d07b05
TrustInSoft/tis-kernel
eval_terms_util.ml
(**************************************************************************) (* *) This file is part of . (* *) Copyright ( C ) 2013 - 201...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/value/legacy/eval_terms_util.ml
ocaml
************************************************************************ ...
This file is part of . Copyright ( C ) 2013 - 2017 is released under GPLv2 open Cil_types open Eval_terms let pp_eval_error fmt e = if e <> CAlarm then Format.fprintf fmt "@ (%a)" pretty_logic_evaluation_error e let froms_contents env p...
72e8a456e77849d98ddb9ffde56841a15b4ba5a791e482ffa03da792034d9a78
facebook/pyre-check
watchman.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/pyre-check/536e4a2c008726d0ce5589eaef681166923b6183/source/server/watchman.ml
ocaml
This module includes the API to communicate with watchman, the primary file watching service used on pyre. Change indicator file needs to be watched, since we rely on it to detect changes in unwatched dependencies. We do not need to track these files by extensions since they are already tracked by ...
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
3118497937c9e0ec73bdd7cf0152484f6d090458973e5bdd56df0123dad82c87
acl2/acl2
rp-rewriter@useless-runes.lsp
(RP::REMOVE-RP-FROM-BINDINGS (5 5 (:REWRITE DEFAULT-CAR)) (4 4 (:REWRITE DEFAULT-CDR)) ) (RP::QUOTE-LISTP) (RP::RP-APPLY-BINDINGS) (RP::RP-MATCH-LHS (132 6 (:DEFINITION LENGTH)) (121 58 (:REWRITE DEFAULT-+-2)) (111 39 (:REWRITE RP::IS-RP-IMPLIES)) (108 6 (:DEFINITION LEN)) (81 58 (:REWRITE DEFAULT-+-1)) (72 72...
null
https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/projects/rp-rewriter/.sys/rp-rewriter%40useless-runes.lsp
lisp
(RP::REMOVE-RP-FROM-BINDINGS (5 5 (:REWRITE DEFAULT-CAR)) (4 4 (:REWRITE DEFAULT-CDR)) ) (RP::QUOTE-LISTP) (RP::RP-APPLY-BINDINGS) (RP::RP-MATCH-LHS (132 6 (:DEFINITION LENGTH)) (121 58 (:REWRITE DEFAULT-+-2)) (111 39 (:REWRITE RP::IS-RP-IMPLIES)) (108 6 (:DEFINITION LEN)) (81 58 (:REWRITE DEFAULT-+-1)) (72 72...
81faaa92e12eadc317748ad3c7195c621397edf6b7ab1c7c278544a9fa8aba2e
dongcarl/guix
gstreamer.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2013 , 2015 < > Copyright © 2014 < > Copyright © 2015 , 2016 < > Copyright © 2015 , 2018 < > Copyright © 2016 , 2017 < > Copyright © 2016 , 2018 < > Copyright © 2017 < > Copyright © 2018 , 2020 < > Copyright ...
null
https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/packages/gstreamer.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2013 , 2015 < > Copyright © 2014 < > Copyright © 2015 , 2016 < > Copyright © 2015 , 2018 < > Copyright © 2016 , 2017 < > Copyright © 2016 , 2018 < > Copyright © 2017 < > Copyright © 2018 , 2020 < > Copyright © 2019 , 2020 < > Copyright © 2020 < > Copyri...
9369f70695de0aab289e3c549260f0946229a24f9d5bffdadfc7cab4fc48da7b
OCamlPro/socaml-analyzer
envs.ml
open Common_types open Data (* Environment management *) let is_bottom = function | Bottom -> true | _ -> false let bottom = Bottom let empty = Env Idm.empty (* Joining and widening helper *) let join_or_widen union e1 e2 = match e1, e2 with | Bottom, e | e, Bottom -> e | Env i1, Env i2 -> Env ...
null
https://raw.githubusercontent.com/OCamlPro/socaml-analyzer/f39121e1d05a9e5bb6f005497eaaa5a67f256d4c/src/data/envs.ml
ocaml
Environment management Joining and widening helper Environment joining Environment joining with widening Environment comparison Garbage collection
open Common_types open Data let is_bottom = function | Bottom -> true | _ -> false let bottom = Bottom let empty = Env Idm.empty let join_or_widen union e1 e2 = match e1, e2 with | Bottom, e | e, Bottom -> e | Env i1, Env i2 -> Env ( Idm.merge ( fun _ v1 v2 -> match v1, v...
b4b336da0f642870204083809cd562e21cc5ec59133caad17e4fe44ae5b126b1
bryal/carth
FreeVars.hs
# LANGUAGE MultiParamTypeClasses # module FreeVars where import qualified Data.Set as Set import Data.Set (Set) class Ord b => FreeVars a b where freeVars :: a -> Set b fvApp :: FreeVars e t => e -> [e] -> Set t fvApp f as = Set.unions (map freeVars (f : as)) fvIf :: FreeVars e t => e -> e -> e -> Set t fvIf p...
null
https://raw.githubusercontent.com/bryal/carth/d53f6c00b5799f09ce3e1ada301b09b788807c05/src/FreeVars.hs
haskell
# LANGUAGE MultiParamTypeClasses # module FreeVars where import qualified Data.Set as Set import Data.Set (Set) class Ord b => FreeVars a b where freeVars :: a -> Set b fvApp :: FreeVars e t => e -> [e] -> Set t fvApp f as = Set.unions (map freeVars (f : as)) fvIf :: FreeVars e t => e -> e -> e -> Set t fvIf p...
580f04fa54ad7f89aaad9eecdf642c699d268231beb5d1c1f175c13f4e3bfca2
mirage/ocaml-dns-forward
rpc.mli
* Copyright ( C ) 2016 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
null
https://raw.githubusercontent.com/mirage/ocaml-dns-forward/1b253cbf0e1c15b80facbb13ced762a0dfa99bdf/lib_test/rpc.mli
ocaml
* An in-memory RPC simulation * Return a list of [server address, number of clients still connected]
* Copyright ( C ) 2016 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
5e1555b11310ac5fa7e70805929d8cd773bd72051c7a281f54cb41415f07efb1
nilcons/hflags
TupMain.hs
module TupMain (get) where import qualified Tup get :: (a, a) -> a get = Tup.get
null
https://raw.githubusercontent.com/nilcons/hflags/d040d5bd9e6ceccc0de4466bd54a5ae19dcc9a58/examples/package/TupMain.hs
haskell
module TupMain (get) where import qualified Tup get :: (a, a) -> a get = Tup.get
9047ceec5d5db13b106765df429c1407a96e3041c8dfc0591d97770a685df803
sebashack/servantRestfulAPI
Interpreter.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TypeFamilies # {-# LANGUAGE TypeOper...
null
https://raw.githubusercontent.com/sebashack/servantRestfulAPI/e625535d196acefaff4f5bf03108816be668fe4d/libs/Domains/BookingDomain/Reservation/Interpreter.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # merge number rooms to validate. merge the assigned rooms to validate. Given a token and a reservationId, get a reservation which matches eith...
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # LANGUAGE ScopedTypeVariables # module Domains.BookingDomain.Reservation.Interpreter ( reservationServer ) where import Control.Monad.Exce...
d330771d6d2ce2bd55b46d15c368b2d94792e010734f834a1f3f55b89357673b
racket/drracket
ts.rkt
#lang at-exp racket/base (require scribble/decode scribble/manual) (define (phase n) (make-splice @list{This function can only be called in phase @(number->string n) (see @secref["implementing-tools"] for details).})) (provide phase)
null
https://raw.githubusercontent.com/racket/drracket/2d7c2cded99e630a69f05fb135d1bf7543096a23/drracket/drracket/private/ts.rkt
racket
#lang at-exp racket/base (require scribble/decode scribble/manual) (define (phase n) (make-splice @list{This function can only be called in phase @(number->string n) (see @secref["implementing-tools"] for details).})) (provide phase)
fd6d4da3c47ec2bfbb6820fa6888ca4dc1c04562fdef57a8d511811172fef1d7
klakplok/goji
PPrintTest.ml
(**************************************************************************) (* *) (* PPrint *) (* *) , INRIA...
null
https://raw.githubusercontent.com/klakplok/goji/78da18fafdd32910fc85f334210c9cd3aae2f974/pprint-20130324/src/PPrintTest.ml
ocaml
************************************************************************ PPrint ...
, INRIA Paris - Rocquencourt , IT University of Copenhagen Copyright 2007 - 2013 INRIA . All rights reserved . This file is distributed under the terms of the CeCILL - C license , as described open PPrint let document = prefix 2 1 ...
9ff47a27f0ee06cefdd93b45b303dfb3f74c80df55ab67bb1f82ad74ebe1905f
leopiney/tensor-safe
Layers.hs
| This module exposes all Layers declared at TensorSafe . Layers . module TensorSafe.Layers ( BatchNormalization, Concatenate (..), Conv2D, Dense, Dropout, Flatten, GlobalAvgPooling2D, Input, LSTM, MaxPooling, Relu, Sigmoid, Softmax, ZeroPadding2D, ) where impo...
null
https://raw.githubusercontent.com/leopiney/tensor-safe/cdf611dbbe68f6f6cb0b44fe31d86b28a547a3f2/src/TensorSafe/Layers.hs
haskell
| This module exposes all Layers declared at TensorSafe . Layers . module TensorSafe.Layers ( BatchNormalization, Concatenate (..), Conv2D, Dense, Dropout, Flatten, GlobalAvgPooling2D, Input, LSTM, MaxPooling, Relu, Sigmoid, Softmax, ZeroPadding2D, ) where impo...
74e66142cd5650a148b2a03dcf4a0108706572e925334e0a1afced0688e58305
vnarek/jude
factorial.ml
open Jude module Backend = Backend.Make ((val Backend.create_config ())) module Arbiter = Jude.Arbiter.Make (Backend) module Msg_req = struct open Bin_prot.Std type t = Do of (Pid.t * int) [@@deriving bin_io] end module Msg_res = struct open Bin_prot.Std type t = Done of (int * int) [@@deriving bin_io] en...
null
https://raw.githubusercontent.com/vnarek/jude/b1e9387d0242cd83b3b72695bce267c970de1857/example/factorial.ml
ocaml
open Jude module Backend = Backend.Make ((val Backend.create_config ())) module Arbiter = Jude.Arbiter.Make (Backend) module Msg_req = struct open Bin_prot.Std type t = Do of (Pid.t * int) [@@deriving bin_io] end module Msg_res = struct open Bin_prot.Std type t = Done of (int * int) [@@deriving bin_io] en...
4c734c954e71b2255c56a1e09cc463ee9940b382ae5ae6d52550539c3b8e9d2f
ekmett/category-extras
Span.hs
{-# OPTIONS_GHC -fglasgow-exts #-} ----------------------------------------------------------------------------- -- | Module : Control . Morphism . Span Copyright : ( C ) 2008 -- License : BSD-style (see the file LICENSE) -- Maintainer : < > -- Stability : experimental -- Portability...
null
https://raw.githubusercontent.com/ekmett/category-extras/f0f3ca38a3dfcb49d39aa2bb5b31b719f2a5b1ae/Control/Morphism/Span.hs
haskell
# OPTIONS_GHC -fglasgow-exts # --------------------------------------------------------------------------- | License : BSD-style (see the file LICENSE) Stability : experimental Portability : non-portable (rank-2 polymorphism) <(category_theory)> ----------------------------------------------------------...
Module : Control . Morphism . Span Copyright : ( C ) 2008 Maintainer : < > Spans and Cospans module Control.Morphism.Span ( Span(..) , Cospan(..) ) where newtype Span (~>) x y z = Span { runSpan :: (y ~> x, y ~> z) } newtype Cospan (~>) x y z = Cospan { runCospan :: (x ~> y, z ~> y) }...
2b3d7105ad6009e69abad8c5bd1bee884c28d9a534681d1f3c1d4fdf8ace268b
fwcd/curry-language-server
Syntax.hs
# LANGUAGE FunctionalDependencies , FlexibleInstances , UndecidableInstances # | AST utilities and typeclasses . module Curry.LanguageServer.Utils.Syntax ( HasExpressions (..) , HasTypeExpressions (..) , HasDeclarations (..) , HasQualIdentifiers (..) , HasIdentifiers (..) , HasQualIdentifier (...
null
https://raw.githubusercontent.com/fwcd/curry-language-server/1e4867e951c1323dd2e94cd6c61741a8079df322/src/Curry/LanguageServer/Utils/Syntax.hs
haskell
| Fetches the element at the given position. | Fetches the elements at the given position. | Tests whether the given element in the AST contains the given position. | Fetches the module identifier for a module. | Finds the base expression that others have been applied to. | Finds the full expression application (...
# LANGUAGE FunctionalDependencies , FlexibleInstances , UndecidableInstances # | AST utilities and typeclasses . module Curry.LanguageServer.Utils.Syntax ( HasExpressions (..) , HasTypeExpressions (..) , HasDeclarations (..) , HasQualIdentifiers (..) , HasIdentifiers (..) , HasQualIdentifier (...
7b34a6468613b3425dca5ffd9e5e1dd5c6e09241d56233642c00000a274dbdcf
gleam-lang/rebar_gleam
rebar_gleam.erl
-module(rebar_gleam). % -export([init/1, provider_do/2]). -spec init(rebar_state:t()) -> {ok, rebar_state:t()}. init(State) -> {ok, State1} = rebar_gleam_prv_compile:init(State), {ok, State2} = rebar_gleam_prv_eunit:init(State1), {ok, State3} = rebar_gleam_prv_common_test:init(State2), {ok, State3}....
null
https://raw.githubusercontent.com/gleam-lang/rebar_gleam/8257e971ba56cd2d5df0617ed8d7e1177e5a4661/src/rebar_gleam.erl
erlang
-module(rebar_gleam). -export([init/1, provider_do/2]). -spec init(rebar_state:t()) -> {ok, rebar_state:t()}. init(State) -> {ok, State1} = rebar_gleam_prv_compile:init(State), {ok, State2} = rebar_gleam_prv_eunit:init(State1), {ok, State3} = rebar_gleam_prv_common_test:init(State2), {ok, State3}. p...
3cf802657495ec40f367381e473485cf3cdad3d1a5655d7b5c9738fb64aa9d59
marick/structural-typing
f_readable_type_descriptions.clj
(ns structural-typing.use.f-readable-type-descriptions (:require [structural-typing.type :as type] [structural-typing.preds :as pred]) (:use midje.sweet structural-typing.assist.special-words)) (fact "origin and description" (let [origin (list (requires :x [:y :z]) {:tag ...
null
https://raw.githubusercontent.com/marick/structural-typing/9b44c303dcfd4a72c5b75ec7a1114687c809fba1/test/structural_typing/use/f_readable_type_descriptions.clj
clojure
Because `(exactly even)` is a functiuon, its name is turned into a symbol. more nicely.
(ns structural-typing.use.f-readable-type-descriptions (:require [structural-typing.type :as type] [structural-typing.preds :as pred]) (:use midje.sweet structural-typing.assist.special-words)) (fact "origin and description" (let [origin (list (requires :x [:y :z]) {:tag ...
448261363b47dc3ee9a0ecea2a354d756f9245e000ad79663680831efab59a91
racket/htdp
error-in-draw.rkt
#lang racket (require 2htdp/universe 2htdp/image "test-aux.rkt") (define (f x) (cond [(= x 0) (circle 10 'solid 'red)] [(= x 1) (circle 20 'solid 'red)] [else (error txt)])) (define txt "all questions were #f") (testing (with-handlers ([exn? (lambda (e) (unless (string=? (exn-message e) txt) (raise...
null
https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-test/2htdp/tests/error-in-draw.rkt
racket
#lang racket (require 2htdp/universe 2htdp/image "test-aux.rkt") (define (f x) (cond [(= x 0) (circle 10 'solid 'red)] [(= x 1) (circle 20 'solid 'red)] [else (error txt)])) (define txt "all questions were #f") (testing (with-handlers ([exn? (lambda (e) (unless (string=? (exn-message e) txt) (raise...
834490c189678ce33ced77815eda86c7be5063a5b69fe523756030b5e9b43c83
NetworkVerification/nv
InterpPartialFull.ml
open Nv_datastructures open Nv_lang open Nv_lang.Syntax open Nv_lang.Collections open Nv_utils.OCamlUtils open InterpUtils open Interp (** * Simplifications *) let simplify_and v1 e2 = match v1.v with | VBool true -> e2 | VBool false -> exp_of_value (vbool false) | _ -> failwith "illegal value to boolean" ;; ...
null
https://raw.githubusercontent.com/NetworkVerification/nv/f2a2cb68d191de34ff614806ae165c64e3f87dd9/src/lib/interpreter/InterpPartialFull.ml
ocaml
* * Simplifications matches p b is Some env if v matches p and None otherwise; assumes no repeated variables in pattern only match tuples when all components match for now procedure: * check each branch for the pattern. * if the branch *could* match, but we're not sure, stop and return Delayed * if it definit...
open Nv_datastructures open Nv_lang open Nv_lang.Syntax open Nv_lang.Collections open Nv_utils.OCamlUtils open InterpUtils open Interp let simplify_and v1 e2 = match v1.v with | VBool true -> e2 | VBool false -> exp_of_value (vbool false) | _ -> failwith "illegal value to boolean" ;; let simplify_or v1 e2 = ...
ea9c17616a327c820eb43d698a9fef5f4aac892351ecddf31a33506a3b11cb3b
UU-ComputerScience/uu-cco
Printing.hs
------------------------------------------------------------------------------- -- | Module : CCO.Printing Copyright : ( c ) 2008 Utrecht University -- License : All rights reserved -- -- Maintainer : -- Stability : provisional -- Portability : portable -- -- A combinator library for pretty...
null
https://raw.githubusercontent.com/UU-ComputerScience/uu-cco/cca433c8a6f4d27407800404dea80c08fd567093/uu-cco/src/CCO/Printing.hs
haskell
----------------------------------------------------------------------------- | License : All rights reserved Maintainer : Stability : provisional Portability : portable A combinator library for pretty printing. Inspired by Designing and implementing combinator languages. --------------------...
Module : CCO.Printing Copyright : ( c ) 2008 Utrecht University * , , and . In and , and , editors , /Advanced Functional Programming , Third International/ /School , , Portugal , September 12 - 19 , 1998 , Revised Lectures/ , volume 1608 of /Lecture Notes in Comput...
cbd15ce90bc25d720a035e27d05a653a7ee1fea3077ea78de64f206140ec3726
mariari/Misc-ML-Scripts
Library.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # -- | -- - The standard Library for the project -- + Thus all code will depend on this module without stating otherwise -- - Is mostly =Protolude= except with a few changes -- + _Ad...
null
https://raw.githubusercontent.com/mariari/Misc-ML-Scripts/376a7d55b565bf9205e697c5c3b78e1d6b6aedcd/Haskell/StandardLibrary/src/Mari/Library.hs
haskell
# LANGUAGE DeriveDataTypeable # | - The standard Library for the project + Thus all code will depend on this module without stating otherwise - Is mostly =Protolude= except with a few changes + _Additions_ * ∨ :: Serves as an or function * ∧ :: Serves as an and function * |<< :: Serves as a ...
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # module Mari.Library ( module Protolude, module Capability.State, module Capability.Reader, module Capability.Error, module Capability.Writer, module Capability.Sink, module Capability.Source, ...
8d342e8d2a7c6b0cb63b28c5a1d80f91a2ea9eaf85a8a58516f2aa9d37ec217b
jlongster/schemeray
ps-packages.scm
;; I may not need this (define-syntax define-structure-stub (syntax-rules () ((_ name) (define-structure name (export) (open prescheme))))) ;; --- (define-structures ((util (export (define-entry-point :syntax)))) (open prescheme) (files ps-util)) (define-structure debug (export breakpoint) (op...
null
https://raw.githubusercontent.com/jlongster/schemeray/0ea0f1596cbafa05e541131fd64d482c79dd4173/ports/prescheme/ps-packages.scm
scheme
I may not need this ---
(define-syntax define-structure-stub (syntax-rules () ((_ name) (define-structure name (export) (open prescheme))))) (define-structures ((util (export (define-entry-point :syntax)))) (open prescheme) (files ps-util)) (define-structure debug (export breakpoint) (open prescheme) (begin (de...
a1878494852b12f270753732bc38be6de7883c9c7e6aa6ebae0809e58731e8ff
richhickey/clojure-contrib
cl_format.clj
cl_format.clj -- part of the pretty printer for Clojure by April 3 , 2009 Copyright ( c ) , Dec 2008 . 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 th...
null
https://raw.githubusercontent.com/richhickey/clojure-contrib/40b960bba41ba02811ef0e2c632d721eb199649f/src/main/clojure/clojure/contrib/pprint/cl_format.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
cl_format.clj -- part of the pretty printer for Clojure by April 3 , 2009 Copyright ( c ) , Dec 2008 . All rights reserved . in " Common Lisp the Language , 2nd edition " , Chapter 22 ( available online at : (in-ns 'clojure.contrib.pprint) (declare compile-format) (declare execute-format) (declare ...
6d7011b807384c6116741df4df7a49a31c2a801fc380eb11d67c08595bf077d4
bobzhang/fan
location_ident.ml
open OUnit let () = Ast_parsers.use_parsers ["revise"] let test_ident_location _ = let result = try Some (Ast2pt.exp (Gramlib.parse_string_eoi Syntaxf.exp %str{ X.x})).pexp_desc with _ -> None in match result with | None -> assert_failure "parse error" | Some x -> assert_equal ...
null
https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/unitest/main/location_ident.ml
ocaml
local variables: end:
open OUnit let () = Ast_parsers.use_parsers ["revise"] let test_ident_location _ = let result = try Some (Ast2pt.exp (Gramlib.parse_string_eoi Syntaxf.exp %str{ X.x})).pexp_desc with _ -> None in match result with | None -> assert_failure "parse error" | Some x -> assert_equal ...
7f863ffd6b5288c496f19e48f9969df09627a7f47bbffc2984909d5a69a7d1aa
patricoferris/ocaml-multicore-monorepo
test_rfc3339.ml
--------------------------------------------------------------------------- Copyright ( c ) 2015 The ptime programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/ptime/test/test_rfc3339.ml
ocaml
UTC Unknown
--------------------------------------------------------------------------- Copyright ( c ) 2015 The ptime programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------...
92ad60f887a2103c5db0c55484f5c1a5af3f9dccdb75adc2159d3b3be8ec07fc
geophf/1HaskellADay
Solution.hs
module Y2018.M11.D23.Solution where - A puzzle game from -puzzles.org/game.php?u2=63d3ded6b70a71eac63ba911fadacc6e The Springfield County Bird Club met today , and several of its members brought their newest acquisitions . Match each girl to her newest bird - determine its species and the month in which it...
null
https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M11/D23/Solution.hs
haskell
} Tamara's pet different birds narrow down the parrot's owner. now we have t l f i p e ... does that form a word? wrong question to ask. The correct question is that some of these answers are the same. Let's elminate the duplicates and return them as a set. and given the above clues, solve the puzzle }
module Y2018.M11.D23.Solution where - A puzzle game from -puzzles.org/game.php?u2=63d3ded6b70a71eac63ba911fadacc6e The Springfield County Bird Club met today , and several of its members brought their newest acquisitions . Match each girl to her newest bird - determine its species and the month in which it...
ac612c48dd3a9626ef26cebf83161f62f3332508e8f6bf1f7e0b9a267a2fed56
tonyg/kali-scheme
hilbert.scm
Copyright ( c ) 1993 , 1994 by and . Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING . Date : Thu , 4 Nov 93 14:34:04 EST ;Subject: binary search trees ;From: ; If you want to add the tables I think you should change ;the name and add some documentation. Neither the name nor the ;...
null
https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/misc/hilbert.scm
scheme
Subject: binary search trees From: the name and add some documentation. Neither the name nor the only comment in the file are particulary informative. They are dimensional ones. How about make-big-vector etc.? Hilbert vectors are like vectors that grow as large as they need to. That is, they can be indexed by ar...
Copyright ( c ) 1993 , 1994 by and . Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING . Date : Thu , 4 Nov 93 14:34:04 EST If you want to add the tables I think you should change not infinite dimensional vectors , just arbitrarily large one (define hilbert-log 8) (define hilbe...
d78e7f01f32379ff2731d66c6e1fbf1e262887a6b813c85d3774eb59a2de07c1
alexander-yakushev/compliment
core.clj
# # Compliment - a completion library you deserve . ;; This library provides a fast and extensible way to complete symbols in your ;; editor. It is intended to be maximally editor-agnostic where ;; possible, to avoid duplicating implementation in different clients. (ns compliment.core "Core namespace. Most interac...
null
https://raw.githubusercontent.com/alexander-yakushev/compliment/56e06b0e6b488fc98512cde593e13c8aebcf1d0c/src/compliment/core.clj
clojure
This library provides a fast and extensible way to complete symbols in your editor. It is intended to be maximally editor-agnostic where possible, to avoid duplicating implementation in different clients. TODO: Consider removing/deprecating this, as we've abandoned the efforts to use compliment in REPLy.
# # Compliment - a completion library you deserve . (ns compliment.core "Core namespace. Most interactions with Compliment should happen through functions defined here." (:require (compliment.sources ns-mappings namespaces-and-classes class-member...
7481003c5d2fb42e1f691426f66a3ae216db4ca31b605e01b26438a42e45d385
hannesm/conex
conex_opts.ml
module Keys = struct open Cmdliner let docs = "COMMON OPTIONS" let id_c = let parse s = if Conex_utils.String.is_ascii ~p:(function '_' | '.' | '=' | '-' -> true | _ -> false) s then `Ok s else `Error "invalid identifier (valid: A-Za-z0-9)" in (parse, fun ppf s -> Format...
null
https://raw.githubusercontent.com/hannesm/conex/24547cd746915431c72ee7e929d39208f65f4100/app/conex_opts.ml
ocaml
module Keys = struct open Cmdliner let docs = "COMMON OPTIONS" let id_c = let parse s = if Conex_utils.String.is_ascii ~p:(function '_' | '.' | '=' | '-' -> true | _ -> false) s then `Ok s else `Error "invalid identifier (valid: A-Za-z0-9)" in (parse, fun ppf s -> Format...
bef778337f2fb47ceb501fd658916f85181b02b7602c9d0c88eb3712dfb8de26
cbaggers/nineveh
polynominal.lisp
(in-package :nineveh.shaping-functions) ;; ;; ;; Some polynomial functions for shaping, tweening, and easing signals in the range [ 0 .. 1 ] ;; ;; (defun-g cos-raised-inverted-blinn-wybill ((x :float)) "Approximation of 'raised inverted cosine'. Diverges from real function by less that 0.1% within the range [0...
null
https://raw.githubusercontent.com/cbaggers/nineveh/0a10a84669cd9d1c584f54b9eab062986a5f1c47/shaping-functions/polynominal.lisp
lisp
Some polynomial functions for shaping, tweening, and easing signals in the {TODO} Investifate switching away from conditions
(in-package :nineveh.shaping-functions) range [ 0 .. 1 ] (defun-g cos-raised-inverted-blinn-wybill ((x :float)) "Approximation of 'raised inverted cosine'. Diverges from real function by less that 0.1% within the range [0..1]. It also shares some of the Raised Inverted Cosine's key properties, having fl...
dcfab18dd7e084a4674f5f40213b8e70e55a6db7367b37bb3bc7d3f788f70ea5
mirleft/ocaml-tls
test_client.ml
open Lwt open Ex_common let mypsk = ref None let ticket_cache = { Tls.Config.lookup = (fun _ -> None) ; ticket_granted = (fun psk epoch -> mypsk := Some (psk, epoch)) ; lifetime = 0l ; timestamp = Ptime_clock.now } let test_client _ = X509_lwt.private_of_pems : ~priv_key : server_key > > = fun ce...
null
https://raw.githubusercontent.com/mirleft/ocaml-tls/30f0a8680bfbd537c0918ea63ac04c5cc08555cf/lwt/examples/test_client.ml
ocaml
~certificates:(`Single cert)
open Lwt open Ex_common let mypsk = ref None let ticket_cache = { Tls.Config.lookup = (fun _ -> None) ; ticket_granted = (fun psk epoch -> mypsk := Some (psk, epoch)) ; lifetime = 0l ; timestamp = Ptime_clock.now } let test_client _ = X509_lwt.private_of_pems : ~priv_key : server_key > > = fun ce...
2318fad21c8c5fc6cb456731e35b5961bf0ac217535a3fb992897767a381ac41
ucsd-progsys/dsolve
tests_malloc.ml
let rec del x ys = match ys with | [] -> [] | y::ys' -> if x = y then ys' else y::(del x ys') let rec checkdiff xs = match xs with | [] -> () | x::xs' -> let _ = List.iter (fun x' -> assert (x != x')) xs' in checkdiff xs' let check (m, us, fs) = checkd...
null
https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/proceedings-demos/ml/old/tests_malloc.ml
ocaml
let rec del x ys = match ys with | [] -> [] | y::ys' -> if x = y then ys' else y::(del x ys') let rec checkdiff xs = match xs with | [] -> () | x::xs' -> let _ = List.iter (fun x' -> assert (x != x')) xs' in checkdiff xs' let check (m, us, fs) = checkd...
f451cc0dcfda24c3360db00cdd7468c8129ad0485c263115913cb04984df9b3f
databrary/databrary
Web.hs
{-# LANGUAGE OverloadedStrings #-} module Controller.Web ( StaticPath(..) , staticPath , webFile ) where import Data.ByteArray.Encoding (convertToBase, Base(Base16)) import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as BSC import Data.Char (isAscii, isAlphaNum, toLower) import quali...
null
https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Controller/Web.hs
haskell
# LANGUAGE OverloadedStrings #
module Controller.Web ( StaticPath(..) , staticPath , webFile ) where import Data.ByteArray.Encoding (convertToBase, Base(Base16)) import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as BSC import Data.Char (isAscii, isAlphaNum, toLower) import qualified Data.Invertible as I import Da...
a2d59b09030b69d7214942e741628f6fd6e148742cdb8479690509d219f13d76
inzva/DOH
Account.hs
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} module Network.DigitalOcean.Services.Account where ----------------------------------------------------------------- import Data.Aeson import Data.Aeson.Casing import GHC.Generics ------------------------...
null
https://raw.githubusercontent.com/inzva/DOH/2b25572e1bc33a7a79f5d7df739b269e83bb32fb/src/Network/DigitalOcean/Services/Account.hs
haskell
# LANGUAGE OverloadedStrings # --------------------------------------------------------------- --------------------------------------------------------------- ---------------------------------------------------------------
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # module Network.DigitalOcean.Services.Account where import Data.Aeson import Data.Aeson.Casing import GHC.Generics import Network.DigitalOcean.Types data Account = Account { accountDropletLimit :: Int , accountFloatingIpLimit...
3ff202748379bc91ccc415a8e3364b461203365fe9bf37f5e4baecfd0c089789
rmculpepper/gamble
enum-gibbs.rkt
Copyright ( c ) 2014 Released under the terms of the 2 - clause BSD license . ;; See the file COPYRIGHT for details. #lang racket/base (require racket/class (rename-in racket/match [match-define defmatch]) "db.rkt" "../interfaces.rkt" "../util/prob.rkt" "../dist.rkt" ...
null
https://raw.githubusercontent.com/rmculpepper/gamble/a5231e2eb3dc0721eedc63a77ee6d9333846323e/gamble/private/mh/enum-gibbs.rkt
racket
See the file COPYRIGHT for details. ============================================================
Copyright ( c ) 2014 Released under the terms of the 2 - clause BSD license . #lang racket/base (require racket/class (rename-in racket/match [match-define defmatch]) "db.rkt" "../interfaces.rkt" "../util/prob.rkt" "../dist.rkt" "../../dist/discrete.rkt" ...
edc0e53cbea3c687b43d5d8b467a6197413d57c28ea96c17b28f9d07a880b6e2
emanjavacas/cosycat
events_frame.cljs
(ns cosycat.project.components.events.events-frame (:require [reagent.core :as reagent] [re-frame.core :as re-frame] [react-bootstrap.components :as bs] [cosycat.utils :refer [->map]] [cosycat.components :refer [css-transition-group dropdown-select]] [cosyca...
null
https://raw.githubusercontent.com/emanjavacas/cosycat/a7186363d3c0bdc7b714af126feb565f98793a6e/src/cljs/cosycat/project/components/events/events_frame.cljs
clojure
(ns cosycat.project.components.events.events-frame (:require [reagent.core :as reagent] [re-frame.core :as re-frame] [react-bootstrap.components :as bs] [cosycat.utils :refer [->map]] [cosycat.components :refer [css-transition-group dropdown-select]] [cosyca...
12ee0dbf110a11b67ac8b50ba866588392dc0d6c432546d6b0b5716e392e27fa
talex5/ocaml-wayland
msg.ml
module type ENDIAN = (module type of Cstruct.BE) let ne = if Sys.big_endian then (module Cstruct.BE : ENDIAN) else (module Cstruct.LE : ENDIAN) Native endian module NE = (val ne) type 'rw generic = { buffer : Cstruct.t; fds : Unix.file_descr Queue.t; mutable next : int; (* The index of the next...
null
https://raw.githubusercontent.com/talex5/ocaml-wayland/efe000fc57aa344fa10682fd6141a3ed675ca9da/lib/msg.ml
ocaml
The index of the next argument to read or write. Note: includes ['\0'] terminator
module type ENDIAN = (module type of Cstruct.BE) let ne = if Sys.big_endian then (module Cstruct.BE : ENDIAN) else (module Cstruct.LE : ENDIAN) Native endian module NE = (val ne) type 'rw generic = { buffer : Cstruct.t; fds : Unix.file_descr Queue.t; } constraint 'rw = [< `R | `W] type ('a, 'rw) t = 'rw g...
0dda953ea4dfc872a8a10979a330f4ed9c15f0dd2f4f1e35978f53d4f307b0d8
witan-org/witan
weakhtbl.ml
(********************************************************************) (* *) The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2017 -- INRIA - CNRS - Paris - Sud University (* ...
null
https://raw.githubusercontent.com/witan-org/witan/d26f9f810fc34bf44daccb91f71ad3258eb62037/src/popop_lib/weakhtbl.ml
ocaml
****************************************************************** This software is distributed under the terms of the GNU Lesser on linking described in file LICENSE. ...
The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2017 -- INRIA - CNRS - Paris - Sud University General Public License version 2.1 , with the special exception module ProdConsume : sig type 'a t val create : unit -> 'a t val add : 'a -> 'a t -> unit val iter...