_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
0dd12f56be733ca0d905d213a1c43eb44b3af632f30c41b51c985f43c8e5ae67
stonebuddha/eopl
syntax.mli
type program = | AProgram of top_level list and top_level = | ExpTop of expression and expression = | ConstExp of int * Ploc.t | DiffExp of expression * expression * Ploc.t | IsZeroExp of expression * Ploc.t | IfExp of expression * expression * expression * Ploc.t | VarExp of string * Ploc.t | LetExp ...
null
https://raw.githubusercontent.com/stonebuddha/eopl/88ea636110421706f900e753c30240ff1ea26f67/PROC/syntax.mli
ocaml
type program = | AProgram of top_level list and top_level = | ExpTop of expression and expression = | ConstExp of int * Ploc.t | DiffExp of expression * expression * Ploc.t | IsZeroExp of expression * Ploc.t | IfExp of expression * expression * expression * Ploc.t | VarExp of string * Ploc.t | LetExp ...
10ad4bba30d9f6fd915af7ed07928f694512b2aff96a442905a5cdd1be0a5ad3
mflatt/plait
lazy.rkt
#lang plait #:lazy (print-only-errors #t) (define (f x) 1) (define (h x) (f x)) (test 1 (h (/ 1 0))) (define (g y) (+ y 1)) (test 11 (g 10)) (test (letrec ([x (cons 1 x)]) (first (map add1 (filter odd? (rest (rest x)))))) 2) (test (let ([b (box (/ 1 0))]) 'ok) 'ok) (test (let ([b (vector 10 (/ 1 0))...
null
https://raw.githubusercontent.com/mflatt/plait/485d3f5894fd43dd81fd698a0adf1adeaf6f6e3b/tests/lazy.rkt
racket
---------------------------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- ----------------------------------------
#lang plait #:lazy (print-only-errors #t) (define (f x) 1) (define (h x) (f x)) (test 1 (h (/ 1 0))) (define (g y) (+ y 1)) (test 11 (g 10)) (test (letrec ([x (cons 1 x)]) (first (map add1 (filter odd? (rest (rest x)))))) 2) (test (let ([b (box (/ 1 0))]) 'ok) 'ok) (test (let ([b (vector 10 (/ 1 0))...
18321b5dc5dd8b30edfe30ab4f212f6e9a0284727a3b8424358dd844855c1ddd
nibbula/yew
undo.lisp
;;; undo.lisp - Undo for RL ;;; (in-package :rl) (declaim #.`(optimize ,.(getf rl-config::*config* :optimization-settings))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; undo ;; Emacs style undo is weird in that it records the undoing as undoable , but only puts it there wh...
null
https://raw.githubusercontent.com/nibbula/yew/e4172647e7f8df116f12009de6f6b5cf53ba7cf8/rl/undo.lisp
lisp
undo Standard undo/redo in is easier to understand, but kind of stupid, since when you do a modifying action after redoing, it loses your redo info. do nothing ; @@@ debugging ; @@@ debugging ; @@@ debugging Don't record multiple consecutive boundaries ((and (eql type 'insertion) (typep hist 'in...
undo.lisp - Undo for RL (in-package :rl) (declaim #.`(optimize ,.(getf rl-config::*config* :optimization-settings))) Emacs style undo is weird in that it records the undoing as undoable , but only puts it there when you type a non - undo command after a series of undos . We 're gon na do emacs style here , b...
2d4df7f7237efcd1bc19ae7c5582b70d474e4fc987dfd69ca78b7a2933c71b62
fakedata-haskell/fakedata
Rush.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module Faker.Provider.Rush where import Config import Control.Monad.Catch import Data.Text (Text) import Data.Vector (Vector) import Data.Monoid ((<>)) import Data.Yaml import Faker import Faker.Internal import Faker.Provider.TH import Language.Haskell.T...
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/7b0875067386e9bb844c8b985c901c91a58842ff/src/Faker/Provider/Rush.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # module Faker.Provider.Rush where import Config import Control.Monad.Catch import Data.Text (Text) import Data.Vector (Vector) import Data.Monoid ((<>)) import Data.Yaml import Faker import Faker.Internal import Faker.Provider.TH import Language.Haskell.TH parseRush :: FromJSON a => Fake...
6035e9d2d2607b038a29bf9e4b334c5f47243faf8279ca778f4e0b000c8890ca
emqx/emqx
emqx_rewrite_api_SUITE.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/emqx/emqx/a26c05f4f6d332364aa4195818ee0d6d95dadbbe/apps/emqx_modules/test/emqx_rewrite_api_SUITE.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or im...
Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_rewrite_api_SUITE). -compile(nowarn_export_all). -compile(export_all). -import(em...
1cca302bd0c0315275e11b13d846948b6593701a48225b4411850db282e8c83f
sigrlami/haskellcosm
Html.hs
{-# LANGUAGE OverloadedStrings #-} module Html ( genetateHtmlTable , genetateHtmlTableWithContents ) where import Control.Monad import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.Lazy.Char8 as LBS import Data.Csv ...
null
https://raw.githubusercontent.com/sigrlami/haskellcosm/4b2dcb89a82cf3f2e6fd191e942c4290c2bb84e1/app/analysis/src/Html.hs
haskell
# LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ | Generates Html data from a lazy bytestring of Csv data. ^ path to csv ^ path to orogonal html file ^ path to output html file ^ insertion pattern > makeInsertTable "../../companies/active.csv" "../../ex...
module Html ( genetateHtmlTable , genetateHtmlTableWithContents ) where import Control.Monad import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.Lazy.Char8 as LBS import Data.Csv (DefaultOrdered (headerOrder), ...
1610f7b4e81e6d71b38c586a266c8f29dea0d44f2c70452a587749b4563ac412
janestreet/base
bytes0.ml
[ Bytes0 ] defines string functions that are primitives or can be simply defined in terms of [ . Bytes ] . [ Bytes0 ] is intended to completely express the part of [ . Bytes ] that [ Base ] uses -- no other file in Base other than should use [ Stdlib . Bytes ] . [ Bytes0 ] has few dependencies , and...
null
https://raw.githubusercontent.com/janestreet/base/1462b7d5458e96569275a1c673df968ecbf3342f/src/bytes0.ml
ocaml
[unsafe_blit_string] is not exported in the [stdlib] so we export it here
[ Bytes0 ] defines string functions that are primitives or can be simply defined in terms of [ . Bytes ] . [ Bytes0 ] is intended to completely express the part of [ . Bytes ] that [ Base ] uses -- no other file in Base other than should use [ Stdlib . Bytes ] . [ Bytes0 ] has few dependencies , and...
928d3782b4896429835c426b139c5ca0707b9deb7df816da750590d566bb2345
liquidz/misaki
post.clj
@layout default @title post default title ; site header (header (:site-title site)) [:article ; page header [:div {:class "page-header"} ; post title (h1 (:title site)) ; post tags (post-tags) ; post date (post-date)] ; contents [:div {:class "post"} contents] ; previous/next post (prev-n...
null
https://raw.githubusercontent.com/liquidz/misaki/b8104e632058e3b3da4487513d10e666e5914ec9/samples/blog/template/layouts/post.clj
clojure
site header page header post title post tags post date contents previous/next post
@layout default @title post default title (header (:site-title site)) [:article [:div {:class "page-header"} (h1 (:title site)) (post-tags) (post-date)] [:div {:class "post"} contents] (prev-next-post-link)]
f417dbb22c80742555190589a600af5de2ba7a7e3ea2e994ede3a9e950f3c045
dbuenzli/astring
test_char.ml
--------------------------------------------------------------------------- Copyright ( c ) 2015 The astring programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (...
null
https://raw.githubusercontent.com/dbuenzli/astring/ec7a266a3a680e5d246689855c639da53d713428/test/test_char.ml
ocaml
--------------------------------------------------------------------------- Copyright ( c ) 2015 The astring programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (...
7293b372ea9ac3e029bda02be38a958e3f1858275d60a4a851cbd1f45771e9ce
ocaml-multicore/multicoretests
stm_tests.ml
open QCheck open STM * parallel STM tests of Buffer (* port from the QCSTM example *) module BConf = struct type cmd = | Contents | To_bytes | Sub of (int * int) (* Blit *) | Nth of int | Length | Clear | Reset | Add_char of char (* Add_utf8_uchar | Add_utf_16le_uchar | Add_u...
null
https://raw.githubusercontent.com/ocaml-multicore/multicoretests/e409e0e37c814ce42ad43563837a20695a45e5f8/src/buffer/stm_tests.ml
ocaml
port from the QCSTM example Blit Add_utf8_uchar | Add_utf_16le_uchar | Add_utf_16be_uchar in reverse sub returns a copy protect from assertion failure protect from assertion failure protect from assertion failure | Contents, Res ((String,_),str) -> explode str = List.rev s
open QCheck open STM * parallel STM tests of Buffer module BConf = struct type cmd = | Contents | To_bytes | Sub of (int * int) | Nth of int | Length | Clear | Reset | Add_char of char | Add_string of string | Add_bytes of bytes | Truncate of int [@@deriving show { with...
90d5f35485dd104d988b9f7ec5fb710a0c2a47da7322ee67c3023a625acc033f
vbmithr/ocaml-fix
fix.ml
--------------------------------------------------------------------------- Copyright ( c ) 2019 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 2019 Vincent Bernar...
null
https://raw.githubusercontent.com/vbmithr/ocaml-fix/8394d397428b7c7832934462969347c1ebb43e8d/src/fix.ml
ocaml
--------------------------------------------------------------------------- Copyright ( c ) 2019 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 2019 Vincent Bernar...
d21c4fbfa6d032b1f44f16aa47cbc88d8374bc51182e9657f20e4c1bf3f6bd32
imandra-ai/ocaml-opentelemetry
atomic.post412.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/imandra-ai/ocaml-opentelemetry/0fb530125a3ce4e7e1d23ddadb40ca25e84b27a1/src/atomic/atomic.post412.mli
ocaml
************************************************************************ OCaml ...
, University of Cambridge , projet Partout , INRIA Paris - Saclay Copyright 2017 - 2018 University of Cambridge . Copyright 2020 Institut National de Recherche en Informatique et the GNU Lesser General Public License ...
79b3cf2fc42d5f0ef4bf25d374c6aaadbf83c92ee5476050edbf828b1e518621
cl-axon/shop2
package.lisp
(in-package :common-lisp-user) (defpackage :shop2-thmpr-api (:nicknames :sthmp-api) (:use common-lisp) (:export #:unify #:unify-p #:unify-within-p #:variablep #:fail #:apply-substitution #:compose-substitutions ))
null
https://raw.githubusercontent.com/cl-axon/shop2/9136e51f7845b46232cc17ca3618f515ddcf2787/shop2-theorem-prover-api/package.lisp
lisp
(in-package :common-lisp-user) (defpackage :shop2-thmpr-api (:nicknames :sthmp-api) (:use common-lisp) (:export #:unify #:unify-p #:unify-within-p #:variablep #:fail #:apply-substitution #:compose-substitutions ))
49c09d74d9e71ceef26067e4740666a441a4d85e1c8ee40b599a72a138a55d24
logaan/bt.clj
core.clj
(ns testing-gloss.core (:require [gloss.core :refer :all] [gloss.io :refer :all] [lamina.core :refer :all] [aleph.tcp :refer :all])) (defcodec handshake (ordered-map :protocol-name (finite-frame :ubyte (string :us-ascii)) :reserved :uint64 :inf...
null
https://raw.githubusercontent.com/logaan/bt.clj/44831af16c4b987db16d0d85eee9cd79cb4fa757/src/testing_gloss/core.clj
clojure
(ns testing-gloss.core (:require [gloss.core :refer :all] [gloss.io :refer :all] [lamina.core :refer :all] [aleph.tcp :refer :all])) (defcodec handshake (ordered-map :protocol-name (finite-frame :ubyte (string :us-ascii)) :reserved :uint64 :inf...
0f3e8137440c5f850593a184de56a26bc20bbd0f5af3de4ac54926b0fb7397ba
seL4/capdl
Matrix.hs
# LANGUAGE FlexibleContexts # -- Copyright 2020 , Data61 , CSIRO ( ABN 41 687 119 230 ) -- SPDX - License - Identifier : BSD-2 - Clause -- module CapDL.Matrix( Matrix ,isConnected ,connect ,newEmptyMatrix ,printMatrix ...
null
https://raw.githubusercontent.com/seL4/capdl/2e97986776c809bc7409f92f5a80eeeff226cd67/capDL-tool/CapDL/Matrix.hs
haskell
Sets (x,y) to True Sets (x,y) to False Returns a new empty matrix Returns the dimensions of the matrix
# LANGUAGE FlexibleContexts # Copyright 2020 , Data61 , CSIRO ( ABN 41 687 119 230 ) SPDX - License - Identifier : BSD-2 - Clause module CapDL.Matrix( Matrix ,isConnected ,connect ,newEmptyMatrix ,printMatrix ...
04351dc177552108811caa9c17fecc9cec6806d9216d4524ce2472ffe124b936
finnishtransportagency/harja
about.clj
(ns harja.views.about) (defmacro lue-gitlog [] `[~@(take 10 (try (read-string (slurp "resources/gitlog.edn")) (catch java.io.IOException _ [])))])
null
https://raw.githubusercontent.com/finnishtransportagency/harja/7b7021e58d7462cc794dbd12a2cf6d214a25b9c5/src/cljs/harja/views/about.clj
clojure
(ns harja.views.about) (defmacro lue-gitlog [] `[~@(take 10 (try (read-string (slurp "resources/gitlog.edn")) (catch java.io.IOException _ [])))])
184e56187d8d8e5feaa87b72085c97b38eb018dc1d5daaa9eb8d37619833c0f7
timbod7/haskell-chart
example11.hs
import Graphics.Rendering.Chart import Graphics.Rendering.Chart.Backend.Cairo import Data.Colour import Data.Colour.Names import Data.Default.Class import Control.Lens import System.Environment(getArgs) chart borders = toRenderable layout where layout = layout_title .~ "Sample Bars" ++ btitle $ layou...
null
https://raw.githubusercontent.com/timbod7/haskell-chart/8c5a823652ea1b4ec2adbced4a92a8161065ead6/wiki-examples/example11.hs
haskell
import Graphics.Rendering.Chart import Graphics.Rendering.Chart.Backend.Cairo import Data.Colour import Data.Colour.Names import Data.Default.Class import Control.Lens import System.Environment(getArgs) chart borders = toRenderable layout where layout = layout_title .~ "Sample Bars" ++ btitle $ layou...
bfd2573b2d970514e76a5c727a87b16c01c3a61a71874baf0448388e1dd9ad8e
devonzuegel/smallworld
util.clj
(ns smallworld.util (:require [clojure.pprint :as pp] [clojure.data.json :as json] [clojure.java.io :as io])) #_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]} (defn store-to-file [filename data] (let [result (with-out-str (pr data))] (spit filena...
null
https://raw.githubusercontent.com/devonzuegel/smallworld/b227aaafbe7a8432479628731ac02b1228006fee/src/smallworld/util.clj
clojure
(ns smallworld.util (:require [clojure.pprint :as pp] [clojure.data.json :as json] [clojure.java.io :as io])) #_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]} (defn store-to-file [filename data] (let [result (with-out-str (pr data))] (spit filena...
e49264ef9fd225dffc5c4c78407231c651a0a28bc4e9a6c0884b4f33e481d851
atolab/zenoh
zenoh_storages_be_mm.ml
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * -2.0 , or the Apache License , Version 2.0 * which is available at -2.0 . * * SPDX - License - Ident...
null
https://raw.githubusercontent.com/atolab/zenoh/32e311aae6be93c001fd725b4d918b2fb4e9713d/src/zenoh-storages/zenoh-storages-be/zenoh-storages-be-memory/zenoh_storages_be_mm.ml
ocaml
do nothing NOTE: even if path is not known yet, we need to store the removal time: if ever a put with a lower timestamp arrive (e.g. msg inversion between put and remove) we must drop the put.
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * -2.0 , or the Apache License , Version 2.0 * which is available at -2.0 . * * SPDX - License - Ident...
20d1562cd9c1138ab97a6260d3b5428d7b2d3d950e842fb939607d8916e5404b
OCamlPro/ocplib-simplex
coreSig.mli
(******************************************************************************) (* ocplib-simplex *) (* *) (* Copyright (C) --- OCamlPro --- See README.md for information and licensing...
null
https://raw.githubusercontent.com/OCamlPro/ocplib-simplex/f90e43982ee7a71bc9b628517e1b798d0d6b62f1/src/coreSig.mli
ocaml
**************************************************************************** ocplib-simplex Copyright (C) --- OCamlPro --- See README.md for information and licensing ************...
open ExtSigs module type S = sig module Var : Variables module Ex : Explanations module R : Rationals module R2 : Rat2.SIG with module R = R module P : Polys.SIG with module Var = Var and module R = R module MX : Map.S with type key = Var.t module SX : Set.S with type elt = Var.t type ...
4254148590307ed3f46d6944d47db3655cb3200af94e6e02ad17c4796687aa21
docker-in-aws/docker-in-aws
xhrio.cljs
(ns swarmpit.xhrio (:require [clojure.walk :refer [keywordize-keys]] [clojure.string :as str])) (defn- response-header [xhrio-header] (let [separator-pos (str/index-of xhrio-header ":") length (count xhrio-header)] {(subs xhrio-header 0 separator-pos) (subs xhrio-header (+ separator-...
null
https://raw.githubusercontent.com/docker-in-aws/docker-in-aws/bfc7e82ac82ea158bfb03445da6aec167b1a14a3/ch16/swarmpit/src/cljs/swarmpit/xhrio.cljs
clojure
(ns swarmpit.xhrio (:require [clojure.walk :refer [keywordize-keys]] [clojure.string :as str])) (defn- response-header [xhrio-header] (let [separator-pos (str/index-of xhrio-header ":") length (count xhrio-header)] {(subs xhrio-header 0 separator-pos) (subs xhrio-header (+ separator-...
25b74de3975caef7b8c16cb85ab2ffa6e99e47b3785f13271bd677b0cd739438
jgpc42/jmh-clojure
env_test.clj
(ns jmh.env-test (:require [jmh.env :as env] [demo.core :as demo] [clojure.test :refer :all])) (deftest test-merge-options (let [xs [{:a 42} :x] selectors {:x {:b 2}, :jmh/default {:a 2, :c 3}} opts {:a 1, :d 4}] (is (= {:fail-on-error true, :a 1, :b 2, :c 3, :d 4} ...
null
https://raw.githubusercontent.com/jgpc42/jmh-clojure/78f6ebcd59d782b0ca3b4f04d15a037657b87304/test/jmh/env_test.clj
clojure
(ns jmh.env-test (:require [jmh.env :as env] [demo.core :as demo] [clojure.test :refer :all])) (deftest test-merge-options (let [xs [{:a 42} :x] selectors {:x {:b 2}, :jmh/default {:a 2, :c 3}} opts {:a 1, :d 4}] (is (= {:fail-on-error true, :a 1, :b 2, :c 3, :d 4} ...
8453dc12059f5f62723dd947f359f2e15e2afb3e9df972f9b9505075378dee1a
dinosaure/cri
decoder.ml
type decoder = { buffer : bytes; mutable pos : int; mutable max : int } let io_buffer_size = 65536 let decoder () = { buffer= Bytes.create io_buffer_size; pos= 0; max= 0; } let decoder_from x = let max = String.length x in let buffer = Bytes.of_string x in { buffer; pos= 0; max } type error = [ `End_of_input ...
null
https://raw.githubusercontent.com/dinosaure/cri/d75b8006f5e560ef4865450e3baa424272c41fbf/lib/decoder.ml
ocaml
type decoder = { buffer : bytes; mutable pos : int; mutable max : int } let io_buffer_size = 65536 let decoder () = { buffer= Bytes.create io_buffer_size; pos= 0; max= 0; } let decoder_from x = let max = String.length x in let buffer = Bytes.of_string x in { buffer; pos= 0; max } type error = [ `End_of_input ...
e13d88e3ff2a898f62f870a41a6b81672f37839a680f7b9ec3b99b9a3a18ad31
haskell-opengl/OpenGLRaw
DebugCompatibility.hs
# LANGUAGE PatternSynonyms # -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.KHR.DebugCompatibility Copyright : ( c ) 2019 -- License : BSD3 -- Maintainer : < > -- Stability : stable -- Portability : portable -- -------------...
null
https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/KHR/DebugCompatibility.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.GL.KHR.DebugCompatibility License : BSD3 Stability : stable Portability : portable ------------------------------------------------------------------------------ * Extension Support * Enums * Func...
# LANGUAGE PatternSynonyms # Copyright : ( c ) 2019 Maintainer : < > module Graphics.GL.KHR.DebugCompatibility ( glGetKHRDebug, gl_KHR_debug, pattern GL_BUFFER, pattern GL_CONTEXT_FLAG_DEBUG_BIT, pattern GL_DEBUG_CALLBACK_FUNCTION, pattern GL_DEBUG_CALLBACK_USER_PARAM, pattern GL_DEBUG_...
5c1c05cfc8dab6b81e4362367c03269ca4d6403276e44d92231095e143436bcb
cicakhq/potato
potato-main.lisp
(in-package :potato) (declaim #.potato.common::*compile-decl*) (defun start-server () (potato.common.application:start-component 'main)) (potato.common.application:define-component message-processor-server (:dependencies potato.common::generic potato.upload::upload) (:start (potato.common.application:start-...
null
https://raw.githubusercontent.com/cicakhq/potato/88b6c92dbbc80a6c9552435604f7b1ae6f2a4026/src/potato/potato-main.lisp
lisp
(in-package :potato) (declaim #.potato.common::*compile-decl*) (defun start-server () (potato.common.application:start-component 'main)) (potato.common.application:define-component message-processor-server (:dependencies potato.common::generic potato.upload::upload) (:start (potato.common.application:start-...
7d7a2ca12cea6d1c2476805fba9f9d4b4c62fe55ade15b49382211e1f463d5af
danr/hipspec
TyAppBeta.hs
-- | Beta reduction for types (applied to lambdas) module HipSpec.Lang.TyAppBeta where import Type import CoreSyn import qualified CoreSubst as CS import qualified Outputable -- | Beta reduction for types (applied to lambdas) tyAppBeta :: CoreExpr -> CoreExpr tyAppBeta = go where go e0 = case e0 of Ap...
null
https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/src/HipSpec/Lang/TyAppBeta.hs
haskell
| Beta reduction for types (applied to lambdas) | Beta reduction for types (applied to lambdas) | Reduces a type variable in an expression by applying it to a type
module HipSpec.Lang.TyAppBeta where import Type import CoreSyn import qualified CoreSubst as CS import qualified Outputable tyAppBeta :: CoreExpr -> CoreExpr tyAppBeta = go where go e0 = case e0 of App e1 e2 -> case (go e1,go e2) of (Lam x e,Type t) -> reduce x e t (e1',e2') ...
fd4e86e149e56b4e176c0293067310e35754247ecf2f9016e36c416b51495474
input-output-hk/rscoin-haskell
Web.hs
| Web part of Explorer . module RSCoin.Explorer.Web ( wsLoggerName , mkApplication ) where import Control.Monad.Trans (MonadIO) import Network.Wai (Application) import Network.Wai.Handler.WebSockets (websocketsOr) import qualified Netw...
null
https://raw.githubusercontent.com/input-output-hk/rscoin-haskell/109d8f6f226e9d0b360fcaac14c5a90da112a810/src/RSCoin/Explorer/Web.hs
haskell
| Web part of Explorer . module RSCoin.Explorer.Web ( wsLoggerName , mkApplication ) where import Control.Monad.Trans (MonadIO) import Network.Wai (Application) import Network.Wai.Handler.WebSockets (websocketsOr) import qualified Netw...
f1c36221ef47f3c4efd5235887ddf26e2a4c49fb14fd92f9683f3667fd3daaa5
l29ah/hyborg
Object.hs
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, CPP #-} #if __GLASGOW_HASKELL__ < 902 {-# OPTIONS_GHC -fplugin=RecordDotPreprocessor #-} #else {-# LANGUAGE OverloadedRecordDot, RebindableSyntax #-} #endif # LANGUAGE DuplicateRecordFields , TypeApplications , FlexibleContexts , DataKinds , MultiParamTypeClasses , T...
null
https://raw.githubusercontent.com/l29ah/hyborg/50f4b896699cb834d9481f783f5e70b7a9a2d66e/Object.hs
haskell
# LANGUAGE OverloadedStrings, ScopedTypeVariables, CPP # # OPTIONS_GHC -fplugin=RecordDotPreprocessor # # LANGUAGE OverloadedRecordDot, RebindableSyntax # let info = "borg-metadata-authentication-manifest"
#if __GLASGOW_HASKELL__ < 902 #else #endif # LANGUAGE DuplicateRecordFields , TypeApplications , FlexibleContexts , DataKinds , MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances , UndecidableInstances , GADTs # module Object where import qualified Control.Monad.Fail as Fail import Crypto.Hash.Algorithms...
9e437c371206c98068a3d81c9ba82e29020b57ad602b457b37617923a8484863
oakes/play-cljc-examples
start.clj
(ns ui-gallery.start (:require [ui-gallery.core :as c] [play-cljc.gl.core :as pc]) (:import [org.lwjgl.glfw GLFW Callbacks GLFWCursorPosCallbackI GLFWKeyCallbackI GLFWMouseButtonCallbackI GLFWCharCallbackI GLFWFramebufferSizeCallbackI GLFWWindowCloseCallbackI GLFW...
null
https://raw.githubusercontent.com/oakes/play-cljc-examples/76edebe22bf5d08f5eb78970dba1fd577c8be15a/ui-gallery/src/ui_gallery/start.clj
clojure
(ns ui-gallery.start (:require [ui-gallery.core :as c] [play-cljc.gl.core :as pc]) (:import [org.lwjgl.glfw GLFW Callbacks GLFWCursorPosCallbackI GLFWKeyCallbackI GLFWMouseButtonCallbackI GLFWCharCallbackI GLFWFramebufferSizeCallbackI GLFWWindowCloseCallbackI GLFW...
62f7a8fd533cd3339a1b934c507ab05de8b04cfce7920de1b0efc6c06ceb16b6
walmartlabs/lacinia
test_utils.clj
(ns com.walmartlabs.test-utils (:require [clojure.test :refer [is]] [clojure.walk :as walk] [clojure.java.io :as io] [clojure.edn :as edn] [com.walmartlabs.lacinia :as lacinia] [com.walmartlabs.lacinia.util :as util] [com.walmartlabs.lacinia.parser.schema :refer [parse-schema]] [com.wa...
null
https://raw.githubusercontent.com/walmartlabs/lacinia/c0870e8c0c3537aede93aa6c711291ffc5a3695e/dev-resources/com/walmartlabs/test_utils.clj
clojure
(ns com.walmartlabs.test-utils (:require [clojure.test :refer [is]] [clojure.walk :as walk] [clojure.java.io :as io] [clojure.edn :as edn] [com.walmartlabs.lacinia :as lacinia] [com.walmartlabs.lacinia.util :as util] [com.walmartlabs.lacinia.parser.schema :refer [parse-schema]] [com.wa...
502ccd9850eec16e23e06db532b6785257b03086f9a55070635abcae70561007
haskell/ghcide
FindImports.hs
Copyright ( c ) 2019 The DAML Authors . All rights reserved . SPDX - License - Identifier : Apache-2.0 # LANGUAGE CPP # #include "ghc-api-version.h" module Development.IDE.Import.FindImports ( locateModule , Import(..) , ArtifactsLocation(..) , modSummaryToArtifactsLocation , isBootLocation , mkImport...
null
https://raw.githubusercontent.com/haskell/ghcide/3ef4ef99c4b9cde867d29180c32586947df64b9e/src/Development/IDE/Import/FindImports.hs
haskell
standard imports ^ True if a module is a source input | This function is used to map a package name to a set of import paths. It only returns Just for unit-ids which are possible to import into the current module. In particular, it will return Nothing for 'main' components as they can never be imported into anoth...
Copyright ( c ) 2019 The DAML Authors . All rights reserved . SPDX - License - Identifier : Apache-2.0 # LANGUAGE CPP # #include "ghc-api-version.h" module Development.IDE.Import.FindImports ( locateModule , Import(..) , ArtifactsLocation(..) , modSummaryToArtifactsLocation , isBootLocation , mkImport...
c4ab7d9eed3cc846eea0c274983da7b1881c6044c7c2b12caa66d560da6351b4
screenshotbot/screenshotbot-oss
github-oauth.lisp
;;;; Copyright 2018-Present Modern Interpreters Inc. ;;;; 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 /. (uiop:define-package :screenshotbot/login/github-oauth (:use #:cl #:alexand...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/44ff3a0197774439e56807c30779f965bd03f424/src/screenshotbot/login/github-oauth.lisp
lisp
Copyright 2018-Present Modern Interpreters Inc. We sometimes need to get access tokens not for login purposes. too lazy to figure out what this was Move the Primary email to the top of the list
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 /. (uiop:define-package :screenshotbot/login/github-oauth (:use #:cl #:alexandria #:screenshotbot/login/common #:util/ja...
26c814825de661c548885f2310a6e32d254a81a77aa6e8f7e4bdac861fa97d84
kumarshantanu/ring-sse-middleware
test_util.clj
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file LICENSE at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; the ...
null
https://raw.githubusercontent.com/kumarshantanu/ring-sse-middleware/67dae006cfda2fa2fef93eea92557aeffff0b6a7/test/ring_sse_middleware/test_util.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 LICENSE at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this ...
Copyright ( c ) . All rights reserved . (ns ring-sse-middleware.test-util (:require [clojure.test :refer :all] [cheshire.core :as cheshire])) (defn handler [request] (println "Request:" request) {:status 200 :headers {"Content-Type" "application/json"} :body (cheshire/generate-string ...
b440920b0f10ed28875cff547d3eadeec7210feb69d261b30a8b5831c7675944
marcoheisig/sb-simd
simd-dot.lisp
(in-package :sb-simd-avx) (defun simd-dot (array1 array2 &aux (n (min (array-total-size array1) (array-total-size array2)))) (declare (type (simple-array double-float 1) array1 array2) (optimize speed (safety 0))) (do ((index 0 (the (integer 0 #.(- array-total-size-limit 16)) (+ index 16))) (acc1...
null
https://raw.githubusercontent.com/marcoheisig/sb-simd/1b0d394d399a42cbd0ea924b4f7d5683a8c64718/examples/simd-dot.lisp
lisp
(in-package :sb-simd-avx) (defun simd-dot (array1 array2 &aux (n (min (array-total-size array1) (array-total-size array2)))) (declare (type (simple-array double-float 1) array1 array2) (optimize speed (safety 0))) (do ((index 0 (the (integer 0 #.(- array-total-size-limit 16)) (+ index 16))) (acc1...
24531a87aae0741e7f6c12484f23c0430c6c67b670090cc06dd92979cc2f889b
UU-ComputerScience/uhc
LocalInstance1.hs
{- ---------------------------------------------------------------------------------------- what : local instance expected: ok ---------------------------------------------------------------------------------------- -} module LocalInstance1 where eqInt :: Int -> Int -> Bool eqInt = (==) main :: IO () main ...
null
https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/99/LocalInstance1.hs
haskell
---------------------------------------------------------------------------------------- what : local instance expected: ok ----------------------------------------------------------------------------------------
module LocalInstance1 where eqInt :: Int -> Int -> Bool eqInt = (==) main :: IO () main = do let i = 3 :: Int j = 5 :: Int putStrLn (show (i == j)) putStrLn (show (let m = 2 :: Int instance Eq Int where x == y = eqInt (x `mod` m) (y `...
b8a10ded42f6ec7bec103ee9c3938b43b933f06783701c6ca2463f8566d3cfd4
linoscope/okasaki-book-ocaml
test_binomial_heap.ml
open Base open Stdio open Okasaki_book module H = Binomial_heap.Make(Int) let%expect_test "test" = let h = H.empty |> H.insert ~value:5 |> H.insert ~value:2 |> H.insert ~value:4 |> H.insert ~value:3 in h |> H.find_min |> printf "%d\n"; H.delete_min h |> H.find_min |> printf "%d\n"; H.de...
null
https://raw.githubusercontent.com/linoscope/okasaki-book-ocaml/77eb3aaa7113e1b175fbe3c7253f8e4954acd5e9/test/ch3/test_binomial_heap.ml
ocaml
open Base open Stdio open Okasaki_book module H = Binomial_heap.Make(Int) let%expect_test "test" = let h = H.empty |> H.insert ~value:5 |> H.insert ~value:2 |> H.insert ~value:4 |> H.insert ~value:3 in h |> H.find_min |> printf "%d\n"; H.delete_min h |> H.find_min |> printf "%d\n"; H.de...
3b9523337adae1e1fc144e1bf35c1de968401a13268697fa4a7c80dcd4b9630c
rabbitmq/rabbit-stress
http_api_measure.erl
-module(http_api_measure). -compile(export_all). % Very long http timeout -define(TIMEOUT, 1000000). prepare() -> inets:start(), application:ensure_all_started(gun). start_test(Host, Port, Total, Parallel) -> prepare(), Requests = ["/api/queues", "/api/channels", "/api/connections"], RequestPlan...
null
https://raw.githubusercontent.com/rabbitmq/rabbit-stress/9655c700c62b6271f9d226924d983c14b95ed0c2/src/http_api_measure.erl
erlang
Very long http timeout
-module(http_api_measure). -compile(export_all). -define(TIMEOUT, 1000000). prepare() -> inets:start(), application:ensure_all_started(gun). start_test(Host, Port, Total, Parallel) -> prepare(), Requests = ["/api/queues", "/api/channels", "/api/connections"], RequestPlans = gen_request_plans(Hos...
b96ca0940bb2eaee3b41aff55cabc8de6492fe2bf612f980a145cf830fd3f8b8
BranchTaken/Hemlock
test_cmp.ml
open! Basis.Rudiments open! Basis open Array let test () = let arrs = [ [||]; [|0L|]; [|0L; 0L|]; [|0L; 1L|]; [|0L; 0L|]; [|0L|]; [||]; ] in let rec fn arr arrs = begin match arrs with | [] -> () | hd :: tl -> begin let () = List.iter arrs ~f:(fun arr2 -> ...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/f3604ceda4f75cf18b6ee2b1c2f3c5759ad495a5/bootstrap/test/basis/array/test_cmp.ml
ocaml
open! Basis.Rudiments open! Basis open Array let test () = let arrs = [ [||]; [|0L|]; [|0L; 0L|]; [|0L; 1L|]; [|0L; 0L|]; [|0L|]; [||]; ] in let rec fn arr arrs = begin match arrs with | [] -> () | hd :: tl -> begin let () = List.iter arrs ~f:(fun arr2 -> ...
ca6fa8aee2cee3ca5a98677af5b4870137ba7396813f1908085e6d698e9eb68c
malcolmreynolds/GSLL
gaussian-tail.lisp
Regression test GAUSSIAN - TAIL for GSLL , automatically generated (in-package :gsl) (LISP-UNIT:DEFINE-TEST GAUSSIAN-TAIL (LISP-UNIT::ASSERT-NUMERICAL-EQUAL (LIST (LIST 50.10837030381376d0 51.42695945309931d0 50.5...
null
https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/tests/gaussian-tail.lisp
lisp
Regression test GAUSSIAN - TAIL for GSLL , automatically generated (in-package :gsl) (LISP-UNIT:DEFINE-TEST GAUSSIAN-TAIL (LISP-UNIT::ASSERT-NUMERICAL-EQUAL (LIST (LIST 50.10837030381376d0 51.42695945309931d0 50.5...
a3fa34a8445efa9f758d7fbcd61dfc69721ca3597d989da39f43b8985793c9ad
skanev/playground
04.scm
SICP exercise 1.04 ; ; Observe that our model of evaluation allows for combinations whose operators ; are compound expressions. Use this observation to describe the behavior of ; the following procedure ; ; (define (a-plus-abs-b a b) ; ((if (> b 0) + -) a b)) ; The procedure adds a to the absolute value of b, pret...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/01/04.scm
scheme
Observe that our model of evaluation allows for combinations whose operators are compound expressions. Use this observation to describe the behavior of the following procedure (define (a-plus-abs-b a b) ((if (> b 0) + -) a b)) The procedure adds a to the absolute value of b, pretty much as it name suggests. ...
SICP exercise 1.04 comparing b to 0 , which is what ( if ( > b 0 ) + - ) does . In the former case
e6da546544d516d101cb2a5190b94640379ba0ca15c9105122ebe2c01cfb1f59
cmsc430/www
hustle.rkt
#lang slideshow (require slideshow/text) (require slideshow/code) (require slideshow/repl) ;; Title (slide #:title "CMSC 430, March 3rd 2020" (with-size 64 (tt "Hustle"))) (slide #:title "Stacks" 'next (item "Let's review stacks a little bit") 'next (item "One thing I was trying to get across, but may...
null
https://raw.githubusercontent.com/cmsc430/www/0809867532b8ef516029ac38093a145db5b424ea/www/slides/hustle.rkt
racket
Title
#lang slideshow (require slideshow/text) (require slideshow/code) (require slideshow/repl) (slide #:title "CMSC 430, March 3rd 2020" (with-size 64 (tt "Hustle"))) (slide #:title "Stacks" 'next (item "Let's review stacks a little bit") 'next (item "One thing I was trying to get across, but may have fai...
128c5c4f06a89bc923a3136c07856d4ad0d668e6dd56ae8f3cfb2b4fea7f763c
SahilKang/cl-avro
local-timestamp-millis.lisp
Copyright 2021 Google LLC ;;; ;;; This file is part of cl-avro. ;;; ;;; cl-avro is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ;;; (at your option) any later version. ;...
null
https://raw.githubusercontent.com/SahilKang/cl-avro/70fcaa32514cfb59b75812b2eab45ed24cce9d27/src/logical/local-timestamp-millis.lisp
lisp
This file is part of cl-avro. cl-avro is free software: you can redistribute it and/or modify (at your option) any later version. cl-avro 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 t...
Copyright 2021 Google LLC 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 (in-package #:cl-user) (defpackage #:cl-avro.internal.local-timestamp-millis (:u...
53c180a7a2e55287daa2166bdaba00ef0ee948c6e80bdd27f8e42cffe561d867
ermine/sulci
plugin_google.ml
* ( c ) 2004 - 2010 * (c) 2004-2010 Anastasia Gornostaeva *) open Hooks open Plugin_command open Http_suck let get xmpp env kind jid_from f url = let callback data = match data with | OK (_media, _charset, content) -> ( try f content with _exn -> env.e...
null
https://raw.githubusercontent.com/ermine/sulci/3ee4bd609b01e2093a6d37bf74579728d0a93b70/src/plugin_google.ml
ocaml
* ( c ) 2004 - 2010 * (c) 2004-2010 Anastasia Gornostaeva *) open Hooks open Plugin_command open Http_suck let get xmpp env kind jid_from f url = let callback data = match data with | OK (_media, _charset, content) -> ( try f content with _exn -> env.e...
41d8b4e067019297ad6bb5a1c6c4dca3ca36b5c2441f3412a77da5a5ed894a06
spurious/sagittarius-scheme-mirror
jmespath-tests.scm
(import (rnrs) (text json) (text json pointer) (text json jmespath) (util file) (except (chibi test) test-error)) (define-syntax test-error (syntax-rules () ((_ type? name expr) (test-assert name (guard (e ((type? e))) expr))))) (test-begin "JMESPath") (define files (find-files "./jmespath.test/t...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/jmespath-tests.scm
scheme
we don't distinguish arity, type, and value error.
(import (rnrs) (text json) (text json pointer) (text json jmespath) (util file) (except (chibi test) test-error)) (define-syntax test-error (syntax-rules () ((_ type? name expr) (test-assert name (guard (e ((type? e))) expr))))) (test-begin "JMESPath") (define files (find-files "./jmespath.test/t...
a3a700843c66219b2895f70b98b2dc8aec3a678ac78d6fe0aa73bded110e2aa9
robert-strandh/SICL
transfer.lisp
(cl:in-package #:cleavir-type-inference) ;;; Called for effect. Update the inference information from the ;;; instruction. (defgeneric process-instruction (instruction)) ;; Default method. TODO: better dispatch here? (defmethod process-instruction (instruction) (let ((input (instruction-input instruction *dictionar...
null
https://raw.githubusercontent.com/robert-strandh/SICL/343b47d083ffc3db4aaa00ed8c5e79b23143a62a/Code/Cleavir/Type-inference/transfer.lisp
lisp
Called for effect. Update the inference information from the instruction. Default method. TODO: better dispatch here? These functions all take an instruction, and the bag of descriptors in place as the input of that instruction. That is, the bag is a bag-join of the bags of all incoming arcs. For the assignme...
(cl:in-package #:cleavir-type-inference) (defgeneric process-instruction (instruction)) (defmethod process-instruction (instruction) (let ((input (instruction-input instruction *dictionary*))) (ecase (length (cleavir-ir:successors instruction)) (0 nil) (1 (one-successor-transfer instruction input)) ...
ca7650e8ff6d9d5ca518cacfa1f091c23b08027ac78643b766df63cfb08110d7
halgari/odin
data.clj
(ns com.tbaldridge.odin.contexts.data (:refer-clojure :exclude [==]) (:require [com.tbaldridge.odin :as o] [com.tbaldridge.odin.unification :as u] [com.tbaldridge.odin.util :as util])) (set! *warn-on-reflection* true) (defn prefix [itm rc] (reify clojure.lang.IReduceInit (reduce ...
null
https://raw.githubusercontent.com/halgari/odin/cd2c02a7e53dbc9b3a23a40598e2c326f14d8398/src/com/tbaldridge/odin/contexts/data.clj
clojure
(ns com.tbaldridge.odin.contexts.data (:refer-clojure :exclude [==]) (:require [com.tbaldridge.odin :as o] [com.tbaldridge.odin.unification :as u] [com.tbaldridge.odin.util :as util])) (set! *warn-on-reflection* true) (defn prefix [itm rc] (reify clojure.lang.IReduceInit (reduce ...
7f2df62532933d65a757506d2911f2d8ef55b307d51aa8a2794dbf22b3a0f0d0
chenyukang/eopl
01.scm
1 . proc ( x ) -(x,3 ) ;; (int -> int) 2 . proc ( f ) proc ( x ) -((f x ) , 1 ) ;; ((t -> t) -> (t -> int)) 3 . proc ( x ) x ;; (t -> t) 4 . proc ( x ) proc ( y ) ( x y ) . ;; ((t -> t) -> (t -> t)) 5 . proc ( x ) ( x 3 ) ;; (t -> t) 6 . proc ( x ) ( x x ) ;; (t -> t) 7 . proc ( x ) if x then 88...
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch7/01.scm
scheme
(int -> int) ((t -> t) -> (t -> int)) (t -> t) ((t -> t) -> (t -> t)) (t -> t) (t -> t) (bool -> int) have no type int have no type proc (p) proc (x) if (p (f x)) then (g 1) else -((f x),1) have no type proc (f) if (p x) then -(x,1) else (f p) have no type let d = proc (x) p...
1 . proc ( x ) -(x,3 ) 2 . proc ( f ) proc ( x ) -((f x ) , 1 ) 3 . proc ( x ) x 4 . proc ( x ) proc ( y ) ( x y ) . 5 . proc ( x ) ( x 3 ) 6 . proc ( x ) ( x x ) 7 . proc ( x ) if x then 88 else 99 8 . proc ( x ) proc ( y ) if x then y else 99 9 . ( proc ( p ) if p then 88 else 99 33 ) 10...
30cc63d381dd920ab22f5cf198ccb7490fd22246d97ddfebc76739bc835b68c9
jwiegley/notes
Darais.hs
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveFoldable # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE TypeApplications # module Darais where import Control.Monad import Data.Functor.Identity import Debug.Trace newtype Fix f = Fix { unFix :: f (Fix f) } data ExprF r = Val Int | Add r r deriving (Functor, Foldable...
null
https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/Darais.hs
haskell
# LANGUAGE DeriveTraversable # A type application is needed below because we do not generate any value from the analysis; it does tracing only.
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveFoldable # # LANGUAGE TypeApplications # module Darais where import Control.Monad import Data.Functor.Identity import Debug.Trace newtype Fix f = Fix { unFix :: f (Fix f) } data ExprF r = Val Int | Add r r deriving (Functor, Foldable, Traversable) type Expr = Fix Exp...
6153e54b3e734d594e58583ee64d3dfdbbab15b09b1b954f11d5677a048bc707
mbenke/zpf2012
monoid.hs
# LANGUAGE TypeOperators # -- For Monoidal "instances" # LANGUAGE FlexibleInstances , OverlappingInstances , UndecidableInstances # import Control.Applicative class Monoid a where mempty :: a mappend :: a -> a -> a mconcat :: [a] -> a mconcat = foldr mappend mempty typ fantomowy : argumentu newtype Accy...
null
https://raw.githubusercontent.com/mbenke/zpf2012/faad6468f9400059de1c0735e12a84a2fdf24bb4/Slides/10/monoid.hs
haskell
For Monoidal "instances" O (| (<*>) gs xs |)
# LANGUAGE TypeOperators # # LANGUAGE FlexibleInstances , OverlappingInstances , UndecidableInstances # import Control.Applicative class Monoid a where mempty :: a mappend :: a -> a -> a mconcat :: [a] -> a mconcat = foldr mappend mempty typ fantomowy : argumentu newtype Accy o a = Acc{acc::o} instance ...
16322df3c5f70b3d49a8e6a5b31a765a42c56d1a3a0fb217eed53f679262a3d7
ivanjovanovic/sicp
code-formatter.scm
; helper procedure to output formatted object code (define (format-object-code object-code) (if (not (null? object-code)) (let ((instruction (car object-code))) (if (symbol? instruction) (begin (output instruction) ; label (format-object-code (cdr object-code))) (begin ...
null
https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/5.5/code-formatter.scm
scheme
helper procedure to output formatted object code label indented
(define (format-object-code object-code) (if (not (null? object-code)) (let ((instruction (car object-code))) (if (symbol? instruction) (begin (format-object-code (cdr object-code))) (begin (format-object-code (cdr object-code))))) 'done)) (define (instruction-list o...
7448a37fbf6f380873cd8e1ee7ba28aababfae5e17e12977971407eeabbd4c64
drcode/webfui
framework.cljs
(ns webfui.framework (:use [webfui.dom :only [defdom add-dom-watch]] [webfui.plugin.core :only [register-plugin]] [webfui.plugin.mouse :only [mouse add-mouse-watch]] [webfui.state-patches :only [patch]] [webfui.utilities :only [get-attribute]])) (register-plugin (mouse.)) (defn state...
null
https://raw.githubusercontent.com/drcode/webfui/e8ba6e9224542755e5780488cb43f0c5510827f9/src/webfui/framework.cljs
clojure
(ns webfui.framework (:use [webfui.dom :only [defdom add-dom-watch]] [webfui.plugin.core :only [register-plugin]] [webfui.plugin.mouse :only [mouse add-mouse-watch]] [webfui.state-patches :only [patch]] [webfui.utilities :only [get-attribute]])) (register-plugin (mouse.)) (defn state...
116d7eb044b81d9dfdf8e9813a20217a664df9002b0aad8f2a0e145c1d176f16
moby/datakit
cI_config.ml
open Datakit_github open! Astring type test = string CI_term.t type project = { dashboards : CI_target.Set.t; tests : CI_target.t -> test String.Map.t; } type t = { web_config : CI_web_templates.t; projects : project Repo.Map.t } let id_of_branch repo name = `Ref (repo, "heads" :: String.cuts ~sep:"/" name) le...
null
https://raw.githubusercontent.com/moby/datakit/e047e55a2dfa3aaec02398d7d7699f4f7afd2b47/ci/src/cI_config.ml
ocaml
open Datakit_github open! Astring type test = string CI_term.t type project = { dashboards : CI_target.Set.t; tests : CI_target.t -> test String.Map.t; } type t = { web_config : CI_web_templates.t; projects : project Repo.Map.t } let id_of_branch repo name = `Ref (repo, "heads" :: String.cuts ~sep:"/" name) le...
0b8c7ced323f91ce85c9fb811b1b77f627d0ee36186122697aceece1de02398c
osteele/cl-spec
package.lisp
Copyright 2008 by . Released under the MIT License . (in-package #:common-lisp-user) (defpackage #:cl-spec (:use #:common-lisp) (:nicknames :clspec) (:documentation "Behavior Testing for Common Lisp.") (:export define-specification specify run-specification run-spec ...
null
https://raw.githubusercontent.com/osteele/cl-spec/d83b8a89d55771691e439e2fb910ce202dbd6abe/package.lisp
lisp
Copyright 2008 by . Released under the MIT License . (in-package #:common-lisp-user) (defpackage #:cl-spec (:use #:common-lisp) (:nicknames :clspec) (:documentation "Behavior Testing for Common Lisp.") (:export define-specification specify run-specification run-spec ...
00e56cab123672b7df73a8bf2ee2ac603139259097a64c900693bc9c6860ea57
AdRoll/rebar3_format
ignored_file_config.erl
-module(ignored_file_config). -export([bad_formatted_func/0]). bad_formatted_func() -> case 2 > 3 of true -> ok; false -> error end.
null
https://raw.githubusercontent.com/AdRoll/rebar3_format/5ffb11341796173317ae094d4e165b85fad6aa19/test_app/src/ignored_file_config.erl
erlang
-module(ignored_file_config). -export([bad_formatted_func/0]). bad_formatted_func() -> case 2 > 3 of true -> ok; false -> error end.
e2890d2d8762d18f6a59deac02b99ff6e9be9eec2307270f629430d447cca0cb
stevenvar/OMicroB
arduinoMegaPins.ml
type register = | PORTA | PORTB | PORTC | PORTD | PORTE | PORTF | PORTG | PORTH | PORTJ | PORTK | PORTL | DDRA | DDRB | DDRC | DDRD | DDRE | DDRF | DDRG | DDRH | DDRJ | DDRK | DDRL | PINA | PINB | PINC | PIND | PINE | PINF | PING | PINH | PINJ | PINK | PINL | SPCR | SPSR | SPDR type bit = BIT0 | BIT1 | BIT2 | ...
null
https://raw.githubusercontent.com/stevenvar/OMicroB/99a2e781f9511137090aaba3c09e2e920c0dbc77/targets/avr/arduino_mega_2560/arduinoMegaPins.ml
ocaml
* Simulation Physical placement on the microcontroler
type register = | PORTA | PORTB | PORTC | PORTD | PORTE | PORTF | PORTG | PORTH | PORTJ | PORTK | PORTL | DDRA | DDRB | DDRC | DDRD | DDRE | DDRF | DDRG | DDRH | DDRJ | DDRK | DDRL | PINA | PINB | PINC | PIND | PINE | PINF | PING | PINH | PINJ | PINK | PINL | SPCR | SPSR | SPDR type bit = BIT0 | BIT1 | BIT2 | ...
a24484683a4d74952660d212bdde9ae412d5c97bb0ad82f430507d5ee768a8c2
ghc/nofib
DerivedRules.hs
module DerivedRules where import Type_defs import Kernel import Core_datatype import Build_Tm import Edlib import Parse import Sub_Core1 import Sub_Core2 import Sub_Core3 import Sub_Core4 import Vtslib conj_thm_trm = Binder Forall (Symbol_dec (Constant Bool' [] []) []) ( Binder Forall (Symbol_dec (Const...
null
https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/real/veritas/DerivedRules.hs
haskell
------- ) ------- conj *)
module DerivedRules where import Type_defs import Kernel import Core_datatype import Build_Tm import Edlib import Parse import Sub_Core1 import Sub_Core2 import Sub_Core3 import Sub_Core4 import Vtslib conj_thm_trm = Binder Forall (Symbol_dec (Constant Bool' [] []) []) ( Binder Forall (Symbol_dec (Const...
8cbdb8469ecf1a7ed44a99ec3595648c3f2cca0a205c14d70ee6c91ae5503b80
nixeagle/cl-irc
protocol.lisp
$ Id$ ;;;; $Source$ ;;;; See LICENSE for licensing information. (in-package :irc) ;; ;; Condition ;; (define-condition no-such-reply () ((reply-number :reader reply-number :initarg :reply-number)) (:report (lambda (condition stream) (format stream "No such reply ~A." (reply-number conditi...
null
https://raw.githubusercontent.com/nixeagle/cl-irc/efaea15f2962107ea9b1a2fad5cd9db492b4247b/tags/cl-irc_upstream_version_0_5_1/protocol.lisp
lisp
$Source$ See LICENSE for licensing information. Condition needed because of the "loop while" in read-message-loop argh. I want to name this quit but that gives me issues with generic functions. need to resolve. Channel User what if the user is not on any channels? IRC Message argh. eval. shoul...
$ Id$ (in-package :irc) (define-condition no-such-reply () ((reply-number :reader reply-number :initarg :reply-number)) (:report (lambda (condition stream) (format stream "No such reply ~A." (reply-number condition))))) Connection (defclass connection () ((user :initarg :user ...
641531ec449f2c1b370deadaa369a517c12b421ba5484e912fb3309b018006bb
codyrioux/REAPER
lcs.clj
Copyright ( c ) 2011 , All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound b...
null
https://raw.githubusercontent.com/codyrioux/REAPER/79dd9c045f90e983c39bb8e5972f079dc7c92190/src/reaper/tools/lcs.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 ...
Copyright ( c ) 2011 , All rights reserved . (ns reaper.tools.lcs (:require [reaper.util :as util] [reaper.tools.stop-words :refer [tokens->stop-words corpus->stop-words]] [reaper.tools.porter-stemmer :refer [tokens->stemmed-tokens corpus->stemmed-corpus]])) (defn- wlcs [^objects a1...
b37fb791923b243c330d2b6f1af15a94353000db60fba4a7c94b9e7dcb36f834
unisonweb/unison
Raw.hs
module Unison.Codebase.Branch.Raw where import Data.Map (Map) import qualified Unison.Codebase.Metadata as Metadata import Unison.Hash (Hash) import qualified Unison.Hash as Hash import Unison.NameSegment (NameSegment) import Unison.Reference (Reference) import Unison.Referent (Referent) type Star r n = Metadata.Star...
null
https://raw.githubusercontent.com/unisonweb/unison/7843e48cddbe46436bffb5a2e1bb5fb444f55302/parser-typechecker/src/Unison/Codebase/Branch/Raw.hs
haskell
The raw Branch
module Unison.Codebase.Branch.Raw where import Data.Map (Map) import qualified Unison.Codebase.Metadata as Metadata import Unison.Hash (Hash) import qualified Unison.Hash as Hash import Unison.NameSegment (NameSegment) import Unison.Reference (Reference) import Unison.Referent (Referent) type Star r n = Metadata.Star...
904a21a196b7af1e8c1c2f0723b8e4fd35e94f32585da04c5f3d14061c62efb5
gwathlobal/CotD
items.lisp
(in-package :cotd) (defclass item-type () ((id :initarg :id :accessor id) (glyph-idx :initform 0 :initarg :glyph-idx :accessor glyph-idx :type fixnum) (glyph-color :initform sdl:*white* :initarg :glyph-color :accessor glyph-color :type sdl:color) (back-color :initform sdl:*black* :initarg :back-color :acces...
null
https://raw.githubusercontent.com/gwathlobal/CotD/d01ef486cc1d3b21d2ad670ebdb443e957290aa2/src/items.lisp
lisp
abil-card - +item-abil-card+ - a list of cards that might appear in this deck id of the mob that has this item in its inventory find the same item type
(in-package :cotd) (defclass item-type () ((id :initarg :id :accessor id) (glyph-idx :initform 0 :initarg :glyph-idx :accessor glyph-idx :type fixnum) (glyph-color :initform sdl:*white* :initarg :glyph-color :accessor glyph-color :type sdl:color) (back-color :initform sdl:*black* :initarg :back-color :acces...
48bd6950fe0c9164eeb797103c5762cf23a70efbe8109ec3c74daba4c965d5d3
ericcervin/getting-started-with-sketching
pg021.rkt
#lang sketching (define (setup) (size 480 120) (smoothing 'smoothed) ) (define (draw) (background 180) (stroke-weight 1) (ellipse 75 60 90 90) (stroke-weight 8) (ellipse 175 60 90 90) (ellipse 279 60 90 90) (stroke-weight 20) (ellipse 389 60 90 90) )
null
https://raw.githubusercontent.com/ericcervin/getting-started-with-sketching/a02ec4c41354a0e383d615bd0e0828dba5d48bd8/pg021.rkt
racket
#lang sketching (define (setup) (size 480 120) (smoothing 'smoothed) ) (define (draw) (background 180) (stroke-weight 1) (ellipse 75 60 90 90) (stroke-weight 8) (ellipse 175 60 90 90) (ellipse 279 60 90 90) (stroke-weight 20) (ellipse 389 60 90 90) )
eeac09d8fe5cb4cbe2745c156aee075f8914bc60819cb158b02a279029580d55
Deep-Symmetry/afterglow
midi.clj
(ns afterglow.midi "Handles MIDI communication, including syncing a show metronome to MIDI clock pulses." (:require [clojure.reflect] [afterglow.rhythm :as rhythm] [amalloy.ring-buffer :refer [ring-buffer]] [clojure.math.numeric-tower :as math] [overtone.at-at :refer ...
null
https://raw.githubusercontent.com/Deep-Symmetry/afterglow/12b8c90f22c591549adc4d89b8a19853f5e9e3a5/src/afterglow/midi.clj
clojure
lengthy operations must be performed on another thread." lengthy operations must be TODO: This is not really safe because if the handler blocks it ties up all future threads for this either, so a core.async channel approach is probably best. so we need to only screen out devices which are supported. and th...
(ns afterglow.midi "Handles MIDI communication, including syncing a show metronome to MIDI clock pulses." (:require [clojure.reflect] [afterglow.rhythm :as rhythm] [amalloy.ring-buffer :refer [ring-buffer]] [clojure.math.numeric-tower :as math] [overtone.at-at :refer ...
1e0d04b8681b75ac95c3adcae8bb5f7e69b0e0366e18e5e6cb7ce7504d93888e
avsm/platform
gen_num.ml
--------------------------------------------------------------------------- Copyright ( c ) 2014 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...
null
https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/uucp.12.0.0%2Bdune/support/gen_num.ml
ocaml
--------------------------------------------------------------------------- Copyright ( c ) 2014 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...
16c5b3619efd2f22a49e4990ff12dd46822728b831741d9bccd0ed5f97fc441b
anwarmamat/cmsc330fall17public
basics.mli
val mult_of_y : int -> int -> bool val head_divisor : int list -> bool val second_element : int list -> int val sum_first_three : int list -> int val unzip : ('a * 'b) list -> 'a list * 'b list val get_val : int -> int list -> int val get_vals : int list -> int list -> int list val list_swap_val : 'a list -> 'a -> 'a ...
null
https://raw.githubusercontent.com/anwarmamat/cmsc330fall17public/9a23ec1fc0cc4324e8c316f8d630c4e53af80f04/p2a/basics.mli
ocaml
val mult_of_y : int -> int -> bool val head_divisor : int list -> bool val second_element : int list -> int val sum_first_three : int list -> int val unzip : ('a * 'b) list -> 'a list * 'b list val get_val : int -> int list -> int val get_vals : int list -> int list -> int list val list_swap_val : 'a list -> 'a -> 'a ...
387e5be8f39f2d72c8868d56d208169049ce4ff1d2d43413a79ba022ecca6013
Factual/eliza
delegator.clj
(ns eliza.responder.delegator (:require [eliza.register :refer [register-responder!]] [clojure.string :as str])) (def people ["Will" "Aaron" "Avram" "Evan" "Daniel" "Guru"]) (defn delegator-responder [{[first second & more] :tokens}] (when (= ["what" "is"] [first second]) {:output (str/join " " ...
null
https://raw.githubusercontent.com/Factual/eliza/2b87c362322ceb9f2cf53f2866763e9c65d98a26/src/eliza/responder/delegator.clj
clojure
(ns eliza.responder.delegator (:require [eliza.register :refer [register-responder!]] [clojure.string :as str])) (def people ["Will" "Aaron" "Avram" "Evan" "Daniel" "Guru"]) (defn delegator-responder [{[first second & more] :tokens}] (when (= ["what" "is"] [first second]) {:output (str/join " " ...
4a968967a21b53924cfc5a5398b51e9c1e713c021da7fb07332e5983530f2db3
garrigue/lablgtk
progressbar.ml
(**************************************************************************) Lablgtk - Examples (* *) (* This code is in the public domain. *) (* You may f...
null
https://raw.githubusercontent.com/garrigue/lablgtk/504fac1257e900e6044c638025a4d6c5a321284c/examples/progressbar.ml
ocaml
************************************************************************ This code is in the public domain. You may freely copy parts of it in your application. ...
Lablgtk - Examples $ Id$ let main () = GMain.init (); let window = GWindow.window ~border_width: 10 () in window#connect#destroy ~callback:GMain.quit; let table = GPack.table ~rows:3 ~columns:2 ~packing: window#add () in GMisc.label ~text:"Progre...
e6fe37b55110c838a5de48ebb1e450311b8f620a055ff2511502960e2daea121
tomjaguarpaw/haskell-opaleye
Constant.hs
# LANGUAGE FlexibleContexts , FlexibleInstances , MultiParamTypeClasses # module Opaleye.SQLite.Constant where import Opaleye.SQLite.Column (Column) import qualified Opaleye.SQLite.Column as C import qualified Opaleye.SQLite.SqlTypes as T import qualified Data.Text ...
null
https://raw.githubusercontent.com/tomjaguarpaw/haskell-opaleye/b7aacc07c6392654cae439fc3b997620c3aa7a87/opaleye-sqlite/src/Opaleye/SQLite/Constant.hs
haskell
{ Boilerplate instances }
# LANGUAGE FlexibleContexts , FlexibleInstances , MultiParamTypeClasses # module Opaleye.SQLite.Constant where import Opaleye.SQLite.Column (Column) import qualified Opaleye.SQLite.Column as C import qualified Opaleye.SQLite.SqlTypes as T import qualified Data.Text ...
03f137fa649855d5ac56f4b6a48a7dd2cbd6e6e4301c2aefada525e2730f417d
cram2/cram
rete.lisp
;;; Copyright ( c ) 2009 , < > ;;; All rights reserved. ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions are met: ;;; ;;; * Redistributions of source code must retain the above copyright ;;; notice, this li...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_core/cram_prolog/src/rete/rete.lisp
lisp
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Re...
Copyright ( c ) 2009 , < > * Neither the name of Willow Garage , Inc. nor the names of its THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR ...
54fcdc2a13b46068bde3b0838f4764b935549f16feff91928d709d487e39a8c1
LCBH/UKano
pitsyntax.mli
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * UKano : UnlinKability and ANOnymity verifier * * * ...
null
https://raw.githubusercontent.com/LCBH/UKano/13c046ddaca48b45d3652c3ea08e21599e051527/src/pitsyntax.mli
ocaml
UKano Register equations
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * UKano : UnlinKability and ANOnymity verifier * * * ...
00b4407b91fa01c1f614a4a2ac80beba324c8c888c74e5361d9484fa4fa11380
brendanhay/amazonka
DeleteCallAnalyticsJob.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE StrictData #-} # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - binds # # OPTIONS_GHC -fno - warn - unused -...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-transcribe/gen/Amazonka/Transcribe/DeleteCallAnalyticsJob.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Deletes a Call Analytics job. To use this operation, specify the name of case sensitive. * Creating a Request * Request Lenses * Destructuring the Response * Response Lenses | /See:/ 'newDeleteCallAnalyticsJob' smart constru...
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - binds # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # De...
079898b56cc7f93d8667e44f3ef49bf4d5b561bf9efb72bc3b8a9e9276ee38de
wdebeaum/step
vcr.lisp
;;;; ;;;; W::VCR ;;;; (define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::VCR (SENSES ((LF-PARENT ONT::RECORDING-DEVICE) (meta-data :origin calo :entry-date 20040205) ) ) ) ))
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/vcr.lisp
lisp
W::VCR
(define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::VCR (SENSES ((LF-PARENT ONT::RECORDING-DEVICE) (meta-data :origin calo :entry-date 20040205) ) ) ) ))
44bd2e71d1448d43e7ec51de5aeab05e49aba70fa40b01ce04102f0135928fd1
oliyh/oxbow
re_frame.cljs
(ns oxbow.re-frame (:require [oxbow.core :as core] [re-frame.core :as rf])) (rf/reg-fx ::abort (fn [abort-fn] (abort-fn))) (rf/reg-event-fx ::abort (fn [{:keys [db]} [_ id-or-uri]] (when-let [{:keys [abort]} (get-in db [::oxbow :sse-client id-or-uri])] (merge {:db (update-in db [::oxbow :...
null
https://raw.githubusercontent.com/oliyh/oxbow/11e704cfdc14bf083b31263c092e0fbbacfa4c82/src/oxbow/re_frame.cljs
clojure
(ns oxbow.re-frame (:require [oxbow.core :as core] [re-frame.core :as rf])) (rf/reg-fx ::abort (fn [abort-fn] (abort-fn))) (rf/reg-event-fx ::abort (fn [{:keys [db]} [_ id-or-uri]] (when-let [{:keys [abort]} (get-in db [::oxbow :sse-client id-or-uri])] (merge {:db (update-in db [::oxbow :...
3ba19654a558bc7362fb1f4d8e5b4b0ae31d60e3aaec140abbcd0463f309cf47
expipiplus1/vulkan
VK_KHR_shader_terminate_invocation.hs
{-# language CPP #-} -- | = Name -- -- VK_KHR_shader_terminate_invocation - device extension -- -- == VK_KHR_shader_terminate_invocation -- -- [__Name String__] -- @VK_KHR_shader_terminate_invocation@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] 216 -- -- [__Revis...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src/Vulkan/Extensions/VK_KHR_shader_terminate_invocation.hs
haskell
# language CPP # | = Name VK_KHR_shader_terminate_invocation - device extension == VK_KHR_shader_terminate_invocation [__Name String__] @VK_KHR_shader_terminate_invocation@ [__Extension Type__] Device extension [__Registered Extension Number__] [__Revision__] [__Extension and Version Dependenci...
216 1 - Requires support for Vulkan 1.0 - 2020 - 08 - 11 - Promoted to Vulkan 1.3 Core - , Google - , NVIDIA - , Google - , Samsung - , Arm This extension adds Vulkan support for the terminate and sets the coverage...
0682c09d54982ef64dfca5ed3cb64a23a8468c24432948831f94a6d3f358fec9
bufferswap/ViralityEngine
camera.lisp
(in-package #:virality.component) (v:define-component camera () ((%active-p :accessor active-p :initarg :active-p :initform nil) (%view :reader view :initform (m4:id)) (%projection :reader projection :initform (m4:id)) (%mode :reader mode :init...
null
https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/src/components/camera.lisp
lisp
Component event hooks
(in-package #:virality.component) (v:define-component camera () ((%active-p :accessor active-p :initarg :active-p :initform nil) (%view :reader view :initform (m4:id)) (%projection :reader projection :initform (m4:id)) (%mode :reader mode :init...
a80870574ee16efba6580ca42a3806b2b920110cf6de98cd8a0279793f34a800
mfikes/advent-of-code
day_02.cljc
(ns advent-2017.day-02 (:refer-clojure :exclude [range]) (:require #?(:cljs [planck.core :refer [line-seq read-string]]) [#?(:clj clojure.java.io :cljs planck.io) :as io] [clojure.string :as str])) (def input (->> "advent_2017/day_02/input" io/resource io/reader line-seq)) (def data (->> input ...
null
https://raw.githubusercontent.com/mfikes/advent-of-code/72a015ac8fd9b1097efea69a0bb8acc26462665e/src/advent_2017/day_02.cljc
clojure
(ns advent-2017.day-02 (:refer-clojure :exclude [range]) (:require #?(:cljs [planck.core :refer [line-seq read-string]]) [#?(:clj clojure.java.io :cljs planck.io) :as io] [clojure.string :as str])) (def input (->> "advent_2017/day_02/input" io/resource io/reader line-seq)) (def data (->> input ...
3c8cb4f2e838c99eb94a27193b1036b2b55630d3a55f3b16b5f5964c628d0e46
Darkkey/erlamsa
erlamsa_mon_cdb.erl
Copyright ( c ) 2014 - 2018 % % Permission is hereby granted, free of charge, to any person obtaining a copy % of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation the rights % to use, copy, modify, merge, publish, distr...
null
https://raw.githubusercontent.com/Darkkey/erlamsa/f46dde549588d15789c2c38aec4a206560024987/src/erlamsa_mon_cdb.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnished to do so, subject to the following conditions: The above copyright notice ...
Copyright ( c ) 2014 - 2018 in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS ...
ca49a090ea1178fa3c103ed3a98ff7a57454e8c3b0375365f3254cb2d1fa7f85
objecthub/swift-lispkit
SRFI69.scm
;;; SRFI69.scm ;;; Regression test data ;;; Author : Copyright © 2018 ObjectHub . 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 ;;;...
null
https://raw.githubusercontent.com/objecthub/swift-lispkit/a952f80bb85e6fd084770033141ed8edd2f46500/Tests/LispKitTests/Code/SRFI69.scm
scheme
SRFI69.scm Regression test data 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...
Author : Copyright © 2018 ObjectHub . All rights reserved . distributed under the License is distributed on an " AS IS " BASIS , ( "eq?-based hash-tables: insert and lookup" (0 3 #t #t #t #f white black pink error grey grey (cat dog elephant) (black pink white) ((cat . black) (dog . white) (elephant . ...
626aee7b45dc487fd4901e65c01f56f889eae8f78da0ef1221824d90bbfd68f0
logseq/mldoc
timestamp.ml
open Prelude type date = { year : int ; month : int ; day : int } [@@deriving yojson] type time = { hour : int ; min : int } [@@deriving yojson] type repetition_kind = | Plus | DoublePlus | Dotted [@@deriving yojson] type repetition_duration = | Hour | Day | Week | Month | Year [@@deri...
null
https://raw.githubusercontent.com/logseq/mldoc/e56334b8f0e1664288f549f54773b55a140bc2e3/lib/syntax/timestamp.ml
ocaml
open Prelude type date = { year : int ; month : int ; day : int } [@@deriving yojson] type time = { hour : int ; min : int } [@@deriving yojson] type repetition_kind = | Plus | DoublePlus | Dotted [@@deriving yojson] type repetition_duration = | Hour | Day | Week | Month | Year [@@deri...
0f911f3e46b966ab46f2acb2872e98ae7086b6df3d06fbc69381b7987b53b753
googleson78/fp-lab-2022-23
Typeclasses.hs
-- cover all cases! # OPTIONS_GHC -fwarn - incomplete - patterns # -- warn about incomplete patterns v2 # OPTIONS_GHC -fwarn - incomplete - uni - patterns # -- write all your toplevel signatures! # OPTIONS_GHC -fwarn - missing - signatures # -- use different names! {-# OPTIONS_GHC -fwarn-name-shadowing #-} -- use all y...
null
https://raw.githubusercontent.com/googleson78/fp-lab-2022-23/e191727186f43b233e2d41b34dc83d7d9140d683/exercises/09/Typeclasses.hs
haskell
cover all cases! warn about incomplete patterns v2 write all your toplevel signatures! use different names! # OPTIONS_GHC -fwarn-name-shadowing # use all your pattern matches! check schedule for reschedule motivation: lookup, sort, insert showMatrix :: (a -> String) -> Matrix a -> String Eq.hs Animal.hs law...
# OPTIONS_GHC -fwarn - incomplete - patterns # # OPTIONS_GHC -fwarn - incomplete - uni - patterns # # OPTIONS_GHC -fwarn - missing - signatures # # OPTIONS_GHC -fwarn - unused - matches # module Typeclasses where import Prelude hiding (Monoid (..), Semigroup (..), all, any, find, fold, foldMap, lookup, mconcat, mtime...
1db081978948c2f6f0711811afece6db07704076d4b973e27a26e664b3c55ddc
openvstorage/alba
alba_client_download_slices.ml
Copyright ( C ) iNuron - This file is part of Open vStorage . For license information , see < LICENSE.txt > Copyright (C) iNuron - This file is part of Open vStorage. For license information, see <LICENSE.txt> *) open! Prelude open Alba_interval open Alba_client_errors open Slice open Lwt_extra2 open L...
null
https://raw.githubusercontent.com/openvstorage/alba/459bd459335138d6b282d332fcff53a1b4300c29/ocaml/src/alba_client_download_slices.ml
ocaml
read fragment pieces from the fragment cache partial osd read was not possible or desired, * try reading entire fragment and blit from that wait for all threads that might still write to the buffers * in 'fragment_intersections' to finish ensuring our client doesn't ask stupid things ...
Copyright ( C ) iNuron - This file is part of Open vStorage . For license information , see < LICENSE.txt > Copyright (C) iNuron - This file is part of Open vStorage. For license information, see <LICENSE.txt> *) open! Prelude open Alba_interval open Alba_client_errors open Slice open Lwt_extra2 open L...
7cd63412188bf312f1ed5a9f8044a2f52b49c8ea37a1c94ea2d3c0640ce0dfd0
AlacrisIO/legicash-facts
actions.ml
(* actions.ml -- actions behind the endpoints *) TODO : actually separate actions between client - side actions and operator - side actions , running in two different sets of threads , if possible on two different processes on two different machines , with access to different credentials . runnin...
null
https://raw.githubusercontent.com/AlacrisIO/legicash-facts/5d3663bade68c09bed47b3f58fa12580f38fdb46/src/alacris_client/actions.ml
ocaml
actions.ml -- actions behind the endpoints user account after a deposit or withdrawal, with transaction hash on the net table of id's to Lwt threads lookup id in thread table; if completed, return result, else return boilerplate TODO: make proper JSON RPC response operations posted to operator query operat...
TODO : actually separate actions between client - side actions and operator - side actions , running in two different sets of threads , if possible on two different processes on two different machines , with access to different credentials . running in two different sets of threads, if possibl...
c0625b7de2f4b4b63ad98d9ef7c9c93b7dffe4109113f1c0ae21655c405eb0fd
bennn/dissertation
main.rkt
#lang racket/base (require "zo-shell.rkt") (define TYPED-DATA '("../base/typed-zo-find_rkt.zo")) (define UNTYPED-DATA '("../base/main_rkt.zo" "../base/zo-shell_rkt.zo" "../base/zo-string_rkt.zo" "../base/zo-transition_rkt.zo")) (define (parse-data ps*) (map zo-read ps*)) (define (main ps*) (define zo* (par...
null
https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/zordoz/untyped/main.rkt
racket
#lang racket/base (require "zo-shell.rkt") (define TYPED-DATA '("../base/typed-zo-find_rkt.zo")) (define UNTYPED-DATA '("../base/main_rkt.zo" "../base/zo-shell_rkt.zo" "../base/zo-string_rkt.zo" "../base/zo-transition_rkt.zo")) (define (parse-data ps*) (map zo-read ps*)) (define (main ps*) (define zo* (par...
703f5291c9882334d4b31862783b12c1c37166bd94740cdd6908f26e153ad8a8
plum-umd/oblivml
region.ml
open Core open Stdio type t = (Var.t, Var.comparator_witness) Set.t let bottom = Set.empty (module Var) let var v = Set.singleton (module Var) v let join r1 r2 = Set.union r1 r2 let lt r1 r2 = Set.is_subset r1 r2 && not (Set.equal r1 r2) let equiv r1 r2 = Set.equal r1 r2 let indep r1 r2 = Set.equal (Set....
null
https://raw.githubusercontent.com/plum-umd/oblivml/f699dc49df7b36d550fcb045eff081435136f804/src/region.ml
ocaml
open Core open Stdio type t = (Var.t, Var.comparator_witness) Set.t let bottom = Set.empty (module Var) let var v = Set.singleton (module Var) v let join r1 r2 = Set.union r1 r2 let lt r1 r2 = Set.is_subset r1 r2 && not (Set.equal r1 r2) let equiv r1 r2 = Set.equal r1 r2 let indep r1 r2 = Set.equal (Set....
46ae9b09fbf0492e5ff669f8cf56429cc0654dfe6c1b972beaa24dc504cf8648
haskell/cabal
CmdRepl.hs
{-# LANGUAGE MultiWayIf #-} # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE TupleSections # -- | cabal-install CLI command: repl -- module Distribution.Client.CmdRepl ( -- * The @repl@ CLI and action replCommand, replAction, -- * Internals exposed...
null
https://raw.githubusercontent.com/haskell/cabal/e9b4744a846fcd808a325e288e5486e269f6a52e/cabal-install/src/Distribution/Client/CmdRepl.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # | cabal-install CLI command: repl * The @repl@ CLI and action * Internals exposed for testing | The @repl@ command is very much like @build@. It brings the install plan up to date, selects that part of the plan needed by the given or implicit repl target and...
# LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE TupleSections # module Distribution.Client.CmdRepl ( replCommand, replAction, matchesMultipleProblem, selectPackageTargets, selectComponentTarget ) where import Prelude () import Distribution.Client.Compat.Prelude import Distr...
a814eb4aae2ed51dac26f038e121d9ba69c8af49af7e74756edabde635dbe597
tcsprojects/mlsolver
elevatorts.ml
let rec range i j = if j >= i then i :: (range (i+1) j) else [] let rec remove_dups = function [] -> [] | x::xs -> x::(List.filter (fun y -> y <> x) (remove_dups xs)) type elevator = { position: int; dooropen: bool; requests: int list } let storeys = r...
null
https://raw.githubusercontent.com/tcsprojects/mlsolver/fdd1d7550aa57a42886160ae1e8336c1111b7d94/src/generators/elevatorts.ml
ocaml
fair means that any new request will be added to the end of the list (FIFO), whereas unfair means that it will be added to the beginning (LIFO) any button could be pressed or no requests could come in for each possibility decide in which direction to go let size = computeTSSize () in
let rec range i j = if j >= i then i :: (range (i+1) j) else [] let rec remove_dups = function [] -> [] | x::xs -> x::(List.filter (fun y -> y <> x) (remove_dups xs)) type elevator = { position: int; dooropen: bool; requests: int list } let storeys = r...
e6ee2da34bf3351ef5ce0999525dfa95ac1d199c755781b2ded91ff7fd511f02
NorfairKing/super-user-spark
Internal.hs
module SuperUserSpark.Check.Internal where import Import import Data.Maybe (catMaybes) import SuperUserSpark.Bake.Types import SuperUserSpark.Check.Types import SuperUserSpark.Compiler.Types import SuperUserSpark.CoreTypes import SuperUserSpark.Diagnose.Types checkDeployment :: DiagnosedDeployment -> DeploymentChec...
null
https://raw.githubusercontent.com/NorfairKing/super-user-spark/3c286a52a0b81e083c0e6d39f6f2b02aa9bb9231/src/SuperUserSpark/Check/Internal.hs
haskell
Will not be empty as per line above | Check a single (@source@, @destination@, @kind@) triple. Should not happen, but just in case.
module SuperUserSpark.Check.Internal where import Import import Data.Maybe (catMaybes) import SuperUserSpark.Bake.Types import SuperUserSpark.Check.Types import SuperUserSpark.Compiler.Types import SuperUserSpark.CoreTypes import SuperUserSpark.Diagnose.Types checkDeployment :: DiagnosedDeployment -> DeploymentChec...
bf374d77ed843556279af46bb25ff6d4e6b866d89a1fa05f44baee3d864c149d
runeksvendsen/bitcoin-payment-channel
Cond.hs
# LANGUAGE DeriveGeneric , KindSignatures # module Bitcoin.SpendCond.Cond ( module Bitcoin.SpendCond.Cond , module Bitcoin.Types ) where import Bitcoin.Util import Bitcoin.Internal.Util import Bitcoin.Types import Network.Haskoin.Script import Data.Void import qualified Data.Serialize as Bin import qualifie...
null
https://raw.githubusercontent.com/runeksvendsen/bitcoin-payment-channel/3d2ee56c027571d1a86092c317640e5eae7adde3/src/Bitcoin/SpendCond/Cond.hs
haskell
| Script that defines a condition to spend | The script will, depending on transaction type, be placed either in output, input or witness of transaction | Script that can spend funds sent to 'conditionScript' | Script fulfilling 'conditionScript' | Script we put in the output of a transaction | The script we ...
# LANGUAGE DeriveGeneric , KindSignatures # module Bitcoin.SpendCond.Cond ( module Bitcoin.SpendCond.Cond , module Bitcoin.Types ) where import Bitcoin.Util import Bitcoin.Internal.Util import Bitcoin.Types import Network.Haskoin.Script import Data.Void import qualified Data.Serialize as Bin import qualifie...
4e36066aef5507baff5f25624a4666515b3c4d62aa5b23250505c29a749958c4
jacekschae/learn-reitit-course-files
routes.clj
(ns cheffy.recipe.routes (:require [cheffy.recipe.handlers :as recipe] [cheffy.responses :as responses] [cheffy.middleware :as mw])) (defn routes [env] (let [db (:jdbc-url env)] ["/recipes" {:swagger {:tags ["recipes"]} :middleware [[mw/wrap-auth0]]} ["" {:...
null
https://raw.githubusercontent.com/jacekschae/learn-reitit-course-files/c13a8eb622a371ad719d3d9023f1b4eff9392e4c/increments/34-dev-ex/src/cheffy/recipe/routes.clj
clojure
(ns cheffy.recipe.routes (:require [cheffy.recipe.handlers :as recipe] [cheffy.responses :as responses] [cheffy.middleware :as mw])) (defn routes [env] (let [db (:jdbc-url env)] ["/recipes" {:swagger {:tags ["recipes"]} :middleware [[mw/wrap-auth0]]} ["" {:...
0bb01b4486721c848b0467f6eea4602624a5cdbd56da2b87cc3ac5a4e55d500e
sky-big/RabbitMQ
rabbit_msg_store_gc.erl
The contents of this file are subject to the Mozilla Public License %% Version 1.1 (the "License"); you may not use this file except in %% compliance with the License. You may obtain a copy of the License %% at / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WARRANTY OF ...
null
https://raw.githubusercontent.com/sky-big/RabbitMQ/d7a773e11f93fcde4497c764c9fa185aad049ce2/src/rabbit_msg_store_gc.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. 在等待文件没有读取者的操作字典...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is GoPivotal , Inc. Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved . -module...
c86868a325d5a784a2f7cd827ff1e0dd0ec0eea21e2a32d4347156d52e77d110
input-output-hk/plutus-apps
Main.hs
{-# LANGUAGE NamedFieldPuns #-} # LANGUAGE NumericUnderscores # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE StrictData # | Use this executable to send a number of transactions per second to the PAB . The executable will read the PAB configuration to get the connection data , and you can...
null
https://raw.githubusercontent.com/input-output-hk/plutus-apps/b80116b9dd97e83b61f016924f83ad4284212796/plutus-pab-executables/tx-inject/Main.hs
haskell
# LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedStrings # | The `Stats` are used by both the producer and consumer to track the number of generated transactions (used to verify if we respect the requested TPS rate) and the number of UTxOs (not used at the moment) | Starts the producer thread The tra...
# LANGUAGE NumericUnderscores # # LANGUAGE StrictData # | Use this executable to send a number of transactions per second to the PAB . The executable will read the PAB configuration to get the connection data , and you can specify a rate of transmission to the PAB. The executable will r...
dbc9414fc6c5a8f6e7c343068564332780e0e71b6a124105c49cda402f0a09d5
pveber/bistro
fasta.mli
open Bistro open Formats type t = fasta file val concat : [`plain of fasta file | `gziped of fasta gz file] list -> fasta file val concat_gz : [`plain of fasta file | `gziped of fasta gz file] list -> fasta gz file
null
https://raw.githubusercontent.com/pveber/bistro/da0ebc969c8c5ca091905366875cbf8366622280/lib/bio/fasta.mli
ocaml
open Bistro open Formats type t = fasta file val concat : [`plain of fasta file | `gziped of fasta gz file] list -> fasta file val concat_gz : [`plain of fasta file | `gziped of fasta gz file] list -> fasta gz file
757539a5b1faf71f23feb6c1bdca0e521e20dd47085c3de6775a54ee2e7588f5
mirage/capnp-rpc
registry.mli
open Capnp_rpc_lwt module Version : sig type t = [`Version_ed7d11372e0a7243] Capability.t val read : t -> string Lwt.t end type t = [`Registry_d9975f668b337b6d] Capability.t val set_echo_service : t -> Echo.t -> unit Lwt.t val echo_service : t -> Echo.t (** Waits until unblocked before returning. *) val echo_...
null
https://raw.githubusercontent.com/mirage/capnp-rpc/8a0b6dce373dc2e2d547d85e542962862773f74b/examples/testlib/registry.mli
ocaml
* Waits until unblocked before returning. * Returns a promise immediately. Resolves promise when unblocked. (should appear to work the same as [echo_service] to users) * [local ()] is a new local registry.
open Capnp_rpc_lwt module Version : sig type t = [`Version_ed7d11372e0a7243] Capability.t val read : t -> string Lwt.t end type t = [`Registry_d9975f668b337b6d] Capability.t val set_echo_service : t -> Echo.t -> unit Lwt.t val echo_service : t -> Echo.t val echo_service_promise : t -> Echo.t val unblock : t ...
5ad9ecefaec616f5032a473cb0f889fd29534e987866e90e1dd38b0ec726ee86
marick/specter-book-code
project.clj
(defproject fun "0.1.0" :description "Source code for /Extending and Using Specter/" :url "" :pedantic? :warn :license {:name "The MIT License (MIT)" :url "-license.php"} :dependencies [[org.clojure/clojure "1.8.0"] [com.rpl/specter "0.11.2" :exclusions [org.clojure/clojure org....
null
https://raw.githubusercontent.com/marick/specter-book-code/e416d4ce8164084057d36d29d89b17d114d1ab28/project.clj
clojure
(defproject fun "0.1.0" :description "Source code for /Extending and Using Specter/" :url "" :pedantic? :warn :license {:name "The MIT License (MIT)" :url "-license.php"} :dependencies [[org.clojure/clojure "1.8.0"] [com.rpl/specter "0.11.2" :exclusions [org.clojure/clojure org....
406b7ae2806b2c66d66a9d70883238471d7c9908faf0b8a07c298a056cc6a435
monadbobo/ocaml-core
semaphore.mli
* Semaphores @author < mmottl\@janestreet.com > @author Markus Mottl <mmottl\@janestreet.com> *) (** Type of semaphores *) type 'a t val init : 'a option -> 'a t (** [init v] initializes a semaphore with an optional value [v]. If it is [Some x], then {!Semaphore.wait} will return immediately with...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/extended/lib/semaphore.mli
ocaml
* Type of semaphores * [init v] initializes a semaphore with an optional value [v]. If it is [Some x], then {!Semaphore.wait} will return immediately with [x], otherwise it will block until {!Semaphore.signal} is called. * [wait sem] blocks the calling thread on semaphore [sem] if it was not initialized ...
* Semaphores @author < mmottl\@janestreet.com > @author Markus Mottl <mmottl\@janestreet.com> *) type 'a t val init : 'a option -> 'a t val signal : 'a t -> 'a -> unit * [ signal v ] allows one thread blocked in { ! Semaphore.wait } on semaphore [ sem ] to continue . The semaphore will then ...
8ad2663970fb128d9228e4624e14260cf405af04f3cbe389d4d552365e22ed9e
Guest0x0/trebor
Elaborate.ml
open Syntax open Eval type context = { level : int ; shift : int ; venv : Value.value list ; tenv : Value.env } let empty_ctx = { level = 0 ; shift = 0 ; venv = [] ; tenv = [] } let add_local name typ ?value ctx = let value, kind = match value with | Some va...
null
https://raw.githubusercontent.com/Guest0x0/trebor/c6b6c099e3e848979bd8f501d28c4c2f35f1235e/Kernel/Elaborate.ml
ocaml
open Syntax open Eval type context = { level : int ; shift : int ; venv : Value.value list ; tenv : Value.env } let empty_ctx = { level = 0 ; shift = 0 ; venv = [] ; tenv = [] } let add_local name typ ?value ctx = let value, kind = match value with | Some va...
c91deb243140745faa8a3fe85c7abe00934f50007e834e18093567a9e832d65e
fulcrologic/fulcro-rad-datomic
datomic_cloud.clj
(ns com.fulcrologic.rad.database-adapters.datomic-cloud (:require [clojure.pprint :refer [pprint]] [com.fulcrologic.fulcro.algorithms.do-not-use :refer [deep-merge]] [com.fulcrologic.rad.attributes :as attr] [com.fulcrologic.rad.database-adapters.datomic-common :as common] [com.fulcrologic.rad.dat...
null
https://raw.githubusercontent.com/fulcrologic/fulcro-rad-datomic/d2e04913bc3ac6ca892b7613ec6e31f8454636c7/src/main/com/fulcrologic/rad/database_adapters/datomic_cloud.clj
clojure
see Datomic Cloud docs>}
(ns com.fulcrologic.rad.database-adapters.datomic-cloud (:require [clojure.pprint :refer [pprint]] [com.fulcrologic.fulcro.algorithms.do-not-use :refer [deep-merge]] [com.fulcrologic.rad.attributes :as attr] [com.fulcrologic.rad.database-adapters.datomic-common :as common] [com.fulcrologic.rad.dat...
73f767b851194b5c2ed0b12c3554c4ace7df0fe8ca8a8fd8fbc08175544d9393
nasa/Common-Metadata-Repository
elasticsearch.clj
(ns cmr.indexer.test.data.elasticsearch (:require [clojure.test :refer :all] [cmr.indexer.data.elasticsearch :as es] [cmr.indexer.data.index-set :as i] [cmr.indexer.data.index-set-generics :as index-set-gen])) (def test-index-set "A real copy of an index set from UAT with the mappings replaced to be sm...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/ef1fdf1dd6e90a5e686a324a4c905e04ba0b8cad/indexer-app/test/cmr/indexer/test/data/elasticsearch.clj
clojure
merge into the set of indexes all the configured generic documents Just call handle-bulk-index-reponse to demonstrate it doesn't throw exception A nil index set is possible if there is no existing index set.
(ns cmr.indexer.test.data.elasticsearch (:require [clojure.test :refer :all] [cmr.indexer.data.elasticsearch :as es] [cmr.indexer.data.index-set :as i] [cmr.indexer.data.index-set-generics :as index-set-gen])) (def test-index-set "A real copy of an index set from UAT with the mappings replaced to be sm...
f9f189c4945d5bbf6f73dc1e0d99f998ae3228ebc485a553aee89602d790ce2e
egison/egison
Core.hs
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiWayIf #-} # LANGUAGE TupleSections # # LANGUAGE ViewPatterns # | Module : Language . Egison . Core Licence : MIT This module provides functions to evaluate various objects . Module : Language.Egison.Core Licence : MIT This module pro...
null
https://raw.githubusercontent.com/egison/egison/22b48a10840d613a89ef88060ef4463e14c933ba/hs-src/Language/Egison/Core.hs
haskell
# LANGUAGE LambdaCase # # LANGUAGE MultiWayIf # * Evaluation * Environment * Pattern matching Tensor or hash Maybe we can refactor this function unwrapMaybeFromIndex = return . (fmap fromJust) index Maybe we can refactor this function both of arguments are tensors an argument is scalar Currying it c...
# LANGUAGE TupleSections # # LANGUAGE ViewPatterns # | Module : Language . Egison . Core Licence : MIT This module provides functions to evaluate various objects . Module : Language.Egison.Core Licence : MIT This module provides functions to evaluate various objects. -} module Langua...
d95cf80ecc132623107f989a4feffe963e6d6d6a6394f8469dc899c5019e5dc1
pyr/cyanite
rule.clj
(ns io.cyanite.engine.rule "Rule manipulation functions" (:require [clojure.string :refer [split]])) (defn ->seconds "Takes a string containing a duration like 13s, 4h etc. and converts it to seconds" [s] (let [[_ value unit] (re-matches #"^([0-9]+)([a-z])$" s) quantity (Long/valueOf ^String value...
null
https://raw.githubusercontent.com/pyr/cyanite/2b9a1f26df808abdad3465dd1946036749b93000/src/io/cyanite/engine/rule.clj
clojure
(ns io.cyanite.engine.rule "Rule manipulation functions" (:require [clojure.string :refer [split]])) (defn ->seconds "Takes a string containing a duration like 13s, 4h etc. and converts it to seconds" [s] (let [[_ value unit] (re-matches #"^([0-9]+)([a-z])$" s) quantity (Long/valueOf ^String value...
b5b7bc4402a918d335a3556e8f7dfe852f297f4f2189e6327646ee2d1e680126
mcorbin/tour-of-clojure
fn_vector.clj
;; add an element (println (conj [1 2 3] 4)) (println (conj [1 2 3] 4 5 6) "\n") ;; get the nth element (println (get [1 2 3] 2) "\n") ;; get the last element (println (peek [1 2 3]) "\n") ;; remove the last element (println (pop [1 2 3]) "\n") create a subvec between index [ 1 , 3 [ (println (subvec [1 2 3 4] 1 ...
null
https://raw.githubusercontent.com/mcorbin/tour-of-clojure/57f97b68ca1a8c96904bfb960f515217eeda24a6/resources/public/pages/code/fn_vector.clj
clojure
add an element get the nth element get the last element remove the last element
(println (conj [1 2 3] 4)) (println (conj [1 2 3] 4 5 6) "\n") (println (get [1 2 3] 2) "\n") (println (peek [1 2 3]) "\n") (println (pop [1 2 3]) "\n") create a subvec between index [ 1 , 3 [ (println (subvec [1 2 3 4] 1 3))