_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 |
|---|---|---|---|---|---|---|---|---|
3fee767061e228db819d9ca10a978a4193316677557741622e6b19cfc5b9b10b | gsakkas/rite | 3511.ml |
let rec wwhile (f,b) =
match f b with
| (b',c') -> (match c' with | true -> wwhile (f, b') | false -> b');;
let fixpoint (f,b) = wwhile (((f b) <> b), b);;
fix
let rec wwhile ( f , b ) =
match f b with
| ( b',c ' ) - > ( match c ' with | true - > wwhile ( f , b ' ) | false - > b ' ) ; ;
le... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/3511.ml | ocaml |
let rec wwhile (f,b) =
match f b with
| (b',c') -> (match c' with | true -> wwhile (f, b') | false -> b');;
let fixpoint (f,b) = wwhile (((f b) <> b), b);;
fix
let rec wwhile ( f , b ) =
match f b with
| ( b',c ' ) - > ( match c ' with | true - > wwhile ( f , b ' ) | false - > b ' ) ; ;
le... | |
05a2741d1919defccc80f84958b86f988c1da80c08603505aca8548be67c1c10 | zcaudate/hara | primitive.clj | (ns hara.core.base.primitive
(:require [hara.core.base.util :as util]))
(def +primitives+
{:void ["V" Void nil nil :no-size]
:boolean ["Z" Boolean boolean boolean-array :no-size]
:byte ["B" Byte byte byte-array]
:char ["C" Character char char-array]
:short ["S... | null | https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/src/hara/core/base/primitive.clj | clojure | (ns hara.core.base.primitive
(:require [hara.core.base.util :as util]))
(def +primitives+
{:void ["V" Void nil nil :no-size]
:boolean ["Z" Boolean boolean boolean-array :no-size]
:byte ["B" Byte byte byte-array]
:char ["C" Character char char-array]
:short ["S... | |
ad14e048e3eca954e969d2b55a89a889c022fd32a564cd778e58e4c1c23e0d73 | TrustInSoft/tis-kernel | export_whycore.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/qed/src/export_whycore.ml | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
d6e81bcb6ad5a6e2bfa2b5ece1b4e681a28147d9d366794e2b711c9e42d29fa9 | erlware/erlcron | ecrn_startup_test.erl | , LLC . All Rights Reserved .
%%% vim:ts=4:ts=4:et
%%%
This file is provided to you under the BSD License ; you may not use
%%% this file except in compliance with the License.
-module(ecrn_startup_test).
-compile(export_all).
-compile(nowarn_export_all).
-include_lib("eunit/include/eunit.hrl").
-define(FuncTes... | null | https://raw.githubusercontent.com/erlware/erlcron/1c6876dfcd125763342b3968cfc38d2d6aaa3027/test/ecrn_startup_test.erl | erlang | vim:ts=4:ts=4:et
this file except in compliance with the License.
===================================================================
Types
=================================================================== | , LLC . All Rights Reserved .
This file is provided to you under the BSD License ; you may not use
-module(ecrn_startup_test).
-compile(export_all).
-compile(nowarn_export_all).
-include_lib("eunit/include/eunit.hrl").
-define(FuncTest(A), {atom_to_list(A), fun A/0}).
disable_sasl_logger() ->
logger:add_ha... |
36e56078d271ed93079b3962935562c7b4d1951507f8d543a571ba842ed0d725 | bufferswap/ViralityEngine | dvec3.lisp | (in-package #:vorigin.dvec3)
(u:fn-> = (vec vec &key (:rel u:f64) (:abs u:f64)) boolean)
(declaim (inline =))
(defun = (vec1 vec2 &key (rel 1d-7) (abs rel))
"Compare vectors VEC1 and VEC2 for equality. REL and ABS are the relative and absolute tolerances
to compare by, and should be tuned specially for the applicati... | null | https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/support/vorigin/src/operations/dvec3.lisp | lisp | (in-package #:vorigin.dvec3)
(u:fn-> = (vec vec &key (:rel u:f64) (:abs u:f64)) boolean)
(declaim (inline =))
(defun = (vec1 vec2 &key (rel 1d-7) (abs rel))
"Compare vectors VEC1 and VEC2 for equality. REL and ABS are the relative and absolute tolerances
to compare by, and should be tuned specially for the applicati... | |
566802014fb39d5ba1baefaaf421b96cde8a0543334db5a23da620c09342c7ad | steffan-westcott/clj-otel | metrics.clj | (ns steffan-westcott.clj-otel.exporter.otlp.http.metrics
"Metric data exporter using OpenTelemetry Protocol via HTTP."
(:require [steffan-westcott.clj-otel.util :as util])
(:import (io.opentelemetry.exporter.otlp.http.metrics OtlpHttpMetricExporter
OtlpHttpM... | null | https://raw.githubusercontent.com/steffan-westcott/clj-otel/2fb2c174c30ac9b1158974772668883001c9ef5c/clj-otel-exporter-otlp/src/steffan_westcott/clj_otel/exporter/otlp/http/metrics.clj | clojure | (ns steffan-westcott.clj-otel.exporter.otlp.http.metrics
"Metric data exporter using OpenTelemetry Protocol via HTTP."
(:require [steffan-westcott.clj-otel.util :as util])
(:import (io.opentelemetry.exporter.otlp.http.metrics OtlpHttpMetricExporter
OtlpHttpM... | |
15c31eb679684f164c986fbe1fa3a33492035044b113000c58560bccd50324ad | borgeby/jarl | bits_test.cljc | (ns jarl.builtins.bits-test
(:require #?(:clj [clojure.test :refer [deftest]]
:cljs [cljs.test :refer [deftest]])
[test.utils :refer [testing-builtin]]))
(deftest builtin-bits-or-test
(testing-builtin "bits.or"
[13 10] 15
[10 -10] -2
[-10 -10] -10
[10.1 ... | null | https://raw.githubusercontent.com/borgeby/jarl/2659afc6c72afb961cb1e98b779beb2b0b5d79c6/core/src/test/cljc/jarl/builtins/bits_test.cljc | clojure | non-integers
negative integers
non-integers
negative integers | (ns jarl.builtins.bits-test
(:require #?(:clj [clojure.test :refer [deftest]]
:cljs [cljs.test :refer [deftest]])
[test.utils :refer [testing-builtin]]))
(deftest builtin-bits-or-test
(testing-builtin "bits.or"
[13 10] 15
[10 -10] -2
[-10 -10] -10
[10.1 ... |
6524b7a590ec5964cb804743094ca02dadcdd08f9178a4f14da6b283ec7fdbc5 | armedbear/abcl | compile-file-pathname.lisp | ;;; compile-file-pathname.lisp
;;;
Copyright ( C ) 2004 - 2005
$ Id$
;;;
;;; 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 la... | null | https://raw.githubusercontent.com/armedbear/abcl/ab3912a5e231ef7dbe67db9c6e4be635042845bc/src/org/armedbear/lisp/compile-file-pathname.lisp | lisp | compile-file-pathname.lisp
This program is free software; you can redistribute it and/or
either version 2
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Pub... | Copyright ( C ) 2004 - 2005
$ Id$
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
(... |
ed01e4589c3b5666a15665f206c8f5fa1d3d3db67ca7839a614a389b59394afa | riemann/riemann | folds_test.clj | (ns riemann.folds-test
(:refer-clojure :exclude [count])
(:require [riemann.common :refer [event]]
[riemann.folds :refer :all]
[riemann.time :refer :all]
[riemann.time.controlled :refer :all]
[clojure.test :refer :all]))
(use-fixtures :once control-time!)
(use-fixtur... | null | https://raw.githubusercontent.com/riemann/riemann/1649687c0bd913c378701ee0b964a9863bde7c7c/test/riemann/folds_test.clj | clojure | (ns riemann.folds-test
(:refer-clojure :exclude [count])
(:require [riemann.common :refer [event]]
[riemann.folds :refer :all]
[riemann.time :refer :all]
[riemann.time.controlled :refer :all]
[clojure.test :refer :all]))
(use-fixtures :once control-time!)
(use-fixtur... | |
d0debdd2502561ff44501d9f67042ff07a1d881ad03bf157f0843bd366bbe7ac | YoshikuniJujo/test_haskell | Natural.hs | # , LambdaCase #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module MergeSort.Natural (naturalSort) where
import Control.Monad
import Control.Monad.ST
import Data.Foldable
import Data.Array.ST
import Data.Array.Tools
import Data.Bool
naturalSort :: Ord a => [a] -> [a]
naturalSort ks = take n
$ runST $ (>>) <$> nsort... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/ea07fb43c449e34e5500bb6a4653453b7e663e2c/tribial/mastodon/quicksort/src/MergeSort/Natural.hs | haskell | # , LambdaCase #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module MergeSort.Natural (naturalSort) where
import Control.Monad
import Control.Monad.ST
import Data.Foldable
import Data.Array.ST
import Data.Array.Tools
import Data.Bool
naturalSort :: Ord a => [a] -> [a]
naturalSort ks = take n
$ runST $ (>>) <$> nsort... | |
91d8a545e22f32a3ee817500fc4c90fcefb9b704b6f6d58385f8f7aad567744b | lisp-korea/sicp | ex-3-4-okie.scm | (define balance 100)
(define (withdraw amount)
(if (>= balance amount)
(begin (set! balance (- balance amount))
balance)
"Insufficient funds"))
ex 3.38
(define balance 100)
;; sequential
(define (serial-withdraw)
(define (peter)
(set! balance (+ balance 10)))
(define (paul)
... | null | https://raw.githubusercontent.com/lisp-korea/sicp/4cdc1b1d858c6da7c9f4ec925ff4a724f36041cc/ch03/3.4/ex-3-4-okie.scm | scheme | sequential
concurrent
PLT Scheme implementation
ex 3.40
times that P_1 accesses the value of `x' during
the evaluation of `(* x x)'.
continued on next page
serialized
not safe because deposit always follows withdraw
여러자원을 함께 쓰는 문제
refer to longfin's solution
ex 3.45
not works in inter-account
줄 ... | (define balance 100)
(define (withdraw amount)
(if (>= balance amount)
(begin (set! balance (- balance amount))
balance)
"Insufficient funds"))
ex 3.38
(define balance 100)
(define (serial-withdraw)
(define (peter)
(set! balance (+ balance 10)))
(define (paul)
(set! bala... |
4cfbc856b690e6ab6a4e3760a56ae3f7a407ec7e9030500d5f6a5c6eb827e1aa | zcaudate/hara | bulk_test.clj | (ns hara.function.task.bulk-test
(:use hara.test)
(:require [hara.function.task.bulk :refer :all]))
^{:refer hara.function.task.bulk/bulk-items :added "3.0"}
(fact "processes each item given a input")
^{:refer hara.function.task.bulk/bulk-warnings :added "3.0"}
(fact "outputs warnings that have been processed")
... | null | https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/test/hara/function/task/bulk_test.clj | clojure | (ns hara.function.task.bulk-test
(:use hara.test)
(:require [hara.function.task.bulk :refer :all]))
^{:refer hara.function.task.bulk/bulk-items :added "3.0"}
(fact "processes each item given a input")
^{:refer hara.function.task.bulk/bulk-warnings :added "3.0"}
(fact "outputs warnings that have been processed")
... | |
3a4c02ab3b25ec5616866c5267aef12d9858138068e18f9d41e5be108240e61a | lilactown/lilac.town | react.cljs | (ns lilactown.workspace.react
(:require [nubank.workspaces.core :as ws]
[nubank.workspaces.card-types.react :as ct.react]
[react :as react]
[lilactown.react :as r]
[lilactown.react.dom :as dom]
[lilactown.cursor :as cursor]))
(defn on-change! [ref ev]
(le... | null | https://raw.githubusercontent.com/lilactown/lilac.town/295669e4511e79877da14232457dea26f098acd8/src/lilactown/workspace/react.cljs | clojure | Example of a redux-like pattern | (ns lilactown.workspace.react
(:require [nubank.workspaces.core :as ws]
[nubank.workspaces.card-types.react :as ct.react]
[react :as react]
[lilactown.react :as r]
[lilactown.react.dom :as dom]
[lilactown.cursor :as cursor]))
(defn on-change! [ref ev]
(le... |
5b7591840893e46c804eae975d1ad774c48e171fb06fbbb6b3054790ee9ed35b | AlexKnauth/music | harmony-element.rkt | #lang agile
(require racket/bool
(submod txexpr safe)
(prefix-in data/
(combine-in
music/data/note/note
music/data/score/score
music/data/chord/chord-symbol)))
;; ------------------------------------------------------------------------
(provide harmony... | null | https://raw.githubusercontent.com/AlexKnauth/music/b4489c27d7c0f7116d769344c787fa76b479e5fa/music/notation/musicxml/harmony-element.rkt | racket | ------------------------------------------------------------------------
harmony-root->musicxml : Note -> MXexpr
------------------------------------------------------------------------ | #lang agile
(require racket/bool
(submod txexpr safe)
(prefix-in data/
(combine-in
music/data/note/note
music/data/score/score
music/data/chord/chord-symbol)))
(provide harmony-element->musicxml)
harmony - element->musicxml : HarmonyElement - > MXex... |
ff23143a0d13a7cb7567c54f9c1cb2ad5bd3ca4090a26b7a9e544fc3383a011c | ygmpkk/house | Select.hs |
Select.hs ( adapted from select.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2003 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
This is an illustration of the selection mode and name stack , which detects
... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/GLUT/examples/RedBook/Select.hs | haskell | away from the origin.
draw a rectangular box with these outer x, y, and z values
resolve overloading, not needed in "real" programs
volume.
resolve overloading, not needed in "real" programs
green triangle
red triangle
yellow triangles
that if either or both triangles intersects the viewing/clipping volume, |
Select.hs ( adapted from select.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2003 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
This is an illustration of the selection mode and name stack , which detects
... |
591a2219498958c26a2ca9e1a21558f5206024f22239ffad34d7daf1bad6f6d6 | heshrobe/joshua-dist | ptype-defs.lisp | -*- Mode : LISP ; Base : 10 ; Syntax : Common - lisp ; Package : -*-
(in-package :joshua-internals)
;;; Note the serious dwiming of rules that are in multiple packages
(clim:define-presentation-type forward-rule ()
:history t
:description "a forward rule")
(clim:define-presentation-type backward-rule ()
:... | null | https://raw.githubusercontent.com/heshrobe/joshua-dist/f59f06303f9fabef3e945a920cf9a26d9c2fd55e/joshua/developer/ptype-defs.lisp | lisp | Base : 10 ; Syntax : Common - lisp ; Package : -*-
Note the serious dwiming of rules that are in multiple packages
This is here for compilation dependency reasons
I wish there was a more efficient way to do this - perhaps define-predicate
should maintain a table of predicates. |
(in-package :joshua-internals)
(clim:define-presentation-type forward-rule ()
:history t
:description "a forward rule")
(clim:define-presentation-type backward-rule ()
:history t
:description "a backward rule")
(clim:define-presentation-type rule ()
:history t
:description "a Joshua rule")
(clim:defi... |
c9cb257b97d7852db49815c72845d2ca1d9beb8f9ca4a7e6277e2688fb775a7b | ucsd-progsys/dsolve | measures.ml | let h (x: int option) =
match x with
Some u -> 1
| None -> 0
let x = Some 1
let y = None
let c = (fun x -> x) (h x)
let x' = (fun x -> x) h x
let y' = (fun x -> x) (h y)
let z = assert (h x = 1)
| null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/measures.ml | ocaml | let h (x: int option) =
match x with
Some u -> 1
| None -> 0
let x = Some 1
let y = None
let c = (fun x -> x) (h x)
let x' = (fun x -> x) h x
let y' = (fun x -> x) (h y)
let z = assert (h x = 1)
| |
02f5a970095d4efeee736100e5ac5c64030453443c49857736d7875f71064c56 | fetburner/compelib | coordComp.mli | (* 座標圧縮 *)
module F
(* 座標の型 *)
(Coord : sig
type t
val compare : t -> t -> int
end) :
sig
val compress :
(* 座標のリスト *)
Coord.t list ->
(* 座標の数,圧縮する関数と解凍する関数を返す *)
int * (Coord.t -> int) * (int -> Coord.t)
end
| null | https://raw.githubusercontent.com/fetburner/compelib/d8fc5d9acd04e676c4d4d2ca9c6a7140f1b85670/lib/coordComp.mli | ocaml | 座標圧縮
座標の型
座標のリスト
座標の数,圧縮する関数と解凍する関数を返す | module F
(Coord : sig
type t
val compare : t -> t -> int
end) :
sig
val compress :
Coord.t list ->
int * (Coord.t -> int) * (int -> Coord.t)
end
|
5a2af7aed98c72a079ae22932042aa4ed3baaebfc248c7bfd522134eb7054799 | dpiponi/Stellarator | Events.hs | module Events where
import
import SDL.Input . Keyboard
import Keys hiding (debugMode)
import Atari2600
import SDL.Vect
import Emulation
import qualified SDL
import Control.Monad.Reader
import Control.Lens
import Asm
import Data.Bits
import Data.Bits.Lens
import System.Exit
import Metrics
import Data.Array.Sto... | null | https://raw.githubusercontent.com/dpiponi/Stellarator/77f86a6d3e513e5662d9dab625c19a1202a24776/src/Events.hs | haskell | I don't know!
Handle events later XXX
Handle events later XXX
XXX probably get ride of case
-trying-to-figure-out-keyboard-controllers-inpt/
Rewrite as a withXXX XXX
t <- liftIO $ forkIO $ let spin = SDL.pollEvents >> spin in spin | module Events where
import
import SDL.Input . Keyboard
import Keys hiding (debugMode)
import Atari2600
import SDL.Vect
import Emulation
import qualified SDL
import Control.Monad.Reader
import Control.Lens
import Asm
import Data.Bits
import Data.Bits.Lens
import System.Exit
import Metrics
import Data.Array.Sto... |
730a33a679388054812a9731af6e0975a15bb30c6a7f39ad67822530fd2648e4 | rlepigre/pml | ptr.ml | module A = Assoc
* Part of the code for the pool ( equiv.ml ) that is needed in Ast module .
We need it in ast because we retain pointer in the pool in the ast to
avoid going back and forth between and representation .
We need it in ast because we retain pointer in the pool in the ast to
avoid go... | null | https://raw.githubusercontent.com/rlepigre/pml/cdfdea0eecc6767b16edc6a7bef917bc9dd746ed/src/kernel/ptr.ml | ocaml | * This data type is the key for the parent data structure. For instance,
the key [KT_Appl `Left] for a node [n] indexes all the parents that uses
[n] as a left son of an application.
None for the main value
* Here are the main type definitions
* record for values
* uid
* link in the union find structure
... | module A = Assoc
* Part of the code for the pool ( equiv.ml ) that is needed in Ast module .
We need it in ast because we retain pointer in the pool in the ast to
avoid going back and forth between and representation .
We need it in ast because we retain pointer in the pool in the ast to
avoid go... |
7c4aeb08ac635d99b9a7f90b904e7cb9832680c7d453a5020157bab4f7b4e6bc | melange-re/melange | hashtbl_test.ml | open Hashtbl
let to_list tbl = fold (fun k v acc -> (k,v)::acc) tbl []
let f () =
let tbl = Hashtbl.create 17 in
add tbl 1 '1';
add tbl 2 '2';
List.sort (fun ((a : int),_) (b,_) -> compare a b ) @@ to_list tbl
let g count =
let tbl = Hashtbl.create 17 in
for i = 0 to count do
replace tbl (... | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/hashtbl_test.ml | ocaml | open Hashtbl
let to_list tbl = fold (fun k v acc -> (k,v)::acc) tbl []
let f () =
let tbl = Hashtbl.create 17 in
add tbl 1 '1';
add tbl 2 '2';
List.sort (fun ((a : int),_) (b,_) -> compare a b ) @@ to_list tbl
let g count =
let tbl = Hashtbl.create 17 in
for i = 0 to count do
replace tbl (... | |
85811feb4141277bf4a3f488e7ddebfbb564b1e6302cf533da9a50f40eb80d8a | atgreen/lisp-openshift | md5.lisp | ;;;; This file implements The MD5 Message-Digest Algorithm, as defined in
RFC 1321 by , published April 1992 .
;;;;
It was written by , with copious input from the
cmucl - help mailing - list hosted at cons.org , in November 2001 and
;;;; has been placed into the public domain.
;;;;
$ I d : md5.lisp , v 1.... | null | https://raw.githubusercontent.com/atgreen/lisp-openshift/40235286bd3c6a61cab9f5af883d9ed9befba849/quicklisp/dists/quicklisp/software/ironclad_0.30/src/digests/md5.lisp | lisp | This file implements The MD5 Message-Digest Algorithm, as defined in
has been placed into the public domain.
While the implementation should work on all conforming Common
where it achieved comparable performance to the standard md5sum
hardware).
Since the implementation makes heavy use of arithmetic on
The ... | RFC 1321 by , published April 1992 .
It was written by , with copious input from the
cmucl - help mailing - list hosted at cons.org , in November 2001 and
$ I d : md5.lisp , v 1.3 2003/09/16 12:07:39 crhodes Exp $
Lisp implementations , it has only been optimized for CMU CL ,
utility ( within a factor ... |
b7d2b7535bf8f5af98683a046689ee2e2b40a2ee89fb8d22c305086401edb368 | dwayne/eopl3 | interpreter.test.rkt | #lang racket
(require "./interpreter.rkt")
(require rackunit)
(check-equal?
(run "5")
(num-val 5))
(check-equal?
(run "x")
(num-val 10))
(check-equal?
(run "zero?(i)")
(bool-val #f))
(check-equal?
(run "zero?(-(i, 1))")
(bool-val #t))
(check-equal?
(run "-(55, -(x, 11))")
(num-val 56))
(check-equal?
... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/04-ch4/interpreters/racket/CALL-BY-REFERENCE/interpreter.test.rkt | racket |
(odd 888) end
CALL-BY-REFERENCE tests
a end
z end
| #lang racket
(require "./interpreter.rkt")
(require rackunit)
(check-equal?
(run "5")
(num-val 5))
(check-equal?
(run "x")
(num-val 10))
(check-equal?
(run "zero?(i)")
(bool-val #f))
(check-equal?
(run "zero?(-(i, 1))")
(bool-val #t))
(check-equal?
(run "-(55, -(x, 11))")
(num-val 56))
(check-equal?
... |
c872f2f0ed4e91f68ccd82cffccab4509e8b3928b816df0828ae265724cca70b | ocsigen/eliom | eliom_wrap.server.mli | Ocsigen
* Copyright ( C ) 2011
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your option... | null | https://raw.githubusercontent.com/ocsigen/eliom/c3e0eea5bef02e0af3942b6d27585add95d01d6c/src/lib/eliom_wrap.server.mli | ocaml | * ['a wrapper] is the type of values to include into a value of type 'a for
it to be wrapped specifically
* [create f] create a new tag that can be included into a value. if
[wrap] is called on a father of a value [v] containing a tag, the
value [v] will be replaced by [f v] before marshaling.
* marshal a... | Ocsigen
* Copyright ( C ) 2011
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your option... |
9b6ec73738c8e243259b30b40a802bac095457d8da3d8bf9d556c01e2edb36ad | phadej/cabal-fmt | Golden.hs | module Main (main) where
import System.FilePath ((-<.>), (</>))
import System.IO (hClose, hFlush)
import System.IO.Temp (withSystemTempFile)
import System.Process (readProcessWithExitCode)
import Test.Tasty (TestTree, defaultMain, testGroup)
import Te... | null | https://raw.githubusercontent.com/phadej/cabal-fmt/38dfdf03051dc85fffe5f741b5cc47a1a30f3925/tests/Golden.hs | haskell | idempotent | module Main (main) where
import System.FilePath ((-<.>), (</>))
import System.IO (hClose, hFlush)
import System.IO.Temp (withSystemTempFile)
import System.Process (readProcessWithExitCode)
import Test.Tasty (TestTree, defaultMain, testGroup)
import Te... |
99b80f8aef01f47045b66f864b0be975ba03490126e26141249c7050618d7ca9 | TyOverby/five | five_sys.mli | include module type of Bindings
val conv : Five_expr.t -> Bindings.Tree.t
| null | https://raw.githubusercontent.com/TyOverby/five/0922cd23e15859541dffc4f820a4e6286a52819b/five_sys/five_sys.mli | ocaml | include module type of Bindings
val conv : Five_expr.t -> Bindings.Tree.t
| |
f3641ec6b68382210f35b091135fefde1b1668bd84ac07dbf9081808c44da5ac | binsec/haunted | relse.mli | (** TODO: description *)
module State : sig
* type t
*
* val create : path : Relse_path . Path_state.t - >
* insecurity : Relse_insecurity . Insecurity_state.t - > t
*
* val path : t - > Relse_path . Path_state.t
* val insecurity : t - > Relse_insecurity . Insecurity_... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/relse/relse.mli | ocaml | * TODO: description |
module State : sig
* type t
*
* val create : path : Relse_path . Path_state.t - >
* insecurity : Relse_insecurity . Insecurity_state.t - > t
*
* val path : t - > Relse_path . Path_state.t
* val insecurity : t - > Relse_insecurity . Insecurity_state.t
* val symbo... |
ab3455fb721da7fb791e4e3254245d8b3e8082648be8a847040dce91ecdb024d | mfoemmel/erlang-otp | orddict.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/stdlib/src/orddict.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(orddict).
-export([new/0,is_key/2... |
dd80ff9262723e25ac293bdaeef8dd8200051401890c2fcbc5f6a4f5f0b96b19 | ubf/ubf-thrift | thrift_plugin_tests.erl | -module(thrift_plugin_tests).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
-include_lib("ubf/include/ubf.hrl").
-define(APPLICATION, thrift_plugin).
-define(TBF_PORT, server_port(test_tbf_tcp_port)).
-define(FTBF_PORT, server_port(test_ftbf_tcp_port)).
-define(SLEEP, 50).
-record(args, {host, port... | null | https://raw.githubusercontent.com/ubf/ubf-thrift/d23182cc1130c2248b11d7cad310c38da2e8c3d3/test/eunit/thrift_plugin_tests.erl | erlang | ----------------------------------------------------------------------
TESTS
----------------------------------------------------------------------
----------------------------------------------------------------------
API
----------------------------------------------------------------------
------------------------... | -module(thrift_plugin_tests).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
-include_lib("ubf/include/ubf.hrl").
-define(APPLICATION, thrift_plugin).
-define(TBF_PORT, server_port(test_tbf_tcp_port)).
-define(FTBF_PORT, server_port(test_ftbf_tcp_port)).
-define(SLEEP, 50).
-record(args, {host, port... |
014035e8571d7208f8b378cc8244b4413a74b672c3d6a2816ece20c27cc03bf2 | PacktWorkshops/The-Clojure-Workshop | repl.clj | 2
(= 1 1)
(= 1 2)
3
(= 1 1 1)
(= 1 1 1 -1)
4
(= nil nil)
(= false nil)
(= "hello" "hello" (clojure.string/reverse "olleh"))
(= [1 2 3] [1 2 3])
(= '(1 2 3) [1 2 3])
(= 1)
(= "I will not reason and compare: my business is to create.")
5
(< 1 2)
(< 1 10 100 1000)
(< 1 10 10 100)
(< 3 2 3)
(< -1 0 1)
6
(<= 1... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/8f1f2882c47551520e1e12c0aa87180d643b9103/Chapter01/Exercise1.07/repl.clj | clojure |
console.log("Valid");
} else {
console.log("Invalid");
}
| 2
(= 1 1)
(= 1 2)
3
(= 1 1 1)
(= 1 1 1 -1)
4
(= nil nil)
(= false nil)
(= "hello" "hello" (clojure.string/reverse "olleh"))
(= [1 2 3] [1 2 3])
(= '(1 2 3) [1 2 3])
(= 1)
(= "I will not reason and compare: my business is to create.")
5
(< 1 2)
(< 1 10 100 1000)
(< 1 10 10 100)
(< 3 2 3)
(< -1 0 1)
6
(<= 1... |
93e4659044e1b0a2e49a2fdf30d39af1e0e928b4026c6ed64782b74e82176c41 | coq/coq | constr_matching.ml | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/8f1590f7840d0dff71fa9b7a7bbc1ed01d779359/pretyping/constr_matching.ml | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
64474467f861b90b64a32816b723dcf0c881aa2d3f60b9202e1cef88dfcf2aef | falgon/htcc | Tokenizer.hs | |
Module : Htcc . Tokenizer
Description : Tokenizer
Copyright : ( c ) roki , 2019
License : MIT
Maintainer :
Stability : experimental
Portability : POSIX
The tokenizer
Module : Htcc.Tokenizer
Description : Tokenizer
Copyright : (c) roki, 2019
License : MIT
Maintainer :... | null | https://raw.githubusercontent.com/falgon/htcc/3cef6fc362b00d4bc0ae261cba567bfd9c69b3c5/src/Htcc/Tokenizer.hs | haskell | Otherwise, @[TokenIdx i]@ is returned. | |
Module : Htcc . Tokenizer
Description : Tokenizer
Copyright : ( c ) roki , 2019
License : MIT
Maintainer :
Stability : experimental
Portability : POSIX
The tokenizer
Module : Htcc.Tokenizer
Description : Tokenizer
Copyright : (c) roki, 2019
License : MIT
Maintainer :... |
ea3894e845ed9ad5725ccad74d2810fd23b842bcc83ae75eb4af9a0d1f0417a4 | jbracker/supermonad | CodeGenerator.hs | # LANGUAGE RebindableSyntax #
{-# OPTIONS_GHC -fplugin Control.Supermonad.Plugin #-}
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* H M T C ... | null | https://raw.githubusercontent.com/jbracker/supermonad/2595396a225a65b1dce6ed9a1ce59960f392a55b/examples/monad/hmtc/supermonad/CodeGenerator.hs | haskell | # OPTIONS_GHC -fplugin Control.Supermonad.Plugin #
| TAM Code Generator.
:: MTIR -> D [TAMInst]
Standard library imports
----------------------------------------------------------------------------
Code generator environment
----------------------------------------------------------------------------
Maps internal... | # LANGUAGE RebindableSyntax #
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* H M T C *
* ... |
503868beb40b1d615e62b28f0d70ffa31a76c2ee1d4b34f4d89565b5a6d8431d | antoniogarrote/jobim | benchmarking.clj | (ns jobim.examples.benchmarking
(:use [jobim]
[jobim.utils]))
(defn avg
([c]
(/ (apply + c) (count c))))
(defmacro with-time
[expr]
`(let [start# (. System (nanoTime))
ret# ~expr]
(/ (double (- (. System (nanoTime)) start#)) 1000000.0)))
;; base time
(defn fib
([x] (if (< x 2)
... | null | https://raw.githubusercontent.com/antoniogarrote/jobim/f041331d2c02cf38741e8604263bd08a3a1f11a5/jobim-core/src/jobim/examples/benchmarking.clj | clojure | base time
Spawn test
Send test
ring
(println (str (self) ") LINKING TO " x))
(println (str (self) ") EXITING!"))
(println (str (self) ") SENDING 0 to " next)) | (ns jobim.examples.benchmarking
(:use [jobim]
[jobim.utils]))
(defn avg
([c]
(/ (apply + c) (count c))))
(defmacro with-time
[expr]
`(let [start# (. System (nanoTime))
ret# ~expr]
(/ (double (- (. System (nanoTime)) start#)) 1000000.0)))
(defn fib
([x] (if (< x 2)
x
... |
00aa05061878f29e87c28ba0d8f03eb6b788eaa3fffebc37df9a04f9cdc7a930 | logseq/logseq | user.cljs | (ns frontend.handler.user
"Provides user related handler fns like login and logout"
(:require-macros [frontend.handler.user])
(:require [frontend.config :as config]
[frontend.handler.config :as config-handler]
[frontend.state :as state]
[frontend.debug :as debug]
[c... | null | https://raw.githubusercontent.com/logseq/logseq/9d2055f8b94018c9d3e55b7ca43b8a00e6ee448b/src/main/frontend/handler/user.cljs | clojure | userinfo, token, login/logout, ...
invalid refresh-token
we shouldn't clear tokens if they aren't expired yet
the `refresh-tokens-loop` will retry soon
do nothing
ok
refresh remote graph list by pub login event
user groups | (ns frontend.handler.user
"Provides user related handler fns like login and logout"
(:require-macros [frontend.handler.user])
(:require [frontend.config :as config]
[frontend.handler.config :as config-handler]
[frontend.state :as state]
[frontend.debug :as debug]
[c... |
b041bf63ed1ff0143f0aed4d39e50a3db9834d11ac062f05c4eb9ae79ce5af34 | brendanhay/gogol | Wait.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-translate/gen/Gogol/Translate/Projects/Locations/Operations/Wait.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
* Resource
** Constructing a Request
| A resource alias for @translate.projects.locations.operations.wait@ method which the
'TranslateProjectsLocationsOperationsWait' request conforms to.
/See:/ 'newTranslateProjectsLocation... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
4c04de2da6d33e97efd5cabd8ec43a340717ddc589e992abc522e0909bc29ce1 | alanz/ghc-exactprint | CustomTypeErrors03.hs | # LANGUAGE DataKinds #
module T3 where
import GHC.TypeLits
f :: TypeError (Text "This is a type error")
f = undefined
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/CustomTypeErrors03.hs | haskell | # LANGUAGE DataKinds #
module T3 where
import GHC.TypeLits
f :: TypeError (Text "This is a type error")
f = undefined
| |
0bac8ad7fbcd947324b48643a783a8dcf4a063b0333173e917bf8c17ed782d69 | kronkltd/jiksnu | oauth_actions.clj | (ns jiksnu.modules.core.actions.oauth-actions
(:require [crypto.random :as random]))
(defn request-token
[request]
(random/base32 20))
(defn authorize
[_]
true)
(defn access-token
[]
true)
| null | https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/src/jiksnu/modules/core/actions/oauth_actions.clj | clojure | (ns jiksnu.modules.core.actions.oauth-actions
(:require [crypto.random :as random]))
(defn request-token
[request]
(random/base32 20))
(defn authorize
[_]
true)
(defn access-token
[]
true)
| |
80444ccf498ad2d836e8fbb8fe07c34d799ba9ca76b370369bc0c829e42264a8 | ekmett/monoids | Self.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , GeneralizedNewtypeDeriving #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Monoid.Self
Copyright : ( c ) 2009
-- License : BSD-style
-- Maintainer :
-- Stability : experimental
-- Port... | null | https://raw.githubusercontent.com/ekmett/monoids/711963df750ba3417f464fbc0c6c726f3a0c9c8c/Data/Monoid/Self.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Monoid.Self
License : BSD-style
Maintainer :
Stability : experimental
Portability : portable
This is useful when you have a generator that already contains monoidal values or someone supplies
the map... | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , GeneralizedNewtypeDeriving #
Copyright : ( c ) 2009
A simple ' Monoid ' transformer that takes a ' Monoid ' m and produces a new @m@-Reducer named ' Self ' @m@
into the ' fold ' and ' foldMap ' combinators in " Data . Monoid . Combinators " respective... |
12d6dccf9f5b9ac7981aeaedb6ece3ed4718a8a8e813fc8fbeb04c0e06d50602 | DanielG/ghc-mod | CradleSpec.hs | module CradleSpec where
import Control.Applicative
import Data.List (isSuffixOf)
import GhcMod.Cradle
import GhcMod.Types
import System.Directory (canonicalizePath)
import System.FilePath (pathSeparator)
import Test.Hspec
import TestUtils
import Prelude
import Dir
clean_ :: IO Cradle -> IO Cradle
clean_ f = do
crd... | null | https://raw.githubusercontent.com/DanielG/ghc-mod/391e187a5dfef4421aab2508fa6ff7875cc8259d/test/CradleSpec.hs | haskell | module CradleSpec where
import Control.Applicative
import Data.List (isSuffixOf)
import GhcMod.Cradle
import GhcMod.Types
import System.Directory (canonicalizePath)
import System.FilePath (pathSeparator)
import Test.Hspec
import TestUtils
import Prelude
import Dir
clean_ :: IO Cradle -> IO Cradle
clean_ f = do
crd... | |
2f3abb073489eceeed9c50bf6f92f841b2ab2481ef41b0afc41f58d52eef9618 | ahf/ircd-scylla | client.ml |
* Copyright ( c ) 2015 . All rights reserved .
* Use of this source code is governed by a BSD - style
* license that can be found in the LICENSE file .
* Copyright (c) 2015 Alexander Færøy. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICE... | null | https://raw.githubusercontent.com/ahf/ircd-scylla/d06bfa61cd75a44c4f5493f316fba23143c32a78/client.ml | ocaml |
* Copyright ( c ) 2015 . All rights reserved .
* Use of this source code is governed by a BSD - style
* license that can be found in the LICENSE file .
* Copyright (c) 2015 Alexander Færøy. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICE... | |
df03f75fcc998bd85b82420e7c1c5d23c746d51c0ec6faf3432538ddfd905201 | FranklinChen/hugs98-plus-Sep2006 | Surface.hs |
Surface.hs ( adapted from surface.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2005 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
This program draws a NURBS surface in the shape of a symmetrical hill... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/GLUT/examples/RedBook/Surface.hs | haskell | The control points of the surface form a small hill and
------------------------------------------------------------------------------ |
Surface.hs ( adapted from surface.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2005 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
This program draws a NURBS surface in the shape of a symmetrical hill... |
01dfd721b73f006b20c0a60d3725bd3e00a463f387644a71e780f886397f386b | martijnbastiaan/doctest-parallel | Property.hs | # LANGUAGE CPP #
# LANGUAGE PatternGuards #
module Test.DocTest.Internal.Property where
import Data.List
import Data.Maybe
import Data.Foldable
import Test.DocTest.Internal.Util
import Test.DocTest.Internal.Interpreter (Interpreter)
import qualified Test.DocTest.Inte... | null | https://raw.githubusercontent.com/martijnbastiaan/doctest-parallel/f70d6a1c946cc0ada88571b90a39a7cd4d065452/src/Test/DocTest/Internal/Property.hs | haskell | | The result of evaluating an interaction.
| Find all free variables in given term.
GHCi is used to detect free variables.
message.
| Extract variable name from a "Not in scope"-error.
| Remove quotes from given name, if any. | # LANGUAGE CPP #
# LANGUAGE PatternGuards #
module Test.DocTest.Internal.Property where
import Data.List
import Data.Maybe
import Data.Foldable
import Test.DocTest.Internal.Util
import Test.DocTest.Internal.Interpreter (Interpreter)
import qualified Test.DocTest.Inte... |
1f7cdb5552ade90c7946f73183d532fea6c632f80e31b2ef9990ee82de21ba75 | ekmett/prelude-extras | Extras.hs | # LANGUAGE CPP #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE StandaloneDeriving #
# LANGUAGE GeneralizedNewtypeDeriving #
#if __GLASGOW_HASKELL__ > 702
#define DEFAULT_SIGNATURES
# LANGUAGE DefaultSignatures #
#endif
#if __GLASGOW_HASKELL__ >= 701
GHC.Conc is n't generally safe , but we 're just using TVar
# LANGUA... | null | https://raw.githubusercontent.com/ekmett/prelude-extras/f12d274b04fd5c979b2a826e4cabb3bddfbca93d/src/Prelude/Extras.hs | haskell | # LANGUAGE DeriveTraversable #
* Lifted Prelude classes for kind * -> *
* Lifted Prelude classes for kind * -> * -> *
instance Ord1 Complex where compare1 = compare
annoying to have to copy these from Text.Read
using the usual square-bracket syntax.
here. | # LANGUAGE CPP #
# LANGUAGE StandaloneDeriving #
# LANGUAGE GeneralizedNewtypeDeriving #
#if __GLASGOW_HASKELL__ > 702
#define DEFAULT_SIGNATURES
# LANGUAGE DefaultSignatures #
#endif
#if __GLASGOW_HASKELL__ >= 701
GHC.Conc is n't generally safe , but we 're just using TVar
# LANGUAGE Trustworthy #
#endif
#ifndef MI... |
5b64a2a1290c7d6d8acb2a8a6e26f64621049f0641f60e6a06aa5ec85aa591f1 | Mbodin/murder-generator | inOut_js.ml | * Module InOut_js
An implementation of [ InOut . T ] for JavaScript .
An implementation of [InOut.T] for JavaScript. *)
open Murder_generator
open Libutils
open Js_of_ocaml
open Js_of_ocaml_lwt
let pause _ = Lwt_js.sleep 0.02
(** Whether the loading animation is currently running. *)
let loading = ref true
... | null | https://raw.githubusercontent.com/Mbodin/murder-generator/2024a924ffb4ee12d1b7119b699346b21e098892/js/inOut_js.ml | ocaml | * Whether the loading animation is currently running.
* Similar to [lock] and [unlock], but from a boolean.
* Return a list of CSS classes corresponding to the style of a button.
* Add the CSS classes to a node.
* Return the [response] div from the main webpage.
* Remove all the child of a node.
* Variant for the... | * Module InOut_js
An implementation of [ InOut . T ] for JavaScript .
An implementation of [InOut.T] for JavaScript. *)
open Murder_generator
open Libutils
open Js_of_ocaml
open Js_of_ocaml_lwt
let pause _ = Lwt_js.sleep 0.02
let loading = ref true
let loadingProgress = ref 0.2
let stopLoading _ =
if !lo... |
3267e1dcd6900f19f1c14aefbceda4ae09dab93e00171d8cfea9ea671086ffa6 | GaloisInc/daedalus | PP.hs | # Language OverloadedStrings , TypeApplications , DataKinds #
{-# Language ScopedTypeVariables #-}
# Language AllowAmbiguousTypes , KindSignatures #
{-# Language FlexibleInstances #-}
module PP where
import GHC.Records (HasField,getField)
import GHC.TypeLits(Symbol,symbolVal,KnownSymbol)
import Text.PrettyPrint hiding... | null | https://raw.githubusercontent.com/GaloisInc/daedalus/3f180d29441960e35386654ec79a2b205bddc157/formats/icc/src/PP.hs | haskell | # Language ScopedTypeVariables #
# Language FlexibleInstances #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
check additional c... | # Language OverloadedStrings , TypeApplications , DataKinds #
# Language AllowAmbiguousTypes , KindSignatures #
module PP where
import GHC.Records (HasField,getField)
import GHC.TypeLits(Symbol,symbolVal,KnownSymbol)
import Text.PrettyPrint hiding ((<>))
import Numeric (showHex)
import Data.Text(Text)
import qualified... |
01b86b02f7b5861e3adcf0dd5bc2cbd0ce90e4d02d1c6b4507ecb41cc671a083 | TheAlgorithms/Haskell | QuickSort.hs | module Sorts.QuickSort where
listToSort :: [Int]
listToSort = [13, 2, 3, 14, 17, 4, 1, 5, 16, 12, 9, 10, 15, 8, 7, 11, 18, 19, 6, 20]
quicksort :: (Ord a) => [a] -> [a]
quicksort [] = [] -- Empty list is empty.
Singleton list is always trivially sorted .
quicksort [x, y] = [(min x y), (max x y)]
quicksort (x:xs) =
... | null | https://raw.githubusercontent.com/TheAlgorithms/Haskell/9dcabef99fb8995a760ff25a9e0d659114c0b9d3/src/Sorts/QuickSort.hs | haskell | Empty list is empty.
x is the pivot, left quicksort returns smaller sorted and right quicksort bigger sorted | module Sorts.QuickSort where
listToSort :: [Int]
listToSort = [13, 2, 3, 14, 17, 4, 1, 5, 16, 12, 9, 10, 15, 8, 7, 11, 18, 19, 6, 20]
quicksort :: (Ord a) => [a] -> [a]
Singleton list is always trivially sorted .
quicksort [x, y] = [(min x y), (max x y)]
quicksort (x:xs) =
quicksort [a | a <- xs, a <= x] ++ [x] +... |
79cba98e99cf129e2986a61af41011ebbc495105dde34b09ffaa2b1c4d3b5a89 | alexandergunnarson/quantum | view.cljc | (ns quantum.ui.view)
#?(:cljs
(defn toggle-full-screen!
{:from "-US/docs/Web/API/Fullscreen_API"
:todo ["More elegant way to do this"]}
[]
(if (and (not (.-fullscreenElement js/document))
(not (.-mozFullScreenElement js/document))
(not (.-webkitFullscreenElement js/document))
... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/ui/view.cljc | clojure | (ns quantum.ui.view)
#?(:cljs
(defn toggle-full-screen!
{:from "-US/docs/Web/API/Fullscreen_API"
:todo ["More elegant way to do this"]}
[]
(if (and (not (.-fullscreenElement js/document))
(not (.-mozFullScreenElement js/document))
(not (.-webkitFullscreenElement js/document))
... | |
3816207010a6bbf0830b3a1b97ae34ae53ca59a6be88b410328550fddc835e9c | puppetlabs/puppetdb | masterless.clj | (ns puppetlabs.puppetdb.integration.masterless
(:require
[clojure.test :refer :all]
[puppetlabs.puppetdb.integration.fixtures :as int]))
(deftest ^:integration masterless-fact-storage
(with-open [pg (int/setup-postgres)
pdb (int/run-puppetdb pg {})]
(testing "Run puppet apply to populate th... | null | https://raw.githubusercontent.com/puppetlabs/puppetdb/b3d6d10555561657150fa70b6d1e609fba9c0eda/test/puppetlabs/puppetdb/integration/masterless.clj | clojure | (ns puppetlabs.puppetdb.integration.masterless
(:require
[clojure.test :refer :all]
[puppetlabs.puppetdb.integration.fixtures :as int]))
(deftest ^:integration masterless-fact-storage
(with-open [pg (int/setup-postgres)
pdb (int/run-puppetdb pg {})]
(testing "Run puppet apply to populate th... | |
3a6d3021bc9ca4210f20270e92e8fdddddd1b75f9fe19916a9b0d05d7f736f53 | sellout/YACC-is-dead | tests-package.lisp | (defpackage yacc-is-dead-tests
(:use #:cl #:yacc-is-dead #:lazy #:fiveam))
(in-package #:yacc-is-dead-tests)
(def-suite yacc-is-dead-tests)
| null | https://raw.githubusercontent.com/sellout/YACC-is-dead/9c5936b1740b3bb416774db4e31f538318a3f09e/tests-package.lisp | lisp | (defpackage yacc-is-dead-tests
(:use #:cl #:yacc-is-dead #:lazy #:fiveam))
(in-package #:yacc-is-dead-tests)
(def-suite yacc-is-dead-tests)
| |
7728c50b359e25ddf7d69d4f70b134192d55290eca59ef6e221a2cb3647a6b86 | spawnfest/eep49ers | x.erl | -module(x).
-export([f/0]).
f() ->
ok.
| null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/tools/test/cover_SUITE_data/compile_beam/x.erl | erlang | -module(x).
-export([f/0]).
f() ->
ok.
| |
3588531c4abeb311009204a027b660a3b3bda17cb7c5c0b5692139072f42cf93 | athensresearch/athens | user.cljs | #_{:clj-kondo/ignore [:unused-namespace
:unused-referred-var]}
(ns cljs.user
"Commonly used symbols for easy access in the ClojureScript REPL during
development."
(:require
[cljs.repl :refer (Error->map apropos dir doc error->str ex-str ex-triage
find-... | null | https://raw.githubusercontent.com/athensresearch/athens/35a6e086b017d38e30f0023330174baa0b8b784e/dev/cljs/user.cljs | clojure | #_{:clj-kondo/ignore [:unused-namespace
:unused-referred-var]}
(ns cljs.user
"Commonly used symbols for easy access in the ClojureScript REPL during
development."
(:require
[cljs.repl :refer (Error->map apropos dir doc error->str ex-str ex-triage
find-... | |
d425b61edf36e49081282140d84d5877ffba58a19a7380c895bea93fd3b37c51 | aitorres/rockstar-lexer | Main.hs | |
Module : Main
Description : Implementation of a lexical analysis tool for the
Rockstar programming language .
Copyright : ( c ) , 2018
License : MIT
Maintainer : andresitorresm+
Stability : stable
Implements a lexical analysis tool for the Rockstar programming
la... | null | https://raw.githubusercontent.com/aitorres/rockstar-lexer/14f2a3393b0d2e8565db9b8f514d839b7f2e077e/src/Main.hs | haskell | | The 'showArgumentError' function handles a missing argument error and quits.
| The 'showHelpText' function shows a help text and quits.
| The 'scanFile' function scans a file for tokens and prints them on screen,
then quits.
show the tokens in the file, and quits. | |
Module : Main
Description : Implementation of a lexical analysis tool for the
Rockstar programming language .
Copyright : ( c ) , 2018
License : MIT
Maintainer : andresitorresm+
Stability : stable
Implements a lexical analysis tool for the Rockstar programming
la... |
5e79c6045d0de5ac8203cabcb26c315ed042814836f89b02d5f42ae30388b962 | xclerc/ocamljava | javaAST.mli |
* This file is part of wrapper .
* Copyright ( C ) 2007 - 2015 .
*
* wrapper is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at yo... | null | https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/wrapper/src/javaAST.mli | ocaml |
* This file is part of wrapper .
* Copyright ( C ) 2007 - 2015 .
*
* wrapper is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at yo... | |
dfba4df931c68f1c948dcedcb8e1aea4ba5f2955899efd7f564fa120e9c0ae50 | ahrefs/atd | Atdts_main.ml |
Entry point to the atdts command .
Entry point to the atdts command.
*)
open Printf
open Cmdliner
type conf = {
input_files: string list;
version: bool;
}
let run conf =
if conf.version then (
print_endline Atdts.Version.version;
exit 0
)
else
conf.input_files
|> List.iter (fun at... | null | https://raw.githubusercontent.com/ahrefs/atd/cb7c522adfdcc70c53c998bd4e395678d8257b8c/atdts/src/bin/Atdts_main.ml | ocaml | *************************************************************************
Command-line processing
*************************************************************************
list must be empty for anonymous arguments
The structure of the help page.
standard 'DESCRIPTION' section
'ARGUMENTS' and 'OPTIONS' sect... |
Entry point to the atdts command .
Entry point to the atdts command.
*)
open Printf
open Cmdliner
type conf = {
input_files: string list;
version: bool;
}
let run conf =
if conf.version then (
print_endline Atdts.Version.version;
exit 0
)
else
conf.input_files
|> List.iter (fun at... |
9cc2528906ae6891537dc2b0379515ac04373385f9fa7be685c45ff5d3ffd578 | skrah/minicaml | test09.ml | Example from 's " Modern Compiler Implementation in ML " , translated
to .
to Caml. *)
(* This expression has type string but an expression was
expected of type int *)
let x = if (5 > 4) then 1023 else " "
| null | https://raw.githubusercontent.com/skrah/minicaml/e5f5cad7fdbcfc11561f717042fae73fa743823f/test/test09.ml | ocaml | This expression has type string but an expression was
expected of type int | Example from 's " Modern Compiler Implementation in ML " , translated
to .
to Caml. *)
let x = if (5 > 4) then 1023 else " "
|
b787e43ee67a84de0aced5dffe950ed7487b74d57465741b9d7cf6ddf8ae08ab | omnyway-labs/cljs-shadow-devcards-template | marked.cljs | ;; as per #issuecomment-707489078
(ns cljsjs.marked
(:require ["marked" :as marked]))
(js/goog.exportSymbol "marked" marked)
(js/goog.exportSymbol "DevcardsMarked" marked)
| null | https://raw.githubusercontent.com/omnyway-labs/cljs-shadow-devcards-template/fcb90966a48f39f57f8f2ca950d1be0a1eed5a7a/src/cljsjs/marked.cljs | clojure | as per #issuecomment-707489078 | (ns cljsjs.marked
(:require ["marked" :as marked]))
(js/goog.exportSymbol "marked" marked)
(js/goog.exportSymbol "DevcardsMarked" marked)
|
ca574efcde7af42890069b4928756a970c186c8282d2c5a35373cde30025feec | catharinejm/wombat-j | compiler_defclass.clj | (in-ns 'wombat.compiler)
(defn sanitize-jvm
[env [insn & args :as form]]
(if (keyword? insn)
(list* insn (map (partial sanitize env) args))
form))
(defn assert-arity!
[form arity]
(when-not (= (count form) (inc arity))
(throw (IllegalArgumentException. (str (first form) " directive takes exactly "... | null | https://raw.githubusercontent.com/catharinejm/wombat-j/2620ace42a8866c79465068427e9ae8c39c89c7b/src/clj/wombat/compiler_defclass.clj | clojure | (debug "Compiling: " defclass)
(when (or (namespace cname)
(.contains (name cname) "."))
(let [cw (ClassWriter. ClassWriter/COMPUTE_FRAMES)
dotname (.replace fqname "/" ".")
parsed-fields (parse-fields fields) | (in-ns 'wombat.compiler)
(defn sanitize-jvm
[env [insn & args :as form]]
(if (keyword? insn)
(list* insn (map (partial sanitize env) args))
form))
(defn assert-arity!
[form arity]
(when-not (= (count form) (inc arity))
(throw (IllegalArgumentException. (str (first form) " directive takes exactly "... |
867fd226cdcf3ebb7b30435c9404a8fa448ad86dc18bc3ad3f17c7c463856412 | yuriy-chumak/ol | tuples.scm | ; tuples. DEPRECATED.
(define-library (scheme tuples)
(export
tuple
tuple?
tuple-case
)
(import
(scheme core))
(begin
(define-syntax tuple
(syntax-rules ()
((tuple a . bs) ;; there are no such things as 0-tuples
(vm:new type-vector a . bs... | null | https://raw.githubusercontent.com/yuriy-chumak/ol/0a38b3f9dbb720aa3fbc3e8219429ebe240c86bf/samples/deprecated/tuples.scm | scheme | tuples. DEPRECATED.
there are no such things as 0-tuples
replace this with typed destructuring compare later on
an else case needing the tuple
a normal else clause
throw an error if nothing matches
get type and start walking | (define-library (scheme tuples)
(export
tuple
tuple?
tuple-case
)
(import
(scheme core))
(begin
(define-syntax tuple
(syntax-rules ()
(vm:new type-vector a . bs))))
(define-syntax tuple-case
(syntax-rules (else _ is eq? div)
... |
1a57d3cdb4f368dd9ecd31c69574648a2273ab701d54139f16ff6c95a968bb0d | thi-ng/geom | quad.cljc | (ns thi.ng.geom.quad
(:require
[thi.ng.geom.core :as g]
[thi.ng.geom.utils :as gu]
[thi.ng.geom.vector :as v :refer [vec2 vec3]]
[thi.ng.geom.attribs :as attr]
[thi.ng.geom.basicmesh :as bm]
[thi.ng.geom.line :as l]
[thi.ng.geom.triangle :as t]
#?(:clj [thi.ng.geom.types] :cljs [thi.ng.geom.ty... | null | https://raw.githubusercontent.com/thi-ng/geom/85783a1f87670c5821473298fa0b491bd40c3028/src/thi/ng/geom/quad.cljc | clojure | The following functions can be used to inset the edges of a convex
quad.
Extruding a quad along an axis vector results in a 3D quad mesh.
The `extrude` function supports the following options, given as
parameter map:
| Key | Description | Default |
|-----------+-------------... | (ns thi.ng.geom.quad
(:require
[thi.ng.geom.core :as g]
[thi.ng.geom.utils :as gu]
[thi.ng.geom.vector :as v :refer [vec2 vec3]]
[thi.ng.geom.attribs :as attr]
[thi.ng.geom.basicmesh :as bm]
[thi.ng.geom.line :as l]
[thi.ng.geom.triangle :as t]
#?(:clj [thi.ng.geom.types] :cljs [thi.ng.geom.ty... |
895b888560636667fc60888122a345f34b79fdef566c753fc90eddf424031965 | jrh13/hol-light | ntrie.ml | (* ========================================================================= *)
(* Computing with finite sets of numerals. *)
(* *)
( c ) Copyright , , , 2009 .
Distribute... | null | https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/Ntrie/ntrie.ml | ocaml | =========================================================================
Computing with finite sets of numerals.
This file provi... | ( c ) Copyright , , , 2009 .
Distributed with HOL Light under same license terms
# NTRIE_REDUCE_CONV ` % % ( 10 1001 3 ) INTER % % ( 3 7 10 ) UNION % % ( 3 100 ) ` ; ;
|- % % ( 3 10 1001 ) INTER % % ( 3 7 10 ) UNION % % ( 3 100 ) = % % ( 3 10 100 ) ... |
f638a8ba0a40701819ba976ab43be47387e34e100b8d3376b79af1f02848e558 | LuxLang/lux | lux.clj | This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 .
If a copy of the MPL was not distributed with this file , You can obtain one at /.
(ns lux
(:gen-class)
(:require [lux.base :as & :refer [|let |do return return* |case]]
[lux.compiler :as &compiler]
[... | null | https://raw.githubusercontent.com/LuxLang/lux/91bc060bc498a0d2418198cfcb9dc39636d1d867/lux-bootstrapper/src/lux.clj | clojure | This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 .
If a copy of the MPL was not distributed with this file , You can obtain one at /.
(ns lux
(:gen-class)
(:require [lux.base :as & :refer [|let |do return return* |case]]
[lux.compiler :as &compiler]
[... | |
4b313078c952dbd27d00379d41551ef24a9fdb0d3bbf9ca0acc2029c768bd1cf | mangpo/greenthumb | test-liveness.rkt | #lang racket
(require "../controller.rkt" "../inst.rkt"
"interpret.rkt" "state.rkt" "print.rkt")
(define a
(program
(list
(label "cadd"
(list
(block
"0 a! !+ !+ !+ !+"
"0 a! !+ !+ !+ !+"
(blockinfo '((data . -4) (return . 0) memory ) 0))
(block
... | null | https://raw.githubusercontent.com/mangpo/greenthumb/7a8626205879af8c788f9927eeff643f4ddc5cde/GA/test-liveness.rkt | racket | #lang racket
(require "../controller.rkt" "../inst.rkt"
"interpret.rkt" "state.rkt" "print.rkt")
(define a
(program
(list
(label "cadd"
(list
(block
"0 a! !+ !+ !+ !+"
"0 a! !+ !+ !+ !+"
(blockinfo '((data . -4) (return . 0) memory ) 0))
(block
... | |
1f3ec139d8a54e354acb35ecb1fd3934dcdc526243b6e14303eada6729c6f982 | oxalorg/4ever-clojure | sci.cljs | (ns app.sci
(:require ["@codemirror/view" :as view]
[app.error :refer [error-handler]]
[applied-science.js-interop :as j]
[goog.string]
[goog.string.format]
[nextjournal.clojure-mode.extensions.eval-region :as eval-region]
[sci.core :as sci]
... | null | https://raw.githubusercontent.com/oxalorg/4ever-clojure/4f19b9277cc5cd95f3f5e552a98af6f5900999af/src/app/sci.cljs | clojure | (ns app.sci
(:require ["@codemirror/view" :as view]
[app.error :refer [error-handler]]
[applied-science.js-interop :as j]
[goog.string]
[goog.string.format]
[nextjournal.clojure-mode.extensions.eval-region :as eval-region]
[sci.core :as sci]
... | |
d645eb533cf8ee7e561b8f90b6fe2ce2fab864c336793c5477aed8c5fbb69e6c | awslabs/s2n-bignum | bignum_mux.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/x86/proofs/bignum_mux.ml | ocaml | =========================================================================
Multiplexing for raw bignums with same length.
=========================================================================
*** print_literal_from_elf "x86/generic/bignum_mux.o";;
***
TEST (% rsi) (% rsi)
XOR (% ... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
let bignum_mux_mc =
define_assert_from_elf "bignum_mux_mc" "x86/... |
71ea36325ef995db4e3c195aa19782c63347abda27ea1909f3613e7effc1f46d | ocaml-multicore/ocaml-tsan | mutex.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/stdlib/mutex.ml | ocaml | ************************************************************************
OCaml
... | and , INRIA Rocquencourt
Copyright 1995 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type t
external create: unit -> t = "caml_ml_mutex_new"
external lock: t -> unit = "caml_ml_mutex_lock"
external try... |
f4ed839e4606d84b47df1ea1f78443ab72241395fde0a4f6ead6a479d9ce21da | vmchale/madlang | Fetch.hs | {-# LANGUAGE OverloadedStrings #-}
module Text.Madlibs.Packaging.Fetch ( fetchGithub
, fetchPackages
, cleanPackages
, installVimPlugin
) where
import qualified Codec.Archive... | null | https://raw.githubusercontent.com/vmchale/madlang/321e349d693bde3d133f5e251259afdcfc041526/src/Text/Madlibs/Packaging/Fetch.hs | haskell | # LANGUAGE OverloadedStrings #
-libraries/dist
| As an example, `vmchale/some-library` would be valid input. |
module Text.Madlibs.Packaging.Fetch ( fetchGithub
, fetchPackages
, cleanPackages
, installVimPlugin
) where
import qualified Codec.Archive.Tar as Tar
import ... |
da769e5641c8fb59e2717acb2aa8fce972f66c46c88d7e51afbd9d5b8edb14d8 | soulomoon/SICP | Exercise4.69.scm | Exercise 4.69 : Beginning with the data base and the rules you formulated in Exercise 4.63 , devise a rule for adding “ greats ” to a grandson relationship . This should enable the system to deduce that Irad is the great - grandson of , or that and are the great - great - great - great - great - grandsons of . ( ... | null | https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter4/Exercise4.69.scm | scheme | this one look nicer , found on "-4-69/"
it is dot tail for rel, so grandson should be impelement with little bracket so it would work
(last-grandson? ?rel)
memory limit : 2048 MB .
'done
(last-grandson? (great great grandson))
> | Exercise 4.69 : Beginning with the data base and the rules you formulated in Exercise 4.63 , devise a rule for adding “ greats ” to a grandson relationship . This should enable the system to deduce that Irad is the great - grandson of , or that and are the great - great - great - great - great - grandsons of . ( ... |
fa015af4ad231dfeedb0dea3bc591ab401fd9c4fa87a5590aa81120ea6edbfde | unclebob/more-speech | contact_list_spec.clj | (ns more-speech.nostr.contact-list-spec
(:require [speclj.core :refer :all]
[more-speech.db.gateway :as gateway]
[more-speech.db.in-memory :as in-memory]
[more-speech.nostr.contact-list :refer :all]
[more-speech.nostr.util :refer [hexify]]
[more-speech.mem :... | null | https://raw.githubusercontent.com/unclebob/more-speech/fe4cde702bf56488e285b71ea8dc284121be0c64/spec/more_speech/nostr/contact_list_spec.clj | clojure | (ns more-speech.nostr.contact-list-spec
(:require [speclj.core :refer :all]
[more-speech.db.gateway :as gateway]
[more-speech.db.in-memory :as in-memory]
[more-speech.nostr.contact-list :refer :all]
[more-speech.nostr.util :refer [hexify]]
[more-speech.mem :... | |
42edf23d830f9fed275a00a512c8d325156b08c6bc02fa0da9c3716b72737942 | facebook/flow | check_polarity.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/462198abc93a8ee0ec94023cdcae4b04583569da/src/typing/check_polarity.ml | ocaml | TODO: flesh this out
base case
This representation signifies a literal, which is not a type.
Perhaps surprisingly, there is nothing to do here. This type is used
* specifically for the extends clause of a class declaration. The root
* type of the extended class is looked up from the environment, an... |
* 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... |
69856661d9c7d96b9ecdade7c77cfdc0ee0d5e340d375887fb94b51cb3eda1e6 | argp/bap | contraction.mli | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
(* ... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocamlgraph/src/contraction.mli | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
Copyrig... |
9e672689ab5c829a63cdef8f055daca291c4b3eb5e419d80a663e7ac82d389d9 | Perry961002/SICP | exe3.64-stream-limit.scm | (define (stream-limit s tolerance)
(define (iter s)
(let ((first (stream-car s))
(second (stream-car (stream-cdr s))))
(if (< (abs (- second first)) tolerance)
second
(iter (stream-cdr s)))))
(iter s))
(define (sqrt x tolerance)
(stream-limit ... | null | https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap3/exercise/exe3.64-stream-limit.scm | scheme | (define (stream-limit s tolerance)
(define (iter s)
(let ((first (stream-car s))
(second (stream-car (stream-cdr s))))
(if (< (abs (- second first)) tolerance)
second
(iter (stream-cdr s)))))
(iter s))
(define (sqrt x tolerance)
(stream-limit ... | |
b3ae62c75cd13e639c34fdac83732cc212ad99f83646431e89b8c5202eef5236 | haskell-tools/haskell-tools | A.hs | # LANGUAGE UnboxedTuples #
module A where
import B
a = () where x = (# b, 0 #) | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/daemon/examples/Project/code-gen/A.hs | haskell | # LANGUAGE UnboxedTuples #
module A where
import B
a = () where x = (# b, 0 #) | |
7c25b7760b28e3df884a02af4b664cb8887ec8e7012218a87d1cc28eb674920f | ml4tp/tcoq | elimschemes.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/tactics/elimschemes.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
This file builds schemes related to... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Created by from contents ... |
8e54705d99be6da7448af9ebc27298e478fb8688a774926731c0efce4d12b247 | REPROSEC/dolev-yao-star | Lib_RawBuffer.ml | open Prims | null | https://raw.githubusercontent.com/REPROSEC/dolev-yao-star/d97a8dd4d07f2322437f186e4db6a1f4d5ee9230/concrete/hacl-star-snapshot/ml/Lib_RawBuffer.ml | ocaml | open Prims | |
d256e1cf8f9fd9a751ce58d28aa46668d2d020dbaab3689c926f80e17832484b | mariachris/Concuerror | init_race_condition.erl | %% A late reply from init could be registered as unblocking the respective child
%% but not be previously instrumented. This bug appears on bigger machines.
-module(init_race_condition).
-export([scenarios/0]).
-export([test/0]).
scenarios() -> [{test, inf, full}, {test, inf, dpor}].
get_arguments() ->
init ! {... | null | https://raw.githubusercontent.com/mariachris/Concuerror/87e63f10ac615bf2eeac5b0916ef54d11a933e0b/testsuite/suites/regress/src/init_race_condition.erl | erlang | A late reply from init could be registered as unblocking the respective child
but not be previously instrumented. This bug appears on bigger machines. |
-module(init_race_condition).
-export([scenarios/0]).
-export([test/0]).
scenarios() -> [{test, inf, full}, {test, inf, dpor}].
get_arguments() ->
init ! {self(), get_arguments},
receive
{init, Rep} -> Rep
end.
test() ->
[ spawn(fun() -> get_arguments() end) || _ <- lists:seq(1, 2) ].
|
b50a6338da3af32c229f28d9ea6ce349fe8130c784f3dcd0a4f26210fc6d57f5 | PEZ/rich4clojure | problem_125.clj | (ns rich4clojure.hard.problem-125
(:require [hyperfiddle.rcf :refer [tests]]))
;; = Gus' Quinundrum =
;; By 4Clojure user: amcnamara
;; Difficulty: Hard
;; Tags: [logic fun brain-teaser]
;;
;; Create a function of no arguments which returns a
;; string that is an exact copy of the function itself.
;;
;;
;; Hint: ... | null | https://raw.githubusercontent.com/PEZ/rich4clojure/2ccfac041840e9b1550f0a69b9becbdb03f9525b/src/rich4clojure/hard/problem_125.clj | clojure | = Gus' Quinundrum =
By 4Clojure user: amcnamara
Difficulty: Hard
Tags: [logic fun brain-teaser]
Create a function of no arguments which returns a
string that is an exact copy of the function itself.
Hint: read this if you get stuck (this question is
but it 's worth the
effort to solve it independently if... | (ns rich4clojure.hard.problem-125
(:require [hyperfiddle.rcf :refer [tests]]))
Fun fact : is the name of the 4Clojure dragon .
(def __ :tests-will-fail)
(comment
)
(tests
(str '__) := (__))
|
07210e411eb911e3cdead70e5404c7a6063159d56db538e159fa449765d69b28 | uw-unsat/leanette-popl22-artifact | tree-lib.rkt | #lang rosette
(provide
echo-union
new-boolean!
new-enum!
nonterminals!
null*
symbol->enum
enum->symbol
treemap
expression->enumtree
enumtree->expression
weigh-formula!
current-weight!
table-add
table-find
syntax-matches?
binary-tree!
tree-match
... | null | https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-3/bonsai/tree-lib.rkt | racket | Display a symbolic value in a large tree form
Bitvector-encoding for enums
Find the size of a formula
Current assertions size
Naive table find
Don't panic
Make a binary tree | #lang rosette
(provide
echo-union
new-boolean!
new-enum!
nonterminals!
null*
symbol->enum
enum->symbol
treemap
expression->enumtree
enumtree->expression
weigh-formula!
current-weight!
table-add
table-find
syntax-matches?
binary-tree!
tree-match
... |
88129048003593a8cde870cd46c63a0be096801d455581938a55ee5fd4cdbcdd | bnomis/om-next-datascript-localisation-demo | core_test.cljs | (ns om-next-datascript-localisation-demo.core-test
(:require
[cljs.test :refer-macros [deftest is testing]]
[om-next-datascript-localisation-demo.utils.interpolator :refer [interp]]))
(deftest interpolation
(testing "interp"
(is (= "" (interp "" {})))
(is (= "abc" (interp "abc" {})))
(is (= "ab... | null | https://raw.githubusercontent.com/bnomis/om-next-datascript-localisation-demo/be9a77e0a040896533f79f86cdbd115c19ab3c9f/test/om_next_datascript_localisation_demo/core_test.cljs | clojure | (ns om-next-datascript-localisation-demo.core-test
(:require
[cljs.test :refer-macros [deftest is testing]]
[om-next-datascript-localisation-demo.utils.interpolator :refer [interp]]))
(deftest interpolation
(testing "interp"
(is (= "" (interp "" {})))
(is (= "abc" (interp "abc" {})))
(is (= "ab... | |
8ff805948c57bd6a22e11900c33548c5e2e5f855f270b396153e0aa4b744bfe4 | hadolint/language-docker | Copy.hs | module Language.Docker.Parser.Copy
( parseCopy,
parseAdd,
)
where
import Data.List.NonEmpty (NonEmpty, fromList)
import qualified Data.Text as T
import Language.Docker.Parser.Prelude
import Language.Docker.Syntax
data Flag
= FlagChown Chown
| FlagChmod Chmod
| FlagLink Link
| FlagSource CopySource
|... | null | https://raw.githubusercontent.com/hadolint/language-docker/79e9b7db67f818150aa7e213cb58b9dd71331ec3/src/Language/Docker/Parser/Copy.hs | haskell | Let's do some validation on the flags | module Language.Docker.Parser.Copy
( parseCopy,
parseAdd,
)
where
import Data.List.NonEmpty (NonEmpty, fromList)
import qualified Data.Text as T
import Language.Docker.Parser.Prelude
import Language.Docker.Syntax
data Flag
= FlagChown Chown
| FlagChmod Chmod
| FlagLink Link
| FlagSource CopySource
|... |
d52732a84e1b061025756b1b16b60227cb9d8a8c24f176c11f4247e3cd75a4d4 | georgegarrington/Syphon | Expression.hs | module Parse.Testing.Expression where
import Text.Megaparsec
import Test.Hspec.Megaparsec
import AST.Expression
import AST.Util
import Parse.Expression
import Parse.Testing.Root
--Test to see whether or not binary operators affect function application, we can see that they don't
list1 = ("fn0 arg00 arg01 + fn1 ar... | null | https://raw.githubusercontent.com/georgegarrington/Syphon/402a326b482e3ce627a15b651b3097c2e09e8a53/src/Parse/Testing/Expression.hs | haskell | Test to see whether or not binary operators affect function application, we can see that they don't | module Parse.Testing.Expression where
import Text.Megaparsec
import Test.Hspec.Megaparsec
import AST.Expression
import AST.Util
import Parse.Expression
import Parse.Testing.Root
list1 = ("fn0 arg00 arg01 + fn1 arg10 arg11 + fn2 arg20 arg21" `testParse` pExpr)
`shouldParse` App (App (Var "+") (App (App (Var "+") ... |
68b45d2a9ae5486f072bd3bf8b75db7f8f82f6cf82546345647fc9c52997c526 | nikita-volkov/rerebase | ISO8601.hs | module Data.Time.Format.ISO8601
(
module Rebase.Data.Time.Format.ISO8601
)
where
import Rebase.Data.Time.Format.ISO8601
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/57c3a40c75a703315fa8f36456e750204985c205/library/Data/Time/Format/ISO8601.hs | haskell | module Data.Time.Format.ISO8601
(
module Rebase.Data.Time.Format.ISO8601
)
where
import Rebase.Data.Time.Format.ISO8601
| |
ee597252f005dbdd26a8b32fce7e0e4a4634c974e611b0e1fb42bbb3ca89fe99 | JKTKops/ProtoHaskell | Messages.hs | |
Handles everything to do with messages . Creating , storing , sorting , outputting ,
modifying , etc . , output , dump , debug , warning , and error messages .
Some terminology :
A ' Message ' is a warning or error message . The term ' message ' generally refers to
any compiler output that goes to a term... | null | https://raw.githubusercontent.com/JKTKops/ProtoHaskell/437c37d7bd6d862008f86d7e8045c7a60b12b532/src/Compiler/Messages.hs | haskell | ^ The actual error message, e.g
"Couldn't match expected type `Bool' with actual type `Int'"
^ Supplementary information, e.g. "Relevant bindings include ..."
| Reasons associate with messages containing warnings.
The message may be something that we always print,
it may have been enabled by a flag, or it may hav... | |
Handles everything to do with messages . Creating , storing , sorting , outputting ,
modifying , etc . , output , dump , debug , warning , and error messages .
Some terminology :
A ' Message ' is a warning or error message . The term ' message ' generally refers to
any compiler output that goes to a term... |
4dab1fb4a810e942e14495d3e8037c0611a76672cf7435be35870fa29f254b7a | hopv/MoCHi | refTypJudge.ml | open Util
open Combinator
(** Refinement type judgments *)
let formula_of c ts t =
match c, ts with
| Const.Undef, [] ->
assert false
| Const.Bot, [] ->
Formula.mk_true
| Const.Top, [] ->
Formula.mk_true
| Const.BinTrue(ty), [t1; t2] ->
NumFormula.eq Type.mk_bool t BoolTerm.mk_true
| ... | null | https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/fpat/refTypJudge.ml | ocaml | * Refinement type judgments
@todo
* @todo t must be a base value
let dom env =
List.rev (List.filter_map (function A(id, _) -> Some(id) | B(_) -> None) env) | open Util
open Combinator
let formula_of c ts t =
match c, ts with
| Const.Undef, [] ->
assert false
| Const.Bot, [] ->
Formula.mk_true
| Const.Top, [] ->
Formula.mk_true
| Const.BinTrue(ty), [t1; t2] ->
NumFormula.eq Type.mk_bool t BoolTerm.mk_true
| Const.BinFalse(ty), [t1; t2] ->
... |
73b15c86ccd8d6dcb5197c4256049f53ab9946bf73cbfe11a88d722273d381d3 | MrEbbinghaus/fulcro-material-ui-wrapper | tabs.cljc | (ns ^:deprecated material-ui.navigation.tabs
(:refer-clojure :exclude [list])
(:require
[com.fulcrologic.fulcro.algorithms.react-interop :as interop]
#?@(:cljs [["@mui/material/Tab" :default Tab]
["@mui/material/TabScrollButton" :default TabScrollButton]
["@mui/material/Tabs" :... | null | https://raw.githubusercontent.com/MrEbbinghaus/fulcro-material-ui-wrapper/058f1dd4b85542914f92f48a4010ea9ad497e48f/src/material_ui/navigation/tabs.cljc | clojure | (ns ^:deprecated material-ui.navigation.tabs
(:refer-clojure :exclude [list])
(:require
[com.fulcrologic.fulcro.algorithms.react-interop :as interop]
#?@(:cljs [["@mui/material/Tab" :default Tab]
["@mui/material/TabScrollButton" :default TabScrollButton]
["@mui/material/Tabs" :... | |
4f25f247e8743a81a31a5dbffe57a7d028869cf0e62ebbf45757f835708f2735 | GillianPlatform/Gillian | FOSolver.ml | module FOSolver = Engine.FOSolver
module PFS = Engine.PFS
module TypEnv = Engine.TypEnv
module Reduction = Engine.Reduction
module Formula = Gil_syntax.Formula
(** FIXME: optimization? *)
let build_full_pfs (pc : Pc.t) =
if Formula.Set.is_empty pc.learned then pc.pfs
else
let copied = PFS.copy pc.pfs in
Fo... | null | https://raw.githubusercontent.com/GillianPlatform/Gillian/21ba7e6ee56277bbf06eb3a79be4b87f3224bc11/GillianCore/monadic/FOSolver.ml | ocaml | * FIXME: optimization? | module FOSolver = Engine.FOSolver
module PFS = Engine.PFS
module TypEnv = Engine.TypEnv
module Reduction = Engine.Reduction
module Formula = Gil_syntax.Formula
let build_full_pfs (pc : Pc.t) =
if Formula.Set.is_empty pc.learned then pc.pfs
else
let copied = PFS.copy pc.pfs in
Formula.Set.iter (PFS.extend c... |
1a96b78ebdf149e3bab405f2e0e70695c9213c03c2dec77c6a919175b4b3811d | craigfe/sink | show.mli | include Show_intf.Show
* @inline
| null | https://raw.githubusercontent.com/craigfe/sink/c5431edfa1b06f1a09845a481c4afcb3e92f0667/src/sink/show.mli | ocaml | include Show_intf.Show
* @inline
| |
3c0effea0a1526c6803d16865db8985bb43e3361c72bbfa48afed53165dc957e | wdhowe/clojure-snippets | alt.clj | (ns pluggable-functions.alt
(:gen-class)
(:require [pluggable-functions.protos :as protos]))
(defrecord process-alt [id]
protos/process-things
(process-stuff [this stuff] "Process stuff."
(str "Processing alt stuff: " id " " stuff))
(process-that [this that] "Process that."
(str "Processing alt that:... | null | https://raw.githubusercontent.com/wdhowe/clojure-snippets/0c3247ce99a563312b549d03f080b8cf449b541d/abstractions/pluggable_functions/src/pluggable_functions/alt.clj | clojure | (ns pluggable-functions.alt
(:gen-class)
(:require [pluggable-functions.protos :as protos]))
(defrecord process-alt [id]
protos/process-things
(process-stuff [this stuff] "Process stuff."
(str "Processing alt stuff: " id " " stuff))
(process-that [this that] "Process that."
(str "Processing alt that:... | |
7b11ed3ad71a97c2cfd6f8ddb1694919b6af21e10aadc68dc8555ef14f1e07d7 | deadtrickster/prometheus_rabbitmq_exporter | prometheus_rabbitmq_exporter.erl | -module(prometheus_rabbitmq_exporter).
-behaviour(rabbit_mgmt_extension).
-export([dispatcher/0, web_ui/0]).
dispatcher() ->
{ok, _} = application:ensure_all_started(prometheus),
maybe_register_collectors(),
Path = prometheus_rabbitmq_exporter_config:path(),
prometheus_http_impl:setup(),
[{Path ++ "/[:re... | null | https://raw.githubusercontent.com/deadtrickster/prometheus_rabbitmq_exporter/bd8dbb1bef2d410d95dbadd47f03fc094dbe2cbf/src/prometheus_rabbitmq_exporter.erl | erlang | -module(prometheus_rabbitmq_exporter).
-behaviour(rabbit_mgmt_extension).
-export([dispatcher/0, web_ui/0]).
dispatcher() ->
{ok, _} = application:ensure_all_started(prometheus),
maybe_register_collectors(),
Path = prometheus_rabbitmq_exporter_config:path(),
prometheus_http_impl:setup(),
[{Path ++ "/[:re... | |
6b7f5d49ab384a57856dc15e85478a537ee8f8ca242c31dd16e5f9c3736c9cd7 | haskell/haskell-language-server | LayoutPrefixKeep.expected.hs | (-/) :: Bool -> a -> a
(-/) False a = _w0
(-/) True a = _w1
| null | https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/golden/LayoutPrefixKeep.expected.hs | haskell | (-/) :: Bool -> a -> a
(-/) False a = _w0
(-/) True a = _w1
| |
e0a9841253437edb1e29fc3b647a26c96185f92057f77f518c2fecbd112a8032 | monadbobo/ocaml-core | interfaces.ml | module type Binable = Binable.S
module type Comparable = Comparable.S
module type Comparable_binable = Comparable.S_binable
module type Floatable = Floatable.S
module type Hashable = Hashable.S
module type Hashable_binable = Hashable.S_binable
module type Identifiable = Identifiable.S
module type Identifier = Identifia... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/interfaces.ml | ocaml | module type Binable = Binable.S
module type Comparable = Comparable.S
module type Comparable_binable = Comparable.S_binable
module type Floatable = Floatable.S
module type Hashable = Hashable.S
module type Hashable_binable = Hashable.S_binable
module type Identifiable = Identifiable.S
module type Identifier = Identifia... | |
4e15b505ceaebec964df4f91ba9a4889a0458dcef06ddb6e85033cb27d32e337 | turquoise-hexagon/euler | solution.scm | (import
(euler)
(srfi 1))
(define (solve n)
(extremum
(filter
(lambda (i)
(= (gcd 10 i) 1))
(range 2 n))
(lambda (i)
(discrete-log 10 1 i))
>))
(let ((_ (solve 1000)))
(print _) (assert (= _ 983)))
| null | https://raw.githubusercontent.com/turquoise-hexagon/euler/cf3fb5e10b5008426f551594721cdd7d3c553040/src/026/solution.scm | scheme | (import
(euler)
(srfi 1))
(define (solve n)
(extremum
(filter
(lambda (i)
(= (gcd 10 i) 1))
(range 2 n))
(lambda (i)
(discrete-log 10 1 i))
>))
(let ((_ (solve 1000)))
(print _) (assert (= _ 983)))
| |
bd5ffd6ebbb4334928bc055802cf792e269dc962df20ae9ba68a8d2cba5df005 | quil-lang/magicl | arithmetic.lisp | ;;;; arithmetic.lisp
;;;;
Author :
(in-package #:magicl.blas)
(define-extensible-function (scale! scale!-blas :blas) (tensor factor))
Scalar - matrix multiplication
(macrolet ((def-scale (matrix-type scalar-type function)
`(defmethod scale!-blas ((tensor ,matrix-type)
... | null | https://raw.githubusercontent.com/quil-lang/magicl/45eae6e60329e8312496d25f1abfbf15274f4c89/src/extensions/blas/arithmetic.lisp | lisp | arithmetic.lisp
Fast matrix/vector addition
Fast matrix/vector subtraction
Fast matrix/vector element-wise multiplication/division | Author :
(in-package #:magicl.blas)
(define-extensible-function (scale! scale!-blas :blas) (tensor factor))
Scalar - matrix multiplication
(macrolet ((def-scale (matrix-type scalar-type function)
`(defmethod scale!-blas ((tensor ,matrix-type)
(factor ,scalar-t... |
0a85be767439eac8e13b17895536052b1cfca3ace3d64dc87f6a7bd844ca6811 | ygmpkk/house | Tests.hs | module Main( main ) where
import Graphics.HGL.Utils
import Control.Exception( try )
----------------------------------------------------------------
-- Main
----------------------------------------------------------------
main :: IO ()
main = rgs [ w1, w2 polys, w9, w10 ]
-------------------------------------------... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/HGL/examples/Tests.hs | haskell | --------------------------------------------------------------
Main
--------------------------------------------------------------
--------------------------------------------------------------
Other Examples
--------------------------------------------------------------
draw a regular polygon with "n" sides "angle"... | module Main( main ) where
import Graphics.HGL.Utils
import Control.Exception( try )
main :: IO ()
main = rgs [ w1, w2 polys, w9, w10 ]
w1 = do
w <- openWindow "Test" (400,400)
setGraphic w (text (100,100) "Press a key")
getKey w
red <- createPen Solid 4 (RGB 255 0 0)
green <- createPen Solid 4 (RGB 0 2... |
e09fefd59bae6b1d21fb43717fa9557b655f286caaff328b634274307a65d10a | spechub/Hets | CASL2OWL.hs | # LANGUAGE MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances #
|
Module : ./OWL2 / CASL2OWL.hs
Description : Comorphism from CASL to OWL2
Copyright : ( c ) , DFKI GmbH 2012
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
... | null | https://raw.githubusercontent.com/spechub/Hets/f582640a174df08d4c965d7c0a1ab24d1a31000d/OWL2/CASL2OWL.hs | haskell | OWL = codomain
CASL = domain
comorphism
lid domain
sublogics domain
Basic spec domain
sentence domain
symbol items domain
symbol map items domain
signature domain
morphism domain
symbol domain
rawsymbol domain
proof tree domain
lid codomain
sublogics codomain
Basic spec codomain
sentence codomain
sym... | # LANGUAGE MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances #
|
Module : ./OWL2 / CASL2OWL.hs
Description : Comorphism from CASL to OWL2
Copyright : ( c ) , DFKI GmbH 2012
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
... |
8c668b6c374bbbdbfa4d0eca6156056ec6bdcde70d78fc502e34b68e017ee343 | racket/racket7 | pipe.rkt | #lang racket/base
(require "../common/check.rkt"
"../host/thread.rkt"
"port.rkt"
"input-port.rkt"
"output-port.rkt"
"count.rkt"
"commit-manager.rkt")
(provide make-pipe
pipe-input-port?
pipe-output-port?
pipe-content-length
pipe-... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/io/port/pipe.rkt | racket | peeked but not yet read effectively extends `limit`
to adjust the write position via `file-position` on a string port
get-content-length
write-position
`pos` must be between `start` and `end`
discard-all
for lookahead peeks
Used before/after read:
Used before/after write:
Used after peeking:
in atomic mode [... | #lang racket/base
(require "../common/check.rkt"
"../host/thread.rkt"
"port.rkt"
"input-port.rkt"
"output-port.rkt"
"count.rkt"
"commit-manager.rkt")
(provide make-pipe
pipe-input-port?
pipe-output-port?
pipe-content-length
pipe-... |
e28bf55e4de337b4ceeb9e9a1e8efddcb40c7ea8423250c738ac164a8c93bdf4 | opencog/learn | similarity-jacc.scm | ;
; similarity-jacc.scm
September 2021 version
;
Bulk computation of MI and Jaccard similarity . ( See also the earlier
; `similarity.scm`, which did cosines).
;
; Code to generate graphs from this data in `similarity-graphs.scm`.
;
(use-modules (srfi srfi-1))
(use-modules (opencog) (opencog matrix) (opencog persis... | null | https://raw.githubusercontent.com/opencog/learn/73d0ac7d4593318028e91cb59fbfa61ca52eb7a0/learn-lang-diary/utils/similarity-jacc.scm | scheme |
similarity-jacc.scm
`similarity.scm`, which did cosines).
Code to generate graphs from this data in `similarity-graphs.scm`.
Ad hoc globals.
Need to fetch all pairs, because the similarity object doesn't
automate this.
same as (load-atoms-of-type 'Similarity)
---------------------------------------
Compute... | September 2021 version
Bulk computation of MI and Jaccard similarity . ( See also the earlier
(use-modules (srfi srfi-1))
(use-modules (opencog) (opencog matrix) (opencog persist))
(define pca (make-pseudo-cset-api))
(define pcs (add-pair-stars pca))
(define sim (add-similarity-compute pcs))
(define sap (add-simi... |
ee31321c5d2ee98e5fcd8fd1d5f6ac5106578afe141b3203d0d9348c40b815ad | tonyrog/eth | bpf_bs.erl | @author < >
( C ) 2014 ,
%%% @doc
%%% Basic block representation
%%% @end
Created : 2 Jul 2014 by < >
-module(bpf_bs).
-include("eth_bpf.hrl").
-export([new/1]).
-export([size/1]).
-export([from_prog/1, to_prog/1]).
-export([print/1, print/2]).
-export([get_labels/1]).
-export([get_block/2,set_bl... | null | https://raw.githubusercontent.com/tonyrog/eth/51e9989a020ccf8aafa0c286c0dc19ab7862a5a8/src/bpf_bs.erl | erlang | @doc
Basic block representation
@end
Basic block representation
fanout: dict L -> [L]
fanin: dict L -> [L]
block: dict L -> #bpf_block
}
return number of instructions found in program
Create basic block representation from tuple program.
instruction in the block.
instruction.
abso... | @author < >
( C ) 2014 ,
Created : 2 Jul 2014 by < >
-module(bpf_bs).
-include("eth_bpf.hrl").
-export([new/1]).
-export([size/1]).
-export([from_prog/1, to_prog/1]).
-export([print/1, print/2]).
-export([get_labels/1]).
-export([get_block/2,set_block/2]).
-export([add_block/2,del_block/2]).
-export... |
4852c694dd3598ea5b93af8d0399734d61465182bf21d2c88d1bac0af2c3c972 | ml4tp/tcoq | ppdecl_proof.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/plugins/decl_mode/ppdecl_proof.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open CErrors
open Pp
open Dec... |
06867954e97a855e981af132155039dc51a09fd0ada338031a9f94e0a51df365 | rodentrabies/bp | parameters.lisp | (uiop:define-package :bp/net/parameters (:use :cl)
(:use :bp/core/all)
(:export
;; Network constants:
#:+network-magic+
#:+testnet-network-magic+
#:+regtest-network-magic+
#:+network-port+
#:+testnet-network-port+
#:+regtest-network-port+
#:+bp-network-port+
#:+bp-testnet-network-port+
... | null | https://raw.githubusercontent.com/rodentrabies/bp/d7cedb461ea7c7da30f7f65e17a87935965186d5/net/parameters.lisp | lisp | Network constants:
Service flags:
-----------------------------------------------------------------------------
Network contants
-----------------------------------------------------------------------------
Network services
----------------------------------------------------------------------------- | (uiop:define-package :bp/net/parameters (:use :cl)
(:use :bp/core/all)
(:export
#:+network-magic+
#:+testnet-network-magic+
#:+regtest-network-magic+
#:+network-port+
#:+testnet-network-port+
#:+regtest-network-port+
#:+bp-network-port+
#:+bp-testnet-network-port+
#:+bp-regtest-network-po... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.