_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
2327cca3658eb3d4d2f4f0b1cf1cf8c990f2f9b16ab4c021a0864d023f057756
polyfy/polylith
workspace_test.clj
(ns polylith.clj.core.creator.workspace-test (:require [clojure.test :refer :all] [polylith.clj.core.git.interface :as git] [polylith.clj.core.test-helper.interface :as helper])) (use-fixtures :each helper/test-setup-and-tear-down) (deftest create-workspace--when-workspace-already-exists--re...
null
https://raw.githubusercontent.com/polyfy/polylith/858363d7db5d3bc439074be451ff42765f405a76/components/creator/test/polylith/clj/core/creator/workspace_test.clj
clojure
(ns polylith.clj.core.creator.workspace-test (:require [clojure.test :refer :all] [polylith.clj.core.git.interface :as git] [polylith.clj.core.test-helper.interface :as helper])) (use-fixtures :each helper/test-setup-and-tear-down) (deftest create-workspace--when-workspace-already-exists--re...
3819be41447ba82a9a3a046b7448d245e78c661f7fcf56613d54ece4483404d8
sveri/ffdc
db.clj
(ns de.sveri.structconverter.db (:require [datomic.api :as d] [de.sveri.friendui-datomic.storage :as f-d-storage])) (defn get-db-val-fn [db-conn] (fn [] (d/db db-conn))) (defn get-db-val [db-conn] (d/db db-conn)) (defn FrienduiStorageImpl [db-conn] (f-d-storage/->FrienduiStorage db-conn (get-db-val...
null
https://raw.githubusercontent.com/sveri/ffdc/303c94b9e3b1bd0e4aa13ca948d08eac26f96acf/src/clj/de/sveri/structconverter/db.clj
clojure
execute this in the project repl to initialize the db
(ns de.sveri.structconverter.db (:require [datomic.api :as d] [de.sveri.friendui-datomic.storage :as f-d-storage])) (defn get-db-val-fn [db-conn] (fn [] (d/db db-conn))) (defn get-db-val [db-conn] (d/db db-conn)) (defn FrienduiStorageImpl [db-conn] (f-d-storage/->FrienduiStorage db-conn (get-db-val...
5f679fab618d0891b850c4c4cd6d5533bf42c2d58f66db305b7aa7707fc269a5
ThoughtWorksInc/stonecutter
translation.clj
(ns stonecutter.test.translation (:require [midje.sweet :refer :all] [stonecutter.translation :as t])) (facts "can load translations from a string" (fact "basic example" (t/load-translations-from-string "a-key: Hello") => {:a-key "Hello"}) (fact "with nested keys" ...
null
https://raw.githubusercontent.com/ThoughtWorksInc/stonecutter/37ed22dd276ac652176c4d880e0f1b0c1e27abfe/test/stonecutter/test/translation.clj
clojure
(ns stonecutter.test.translation (:require [midje.sweet :refer :all] [stonecutter.translation :as t])) (facts "can load translations from a string" (fact "basic example" (t/load-translations-from-string "a-key: Hello") => {:a-key "Hello"}) (fact "with nested keys" ...
eeaaaf324c141115c47aff344172bdb2cd116f2f525c16c564c0dfce556d2e33
realworldocaml/book
dep_conf_eval.mli
* Interpret dependencies written in Dune files open Import * for all the files in [ _ build / install ] that belong to this package val package_install : context:Build_context.t -> pkg:Package.t -> Alias.t (** Evaluates unnamed dependency specifications. *) val unnamed : expander:Expander.t -> Dep_conf.t lis...
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_rules/dep_conf_eval.mli
ocaml
* Evaluates unnamed dependency specifications. * Evaluates named dependency specifications. Return the action build that register dependencies as well as an expander that can be used to expand to expand variables from the bindings.
* Interpret dependencies written in Dune files open Import * for all the files in [ _ build / install ] that belong to this package val package_install : context:Build_context.t -> pkg:Package.t -> Alias.t val unnamed : expander:Expander.t -> Dep_conf.t list -> unit Action_builder.t * Sandbox_config.t val...
e32609c4756afd4f20758ec4d2457967adefed530a2a56967754495e3d3504d6
yallop/ocaml-ctypes
ncurses_stub_cmd.ml
* Copyright ( c ) 2014 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2014 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) module N = Ncurses_bindings.B...
null
https://raw.githubusercontent.com/yallop/ocaml-ctypes/52ff621f47dbc1ee5a90c30af0ae0474549946b4/examples/ncurses/stub-generation/ncurses_stub_cmd.ml
ocaml
* Copyright ( c ) 2014 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2014 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) module N = Ncurses_bindings.B...
1fcbca6036ad04562550759a3c22d0f890f04c2c96c3249afa0b8b4bd0644205
dongcarl/guix
browser-extensions.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2020 , 2021 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of t...
null
https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/packages/browser-extensions.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2020 , 2021 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gnu packages browser-extensions) #:use-module (guix packages) #:use-module (guix git-do...
77b4f0f182453625f61a36d20cb89e3aec65814bbb5f63cffde047f8d60413e1
jiangpengnju/htdp2e
design-recipe-for-self-referentials.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname design-recipe-for-self-referentials) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t con...
null
https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/arbitrarily-large-data/designing-with-self-referential-data-dafinitions/design-recipe-for-self-referentials.rkt
racket
about the language level of this file in a form that our tools can easily process. - '() - (cons String List-of-strings) List-of-strings -> Number count how many strings alos contains List-of-strings -> Number determines how many strings are on alos
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname design-recipe-for-self-referentials) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) Design Recipe (for self-referential ...
3c861d7b3275330ff8267731421576a23a5e5c89f4b0c26435d9272d2977922b
emina/rosette
easy.rkt
#lang rosette (require "../bv.rkt") (require "reference.rkt") (provide (all-defined-out)) (BV (bitvector 32)) Mask off the rightmost 1 - bit . < 1 sec . (define-fragment (p1* x) #:implements p1 #:library (bvlib [{bv1 bvand bvsub} 1])) Test whether an unsigned integer is of the form 2^n-1 . < 1 sec . (defin...
null
https://raw.githubusercontent.com/emina/rosette/a64e2bccfe5876c5daaf4a17c5a28a49e2fbd501/sdsl/bv/examples/easy.rkt
racket
#lang rosette (require "../bv.rkt") (require "reference.rkt") (provide (all-defined-out)) (BV (bitvector 32)) Mask off the rightmost 1 - bit . < 1 sec . (define-fragment (p1* x) #:implements p1 #:library (bvlib [{bv1 bvand bvsub} 1])) Test whether an unsigned integer is of the form 2^n-1 . < 1 sec . (defin...
b49f99273036198b2a4c99082d2214569fb5cb3ef754acabf61bc5acb6e6a4e3
RichiH/git-annex
Shim.hs
module Utility.Process.Shim (module X) where import System.Process as X
null
https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Utility/Process/Shim.hs
haskell
module Utility.Process.Shim (module X) where import System.Process as X
3e0f3886b59647ee4e93037cbc0b4df200ad5cedb0f356f6239c0d4526d30630
triffon/fp-2019-20
04-zip.rkt
#lang racket (require rackunit) (require rackunit/text-ui) ; zip (define (zip xs ys) (void) ) (define tests (test-suite "Zip" (check-equal? (zip '(1 2 3) '(4 5 6)) '((1 4) (2 5) (3 6))) (check-equal? (zip '(28 9 12) '(1 3)) '((28 1) (9 3))) ) ) (run-tests tests 'verbose)
null
https://raw.githubusercontent.com/triffon/fp-2019-20/7efb13ff4de3ea13baa2c5c59eb57341fac15641/exercises/computer-science-3/exercises/05.more-lists/04-zip.rkt
racket
zip
#lang racket (require rackunit) (require rackunit/text-ui) (define (zip xs ys) (void) ) (define tests (test-suite "Zip" (check-equal? (zip '(1 2 3) '(4 5 6)) '((1 4) (2 5) (3 6))) (check-equal? (zip '(28 9 12) '(1 3)) '((28 1) (9 3))) ) ) (run-tests tests 'verbose)
d027fd9de4a018de10d4f6cd08f3db9cf092f1959b2eef4cefacaf321122cbad
larrychristensen/orcpub
character_props.cljc
(ns orcpub.dnd.e5.character-props (:require [orcpub.entity-spec :as es])) (defn get-prop [built-char prop] (es/entity-val built-char prop)) (defmacro defprop [kw] `(defn ~(symbol (name kw)) [built-char#] (get-prop built-char# ~kw)))
null
https://raw.githubusercontent.com/larrychristensen/orcpub/e83995857f7e64af1798009a45a0b03abcd3a4be/src/cljc/orcpub/dnd/e5/character_props.cljc
clojure
(ns orcpub.dnd.e5.character-props (:require [orcpub.entity-spec :as es])) (defn get-prop [built-char prop] (es/entity-val built-char prop)) (defmacro defprop [kw] `(defn ~(symbol (name kw)) [built-char#] (get-prop built-char# ~kw)))
0d7fb8741c863f29863468935890bfab93d9b016a89a203326c22a15508721f9
graninas/Functional-Design-and-Architecture
Sentry.hs
{-# LANGUAGE OverloadedStrings #-} module Framework.Logging.StructuredLogger.Impl.Sentry where import qualified Data.Aeson as A import qualified Data.Text as T import qualified Data.ByteString.Lazy as LBS import qualified Data.Text.Encoding as T import Data.Time import qualified Data.HashMap.Strict as HM import qualif...
null
https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/f2e4462e09d79b36560a029ebda70cbac3813da3/Second-Edition-Manning-Publications/BookSamples/CH10/Section10p1/src/Framework/Logging/StructuredLogger/Impl/Sentry.hs
haskell
# LANGUAGE OverloadedStrings # nothing to do here A simplified pseudocode for the book. interpretSentryLoggerMethod' :: R.SentryService -> L.StructuredLoggerF a -> IO a let sSeverity = toSentrySeverity severity let sMsg = T.unpack msg pure $ next () :: Map.Map T.FieldKey T.FieldValue -> R.Se...
module Framework.Logging.StructuredLogger.Impl.Sentry where import qualified Data.Aeson as A import qualified Data.Text as T import qualified Data.ByteString.Lazy as LBS import qualified Data.Text.Encoding as T import Data.Time import qualified Data.HashMap.Strict as HM import qualified Data.Map as Map import Control....
cb98bf9d296c69a52e9162413a92ea2aec168a3c798821d549ba37c3c97d7534
spawnfest/eep49ers
f.erl
-module(f). -export([f1/0,f2/0,call_f2_when_isolated/0]). f1() -> f1_line1, f1_line2. f2() -> f2_line1, f2_line2. call_f2_when_isolated() -> [Other] = nodes(), net_kernel:disconnect(Other), do_call_f2_when_isolated(). do_call_f2_when_isolated() -> case nodes() of [] -> f2(); _...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/tools/test/cover_SUITE_data/f.erl
erlang
-module(f). -export([f1/0,f2/0,call_f2_when_isolated/0]). f1() -> f1_line1, f1_line2. f2() -> f2_line1, f2_line2. call_f2_when_isolated() -> [Other] = nodes(), net_kernel:disconnect(Other), do_call_f2_when_isolated(). do_call_f2_when_isolated() -> case nodes() of [] -> f2(); _...
67c8e69a61c669686dc228ad685e1a428e7385e4de8b859061379748ab5c0d54
gadfly361/reagent-figwheel
core.cljs
(ns {{ns-name}}.core (:require [reagent.core :as reagent]{{#re-frisk?}} [re-frisk.core :as rf]{{/re-frisk?}} )) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Vars (defonce app-state (reagent/atom {})) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Page (defn page [ratom] [:div "Welcome to reagent-figwheel."]) ;;;;;;;...
null
https://raw.githubusercontent.com/gadfly361/reagent-figwheel/4c40657b31a2b358be5697add2e96e8cac6f8535/src/leiningen/new/reagent_figwheel/src/cljs/core.cljs
clojure
Page
(ns {{ns-name}}.core (:require [reagent.core :as reagent]{{#re-frisk?}} [re-frisk.core :as rf]{{/re-frisk?}} )) Vars (defonce app-state (reagent/atom {})) (defn page [ratom] [:div "Welcome to reagent-figwheel."]) Initialize App (defn dev-setup [] (when ^boolean js/goog.DEBUG (enab...
82b1f102f149deaa13b646c0f936171ad8f72242a6cfc9fdf7fce107a6e78c9f
realworldocaml/mdx
syntax.ml
type t = Markdown | Cram | Mli let pp fs = function | Markdown -> Fmt.string fs "markdown" | Cram -> Fmt.string fs "cram" | Mli -> Fmt.string fs "mli" let equal x y = x = y let infer ~file = match Filename.extension file with | ".t" -> Some Cram | ".md" -> Some Markdown | ".mli" -> Some Mli | _ -> No...
null
https://raw.githubusercontent.com/realworldocaml/mdx/0644a331fbff863a43200ec1db7092a4c51c411a/lib/syntax.ml
ocaml
type t = Markdown | Cram | Mli let pp fs = function | Markdown -> Fmt.string fs "markdown" | Cram -> Fmt.string fs "cram" | Mli -> Fmt.string fs "mli" let equal x y = x = y let infer ~file = match Filename.extension file with | ".t" -> Some Cram | ".md" -> Some Markdown | ".mli" -> Some Mli | _ -> No...
3ba614bb59c80e9cda57f61e6ffe4509c30212deb222bfe4f96d886de87fdafa
ghalestrilo/seg
events.cljs
(ns segue.events "Event handlers for re-frame dispatch events. Used to manage app db updates and side-effects. -frame/blob/master/docs/EffectfulHandlers.md" (:require [re-frame.core :as rf] [segue.track :refer [read-file parse-section prep-section load-track]] [segue.repl :refer [spawn-process repl-...
null
https://raw.githubusercontent.com/ghalestrilo/seg/1fad7f310a1652adffd16729ab16c5f457ac1860/src/segue/events.cljs
clojure
Below are very general effect handlers. While you can use these to get going quickly you are likely better off creating custom handlers for actions specific to your application. TODO: check if process exists Case 1: Playing a section (println "section:" (prep-section section)) FIXME: find section definition FIXME...
(ns segue.events "Event handlers for re-frame dispatch events. Used to manage app db updates and side-effects. -frame/blob/master/docs/EffectfulHandlers.md" (:require [re-frame.core :as rf] [segue.track :refer [read-file parse-section prep-section load-track]] [segue.repl :refer [spawn-process repl-...
e0d7d797072dcf52658488c048dee94fd13e656ea6d0c05bc1fce15e0589dbdc
samrushing/irken-compiler
t19.scm
;; -*- Mode: Irken -*- (include "lib/core.scm") (define (thing) (let loop ((n 10000)) (if (= n 100) (%exit #f 42) (loop (- n 1))))) (thing)
null
https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/vm/tests/t19.scm
scheme
-*- Mode: Irken -*-
(include "lib/core.scm") (define (thing) (let loop ((n 10000)) (if (= n 100) (%exit #f 42) (loop (- n 1))))) (thing)
e0a99e4af340d0cf58d6b2be9c80b4ffa1908a9159fc0a37246f421149f8e0c4
nomeata/incredible
Utils.hs
module Utils where subscriptify :: Char -> Char subscriptify '0' = '₀' subscriptify '1' = '₁' subscriptify '2' = '₂' subscriptify '3' = '₃' subscriptify '4' = '₄' subscriptify '5' = '₅' subscriptify '6' = '₆' subscriptify '7' = '₇' subscriptify '8' = '₈' subscriptify '9' = '₉' subscriptify _ = error "subscriptify: no...
null
https://raw.githubusercontent.com/nomeata/incredible/d18ada4ae7ce1c7ca268c050ee688b633a307c2e/logic/Utils.hs
haskell
module Utils where subscriptify :: Char -> Char subscriptify '0' = '₀' subscriptify '1' = '₁' subscriptify '2' = '₂' subscriptify '3' = '₃' subscriptify '4' = '₄' subscriptify '5' = '₅' subscriptify '6' = '₆' subscriptify '7' = '₇' subscriptify '8' = '₈' subscriptify '9' = '₉' subscriptify _ = error "subscriptify: no...
f852addc071362a385c034e5b6c379d9a6b0c5fef822195184b5c36ab138c0a1
cnuernber/dtype-next
next_item_fn.clj
(ns tech.v3.parallel.next-item-fn (:require [tech.v3.parallel.for :as pfor])) (defn create-next-item-fn "Given a sequence return a function that each time called (with no arguments) returns the next item in the sequence, iterable, or stream in a threadsafe but mutable fashion." [item-sequence] (let [itera...
null
https://raw.githubusercontent.com/cnuernber/dtype-next/8fb3166a44a2ce21a673c864ae4d0351b6813d46/src/tech/v3/parallel/next_item_fn.clj
clojure
(ns tech.v3.parallel.next-item-fn (:require [tech.v3.parallel.for :as pfor])) (defn create-next-item-fn "Given a sequence return a function that each time called (with no arguments) returns the next item in the sequence, iterable, or stream in a threadsafe but mutable fashion." [item-sequence] (let [itera...
62ac0b31102b719236935eeb95b7803530a3420c6ea7043d8ded3c2037faab01
donaldsonjw/bigloo
loc2glo.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / comptime / Integrate / loc2glo.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Integrate/loc2glo.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * We translate a local function definition into a global one. */ *===========================...
* serrano / prgm / project / bigloo / comptime / Integrate / loc2glo.scm * / * Author : * / * Creation : We d Mar 15 17:29:48 1995 * / * Last change : Tue Oct 19 17:44:16 2010 ( serrano ) * / * Cop...
c1d59544888a7070c515e954ad768f7767ed12f01ad102f049f87928795addb5
ocaml/odoc
comment.ml
* Copyright ( c ) 2016 , 2017 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND...
null
https://raw.githubusercontent.com/ocaml/odoc/a52dd8e960f99b38162d40311a9c4512d5741d43/src/document/comment.ml
ocaml
This is the entry point. stop_before is false on entry, true on recursive call. IDENTIFIER MUST BE RENAMED TO DEFINITION. FIXME: better error message TODO Rework that ugly function. TODO References should be set in code style, if they are to code elements. XXX Span We are not supposed to...
* Copyright ( c ) 2016 , 2017 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND...
afac6ecc35ddb04443946699a2a9d22178e7d131a37282020ab42998490b8abe
benzap/fif
multi.cljc
(ns fif.stdlib.realizer.multi "Notes: - depends on 'apply' word function in the collectors stdlib " (:require [fif.stack-machine :as stack-machine] [fif.stack-machine.processor :as processor] [fif.stack-machine.stash :as stack-machine.stash] [fif.stack-machine.words :refer [set-global-word-defn]] ...
null
https://raw.githubusercontent.com/benzap/fif/972adab8b86c016b04babea49d52198585172fe3/src/fif/stdlib/realizer/multi.cljc
clojure
(ns fif.stdlib.realizer.multi "Notes: - depends on 'apply' word function in the collectors stdlib " (:require [fif.stack-machine :as stack-machine] [fif.stack-machine.processor :as processor] [fif.stack-machine.stash :as stack-machine.stash] [fif.stack-machine.words :refer [set-global-word-defn]] ...
6efe9c2ffdf543b819158773c7a7a40160d6dad479a2da01dfe65d9e25552d4d
kiranlak/austin-sbst
testCaseWriter.ml
Copyright : , University College London , 2011 open Cil open Solution let flags = [Open_creat;Open_append;Open_text] let perm = 0o755 let protos : (string, bool) Hashtbl.t = Hashtbl.create 10 let added (f:fundec) = Hashtbl.mem protos f.svar.vname let mallocExpr = let v = makeVarinfo false "malloc" (TFun(vo...
null
https://raw.githubusercontent.com/kiranlak/austin-sbst/9c8aac72692dca952302e0e4fdb9ff381bba58ae/AustinOcaml/testcases/testCaseWriter.ml
ocaml
Copyright : , University College London , 2011 open Cil open Solution let flags = [Open_creat;Open_append;Open_text] let perm = 0o755 let protos : (string, bool) Hashtbl.t = Hashtbl.create 10 let added (f:fundec) = Hashtbl.mem protos f.svar.vname let mallocExpr = let v = makeVarinfo false "malloc" (TFun(vo...
7c8bccca1f46b8a260ba6b8f7689265a8b3eef9397af7658c990c9589bb38065
TheRiver/CL-HEAP
priority-queue.lisp
Copyright 2009 - 2010 < > ;;; This file is part of CL - HEAP ;;; CL - HEAP is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ;;; (at your option) any later versi...
null
https://raw.githubusercontent.com/TheRiver/CL-HEAP/e5796706c7db9302d7518241dd3baa8c018983b9/priority-queue.lisp
lisp
(at your option) any later version. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ---------------------------------------------------------------- -------------------------------------...
Copyright 2009 - 2010 < > This file is part of CL - HEAP CL - HEAP is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or CL - HEAP is distributed in the hope that it...
9fb9bf6f7090ad32667d59e8983d9ced332b0a53e455529533e1f367d8de1505
argp/bap
lnf_reduced_havlak.ml
module D = Debug.Make(struct let name = "LnfReducedHavlak" and default=`NoDebug end) open D open Lnf module UF(T: Hashtbl.HashedType) = struct module H = Hashtbl.Make(T) (* * A ufnode is a Parent(rank) or a Child(parent). * * If it is a Parent, it is the representative element of the set * that contain...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocaml/lnf_reduced_havlak.ml
ocaml
* A ufnode is a Parent(rank) or a Child(parent). * * If it is a Parent, it is the representative element of the set * that contains it. Otherwise, the representative element can be found by * traversing the Child pointers. The rank is roughly the length of the * longest possible path from any child t...
module D = Debug.Make(struct let name = "LnfReducedHavlak" and default=`NoDebug end) open D open Lnf module UF(T: Hashtbl.HashedType) = struct module H = Hashtbl.Make(T) type ufnode = Parent of int | Child of T.t let create n = H.create n let add h v = H.add h v (Parent 0) let contains h v =...
eb34ba8773d6b3780135967afd57f4ccc1d8c792a2334d2b4145cee2b59d0c98
practicalli/practicalli.github.io
books.cljs
(ns practicalli.books) (def practicalli-books [{:title "Practicalli Spacemacs" :url "" :image "-design/live/book-covers/practicalli-spacemacs-book-banner.png" :github-repo "spacemacs" :description " - powerful editing with Emacs and Vim multi-modal editing, with a mnemonic menu t...
null
https://raw.githubusercontent.com/practicalli/practicalli.github.io/9ca8a5aef1e5e5015e359ea933eefc43a21514ac/src/practicalli/books.cljs
clojure
Book banner logo Book description Book banner logo Book description Section Title
(ns practicalli.books) (def practicalli-books [{:title "Practicalli Spacemacs" :url "" :image "-design/live/book-covers/practicalli-spacemacs-book-banner.png" :github-repo "spacemacs" :description " - powerful editing with Emacs and Vim multi-modal editing, with a mnemonic menu t...
11c287ae3fa39b98830afdb3aff9745852c50cf8dde001d75804303ab8ab3bc5
syntax-objects/syntax-parse-example
make-variable-test.rkt
#lang racket/base (module+ test (require rackunit syntax-parse-example/make-variable/make-variable) (test-case "make-variable" (check-equal? (make-variable "this_variable_will_probably_change") "this_variable_will_probably_change=\"this_variable_will_probably_change\"") (define Z "Zzz...") ...
null
https://raw.githubusercontent.com/syntax-objects/syntax-parse-example/0675ce0717369afcde284202ec7df661d7af35aa/make-variable/make-variable-test.rkt
racket
#lang racket/base (module+ test (require rackunit syntax-parse-example/make-variable/make-variable) (test-case "make-variable" (check-equal? (make-variable "this_variable_will_probably_change") "this_variable_will_probably_change=\"this_variable_will_probably_change\"") (define Z "Zzz...") ...
a1af9e5e186575a852e7d8708eac756529d69922f138a17168e42d3aa114fb55
hipsleek/hipsleek
dataflow.ml
module IH = Inthash module E = Errormsg open Cil open Pretty (** A framework for data flow analysis for CIL code. Before using this framework, you must initialize the Control-flow Graph for your program, e.g using {!Cfg.computeFileCFG} *) type 't action = Default (** The default action *) | Done of...
null
https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/cil/src/ext/dataflow.ml
ocaml
* A framework for data flow analysis for CIL code. Before using this framework, you must initialize the Control-flow Graph for your program, e.g using {!Cfg.computeFileCFG} * The default action * Do not do the default action. Use this result * The default action, followed by the given ...
module IH = Inthash module E = Errormsg open Cil open Pretty type 't action = type 't stmtaction = * Visit the instructions and successors of this statement as usual , but use the specified state instead of the one that was passed to doStmt as usual, but ...
3794d0aaabb4b2f76ef2a24001d33b9795f5226faffd4a157b2d270216c9b78e
spwhitton/consfigurator
user.lisp
;;; Consfigurator -- Lisp declarative configuration management system Copyright ( C ) 2021 - 2022 < > Copyright ( C ) 2021 - 2022 < > ;;; This file 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 Foundatio...
null
https://raw.githubusercontent.com/spwhitton/consfigurator/031f4e16be6d532494e2fac39d3838913b1e8435/src/property/user.lisp
lisp
Consfigurator -- Lisp declarative configuration management system This file is free software; you can redistribute it and/or modify either version 3 , or ( at your option ) any later version. This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty o...
Copyright ( C ) 2021 - 2022 < > Copyright ( C ) 2021 - 2022 < > it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License (in-package :consfigurator.property.user) (named-readtables:in-readtable :consfigurator) (defprop...
acdff4c0f0406a0df943911fcdd9de79863c62455548da0a0d344935849f019c
MyDataFlow/ttalk-server
ejabberd_sm.erl
%%%---------------------------------------------------------------------- File : Author : < > %%% Purpose : Session manager Created : 24 Nov 2002 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2011 ProcessOne %%% %%% This program is free software; you can redistribute it and/or modify it und...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/src/ejabberd_sm.erl
erlang
---------------------------------------------------------------------- Purpose : Session manager 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; without even t...
File : Author : < > Created : 24 Nov 2002 by < > ejabberd , Copyright ( C ) 2002 - 2011 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public Li...
5745620850b68c5efcbe82aa9c189b2ca76fe3b9209ebdbbec4faa40ae71af44
iu-parfunc/verified-instances
TH.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE CPP # | Module : Generics . Deriving . Newtypeless . TH Copyright : ( c ) 2008 - -2009 Universiteit Utrecht License : BSD3 Maintainer : Stability : experimental Portability : non - portable This module contains Template Haskell ...
null
https://raw.githubusercontent.com/iu-parfunc/verified-instances/cebfdf1e3357a693360be74c90211be18ce3c045/generic-proofs/generic-deriving-newtypeless/src/Generics/Deriving/Newtypeless/TH.hs
haskell
# LANGUAGE BangPatterns # Derives Generic instance Derives Generic1 instance Derives Generic and Generic1 instances instance Generic ( Family Char b ) where ... instance Generic1 ( ) where ... Alternatively , one could type $ ( deriveAll1 ' FamilyFalse ) 2009 Universiteit Utrecht Derives Generic instance...
# LANGUAGE CPP # | Module : Generics . Deriving . Newtypeless . TH Copyright : ( c ) 2008 - -2009 Universiteit Utrecht License : BSD3 Maintainer : Stability : experimental Portability : non - portable This module contains Template Haskell code that can be used to aut...
83ca7681f65e972596c37d00410a578bb7cf844307133bef4f2f6024ef560e63
mfikes/fifth-postulate
ns348.cljs
(ns fifth-postulate.ns348) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
null
https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns348.cljs
clojure
(ns fifth-postulate.ns348) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
c16c0609eed2ea4df879556a03433041a6daf6ab8bbad771464d7628a05bd75d
ariesteam/aries
recreation_san_pedro.clj
Copyright 2011 The ARIES Consortium ( ) ;;; ;;; This file is part of ARIES. ;;; ;;; ARIES is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ;;; (at your option)...
null
https://raw.githubusercontent.com/ariesteam/aries/b3fafd4640f4e7950fff3791bc4ea4c06ee4dcdf/plugins/org.integratedmodelling.aries.core/models/recreation_san_pedro.clj
clojure
This file is part of ARIES. ARIES is free software: you can redistribute it and/or modify it (at your option) any later version. ARIES 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. ...
Copyright 2011 The ARIES Consortium ( ) under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License Recreation model for San Pedro Valid Contexts : core.cont...
a3b594f3ad62376c48a9ebaf2825d36c20b878948ef9daa79cde87ec89d23268
tsloughter/kuberl
kuberl_v1beta1_daemon_set_update_strategy.erl
-module(kuberl_v1beta1_daemon_set_update_strategy). -export([encode/1]). -export_type([kuberl_v1beta1_daemon_set_update_strategy/0]). -type kuberl_v1beta1_daemon_set_update_strategy() :: #{ 'rollingUpdate' => kuberl_v1beta1_rolling_update_daemon_set:kuberl_v1beta1_rolling_update_daemon_set(), 'type' => bi...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1beta1_daemon_set_update_strategy.erl
erlang
-module(kuberl_v1beta1_daemon_set_update_strategy). -export([encode/1]). -export_type([kuberl_v1beta1_daemon_set_update_strategy/0]). -type kuberl_v1beta1_daemon_set_update_strategy() :: #{ 'rollingUpdate' => kuberl_v1beta1_rolling_update_daemon_set:kuberl_v1beta1_rolling_update_daemon_set(), 'type' => bi...
34552623859b317c19f9ad36ba2e05139c54e2615973121cde4baabcb5a4d64a
ocaml/ocaml
ast_helper.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml/ocaml/8a61778d2716304203974d20ead1b2736c1694a8/parsing/ast_helper.ml
ocaml
************************************************************************ OCaml ...
, LexiFi Copyright 2012 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the * Helpers to produce Parsetree fragments open Asttypes open Parsetree open Docstrings type 'a with_loc =...
7f8f432fe27fcf1e41c481a8d22a3b08dc35b8d9a634b05f8f51419edcca816a
Ericson2314/lighthouse
Random.hs
----------------------------------------------------------------------------- -- | -- Module : System.Random Copyright : ( c ) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- Stability : stable -- Portability : portable -- -- Th...
null
https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/random/System/Random.hs
haskell
--------------------------------------------------------------------------- | Module : System.Random License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : stable Portability : portable This library deals with the common task of pseudo-random number generation. T...
Copyright : ( c ) The University of Glasgow 2001 The library is split into two layers : The class ' RandomGen ' provides a common interface to such generators . The library provides one instance of ' RandomGen ' , the abstract data type ' StdGen ' . Programmers may , of course , supply their own ...
32952137a9004bd9e0c295648333c053d2b05ad96cef2b0f8d1461ca4db00346
exercism/scheme
test.scm
(load "test-util.ss") (define test-cases `((test-success "stating something" equal? response-for '("Tom-ay-to, tom-aaaah-to.") "Whatever.") (test-success "shouting" equal? response-for '("WATCH OUT!") "Whoa, chill out!") (test-success "shouting gibberish" equal? response-for '("FCECDFCAAB")...
null
https://raw.githubusercontent.com/exercism/scheme/2064dd5e5d5a03a06417d28c33c5349bec97dad7/exercises/practice/bob/test.scm
scheme
(load "test-util.ss") (define test-cases `((test-success "stating something" equal? response-for '("Tom-ay-to, tom-aaaah-to.") "Whatever.") (test-success "shouting" equal? response-for '("WATCH OUT!") "Whoa, chill out!") (test-success "shouting gibberish" equal? response-for '("FCECDFCAAB")...
e734e1946663ad5f1395a67f9e58fa39afa85519e45e76cb282275b05b3b91d4
sgimenez/laby
sound.mli
* Copyright ( C ) 2007 - 2014 The laby team * You have permission to copy , modify , and redistribute under the * terms of the GPL-3.0 . For full license terms , see gpl-3.0.txt . * Copyright (C) 2007-2014 The laby team * You have permission to copy, modify, and redistribute under the * terms of the GPL...
null
https://raw.githubusercontent.com/sgimenez/laby/47f9560eb827790d26900bb553719afb4b0554ea/src/sound.mli
ocaml
* Copyright ( C ) 2007 - 2014 The laby team * You have permission to copy , modify , and redistribute under the * terms of the GPL-3.0 . For full license terms , see gpl-3.0.txt . * Copyright (C) 2007-2014 The laby team * You have permission to copy, modify, and redistribute under the * terms of the GPL...
63cb5e4f66d8888fc4d155bc07009de80e26f3da89857df3f1cb49f2a3f50d8a
mbenke/zpf2013
examples3.hs
import Control.Monad(ap) class (Functor f) => Applicative f where pure :: a -> f a (<*>) :: f (a -> b) -> f a -> f b f <$> x = pure f <*> x instance = > Applicative m where pure = return ( < * > ) = ap instance Monad m => Applicative m where pure = return (<*>) = ap -} instance Appli...
null
https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Slides/09Idiom/examples3.hs
haskell
import Control.Monad(ap) class (Functor f) => Applicative f where pure :: a -> f a (<*>) :: f (a -> b) -> f a -> f b f <$> x = pure f <*> x instance = > Applicative m where pure = return ( < * > ) = ap instance Monad m => Applicative m where pure = return (<*>) = ap -} instance Appli...
aebca269c7656c655fd693f7c42f269f9a2a1a0198011725b5419f23a482a463
faylang/fay
Recursive.hs
{-# OPTIONS -fno-warn-name-shadowing #-} # LANGUAGE NoImplicitPrelude # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # module Language.Haskell.Names.Recursive ( computeInterfaces , getInterfaces , annotateModule ) where import Fay.Compiler.Prelude import Fay.Compiler...
null
https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/src/haskell-names/Language/Haskell/Names/Recursive.hs
haskell
# OPTIONS -fno-warn-name-shadowing # | Take a set of modules and return a list of sets, where each sets for a strongly connected component in the import graph. The boolean determines if imports using @SOURCE@ are taken into account. | Annotate a module with scoping information. This assumes that all module depende...
# LANGUAGE NoImplicitPrelude # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # module Language.Haskell.Names.Recursive ( computeInterfaces , getInterfaces , annotateModule ) where import Fay.Compiler.Prelude import Fay.Compiler.ModuleT import Language.Haskel...
e860cf36e090513ab463c5de883e48b87958a47ae8c1f52fda02089b57527810
astrada/ocaml-extjs
ext_chart_Highlight.ml
class type t = object('self) inherit Ext_Base.t method highlightCfg : _ Js.t Js.prop method highlightItem : _ Js.t -> unit Js.meth method unHighlightItem : unit Js.meth end class type configs = object('self) inherit Ext_Base.configs method highlight : _ Js.t Js.prop end class type events = obj...
null
https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/ext_chart_Highlight.ml
ocaml
class type t = object('self) inherit Ext_Base.t method highlightCfg : _ Js.t Js.prop method highlightItem : _ Js.t -> unit Js.meth method unHighlightItem : unit Js.meth end class type configs = object('self) inherit Ext_Base.configs method highlight : _ Js.t Js.prop end class type events = obj...
5c0feb25ee133236994ab788e341ee4a402c7d4a9f5a90538417501e94783d92
lynaghk/reflex
project.clj
(defproject com.keminglabs/reflex "0.1.2-SNAPSHOT" :description "ClojureScript state propagation." :license {:name "BSD" :url "-3-Clause"} :dependencies [[org.clojure/clojure "1.4.0"]] :min-lein-version "2.0.0" :plugins [[lein-cljsbuild "0.2.5"]] :source-paths ["src/clj" "src/cljs"] :cljsbuild {:buil...
null
https://raw.githubusercontent.com/lynaghk/reflex/a891d9c4857af3c47de92af865fad324ab9f23e3/project.clj
clojure
(defproject com.keminglabs/reflex "0.1.2-SNAPSHOT" :description "ClojureScript state propagation." :license {:name "BSD" :url "-3-Clause"} :dependencies [[org.clojure/clojure "1.4.0"]] :min-lein-version "2.0.0" :plugins [[lein-cljsbuild "0.2.5"]] :source-paths ["src/clj" "src/cljs"] :cljsbuild {:buil...
fc054af6fe7ada59be7181f1c1b9e8d974297d8e41cc0ca68ec2527ba6830458
abdulapopoola/SICPBook
eceval-machine-non-tail-recursive.scm
(define eceval-operations (list ; install inbuilt scheme operators (list 'read read) ; install operators from scheme-operators.scm (list 'self-evaluating? self-evaluating?) (list 'variable? variable?) (list 'quoted? quoted?) (list 'text-of-quotation te...
null
https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%205/5.4/eceval-machine-non-tail-recursive.scm
scheme
install inbuilt scheme operators install operators from scheme-operators.scm install operators from machine-operations.scm Add stack tracing clean up stack (from apply-dispatch): the operands the operator save expression for later evaluate the predicate: save variable for later evaluate the assignment value:...
(define eceval-operations (list (list 'read read) (list 'self-evaluating? self-evaluating?) (list 'variable? variable?) (list 'quoted? quoted?) (list 'text-of-quotation text-of-quotation) (list 'assignment? assignment?) (list 'assignment-variable assig...
a4a8c0c142072f808f71f8887a0a96b6736b0b8872aac82956a8344f6dda2b27
jrm-code-project/LISP-Machine
peek.lisp
-*- Mode : LISP ; Package : TV ; Base:8 ; : ZL -*- * * ( c ) Copyright 1980 Massachusetts Institute of Technology * * PEEK -- displays status information about the Lisp Machine Define the display modes , and how to select them . (DEFVAR *PEEK-DEFAULT-MODE-ALIST* NIL "This variable has one element for...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/window/peek.lisp
lisp
Package : TV ; Base:8 ; : ZL -*- this is to get the indentation right character lossage This is meant to be called inside the PEEK-TOP-LEVEL, character lossage If you want to execute only once, Then on exit restore the old mode in the menu and label. Since probably the typeout window is going away now and that o...
* * ( c ) Copyright 1980 Massachusetts Institute of Technology * * PEEK -- displays status information about the Lisp Machine Define the display modes , and how to select them . (DEFVAR *PEEK-DEFAULT-MODE-ALIST* NIL "This variable has one element for each Peek display mode. Elements are added by calls t...
d9eed62e64d375a46f0769e75a65e31ae0f91ad1f99bbb8c72e9a3723048b762
nyampass/conceit
char.clj
(ns conceit.commons.test.char (use conceit.commons conceit.commons.test clojure.test)) (deftest* char-range-test (= [\a \b \c \d \e] (char-range \a \e)) (= [\G \H \I \J \K \L] (char-range \G \L)) (= [\0 \1 \2 \3] (char-range \0 \3)) (= [\r] (char-range \r \r)) (= [\a \c \e] (char-range \a \e ...
null
https://raw.githubusercontent.com/nyampass/conceit/2b8ba8cc3d732fe2f58d320e2aa4ecdd6f3f3be5/conceit-commons/test/conceit/commons/test/char.clj
clojure
(run-tests)
(ns conceit.commons.test.char (use conceit.commons conceit.commons.test clojure.test)) (deftest* char-range-test (= [\a \b \c \d \e] (char-range \a \e)) (= [\G \H \I \J \K \L] (char-range \G \L)) (= [\0 \1 \2 \3] (char-range \0 \3)) (= [\r] (char-range \r \r)) (= [\a \c \e] (char-range \a \e ...
7a22e606407cf792e0f3d01cb58351b2b681aba3a2ccdf826a40eccce8a51c72
kamek-pf/ntfd
Github.hs
module Config.Github ( loadGithubConfig , GithubConfig(..) ) where import Data.Bifunctor (first) import Data.Text (Text) import Data.Text.Encoding (encodeUtf8) import Data.Time.Clock (NominalDiffTime) import Data.ByteString (ByteString) import Numeric.Natural (Natural) import Toml ((.=), decode, TomlCodec)...
null
https://raw.githubusercontent.com/kamek-pf/ntfd/d297a59339b3310a62341ffa9c378180c578dbce/src/Config/Github.hs
haskell
| Github configuration options required by the application brittany-disable-next-binding
module Config.Github ( loadGithubConfig , GithubConfig(..) ) where import Data.Bifunctor (first) import Data.Text (Text) import Data.Text.Encoding (encodeUtf8) import Data.Time.Clock (NominalDiffTime) import Data.ByteString (ByteString) import Numeric.Natural (Natural) import Toml ((.=), decode, TomlCodec)...
bde6ddd9b0ced44402f32c48216dcdf632ae25d142adccb5b1ac543c4c4ba4b9
pveber/bistro
SE_or_PE.ml
type 'a t = | Single_end of 'a | Paired_end of 'a * 'a let map x ~f = match x with | Single_end x -> Single_end (f x) | Paired_end (x, y) -> Paired_end (f x, f y) let fst = function | Single_end x | Paired_end (x, _) -> x
null
https://raw.githubusercontent.com/pveber/bistro/da0ebc969c8c5ca091905366875cbf8366622280/lib/bio/SE_or_PE.ml
ocaml
type 'a t = | Single_end of 'a | Paired_end of 'a * 'a let map x ~f = match x with | Single_end x -> Single_end (f x) | Paired_end (x, y) -> Paired_end (f x, f y) let fst = function | Single_end x | Paired_end (x, _) -> x
33b04b9b5307dfba2195dc4e43d286b57ffbb94b4df66f19fe2c6cafaf78600f
alang9/dynamic-graphs
bench-program.hs
import qualified Criterion.Main as Crit import qualified Data.Graph.Dynamic.Levels as Levels import qualified Data.Graph.Dynamic.Program as Program import qualified Data.Text.Lazy.IO as TL main :: IO () main = do errOrProgram <- Program.decodeProgram Program.decodeInt <$> TL.getContents ...
null
https://raw.githubusercontent.com/alang9/dynamic-graphs/b88f001850c7bee8faa62099e93172a0bb0df613/benchmarks/hs/bench-program.hs
haskell
import qualified Criterion.Main as Crit import qualified Data.Graph.Dynamic.Levels as Levels import qualified Data.Graph.Dynamic.Program as Program import qualified Data.Text.Lazy.IO as TL main :: IO () main = do errOrProgram <- Program.decodeProgram Program.decodeInt <$> TL.getContents ...
689ab9ce40d4435f381de52dc178d4588ef02f4ce0e8688e7323b4d943d812e0
fakedata-haskell/fakedata
Opera.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module Faker.Provider.Opera where import Config import Control.Monad.Catch import Data.Monoid ((<>)) import Data.Text (Text) import Data.Vector (Vector) import Data.Yaml import Faker import Faker.Internal import Faker.Provider.TH import Language.Haskell....
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/7b0875067386e9bb844c8b985c901c91a58842ff/src/Faker/Provider/Opera.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # module Faker.Provider.Opera where import Config import Control.Monad.Catch import Data.Monoid ((<>)) import Data.Text (Text) import Data.Vector (Vector) import Data.Yaml import Faker import Faker.Internal import Faker.Provider.TH import Language.Haskell.TH parseOpera :: FromJSON a => Fa...
7ae5560cdd73d62f32fb9b26d33696114af67edabf1fa98944575c7dbedbbfee
FreeProving/free-compiler
Type.hs
| This module contains functions for converting types to Coq . module FreeC.Backend.Coq.Converter.Type where import Control.Monad ( (>=>) ) import qualified FreeC.Backend.Coq.Base as Coq.Base import FreeC.Backend.Coq.Converter.Free import qualified FreeC.Backend.Coq...
null
https://raw.githubusercontent.com/FreeProving/free-compiler/6931b9ca652a185a92dd824373f092823aea4ea9/src/lib/FreeC/Backend/Coq/Converter/Type.hs
haskell
----------------------------------------------------------------------------- IR to Coq Translation -- ----------------------------------------------------------------------------- [\(\tau^\dagger = Free\,Shape\,Pos\,\tau^*\)] A type \(\tau\) is converted by...
| This module contains functions for converting types to Coq . module FreeC.Backend.Coq.Converter.Type where import Control.Monad ( (>=>) ) import qualified FreeC.Backend.Coq.Base as Coq.Base import FreeC.Backend.Coq.Converter.Free import qualified FreeC.Backend.Coq...
77a32f0c4e3d6db8c079595f334b206283537899c5d6ee7af7f4155145a1af98
christiankissig/ocaml99
problem73.ml
(*# P73 (**) Lisp-like tree representation # # There is a particular notation for multiway trees in Lisp. Lisp is a prominent # functional programming language, which is used primarily for artificial # intelligence problems. As such it is one of the main competitors of Prolog. In # Lisp almost everything is a list, ju...
null
https://raw.githubusercontent.com/christiankissig/ocaml99/c25f1790f695f9dd68b23abb472dc7c860d840f8/problem73.ml
ocaml
# P73 (*
# # There is a particular notation for multiway trees in Lisp. Lisp is a prominent # functional programming language, which is used primarily for artificial # intelligence problems. As such it is one of the main competitors of Prolog. In # Lisp almost everything is a list, just as in Prolog everything is a term. # # ...
987c4c905b48ff4d27add7031439a486723bf6c6a9b6752561fd0b7150af2951
manavpatnaik/haskell
16_join_list.hs
concat1 xs = foldr (++) [] xs main = do print(concat1 ["asd", "dfg", "23"])
null
https://raw.githubusercontent.com/manavpatnaik/haskell/85be0b7130619c6e5e815a69e66cd366c3e6cb21/higher_order_functions/16_join_list.hs
haskell
concat1 xs = foldr (++) [] xs main = do print(concat1 ["asd", "dfg", "23"])
b257f903ad5ace445db982a4cfcbed0ae37f782ad0152170649248609d6627de
Soyn/sicp
Ex2.63.rkt
#lang racket ;--------Support Function------------------- (define ( make-tree entry left right) ( list entry left right)) ( define ( entry tree) ( car tree)) ( define ( left-branch tree) ( cadr tree)) ( define ( right-branch tree) ( caddr tree)) ( define ( tree->list-1 tree) ( if ( null? tree)null (appe...
null
https://raw.githubusercontent.com/Soyn/sicp/d2aa6e3b053f6d4c8150ab1b033a18f61fca7e1b/CH2/CH2.3/Ex2.63.rkt
racket
--------Support Function------------------- ------------------------------------------------------------------ !Ex2.63 @Soyn --------Usage Test-------------- both procedures produce the same result !!!for tree->list-1 !!!! T(n) = 2*T(n/2) + O(n) =====> T(n) = O(n*lg n) (as the append takes linear time) for the t...
#lang racket (define ( make-tree entry left right) ( list entry left right)) ( define ( entry tree) ( car tree)) ( define ( left-branch tree) ( cadr tree)) ( define ( right-branch tree) ( caddr tree)) ( define ( tree->list-1 tree) ( if ( null? tree)null (append ( tree->list-1 ( left-branch tree)) ...
f8fa3faf26cb21fe44e808d11aece3a66336401f5d2fbe5f8c14bf7f317b4468
OCamlPro/ocp-build
metaConfig.ml
(**************************************************************************) (* *) (* Typerex Tools *) (* *) Copyrigh...
null
https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/tools/ocp-build/meta/metaConfig.ml
ocaml
************************************************************************ Typerex Tools ...
Copyright 2011 - 2017 OCamlPro SAS the GNU General Public License version 3 described in the file open BuildBase peerocaml:~/.opam/4.00.1 / lib / ocaml% ocamlfind printconf Effective configuration : Configuration file : /home / lefessan/.opam/4.0...
3680275a0bb50c4605c201b7b1bd1b11d4eb78313fdd286cfeeaa67cf6595435
danieljharvey/mimsa
Typescript.hs
{-# LANGUAGE OverloadedStrings #-} module Test.Backend.Typescript ( spec, ) where import qualified Data.List.NonEmpty as NE import qualified Data.Map.Strict as M import qualified Data.Set as S import Data.Text (Text) import qualified Data.Text as T import Language.Mimsa.Backend.Typescript.DataType import Language...
null
https://raw.githubusercontent.com/danieljharvey/mimsa/8154c07fcd394739d6d9543dd029d06470f738c2/backends/test/Test/Backend/Typescript.hs
haskell
# LANGUAGE OverloadedStrings #
module Test.Backend.Typescript ( spec, ) where import qualified Data.List.NonEmpty as NE import qualified Data.Map.Strict as M import qualified Data.Set as S import Data.Text (Text) import qualified Data.Text as T import Language.Mimsa.Backend.Typescript.DataType import Language.Mimsa.Backend.Typescript.FromExpr ...
a7f384863d75177ebaeceb2423f29245aa5dee8d7bdf3420b18c12759ab47f66
mstewartgallus/hs-callbypushvalue
AsCps.hs
# LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module AsCps (extract, AsCps) where import Cbpv import Common import qualified Constant import qualified Cps import Global import HasCall import HasCode import HasConstants import HasData import HasLet import HasStack import HasTerminal import HasTuple import NatTr...
null
https://raw.githubusercontent.com/mstewartgallus/hs-callbypushvalue/d8770b7e9e444e1261901f5ee435fcefb0f7ad75/src/AsCps.hs
haskell
# LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module AsCps (extract, AsCps) where import Cbpv import Common import qualified Constant import qualified Cps import Global import HasCall import HasCode import HasConstants import HasData import HasLet import HasStack import HasTerminal import HasTuple import NatTr...
9a56df9b20604897bd0e9ee5ed67eb0f2b27d1203a60bf23c4d123f6312d8968
iskandr/parakeet-retired
MachineModel.ml
(* pp: -parser o pa_macro.cmo *) type gpu_t = { gpu_id : int; name : string; global_mem : int; shared_mem_per_sm : int; regs_per_block : int; warp_size : int; mem_pitch : int; max_threads_per_block : int; max_threads_per_x : int; max_threads_per_y : int; max_threads_per_z : int; max_grid_size_x...
null
https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/Runtime/MachineModel.ml
ocaml
pp: -parser o pa_macro.cmo
type gpu_t = { gpu_id : int; name : string; global_mem : int; shared_mem_per_sm : int; regs_per_block : int; warp_size : int; mem_pitch : int; max_threads_per_block : int; max_threads_per_x : int; max_threads_per_y : int; max_threads_per_z : int; max_grid_size_x : int; max_grid_size_y : int; ...
005fae0d5d2750ad07d9d4212714b0a0f9472bdd73ca7e7ff095a4092c65794b
jeapostrophe/opencl
5-7.rkt
#lang at-exp racket/base (require ffi/unsafe (except-in racket/contract ->) (prefix-in c: racket/contract) scribble/srcdoc "include/cl.rkt" "lib.rkt" "syntax.rkt" "types.rkt") (require/doc racket/base scribble/manual (for-label "...
null
https://raw.githubusercontent.com/jeapostrophe/opencl/f984050b0c02beb6df186d1d531c4a92a98df1a1/opencl/c/5-7.rkt
racket
clWaitForEvents clGetEventInfo
#lang at-exp racket/base (require ffi/unsafe (except-in racket/contract ->) (prefix-in c: racket/contract) scribble/srcdoc "include/cl.rkt" "lib.rkt" "syntax.rkt" "types.rkt") (require/doc racket/base scribble/manual (for-label "...
9758aeb19c83f645d07785f98a8371ccb9be3c38f6abb05f523c79e328b20cd6
broadinstitute/firecloud-ui
wdl.cljs
(ns broadfcui.page.method-repo.method.wdl (:require [dmohs.react :as react] [broadfcui.common.codemirror :refer [CodeMirror]] [broadfcui.common.style :as style] ; TODO: address transitive vulnerability before re-enabling epam / pipeline - builder 0.3.10 - dev.264 depends on lodash 3.10.1 ;[broadfcui....
null
https://raw.githubusercontent.com/broadinstitute/firecloud-ui/8eb077bc137ead105db5665a8fa47a7523145633/src/cljs/main/broadfcui/page/method_repo/method/wdl.cljs
clojure
TODO: address transitive vulnerability before re-enabling [broadfcui.components.pipeline-builder :refer [PipelineBuilder]] TODO: uncomment state when re-enabling TODO: remove this line when re-enabling TODO: un-comment this when re-enabling
(ns broadfcui.page.method-repo.method.wdl (:require [dmohs.react :as react] [broadfcui.common.codemirror :refer [CodeMirror]] [broadfcui.common.style :as style] epam / pipeline - builder 0.3.10 - dev.264 depends on lodash 3.10.1 [broadfcui.components.split-pane :refer [SplitPane]] [broadfcui.utils :a...
0273bc59a7568f12392004694dffc9e59ec3c61e45cb3c27d1657e159addbd6f
haroldcarr/learn-haskell-coq-ml-etc
X_2_1_Prop_Syntax.hs
# OPTIONS_GHC -fno - warn - missing - signatures # {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveTraversable #-} # LANGUAGE FlexibleContexts # module X_2_1_Prop_Syntax where import qualified Test.HUnit as U (Counts, Test (TestList), runTe...
null
https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/math-and-functional-programming/2009-Handbook_of_Practical_Logic_and_Automated_Reasoning/src/X_2_1_Prop_Syntax.hs
haskell
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveTraversable # ---------------------------------------------------------------------------- parser that return Either parser that expects success parses a term, followed by whitespace and end-of-file also see: -nerd.com/erikd/Blog/CodeHacking/Haskell/parsec_expression...
# OPTIONS_GHC -fno - warn - missing - signatures # # LANGUAGE FlexibleContexts # module X_2_1_Prop_Syntax where import qualified Test.HUnit as U (Counts, Test (TestList), runTestTT) import qualified Test.HUnit.Util as U (t) import qu...
b1bbe570a02addf71d6c0dab7c57b69d55caebb995afd30cd3337ad305d447b4
DanielSchuessler/th-expand-syns
Types.hs
{-# LANGUAGE RankNTypes #-} # LANGUAGE TemplateHaskell # {-# LANGUAGE TypeFamilies #-} # LANGUAGE KindSignatures # module Types where import Language.Haskell.TH.Lib import Language.Haskell.TH.Syntax import Util -- type A = forall a. B a; type B a = Maybe a; expand [t|B A|] type ListOf x = [x] type ForAll f =...
null
https://raw.githubusercontent.com/DanielSchuessler/th-expand-syns/ace23afbeff3d142ee2febcded6360ae0a5f642a/testing/Types.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE TypeFamilies # type A = forall a. B a; type B a = Maybe a; expand [t|B A|] type E x = forall y. Either x y -> Int > conT ''Int))
# LANGUAGE TemplateHaskell # # LANGUAGE KindSignatures # module Types where import Language.Haskell.TH.Lib import Language.Haskell.TH.Syntax import Util type ListOf x = [x] type ForAll f = forall x. f x type ApplyToInteger f = f Integer type Int' = Int type Either' = Either type Int'' = Int type Id a = a $(sequence...
40940d96e17349dcc5ebabecdaaf5b74793d889053ea8fe163b24050064bb2ec
avsm/ocaml-orm-sqlite
array_simple.ml
TYPE_CONV_PATH "Array_simple" type s = { foo: int array; bar: string } with orm open OUnit open Test_utils let name = "array_simple.db" let t1 = { foo=[|1|]; bar="t1" } let t2 = { foo=[|1;2;3|]; bar="t2" } let t3 = { foo=[||]; bar="t3" } let test_init () = ignore(open_db s_init name); ignore(open_db ~rm:fal...
null
https://raw.githubusercontent.com/avsm/ocaml-orm-sqlite/0c41dee6e254abd75706edcb785f657bfe55d08b/lib_test/array_simple.ml
ocaml
TYPE_CONV_PATH "Array_simple" type s = { foo: int array; bar: string } with orm open OUnit open Test_utils let name = "array_simple.db" let t1 = { foo=[|1|]; bar="t1" } let t2 = { foo=[|1;2;3|]; bar="t2" } let t3 = { foo=[||]; bar="t3" } let test_init () = ignore(open_db s_init name); ignore(open_db ~rm:fal...
6cea4e18a5c0d7007db3a6bbfccc96b15abd5cdf7816b341f3126e6ff79b3ad0
privet-kitty/cl-competitive
primality.lisp
(defpackage :cp/primality (:use :cl :cp/tzcount) (:export #:prime-p) (:documentation "Provides deterministic Miller-Rabin algorithm for primality test. This module is tuned for SBCL on x86-64, i.e., here (integer 0 #.MOST-POSITIVE-FIXNUM) is assumed to be (UNSIGNED-BYTE 62)")) (in-package :cp/primality) (deftyp...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/bd278954ffc8be339dd40ca09d5b9c71a5eb5189/module/primality.lisp
lisp
-rabin.appspot.com/ NOTE: following branch is not tested
(defpackage :cp/primality (:use :cl :cp/tzcount) (:export #:prime-p) (:documentation "Provides deterministic Miller-Rabin algorithm for primality test. This module is tuned for SBCL on x86-64, i.e., here (integer 0 #.MOST-POSITIVE-FIXNUM) is assumed to be (UNSIGNED-BYTE 62)")) (in-package :cp/primality) (deftyp...
ca531094291887e828a424b507e3aadf51b866b8abadd5f3448e1d6d265fde47
rmculpepper/crypto
info.rkt
Copyright 2020 SPDX - License - Identifier : Apache-2.0 #lang info ;; pkg info (define version "1.0") (define collection "x509") (define deps '("base" ["asn1-lib" #:version "1.3"] "base64-lib" ["crypto-lib" #:version "1.8"] "db-lib" ["scramble-lib" #:version "0.3"])) (define pkg-authors '...
null
https://raw.githubusercontent.com/rmculpepper/crypto/75138461a74d6b4bc26c65e981ccfba6b60719de/x509-lib/info.rkt
racket
pkg info collection info
Copyright 2020 SPDX - License - Identifier : Apache-2.0 #lang info (define version "1.0") (define collection "x509") (define deps '("base" ["asn1-lib" #:version "1.3"] "base64-lib" ["crypto-lib" #:version "1.8"] "db-lib" ["scramble-lib" #:version "0.3"])) (define pkg-authors '(ryanc)) (de...
4bc21f80203dd858f3d17e9fd1e1fdcc8a18b1728ef260e1fd3245c379982743
ghc/packages-Cabal
setup.test.hs
import Test.Cabal.Prelude Check that preprocessors ( hsc2hs ) are run main = setupAndCabalTest $ setup_build ["--enable-tests", "--enable-benchmarks"]
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/PreProcess/setup.test.hs
haskell
import Test.Cabal.Prelude Check that preprocessors ( hsc2hs ) are run main = setupAndCabalTest $ setup_build ["--enable-tests", "--enable-benchmarks"]
0c48219835fcf55546824e0747a5d2ec3a32a2c08271dc65f4c7e058ba1f415b
informatimago/lisp
objc-support.lisp
-*- mode : lisp;coding : utf-8 -*- ;;;;************************************************************************** FILE : objc-support.lisp ;;;;LANGUAGE: Common-Lisp ;;;;SYSTEM: Common-Lisp USER - INTERFACE : ;;;;DESCRIPTION ;;;; ;;;; This file loads Objective-C support. ;...
null
https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/objcl/objc-support.lisp
lisp
coding : utf-8 -*- ************************************************************************** LANGUAGE: Common-Lisp SYSTEM: Common-Lisp DESCRIPTION This file loads Objective-C support. LEGAL This program is free software: you can redistribute it and/or modify (at your option) any l...
FILE : objc-support.lisp USER - INTERFACE : < PJB > < > MODIFICATIONS 2014 - 05 - 02 < PJB > Created . AGPL3 Copyright 2014 - 2016 it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of th...
49ef05233f7706ba2cef507c0a82a7949b1b4bc174428e8e013d8be04a817db4
OCamlPro/liquidity
reason_comment.ml
open Location type category = | EndOfLine | SingleLine | Regular let string_of_category = function | Regular -> "Regular" | EndOfLine -> "End of Line" | SingleLine -> "SingleLine" type t = { location: Location.t; category: category; text: string; } let category t = t.category let location t = t.l...
null
https://raw.githubusercontent.com/OCamlPro/liquidity/3578de34cf751f54b9e4c001a95625d2041b2962/tools/liquidity/reason/reason_comment.ml
ocaml
single line comments of the form `// comment` have a `\n` at the end
open Location type category = | EndOfLine | SingleLine | Regular let string_of_category = function | Regular -> "Regular" | EndOfLine -> "End of Line" | SingleLine -> "SingleLine" type t = { location: Location.t; category: category; text: string; } let category t = t.category let location t = t.l...
803861db73ee8071b0abf3a6df68e83c56d563d4e15ffa16d582afad4022d2b4
GaloisInc/ivory
Module.hs
-- -- Module.hs --- Ivory module for 'ivory-hw'. -- Copyright ( C ) 2013 , Galois , Inc. All Rights Reserved . -- module Ivory.HW.Module ( hw_moduledef, hw_artifacts ) where import Ivory.HW.Prim import Ivory.Artifact import qualified Paths_ivory_hw hw_artifacts :: [Located Artifact] hw_artifacts = [Incl $ ...
null
https://raw.githubusercontent.com/GaloisInc/ivory/53a0795b4fbeb0b7da0f6cdaccdde18849a78cd6/ivory-hw/src/Ivory/HW/Module.hs
haskell
Module.hs --- Ivory module for 'ivory-hw'.
Copyright ( C ) 2013 , Galois , Inc. All Rights Reserved . module Ivory.HW.Module ( hw_moduledef, hw_artifacts ) where import Ivory.HW.Prim import Ivory.Artifact import qualified Paths_ivory_hw hw_artifacts :: [Located Artifact] hw_artifacts = [Incl $ artifactCabalFile Paths_ivory_hw.getDataDir "support/iv...
6b33a08457a5c7d0303eac661f3aa6388ca8bca9316a23e4280b2c7b46e43d2d
levand/prolin
commons_math.clj
(ns prolin.commons-math (:require [prolin.protocols :as p] [prolin.polynomial :as poly] [clojure.string :as str] [clojure.set :as set]) (:import [org.apache.commons.math3.optim.linear SimplexSolver LinearObjectiveFunction LinearConstraint ...
null
https://raw.githubusercontent.com/levand/prolin/1483d6503095e85f66e577262abfb1c90571cfd2/src/prolin/commons_math.clj
clojure
(ns prolin.commons-math (:require [prolin.protocols :as p] [prolin.polynomial :as poly] [clojure.string :as str] [clojure.set :as set]) (:import [org.apache.commons.math3.optim.linear SimplexSolver LinearObjectiveFunction LinearConstraint ...
55cb77c5e2561af56c3028e4f80f2637f8194a9e96b2e5182478be4464c54e1e
input-output-hk/project-icarus-importer
Mode.hs
# LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module Pos.Web.Mode ( WebMode , WebModeContext(..) ) where import Universum import Control.Lens (makeLensesWith) import qualified Control.Monad.Reader as Mtl import Mockable (Production) import Pos.Context (Ha...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/lib/src/Pos/Web/Mode.hs
haskell
# OVERLAPPABLE #
# LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module Pos.Web.Mode ( WebMode , WebModeContext(..) ) where import Universum import Control.Lens (makeLensesWith) import qualified Control.Monad.Reader as Mtl import Mockable (Production) import Pos.Context (Ha...
1e54daa48d774411437ad7f77ff6db30b83cb1c1f39ffd7020b3d5074dd4e27e
HuwCampbell/orc-haskell
Types.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DataKinds # {-# LANGUAGE LambdaCase #-} module Orc.Schema.Types ( CompressionKind (..) , StreamKind (..) , ColumnEncodingKind (..) , Type (..) , StripeInformation (..) , ColumnEncoding (..) , Stream (..) , PostScript (..) , Footer (..) , StripeFooter...
null
https://raw.githubusercontent.com/HuwCampbell/orc-haskell/259649bc5fa5c6d8bd850fdad0517af6c028e00e/src/Orc/Schema/Types.hs
haskell
# LANGUAGE LambdaCase # the length of the footer section in bytes NOTE: Changed to Required from Optional the kind of generic compression used the maximum size of each compression chunk the version of the writer the length of the metadata section in bytes the length of the file header and body in bytes the i...
# LANGUAGE DeriveGeneric # # LANGUAGE DataKinds # module Orc.Schema.Types ( CompressionKind (..) , StreamKind (..) , ColumnEncodingKind (..) , Type (..) , StripeInformation (..) , ColumnEncoding (..) , Stream (..) , PostScript (..) , Footer (..) , StripeFooter (..) , RowIndexEntry (..) ...
9ae3de061b63d699d84f8569e11eab4396e550c7b56c4a1a8f9dfa7cfcebba57
mathematical-systems/clml
grovel.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; grovel.lisp --- The CFFI Groveller . ;;; Copyright ( C ) 2005 - 2006 , < > Copyright ( C ) 2005 - 2006 , < > Copyright ( C ) 2007 , < > Copyright ( C ) 2007 , ;;; ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a co...
null
https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/addons/cffi/grovel/grovel.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to...
grovel.lisp --- The CFFI Groveller . Copyright ( C ) 2005 - 2006 , < > Copyright ( C ) 2005 - 2006 , < > Copyright ( C ) 2007 , < > Copyright ( C ) 2007 , files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included i...
7d165546e71e0921c0b385038205a5c56de3d8807ecbde80fb6e5d52e1bf58f6
alavrik/piqi
piqi_json_type.mli
Copyright 2009 , 2010 , 2011 , 2012 , 2013 Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing...
null
https://raw.githubusercontent.com/alavrik/piqi/bcea4d44997966198dc295df0609591fa787b1d2/piqilib/piqi_json_type.mli
ocaml
using unit to turn Null into a boxed value
Copyright 2009 , 2010 , 2011 , 2012 , 2013 Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing...
a9cff312ecf31e552f0dd0e74a882c38f8cff22ef45e778f8f0b65292055d7b3
GNOME/gimp-tiny-fu
chrome-it.scm
; CHROME-IT ; State of the art chrome effect for user-specified mask ; This script requires a grayscale image containing a single layer. ; This layer is used as the mask for the SOTA chrome effect (define (script-fu-sota-chrome-it mask-img mask-drawable chrome-saturation chrome-lightness chrome-factor ...
null
https://raw.githubusercontent.com/GNOME/gimp-tiny-fu/a64d85eec23b997e535488d67f55b44395ba3f2e/scripts/chrome-it.scm
scheme
CHROME-IT State of the art chrome effect for user-specified mask This script requires a grayscale image containing a single layer. This layer is used as the mask for the SOTA chrome effect The result is used as "gimp-color-balance" color parameter
(define (script-fu-sota-chrome-it mask-img mask-drawable chrome-saturation chrome-lightness chrome-factor env-map hc cc carve-white) (define (set-pt a index x y) (begin (aset a (* index 2) x) (aset a (+ (* index 2) 1) y) ) ) (define (spline-chrome-it) (let* ((a (cons-array 18 '...
88ac6c6c980044725a9be3cbdd8d4cc3d98ff5beb588b0c75dd12e1205ada153
ferdinand-beyer/init
discovery_test.clj
(ns init.discovery-test (:require [clojure.test :refer [deftest is]] [init.discovery :as discovery])) (deftest ns-prefix-pred-test (let [pred (#'discovery/ns-prefix-pred 'init.discovery-test)] (is (pred 'init.discovery-test)) (is (pred 'init.discovery-test.child)) (is (pred 'init.discovery-...
null
https://raw.githubusercontent.com/ferdinand-beyer/init/62414dae2b7af6ea2e3036db0b2f6e2bdf3d8e65/test/init/discovery_test.clj
clojure
(ns init.discovery-test (:require [clojure.test :refer [deftest is]] [init.discovery :as discovery])) (deftest ns-prefix-pred-test (let [pred (#'discovery/ns-prefix-pred 'init.discovery-test)] (is (pred 'init.discovery-test)) (is (pred 'init.discovery-test.child)) (is (pred 'init.discovery-...
86f8becee0aad827d58e302dd487b25f1dc83c473ef3067dc1863be9b01928a1
avsm/platform
opamSwitchState.ml
(**************************************************************************) (* *) Copyright 2012 - 2015 OCamlPro Copyright 2012 INRIA (* ...
null
https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/opam-client.2.0.5%2Bdune/src/state/opamSwitchState.ml
ocaml
************************************************************************ All rights reserved. This file is distributed under the terms of the exception on linking descr...
Copyright 2012 - 2015 OCamlPro Copyright 2012 INRIA GNU Lesser General Public License version 2.1 , with the special open OpamTypes open OpamStd.Op open OpamPackage.Set.Op let log fmt = OpamConsole.log "STATE" ...
f545172aae61061bd0a79a6419a9f59c6c79379f209c6f669e76eb2351f06b9e
yawaramin/ocaml_sql_query
sql.ml
Copyright 2022 This file is part of ocaml_sql_query . ocaml_sql_query is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any la...
null
https://raw.githubusercontent.com/yawaramin/ocaml_sql_query/ac6d0908bf881595c6a58c761e6f105596f94ccd/lib/sql.ml
ocaml
We have to parse the value tuple of the insert statement to be able to multiply it a number of times if needed for a batch insert.
Copyright 2022 This file is part of ocaml_sql_query . ocaml_sql_query is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any la...
883176941dbcb1527e959621f4c4b93402313e3efacd612f2ec4f3312041432e
chef/mixer
mixer.erl
%% -*- mode: erlang -*- -*- tab - width : 4;erlang - indent - level : 4;indent - tabs - mode : nil -*- %% ex: ts=4 sw=4 ft=erlang et %% Copyright 2012 Opscode , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except ...
null
https://raw.githubusercontent.com/chef/mixer/0d1322433e7e2237eb1270dc5a028fa014335134/src/mixer.erl
erlang
-*- mode: erlang -*- ex: ts=4 sw=4 ft=erlang et 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 permissions and limitations ...
-*- tab - width : 4;erlang - indent - level : 4;indent - tabs - mode : nil -*- Copyright 2012 Opscode , Inc. All Rights Reserved . 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...
2bd0de03e62761de1254dafaf45201085f153bc48044390915ecee4161d1137a
ocaml-multicore/ocaml-tsan
kind_mismatch.ml
(* TEST * expect *) (** Error messages for kind mismatches. *) module T0 : sig type t end = struct type t = unit end type t0 = T0.t = { a0 : int };; [%%expect {| module T0 : sig type t end Line 4, characters 0-29: 4 | type t0 = T0.t = { a0 : int };; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error: This variant or record d...
null
https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/testsuite/tests/typing-kind/kind_mismatch.ml
ocaml
TEST * expect * Error messages for kind mismatches.
module T0 : sig type t end = struct type t = unit end type t0 = T0.t = { a0 : int };; [%%expect {| module T0 : sig type t end Line 4, characters 0-29: 4 | type t0 = T0.t = { a0 : int };; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error: This variant or record definition does not match that of type T0.t The original is ...
4b4fff17e0c810b363773bf8cc3c4d53fcb92eb5b0660d00ed54b5e0d5ee7477
sixohsix/tak
Replace.hs
module Tak.Editor.Replace where import System.IO (hSetBinaryMode, hGetContents, hPutStr) import System.Process (runInteractiveCommand) import Control.Concurrent (forkIO) import Control.Lens import Tak.Types import Tak.Buffer import Tak.Buffer.LineSeq import Tak.Editor.Selection import Tak.Range updateActiveBuffer :...
null
https://raw.githubusercontent.com/sixohsix/tak/6310d19faa683156933dde38666c11dc087d79ea/src/Tak/Editor/Replace.hs
haskell
module Tak.Editor.Replace where import System.IO (hSetBinaryMode, hGetContents, hPutStr) import System.Process (runInteractiveCommand) import Control.Concurrent (forkIO) import Control.Lens import Tak.Types import Tak.Buffer import Tak.Buffer.LineSeq import Tak.Editor.Selection import Tak.Range updateActiveBuffer :...
3b76ea01b37ddbca540cf2f4b5bbfe505284a23ee504adfee3d00c4bf83388f9
district0x/cljs-ipfs-api
core.cljs
(ns cljs-ipfs-api.core (:require [taoensso.timbre :as timbre :refer-macros [log trace debug info ...
null
https://raw.githubusercontent.com/district0x/cljs-ipfs-api/01c5e6943d3cc5e0e54d436a796e98dc8145b0ba/src/cljs_ipfs_api/core.cljs
clojure
(ns cljs-ipfs-api.core (:require [taoensso.timbre :as timbre :refer-macros [log trace debug info ...
0e9c291678be5cc0025c4a449bbc8c977e1bfcd121986dce3adc7ba6663fbeac
let-def/cuite
cuite_lwt.ml
let engine = object inherit Lwt_engine.select_based method select = Qt.qselect end let set_engine () = Lwt_engine.set engine
null
https://raw.githubusercontent.com/let-def/cuite/42629a91c573ecbf1b01f213f1bf35a456d2b1af/lib/cuite_lwt.ml
ocaml
let engine = object inherit Lwt_engine.select_based method select = Qt.qselect end let set_engine () = Lwt_engine.set engine
d1199788a94ca81e8d95eb087722e6ac4cfad1e1b0c60b3b995ab6675ccec996
mbj/stratosphere
ResourceUpdateConstraint.hs
module Stratosphere.ServiceCatalog.ResourceUpdateConstraint ( ResourceUpdateConstraint(..), mkResourceUpdateConstraint ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value da...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/servicecatalog/gen/Stratosphere/ServiceCatalog/ResourceUpdateConstraint.hs
haskell
module Stratosphere.ServiceCatalog.ResourceUpdateConstraint ( ResourceUpdateConstraint(..), mkResourceUpdateConstraint ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value da...
258d80a6d4275055c1706d091b64c683a906dacf14371c08858d8cc180376f83
airalab/hs-web3
Query.hs
-- | -- Module : Network.Polkadot.Query Copyright : 2016 - 2021 -- License : Apache-2.0 -- -- Maintainer : -- Stability : experimental -- Portability : unportable -- -- Query storage for internal data. -- module Network.Polkadot.Query where import Codec.Scale (Dec...
null
https://raw.githubusercontent.com/airalab/hs-web3/c03b86eb621f963886a78c39ee18bcec753f17ac/packages/polkadot/src/Network/Polkadot/Query.hs
haskell
| Module : Network.Polkadot.Query License : Apache-2.0 Maintainer : Stability : experimental Portability : unportable Query storage for internal data. | Loads metadata from runtime and create storage type. ^ Module name. ^ Storage method name. ^ Arguments (for mappings). ^ Decoded stora...
Copyright : 2016 - 2021 module Network.Polkadot.Query where import Codec.Scale (Decode, decode) import Data.ByteArray.HexString (HexString) import Data.Text (Text) import Network.JsonRpc.TinyClient (JsonRpc) import N...
5b8184541ad3f50bd58409ba8a1db299d498cd6ec89a7246d55687897eeb4087
slipstream/SlipStreamServer
order.clj
(ns com.sixsq.slipstream.db.es-rest.order) (def sort-order {:asc "asc" :desc "desc"}) (defn direction->sort-order "Returns the elasticsearch SortOrder constant associated with the :asc and :desc keywords. Any other value for direction will result in an IllegalArgumentException being thrown...
null
https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/db-binding/src/com/sixsq/slipstream/db/es_rest/order.clj
clojure
(ns com.sixsq.slipstream.db.es-rest.order) (def sort-order {:asc "asc" :desc "desc"}) (defn direction->sort-order "Returns the elasticsearch SortOrder constant associated with the :asc and :desc keywords. Any other value for direction will result in an IllegalArgumentException being thrown...
2cc1c09892ba8ab4d061410059843d4b0d6391ac38ebb15a5bccecddcd04d3ea
gregr/experiments
terminal-ui.rkt
#lang racket (provide interact-with ui-loop ) (require "database.rkt" "editor.rkt" "interaction-model.rkt" "presentation.rkt" "workspace-model.rkt" gregr-misc/cursor gregr-misc/dict gregr-misc/list gregr-misc/maybe gregr-misc/monad gregr-misc/sugar gregr-misc/terminal gregr-misc/ui ) ...
null
https://raw.githubusercontent.com/gregr/experiments/cd4c7953f45102539081077bbd6195cf834ba2fa/supercompilation/cog/terminal-ui.rkt
racket
TODO: specialized commands based on state TODO: specialized commands based on workspace state ws = (:.* db 'workspaces name) TODO: specialized commands based on interaction state
#lang racket (provide interact-with ui-loop ) (require "database.rkt" "editor.rkt" "interaction-model.rkt" "presentation.rkt" "workspace-model.rkt" gregr-misc/cursor gregr-misc/dict gregr-misc/list gregr-misc/maybe gregr-misc/monad gregr-misc/sugar gregr-misc/terminal gregr-misc/ui ) ...
e0f4e5c4e9d163cc989e19100e03a0c9748478893b644e13b25ee210f7580d2d
anik545/OwlPPL
dist.ml
open Monad exception Undefined module Prob = Sigs.LogProb type prob = Prob.t type likelihood = Prob.t open Prob type 'a samples = ('a * prob) list (* enable watching intermediate variables through plots *) (* type 'a var_dist = string * 'a dist *) type _ dist = | Return : 'a -> 'a dist (* bind is lazy since ...
null
https://raw.githubusercontent.com/anik545/OwlPPL/ad650219769d5f32564cc771d63c9a52289043a5/ppl/lib/dist.ml
ocaml
enable watching intermediate variables through plots type 'a var_dist = string * 'a dist bind is lazy since it contains a function | Bind_var: 'a var_dist * ('a -> 'b dist) -> 'b dist | Conditional: ('a -> float) * 'a var_dist -> 'a dist | Observe: 'a Primitive.primitive * 'a * 'a dist -> 'a dist TODO: unc...
open Monad exception Undefined module Prob = Sigs.LogProb type prob = Prob.t type likelihood = Prob.t open Prob type 'a samples = ('a * prob) list type _ dist = | Return : 'a -> 'a dist | Bind : 'a dist * ('a -> 'b dist) -> 'b dist | Primitive : 'a Primitive.t -> 'a dist | Conditional : ('a -> prob) * 'a...
f68d835fc4b735cda8ac33dbbfe8578041afb535e74cdfb89fb522902ed9d221
spwhitton/consfigurator
sshd.lisp
;;; Consfigurator -- Lisp declarative configuration management system Copyright ( C ) 2021 < > ;;; This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 , or ( at your option ) ;...
null
https://raw.githubusercontent.com/spwhitton/consfigurator/3959be03083f1a9710546ef8dc0f4a645c0d2f9e/src/property/sshd.lisp
lisp
Consfigurator -- Lisp declarative configuration management system This file is free software; you can redistribute it and/or modify either version 3 , or ( at your option ) any later version. This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty o...
Copyright ( C ) 2021 < > it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License (in-package :consfigurator.property.sshd) (named-readtables:in-readtable :consfigurator) (defproplist installed :posix () "Install an OpenSS...
aaa964608bdcf10624af61a0ded442c8f5b4f54a25607be69fc6cc66b47397be
dfinity/motoko
variance.mli
open Mo_types (* Variance of type variables *) (* Given a type, a variable is * Bivariant if it has no occurrence * Covariant if it only occurs in positive positions * Contraviant if it only occurs in negative positions * Invariant if it occurs in both positive and negative positions *) type t = Bivariant ...
null
https://raw.githubusercontent.com/dfinity/motoko/399b8e8b0b47890388cd38ee0ace7638d9092b1a/src/mo_frontend/variance.mli
ocaml
Variance of type variables Given a type, a variable is * Bivariant if it has no occurrence * Covariant if it only occurs in positive positions * Contraviant if it only occurs in negative positions * Invariant if it occurs in both positive and negative positions `variances cons typ` maps each variable in ...
open Mo_types type t = Bivariant | Covariant | Contravariant | Invariant val variances : Type.ConSet.t -> Type.typ -> t Type.ConEnv.t
8fba61f4ec5eeaff96b52c2f1db03f5e3f71e61fedf5e5a8185e7c5446a15635
lemmih/lhc
SimpleInline.hs
module Language.Haskell.Crux.SimpleInline ( simpleInline ) where import Control.Monad.Reader import Control.Monad.RWS (RWS, evalRWS) import Control.Monad.State (gets, modify) import Control.Monad.Writer (listen, tell) import ...
null
https://raw.githubusercontent.com/lemmih/lhc/53bfa57b9b7275b7737dcf9dd620533d0261be66/haskell-crux/src/Language/Haskell/Crux/SimpleInline.hs
haskell
inline everything & analyse whether current function can be inlined later Functions can be inlineable iff: They only use their arguments once. They are only used once. Functions can be inlined iff: They are called with all arguments supplied. splitArguments (WithCoercion _ e) = splitArguments e Just expr -> ...
module Language.Haskell.Crux.SimpleInline ( simpleInline ) where import Control.Monad.Reader import Control.Monad.RWS (RWS, evalRWS) import Control.Monad.State (gets, modify) import Control.Monad.Writer (listen, tell) import ...
eab79880fb0922353b831c93a15ae2b415941112d7f81b00d69660e4edb1cebf
thheller/shadow-experiments
dom_scheduler.cljs
(ns shadow.experiments.arborist.dom-scheduler (:require-macros [shadow.experiments.arborist.dom-scheduler])) microtask based queue , maybe rAf ? (def task-queue (js/Promise.resolve)) (def scheduled? false) (def flushing? false) (def read-tasks #js []) (def write-tasks #js []) (def update-tasks #js []) (defn run...
null
https://raw.githubusercontent.com/thheller/shadow-experiments/a2170c2214778b6b9a9253166383396d64d395a4/src/main/shadow/experiments/arborist/dom_scheduler.cljs
clojure
(js/console.log "run-tasks!" (into [] arr)) return task-queue so callers can .then additional stuff after their task? not sure this will see too much use?
(ns shadow.experiments.arborist.dom-scheduler (:require-macros [shadow.experiments.arborist.dom-scheduler])) microtask based queue , maybe rAf ? (def task-queue (js/Promise.resolve)) (def scheduled? false) (def flushing? false) (def read-tasks #js []) (def write-tasks #js []) (def update-tasks #js []) (defn run...
c9b16f9eb947083ca417cac823b60456399078db1c292ffe172ff68aa12a6fbe
TerrorJack/ghc-alter
num004.hs
-- Exercising Numeric.readSigned a bit -- module Main(main) where import Numeric import Data.Char main = let rd :: ReadS Integer rd = readSigned (readInt 10 (isDigit) (digitToInt)) in do print (rd (show (343023920121::Integer))) print (rd (show (3430239::Int))) print (rd (show (-0 :: Int))) pr...
null
https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/tests/Numeric/num004.hs
haskell
Exercising Numeric.readSigned a bit
module Main(main) where import Numeric import Data.Char main = let rd :: ReadS Integer rd = readSigned (readInt 10 (isDigit) (digitToInt)) in do print (rd (show (343023920121::Integer))) print (rd (show (3430239::Int))) print (rd (show (-0 :: Int))) print (rd (show (591125662431 `div` (517::In...
350c1768eae50dae92f706d090707a84d2d2e754c690c84a2dae7025bd7acac5
clojure-interop/google-cloud-clients
ProfileServiceStub.clj
(ns com.google.cloud.talent.v4beta1.stub.ProfileServiceStub "Base stub class for Cloud Talent Solution API. This class is for advanced usage and reflects the underlying API directly." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.talent.v4beta1.stub ProfileServiceStub])) (defn ->...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.talent/src/com/google/cloud/talent/v4beta1/stub/ProfileServiceStub.clj
clojure
(ns com.google.cloud.talent.v4beta1.stub.ProfileServiceStub "Base stub class for Cloud Talent Solution API. This class is for advanced usage and reflects the underlying API directly." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.talent.v4beta1.stub ProfileServiceStub])) (defn ->...
1befd16d40438ac57de46451ee549c172eab1601be32178c353c672284d79d0f
owainlewis/ocaml-datastructures-algorithms
quick.ml
(* Quick sort *) module type QUICK = sig val quick_sort : 'a list -> 'a list end module Sorting : QUICK = struct let rec quick_sort = function | [] -> [] | x::xs -> let smaller, larger = List.partition (fun y -> y < x) xs in let x = (quick_sort smaller) and y = (x::quick_sort large...
null
https://raw.githubusercontent.com/owainlewis/ocaml-datastructures-algorithms/4696fa4f5a015fc18e903b0b9ba2a1a8013a40ce/archive/quick.ml
ocaml
Quick sort
module type QUICK = sig val quick_sort : 'a list -> 'a list end module Sorting : QUICK = struct let rec quick_sort = function | [] -> [] | x::xs -> let smaller, larger = List.partition (fun y -> y < x) xs in let x = (quick_sort smaller) and y = (x::quick_sort larger) in x @ y e...
29d5d2ad4abe99e01dd533125c155f7a696b52dbae8cdbe762eab273ff4108e2
avsm/ocaml-ssh
printer_utils.ml
* Copyright ( c ) 2009 Anil Madhavapeddy < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS...
null
https://raw.githubusercontent.com/avsm/ocaml-ssh/26577d1501e7a43e4b520239b08da114c542eda4/mpl/printer_utils.ml
ocaml
printer function indent level new line
* Copyright ( c ) 2009 Anil Madhavapeddy < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS...
57acf9067cdc50e20ca65173d6aa3aab01c7746ea6efd8095111f5f1e71943be
death/zonquerer
game.lisp
;;;; +----------------------------------------------------------------+ ;;;; | zonquerer | ;;;; +----------------------------------------------------------------+ | Copyright ( C ) 2021 death | ;;;; | ...
null
https://raw.githubusercontent.com/death/zonquerer/2a0ff29b9d974fc66addb9126f1638f4d5d071cb/game.lisp
lisp
+----------------------------------------------------------------+ | zonquerer | +----------------------------------------------------------------+ | | | This program is free software: you can redist...
| Copyright ( C ) 2021 death | | modify it under the terms of the GNU Affero General Public | | License as published by the Free Software Foundation , either | | version 3 of the License , or ( at your option ) any later | (defpackage #:zonquerer/game (:...
78f99b6f056410c298fce7f7e8033f76a9f144ad84bbaa4ce95dc8b4d9254c34
input-output-hk/cardano-sl
Logic.hs
# LANGUAGE RecordWildCards # -- | Main Toss logic. module Pos.Chain.Ssc.Toss.Logic ( verifyAndApplySscPayload , applyGenesisBlock , rollbackSsc , normalizeToss , refreshToss ) where import Universum hiding (id) import Control.Lens (at) import C...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/chain/src/Pos/Chain/Ssc/Toss/Logic.hs
haskell
| Main Toss logic. Check the payload for internal consistency. @verifySscPayload@. We perform @verifySscPayload@ for block when we construct it (in the 'recreateGenericBlock'). So this check is just in case. by `Pos.Block.BHelper.verifyMainBlock` Apply We can freely clear shares after 'slotSecurityParam' becau...
# LANGUAGE RecordWildCards # module Pos.Chain.Ssc.Toss.Logic ( verifyAndApplySscPayload , applyGenesisBlock , rollbackSsc , normalizeToss , refreshToss ) where import Universum hiding (id) import Control.Lens (at) import Control.Monad.Except (M...
d19d114277a224e4351925a32b1d54e69b6f2552cb5447ee112a601f4b233fd1
Bogdanp/marionette
json.rkt
#lang racket/base (require (for-syntax racket/base) json racket/match) (provide json-null? js-null) (define (json-null? v) (eq? v (json-null))) (define-match-expander js-null (lambda (stx) (syntax-case stx () [(_) #'(? json-null?)])))
null
https://raw.githubusercontent.com/Bogdanp/marionette/46af32a3b37d28dd9bc3e1ea6c5a6e483561b6e5/marionette-lib/private/json.rkt
racket
#lang racket/base (require (for-syntax racket/base) json racket/match) (provide json-null? js-null) (define (json-null? v) (eq? v (json-null))) (define-match-expander js-null (lambda (stx) (syntax-case stx () [(_) #'(? json-null?)])))
38d6e7b7e7a09d9c6ec658187d15c45309eab075507cd505a62cf594eddd7527
alexandergunnarson/quantum
jvm.clj
(ns quantum.test.benchmarks.jvm (:require [quantum.core.macros.defnt :refer [defnt defnt' defntp]] [quantum.core.collections :as coll :refer [reduce-pair]] [quantum.core.meta.bench :refer [bench complete-bench]] [quantum.untyped.core.form.type-hint :refer [static-cast]]) (:im...
null
https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/benchmarks/jvm.clj
clojure
===== STATIC ===== ; ===== PROTOCOL ===== ; ===== `INSTANCE?` DISPATCH ===== ; ===== LOOKUP MAP, IMMUTABLE ===== ; ===== LOOKUP MAP, MUTABLE ===== ; ===== LOOKUP MAP, IDENTITY MUTABLE ===== ; ===== LOOKUP MAP, INT->OBJECT MUTABLE ===== ; ===== BENCHMARKS ===== ; It's more fair to benchmark this way. Also, a...
(ns quantum.test.benchmarks.jvm (:require [quantum.core.macros.defnt :refer [defnt defnt' defntp]] [quantum.core.collections :as coll :refer [reduce-pair]] [quantum.core.meta.bench :refer [bench complete-bench]] [quantum.untyped.core.form.type-hint :refer [static-cast]]) (:im...
7fc65a58bfeb4ade356d7ad5153ee8c30553666e4a5ad04dd7c219b82e4facd1
dpiponi/Moodler
HandleDraggingSelection.hs
module HandleDraggingSelection where import Graphics.Gloss.Interface.IO.Game import Control.Monad import Control . Monad . Trans . Free import Control.Lens hiding (setting) import qualified Data.Set as S import Sound.MoodlerLib.Quantise import Sound.MoodlerLib.Symbols import World import WorldSupport import ServerSt...
null
https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/src/HandleDraggingSelection.hs
haskell
If you drag a parent and its children then only the parent needs to be expicitly dragged. XXX use minimal parent func
module HandleDraggingSelection where import Graphics.Gloss.Interface.IO.Game import Control.Monad import Control . Monad . Trans . Free import Control.Lens hiding (setting) import qualified Data.Set as S import Sound.MoodlerLib.Quantise import Sound.MoodlerLib.Symbols import World import WorldSupport import ServerSt...