_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
e0be94d304e97400542cb3d0d572aec3e89dc1be17b76dbb2a21d39ad8363e32
sebsheep/elm2node
Licenses.hs
# OPTIONS_GHC -Wall # {-# LANGUAGE OverloadedStrings #-} module Elm.Licenses ( License , bsd3 , encode , decoder ) where import qualified Data.Map as Map import qualified Data.Utf8 as Utf8 import qualified Json.Decode as D import qualified Json.Encode as E import qualified Json.String as Json import qual...
null
https://raw.githubusercontent.com/sebsheep/elm2node/602a64f48e39edcdfa6d99793cc2827b677d650d/compiler/src/Elm/Licenses.hs
haskell
# LANGUAGE OverloadedStrings # LICENCES CHECK LIST OF LICENCES </>
# OPTIONS_GHC -Wall # module Elm.Licenses ( License , bsd3 , encode , decoder ) where import qualified Data.Map as Map import qualified Data.Utf8 as Utf8 import qualified Json.Decode as D import qualified Json.Encode as E import qualified Json.String as Json import qualified Reporting.Suggest as Suggest ...
086aea12898233577b2a25d5f5132f0ded2f9d51156b2ef72342fc9f2e04027c
morpheusgraphql/morpheus-graphql
Parser.hs
# LANGUAGE NoImplicitPrelude # module Data.Morpheus.Parser ( parseSchema, parseTypeDefinitions, parseDefinitions, parseRequest, parseRequestWith, ) where import Data.ByteString.Lazy (ByteString) import Data.Morpheus.Ext.Result ( GQLResult, sortErrors, ) import Data.Morpheus.Internal.Utils ...
null
https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/693ab8c3f63043b309abf88a373b1529a66713ca/morpheus-graphql-core/src/Data/Morpheus/Parser.hs
haskell
# LANGUAGE NoImplicitPrelude # module Data.Morpheus.Parser ( parseSchema, parseTypeDefinitions, parseDefinitions, parseRequest, parseRequestWith, ) where import Data.ByteString.Lazy (ByteString) import Data.Morpheus.Ext.Result ( GQLResult, sortErrors, ) import Data.Morpheus.Internal.Utils ...
6b6498bb3bc43e0de65f96218b4370cb757e749be231cfcb29a08668438bdc85
McCLIM/McCLIM
bitmaps.lisp
;;; --------------------------------------------------------------------------- ;;; License: LGPL-2.1+ (See file 'Copyright' for details). ;;; --------------------------------------------------------------------------- ;;; ( c ) Copyright ( c ) 2016 < > ;;; ;;; --------------------------------------------------...
null
https://raw.githubusercontent.com/McCLIM/McCLIM/bb8f0eb600d6c49b7c06a2c2d240be8dbcd26f00/Extensions/bitmap-formats/bitmaps.lisp
lisp
--------------------------------------------------------------------------- License: LGPL-2.1+ (See file 'Copyright' for details). --------------------------------------------------------------------------- --------------------------------------------------------------------------- Bitmap images new image f...
( c ) Copyright ( c ) 2016 < > (in-package #:clim-internals) (defmacro define-opticl-reader (name opticl-reader) `(defun ,name (image-pathname) (let* ((img (handler-case (,opticl-reader image-pathname) (error () (error 'unsupported-bitmap-forma...
673e6ac1bdaef852c6043003cafd0aa8885259e3642c5e97f6d4dfc4fe8a8789
MLstate/opalang
baseSetSig.ml
Copyright © 2011 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be useful , ...
null
https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/ocamllib/libbase/baseSetSig.ml
ocaml
* [subset s1 s2] tests whether the set s1 is a subset of the set s2 . * Returns an arbitrary element of the set. @raise Not_found on the empty set * Returns an arbitrary element of the set if it is not empty * exporting the Arg.compare
Copyright © 2011 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be useful , ...
447ad3197987e1fbf8d1cfd52e8d8e9061cca428514a9e88f9d0fff7298d7242
madvas/todomvc-omnext-datomic-datascript
util.cljs
(ns todomvc.util (:require [cognitect.transit :as t] [cljs.pprint :refer [pprint]] [om.transit :as omt] [goog.events.KeyCodes :as kc]) (:import [goog.net XhrIo])) (defn p [& args] "Like print, but returns last arg. For debugging purposes" (doseq [a args] (let [f (if (ma...
null
https://raw.githubusercontent.com/madvas/todomvc-omnext-datomic-datascript/11cc1186727c525b6eb557cb106d7ba57e0f5a61/src/cljs/todomvc/util.cljs
clojure
(ns todomvc.util (:require [cognitect.transit :as t] [cljs.pprint :refer [pprint]] [om.transit :as omt] [goog.events.KeyCodes :as kc]) (:import [goog.net XhrIo])) (defn p [& args] "Like print, but returns last arg. For debugging purposes" (doseq [a args] (let [f (if (ma...
31b683b1b86c2ab863dcd54bbb4537397a172262f5440ae6846b6677e1833772
fulcrologic/fulcro-rad-demo
account_forms.cljc
(ns com.example.ui.account-forms (:require [clojure.string :as str] [com.fulcrologic.fulcro.algorithms.tempid :as tempid] [com.fulcrologic.rad.picker-options :as po] [taoensso.timbre :as log] [com.example.model :as model] [com.example.model.account :as account] [com.example.model.timezone ...
null
https://raw.githubusercontent.com/fulcrologic/fulcro-rad-demo/8b6d3b01ebe5cc65798e5e8dfbabbc4706efca61/src/shared/com/example/ui/account_forms.cljc
clojure
Override what the attribute asks for. Comment this out and see that it uses the attribute's validation, which is lower case instead (also comment out the custom validation message on the form). NOTE: Limitation: Each "storage location" requires a form. The ident of the component matches the identity of the item be...
(ns com.example.ui.account-forms (:require [clojure.string :as str] [com.fulcrologic.fulcro.algorithms.tempid :as tempid] [com.fulcrologic.rad.picker-options :as po] [taoensso.timbre :as log] [com.example.model :as model] [com.example.model.account :as account] [com.example.model.timezone ...
2f7af788b1193933b4c3f518dc8a5e8acf110a6d9f605c009f024c2cea60ebb8
CryptoKami/cryptokami-core
Util.hs
-- | Slotting utilities. module Pos.Slotting.Util ( -- * Helpers using 'MonadSlots[Data]' getCurrentSlotFlat , getSlotStart , getSlotStartPure , getSlotStartEmpatically , getCurrentEpochSlotDuration , getNextEpochSlotDuration , slotFromTimestamp ...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/infra/Pos/Slotting/Util.hs
haskell
| Slotting utilities. * Helpers using 'MonadSlots[Data]' * Worker which ticks when slot starts * Worker which logs beginning of new slot * Waiting for system start | Get timestamp when given slot starts. Maybe epoch slotting data. | Pure timestamp calculation for a given slot. | Get timestamp when given slot s...
module Pos.Slotting.Util ( getCurrentSlotFlat , getSlotStart , getSlotStartPure , getSlotStartEmpatically , getCurrentEpochSlotDuration , getNextEpochSlotDuration , slotFromTimestamp , onNewSlot , logNewSlotWorker , waitSystemStart ...
bdec88a255264a95ea2b91e23002ee5a6d81297eea16727a125155dfe34287c1
helpshift/hydrox
checks_test.clj
(ns hydrox.doc.checks-test (:use midje.sweet) (:require [hydrox.doc.checks :refer :all] [rewrite-clj.zip :as z])) ^{:refer hydrox.doc.checks/directive? :added "0.1"} (fact "checks if the element is a directive." (-> "[[:chapter {:title \"A Story\"}]]" z/of-string directive?) => true) ...
null
https://raw.githubusercontent.com/helpshift/hydrox/2beb3c56fad43bbf16f07db7ee72c5862978350c/test/hydrox/doc/checks_test.clj
clojure
(ns hydrox.doc.checks-test (:use midje.sweet) (:require [hydrox.doc.checks :refer :all] [rewrite-clj.zip :as z])) ^{:refer hydrox.doc.checks/directive? :added "0.1"} (fact "checks if the element is a directive." (-> "[[:chapter {:title \"A Story\"}]]" z/of-string directive?) => true) ...
ba51f035a583c035ef0b19586620dafe1cde83a6170ffee0539fd16df03cb6f6
agentultra/postgresql-replicant
Settings.hs
{-# LANGUAGE Strict #-} module Database.PostgreSQL.Replicant.Settings where import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as B data PgSettings = PgSettings { pgUser :: String , pgPassword :: Maybe String , pgDbName :: String , pgHost :: String , pgPort ...
null
https://raw.githubusercontent.com/agentultra/postgresql-replicant/aa31b5a49085ac1d91ace2358bcb494e48bbd9d0/src/Database/PostgreSQL/Replicant/Settings.hs
haskell
# LANGUAGE Strict # ^ Controls how frequently the primaryKeepAlive thread updates PostgresSQL in @ms@
module Database.PostgreSQL.Replicant.Settings where import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as B data PgSettings = PgSettings { pgUser :: String , pgPassword :: Maybe String , pgDbName :: String , pgHost :: String , pgPort :: String , pgSl...
ad012f624c37ba9910c64f486c3d9ddca543358391a21d521518eaf29238b2f7
flexsurfer/re-frisk
diff_test.cljs
(ns re-frisk.diff-test (:require [cljs.test :refer [deftest is]] [re-frisk.diff.diff :as sut])) (deftest test-empty (is (= nil (sut/diff 1 1)))) (deftest test-change-scalar (is (= {:before 1 :after 2} (sut/diff 1 2)))) (deftest test-change-type (is (= {:before 1 :after [42]} (sut/diff 1 [42])))) ...
null
https://raw.githubusercontent.com/flexsurfer/re-frisk/638d820c84e23be79b8c52f8f136a611d942443f/test/re_frisk/diff_test.cljs
clojure
(ns re-frisk.diff-test (:require [cljs.test :refer [deftest is]] [re-frisk.diff.diff :as sut])) (deftest test-empty (is (= nil (sut/diff 1 1)))) (deftest test-change-scalar (is (= {:before 1 :after 2} (sut/diff 1 2)))) (deftest test-change-type (is (= {:before 1 :after [42]} (sut/diff 1 [42])))) ...
b24e0e6b56dda55400c43d575b6d8547bc4dbf6e24c0da657fbd5888d4415f3d
boxer-project/boxer-sunrise
freetype-fonts.lisp
;;;; Boxer Copyright 1985 - 2022 Andrea A. diSessa and the Estate of Edward H. Lay ;;;; Portions of this code may be copyright 1982 - 1985 Massachusetts Institute of Technology . Those portions may be used for any purpose , including commercial ones , providing that notice of MIT copyright is ...
null
https://raw.githubusercontent.com/boxer-project/boxer-sunrise/535fc1b2a35b4462f6931133a86953c78bed26b1/src/draw-low-opengl330/freetype-fonts.lisp
lisp
Boxer Licensed under the 3-Clause BSD license. You may not use this file except in compliance with this license. -3-Clause +-Data--+ This file is part of the | BOXER | system +-------+ Utilities fo...
Copyright 1985 - 2022 Andrea A. diSessa and the Estate of Edward H. Lay Portions of this code may be copyright 1982 - 1985 Massachusetts Institute of Technology . Those portions may be used for any purpose , including commercial ones , providing that notice of MIT copyright is retained . (in-packa...
73c054347839315bbdfa88291f129780dbae5364fb4db441d706727a6fa31380
job-streamer/job-streamer-agent
dev.clj
(ns dev (:refer-clojure :exclude [test]) (:require [clojure.repl :refer :all] [clojure.pprint :refer [pprint]] [clojure.tools.namespace.repl :refer [refresh]] [clojure.java.io :as io] [com.stuartsierra.component :as component] [duct.generate :as gen] ...
null
https://raw.githubusercontent.com/job-streamer/job-streamer-agent/82de7ec5d0e1b0b0fc47db7facd7d790b8db7715/dev/dev.clj
clojure
(ns dev (:refer-clojure :exclude [test]) (:require [clojure.repl :refer :all] [clojure.pprint :refer [pprint]] [clojure.tools.namespace.repl :refer [refresh]] [clojure.java.io :as io] [com.stuartsierra.component :as component] [duct.generate :as gen] ...
9e1f29e58b60ee46a6ec7a4092330d20e59658fd969f10485ab7cbd1eeb32a66
bramford/2d-exploration-game
items.ml
type t = Item.t option list let random i = let rec r n l = if n = 0 then l else r (n - 1) ((Item.random i) :: l) in r (Random.int 5) [] let draw l = match l with | [] | [_] -> Item.draw None | hd :: _ -> Item.draw hd let to_string l = let rec ts acc l s se = match l with | [] | [_] -> s...
null
https://raw.githubusercontent.com/bramford/2d-exploration-game/0660ced6ec4aa39d4548b0ecc1f20f8269bf4c6b/src/items.ml
ocaml
type t = Item.t option list let random i = let rec r n l = if n = 0 then l else r (n - 1) ((Item.random i) :: l) in r (Random.int 5) [] let draw l = match l with | [] | [_] -> Item.draw None | hd :: _ -> Item.draw hd let to_string l = let rec ts acc l s se = match l with | [] | [_] -> s...
e830f5009ff6a5cddb895552efe4397699b5fc0f47226b9597cd1db42869804c
arcadia-unity/ArcadiaGodot
config.clj
(ns arcadia.internal.config) (def config (merge (read-string (try (slurp "ArcadiaGodot/configuration.edn" :encoding "utf-8") (catch Exception e "{}"))) (read-string (try (slurp "configuration.edn" :encoding "utf-8") (catch Exception e "{}"))))) (defn get-config [] config...
null
https://raw.githubusercontent.com/arcadia-unity/ArcadiaGodot/d9881c8132c46f21efde4eb4eb9a534d808cdb20/Source/arcadia/internal/config.clj
clojure
(ns arcadia.internal.config) (def config (merge (read-string (try (slurp "ArcadiaGodot/configuration.edn" :encoding "utf-8") (catch Exception e "{}"))) (read-string (try (slurp "configuration.edn" :encoding "utf-8") (catch Exception e "{}"))))) (defn get-config [] config...
b3b32a7fdb2968d85f6de2955c1582335d6ad7b3097d58e6bc7b2cbdc93f6236
MyDataFlow/ttalk-server
jid.erl
%%============================================================================== Copyright 2015 Erlang Solutions Ltd. %% 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 %% ...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/src/jid.erl
erlang
============================================================================== you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either ex...
Copyright 2015 Erlang Solutions Ltd. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(jid). -export([make/3]). -export([make/1]). -export([are_equal/2]). -export([are_bare_equal/2]). -export([from_binary/1]). -expor...
28c7b03df8fe58f700c2be976f62287feb5128cfe54819c02ffe9d86556b519a
ayazhafiz/plts
syntax.ml
open Format open Support.Error open Support.Pervasive (* ---------------------------------------------------------------------- *) type ty = TyArr of ty * ty | TyBool type term = | TmVar of info * int * int | TmLet of info * string * term * term | TmAbs of info * string * ty * term | TmApp of info * term ...
null
https://raw.githubusercontent.com/ayazhafiz/plts/59b3996642f4fd5941c96a4987643303acc3dee6/tapl/11.5.1-letexercise/syntax.ml
ocaml
---------------------------------------------------------------------- ---------------------------------------------------------------------- Context management ---------------------------------------------------------------------- Shifting --------------------------------------------------------------------...
open Format open Support.Error open Support.Pervasive type ty = TyArr of ty * ty | TyBool type term = | TmVar of info * int * int | TmLet of info * string * term * term | TmAbs of info * string * ty * term | TmApp of info * term * term | TmTrue of info | TmFalse of info | TmIf of info * term * term ...
f0113bd6c62ac2014ed01842918ea16774194af3ea8127e19550712597e71b69
tahnik/graphqlx
ArgumentUniqueness.ml
open Types open Printf let error: bool ref = ref false;; let listOfArgs: string list ref = ref [];; let rec read_doc definitions = (match definitions with | [] -> () | def::defs -> read_definition def; read_doc defs); and read_definition def = match def with | Operation op -> read_operation op | F...
null
https://raw.githubusercontent.com/tahnik/graphqlx/4a3dea80891c0f8aa16a98485f5c9a3b6d0fe88c/src/validation/src/ArgumentUniqueness.ml
ocaml
open Types open Printf let error: bool ref = ref false;; let listOfArgs: string list ref = ref [];; let rec read_doc definitions = (match definitions with | [] -> () | def::defs -> read_definition def; read_doc defs); and read_definition def = match def with | Operation op -> read_operation op | F...
69ac66948375a0e49b4371b892fc36190d530a29521a8b490639fda97352844f
8c6794b6/guile-tjit
gnu.scm
;;; Extensions to SRFI-4 Copyright ( C ) 2009 , 2010 , 2011 , 2012 , 2013 , 2014 Free Software Foundation , Inc. ;; ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version ...
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/srfi/srfi-4/gnu.scm
scheme
Extensions to SRFI-4 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A P...
Copyright ( C ) 2009 , 2010 , 2011 , 2012 , 2013 , 2014 Free Software Foundation , Inc. version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA (define-modul...
661c38f119f5bff231992ac7746973849759f7a08f73f6fd8cb9b497011307d3
CindyLinz/Haskell.js
BasicTrans.hs
module BasicTrans ( transModule ) where import Language.Haskell.Exts.Annotated import Data.Char import ForgetL escapeJSString :: String -> String escapeJSString ('\'' : others) = '\\' : '\'' : escapeJSString others escapeJSString ('\\' : others) = '\\' : '\\' : escapeJSString others escapeJSString (ch : others)...
null
https://raw.githubusercontent.com/CindyLinz/Haskell.js/78429a49181a15f6bdae426f17bdae722ad17141/trans/src/BasicTrans.hs
haskell
XXX: qualified name implemented incorrectly transQName (Qual l _ _) = error "qualified name unimplemented" case target of name -> expr 字元 literal: 'a', 'b', 'c', .. unbox 字元 literal: 'a'#, 'b'#, 'c'#, ..
module BasicTrans ( transModule ) where import Language.Haskell.Exts.Annotated import Data.Char import ForgetL escapeJSString :: String -> String escapeJSString ('\'' : others) = '\\' : '\'' : escapeJSString others escapeJSString ('\\' : others) = '\\' : '\\' : escapeJSString others escapeJSString (ch : others)...
f67083d915b0b38f0e3ada26a4ac2294bd8fd1b65155669df5681ee99060062b
bsless/fast.csv
bench.clj
(ns bsless.fast.csv.bench (:require [criterium.core :as cc] [clj-async-profiler.core :as prof] [bsless.fast.csv :as fast.csv] [clojure.data.csv :as csv])) (defn some-char [] (let [p (fast.csv/some-char-pred "bcdefghijklmnopqrstuvwxyz1289057-=+{}")] (-> "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
null
https://raw.githubusercontent.com/bsless/fast.csv/a0c816e149eb69b2adcee58fd7aa659d5f63bfe6/dev/bsless/fast/csv/bench.clj
clojure
(ns bsless.fast.csv.bench (:require [criterium.core :as cc] [clj-async-profiler.core :as prof] [bsless.fast.csv :as fast.csv] [clojure.data.csv :as csv])) (defn some-char [] (let [p (fast.csv/some-char-pred "bcdefghijklmnopqrstuvwxyz1289057-=+{}")] (-> "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
c42891b1875a1f620dc97c37d76b64f911e86103b655d05ed0d0243f5c2b62c0
soulomoon/SICP
Exercise4.38.scm
Exercise 4.38 : Modify the multiple - dwelling procedure to omit the requirement that Smith and Fletcher do not live on adjacent floors . How many solutions are there to this modified puzzle ? #lang swindle (define (square x) (* x x)) (define (require p) (if (not p) (amb))) (define (an-integer-between low high) ...
null
https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter4/Exercise4.38.scm
scheme
memory limit : 128 MB . >
Exercise 4.38 : Modify the multiple - dwelling procedure to omit the requirement that Smith and Fletcher do not live on adjacent floors . How many solutions are there to this modified puzzle ? #lang swindle (define (square x) (* x x)) (define (require p) (if (not p) (amb))) (define (an-integer-between low high) ...
d9d2d83abcc9cfb094f9f010df8aa1f021173a91ccca38315ee68266a329bd2f
flowyourmoney/malli-ts
data_mapping_test.cljs
(ns malli-ts.data-mapping-test (:require [cljs.test :as t :refer-macros [deftest is testing]] [malli-ts.core :as-alias mts] [malli-ts.data-mapping :as sut] [malli-ts.data-mapping.to-clj :as sut-tc] [malli-ts.data-mapping.to-js :as sut-tj] [mall...
null
https://raw.githubusercontent.com/flowyourmoney/malli-ts/478b5dd190cbdc7a494c03e958ec65d53232441a/test/malli_ts/data_mapping_test.cljs
clojure
TODO: Benchmark run above tests
(ns malli-ts.data-mapping-test (:require [cljs.test :as t :refer-macros [deftest is testing]] [malli-ts.core :as-alias mts] [malli-ts.data-mapping :as sut] [malli-ts.data-mapping.to-clj :as sut-tc] [malli-ts.data-mapping.to-js :as sut-tj] [mall...
a6098e6c3dfb9979d0a1606797b7ecebebde7f690cce29b3a7005d0a9d24f5d7
jlouis/graphql-erlang
dungeon_object.erl
-module(dungeon_object). -export([execute/4]). execute(_Ctx, Obj, Field, _) when is_map(Obj) -> {ok, maps:get(Field, Obj, null)}; execute(_Ctx, Obj, _, _) -> {error, {not_map_object, Obj}}.
null
https://raw.githubusercontent.com/jlouis/graphql-erlang/4fd356294c2acea42a024366bc5a64661e4862d7/test/dungeon_object.erl
erlang
-module(dungeon_object). -export([execute/4]). execute(_Ctx, Obj, Field, _) when is_map(Obj) -> {ok, maps:get(Field, Obj, null)}; execute(_Ctx, Obj, _, _) -> {error, {not_map_object, Obj}}.
ebf815534f39708d243b790b0ef3aa3511de3c42b61c75331e72911a5fad7e52
disconcision/fructure
draw-fruct-common.rkt
#lang racket (provide layout-row layout-column real-atomic? render-symbol render-atom ellipses space) (require 2htdp/image "../../shared/containment-patterns/containment-patterns/main.rkt" "../../shared/slash-patterns/slash-patterns.rkt" ...
null
https://raw.githubusercontent.com/disconcision/fructure/d434086052eab3c450f631b7b14dcbf9358f45b7/src/layout/draw-fruct-common.rkt
racket
hacky, rework this TODO: magic numbers TODO: render transform arrow, menu cursor in this way HACK: hole char is slightly weird at least on windows? padding render sort name instead of hole
#lang racket (provide layout-row layout-column real-atomic? render-symbol render-atom ellipses space) (require 2htdp/image "../../shared/containment-patterns/containment-patterns/main.rkt" "../../shared/slash-patterns/slash-patterns.rkt" ...
aef9b0aff958a2bfdeaa2f6bdba397c76dee0984d139977878b0e551b98ba583
malcolmreynolds/GSLL
gumbel1.lisp
Regression test GUMBEL1 for GSLL , automatically generated (in-package :gsl) (LISP-UNIT:DEFINE-TEST GUMBEL1 (LISP-UNIT::ASSERT-NUMERICAL-EQUAL (LIST (LIST 8.954596257487015d0 0.0973051899750762d0 0.45913506233088003d0 3.6074124224293223d0 0.31300027468174807d0 1.0165796949651174d0 3.82920819366103...
null
https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/tests/gumbel1.lisp
lisp
Regression test GUMBEL1 for GSLL , automatically generated (in-package :gsl) (LISP-UNIT:DEFINE-TEST GUMBEL1 (LISP-UNIT::ASSERT-NUMERICAL-EQUAL (LIST (LIST 8.954596257487015d0 0.0973051899750762d0 0.45913506233088003d0 3.6074124224293223d0 0.31300027468174807d0 1.0165796949651174d0 3.82920819366103...
1d66cd533d3802e0d439dca7c7c586f77fe28d4e150eee628aab9ad41c587eda
ubf/ubf
ubf_utils.erl
%%% The MIT License %%% Copyright ( C ) 2011 - 2016 by < > Copyright ( C ) 2002 by %%% %%% Permission is hereby granted, free of charge, to any person obtaining a copy %%% of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without li...
null
https://raw.githubusercontent.com/ubf/ubf/c876f684fbd4959548ace1eb1cfc91941f93d377/src/ubf_utils.erl
erlang
The MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnished to do so, subject to the following conditions: The above...
Copyright ( C ) 2011 - 2016 by < > Copyright ( C ) 2002 by in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITH...
a2a6c79c0e505ed6dbb82124fee5c3eb7c306a88daffd6a812a295f15cde88a6
th0ma5w/rosettamesh
project.clj
(defproject rosettamesh "0.7" :description "triangle mesh translation functions" :main rosettamesh.core :disable-implicit-clean true :dependencies [[org.clojure/clojure "1.3.0"]])
null
https://raw.githubusercontent.com/th0ma5w/rosettamesh/f5cfc0e00a6bf1882e22efea2c0f00beade8df64/project.clj
clojure
(defproject rosettamesh "0.7" :description "triangle mesh translation functions" :main rosettamesh.core :disable-implicit-clean true :dependencies [[org.clojure/clojure "1.3.0"]])
d08e4ca41fb6cfe6fc2950628fbd4f256fc75a8980462718bef10f03584f1fa8
ocsigen/ocaml-eliom
bank.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/lib-threads/bank.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Printf open Event type account = int channel * int channel let account (put_ch, get_ch) = let r...
a1562c93df3959bacda91cb89d214b025306e3dd51948c904cc1ceddb2f88082
alexpeits/harg
Single.hs
# LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE PolyKinds # # LANGUAGE StandaloneDeriving # # LANGUAGE UndecidableInstances # module Options.Harg.Single ( Single (..), single, fromSingle, ) where import qualified Barbies as B import qualified Data.Aeson as JSON import Da...
null
https://raw.githubusercontent.com/alexpeits/harg/ebf28cd4c62bb2c8bb573846b73cc998e8d542a9/src/Options/Harg/Single.hs
haskell
with nested values when creating configuration parsers, using 'Options.Harg.Het.Prod.:*'. @ data User = User { name :: String, age :: Int } myConfig :: (Nested User :* Single Int) Opt myConfig = nested @User nameOpt ageOpt :* single intOpt where ... @ | Wrap a value into a 'Single...
# LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE PolyKinds # # LANGUAGE StandaloneDeriving # # LANGUAGE UndecidableInstances # module Options.Harg.Single ( Single (..), single, fromSingle, ) where import qualified Barbies as B import qualified Data.Aeson as JSON import Da...
8a4a4366987b76233ba28536baf505dba80e7b0c78b46c8eb226d24aced235aa
racket/web-server
response.rkt
#lang racket/base (require file/md5 racket/contract racket/port racket/list racket/match web-server/private/connection-manager (submod web-server/private/connection-manager private) (submod web-server/http/request-structs private) (submod web-serv...
null
https://raw.githubusercontent.com/racket/web-server/d9b8fe5c4adec0493b7e2f9af46215305f34c8f1/web-server-lib/web-server/http/response.rkt
racket
If it is terminated, just continue Otherwise, use chunked encoding Write the headers portion of a response to an output port. header for *all* clients. Compile-time fprintf specialized to byte strings. output-headers : connection (list-of header) -> void print-headers : output-port (list-of header) -> void...
#lang racket/base (require file/md5 racket/contract racket/port racket/list racket/match web-server/private/connection-manager (submod web-server/private/connection-manager private) (submod web-server/http/request-structs private) (submod web-serv...
b90d659cc4e02a14d1f929def47c6c555f1ad904849dbf0d2193161d0a6f51b1
turboMaCk/aeson-combinators
Main.hs
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeApplications # import Control.DeepSeq (NFData) import Criteri...
null
https://raw.githubusercontent.com/turboMaCk/aeson-combinators/6a25917c9b634b1e75bb150be1f045e9f72f0557/benchmarks/Main.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleInstances # # LANGUAGE TypeApplications # import Control.DeepSeq (NFData) import Criterion (Benchmark, nf) import Data.Aeson.Combinators.Decode (Decoder) import ...
edbb53213e787238301670d937d495c049a1d20f74cc4b99e885b871a504f869
facebook/pyre-check
callResolutionTest.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/pyre-check/34f371c6c97e55228bafc0fc36b856ddf6998674/source/interprocedural/test/callResolutionTest.ml
ocaml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
a9c2196bb71a641263c64a84f082501bd83b12a12a1dfef5fef469ed89ab8d5a
Fuuzetsu/h-booru
Safebooru.hs
# LANGUAGE DataKinds # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE UnicodeSyntax # {-# OPTIONS_HADDOCK show-extensions #-} -- | Module : HBooru . Parsers . Copyright : ( c ) 2013 - 2014 -- License : GPL-3 -- -- Maintainer : -- Stability : experimental -- -- Mo...
null
https://raw.githubusercontent.com/Fuuzetsu/h-booru/55167fd0f329b377a377aac4d30ff99f096457f1/src/HBooru/Parsers/Safebooru.hs
haskell
# OPTIONS_HADDOCK show-extensions # | License : GPL-3 Maintainer : Stability : experimental Module for parsing content from </ safebooru>. | We use this type and its 'Site' instance to distinguish between various parsers.
# LANGUAGE DataKinds # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE UnicodeSyntax # Module : HBooru . Parsers . Copyright : ( c ) 2013 - 2014 module HBooru.Parsers.Safebooru where import Data.List import HBooru.Parsers.FieldParsers import HBooru.Types import Text.XML.HXT...
48abe2833bd5184d5aaa40ee3a3b5e22116e4890ddf3b5cf13bdf90239a31e3b
jeanparpaillon/averell
averell_cors_impl.erl
-module(averell_cors_impl). -behaviour(averell_cors_policy). -export([policy_init/1]). -export([allowed_origins/2]). -export([allowed_methods/2]). policy_init(Req) -> {ok, Req, undefined}. allowed_origins(Req, State) -> {'*', Req, State}. allowed_methods(Req, State) -> {[<<"GET">>], Req, State}.
null
https://raw.githubusercontent.com/jeanparpaillon/averell/c69eb7d816b3130e6c64c0a5b2e19130d3c1a7df/src/averell_cors_impl.erl
erlang
-module(averell_cors_impl). -behaviour(averell_cors_policy). -export([policy_init/1]). -export([allowed_origins/2]). -export([allowed_methods/2]). policy_init(Req) -> {ok, Req, undefined}. allowed_origins(Req, State) -> {'*', Req, State}. allowed_methods(Req, State) -> {[<<"GET">>], Req, State}.
b98e6f9085226d585f17734f1a606814474179c8b201ed0d885ec18780937d9b
processone/mysql
p1_mysql_auth.erl
%%%------------------------------------------------------------------- %%% File : p1_mysql_auth.erl Author : < > . : MySQL client authentication functions . Created : 4 Aug 2005 by < > %%% Note : All MySQL code was written by , originally %%% in the file p1_mysql.erl - I just moved...
null
https://raw.githubusercontent.com/processone/mysql/85d3263b906c1dcb7d7aae4b4e58ede082736d34/src/p1_mysql_auth.erl
erlang
------------------------------------------------------------------- File : p1_mysql_auth.erl in the file p1_mysql.erl - I just moved it here. See the file COPYING ------------------------------------------------------------------- -------------------------------------------------------------------- ...
Author : < > . : MySQL client authentication functions . Created : 4 Aug 2005 by < > Note : All MySQL code was written by , originally Copyright ( c ) 2001 - 2004 Kungliga Tekniska Högskolan -module(p1_mysql_auth). -export([ do_old_auth/7, do_new_auth/8 ]). Macros -define(LONG_PASSWO...
b351ca76c47315fef47329c6e67f60cc2a078ebe094ee6b1c89685141c9e3170
shayne-fletcher/zen
a.mli
include A_sig.S
null
https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/vincent/a.mli
ocaml
include A_sig.S
a40b539ccba70d87f2de0517124fad9bdb3d563fe700715e85bdb1823839baa3
erlang/otp
erts_alloc_config.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2007 - 2022 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applic...
null
https://raw.githubusercontent.com/erlang/otp/d5ee0b4e6f436041b82f76ca5e24e39d8b153f66/lib/runtime_tools/src/erts_alloc_config.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific l...
Copyright Ericsson AB 2007 - 2022 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , The Initial Developer of the Original Code is Ericsson AB . Author : Created : 9 May 2007 by -module(...
4641350bfbfef36f43ce031b0690336b7557452dce21fc68583c6a81055ffa17
bakul/s9fes
s9symbols.scm
#! /usr/local/bin/s9 -f ; s9symbols -- print S9 symbols by , ; In the public domain ; ; This procedure extracts all symbols from the S9 help files and ; dumps them to the output port. The resulting list can be used ; as an auto-completion list Scheme-aware editors. ; ; Usage: s9symbols (load-from-library "displ...
null
https://raw.githubusercontent.com/bakul/s9fes/74c14c0db5f07f5bc6d94131e9e4ee15a29275aa/attic/s9symbols.scm
scheme
s9symbols -- print S9 symbols In the public domain This procedure extracts all symbols from the S9 help files and dumps them to the output port. The resulting list can be used as an auto-completion list Scheme-aware editors. Usage: s9symbols
#! /usr/local/bin/s9 -f by , (load-from-library "displaystar.scm") (load-from-library "find-help-path.scm") (load-from-library "read-line.scm") (load-from-library "string-parse.scm") (load-from-library "list-to-set.scm") (load-from-library "remove.scm") (load-from-library "hof.scm") (load-from-library "sort.scm...
332096af00430408b055d809e359128f9fc4ff1f218ed6991a03177185a59106
FreekPaans/clojure-ddd-layered-example
cargo_test.clj
(ns layered-example.domain.cargo.cargo-test (:require [layered-example.domain.cargo.cargo :as cargo] [clojure.test :refer :all]) (:import [java.lang AssertionError])) (deftest a-cargo (let [the-cargo (cargo/create-new-cargo :size 20)] (is (nil? (:cargo-id the-cargo))) (is (= 20 (:size the-ca...
null
https://raw.githubusercontent.com/FreekPaans/clojure-ddd-layered-example/1c306f7a95a59da29a0545a074b6117657cf0847/test/layered_example/domain/cargo/cargo_test.clj
clojure
(ns layered-example.domain.cargo.cargo-test (:require [layered-example.domain.cargo.cargo :as cargo] [clojure.test :refer :all]) (:import [java.lang AssertionError])) (deftest a-cargo (let [the-cargo (cargo/create-new-cargo :size 20)] (is (nil? (:cargo-id the-cargo))) (is (= 20 (:size the-ca...
b49bc401a8608b9f9f9fc82b3bcbe43655e9cef252b083cd3e99857c069687b3
omkamra/jnr
jnr_test.clj
(ns omkamra.jnr-test (:use [clojure.test]) (:require [clojure.java.io :as jio] [clojure.java.shell :refer [sh]]) (:import (java.io File) (java.nio ByteBuffer) (jnr.ffi Pointer) (jnr.ffi.annotations LongLong Encoding)) (:require [omkamra.jnr.library :as library] ...
null
https://raw.githubusercontent.com/omkamra/jnr/36cd9abfdb26b36bc6ae8e62c912336871c16587/test/omkamra/jnr_test.clj
clojure
use `char` for both signed and unsigned char use `short` for both signed and unsigned short use `int` for both signed and unsigned int use `long` for both signed and unsigned long use `long-long` for both signed and unsigned long long use `:encoding` key in metadata to specify how to encode a Unicode string in...
(ns omkamra.jnr-test (:use [clojure.test]) (:require [clojure.java.io :as jio] [clojure.java.shell :refer [sh]]) (:import (java.io File) (java.nio ByteBuffer) (jnr.ffi Pointer) (jnr.ffi.annotations LongLong Encoding)) (:require [omkamra.jnr.library :as library] ...
d636f925a5b36a0d440b3e8492690b37b9e77ac272ceb8c1db199edea9003b97
rabbitmq/osiris
osiris_server_sup.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2022 VMware , Inc. or its affiliates . All rights reserved . %% -module(osiris_server_sup). -behaviour(superviso...
null
https://raw.githubusercontent.com/rabbitmq/osiris/c744a0f1138aec9b388c6c4efadb21c5e7086b48/src/osiris_server_sup.erl
erlang
as replicas are temporary we don't have to explicitly delete them Whole supervisor or app is already down - i.e. stop_app Whole supervisor or app is already down - i.e. stop_app
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2022 VMware , Inc. or its affiliates . All rights reserved . -module(osiris_server_sup). -behaviour(supervisor). -...
7b7dbb6c360dd6e88ec1f0d0fe70f2d4bdffebd6fbd5e098bdabeb4d6fe81572
joearms/crypto_tutorial
ez_crypt_aes.erl
-module(ez_crypt_aes). %% Warning - this code is for illustration purposes only %% and has not been subject to a security review -export([test/0, encrypt/2, decrypt/2]). -spec encrypt(Password :: binary(), Plain :: binary()) -> Code :: binary(). -spec decrypt(Password::binary(), Code::binary()) -> Pla...
null
https://raw.githubusercontent.com/joearms/crypto_tutorial/e487699017dbd102f67d18f466ff44445d10ba3e/src/ez_crypt_aes.erl
erlang
Warning - this code is for illustration purposes only and has not been subject to a security review the entire last block is padding or strong_rand_bytes ???? iv,IV,size(IV),bin1,Bin1,size(Bin1)}]), io:format("S:~p E:~p~n",[size(Bin),Extra]),
-module(ez_crypt_aes). -export([test/0, encrypt/2, decrypt/2]). -spec encrypt(Password :: binary(), Plain :: binary()) -> Code :: binary(). -spec decrypt(Password::binary(), Code::binary()) -> Plain::binary(). test() -> test1(), test2(), test4(), ok. test1() -> Password = <<"hell...
d21641341f3ccf7496b54f579efe5590a7fee5a2e5743d9b87cc72968c89e4d2
skynet-gh/skylobby
http_test.clj
(ns skylobby.http-test (:require [clojure.test :refer [deftest is]] [skylobby.fs :as fs] [skylobby.http :as http])) (set! *warn-on-reflection* true) (deftest detect-engine-branch (is (= "master" (http/detect-engine-branch "103"))) (is (= "master" (http/detect-engine-branch "104.0...
null
https://raw.githubusercontent.com/skynet-gh/skylobby/2a31a60fa46ecaaf48bd6ba0765a264883c05dd2/test/clj/skylobby/http_test.clj
clojure
(ns skylobby.http-test (:require [clojure.test :refer [deftest is]] [skylobby.fs :as fs] [skylobby.http :as http])) (set! *warn-on-reflection* true) (deftest detect-engine-branch (is (= "master" (http/detect-engine-branch "103"))) (is (= "master" (http/detect-engine-branch "104.0...
ef385fd4f2506371795c591cba22ee2f2578070c331cf7a19932d122e12ce096
slagyr/joodo
servlet_session.clj
(ns ^{:doc "This namespace holds functions that keep track of session information."} joodo.middleware.servlet-session) (defprotocol SessionContainer (entry-keys [this]) (set-entry [this key value]) (get-entry [this key]) (remove-entry [this key])) (defprotocol SessionSource (get-session [this])) (defn- e...
null
https://raw.githubusercontent.com/slagyr/joodo/e7edbc707a7901d1a1c5465382dd25db368f4596/joodo/src/joodo/middleware/servlet_session.clj
clojure
(ns ^{:doc "This namespace holds functions that keep track of session information."} joodo.middleware.servlet-session) (defprotocol SessionContainer (entry-keys [this]) (set-entry [this key value]) (get-entry [this key]) (remove-entry [this key])) (defprotocol SessionSource (get-session [this])) (defn- e...
1352503d22143e5ea9ed48c7ca12529dd3f01e0da76c71bfddfa58646e0fee61
WhatsApp/eqwalizer
otp_opaques.erl
Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved . %%% This source code is licensed under the Apache 2.0 license found in %%% the LICENSE file in the root directory of this source tree. -module(otp_opaques). -compile([export_all, nowarn_export_all]). -spec to_gb_set1([atom()]) -> gb...
null
https://raw.githubusercontent.com/WhatsApp/eqwalizer/8017d486c025eaa5c35ced1481ad5bad0f665efa/eqwalizer/test_projects/check/src/otp_opaques.erl
erlang
the LICENSE file in the root directory of this source tree. "Proper" version gb_set:empty() is unbound because it have an unbound type var Dialyzer ignores this opacity violation We skip unions in opacity checks.
Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved . This source code is licensed under the Apache 2.0 license found in -module(otp_opaques). -compile([export_all, nowarn_export_all]). -spec to_gb_set1([atom()]) -> gb_sets:set(atom()). to_gb_set1(Atoms) -> gb_sets:from_list(Atoms)...
93a50b26e5a050f7c6dbaabda96be02fb84084409e6596f62599b3c0c9a01c04
Relph1119/sicp-solutions-manual
p37-sum-integers.scm
;计算从a到b的各整数之和 (define (sum-integers a b) (if (> a b) 0 (+ a (sum-integers (+ a 1) b))))
null
https://raw.githubusercontent.com/Relph1119/sicp-solutions-manual/f2ff309a6c898376209c198030c70d6adfac1fc1/src/examples/ch01/p37-sum-integers.scm
scheme
计算从a到b的各整数之和
(define (sum-integers a b) (if (> a b) 0 (+ a (sum-integers (+ a 1) b))))
2c2902fe0fc322a9b7b7aa6dca281c799953ba0d28f7ab94f4c8d9c76dc8f244
coq/coq
retroknowledge.mli
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * *...
null
https://raw.githubusercontent.com/coq/coq/110921a449fcb830ec2a1cd07e3acc32319feae6/kernel/retroknowledge.mli
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team // * This file is distributed under the terms of the * (see LICENSE file for the text of the license) ************************************...
v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser Gener...
d78cfdaaa98e0d1ca9e3ca4e5d774a10929a99d6440544b192add229c6efa03c
OCamlPro/drom
main.ml
!{header-ml} open Js_of_ocaml let main () = Dom_html.window##alert (Js.string "hello, world") !{header-ml} let () = main ()
null
https://raw.githubusercontent.com/OCamlPro/drom/7bc86026e0e170f1a468b437d369aefc5dbea5d7/src/drom_lib/share/drom/skeletons/packages/js_program/main.ml
ocaml
!{header-ml} open Js_of_ocaml let main () = Dom_html.window##alert (Js.string "hello, world") !{header-ml} let () = main ()
660a691c91590f80a57e5f5ec0fd41963ffc014a774909b31621ae026a9c6681
runtimeverification/haskell-backend
DebugAttemptUnification.hs
# LANGUAGE NoStrict # # LANGUAGE NoStrictData # | Copyright : ( c ) Runtime Verification , 2020 - 2021 License : BSD-3 - Clause Copyright : (c) Runtime Verification, 2020-2021 License : BSD-3-Clause -} module Kore.Log.DebugAttemptUnification ( DebugAttemptUnification (..), debugAttemptUni...
null
https://raw.githubusercontent.com/runtimeverification/haskell-backend/559424aa4841449a0e83d7c555264d68b03cf475/kore/src/Kore/Log/DebugAttemptUnification.hs
haskell
# LANGUAGE NoStrict # # LANGUAGE NoStrictData # | Copyright : ( c ) Runtime Verification , 2020 - 2021 License : BSD-3 - Clause Copyright : (c) Runtime Verification, 2020-2021 License : BSD-3-Clause -} module Kore.Log.DebugAttemptUnification ( DebugAttemptUnification (..), debugAttemptUni...
881a732ae2e5f8d1a1f827f6d0f1d532662ecd92fd3c8fce25b2067baebb4c61
scarvalhojr/haskellbook
section15.15.8.hs
import Data.Monoid (Monoid, mappend, mempty) import Data.Semigroup newtype Mem s a = Mem { runMem :: s -> (a, s) } instance Monoid a => Monoid (Mem s a) where mempty = Mem (\x -> (mempty, x)) mappend (Mem f) (Mem g) = Mem (\x -> let (f1, x') = f x (g1, x'') = g x' ...
null
https://raw.githubusercontent.com/scarvalhojr/haskellbook/6016a5a78da3fc4a29f5ea68b239563895c448d5/chapter15/section15.15.8.hs
haskell
import Data.Monoid (Monoid, mappend, mempty) import Data.Semigroup newtype Mem s a = Mem { runMem :: s -> (a, s) } instance Monoid a => Monoid (Mem s a) where mempty = Mem (\x -> (mempty, x)) mappend (Mem f) (Mem g) = Mem (\x -> let (f1, x') = f x (g1, x'') = g x' ...
0148a14a82922e0c857b06b0a75a00b0743bf896165255896629e75b67ce5710
erlio/vmq_server
vmq_updo.erl
Copyright 2014 Erlio GmbH Basel Switzerland ( ) %% 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, sof...
null
https://raw.githubusercontent.com/erlio/vmq_server/d008c6dcc62fe985d08456caa4024750e1febf38/src/vmq_updo.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright 2014 Erlio GmbH Basel Switzerland ( ) Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(vmq_updo). -include_lib("sasl/src/systools.hrl"). -export([run/0, run/1, dry_run/0, dry_r...
7a9fa9ad6b928438c7ee23a42cd5c33a27509d804ab74aee6ffadde1cda1d8f8
MinaProtocol/mina
coinbase_fee_transfer_intf.ml
open Core_kernel open Mina_base_import module type Full = sig [%%versioned: module Stable : sig module V1 : sig type t = private { receiver_pk : Public_key.Compressed.Stable.V1.t ; fee : Currency.Fee.Stable.V1.t } [@@deriving sexp, compare, equal, yojson, hash] end end...
null
https://raw.githubusercontent.com/MinaProtocol/mina/97031e7e990a12b185114f9de7e522242a2316b2/src/lib/mina_base/coinbase_fee_transfer_intf.ml
ocaml
open Core_kernel open Mina_base_import module type Full = sig [%%versioned: module Stable : sig module V1 : sig type t = private { receiver_pk : Public_key.Compressed.Stable.V1.t ; fee : Currency.Fee.Stable.V1.t } [@@deriving sexp, compare, equal, yojson, hash] end end...
1a0bfcf5b4f2a30db78df1907b9944a8193fadd703d4631e4e08faa100aa7425
wdebeaum/step
installer.lisp
;;;; ;;;; W::installer ;;;; (define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::installer (SENSES ((LF-PARENT ONT::computer-software) ;computer-program) (EXAMPLE "Safari opens the installer for you") (meta-data :origin task-learning :entry-date 20050822 :change-date nil :comments nil) ...
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/installer.lisp
lisp
W::installer computer-program)
(define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::installer (SENSES (EXAMPLE "Safari opens the installer for you") (meta-data :origin task-learning :entry-date 20050822 :change-date nil :comments nil) ) ) ) ))
cafa290ae007e4ce41652e3f181d4426b30970a4b4e6f9f31697f5b8ad16018b
8treenet/xy_server
game_data_1.erl
@author ys @doc @todo Add description to . -module(game_data_1). -compile(export_all). %% ==================================================================== %% API functions %% ==================================================================== -export([]). get_actor_birth_sql(Name, ID , PName, Sex, VT)...
null
https://raw.githubusercontent.com/8treenet/xy_server/352679e01eb4a26433ccbec513fbd282307a33bd/src/data/game_data_1.erl
erlang
==================================================================== API functions ==================================================================== 创建角色的职业和性别
@author ys @doc @todo Add description to . -module(game_data_1). -compile(export_all). -export([]). get_actor_birth_sql(Name, ID , PName, Sex, VT) -> [Image, Head, Attack_min, Attack_Max, Mattack_min, Mattack_Max, Defense, Mdefense, Hit, Dodge, Crit, Batter,Attack_speed, {1, 1} -> [1...
aef57b8cb2513e264dff4d765857f139deb687a3d36615a1a2b2979fa3de2748
r0man/sqlingvo
delete_test.cljc
(ns sqlingvo.delete-test (:require #?(:clj [sqlingvo.test :refer [db sql=]] :cljs [sqlingvo.test :refer [db] :refer-macros [sql=]]) [clojure.test :refer [deftest is]] [sqlingvo.core :as sql])) (deftest test-delete-keyword-db (sql= (sql/delete :postgresql :films) ["DEL...
null
https://raw.githubusercontent.com/r0man/sqlingvo/1f13624ed60ec0866fe51311d92da73638708172/test/sqlingvo/delete_test.cljc
clojure
(ns sqlingvo.delete-test (:require #?(:clj [sqlingvo.test :refer [db sql=]] :cljs [sqlingvo.test :refer [db] :refer-macros [sql=]]) [clojure.test :refer [deftest is]] [sqlingvo.core :as sql])) (deftest test-delete-keyword-db (sql= (sql/delete :postgresql :films) ["DEL...
775e66279b2ab6d822616210b9dfc3baf425a2052e4c86182dae9aebc3b2d416
krestenkrab/hanoidb
gb_trees_ext.erl
-module(gb_trees_ext). -extends(gb_trees). -export([fold/3]). % author: -trees-fold-td2228614.html -spec fold(fun((term(), term(), term()) -> term()), term(), gb_trees:tree()) -> term(). fold(F, A, {_, T}) when is_function(F, 3) -> fold_1(F, A, T). fold_1(F, Acc0, {Key, Value, Small, Big}) -> Acc1 = fold_...
null
https://raw.githubusercontent.com/krestenkrab/hanoidb/68333fa51a6fdf27834fc84f42d4421f9627e3b7/src/gb_trees_ext.erl
erlang
author: -trees-fold-td2228614.html
-module(gb_trees_ext). -extends(gb_trees). -export([fold/3]). -spec fold(fun((term(), term(), term()) -> term()), term(), gb_trees:tree()) -> term(). fold(F, A, {_, T}) when is_function(F, 3) -> fold_1(F, A, T). fold_1(F, Acc0, {Key, Value, Small, Big}) -> Acc1 = fold_1(F, Acc0, Small), Acc = F(Key, V...
77454879866972cafd7bf685d0650687d4bc7c7f1098c34ff15f84a289b4a1a6
andreas/ppx_graphql
test.ml
let () = Alcotest.run "ppx_graphql" [ "parsing", Parsing_test.suite; "variables", Variables_test.suite; "integration", Integration_test.suite; ]
null
https://raw.githubusercontent.com/andreas/ppx_graphql/2d185501ce812a241ce3a8bb42b3a531a3366eee/test/test.ml
ocaml
let () = Alcotest.run "ppx_graphql" [ "parsing", Parsing_test.suite; "variables", Variables_test.suite; "integration", Integration_test.suite; ]
40e63478b0cc97c842e81f5baca444ac13572140636cf80e16d29c0723e45b07
reiddraper/knockbox
registers.clj
;; ------------------------------------------------------------------- Copyright ( c ) 2011 Basho Technologies , 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 in compliance with the License . You may obtai...
null
https://raw.githubusercontent.com/reiddraper/knockbox/ed22221759d0d3dbe4f1b1f83355e95e945de729/src/knockbox/registers.clj
clojure
------------------------------------------------------------------- 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 permission...
Copyright ( c ) 2011 Basho Technologies , 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 IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY (ns kno...
cdd5d21ee3b0414d4dc7ef84c44d5a0fd371db108909cbccb1901d5b331a0836
typelead/etlas
Check.hs
----------------------------------------------------------------------------- -- | -- Module : Distribution.PackageDescription.Check Copyright : 2008 -- License : BSD3 -- -- Maintainer : -- Portability : portable -- This has code for checking for various problems in packages . There is one s...
null
https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas-cabal/Distribution/PackageDescription/Check.hs
haskell
--------------------------------------------------------------------------- | Module : Distribution.PackageDescription.Check License : BSD3 Maintainer : Portability : portable another set of checks that also looks at files in the package. Some of the checks are basic sanity checks, others are po...
Copyright : 2008 This has code for checking for various problems in packages . There is one set of checks that just looks at a ' PackageDescription ' in isolation and module Distribution.PackageDescription.Check ( PackageCheck(..), checkPackage, checkConfiguredPackage, che...
5db32ae88c5424e02e20ac450c7568bded01f3a43d79e842b5d0438686b5cca4
dmitryvk/sbcl-win32-threads
describe.lisp
the DESCRIBE system This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. The software is in the public domain and is ;;;; provide...
null
https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/code/describe.lisp
lisp
more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. SB-IMPL, not SB!IMPL, since we're built in warm load. Prints X on a single line, limiting output length by *PRINT-RIGHT-MARGIN* -- good for p...
the DESCRIBE system This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB-IMPL") Utils , move elsewhere . (defun class-name-or-class (class) (let ((name (c...
bca591eeaa41792c1c535a2d13e69fc5ca92d1696bf56efc7e39c0fb3f55b545
racket/plot
decoration.rkt
#lang typed/racket/base ;; Renderers for plot decorations: axes, grids, labeled points, etc. (require typed/racket/class typed/racket/draw racket/match racket/math racket/list typed/pict plot/utils "../common/type-doc.rkt" "../common/utils.rkt" "clip.rkt" "plot-area.rkt") ...
null
https://raw.githubusercontent.com/racket/plot/c4126001f2c609e36c3aa12f300e9c673ab1a806/plot-lib/plot/private/plot2d/decoration.rkt
racket
Renderers for plot decorations: axes, grids, labeled points, etc. =================================================================================================== X and Y axes --------------------------------------------------------------------------------------------------- ====================================...
#lang typed/racket/base (require typed/racket/class typed/racket/draw racket/match racket/math racket/list typed/pict plot/utils "../common/type-doc.rkt" "../common/utils.rkt" "clip.rkt" "plot-area.rkt") (provide (except-out (all-defined-out) draw-polar-axis-lines draw-po...
d002c3774bb40fb06652c8444f2d4579af07c4169100603284ea814b1dfa19dd
simongray/datalinguist
datalinguist.clj
(ns dk.simongray.test.datalinguist (:require [clojure.test :refer :all] [dk.simongray.datalinguist :refer :all] [dk.simongray.datalinguist.dependency :refer :all]) (:import [edu.stanford.nlp.ling IndexedWord])) (def en-nlp (delay (->pipeline {:annotators ["truecase" ; TrueCa...
null
https://raw.githubusercontent.com/simongray/datalinguist/9869884d7019e7102efffcb0de66187e9cb126c5/test/dk/simongray/test/datalinguist.clj
clojure
TrueCaseAnnotation required by "quote" "kbp" ; KBPTriplesAnnotation Fetches the text annotation as a full string at the document level. TODO: :token, :index styles The :quote index just IDs the quotations in order (from 0). Fetches the quote index at the token level instead. TODO: nothing here - ...
(ns dk.simongray.test.datalinguist (:require [clojure.test :refer :all] [dk.simongray.datalinguist :refer :all] [dk.simongray.datalinguist.dependency :refer :all]) (:import [edu.stanford.nlp.ling IndexedWord])) (def en-nlp QuotationsAnnotation MentionsAnnotation TreeAnnotation ...
21c00845fba5ad82630e5effd3627452660c931cec4dd5e8a9036eb82998fcd7
TrustInSoft/tis-interpreter
descr.mli
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/libraries/datatype/descr.mli
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2015 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
39eaa568eb2cae199bd236ff542123f867b456003ec4ca552d3baec44ffe7312
mbj/stratosphere
SingleHeaderProperty.hs
module Stratosphere.WAFv2.RuleGroup.SingleHeaderProperty ( SingleHeaderProperty(..), mkSingleHeaderProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data SingleHe...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/wafv2/gen/Stratosphere/WAFv2/RuleGroup/SingleHeaderProperty.hs
haskell
module Stratosphere.WAFv2.RuleGroup.SingleHeaderProperty ( SingleHeaderProperty(..), mkSingleHeaderProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data SingleHe...
99ce5e2a50c20aefee4d54aea24d63f8a23529cb614016e89d9204b7941a2554
input-output-hk/marlowe-cardano
Main.hs
{-# LANGUAGE GADTs #-} module Main where import Cardano.Api (CardanoMode, ConsensusModeParams(..), EpochSlots(..), LocalNodeConnectInfo(..)) import qualified Cardano.Api as Cardano import Cardano.Api.Byron (toByronRequiresNetworkMagic) import qualified Cardano.Chain.Genesis as Byron import Cardano.Crypto (abstractH...
null
https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/4b652fbaeafdea9a6b499a695db86e621813a23f/marlowe-chain-sync/marlowe-chain-indexer/Main.hs
haskell
# LANGUAGE GADTs # FIXME read from config - what is the appropriate value?
module Main where import Cardano.Api (CardanoMode, ConsensusModeParams(..), EpochSlots(..), LocalNodeConnectInfo(..)) import qualified Cardano.Api as Cardano import Cardano.Api.Byron (toByronRequiresNetworkMagic) import qualified Cardano.Chain.Genesis as Byron import Cardano.Crypto (abstractHashToBytes, decodeAbstr...
8bc7d56fd3e6d4c6507b46599fedc1d3fb4576ddc16b37f3cde5227374510ea9
MLstate/opalang
jsPackage.ml
Copyright © 2011 , 2012 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be us...
null
https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/jslang/jsPackage.ml
ocaml
Copyright © 2011 , 2012 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be us...
8c86bf8978c2ba893b17ff01b8d4eea27720a47832387d04050c43d338024f0b
matterandvoid-space/todomvc-fulcro-subscriptions
resolvers.clj
(ns space.matterandvoid.todomvc.todo.resolvers (:require [com.wsscode.pathom3.connect.operation :as pco :refer [defresolver]] [space.matterandvoid.todomvc.todo.subscriptions :as todo.subs] [space.matterandvoid.todomvc.todo.model :as todo.model] [taoensso.timbre :as log])) (defresolver get-todos [{:ke...
null
https://raw.githubusercontent.com/matterandvoid-space/todomvc-fulcro-subscriptions/e2e244936efe1005fa2cac204a24758b067aac4e/src/main/space/matterandvoid/todomvc/todo/resolvers.clj
clojure
(ns space.matterandvoid.todomvc.todo.resolvers (:require [com.wsscode.pathom3.connect.operation :as pco :refer [defresolver]] [space.matterandvoid.todomvc.todo.subscriptions :as todo.subs] [space.matterandvoid.todomvc.todo.model :as todo.model] [taoensso.timbre :as log])) (defresolver get-todos [{:ke...
38c24a1a52bd5047bfe402bfbadbfc41b445661a230d3bf5d2f7faa3e4759e68
crategus/cl-cffi-gtk
gtk.dialog.lisp
;;; ---------------------------------------------------------------------------- gtk.dialog.lisp ;;; ;;; The documentation of this file is taken from the GTK 3 Reference Manual Version 3.24 and modified to document the Lisp binding to the GTK library . ;;; See <>. The API documentation of the Lisp binding is avai...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/ba198f7d29cb06de1e8965e1b8a78522d5430516/gtk/gtk.dialog.lisp
lisp
---------------------------------------------------------------------------- The documentation of this file is taken from the GTK 3 Reference Manual See <>. The API documentation of the Lisp binding is This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser Gene...
gtk.dialog.lisp Version 3.24 and modified to document the Lisp binding to the GTK library . available from < -cffi-gtk/ > . Copyright ( C ) 2009 - 2011 Copyright ( C ) 2011 - 2021 as published by the Free Software Foundation , either version 3 of the the GNU Lesser General Public License that clarifie...
3a4904ba06a89a208f6be24e395bcb5bfee50ceabd66a52fd62c36f823023b2a
facebook/flow
path_matcher.mli
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/common/path_matcher.mli
ocaml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
931fc33df62ac9a29c91eb0b87b6aa58042c78b45776bfd267367dc95e1b13a0
OCamlPro/ocp-build
ocpUnix.ml
(**************************************************************************) (* *) (* Typerex Libraries *) (* *) Copyrigh...
null
https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/libs/ocplib-system/ocpUnix.ml
ocaml
************************************************************************ Typerex Libraries ...
Copyright 2011 - 2017 OCamlPro SAS the GNU Lesser General Public License version 2.1 , with the open MinUnix let assoc_of_env env = let el = Array.to_list env in let el = List.map (fun s -> OcpString.splitn 2 s '=') el in List.map (function [k] -> (k, "") |...
308ebf272ad63da6a46b50204213cc07ea38345c712b552cb683b9f6a698d2a4
aaronc/fx-clj
example1.clj
(ns fx-clj.example1 (:require [fx-clj.core :as fx])) (defn create-view [] (fx/h-box (fx/button {:on-action (fn [e] (println "Hello World!")) :text "Click Me!"}))) (fx/sandbox #'create-view) ;; Creates a "sandbox" JavaFX window to ;; show the view. Clicking F5 in this ;; window will ref...
null
https://raw.githubusercontent.com/aaronc/fx-clj/29639356d8d1253438ecf61e123caacefa9269ec/test/fx_clj/example1.clj
clojure
Creates a "sandbox" JavaFX window to show the view. Clicking F5 in this window will refresh the view allowing the create-view function to be updated at the REPL
(ns fx-clj.example1 (:require [fx-clj.core :as fx])) (defn create-view [] (fx/h-box (fx/button {:on-action (fn [e] (println "Hello World!")) :text "Click Me!"})))
1b77b6dc0a09e6a139f26f3a7003924d73214e096672313264f5260ac331d76e
dm3/sicp
e2_30_31_32.clj
(ns e2-30-31-32 (:use clojure.test) (:use [clojure.contrib.generic.math-functions :only (sqr)])) (defn leaf? [t] (not (sequential? t))) 2.30 (defn square-tree [t] (map (fn [sub-t] (if (leaf? sub-t) (* sub-t sub-t) (square-tree sub-t))) t)) (defn square-tree-look-ma-no-map [t] ...
null
https://raw.githubusercontent.com/dm3/sicp/14f0361cbd0cce817d93e38dcc895f3e845515b1/src/main/clojure/e2_30_31_32.clj
clojure
Here we need to write an fmap for a Tree functor. than making a working program. Everyone knows that (well, except for those verification nerds who prove their programs before actually coding them up). We need to fill the function definition for the function which will map over the tail of the list. which is a...
(ns e2-30-31-32 (:use clojure.test) (:use [clojure.contrib.generic.math-functions :only (sqr)])) (defn leaf? [t] (not (sequential? t))) 2.30 (defn square-tree [t] (map (fn [sub-t] (if (leaf? sub-t) (* sub-t sub-t) (square-tree sub-t))) t)) (defn square-tree-look-ma-no-map [t] ...
79f84efa6a8d31a1ef750cefdcdf2b989430be0f762505eed1fd38ae360d51d8
ghosthamlet/algorithm-data-structure
hanoi_tower.clj
(ns algorithm-data-structure.algorithms.uncategorized.hanoi-tower (:require [algorithm-data-structure.data-structures.stack :as s])) (defn hanoi-tower-recursive [& {:keys [number-of-discs from-pole with-pole ...
null
https://raw.githubusercontent.com/ghosthamlet/algorithm-data-structure/017f41a79d8b1d62ff5a6cceffa1b0f0ad3ead6b/src/algorithm_data_structure/algorithms/uncategorized/hanoi_tower.clj
clojure
(ns algorithm-data-structure.algorithms.uncategorized.hanoi-tower (:require [algorithm-data-structure.data-structures.stack :as s])) (defn hanoi-tower-recursive [& {:keys [number-of-discs from-pole with-pole ...
46767943f30ed9eb5cabc2c4503707d6f2d8ba877ec8db2cbd7e497611566221
smashingboxes/fraqture
turtle.clj
(ns fraqture.turtle (:require [quil.core :as q])) (defn build [x y] (atom { :x x :y y :angle 0 :pen-down true :stack nil })) (defn move [turtle distance] (let [t @turtle x (:x t) y (:y t) rads (q/radians (:angle t)) new...
null
https://raw.githubusercontent.com/smashingboxes/fraqture/8971564a075b8f38729f382906cc8f39a18d87eb/src/fraqture/turtle.clj
clojure
(ns fraqture.turtle (:require [quil.core :as q])) (defn build [x y] (atom { :x x :y y :angle 0 :pen-down true :stack nil })) (defn move [turtle distance] (let [t @turtle x (:x t) y (:y t) rads (q/radians (:angle t)) new...
e087a212fcd79c369fe6d619ba7c608757095293684b7e180dbb41e496cc1fe0
Ericson2314/lighthouse
Polygons.hs
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.Polygons Copyright : ( c ) 2002 - 2006 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : -- Stability : stable -- Portability : porta...
null
https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/OpenGL/Graphics/Rendering/OpenGL/GL/Polygons.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.Rendering.OpenGL.GL.Polygons License : BSD-style (see the file libraries/OpenGL/LICENSE) Maintainer : Stability : stable Portability : portable -------------------------------------------------...
Copyright : ( c ) 2002 - 2006 This module corresponds to section 3.5 ( Polygons ) of the OpenGL 2.1 specs . module Graphics.Rendering.OpenGL.GL.Polygons ( polygonSmooth, cullFace, PolygonStipple(..), GLpolygonstipple, polygonStipple, PolygonMode(..), polygonMode, polygonOffset, polygonOffsetPoin...
0e52f72cd09136317f58011c2b6de4d2c456466ea770251a4d0f113222be7c6a
day8/re-frame-debux
dbgn_test.clj
(ns day8.re-frame.debux.dbgn-test (:require [clojure.test :refer [use-fixtures deftest is]] [day8.re-frame.debux.common.util :as ut] [day8.re-frame.debux.dbgn :as dbgn :refer [dbgn mini-dbgn]])) (def traces (atom [])) (def form (atom nil)) (use-fixtures :each (fn [f] (w...
null
https://raw.githubusercontent.com/day8/re-frame-debux/382b8dc98bb7cd205abd8b8f5f7e2075ebb82c56/test/day8/re_frame/debux/dbgn_test.clj
clojure
See Commented out as we no longer print the traces, we need to get the traced data instead. Old result #_'(clojure.core/let [] (debux.common.util/spy-first (assoc (debux.common.util/spy-first (quote {})) :a 3)) (quote ...
(ns day8.re-frame.debux.dbgn-test (:require [clojure.test :refer [use-fixtures deftest is]] [day8.re-frame.debux.common.util :as ut] [day8.re-frame.debux.dbgn :as dbgn :refer [dbgn mini-dbgn]])) (def traces (atom [])) (def form (atom nil)) (use-fixtures :each (fn [f] (w...
4030a7274a642266387d9422c5a1cba3444445a7d47457031bc0367a833bdefc
janestreet/memtrace_viewer_with_deps
test_md5.ml
open Core_kernel open Expect_test_helpers_core open Md5 let%expect_test "digest_bin_prot" = let test (type t) (t : t) (module M : Binable.S with type t = t) = print_s [%sexp (digest_bin_prot M.bin_writer_t t : Md5.t)] in test () (module Unit); test 1337 (module Int); [%expect {| 93b885adfe0da089c...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/core_kernel/test/src/test_md5.ml
ocaml
open Core_kernel open Expect_test_helpers_core open Md5 let%expect_test "digest_bin_prot" = let test (type t) (t : t) (module M : Binable.S with type t = t) = print_s [%sexp (digest_bin_prot M.bin_writer_t t : Md5.t)] in test () (module Unit); test 1337 (module Int); [%expect {| 93b885adfe0da089c...
4d5bc7b3f5a0dd23dc84acc45bdbc889e10296babeb28af451a4da89c3567d41
huiqing/percept2
percept2_orbit.erl
-module(percept2_orbit). -compile(export_all). %%command to run the the sd-orbit benchmark and trace message sending. run_orbit_with_trace(N) -> Nodes=[list_to_atom("node"++integer_to_list(I)++"@127.0.0.1") ||I<-lists:seq(1,N)], percept2_dist:start(Nodes, {init_bench, main, [Nodes]}, new,...
null
https://raw.githubusercontent.com/huiqing/percept2/fa796a730d6727210a71f185e6a39a960c2dcb90/src/percept2_orbit.erl
erlang
command to run the the sd-orbit benchmark and trace message sending. percept2_orbit:percept2_orbit:run_orbit_with_trace(15). percept2_orbit:analyze_orbit_data(15). How to use: N: number of nodes. run_oribit_with_trace if the nodes are named in a different way. To profile: percept2_multi_node_trace:run...
-module(percept2_orbit). -compile(export_all). run_orbit_with_trace(N) -> Nodes=[list_to_atom("node"++integer_to_list(I)++"@127.0.0.1") ||I<-lists:seq(1,N)], percept2_dist:start(Nodes, {init_bench, main, [Nodes]}, new, [send], []). analyze_orbit_data(N) -> Files=[list_to_atom("node...
921827193e7e2c643a9aff4abacfc85db403b962044020fd3729397c3342b757
4clojure/4clojure
users.clj
(ns foreclojure.test.users (:use [foreclojure.users]) (:use [clojure.test]) (:use [midje.sweet]) (:use [somnium.congomongo :only [update!]])) (def users [{:user "user1", :solved [1 2 3 4] :rank 1} {:user "user2", :solved [1 2 3] :rank 2} {:user "user3", :solved [1 2] :rank 3} ...
null
https://raw.githubusercontent.com/4clojure/4clojure/25dec057d9d6871ce52aee9e2c3de7efdab14373/test/foreclojure/test/users.clj
clojure
(ns foreclojure.test.users (:use [foreclojure.users]) (:use [clojure.test]) (:use [midje.sweet]) (:use [somnium.congomongo :only [update!]])) (def users [{:user "user1", :solved [1 2 3 4] :rank 1} {:user "user2", :solved [1 2 3] :rank 2} {:user "user3", :solved [1 2] :rank 3} ...
5c96e3785fac254c952cedcf93e7eabbd4f30d352e14dd15e41449d59cf6856c
dbuenzli/tgls
trigl3.ml
Minimal Tgl3 example . This code is in the public domain . Draws a fantastic tri - colored triangle . Compile with : ocamlfind ocamlc -linkpkg -package result , tsdl , tgls.tgl3 -o trigl3.byte trigl3.ml ocamlfind ocamlopt -linkpkg -package result , tsdl , tgls.tgl3 -o trigl3.native \ ...
null
https://raw.githubusercontent.com/dbuenzli/tgls/58bf47d393da00f24fa8e58521ddb9e3afb08d1d/test/trigl3.ml
ocaml
Helper functions. Shaders OpenGL setup Window and OpenGL context Event loop Main
Minimal Tgl3 example . This code is in the public domain . Draws a fantastic tri - colored triangle . Compile with : ocamlfind ocamlc -linkpkg -package result , tsdl , tgls.tgl3 -o trigl3.byte trigl3.ml ocamlfind ocamlopt -linkpkg -package result , tsdl , tgls.tgl3 -o trigl3.native \ ...
d23e2b112faebedb4e853c36b9a37eb209f9748f29cd1b675e8bd9c294aeff6f
yuriy-chumak/ol
case-apply.scm
(import (otus case-apply)) (define (f0) (cons "0" 0)) (define (f1 x) (cons "2" (* x 2))) (define (f2 x y) (cons "3" (+ x y))) (define (test f) (case-apply f '(1 . (1)) '(2 . (7 2)))) (print "test arity 0 function: " (test f0)) (print "test arity 1 function: " (test f1)) (print "test arity 2 f...
null
https://raw.githubusercontent.com/yuriy-chumak/ol/ca7cffc1c236235ae8e017a6199730b14821a86b/tests/case-apply.scm
scheme
(import (otus case-apply)) (define (f0) (cons "0" 0)) (define (f1 x) (cons "2" (* x 2))) (define (f2 x y) (cons "3" (+ x y))) (define (test f) (case-apply f '(1 . (1)) '(2 . (7 2)))) (print "test arity 0 function: " (test f0)) (print "test arity 1 function: " (test f1)) (print "test arity 2 f...
9c856ac396d6bb5252c79f1ca2215ce02001df1a4d3fa980c2cd4a6e51ef691d
acl2/acl2
sbvmoddown@useless-runes.lsp
(SBVMODDOWN (4 4 (:TYPE-PRESCRIPTION NONNEG-OF-MOD-TYPE-2)) (4 4 (:TYPE-PRESCRIPTION NONNEG-OF-MOD-TYPE)) ) (SBVMODDOWN-OF-1 (243 1 (:REWRITE MOD-WHEN-<-OF-0)) (149 6 (:REWRITE LOGEXT-WHEN-NON-NEGATIVE-BECOMES-BVCHOP)) (84 4 (:REWRITE BVCHOP-IDENTITY)) (60 2 (:LINEAR <-OF-LOGEXT-LINEAR-LOWER)) (59 2 (:LINEAR <=...
null
https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/bv/.sys/sbvmoddown%40useless-runes.lsp
lisp
(SBVMODDOWN (4 4 (:TYPE-PRESCRIPTION NONNEG-OF-MOD-TYPE-2)) (4 4 (:TYPE-PRESCRIPTION NONNEG-OF-MOD-TYPE)) ) (SBVMODDOWN-OF-1 (243 1 (:REWRITE MOD-WHEN-<-OF-0)) (149 6 (:REWRITE LOGEXT-WHEN-NON-NEGATIVE-BECOMES-BVCHOP)) (84 4 (:REWRITE BVCHOP-IDENTITY)) (60 2 (:LINEAR <-OF-LOGEXT-LINEAR-LOWER)) (59 2 (:LINEAR <=...
cfc346c0dfa898b497cc47d56557db823ea46ea8d2ddfe68786b008e69554d71
wargrey/w3s
image.rkt
#lang typed/racket/base (provide (all-defined-out) <css-image>) (provide (all-from-out bitmap/base)) (require racket/symbol) (require bitmap/base) (require bitmap/constructor) (require bitmap/color) (require "digitama/syntax/digicore.rkt") (require "digitama/syntax/dimension.rkt") (require "digitama/image.rkt") (re...
null
https://raw.githubusercontent.com/wargrey/w3s/9a716932d946a51a1105c8913f3c532eb99c823b/css/image.rkt
racket
TODO: deal with the default resolution -images/#image-processing
#lang typed/racket/base (provide (all-defined-out) <css-image>) (provide (all-from-out bitmap/base)) (require racket/symbol) (require bitmap/base) (require bitmap/constructor) (require bitmap/color) (require "digitama/syntax/digicore.rkt") (require "digitama/syntax/dimension.rkt") (require "digitama/image.rkt") (re...
9671e18c62a5dfbbf45234780d6b7ee4e3e8709f3879b6577221c356982f74a9
imrehg/ypsilon
process.scm
#!nobacktrace Ypsilon Scheme System Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited . See license.txt for terms and conditions of use . (library (ypsilon process) (export process process-spawn process-shell-command process-wait call-with-process-ports ...
null
https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/process.scm
scheme
[end]
#!nobacktrace Ypsilon Scheme System Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited . See license.txt for terms and conditions of use . (library (ypsilon process) (export process process-spawn process-shell-command process-wait call-with-process-ports ...
fae9af75774c48666f40914a90425ac138e003ccf66b839e7b14749817f540a9
LadyBoonami/wsedit
Util.hs
# LANGUAGE DeriveFunctor , LambdaCase # , LambdaCase #-} module WSEdit.Util ( withPair , withFst , withSnd , withPairM , withFstM , withSndM , padLeft , padRight , withN , insertBefore , delN , rotateL , rotateR , c...
null
https://raw.githubusercontent.com/LadyBoonami/wsedit/e836b81b743123df2fa21470072ccd5ee1083ee4/src/WSEdit/Util.hs
haskell
| Applies a separate function to each member of a pair. | Applies a separate monadic function to each member of a pair. | Pads a list to the left, using the given element. | Pads a list to the right, using the given element. | Applies a function to the n-th element of a list. | Inserts an element before the speci...
# LANGUAGE DeriveFunctor , LambdaCase # , LambdaCase #-} module WSEdit.Util ( withPair , withFst , withSnd , withPairM , withFstM , withSndM , padLeft , padRight , withN , insertBefore , delN , rotateL , rotateR , c...
b3cd1806206f545e7b5cd8e04595145fcea18e5e5d974a03ebd8a31f6a5e5430
ajkavanagh/vimwiki-publishing-system
PageContexts.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE ExtendedDefaultRules #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE GADTs # {-# LANGUAGE LambdaCase #-} # LANGUAGE OverloadedStrings # # LANGUAGE PolyKinds # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE Scop...
null
https://raw.githubusercontent.com/ajkavanagh/vimwiki-publishing-system/c358ea03bcdb576ce4a7a4e42ac38ba5e1816c7b/src/Lib/Context/PageContexts.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE ExtendedDefaultRules # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # # LANGUAGE ConstraintKinds # the permalink is an override over the r...
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE PolyKinds # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE AllowAmbiguousTypes # needed for the instance ToG...
b90ad76bab4caa3d42165ca7570fa969ce155394660b46e4bc6d44e80bdb7c20
janestreet/core
info_intf.ml
open! Import (** Extension to the base signature *) module type Extension = sig type t [@@deriving bin_io] module Stable : sig (** [Info.t] is wire-compatible with [V2.t], but not [V1.t]. [V1] bin-prots a sexp of the underlying message, whereas [V2] bin-prots the underlying message. *) module V1 ...
null
https://raw.githubusercontent.com/janestreet/core/f382131ccdcb4a8cd21ebf9a49fa42dcf8183de6/core/src/info_intf.ml
ocaml
* Extension to the base signature * [Info.t] is wire-compatible with [V2.t], but not [V1.t]. [V1] bin-prots a sexp of the underlying message, whereas [V2] bin-prots the underlying message.
open! Import module type Extension = sig type t [@@deriving bin_io] module Stable : sig module V1 : Stable_module_types.With_stable_witness.S0 with type t = t module V2 : sig type nonrec t = t [@@deriving hash, sexp_grammar] include Stable_module_types.With_stable_witness.S0 with type t := t...
e882164c9bca961ec0d059038bf79c44e02ea4c47e0e4377da1005b04e678159
camlp5/camlp5
pconfig.ml
let ast_impl_magic_number = "Caml1999M026" let ast_intf_magic_number = "Caml1999N026"
null
https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/ocaml_stuff/4.09.1/utils/pconfig.ml
ocaml
let ast_impl_magic_number = "Caml1999M026" let ast_intf_magic_number = "Caml1999N026"
8103d6681ac6534c7616e9d1bb94b89c5dec50fcf35031d8daaf0d82495c3fcf
mzp/coq-ide-for-ios
xmlcommand.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/plugins/xml/xmlcommand.ml
ocaml
********************************************************************** ********************************************************************** This file is distributed under the terms of the ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // * The HELM Proje...
80c21364d92422b25318bf6ef70444b93eaeab9d7057193f9a511d150f6366d7
ghc/packages-Cabal
Main.hs
module Main where import qualified PDupe import qualified QDupe main = putStrLn (PDupe.pkg ++ " " ++ QDupe.pkg)
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/Ambiguity/reexport-test/Main.hs
haskell
module Main where import qualified PDupe import qualified QDupe main = putStrLn (PDupe.pkg ++ " " ++ QDupe.pkg)
dd1c5018962bb4727662025d41b41fc614c5e07aa80571663e6e80bad9738806
ekmett/ersatz
BitChar.hs
# LANGUAGE TypeFamilies # -------------------------------------------------------------------- -- | Copyright : © 2010 - 2014 -- License : BSD3 Maintainer : < > -- Stability : experimental -- Portability: non-portable -- -------------------------------------------------------------------- module Ersatz...
null
https://raw.githubusercontent.com/ekmett/ersatz/2218d30818141957957b1533118dd34bd60df245/src/Ersatz/BitChar.hs
haskell
------------------------------------------------------------------ | License : BSD3 Stability : experimental Portability: non-portable ------------------------------------------------------------------ | List of 'BitChar' intended to be used as the representation for 'String'. Char upperbound is 0x10ffff, so...
# LANGUAGE TypeFamilies # Copyright : © 2010 - 2014 Maintainer : < > module Ersatz.BitChar where import Data.Char (chr,ord) import Control.Monad (replicateM) import Prelude hiding ((&&)) import Ersatz.Bit import Ersatz.Bits import Ersatz.Codec import Ersatz.Equatable import Ersatz.Orderable import Ersatz...
89c972e1ffb8e77322e5b97fb9c1559082213428ac6ad3cf5bda97757146e588
lisp-mirror/clpm
dependencies-license-op.lisp
;;;; License Operations ;;;; This software is part of CLPM . See README.org for more information . See ;;;; LICENSE for license information. (in-package #:clpm-asdf) (ops:define-build-op bundled-licenses-file-op (asdf:selfward-operation) ()) (defmethod asdf:selfward-operation ((o bundled-licenses-file-op)) (op...
null
https://raw.githubusercontent.com/lisp-mirror/clpm/ad9a704fcdd0df5ce30ead106706ab6cc5fb3e5b/clpm-asdf/dependencies-license-op.lisp
lisp
License Operations LICENSE for license information. Covered by the ASDF project. Covered by clpm-multi-http-client Covered by fare-quasiquote Covered by trivia
This software is part of CLPM . See README.org for more information . See (in-package #:clpm-asdf) (ops:define-build-op bundled-licenses-file-op (asdf:selfward-operation) ()) (defmethod asdf:selfward-operation ((o bundled-licenses-file-op)) (ops:matching-variant-of o 'ops:program-system-list-op)) (defmethod o...
4ec6873e4b8baf7657f18fc7a55ed2cc0f18192dfc072f6c64b6144c2051320f
Elzair/nazghul
arena.scm
Test the In ( clone ) spell using a scroll . ;; Setup a place with the player and two other npcs and several scrolls in posession . The npcs should have immobile ai 's so they stay put . One npc ;; should be just in range and the other just out of range. Have the player ai use the scroll on itself first . It ...
null
https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.002/test/arena.scm
scheme
should be just in range and the other just out of range. Have the player ai player ai use the scroll on the npc in range and validate its clone. Finally it should use the scroll on the npc out of range and verify that no clone exists. Validating a clone means checking that a) it has the same equipment as the or...
Test the In ( clone ) spell using a scroll . Setup a place with the player and two other npcs and several scrolls in posession . The npcs should have immobile ai 's so they stay put . One npc use the scroll on itself first . It should validate the clone . Then have the (if (not (defined? 'include-sun)) (...
423840d5c7c7bc25f2a424458f3439935bf72d3ae2c5ed7d141fa3ad2b83f73d
komolovf/redux-cljs
store.cljs
(ns thdr.redux-cljs.store "Main API for creating and using Redux-cljs" (:require [cljs.core.async :as async :refer [<! >!]]) (:require-macros [cljs.core.async.macros :refer [go go-loop]])) (defprotocol IReduxStore (get-state [this] "Returns a state atom") (subscribe [this] "Creates a go-loop which r...
null
https://raw.githubusercontent.com/komolovf/redux-cljs/a911f9bfc4f804bd61877f47086eaf890259e573/src/cljs/thdr/redux_cljs/store.cljs
clojure
todo: validate action shape match action and update state
(ns thdr.redux-cljs.store "Main API for creating and using Redux-cljs" (:require [cljs.core.async :as async :refer [<! >!]]) (:require-macros [cljs.core.async.macros :refer [go go-loop]])) (defprotocol IReduxStore (get-state [this] "Returns a state atom") (subscribe [this] "Creates a go-loop which r...
c35545a4e2514d7d42b1d47ab98ad001550b36fd0aae7ed57a742f8a97e8ab62
microsoft/same-ish
slow_test.cljc
Copyright ( c ) Microsoft Corporation . All rights reserved . Licensed under the MIT License . (ns same.slow-test (:require [clojure.data :as data] [clojure.test :refer [is testing deftest]] [same :refer [ish?]] [same.diff :as sd] [same.test-helpers :refer [about]])...
null
https://raw.githubusercontent.com/microsoft/same-ish/bc2713c5efafc66bd7a77bee2bbd907f2242480c/test/same/slow_test.cljc
clojure
test that `=`, `==`, `ish?` and `diff` are consistent for various types/values same-ish, should not be diff not same-ish, should be some diff shouldn't be equal either when equal, should also be same-ish test that our diff behaves the same as clojure.data/diff for non-floats
Copyright ( c ) Microsoft Corporation . All rights reserved . Licensed under the MIT License . (ns same.slow-test (:require [clojure.data :as data] [clojure.test :refer [is testing deftest]] [same :refer [ish?]] [same.diff :as sd] [same.test-helpers :refer [about]])...
f6963910f278e524ae49d30b0c6742647fe857e61017f2943dc3bc393d29824f
satos---jp/mincaml_self_hosting
assoc.ml
open Knorm open Main_option let rec assoc_base ast = let reccall = assoc_base in match ast with | KLet(na,e1,e2) -> ( match e1 with | KLet(nb,be1,be2) -> reccall (KLet(nb,be1,KLet(na,be2,e2))) | KLetTuple(vs,nb,be1) -> KLetTuple(vs,nb,reccall (KLet(na,be1,e2))) | _ -> KLet(na,reccall e1,reccall e2) )...
null
https://raw.githubusercontent.com/satos---jp/mincaml_self_hosting/5fdf8b5083437d7607a924142eea52d9b1de0439/src/compiler/assoc.ml
ocaml
open Knorm open Main_option let rec assoc_base ast = let reccall = assoc_base in match ast with | KLet(na,e1,e2) -> ( match e1 with | KLet(nb,be1,be2) -> reccall (KLet(nb,be1,KLet(na,be2,e2))) | KLetTuple(vs,nb,be1) -> KLetTuple(vs,nb,reccall (KLet(na,be1,e2))) | _ -> KLet(na,reccall e1,reccall e2) )...
e0c955f092b04d80e43f69aad1171bdc9e7a1de9ac2496d9462dee1ff40a9944
tfeb/tfeb-lisp-toys
ncase.lisp
;;;; NCASE - optimise CASE to a jump table $ Id$ ;;; This is an example of using macros to do some fairly low-level ;;; optimisation. NCASE is like CASE, but in suitable cases it will ;;; compile a jump-table instead of lots of tests. This is actually ;;; not a really good example because the compiler is likely to...
null
https://raw.githubusercontent.com/tfeb/tfeb-lisp-toys/a99d01995e794aeaee2742eda3644f45cad1f346/ncase.lisp
lisp
NCASE - optimise CASE to a jump table This is an example of using macros to do some fairly low-level optimisation. NCASE is like CASE, but in suitable cases it will compile a jump-table instead of lots of tests. This is actually not a really good example because the compiler is likely to be able to do a better ...
$ Id$ ( 20210129 : this file had DOS line endings ! I must have written it on a Windows machine ... ) (defpackage :org.tfeb.toys.ncase (:use :cl) (:export #:ncase #:*ncase-length-threshold* #:*ncase-density-threshold* #:*ncase-predicate*)) (in-package :org.tfeb.toys.ncase) (provide :org.tfeb...
82c7981bf7ae0a339073ab16ec3e9c17de6f1da2835002df55356e85dadacc0c
gregnwosu/haskellbook
vectortest.hs
module Main where import Criterion.Main import qualified Data.Vector as V slice :: Int -> Int -> [a] -> [a] slice from len xs = take len (drop from xs) l :: [Int] l = [1..10000] v :: V.Vector Int v = V.fromList l testV' :: Int -> V.Vector Int testV' n = V.map (+n) $ V.map (+n) $ V.map (+n) $ V.map (+n) (V.from...
null
https://raw.githubusercontent.com/gregnwosu/haskellbook/b21fb6772e58f07cff334d9c551d0477ec856897/chapter28/src/vectortest.hs
haskell
this will only work if you compile with optimisation wont work in a repl -rtsopts -O2 vectortest.hs ` ` `
module Main where import Criterion.Main import qualified Data.Vector as V slice :: Int -> Int -> [a] -> [a] slice from len xs = take len (drop from xs) l :: [Int] l = [1..10000] v :: V.Vector Int v = V.fromList l testV' :: Int -> V.Vector Int testV' n = V.map (+n) $ V.map (+n) $ V.map (+n) $ V.map (+n) (V.from...
73d5be3d09273876bbde66507feb95b3300597b68c42d716bab59eb0dd09562b
ferd/recon
recon_SUITE.erl
%%% Test suite for the recon module. Because many of the tests in %%% here depend on runtime properties and this is *not* transparent, %%% the tests are rather weak and more or less check for interface %%% conformance and obvious changes more than anything. -module(recon_SUITE). -include_lib("common_test/include/ct.hrl...
null
https://raw.githubusercontent.com/ferd/recon/adaa2a5774dc14c01e431f5ae48594f583a1d206/test/recon_SUITE.erl
erlang
Test suite for the recon module. Because many of the tests in here depend on runtime properties and this is *not* transparent, the tests are rather weak and more or less check for interface conformance and obvious changes more than anything. TESTS %%% Reduction count is unreliable registered_name is special --...
-module(recon_SUITE). -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). -compile(export_all). -ifdef(OTP_RELEASE). -define(FILES_IMPL, nif). -define(ERROR_LOGGER_MATCH(_), ). -define(REDUCTIONS_MATCH(X), X). -else. -define(FILES_IMPL, port). -define(ERROR_LOGGER_MATCH(X), X,). -defi...
b2b66f0b5ab388f4bdd55c98809a3ea6b722d480d1382bbf50df8ffef63b5e38
Haskell-Things/HSlice
Intersections.hs
{- ORMOLU_DISABLE -} - Copyright 2022 - - This program is free software : you can redistribute it and/or 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 version ....
null
https://raw.githubusercontent.com/Haskell-Things/HSlice/97ef812e32bd4e1e7d9e33ee4ba7c2cbf169aadd/Graphics/Slicer/Math/Intersections.hs
haskell
ORMOLU_DISABLE # INLINABLE intersectionBetweenArcsOf # | Check if/where the arc of a motorcycle, inode, or enode intersect a line segment. handle the case where a segment that is an input to the node is checked against. | Find out if all of the possible intersections between all of the given nodes are close enough...
- Copyright 2022 - - This program is free software : you can redistribute it and/or 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 version . - - This progr...