_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
90b5fefc891a22d41c1eb0eda5f232674f36121a377ecf4a86245a526e0ffb1a
earl-ducaine/cl-garnet
update.lisp
-*- Mode : LISP ; Syntax : Common - Lisp ; Package : OPAL ; Base : 10 -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; The Garnet User Interface Development Environment . ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; This code was written ...
null
https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/src/opal/update.lisp
lisp
Syntax : Common - Lisp ; Package : OPAL ; Base : 10 -*- ; ; This code was written as part of the Garnet project at ;;; ; ; ; ; please contact to be put on the mailing list. ;;; This updates the :update-slots-values slot, which should hold a list containing the values of the update-slots at the las...
(in-package "OPAL") This also sets update - info - force - computation - p to NIL , since we definitely (defun update-slots-values-changed (object first-changed obj-update-info) (declare (optimize (speed 3) (safety 1))) (let* ((update-slots-values (g-local-value object :update-slots-values)) dzg - changed f...
4dd2eb79d8934e57dc982fbd6464f5595d18f626469f46e494360bd14e2a4078
backtracking/astro
stars.mli
type spectral_type = O | B | A | F | G | K | M | C | S | W | P type star = { name : string; ascension : float; declination : float; magnitude : float; spectral_type : spectral_type; each in 0 .. 1 } val read_file : string -> star list
null
https://raw.githubusercontent.com/backtracking/astro/adb8020b8a56692f3d2b50d26dce2ccc442c6f39/stars.mli
ocaml
type spectral_type = O | B | A | F | G | K | M | C | S | W | P type star = { name : string; ascension : float; declination : float; magnitude : float; spectral_type : spectral_type; each in 0 .. 1 } val read_file : string -> star list
700b630fe97b64ff532ce79cba4e2bdc10c30c79415b6a1e9a8d82c21d0c2502
nv-vn/otp
test_ppx_json_types.ml
module Conglomerate = [%json ""] let _ = let tup : Conglomerate.t = { xs = ["hello"; "world"]; ys = (5, 10) } in print_endline @@ Conglomerate.show tup; let serialized = Conglomerate.to_json tup in print_endline @@ Yojson.Safe.pretty_to_string serialized
null
https://raw.githubusercontent.com/nv-vn/otp/52ebf600813d54207ee6924eea4364f8dbf45dcc/test/test_ppx_json_types.ml
ocaml
module Conglomerate = [%json ""] let _ = let tup : Conglomerate.t = { xs = ["hello"; "world"]; ys = (5, 10) } in print_endline @@ Conglomerate.show tup; let serialized = Conglomerate.to_json tup in print_endline @@ Yojson.Safe.pretty_to_string serialized
1e910c479ee5ad84aec002e434c417ccf9a00f095453a9c99212816d2a569154
zotonic/webzmachine
skel.erl
@author author < > YYYY author . %% @doc TEMPLATE. -module(skel). -author('author <>'). -export([start/0, start_link/0, stop/0]). ensure_started(App) -> case application:start(App) of ok -> ok; {error, {already_started, App}} -> ok end. ( ) - > { ok , Pid::pid ( ) } %% @doc Starts the ...
null
https://raw.githubusercontent.com/zotonic/webzmachine/fe0075257e264fa28ba4112603794a48a78d8405/priv/skel/src/skel.erl
erlang
@doc TEMPLATE. @doc Starts the app for inclusion in a supervisor tree @doc Start the skel server. @doc Stop the skel server.
@author author < > YYYY author . -module(skel). -author('author <>'). -export([start/0, start_link/0, stop/0]). ensure_started(App) -> case application:start(App) of ok -> ok; {error, {already_started, App}} -> ok end. ( ) - > { ok , Pid::pid ( ) } start_link() -> skel_deps:ensure(...
09a169b32b663cd6a4cd207b2d403633b9db20a58494eb6d0402edb2acd2585a
brandonchinn178/advent-of-code
Day11.hs
{- stack script --resolver lts-18.18 --package containers -} # LANGUAGE ImportQualifiedPost # # LANGUAGE TupleSections # import Control.Arrow ((&&&)) import Control.Monad ((>=>)) import Data.Char (digitToInt) import Data.List (group, sort) import Data.Maybe (mapMaybe) import Data.Map qualified as Map import Data.Set...
null
https://raw.githubusercontent.com/brandonchinn178/advent-of-code/2a3e9fdea7fb253e9d9e5921e153f22af0fc0e0e/2021/Day11.hs
haskell
stack script --resolver lts-18.18 --package containers - Matrix - - Utilities -
# LANGUAGE ImportQualifiedPost # # LANGUAGE TupleSections # import Control.Arrow ((&&&)) import Control.Monad ((>=>)) import Data.Char (digitToInt) import Data.List (group, sort) import Data.Maybe (mapMaybe) import Data.Map qualified as Map import Data.Set qualified as Set main :: IO () main = do input <- Matrix . ...
b42a45c2716f446e4ccf03110d7b470e4470a609d607a22a9419d9b6db554f5b
filippo/sgte
eunit_render_map.erl
-module(eunit_render_map). -include_lib("eunit/include/eunit.hrl"). %%-------------------- %% %% Tests %% %%-------------------- %% %% Render Test %% map_test_() -> {ok, PrintM} = sgte:compile(print_mountain()), {ok, PrintMList} = sgte:compile(print_mountains()), Data = [{nameList, mountains()}, {printMou...
null
https://raw.githubusercontent.com/filippo/sgte/1d6c90cd6043d41fccd2905c8c1dd6fc19155607/test/eunit_render_map.erl
erlang
-------------------- Tests -------------------- Render Test test bug in js code test comma bug -------------------- --------------------
-module(eunit_render_map). -include_lib("eunit/include/eunit.hrl"). map_test_() -> {ok, PrintM} = sgte:compile(print_mountain()), {ok, PrintMList} = sgte:compile(print_mountains()), Data = [{nameList, mountains()}, {printMountain, PrintM}], Res = sgte:render_str(PrintMList, Data), Rendered = "<ul>...
0dd90da673a9cb32863909100d0cbb06cb79377d0893a00a9bb6ed2b40058ba3
y2q-actionman/with-c-syntax
libc__freestanding.lisp
(in-package #:with-c-syntax.test) (in-readtable with-c-syntax-readtable) C90 freestanding headers : float.h , iso646.h , limits.h , stdarg.h , stddef.h ;;; <float.h> (test test-libc-float ;; well-known value (is.equal.wcs single-float-epsilon return FLT_EPSILON \;) (is.equal.wcs least-positive-normaliz...
null
https://raw.githubusercontent.com/y2q-actionman/with-c-syntax/fa212ff8e570272aea6c6de247d8f03751e60843/test/libc__freestanding.lisp
lisp
<float.h> well-known value ) ) ) ) ) ) ) ) ) C required limits. ) ) ) ) ) ) ) ) ) )) <limits.h> ) ) )) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )) <stddef.h> ) Combination of `cl:null' and C's NULL. ) <stdarg.h> currently, this is a part of trans.lisp. TODO: add va_copy() test.
(in-package #:with-c-syntax.test) (in-readtable with-c-syntax-readtable) C90 freestanding headers : float.h , iso646.h , limits.h , stdarg.h , stddef.h (test test-libc-float (is.equal.wcs single-float-epsilon (is.equal.wcs least-positive-normalized-single-float (is.equal.wcs most-positive-single-float (...
0e84450ee54df65079d60af590b469c5a5e9e27c54ce3f201b049520bf9fd198
milho-lang/milho-haskell
VarTable.hs
module Pipoquinha.VarTable where import Data.IORef import qualified Data.Map as Map import Data.Map ( Map ) import qualified Pipoquinha.SExp as SExp import Protolude type VarRef = IORef SExp.T data Table = Table { variables ::...
null
https://raw.githubusercontent.com/milho-lang/milho-haskell/ebea4dc2a2b84d7b8358b20fcfc4073ed7a93c76/src/Pipoquinha/VarTable.hs
haskell
module Pipoquinha.VarTable where import Data.IORef import qualified Data.Map as Map import Data.Map ( Map ) import qualified Pipoquinha.SExp as SExp import Protolude type VarRef = IORef SExp.T data Table = Table { variables ::...
13196423a806327d74073445c0358becb42ca63eb3010497dabd6c8ce13ef329
dpaetzel/aq2ledger
Format.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # | Module : Aq2Ledger . Format Description : Format strings Copyright : , 2019 License : GPL-3 Maintainer : < > Stability : experimental The format strings used for calls of @aqbanking -...
null
https://raw.githubusercontent.com/dpaetzel/aq2ledger/fd16e0459b83e142a625721b0f6071d28cefc20e/src/Aq2Ledger/Format.hs
haskell
# LANGUAGE OverloadedStrings # | An example line returned by @aqbanking listtrans --template=F@ where @F = 'listtransFormat'@. | Output date format used by @aqbanking-cli@. | Input date format used by @aqbanking-cli@. | Formats a 'Data.Time.Calendar.Day' as a AqBanking-compatible string.
# LANGUAGE NoImplicitPrelude # # LANGUAGE TemplateHaskell # | Module : Aq2Ledger . Format Description : Format strings Copyright : , 2019 License : GPL-3 Maintainer : < > Stability : experimental The format strings used for calls of @aqbanking - cli@. Module : Aq2Ledger.Fo...
a90e1b33024de27abb7fd395531f117221bb3d2dcdd7d311b1f639f2706af17c
kushidesign/kushi
gen.clj
(ns kushi.gen (:require [clojure.test :as test :refer [is deftest]] [clojure.pprint :refer [pprint]] [kushi.core :refer (sx-dispatch defclass-dispatch)])) ;; Code below used to generated baseline tests (def form-meta {:file "filename.cljs" :line 11 :column 11}) (defn gentest [f fsym args form-meta] (let...
null
https://raw.githubusercontent.com/kushidesign/kushi/6a50dc0336a8e7fe8ddd776fcf41689f9110e590/test/kushi/gen.clj
clojure
Code below used to generated baseline tests [:.absolute :.foo :c--black] with-classes with-classes 'with-classes (println (map #(apply gentest %) sx-tests-gentest-args)) (println sx-tests-gentest-args) (println (gentest sx-dispatch 'sx-dispatch [:c--red] form-meta)) Uncomment these to run tests
(ns kushi.gen (:require [clojure.test :as test :refer [is deftest]] [clojure.pprint :refer [pprint]] [kushi.core :refer (sx-dispatch defclass-dispatch)])) (def form-meta {:file "filename.cljs" :line 11 :column 11}) (defn gentest [f fsym args form-meta] (let [result (f {:args args ...
2344966a4595b0b75b277e3ab0936974f169b98498ea037a13bc3e0890d58429
BranchTaken/Hemlock
test_value.ml
open! Basis.Rudiments open! Basis open Option let test () = List.iter [Some 42L; None] ~f:(fun o -> File.Fmt.stdout |> Fmt.fmt "value " |> (pp Uns.pp) o |> Fmt.fmt " -> " |> Uns.pp (value ~default:13L o) |> Fmt.fmt "\n" |> ignore ) let _ = test ()
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/f3604ceda4f75cf18b6ee2b1c2f3c5759ad495a5/bootstrap/test/basis/option/test_value.ml
ocaml
open! Basis.Rudiments open! Basis open Option let test () = List.iter [Some 42L; None] ~f:(fun o -> File.Fmt.stdout |> Fmt.fmt "value " |> (pp Uns.pp) o |> Fmt.fmt " -> " |> Uns.pp (value ~default:13L o) |> Fmt.fmt "\n" |> ignore ) let _ = test ()
60c2b6828e92d3a1e41a2810dbe8d11d2cf804e8c0283324bb1d213f8cecfa46
reddit-archive/reddit1.0
web.lisp
;;;; Copyright 2018 Reddit, Inc. ;;;; ;;;; Permission is hereby granted, free of charge, to any person obtaining a copy of ;;;; this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation the rights to ;;;; use, copy, modify, merge, pu...
null
https://raw.githubusercontent.com/reddit-archive/reddit1.0/bb4fbdb5871a32709df30540685cf44c637bf203/web.lisp
lisp
Copyright 2018 Reddit, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies so, subject to the following conditions: The a...
the Software without restriction , including without limitation the rights to of the Software , and to permit persons to whom the Software is furnished to do copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN A...
a56c7e4e4ae8e3f3fc39f81100db55fb1adfc389bb126ee26ff6d5cff638eed2
skanev/playground
79.scm
SICP exercise 3.79 ; Generlize the solve-2nd procedure of exercise 3.78 so that it can be used to solve general second - order differential equations d²y / dt² = f(dy / dt , y ) . (define (solve-2nd-generic f y0 dy0 dt) (define y (integral (delay dy) y0 dt)) (define dy (integral (delay ddy) dy0 dt)) (defin...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/03/79.scm
scheme
SICP exercise 3.79 Generlize the solve-2nd procedure of exercise 3.78 so that it can be used to solve general second - order differential equations d²y / dt² = f(dy / dt , y ) . (define (solve-2nd-generic f y0 dy0 dt) (define y (integral (delay dy) y0 dt)) (define dy (integral (delay ddy) dy0 dt)) (define ...
df4283d2faa1a5c9d67bf7775c28303971e2d197441084ee5b1aafc90a3158b4
xh4/web-toolkit
condition.lisp
(in-package :javascript) (defparameter +message-bad-getter-arity+ "Getter must not have any formal parameters") (defparameter +message-bad-setter-arity+ "Setter must have exactly one formal parameter") (defparameter +message-bad-setter-rest-parameter+ "Setter function argument must not be a rest parameter") (defparame...
null
https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/javascript/condition.lisp
lisp
(in-package :javascript) (defparameter +message-bad-getter-arity+ "Getter must not have any formal parameters") (defparameter +message-bad-setter-arity+ "Setter must have exactly one formal parameter") (defparameter +message-bad-setter-rest-parameter+ "Setter function argument must not be a rest parameter") (defparame...
44bbfd269ab74b027da7229c2141c7762734566ce668a0ed92bec8feb4329a12
hjcapple/reading-sicp
exercise_1_17.scm
#lang racket P31 - [ 练习 1.17 ] (define (mul a b) (if (= b 0) 0 (+ a (mul a (- b 1))))) (define (double x) (+ x x)) (define (halve x) (/ x 2)) (define (fast-mul a n) (cond ((= n 0) 0) ((even? n) (double (fast-mul a (halve n)))) (else (+ a (fast-mul a (- n 1)))))) ;;;;;;;;;;;;;;;;;;...
null
https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_1/exercise_1_17.scm
scheme
#lang racket P31 - [ 练习 1.17 ] (define (mul a b) (if (= b 0) 0 (+ a (mul a (- b 1))))) (define (double x) (+ x x)) (define (halve x) (/ x 2)) (define (fast-mul a n) (cond ((= n 0) 0) ((even? n) (double (fast-mul a (halve n)))) (else (+ a (fast-mul a (- n 1)))))) (module* test #f ...
46938256ea14ec24e7e99a02688241c9364e7e9e7e524eaf77edf96ff80a0cfa
haskell-works/cabal-cache
Commands.hs
module App.Commands where import App.Commands.Debug (cmdDebug) import App.Commands.Plan (cmdPlan) import App.Commands.SyncFromArchive (cmdSyncFromArchive) import App.Commands.SyncToArchive (cmdSyncToArchive) import App.Commands.Version (cmdVersion) import Options.Applicative (Pa...
null
https://raw.githubusercontent.com/haskell-works/cabal-cache/b89651f78283b484b06664dbdecc64966b25110d/app/App/Commands.hs
haskell
module App.Commands where import App.Commands.Debug (cmdDebug) import App.Commands.Plan (cmdPlan) import App.Commands.SyncFromArchive (cmdSyncFromArchive) import App.Commands.SyncToArchive (cmdSyncToArchive) import App.Commands.Version (cmdVersion) import Options.Applicative (Pa...
a75f25a277c5f25920884d084235d9a8d583f5a5407b3e2695ba63b05d3c485f
alexbs01/OCaml
queens.ml
./test 0 -- > 1 soluciones halladas en 0 . segundos ./test 1 -- > 1 soluciones halladas en 0 . segundos ./test 2 -- > 0 en 0 . segundos ./test 3 -- > 0 en 0 . segundos ./test 4 -- > 2 soluciones halladas en 0 . segundos ./test 5 -- > 10 en 0 . segundos ./test 6 -- > 4 en 0 . segundos ./test 7 --...
null
https://raw.githubusercontent.com/alexbs01/OCaml/b5f6b2dac761cf3eb99ba55dfe7de85f7e3c4f48/queens/queens.ml
ocaml
./test 0 -- > 1 soluciones halladas en 0 . segundos ./test 1 -- > 1 soluciones halladas en 0 . segundos ./test 2 -- > 0 en 0 . segundos ./test 3 -- > 0 en 0 . segundos ./test 4 -- > 2 soluciones halladas en 0 . segundos ./test 5 -- > 10 en 0 . segundos ./test 6 -- > 4 en 0 . segundos ./test 7 --...
227946883dc2623ef9b07ec54b8e5aaef73b1edff0d9d52dc2a4e4813bd30e06
screenshotbot/screenshotbot-oss
acceptor.lisp
;; Copyright 2018-Present Modern Interpreters Inc. ;; This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (in-package :util) (defvar *package-to-acceptors* nil) (defun %register-acceptor (accep...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/2372e102c5ef391ed63aa096f678e2ad1df36afe/src/util/acceptor.lisp
lisp
Copyright 2018-Present Modern Interpreters Inc.
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (in-package :util) (defvar *package-to-acceptors* nil) (defun %register-acceptor (acceptor-name package) (let ((package (find-package packa...
fe7b35ce02a8507138f297ec4b42486952e9d6eaf0fc651cc9464505ca3503de
aggieben/weblocks
request-handler-utils.lisp
(in-package :weblocks-test) (defun with-request-template (body &key (title "Hello") render-debug-toolbar-p widget-stylesheets) (format nil "~ <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" ~ \"-strict.dtd\">~%~ <html xmlns=''>~ <head>~ charset = utf-8 ' />~ <title>~A</title>~ <link r...
null
https://raw.githubusercontent.com/aggieben/weblocks/8d86be6a4fff8dde0b94181ba60d0dca2cbd9e25/test/request-handler-utils.lisp
lisp
</div>~
(in-package :weblocks-test) (defun with-request-template (body &key (title "Hello") render-debug-toolbar-p widget-stylesheets) (format nil "~ <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" ~ \"-strict.dtd\">~%~ <html xmlns=''>~ <head>~ charset = utf-8 ' />~ <title>~A</title>~ <link r...
d410ce0242ff9e9ca3591a3cff26b35f67d89a07433921d9e7f8106966c2d798
craigl64/clim-ccl
ccl-streams.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CLIM - UTILS ; Base : 10 ; Lowercase : Yes -*- ;; See the file LICENSE for the full license governing this code. ;; (in-package :clim-utils) " Copyright ( c ) 1990 , 1991 , 1992 Symbolics , Inc. All rights reserved . " If we were really being clever ,...
null
https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/utils/ccl-streams.lisp
lisp
Syntax : ANSI - Common - Lisp ; Package : CLIM - UTILS ; Base : 10 ; Lowercase : Yes -*- See the file LICENSE for the full license governing this code. STREAM-CLOSE and STREAM-ABORT onto FUNDAMENTAL-STREAM here. That would require having someplace to write down that the stream had been aborted so when it got clo...
(in-package :clim-utils) " Copyright ( c ) 1990 , 1991 , 1992 Symbolics , Inc. All rights reserved . " If we were really being clever , we could put CCL methods for (defgeneric close (stream &key abort)) (defmethod close ((stream t) &key abort) (common-lisp:close stream :abort abort))
6f8981f4e6ad208c83bf467a9e5767d1894f16d1961c6aebe52d1ad9c4269d14
stwind/ectl
ectl_hog_proc.erl
-module(ectl_hog_proc). -export([run/1]). -include("ectl.hrl"). %% =================================================================== %% Public %% =================================================================== run(Opts) -> ecli:start_node(ectl_lib:arg(cookie, Opts)), Node = list_to_atom(ecli:binding(n...
null
https://raw.githubusercontent.com/stwind/ectl/056adbcacdf264502d0f88e9e6171a708ba6c875/src/ectl_hog_proc.erl
erlang
=================================================================== Public =================================================================== =================================================================== Private ===================================================================
-module(ectl_hog_proc). -export([run/1]). -include("ectl.hrl"). run(Opts) -> ecli:start_node(ectl_lib:arg(cookie, Opts)), Node = list_to_atom(ecli:binding(node, Opts)), ectl_lib:load_recon(Node), Field = list_to_atom(ecli:binding(attr, Opts)), Num = ecli:opt(num, Opts), Info = rpc:call(Node,...
29b9b1c205998ac3f5e9ee501aea7df57d04d5be64a7fd64ec93dc6e0245eaed
lisp-mirror/airship-scheme
scheme-core.lisp
;;;; -*- mode: common-lisp; -*- (in-package #:airship-scheme) (defpackage #:r7rs (:documentation "A package that the core R7RS symbols are read into.") (:use)) (defpackage #:%scheme-thunk (:documentation "A package to namespace the internal Scheme thunk.") (:use) (:export #:thunk)) (defun generate-lambda-...
null
https://raw.githubusercontent.com/lisp-mirror/airship-scheme/12dbbb3b0fe7ea7cf82e44cbaf736729cc005469/scheme-core.lisp
lisp
-*- mode: common-lisp; -*- TODO: The external-to-CL versions of these procedures should call the function within the trampoline with #'values as the continuation. TODO: Explicit continuation in the call to %define TODO: This is temporary. When Scheme library support is added, the libraries would actually generat...
(in-package #:airship-scheme) (defpackage #:r7rs (:documentation "A package that the core R7RS symbols are read into.") (:use)) (defpackage #:%scheme-thunk (:documentation "A package to namespace the internal Scheme thunk.") (:use) (:export #:thunk)) (defun generate-lambda-list (list) "Generates a lambd...
975b033a0fd9ce0d27dd8ae9ddd26ef36fd80b012eb7dc3da287a8eef0851bb9
cj1128/sicp-review
2.69.scm
(load "./huffman-tree-basic.scm") (define (encode message tree) (if (null? message) '() (append (encode-symbol (car message) tree) (encode (cdr message) tree)))) (define (encode-symbol symbol tree) (if (leaf? tree) '() (let ((left-symbols (symbols (left-branch tree)...
null
https://raw.githubusercontent.com/cj1128/sicp-review/efaa2f863b7f03c51641c22d701bac97e398a050/chapter-2/2.3/2.69.scm
scheme
(load "./huffman-tree-basic.scm") (define (encode message tree) (if (null? message) '() (append (encode-symbol (car message) tree) (encode (cdr message) tree)))) (define (encode-symbol symbol tree) (if (leaf? tree) '() (let ((left-symbols (symbols (left-branch tree)...
ede47a335649287164fe8f0d98eac7f17da412746837e5c92516185ba5a73f45
pmatos/racket-loci
test_locus-context.rkt
#lang racket ;; --------------------------------------------------------------------------------------------------- (require loci) ;; --------------------------------------------------------------------------------------------------- (define (go n) (locus/context l (let ([v (vector 0.0)]) (let ...
null
https://raw.githubusercontent.com/pmatos/racket-loci/ce063c7e45d5abb7c187766b3ab7045ef2f84099/test/test_locus-context.rkt
racket
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
#lang racket (require loci) (define (go n) (locus/context l (let ([v (vector 0.0)]) (let loop ([i 3000000000]) (unless (zero? i) (vector-set! v 0 (+ (vector-ref v 0) 1.0)) (loop (sub1 i))))) (printf "Locus ~a done~n" n) n)) (module+ ...
12f29d6997abd100c970d51164cb9a55ef1f74019d48415535fdc901cab91915
vikeri/re-navigate
core.cljs
(ns re-navigate.core (:require [reagent.core :as r :refer [atom]] [re-frame.core :refer [subscribe dispatch dispatch-sync]] [re-navigate.events] [clojure.data :as d] [re-navigate.subs])) (js* "/* @flow */") (def ReactNative (js/require "react-native")) (def app-regist...
null
https://raw.githubusercontent.com/vikeri/re-navigate/5ef868ee5ec35f07105e16023f17e53fbd8aebaa/src/re_navigate/core.cljs
clojure
(ns re-navigate.core (:require [reagent.core :as r :refer [atom]] [re-frame.core :refer [subscribe dispatch dispatch-sync]] [re-navigate.events] [clojure.data :as d] [re-navigate.subs])) (js* "/* @flow */") (def ReactNative (js/require "react-native")) (def app-regist...
ac79bab5b7187df537d66709fa28e81533ca0f4fe7947a067b988cbd98cd512e
OCamlPro/typerex-lint
plugin_parsetree.code_list_on_singleton.2.ml
List.iter print_endline [ "singleton" ]
null
https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/tools/ocp-lint-doc/examples/plugin_parsetree.code_list_on_singleton.2.ml
ocaml
List.iter print_endline [ "singleton" ]
7c92244902aaad25ed6bc998bb98c775ed830d2229cd3ff5a8f7550f9ea3f3cf
srid/neuron
DirTree.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE TypeApplications # # LANGUAGE ViewPatterns # #...
null
https://raw.githubusercontent.com/srid/neuron/5f241c62bc57d079cf950db6debf4f44d8e851a2/src/Neuron/Plugin/Plugins/DirTree.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # Directory zettels using this plugin are associated with a `Tag` that corresponds to the directory contents. Child zettels are folgezettel, with the exception of the children of together by the index. Regular zettel; add the tag based ...
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE TypeApplications # # LANGUAGE ViewPatterns # # LANGUAGE NoImplicitPrelude # module Neuron.Plugin.Plugins.DirTree ( plugin, routePlug...
2edd486fc2436d160a8bf42181db4d14785a4e36d90248d6f16799acc38ae6ed
w3ntao/sicp-solution
2-67.rkt
#lang racket (require (only-in "../ToolBox/AbstractionOfData/set.rkt" nil element-of-set?)) (define (make-leaf symbol weight) (list 'leaf symbol weight)) (define (leaf? object) (eq? (car object) 'leaf)) (define (symbol-leaf x) (cadr x)) (define (weight...
null
https://raw.githubusercontent.com/w3ntao/sicp-solution/00be3a7b4da50bb266f8a2db521a24e9f8c156be/chap-2/2-67.rkt
racket
#lang racket (require (only-in "../ToolBox/AbstractionOfData/set.rkt" nil element-of-set?)) (define (make-leaf symbol weight) (list 'leaf symbol weight)) (define (leaf? object) (eq? (car object) 'leaf)) (define (symbol-leaf x) (cadr x)) (define (weight...
1867df7e218e2ba5053ba4ce36e2f4ac1fea8a9c37de452af52c9a4c680a327f
travelping/gen_netlink
netlink_queue.erl
-module(netlink_queue). -behaviour(gen_server). %% API -export([start_link/1, start_link/2, start_link/3]). %% gen_server callbacks -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). %% nfq callbacks -export([nfq_init/1, nfq_verdict/3]). -include_lib("gen_socket/include/g...
null
https://raw.githubusercontent.com/travelping/gen_netlink/90247a76c39884061e87bb65a7d54a9856132b69/src/netlink_queue.erl
erlang
API gen_server callbacks nfq callbacks =================================================================== API =================================================================== =================================================================== nfq callbacks ======================================================...
-module(netlink_queue). -behaviour(gen_server). -export([start_link/1, start_link/2, start_link/3]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -export([nfq_init/1, nfq_verdict/3]). -include_lib("gen_socket/include/gen_socket.hrl"). -include("netlink.hrl"). -defi...
6ae270c5da3b100d11d749edf5403c1482f67568aad880c0b4eb26c3f9c45d20
armedbear/abcl
ldb.lisp
;;; ldb.lisp ;;; Copyright ( C ) 2003 - 2005 $ Id$ ;;; ;;; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . ;;; ...
null
https://raw.githubusercontent.com/armedbear/abcl/0631ea551523bb93c06263e772fbe849008e2f68/src/org/armedbear/lisp/ldb.lisp
lisp
ldb.lisp This program is free software; you can redistribute it and/or either version 2 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for mo...
Copyright ( C ) 2003 - 2005 $ Id$ modify it under the terms of the GNU General Public License of the License , or ( at your option ) any later version . You should have received a copy of the GNU General Public License Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA . (...
ff58c4e3bce41e4418128f9a946b990c37d92bab84029545cb1f03994e6a7ea2
ghcjs/jsaddle-dom
WebKitCSSMatrix.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.WebKitCSSMatrix (newWebKitCSSMatrix, setMatrixValue, multiply, multiply_, inverse, inverse_, translate, tra...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/WebKitCSSMatrix.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | <-US/docs/Web/API/WebKitCSSMatrix.setMatrixValue Mozilla WebKitCSSMatrix.setMatrixValue documentation> | <-US/docs/Web/API/WebKitCSSMatrix.rotate Mozilla WebKitCSSMatrix.rotate documentation> | <-US/docs/Web/API/WebKitCS...
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.WebKitCSSMatrix (newWebKitCSSMatrix, setMatrixValue, multiply, multiply_, inverse, inverse_, translate, translate_, scale, scale_, rotate, rotate_, rotateAxisAngle, rotateAxisAngle_, skewX, skewX_, ...
c3726a0a3fad123198125cbf3b76c7ab184d4a68adeeebd943690c91c3989665
henryw374/cljc.java-time
day_of_week.cljs
(ns cljc.java-time.day-of-week (:refer-clojure :exclude [abs get range format min max next name resolve short]) (:require [cljc.java-time.extn.calendar-awareness] [goog.object] [java.time :refer [DayOfWeek]])) (def saturday (goog.object/get java.time.DayOfWeek "SATURDAY")) (def thursday (goog.object/get java.time.DayOf...
null
https://raw.githubusercontent.com/henryw374/cljc.java-time/2e47e8104bc2ec7f68a01bf751a7b9a2dee391b4/src/cljc/java_time/day_of_week.cljs
clojure
(ns cljc.java-time.day-of-week (:refer-clojure :exclude [abs get range format min max next name resolve short]) (:require [cljc.java-time.extn.calendar-awareness] [goog.object] [java.time :refer [DayOfWeek]])) (def saturday (goog.object/get java.time.DayOfWeek "SATURDAY")) (def thursday (goog.object/get java.time.DayOf...
d479eb623602547a122c712e19cf6ed87cbaf9189fcdfad03a244bf090479255
joelburget/lvca
Properties_intf.ml
open Lvca_util module type Parse_pretty_s = sig type t val string_round_trip1 : t -> Property_result.t val string_round_trip2 : string -> Property_result.t end module type Json_s = sig type t val json_round_trip1 : t -> Property_result.t val json_round_trip2 : Lvca_util.Json.t -> Property_result.t end ...
null
https://raw.githubusercontent.com/joelburget/lvca/f8a3b8e294f564d1fc9836af63e6169b26ca0234/syntax/Properties_intf.ml
ocaml
open Lvca_util module type Parse_pretty_s = sig type t val string_round_trip1 : t -> Property_result.t val string_round_trip2 : string -> Property_result.t end module type Json_s = sig type t val json_round_trip1 : t -> Property_result.t val json_round_trip2 : Lvca_util.Json.t -> Property_result.t end ...
6805efa806efb12b5c5055d28119406786be80ce9d72b7076e962138f3735b16
sjl/temperance
utils.lisp
(in-package :temperance.utils) (defmacro push-if-new (thing place &environment env &key key (test '#'eql)) "Push `thing` into the list at `place` if it's not already there. Returns whether `thing` was actually pushed. This function is basically `pushnew` except for...
null
https://raw.githubusercontent.com/sjl/temperance/f7e68f46b7afaeecf643c009eb2e130500556e31/src/utils.lisp
lisp
tracking of the queue size. Lookup Tables what could go wrong ecase/tree See /~michaelw/log/programming/lisp/icfp-contest-2006-vm I am going to lose my fucking mind if I have to program lisp without a threading macro, but I don't want to add another dep to this library, so here we are.
(in-package :temperance.utils) (defmacro push-if-new (thing place &environment env &key key (test '#'eql)) "Push `thing` into the list at `place` if it's not already there. Returns whether `thing` was actually pushed. This function is basically `pushnew` except for...
177ce3f2b67689c80c79e422a9b291b289a2678ed2d57c7fe1b0ca603328c0ad
potatosalad/erlang-jose
jose_jwk_kty_okp_ed25519ph_props.erl
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- %% vim: ts=4 sw=4 ft=erlang noet -module(jose_jwk_kty_okp_ed25519ph_props). -include_lib("public_key/include/public_key.hrl"). -include_lib("proper/include/proper.hrl"). % -compile(export_all). base64url_binary() -> ?LET(Bi...
null
https://raw.githubusercontent.com/potatosalad/erlang-jose/43d3db467f909bbc932bd663ddcb1af93180dfd3/test/property_test/jose_jwk_kty_okp_ed25519ph_props.erl
erlang
vim: ts=4 sw=4 ft=erlang noet -compile(export_all).
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- -module(jose_jwk_kty_okp_ed25519ph_props). -include_lib("public_key/include/public_key.hrl"). -include_lib("proper/include/proper.hrl"). base64url_binary() -> ?LET(Binary, binary(), jose_jwa_base64url:encode(Binary)). ...
72e227e95adad6427884b645c16a35e21a1c9158509a22e58904e40383967594
mbutterick/typesetting
font.rkt
#lang debug racket/base (require "core.rkt" racket/match racket/class racket/list "reference.rkt" "font-standard.rkt" "font-embedded.rkt") (provide (all-defined-out)) (define (make-font-ref f) (or (pdf-font-ref f) (and (set-pdf-font-ref! f (make-ref)) (pdf-font-ref f)))) (define (embed f) (def...
null
https://raw.githubusercontent.com/mbutterick/typesetting/6f7a8bbc422a64d3a54cbbbd78801a01410f5c92/pitfall/pitfall/font.rkt
racket
check registered fonts if src is a string check if the font is already in the PDF if not, load the font check for existing font families with the same name already in the PDF save the font for reuse later
#lang debug racket/base (require "core.rkt" racket/match racket/class racket/list "reference.rkt" "font-standard.rkt" "font-embedded.rkt") (provide (all-defined-out)) (define (make-font-ref f) (or (pdf-font-ref f) (and (set-pdf-font-ref! f (make-ref)) (pdf-font-ref f)))) (define (embed f) (def...
b607e703381eaca2f7bbe57dc0d514f73b09427eef3f7362a5223daad383b260
dym/movitz
packages.lisp
;;;;------------------------------------------------------------------ ;;;; Copyright ( C ) 2001 , 2002 - 2005 Department of Computer Science , University of Tromso , Norway . ;;;; ;;;; For distribution policy, see the accompanying file COPYING. ;;;; ;;;; Filename: packages.lisp ;;;; Description: ...
null
https://raw.githubusercontent.com/dym/movitz/56176e1ebe3eabc15c768df92eca7df3c197cb3d/losp/muerte/packages.lisp
lisp
------------------------------------------------------------------ For distribution policy, see the accompanying file COPYING. Filename: packages.lisp Description: ------------------------------------------------------------------ Set by dump-image. This can be pr...
Copyright ( C ) 2001 , 2002 - 2005 Department of Computer Science , University of Tromso , Norway . Author : < > Created at : Thu Aug 30 15:19:43 2001 $ I d : packages.lisp , v 1.17 2008 - 04 - 27 19:43:37 Exp $ (require :muerte/basic-macros) (provide :muerte/packages) (in-package mu...
cd4f5b2955699ccdd7227ffb4cf5a3932506f7f5708ac158a3830d47ce1962d3
dpiponi/Moodler
keyboard.hs
do (x0, y0) <- mouse let (x, y) = quantise2 quantum (x0, y0) root <- currentPlane keyboard <- new' "input" trigger <- new' "input" container3 <- container' "panel_keyboard.png" (x+(0.0), y+(0.0)) (Inside root) out0 <- plugout' (keyboard ! "result") (x+(60.0), y+(24.0)) (Outside container...
null
https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/keyboard.hs
haskell
do (x0, y0) <- mouse let (x, y) = quantise2 quantum (x0, y0) root <- currentPlane keyboard <- new' "input" trigger <- new' "input" container3 <- container' "panel_keyboard.png" (x+(0.0), y+(0.0)) (Inside root) out0 <- plugout' (keyboard ! "result") (x+(60.0), y+(24.0)) (Outside container...
b9c31a4c9a451d814edf523b32b4a7bfca77ed810a8c3a022d87cf09c18206ad
cchalmers/diagrams
Image.hs
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE GADTs # {-# LANGUAGE LambdaCase #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # LANGUAGE ViewPatter...
null
https://raw.githubusercontent.com/cchalmers/diagrams/d091a3727817905eea8eeabc1e284105f618db21/src/Diagrams/TwoD/Image.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE EmptyDataDecls # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # --------------------------------------------------------------------------- | Module : Diagrams.TwoD.Image License : BSD-style (see LICENSE) Maintainer : Import...
# LANGUAGE GADTs # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # LANGUAGE ViewPatterns # Copyright : ( c ) 2011 - 2016 diagrams team ( see LICENSE ) a diagram from an embedded image with width 1 and height set accordin...
65da711a8e176541ab7575f0ae9454b1505555078c280a19a3c9723da7304c60
jackdoe/bzzz
index_facet_common.clj
(ns bzzz.index-facet-common (use bzzz.util) (:import (org.apache.lucene.facet FacetsConfig))) (defn get-facet-config ^FacetsConfig [facets] (let [config (FacetsConfig.)] (doseq [[dim f-info] facets] (.setMultiValued config (as-str dim) true) (.setRequireDimCount config (as-str dim) true)) con...
null
https://raw.githubusercontent.com/jackdoe/bzzz/ae98708056e39ada28f22aad9e43ea91695b346b/src/bzzz/index_facet_common.clj
clojure
(ns bzzz.index-facet-common (use bzzz.util) (:import (org.apache.lucene.facet FacetsConfig))) (defn get-facet-config ^FacetsConfig [facets] (let [config (FacetsConfig.)] (doseq [[dim f-info] facets] (.setMultiValued config (as-str dim) true) (.setRequireDimCount config (as-str dim) true)) con...
c5cfa27342c91ebf5016aaceacfb439f2e37d55757cc976bdfc178959ec8fa91
Enecuum/Node
Interpreters.hs
module Enecuum.Interpreters ( module X ) where import Enecuum.Core.Interpreters as X import Enecuum.Framework.Interpreters as X
null
https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/src/Enecuum/Interpreters.hs
haskell
module Enecuum.Interpreters ( module X ) where import Enecuum.Core.Interpreters as X import Enecuum.Framework.Interpreters as X
2b6252774a4243cbba0f012a802c64838d73e93e06f0a49eb8f5b777fc76d5be
mfelleisen/RacketSchool
2-house-direct.rkt
#lang racket (require "gui.rkt" "ops.rkt") ;(form Box1HouseOwning [ hasSoldHouse " Did you sell a house in 2010 ? " boolean - widget ] ; [sellingPrice "Price the house was sold for:" money-widget] ; [privateDebt "Private debts for the sold house:" money-widget] [ valueResidue " Value r...
null
https://raw.githubusercontent.com/mfelleisen/RacketSchool/ada599f31d548a538a37d998b32d80aa881d699a/Plan/ql/2-house-direct.rkt
racket
(form Box1HouseOwning [sellingPrice "Price the house was sold for:" money-widget] [privateDebt "Private debts for the sold house:" money-widget] guard not a computed field
#lang racket (require "gui.rkt" "ops.rkt") [ hasSoldHouse " Did you sell a house in 2010 ? " boolean - widget ] [ valueResidue " Value residue : " money - widget ( -/coerce sellingPrice privateDebt ) ] ) (define Box1HouseOwning (make-gui 'Box1HouseOwning)) (define hasSoldHouse undefined) (gu...
8b7bb236d262be7dbfa3aad2c36136cffba0f2448d098efe9017ea08372efed0
rtoy/cmucl
system.lisp
-*- Package : rt ; Log : c.log -*- ;;; ;;; ********************************************************************** This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . ;;; (ext:file-comment "$Header: src/compiler/rt/system.lisp $"...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/compiler/rt/system.lisp
lisp
Log : c.log -*- ********************************************************************** ********************************************************************** $Header: src/compiler/rt/system.lisp $ Type frobbing VOPs. In the immediate case for data, we use the OIL instruction assuming the assumption is r...
This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . (ext:file-comment "$Header: src/compiler/rt/system.lisp $") IBM RT VM definitions of various system hacking operations . Written by IBM RT conversion by . (in-package ...
e38fb946c3f83df387d22a784f7f9feae60d792c3696b56bec91c54389527ccf
kind2-mc/kind2
lustreSimplify.ml
This file is part of the Kind 2 model checker . Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa 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 a...
null
https://raw.githubusercontent.com/kind2-mc/kind2/f353437dc4f4f9f0055861916e5cbb6e564cfc65/src/lustre/lustreSimplify.ml
ocaml
Abbreviations Remove top index from all elements in trie type check with length of arrays when statically known ******************************************************************** Evaluation of expressions ***********************************************************...
This file is part of the Kind 2 model checker . Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa 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 a...
fec69261949fdb0c50380e36c07aea5f8a2f50af39581ecb5d7b1d9ccfe8608d
mikera/clojure-utils
test_core.clj
(ns mikera.cljutils.test-core (:use clojure.test) (:use [mikera.cljutils core])) (defn kws [& {:keys [] :as options}] options) (deftest test-apply-kw (is (= {:a 2} (apply-kw kws {:a 2}))) (is (= {:a 2} (apply-kw kws :a 2 {}))) (is (= {:a 2} (apply-kw kws :a 2 {:a 4}))) (is (= {:a 2 :b 3} (...
null
https://raw.githubusercontent.com/mikera/clojure-utils/92f7fd7a40c9cf22ab7004a304303e45ea4d4284/src/test/clojure/mikera/cljutils/test_core.clj
clojure
(ns mikera.cljutils.test-core (:use clojure.test) (:use [mikera.cljutils core])) (defn kws [& {:keys [] :as options}] options) (deftest test-apply-kw (is (= {:a 2} (apply-kw kws {:a 2}))) (is (= {:a 2} (apply-kw kws :a 2 {}))) (is (= {:a 2} (apply-kw kws :a 2 {:a 4}))) (is (= {:a 2 :b 3} (...
15db8e7f59f349f97a66418157dccec527286ecbb29d577c0ebdcb160d538803
samcf/ogres
storage.cljs
(ns ogres.app.provider.storage (:require [datascript.core :as ds] [datascript.transit :as dt] [dexie] [ogres.app.env :as env] [ogres.app.provider.events :refer [subscribe!]] [ogres.app.provider.state :as state :refer [use-query]] [ogres.app.timin...
null
https://raw.githubusercontent.com/samcf/ogres/c6441f6556403b3c4ed4300f38718173c18e8838/src/main/ogres/app/provider/storage.cljs
clojure
(ns ogres.app.provider.storage (:require [datascript.core :as ds] [datascript.transit :as dt] [dexie] [ogres.app.env :as env] [ogres.app.provider.events :refer [subscribe!]] [ogres.app.provider.state :as state :refer [use-query]] [ogres.app.timin...
6e6d423dbef3bfee2507fececcb164e51cb2dd8545f6a0ca9ab234c157b48467
tweag/ormolu
proc-do-simple2-out.hs
{-# LANGUAGE Arrows #-} foo f = proc a -> do f -< a bazbaz f g h = proc (a, b, c) -> do x <- f b -< a y <- g b -< b z <- h x y -< ( a, b, c ) returnA -< (x, y, z) bar f = proc x -> do { f -< x } <+> do f -< x
null
https://raw.githubusercontent.com/tweag/ormolu/035360e80d9738fe8f57efc4d3b1eea30cf1f233/data/examples/declaration/value/function/arrow/proc-do-simple2-out.hs
haskell
# LANGUAGE Arrows #
foo f = proc a -> do f -< a bazbaz f g h = proc (a, b, c) -> do x <- f b -< a y <- g b -< b z <- h x y -< ( a, b, c ) returnA -< (x, y, z) bar f = proc x -> do { f -< x } <+> do f -< x
597b63ce1b162b8afeadbcfd2178c60695e1e4b1ebbacc9a64a275c9a9c0a075
icicle-lang/zebra-ambiata
Time.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE TemplateHaskell # module Test.Zebra.Time where import qualified Data.ByteString.Char8 as Char8 import qualified Data.Time as Time import Disorder.Jack import P import System.IO (IO) import Test.Zebra.Jack import Zebra.Time...
null
https://raw.githubusercontent.com/icicle-lang/zebra-ambiata/394ee5f98b4805df2c76abb52cdaad9fd7825f81/zebra-core/test/Test/Zebra/Time.hs
haskell
# LANGUAGE NoImplicitPrelude # # LANGUAGE TemplateHaskell # module Test.Zebra.Time where import qualified Data.ByteString.Char8 as Char8 import qualified Data.Time as Time import Disorder.Jack import P import System.IO (IO) import Test.Zebra.Jack import Zebra.Time...
b230426308dc95f96fbb393cf98cf4d0e94dcd796e56a9b2e1fb758d8b1b283e
eltex-ecss/chronica
pt_chronica_optimization.erl
%%%------------------------------------------------------------------- -*- coding : utf-8 -*- @author ( C ) 2017 , Eltex , Novosibirsk , Russia %%% @doc %%% %%% @end %%%------------------------------------------------------------------- -module(pt_chronica_optimization). -export([ init_match_var/2, cr...
null
https://raw.githubusercontent.com/eltex-ecss/chronica/bdc9f37797cd74215a02aabedf03b09005e9b21f/src/pt_chronica_optimization.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- =================================================================== Internal API =================================================================== =====================...
-*- coding : utf-8 -*- @author ( C ) 2017 , Eltex , Novosibirsk , Russia -module(pt_chronica_optimization). -export([ init_match_var/2, create_data_log_ast/2, format_warning/2, delete_ignored_var/2 ]). -include("chronica_pt.hrl"). -include_lib("pt_lib/include/pt_lib.hrl"). -include_lib("pt_li...
2f570180d3f6245946880bbe06e7e4e4e50a3bda56578aa19bf68ec535f5eed2
VisionsGlobalEmpowerment/webchange
views.cljs
(ns webchange.lesson-builder.tools.template-options.sandbox-digging-rounds.views (:require [re-frame.core :as re-frame] [webchange.lesson-builder.tools.template-options.state :as state] [webchange.lesson-builder.widgets.select-image.views :refer [select-image]] [webchange.ui.index :as ui])) (defn- im...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/118ba5ee407ba1261bac40a6ba5729ccda6e8150/src/cljs/webchange/lesson_builder/tools/template_options/sandbox_digging_rounds/views.cljs
clojure
(ns webchange.lesson-builder.tools.template-options.sandbox-digging-rounds.views (:require [re-frame.core :as re-frame] [webchange.lesson-builder.tools.template-options.state :as state] [webchange.lesson-builder.widgets.select-image.views :refer [select-image]] [webchange.ui.index :as ui])) (defn- im...
5fa20b5be0f05ce813c9f1e966dbbc5480a6179a395f7f73eb1d2ca1290680b6
slyrus/mcclim-old
packages.lisp
;;; -*- Mode: Lisp; Package: COMMON-LISP-USER -*- ( c ) copyright 2005 by ( ) ( c ) copyright 2006 by ( ) ;;; This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foun...
null
https://raw.githubusercontent.com/slyrus/mcclim-old/354cdf73c1a4c70e619ccd7d390cb2f416b21c1a/Drei/Tests/packages.lisp
lisp
-*- Mode: Lisp; Package: COMMON-LISP-USER -*- This library is free software; you can redistribute it and/or either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lic...
( c ) copyright 2005 by ( ) ( c ) copyright 2006 by ( ) modify it under the terms of the GNU Library General Public version 2 of the License , or ( at your option ) any later version . Library General Public License for more details . You should have received a copy of the ...
8ea437198a4931bbc695b8337812b67e41858ac239003a041943556700738ee7
videlalvaro/rabbitmq-stream
rabbit_stream_exchange_decorator.erl
-module(rabbit_stream_exchange_decorator). -rabbit_boot_step({?MODULE, [{description, "stream exchange decorator"}, {mfa, {rabbit_registry, register, [exchange_decorator, <<"stream">>, ?MODULE]}}, {requires, rabbit_registry}, ...
null
https://raw.githubusercontent.com/videlalvaro/rabbitmq-stream/441fda9558422aa1bc812673cd1e155c454a80da/src/rabbit_stream_exchange_decorator.erl
erlang
---------------------------------------------------------------------------- and then add the new one. ----------------------------------------------------------------------------
-module(rabbit_stream_exchange_decorator). -rabbit_boot_step({?MODULE, [{description, "stream exchange decorator"}, {mfa, {rabbit_registry, register, [exchange_decorator, <<"stream">>, ?MODULE]}}, {requires, rabbit_registry}, ...
579e6fa11e7cf3a3ec59f7b952244d96279d5f97c051325b5555cde9a9f0166b
moonpolysoft/dynomite
sync_server.erl
%%%------------------------------------------------------------------- File : sync_server.erl @author < > [ / ] 2008 %%% @doc %%% %%% @end %%% @since 2008 - 10 - 03 by %%%------------------------------------------------------------------- -module(sync_server). -author(''). %% API -export(...
null
https://raw.githubusercontent.com/moonpolysoft/dynomite/a5618dcbe17b16cefdc9c567f27a1f4445aee005/elibs/sync_server.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API ==================================================================== API ==================================================================== ------------------...
File : sync_server.erl @author < > [ / ] 2008 @since 2008 - 10 - 03 by -module(sync_server). -author(''). -export([start_link/2, pause/1, play/1, loop/1]). -record(state, {name, partition, paused}). ( ) - > { ok , Pid } | ignore | { error , Error } start_link(Name, Partition) -> Pid =...
a9ae68a0c2a247ed9b48a2cf55440d5c164c88619482c0ec05612dce1be0ee08
phadej/vec
LE.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE EmptyCase # {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE Safe ...
null
https://raw.githubusercontent.com/phadej/vec/a5b674d52469969c2a0c77973f787d48aaf33479/fin/src/Data/Type/Nat/LE.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DeriveDataTypeable # # LANGUAGE FlexibleContexts # # LANGUAGE RankNTypes # # LANGUAGE Safe # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeOperators # Depending on a situation, usage er...
# LANGUAGE EmptyCase # # LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # | Less - than - or - equal relation for ( unary ) natural numbers ' ' . There are at least three ways to encode this relation . * \(z...
968787478867b83c82dec21f0cf6df2989825f170d1d68895a1f23d88a597dd1
chaoxu/mgccl-haskell
sset.hs
main :: IO () main = do n <- getLine print $ 2^(read n::Int) `rem` 1000000
null
https://raw.githubusercontent.com/chaoxu/mgccl-haskell/bb03e39ae43f410bd2a673ac2b438929ab8ef7a1/rosalind/sset.hs
haskell
main :: IO () main = do n <- getLine print $ 2^(read n::Int) `rem` 1000000
271adc80079309fcd53045e53c14800db0caba3f1b8b738dcbd0c99ed54d9037
basho/riak_test
ts_cluster_select_desc_SUITE.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2016 Basho Technologies , Inc. %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the Li...
null
https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/ts_cluster_select_desc_SUITE.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2016 Basho Technologies , Inc. This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(ts_cluster_select_desc_...
28d69124d1a6465d777151bd703bff3c8e78ce3b01516fa7a6d97de9b03fa509
rizo/snowflake-os
decoder.ml
ALAC : Decoder let failf args = Printf.kprintf failwith args type element = SCE (* single channel element *) | CPE (* channel pair element *) | CCE (* coupling channel element *) | LFE (* LFE channel element *) | DSE | PCE | FIL | END let of_element = function | SCE -> 0 | CPE -> 1 | CCE -> 2 ...
null
https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/plugins/alac/decoder.ml
ocaml
single channel element channel pair element coupling channel element LFE channel element compatible_version : int; (* uint8 uint8 uint8 uint8 uint8 uint8 uint16 skip 'alac' atom header if present ensure version matches return the specific_config... the buffers don't matter too much right now ...
ALAC : Decoder let failf args = Printf.kprintf failwith args type element | DSE | PCE | FIL | END let of_element = function | SCE -> 0 | CPE -> 1 | CCE -> 2 | LFE -> 3 | DSE -> 4 | PCE -> 5 | FIL -> 6 | END -> 7 let to_element x = match x with | 0 -> SCE | 1 -> CPE | 2 -> CCE | ...
9e76b058737281065d313331047e3e0b7210c9728c70c58c4c30fd5b25bde086
janestreet/core
array.ml
open! Import open Base_quickcheck.Export open Perms.Export module Array = Base.Array module Core_sequence = Sequence include ( Base.Array : sig type 'a t = 'a array [@@deriving sexp, compare, globalize, sexp_grammar] end) type 'a t = 'a array [@@deriving bin_io, quickcheck, typerep] module Private = Base.A...
null
https://raw.githubusercontent.com/janestreet/core/f382131ccdcb4a8cd21ebf9a49fa42dcf8183de6/core/src/array.ml
ocaml
open! Import open Base_quickcheck.Export open Perms.Export module Array = Base.Array module Core_sequence = Sequence include ( Base.Array : sig type 'a t = 'a array [@@deriving sexp, compare, globalize, sexp_grammar] end) type 'a t = 'a array [@@deriving bin_io, quickcheck, typerep] module Private = Base.A...
bd60bd74f053160df45946ca17ce1a2d78e0f920978368efd99fc6d8361a4780
nuvla/api-server
redirect_cep.clj
(ns sixsq.nuvla.server.middleware.redirect-cep "Ring middleware that will redirect to the cloud entry point on any request that doesn't start with /api/." (:require [ring.util.response :as r])) (defn redirect-cep [wrapped-handler] (fn [{:keys [uri] :as request}] (if (and (string? uri) (re-matches #"/...
null
https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/src/sixsq/nuvla/server/middleware/redirect_cep.clj
clojure
(ns sixsq.nuvla.server.middleware.redirect-cep "Ring middleware that will redirect to the cloud entry point on any request that doesn't start with /api/." (:require [ring.util.response :as r])) (defn redirect-cep [wrapped-handler] (fn [{:keys [uri] :as request}] (if (and (string? uri) (re-matches #"/...
83fdd7da41289a0725c1d804c4371b9ae2990af95c52cb33027ac776c7d5ea7e
shayan-najd/NativeMetaprogramming
T9774.hs
module T9774 where import Control.Exception foo = putStrLn (assert True 'a')
null
https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_fail/T9774.hs
haskell
module T9774 where import Control.Exception foo = putStrLn (assert True 'a')
5cfd2770b67200df9d28c8124a5875d4e6f102afae2d8e7272d479371ced528f
mirage/capnp-rpc
main.ml
open Lwt.Infix let () = Logs.set_level (Some Logs.Warning); Logs.set_reporter (Logs_fmt.reporter ()) let () = Lwt_main.run begin let service = Echo.local in Echo.ping service "foo" >>= fun reply -> Fmt.pr "Got reply %S@." reply; Lwt.return_unit end
null
https://raw.githubusercontent.com/mirage/capnp-rpc/8a0b6dce373dc2e2d547d85e542962862773f74b/examples/v1/main.ml
ocaml
open Lwt.Infix let () = Logs.set_level (Some Logs.Warning); Logs.set_reporter (Logs_fmt.reporter ()) let () = Lwt_main.run begin let service = Echo.local in Echo.ping service "foo" >>= fun reply -> Fmt.pr "Got reply %S@." reply; Lwt.return_unit end
482968136013343eae06725a411f467358be961fd991efe497c41fd1a5e462ef
migae/datastore
dsm.clj
(ns test.dsm (:refer-clojure :exclude [name hash]) (:import [com.google.appengine.tools.development.testing LocalServiceTestHelper LocalServiceTestConfig LocalMemcacheServiceTestConfig LocalMemcacheServiceTestConfig$SizeUnit LocalMailServiceTestConfig ...
null
https://raw.githubusercontent.com/migae/datastore/61b2fc243cfd95956d531a57c86ea58eb19af7b7/test/clj/test/dsm.clj
clojure
(:use [clj-logging-config.log4j]) [ring-zombie.core :as zombie])) (defn- make-local-services-fixture-fn [services hook-helper] (ds/init) (use-fixtures :once (fn [test-fn] (dss/get-datastore-service) (test-fn))) FIXME (log/trace "(key em2)" (key em2)) FIXME (log/trace "(key em3)" (key ...
(ns test.dsm (:refer-clojure :exclude [name hash]) (:import [com.google.appengine.tools.development.testing LocalServiceTestHelper LocalServiceTestConfig LocalMemcacheServiceTestConfig LocalMemcacheServiceTestConfig$SizeUnit LocalMailServiceTestConfig ...
fe317c2946c481b975b4605d83fb45748c83031075bdc49d32c5c53d2ec8d491
stevenvar/OMicroB
display.ml
open Avr let _ = () initialiser la liaison (* initialiser l'écran *) (* écrire dans le buffer *) (* flush *)
null
https://raw.githubusercontent.com/stevenvar/OMicroB/e4324d0736ac677b3086741dfdefb0e46775642b/tests/tuto_3_serialdisplay/display.ml
ocaml
initialiser l'écran écrire dans le buffer flush
open Avr let _ = () initialiser la liaison
8e403df348172329f6eb7932f008fa1d7a3be46c1728e90ab07e96a6557927d6
gowthamk/ocaml-irmin
monkey.ml
open Printf (* Utility functions *) U is a module with two functions module U = struct let string_of_list f l = "[ " ^ List.fold_left (fun a b -> a ^ (f b) ^ "; ") "" l ^ "]" let print_header h = Printf.printf "%s" ("\n" ^ h ^ "\n") let (>>=) = Lwt.Infix.(>>=) let rec loop_until_y (msg:string) : unit Lwt....
null
https://raw.githubusercontent.com/gowthamk/ocaml-irmin/54775f6c3012e87d2d0308f37a2ec7b27477e887/red_black_tree/mem/monkey.ml
ocaml
Utility functions
open Printf U is a module with two functions module U = struct let string_of_list f l = "[ " ^ List.fold_left (fun a b -> a ^ (f b) ^ "; ") "" l ^ "]" let print_header h = Printf.printf "%s" ("\n" ^ h ^ "\n") let (>>=) = Lwt.Infix.(>>=) let rec loop_until_y (msg:string) : unit Lwt.t = Lwt_io.printf "...
f5fffcf706af3b6fc28de7d354f18bb061008fd6d1fb9b3b2fb472392c8bce00
philnguyen/soft-contract
browse.rkt
#lang racket BROWSE -- Benchmark to create and browse through ;;; an AI-like data base of units. (define (lookup key table) (let loop ((x table)) (if (null? x) #f (let ((pair (car x))) (if (eq? (car pair) key) pair (loop (cdr x))))))) (define properties '()) (define (...
null
https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/larceny/browse.rkt
racket
an AI-like data base of units. n is # of symbols m is maximum amount of stuff on the plist npats is the number of basic patterns on the unit (cond did not have an else clause); this changes the run time quite a bit
#lang racket BROWSE -- Benchmark to create and browse through (define (lookup key table) (let loop ((x table)) (if (null? x) #f (let ((pair (car x))) (if (eq? (car pair) key) pair (loop (cdr x))))))) (define properties '()) (define (get key1 key2) (let ((x (lookup k...
728bc1e8f5be8a1e40ca58857fcd05884d296123af0f1a08c99e0b5fb3a38e01
ejgallego/coq-serapi
ser_feedback.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ejgallego/coq-serapi/61d2a5c092c1918312b8a92f43a374639d1786f9/serlib/ser_feedback.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** ************************************...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright 2016 MINES ParisT...
25f97d00220a28b2f5ba18d7012821693f1a6cf9e55699cb67b7afba9779ceaf
diffusionkinetics/open
Yaml.hs
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # module Dampf.Internal.Yaml ( gDecode , options , catchYamlException ) where import Control.Monad.Catch import Control.Monad.IO.Class import Data.Aeson.Types import Data.Yaml import GHC.Generics gDecode :: (Generic a, GFromJSON Zero (Rep a)) =...
null
https://raw.githubusercontent.com/diffusionkinetics/open/673d9a4a099abd9035ccc21e37d8e614a45a1901/dampf/lib/Dampf/Internal/Yaml.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # module Dampf.Internal.Yaml ( gDecode , options , catchYamlException ) where import Control.Monad.Catch import Control.Monad.IO.Class import Data.Aeson.Types import Data.Yaml import GHC.Generics gDecode :: (Generic a, GFromJSON Zero (Rep a)) =...
b8a8aa18526625e6f147a019ce6b6c9cdc9a04df50e2288ca6a840faeb4908e8
denisidoro/rosebud
core.clj
(ns rates.logic.core (:require [clojure.string :as str] [common.config :as config] [quark.beta.math.core :as math2] [quark.beta.time :as time] [quark.math.core :as math])) ;; Math (defn find-beta [points alpha r] (/ (math2/log alpha r) points)) (defn ^:priva...
null
https://raw.githubusercontent.com/denisidoro/rosebud/90385528d9a75a0e17803df487a4f6cfb87e981c/server/src/rates/logic/core.clj
clojure
Math Adapter HTTP
(ns rates.logic.core (:require [clojure.string :as str] [common.config :as config] [quark.beta.math.core :as math2] [quark.beta.time :as time] [quark.math.core :as math])) (defn find-beta [points alpha r] (/ (math2/log alpha r) points)) (defn ^:private distr...
5f9a2f0ac7d0c4d972b4226ae73775544cab3b3408b3553ffc589bf4f27d2043
informatica-unica/lip
main.ml
open SarithexprLib.Main (* read file, and output it to a string *) let read_file filename = let ch = open_in filename in let s = really_input_string ch (in_channel_length ch) in close_in ch; s ;; (* read line from standard input, and output it to a string *) let read_line () = try Some(read_line()) with...
null
https://raw.githubusercontent.com/informatica-unica/lip/f3f0ab2297943957c7dd0534895f2367097043dc/expr/sarithexpr/bin/main.ml
ocaml
read file, and output it to a string read line from standard input, and output it to a string print a result print a trace eval / read input from file trace / read input from file typecheck / read input from file wrong usage
open SarithexprLib.Main let read_file filename = let ch = open_in filename in let s = really_input_string ch (in_channel_length ch) in close_in ch; s ;; let read_line () = try Some(read_line()) with End_of_file -> None ;; let print_val e = print_string (string_of_val e); print_newline();; let rec pr...
e906c91285aba7ef003041d42f2c686ec11fd7264e4976dfa003edde1704e898
incoherentsoftware/defect-process
Types.hs
module Level.Room.Event.Types ( RoomEventType(..) ) where import Data.Aeson.Types (FromJSON) import GHC.Generics (Generic) import Util data RoomEventType = BouncingBallEvent | LightningStrikeEvent | SlotMachineEvent deriving (Bounded, Enum, Eq, FromJSON, Generic, Show) deriving anycla...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/364e3596160102e9da22d5e25864170f094f8e45/src/Level/Room/Event/Types.hs
haskell
module Level.Room.Event.Types ( RoomEventType(..) ) where import Data.Aeson.Types (FromJSON) import GHC.Generics (Generic) import Util data RoomEventType = BouncingBallEvent | LightningStrikeEvent | SlotMachineEvent deriving (Bounded, Enum, Eq, FromJSON, Generic, Show) deriving anycla...
f350daf41a9ddf1319ea40d75a691eabb69b6b787e316e13d6e03bfb7d017fc9
input-output-hk/plutus
CryptoAndHashes.hs
-- editorconfig-checker-disable-file # LANGUAGE AllowAmbiguousTypes # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Benchmarks.CryptoAndHashes (makeBenchmarks) where import Common import Generators import PlutusCore import Cardano.Crypto.DSIGN.Class (ContextDSIGN, DSIGNAlgorithm, Signabl...
null
https://raw.githubusercontent.com/input-output-hk/plutus/d7d3ae37488a64e1de9fa0dde3a075e78d823185/plutus-core/cost-model/budgeting-bench/Benchmarks/CryptoAndHashes.hs
haskell
editorconfig-checker-disable-file ------------ Signature verification ---------------- ^ Seeds for key generation. For some algorithms the seed has to be a certain minimal size and there's a SeedBytesExhausted error if Signing key (private) Verification key (public) This should only happen if we give it a message...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Benchmarks.CryptoAndHashes (makeBenchmarks) where import Common import Generators import PlutusCore import Cardano.Crypto.DSIGN.Class (ContextDSIGN, DSIGNAlgorithm, Signable, deriveVerKeyDSIGN, genKeyDSIGN, ...
1132403e338567ce6c955b6eb0cd98fef62b621f35a7ce4b7e167629ce689767
ocaml-multicore/tezos
sc_rollup_operations.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Nomadic Labs < > (* ...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_protocol/sc_rollup_operations.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 Nomadic Labs < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN AN...
db96e272055b442e2f9fffeafe2692ae252dc46e50a446f93a221d465487b05d
dhleong/wish
proficiency.cljs
(ns wish.sheets.dnd5e.subs.proficiency (:require [clojure.string :as str] [re-frame.core :as rf :refer [reg-sub]] [wish.sheets.dnd5e.data :as data] [wish.sheets.dnd5e.subs.inventory :as inventory] [wish.sheets.dnd5e.subs.util :refer [feature-by-id feature-i...
null
https://raw.githubusercontent.com/dhleong/wish/9036f9da3706bfcc1e4b4736558b6f7309f53b7b/src/cljs/wish/sheets/dnd5e/subs/proficiency.cljs
clojure
======= const =========================================== ======= subs ============================================ else returns a set of ability ids returns a collection of feature ids we now have a seq of proficiency -> true/false: clean up returns a collection of features static not static? okay, it could b...
(ns wish.sheets.dnd5e.subs.proficiency (:require [clojure.string :as str] [re-frame.core :as rf :refer [reg-sub]] [wish.sheets.dnd5e.data :as data] [wish.sheets.dnd5e.subs.inventory :as inventory] [wish.sheets.dnd5e.subs.util :refer [feature-by-id feature-i...
81d90a545f7479a774c9dbcff715d40451fb18e738e507478c6ff78067b9763a
spawnfest/eep49ers
ssl_client_session_cache_db.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2016 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/ssl/src/ssl_client_session_cache_db.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 2008 - 2016 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(ssl_client_session_cache_db). -behaviour(ssl_session_cache_api). -include("ssl_handshake.hrl"). -include("...
37671faeb9af9b6e64e48aeb944db1f69ee82a5a33ed6ab898fa4cdc8319517b
threatgrid/naga-store
util.cljc
(ns naga.util "The ubiquitous utility namespace that every project seems to have" (:require [schema.core :as s :refer [=>]] #?(:cljs [clojure.string])) #?(:clj (:import [clojure.lang Var]))) ;; NOTE: this code avoids cljs.js due to inconsistency in how it gets loaded in standard configurations #?(:cl...
null
https://raw.githubusercontent.com/threatgrid/naga-store/73ceae3692bff1124d0dddaa3bbf6da7b2ab62e4/src/naga/util.cljc
clojure
NOTE: this code avoids cljs.js due to inconsistency in how it gets loaded in standard configurations
(ns naga.util "The ubiquitous utility namespace that every project seems to have" (:require [schema.core :as s :refer [=>]] #?(:cljs [clojure.string])) #?(:clj (:import [clojure.lang Var]))) #?(:cljs (def known-namespaces {'cljs.core (ns-publics 'cljs.core) 'clojure.co...
1ffe581a48a80cbccb3be2b0123ac1c172d04a4b5a609ec5e16f78723f7d9053
clj-easy/graalvm-clojure
core.clj
(ns buffy.core (:require [clojurewerkz.buffy.core :as bf]) (:gen-class)) (defn -main [& args] (let [s (bf/spec :hello (bf/string-type 13) :the-answer (bf/int32-type)) buf (bf/compose-buffer s)] (bf/set-field buf :hello "Hello GraalVM") (prn (bf/get-field buf...
null
https://raw.githubusercontent.com/clj-easy/graalvm-clojure/e4a11863a1e881376154e4518787870a1608946a/buffy/src/buffy/core.clj
clojure
(ns buffy.core (:require [clojurewerkz.buffy.core :as bf]) (:gen-class)) (defn -main [& args] (let [s (bf/spec :hello (bf/string-type 13) :the-answer (bf/int32-type)) buf (bf/compose-buffer s)] (bf/set-field buf :hello "Hello GraalVM") (prn (bf/get-field buf...
cac28728733d60cf3e408a2326a6f8c5529d9c61648f13ba306e3481c5ada592
malcolmstill/ulubis
zxdg-toplevel-v6-impl.lisp
(in-package :ulubis) (def-wl-callback set-title (client toplevel (title :string)) ) (def-wl-callback move (client toplevel (seat :pointer) (serial :uint32)) (setf (moving-surface *compositor*) (make-move-op :surface toplevel :surface-x (x toplevel) :surface-y (y toplevel) :pointer-x...
null
https://raw.githubusercontent.com/malcolmstill/ulubis/23c89ccd5589930e66025487c31531f49218bb76/zxdg-toplevel-v6-impl.lisp
lisp
(in-package :ulubis) (def-wl-callback set-title (client toplevel (title :string)) ) (def-wl-callback move (client toplevel (seat :pointer) (serial :uint32)) (setf (moving-surface *compositor*) (make-move-op :surface toplevel :surface-x (x toplevel) :surface-y (y toplevel) :pointer-x...
b699eade8ac6d645eb927de3305effcfba5a85aa252d33dadc6640f4449a319d
mauny/the-functional-approach-to-programming
orders.mli
(* +type_comparison+ *) type comparison = Smaller | Equiv | Greater;; (* +type_comparison+ *) (* +minmax+ *) type 'a minmax = Min | Plain of 'a | Max;; (* +minmax+ *) value mk_order : ('a -> 'a -> bool) -> 'a -> 'a -> comparison;; value mk_preorder : ('a -> 'b -> bool) * ('a -> 'b -> bool) ...
null
https://raw.githubusercontent.com/mauny/the-functional-approach-to-programming/1ec8bed5d33d3a67bbd67d09afb3f5c3c8978838/cl-75/Util/orders.mli
ocaml
+type_comparison+ +type_comparison+ +minmax+ +minmax+
type comparison = Smaller | Equiv | Greater;; type 'a minmax = Min | Plain of 'a | Max;; value mk_order : ('a -> 'a -> bool) -> 'a -> 'a -> comparison;; value mk_preorder : ('a -> 'b -> bool) * ('a -> 'b -> bool) -> 'a -> 'b -> comparison;; value int_comp : int -> int -> comparison;; value ...
17664d99ab1392e5348779014d5465a589b635f9aba5d94411c2ff94dc9eefd6
input-output-hk/ouroboros-network
NodeId.hs
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE DerivingVia #-} # LANGUAGE GeneralizedNewtypeDeriving # module Ouroboros.Consensus.NodeId ( -- * Node IDs CoreNodeId (..) , NodeId (..) , fromCoreN...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/c82309f403e99d916a76bb4d96d6812fb0a9db81/ouroboros-consensus/src/Ouroboros/Consensus/NodeId.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DerivingVia # * Node IDs ---------------------------------------------------------------------------- ----------------------------------------------------------------------...
# LANGUAGE GeneralizedNewtypeDeriving # module Ouroboros.Consensus.NodeId ( CoreNodeId (..) , NodeId (..) , fromCoreNodeId ) where import Codec.Serialise (Serialise) import Data.Hashable import Data.Word import GHC.Generics (Generic) import NoThunks.Class (N...
d015dcd29fc2d172670f8ef823bf8f711133969200c15a2eefbc00d7f48b2bbc
gafiatulin/codewars
Sort.hs
-- Sort Arrays (Ignoring Case) -- / module Sort where import Data.Char (toLower) import Data.List (sortBy) import Data.Function (on) sortme :: [String] -> [String] sortme = sortBy (compare `on` map toLower)
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/6%20kyu/Sort.hs
haskell
Sort Arrays (Ignoring Case) /
module Sort where import Data.Char (toLower) import Data.List (sortBy) import Data.Function (on) sortme :: [String] -> [String] sortme = sortBy (compare `on` map toLower)
0028558e9c62aced7be8257822a2421af2a365b4af1aa3c4e2a091664555f168
cardmagic/lucash
channel-port.scm
Copyright ( c ) 1993 - 1999 by and . See file COPYING . Ports built on OS channels . ; ; We wrap the channels in a record so that we can distinguish these ports ; from others. ; Repeatedly calls CHANNEL-READ until enough characters have been obtained. There are three different conditions under which the buf...
null
https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scheme/rts/channel-port.scm
scheme
We wrap the channels in a record so that we can distinguish these ports from others. Repeatedly calls CHANNEL-READ until enough characters have been obtained. is called: needed (the originating procedure was CHAR-READY?) This is for sockets, which have their own closing mechanism. finalizer to flush the buf...
Copyright ( c ) 1993 - 1999 by and . See file COPYING . Ports built on OS channels . There are three different conditions under which the buffer - procedure 1 ) any number of characters is fine , but an immediate response is 2 ) wait for at least one character , but not after that ( from READ - CHAR )...
18e595c48da5600a9a4ede981151f94a7f7bccbc7f33f7d7b16e98fe9afd8baf
jabber-at/ejabberd
pubsub_subscription_sql.erl
%%%---------------------------------------------------------------------- %%% File : pubsub_subscription_sql.erl Author : > Purpose : Handle pubsub subscriptions options with ODBC backend based on pubsub_subscription.erl by < > Created : 7 Aug 2009 by > %%% %%% ejabberd , Copyright...
null
https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/src/pubsub_subscription_sql.erl
erlang
---------------------------------------------------------------------- File : pubsub_subscription_sql.erl 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 hope that it will be useful, but WITHOUT ANY WARRANTY; wi...
Author : > Purpose : Handle pubsub subscriptions options with ODBC backend based on pubsub_subscription.erl by < > Created : 7 Aug 2009 by > ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne modify it under the terms of the GNU General Public License as published by the Free So...
b5a2a5d78e7b0f37ae6615673434aa76b7f103f503dca541a9b201e75642361d
1HaskellADay/1HAD
Exercise.hs
module HAD.Y2114.M03.D21.Exercise where -- $setup -- >>> import Test.QuickCheck -- >>> import Data.Maybe (fromJust) | get apair of the min and element of a list ( in one pass ) -- returns Nothing on empty list -- -- Point-free: checked -- The function signature follows the idea of the methods in the System . ...
null
https://raw.githubusercontent.com/1HaskellADay/1HAD/3b3f9b7448744f9b788034f3aca2d5050d1a5c73/exercises/HAD/Y2014/M03/D21/Exercise.hs
haskell
$setup >>> import Test.QuickCheck >>> import Data.Maybe (fromJust) returns Nothing on empty list Point-free: checked module: given a standard generator, you returns the modified list and the generator in an altered state. Nothing
module HAD.Y2114.M03.D21.Exercise where | get apair of the min and element of a list ( in one pass ) The function signature follows the idea of the methods in the System . Random > > > [ 0 .. 10 ] Just ( 0,10 ) > > > [ ] prop > \(NonEmpty(xs ) ) - > minimum xs = = ( fst . fromJust . ) xs prop > \...
e31b10b86caa5ab4c439f6c5e961b514dae426611f3f7eb7b4f05f8389d775c0
bcc32/projecteuler-ocaml
bench_divisors.ml
open! Core open! Import let%bench ("Euler.Int.divisors" [@indexed n = [ 17; 60; 100003; 120000; 600851475143 ]]) = Number_theory.Int.divisors n ;;
null
https://raw.githubusercontent.com/bcc32/projecteuler-ocaml/647a1db1caaf919a1c506c213a2e7948ac3ea63c/bench/src/bench_divisors.ml
ocaml
open! Core open! Import let%bench ("Euler.Int.divisors" [@indexed n = [ 17; 60; 100003; 120000; 600851475143 ]]) = Number_theory.Int.divisors n ;;
940ae1b7ebacab109fb5208fb722ae4932c28ccabb9858b80a89706ae63419df
gonzojive/sbcl
compiler-test-util.lisp
Utilities for verifying features of compiled code This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; While most of SBCL is derived from the CMU CL system , the test ;;;; files (like this one) were written from scratch after the fork from CMU CL . ;;;; ;;;; This softw...
null
https://raw.githubusercontent.com/gonzojive/sbcl/3210d8ed721541d5bba85cbf51831238990e33f1/tests/compiler-test-util.lisp
lisp
more information. files (like this one) were written from scratch after the fork This software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. I do not know why we do this comparasion, the original code did, so I let it fluctuations,...
Utilities for verifying features of compiled code This software is part of the SBCL system . See the README file for While most of SBCL is derived from the CMU CL system , the test from CMU CL . (defpackage :compiler-test-util (:nicknames :ctu) (:use :cl :sb-c :sb-kernel) (:export #:assert-consing ...
a14a8d40998158bc91d8ce16b190a14c42bf83f473e47bb79964e9d7449b79cd
practicalli/four-clojure
047_contain_yourself.clj
(ns four-clojure.47-contain-yourself) ;; #047 Contain Yourself ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Difficulty: Easy ;; Topics: ;; The contains? function checks if a KEY is present in a given collection. ;; This often leads beginner clojurians to use it incorrectly with numerically indexed collections like ...
null
https://raw.githubusercontent.com/practicalli/four-clojure/9812b63769a06f9b0bfd63e5ffce380b67e5468b/src/four_clojure/047_contain_yourself.clj
clojure
#047 Contain Yourself Difficulty: Easy Topics: The contains? function checks if a KEY is present in a given collection. This often leads beginner clojurians to use it incorrectly with numerically indexed collections like vectors and lists. (contains? #{4 5 6} __) (contains? [1 1 1 1 1] __) The aim of this cha...
(ns four-clojure.47-contain-yourself) ( contains ? { 4 : a 2 : b } _ _ ) ( not ( contains ? [ 1 2 4 ] _ _ ) ) Deconstruct the problem The ` some ` function is covered in 4Clojure challenge # 48 (contains? #{4 5 6} 1) (contains? #{4 5 6} 4) The value 1 gives the right result (contains? [1 1 ...
3b4dd27174d843241d407cb0ac73628555f5e567f3033f7dfb0873be794a9257
andrejbauer/coop
lexer.ml
* Lexing with support for UTF8 characers . (** Reserved words. *) let reserved = [ ("and", Parser.AND) ; ("as", Parser.AS) ; ("begin", Parser.BEGIN) ; ("bool", Parser.BOOL) ; ("container", Parser.CONTAINER) ; ("else", Parser.ELSE) ; ("empty", Parser.EMPTY) ; ("end", Parser.END) ; ("external", Parser....
null
https://raw.githubusercontent.com/andrejbauer/coop/173d0889795c55a370f79fb42425b77a5c0c8464/src/lexer.ml
ocaml
* Reserved words. sub-/super-scripts sub-/super-scripts the type of run is also: (t -> 'a) -> ('a, 'b) MenhirLib.Convert.traditional -> t -> 'b assert false (\* Shouldn't happen with UTF8 *\) Close the file in case of any parsing errors. Any errors when opening or closing a file are fatal.
* Lexing with support for UTF8 characers . let reserved = [ ("and", Parser.AND) ; ("as", Parser.AS) ; ("begin", Parser.BEGIN) ; ("bool", Parser.BOOL) ; ("container", Parser.CONTAINER) ; ("else", Parser.ELSE) ; ("empty", Parser.EMPTY) ; ("end", Parser.END) ; ("external", Parser.EXTERNAL) ; ("excepti...
752d27888575765840c401dac8f3ee1c8150763da9e39a10bf38ae9467194b1f
plt-amy/mld
Convert.hs
{-# OPTIONS_GHC -Wno-name-shadowing #-} module Closure.Convert where import qualified Data.Map.Strict as Map import qualified Data.Set as Set import Control.Monad.Writer import Control.Arrow import qualified Closure.Lang as Cl import Syntax closureConvert :: Exp -> [Cl.Dec] closureConvert c = let ((code, _), decs...
null
https://raw.githubusercontent.com/plt-amy/mld/d8cc4e07816c05ce2ee0a09200921534c4bdc667/src/Closure/Convert.hs
haskell
# OPTIONS_GHC -Wno-name-shadowing #
module Closure.Convert where import qualified Data.Map.Strict as Map import qualified Data.Set as Set import Control.Monad.Writer import Control.Arrow import qualified Closure.Lang as Cl import Syntax closureConvert :: Exp -> [Cl.Dec] closureConvert c = let ((code, _), decs) = runWriter (convert [1..] c) in de...
bb2d003fc4fb169b740b6230a6752c4c301a0f229e621fc0c0336107ab4c1a4a
borkdude/carve
leave_function_expected.clj
(ns interactive.leave-function (:require [clojure.string :refer []])) (defn used-fn [] nil) (defn unused-fn [] nil) (fn -main [& _args] (used-fn))
null
https://raw.githubusercontent.com/borkdude/carve/f499f65e36e02484609f01ce891f3c0207b24444/test-resources/interactive/leave_function_expected.clj
clojure
(ns interactive.leave-function (:require [clojure.string :refer []])) (defn used-fn [] nil) (defn unused-fn [] nil) (fn -main [& _args] (used-fn))
53f57fdbab7a6b6c66a458859d87a6e0fe58163ac0cff234acac8c8f25ed5459
JohnLato/language-objc
ParserMonad.hs
# LANGUAGE TupleSections , BangPatterns , NoMonomorphismRestriction , , DeriveFunctor # ,BangPatterns ,NoMonomorphismRestriction ,GeneralizedNewtypeDeriving ,DeriveFunctor #-} ---------------------------------------------------...
null
https://raw.githubusercontent.com/JohnLato/language-objc/8e9455f15b32229f7caf13769c8945d8544c79f0/src/Language/ObjC/Parser/ParserMonad.hs
haskell
--------------------------------------------------------------------------- | Module : Language.ObjC.Syntax.ParserMonad License : BSD-style Maintainer : Portability : portable dictated by that, eg having to be able to remember the last token. The monad also provides a unique name supply (via ...
# LANGUAGE TupleSections , BangPatterns , NoMonomorphismRestriction , , DeriveFunctor # ,BangPatterns ,NoMonomorphismRestriction ,GeneralizedNewtypeDeriving ,DeriveFunctor #-} Copyright : ( c ) [ 1999 .. 2004 ] ...
2173dc809387c6c003fe7fb3bd13575b09682949b1ea3625a489c582f5c1bb70
alex314159/ib-re-actor-976-plus
advanced_app.clj
(ns demoapps.advanced_app (:require [ib-re-actor-976-plus.gateway :as gateway] [clojure.tools.logging :as log] [ib-re-actor-976-plus.translation :as translation] [ib-re-actor-976-plus.mapping :refer [map->]] [ib-re-actor-976-plus.client-socket :as cs] ) (:...
null
https://raw.githubusercontent.com/alex314159/ib-re-actor-976-plus/b6298181d183c00effa28780cb5639fefed46d04/src/demoapps/advanced_app.clj
clojure
ADVANCED APP; This will be a more complex listener that also allows you to watch several accounts at the same time. Call-backs that are interesting will be saved in atoms. Rest will be logged, so nothing is lost this atom will have all the data we want to keep. ; nil punning invoked upon connecting API client has ...
(ns demoapps.advanced_app (:require [ib-re-actor-976-plus.gateway :as gateway] [clojure.tools.logging :as log] [ib-re-actor-976-plus.translation :as translation] [ib-re-actor-976-plus.mapping :refer [map->]] [ib-re-actor-976-plus.client-socket :as cs] ) (:...
4fe3e4581c75922dd9981cbcd72012622636fc2c303b3fe2d04d6fa0d40ffec0
craigl64/clim-ccl
package.lisp
-*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Package : CL - USER ; Base : 10 -*- Copyright 1990 Massachusetts Institute of Technology , Cambridge , Massachusetts . All Rights Reserved . ;;; ;;; Permission to use, copy, modify, and distribute this software and its ;;; documentation for any purpose and...
null
https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/xlib/package.lisp
lisp
Syntax : ANSI - Common - Lisp ; Package : CL - USER ; Base : 10 -*- Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this...
Copyright 1990 Massachusetts Institute of Technology , Cambridge , Massachusetts . All Rights Reserved . documentation , and that the name MIT not be used in advertising or #+clx-ansi-common-lisp (common-lisp:in-package :common-lisp-user) #+clx-ansi-common-lisp (defpackage xlib (:use common-lisp) (:si...
f9b8a027244b76435bbdf87161cec71e7310cb1676a3b969fe91e8fe2c14a3b0
snape/Loopless-Functional-Algorithms
RealTimeQueue.hs
This file is part of " Loopless Functional Algorithms " . -- SPDX - FileCopyrightText : 2005 , Oxford University Computing Laboratory SPDX - License - Identifier : Apache-2.0 -- Licensed under the Apache License , Version 2.0 ( the " License " ) ; -- you may not use this file except in compliance with the Lic...
null
https://raw.githubusercontent.com/snape/Loopless-Functional-Algorithms/b96759a40fcdfad10734071776936514ace4dfa1/RealTimeQueue.hs
haskell
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permi...
This file is part of " Loopless Functional Algorithms " . SPDX - FileCopyrightText : 2005 , Oxford University Computing Laboratory SPDX - License - Identifier : Apache-2.0 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS...
9f9615598d46796f8f9fc1165ff2a7a13877d72d35425c20d90ff340898fe622
kalxd/zubat
ffi.rkt
#lang azelf (require ffi/unsafe ffi/unsafe/define (for-syntax racket/base racket/syntax)) (provide (all-defined-out)) (define-syntax (define-pointer stx) (syntax-case stx () [(_ name) (with-syntax ([name (format-id stx "~a-ptr*" #'name)]) #'(define name (_cp...
null
https://raw.githubusercontent.com/kalxd/zubat/d8669c586dd7dd95711a83ae3f08c8477a27b060/internal/ffi.rkt
racket
css selector element parser html parser
#lang azelf (require ffi/unsafe ffi/unsafe/define (for-syntax racket/base racket/syntax)) (provide (all-defined-out)) (define-syntax (define-pointer stx) (syntax-case stx () [(_ name) (with-syntax ([name (format-id stx "~a-ptr*" #'name)]) #'(define name (_cp...
cf7b9b2858dcf161537879fc9f1dde46ede0a8304fa69e40d611fa6dc4be431f
DSiSc/why3
eliminate_unknown_types.ml
(********************************************************************) (* *) The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University (* ...
null
https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/src/transform/eliminate_unknown_types.ml
ocaml
****************************************************************** This software is distributed under the terms of the GNU Lesser on linking described in file LICENSE. ...
The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University General Public License version 2.1 , with the special exception open Term open Decl open Theory open Ty let debug = Debug.register_info_flag "eliminate_unknown_types" ...
34e20e7d3df856ac99b375e25a23050ee3e5061329ba35168af6950d5f01ad97
adamliesko/dynamo
director.erl
% Description % % Director server as a central coordinating module which accepts calls from Cowboy API and forwards them to the % underlaying modules - ring, storage, vector clock etc. -module(director). -behaviour(gen_server). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3,p...
null
https://raw.githubusercontent.com/adamliesko/dynamo/cd97a96d1ce250e93f39cd16f9a3ef6c7030678d/src/director.erl
erlang
Description % Director server as a central coordinating module which accepts calls from Cowboy API and forwards them to the underlaying modules - ring, storage, vector clock etc. N - degree of replication api for getting a key api for getting a key api for putting a key, with option to specify context initializ...
-module(director). -behaviour(gen_server). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3,p_put/4,p_put/5,p_del/2,p_del/3,p_get/2,p_get/3]). -export([start_link/1, get/1, put/3, del/1, stop/0]). R - number of req . successful replies during read operation W - number of...
95bae7ec1b56d45a6847f043a56ed6d4b5c6ee2ce90a718f7c13b880e3823b04
janestreet/krb
config_gen.mli
include Config_gen_intf.Config_gen
null
https://raw.githubusercontent.com/janestreet/krb/1105ba1e8b836f80f09e663bc1b4233cf2607e7b/internal/config_gen.mli
ocaml
include Config_gen_intf.Config_gen
86396cc3e1c5c341cae742109548aa8571d04c7f8715516d86adc920ca25114f
goldfirere/thesis
Array.hs
# LANGUAGE CPP , MagicHash , UnboxedTuples , DeriveDataTypeable , BangPatterns # -- | -- Module : Data.Primitive.Array Copyright : ( c ) Roman Leshchinskiy 2009 - 2012 -- License : BSD-style -- Maintainer : < > -- Portability : non-portable -- -- Primitive boxed arrays -- module Data.Primitive.Ar...
null
https://raw.githubusercontent.com/goldfirere/thesis/22f066bc26b1147530525aabb3df686416b3e4aa/cab/primitive-0.6/Data/Primitive/Array.hs
haskell
| Module : Data.Primitive.Array License : BSD-style Portability : non-portable Primitive boxed arrays | Boxed arrays | Mutable boxed arrays associated with a primitive state token. | Create a new mutable array of the specified size and initialise all elements with the given value. | Read a value f...
# LANGUAGE CPP , MagicHash , UnboxedTuples , DeriveDataTypeable , BangPatterns # Copyright : ( c ) Roman Leshchinskiy 2009 - 2012 Maintainer : < > module Data.Primitive.Array ( Array(..), MutableArray(..), newArray, readArray, writeArray, indexArray, indexArrayM, unsafeFreezeArray, unsafeThawArray,...
f3bf7cdb951412a8c365c2a5b69f90afa4cb8d8a8216eecd2ca8386120060a82
Viasat/halite
envs.clj
Copyright ( c ) 2022 Viasat , Inc. Licensed under the MIT license (ns com.viasat.halite.envs "Halite spec, type, and eval environment abstractions." (:require [clojure.set :as set] [com.viasat.halite.base :as base] [com.viasat.halite.types :as types] [schema.core :as s])) (...
null
https://raw.githubusercontent.com/Viasat/halite/1145fdf49b5148acb389dd5100059b0d2ef959e1/src/com/viasat/halite/envs.clj
clojure
for backwards compatibility for backwards compatibility Spec Maps ;;;;;;;;;;;; like in the propagate namespace. all specs into a map (e.g. they are stored in a database). So the thought is that we keep however, for operations that require enumarating all specs (such as a global check for dependency opt-in to the...
Copyright ( c ) 2022 Viasat , Inc. Licensed under the MIT license (ns com.viasat.halite.envs "Halite spec, type, and eval environment abstractions." (:require [clojure.set :as set] [com.viasat.halite.base :as base] [com.viasat.halite.types :as types] [schema.core :as s])) (...
c322db80bf8578dcdda91aab3f4ec765efef0c2b06e5dec5aa19ee9111235f7c
whilo/denisovan
project.clj
(defproject denisovan "0.1.0-SNAPSHOT" :description "A core.matrix backend for neanderthal." :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.9.0"] [uncomplicate/neanderthal "0.18.0"] [net.mikera/core.matrix "...
null
https://raw.githubusercontent.com/whilo/denisovan/fd6eabaec4f3d91f598332a97208e6268fe32196/project.clj
clojure
(defproject denisovan "0.1.0-SNAPSHOT" :description "A core.matrix backend for neanderthal." :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.9.0"] [uncomplicate/neanderthal "0.18.0"] [net.mikera/core.matrix "...