_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
5530378d8f6edc2f2159b882198d73b7f6e1167fd50caf4962c6c50c411677f2
project-oak/hafnium-verification
RetainCycles.ml
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/biabduction/RetainCycles.ml
ocaml
Weak edge - by type of from-node Weak edge - by annotation of from-node/field Weak edge - by type of from-node/field Perform a dfs of a graph stopping when e_root is reached. Returns the set of cycles reached. found root, finish the cycle we already visited f_exp, stop cycle with a block start dfs with e...
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
e79e46656246e876cc516df480c1707f8e3a347e7a9b50f403eb4fbca71cb365
ChrisTitusTech/ubuntu-titus
210_effects-selection_glow-selection-outline.scm
210_effects-selection_glow-selection.scm last modified / tested by [ gimphelp.org ] 08/26/2018 on GIMP 2.10.6 ;================================================== ; ; Installation: ; This script should be placed in the user or system-wide script folder. ; ; Windows 7/10 C:\Program Files\GIMP 2\share\gimp\2.0\s...
null
https://raw.githubusercontent.com/ChrisTitusTech/ubuntu-titus/f6f3ed4681cf4f8d0365c9d355e09fc0e2482799/dotconfig/GIMP/2.10/scripts/210_effects-selection_glow-selection-outline.scm
scheme
================================================== Installation: This script should be placed in the user or system-wide script folder. Windows 7/10 or Linux /home/yourname/.config/GIMP/2.10/scripts or Linux system-wide /usr/share/gimp/2.0/scripts ================================================== ...
210_effects-selection_glow-selection.scm last modified / tested by [ gimphelp.org ] 08/26/2018 on GIMP 2.10.6 C:\Program Files\GIMP 2\share\gimp\2.0\scripts C:\Users\YOUR - NAME\AppData\Roaming\GIMP\2.10\scripts it under the terms of the GNU General Public License as published by the Free Software...
56fce9a6e6580e2001350c57ebfa7c43fc0888f9a1e27998a16a8e8db8fbee63
helium/erlang-tc
tc_key_share_SUITE.erl
-module(tc_key_share_SUITE). -include_lib("eunit/include/eunit.hrl"). -include_lib("common_test/include/ct.hrl"). -export([all/0, init_per_testcase/2, end_per_testcase/2]). -export( [ n_three_thresold_one/1, n_six_thresold_two/1 ] ). all() -> [ n_three_thresold_one, n_six...
null
https://raw.githubusercontent.com/helium/erlang-tc/b3ef1d5541586f5c85b6d231345a921d57be32a3/test/tc_key_share_SUITE.erl
erlang
Helpers
-module(tc_key_share_SUITE). -include_lib("eunit/include/eunit.hrl"). -include_lib("common_test/include/ct.hrl"). -export([all/0, init_per_testcase/2, end_per_testcase/2]). -export( [ n_three_thresold_one/1, n_six_thresold_two/1 ] ). all() -> [ n_three_thresold_one, n_six...
55b4e7dd95f8f1eb3b4f710f2b79a705b23926220de38ae42ee1fb54bf33d50b
janestreet/async_unix
dump_core_on_job_delay.mli
(** Dump core if jobs are delayed, to get additional debug information when running on UNIX systems that support core dumps. It is not normally enabled, but may be enabled for any program by setting the appropriate field, [dump_core_on_job_delay], in the [ASYNC_CONFIG] environment variable. *) open! C...
null
https://raw.githubusercontent.com/janestreet/async_unix/2562a6b9316d7c6757726305482380bd7e6dba06/src/dump_core_on_job_delay.mli
ocaml
* Dump core if jobs are delayed, to get additional debug information when running on UNIX systems that support core dumps. It is not normally enabled, but may be enabled for any program by setting the appropriate field, [dump_core_on_job_delay], in the [ASYNC_CONFIG] environment variable. * [start_wat...
open! Core open! Import module How_to_dump : sig type t = Config.Dump_core_on_job_delay.How_to_dump.t = | Default | Call_abort | Call_gcore [@@deriving sexp_of] end val start_watching : dump_if_delayed_by:Time.Span.t -> how_to_dump:How_to_dump.t -> unit * [ dump_core ( ) ] dumps a core file using [ ...
2e9502ebc505e4ae9ba096b52d084da2b76daa31a4a632db1cfa62c2367f597b
cyverse-archive/DiscoveryEnvironmentBackend
validation.clj
(ns porklock.validation (:use [porklock.pathing] [clojure.pprint] [slingshot.slingshot :only [try+ throw+]] [clojure-commons.error-codes]) (:require [clojure-commons.file-utils :as ft])) (def ERR_MISSING_OPTION "ERR_MISSING_OPTION") (def ERR_PATH_NOT_ABSOLUTE "ERR_PATH_NOT_ABSOLUTE") (def E...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/tools/filetool/src/porklock/validation.clj
clojure
(ns porklock.validation (:use [porklock.pathing] [clojure.pprint] [slingshot.slingshot :only [try+ throw+]] [clojure-commons.error-codes]) (:require [clojure-commons.file-utils :as ft])) (def ERR_MISSING_OPTION "ERR_MISSING_OPTION") (def ERR_PATH_NOT_ABSOLUTE "ERR_PATH_NOT_ABSOLUTE") (def E...
65eec73a7a9dccbd8128eb06afb0def947ad37bab8539a777851c353d0a13dd3
edsko/tracetree
Generic.hs
| Generic translation to SimpleTrees using module Debug.Trace.Tree.Generic ( GSimpleTree(..) ) where import Control.Monad.State import Data.Bifunctor import Data.Map (Map) import GHC.Generics import qualified Data.Map as Map import Debug.Trace.Tree.Assoc import Debug.Trace.Tree.Simple ----------------------...
null
https://raw.githubusercontent.com/edsko/tracetree/e2cfbd5b48e5dccf82fd98993bf348268eb01004/src/Debug/Trace/Tree/Generic.hs
haskell
---------------------------------------------------------------------------- ---------------------------------------------------------------------------- -----------------------------------------------------------------------------} For map we do something special, and create edges for each key in the map Similarly,...
| Generic translation to SimpleTrees using module Debug.Trace.Tree.Generic ( GSimpleTree(..) ) where import Control.Monad.State import Data.Bifunctor import Data.Map (Map) import GHC.Generics import qualified Data.Map as Map import Debug.Trace.Tree.Assoc import Debug.Trace.Tree.Simple Translation from ar...
b7185ddf0998cfb63cbace88111ec3b968e1fde247edd4f8af6e67b3c8c9544e
justinmeiners/exercises
1_06.scm
;Excerci;new-if must evalute the arguments before expanding the procuure. So the recursive calls will repeatedly be made and the procedure will never terminate. if only evaluates results depending on the predicate.
null
https://raw.githubusercontent.com/justinmeiners/exercises/9491bc16925eae12e048ccd3f424b870ebdc73aa/sicp/1/1_06.scm
scheme
Excerci;new-if must evalute the arguments before expanding the procuure. So the recursive calls will repeatedly be made and the procedure will never terminate. if only evaluates results depending on the predicate.
f666d0050638d4dacc2011d06edc6af662f4c8d45bca1f6bf5aef658ca27fea4
TurtleKitty/Vaquero
macro_expander.scm
(define done-been-expanded (mkht)) (define expand-err (lambda (ex continue) (define error-view (if (vaquero-error? ex) (map (lambda (f) (vaquero-view (vaquero-send-atomic ex f))) '(name form to-text)) (vaquero-view ex))) (vaquero-error 'expand-error error-view "Error ex...
null
https://raw.githubusercontent.com/TurtleKitty/Vaquero/4c7d06b13f71fe6d674b85041f0ef1d24eab5083/interpreter/macro_expander.scm
scheme
make damn sure it's a package and op
(define done-been-expanded (mkht)) (define expand-err (lambda (ex continue) (define error-view (if (vaquero-error? ex) (map (lambda (f) (vaquero-view (vaquero-send-atomic ex f))) '(name form to-text)) (vaquero-view ex))) (vaquero-error 'expand-error error-view "Error ex...
c6756aa2f44d7f8f78cef66edb639d2d3fc9bf56123f26d538c9e76f7c13e067
nitrogen/NitrogenProject.com
demos_headers.erl
-module (demos_headers). -include_lib ("nitrogen_core/include/wf.hrl"). -compile(export_all). main() -> #template { file="./templates/demos46.html" }. title() -> "Headers". headline() -> "Headers". left() -> [ " <p> Nitrogen allows you to access http headers via the <code>w...
null
https://raw.githubusercontent.com/nitrogen/NitrogenProject.com/b4b3a0dbe17394608d2ee6eaa089e3ece1285075/src/demos/demos_headers.erl
erlang
-module (demos_headers). -include_lib ("nitrogen_core/include/wf.hrl"). -compile(export_all). main() -> #template { file="./templates/demos46.html" }. title() -> "Headers". headline() -> "Headers". left() -> [ " <p> Nitrogen allows you to access http headers via the <code>w...
cc171c237202e3349900238b6c7db3c4e21c7cbb373973cc6f322c34ce11195c
fujita-y/ypsilon
vqsort2.scm
The sort package -- quick sort -*- Scheme -*- Copyright ( c ) 2002 by . ;;; This code is open-source; see the end of the file for porting and ;;; more copyright information. 2002/7 . ;;; (quick-sort < v [start end]) -> vector ;;; (quick-sort! < v [start end]) -> unspecific ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;...
null
https://raw.githubusercontent.com/fujita-y/ypsilon/01abcdcef85263956481c9bf69b5d576e158c9b7/sitelib/srfi/132/vqsort2.scm
scheme
This code is open-source; see the end of the file for porting and more copyright information. (quick-sort < v [start end]) -> vector (quick-sort! < v [start end]) -> unspecific The algorithm is a standard quicksort, but the partition loop is fancier, arranging the vector into a left part that is <, a middle reg...
The sort package -- quick sort -*- Scheme -*- Copyright ( c ) 2002 by . 2002/7 . The partition loop divides the range being partitioned into five the median of three elements as the partition pivot , so pathological n^2 pivots . The key to this trick is that you only need to pick one random ...
0211b5bc8ef58f064a07c18bcb6958177281d90b788c89904389609282b8c363
district0x/cljs-web3
run_tests.cljs
(ns cljs-web3.run-tests (:require [print.foo :include-macros true] [cljs.test :refer-macros [run-tests]] [cljs-web3.tests])) (defn run-all-tests [] (.clear js/console) (run-tests 'cljs-web3.tests)) (comment (run-all-tests))
null
https://raw.githubusercontent.com/district0x/cljs-web3/14ba12e37dd944c90f4741d92c8c94394b9a3dba/test/cljs_web3/run_tests.cljs
clojure
(ns cljs-web3.run-tests (:require [print.foo :include-macros true] [cljs.test :refer-macros [run-tests]] [cljs-web3.tests])) (defn run-all-tests [] (.clear js/console) (run-tests 'cljs-web3.tests)) (comment (run-all-tests))
314f028ab42e2634c2113b592c87a78335465e66a4ef282b5f282855ef7c37ac
patrickt/possession
Player.hs
# LANGUAGE DataKinds # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -Wno - orphans # -- | Operations on the player. module Game.Entity.Player where import Data.Amount (Amount) import Data.Experience import Data.Glyph import Data.Hitpoints import Data.Pos...
null
https://raw.githubusercontent.com/patrickt/possession/7dd830117508f7e5ed003bb0c157e202321ec1ff/src/Game/Entity/Player.hs
haskell
| Operations on the player. This kind of C++-ish pattern is used to cope with the fact but not as typesafe as we want).
# LANGUAGE DataKinds # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -Wno - orphans # module Game.Entity.Player where import Data.Amount (Amount) import Data.Experience import Data.Glyph import Data.Hitpoints import Data.Position import Game.Entity.Invent...
2c93e548417cd153d1b003c5b103c03e928c866a05acdbf4fef0db3660028dbc
michaelklishin/validateur
validation_test.cljc
(ns validateur.test.validation-test (:require [validateur.validation :as vr] #?(:clj [clojure.test :refer :all] :cljs [cljs.test :refer-macros [is are deftest testing]]))) #?(:clj (println (str "Using Clojure version " *clojure-version*))) (defn test-message-fn [type map attr & args] [...
null
https://raw.githubusercontent.com/michaelklishin/validateur/e7dbb7e2f9fe1a6a8292e5e30c89c8cd4f56e4d2/test/validateur/test/validation_test.cljc
clojure
validation-set compose-set presence-of numericality-of acceptance-of all-keys-in inclusion-of exclusion-of length-of format-of validate-when validate-by nested validate-with-predicate validity-of validate-nested Error Reporting Implementation functions
(ns validateur.test.validation-test (:require [validateur.validation :as vr] #?(:clj [clojure.test :refer :all] :cljs [cljs.test :refer-macros [is are deftest testing]]))) #?(:clj (println (str "Using Clojure version " *clojure-version*))) (defn test-message-fn [type map attr & args] [...
28557f1fed84cca7208fd46768aeacb44f9f4de863f8f2c0f31df38cbf761b89
JohnLato/language-objc
Environment.hs
{-# OPTIONS -Wall #-} ----------------------------------------------------------------------------- -- | -- Module : Test.Environment Copyright : ( c ) 2008 , -- License : BSD-style -- Maintainer : -- Portability : portable -- -- This module provides access to the environment variables used fo...
null
https://raw.githubusercontent.com/JohnLato/language-objc/8e9455f15b32229f7caf13769c8945d8544c79f0/test-framework/Language/C/Test/Environment.hs
haskell
# OPTIONS -Wall # --------------------------------------------------------------------------- | Module : Test.Environment License : BSD-style Maintainer : Portability : portable This module provides access to the environment variables used for testing, and provides them in form of a TestConfig da...
Copyright : ( c ) 2008 , ` envHelpDoc ' says : CTEST_REPORT_FILE file to write test reports to [ default = CTEST_TMPDIR / report.dat ] CTEST_DEBUG whether to print debug messages [ default = False ] module Language.C.Test.Environment ( TestConfig(..), envHelpDoc,...
e5ade9a52386c3bc6dcc03dee0050619ce965594dc649f8ffa8c49280f7ec175
lambdamikel/OntoLisp
owlapi-test.lisp
-*- Mode : Lisp ; Syntax : Ansi - Common - Lisp ; Package : OWLAPI ; Base : 10 -*- (in-package :owlapi) ;;; ;;;; owlapi-test.lisp ;;; ;;; ;;; -------------------------------------------------------------------------------------- ;;; The Original Software is OntoLisp ( NOSA ): A Semantic Web Framework for O...
null
https://raw.githubusercontent.com/lambdamikel/OntoLisp/d8646f986ec59aa0dd643bf685be318f44b5ff52/ontolisp-0.9/owlapi-test.lisp
lisp
Syntax : Ansi - Common - Lisp ; Package : OWLAPI ; Base : 10 -*- owlapi-test.lisp -------------------------------------------------------------------------------------- All Rights Reserved. This program is licensed under the terms of the GNU Lesser General Public License however that a preamble atta...
(in-package :owlapi) The Original Software is OntoLisp ( NOSA ): A Semantic Web Framework for OWL 2 and OWLlink in Common Lisp Copyright ( c ) 2007 - 2010 and Racer Systems GmbH & Co. KG Contributor(s ): ( mailto: mailto: ) as published by the Free Softwa...
781489f468c5f49deb229861a751ed71dbb89a6d23e74849f9fd719ac1d4944b
coq/coq
btermdn.ml
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * *...
null
https://raw.githubusercontent.com/coq/coq/934cd2350e0fa7784fb4c24390da1fc5b8f5b576/tactics/btermdn.ml
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team // * This file is distributed under the terms of the * (see LICENSE file for the text of the license) ************************************...
v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser Gener...
0a558f451edf3c4c742725d1b421dcbde5c44b3e4c10a507a25e253f447d912a
input-output-hk/cardano-sl
Discovery.hs
module Pos.Infra.Discovery ( module Pos.Infra.Discovery.Model.Class , module Pos.Infra.Discovery.Model.Neighbours ) where import Pos.Infra.Discovery.Model.Class import Pos.Infra.Discovery.Model.Neighbours
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/infra/src/Pos/Infra/Discovery.hs
haskell
module Pos.Infra.Discovery ( module Pos.Infra.Discovery.Model.Class , module Pos.Infra.Discovery.Model.Neighbours ) where import Pos.Infra.Discovery.Model.Class import Pos.Infra.Discovery.Model.Neighbours
db0a73662bb20b2220f0deb94c66cd78eec992a1a876a8e278789b7101b3b55b
mindreframer/clojure-stuff
app.clj
(ns puppetlabs.trapperkeeper.app) (defprotocol TrapperkeeperApp "Functions available on a trapperkeeper application instance" (get-service [this service-id] "Returns the service with the given service id") (service-graph [this] "Returns the prismatic graph of service fns for this app") (app-context [this] "Ret...
null
https://raw.githubusercontent.com/mindreframer/clojure-stuff/1e761b2dacbbfbeec6f20530f136767e788e0fe3/github.com/puppetlabs/trapperkeeper/src/puppetlabs/trapperkeeper/app.clj
clojure
(ns puppetlabs.trapperkeeper.app) (defprotocol TrapperkeeperApp "Functions available on a trapperkeeper application instance" (get-service [this service-id] "Returns the service with the given service id") (service-graph [this] "Returns the prismatic graph of service fns for this app") (app-context [this] "Ret...
ecb15ed16e5f63d923bbf8ed343b2c219e09fb7711fe609c60a62c5a70e17a28
mstksg/inCode
Halve.hs
-- `halve` returns a successful halving in a Just if the number is even, or -- a Nothing otherwise. This is a naive implementation that does not take -- advantage of MonadPlus-ness. -- -- To load: -- $ ghci λ : : l Halve.hs -- -- Some things to play around with: λ : halve 7 λ : halve 8 > > = halve λ : halve 7...
null
https://raw.githubusercontent.com/mstksg/inCode/e1f80a3dfd83eaa2b817dc922fd7f331cd1ece8a/code-samples/monad-plus/Halve.hs
haskell
`halve` returns a successful halving in a Just if the number is even, or a Nothing otherwise. This is a naive implementation that does not take advantage of MonadPlus-ness. To load: $ ghci Some things to play around with: -fun-with-monads-introducing-monadplus#maybe-maybe-not
λ : : l Halve.hs λ : halve 7 λ : halve 8 > > = halve λ : halve 7 > > = halve λ : halve 6 > > = halve λ : halve 6 > > = halve > > = halve λ : halve 32 > > Nothing λ : halve 32 > > = halve > > = halve > > = halve λ : halve 32 > > Nothing > > = halve > > = halve > > = halve halve :: Int -> Maybe Int hal...
201bece18d287f1b76e0c9d71a729bb29ed80b999df783313830693d311b16a2
apg/cfdg
reader.rkt
#lang s-exp syntax/module-reader cfdg/language
null
https://raw.githubusercontent.com/apg/cfdg/95cb006c6ea43cc09c47d68fe9c7dc4597a3ed3e/cfdg/lang/reader.rkt
racket
#lang s-exp syntax/module-reader cfdg/language
73ef28d11be3d4c00ca1afa7e22c81f1731a2eb6711091921d50bdb9b90f32f4
docker-in-aws/docker-in-aws
project.clj
(defproject swarmpit "1.6-SNAPSHOT" :description "Docker swarm management UI" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.9.0"] [org.clojure/clojurescript "1.10.238"] [org.clojure/core.async "0.4.474"] ...
null
https://raw.githubusercontent.com/docker-in-aws/docker-in-aws/bfc7e82ac82ea158bfb03445da6aec167b1a14a3/ch16/swarmpit/project.clj
clojure
(defproject swarmpit "1.6-SNAPSHOT" :description "Docker swarm management UI" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.9.0"] [org.clojure/clojurescript "1.10.238"] [org.clojure/core.async "0.4.474"] ...
6df0a75fb476b1f6e8801b29496cb324b9e1ecf9d1cef26711f027d215c070ba
janestreet/universe
import.ml
open! Core_kernel include Int.Replace_polymorphic_compare module Rpc = Async_rpc_kernel.Rpc
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/resource_cache/src/import.ml
ocaml
open! Core_kernel include Int.Replace_polymorphic_compare module Rpc = Async_rpc_kernel.Rpc
b65e10f6cdc0a58af1d5a00e25bd1f7ba44cb6bdd3df3af25f0ef135b51b0071
racket/typed-racket
prims-struct.rkt
#lang racket/base ;; This module defines the forms needed for defining structs in Typed ;; Racket. The forms here are referenced in and re-provided by ;; "prims.rkt", sometimes under other names. ;; This file is `require`d into all Typed Racket programs, and thus ;; its runtime dependencies should be kept to a minim...
null
https://raw.githubusercontent.com/racket/typed-racket/0e95b833f9abe60d79801b34f2a7ea881c84a0b1/typed-racket-lib/typed-racket/base-env/prims-struct.rkt
racket
This module defines the forms needed for defining structs in Typed Racket. The forms here are referenced in and re-provided by "prims.rkt", sometimes under other names. This file is `require`d into all Typed Racket programs, and thus its runtime dependencies should be kept to a minimum. In particular, contracts ...
#lang racket/base (require (submod "../typecheck/internal-forms.rkt" forms) "colon.rkt" "base-types-extra.rkt" "ann-inst.rkt" "prims-lambda.rkt" (for-syntax racket/base syntax/parse/pre racket/lazy-require syntax/stx ...
3ea8dd8be983030c007572d56d21a2d3f99ed4330f5ed080a3835045cc418172
40ants/reblocks
page-dependencies.lisp
(uiop:define-package #:reblocks/page-dependencies (:use #:cl) (:import-from #:reblocks/app #:app) (:import-from #:serapeum #:defvar-unbound) (:import-from #:reblocks/dependencies #:dependency-equal #:get-url) (:import-from #:reblocks/page ...
null
https://raw.githubusercontent.com/40ants/reblocks/99986524e61ac90fa73e05b15d07310bbd378dea/src/page-dependencies.lisp
lisp
If application wide action was called, then symbol *current-page* will be unbound and we collect dependencies just inside *page-dependencies*: Dependencies returned as reversed list because that way they will have same order as they were pushed. At the moment when this method is called, there is already rendered ...
(uiop:define-package #:reblocks/page-dependencies (:use #:cl) (:import-from #:reblocks/app #:app) (:import-from #:serapeum #:defvar-unbound) (:import-from #:reblocks/dependencies #:dependency-equal #:get-url) (:import-from #:reblocks/page ...
b85d553b0c849118976040064e962fd43a92acbb76e15196549e5936caf72914
aggieben/weblocks
member.lisp
(in-package :weblocks-test) ;;; Test member typespec->view-field-presentation (deftest member-typespec->view-field-presentation-1 (object-class-name (cadr (multiple-value-list (typespec->view-field-presentation (make-instance 'form-scaffold) 'member nil)))) radio-presentation) ;;; Test...
null
https://raw.githubusercontent.com/aggieben/weblocks/8d86be6a4fff8dde0b94181ba60d0dca2cbd9e25/test/views/types/member.lisp
lisp
Test member typespec->view-field-presentation Test member typespec->form-view-field-parser
(in-package :weblocks-test) (deftest member-typespec->view-field-presentation-1 (object-class-name (cadr (multiple-value-list (typespec->view-field-presentation (make-instance 'form-scaffold) 'member nil)))) radio-presentation) (deftest member-typespec->form-view-field-parser-1 (ob...
9d78f7bc7b317c6e9ebd671e4699db95fc3f3ccbe99ce182991b65d8863cec20
rd--/hsc3
control.hs
-- control sinOsc ar (control kr "freq" 440) 0 * control kr "amp" 0.1 -- control ; ir and kr and tr controls ; setting amp also triggers an envelope let phase1 = control ir "phase1" 0 phase2 = control ir "phase2" (pi / 4) freq1 = control kr "freq1" 450 freq2 = control kr "freq2" 900 amp1 = trigControl ...
null
https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Ugen/control.hs
haskell
control control ; ir and kr and tr controls ; setting amp also triggers an envelope control ; constructor setting index sequence -- ; set frequency and gate controls -- ; command list ui to send messages to set oscillator frequency
sinOsc ar (control kr "freq" 440) 0 * control kr "amp" 0.1 let phase1 = control ir "phase1" 0 phase2 = control ir "phase2" (pi / 4) freq1 = control kr "freq1" 450 freq2 = control kr "freq2" 900 amp1 = trigControl "amp1" 0 amp2 = trigControl "amp2" 0 env = decay2 (impulse kr 1 0 * 0.1 + mce2 amp...
dc8e0d47bf71b8aa935e673b4f95ef7fbeadaecd1154207e6c4c31e796a1ae49
intermine/bluegenes-old
histories.clj
(ns bluegenes.db.histories (:require [monger.collection :as mc] [monger.operators :refer :all] [slugger.core :as slugger] [bluegenes.mounts :refer [database]])) (defn uuid [] (str (java.util.UUID/randomUUID))) (defn get-all-histories "Get all history summaries." [] (mc/find...
null
https://raw.githubusercontent.com/intermine/bluegenes-old/5b719c7ac83a7340e0ff65790cf42413c15fb7e9/src/clj/bluegenes/db/histories.clj
clojure
(ns bluegenes.db.histories (:require [monger.collection :as mc] [monger.operators :refer :all] [slugger.core :as slugger] [bluegenes.mounts :refer [database]])) (defn uuid [] (str (java.util.UUID/randomUUID))) (defn get-all-histories "Get all history summaries." [] (mc/find...
c3013772d971f5160d7ac84346cb55d6c598f400ddc84cad19fc9f1a7cf0b300
elaforge/karya
ShakeConfig.hs
-- | Local build config. This is re-exported by Local, courtesy of -- tools/setup-* module User.Generic.ShakeConfig where import Shake.Config localConfig = defaultConfig
null
https://raw.githubusercontent.com/elaforge/karya/6475367a5a283d72a1160473634ac60b4ab58462/User/Generic/ShakeConfig.hs
haskell
| Local build config. This is re-exported by Local, courtesy of tools/setup-*
module User.Generic.ShakeConfig where import Shake.Config localConfig = defaultConfig
0b1101b7c538c92227ffab15f64a608f5dd443d7cdaba0d0685ac48e4168fb68
OCamlPro/ocp-build
buildOCamlDotReport.ml
open OcpCompat open BuildOCamlTypes open BuildValue.TYPES open BuildOCPTypes open Ocamldot.TYPES let report_dir = "_obuild/_reports" let report_dot = "project.dot" let report_pdf = "project.pdf" let report_dot = Filename.concat report_dir report_dot let report_pdf = Filename.concat report_dir report_pdf type node =...
null
https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/tools/ocp-build/ocaml/buildOCamlDotReport.ml
ocaml
open OcpCompat open BuildOCamlTypes open BuildValue.TYPES open BuildOCPTypes open Ocamldot.TYPES let report_dir = "_obuild/_reports" let report_dot = "project.dot" let report_pdf = "project.pdf" let report_dot = Filename.concat report_dir report_dot let report_pdf = Filename.concat report_dir report_pdf type node =...
e68ed9f229459b27bfdbd68359fd3a640a4b21577b61daecbd0d961cbf186057
plow-technologies/ble
HasInterface.hs
module Bluetooth.Internal.HasInterface where import Control.Concurrent (readMVar, swapMVar, modifyMVar_) import Control.Monad.Except (liftIO, mapExceptT) import Control.Monad import Control.Monad.Writer.Strict (WriterT) import Data.Proxy import Data.Word (Word16) import DBus import D...
null
https://raw.githubusercontent.com/plow-technologies/ble/fc1c2ab91b5fe33e3636e7b75f76219ef01968b9/src/Bluetooth/Internal/HasInterface.hs
haskell
that objects must meet. These requirements are outlined in: /+/5.43/doc/gatt-api.txt In this file, we declare how our objects meet these interfaces. * ObjectManager * Properties | The @org.freedesktop.DBus.Properties@ interface. See the <-specification.html#standard-interfaces-properties interface_name chan...
module Bluetooth.Internal.HasInterface where import Control.Concurrent (readMVar, swapMVar, modifyMVar_) import Control.Monad.Except (liftIO, mapExceptT) import Control.Monad import Control.Monad.Writer.Strict (WriterT) import Data.Proxy import Data.Word (Word16) import DBus import D...
b54cf95cbb1195d0a0da75b6b5da19f61913e5b98195bd7427dc1a5afab9384c
rethab/h-gpgme
Crypto.hs
module Crypto.Gpgme.Crypto ( encrypt , encryptSign , encryptFd , encryptSignFd , encrypt' , encryptSign' , decrypt , decryptFd , decryptVerifyFd , decrypt' , decryptVerify , decryptVerify' , verify , verify' , verifyDetached , verifyDetached' , veri...
null
https://raw.githubusercontent.com/rethab/h-gpgme/ede2ba731d7ab2eae955ead43a8ed75da9f45e65/src/Crypto/Gpgme/Crypto.hs
haskell
| Convenience wrapper around 'withCtx' and 'withKey' to encrypt a single plaintext for a single recipient with its homedirectory. | Convenience wrapper around 'withCtx' and 'withKey' to encrypt and sign a single plaintext for a single recipient with its homedirectory. | encrypt for a list of recipients ...
module Crypto.Gpgme.Crypto ( encrypt , encryptSign , encryptFd , encryptSignFd , encrypt' , encryptSign' , decrypt , decryptFd , decryptVerifyFd , decrypt' , decryptVerify , decryptVerify' , verify , verify' , verifyDetached , verifyDetached' , veri...
7b89f1078f5fa92344e7101d6ea3b46205e5153a76ceeb94f0b8d5fbd3f07096
input-output-hk/ouroboros-network
Update.hs
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # {-# LANGUAGE GADTs #-} # LANGUAGE MultiParamTypeClasses ...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/d64a5d253b751d465c5c48799dea6b234c2a329a/ouroboros-consensus/src/Ouroboros/Consensus/Storage/LedgerDB/Update.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DeriveAnyClass # # LANGUAGE DeriveGeneric # # LANGUAGE GADTs # # LANGUAGE NamedFieldPuns # # LANGUAGE QuantifiedConstraints # # LANGUAGE RankNTypes # # LANGUAGE RecordWildCards # # LANGUAGE Scope...
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE MultiParamTypeClasses # # LANGUAGE StandaloneKindSignatures # # LANGUAGE TypeApplications # # LANGUAGE UndecidableInstances # | Accessors for the LedgerDB and management ...
f298ad3d53ed053fa11d5a49bff155d7fc9a18340fe810827fe19623708a70fa
nervous-systems/kvlt
websocket.cljc
(ns kvlt.test.platform.websocket (:require #? (:clj [clojure.test :refer [is]] :cljs [cljs.test :refer-macros [is]]) [kvlt.platform.websocket :as websocket] [kvlt.test.util :as util #?(:clj :refer :cljs :refer-macros) [deftest is=]] [#? (:clj cloju...
null
https://raw.githubusercontent.com/nervous-systems/kvlt/26fe43eb9de6d7cc7ad8a466953fa0ffe09889ca/test/kvlt/test/platform/websocket.cljc
clojure
(ns kvlt.test.platform.websocket (:require #? (:clj [clojure.test :refer [is]] :cljs [cljs.test :refer-macros [is]]) [kvlt.platform.websocket :as websocket] [kvlt.test.util :as util #?(:clj :refer :cljs :refer-macros) [deftest is=]] [#? (:clj cloju...
688fc5bae8cd8db4b0a5eab231d688f802e56e1f81ad4ae0b6a9c909f5f8d3e3
tdbgamer/flink-statefulfun-hs
Test.hs
-- | This module is used to store all the -- utility functions used for testing. module Network.Flink.Test (testStatefulFunc) where import Control.Monad.Except (runExceptT) import Control.Monad.Reader (ReaderT (runReaderT)) import Control.Monad.State (StateT (..)) import Data.Either.Combinators (fromRight') import Dat...
null
https://raw.githubusercontent.com/tdbgamer/flink-statefulfun-hs/7581b95ced3f04071119bc2e2f67b315eba62d28/src/Network/Flink/Test.hs
haskell
| This module is used to store all the utility functions used for testing. | Function for testing stateful functions locally. Runs function given some initial state and input message. The final state of the function is returned along with all messages, egress, etc. that were queued up to be sent to Flink during...
module Network.Flink.Test (testStatefulFunc) where import Control.Monad.Except (runExceptT) import Control.Monad.Reader (ReaderT (runReaderT)) import Control.Monad.State (StateT (..)) import Data.Either.Combinators (fromRight') import Data.Functor (($>)) import Network.Flink.Internal.Stateful ( Env (Env), Functi...
dfd816ba0c63d9a7135d31e761ead4b5cc5352623a612c969e7725f398fa1efc
archimag/data-sift
sift.lisp
;;;; sift.lisp ;;;; ;;;; This file is part of the DATA-SIFT library, released under Lisp-LGPL. ;;;; See file COPYING for details. ;;;; Author : < > (in-package #:data-sift) (defgeneric compile-parse-rule (rule &key &allow-other-keys) (:documentation "Compile a validator according to RULE")) (defgeneric compil...
null
https://raw.githubusercontent.com/archimag/data-sift/fd617d8200cdcc1b87ecf45ab59bb38e8b16ef7e/src/sift.lisp
lisp
sift.lisp This file is part of the DATA-SIFT library, released under Lisp-LGPL. See file COPYING for details. list rule unknow rule functional rule string rule integer rule number rule regexp rule email rule ip-address rule (compile-parse-rule 'regexp :regex "^([0-9]{1,3}\.){3}[0-9]{1...
Author : < > (in-package #:data-sift) (defgeneric compile-parse-rule (rule &key &allow-other-keys) (:documentation "Compile a validator according to RULE")) (defgeneric compile-render-rule (rule &key &allow-other-keys) (:documentation "Compile a renderer according to RULE")) (defun default-renderer (obj) ...
97e9d9b8838db23c02283bf64794ceec1a42599e541a0187931716f259d43ee3
Liqwid-Labs/plutus-extra
Extra.hs
# OPTIONS_GHC -fno - omit - interface - pragmas # module PlutusTx.Foldable.Extra (isSubsetOf, firstJust, maximum, minimum) where -------------------------------------------------------------------------------- import Data.Kind (Type) import Data.Monoid (First (First, getFirst)) -------------------------------------...
null
https://raw.githubusercontent.com/Liqwid-Labs/plutus-extra/347dd304e9b580d1747439a888bfaa79f1c5a25e/plutus-extra/src/PlutusTx/Foldable/Extra.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Can make more efficient later if needed
# OPTIONS_GHC -fno - omit - interface - pragmas # module PlutusTx.Foldable.Extra (isSubsetOf, firstJust, maximum, minimum) where import Data.Kind (Type) import Data.Monoid (First (First, getFirst)) import PlutusTx.Foldable import PlutusTx.Ord import PlutusTx.Prelude | @ xs ` isSubsetOf ` ys @ indicates whether...
58b581fb274eee06965d7e998804e5bad484819802b02b2453b59c1d38ad3d94
atlas-engineer/nyxt
bookmarklets.lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :nyxt/tests) (define-test toggle-bookmarklets-mode () (let ((buffer (make-instance 'modable-buffer))) (with-current-buffer buffer (assert-true (enable-modes* 'nyxt/bookmarklets-mode:bookmarklets-mode...
null
https://raw.githubusercontent.com/atlas-engineer/nyxt/65a9aa568b16c109281fa403a7c045b3b6d87025/tests/offline/mode/bookmarklets.lisp
lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :nyxt/tests) (define-test toggle-bookmarklets-mode () (let ((buffer (make-instance 'modable-buffer))) (with-current-buffer buffer (assert-true (enable-modes* 'nyxt/bookmarklets-mode:bookmarklets-mode...
a6c48698d5456c556356869c5c018c521e04c5193c21beed33eff1fd611dd6f7
nunchaku-inria/nunchaku
ID.mli
(* This file is free software, part of nunchaku. See file "license" for more details. *) (** {1 Unique Identifiers} *) type t include Intf.EQ with type t := t include Intf.ORD with type t := t include Intf.HASH with type t := t type fields (** Set of boolean fields for some ID *) val make : string -> t val make_...
null
https://raw.githubusercontent.com/nunchaku-inria/nunchaku/16f33db3f5e92beecfb679a13329063b194f753d/src/core/ID.mli
ocaml
This file is free software, part of nunchaku. See file "license" for more details. * {1 Unique Identifiers} * Set of boolean fields for some ID * Full constructor. @param pol polarity of ID (default: {!Polarity.NoPol}) @param distinct if true, this ID will be consider as distinct from every other "dis...
type t include Intf.EQ with type t := t include Intf.ORD with type t := t include Intf.HASH with type t := t type fields val make : string -> t val make_f : ('a, Format.formatter, unit, t) format4 -> 'a val make_full : ?pol:Polarity.t -> ?distinct:bool -> needs_at:bool -> string -> t val fresh_copy :...
0ced6ed596ec1bfaad94cb2dccae4bdee5330283829e55818f3294507a959166
GillianPlatform/Gillian
StateErr.ml
type ('mem_err, 'value) err_t = | EMem of 'mem_err (** Memory error, depends on instantiation *) | EType of 'value * Type.t option * Type.t (** Incorrect type, depends on value *) | EPure of Formula.t (* Missing formula that should be true *) | EVar of Var.t (* Undefined variable *) | EAsrt of ('value ...
null
https://raw.githubusercontent.com/GillianPlatform/Gillian/e649de29d6eb34e78b89d453ae53061f3b9cb40f/GillianCore/engine/GeneralSemantics/StateErr.ml
ocaml
* Memory error, depends on instantiation * Incorrect type, depends on value Missing formula that should be true Undefined variable We want all errors to be proper errors - this is a temporary placeholder
type ('mem_err, 'value) err_t = | EType of 'value * Type.t option * Type.t | EAsrt of ('value list * Formula.t * Asrt.t list list) | EOther of string [@@deriving yojson, show] let get_recovery_vals (errs : ('a, 'b) err_t list) (mem_recovery_vals : 'a -> 'b list) : 'b list = let f err = match err wi...
11b245ed0e7116151475336b24fc02d7c4102342d074fa7c1ea92288acf40bc5
vmchale/atspkg
Package.hs
module Language.ATS.Package ( buildAll , check , mkPkg , cleanAll , buildHelper -- * Ecosystem functionality , displayList ,...
null
https://raw.githubusercontent.com/vmchale/atspkg/45be7ece6b9e9b09a7151efe53ff7e278112e84d/ats-pkg/src/Language/ATS/Package.hs
haskell
* Ecosystem functionality * Types * Lenses
module Language.ATS.Package ( buildAll , check , mkPkg , cleanAll , buildHelper , displayList , atspkgVersion , Version (..)...
0539b273e42fb1d09a6e843d7f821b59a17b1f1bec84557c343d00a825b6ed36
kowainik/stan
Observation.hs
| Copyright : ( c ) 2020 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > _ _ Observation _ _ — a suggestion found in the target project by @Stan@. Copyright: (c) 2020 Kowainik SPDX-License-Identifier: MPL-2.0 Maintainer: Kowainik <> __Observation__ — a suggestion found in the target proj...
null
https://raw.githubusercontent.com/kowainik/stan/da36eac741466fe6f46dc3e56fca7806f8b41816/src/Stan/Observation.hs
haskell
* Smart constructors * Pretty print | Type alias for the sized list of 'Observation's. ^ Corresponding 'Inspection's 'Id'. ^ Position. | Show 'Observation' in a human-friendly format. ^ Use colouring | Show 'RealSrcSpan' in the following format: @ filename.ext(11:12-13:14) @ | Checkes the predicate on colour...
| Copyright : ( c ) 2020 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > _ _ Observation _ _ — a suggestion found in the target project by @Stan@. Copyright: (c) 2020 Kowainik SPDX-License-Identifier: MPL-2.0 Maintainer: Kowainik <> __Observation__ — a suggestion found in the target proj...
c6c88b03326d236b15377503be2b639a5eeda1c94ca689a0ab9c058f2bf9302b
yangchenyun/learning-sicp
objsys.scm
;;; OBJSYS.SCM ;;; MIT 6.001 Spring , 2005 ;;; ;;; This file provides a basic object system, and ;;; a clock for objects in a simulation world. Additional ;;; utility procedures are also provided. ;; Some terminology: ;; ;; "instance" of an object -- each individual object has ;...
null
https://raw.githubusercontent.com/yangchenyun/learning-sicp/99a19a06eddc282e0eb364536e297f27c32a9145/practices/projects/project4/objsys.scm
scheme
OBJSYS.SCM This file provides a basic object system, and a clock for objects in a simulation world. Additional utility procedures are also provided. Some terminology: "instance" of an object -- each individual object has its own identity. The instance knows its type, and has a message handler associated wi...
MIT 6.001 Spring , 2005 pointer to the enclosing instance ) as the first argument . " create " an object -- this does three things : it makes (define (make-instance) (list 'instance #f)) (define (instance? x) (and (pair? x) (eq? (car x) 'instance))) (define (instance-...
c8517fe3de0b2818b2f4546d9e1f7535863bc592718ead971697e1e6b69eceef
idubrov/siperl
hang_ua.erl
@author < > @doc UAS implementation that always responds with 486 Busy Here %%% @end 2011 - 2012 -module(hang_ua). -extends(sip_ua_default). %% API -export([start_link/0, is_applicable/1, call/1, bye/1, init/1]). UA callbacks -export([handle_call/3, handle_response/4]). %% Include files -include_lib("s...
null
https://raw.githubusercontent.com/idubrov/siperl/251daf3a0d7c7442f56f42cfd6c92764a4f475a7/demos/hang/src/hang_ua.erl
erlang
@end API Include files ----------------------------------------------------------------- API ----------------------------------------------------------------- ----------------------------------------------------------------- ----------------------------------------------------------------- @doc Serve requests to u...
@author < > @doc UAS implementation that always responds with 486 Busy Here 2011 - 2012 -module(hang_ua). -extends(sip_ua_default). -export([start_link/0, is_applicable/1, call/1, bye/1, init/1]). UA callbacks -export([handle_call/3, handle_response/4]). -include_lib("sip/include/sip.hrl"). -define(SE...
ca4688487f72f90761dc35297b03e54c6cfe7a284830fea2243efc451ccc1b33
albertoruiz/easyVision
combi4.hs
import EasyVision hiding (observe) import Util.Options observe winname = monitor' winname (mpSize 20) drawImage drift r a b = r .* a |+| (1-r) .* b interpolate (a:b:xs) = a: (0.5.*a |+| 0.5.*b) :interpolate (b:xs) main = do alpha <- getOption "--alpha" 0.9 run $ camera ~> float . grayscale ~~> scanl1 (...
null
https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/old/tutorial/combi4.hs
haskell
import EasyVision hiding (observe) import Util.Options observe winname = monitor' winname (mpSize 20) drawImage drift r a b = r .* a |+| (1-r) .* b interpolate (a:b:xs) = a: (0.5.*a |+| 0.5.*b) :interpolate (b:xs) main = do alpha <- getOption "--alpha" 0.9 run $ camera ~> float . grayscale ~~> scanl1 (...
5411d8e28f41ac4785c3db9b598a043a6352c4945898c3d5fb0ec0625e334034
open-services/open-registry
core_test.clj
(ns open-registry.core-test (:require [clojure.test :refer :all] [open-registry.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
null
https://raw.githubusercontent.com/open-services/open-registry/c4436acca921287a6b35ff31062505cf64577b57/test/open_registry/core_test.clj
clojure
(ns open-registry.core-test (:require [clojure.test :refer :all] [open-registry.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
29dfb21bcc194e51a4b9ce380dd2bdbcab76016a831b0b0fb1cec7d34c574f7e
windock/erlyvideo
apps_push.erl
-module(apps_push). -author(''). -include("../../include/ems.hrl"). -export(['WAIT_FOR_DATA'/2]). 'WAIT_FOR_DATA'({message, Message}, State) -> % ?D({"NetConnection.Message", Message}), gen_fsm:send_event(self(), {status, "NetConnection.Message", 0, Message}), {next_state, 'WAIT_FOR_DATA', State, ?TIMEOUT}; ...
null
https://raw.githubusercontent.com/windock/erlyvideo/80fdc4175de86f0ab5fb6db20a5b3c2fd4d5a075/src/apps/apps_push.erl
erlang
?D({"NetConnection.Message", Message}),
-module(apps_push). -author(''). -include("../../include/ems.hrl"). -export(['WAIT_FOR_DATA'/2]). 'WAIT_FOR_DATA'({message, Message}, State) -> gen_fsm:send_event(self(), {status, "NetConnection.Message", 0, Message}), {next_state, 'WAIT_FOR_DATA', State, ?TIMEOUT}; 'WAIT_FOR_DATA'(_Message, _State) -> {unhan...
27e7f589b6baf0508fd607d27333ae6b260a44a4b10b8fd9a0e48eed11fb767c
Boarders/debugged
Main.hs
# LANGUAGE TypeApplications # # LANGUAGE LambdaCase # # LANGUAGE DerivingVia # # LANGUAGE DerivingStrategies # # LANGUAGE DataKinds # module Main where -- tasty import Test.Tasty -- tasty-quickcheck import Test.Tasty.QuickCheck as QC -- tasty-hunit import Test.Tasty.HUnit as HU -- prettyprinter import Prettyp...
null
https://raw.githubusercontent.com/Boarders/debugged/09031ed9775384f0df661317a7add4d3629f0299/test/Main.hs
haskell
tasty tasty-quickcheck tasty-hunit prettyprinter base containers unordered-containers prettyprinter-ansi-ternimal putDoc . prettyRepr . debug $ (exL) putStrLn $ diff defaultMain tests }
# LANGUAGE TypeApplications # # LANGUAGE LambdaCase # # LANGUAGE DerivingVia # # LANGUAGE DerivingStrategies # # LANGUAGE DataKinds # module Main where import Test.Tasty import Test.Tasty.QuickCheck as QC import Test.Tasty.HUnit as HU import Prettyprinter import Prettyprinter.Render.Text import Data.Debug...
a0a2cd6d6228877cd15cf2ee1e938476301ec45eda71d868710ecb18b9f199c6
keithj/cl-genomic
cl-genomic-ontology-test.lisp
;;; Copyright ( c ) 2010 - 2011 . All rights reserved . ;;; ;;; This file is part of cl-genomic. ;;; ;;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ;...
null
https://raw.githubusercontent.com/keithj/cl-genomic/d160199c2b369df97afd3fded16b1ade507b80dd/test/cl-genomic-ontology-test.lisp
lisp
This file is part of cl-genomic. This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR P...
Copyright ( c ) 2010 - 2011 . All rights reserved . it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License (in-package :cl-genomic-ontology-test) (deftestsuite ...
318971f54715c67197bfa9e4b7587bd46f0af62cd3eecfa1f7453be6c2befc5a
snmsts/cl-langserver
misc.lisp
(in-package :ls-base) ;;;;; Misc (defun use-threads-p () (eq (connection-communication-style *emacs-connection*) :spawn)) (defun current-thread-id () (thread-id (current-thread))) (declaim (inline ensure-list)) (defun ensure-list (thing) (if (listp thing) thing (list thing)))
null
https://raw.githubusercontent.com/snmsts/cl-langserver/3b1246a5d0bd58459e7a64708f820bf718cf7175/src/helitage/misc.lisp
lisp
Misc
(in-package :ls-base) (defun use-threads-p () (eq (connection-communication-style *emacs-connection*) :spawn)) (defun current-thread-id () (thread-id (current-thread))) (declaim (inline ensure-list)) (defun ensure-list (thing) (if (listp thing) thing (list thing)))
4fc6c64e1b74841e12adb8fdc81441e22cc354a43b9ac39860b0fafbd5767820
Mishio595/disml
http.ml
open Core open Async open Cohttp module Base = struct exception Invalid_Method let rl = ref Rl.empty let base_url = "" let process_url path = Uri.of_string (base_url ^ path) let process_request_body body = body |> Yojson.Safe.to_string |> Cohttp_...
null
https://raw.githubusercontent.com/Mishio595/disml/cbb1e47a6d358eace03790c07a1b85641f4ca366/lib/http/http.ml
ocaml
open Core open Async open Cohttp module Base = struct exception Invalid_Method let rl = ref Rl.empty let base_url = "" let process_url path = Uri.of_string (base_url ^ path) let process_request_body body = body |> Yojson.Safe.to_string |> Cohttp_...
b19913e3855546f43cfc54205eae79d93092056c6f12735821708667faa80534
xh4/web-toolkit
misty1.lisp
;;;; -*- mode: lisp; indent-tabs-mode: nil -*- misty1.lisp -- implementation of the MISTY1 block cipher from RFC 2994 (in-package :crypto) (in-ironclad-readtable) ;;; required tables (defconst +misty1-s7table+ #8@(#x1B #x32 #x33 #x5A #x3B #x10 #x17 #x54 #x5B #x1A #x72 #x73 #x6B #x2C #x66 #x49 #x1F #x24 #x13 #x6C...
null
https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/ironclad-v0.47/src/ciphers/misty1.lisp
lisp
-*- mode: lisp; indent-tabs-mode: nil -*- required tables types and context definition block functions and key expansion fill in the expanded key schedule scramble
misty1.lisp -- implementation of the MISTY1 block cipher from RFC 2994 (in-package :crypto) (in-ironclad-readtable) (defconst +misty1-s7table+ #8@(#x1B #x32 #x33 #x5A #x3B #x10 #x17 #x54 #x5B #x1A #x72 #x73 #x6B #x2C #x66 #x49 #x1F #x24 #x13 #x6C #x37 #x2E #x3F #x4A #x5D #x0F #x40 #x56 #x25 #x51 #x1C #x04 #x0B #...
1da3828762369d931372d45c9ab1f65bf8b91bd9e8d1660c7a386528266d42b3
jaredly/belt
belt_internalSetString.ml
# 2 "../others/internal_set.cppo.ml" type value = string module S = Belt_SortArrayString # 12 "../others/internal_set.cppo.ml" module N = Belt_internalAVLset module A = Belt_Array type t = value N.t let rec has (t : t) (x : value) = match N.toOpt t with | None -> false | Some n -> let...
null
https://raw.githubusercontent.com/jaredly/belt/4d07f859403fdbd3fbfc5a9547c6066d657a2131/belt_src/belt_internalSetString.ml
ocaml
This algorithm applies to BST, it does not need to be balanced tree **************************************************************************
# 2 "../others/internal_set.cppo.ml" type value = string module S = Belt_SortArrayString # 12 "../others/internal_set.cppo.ml" module N = Belt_internalAVLset module A = Belt_Array type t = value N.t let rec has (t : t) (x : value) = match N.toOpt t with | None -> false | Some n -> let...
9c69906656db7ff369fd2f7dbeaf1f01cb64f2c3c24226a346037057c300af19
haskus/haskus-system
Ioctl.hs
# LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE DataKinds # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TypeApplications # | IOCTL module Haskus.System.Linux.Internals.Ioctl ( Command (..) , Direction(..) , CommandType , CommandNumber , ioctlCommand , rawIoctlCommand ...
null
https://raw.githubusercontent.com/haskus/haskus-system/38b3a363c26bc4d82e3493d8638d46bc35678616/haskus-system/src/lib/Haskus/System/Linux/Internals/Ioctl.hs
haskell
============================================================= From linux/include/uapi/asm-generic/ioctl.h ============================================================= is useful for catching programs compiled with old versions and to avoid overwriting user space outside the user buffer area. The fields are ...
# LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE DataKinds # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TypeApplications # | IOCTL module Haskus.System.Linux.Internals.Ioctl ( Command (..) , Direction(..) , CommandType , CommandNumber , ioctlCommand , rawIoctlCommand ...
a2ab547c512212d5becfd53f1f5b05c60d90e8dbc677d458ae0476fa11ff7cc4
mbj/stratosphere
TrainingJobDetailsProperty.hs
module Stratosphere.SageMaker.ModelCard.TrainingJobDetailsProperty ( module Exports, TrainingJobDetailsProperty(..), mkTrainingJobDetailsProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import {-# SOURCE #-} Stratosphe...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sagemaker/gen/Stratosphere/SageMaker/ModelCard/TrainingJobDetailsProperty.hs
haskell
# SOURCE # # SOURCE # # SOURCE #
module Stratosphere.SageMaker.ModelCard.TrainingJobDetailsProperty ( module Exports, TrainingJobDetailsProperty(..), mkTrainingJobDetailsProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProp...
3057c083023083c3ed45dd35fc13c95f160b03233733d6e3f034c583d349fcc4
synduce/Synduce
average.ml
* @synduce --no - lifting In this example , CVC4 fails on an almost syntactic definition . I have no idea why . In this example, CVC4 fails on an almost syntactic definition. I have no idea why. *) type 'a clist = | Single of 'a | Concat of 'a clist * 'a clist type 'a list = | Elt of 'a | Con...
null
https://raw.githubusercontent.com/synduce/Synduce/42d970faa863365f10531b19945cbb5cfb70f134/benchmarks/incomplete/list/average.ml
ocaml
* @synduce --no - lifting In this example , CVC4 fails on an almost syntactic definition . I have no idea why . In this example, CVC4 fails on an almost syntactic definition. I have no idea why. *) type 'a clist = | Single of 'a | Concat of 'a clist * 'a clist type 'a list = | Elt of 'a | Con...
6063ea28765aafa7274a00371c11328c18076931c7dae32bd20597182250c4bb
GillianPlatform/Gillian
logging.mli
* @canonical . Logging . Logging_constants module Logging_constants = Logging_constants open Logging_constants * @canonical . Logging . Loggable * @canonical . Logging . Mode module Mode : sig (** Logging levels *) type level = | Normal (** Normal output *) * Verbose output | TMI (** Too much inform...
null
https://raw.githubusercontent.com/GillianPlatform/Gillian/c794de7417f29e3c23146f9958ead7e4ad0216ce/GillianCore/logging/logging.mli
ocaml
* Logging levels * Normal output * Too much information * Type specifying the logging mode * Returns whether logging is enabled or not * Sets the logging mode * Pretty print function for logging mode type * Calls a given reporter module's [initialize] function * Calls a given reporter module's [log] function ...
* @canonical . Logging . Logging_constants module Logging_constants = Logging_constants open Logging_constants * @canonical . Logging . Loggable * @canonical . Logging . Mode module Mode : sig type level = * Verbose output type t = Disabled | Enabled of level val enabled : unit -> bool val set_mode : t...
f09ba9520563a43b6a5ef1eae7e89bca2de0001041694100c7fdd3131dd93f7f
VisionsGlobalEmpowerment/webchange
icon_arrow.cljs
(ns webchange.ui-framework.components.select.icon-arrow) (def data [:svg {:xmlns "" :height "18px" :viewBox "0 0 24 24" :width "18px" :fill "none"} [:path {:d "M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}]])
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/1f9d093d328248629001ee6ace0464058312a6ea/src/cljs/webchange/ui_framework/components/select/icon_arrow.cljs
clojure
(ns webchange.ui-framework.components.select.icon-arrow) (def data [:svg {:xmlns "" :height "18px" :viewBox "0 0 24 24" :width "18px" :fill "none"} [:path {:d "M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}]])
4a8ca8b69d95160284a191b781ff02e8b6819e237f63d4a77a145455beaf6c04
brianium/yoose
async_test.clj
(ns brianium.yoose.async-test (:require [clojure.test :refer :all] [clojure.test.check] [clojure.spec.alpha :as s] [clojure.spec.test.alpha :as st] [clojure.core.async :refer [<!! go chan]] [brianium.yoose :refer :all :exclude [<in >out]] [briani...
null
https://raw.githubusercontent.com/brianium/yoose/c4f2892798cbdfef726ce221723c9397108e472e/test/brianium/yoose/async_test.clj
clojure
(ns brianium.yoose.async-test (:require [clojure.test :refer :all] [clojure.test.check] [clojure.spec.alpha :as s] [clojure.spec.test.alpha :as st] [clojure.core.async :refer [<!! go chan]] [brianium.yoose :refer :all :exclude [<in >out]] [briani...
ca91133b7b3945dbd28b3799de615800c11e7ce1b9ddede6a8495e517daafa57
elaforge/karya
Parse_test.hs
Copyright 2013 -- This program is distributed under the terms of the GNU General Public -- License 3.0, see COPYING or -3.0.txt module Instrument.Parse_test where import qualified Util.Parse import Util.Test import qualified Midi.Midi as Midi import qualified Perform.Midi.Patch as Patch import qualified Instrumen...
null
https://raw.githubusercontent.com/elaforge/karya/8ea15e6a5fb57e2f15f8c19836751e315f9c09f2/Instrument/Parse_test.hs
haskell
This program is distributed under the terms of the GNU General Public License 3.0, see COPYING or -3.0.txt
Copyright 2013 module Instrument.Parse_test where import qualified Util.Parse import Util.Test import qualified Midi.Midi as Midi import qualified Perform.Midi.Patch as Patch import qualified Instrument.Common as Common import qualified Instrument.InstT as InstT import qualified Instrument.Parse as Parse import ...
d8cfeb4d42c3fe251714c0fd0ad1e64e32c33f776f73bdab96613889ff4d8332
v-kolesnikov/sicp
2_46.clj
(ns sicp.chapter02.2-46) (defn make-vect [x y] {:pre [(number? x) (number? y)]} (vector x y)) (defn xcor-vect [[x _]] x) (defn ycor-vect [[_ y]] y) (defn add-vect [[x1 y1] [x2 y2]] (make-vect (+ x1 x2) (+ y1 y2))) (defn sub-vect [[x1 y1] [x2 y2]] (make-vect (- x1 x2) ...
null
https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/src/sicp/chapter02/2_46.clj
clojure
(ns sicp.chapter02.2-46) (defn make-vect [x y] {:pre [(number? x) (number? y)]} (vector x y)) (defn xcor-vect [[x _]] x) (defn ycor-vect [[_ y]] y) (defn add-vect [[x1 y1] [x2 y2]] (make-vect (+ x1 x2) (+ y1 y2))) (defn sub-vect [[x1 y1] [x2 y2]] (make-vect (- x1 x2) ...
79644ef612e29a944c6ad4b63a5b94e858956700ee5b9f2afb0ed3077a8d358b
killme2008/clj-xmemcached
core.clj
(ns ^{:doc "The clj-xmemcached core" :author "Dennis zhuang<>"} clj-xmemcached.core (:import (net.rubyeye.xmemcached MemcachedClient MemcachedClientBuilder XMemcachedClient CASOperation XMemcachedClientBuilder GetsResponse) (net.rubyeye.xmemcached.impl KetamaMemcachedSessionLocator ArrayMemca...
null
https://raw.githubusercontent.com/killme2008/clj-xmemcached/d06fd530260c2bf1e82640d31efd0999993c08f1/src/clj_xmemcached/core.clj
clojure
define store functions: set,add,replace,append,prepend define incr/decr functions
(ns ^{:doc "The clj-xmemcached core" :author "Dennis zhuang<>"} clj-xmemcached.core (:import (net.rubyeye.xmemcached MemcachedClient MemcachedClientBuilder XMemcachedClient CASOperation XMemcachedClientBuilder GetsResponse) (net.rubyeye.xmemcached.impl KetamaMemcachedSessionLocator ArrayMemca...
bc7ede593f591a0e6a8b3d172bfb7653133979d78f512833b64d4115a7312152
alda-lang/alda-core
parse_events.clj
(ns alda.parser.parse-events (:require [clojure.core.async :refer (>!!)] [clojure.string :as str] [alda.lisp.events :as event] [alda.lisp.model.duration :as dur] [alda.lisp.model.pitch :as pitch] [alda.parser.tokenize ...
null
https://raw.githubusercontent.com/alda-lang/alda-core/4c92eb4fe363485193c58b77b1ec8e36c8866fb5/src/alda/parser/parse_events.clj
clojure
because we're evaluating an arbitrary clojure expression and the result might can't put nil on a channel there should be at most one no other type of container can be open at the end of input else ignore
(ns alda.parser.parse-events (:require [clojure.core.async :refer (>!!)] [clojure.string :as str] [alda.lisp.events :as event] [alda.lisp.model.duration :as dur] [alda.lisp.model.pitch :as pitch] [alda.parser.tokenize ...
62db4d02b33e405d556a2a5e9c5dd56918ecd43e94b3d6c39e6f7e88fab38a93
bgamari/bayes-stack
ReadRelevanceData.hs
module ReadRelevanceData where import Control.Applicative import qualified Data.Map.Strict as M import Data.Set (Set) import qualified Data.Text as T import qualified Data.Text.IO as TIO import BayesStack.Models.Topic.LDARelevance import ReadData hiding (readNodeItems) import ...
null
https://raw.githubusercontent.com/bgamari/bayes-stack/020df7bb7263104fdea254e57d6c7daf7806da3e/network-topic-models/ReadRelevanceData.hs
haskell
module ReadRelevanceData where import Control.Applicative import qualified Data.Map.Strict as M import Data.Set (Set) import qualified Data.Text as T import qualified Data.Text.IO as TIO import BayesStack.Models.Topic.LDARelevance import ReadData hiding (readNodeItems) import ...
b7da5cdfdf0129f9075690d9984c38dd457e818c368cac8384803300378fda0a
SonyCSLParis/fcg-server
start-load-balancer.lisp
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, software distributed under the License is distributed on an...
null
https://raw.githubusercontent.com/SonyCSLParis/fcg-server/99962c6f10e9e415a729f256f43767373a8dc9fe/Archive/v1.0/load-balancer/start-load-balancer.lisp
lisp
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 permis...
distributed under the License is distributed on an " AS IS " BASIS , (asdf:operate 'asdf:load-op :load-balancer) (in-package :fcg-server) (si::start-load-balancer :port 8920)
9ee6118e0a1f34e039a55706432a4eb4fd30f83ae0d56a7a5324bd55741746f6
rrnewton/haskell-lockfree
Debugger.hs
-- | This module provides a wrapper around a deque that can enforce additional -- invariants at runtime for debugging purposes. module Data.Concurrent.Deque.Debugger (DebugDeque(DebugDeque)) where import Data.IORef import Control.Concurrent import Data.Concurrent.Deque.Class -- newtype DebugDeque d =...
null
https://raw.githubusercontent.com/rrnewton/haskell-lockfree/3a83e288639fa1448459cea02fc5409de4b7483a/abstract-deque/Data/Concurrent/Deque/Debugger.hs
haskell
| This module provides a wrapper around a deque that can enforce additional invariants at runtime for debugging purposes. newtype DebugDeque d = DebugDeque d | Warning, this enforces the excessively STRONG invariant that if any end of the entire lifetime. This extreme form of monogamy is easier to verify, becaus...
module Data.Concurrent.Deque.Debugger (DebugDeque(DebugDeque)) where import Data.IORef import Control.Concurrent import Data.Concurrent.Deque.Class deque is non - threadsafe then it may ever only be touched by one thread during its information to know if two operations on different threads are r...
b706c191ac6ed24a175edf1926040218f55883ee17c2573c89221170143e15a6
chetmurthy/ledit
ledit.mli
(***********************************************************************) (* *) (* *) , INRIA Rocquencourt (* ...
null
https://raw.githubusercontent.com/chetmurthy/ledit/a34ac8d1ec4c7d29d18c274bc42312b031af2ae2/ledit.mli
ocaml
********************************************************************* et Automatique. Distributed only by p...
, INRIA Rocquencourt Copyright 1997 - 2008 Institut National de Recherche en Informatique $ Id$ value input_char : in_channel -> string; value set_prompt : string -> unit; value get_prompt : unit -> string; value open_histfile : bool -> string -...
32644fe3e1011997a321a1cf0314b48d217481a351c71b657a8246b5c18086ac
darrenldl/stramon
net_access.ml
type mode = [ | `Connect | `Accept | `Bind ] type net = { connect : int list String_map.t; accept : int list String_map.t; bind : int list String_map.t; } type t = { ipv4 : net; ipv6 : net; } let empty_net = { connect = String_map.empty; accept = String_map.empty; bind = String_map.empty; } le...
null
https://raw.githubusercontent.com/darrenldl/stramon/5a8edae9bcb1ae96c61f4b012e11d6aa7a6a739f/bin/net_access.ml
ocaml
type mode = [ | `Connect | `Accept | `Bind ] type net = { connect : int list String_map.t; accept : int list String_map.t; bind : int list String_map.t; } type t = { ipv4 : net; ipv6 : net; } let empty_net = { connect = String_map.empty; accept = String_map.empty; bind = String_map.empty; } le...
9693e83e36dc4051a5857f303ea5bbd964f976cbe7782d5492c842da5858882e
votinginfoproject/data-processor
office_test.clj
(ns vip.data-processor.validation.v5.office-test (:require [vip.data-processor.validation.v5.office :as v5.office] [clojure.test :refer :all] [vip.data-processor.test-helpers :refer :all] [vip.data-processor.db.postgres :as psql] [vip.data-processor.validation.xml :as x...
null
https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/test/vip/data_processor/validation/v5/office_test.clj
clojure
(ns vip.data-processor.validation.v5.office-test (:require [vip.data-processor.validation.v5.office :as v5.office] [clojure.test :refer :all] [vip.data-processor.test-helpers :refer :all] [vip.data-processor.db.postgres :as psql] [vip.data-processor.validation.xml :as x...
04625e7c734a67cb052d8fb8a54e48e7513ad2dfd7ce8cbe38affb53a6591c64
bendoerr/real-world-haskell
PrettifyStub.hs
module PrettifyStub where import SimpleJSON data Doc = ToBeDefined deriving (Show) string :: String -> Doc string s = undefined text :: String -> Doc text t = undefined double :: Num -> Doc double d = undefined
null
https://raw.githubusercontent.com/bendoerr/real-world-haskell/fa43aa59e42a162f5d2d5655b274b964ebeb8f0a/ch05/PrettifyStub.hs
haskell
module PrettifyStub where import SimpleJSON data Doc = ToBeDefined deriving (Show) string :: String -> Doc string s = undefined text :: String -> Doc text t = undefined double :: Num -> Doc double d = undefined
bd3730fc3572e84d3843918bc7d237662755c7460569598e1a182c626673a8d9
Metaxal/rwind
user.rkt
#lang racket/base Author : ;;; License: LGPL (require rwind/base rwind/util rwind/doc-string racket/file ) (define* cmd-line-config-file (make-fun-box #f)) (define* rwind-uds-socket (make-fun-box (find-user-config-file rwind-dir-name "rwind-socket"))) (define* (rwind-user-con...
null
https://raw.githubusercontent.com/Metaxal/rwind/5a4f580b0882452f3938aaa1711a6d99570f006f/user.rkt
racket
License: LGPL User configuration file TODO: - If loading the user file fails, fall back to a default configuration (file)? - replace the `printf' by `log-error' Read user configuration file It would be useless to thread it, as one would still need to call XLockDisplay error-message-box
#lang racket/base Author : (require rwind/base rwind/util rwind/doc-string racket/file ) (define* cmd-line-config-file (make-fun-box #f)) (define* rwind-uds-socket (make-fun-box (find-user-config-file rwind-dir-name "rwind-socket"))) (define* (rwind-user-config-file) "Retur...
16fcde6a0a77d591eab1c127204da23b68a0837c7f135de1b50a2b7a97255324
haskell-unordered-containers/unordered-containers
Strict.hs
{-# LANGUAGE Safe #-} ------------------------------------------------------------------------ -- | Module : Data . . Strict Copyright : 2010 - 2012 -- License : BSD-style -- Maintainer : -- Stability : provisional -- Portability : portable -- -- A map from /hashable/ keys to values. A...
null
https://raw.githubusercontent.com/haskell-unordered-containers/unordered-containers/63ec59ae20162b9b17aebc0c15000ce38d45b456/Data/HashMap/Strict.hs
haskell
# LANGUAGE Safe # ---------------------------------------------------------------------- | License : BSD-style Maintainer : Stability : provisional Portability : portable A map from /hashable/ keys to values. A map cannot contain makes no guarantees as to the order of its elements. The implementa...
Module : Data . . Strict Copyright : 2010 - 2012 duplicate keys ; each key can map to at most one value . A ' HashMap ' ' ' is often faster than other tree - based set types , Many operations have a average - case complexity of \(O(\log n)\ ) . The implementation uses a large base ( i....
9b19dd8437493d0ee56b7d72e9605e2e054fde308e097510671ea8996a2492ab
hoelzl/Snark
snark-pkg.lisp
;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: common-lisp-user -*- ;;; File: snark-pkg.lisp The contents of this file are subject to the Mozilla Public License ;;; Version 1.1 (the "License"); you may not use this file except in ;;; compliance with the License. You may obtain a copy of the License at ;;; / ;;; ...
null
https://raw.githubusercontent.com/hoelzl/Snark/06f86a31f476b2e4c28519765ab1e1519a4cc932/src/snark-pkg.lisp
lisp
-*- Mode: Lisp; Syntax: Common-Lisp; Package: common-lisp-user -*- File: snark-pkg.lisp Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the ...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is SNARK . The Initial Developer of the Original Code is SRI International . Portions created by the Initial Developer are Copyright ( C ) 1981 - 2012 . ...
062a95bf1149c681e5981b7e047c2ebe78367bbae6488ee414e1eb5584c87b8d
matthewdowney/rich-comment-tests
rich_comment_tests_test.clj
(ns com.mjdowney.rich-comment-tests-test (:require [clojure.string :as string] [clojure.test :refer :all] [com.mjdowney.rich-comment-tests :as rct] [com.mjdowney.rich-comment-tests.test-runner :as test-runner] [matcho.core :as m] [rewrite-clj.zip :as z])) (...
null
https://raw.githubusercontent.com/matthewdowney/rich-comment-tests/8e392f89a7bd03e5bab11fd33b4b8cfa0044cc37/test/com/mjdowney/rich_comment_tests_test.clj
clojure
=> 0 Test for addition Squares and such => => Removing :a from `x` => {:b
(ns com.mjdowney.rich-comment-tests-test (:require [clojure.string :as string] [clojure.test :refer :all] [com.mjdowney.rich-comment-tests :as rct] [com.mjdowney.rich-comment-tests.test-runner :as test-runner] [matcho.core :as m] [rewrite-clj.zip :as z])) (...
9aee483c5a0d6e65b083bf20ce5306fa034f0455120d3c07a843479fa1964e87
Frama-C/Frama-C-snapshot
RefUsage.mli
(**************************************************************************) (* *) This file is part of WP plug - in of Frama - C. (* *) Copyrigh...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/wp/RefUsage.mli
ocaml
************************************************************************ alternatives) ...
This file is part of WP plug - in of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat a l'energie atomique et aux energies Lesser General Public License as published by the Free Software Foundation ,...
25a26dbd2e9488a056a928f9dac6c129038af9b8314a47f1a9ca9c01ed3e8789
viercc/kitchen-sink-hs
Free.hs
# LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # {-# LANGUAGE GADTs #-} # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE RankNTypes #-} module Monad.Free where import Control.Monad ----------------------------------------- -- The Free monad -----...
null
https://raw.githubusercontent.com/viercc/kitchen-sink-hs/5038b17a39e4e6f19e6fb4779a7c8aaddf64d922/monads-collection/src/Monad/Free.hs
haskell
# LANGUAGE GADTs # # LANGUAGE RankNTypes # --------------------------------------- The Free monad --------------------------------------- Converts to another monad m by giving natural transformation natural transformation of Free: @forall a. Free f a -> Free g a@ hoistFree id = id ...
# LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE MultiParamTypeClasses # module Monad.Free where import Control.Monad data Free f a = Pure a | Free (f (Free f a)) instance Functor f => Functor (Free f) where fmap k (Pure a) = Pure (k a) fmap ...
480901694f6c2161da2f53ef1dd84496fd4e854c0ffa5a1b0b312e76baa067f1
opencog/opencog
filter-#12.scm
antecedent is a ParseNode ;; Examples: ParseNode should obviously be rejected . (define filter-#12 (BindLink (VariableList (TypedVariableLink (VariableNode "$word-inst-antecedent") (TypeNode "ParseNode") ) (TypedVariableLink ...
null
https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/opencog/nlp/anaphora/rules/filters/filter-%2312.scm
scheme
Examples:
antecedent is a ParseNode ParseNode should obviously be rejected . (define filter-#12 (BindLink (VariableList (TypedVariableLink (VariableNode "$word-inst-antecedent") (TypeNode "ParseNode") ) (TypedVariableLink (Vari...
00b06bc5a156bded54aa40a7346bbd8242a6225ef9fe02d947b4626c5b903348
prolic/futr
UI.hs
{-# LANGUAGE OverloadedStrings #-} module UI where import Debug.Trace import Control.Concurrent.MVar import Control.Concurrent.STM.TChan import Control.Lens import Crypto.Schnorr (exportXOnlyPubKey) import Data.Default import Data.List (sort) import Data.Maybe import Data.Text (Text, append, strip) import Monomer i...
null
https://raw.githubusercontent.com/prolic/futr/3e41268dff6c235c65e0edf6e52f6c82ed286d02/src/UI.hs
haskell
# LANGUAGE OverloadedStrings #
module UI where import Debug.Trace import Control.Concurrent.MVar import Control.Concurrent.STM.TChan import Control.Lens import Crypto.Schnorr (exportXOnlyPubKey) import Data.Default import Data.List (sort) import Data.Maybe import Data.Text (Text, append, strip) import Monomer import qualified Data.Map as Map imp...
42b6bc1fee8d414ec4a6f58d7bf6c6aa2ec5122eaf0cab4528c07f46918dcc33
footprintanalytics/footprint-web
page_test.clj
(ns metabase.query-processor-test.page-test "Tests for the `:page` clause." (:require [clojure.test :refer :all] [metabase.query-processor :as qp] [metabase.test :as mt])) (deftest page-test (mt/test-drivers (mt/normal-drivers) (testing "Test that we can get \"pages\" of results." ...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/query_processor_test/page_test.clj
clojure
(ns metabase.query-processor-test.page-test "Tests for the `:page` clause." (:require [clojure.test :refer :all] [metabase.query-processor :as qp] [metabase.test :as mt])) (deftest page-test (mt/test-drivers (mt/normal-drivers) (testing "Test that we can get \"pages\" of results." ...
d92e07af106cce2b1a59ed90bf3a9fdd4f1ca801a30d0dbc25be2412488d3596
hreinhardt/amqp
Helpers.hs
# LANGUAGE ScopedTypeVariables # module Network.AMQP.Helpers where import Control.Concurrent import Control.Exception import Control.Monad import Data.Int (Int64) import System.Clock import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.Lazy.Char8 as BL toStrict :: BL.ByteString -> BS.ByteStr...
null
https://raw.githubusercontent.com/hreinhardt/amqp/5c310093d8aba8fe563aab414ac8641a0ae31d99/Network/AMQP/Helpers.hs
haskell
if the lock is open, calls to waitLock will immediately return. if it is closed, calls to waitLock will block. if the lock is killed, it will always be open and can't be closed anymore
# LANGUAGE ScopedTypeVariables # module Network.AMQP.Helpers where import Control.Concurrent import Control.Exception import Control.Monad import Data.Int (Int64) import System.Clock import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.Lazy.Char8 as BL toStrict :: BL.ByteString -> BS.ByteStr...
b437456b409d4dfa750755cd35d7a007dad486f67fdab529902300431c949a26
ocaml/dune
dune_upgrader.ml
open! Stdune (* XXX explicit export because we want to get rid of the dependency on the engine *) module Dune_project = Dune_engine.Dune_project module Source_tree = Dune_engine.Source_tree module Console = Dune_console module Sub_dirs = Dune_engine.Sub_dirs type rename_and_edit = { original_file : Path.Source.t...
null
https://raw.githubusercontent.com/ocaml/dune/84d57418539196d07d783d84861c2879d3eee9f0/src/upgrader/dune_upgrader.ml
ocaml
XXX explicit export because we want to get rid of the dependency on the engine Return a mapping [Path.t -> Dune_lang.Ast.t list] containing [path] and all the files in includes, recursively If no mode is defined, explicitly use the previous default Always no-op no_keep_loc field should be removed Was n...
open! Stdune module Dune_project = Dune_engine.Dune_project module Source_tree = Dune_engine.Source_tree module Console = Dune_console module Sub_dirs = Dune_engine.Sub_dirs type rename_and_edit = { original_file : Path.Source.t ; extra_files_to_delete : Path.Source.t list ; new_file : Path.Source.t ; content...
7d91b0cee91d624f78b6e862670fadbc861ad70541eaa07a5243daed99095014
kraison/vivace-graph-v3
graph-class.lisp
(in-package :graph-db) (defvar *graphs* #+sbcl (make-hash-table :test 'equal :synchronized t) #+lispworks (make-hash-table :test 'equal :single-thread nil) #+ccl (make-hash-table :test 'equal :shared t)) (defclass graph () ((graph-name :accessor graph-name :initarg :graph-name) (graph-open-p :accesso...
null
https://raw.githubusercontent.com/kraison/vivace-graph-v3/cf2caaf26baccec9afd4d6a79375cd9ff5fe0613/graph-class.lisp
lisp
(in-package :graph-db) (defvar *graphs* #+sbcl (make-hash-table :test 'equal :synchronized t) #+lispworks (make-hash-table :test 'equal :single-thread nil) #+ccl (make-hash-table :test 'equal :shared t)) (defclass graph () ((graph-name :accessor graph-name :initarg :graph-name) (graph-open-p :accesso...
a43f853cab3468eda311387634fb861b521db980dfe01da2ee4ad9b5331db966
DaiF1/Oditor
vim_keymaps.ml
file : vim_keymaps.ml dependencies : editor.ml input.ml Bindings for vim like controls file: vim_keymaps.ml dependencies: editor.ml input.ml Bindings for vim like controls *) open Editor;; open Input;; open Files;; open Display;; open Insert;; open Movement;; (* Move cursor on screen b...
null
https://raw.githubusercontent.com/DaiF1/Oditor/9f49ce05281f3253c166475b21c282a1e36c99f7/editor/vim_keymaps.ml
ocaml
Move cursor on screen based on key pressed ** Command mode input ** Execute command stored in buffer and empty it. Return false if exit command entered ** Input Processing ** Special inputs Mode change inputs Control inputs Default input
file : vim_keymaps.ml dependencies : editor.ml input.ml Bindings for vim like controls file: vim_keymaps.ml dependencies: editor.ml input.ml Bindings for vim like controls *) open Editor;; open Input;; open Files;; open Display;; open Insert;; open Movement;; let move_cursor key = ...
f25c657022d8bc101ec62f42b718aba5e6bdc17152a3976aa56b45518cef65cf
janestreet/async
async_quickcheck.ml
open! Core open! Async_kernel open Deferred.Infix module Generator = Quickcheck.Generator module Observer = Quickcheck.Observer module Shrinker = Quickcheck.Shrinker module Configure (Config : Quickcheck.Quickcheck_config) = struct include Quickcheck.Configure (Config) let shrink_error ~shrinker ~shrink_count ~f ...
null
https://raw.githubusercontent.com/janestreet/async/118c0b4a39abd904e4a09bd3289c903058923e0a/async_quickcheck/src/async_quickcheck.ml
ocaml
open! Core open! Async_kernel open Deferred.Infix module Generator = Quickcheck.Generator module Observer = Quickcheck.Observer module Shrinker = Quickcheck.Shrinker module Configure (Config : Quickcheck.Quickcheck_config) = struct include Quickcheck.Configure (Config) let shrink_error ~shrinker ~shrink_count ~f ...
fe2a3a5af3d9a8c67c13b7f3759b0544437ad2ffa66aa49bb07e72774f63f6e7
LightTable/LightTable
clients.cljs
(ns lt.objs.sidebar.clients "Provide sidebar for (dis)connecting to a client" (:require [lt.object :as object] [lt.objs.clients :as clients] [lt.objs.sidebar :as sidebar] [lt.objs.command :as cmd] [lt.objs.context :as ctx] [lt.objs.clients.tcp :as tcp] ...
null
https://raw.githubusercontent.com/LightTable/LightTable/3b36b7bbf3737e1fdace5beb72b92f2d5fbe01e7/src/lt/objs/sidebar/clients.cljs
clojure
(ns lt.objs.sidebar.clients "Provide sidebar for (dis)connecting to a client" (:require [lt.object :as object] [lt.objs.clients :as clients] [lt.objs.sidebar :as sidebar] [lt.objs.command :as cmd] [lt.objs.context :as ctx] [lt.objs.clients.tcp :as tcp] ...
e2b135bf1aa9284e0a59aa0bb5b04f2a33852448e02341e3b43e9c069c07ebe7
gabebw/croniker
ChooseTimezone.hs
module Handler.ChooseTimezone ( getChooseTimezoneR ) where import Import import Handler.UpdateUser (timezoneForm) getChooseTimezoneR :: Handler Html getChooseTimezoneR = do (Entity userId user) <- requireAuth (tzWidget, tzEnc) <- generateFormPost (timezoneForm user) defaultLayout $ do set...
null
https://raw.githubusercontent.com/gabebw/croniker/89f081738c229a3302af3b0123fea208bccbda11/Handler/ChooseTimezone.hs
haskell
module Handler.ChooseTimezone ( getChooseTimezoneR ) where import Import import Handler.UpdateUser (timezoneForm) getChooseTimezoneR :: Handler Html getChooseTimezoneR = do (Entity userId user) <- requireAuth (tzWidget, tzEnc) <- generateFormPost (timezoneForm user) defaultLayout $ do set...
6c76422c703688ac38c790a5ccc6d15eea62b1c7dae2d1075dc55311c341fcb7
vyorkin/tiger
unique.ml
(* see #L26 *) open Ppx_compare_lib.Builtin type t = int [@@deriving compare, equal, show] let mk = let n = ref (-1) in fun () -> incr n; !n let to_string = Printf.sprintf "#%d"
null
https://raw.githubusercontent.com/vyorkin/tiger/54dd179c1cd291df42f7894abce3ee9064e18def/chapter8/lib/unique.ml
ocaml
see #L26
open Ppx_compare_lib.Builtin type t = int [@@deriving compare, equal, show] let mk = let n = ref (-1) in fun () -> incr n; !n let to_string = Printf.sprintf "#%d"
77673584e9b48bbcd38b4241993592494d62fd35beca7545cd05923cdef5a792
javalib-team/sawja
iter2.mli
* This file is part of SAWJA * Copyright ( c)2010 ( INRIA ) * * This program is free software : you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation , either version 3 of * the License , or ( at your option ) a...
null
https://raw.githubusercontent.com/javalib-team/sawja/da39f9c1c4fc52a1a1a6350be0e39789812b6c00/src/dataflow_analyses/iter2.mli
ocaml
* gives to each variable a string representation (for debug) * gives to each variable an unique hash value * bottom element * binary least upper bound * partial order test * normalize after each join (identity is correct) * evaluates a transfer function * constraints on which iterate * [run manager] computes the...
* This file is part of SAWJA * Copyright ( c)2010 ( INRIA ) * * This program is free software : you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation , either version 3 of * the License , or ( at your option ) a...
49c4ded5b6f0f33a416d4d2dddaed55bd6c114a647da9f76256aad7707305351
willghatch/racket-rash
test-mixed-pipeline.rkt
#lang racket/base (require "../../mixed-pipeline.rkt") (module+ test (require rackunit "test-pipeline.rkt" racket/string ) (check-equal? (run-pipeline (object-pipeline-member-spec (λ () "testing\nhello\nrunning")) (object-pipeline-member-spec (λ (arg) (string-upcase arg))) ;(u-pipelin...
null
https://raw.githubusercontent.com/willghatch/racket-rash/c40c5adfedf632bc1fdbad3e0e2763b134ee3ff5/shell-pipeline/private/test/test-mixed-pipeline.rkt
racket
(u-pipeline-member-spec (list "grep" "-i" "ing") null-redirect)
#lang racket/base (require "../../mixed-pipeline.rkt") (module+ test (require rackunit "test-pipeline.rkt" racket/string ) (check-equal? (run-pipeline (object-pipeline-member-spec (λ () "testing\nhello\nrunning")) (object-pipeline-member-spec (λ (arg) (string-upcase arg))) (composite-...
2d88b0d7701f50e0323fdda042de5ed2334f2b3e035317272cf0ca17f30ed0db
Tavistock/lseq-tree
lseq_node_test.cljc
(ns lseq-tree.lseq-node-test (:require #?(:clj [clojure.test :refer [are is testing deftest]] :cljs [cljs.test :refer-macros [are is testing deftest]]) [lseq-tree.triple :refer [triple]] [lseq-tree.lseq-node :refer :all])) ; helpers (defn t [n] (triple n n n)) (deftest constru...
null
https://raw.githubusercontent.com/Tavistock/lseq-tree/4b75e43477fdeb421c5bf56f65be71c108378673/test/cljc/lseq_tree/lseq_node_test.cljc
clojure
helpers
(ns lseq-tree.lseq-node-test (:require #?(:clj [clojure.test :refer [are is testing deftest]] :cljs [cljs.test :refer-macros [are is testing deftest]]) [lseq-tree.triple :refer [triple]] [lseq-tree.lseq-node :refer :all])) (defn t [n] (triple n n n)) (deftest construction (t...
4cce3a8d47203880b61d4bb568b1eaa8a0d950ea57c7e6ade8865f39a6e63ce2
alphagov/govuk-guix
elasticsearch.scm
(define-module (gds services utils databases elasticsearch) #:use-module (ice-9 match) #:use-module (guix gexp) #:use-module (guix records) #:use-module (gnu packages databases) #:use-module (gnu packages compression) #:export (<elasticsearch-connection-config> elasticsearch-connection-config ...
null
https://raw.githubusercontent.com/alphagov/govuk-guix/dea8c26d2ae882d0278be5c745e23abb25d4a4e2/gds/services/utils/databases/elasticsearch.scm
scheme
(define-module (gds services utils databases elasticsearch) #:use-module (ice-9 match) #:use-module (guix gexp) #:use-module (guix records) #:use-module (gnu packages databases) #:use-module (gnu packages compression) #:export (<elasticsearch-connection-config> elasticsearch-connection-config ...
6eb129d9f855977cde6220b91dce9112b1c7b4ee03939174a936dee2c004774a
otto-de-legacy/machroput
checks.clj
(ns de.otto.machroput.marathon.checks (:require [de.otto.machroput.marathon.connection :as mc])) (defprotocol MarathonDeploymentCheckApi (with-app-version-check [self fn]) (with-marathon-task-health-check [self]) (with-marathon-app-version-check [self]) (with-deployment-stopped-check [self])) (defn- fcheck ...
null
https://raw.githubusercontent.com/otto-de-legacy/machroput/5bf000bc9408d440babfd75e73d777819e65e50d/src/de/otto/machroput/marathon/checks.clj
clojure
(ns de.otto.machroput.marathon.checks (:require [de.otto.machroput.marathon.connection :as mc])) (defprotocol MarathonDeploymentCheckApi (with-app-version-check [self fn]) (with-marathon-task-health-check [self]) (with-marathon-app-version-check [self]) (with-deployment-stopped-check [self])) (defn- fcheck ...
f2be9ef7eb1517fc82ef9fba8e8da74b21561461a804ebf0523b6b8d1a14cd33
brendanhay/gogol
Patch.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-shopping-content/gen/Gogol/ShoppingContent/Content/Repricingrules/Patch.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated * Resource ** Constructing a Request /See:/ 'newContentRepricingrulesPatch' smart constructor. | V1 error format. | OAuth access token. | Required. The id of the merchant who owns the repricing rule. | Multipart request me...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
fa7cd5d44b1e2032f459ad25d9e45407f224aeac85b0f7c6f5374c5a0fb0b6a0
15Galan/asignatura-204
MaxiphobicHeapDemo.hs
------------------------------------------------------------------------------- Demos for -- Data Structures . en Informática . UMA . , 2012 ------------------------------------------------------------------------------- module Demos.Heap.MaxiphobicHeapDemo where import Data.List(nub) import DataStructures...
null
https://raw.githubusercontent.com/15Galan/asignatura-204/894f33ff8e0f52a75d8f9ff15155c656f1a8f771/Pr%C3%A1cticas/Demos/Heap/MaxiphobicHeapDemo.hs
haskell
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
Demos for Data Structures . en Informática . UMA . , 2012 module Demos.Heap.MaxiphobicHeapDemo where import Data.List(nub) import DataStructures.Heap.MaxiphobicHeap import DataStructures.Util.Random import DataStructures.Graphics.DrawTrees drawHeap :: (Show a) => Heap a -> IO () drawHeap = drawOn "Maxipho...
de9626e47c855ecd4d261febc32acd1383632dc7167457d6c0eea6213b8727a0
BekaValentine/SimpleFP
Program.hs
{-# OPTIONS -Wall #-} module Quasiquote.Core.Program where import Data.List (intercalate) import Parens import Plicity import Quasiquote.Core.ConSig import Quasiquote.Core.Term -- Term Declarations data TermDeclaration = TermDeclaration String Term Term | WhereDeclaration String Term [([Plicity],([Pattern],[...
null
https://raw.githubusercontent.com/BekaValentine/SimpleFP/3cff456be9f0b99509e5cbe809be1055009b32df/src/Quasiquote/Core/Program.hs
haskell
# OPTIONS -Wall # Term Declarations Type Declarations Programs
module Quasiquote.Core.Program where import Data.List (intercalate) import Parens import Plicity import Quasiquote.Core.ConSig import Quasiquote.Core.Term data TermDeclaration = TermDeclaration String Term Term | WhereDeclaration String Term [([Plicity],([Pattern],[String],Term))] | LetFamilyDeclaration St...
b7b825afd948ba487a91db0d7bc0ded68afcf65d0d0353baa4cfa5a50f7070fb
objecthub/swift-lispkit
Covid.scm
;;; COVID-19 statistics per country ;;; ;;; This is a suite of tools: - to download COVID-19 metrics from the GitHub respository maintained by Johns Hopkins University , ;;; - to convert them into a format stored on local disk, - to upload the data into a SQLite database , ;;; - to query the database ...
null
https://raw.githubusercontent.com/objecthub/swift-lispkit/a952f80bb85e6fd084770033141ed8edd2f46500/Sources/LispKit/Resources/Examples/Covid.scm
scheme
COVID-19 statistics per country This is a suite of tools: - to convert them into a format stored on local disk, - to query the database for per-country statistics, and - to illustrate the results by saving various graphs in a PDF file. This example code makes use of a whole range of LispKit libraries: `(l...
- to download COVID-19 metrics from the GitHub respository maintained by Johns Hopkins University , - to upload the data into a SQLite database , 2 . Download all data from GitHub . This function does not expect an empty directory . ( download - daily - metrics " ~/Desktop / covid " ) 3 . R...
3755193a28a54169e752263770bf1901e4ea3bc100498fe5dc7ccaca50dc687a
patoline/patotex
LatexAst_iterator.ml
SPDX - License - Identifier : GPL-3.0 * Inspecting the LaTeX AST with open recursion . The { ! : default_iterator } traverses a syntax tree without actually doing anything . One would typically build his own iterator using { ! : default_iterator } and override handlers for some syntax items . The {!val:de...
null
https://raw.githubusercontent.com/patoline/patotex/6023951964cca08be1548672ce69cc8f62e5cdaf/LatexAst_iterator.ml
ocaml
* FIXME
SPDX - License - Identifier : GPL-3.0 * Inspecting the LaTeX AST with open recursion . The { ! : default_iterator } traverses a syntax tree without actually doing anything . One would typically build his own iterator using { ! : default_iterator } and override handlers for some syntax items . The {!val:de...
40fa7673b08f3e68952d8605abcc14603e978ae3dc24f1baca5d2987342d5325
csabahruska/jhc-components
Noodle.hs
module Grin.Noodle where -- various routines for manipulating and exploring grin code. import Control.Monad.Writer import qualified Data.Set as Set import C.Prims import Debug.Trace import Grin.Grin import Options(flint) import StringTable.Atom(Atom()) import Support.CanType import Support.FreeVars import Support.Ti...
null
https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-grin/src/Grin/Noodle.hs
haskell
various routines for manipulating and exploring grin code. ------------------------ examining and reporting ------------------------ | Is a Val constant? NOPs will not produce any code at run-time so we can tail-call through them. omittable because if we don't use the returned gc context, then we don't need to pus...
module Grin.Noodle where import Control.Monad.Writer import qualified Data.Set as Set import C.Prims import Debug.Trace import Grin.Grin import Options(flint) import StringTable.Atom(Atom()) import Support.CanType import Support.FreeVars import Support.Tickle import Util.GMap import Util.Gen import Util.HasSize impo...
70f9b9918f71188cc22a1c0498f704f260e74f3bbb768188264289d1906506da
sweirich/pi-forall
Arbitrary.hs
-- | This module is for testing the parser/pretty printer. -- We would like to satisfy the following roundtrip property: * if we generate a random AST term and print it , then it should parse back to an alpha - equivalent term module Arbitrary where import qualified Data.Set as Set import Test.QuickCheck ...
null
https://raw.githubusercontent.com/sweirich/pi-forall/93de2eee777c9123bf67534b7b8453656370542d/version3/src/Arbitrary.hs
haskell
| This module is for testing the parser/pretty printer. We would like to satisfy the following roundtrip property: | Round trip property: a given term prints then parses to the same term. View random terms ------------------------------------------------------------------------------------------------- Generator...
* if we generate a random AST term and print it , then it should parse back to an alpha - equivalent term module Arbitrary where import qualified Data.Set as Set import Test.QuickCheck ( elements, frequency, sized, Arbitrary(arbitrary), Gen ) import qualified Test.QuickCheck as QC import qualified Unbound....
041a3b1475dcebd1edf2bd1c3232c40d0c627bbdeb7198d80b1d281775bfeae9
JuneKelly/hicdown
main.clj
(ns wtf.halt.hicdown.main (:require [wtf.halt.hicdown :as hicdown] [clojure.string :as s] [clojure.tools.cli :refer [parse-opts]] [clojure.pprint :as pp]) (:gen-class)) (defn read-stdin [] (s/join "\n" (line-seq (java.io.BufferedReader. *in*)))) (defn do-parse [] (-> (read-...
null
https://raw.githubusercontent.com/JuneKelly/hicdown/20479d48074059c396cdf7fc5b357a620a852d8f/src/wtf/halt/hicdown/main.clj
clojure
Exit with help message Errors? Actions failed custom validation => exit with usage summary
(ns wtf.halt.hicdown.main (:require [wtf.halt.hicdown :as hicdown] [clojure.string :as s] [clojure.tools.cli :refer [parse-opts]] [clojure.pprint :as pp]) (:gen-class)) (defn read-stdin [] (s/join "\n" (line-seq (java.io.BufferedReader. *in*)))) (defn do-parse [] (-> (read-...
0b503df4635897d80da5a988db5d212979d1e13ad0e0866f9ae8da4f643ca6eb
Bike/mother
profile.lisp
;;;; profile.lisp ;;;; terrible profiling (in-package #:mother) (defvar *profiling*) (defun start-profiling () (setf *profiling* (cons (make-hash-table :test 'eq) (make-hash-table :test 'eq))) (values)) (defun stop-profiling () (makunbound '*profiling*) (values)) (defmethod combine :around ((operator opera...
null
https://raw.githubusercontent.com/Bike/mother/be571bcc8ed2a9f6c65a5d73e5e711509499420b/profile.lisp
lisp
profile.lisp terrible profiling
(in-package #:mother) (defvar *profiling*) (defun start-profiling () (setf *profiling* (cons (make-hash-table :test 'eq) (make-hash-table :test 'eq))) (values)) (defun stop-profiling () (makunbound '*profiling*) (values)) (defmethod combine :around ((operator operative) operands environment) (if (boundp ...