_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
085e94a08dee0edca7808eba4ecc2aa7e78f4283f622e1539589493ec955d710
nmichel/ejpet
ejpet_jsx_codec.erl
-module(ejpet_jsx_codec). -author(''). -export([decode/1, encode/1]). decode(Node) -> jsx:decode(Node, [{return_maps, false}]). encode(Node) -> jsx:encode(Node).
null
https://raw.githubusercontent.com/nmichel/ejpet/f2cafee31582d1e538cd3623edf249d0d3fc1162/src/ejpet_jsx_codec.erl
erlang
-module(ejpet_jsx_codec). -author(''). -export([decode/1, encode/1]). decode(Node) -> jsx:decode(Node, [{return_maps, false}]). encode(Node) -> jsx:encode(Node).
e6c7ca88adcb2e5c8bc23a702aa2337bd17ef6bd5ce99a3948dbbbb8faa458fa
Drup/LILiS
lisOptim.mli
(** Optimization passes on L-systems. *) val constant_folding : ('a * string Calc.t list) Lilis.lsystem -> ('a * string Calc.t list) Lilis.lsystem * A symbol is considered a constant when it 's not used in any of the main rules of a L - system . This pass merges consecutive constant symbols into a unique symbo...
null
https://raw.githubusercontent.com/Drup/LILiS/df63fbc3ee77b3378ae1ef27715828c3ad892475/lilis/lisOptim.mli
ocaml
* Optimization passes on L-systems.
val constant_folding : ('a * string Calc.t list) Lilis.lsystem -> ('a * string Calc.t list) Lilis.lsystem * A symbol is considered a constant when it 's not used in any of the main rules of a L - system . This pass merges consecutive constant symbols into a unique symbol and add post rules for each of these ne...
53be8400b4efbca2b7c0a024fffe6896c76a2a270e0f10b97da4fe57845065f5
amperity/sparkplug
accumulator.clj
(ns sparkplug.accumulator "Functions for working with Accumulator objects which can aggregate values across executors." (:refer-clojure :exclude [count empty? name reset!]) (:require [sparkplug.scala :as scala]) (:import org.apache.spark.api.java.JavaSparkContext (org.apache.spark.util Accum...
null
https://raw.githubusercontent.com/amperity/sparkplug/33b71659465d83fc1daf3ce94bfa38fecf2a2877/sparkplug-core/src/clojure/sparkplug/accumulator.clj
clojure
(ns sparkplug.accumulator "Functions for working with Accumulator objects which can aggregate values across executors." (:refer-clojure :exclude [count empty? name reset!]) (:require [sparkplug.scala :as scala]) (:import org.apache.spark.api.java.JavaSparkContext (org.apache.spark.util Accum...
04de0b0cb6a121e3d5143ebe3783ebdf4d08f6dd89dcec6cd5d804466a09d195
onedata/op-worker
atm_workflow_execution_factory.erl
%%%------------------------------------------------------------------- @author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%------------------------------------------------------------------- %%% @doc %%% This module handles creation of al...
null
https://raw.githubusercontent.com/onedata/op-worker/171b05ac629acb4fc337b7dc2f5bf7c433d2c23f/src/modules/automation/workflow/atm_workflow_execution_factory.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- @doc This module handles creation of all documents associated with automation workflow execution (e.g. store docs, etc.) with exception to lane execution related ones (they a...
@author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . -module(atm_workflow_execution_factory). -author("Bartosz Walkowicz"). -include("modules/automation/atm_execution.hrl"). -include_lib("ctool/include/errors.hrl"). -export([create/6, delete_insecur...
8e5dbfd1249aa72e3ec95cd96b005a025706d8df1a0d1edb4398cbdf1f17e0ca
wdebeaum/step
punc-unknown.lisp
;; The mapping for all unknown characters (define-words :pos W::punc :boost-word t :templ NO-FEATURES-TEMPL :tags (:punc) :words ( (W::punc-unknown (SENSES ((LF (W::COLON)) (syntax (w::skip +)) (non-hierarchy-lf t)) ) ) ))
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/punc-unknown.lisp
lisp
The mapping for all unknown characters
(define-words :pos W::punc :boost-word t :templ NO-FEATURES-TEMPL :tags (:punc) :words ( (W::punc-unknown (SENSES ((LF (W::COLON)) (syntax (w::skip +)) (non-hierarchy-lf t)) ) ) ))
9d202fe04f07660f730f7cc17a242ba864ff04040e57545aa96145a40999df2d
pirapira/coq2rust
genintern.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/interp/genintern.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Substitution functions
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Mod_subst ope...
bcc0d76ab917c6b367dfeb516e0bcfd37c96c5e4093aa81340b91a6bec29267b
Rainist/kubeletter
schedule_test.clj
(ns kubeletter.schedule-test (:require [clojure.test :refer :all] [hara.io.scheduler :as hs] [kubeletter.schedule :refer :all]) (:use [clojure.pprint])) (deftest report-with-simulated-schedule ;; DO NOT UNCOMMENT THIS TEST ( def ^:private T1 # inst " 2017 - 10 - 19T00:00:00.00 - 00:00 "...
null
https://raw.githubusercontent.com/Rainist/kubeletter/da326a067147f45b069a49d22730ea07675f9e16/kubeletter/test/kubeletter/schedule_test.clj
clojure
DO NOT UNCOMMENT THIS TEST (hs/simulate (schedules) {:start T1 :end T2 })
(ns kubeletter.schedule-test (:require [clojure.test :refer :all] [hara.io.scheduler :as hs] [kubeletter.schedule :refer :all]) (:use [clojure.pprint])) (deftest report-with-simulated-schedule ( def ^:private T1 # inst " 2017 - 10 - 19T00:00:00.00 - 00:00 " ) ( def ^:private T2 # inst "...
9576b6c5877799c6ebf7efb10d4f475879a9977a7b67ee6b8c14899ef5bdf0c8
nuprl/gradual-typing-performance
plot-tests.rkt
#lang racket/base (require racket/system) ;; Visually inspect these commands to see if plotting works (module+ main (define-syntax-rule (interactive-test* [cmd descr] ...) (begin (begin (displayln descr) (system cmd) (system "firefox output.png") (displayln "Press e...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/tools/summarize/test/plot-tests.rkt
racket
Visually inspect these commands to see if plotting works
#lang racket/base (require racket/system) (module+ main (define-syntax-rule (interactive-test* [cmd descr] ...) (begin (begin (displayln descr) (system cmd) (system "firefox output.png") (displayln "Press enter to continue") (read-line)) ...)) (inter...
4b2d11732f62857189142154874690cad2e092490df815a6fae7e8c64266ecb5
bsaleil/lc
etape2-length.scm
(define t1 '(11 22 33)) (define t2 '()) (define (try p) (println (length p))) (try t1) (try t2) 3 0
null
https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/unit-tests/IFT3065/2/etape2-length.scm
scheme
(define t1 '(11 22 33)) (define t2 '()) (define (try p) (println (length p))) (try t1) (try t2) 3 0
260955eab52b724fb8e204a7340330b76c5aef0c798f4743625e9501998ab73e
SNePS/SNePS2
packages.lisp
-*- Mode : Lisp ; Syntax : Common - Lisp ; Package : USER ; Base : 10 -*- Copyright ( C ) 1984 - -2013 Research Foundation of State University of New York Version : $ I d : packages.lisp , v 1.2 2013/08/28 19:07:21 shapiro Exp $ ;; This file is part of SNePS. $ BEGIN LICENSE$ The contents of this file ...
null
https://raw.githubusercontent.com/SNePS/SNePS2/d3862108609b1879f2c546112072ad4caefc050d/packages.lisp
lisp
Syntax : Common - Lisp ; Package : USER ; Base : 10 -*- This file is part of SNePS. you may not use this file except in compliance with the License. You may obtain a copy of the License at . edu/sneps/Downloads/ubpl.pdf. or implied. See the License for the specific language gov erning rights and limitations ...
Copyright ( C ) 1984 - -2013 Research Foundation of State University of New York Version : $ I d : packages.lisp , v 1.2 2013/08/28 19:07:21 shapiro Exp $ $ BEGIN LICENSE$ The contents of this file are subject to the University at Software distributed under the License is distributed on an " AS IS " ...
f45acefb3ba387fd2f7f4e89cb200452c8e991627650c2f5e170dfd41bcf9557
Eduap-com/WordMat
cfftmi.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $...
null
https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/fftpack5/lisp/cfftmi.lisp
lisp
Compiled by f2cl version: Using Lisp CMU Common Lisp snapshot-2020-04 (21D Unicode) Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format single-float))
( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl6.l , v 1d5cbacbb9...
e0b7b151f5e4ec7e9e5473a725536333de994749b79134371d7bde57ab3c22f1
clojurecup2014/parade-route
menu.clj
(ns parade.menu (:use hard.core hard.input unity.messages) (:require unity.core ) (:import [UnityEngine Application])) (require 'unity.core) (use 'unity.messages 'hard.core 'hard.input) (unity.core/defcomponent Menu [] (Awake [this] (use 'hard.core) (use 'hard.input) (import '[UnityEngin...
null
https://raw.githubusercontent.com/clojurecup2014/parade-route/adb2e1ea202228e3da07902849dee08f0bb8d81c/Assets/Clojure/Scripts/parade/menu.clj
clojure
(ns parade.menu (:use hard.core hard.input unity.messages) (:require unity.core ) (:import [UnityEngine Application])) (require 'unity.core) (use 'unity.messages 'hard.core 'hard.input) (unity.core/defcomponent Menu [] (Awake [this] (use 'hard.core) (use 'hard.input) (import '[UnityEngin...
4d20b39fe0272e155d97d7ed40b40c0e1d6916c5c522241f62a02145c7c369e3
diku-dk/futhark
Interchange.hs
# LANGUAGE TypeFamilies # -- | It is well known that fully parallel loops can always be -- interchanged inwards with a sequential loop. This module -- implements that transformation. -- -- This is also where we implement loop-switching (for branches), -- which is semantically similar to interchange. module Futhark.Pa...
null
https://raw.githubusercontent.com/diku-dk/futhark/98e4a75e4de7042afe030837084764bbf3c6c66e/src/Futhark/Pass/ExtractKernels/Interchange.hs
haskell
| It is well known that fully parallel loops can always be interchanged inwards with a sequential loop. This module implements that transformation. This is also where we implement loop-switching (for branches), which is semantically similar to interchange. | An encoding of a sequential do-loop with no existenti...
# LANGUAGE TypeFamilies # module Futhark.Pass.ExtractKernels.Interchange ( SeqLoop (..), interchangeLoops, Branch (..), interchangeBranch, WithAccStm (..), interchangeWithAcc, ) where import Control.Monad.Identity import Data.List (find) import Data.Maybe import Futhark.IR.SOACS import Futhark...
1633f97ed2ec3f8b68223e2fcce9881e2d4ba298fbd088e50d0541fe502c2b66
kyleburton/sandbox
env.clj
(ns text-adventure-engine.env (:require [selmer.parser :as parser] [clojure.tools.logging :as log] [text-adventure-engine.dev-middleware :refer [wrap-dev]])) (def defaults {:init (fn [] (parser/cache-off!) (log/info "\n-=[text-adventure-engine started successfully using the dev...
null
https://raw.githubusercontent.com/kyleburton/sandbox/cccbcc9a97026336691063a0a7eb59293a35c31a/examples/common-lisp/land-of-lisp/text-adventure-engine/env/dev/clj/text_adventure_engine/env.clj
clojure
(ns text-adventure-engine.env (:require [selmer.parser :as parser] [clojure.tools.logging :as log] [text-adventure-engine.dev-middleware :refer [wrap-dev]])) (def defaults {:init (fn [] (parser/cache-off!) (log/info "\n-=[text-adventure-engine started successfully using the dev...
b95c4c916d5808b964d2cc8cc4536d3d662b245c8aaea5711d531d5d7c089123
status-im/status-lib-archived
web3.cljs
(ns status-im.protocol.web3 (:require [cljs.core.async :refer [chan put! close! <!]] [status-im.protocol.defaults :refer [status-message-ttl]] [status-im.utils.logging :as log] [status-im.utils.random :as random] [status-im.utils.encryption :refer [encrypt]] ...
null
https://raw.githubusercontent.com/status-im/status-lib-archived/0b07f54a6b8dc17490a74797fa04dae75e5668ca/src/cljs/status_im/protocol/web3.cljs
clojure
(ns status-im.protocol.web3 (:require [cljs.core.async :refer [chan put! close! <!]] [status-im.protocol.defaults :refer [status-message-ttl]] [status-im.utils.logging :as log] [status-im.utils.random :as random] [status-im.utils.encryption :refer [encrypt]] ...
997e4933a105026841af2e7f0dd00b78b45983f296a9400ab066a24a17f09a9d
youjinbou/gmaths
primitives.ml
(** support modules for primitive types *) module Float = struct type t = float let zero = 0. let one = 1. let add = ( +. ) let sub = ( -. ) let mul = ( *. ) let div = ( /. ) let rand = Random.float let opp x = -.x let modulo x m = mod_float x m let pi = acos(0.0) *. 2.0 let eps...
null
https://raw.githubusercontent.com/youjinbou/gmaths/1a507444071941a45b39f8c65e90c37427ea68a3/src/primitives.ml
ocaml
* support modules for primitive types
module Float = struct type t = float let zero = 0. let one = 1. let add = ( +. ) let sub = ( -. ) let mul = ( *. ) let div = ( /. ) let rand = Random.float let opp x = -.x let modulo x m = mod_float x m let pi = acos(0.0) *. 2.0 let epsilon = epsilon_float let acos = acos ...
2b191703610b511d5f598826ced8d6a7d75d48bf23f007c167cdb7647b9903d5
ToxicFrog/bltool
default.clj
(ns bltool.data.default (:require [bltool.flags :refer :all]) (:require [clojure.core.typed :as t :refer [fn> ann]]) (:require [slingshot.slingshot :refer [throw+]])) (register-flags ["--from" "What type of data source to read the games/edits from. Use '--help formats' for a list of formats."] ...
null
https://raw.githubusercontent.com/ToxicFrog/bltool/4148836186698b398b306790f6bd10348a5911ba/src/bltool/data/default.clj
clojure
(ns bltool.data.default (:require [bltool.flags :refer :all]) (:require [clojure.core.typed :as t :refer [fn> ann]]) (:require [slingshot.slingshot :refer [throw+]])) (register-flags ["--from" "What type of data source to read the games/edits from. Use '--help formats' for a list of formats."] ...
22d6b9cc80cbaaba32c0f8907c7d1a4d2f1e7bde8fbd21586d70993f49dd7499
cobaweel/piffle
CIr.hs
Piffle , Copyright ( C ) 2007 , . This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . This program i...
null
https://raw.githubusercontent.com/cobaweel/piffle/7c4cfb5301c5c55c229098d3938d3b023d69cde4/src/CIr.hs
haskell
GENERATE C CODE --------------------------------------------------- This is the code generator. It generates C code as an abstract syntax tree. The advantage of this is that we get modular code in the compiler and pretty, indented C code as output; and that we can do some transformations on the C code before...
Piffle , Copyright ( C ) 2007 , . This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . This program i...
5d1d248daa31c61ffc7170cf60c8f98cb8d2c2f3f6bd2546f495ac5b7d9ff637
oakes/play-cljs-examples
dev.cljs
(ns super-koalio.dev (:require [super-koalio.core] [nightlight.repl-server]))
null
https://raw.githubusercontent.com/oakes/play-cljs-examples/88716f19d3cd59c2bf7fb4029f5792e00014e10a/super-koalio/src/super_koalio/dev.cljs
clojure
(ns super-koalio.dev (:require [super-koalio.core] [nightlight.repl-server]))
7459061f788fff5401a41f89eccc3485552d557fad2f8165cd7b3de6403ade2d
LPCIC/matita
hLog.mli
Copyright ( C ) 2004 - 2005 , HELM Team . * * This file is part of HELM , an Hypertextual , Electronic * Library of Mathematics , developed at the Computer Science * Department , University of Bologna , Italy . * * is free software ; you can redistribute it and/or * modify it under the terms of ...
null
https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/components/extlib/hLog.mli
ocaml
Copyright ( C ) 2004 - 2005 , HELM Team . * * This file is part of HELM , an Hypertextual , Electronic * Library of Mathematics , developed at the Computer Science * Department , University of Bologna , Italy . * * is free software ; you can redistribute it and/or * modify it under the terms of ...
fa65d787722655a2cc8f87444dded6a7cf7956a8ee132b778d78d6e5dd546dee
nextjournal/clerk
clerk_eval.clj
;; # 📬 Replying to `clerk-eval` (ns clerk-eval {:nextjournal.clerk/visibility {:code :fold}} (:require [nextjournal.clerk :as clerk] [nextjournal.clerk.render.hooks :as-alias hooks] [nextjournal.clerk.viewer :as v])) (clerk/with-viewer '(fn [code-str _] (let [!code (hooks/use-state ...
null
https://raw.githubusercontent.com/nextjournal/clerk/c50df78dd7d8c0d9f92ce05101a755de39cf69dc/notebooks/clerk_eval.clj
clojure
# 📬 Replying to `clerk-eval` We now get a reply from `v/clerk-eval`. To try it, press the `eval!` button above. ☝️
(ns clerk-eval {:nextjournal.clerk/visibility {:code :fold}} (:require [nextjournal.clerk :as clerk] [nextjournal.clerk.render.hooks :as-alias hooks] [nextjournal.clerk.viewer :as v])) (clerk/with-viewer '(fn [code-str _] (let [!code (hooks/use-state code-str) !result (hoo...
f3f1281e6c8b02054aa2c24d033e44dd15d8fd53cef284c4f41bd17406af47df
mfikes/coal-mine
checks.cljc
(ns coal-mine.checks (:require clojure.test)) #?(:clj (defn system-time [] (System/currentTimeMillis))) (defmacro deftimedtest [name threshold & body] `(clojure.test/deftest ~name (let [start# (coal-mine.checks/system-time)] ~@body (let [elapsed# (- (coal-mine.checks/system-time) start#...
null
https://raw.githubusercontent.com/mfikes/coal-mine/0961d085b37f4e59489a8cf6a2b8fef0a698d8fb/src/coal_mine/checks.cljc
clojure
perfect cubes fibonacci numbers both even or both odd
(ns coal-mine.checks (:require clojure.test)) #?(:clj (defn system-time [] (System/currentTimeMillis))) (defmacro deftimedtest [name threshold & body] `(clojure.test/deftest ~name (let [start# (coal-mine.checks/system-time)] ~@body (let [elapsed# (- (coal-mine.checks/system-time) start#...
29cc6aa53e3cce7b2dfd397e37c7da450dfdbd885ebd52a3457d183bfd9b5da4
Apress/beg-haskell
Main.hs
module Main where import qualified Chapter14.Simple as S import qualified Chapter14.Expr as E import qualified Chapter14.Expr2 as E2 import qualified Chapter14.ExprMonad as E3 import qualified Chapter14.Presents as P import qualified Chapter14.Description as D import qualified Chapter14.Origami as O import qualified ...
null
https://raw.githubusercontent.com/Apress/beg-haskell/aaacbf047d553e6177c38807e662cc465409dffd/chapter14/src/Main.hs
haskell
module Main where import qualified Chapter14.Simple as S import qualified Chapter14.Expr as E import qualified Chapter14.Expr2 as E2 import qualified Chapter14.ExprMonad as E3 import qualified Chapter14.Presents as P import qualified Chapter14.Description as D import qualified Chapter14.Origami as O import qualified ...
1b9ed88479eaa1d2dc501418ce826d35205b575eec2081969dfb06ae92c1fd42
iamFIREcracker/adventofcode
day10.lisp
(defpackage :aoc/2020/10 #.cl-user::*aoc-use*) (in-package :aoc/2020/10) (defun part1 (adapters) (loop for p = 0 then c for c in adapters for delta = (- c p) count (= delta 1) into ones count (= delta 3) into threes finally (return (* ones (1+ threes))))) (defun part2 (numbers &aux (dp (make...
null
https://raw.githubusercontent.com/iamFIREcracker/adventofcode/c395df5e15657f0b9be6ec555e68dc777b0eb7ab/src/2020/day10.lisp
lisp
(defpackage :aoc/2020/10 #.cl-user::*aoc-use*) (in-package :aoc/2020/10) (defun part1 (adapters) (loop for p = 0 then c for c in adapters for delta = (- c p) count (= delta 1) into ones count (= delta 3) into threes finally (return (* ones (1+ threes))))) (defun part2 (numbers &aux (dp (make...
7492b232f9e937dfcfc4d9834e8afa5b64de9987a15f8c3cec80fa483be36bc3
jaspervdj/advent-of-code
18.hs
import AdventOfCode.Main import qualified AdventOfCode.NanoParser as P import Control.Applicative ((<|>)) data Expr = Lit Int | Add Expr Expr | Mul Expr Expr deriving (Show) sym :: Char -> P.Parser Char () sym c = P.char c *> P.spaces term :: P.Parser Char Expr -> P.Parser Char Expr term rec ...
null
https://raw.githubusercontent.com/jaspervdj/advent-of-code/bdc9628d1495d4e7fdbd9cea2739b929f733e751/2020/18.hs
haskell
import AdventOfCode.Main import qualified AdventOfCode.NanoParser as P import Control.Applicative ((<|>)) data Expr = Lit Int | Add Expr Expr | Mul Expr Expr deriving (Show) sym :: Char -> P.Parser Char () sym c = P.char c *> P.spaces term :: P.Parser Char Expr -> P.Parser Char Expr term rec ...
884ee839c1c7940c488ece7572376b96db432dee10356a5677296f5cc6bc15bd
stchang/generic-bind
as-rkt-names.rkt
#lang racket (require racket/provide) (require "main.rkt") (provide (filtered-out (λ (name) (or (and (regexp-match? #rx"^~.*" name) ; drop ~ prefix (not (string=? name "~vs")) ; except ~vs (substring name 1)) name)) ;; else provide as is ...
null
https://raw.githubusercontent.com/stchang/generic-bind/77e6dd7c87bd1e9ee9bd083a1c47d400ad79c6d1/generic-bind/as-rkt-names.rkt
racket
drop ~ prefix except ~vs else provide as is
#lang racket (require racket/provide) (require "main.rkt") (provide (filtered-out (λ (name) (substring name 1)) (all-from-out "main.rkt")))
7a959110b1e09135508e8b4c0a9120da7d4c2d957a76aa81734eaac0747eca89
davidarkemp/swiftp
device_session_sup.erl
%%% ------------------------------------------------------------------- %%% Description : Implements a simple_one_for_one supervisor that spawns device %%% session threads. %%% ------------------------------------------------------------------- -module(device_session_sup). -behaviour(supervisor). -expor...
null
https://raw.githubusercontent.com/davidarkemp/swiftp/1e02e19606daa11c4b41763b7d95c202f60410e2/cloud_server/src/device_session_sup.erl
erlang
------------------------------------------------------------------- Description : Implements a simple_one_for_one supervisor that spawns device session threads. ------------------------------------------------------------------- -------------------------------------------------------------------- --...
-module(device_session_sup). -behaviour(supervisor). -export([ init/1 ]). -define(MAX_RESTART, 100). -define(MAX_TIME, 1). Records Returns : { ok , { SupFlags , [ ChildSpec ] } } | init([]) -> {ok, {_SupFlags = {simple_one_for_one, ?MAX_RESTART, ?MAX_TIME}, [ StartF...
40492c055ba17f2dae6f9277181cc6b054edd95ce8d2f28b8fce2ca33ecba8d3
abarbu/haskell-torch
IsStringSpec.hs
# LANGUAGE QuasiQuotes # module Data.String.InterpolateIO.IsStringSpec (main, spec) where import Test.Hspec import qualified Data.Text as T import Data.String.InterpolateIO.IsString import System.IO.Unsafe main :: IO () main = hspec spec spec :: Spec spec = do describe "[c|...|]" $ d...
null
https://raw.githubusercontent.com/abarbu/haskell-torch/03b2c10bf8ca3d4508d52c2123e753d93b3c4236/interpolateIO/test/Data/String/InterpolateIO/IsStringSpec.hs
haskell
# LANGUAGE QuasiQuotes # module Data.String.InterpolateIO.IsStringSpec (main, spec) where import Test.Hspec import qualified Data.Text as T import Data.String.InterpolateIO.IsString import System.IO.Unsafe main :: IO () main = hspec spec spec :: Spec spec = do describe "[c|...|]" $ d...
1a3282105bf55d25c8200b045f94ce6a6a3fb5b7b5a2b37834d88d3384380cb1
janestreet/base_quickcheck
ppx_quickcheck_test_examples.ml
open Base open Base_quickcheck (* ensure that shadowing doesn't break anything *) include struct module Base = struct end module Base_quickcheck = struct end module Quickcheckable = struct end end module Simple_reference = struct type t = bool [@@deriving quickcheck] end module Dotted_reference = struct ty...
null
https://raw.githubusercontent.com/janestreet/base_quickcheck/97fd86787c0dd8ddb80cd879ca1b39c8602b1cf0/ppx_quickcheck/test/examples/ppx_quickcheck_test_examples.ml
ocaml
ensure that shadowing doesn't break anything deliberately make pairs of isomorphic tags to make sure we hash tags properly deliberately make pairs of isomorphic tags to make sure we hash tags properly We cannot use [@@deriving quickcheck] here because ppx_quickcheck cannot tell the [bool] argument needs to ...
open Base open Base_quickcheck include struct module Base = struct end module Base_quickcheck = struct end module Quickcheckable = struct end end module Simple_reference = struct type t = bool [@@deriving quickcheck] end module Dotted_reference = struct type t = Simple_reference.t [@@deriving quickcheck] e...
e6e1045a7a4b29130d5b47ebba111e20b1a1d38f40d81ed59b0208940f4f489a
audreyt/openafp
SIM.hs
module OpenAFP.Records.PTX.SIM where import OpenAFP.Types import OpenAFP.Internals data PTX_SIM = PTX_SIM { ptx_sim_Type :: !N1 ,ptx_sim :: !N2 } deriving (Show, Typeable)
null
https://raw.githubusercontent.com/audreyt/openafp/178e0dd427479ac7b8b461e05c263e52dd614b73/src/OpenAFP/Records/PTX/SIM.hs
haskell
module OpenAFP.Records.PTX.SIM where import OpenAFP.Types import OpenAFP.Internals data PTX_SIM = PTX_SIM { ptx_sim_Type :: !N1 ,ptx_sim :: !N2 } deriving (Show, Typeable)
df46233077b854bb39ff57e4518016448c0997a035af0f954e7f6648e59277fb
startalkIM/ejabberd
ejabberd_xml2pb_iq.erl
-module(ejabberd_xml2pb_iq). -include("message_pb.hrl"). -include("jlib.hrl"). -include("logger.hrl"). -export([encode_pb_error_iq/3,encode_muc_user_pb/3,encode_pb_iq_bind_result/4]). -export([encode_pb_iq_create_muc/3,encode_user_muc_pb/3,encode_muc_invite_user_v2_pb/3]). -export([encode_pb_muc_user_register/3,enco...
null
https://raw.githubusercontent.com/startalkIM/ejabberd/bdea190b01d90c51a80dcd2d85a66ed9ee01a968/src/ejabberd_xml2pb_iq.erl
erlang
---------------------------------------------- 对iqmessage进行encode ---------------------------------------------- ---------------------------------------------- 对iqmessage进行封包 ---------------------------------------------- ---------------------------------------------- 构建PB获取群成员信息Bodys -------------------------------...
-module(ejabberd_xml2pb_iq). -include("message_pb.hrl"). -include("jlib.hrl"). -include("logger.hrl"). -export([encode_pb_error_iq/3,encode_muc_user_pb/3,encode_pb_iq_bind_result/4]). -export([encode_pb_iq_create_muc/3,encode_user_muc_pb/3,encode_muc_invite_user_v2_pb/3]). -export([encode_pb_muc_user_register/3,enco...
c0b0842c6ecf2e08e3ecf1b5cdef361be910dc2f914b92907cfa1cdaba344981
acorrenson/modulus
strategy.mli
(** This module provides utilities to define new resolution strategies. We introduce a monad [('env, 'res) Strategy.t] to build custom solvers. Intuitively, a value of type [('env, 'res) Strategy.t] is a function from ['env -> 'res] where ['env] is the type of resolution contexts and ['res] is the result of th...
null
https://raw.githubusercontent.com/acorrenson/modulus/83fa4a863deecc9e806c97f26ed525746703ee64/src/solver/strategy.mli
ocaml
* This module provides utilities to define new resolution strategies. We introduce a monad [('env, 'res) Strategy.t] to build custom solvers. Intuitively, a value of type [('env, 'res) Strategy.t] is a function from ['env -> 'res] where ['env] is the type of resolution contexts and ['res] is the result of the ...
type ('env, 'res) status = | Abort of string | Contradict | Update of 'env | UpdateValue of 'env * 'res | Value of 'res * Status message reported by strategies . The status is either : { ul { - A failure with a message indicating an early interuption of the strategy } { - A contraidic...
fbdb371fee5e0b711ab17ce8391566f31b1442136d8a56c30765ce656ba15969
polyvios/locksmith
uniqueness.ml
* * Copyright ( c ) 2004 - 2007 , * Polyvios Pratikakis < > * < > * < > * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are * met : * * 1...
null
https://raw.githubusercontent.com/polyvios/locksmith/3a9d60ed9c801d65fbb79e9aa6e7dec68f6289e3/src/uniqueness.ml
ocaml
* Compute uniqueness information for the statements in a function state For each statement in a function we keep the set of live variables. * Indexed by statement id we can't call a non-function type these are locals never unique--too simple?
* * Copyright ( c ) 2004 - 2007 , * Polyvios Pratikakis < > * < > * < > * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are * met : * * 1...
fea2dc2a563a062c41125140178d3379747e7e43e104abfe1ec572f5a4a6286c
jberryman/unagi-chan
Implementations.hs
module Implementations where import qualified Control.Concurrent.Chan.Unagi as U import qualified Control.Concurrent.Chan.Unagi.Unboxed as UU import qualified Control.Concurrent.Chan.Unagi.Bounded as UB import qualified Control.Concurrent.Chan.Unagi.NoBlocking as UN import qualified Control.Concurrent.Chan.Unagi.NoBlo...
null
https://raw.githubusercontent.com/jberryman/unagi-chan/03f62bb6989fcfa3372a93925b7bc0294b51a65d/tests/Implementations.hs
haskell
We use our yield "blocking" readChan here, and below: way to do smoke tests of `tryReadChan`: And we want to test the blocking action of tryReadChan as well:
module Implementations where import qualified Control.Concurrent.Chan.Unagi as U import qualified Control.Concurrent.Chan.Unagi.Unboxed as UU import qualified Control.Concurrent.Chan.Unagi.Bounded as UB import qualified Control.Concurrent.Chan.Unagi.NoBlocking as UN import qualified Control.Concurrent.Chan.Unagi.NoBlo...
f7695b9047f8432c358894f74a56fb766f0aae37b7daacc771c6b783452a3874
cerner/clara-rules
testing_utils.cljc
#?(:clj (ns clara.tools.testing-utils "Internal utilities for testing clara-rules and derivative projects. These should be considered experimental right now from the perspective of consumers of clara-rules, although it is possible that this namespace will be made part of the public API once its functional...
null
https://raw.githubusercontent.com/cerner/clara-rules/cd880406c66f76824f1f96eac5978a4a907ff986/src/main/clojure/clara/tools/testing_utils.cljc
clojure
see -require-outside-ns/ for some discussion on the For operations other than replace-facts uc/get-ordered-update-cache is currently always used. This fixture ensures that CancellingUpdateCache is tested for a wide variety of different cases rather than a few cases cases specific to it. Found match. Keep search...
#?(:clj (ns clara.tools.testing-utils "Internal utilities for testing clara-rules and derivative projects. These should be considered experimental right now from the perspective of consumers of clara-rules, although it is possible that this namespace will be made part of the public API once its functional...
2611f937d36302032973e084336512de3295d2cd9947c0ee32b2a13997d27628
JHU-PL-Lab/jaylang
Fibonacci03.ml
let rec bot _ = bot () let fail _ = assert false let rec fib_1030 fib_without_checking_1060 prev_set_flag_fib_1051 s_prev_fib_n_1050 n_1031 = let u =if prev_set_flag_fib_1051 then if (0 * 1) + (1 * s_prev_fib_n_1050) > (0 * 1) + (1 * n_1031) && (0 * 1) + (1 * n_1031) >= 0 then ...
null
https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/benchmark/cases/mochi_origin/termination/Fibonacci03.ml
ocaml
let rec bot _ = bot () let fail _ = assert false let rec fib_1030 fib_without_checking_1060 prev_set_flag_fib_1051 s_prev_fib_n_1050 n_1031 = let u =if prev_set_flag_fib_1051 then if (0 * 1) + (1 * s_prev_fib_n_1050) > (0 * 1) + (1 * n_1031) && (0 * 1) + (1 * n_1031) >= 0 then ...
83e85703c50f577fc3f6c4e501102971024928b871aae718c14069af965a5ef0
S8A/htdp-exercises
ex394.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex394) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex394.rkt
racket
about the language level of this file in a form that our tools can easily process. [List-of Number] [List-of Number] -> [List-of Number] merges them into a single sorted list. Keeps duplicates. Number [List-of Number] -> [List-of Number] [(and (empty? lon1) (empty? lon2)) '()] [(and (empty? lon1) (cons?...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex394) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) Takes two lists of numbers sorted in ascending order ...
8c3e74f682c3134a858fc38b4a0eb78203df5f39b3fae9b6ffaaf5a8f77512f2
ucsd-progsys/nate
exam_ac.1.ml
(*S*) (fun (x, y, z) -> x) (0, 1, 2)
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/easyocaml-additional/exams/exam_ac.1.ml
ocaml
S
(fun (x, y, z) -> x) (0, 1, 2)
02dd3e993f3af55b15f6e9faad11efd44c3d91d3aa46450dbb9cc689c588e0a7
openvstorage/alba
automatic_repair.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 Slice open Lwt.Infix let recent_enough target = function | [] -> fal...
null
https://raw.githubusercontent.com/openvstorage/alba/459bd459335138d6b282d332fcff53a1b4300c29/ocaml/src/automatic_repair.ml
ocaml
seems like the test blob was not yet available on the osd * so let's put it there and retry...
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 Slice open Lwt.Infix let recent_enough target = function | [] -> fal...
db5430ad5fcbc0444c3c65be9297696b990ba5def0be8fe2c831f807cf2c29d7
sjl/temperance
api.lisp
(ql:quickload "cl-d-api") (defparameter *document-packages* (list "TEMPERANCE")) (defparameter *output-path* #p"docs/03-reference.markdown" ) (defparameter *header* "The following is a list of all user-facing parts of Temperance. If there are backwards-incompatible changes to anything listed here, they will b...
null
https://raw.githubusercontent.com/sjl/temperance/f7e68f46b7afaeecf643c009eb2e130500556e31/docs/api.lisp
lisp
(ql:quickload "cl-d-api") (defparameter *document-packages* (list "TEMPERANCE")) (defparameter *output-path* #p"docs/03-reference.markdown" ) (defparameter *header* "The following is a list of all user-facing parts of Temperance. If there are backwards-incompatible changes to anything listed here, they will b...
67a8a019a399f31c13353ec7527bd861fcc24644d50806b129384363ec54de5a
synduce/Synduce
sum_elts_lt_pos.ml
* @synduce --no - lifting type list = | Nil | Cons of int * list type indexed_list = | CNil | CCons of int * int * indexed_list let rec add_indices = function | Nil -> CNil | Cons (value, tl) -> CCons (value, length tl, add_indices tl) and length = function | Nil -> 0 | Cons (_, tl) -> 1 + length tl...
null
https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/benchmarks/indexed_list/sum_elts_lt_pos.ml
ocaml
* @synduce --no - lifting type list = | Nil | Cons of int * list type indexed_list = | CNil | CCons of int * int * indexed_list let rec add_indices = function | Nil -> CNil | Cons (value, tl) -> CCons (value, length tl, add_indices tl) and length = function | Nil -> 0 | Cons (_, tl) -> 1 + length tl...
b6f645951ef91c5c80a1517eabd730662077107d06a156b0977245935ff90a85
russell/cl-git
remote.lisp
-*- Mode : Lisp ; Syntax : COMMON - LISP ; Base : 10 -*- ;; cl-git is a Common Lisp interface to git repositories. Copyright ( C ) 2011 - 2022 < > Copyright ( C ) 2012 < > Copyright ( C ) 2014 < > ;; ;; This program is free software: you can redistribute it and/or ;; modify it under the terms of the ...
null
https://raw.githubusercontent.com/russell/cl-git/ab58b1dcf34649899085e9df95962ef1c9d902c3/src/remote.lisp
lisp
Syntax : COMMON - LISP ; Base : 10 -*- cl-git is a Common Lisp interface to git repositories. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;...
Copyright ( C ) 2011 - 2022 < > Copyright ( C ) 2012 < > Copyright ( C ) 2014 < > as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public (in-package #:cl-git) (d...
e7ec0052b45a56f053ae45007c89a13b44c6f3e33429c2692b2b41d3c2db193b
gitpod-samples/template-ocaml
helloworld.ml
let () = print_endline "Hello, world"
null
https://raw.githubusercontent.com/gitpod-samples/template-ocaml/01c7f57b73062c4b981727fd1fe25d1e4f82c703/helloworld/helloworld.ml
ocaml
let () = print_endline "Hello, world"
1e1531bb9f4994e83e4f0e6d4ff4d73c35553bef72b1d447f005435f4b2dbb07
yuriy-chumak/ol
framebuffer_object.scm
; ========================================================================== ; ARB_framebuffer_object ; ARB_framebuffer_object defines an interface for drawing to rendering destinations other than the buffers provided to the GL by the ; window-system. ; ; ; ; Version Last Modified Date : Octobe...
null
https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/libraries/OpenGL/ARB/framebuffer_object.scm
scheme
========================================================================== ARB_framebuffer_object ARB_framebuffer_object defines an interface for drawing to rendering window-system. Version Status: Overview framebuffer object binding point into separate DRAW and READ bindings (incorp...
destinations other than the buffers provided to the GL by the Last Modified Date : October 6 , 2016 Revision : # 38 Approved by the ARB on August 4 , 2008 This extension differs from EXT_framebuffer_object by splitting the EXT_framebuffer_blit ) . This allows copying directly from on...
a65a4bbb3b3b01ab21dc473a6f2f91b8c1e82adb78ae60420891a50d505072f1
input-output-hk/cardano-wallet-legacy
ReifyWalletError.hs
{-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Cardano.Wallet.API.V1.ReifyWalletError ( translateWalletLayerErrors ) where import qualified Data.Text as T import Formatting (build, sformat) import Universum import qualified ...
null
https://raw.githubusercontent.com/input-output-hk/cardano-wallet-legacy/143e6d0dac0b28b3274600c6c49ec87e42ec9f37/src/Cardano/Wallet/API/V1/ReifyWalletError.hs
haskell
# LANGUAGE RankNTypes # Nothing for non-layer exceptions.
# LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Cardano.Wallet.API.V1.ReifyWalletError ( translateWalletLayerErrors ) where import qualified Data.Text as T import Formatting (build, sformat) import Universum import qualified Data.Char as C import Pos.C...
1f445caca3acfcb7c4a33f286022ac217cc172167e3238a20b325aabf6aaa312
wargrey/graphics
zero.rkt
#lang typed/racket/base (require "../constructor.rkt") (require "../constants.rkt") (require "../paint.rkt") (define stadium (bitmap-stadium 32 32 #:border (desc-stroke solid #:width 0.0) #:fill orange)) (bitmap-frame stadium #:border (desc-stroke dot-frame #:width 0.0))
null
https://raw.githubusercontent.com/wargrey/graphics/50751297f244a01ac734099b9a1e9be97cd36f3f/bitmap/tamer/zero.rkt
racket
#lang typed/racket/base (require "../constructor.rkt") (require "../constants.rkt") (require "../paint.rkt") (define stadium (bitmap-stadium 32 32 #:border (desc-stroke solid #:width 0.0) #:fill orange)) (bitmap-frame stadium #:border (desc-stroke dot-frame #:width 0.0))
f769a8e9d0a4fe87545c626aab6cab2ad21d29a511f71d75fcb031e9bee427e1
flotsfacetieux/sorcery-es
victory.lisp
(in-package :sorcery-es) (defclass victory-system (system) ((end-count :accessor system-end-count :initform 0) (dt-accumulator :accessor dt-accumulator :initform 0) (dt-max :accessor dt-max :initform 3600))) (defmethod update ((system victory-system) entity-manager) (let ((release (entity-co...
null
https://raw.githubusercontent.com/flotsfacetieux/sorcery-es/9780a31fa2b61451d294cc23775b30098fcd3b4d/victory.lisp
lisp
(in-package :sorcery-es) (defclass victory-system (system) ((end-count :accessor system-end-count :initform 0) (dt-accumulator :accessor dt-accumulator :initform 0) (dt-max :accessor dt-max :initform 3600))) (defmethod update ((system victory-system) entity-manager) (let ((release (entity-co...
3e81a06c549a4a041c62433f75f8006b0d3f6339c5226d228eac05101df7aa84
amutake/actario
actor_common.ml
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * INRIA , CNRS and contributors - Copyright 1999 - 2018 (* <O___,, * (see CREDITS file for the list of authors) *) \VV/ * * * *...
null
https://raw.githubusercontent.com/amutake/actario/35c1d5499149e12842dec6d230d5fad00f18ac6d/plugin/actor_common.ml
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team <O___,, * (see CREDITS file for the list of authors) // * This file is distributed under the terms of the * (see LICENSE file for...
v * INRIA , CNRS and contributors - Copyright 1999 - 2018 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser General Public License Version 2.1 open Pp open Util open Names open Mo...
50469cb010b4ff2032b8fcacfc88a5c96888d4886bd719aa9defa9963c67a026
ghcjs/jsaddle-dom
TimeRanges.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.TimeRanges (start, start_, end, end_, getLength, TimeRanges(..), gTypeTimeRanges) where import Prelu...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/TimeRanges.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.TimeRanges (start, start_, end, end_, getLength, TimeRanges(..), gTypeTimeRanges) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, ...
56b2a7935f6833997e4439b151019667d21d8b8f351735397925b6e63ded1641
raghavkarol/edt
edt_sup.erl
%% %% Top Level supervisor %% Copyright 2020 . %% -module(edt_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(SERVER, ?MODULE). start_link() -> supervisor:start_link({local, ?SERVER}, ?MODULE, []). init([]) -> SupFlags = #{strategy => one_for_all, intensity => 60, per...
null
https://raw.githubusercontent.com/raghavkarol/edt/c9ac86d4161deb7f23ff20b6ae713e77706e52fa/src/edt_sup.erl
erlang
Top Level supervisor internal functions
Copyright 2020 . -module(edt_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(SERVER, ?MODULE). start_link() -> supervisor:start_link({local, ?SERVER}, ?MODULE, []). init([]) -> SupFlags = #{strategy => one_for_all, intensity => 60, period => 60}, ChildSpecs = [ ...
ce709942ca350a82c3eb11b7e73a565697e4a4b53fa9ace71376a9ea07f25d69
tanders/cluster-engine
06a.heuristic-rules-interface-1engine.lisp
(in-package cluster-engine) (defun average (list) "The function outputs the average of all numbers in the input list. If the list is empty, 0 will be returned." (declare (type list list)) (when (not list) (return-from average 0)) (/ (apply '+ list) (length list))) (defun heuristic-rule-1-engine-pitches (simp...
null
https://raw.githubusercontent.com/tanders/cluster-engine/064ad4fd107f8d9a3dfcaf260524c2ab034c6d3f/sources/06a.heuristic-rules-interface-1engine.lisp
lisp
this is just to take away error message for unused variables this is just to take away error message for unused variables this is just to take away error message for unused variables this is just to take away error message for unused variables this is just to take away error message for unused variables this is just to...
(in-package cluster-engine) (defun average (list) "The function outputs the average of all numbers in the input list. If the list is empty, 0 will be returned." (declare (type list list)) (when (not list) (return-from average 0)) (/ (apply '+ list) (length list))) (defun heuristic-rule-1-engine-pitches (simp...
b2a8572f23e28f8cbc7a59acdc79ec1c8f8ea12c4317ca27f185f7c994d9501d
emilaxelsson/dino
README.hs
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE RebindableSyntax # # OPTIONS_GHC -Wno - missing - signatures # {-# OPTIONS_GHC -Wno-unused-top-binds #-} -- Code from README.md module README where import qualified Prelude import Control.Applicative (liftA2) import Dino import Dino.AST (drawTree) import Dino.Int...
null
https://raw.githubusercontent.com/emilaxelsson/dino/3b3115a7fd694cbc3d4fca4d61b0166f4707173f/examples/README.hs
haskell
# OPTIONS_GHC -Wno-unused-top-binds # Code from README.md ------------------------------------------------------------------------------ * Syntax ------------------------------------------------------------------------------ > "calm" > "breeze" > "gale" ] > "storm" ) Let's have look at the expression generated by `f...
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE RebindableSyntax # # OPTIONS_GHC -Wno - missing - signatures # module README where import qualified Prelude import Control.Applicative (liftA2) import Dino import Dino.AST (drawTree) import Dino.Interpretation ex1 :: (ConstExp e, NumExp e, FracExp e, Com...
12e36f04474a62f16f3072e0b1ae931bc5f8d19ef94f62aba0fbdac27eb1cac3
roelvandijk/numerals
TestData.hs
| [ @ISO639 - 1@ ] co [ @ISO639 - 2@ ] cos [ @ISO639 - 3@ ] cos [ @Native name@ ] corsu [ @English name@ ] Corsican [@ISO639-1@] co [@ISO639-2@] cos [@ISO639-3@] cos [@Native name@] corsu [@English name@] Corsican -} module Text.Numeral.La...
null
https://raw.githubusercontent.com/roelvandijk/numerals/b1e4121e0824ac0646a3230bd311818e159ec127/src-test/Text/Numeral/Language/COS/TestData.hs
haskell
------------------------------------------------------------------------------ Imports ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Test data ---------------------------------------------------------------...
| [ @ISO639 - 1@ ] co [ @ISO639 - 2@ ] cos [ @ISO639 - 3@ ] cos [ @Native name@ ] corsu [ @English name@ ] Corsican [@ISO639-1@] co [@ISO639-2@] cos [@ISO639-3@] cos [@Native name@] corsu [@English name@] Corsican -} module Text.Numeral.La...
400a430a114d41e36f6e88f9bb87232afdbf7d3849e2a1f56a9090830940674c
forked-from-1kasper/bravo
bravo.ml
open Error type cmdline = | Check of string | Lex of string | Parse of string | Repl | Help | Trace | Indices | Girard | Silent let help = "\n invocation = bravo | bravo list list = [] | command list primitive = zero | one | interval command = check <filename> | lex <filen...
null
https://raw.githubusercontent.com/forked-from-1kasper/bravo/261c6426e526dca58f84c11555efafe246aa0bd2/bravo.ml
ocaml
open Error type cmdline = | Check of string | Lex of string | Parse of string | Repl | Help | Trace | Indices | Girard | Silent let help = "\n invocation = bravo | bravo list list = [] | command list primitive = zero | one | interval command = check <filename> | lex <filen...
a1620b4f370839937647e9879a859febeef6d2dcd9640be2bd9d1a8f7dfb787a
ygmpkk/house
System.hs
module System ( #ifndef STANDALONE ExitCode(ExitSuccess,ExitFailure), getArgs, getProgName, getEnv, system, exitWith, exitFailure #endif /* ! STANDALONE */ ) where #ifndef STANDALONE import System.Exit import System.Environment import System.Cmd #endif /* ! STANDALONE */
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/haskell98/System.hs
haskell
module System ( #ifndef STANDALONE ExitCode(ExitSuccess,ExitFailure), getArgs, getProgName, getEnv, system, exitWith, exitFailure #endif /* ! STANDALONE */ ) where #ifndef STANDALONE import System.Exit import System.Environment import System.Cmd #endif /* ! STANDALONE */
6af1c3043db7a095680090a98c3986dca7d33d40cc44904a4e968eb8f347408a
ktakashi/sagittarius-scheme
pair.scm
-*- mode : scheme ; coding : utf-8 -*- ;;; ;;; pair.scm Cryptographic library ;;; key pair #!deprecated #!nounbound (library (crypto key pair) (export (rename (<key-pair> <<keypair>) (make-key-pair make-keypair) (key-pair? keypair?) (key-pair-private keypair-private) (key-pair-public keypa...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/ed1d5e34e3df5e6f1c1240b190ab959de5041455/ext/crypto/crypto/key/pair.scm
scheme
coding : utf-8 -*- pair.scm Cryptographic library key pair generic methods
#!deprecated #!nounbound (library (crypto key pair) (export (rename (<key-pair> <<keypair>) (make-key-pair make-keypair) (key-pair? keypair?) (key-pair-private keypair-private) (key-pair-public keypair-public)) <private-key> private-key? <public-key> public-key? gen...
77aa8d09a83446a72f32b7a11d88c4c63e0f34f50a4b2f021a50d3c898f31661
ghcjs/ghcjs-base
Pure.hs
# LANGUAGE CPP # # LANGUAGE DefaultSignatures # # LANGUAGE TypeOperators # # LANGUAGE ScopedTypeVariables # # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TupleSections # # LANGUAGE MagicHash # # LANGUAGE JavaScriptFFI # # LANGUA...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-base/18f31dec5d9eae1ef35ff8bbf163394942efd227/GHCJS/Marshal/Pure.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE UnliftedFFITypes # # LANGUAGE BangPatterns # # LANGUAGE DeriveDataTypeable # experimental pure marshalling for lighter weight interaction in the quasiquoter
# LANGUAGE CPP # # LANGUAGE DefaultSignatures # # LANGUAGE TypeOperators # # LANGUAGE ScopedTypeVariables # # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE TupleSections # # LANGUAGE MagicHash # # LANGUAGE JavaScriptFFI # # LANGUAGE ForeignFunctionInterface # # LAN...
2f961c5faafbdffecd99db17e9bb382c0c0706216524ae919f491b36ea3780e4
TomerAberbach/programming-in-haskell-exercises
8.hs
data Tree a = Leaf a | Node (Tree a) (Tree a) instance Functor Tree where -- fmap :: (a -> b) -> Tree a -> Tree b fmap g (Leaf x) = Leaf (g x) fmap g (Node l r) = Node (fmap g l) (fmap g r) -- Proof: fmap id = id -- Base case: -- - fmap id (Leaf v) -- = { applying fmap } -- Leaf (id v) -- ...
null
https://raw.githubusercontent.com/TomerAberbach/programming-in-haskell-exercises/a66830529ebc9c4d84d0e4c6e0ad58041b46bc32/parts/2/chapters/16/8.hs
haskell
fmap :: (a -> b) -> Tree a -> Tree b Proof: fmap id = id Base case: - fmap id (Leaf v) = { applying fmap } Leaf (id v) = { applying id } Leaf v - id (Leaf v) = { applying id } Leaf v Inductive case: - fmap id (Node l r) = { applying fmap ...
data Tree a = Leaf a | Node (Tree a) (Tree a) instance Functor Tree where fmap g (Leaf x) = Leaf (g x) fmap g (Node l r) = Node (fmap g l) (fmap g r) Node ( fmap i d l ) ( fmap i d r ) Proof : fmap ( g . h ) = . fmap h Leaf ( ( g . h ) v ) - ( fmap g . fmap h ) ( Leaf v ) fmap g ...
d89d3fa7287862ae777dc4e46bab69d1777c46df634fa5530ab0ec3d1213ac29
Netflix/mantis-mql
test_sample.clj
; Copyright 2022 Netflix , Inc. ; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ; you may not use this file except in compliance with the License. ; You may obtain a copy of the License at ; ; -2.0 ; ; Unless required by applicable law or agreed to in writing, software distributed unde...
null
https://raw.githubusercontent.com/Netflix/mantis-mql/94600fc687afd380e6a063806a5f0dd0be218f34/mql-jvm/src/test/clojure/io/mantisrx/mql/test_sample.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing pe...
Copyright 2022 Netflix , Inc. distributed under the License is distributed on an " AS IS " BASIS , (ns io.mantisrx.mql.test-sample "" (:require [clojure.test :refer :all] [io.mantisrx.mql.jvm.core :as mql] [io.mantisrx.mql.jvm.interfaces.server :as mql-server] [io.mantisrx.mq...
00cc2f152df1142b91d6b0adfc54484037fc931aad8db77174971ab5a6c17e16
jellelicht/guix
tls.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2012 , 2013 , 2014 , 2015 , 2016 < > Copyright © 2014 , 2015 , 2016 < > Copyright © 2014 < > Copyright © 2013 , 2015 < > Copyright © 2015 < > Copyright © 2015 < > Copyright © 2016 < > Copyright © 2016 < > ;;; ;;;...
null
https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/tls.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2012 , 2013 , 2014 , 2015 , 2016 < > Copyright © 2014 , 2015 , 2016 < > Copyright © 2014 < > Copyright © 2013 , 2015 < > Copyright © 2015 < > Copyright © 2015 < > Copyright © 2016 < > Copyright © 2016 < > under the terms of the GNU General Public License as publish...
01000a4ed51c83ac9dda8a6c03a92d78fcc9b9fe502d732087da0a9e91d30b1c
bryanhughes/proto-crudl
proto_crudl_code.erl
%%%------------------------------------------------------------------- @author ( C ) 2021 , < COMPANY > %%% @doc %%% NOTE : if you are using records , then GPB will write out the include files %%% %%% @end Created : 04 . Feb 2021 12:18 PM %%%------------------------------------------------------------------...
null
https://raw.githubusercontent.com/bryanhughes/proto-crudl/e0bbb2643f4edfc1581ef7d869ee51e9285af421/src/proto_crudl_code.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API Generate our SQL defines for INSERT, SELECT, UPDATE, DELETE, LOOKUP, and custom mappings Generate any enumerations Generate the map or record functions and maybe ...
@author ( C ) 2021 , < COMPANY > NOTE : if you are using records , then GPB will write out the include files Created : 04 . Feb 2021 12:18 PM -module(proto_crudl_code). -author("bryan"). -export([generate/3, build_enum_case/1, is_version/2]). -include("proto_crudl.hrl"). -spec generate([{atom(), any()}],...
5b7b7a8dd4b45ae968e4836953da4195d2feee4bbaf491ef845e254fa0226390
wickedchicken/ocaml_skeleton
calc.mli
(* The interface file for the Calc module. * This defines the exported (public) types, exceptions, * and methods of the Calc class * * Note: OCaml modules rely on the filename for lookup. * This file must be named calc.mli *) module Calc : sig we want to tell the world about a function * that takes t...
null
https://raw.githubusercontent.com/wickedchicken/ocaml_skeleton/cea682c7d9dafc54dc4ec269e0dea770e83a0bd3/src/calc/calc.mli
ocaml
The interface file for the Calc module. * This defines the exported (public) types, exceptions, * and methods of the Calc class * * Note: OCaml modules rely on the filename for lookup. * This file must be named calc.mli
module Calc : sig we want to tell the world about a function * that takes two ints and returns an int * that takes two ints and returns an int *) val add : int -> int -> int;; end
e51d951c2407fc0dc3a16fd4e2d507c938ab041e12384e01bbf649f045af1ca5
igarnier/ocaml-geth
deploy.ml
open Ocaml_geth TODO obsolete ! ! ! let genesis = GethInit.Genesis. { config= { chain_id= 8888; (* never put 0!!! *) homestead_block= 0; eip155_block= 0; eip158_block= 0 }; alloc= []; coinbase= Types.address_from_string "0x0000000000000000000...
null
https://raw.githubusercontent.com/igarnier/ocaml-geth/e87ca9f86f79190aff108a14aaae6e925aed5641/examples/deploy/deploy.ml
ocaml
never put 0!!!
open Ocaml_geth TODO obsolete ! ! ! let genesis = GethInit.Genesis. { config= { chain_id= 8888; homestead_block= 0; eip155_block= 0; eip158_block= 0 }; alloc= []; coinbase= Types.address_from_string "0x0000000000000000000000000000000000000000"; d...
2d323dfd89853c84b34b98ac848b89235a459de0edf4e964bd498ab328435568
TristeFigure/lexikon
project.clj
(defproject lexikon "0.2.1" :description "Reify, manipulate and replay the lexical environment in Clojure" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.9.0"] [org.clojars.tristefigure/shuriken "0.14.1"]] :profiles {:dev ...
null
https://raw.githubusercontent.com/TristeFigure/lexikon/616c1b31185122edfffd7a553e93569b9a0b1671/project.clj
clojure
(defproject lexikon "0.2.1" :description "Reify, manipulate and replay the lexical environment in Clojure" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.9.0"] [org.clojars.tristefigure/shuriken "0.14.1"]] :profiles {:dev ...
718016bee684698a17cd2645edd4ec4ff82599ba98ad083f9c2ecacaad805300
xapi-project/xen-api-libs
http.mli
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
null
https://raw.githubusercontent.com/xapi-project/xen-api-libs/d603ee2b8456bc2aac99b0a4955f083e22f4f314/http-svr/http.mli
ocaml
* Recognised HTTP methods * Exception raised when parsing start line of request None means '*' None means '*' * [make] is the standard constructor for [t] * [get_version t] returns the HTTP protocol version * [to_string t] returns a short string summarising [t] * [to_header_list t] returns the list of HTTP hea...
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
936ff026540be0e29165332593204f25f202c7b98103cfe4ec2d27657ea014b9
veniversum/fractal-haskell
Coloring.hs
module Coloring where import Codec.Picture.Types import Data.Colour (Colour, blend) import Data.Colour.RGBSpace (uncurryRGB) import Data.Colour.RGBSpace.HSV (hsv, hsvView) import Data.Colour.SRGB (RGB (..), sRGB, sRGB24read, toSRGB, ...
null
https://raw.githubusercontent.com/veniversum/fractal-haskell/64fba58f15909c578a8a410ff1c5cea80363f0e5/src/Coloring.hs
haskell
|Defines point on color gradient. |Conversion from different data types |Generates color for value on linearly interpolated color gradient in sRGB color space
module Coloring where import Codec.Picture.Types import Data.Colour (Colour, blend) import Data.Colour.RGBSpace (uncurryRGB) import Data.Colour.RGBSpace.HSV (hsv, hsvView) import Data.Colour.SRGB (RGB (..), sRGB, sRGB24read, toSRGB, ...
66cd64405fc9abc6e0e38f4fc30e13e48bce077f9a4d34e84b34e6567508c86b
iconnect/regex
Lazy.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # OPTIONS_GHC -fno - warn - orphans # # OPTIONS_GHC -fno - warn - duplicate - exports # # LANGUAGE CPP ...
null
https://raw.githubusercontent.com/iconnect/regex/68752790a8f75986b917b71cf0e8e22cd3a28a3d/Text/RE/TDFA/ByteString/Lazy.hs
haskell
* Tutorial $tutorial * The 'Matches' and 'Match' Operators * The 'SearchReplace' Operators * The 'Matches' Type * The 'Match' Type $macros * The 'RE' Type * Options $options * Compiling and Escaping REs * The re Quasi Quoters $re $ed * IsRegex | find all the matches in the argument text; e.g., to count ...
# LANGUAGE NoImplicitPrelude # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # OPTIONS_GHC -fno - warn - orphans # # OPTIONS_GHC -fno - warn - duplicate - exports # # LANGUAGE CPP ...
1fe72896cfea14de9bc4353032824eb98beb13ec8c19d2336c54f551abd69473
OCamlPro/ezjs_min
dom.ml
open Js let setInnerHtml elt s = elt##.innerHTML := string s let setText elt = function | None -> () | Some s -> elt##.textContent := some (string s) let addClass elt s = elt##.classList##add (string s) let addClasses elt l = List.iter (addClass elt) l let removeClass elt s = elt##.classList##remov...
null
https://raw.githubusercontent.com/OCamlPro/ezjs_min/b1eb1e58d60e8f5174b7ebaa5cf1a068884fd47c/src/dom.ml
ocaml
open Js let setInnerHtml elt s = elt##.innerHTML := string s let setText elt = function | None -> () | Some s -> elt##.textContent := some (string s) let addClass elt s = elt##.classList##add (string s) let addClasses elt l = List.iter (addClass elt) l let removeClass elt s = elt##.classList##remov...
393f3b923dd55d85f20856d2a0f69c9640abff32a65c9eb6ddf57fd05194ef4a
ocaml/oasis
mod1.ml
(******************************************************************************) OASIS : architecture for building OCaml libraries and applications (* *) Copyright ( C ) 2011 - 2016 , Copyrig...
null
https://raw.githubusercontent.com/ocaml/oasis/3d1a9421db92a0882ebc58c5df219b18c1e5681d/test/data/TestPluginOMake/bug1737/liba/modules/mod1.ml
ocaml
**************************************************************************** This library is free software; you can redistribute it and/or modify it under the t...
OASIS : architecture for building OCaml libraries and applications Copyright ( C ) 2011 - 2016 , Copyright ( C ) 2008 - 2011 , OCamlCore SARL the Free Software Foundation ; either version 2.1 of the License , or ( at You s...
b30c24d9da98bce7994af759b411a1dfbff27e345a51f253ceefcfe455635dd9
decal/pathgro
path-generate.scm
(define-module (pathgro base path-generate) #:use-module (ice-9 format) #:use-module (srfi srfi-1) #:export (path-generate)) (use-modules (pathgro util path-tools)) (define (path-generate apth) (let ((abase (basename apth)) (anext (extname apth)) (upper-limit 94) (lower-limit 33) (increment-va...
null
https://raw.githubusercontent.com/decal/pathgro/48c4007611f9c4ae6ff24e50ae27615c65cad3b2/pathgro/base/path-generate.scm
scheme
(define-module (pathgro base path-generate) #:use-module (ice-9 format) #:use-module (srfi srfi-1) #:export (path-generate)) (use-modules (pathgro util path-tools)) (define (path-generate apth) (let ((abase (basename apth)) (anext (extname apth)) (upper-limit 94) (lower-limit 33) (increment-va...
be7dad991c44ce65b6fd0ae3c064e91b9e0a4a727eb21b12ebb79da48b7a7eb8
ocaml-multicore/multicore-magic
Multicore_magic.mli
(** This is a library of magic multicore utilities intended for experts for extracting the best possible performance from multicore OCaml. Hopefully future releases of multicore OCaml will make this library obsolete! *) (** {1 Helpers for using padding to avoid false sharing} *) val copy_as_padded : 'a -...
null
https://raw.githubusercontent.com/ocaml-multicore/multicore-magic/586645a6cfa918f25c168e9efcc6d26f88798c37/src/main/Multicore_magic.mli
ocaml
* This is a library of magic multicore utilities intended for experts for extracting the best possible performance from multicore OCaml. Hopefully future releases of multicore OCaml will make this library obsolete! * {1 Helpers for using padding to avoid false sharing} * Creates a padded array. The leng...
val copy_as_padded : 'a -> 'a * Creates a shallow clone of the given object . The clone will have extra padding words added after the last used word . This is designed to help avoid { { : } false sharing } . False sharing has a negative impact on multicore performance . Accesses of bot...
f6c3c5142e75cdf1625d4224abc73b2021881d172f078bb0208bb8d490a22417
jiangpengnju/htdp2e
ex129.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex129) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ...
null
https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/intermezzo-bsl/ex129.rkt
racket
about the language level of this file in a form that our tools can easily process. A:
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex129) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) Copy and paste the following tests into 's definitions area : ...
572df46c2064ff916c4ff3607048f42867e432b90d052f1a1540167f7fa4b6cd
patricoferris/ocaml-df
type_bindings.mli
module M (F : Ctypes.TYPE) : sig type 'a typ = 'a Ctypes.structure F.typ type ('a, 'b) field = ('b, 'a Ctypes.structure) F.field module Statvfs : sig type t val t : t typ val f_bsize : (t, Unsigned.uint) field (** File system block size *) val f_frsize : (t, Unsigned.uint) field (** F...
null
https://raw.githubusercontent.com/patricoferris/ocaml-df/617654587d66f394096277eb952947847cf3649f/types/bindings/type_bindings.mli
ocaml
* File system block size * Fragment size * Number of free blocks * Number of free blocks for unprivileged user * Number of inodes * Number of free inodes * Number of free inodes for unprivileged user * Filesystem ID * Mount flags * Maximum filename length
module M (F : Ctypes.TYPE) : sig type 'a typ = 'a Ctypes.structure F.typ type ('a, 'b) field = ('b, 'a Ctypes.structure) F.field module Statvfs : sig type t val t : t typ val f_bsize : (t, Unsigned.uint) field val f_frsize : (t, Unsigned.uint) field val f_blocks : (t, Unsigned.uint) fiel...
7a71a3a206af79e777babad449334f54c0386230831db99b53e6770fdf429a99
NorfairKing/easyspec
Monoid.hs
# LANGUAGE NoImplicitPrelude # module Monoid where import Prelude (Int, (*), (+)) zero :: Int zero = 0 add :: Int -> Int -> Int add = (+) negate :: Int -> Int negate i = -i one :: Int one = 1 multiply :: Int -> Int -> Int multiply = (*)
null
https://raw.githubusercontent.com/NorfairKing/easyspec/b038b45a375cc0bed2b00c255b508bc06419c986/examples/evaluation/Monoid.hs
haskell
# LANGUAGE NoImplicitPrelude # module Monoid where import Prelude (Int, (*), (+)) zero :: Int zero = 0 add :: Int -> Int -> Int add = (+) negate :: Int -> Int negate i = -i one :: Int one = 1 multiply :: Int -> Int -> Int multiply = (*)
0499ca74ecd9e4e2cb1deaa57a02b52cc8b3cfb67f26cb885b32e83a769fb0c5
shirok/Gauche
windows.scm
;;; ;;; text.console.windows - windows console control ;;; Copyright ( c ) 2015 Hamayama Copyright ( c ) 2016 - 2022 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1. R...
null
https://raw.githubusercontent.com/shirok/Gauche/b773899dbe0b2955e1c4f1daa066da874070c1e4/lib/text/console/windows.scm
scheme
text.console.windows - windows console control Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the f...
Copyright ( c ) 2015 Hamayama Copyright ( c ) 2016 - 2022 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING The...
1e725d45df384c237ddf057e9939fff4dd26e0e89986f92950ac99f9e943d144
MyDataFlow/ttalk-server
mod_mam_muc_cache_user.erl
%%%------------------------------------------------------------------- @author Michael < > ( C ) 2013 , Uvarov Michael @doc Stores cache using ETS - table ( special version for MUC ) . %%% This module is a proxy for `mod_mam_odbc_user' (it should be started). %%% There are 2 hooks for ` mam_archive_id ' : %%...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/src/mod_mam_muc_cache_user.erl
erlang
------------------------------------------------------------------- This module is a proxy for `mod_mam_odbc_user' (it should be started). `cached_archive_id/3' and `store_archive_id/3'. The differencies from `mod_mam_odbc_user' are: - This module deletes cached data after room deletion. @end ----------------...
@author Michael < > ( C ) 2013 , Uvarov Michael @doc Stores cache using ETS - table ( special version for MUC ) . There are 2 hooks for ` mam_archive_id ' : -module(mod_mam_muc_cache_user). -export([start/2, stop/1]). -export([cached_archive_id/3, store_archive_id/3, remove_archive/3]). ...
0cc0bb7ac09c9d5843d9ba11bece0e87fa034f26f2ef1d67bcf83953bd5e3b80
schemeorg-community/index.scheme.org
mit.scm
( ;; r7rs small ((scheme base) . #t) ((scheme case-lambda) . #t) ((scheme complex) . #t) ((scheme char) . #t) ((scheme cxr) . #t) ((scheme eval) . #t) ((scheme file) . #t) ((scheme inexact) . #t) ((scheme lazy) . #t) ((scheme load) . #t) ((scheme process-context) . #t) ((scheme r5rs) . #t) (...
null
https://raw.githubusercontent.com/schemeorg-community/index.scheme.org/32e1afcfe423a158ac8ce014f5c0b8399d12a1ea/filters/mit.scm
scheme
r7rs small
( ((scheme base) . #t) ((scheme case-lambda) . #t) ((scheme complex) . #t) ((scheme char) . #t) ((scheme cxr) . #t) ((scheme eval) . #t) ((scheme file) . #t) ((scheme inexact) . #t) ((scheme lazy) . #t) ((scheme load) . #t) ((scheme process-context) . #t) ((scheme r5rs) . #t) ((scheme read) . ...
fb7d165de1fbcf1eeb8622e42be9f3ec0f6f442e8827a943a7346669a316237c
tonyg/kali-scheme
c.scm
Copyright ( c ) 1994 . See file COPYING . ; Translating the node tree into C (define (write-c-file init-name file header forms) (set! *c-variable-id* 0) (set! *type-uids* '()) (set! *next-type-uid* 0) (let* ((real-out (open-output-file file)) (out (make-tracking-output-port real-out))) (merge-form...
null
https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/ps-compiler/prescheme/c.scm
scheme
Translating the node tree into C Even when finished we need to keep the lambda around for help with calls to it. ------------------------------------------------------------ Initialization procedure at the end of the file (often called `main'). Header for initialization code Write the end of the initialization co...
Copyright ( c ) 1994 . See file COPYING . (define (write-c-file init-name file header forms) (set! *c-variable-id* 0) (set! *type-uids* '()) (set! *next-type-uid* 0) (let* ((real-out (open-output-file file)) (out (make-tracking-output-port real-out))) (merge-forms forms) (check-hoisting forms)...
01562e4252957da193d7c3f45ed6a52f52c58e864804621967c31dae90b579a6
nyu-acsys/drift
mc91.ml
USED : PLDI2011 as mc91 USED : PEPM2013 as mc91 Res : OCaml - > 91 imprecision : Oct : 91 < = v < = 101 Liquid Haskell : false by property { -@ : : x : Int - > { b : Int | ( b = = 91 ) } @- } USED: PLDI2011 as mc91 USED: PEPM2013 as mc91 Res: OCaml -> 91 imprecision: Oct: 91 <= v <= 101 Liquid Haskell: f...
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks_call/r_type/first/mc91.ml
ocaml
USED : PLDI2011 as mc91 USED : PEPM2013 as mc91 Res : OCaml - > 91 imprecision : Oct : 91 < = v < = 101 Liquid Haskell : false by property { -@ : : x : Int - > { b : Int | ( b = = 91 ) } @- } USED: PLDI2011 as mc91 USED: PEPM2013 as mc91 Res: OCaml -> 91 imprecision: Oct: 91 <= v <= 101 Liquid Haskell: f...
51a9217527d658e618bb10d57805fdf45c3e0db8a5127036d2557b3e2b099205
jkrivine/tl_interpreter
reloan_chained.ml
(* Put the sandbox tools in scope and initialize a useful blockchain state. *) open Sandbox.Make () let () = This loan contract is named " " . Anyone can pull unless they would become the end of the tradeline . In that case , there must be 20 € provisioned to pay . Note that when computing pa...
null
https://raw.githubusercontent.com/jkrivine/tl_interpreter/c967c6578dd4491a6930c9842a0709fbc5939496/bin/demos/reloan_chained.ml
ocaml
Put the sandbox tools in scope and initialize a useful blockchain state. `init` starts a tradeline with a single position named `"u"`, owned by `alice` `grow` creates a position `"v"` next to `u`. The segment between them is `loan1`. By default `u`'s owner will own `v` This is another loan segment with a di...
open Sandbox.Make () let () = This loan contract is named " " . Anyone can pull unless they would become the end of the tradeline . In that case , there must be 20 € provisioned to pay . Note that when computing payoffs we alow zcrossing across transactions ! Commit is always possible...
257dbbe8c67a30c77c5a2895bf8288bd50c5394fe6e9fab12dc6f9b2536723ff
alinpopa/qerl
qerl_memory_queue.erl
-module(qerl_memory_queue). -behaviour(gen_server). -behaviour(qerl_queue). -export([init/1,handle_cast/2,handle_call/3,handle_info/2,terminate/2,code_change/3]). -export([start_link/0,produce/2,consume/0,info/0]). -record(state,{queue}). %% %% API functions %% start_link() -> gen_server:start_link({local, ?MODU...
null
https://raw.githubusercontent.com/alinpopa/qerl/4c10c4617eea14d451101775a1feb20fb3709f9d/src/qerl_memory_queue.erl
erlang
API functions Callback functions
-module(qerl_memory_queue). -behaviour(gen_server). -behaviour(qerl_queue). -export([init/1,handle_cast/2,handle_call/3,handle_info/2,terminate/2,code_change/3]). -export([start_link/0,produce/2,consume/0,info/0]). -record(state,{queue}). start_link() -> gen_server:start_link({local, ?MODULE}, ?MODULE, [], []). ...
6501e1a9128137d020c9ece3bf9662d783f634bf174e3a8148f7e7beefad8f74
sheyll/b9-vm-image-builder
RepositorySpec.hs
module B9.RepositorySpec ( spec, filterRepoImagesMapReturnsAllAndOnlyImagesSatisfieingTheFilterPredicate, filterRepoImagesMapReturnsAllAndOnlyReposSatisfieingTheFilterPredicate, allSharedImagesWithRepoReturnsAllNonEmptyRepos, allSharedImagesWithRepoReturnsOnlyReposContainedInTheParameter, allShare...
null
https://raw.githubusercontent.com/sheyll/b9-vm-image-builder/4d2af80d3be4decfce6c137ee284c961e3f4a396/src/tests/B9/RepositorySpec.hs
haskell
module B9.RepositorySpec ( spec, filterRepoImagesMapReturnsAllAndOnlyImagesSatisfieingTheFilterPredicate, filterRepoImagesMapReturnsAllAndOnlyReposSatisfieingTheFilterPredicate, allSharedImagesWithRepoReturnsAllNonEmptyRepos, allSharedImagesWithRepoReturnsOnlyReposContainedInTheParameter, allShare...
054d4cf267b1ba62275b06c516b6f73c489fabe25c062bab2dcde264e9e3fb38
8c6794b6/guile-tjit
compat-x86_64-linux.scm
;;;; Body of compatibility code for Linux x86_64 Copyright ( C ) 2015 , 2016 Free Software Foundation , Inc. ;;;; ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either versio...
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/language/trace/compat-x86_64-linux.scm
scheme
Body of compatibility code for Linux x86_64 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABIL...
Copyright ( C ) 2015 , 2016 Free Software Foundation , Inc. version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 USA Code specific to Linux x86_6...
87687bb60e7a98c2adb943a5ea3ea2e1a474633de8437d50b77efde8c16f7952
facebook/flow
auto_close_jsx.mli
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/4997f9d1c3ece99574ec3527ddfa284498455afa/src/services/auto_close_jsx/auto_close_jsx.mli
ocaml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
e1347ab7cfb0afd49317267ff7b7cddf81d8f72b743f055ab0e5695d9caf2cc5
killme2008/clj-xmemcached
test_reify_proxy.clj
;;An example to test performance between reify and proxy (ns test-reify-proxy (:use [clj-xmemcached.core])) (def client (memcached "localhost:11211")) (with-client client (set "key" 0) (time (dotimes [_ 10000] (cas "key" inc))) (prn (get "key")) (shutdown))
null
https://raw.githubusercontent.com/killme2008/clj-xmemcached/d06fd530260c2bf1e82640d31efd0999993c08f1/example/test_reify_proxy.clj
clojure
An example to test performance between reify and proxy
(ns test-reify-proxy (:use [clj-xmemcached.core])) (def client (memcached "localhost:11211")) (with-client client (set "key" 0) (time (dotimes [_ 10000] (cas "key" inc))) (prn (get "key")) (shutdown))
817b34eaf975acceabfbad404e39667cf88c4fa97cfd2666d25470fac30db560
tmattio/js-bindings
proposed_diagnostic.mli
[@@@ocaml.warning "-7-11-32-33-39"] [@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"] ] open Ts2ocaml_baselib unknown identifiers : - BaseLanguageClient - CancellationToken - ClientCapabilities - Disposable - DocumentSelector - EventEmitter < T1 > - Proposed.$DiagnosticClientCapabili...
null
https://raw.githubusercontent.com/tmattio/js-bindings/fe1d40a5b8cae157af85fa84ca482fb6b0ddf1e0/lib/vscode-languageclient/_gen/proposed_diagnostic.mli
ocaml
import { TextDocumentFeature, BaseLanguageClient } from './client';
[@@@ocaml.warning "-7-11-32-33-39"] [@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"] ] open Ts2ocaml_baselib unknown identifiers : - BaseLanguageClient - CancellationToken - ClientCapabilities - Disposable - DocumentSelector - EventEmitter < T1 > - Proposed.$DiagnosticClientCapabili...
0e52066a5cfe17085e73cbd7177f44aa4911bf155ef8da2e2555cd4e64477721
Zilliqa/scilla
EvalBuiltins.mli
This file is part of scilla . Copyright ( c ) 2021 - present Zilliqa Research Pvt . Ltd. scilla 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 you...
null
https://raw.githubusercontent.com/Zilliqa/scilla/957026192afcc30827fdacea0ce7bc0a8c593279/src/eval/EvalBuiltins.mli
ocaml
Takes the expected type as an argument to elaborate the result type arguments value arguments result type Returns a pair: * - The result type for given argument types, e.g., Bool * - The executor for evaluating the operation type arguments types of value arguments
This file is part of scilla . Copyright ( c ) 2021 - present Zilliqa Research Pvt . Ltd. scilla 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 you...
7efb1bc142ffbe1e8ef653a6ac8dbf06cec846106190f5ae9571a7c884d535b8
ocsigen/ocsimore
widget.mli
Ocsimore * Copyright ( C ) 2005 Boender * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of the License , or * ( at your option ) any later version ....
null
https://raw.githubusercontent.com/ocsigen/ocsimore/8eeaf043ed6f1f167a96cbdc5f72a5225d9516d5/src/core/server/widget.mli
ocaml
* Takes a thread that gets data (e.g. from a database), then a function that transforms this data into something printable of type flows, then a function that will build the box with the result, and/or possibly also error messages if something went wrong during data retrieval. ...
Ocsimore * Copyright ( C ) 2005 Boender * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of the License , or * ( at your option ) any later version ....
80cb45fc68bd410044008a066592b83375547a0c1ebdf3b38a9ed1f6c4a03c50
yapsterapp/er-cassandra
test.clj
(ns er-cassandra.util.test (:require [clojure.test :as t] [taoensso.timbre :refer [trace debug info warn error]] [deferst.core :refer [defsystem]] [deferst.system :as sys] [slf4j-timbre.configure :as logconf] [er-cassandra.session :as s] [er-cassandra.session.alia :as alia-session])) (def ^:dyna...
null
https://raw.githubusercontent.com/yapsterapp/er-cassandra/1d059f47bdf8654c7a4dd6f0759f1a114fdeba81/src/er_cassandra/util/test.clj
clojure
set to false to preserve db contents after test
(ns er-cassandra.util.test (:require [clojure.test :as t] [taoensso.timbre :refer [trace debug info warn error]] [deferst.core :refer [defsystem]] [deferst.system :as sys] [slf4j-timbre.configure :as logconf] [er-cassandra.session :as s] [er-cassandra.session.alia :as alia-session])) (def ^:dyna...
7ba950a881ef6eaa38fe10ba40c5bf24c6798e6ceb7b4d01a40b57c770cc43ac
donaldsonjw/bigloo
walk.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / comptime / Globalize / walk.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Globalize/walk.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * The `globalization' stage */ *===========================...
* serrano / prgm / project / bigloo / comptime / Globalize / walk.scm * / * Author : * / * Creation : Thu Jan 26 14:25:07 1995 * / * Last change : We d Jan 29 09:41:05 2014 ( serrano ) * / * Cop...
639cedf10a63762a9f8ef6f5bc681eb42bf758d303da821b6af93133c0134320
fmthoma/vgrep
Internal.hs
{-# LANGUAGE Rank2Types #-} # LANGUAGE ScopedTypeVariables # module Vgrep.App.Internal where import Control.Concurrent.Async import Control.Exception import Graphics.Vty (Vty) import qualified Graphics.Vty as Vty import Pipes import Sys...
null
https://raw.githubusercontent.com/fmthoma/vgrep/f3b140bf3150a3699234469c34ff8c13a298998e/src/Vgrep/App/Internal.hs
haskell
# LANGUAGE Rank2Types # | 'User' events do have higher priority than 'System' events, so that the application stays responsive even in case of event queue congestion. | We need the viewport in order to initialize the app, which in turn will start 'Vty.Vty'. To resolve this circular dependency, we start onc...
# LANGUAGE ScopedTypeVariables # module Vgrep.App.Internal where import Control.Concurrent.Async import Control.Exception import Graphics.Vty (Vty) import qualified Graphics.Vty as Vty import Pipes import System.Posix.IO import System....
252a0ed5f50148be0a93a81dcb3d20945bd3335c7082f41229ee0315ac8689d3
MLstate/opalang
traverseInterface.ml
Copyright © 2011 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be useful , ...
null
https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/ocamllib/libbase/traverseInterface.ml
ocaml
* Usual traverse functions. Up is bottom-up, down is top-down. Among brothers, the order is always that specified by the implementation of the module X Note : when up/down is not specified, order is not specified. Do not specify up/down only if it really does not matter to your pass. * * * * ...
Copyright © 2011 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be useful , ...
c915dc7d07e88bded5862e94895f913c61ece618176b1e155aa357d7a7bc36fb
Apress/common-lisp-condition-system
signaling.lisp
src / conditions.lisp (in-package #:portable-condition-system) ;;; Condition signaling (defvar *break-on-signals* nil "Declares a condition type for which all signaling functions will call BREAK before actually signaling the condition.") (defvar *handler-clusters* '() "A list containing a list of all handler ...
null
https://raw.githubusercontent.com/Apress/common-lisp-condition-system/7f4533e20d6397a59ca5bbfdc139b3389a135c34/Sources%20-%20PCS/src/signaling.lisp
lisp
Condition signaling
src / conditions.lisp (in-package #:portable-condition-system) (defvar *break-on-signals* nil "Declares a condition type for which all signaling functions will call BREAK before actually signaling the condition.") (defvar *handler-clusters* '() "A list containing a list of all handler clusters, where a cluste...
eb28edc5885d44c519422bd6b7cf9fd31c8798aaffe2e5da101ac5a6f675edac
zxymike93/SICP
higher-order-procedures.rkt
#lang sicp ;; todo: procedures as arguments ;; fixed-point 满足 f(x)=x 利用这个概念,可以对某些函数求解,比如:求 x 的平方根 y 即 y^2 = x,可知 y = x / y ;; 所以只要求得 f(y)=x/y 的 fixed-point 即可得到 x 的平方根 ;; 通过将过程作为参数传递,可以实现 fixed-point 的概念 (define (average a b) (/ (+ a b) 2)) (define (fixed-point f first-guess) (define (close-enough? a ...
null
https://raw.githubusercontent.com/zxymike93/SICP/9d8e84d6a185bf4d7f28c414fc3359741384beb5/notes/higher-order-procedures.rkt
racket
todo: procedures as arguments fixed-point 满足 f(x)=x 所以只要求得 f(y)=x/y 的 fixed-point 即可得到 x 的平方根 通过将过程作为参数传递,可以实现 fixed-point 的概念 guess: y , next: (/ x y) guess: (/ x y), next: (/ x (/ x y)) 于是引入一个叫 average damping 的计算方法:在影响方程解的情况下,减少演进的变化程度。 所以 average-damping 可以抽象为一个更高级的过程 因为要传给 fixed-point 第一个参数,average-damp 的...
#lang sicp 利用这个概念,可以对某些函数求解,比如:求 x 的平方根 y 即 y^2 = x,可知 y = x / y (define (average a b) (/ (+ a b) 2)) (define (fixed-point f first-guess) (define (close-enough? a b) (> 0.00001 (abs (- a b)))) (define (try guess) (let ((next (f guess))) (if (close-enough? guess next) n...
53c9d2bc50273722b6049947b30e16af2953259e4e4473f45a5f609b00147c39
sadiqj/ocaml-esp32
t142-switch-9.ml
open Lib;; type t = | A | B of int | C of int ;; match B 0 with | B _ -> () | _ -> raise Not_found ;; * 0 CONSTINT 42 2 PUSHACC0 3 MAKEBLOCK1 0 5 POP 1 7 9 < 0>(0 ) 11 12 SWITCH int 0 - > 20 tag 0 - > 17 tag 1 -...
null
https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/testsuite/tests/tool-ocaml/t142-switch-9.ml
ocaml
open Lib;; type t = | A | B of int | C of int ;; match B 0 with | B _ -> () | _ -> raise Not_found ;; * 0 CONSTINT 42 2 PUSHACC0 3 MAKEBLOCK1 0 5 POP 1 7 9 < 0>(0 ) 11 12 SWITCH int 0 - > 20 tag 0 - > 17 tag 1 -...
2bddbaf48c569ba7fde4105ba04c866ba791235242e8a0d79653c2b1217640a6
okuoku/nausicaa
test-gcrypt.sps
-*- coding : utf-8 - unix -*- ;;; Part of : / ;;;Contents: test high-level API Date : Sat Dec 26 , 2009 ;;; ;;;Abstract ;;; ;;; ;;; Copyright ( c ) 2009 , 2010 < > ;;; ;;;This program is free software: you can redistribute it and/or modify ;;;it under the terms of the GNU General Public License as published by...
null
https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/gcrypt/tests/test-gcrypt.sps
scheme
Contents: test high-level API Abstract This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; withou...
-*- coding : utf-8 - unix -*- Part of : / Date : Sat Dec 26 , 2009 Copyright ( c ) 2009 , 2010 < > the Free Software Foundation , either version 3 of the License , or ( at General Public License for more details . You should have received a copy of the GNU General Public License (import (nausicaa) (...
fa02ceb6b7abfe9c4ff12164ef1f9d8efa7c1ca94f38695782a52c757653e53f
rvirding/luerl
luerl_sandbox.erl
Copyright ( c ) 2013 - 2017 %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing, software distributed...
null
https://raw.githubusercontent.com/rvirding/luerl/5e61c1838d08430af67fb870995b05a41d64aeee/src/luerl_sandbox.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright ( c ) 2013 - 2017 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , Authors : -module(luerl_sandbox). -export([init/0,init/1,init/2, run/1,run/2,run/3,run/4,run/5]). -define(LUERL_GLOBAL, '_G'). ...
7640185197588a6d50d3ed46011b7e360a11aba5a841c47020ffaa2d1b65da47
TerrorJack/ghc-alter
readwrite003.hs
import System.IO file = "readwrite003.txt" main = do writeFile file "ab\ncd\nef\ngh" h <- openFile file ReadWriteMode hGetLine h hPutStrLn h "yz" hClose h h <- openBinaryFile file ReadMode hSetNewlineMode stdout noNewlineTranslation hGetContents h >>= putStr
null
https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/tests/IO/readwrite003.hs
haskell
import System.IO file = "readwrite003.txt" main = do writeFile file "ab\ncd\nef\ngh" h <- openFile file ReadWriteMode hGetLine h hPutStrLn h "yz" hClose h h <- openBinaryFile file ReadMode hSetNewlineMode stdout noNewlineTranslation hGetContents h >>= putStr
a3474acd413125665578e5299b93a3dbc0983b517f7226299a85fe15b93aa634
MaximGB/TetrisRF
color.cljs
(ns tetrisrf.color) (defn in-range [min-val max-val val] (min max-val (max min-val val))) (defn rgbs->rgbv [color] (let [[parsed red green blue] (re-matches #"#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})" color)] (if parsed [(js/parseInt red 16) (js/parseInt green 16) (js/parseInt blue 16)]))) ...
null
https://raw.githubusercontent.com/MaximGB/TetrisRF/19a91c145a27e8819efebcc9f4e86bbfc15c8d7f/src/tetrisrf/color.cljs
clojure
undefined
(ns tetrisrf.color) (defn in-range [min-val max-val val] (min max-val (max min-val val))) (defn rgbs->rgbv [color] (let [[parsed red green blue] (re-matches #"#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})" color)] (if parsed [(js/parseInt red 16) (js/parseInt green 16) (js/parseInt blue 16)]))) ...
c8c8e05f09f35984cb13a06f4d67c824b4040329282d9996ab6b11f64e9839ae
cdaringe/protohacks
lrcp.ml
type string_list = string list [@@deriving show] type data_tuple = int * int * string type t = | Connect of int | Close of int | Ack of (int * int) | Data of data_tuple let unescape s = let rec aux is_escaping l = match l with | [] -> [] | c :: xs -> ( match c with | '/' -> ...
null
https://raw.githubusercontent.com/cdaringe/protohacks/df98acf4f30f919698217990d7886275a17fb92f/lib/7_lrcp/lrcp.ml
ocaml
type string_list = string list [@@deriving show] type data_tuple = int * int * string type t = | Connect of int | Close of int | Ack of (int * int) | Data of data_tuple let unescape s = let rec aux is_escaping l = match l with | [] -> [] | c :: xs -> ( match c with | '/' -> ...