_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
133b1f616af21410fa46fffd30c2013cbaf93098f28c7e48c7ffa3d515052d43
Carnap/Carnap
Parser.hs
# LANGUAGE TypeOperators , FlexibleContexts , FlexibleInstances , MultiParamTypeClasses # module Carnap.Languages.SetTheory.Parser ( strictSetTheoryParser, strictSetTheoryMontagueParser , extendedStrictSetTheoryParser, extendedStrictSetTheorySchemaParser, extendedStrictSetTheoryMontagueParser , elementarySetTheoryPars...
null
https://raw.githubusercontent.com/Carnap/Carnap/d807df3da1c552e8f4efd7af3258c2746fb9ab8e/Carnap/src/Carnap/Languages/SetTheory/Parser.hs
haskell
# LANGUAGE TypeOperators , FlexibleContexts , FlexibleInstances , MultiParamTypeClasses # module Carnap.Languages.SetTheory.Parser ( strictSetTheoryParser, strictSetTheoryMontagueParser , extendedStrictSetTheoryParser, extendedStrictSetTheorySchemaParser, extendedStrictSetTheoryMontagueParser , elementarySetTheoryPars...
4bf21be3afb0f66459e2ba8d5be3baae0f13166bccc0ff1beb60128d5c8e33fe
darrenldl/stramon
string_utils.ml
let count_backslash_backward s i = if i < 0 || i >= String.length s then ( invalid_arg "count_backslash_backward: invalid i" ); let rec aux i e = if i < 0 || s.[i] <> '\\' then e - i else aux (i - 1) e in aux i i let has_trailing_escape s = let len = String.length s in count_backs...
null
https://raw.githubusercontent.com/darrenldl/stramon/b8395072646751b02a96f2f10e11760849289016/lib/string_utils.ml
ocaml
let count_backslash_backward s i = if i < 0 || i >= String.length s then ( invalid_arg "count_backslash_backward: invalid i" ); let rec aux i e = if i < 0 || s.[i] <> '\\' then e - i else aux (i - 1) e in aux i i let has_trailing_escape s = let len = String.length s in count_backs...
39b2e880b680230acbc85de03f9cc5bf03409fa4259bb805e912e2606819ca21
thi-ng/geom
buffers.clj
(ns thi.ng.geom.gl.jogl.buffers (:import [com.jogamp.opengl.util GLBuffers] [java.nio Buffer DoubleBuffer FloatBuffer ShortBuffer IntBuffer])) Native buffer wrappers for Clojure / JOGL TODO refactor to avoid 2x copy via array , fill directly (defn ^FloatBuffer float-buffer [n-or-coll] (if (number? n-o...
null
https://raw.githubusercontent.com/thi-ng/geom/85783a1f87670c5821473298fa0b491bd40c3028/src/thi/ng/geom/gl/jogl/buffers.clj
clojure
(ns thi.ng.geom.gl.jogl.buffers (:import [com.jogamp.opengl.util GLBuffers] [java.nio Buffer DoubleBuffer FloatBuffer ShortBuffer IntBuffer])) Native buffer wrappers for Clojure / JOGL TODO refactor to avoid 2x copy via array , fill directly (defn ^FloatBuffer float-buffer [n-or-coll] (if (number? n-o...
500b034480f554d0a3c6630bcebaccdc0a8726e975b78d9f2fa1a4b8aa46d405
compufox/glacier
mappings.lisp
(in-package :glacier) (defun generate-cw (status-text mappings) "returns a content warning based off of our cw-mappings and the STATUS-TEXT" (when mappings (let ((cw-list (loop :with text := (str:split " " (str:downcase status-text)) :for mapping :in mappings :...
null
https://raw.githubusercontent.com/compufox/glacier/2175efedfaaf9d425940df0c45556e1d99417364/mappings.lisp
lisp
i could probably do something with regexes to simplify this but also :shrug: it works
(in-package :glacier) (defun generate-cw (status-text mappings) "returns a content warning based off of our cw-mappings and the STATUS-TEXT" (when mappings (let ((cw-list (loop :with text := (str:split " " (str:downcase status-text)) :for mapping :in mappings :...
429cab9495287172d04694fa34c84eb87ccf6702f48612eded2e028099a51e52
gregwebs/Shelly.hs
ReadFileSpec.hs
# LANGUAGE CPP # module ReadFileSpec (readFileSpec) where import TestInit import qualified Data.ByteString as BS import qualified Data.Text as T readFileSpec :: Spec readFileSpec = describe "file with invalid encoding" $ do it "readBinary" $ do res <- shelly $ readBinary "test/data/zshrc" assert (BS....
null
https://raw.githubusercontent.com/gregwebs/Shelly.hs/5f93588097f475473367a5a85a6c29a5751e5f30/test/src/ReadFileSpec.hs
haskell
# LANGUAGE CPP # module ReadFileSpec (readFileSpec) where import TestInit import qualified Data.ByteString as BS import qualified Data.Text as T readFileSpec :: Spec readFileSpec = describe "file with invalid encoding" $ do it "readBinary" $ do res <- shelly $ readBinary "test/data/zshrc" assert (BS....
7635ea09b2e29537af66aba70e68f21457931be78d7bf2abc38781d194db10fb
mattgreen/hython
List.hs
module Hython.BuiltinTypes.List where import Control.Monad (when) import Hython.Ref import Hython.Types listAppend :: MonadInterpreter m => ListRef -> Object -> m Object listAppend ref obj = do modifyRef ref $ \l -> l ++ [obj] return None listClear :: MonadInterpreter m => ListRef -> m Object listClear ref ...
null
https://raw.githubusercontent.com/mattgreen/hython/fcbde98e9b5a033f0d4bea73ac9914bc5e12b746/src/Hython/BuiltinTypes/List.hs
haskell
returns the converted index if valid, raises (Python) exception otherwise
module Hython.BuiltinTypes.List where import Control.Monad (when) import Hython.Ref import Hython.Types listAppend :: MonadInterpreter m => ListRef -> Object -> m Object listAppend ref obj = do modifyRef ref $ \l -> l ++ [obj] return None listClear :: MonadInterpreter m => ListRef -> m Object listClear ref ...
936309cb728fa4bd111d76777925f21895668f72a50340a69a6404efaac292f4
B-Lang-org/bsc
SimPackageOpt.hs
module SimPackageOpt ( simPackageOpt ) where import Flags import SimPackage import ASyntax import ASyntaxUtil import AOpt(aExpandDynSel, aInsertCaseDef) import Prim import IntLit import IntegerUtil(aaaa) import Util(mapSndM, map_mapM) import Error(internalError, ErrMsg(..), ErrorHandle, bsError) import Id(isFromRHSId,...
null
https://raw.githubusercontent.com/B-Lang-org/bsc/d05342e358fb31d057ddd435a2631ec47ecb8e85/src/comp/SimPackageOpt.hs
haskell
import Debug.Trace ------------------------- Replace dynamic array selection with case expressions. case/if expressions. this is monadic because it can error if the user specified X or Z ------------------------- consider the vars we start with as "multiple" we've already visited this def If the expr doesn'...
module SimPackageOpt ( simPackageOpt ) where import Flags import SimPackage import ASyntax import ASyntaxUtil import AOpt(aExpandDynSel, aInsertCaseDef) import Prim import IntLit import IntegerUtil(aaaa) import Util(mapSndM, map_mapM) import Error(internalError, ErrMsg(..), ErrorHandle, bsError) import Id(isFromRHSId,...
858b23086aba93fced91ff8b2084c1ce92d9f70534cd962b94ef538964bf2a4b
isovector/thinking-with-types
Age.hs
# LANGUAGE DataKinds # # LANGUAGE GADTs # module War.Age where import Data.Kind import Data.Coerce (coerce) data Age = Current | Stale Type -- # BadAge data Age = Current | Stale -- # BadAge data Age = Current | Stale -} type Tracked :: Age -> Type -> Type newtype Tracked age a = UnsafeTracked ...
null
https://raw.githubusercontent.com/isovector/thinking-with-types/8ba4999b2262225613cf01e402c16b986af0ebe9/code/War/Age.hs
haskell
# BadAge # BadAge
# LANGUAGE DataKinds # # LANGUAGE GADTs # module War.Age where import Data.Kind import Data.Coerce (coerce) data Age = Current | Stale Type data Age = Current | Stale data Age = Current | Stale -} type Tracked :: Age -> Type -> Type newtype Tracked age a = UnsafeTracked { unTrack :: a } type ...
16c313c6a85a23c0f3ddec80a577f93fb82e8fdbafd7c9fd1b07eae85681ee3c
mbutterick/beautiful-racket
txtadv+world.rkt
#lang racket ;; ============================================================ ;; Model: ;; Elements of the world: (struct verb (aliases ; list of symbols desc ; string transitive?)) ; boolean (struct thing (name ; symbol [state #:mutable] ; any value ...
null
https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/txtadv-demo/1-monolith/txtadv%2Bworld.rkt
racket
============================================================ Model: Elements of the world: list of symbols string boolean symbol any value list of verb--thunk pairs string list of things list of verb--thunk pairs Tables mapping names<->things for save and load =============================================...
#lang racket (define names (make-hash)) (define elements (make-hash)) (define (record-element! name val) (hash-set! names name val) (hash-set! elements val name)) (define (name->element name) (hash-ref names name #f)) (define (element->name obj) (hash-ref elements obj #f)) Macros for constructing and regist...
c96cc08c675c033e3fb4b039fe03fa867eef678adc9139e842d8572f50d6af96
sacerdot/MiniErlangBlockchain
utils.erl
-module(utils). -export([sendMessage/2,sleep/1,watch/2,watchFriends/2]). -define(RANDOM, 10). sleep(N) -> receive after N*1000 -> ok end. sendMessage(Dest,Message) -> X = rand:uniform(?RANDOM), case X of 2 -> Dest ! Message, Dest ! Message; 3 -> none; ...
null
https://raw.githubusercontent.com/sacerdot/MiniErlangBlockchain/46713c579204994a528d2e642c8f7c0670c2a832/CaputoConteducaLazazzera-Node/utils.erl
erlang
-module(utils). -export([sendMessage/2,sleep/1,watch/2,watchFriends/2]). -define(RANDOM, 10). sleep(N) -> receive after N*1000 -> ok end. sendMessage(Dest,Message) -> X = rand:uniform(?RANDOM), case X of 2 -> Dest ! Message, Dest ! Message; 3 -> none; ...
d766b3ec5d1af9fb2bda128dfdf0aabf508c9c160b96969f36aad25852f97223
TrustInSoft/tis-interpreter
register_gui.ml
Modified by TrustInSoft (**************************************************************************) (* *) This file is part of Frama - C. (* ...
null
https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/occurrence/register_gui.ml
ocaml
************************************************************************ alternatives) ...
Modified by TrustInSoft This file is part of Frama - C. Copyright ( C ) 2007 - 2015 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Softwa...
e32625b8028b2cc99aee444e05dfe545a1110ea9fec7fbf8d3c2e7378a4b1020
brownplt/LambdaS5
ljs_opt.ml
open Ljs_syntax (* attrs contains expression option. f is a function that will apply to those expression options. *) let apply_to_attr (f : exp->exp) (attr : attrs) = let apply_to_option (opt : exp option) : exp option = match opt with | Some(e) -> Some (f e) | None -> None in let res = { primval= ...
null
https://raw.githubusercontent.com/brownplt/LambdaS5/f0bf5c7baf1daa4ead4e398ba7d430bedb7de9cf/src/optimization/ljs_opt.ml
ocaml
attrs contains expression option. f is a function that will apply to those expression options. to use this optimize function, refer to ljs_prim_propagation
open Ljs_syntax let apply_to_attr (f : exp->exp) (attr : attrs) = let apply_to_option (opt : exp option) : exp option = match opt with | Some(e) -> Some (f e) | None -> None in let res = { primval= apply_to_option attr.primval; code = apply_to_option attr.code; proto = apply...
5237138051ac9aa167e513840d595358bc2206547961060d9393b1e54a979e77
thephoeron/quipper-language
Alternative.hs
This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the -- file COPYRIGHT for a list of authors, copyright holders, licensing, -- and other details. All rights reserved. -- -- ====================================================================== -- | Alternative implementations for the binary w...
null
https://raw.githubusercontent.com/thephoeron/quipper-language/15e555343a15c07b9aa97aced1ada22414f04af6/Algorithms/BWT/Alternative.hs
haskell
file COPYRIGHT for a list of authors, copyright holders, licensing, and other details. All rights reserved. ====================================================================== | Alternative implementations for the binary welded tree algorithm. The purpose of these is to experiment with and potentially illust...
This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the module Algorithms.BWT.Alternative where import Quipper import QuipperLib.Qureg import QuipperLib.Simulation import Algorithms.BWT.Definitions import other Quipper stuff import qualified Algorithms.BWT.BWT as BWT import Libraries.Samp...
704e9a84da4e3895f488e6aebae135766fafda93bce7f619e91d2fd7ae0c213e
lokedhs/maxima-client
markup-new.lisp
(in-package :maxima-client.markup) (clim:define-command-table text-commands) (defclass markup-text-view () ()) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; text-link ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defclass text-link () ()) (defgeneric text-link/description (ob...
null
https://raw.githubusercontent.com/lokedhs/maxima-client/f33161bf345a9831475e6ac66004dda2f80a9e72/src/markup-new.lisp
lisp
text-link text-link-url Named reference maxima-function-reference maxima-function-reference Category reference ELSE: We have results, use nice rendering Check for error output, this shouldn't be needed ELSE: No error For now, just render itemised blocks as a sequence of indented paragraphs. Thi...
(in-package :maxima-client.markup) (clim:define-command-table text-commands) (defclass markup-text-view () ()) (defclass text-link () ()) (defgeneric text-link/description (obj)) (clim:define-presentation-method clim:present (obj (type text-link) stream (view markup-text-view) &key) (clim:with-drawing-optio...
7cec3b23a7c88d6f662d001ebba11abc6d6c690341b5b8e25060350041341eb7
hamidreza-s/Tnesia
tnesia_app.erl
-module(tnesia_app). -behaviour(application). -export([start/2, stop/1]). -define(TNESIA_FRAGS, 32). %%=================================================================== %% Application callbacks %%=================================================================== start(_StartType, _StartArgs) -> application:e...
null
https://raw.githubusercontent.com/hamidreza-s/Tnesia/52a3a88a52b423fbc5959978c0bba61654166d47/src/tnesia_app.erl
erlang
=================================================================== Application callbacks ===================================================================
-module(tnesia_app). -behaviour(application). -export([start/2, stop/1]). -define(TNESIA_FRAGS, 32). start(_StartType, _StartArgs) -> application:ensure_started(mnesia), mnesia:change_table_copy_type(schema, node(), disc_copies), tnesia_lib:create_table(?TNESIA_FRAGS), tnesia_sup:start_link(). stop(_S...
4182c8bd9ca5801709d0c6a7e608482a0c3fcb6009b9c0d10c0602b6f81da854
marigold-dev/mankavar
crypto.ml
module RawAddress = struct type t = int type public_key = t type secret_key = t let public_key x = x let pp_public_key : _ -> public_key -> unit = fun ppf -> Format.fprintf ppf "%d" let public_key_equal = Int.equal let secret_key x = x let counter = ref 0 let generate () = counter := !counter + 1 ...
null
https://raw.githubusercontent.com/marigold-dev/mankavar/8add22aded3720a3b262b272c93484120eadb2ac/src/helpers/crypto.ml
ocaml
Contains signature and signer Contains signature, signer and value
module RawAddress = struct type t = int type public_key = t type secret_key = t let public_key x = x let pp_public_key : _ -> public_key -> unit = fun ppf -> Format.fprintf ppf "%d" let public_key_equal = Int.equal let secret_key x = x let counter = ref 0 let generate () = counter := !counter + 1 ...
1b7175c0168ed0ea7d7099b9814c95e13d5f59def46c0ad7f514b8f1197f9f2a
thufschmitt/tix
pp.ml
(** Pretty-printer the [Ast.t] *) module P = Ast module F = Format let drop_loc { Common.Location.With_loc.description = it; _ } = it let (%>) f g x = g (f x) let pp_ident = F.pp_print_string let kwd = F.pp_print_string let pp_option printer (fmt : F.formatter) = CCOpt.iter (fun x -> printer fmt x) let pp_bino...
null
https://raw.githubusercontent.com/thufschmitt/tix/bfbf7b6de9160bae8af3e0686b783bbc75c79fd7/lib/simple/pp.ml
ocaml
* Pretty-printer the [Ast.t]
module P = Ast module F = Format let drop_loc { Common.Location.With_loc.description = it; _ } = it let (%>) f g x = g (f x) let pp_ident = F.pp_print_string let kwd = F.pp_print_string let pp_option printer (fmt : F.formatter) = CCOpt.iter (fun x -> printer fmt x) let pp_binop fmt = function | P.Ocons -> F.pp_...
4ba47cb0c9314bcfe2a3dffbe0a5ba04247af99cbf5a21ff100f50940d6d80bd
BranchTaken/Hemlock
test_int.ml
open! Basis.Rudiments open! Basis open Bool let test () = let rec fn = function | [] -> () | t :: ts' -> begin let x = to_uns t in File.Fmt.stdout |> Fmt.fmt "to_uns " |> pp t |> Fmt.fmt " -> " |> Uns.pp x |> Fmt.fmt " ; of_uns " |> Uns.pp x ...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/f3604ceda4f75cf18b6ee2b1c2f3c5759ad495a5/bootstrap/test/basis/bool/test_int.ml
ocaml
open! Basis.Rudiments open! Basis open Bool let test () = let rec fn = function | [] -> () | t :: ts' -> begin let x = to_uns t in File.Fmt.stdout |> Fmt.fmt "to_uns " |> pp t |> Fmt.fmt " -> " |> Uns.pp x |> Fmt.fmt " ; of_uns " |> Uns.pp x ...
7b784d5f799d88efd35da995bcac5276817516f30c7af690532e5711db405d35
ztellman/lein-jammin
project.clj
(defproject lein-jammin "0.1.1" :description "higher-order task that does background checks for stuck processes" :url "-jammin" :license {:name "MIT License"} :eval-in-leiningen true :dependencies [[leinjacker "0.4.2"] [io.aviso/pretty "0.1.17"]])
null
https://raw.githubusercontent.com/ztellman/lein-jammin/a552bae67bfa0036ba8e08331bccb540b7cbbe2d/project.clj
clojure
(defproject lein-jammin "0.1.1" :description "higher-order task that does background checks for stuck processes" :url "-jammin" :license {:name "MIT License"} :eval-in-leiningen true :dependencies [[leinjacker "0.4.2"] [io.aviso/pretty "0.1.17"]])
4058e977993642fe084dd4b2a26eeb20e4922fa1390a6a65bd1569376d342a00
camsaul/toucan2
default_fields_test.clj
(ns toucan2.tools.default-fields-test (:require [clojure.string :as str] [clojure.test :refer :all] [clojure.walk :as walk] [toucan2.insert :as insert] [toucan2.instance :as instance] [toucan2.pipeline :as pipeline] [toucan2.protocols :as protocols] [toucan2.select :as select] [toucan2.test...
null
https://raw.githubusercontent.com/camsaul/toucan2/5204b34d46f5adb3e52b022218049abe9b336928/test/toucan2/tools/default_fields_test.clj
clojure
(ns toucan2.tools.default-fields-test (:require [clojure.string :as str] [clojure.test :refer :all] [clojure.walk :as walk] [toucan2.insert :as insert] [toucan2.instance :as instance] [toucan2.pipeline :as pipeline] [toucan2.protocols :as protocols] [toucan2.select :as select] [toucan2.test...
6b3a979664a865cca07b6596ccd3751a75d33e4c41fd61d1c16a277266e0f634
LesBoloss-es/sorting
table.ml
let pf = Format.printf let fpf = Format.fprintf let spf = Format.sprintf let pp_int = Format.pp_print_int let pp_string = Format.pp_print_string type cell = Cell : (unit -> 'a) * ('a -> string) -> cell type row = cell list type table = row list let cell ~to_string f = Cell (f, to_string) let fmt_cell ~fmt f = cell ...
null
https://raw.githubusercontent.com/LesBoloss-es/sorting/40702b8ff99ac001261af424bd7e0834e2a26bf1/bench/table.ml
ocaml
Render cells + compute width of columns Compute the row template of the table Title the +4 is a hack to compensate for the unicode characters in the centered string
let pf = Format.printf let fpf = Format.fprintf let spf = Format.sprintf let pp_int = Format.pp_print_int let pp_string = Format.pp_print_string type cell = Cell : (unit -> 'a) * ('a -> string) -> cell type row = cell list type table = row list let cell ~to_string f = Cell (f, to_string) let fmt_cell ~fmt f = cell ...
6fd83ecfefa3fc9e55183cd88282a433f920ae423239156ec36345fa7881b6e7
kivra/oauth2_client
oauth2c_app.erl
%%%------------------------------------------------------------------- %% @doc oauth2c application callback %% @end %%%------------------------------------------------------------------- -module(oauth2c_app). -behaviour(application). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> oauth2c_sup:start_l...
null
https://raw.githubusercontent.com/kivra/oauth2_client/5fa99000fcb532fa3927c3cff9f2cef5f9bfbda0/src/oauth2c_app.erl
erlang
------------------------------------------------------------------- @doc oauth2c application callback @end -------------------------------------------------------------------
-module(oauth2c_app). -behaviour(application). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> oauth2c_sup:start_link(). stop(_State) -> ok.
a4cf8d049387ab19f4e1fc0f3131ad3c912cfa5f30bb6763b626bcea302179c0
originrose/cortex
project.clj
(defproject thinktopic/cortex-keras "0.9.23-SNAPSHOT" :description "Import of keras models into cortex descriptions" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.9.0-alpha17"] [thinktopic/hdf5 "0.2.1"] [th...
null
https://raw.githubusercontent.com/originrose/cortex/94b1430538e6187f3dfd1697c36ff2c62b475901/importers/keras/project.clj
clojure
(defproject thinktopic/cortex-keras "0.9.23-SNAPSHOT" :description "Import of keras models into cortex descriptions" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.9.0-alpha17"] [thinktopic/hdf5 "0.2.1"] [th...
5be424900e80f95d26d6f5808f7cc225fd48a8cee0474996a061ac0a39d64a1f
default-kramer/plisqin
define-schema.rkt
#lang racket (provide define-schema this table?) (require (only-in "_core.rkt" gen:queryable get-queryable) (only-in "sql/fragment.rkt" fragment? >>) (submod "from.rkt" define-schema-helper) (for-syntax syntax/parse) "_null.rkt" "_types.rkt" (submod "_null.rkt" mo...
null
https://raw.githubusercontent.com/default-kramer/plisqin/26421c7c42656c873c4e0a4fc7f48c0a3ed7770f/plisqin-lib/private2/define-schema.rkt
racket
do the validation here instead. because `(or/c type?)` prints better than `type?` The nullability of the entire expression will be inferred from whatever `this` is plus this fragment: Given that `(CategoryName Category)` and `(CategoryName Product)` are both defined to choose the correct body based on `(get-query...
#lang racket (provide define-schema this table?) (require (only-in "_core.rkt" gen:queryable get-queryable) (only-in "sql/fragment.rkt" fragment? >>) (submod "from.rkt" define-schema-helper) (for-syntax syntax/parse) "_null.rkt" "_types.rkt" (submod "_null.rkt" mo...
804bc83d47221c84547bdf620c07f90638a409bfbac7ef348f404d802ffc5bc0
tov/shcaml
disposal.ml
open Util module type DISPOSABLE = sig type t val equal : t -> t -> bool val hash : t -> int val default : t -> unit end module type DISPOSAL = sig type data val register : (data -> unit) -> data -> data val manage : ?disposer:(data -> unit) -> data -> data val dispose : data -> unit end module...
null
https://raw.githubusercontent.com/tov/shcaml/43ae852a00e3a11520f90f2451baa71863409774/lib/disposal.ml
ocaml
open Util module type DISPOSABLE = sig type t val equal : t -> t -> bool val hash : t -> int val default : t -> unit end module type DISPOSAL = sig type data val register : (data -> unit) -> data -> data val manage : ?disposer:(data -> unit) -> data -> data val dispose : data -> unit end module...
eec7c823391e3f8c6dae8c97b8151bea99dc041b61973bb89fc30d1b92c33ceb
repl-electric/cassiopeia
ruchbah.clj
(ns cassiopeia.destination.ruchbah " ###### # # # # #### # # ##### ## # # # # # # # # # # # # # # # # ###### # # # ###### ##### # # ###### # # # # # # # # # ###### # # # # # # # # # # # # # # # # # # #### #...
null
https://raw.githubusercontent.com/repl-electric/cassiopeia/a42c01752fc8dd04ea5db95c8037f393c29cdb75/src/cassiopeia/destination/ruchbah.clj
clojure
Instruments ;; (t-rand 50 1300 bar-trg) Experiments ;; Score ;; Effects ;; (fx/fx-feedback 0) Emergency sequencer Emergency exit (stop)
(ns cassiopeia.destination.ruchbah " ###### # # # # #### # # ##### ## # # # # # # # # # # # # # # # # ###### # # # ###### ##### # # ###### # # # # # # # # # ###### # # # # # # # # # # # # # # # # # # #### #...
076297da382309f863344dd2713fb97918da1be1fcbf9f49268cb2887daede74
dag/all-about-monads
exercise3.hs
Author : Maintainer : < > Time - stamp : < Mon Nov 17 21:05:51 2003 > License : GPL Maintainer: Jeff Newbern <> Time-stamp: <Mon Nov 17 21:05:51 2003> License: GPL -} DESCRIPTION Exercise 3 - Using the List monad Write functions parent and grandparent with signature...
null
https://raw.githubusercontent.com/dag/all-about-monads/f5efbe7276a090cb1a3ce7ebb97ac28b1b13572e/examples/exercise3.hs
haskell
everything you need to know about sheep we show sheep by name to combine monadic values. Why can we use a simpler definition of grandparent when using the List monad than we could when using the Maybe monad? ANSWER: Because the List monad's combination strategy effectively implements backtracking but the Maybe m...
Author : Maintainer : < > Time - stamp : < Mon Nov 17 21:05:51 2003 > License : GPL Maintainer: Jeff Newbern <> Time-stamp: <Mon Nov 17 21:05:51 2003> License: GPL -} DESCRIPTION Exercise 3 - Using the List monad Write functions parent and grandparent with signature...
6185fa0d73a3187cb053eee6a30253d063962cb068abcc1d2e731b9bf71a5ce8
wies/grasshopper
congruenceClosure.ml
* { 5 Congruence closure computation } open Util open Grass open GrassUtil module rec Node : sig type t = < get_id: int; get_sym: sorted_symbol; get_args: t list; get_arity: int; set_ccparent: NodeSet.t -> unit; add_ccparent: t -> unit; get_ccparent: NodeSet.t; get_pa...
null
https://raw.githubusercontent.com/wies/grasshopper/108473b0a678f0d93fffec6da2ad6bcdce5bddb9/src/prover/congruenceClosure.ml
ocaml
* return pairs of nodes whose equality may change the result of the 'congruent' method * Returns a method that maps a term to its representative * Gets a list of list of equal expressions (connected components). Add top-level disequality unit clauses in fs Add gterms to graph Add disequality between true and fal...
* { 5 Congruence closure computation } open Util open Grass open GrassUtil module rec Node : sig type t = < get_id: int; get_sym: sorted_symbol; get_args: t list; get_arity: int; set_ccparent: NodeSet.t -> unit; add_ccparent: t -> unit; get_ccparent: NodeSet.t; get_pa...
a34efa1e0ec02d799f8b80f1e2088b01400ace8af042909cf4a6cb60c090fb0e
bhauman/figwheel-main
krell_passes.clj
;; ------------------------------------------------------------------------ Code modified from Krell -opensource/krell ;; ------------------------------------------------------------------------ (ns figwheel.main.react-native.krell-passes (:require [cljs.analyzer :as ana] [figwheel.main.compat.ana-api ...
null
https://raw.githubusercontent.com/bhauman/figwheel-main/ead06b94b1b2747ed37e5d8c37118d6e7ae77193/src/figwheel/main/react_native/krell_passes.clj
clojure
------------------------------------------------------------------------ ------------------------------------------------------------------------ util assets passes NOTE: just additive for now, can revisit later if someone finds a performance issue ---------------------------------------------------------------...
Code modified from Krell -opensource/krell (ns figwheel.main.react-native.krell-passes (:require [cljs.analyzer :as ana] [figwheel.main.compat.ana-api :as ana-api] [figwheel.main.util :as fw-util] [cljs.build.api :as build-api] [clojure.edn :as edn] [cloj...
3e7a72a828b33e2de5e7cf0a1f200ba156c6a1cfc40f8ab1f273fc35e298e10f
racket/distro-build
notarize.rkt
#lang racket/base (require racket/promise racket/system racket/match racket/file racket/string "display-time.rkt") (provide notarize-file notarize-file/config file-notarized?) NB : Notarization is a bit weird ; it consists of three steps . 1 ) the bun...
null
https://raw.githubusercontent.com/racket/distro-build/b3cb7cf31356bb3ab35f161ce68948e3200cc504/distro-build-client/notarize.rkt
racket
it consists of three steps . in this file. essentially , the signed bundle is what in crypto you would think of as a signing-request. The strange thing is that success does not "return" approval; it a success notification. approval and mutate the bundle to contain the approval. This final bund...
#lang racket/base (require racket/promise racket/system racket/match racket/file racket/string "display-time.rkt") (provide notarize-file notarize-file/config file-notarized?) 1 ) the bundle must be signed , using ' codesign ' . That does n't happen ...
d350e57e2e0c0e1a9b4203f30945dff6e7e84769714ddaa9fb3f3bc133a5ca62
stchang/graph
graph-weighted.rkt
#lang racket/base (require "gen-graph.rkt") (require "adjlist-utils.rkt") (require "graph-unweighted.rkt") (require racket/sequence racket/set racket/unsafe/ops) ; weighted, adjacency-list graph (provide mk-weighted-graph/undirected mk-weighted-graph/directed weighted-graph? mk-directed-...
null
https://raw.githubusercontent.com/stchang/graph/0ff9a1934f4421c53ec4b71cb48d54a6ad86c7b9/graph-lib/graph/graph-weighted.rkt
racket
weighted, adjacency-list graph (error 'edge-weight "non-existent edge ~a ~a" u v)) returns edges as a sequence and is the internal graph representation (internal adjlist functions and names have a @ suffix) A Weights is a [MutableHashOf Edge -> Number] undirected graph constructor neighborless vertex d...
#lang racket/base (require "gen-graph.rkt") (require "adjlist-utils.rkt") (require "graph-unweighted.rkt") (require racket/sequence racket/set racket/unsafe/ops) (provide mk-weighted-graph/undirected mk-weighted-graph/directed weighted-graph? mk-directed-graph mk-undirected-graph) (defi...
f4138dc262ed0bb3e318195bfe36b592f1175aa3ea9a1f4d855431b22fb693ce
appleshan/cl-http
html-versions.lisp
-*- Mode : lisp ; Syntax : ansi - common - lisp ; Package : html - base ; Base : 10 -*- Last edited by smishra on Fri Jun 28 16:18:58 1996 (in-package :html-base) (define-html-versions (html-2) (netscape-2 html-2) (html-3 html-2) )
null
https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/mcl/contrib/hallvard/html-parser/html-versions.lisp
lisp
Syntax : ansi - common - lisp ; Package : html - base ; Base : 10 -*-
Last edited by smishra on Fri Jun 28 16:18:58 1996 (in-package :html-base) (define-html-versions (html-2) (netscape-2 html-2) (html-3 html-2) )
c0c0d3e198c3343539cd8ec5bd23e04bff5cdde3b6f864cbff91c40e6fcb3eec
input-output-hk/cardano-sl
WalletClient.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # module Cardano.WalletClient ( withdraw , randomAmount ) where import Cardano.Wallet.API.V1.Types (Payment (..), V1 (..)) import qualified Cardano.Wallet.API...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/faucet/src/Cardano/WalletClient.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE OverloadedStrings # | Client function for the handler for the @/withdraw@ action 'Address' | Sends the 'Payment' to the processor queue Returns a 'TMVar' to wait on for the response from the node See 'Cardano.Faucet.Init.processWithdr...
# LANGUAGE ScopedTypeVariables # module Cardano.WalletClient ( withdraw , randomAmount ) where import Cardano.Wallet.API.V1.Types (Payment (..), V1 (..)) import qualified Cardano.Wallet.API.V1.Types as V1 import qualified Control.Concurrent.STM.TBQueue as TBQ import Control.Concurrent.STM....
66435f3cb21be83c6209194f8f085ed95737c6a2ef45acf0302bfe29cf9fc2e2
DaMSL/K3
DataTypes.hs
# LANGUAGE LambdaCase # # LANGUAGE TupleSections # module Language.K3.Metaprogram.DataTypes where import Control.Monad.State import Control.Monad.Trans.Either import Data.Map.Strict ( Map ) import Data.Set ( Set ) import qualified Data.Map.Strict as Map import qualified Data.Set as Set import Language...
null
https://raw.githubusercontent.com/DaMSL/K3/51749157844e76ae79dba619116fc5ad9d685643/src/Language/K3/Metaprogram/DataTypes.hs
haskell
| Metaprogram environment | Haskell-K3 metaprogramming bridge options. | Annotation generation is performed per name-parameter combination. | Metaprogramming state. Generator monad helpers | Run a parser and return its result in the generator monad. | Lift a Haskell interpreter action into the generator monad. ...
# LANGUAGE LambdaCase # # LANGUAGE TupleSections # module Language.K3.Metaprogram.DataTypes where import Control.Monad.State import Control.Monad.Trans.Either import Data.Map.Strict ( Map ) import Data.Set ( Set ) import qualified Data.Map.Strict as Map import qualified Data.Set as Set import Language...
191f675217c33e5abffacb9ddb43f0026aee30a093824f64bf3ffe129ca55ea5
janestreet/core_profiler
probe_id.mli
(** Timer, Probe, Groups and Group points are all assigned globally unique [Id.t]s. *) open! Core (** Each probe ([Intf.S]) has a unique [Probe_id.t] assigned. *) type t = private int [@@deriving bin_io, compare, sexp] include Intable with type t := t include Identifiable.S with type t := t (** [create] returns a [I...
null
https://raw.githubusercontent.com/janestreet/core_profiler/3d1c0e61df848f5f25f78d64beea92b619b6d5d9/src/probe_id.mli
ocaml
* Timer, Probe, Groups and Group points are all assigned globally unique [Id.t]s. * Each probe ([Intf.S]) has a unique [Probe_id.t] assigned. * [create] returns a [Id.t] unique within this process
open! Core type t = private int [@@deriving bin_io, compare, sexp] include Intable with type t := t include Identifiable.S with type t := t val create : unit -> t
0613ac1a2b31533c80bd845d5e7067714e8caa899a7eaf9c15c428a6d8fd6e59
ghcjs/ghcjs-dom
DOMParser.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.DOMParser (js_newDOMParser, newDOMParser, js_parseFromString, parseFromString, ...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/DOMParser.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.DOMParser (js_newDOMParser, newDOMParser, js_parseFromString, parseFromString, parseFromString_, DOMParser(..), gTypeDOMParser) where import Prelude ((.), (==), (>>=), ret...
d30145fb5072c626d55eb3fc9f9636255e19c983446c542a5b0234a5a7f2ea56
cabol/erlbus
chat_cowboy_ws_handler.erl
-module(chat_cowboy_ws_handler). -export([init/3]). -export([websocket_init/3]). -export([websocket_handle/3]). -export([websocket_info/3]). -export([websocket_terminate/3]). -define(CHATROOM_NAME, ?MODULE). -define(TIMEOUT, 5 * 60 * 1000). % Innactivity Timeout -record(state, {name, handler}). %% API init(_, _Req...
null
https://raw.githubusercontent.com/cabol/erlbus/26e5422d9eb841fa78225d00443b9299d857f462/examples/chat/src/chat_cowboy_ws_handler.erl
erlang
Innactivity Timeout API Create the handler from our custom callback Unsubscribe the handler Private methods
-module(chat_cowboy_ws_handler). -export([init/3]). -export([websocket_init/3]). -export([websocket_handle/3]). -export([websocket_info/3]). -export([websocket_terminate/3]). -define(CHATROOM_NAME, ?MODULE). -record(state, {name, handler}). init(_, _Req, _Opts) -> {upgrade, protocol, cowboy_websocket}. websocke...
6a01c1b29513ecbef3856f13d712a85b27c575f54f18b6465b3240899f884bb9
haskell-suite/haskell-names
RecordPattern.hs
# LANGUAGE RecordWildCards # # LANGUAGE NamedFieldPuns # module RecordPattern where data Record a = Record { field :: a } unRecord1 r = field where Record { field = field } = r unRecord2 r = field where Record { field } = r unRecord3 r = field where Record { .. } = r
null
https://raw.githubusercontent.com/haskell-suite/haskell-names/795d717541484dbe456342a510ac8e712e1f16e4/tests/annotations/RecordPattern.hs
haskell
# LANGUAGE RecordWildCards # # LANGUAGE NamedFieldPuns # module RecordPattern where data Record a = Record { field :: a } unRecord1 r = field where Record { field = field } = r unRecord2 r = field where Record { field } = r unRecord3 r = field where Record { .. } = r
eb64ad85882b577d76a45837252502c6af86c34302c0f26d13f235c534853ad9
kelamg/HtDP2e-workthrough
ex237.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-reader.ss" "lang")((modname ex237) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Abstraction/ex237.rkt
racket
about the language level of this file in a form that our tools can easily process. Number Number -> Boolean is the area of a square with side x larger than c
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-reader.ss" "lang")((modname ex237) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define (squared>? x c) (> (* x x) c)) (squared>? 3 10) (...
b3ee9d797f9631eb0f5d690c2dfceffc8f403d8981bddf0e1d4a02e1cf848a17
AndreaCrotti/elo
notifications.clj
(ns byf.notifications (:require [clj-http.client :as http] [clojure.data.json :as json] [byf.config :refer [value]])) (def slack-hook-url (value :slack-hook)) (defn notify-slack [msg] (when (some? slack-hook-url) (http/post slack-hook-url {:content-type :json ...
null
https://raw.githubusercontent.com/AndreaCrotti/elo/98c4b13b2c4e0605015d5d17a8be6cbb78c3f3f6/src/clj/byf/notifications.clj
clojure
(ns byf.notifications (:require [clj-http.client :as http] [clojure.data.json :as json] [byf.config :refer [value]])) (def slack-hook-url (value :slack-hook)) (defn notify-slack [msg] (when (some? slack-hook-url) (http/post slack-hook-url {:content-type :json ...
c921d42da0e04a96457adb638fdf1ec6d6bd6593d6c13587bc695f21aa635e68
sinelaw/infernu
Array.hs
# LANGUAGE TupleSections # module Infernu.Builtins.Array (arrayRowType) where import Control.Monad (foldM) import Infernu.Builtins.Util import Infernu.InferState (Infer) import Infernu.Prelude import Infernu.Types import Infernu.Expr...
null
https://raw.githubusercontent.com/sinelaw/infernu/e8b7aff6ea628c9099fb82aa011eb5c12aca36ba/src/Infernu/Builtins/Array.hs
haskell
missing thisArg missing thisArg missing thisArg missing thisArg
# LANGUAGE TupleSections # module Infernu.Builtins.Array (arrayRowType) where import Control.Monad (foldM) import Infernu.Builtins.Util import Infernu.InferState (Infer) import Infernu.Prelude import Infernu.Types import Infernu.Expr...
aaf07c586937ea0f49ba29a383ee81bf4f3abd5d77bcf1c21b9e4fe79f4482d9
tonyday567/chart-unit
Glyph.hs
# OPTIONS_GHC -Wall # {-# OPTIONS_GHC -Wno-unused-top-binds #-} -- | Glyphs are (typically) small shapes symbolically representing a data point. module Chart.Glyph ( GlyphOptions(..) , defaultGlyphOptions , GlyphShape(..) , glyphShape , glyph_ , glyphs , lglyphs , glyphChart , glyphChart_ , lglyphC...
null
https://raw.githubusercontent.com/tonyday567/chart-unit/5c0aefee55383b7f2dc3d0745dc92f0bd9b0f24a/chart-unit/src/Chart/Glyph.hs
haskell
# OPTIONS_GHC -Wno-unused-top-binds # | Glyphs are (typically) small shapes symbolically representing a data point. ^ glyph radius ^ normalized | shape of the glyph expressed in diagrams terms | convert from chart-unit to diagrams shapes | Create a glyph. > glyph_ def ![glyph_ example](other/glyph_Example.svg...
# OPTIONS_GHC -Wall # module Chart.Glyph ( GlyphOptions(..) , defaultGlyphOptions , GlyphShape(..) , glyphShape , glyph_ , glyphs , lglyphs , glyphChart , glyphChart_ , lglyphChart , lglyphChart_ ) where import Chart.Core import Chart.Text import Diagrams.Prelude hiding (Color, D, scaleX, scal...
62e2f852785851b879bfe2f65c0a3758fca2f8d09b613ce92c0905a7f36785b8
lojic/LearningRacket
phone-number-test.rkt
#lang racket (require "phone-number.rkt") (module+ test (require rackunit rackunit/text-ui) (define suite (test-suite "Tests for the phone-number exercise" (test-case "cleans number" (check-equal? (phone-number "(123) 456-7890") "1234567890")) (test-case "cleans number with do...
null
https://raw.githubusercontent.com/lojic/LearningRacket/eb0e75b0e16d3e0a91b8fa6612e2678a9e12e8c7/exercism.io/phone-number/phone-number-test.rkt
racket
#lang racket (require "phone-number.rkt") (module+ test (require rackunit rackunit/text-ui) (define suite (test-suite "Tests for the phone-number exercise" (test-case "cleans number" (check-equal? (phone-number "(123) 456-7890") "1234567890")) (test-case "cleans number with do...
3b91d18369621c13ab8372d4e820223e4fcdb24d037539b8b837f341b6d9a382
yallop/ocaml-ctypes
test_complex.ml
* Copyright ( c ) 2013 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2013 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) open OUnit2 open Ctypes let...
null
https://raw.githubusercontent.com/yallop/ocaml-ctypes/52ff621f47dbc1ee5a90c30af0ae0474549946b4/tests/test-complex/test_complex.ml
ocaml
test long double complex Test primitive operations on complex numbers passed by value. test long double complex rot-dist test
* Copyright ( c ) 2013 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2013 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) open OUnit2 open Ctypes let...
891cc0d3eec6251bdf46411da7faf3f2c3917fceb6c31f1527f7ef3316af598d
mentat-collective/emmy
ch3_test.cljc
#_"SPDX-License-Identifier: GPL-3.0" (ns emmy.sicm.ch3-test (:refer-clojure :exclude [+ - * / zero? partial]) (:require [clojure.test :refer [is deftest testing use-fixtures]] [emmy.env :as e :refer [+ zero? up down literal-function]] [emmy.examples.driven-pendulum :as driven] ...
null
https://raw.githubusercontent.com/mentat-collective/emmy/535b237a8e3fd7067b9c0ade8b2a4b3419f9f132/test/emmy/sicm/ch3_test.cljc
clojure
sine (of that. So our algorithm is a little on the naive side o_o
#_"SPDX-License-Identifier: GPL-3.0" (ns emmy.sicm.ch3-test (:refer-clojure :exclude [+ - * / zero? partial]) (:require [clojure.test :refer [is deftest testing use-fixtures]] [emmy.env :as e :refer [+ zero? up down literal-function]] [emmy.examples.driven-pendulum :as driven] ...
a61a59fb7b20f63d598a2fc797eea8db55714fe97d26dea00fa7e6da48f48410
huangjs/cl
zbesh.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ " " f2cl6.l ,...
null
https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/src/numerical/slatec/zbesh.lisp
lisp
Compiled by f2cl version: Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':simple-array) (:array-slicing nil) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ " " f2cl6.l , v 1.48 2008/08/24 00:56:27 rt...
58adc1e8f8710ee445339d071f7c1ee816ebe4255710b574cdec311fabca1021
lemonidas/Alan-Compiler
Blocks.ml
open QuadTypes open Quads type basic_block_t = quad_t array type function_block_t = basic_block_t array (* Splits a single function block into flow blocks * IN : Quad_t array * OUT : Array of quad_t array *) let convert_function_to_blocks im_code = (* Variable Declarations *) let length = Array.length im...
null
https://raw.githubusercontent.com/lemonidas/Alan-Compiler/bbedcbf91028d45a2e26839790df2a1347e8bc52/Blocks.ml
ocaml
Splits a single function block into flow blocks * IN : Quad_t array * OUT : Array of quad_t array Variable Declarations Helper Functions Important Functions Before Unit Calls Main function to loop through array In case of breakpoint - increase block number Else, in case previous and current is jump co...
open QuadTypes open Quads type basic_block_t = quad_t array type function_block_t = basic_block_t array let convert_function_to_blocks im_code = let length = Array.length im_code in let breakpoint = Array.make length false in let blocks = Array.make length 0 in let block_no = ref 0 in let extract_jump_v...
7f8605f0fc33284952cfa87b87188bb812c07d284e1c5144e8333f9eed39d150
LeiWangHoward/Common-Lisp-Playground
date-time.lisp
A toy date - time formatting package for WebActions demo (defpackage #:time (:use :common-lisp) (:export #:get-date-string #:get-month-string #:get-time-string #:get-timestamp-string)) (in-package #:time) (defun get-date-string (&optional (utime (get-universal-time))) (multiple-value...
null
https://raw.githubusercontent.com/LeiWangHoward/Common-Lisp-Playground/4130232954f1bbf8aa003d856ccb2ab382da0534/web/bug-explaner/date-time.lisp
lisp
A toy date - time formatting package for WebActions demo (defpackage #:time (:use :common-lisp) (:export #:get-date-string #:get-month-string #:get-time-string #:get-timestamp-string)) (in-package #:time) (defun get-date-string (&optional (utime (get-universal-time))) (multiple-value...
635a64061e30a0be5f501aa07c2b83f8c0e2f421e10d9e8cdd64332b106c844a
Tim-ats-d/Laius
statusbar_widget.ml
open Context class styled_label initial_text ~style = object (self) inherit LTerm_widget.label initial_text as super initializer self#set_text initial_text method! draw ctx _focused = super#draw ctx _focused; LTerm_draw.fill_style ctx style end class author ?(style = LTerm_style.none) ss...
null
https://raw.githubusercontent.com/Tim-ats-d/Laius/feb8336fe72751b28fa574ed9e9d3d06c9e13843/src/statusbar_widget.ml
ocaml
open Context class styled_label initial_text ~style = object (self) inherit LTerm_widget.label initial_text as super initializer self#set_text initial_text method! draw ctx _focused = super#draw ctx _focused; LTerm_draw.fill_style ctx style end class author ?(style = LTerm_style.none) ss...
b5763c2bcb85437d7f0bf4cfd7fbc516e30e56525529fc0a9c2d340d59dc7bbd
danr/hipspec
Read.hs
| Gets the GHC Core information we need , also obtains or creates the signature {-# LANGUAGE RecordWildCards, CPP #-} module HipSpec.Read (execute,EntryResult(..),SigInfo(..)) where import Test.QuickSpec.Signature (Sig) import HipSpec.ParseDSL import Data.List.Split (splitOn) import HipSpec.Sig.Resolve impor...
null
https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/src/HipSpec/Read.hs
haskell
# LANGUAGE RecordWildCards, CPP # # ANN module "HLint: ignore Use camelCase" # Use -threaded Set interpreted so we can get the signature, and expose all unfoldings Set the context for evaluation Also include the imports the module is importing Get ids in scope to find the properties (fix their unfoldings, too) M...
| Gets the GHC Core information we need , also obtains or creates the signature module HipSpec.Read (execute,EntryResult(..),SigInfo(..)) where import Test.QuickSpec.Signature (Sig) import HipSpec.ParseDSL import Data.List.Split (splitOn) import HipSpec.Sig.Resolve import HipSpec.Sig.Make import HipSpec.Sig....
01a25d8e9495d6f47186fccfa22f866ee113493ac53b3d5b4eb5eb6a8e2bb07c
heechul/crest-z3
blockinggraph.ml
* * Copyright ( c ) 2001 - 2002 , * < > * < > * < > * 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 . Redistributions...
null
https://raw.githubusercontent.com/heechul/crest-z3/cfcebadddb5e9d69e9956644fc37b46f6c2a21a0/cil/src/ext/blockinggraph.ml
ocaml
For each function we have a node Fresh ids for each node. My type signature ignores attributes and function pointers. We add a dummy function whose name is "@@functionPointer@@" that is called * at all invocations of function pointers and itself calls all functions * whose address is taken. We map names to ...
* * Copyright ( c ) 2001 - 2002 , * < > * < > * < > * 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 . Redistributions...
312bd5d683820c2b52e03dc205459fdb09dc61f36c7d1234d8578067b86c7548
dselsam/arc
Shape.hs
Copyright ( c ) 2020 Microsoft Corporation . All rights reserved . Released under Apache 2.0 license as described in the file LICENSE . Authors : , , . # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE StrictData #-} module Lib.Shape where impo...
null
https://raw.githubusercontent.com/dselsam/arc/7e68a7ed9508bf26926b0f68336db05505f4e765/src/Lib/Shape.hs
haskell
# LANGUAGE StrictData # Helpers Int features Bool features Set-valued features Transformations TODO: store this in the shape? TODO: handle the edge cases This is perf-relevant TODO: maybe, in case it is not an enclosing rectangle frameRectWithOneSided :: (Show a) => a -> Shape a -> Axis -> Direction -> Shape ...
Copyright ( c ) 2020 Microsoft Corporation . All rights reserved . Released under Apache 2.0 license as described in the file LICENSE . Authors : , , . # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # module Lib.Shape where import Debug.Trace import Util.I...
dad5fb98bdba2657b2767e21801fec9621630cfe816e67514b2ee156cea2e47e
privet-kitty/cl-competitive
parse-fixnum.lisp
(defpackage :cp/test/parse-fixnum (:use :cl :fiveam :cp/parse-fixnum) (:import-from :cp/test/base #:base-suite)) (in-package :cp/test/parse-fixnum) (in-suite base-suite) (test parse-fixnum (is (= 1234567890987654321 (parse-fixnum " 1234567890987654321"))) (is (= -1234567890987654321 (parse-fixnum "-12345678909...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/test/parse-fixnum.lisp
lisp
(defpackage :cp/test/parse-fixnum (:use :cl :fiveam :cp/parse-fixnum) (:import-from :cp/test/base #:base-suite)) (in-package :cp/test/parse-fixnum) (in-suite base-suite) (test parse-fixnum (is (= 1234567890987654321 (parse-fixnum " 1234567890987654321"))) (is (= -1234567890987654321 (parse-fixnum "-12345678909...
79a3229447ec633be821b2421e9fa8cf8e36325a88b3fe9df92342a79aeed9eb
vbrankov/hdf5-ocaml
ex_lite2.ml
open Bigarray open Hdf5_raw let () = let data = Array1.create int32 c_layout 6 in let file_id = H5f.open_ "ex_lite1.h5" H5f.Acc.([ RDONLY ]) in H5lt.read_dataset_int32 file_id "/dset" (genarray_of_array1 data); let dataset_info = H5lt.get_dataset_info file_id "/dset" in let dims = dataset_info.H5lt.Dataset_i...
null
https://raw.githubusercontent.com/vbrankov/hdf5-ocaml/7abc763189767cd6c92620f29ce98f6ee23ba88f/examples/hl/ex_lite2.ml
ocaml
open Bigarray open Hdf5_raw let () = let data = Array1.create int32 c_layout 6 in let file_id = H5f.open_ "ex_lite1.h5" H5f.Acc.([ RDONLY ]) in H5lt.read_dataset_int32 file_id "/dset" (genarray_of_array1 data); let dataset_info = H5lt.get_dataset_info file_id "/dset" in let dims = dataset_info.H5lt.Dataset_i...
3e7bfb956730f10331ca306658533d3256cd2e969f691ed3962e761c8a63b8e7
Mathnerd314/stroscot
Build.hs
# LANGUAGE LambdaCase # # LANGUAGE RecordWildCards , PatternGuards , ScopedTypeVariables , NamedFieldPuns , GADTs # # LANGUAGE Rank2Types , ConstraintKinds , TupleSections , ViewPatterns # module Development.Shake.Internal.Core.Build( getDatabaseValue, getDatabaseValueGeneric, historyIsEnabled, historySave, hi...
null
https://raw.githubusercontent.com/Mathnerd314/stroscot/08b4cb638369a71e1e52fce5710a11e235e9e120/src/shake/Build.hs
haskell
------------------------------------------------------------------- LOW-LEVEL OPERATIONS ON THE DATABASE actually safe because we only lose the Locked to enter the diagnostic context ------------------------------------------------------------------- QUERIES ----------------------------------------------------------...
# LANGUAGE LambdaCase # # LANGUAGE RecordWildCards , PatternGuards , ScopedTypeVariables , NamedFieldPuns , GADTs # # LANGUAGE Rank2Types , ConstraintKinds , TupleSections , ViewPatterns # module Development.Shake.Internal.Core.Build( getDatabaseValue, getDatabaseValueGeneric, historyIsEnabled, historySave, hi...
d885d457f0b1f2fd476da81e1c1a2731ca1077ec7a16cfb57aec4f622f4e4c21
elliottt/dang
Rename.hs
# LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TypeFamilies # {-# LANGUAGE Rank2Types #-} module Dang.ModuleSystem.Rename ( Renamed, renameModule, ) where import Dang.AST import Dang.Monad import Dang.Syntax.AST import Dang.Syntax.Location ...
null
https://raw.githubusercontent.com/elliottt/dang/490170c0ec674c4ce479108425e759dd4fd5a34b/src/Dang/ModuleSystem/Rename.hs
haskell
# LANGUAGE Rank2Types # | Rename a top-level module. ------------------------------------------------------------ ^ Fully-qualified namespace ^ Relative prefix XXX: is this just an error? | Enter a module, and push a new scope on the context stack. | A local scope, introduced by a declaration. | The global names...
# LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TypeFamilies # module Dang.ModuleSystem.Rename ( Renamed, renameModule, ) where import Dang.AST import Dang.Monad import Dang.Syntax.AST import Dang.Syntax.Location import Dang.ModuleSystem.Env...
8772d60dc752afe0220a83cd16796cce13e08142693669e415d37a56197ff29d
ryanpbrewster/haskell
012.hs
Project Euler problem 12 Find the first triangle number with more than n divisors , where n = 500 A triangle number is a number t(k ) = 1 + 2 + ... + k = k*(k+1)/2 -- -- There are a couple of ways to determine the number of divisors of n The easiest is to count how many elements , x , in [ 1 .. n ] obey n ` mo...
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/src/Old/012.hs
haskell
There are a couple of ways to determine the number of divisors of n care of sqrt(n) in an intelligent way The fastest way is to factor n into p1^e1 * p2^e2 * ... * pk^ek The number of divisors is then (e1+1)*(e2+1)*...*(ek+1) Last note: In general, sigma_k(n) = Total[Divisors[n]^k] So if you want to find the ...
Project Euler problem 12 Find the first triangle number with more than n divisors , where n = 500 A triangle number is a number t(k ) = 1 + 2 + ... + k = k*(k+1)/2 The easiest is to count how many elements , x , in [ 1 .. n ] obey n ` mod ` x = = 0 A faster way is to count from [ 1 .. sqrt(n ) ] . Any x that...
75a1d32efe70608c0f9d8e7cb0a400bfd6f5131800028842a0c71e0fe931daa7
roman01la/minimax
attachment.clj
(ns minimax.renderer.attachment (:require [bgfx.core :as bgfx]) (:import (clojure.lang IDeref) (org.lwjgl.bgfx BGFXAttachment))) (set! *warn-on-reflection* true) (defprotocol IAttachment (init [this texture-handle])) (deftype Attachment [handle] IAttachment (init [this texture-handle] (bgfx/...
null
https://raw.githubusercontent.com/roman01la/minimax/f371c199d55a2a219ed7cf5f2dd2e079be99f963/src/minimax/renderer/attachment.clj
clojure
(ns minimax.renderer.attachment (:require [bgfx.core :as bgfx]) (:import (clojure.lang IDeref) (org.lwjgl.bgfx BGFXAttachment))) (set! *warn-on-reflection* true) (defprotocol IAttachment (init [this texture-handle])) (deftype Attachment [handle] IAttachment (init [this texture-handle] (bgfx/...
91750fb6dae176db5d8696aafafaaafa879412cae2e248f241ebb2a878db4086
biocaml/cfstream
CFStream_stream.ml
open Core_kernel include Stream let next_exn = next let next s = try Some (next_exn s) with | Stream.Failure -> None ;; let npeek s n = npeek n s let is_empty s = match peek s with | None -> true | Some _ -> false ;; let empty () = from (const None) let to_stream x = x let of_stream x = x exception Expe...
null
https://raw.githubusercontent.com/biocaml/cfstream/d04a04f1323966fd69c0ee6dc9274f9c89c8c12d/lib/CFStream_stream.ml
ocaml
Everything from the head has been copied to the queue already Copy everything to the queue As opposed to concat, we use next here to avoid infinite looping.
open Core_kernel include Stream let next_exn = next let next s = try Some (next_exn s) with | Stream.Failure -> None ;; let npeek s n = npeek n s let is_empty s = match peek s with | None -> true | Some _ -> false ;; let empty () = from (const None) let to_stream x = x let of_stream x = x exception Expe...
9d5f30ce836e87362ad24709573bc87a0605bad9026ed9792b1afaa9b1115bb2
bmeurer/ocamljit2
str.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/otherlibs/str/str.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with $ Id$ let string_before s n = Strin...
c5bdddff7bfc6de990fca47b67e6d25183013f9f48670f29d021f214b264231c
janestreet/vcaml
msgpack_rpc.mli
open Base open Async_kernel (** Implements the Msgpack RPC protocol. See -rpc/msgpack-rpc/blob/master/spec.md *) module Event : sig type t = { method_name : string ; params : Msgpack.t list } [@@deriving sexp_of] end module Error : sig * [ Fatal_parse_failure ] happens when we receive data that ...
null
https://raw.githubusercontent.com/janestreet/vcaml/b02fc56c48746fa18a6bc9a0f8fb85776db76977/msgpack/rpc/src/msgpack_rpc.mli
ocaml
* Implements the Msgpack RPC protocol. See -rpc/msgpack-rpc/blob/master/spec.md * Once [connect] is called the counterparty can start calling methods and sending notifications. Any methods that should be callable at that time should be registered beforehand, as should any subscriptions to the event bus. Ca...
open Base open Async_kernel module Event : sig type t = { method_name : string ; params : Msgpack.t list } [@@deriving sexp_of] end module Error : sig * [ Fatal_parse_failure ] happens when we receive data that does not conform to the specification . Parsing stops and if [ close_reader_and_...
096b6af5794106808098a660837985c1ba31b8ca2c11e27a547676247625c84c
erlangonrails/devdb
ejabberd_stun.erl
%%%------------------------------------------------------------------- File : ejabberd_stun.erl Author : < > %%% Description : RFC5389 implementation. %%% Currently only Binding usage is supported. %%% Created : 8 Aug 2009 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2010 Proc...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/ejabberd-2.1.4/src/stun/ejabberd_stun.erl
erlang
------------------------------------------------------------------- Description : RFC5389 implementation. Currently only Binding usage is supported. This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the ho...
File : ejabberd_stun.erl Author : < > Created : 8 Aug 2009 by < > ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU...
978adbd015fbe9a6cae75f2104d929d6c6b798715f4082747cbd94590c0adc44
NoRedInk/haskell-libraries
Query.hs
# LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # -- | -- Description : Helpers for running queries. -- -- This module expose some helpers for running postgresql-typed queries. They -- return the correct amount of results in a Servant handler, or throw a -- Rollbarred error. module Postgres.Query ( sql, Quer...
null
https://raw.githubusercontent.com/NoRedInk/haskell-libraries/7af1e05549e09d519b08ab49dff956b5a97d4f7e/nri-postgresql/src/Postgres/Query.hs
haskell
| Description : Helpers for running queries. This module expose some helpers for running postgresql-typed queries. They return the correct amount of results in a Servant handler, or throw a Rollbarred error. | Run a query against Postgres | The raw SQL string | The query string as extracted from an `sql` quasi...
# LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # module Postgres.Query ( sql, Query (..), Error (..), format, details, ) where import Control.Monad (void) import Data.String (String) import qualified Data.Text.Encoding import Database.PostgreSQL.Typed (PGConnection, pgSQL, useTPGDatabase) imp...
489c8b86060c1c073bc8a37374cbcc3d63abc12cf32971768b52af9049e3c94c
triffon/fp-2019-20
11--forall.rkt
#lang racket (require rackunit rackunit/text-ui) (require "06--accumulate.rkt") (define (1+ n) (+ 1 n)) # # # Задача 11 Напишете функция ` ( forall ? pred ? a b ) ` , която проверява дали за число в интервала [ a , b ] предикатът ` pred ? ` е истина . (define (forall? pred? a b) (accumulate (lambda (x y) ...
null
https://raw.githubusercontent.com/triffon/fp-2019-20/7efb13ff4de3ea13baa2c5c59eb57341fac15641/exercises/computer-science-2/03--higher-order-functions--accumulate/solutions/11--forall.rkt
racket
#lang racket (require rackunit rackunit/text-ui) (require "06--accumulate.rkt") (define (1+ n) (+ 1 n)) # # # Задача 11 Напишете функция ` ( forall ? pred ? a b ) ` , която проверява дали за число в интервала [ a , b ] предикатът ` pred ? ` е истина . (define (forall? pred? a b) (accumulate (lambda (x y) ...
592683070a7b8adc5ded4a76437309780373a1cfd2126b887f32f46c31a1aabc
HackingGibsons/clubot
build.lisp
;; Help image reloading find the correct libraries ;; Designed tp be loaded during a buildapp run ;; to make sure that the resulting image will not use ;; just the absolute paths of shared objects that it tries to re-open on load (with-unlocked-packages (:sb-alien) (let ((function (symbol-function 'sb-alien::try-reop...
null
https://raw.githubusercontent.com/HackingGibsons/clubot/7f373158cf872130730e3f4a1a56338752fd8e30/src/patches/build.lisp
lisp
Help image reloading find the correct libraries Designed tp be loaded during a buildapp run to make sure that the resulting image will not use just the absolute paths of shared objects that it tries to re-open on load
(with-unlocked-packages (:sb-alien) (let ((function (symbol-function 'sb-alien::try-reopen-shared-object))) (setf (symbol-function 'sb-alien::try-reopen-shared-object) #'(lambda (obj) "Look at the pathname of the library we are trying to re-open and only use the full absolute path if the n...
22e5213e0252c24dd818b9a79d87f497817a2a4356e99ff2d889f7f07b4beca6
lipas-liikuntapaikat/lipas
db.cljs
(ns lipas.ui.stats.city.db (:require [lipas.reports :as reports] [lipas.ui.utils :as utils])) (def default-db {:selected-cities #{179} :finance {:metrics reports/stats-metrics :selected-metrics ["net-costs" "investments"] :city-services reports/city-services :sele...
null
https://raw.githubusercontent.com/lipas-liikuntapaikat/lipas/f60185b597d2a7fca5480b392cd33187bccfb34a/webapp/src/cljs/lipas/ui/stats/city/db.cljs
clojure
(ns lipas.ui.stats.city.db (:require [lipas.reports :as reports] [lipas.ui.utils :as utils])) (def default-db {:selected-cities #{179} :finance {:metrics reports/stats-metrics :selected-metrics ["net-costs" "investments"] :city-services reports/city-services :sele...
f55e9ccc9f8c149bd145ca30396bde722a5ba711a06315ce3af5fe69cd1d3d17
mejgun/haskell-tdlib
LeaveGroupCall.hs
{-# LANGUAGE OverloadedStrings #-} -- | module TD.Query.LeaveGroupCall where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U -- | Leaves a group call @group_call_id Group call identifier data LeaveGroupCall = LeaveGroupCall { -- | group_call_id :: Maybe Int...
null
https://raw.githubusercontent.com/mejgun/haskell-tdlib/81516bd04c25c7371d4a9a5c972499791111c407/src/TD/Query/LeaveGroupCall.hs
haskell
# LANGUAGE OverloadedStrings # | | |
module TD.Query.LeaveGroupCall where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U Leaves a group call @group_call_id Group call identifier data LeaveGroupCall = LeaveGroupCall group_call_id :: Maybe Int } deriving (Eq) instance Show LeaveGroupCall whe...
2ff0f7c46a6819ba2a55858ea885e44e8de744e7ef557c2f9536f0a935d1ebda
pouriya/cfg
cfg.erl
%%% ---------------------------------------------------------------------------- @author < > %%% @hidden %% ----------------------------------------------------------------------------- -module(cfg). -author(''). %% ----------------------------------------------------------------------------- %% Exports: %% API -e...
null
https://raw.githubusercontent.com/pouriya/cfg/b03eb73549e2fa11b88f91db73f700d7e6ef4617/src/cfg.erl
erlang
---------------------------------------------------------------------------- @hidden ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- Exports: API Reader API: Filter API: Keeper API: Server API: -------...
@author < > -module(cfg). -author(''). -export( [ load/3, read_and_filter/2 ] ). -export( [ read/1, is_cfg/1 ] ). -export( [ filter/2, get_application_filters/1, get_module_filters/1 ] ). -export( [ init/1, set/2...
f3cf7d8d811a5df53bb8e50960be724301ac9ae10058da99110fe98116e4932a
mojombo/ernie
ext.erl
-module(ext). -export([shadow_pred/1, shadow/1]). shadow_pred(X) -> X > 10. shadow(_X) -> <<"erlang">>.
null
https://raw.githubusercontent.com/mojombo/ernie/a21664e668038291bdbe42684d46cb112242aa7b/examples/ext.erl
erlang
-module(ext). -export([shadow_pred/1, shadow/1]). shadow_pred(X) -> X > 10. shadow(_X) -> <<"erlang">>.
ca20f9018561f35d333940e277d3b69f2a60e096303efe281c6e0b8ac9b58c9a
xtdb/xtdb
h2.clj
(ns xtdb.corda.h2 (:require [xtdb.api :as xt] [xtdb.corda :as xt.corda] [juxt.clojars-mirrors.nextjdbc.v1v2v674.next.jdbc :as jdbc]) (:import (java.time OffsetDateTime LocalDate LocalTime ZoneOffset) (java.util Date) org.h2.api.TimestampWithTimeZone)) (defn ->dialect [...
null
https://raw.githubusercontent.com/xtdb/xtdb/e2f51ed99fc2716faa8ad254c0b18166c937b134/labs/corda/xtdb-corda/src/main/clojure/xtdb/corda/h2.clj
clojure
(ns xtdb.corda.h2 (:require [xtdb.api :as xt] [xtdb.corda :as xt.corda] [juxt.clojars-mirrors.nextjdbc.v1v2v674.next.jdbc :as jdbc]) (:import (java.time OffsetDateTime LocalDate LocalTime ZoneOffset) (java.util Date) org.h2.api.TimestampWithTimeZone)) (defn ->dialect [...
ca30173bc9c99fba480494f00aa438150b09c776f1c75d0e20fa22df92343535
justinethier/nugget
app.scm
((lambda (x) x) (+ 41 1)) ;(++ (+ 41 1))
null
https://raw.githubusercontent.com/justinethier/nugget/0c4e3e9944684ea83191671d58b5c8c342f64343/cyclone/tests/app.scm
scheme
(++ (+ 41 1))
((lambda (x) x) (+ 41 1))
66500f17fee04b7f6f985a76407d661a28b23dd4e6ba029c97e9de5593f99041
auser/beehive
app.erl
{name, "test_rails_app"}. {url, ""}. {template, rails}.
null
https://raw.githubusercontent.com/auser/beehive/dfe257701b21c56a50af73c8203ecac60ed21991/docs/app.erl
erlang
{name, "test_rails_app"}. {url, ""}. {template, rails}.
a929969666d80b7071dab5b8fe54cf1d6f2ba44b49cb67d013e858225923e013
glotcode/glot-www
Snippets.hs
module Handler.Snippets where import Import import Util.Handler (pageNo, title) import Widget.Pagination (paginationWidget) import qualified Glot.Pagination as Pagination import qualified Util.Persistent as Persistent import qualified Util.Snippet as Snippet import qualified Util.Multiline as Multiline import qualifie...
null
https://raw.githubusercontent.com/glotcode/glot-www/cf259c346874a9003f80bee41d3f18c5f0d1ce85/Handler/Snippets.hs
haskell
module Handler.Snippets where import Import import Util.Handler (pageNo, title) import Widget.Pagination (paginationWidget) import qualified Glot.Pagination as Pagination import qualified Util.Persistent as Persistent import qualified Util.Snippet as Snippet import qualified Util.Multiline as Multiline import qualifie...
8bc955b14193f5d6be570ba4649249bc67619347847656890aa1b41ed1add76a
dfinity/motoko
source_file_tests.ml
module Lsp = Lsp.Lsp_t let extract_cursor input = let cursor_pos = ref (0, 0) in String.split_on_char '\n' input |> List.mapi (fun line_num line -> match String.index_opt line '|' with | Some column_num -> cursor_pos := (line_num, column_num); line |> String.split_on_c...
null
https://raw.githubusercontent.com/dfinity/motoko/209bc0429c06e5a578ada2bd87306456a6dc325f/src/languageServer/source_file_tests.ml
ocaml
module Lsp = Lsp.Lsp_t let extract_cursor input = let cursor_pos = ref (0, 0) in String.split_on_char '\n' input |> List.mapi (fun line_num line -> match String.index_opt line '|' with | Some column_num -> cursor_pos := (line_num, column_num); line |> String.split_on_c...
8bc0182a2572f9c77a9a93ea3036c044d77744fbf41b984ba0a9d3586664fa55
ih/ikarus.dev
prefix-gambit.scm
;INSERTCODE ;------------------------------------------------------------------------------ (define (run-bench name count ok? run) (let loop ((i count) (result '(undefined))) (if (< 0 i) (loop (- i 1) (run)) result))) (define (run-benchmark name count ok? run-maker . args) (newline) (let* ((run ...
null
https://raw.githubusercontent.com/ih/ikarus.dev/8bb0c8e4d1122cf0f9aeb675cb51bc7df178959b/benchmarks.larceny/prefix/prefix-gambit.scm
scheme
INSERTCODE ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ This code should be used when f64vectors are available. (def-macro (FLOATmake-vector n . init) `(make-f64vector ,n ,@init)) (def-macro (FLOATvector-re...
(define (run-bench name count ok? run) (let loop ((i count) (result '(undefined))) (if (< 0 i) (loop (- i 1) (run)) result))) (define (run-benchmark name count ok? run-maker . args) (newline) (let* ((run (apply run-maker args)) (result (time (run-bench name count ok? run)))) (if (no...
c9afd7f17179fe39c6355ee24a52a74d1c8798063d985afe4530ae8de4e04bad
zotonic/zotonic
mod_filestore.erl
@author < > 2014 - 2022 %% @doc Module managing the storage of files on remote servers. %% @end Copyright 2014 - 2022 %% 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 %...
null
https://raw.githubusercontent.com/zotonic/zotonic/5a6d9e3fb535a5cb666fe546adfb63bf67e07718/apps/zotonic_mod_filestore/src/mod_filestore.erl
erlang
@doc Module managing the storage of files on remote servers. @end 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 o...
@author < > 2014 - 2022 Copyright 2014 - 2022 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(mod_filestore). -author("Marc Worrell <>"). -mod_title("File Storage"). -mod_description("Store files on c...
ca130daa65067dd856aa7e0ea63843aa0f81f1894664ef3d6ca57871986223da
tweag/sparkle
Main.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE DataKinds # module Main where import Control.Distributed.Spark import Control.Distributed.Spark.SQL.Dataset as Dataset import Data.Int (Int32) main :: IO () main = forwardUnhandledExceptionsToSpark $ do conf <- newSparkConf "Sparkle Dataset demo" confSet conf "s...
null
https://raw.githubusercontent.com/tweag/sparkle/ea4f4e96d0c8199ba7f75b08ca0a9c10475b596f/apps/deltalake-glow/Main.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE DataKinds # module Main where import Control.Distributed.Spark import Control.Distributed.Spark.SQL.Dataset as Dataset import Data.Int (Int32) main :: IO () main = forwardUnhandledExceptionsToSpark $ do conf <- newSparkConf "Sparkle Dataset demo" confSet conf "spark.jars.packages" "io.delta:delta...
8609d60a2fd222678ebb55248df07c8e282f9511d3c90ee59c22cb61c534070e
camlp5/camlp5
reloc.ml
(* camlp5r *) (* reloc.ml,v *) Copyright ( c ) INRIA 2007 - 2017 #load "pa_macro.cmo"; open MLast; value option_map f = fun [ Some x -> Some (f x) | None -> None ] ; value vala_map f = IFNDEF STRICT THEN fun x -> f x ELSE fun [ Ploc.VaAnt s -> Ploc.VaAnt s | Ploc.VaVal x -> Ploc.VaVal (f...
null
https://raw.githubusercontent.com/camlp5/camlp5/9e8155f8ae5a584bbb4ad96d10d6fec63ed8204c/main/reloc.ml
ocaml
camlp5r reloc.ml,v ...<:expr<.....$lid:...xxxxxxxx...$...>>... |..|-----------------------------------| qloc <-----> sh |.........|------------| loc |..|------| loc1 Equality over syntax trees
Copyright ( c ) INRIA 2007 - 2017 #load "pa_macro.cmo"; open MLast; value option_map f = fun [ Some x -> Some (f x) | None -> None ] ; value vala_map f = IFNDEF STRICT THEN fun x -> f x ELSE fun [ Ploc.VaAnt s -> Ploc.VaAnt s | Ploc.VaVal x -> Ploc.VaVal (f x) ] END ; value class_info...
b002caef6ba0cb6aae075046a62cebf46fd5d0db9c35e1279b0e5d25c9422787
dwayne/eopl3
exb.3.test.rkt
#lang racket (require "./exb.3.rkt") (require rackunit) (check-eq? (interpret "1") 1) (check-eq? (interpret "12345") 12345) (check-eq? (interpret "1+23") 24) (check-eq? (interpret "45-6") 39) (check-eq? (interpret "7*8") 56) (check-eq? (interpret "99/3") 33) (check-eq? (interpret "5-2-1") 2) (check-eq? (interpret ...
null
https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/appendix-b/exb.3.test.rkt
racket
#lang racket (require "./exb.3.rkt") (require rackunit) (check-eq? (interpret "1") 1) (check-eq? (interpret "12345") 12345) (check-eq? (interpret "1+23") 24) (check-eq? (interpret "45-6") 39) (check-eq? (interpret "7*8") 56) (check-eq? (interpret "99/3") 33) (check-eq? (interpret "5-2-1") 2) (check-eq? (interpret ...
a48a954e1f4b18a3d926d11870964fe3a05ad2807239cffca67eb522ecb1f239
clash-lang/clash-prelude
Bundle.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE KindSignatures # # LANGUAGE NoImplicitPrelude # # LANGUAGE PolyKinds # {-# LANGUAGE TypeFamilies #-} # LANGUAGE TypeFamilyDependencies # {-# LANGUAGE ...
null
https://raw.githubusercontent.com/clash-lang/clash-prelude/5645d8417ab495696cf4e0293796133c7fe2a9a7/src/Clash/Explicit/Signal/Delayed/Bundle.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # | Isomorphism between a 'Clash.Explicit.Signal.Delayed' of a product type Instances of 'Bundle' must satisfy the following laws: @ 'bu...
# LANGUAGE KindSignatures # # LANGUAGE NoImplicitPrelude # # LANGUAGE PolyKinds # # LANGUAGE TypeFamilyDependencies # module Clash.Explicit.Signal.Delayed.Bundle ( Bundle, Unbundled, bundle, unbundle, ) where import Control.Applicative (liftA2) import ...
cae0bcc41322f9bdc2d3fdbe6ced9078251d1231e21b50dfdc4231ea2cf929c8
jaredly/belt
belt_Array.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/jaredly/belt/4d07f859403fdbd3fbfc5a9547c6066d657a2131/belt_src/belt_Array.ml
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with external length: 'a array -> int = "%a...
b6b76a523140e688c8d711d0e3817fa180acafcface79076cd114cf8350a1eb5
inria-parkas/sundialsml
test_nvector_pthreads.ml
* ----------------------------------------------------------------- * $ Revision : 4454 $ * $ Date : 2015 - 03 - 28 18:06:50 ( Sat , 28 Mar 2015 ) $ * ----------------------------------------------------------------- * Programmer(s ): @ LLNL * ------------------------------------------------------...
null
https://raw.githubusercontent.com/inria-parkas/sundialsml/a72ebfc84b55470ed97fbb0b45d700deebfc1664/examples/nvector/pthreads/test_nvector_pthreads.ml
ocaml
---------------------------------------------------------------------- * Main NVector Testing Routine * -------------------------------------------------------------------- check inputs, set vector length, and number of threads Create vectors Fused and vector array operations tests (disabled) fused operations...
* ----------------------------------------------------------------- * $ Revision : 4454 $ * $ Date : 2015 - 03 - 28 18:06:50 ( Sat , 28 Mar 2015 ) $ * ----------------------------------------------------------------- * Programmer(s ): @ LLNL * ------------------------------------------------------...
d13de73a3dec1d88f69785b0e6c01ad750930d18922aabf1353ea8698cb44d4a
anmonteiro/ocaml-h2
flags.ml
---------------------------------------------------------------------------- * Copyright ( c ) 2019 * * 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/anmonteiro/ocaml-h2/1aea7e0aebb2c440dc35ef35ca15d87d44799f4e/lib/flags.ml
ocaml
From RFC7540§6.2: * Flags that have no defined semantics for a particular frame type MUST be * ignored and MUST be left unset (0x0) when sending.
---------------------------------------------------------------------------- * Copyright ( c ) 2019 * * 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...
df516a8d6c666a8d7dbcd67ac3f142e79a37c1e8cc27cfe5b7b9c2c4992252c8
xh4/cube
package.lisp
(in-package :cl-user) (defpackage cube (:use :cl) (:import-from :alexandria :appendf :when-let) (:import-from :optima :match) (:import-from :cl-change-case :param-case) (:import-from :cl-hash-util :hash-get) (:import-from :cl-b...
null
https://raw.githubusercontent.com/xh4/cube/60c60f2b6e1a75bae98ce4a3094dbb745ab3a87b/package.lisp
lisp
(in-package :cl-user) (defpackage cube (:use :cl) (:import-from :alexandria :appendf :when-let) (:import-from :optima :match) (:import-from :cl-change-case :param-case) (:import-from :cl-hash-util :hash-get) (:import-from :cl-b...
27d033f34755ac6b7e049d400d1f97fba8f2c79ab9162d425cdd75a95da41a25
djblue/portal
cson.cljc
(ns ^:no-doc portal.runtime.cson "Clojure/Script Object Notation" (:refer-clojure :exclude [read]) #?(:cljs (:require [goog.crypt.base64 :as Base64] [portal.runtime.json-buffer :as json] [portal.runtime.macros :as m]) :cljr (:require [portal.runtime.json-buffer :as j...
null
https://raw.githubusercontent.com/djblue/portal/ffff2b9d24675e3cbb6873955f2b7a691c3d5470/src/portal/runtime/cson.cljc
clojure
(ns ^:no-doc portal.runtime.cson "Clojure/Script Object Notation" (:refer-clojure :exclude [read]) #?(:cljs (:require [goog.crypt.base64 :as Base64] [portal.runtime.json-buffer :as json] [portal.runtime.macros :as m]) :cljr (:require [portal.runtime.json-buffer :as j...
44fe5db6502d1fbc29341f78195f57d5ae66d0972716472e41b8fdc7e1bbd7a2
c089/haskell-craft3e
Pictures.hs
----------------------------------------------------------------------- Haskell : The Craft of Functional Programming ( c ) Addison - Wesley , 1996 - 2010 . -- Pictures.hs -- -- An implementation of a type of rectangular pictures -- using lists of lists of characters. -------------------------...
null
https://raw.githubusercontent.com/c089/haskell-craft3e/869e382601cab50559c4473dfa9c7480f1acba58/Pictures.hs
haskell
--------------------------------------------------------------------- An implementation of a type of rectangular pictures using lists of lists of characters. --------------------------------------------------------------------- The basics ^^^^^^^^^^ The example used in Craft2e: a polygon which looks ...
Haskell : The Craft of Functional Programming ( c ) Addison - Wesley , 1996 - 2010 . Pictures.hs module Pictures where import Test.QuickCheck type Picture = [[Char]] taken to be a 16 by 12 rectangle . horse :: Picture horse = [".......##...", ".....##..#..", "...##.....#.", ...
3e2ad6ed26f7887cd3ad2b539d2b5d080d00ae5d2e027bc8a1a63a518ee90f87
default-kramer/plisqin
3.rkt
#lang racket (provide (all-defined-out)) (require plisqin plisqin-examples/adventure-works) (define-schema adventure-works-schema (table Department #:column [DepartmentID #:type Number? #:null no] [GroupName #:type String? #:null no] [ModifiedDate #:type Datetime? #:nul...
null
https://raw.githubusercontent.com/default-kramer/plisqin/26421c7c42656c873c4e0a4fc7f48c0a3ed7770f/plisqin-doc/scribblings/adventure-works-checkpoints/3.rkt
racket
#lang racket (provide (all-defined-out)) (require plisqin plisqin-examples/adventure-works) (define-schema adventure-works-schema (table Department #:column [DepartmentID #:type Number? #:null no] [GroupName #:type String? #:null no] [ModifiedDate #:type Datetime? #:nul...
0be907fd9272cfab629b41dd370d4bef50d95dff485fc24fe7f7817396248996
fox000002/hy-fluent
color.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Color ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Syntax: ;; ;; ;; (cx-inquire-colors) ;; ti-set-color-alignment ;; color-list ;; ;; ti-color-def ;; ;; cx-windows/hardcopy/color-menu ;; ;; update-color-scale ;; ;; pick-color-ramp-from-list ;; ...
null
https://raw.githubusercontent.com/fox000002/hy-fluent/a26358455f92e304f3d62202587ccf5682a156f4/fluent_gui/color.scm
scheme
Syntax: (cx-inquire-colors) ti-set-color-alignment color-list ti-color-def cx-windows/hardcopy/color-menu update-color-scale pick-color-ramp-from-list display/set/color-ramp-menu display/set/colors-menu ti-set-ambient-color cx-set-color-ramp-range cx-set-color-map gui-display...
Color
45eabc77c55c6a7df936e75bca4b068e1329da4203b3ccbdfc8e2d3a5a338c7e
SneakyPeet/p5js-cljs-starter
core.cljs
(ns p5.core (:require [vecvec.v2d :as v2d])) (enable-console-print!) ;;;; STATE (def size 500) (defn dots [] (->> (range 50) (map #(hash-map :position (v2d/abs (v2d/random size)) :color [(rand-int 255) (rand-int 255) (rand-int 255)])))) (defn move [dots] ...
null
https://raw.githubusercontent.com/SneakyPeet/p5js-cljs-starter/e734f880d2f1b12750fce091290ad02bc68cf201/src/p5/core.cljs
clojure
STATE optionally touch your app-state to force rerendering depending on your application (swap! *state update-in [:__figwheel_counter] inc)
(ns p5.core (:require [vecvec.v2d :as v2d])) (enable-console-print!) (def size 500) (defn dots [] (->> (range 50) (map #(hash-map :position (v2d/abs (v2d/random size)) :color [(rand-int 255) (rand-int 255) (rand-int 255)])))) (defn move [dots] (map #(up...
ec05c2285bc6c8f0da45ea2593ecc7722be222b7cd473f3d8ec7d4530b6ba6bc
poroh/ersip
ersip_sdp_attr_rtcp_fb.erl
%% Copyright ( c ) 2020 Dmitry Poroh %% All rights reserved. Distributed under the terms of the MIT License . See the LICENSE file . %% SDP media RTCP Feedback Capability Attribute %% -module(ersip_sdp_attr_rtcp_fb). -export([type/1, set_type/2, val/1, set_val/2, param/1, ...
null
https://raw.githubusercontent.com/poroh/ersip/60afa92a53898f6692f3a30d04b5b88a580c8153/src/sdp/media/ersip_sdp_attr_rtcp_fb.erl
erlang
All rights reserved. =================================================================== Types =================================================================== =================================================================== API =================================================================== ===========...
Copyright ( c ) 2020 Dmitry Poroh Distributed under the terms of the MIT License . See the LICENSE file . SDP media RTCP Feedback Capability Attribute -module(ersip_sdp_attr_rtcp_fb). -export([type/1, set_type/2, val/1, set_val/2, param/1, set_param/2, bytes...
ed488cc0943adb4252df23a0fbbe8ae9ef3ce2f4f751ebb68a4f63b7dd6f19c2
jpmonettas/clograms
events.cljs
(ns clograms.events (:require [re-frame.core :as re-frame] [clograms.db :as db] [clograms.db.components :as components-db] [reagent.dom :as rdom] [day8.re-frame.http-fx] [datascript.core :as d] [clograms.db :refer [project-browser-level-key->idx]...
null
https://raw.githubusercontent.com/jpmonettas/clograms/8586948b5e7439171f1d63030b7a34127c8a63f6/src/cljs/clograms/events.cljs
clojure
now we create an interceptor using `after` we can update datascript-db like this and everything will react accordingly
(ns clograms.events (:require [re-frame.core :as re-frame] [clograms.db :as db] [clograms.db.components :as components-db] [reagent.dom :as rdom] [day8.re-frame.http-fx] [datascript.core :as d] [clograms.db :refer [project-browser-level-key->idx]...
717e1ed44b72e4d71676e698975169e8176af73c3315fc02325a469d5017939f
racket/redex
rbtrees-2.rkt
#lang racket/base (require redex/benchmark "util.rkt" redex/reduction-semantics) (provide (all-defined-out)) (define the-error "the first case is removed from balance") (define-rewrite bug2 ([(balance (B (R (R t_1 n_1 t_2) n_2 t_3) n_3 t_4)) (R (B t_1 n_1 t_2) n_2 (B t_3 n_3 t_4))] . other...
null
https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-benchmark/redex/benchmark/models/rbtrees/rbtrees-2.rkt
racket
#lang racket/base (require redex/benchmark "util.rkt" redex/reduction-semantics) (provide (all-defined-out)) (define the-error "the first case is removed from balance") (define-rewrite bug2 ([(balance (B (R (R t_1 n_1 t_2) n_2 t_3) n_3 t_4)) (R (B t_1 n_1 t_2) n_2 (B t_3 n_3 t_4))] . other...
fddff84339550883b58d9b40ab7d126365e90a6295939f3eb2626c35dbeedd44
zkat/cl-devil
il.lisp
cl - devil -- DevIL binding for CL . See README for licensing information . (in-package :il) (define-foreign-library il (:darwin (:or "libIL.dylib" "libIL.1.dylib")) (:unix (:or "libIL.so" "libIL.so.1")) (:windows "DevIL.dll") (t (:default "libIL"))) (use-foreign-library il) (defctype handle :pointer) (d...
null
https://raw.githubusercontent.com/zkat/cl-devil/0e326c6c911299883852ebf2e33d48f8680f995d/il.lisp
lisp
cl - devil -- DevIL binding for CL . See README for licensing information . (in-package :il) (define-foreign-library il (:darwin (:or "libIL.dylib" "libIL.1.dylib")) (:unix (:or "libIL.so" "libIL.so.1")) (:windows "DevIL.dll") (t (:default "libIL"))) (use-foreign-library il) (defctype handle :pointer) (d...
26b58ede97c4425d09e9f077cb79526d1ab8d455c1cfd67b517f6ee134594f6a
haskell-hvr/missingh
Listtest.hs
arch - tag : List tests main file Copyright ( C ) 2004 - 2011 < > All rights reserved . For license and copyright information , see the file LICENSE Copyright (C) 2004-2011 John Goerzen <> All rights reserved. For license and copyright information, see the file LICENSE -} module Listtest(tests) where ...
null
https://raw.githubusercontent.com/haskell-hvr/missingh/e1a73bd9547db967b4e8d76a443000d06ce95ac4/testsrc/Listtest.hs
haskell
test_merge = qctest "prop_merge" prop_merge test_mergeBy = qctest "test_mergeBy" prop_mergeBy test_merge, test_mergeBy,
arch - tag : List tests main file Copyright ( C ) 2004 - 2011 < > All rights reserved . For license and copyright information , see the file LICENSE Copyright (C) 2004-2011 John Goerzen <> All rights reserved. For license and copyright information, see the file LICENSE -} module Listtest(tests) where ...
bda94e8f38f75050a8cd2d14c3adeab1df999d1849d71fea4c65cbfdbb7b2cbe
BinaryAnalysisPlatform/bap
arm_env.ml
open Core_kernel[@@warning "-D"] open Regular.Std open Bap.Std open Arm_types let (%:) name typ = Var.create name typ let nil = Arm_reg.to_string `Nil %: reg32_t let make_register reg ty = Arm_reg.to_string reg %: ty let reg32 reg = make_register reg reg32_t (* Saved Program Status Register *) let spsr = reg32 `SP...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/arm/arm_env.ml
ocaml
Saved Program Status Register Arithmetic flags, individually Thumb if-then state register
open Core_kernel[@@warning "-D"] open Regular.Std open Bap.Std open Arm_types let (%:) name typ = Var.create name typ let nil = Arm_reg.to_string `Nil %: reg32_t let make_register reg ty = Arm_reg.to_string reg %: ty let reg32 reg = make_register reg reg32_t let spsr = reg32 `SPSR let cpsr = reg32 `CPSR let nf = ...
5a29fd06e421d97f65446755d7338ae0247fda410597f55066d4b2c91012c434
McParen/croatoan
dialog.lisp
(in-package :de.anvi.croatoan.test) (defparameter *dialog-message* "This is my textarea. There are many like it, but this one is mine. My textarea is my best friend. It is my life. I must master it as I must master my life.") (defparameter *dialog-style* '(:foreground (:fgcolor :red) :title (:fgcolor :black :...
null
https://raw.githubusercontent.com/McParen/croatoan/42e474f4dffe2f4e429905a612be5736c2c3e374/test/dialog.lisp
lisp
of names or conses of names (to return in the alist) and titles (to display).
(in-package :de.anvi.croatoan.test) (defparameter *dialog-message* "This is my textarea. There are many like it, but this one is mine. My textarea is my best friend. It is my life. I must master it as I must master my life.") (defparameter *dialog-style* '(:foreground (:fgcolor :red) :title (:fgcolor :black :...
ba43f2cfc64631855e53fe181faedf504a16af67f1e2cac8f795be718c2f775d
melange-re/melange
test_exception_escape.ml
module N : sig val f : int end = struct exception A of int let f = try raise (A 3 ) with _ -> 3 end
null
https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/test_exception_escape.ml
ocaml
module N : sig val f : int end = struct exception A of int let f = try raise (A 3 ) with _ -> 3 end
5050b5df98affff46a800d5cdf24408a52b9ab0c39d0e190a06b1db15cc8282d
patricoferris/ocaml-multicore-monorepo
multipart_dump.eml.ml
let home request = <html> <body> <%s! Dream.form_tag ~action:"/" ~enctype:`Multipart_form_data request %> <input name="text"><br> <input name="files" type="file" multiple><br> <button>Submit!</button> </form> </body> </html> let () = Eio_main.run @@ fun env -> Dream.run env @@ D...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/dream/example/w-multipart-dump/multipart_dump.eml.ml
ocaml
let home request = <html> <body> <%s! Dream.form_tag ~action:"/" ~enctype:`Multipart_form_data request %> <input name="text"><br> <input name="files" type="file" multiple><br> <button>Submit!</button> </form> </body> </html> let () = Eio_main.run @@ fun env -> Dream.run env @@ D...
58c17e34e8ac227eb06e4f076d202706c2678e42e120511a0bfeccca6ada6b13
AdRoll/rebar3_hank
ignore.erl
-module ignore. -hank([{unused_callbacks, [all_arities, {just_one, 1}]}]). -callback all_arities() -> ignored. -callback all_arities(_) -> ignored. -callback all_arities(_, _) -> ignored. -callback just_one() -> reported. -callback just_one(_) -> ignored. -callback just_one(_, _) -> reported.
null
https://raw.githubusercontent.com/AdRoll/rebar3_hank/9666a9ffd7a657a34c87a3da5e38a720ad41cdf1/test/files/unused_callbacks/ignore.erl
erlang
-module ignore. -hank([{unused_callbacks, [all_arities, {just_one, 1}]}]). -callback all_arities() -> ignored. -callback all_arities(_) -> ignored. -callback all_arities(_, _) -> ignored. -callback just_one() -> reported. -callback just_one(_) -> ignored. -callback just_one(_, _) -> reported.
5d3d6bdc357c2f5f8ca2339527e867e6cf40b0ad84b87cd13093300088df20fe
wdebeaum/step
messages.lisp
(in-package :domiknows) (defvar *temp-question-id* 9999) (defun add-temp-question (question-text) (let ((question (make-question :id *temp-question-id* :text question-text :reference-answer nil :scene-id nil ))) (push question *questions*) question)) (defun remove-temp-questi...
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/Domiknows/messages.lisp
lisp
yes-no question wh question (roughly) NOTE: this works for a node or an edge, both labeled with (:* ont w) reply with answer these handlers are just here so that we subscribe to the messages that parse-and-wait needs to hear
(in-package :domiknows) (defvar *temp-question-id* 9999) (defun add-temp-question (question-text) (let ((question (make-question :id *temp-question-id* :text question-text :reference-answer nil :scene-id nil ))) (push question *questions*) question)) (defun remove-temp-questi...