_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
0a2f4f3efc43607cf6ae2d634d4d6972e49674a024156625e021ff5f0b1ee6a5
patricoferris/ocaml-multicore-monorepo
min_clock_jsoo.ml
--------------------------------------------------------------------------- Copyright ( c ) 2015 The ptime programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/ptime/test-jsoo/min_clock_jsoo.ml
ocaml
--------------------------------------------------------------------------- Copyright ( c ) 2015 The ptime programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------...
cd554c8d9ce0b92a65c5d5d9b3ec22f2679a1f998449d3800c2792e34a3d01bd
mariari/Misc-Lisp-Scripts
test.lisp
(defun triangle-using-cond (number) (cond ((<= number 0) 0) ((= number 1) 1) ((> number 1) (+ number (triangle-using-cond (1- number)))))) (triangle-using-cond 4)
null
https://raw.githubusercontent.com/mariari/Misc-Lisp-Scripts/acecadc75fcbe15e6b97e084d179aacdbbde06a8/Books/PracticalCommonLisp/Chapter1/test.lisp
lisp
(defun triangle-using-cond (number) (cond ((<= number 0) 0) ((= number 1) 1) ((> number 1) (+ number (triangle-using-cond (1- number)))))) (triangle-using-cond 4)
9ba492174812e30f880e67af8fe4a3af5c9bd262edd79f55e1562adad35f95b3
rd--/hsc3
cOsc.help.hs
cOsc ; fixed beat frequency let tbl = asLocalBuf (Gen.sine1Tbl 256 [1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10]) in cOsc ar tbl 200 0.7 * 0.1 cOsc ; modulate beat frequency with mouseX let tbl = asLocalBuf (Gen.sine1Tbl 256 [1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10]) in cOsc ar tbl 200 (mouseX kr 0 4 L...
null
https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Ugen/cOsc.help.hs
haskell
-- ; setup ; allocate and fill wavetable -- ; drawings
cOsc ; fixed beat frequency let tbl = asLocalBuf (Gen.sine1Tbl 256 [1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10]) in cOsc ar tbl 200 0.7 * 0.1 cOsc ; modulate beat frequency with mouseX let tbl = asLocalBuf (Gen.sine1Tbl 256 [1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10]) in cOsc ar tbl 200 (mouseX kr 0 4 L...
eb21a5a61e4860e41a2ae591633cd42648d6b8f053e1605662670163fcd22127
pauloborba/plc
FuncoesDeAltaOrdemFilterFold.hs
module FuncoesDeAltaOrdemFilterFold where import IntroducaoAProgramacaoFuncionalEHaskell import FuncoesDeAltaOrdemAplicacaoParcialMap -- Relembrar a definição de map, e exemplos de funções definidas em termos de map. . Estudar os vários exemplos e exercícios nos slides . -- * maprr : : x - > y - > z ...
null
https://raw.githubusercontent.com/pauloborba/plc/34a6f725019e65fe1fff0c772bbb0b32315b41b9/src/FuncoesDeAltaOrdemFilterFold.hs
haskell
Relembrar a definição de map, e exemplos de funções definidas em termos de map. * da original. elementos… alunos :: x -> y -> z alunos :: x -> y -> [w] alunos :: x -> y -> [(a,b)] alunos :: x -> [(a,b)] -> [(a,b)] alunos :: (b -> Bool) -> [(a,b)] -> [(a,b)] alunos maior7 [("Emanoel",7)] = ("Emanoel",7):[] a...
module FuncoesDeAltaOrdemFilterFold where import IntroducaoAProgramacaoFuncionalEHaskell import FuncoesDeAltaOrdemAplicacaoParcialMap . Estudar os vários exemplos e exercícios nos slides . maprr : : x - > y - > z maprr : : x - > [ w ] - > [ v ] maprr : : x - > [ w ] - > [ v ] { e : : w / a ...
d95d2cd26cfddedb2a6ba69d034c3ca2052396701f408d082ba2530f94cc9d90
stuartsierra/altlaw-backend
jruby.clj
(ns org.altlaw.test.jruby (:use clojure.contrib.test-is org.altlaw.util.jruby)) (deftest test-conversion-types (is (instance? java.lang.Number (convert-jruby (eval-jruby "3.14")))) (is (instance? java.lang.Boolean (convert-jruby (eval-jruby "true")))) (is (instance? ja...
null
https://raw.githubusercontent.com/stuartsierra/altlaw-backend/c2ceeb0be2d622ca921339be06de5485733451bc/src/org/altlaw/test/jruby.clj
clojure
(ns org.altlaw.test.jruby (:use clojure.contrib.test-is org.altlaw.util.jruby)) (deftest test-conversion-types (is (instance? java.lang.Number (convert-jruby (eval-jruby "3.14")))) (is (instance? java.lang.Boolean (convert-jruby (eval-jruby "true")))) (is (instance? ja...
b8666ea751c0ff3292f69c6913928a283ce734ada1b44b2a91cf097bd3b570ef
tnelson/Forge
desugar.rkt
#lang racket ;forge/core Desugaring functions for Amalgam ; (full AST) -> (restricted AST without stuff like implies) ; Note: These functions maintain an environment of ; quantified variables to aid general functionality ; We are bringing the input into our core language ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; W...
null
https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/amalgam/desugar/desugar.rkt
racket
forge/core (full AST) -> (restricted AST without stuff like implies) Note: These functions maintain an environment of quantified variables to aid general functionality We are bringing the input into our core language Warning: ast.rkt exports (e.g.) "and". This is the macro that produces an "and" formula! ...
Desugaring functions for Amalgam (require "../lift-bounds/lift-bounds.rkt") (require "desugar_helpers.rkt") (require "../substitutor/substitutor.rkt") (provide desugarFormula desugarExpr desugarInt) (require (prefix-in @ racket)) (require (prefix-in @ (only-in racket ->))) (require (prefix-in forge: forge/sigs-st...
f68d09b08bc7a266da329298ef5084186e2fddf11a553262e00d0689e9534761
Vincit/venia
exception.cljc
(ns venia.exception) (defmulti throw-ex :venia/ex-type) #?(:clj (defmethod throw-ex :venia/spec-validation [data] (throw (ex-info "Invalid query data" data)))) #?(:cljs (defmethod throw-ex :venia/spec-validation [data] (throw (js/Error. (str "Invalid query data " data))))) ...
null
https://raw.githubusercontent.com/Vincit/venia/0335a25559ce2ed61865fc9c641bfaee792b3096/src/venia/exception.cljc
clojure
(ns venia.exception) (defmulti throw-ex :venia/ex-type) #?(:clj (defmethod throw-ex :venia/spec-validation [data] (throw (ex-info "Invalid query data" data)))) #?(:cljs (defmethod throw-ex :venia/spec-validation [data] (throw (js/Error. (str "Invalid query data " data))))) ...
1fe77c54b462cd187c08c5f098ff31acbf66afa3eea6fe6bb4429ea677d3c0b8
acl2/acl2
guard-theorem-no-simplify-dollar.lisp
Standard System Library ; Copyright ( C ) 2023 Kestrel Institute ( ) ; License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 . ; Author : ( ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-package "ACL2") (include-book "guard-theorem-no-simp...
null
https://raw.githubusercontent.com/acl2/acl2/6fd484a7de945d1882c21fa68da6f48521012c7b/books/kestrel/std/system/guard-theorem-no-simplify-dollar.lisp
lisp
Standard System Library Copyright ( C ) 2023 Kestrel Institute ( ) License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 . Author : ( ) (in-package "ACL2") (include-book "guard-theorem-no-simplify") (include-book "std/util/define" :dir :system) (define guard-theorem-no-simpli...
a22db51615be55882725a7c2b1b4f102003696d7c00380be1f19a7da0d913bdd
WorksHub/client
common.cljs
(ns wh.company.common (:require [ajax.json :as ajax-json] [camel-snake-kebab.core :as c] [clojure.string :as str] [wh.common.data :as data] [wh.common.fx.google-maps :as google-maps])) (defn get-company-suggestions [n success] {:method :get :uri "" :params ...
null
https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/client/src/wh/company/common.cljs
clojure
(ns wh.company.common (:require [ajax.json :as ajax-json] [camel-snake-kebab.core :as c] [clojure.string :as str] [wh.common.data :as data] [wh.common.fx.google-maps :as google-maps])) (defn get-company-suggestions [n success] {:method :get :uri "" :params ...
16a83024dea14777c4d97f9b793f5ac051f7a94bdfbea39d95194788b3bf6dda
BinaryAnalysisPlatform/bap
bap_tid_graph.ml
open Core_kernel[@@warning "-D"] open Regular.Std open Graphlib.Std open Bap_ir module G = Graphlib.Make(Tid)(Tid) let of_sub sub = Term.enum blk_t sub |> Seq.fold ~init:G.empty ~f:(fun g src -> let sid = Term.tid src in let g = G.Node.insert sid g in Term.enum jmp_t src |> Seq.fold ~init:g ~f:(f...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/bap_types/bap_tid_graph.ml
ocaml
open Core_kernel[@@warning "-D"] open Regular.Std open Graphlib.Std open Bap_ir module G = Graphlib.Make(Tid)(Tid) let of_sub sub = Term.enum blk_t sub |> Seq.fold ~init:G.empty ~f:(fun g src -> let sid = Term.tid src in let g = G.Node.insert sid g in Term.enum jmp_t src |> Seq.fold ~init:g ~f:(f...
fde9edb14fc40288d442af908d0a66b5814a7afee2cd4475e4521a4894eb4b25
aumouvantsillage/Hydromel-lang
vcd.rkt
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. #lang racket (require threading (only-in "numeric.rkt" integer->bit-string) (only-in "types.rkt" minimize abstract-integer-type array-ty...
null
https://raw.githubusercontent.com/aumouvantsillage/Hydromel-lang/914f31409654289f362a9b3d47bcdcd42e391448/hydromel/lib/vcd.rkt
racket
A VCD waveform definition contains the "short" name of a signal, its bit width, and a list of values. Dump the list of variable definitions of an instance. This function will traverse the hierarchy of instances and create a VCD scope statement for each inner instance. It returns a list of waveforms. Open a new s...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. #lang racket (require threading (only-in "numeric.rkt" integer->bit-string) (only-in "types.rkt" minimize abstract-integer-type array-ty...
361badef99394e4536a0cbadcb2c9892c63d8e560bab39ba14f6cf807d41c368
8c6794b6/haskell-sc-scratch
DroneBass.hs
# LANGUAGE NoMonomorphismRestriction # | Module : $ Header$ CopyRight : ( c ) 8c6794b6 License : : 8c6794b6 Stability : unstable Portability : non - portable ( Rank2Types , FlexibleContexts ) Module to play with sustaining bass . Module : $Header$ CopyRight : (c) 8c6794b6 Li...
null
https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/hsc3-lepton/src/Scratch/Pattern/DroneBass.hs
haskell
I I i ii II iii III IV iv V v vi VI vii-5 dim dim dim I+ I i bp02 I i ii II iii III IV iv V v vi VI vii-5 dim dim dim I I i ii II iii III IV iv V v vi VI vii-5 dim dim dim I+ I i bp02 I i ii II iii III IV iv V v vi...
# LANGUAGE NoMonomorphismRestriction # | Module : $ Header$ CopyRight : ( c ) 8c6794b6 License : : 8c6794b6 Stability : unstable Portability : non - portable ( Rank2Types , FlexibleContexts ) Module to play with sustaining bass . Module : $Header$ CopyRight : (c) 8c6794b6 Li...
87f9d294f3f35e7eb8a0733dfb5788ac77007ce4d3824e2f67f4c80a3d5ac7cf
melange-re/melange
polymorphism_test.mli
val map : ('a -> 'b [@bs]) -> 'a list -> 'b list
null
https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/polymorphism_test.mli
ocaml
val map : ('a -> 'b [@bs]) -> 'a list -> 'b list
f637d86dfb72e773ffe47a7e200051c2bea9ccaad599360fe0249d4ea4db5ccb
DomainDrivenArchitecture/dda-managed-vm
java.clj
Licensed to the Apache Software Foundation ( ASF ) under one ; or more contributor license agreements. See the NOTICE file ; distributed with this work for additional information ; regarding copyright ownership. The ASF licenses this file to you under the Apache License , Version 2.0 ( the ; "License"); you may not...
null
https://raw.githubusercontent.com/DomainDrivenArchitecture/dda-managed-vm/ed44f97ef89468a4dd4bc514439df3f936c86d26/main/src/dda/pallet/dda_managed_vm/infra/java.clj
clojure
or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file "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 b...
Licensed to the Apache Software Foundation ( ASF ) under one to you under the Apache License , Version 2.0 ( the distributed under the License is distributed on an " AS IS " BASIS , (ns dda.pallet.dda-managed-vm.infra.java (:require [clojure.tools.logging :as logging] [schema.core :as s] [pallet.act...
d7c9ca828f1973e2f283e69c5368b4e691771d3a60bf1fbc473f0c506efb2fd3
programaker-project/Programaker-Core
automate_configuration.erl
%%%------------------------------------------------------------------- %% @doc automate_configuration module %% @end %%%------------------------------------------------------------------- -module(automate_configuration). -export([ get_table_wait_time/0 , get_program_logs_watermarks/0 , get_frontend_ro...
null
https://raw.githubusercontent.com/programaker-project/Programaker-Core/ef10fc6d2a228b2096b121170c421f5c29f9f270/backend/apps/automate_configuration/src/automate_configuration.erl
erlang
------------------------------------------------------------------- @doc automate_configuration module @end ------------------------------------------------------------------- ==================================================================== ==================================================================== pee...
-module(automate_configuration). -export([ get_table_wait_time/0 , get_program_logs_watermarks/0 , get_frontend_root_url/0 , get_backend_api_info/0 , get_sync_peers/0 , get_sync_primary/0 , is_node_primary/1 , asset_directory/1 ]). -define(APPLICATION, ...
864773df1fbebe9e3a644e71102992a56993d62dfd5d1eb6394245edf72b8557
nilenso/time-tracker
db_test.clj
(ns time-tracker.clients.db-test (:require [clojure.java.jdbc :as jdbc] [clojure.test :refer :all] [time-tracker.clients.db :as clients-db] [time-tracker.clients.test-helpers :as helpers] [time-tracker.db :as db] [time-tracker.fixtures :as fixtures])) (use-fixtures :once fixtures/init!) (use-fixtur...
null
https://raw.githubusercontent.com/nilenso/time-tracker/054d0dc6d6b89a4ed234d8f0b0a260b6deeef9e3/test/clj/time_tracker/clients/db_test.clj
clojure
(ns time-tracker.clients.db-test (:require [clojure.java.jdbc :as jdbc] [clojure.test :refer :all] [time-tracker.clients.db :as clients-db] [time-tracker.clients.test-helpers :as helpers] [time-tracker.db :as db] [time-tracker.fixtures :as fixtures])) (use-fixtures :once fixtures/init!) (use-fixtur...
55a38549174414c0c3adb85e6521ac27c10f0ad652ed96c650847b86cb578c67
abtv/tech-radar
tweets.clj
(ns tech-radar.database.tweets (:require [clojure.string] [clojure.java.jdbc :as jdbc] [honeysql.helpers :refer [insert-into columns values]] [honeysql.format :as format] [tech-radar.utils.datab...
null
https://raw.githubusercontent.com/abtv/tech-radar/167c1c66ff2cf7140fe1de247d67a7134b0b1748/src/clj/tech_radar/database/tweets.clj
clojure
(ns tech-radar.database.tweets (:require [clojure.string] [clojure.java.jdbc :as jdbc] [honeysql.helpers :refer [insert-into columns values]] [honeysql.format :as format] [tech-radar.utils.datab...
3b970e294c164063d60352c8c6e163e5614ea692fc24876863916af5a104cd3e
mbj/mhs
JSON.hs
module Test.JSON where import Data.Bounded.Prelude import Test.Tasty import Test.Tasty.HUnit import qualified Data.Aeson as JSON import qualified Data.Aeson.Types as JSON acceptJSONText :: forall a . (Eq a, JSON.FromJSON a, JSON.ToJSON a, Show a) => (Text, a) -> TestTree acceptJSONText (input, expected) ...
null
https://raw.githubusercontent.com/mbj/mhs/3c0fe9e28c24ba633ed51ccbeeb154d6f2f82292/bounded/test/Test/JSON.hs
haskell
module Test.JSON where import Data.Bounded.Prelude import Test.Tasty import Test.Tasty.HUnit import qualified Data.Aeson as JSON import qualified Data.Aeson.Types as JSON acceptJSONText :: forall a . (Eq a, JSON.FromJSON a, JSON.ToJSON a, Show a) => (Text, a) -> TestTree acceptJSONText (input, expected) ...
724b874fcdb4d096b075c839fce4c18f8d0009d2da7df10ee0ae2006ac9c96b9
quil-lang/quilc
sqisw-decomp-tests.lisp
(in-package #:cl-quil-tests) (defun make-non-2-sqiswap-coord () "Make a coordinate in the Weyl chamber as defined by Huang et al whose gate class cannot be covered by 2 SQISWAP gates." (let* ((x (random (/ pi 4.0d0))) (y (random x)) (x-y (- x y)) (r (if (<= y x-y) (return-from make-non-...
null
https://raw.githubusercontent.com/quil-lang/quilc/57b4bf61cc0a8a2236c2d6b89bd650b720ac30c2/tests/sqisw-decomp-tests.lisp
lisp
the rii commute rii(θ).rjj(θ) ~ SQISWAP when |θ| = π/4 and ii ≠ jj
(in-package #:cl-quil-tests) (defun make-non-2-sqiswap-coord () "Make a coordinate in the Weyl chamber as defined by Huang et al whose gate class cannot be covered by 2 SQISWAP gates." (let* ((x (random (/ pi 4.0d0))) (y (random x)) (x-y (- x y)) (r (if (<= y x-y) (return-from make-non-...
9bc64d59e14b27300a93d70c73c278c0b95531cce4ab5d254981a20a2a913e20
Frama-C/Frama-C-snapshot
TacCongruence.ml
(**************************************************************************) (* *) 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/TacCongruence.ml
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 ,...
cca6709bdc0a1d19d717c688ef3263a48054553eb9cd950cec5bf4a4c01f80e9
rubenbarroso/EOPL
6_6.scm
(load "/Users/ruben/Dropbox/EOPL/src/interps/r5rs.scm") (load "/Users/ruben/Dropbox/EOPL/src/interps/define-datatype.scm") (load "/Users/ruben/Dropbox/EOPL/src/interps/sllgen.scm") (load "/Users/ruben/Dropbox/EOPL/src/interps/6-top.scm") ;My version (define check-for-abstract-methods! (lambda (specifier methods clas...
null
https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/chapter6/6_6.scm
scheme
My version The authors version (Way much better an succinct)
(load "/Users/ruben/Dropbox/EOPL/src/interps/r5rs.scm") (load "/Users/ruben/Dropbox/EOPL/src/interps/define-datatype.scm") (load "/Users/ruben/Dropbox/EOPL/src/interps/sllgen.scm") (load "/Users/ruben/Dropbox/EOPL/src/interps/6-top.scm") (define check-for-abstract-methods! (lambda (specifier methods class-name) ...
954506bb66fcaa38d10eb616517b865878713a56658eb84c658dbeb6b11cec19
granule-project/granule
FirstParameter.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DefaultSignatures # # LANGUAGE TypeOperators # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # module Language.Granule.Syntax.FirstParameter where import GHC.Generics class FirstParameter a e | a -> e where getFirstParameter :: ...
null
https://raw.githubusercontent.com/granule-project/granule/aa869e0522ad961f6627e827055700c5fcabfc75/frontend/src/Language/Granule/Syntax/FirstParameter.hs
haskell
# OVERLAPPING # # OVERLAPPABLE #
# LANGUAGE DeriveGeneric # # LANGUAGE DefaultSignatures # # LANGUAGE TypeOperators # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # module Language.Granule.Syntax.FirstParameter where import GHC.Generics class FirstParameter a e | a -> e where getFirstParameter :: ...
9bf8cc32868ead07ee98c60b5450b3fd7ec7ebc7a819b4907022e3e6ba96fde4
cmars/sks-keyserver
sks_do.ml
(***********************************************************************) sks_do.ml - simple command - line tool for sending actions directly to sks_db and sks_recon processes (* *) Copyright ( C ) 2002 , 200...
null
https://raw.githubusercontent.com/cmars/sks-keyserver/d848c4852cb15585525772b6378670f8724a8f39/sks_do.ml
ocaml
********************************************************************* redistribute it and/or modify it under the terms of the GNU General ...
sks_do.ml - simple command - line tool for sending actions directly to sks_db and sks_recon processes Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 , 2011 , 2012 , 2013 and Contributors This file is part of SKS . S...
6b7a341e80f45e864eeefb9f180da5c09698dc8cd1b0b18346b0256b81e0b274
ecraven/r7rs-benchmarks
Ypsilon-prelude.scm
(import (rnrs) (rnrs mutable-pairs) (rnrs mutable-strings) (rnrs io simple) (srfi :19) (rnrs r5rs (6))) (define (current-second) (let ((d (current-date))) (+ (* 60 60 (date-hour d)) (* 60 (date-minute d)) (date-second d)))) (define (current-jiffy) (+ (current-second) (/ (date-nanosecond (current-dat...
null
https://raw.githubusercontent.com/ecraven/r7rs-benchmarks/cd6ea87a6fa7d20424449b5d08dcd5bf990f26e4/src/Ypsilon-prelude.scm
scheme
(import (rnrs) (rnrs mutable-pairs) (rnrs mutable-strings) (rnrs io simple) (srfi :19) (rnrs r5rs (6))) (define (current-second) (let ((d (current-date))) (+ (* 60 60 (date-hour d)) (* 60 (date-minute d)) (date-second d)))) (define (current-jiffy) (+ (current-second) (/ (date-nanosecond (current-dat...
f657b6692f0692e2c4ade36107e12c285ac1f06adee4aac1999767a26c4d8787
spawnfest/eep49ers
gen_fsm_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2019 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/stdlib/test/gen_fsm_SUITE.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 1996 - 2019 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(gen_fsm_SUITE). -include_lib("common_test/include/ct.hrl"). -export([all/0, suite/0,groups/0,init_per_suite...
7dde6ab328307320302be77cc71f19a8046bd67007feeffe844f2c91d117e8ab
MarkCurtiss/sicp
load-eceval-compiler.scm
EVALUATOR FROM SECTION 5.4 OF ;;;; STRUCTURE AND INTERPRETATION OF COMPUTER PROGRAMS, WITH ;;;; ALL THE SUPPORTING CODE IT NEEDS IN ORDER TO RUN. ;;;;This is like load-eceval.scm except that it loads the version ;;;; of eceval that interfaces with compiled code ;;;;It doesn't load the compiler itself -- loading...
null
https://raw.githubusercontent.com/MarkCurtiss/sicp/8b55a3371458014c815ba8792218b6440127ab40/chapter_5_exercises/book_code/load-eceval-compiler.scm
scheme
STRUCTURE AND INTERPRETATION OF COMPUTER PROGRAMS, WITH ALL THE SUPPORTING CODE IT NEEDS IN ORDER TO RUN. This is like load-eceval.scm except that it loads the version of eceval that interfaces with compiled code It doesn't load the compiler itself -- loading the compiler is up to you. **NB** The actual "load" call...
EVALUATOR FROM SECTION 5.4 OF
33fa9971061cb9d5b1b70009bef8839a3362601c0fc8b87e2279314c12da859d
pat227/ocaml-db-model
coreint32_extended.mli
Unfortunately Core . Int32 module does not define sexp , yojson , so we have to . module CoreInt32_extended : sig include (module type of Core.Int32) val show : t -> string val to_yojson : t -> Yojson.Safe.t val of_yojson : Yojson.Safe.t -> t Ppx_deriving_yojson_runtime.error_or end
null
https://raw.githubusercontent.com/pat227/ocaml-db-model/4983f6136027d47a4571b42f34296ab44978b761/src/lib/coreint32_extended.mli
ocaml
Unfortunately Core . Int32 module does not define sexp , yojson , so we have to . module CoreInt32_extended : sig include (module type of Core.Int32) val show : t -> string val to_yojson : t -> Yojson.Safe.t val of_yojson : Yojson.Safe.t -> t Ppx_deriving_yojson_runtime.error_or end
9710d3b11826aa2c50997c0a7f1f135c9c960c69909ec93e561a0a5952fe3d94
borkdude/jet
parse_opts_test.clj
(ns jet.parse-opts-test (:require [clojure.test :as test :refer [are deftest is testing]] [jet.main :refer [parse-opts]])) (defn opts-match? "Compare `short` & `long` options." [short long] (= (parse-opts short) (parse-opts long))) (defmacro opt-test "Helper macro to test command line options in ...
null
https://raw.githubusercontent.com/borkdude/jet/f62f84e8fcb211a4ab8dd2569f97f0a4d66cbeea/test/jet/parse_opts_test.clj
clojure
(ns jet.parse-opts-test (:require [clojure.test :as test :refer [are deftest is testing]] [jet.main :refer [parse-opts]])) (defn opts-match? "Compare `short` & `long` options." [short long] (= (parse-opts short) (parse-opts long))) (defmacro opt-test "Helper macro to test command line options in ...
81378a996152526aa17f2dcfa58e11c330d48f613990c3dfead3838467fb3c01
ocaml-sf/learn-ocaml-corpus
sat_forget_to_catch_UNSAT.ml
(* ------------------------------------------------------------------------------ *) (* Building formulae. *) let var x = FVar x let falsity = FConst false let truth = FConst true let const sense = if sense then truth else falsity (* [FConst sense] would work too, but would allocate memory *) let neg ...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/sat/wrong/sat_forget_to_catch_UNSAT.ml
ocaml
------------------------------------------------------------------------------ Building formulae. [FConst sense] would work too, but would allocate memory ------------------------------------------------------------------------------ Evaluating formulae. We assume [n < Sys.word_size - 1]. -----------------...
let var x = FVar x let falsity = FConst false let truth = FConst true let const sense = if sense then truth else falsity let neg f = match f with | FConst sense -> const (not sense) | FNeg f -> f | _ -> FNeg f let conn sense f1 f2 = match f1, f2 with | FConst sense', f | f...
7661a89257141fde5edb6fc513953392c4b87fa3beae573fe1224b535678b22b
gelisam/hawk
Cache.hs
{-# LANGUAGE PackageImports #-} -- | A generic caching interface. -- -- The intent is to support many concrete implementations, -- and to use specify caching policies using combinators. -- -- Note that even though we _support_ many concrete implementations, for simplicity we only provide one based on an association -...
null
https://raw.githubusercontent.com/gelisam/hawk/1775ab1cfea05e20d1b1a8c0a7b0fe6c4af4b7c5/src/Data/Cache.hs
haskell
# LANGUAGE PackageImports # | A generic caching interface. The intent is to support many concrete implementations, and to use specify caching policies using combinators. Note that even though we _support_ many concrete implementations, $setup holding the state of the cache. The combinators extend caches by addi...
for simplicity we only provide one based on an association - list . module Data.Cache where import Control.Monad import "mtl" Control.Monad.Trans import Control.Monad.Trans.State import Data.Maybe > > > let ( putStrLn xs ) > > return ( length xs ) > > > let cachedLength c xs = cached c xs ( verboseLength xs...
30551f448027dabf70b014ca0ad97c23521f843fa286064e2c1ce18054049088
autolwe/autolwe
Wf.ml
(* * Well-formedness of games. *) (* ** Imports and abbreviations *) open Abbrevs open Util open Expr open ExprUtils open Type open Game open Syms open Norm let mk_log level = mk_logger "Game.Wf" level "Wf.ml" let log_t = mk_log Bolt.Level.TRACE let _log_d = mk_log Bolt.Level.DEBUG let log_i = mk_log Bolt.Level.INFO ...
null
https://raw.githubusercontent.com/autolwe/autolwe/3452c3dae06fc8e9815d94133fdeb8f3b8315f32/src/Game/Wf.ml
ocaml
* Well-formedness of games. ** Imports and abbreviations ** Exceptions, state, helper functions * ----------------------------------------------------------------------- used names for variables, adversaries, and oracles product of nonzero-assumptions for field-exprs ** Well-formedness of expression...
open Abbrevs open Util open Expr open ExprUtils open Type open Game open Syms open Norm let mk_log level = mk_logger "Game.Wf" level "Wf.ml" let log_t = mk_log Bolt.Level.TRACE let _log_d = mk_log Bolt.Level.DEBUG let log_i = mk_log Bolt.Level.INFO exception Wf_var_undef of VarSym.t * expr * VarSym.S.t exception ...
ae102c72f76e324e1e72e560c922ac0bf919ebcce456dccd4ca4dc3cc028f1e1
lojic/LearningRacket
ex6a.rkt
#lang racket (require "../lojic.rkt") (require racket/date) (let* ([ age (string->number (gets "What is your current age? ")) ] [ retire-age (string->number (gets "At what age would you like to retire? ")) ] [ years-left (- retire-age age) ] [ current-year (date-year (current-date)) ] [ ret...
null
https://raw.githubusercontent.com/lojic/LearningRacket/eb0e75b0e16d3e0a91b8fa6612e2678a9e12e8c7/exercises-for-programmers/06-retirement-calculator/ex6a.rkt
racket
#lang racket (require "../lojic.rkt") (require racket/date) (let* ([ age (string->number (gets "What is your current age? ")) ] [ retire-age (string->number (gets "At what age would you like to retire? ")) ] [ years-left (- retire-age age) ] [ current-year (date-year (current-date)) ] [ ret...
676eee5e18003a0a4e022a4a9ffa637cd9029104cea01af36042c0bb38ba7a63
eareese/htdp-exercises
239.rkt
;;--------------------------------------------------------------------------------------------------- #lang htdp/isl Exercise 239 . A list of two items is another frequently used form of data in ISL programming . Here is data definition with two parameters : ;; A [List X Y] is a structure: ;; (cons X (cons Y '(...
null
https://raw.githubusercontent.com/eareese/htdp-exercises/a85ff3111d459dda0e94d9b463d01a09accbf9bf/part03-abstraction/239.rkt
racket
--------------------------------------------------------------------------------------------------- A [List X Y] is a structure: (cons X (cons Y '())) Instantiate this definition to describe the following classes of data: - pairs of Numbers, A [List N1 N2] is a structure: (cons Number (cons Number '())) A [...
#lang htdp/isl Exercise 239 . A list of two items is another frequently used form of data in ISL programming . Here is data definition with two parameters : - pairs of Numbers and 1Strings , and - pairs of and Booleans . (cons 0 (cons 12 '())) (cons 11 (cons "b" '())) ( cons String ( cons Boolean...
5530e0fb37b7244f2ca30f0111d78001ff19996bb871f3f3c809344634e3ac4c
elektronaut/advent-of-code
day07.clj
(ns advent-of-code.2020.07 (:require [clojure.string :as str])) (def lines (map #(str/replace % #".$" "") (str/split-lines (slurp "2020/day07/input.txt")))) (defn color [s] (last (re-find #"([\w\s]+) bags?" s))) (defn color-and-count [s] (let [match (re-find #"([\d]+) ([\w\s]+)" s) n (Integ...
null
https://raw.githubusercontent.com/elektronaut/advent-of-code/a8bb7bbadc8167ebb1df0d532493317705bb7f0d/2020/day07/day07.clj
clojure
(ns advent-of-code.2020.07 (:require [clojure.string :as str])) (def lines (map #(str/replace % #".$" "") (str/split-lines (slurp "2020/day07/input.txt")))) (defn color [s] (last (re-find #"([\w\s]+) bags?" s))) (defn color-and-count [s] (let [match (re-find #"([\d]+) ([\w\s]+)" s) n (Integ...
f5225c7bc2fb377e9049311da24e11062f50644660a198747dee5b4bfb794eeb
googleson78/fp-lab-2022-23
TicTacToeSpec.hs
-- because of matrix test formatting.. {- ORMOLU_DISABLE -} # LANGUAGE BlockArguments # # LANGUAGE ScopedTypeVariables # module TicTacToeSpec (ticTacToeSpec) where import Data.Foldable (for_) import Instances () import Matrix import TicTacToe import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.QuickChe...
null
https://raw.githubusercontent.com/googleson78/fp-lab-2022-23/0d5b8aa7a1c572352658cd41b082da6a29ad07ad/homeworks/draft-minmax/test/TicTacToeSpec.hs
haskell
because of matrix test formatting.. ORMOLU_DISABLE
# LANGUAGE BlockArguments # # LANGUAGE ScopedTypeVariables # module TicTacToeSpec (ticTacToeSpec) where import Data.Foldable (for_) import Instances () import Matrix import TicTacToe import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.QuickCheck (prop) import Utils import Data.List (sort) import Test.Q...
1deb9eca28bf062432e345443229dc29de54f54b127ff204abf1cbd10395a9b5
bobzhang/fan
metafn.ml
open Astfn class primitive = object method int = function | _loc -> (function | (i : int) -> (`Int (_loc, (string_of_int i)) :> Astf.ep)) method int32 = function | _loc -> (function | (i : int32) -> (`Int32 (_loc, (Int32.to_string i)) :> Astf.e...
null
https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/cold/metafn.ml
ocaml
open Astfn class primitive = object method int = function | _loc -> (function | (i : int) -> (`Int (_loc, (string_of_int i)) :> Astf.ep)) method int32 = function | _loc -> (function | (i : int32) -> (`Int32 (_loc, (Int32.to_string i)) :> Astf.e...
a31844c700320520af7d013ac0ae9612ae2362b1e0504213c89d40d438740f41
appleby/99-lisp-problems
p86.lisp
;;; (**) Node degree and graph coloration ;;; ;;; a) Write a function (degree graph node) that determines the degree ;;; of a given node. ;;; b) Write a function that generates a list of all nodes of a graph ;;; sorted according to decreasing degree. ;;; c) Use Welsh-Powell's algorithm to paint the nodes of a gra...
null
https://raw.githubusercontent.com/appleby/99-lisp-problems/a12b2a585ac5af06f456f844d308bbada78e647c/p86.lisp
lisp
(**) Node degree and graph coloration a) Write a function (degree graph node) that determines the degree of a given node. b) Write a function that generates a list of all nodes of a graph sorted according to decreasing degree. c) Use Welsh-Powell's algorithm to paint the nodes of a graph in such a way ...
(in-package :99-problems) Part A was completed in p85.lisp . (defun degree-sorted-nodes (graph) "Return a list of the nodes of GRAPH sorted by decreasing degree." (mapcar #'first (stable-sort (zip (vertices graph) (degrees graph)) #'> :key #'second))) (defun vertex-coloring (graph &aux (adjacency-list (adja...
d69e57a63009af28143abb35e45e5ffda5d5bc1278a656c9371c15b35c540dab
derekmcloughlin/pearls
chap07e.hs
data Tree = Leaf Int | Fork Tree Tree deriving (Show, Eq) tree_1 :: Tree tree_1 = Fork (Leaf 3) (Leaf 5) tree_2 :: Tree tree_2 = Fork (Fork (Fork (Leaf 8) (Leaf 2)) (Leaf 7)) (Fork (Leaf 9) (Fork (Leaf 6...
null
https://raw.githubusercontent.com/derekmcloughlin/pearls/42bc6ea0fecc105386a8b75789f563d44e05b772/chap07/chap07e.hs
haskell
data Tree = Leaf Int | Fork Tree Tree deriving (Show, Eq) tree_1 :: Tree tree_1 = Fork (Leaf 3) (Leaf 5) tree_2 :: Tree tree_2 = Fork (Fork (Fork (Leaf 8) (Leaf 2)) (Leaf 7)) (Fork (Leaf 9) (Fork (Leaf 6...
9f82dd9eaa9247f72cf3540ab52ccfd394482201701db41991d664231e6ba17f
jebberjeb/specviz
guide.clj
(ns specviz.guide "Slurp spec code from the spec guide, load it in this ns" (:require [clojure.pprint :refer [pprint]] [clojure.string :as string] [specviz.util :as util])) (def guide-url "-site/master/content/guides/spec.adoc") Use of non - greedy * ? here to avoid SOE . (def code (->> (re-seq #"(?...
null
https://raw.githubusercontent.com/jebberjeb/specviz/89d3ff269232dc21d1d1be226dd0bc10388ec68f/src/specviz/guide.clj
clojure
(ns specviz.guide "Slurp spec code from the spec guide, load it in this ns" (:require [clojure.pprint :refer [pprint]] [clojure.string :as string] [specviz.util :as util])) (def guide-url "-site/master/content/guides/spec.adoc") Use of non - greedy * ? here to avoid SOE . (def code (->> (re-seq #"(?...
8fd1bf37a3264df6209b584439a4da2b0d1dfa65b5a95363d9bc3a960060842e
public-law/oregon-law-parser
Cli.hs
module Cli ( Options(..) , getOptions ) where import Options.Applicative import Data.Semigroup ((<>)) data Options = Options { inputFilePath ∷ FilePath, tikaJarPath ∷ Maybe FilePath, javaExecutable ∷ String } deriving (Show) getOptions ∷ IO Options getOptions = ex...
null
https://raw.githubusercontent.com/public-law/oregon-law-parser/320c2d0f9afcc2a5099532e0f5f74d55fe2cba57/analyze/src/Cli.hs
haskell
module Cli ( Options(..) , getOptions ) where import Options.Applicative import Data.Semigroup ((<>)) data Options = Options { inputFilePath ∷ FilePath, tikaJarPath ∷ Maybe FilePath, javaExecutable ∷ String } deriving (Show) getOptions ∷ IO Options getOptions = ex...
a0982ec9cdd63783ed8f786a46e24218be44af387e23646406f173301ddada0e
input-output-hk/cardano-ledger
Memory.hs
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} module Main where import Cardano.Ledger.State.Query import Cardano.Ledger.State.UTxO import Control.Monad import qualified Data.Text as T import Options.Applicative as O import Weigh data Opts = Opts { optsNewEpochStateBinaryFile :: Maybe FilePath ...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/49a84725c4c2ecabc80f6dac215881bc23920962/libs/ledger-state/bench/Memory.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE OverloadedStrings # ^ Path to the CBOR encoded NewEpochState data type, which will be used to forM_ mEpochStateEntity $ \_ese -> wgroup " EpochState " $ do io " SnapShots - no sharing " ( loadSnapShotsNoSharingM dbFp ) _ ese -- io "SnapShots - with sharing" (loadSnapShot...
module Main where import Cardano.Ledger.State.Query import Cardano.Ledger.State.UTxO import Control.Monad import qualified Data.Text as T import Options.Applicative as O import Weigh data Opts = Opts { optsNewEpochStateBinaryFile :: Maybe FilePath benchmarking deserialization of NewEpochState , optsEpochStateB...
6f33656bac8f6cf17ce29bc581a842b31e5a6dd719ccfc8e6601b9a9c4562178
Lysxia/test-monad-laws
Checkers.hs
# LANGUAGE AllowAmbiguousTypes , FlexibleContexts , ScopedTypeVariables , TypeApplications # AllowAmbiguousTypes, FlexibleContexts, ScopedTypeVariables, TypeApplications #-} module Test.Monad.Reader.Checkers where import Control.Monad.Reader import Control.Monad.State (StateT) ...
null
https://raw.githubusercontent.com/Lysxia/test-monad-laws/1cb9e116769771cb49fbd1614f50b05e120a2709/src/Test/Monad/Reader/Checkers.hs
haskell
# LANGUAGE AllowAmbiguousTypes , FlexibleContexts , ScopedTypeVariables , TypeApplications # AllowAmbiguousTypes, FlexibleContexts, ScopedTypeVariables, TypeApplications #-} module Test.Monad.Reader.Checkers where import Control.Monad.Reader import Control.Monad.State (StateT) ...
3a566a0dbbde2d908614c80fc5f6908a4bc9d08add1bdeba68a3876dc84e0145
gregr/racket-misc
navigator.rkt
#lang racket/base (provide list-navigator-keys navigator-new navigator-focus navigator-focus-set navigator-path navigator-ascend navigator-descend navigator-shift navigator-preorder-next navigator-preorder-prev ) (require "cursor.rkt" "list.rkt" "maybe.rkt" "record.rkt" "sugar.rkt" ra...
null
https://raw.githubusercontent.com/gregr/racket-misc/0a5c9d4875288795e209d06982b82848c989d08b/navigator.rkt
racket
#lang racket/base (provide list-navigator-keys navigator-new navigator-focus navigator-focus-set navigator-path navigator-ascend navigator-descend navigator-shift navigator-preorder-next navigator-preorder-prev ) (require "cursor.rkt" "list.rkt" "maybe.rkt" "record.rkt" "sugar.rkt" ra...
1d3e1e09cc5935fddece4f98c58604456b5710e3b886676562010069a5466595
shayan-najd/NativeMetaprogramming
HpcDraft.hs
module HpcDraft (draft_plugin) where import Trace.Hpc.Tix import Trace.Hpc.Mix import Trace.Hpc.Util import HpcFlags import qualified Data.Set as Set import qualified Data.Map as Map import HpcUtils import Data.Tree ------------------------------------------------------------------------------ draft_options :: Flag...
null
https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/utils/hpc/HpcDraft.hs
haskell
---------------------------------------------------------------------------- ---------------------------------------------------------------------------- putStrLn $ drawForest $ map (fmap show) $ forest
module HpcDraft (draft_plugin) where import Trace.Hpc.Tix import Trace.Hpc.Mix import Trace.Hpc.Util import HpcFlags import qualified Data.Set as Set import qualified Data.Map as Map import HpcUtils import Data.Tree draft_options :: FlagOptSeq draft_options = excludeOpt . includeOpt . srcDir...
2093b853a9cdf64e883adaa499bf1414883182ea40b058d31ce3da77ef828891
FlowerWrong/mblog
afile_client.erl
%%%------------------------------------------------------------------- %%% @author yy ( C ) 2015 , < COMPANY > %%% @doc %%% %%% @end Created : 06 . 八月 2015 下午1:39 %%%------------------------------------------------------------------- -module(afile_client). -author("yy"). %% API -export([ls/1, get_file/2]). ls(Se...
null
https://raw.githubusercontent.com/FlowerWrong/mblog/3233ede938d2019a7b57391405197ac19c805b27/categories/erlang/demo/afile_client.erl
erlang
------------------------------------------------------------------- @author yy @doc @end ------------------------------------------------------------------- API
( C ) 2015 , < COMPANY > Created : 06 . 八月 2015 下午1:39 -module(afile_client). -author("yy"). -export([ls/1, get_file/2]). ls(Server) -> Server ! {self(), list_dir}, receive {Server, FileList} -> FileList end. get_file(Server, File) -> Server ! {self(), {get_file, File}}, receive {Server,...
6da239e46abca5923609acbccc1a5a0a9afb432a65124ed20eae4c429d70237e
MyPost/cassius
drop_in.clj
(ns cassius.api.connection.drop-in (:require [cassius.net.command [keyspace :as ksp] [column-family :as cf] [delete :refer [delete-row delete-normal-columns delete-sub-columns]]])) (defn drop-in ([conn] (drop-in conn [])) ([conn arr] (condp = (count arr) 0 (...
null
https://raw.githubusercontent.com/MyPost/cassius/7b5f550fa8e8f825d4ecd7ba6a0d34c5ff606a7c/src/cassius/api/connection/drop_in.clj
clojure
(ns cassius.api.connection.drop-in (:require [cassius.net.command [keyspace :as ksp] [column-family :as cf] [delete :refer [delete-row delete-normal-columns delete-sub-columns]]])) (defn drop-in ([conn] (drop-in conn [])) ([conn arr] (condp = (count arr) 0 (...
b2d79182160658c66d42d7e9398378516862a9b9d185a82f87b49e2a7cbe6c6e
clojure-interop/aws-api
AmazonRekognitionClientBuilder.clj
(ns com.amazonaws.services.rekognition.AmazonRekognitionClientBuilder "Fluent builder for AmazonRekognition. Use of the builder is preferred over using constructors of the client class." (:refer-clojure :only [require comment defn ->]) (:import [com.amazonaws.services.rekognition AmazonRekognitionClientBuilder]...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.rekognition/src/com/amazonaws/services/rekognition/AmazonRekognitionClientBuilder.clj
clojure
(ns com.amazonaws.services.rekognition.AmazonRekognitionClientBuilder "Fluent builder for AmazonRekognition. Use of the builder is preferred over using constructors of the client class." (:refer-clojure :only [require comment defn ->]) (:import [com.amazonaws.services.rekognition AmazonRekognitionClientBuilder]...
13f6e7ae85a317609ec579b985038cca6d02859103f727320ddf59ac6428d7bd
gregr/racket-misc
minikanren-numbers.rkt
#lang racket/base (provide ) (require "dakanren.rkt" "minikanren.rkt" ) (module+ test (require "list.rkt" "sugar.rkt" racket/set rackunit )) (define appendo (lambda (l s out) (conde [(== '() l) (== s out)] [(exist (a d res) (== `(,a . ,d) l) (== `(,a ...
null
https://raw.githubusercontent.com/gregr/racket-misc/0a5c9d4875288795e209d06982b82848c989d08b/minikanren-numbers.rkt
racket
works, but slow (lets (list actual expected) = (zip (forl `((,(build-num (quotient a b)) ,(build-num (remainder a b))))))) (check-equal? actual expected)) what do each of the logo parameters mean? (lets (list actual expected) = (zip (forl ( 1 2 ) ( 2 1 ) ) (list p r) <- '((0 0) (0 0) ;(0 1) (0 0) ) (,(build-num p) ,...
#lang racket/base (provide ) (require "dakanren.rkt" "minikanren.rkt" ) (module+ test (require "list.rkt" "sugar.rkt" racket/set rackunit )) (define appendo (lambda (l s out) (conde [(== '() l) (== s out)] [(exist (a d res) (== `(,a . ,d) l) (== `(,a ...
b73e84739df6e3e327de39e70a5fb5d491f02063c8be6ebaf431ad207977c332
brendanhay/amazonka
DeleteKnowledgeBase.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE StrictData #-} # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - binds # # OPTIONS_GHC -fno - warn - unused -...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-wisdom/gen/Amazonka/Wisdom/DeleteKnowledgeBase.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Deletes the knowledge base. When you use this API to delete an external knowledge base such as < Amazon AppIntegrations> you can delete and recreate it. See < DeleteDataIntegration> and < CreateDataIntegration> * Creating ...
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - binds # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # De...
04b5874e57e50c100557d72d285ea757d6ce08ad19bc12bfcb57497c5eb4d715
ocaml-multicore/reagents
reaction.mli
* Copyright ( c ) 2015 , < > * * Permission to use , copy , modify , and/or distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND T...
null
https://raw.githubusercontent.com/ocaml-multicore/reagents/6721db78b21028c807fb13d0af0aaf9407c662b5/lib/reaction.mli
ocaml
* Copyright ( c ) 2015 , < > * * Permission to use , copy , modify , and/or distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND T...
f873d3eeca1a2b290a4e6506815903047b8785b2bc4dd40715301f3d5caffba2
ocaml-ppx/ppx_tools_versioned
ast_mapper_class_408.ml
open Migrate_parsetree.Ast_408 (* This file is part of the ppx_tools package. It is released *) under the terms of the MIT license ( see LICENSE file ) . Copyright 2013 and LexiFi (** Class-based customizable mapper *) open Parsetree open Asttypes open Ast_helper let map_fs...
null
https://raw.githubusercontent.com/ocaml-ppx/ppx_tools_versioned/00a0150cdabfa7f0dad2c5e0e6b32230d22295ca/ast_mapper_class_408.ml
ocaml
This file is part of the ppx_tools package. It is released * Class-based customizable mapper Type expressions for the core language Type expressions for the class language Type expressions for the module language Value expressions for the module language Value expressions for the core language Patterns...
open Migrate_parsetree.Ast_408 under the terms of the MIT license ( see LICENSE file ) . Copyright 2013 and LexiFi open Parsetree open Asttypes open Ast_helper let map_fst f (x, y) = (f x, y) let map_snd f (x, y) = (x, f y) let map_tuple f1 f2 (x, y) = (f1 x, f2 y) let map_tup...
0a8bab778242220fe48ec67724c69c6fced2bfa7b140afa54cd7b4103bc900a5
jordanthayer/ocaml-search
repairing_adaptive.ml
* Calls single step anytime searches - Jordan January 2010 open Repairing_single_step let hd_ss_fhp_reckless_no_dups sface args = (** perform a search based on this estimated f function on a domain with few duplicates. Never update f estimates or resort queues *) let wt = Search_args.get_float "adaptive.h_...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/adaptive/repairing_adaptive.ml
ocaml
* perform a search based on this estimated f function on a domain with few duplicates. Never update f estimates or resort queues * perform a search based on this estimated f function on a domain with many duplicates. Never update f estimates or resort queues * perform a search based on this estimated f ...
* Calls single step anytime searches - Jordan January 2010 open Repairing_single_step let hd_ss_fhp_reckless_no_dups sface args = let wt = Search_args.get_float "adaptive.h_ss_fhp_dups" args 0 in let h_calc,f_calc = Global_hd_ss.make_wted_unbounded_fhp_correction (fun n -> n.g) (fun n -> n.h) (fun n -> n.d) i...
537ace140ff1d471fd843f0b95153b0c0735bb55080c979d32debdf7d04df930
bobzhang/ocaml-book
expr_parse_tree.ml
expr: [ ";" LEFTA [ seq_expr ] | "top" RIGHTA [ "RE_PCRE"; regexp | "REPLACE"; regexp; "->"; sequence | "SEARCH"; regexp; "->"; sequence | "MAP"; regexp; "->"; sequence | "COLLECT"; regexp; "->"; sequence | "COLLECTOBJ"; regexp | "SPLIT"; regexp | "REPLACE_FIRST"; regexp; "->"; sequence | "SEARCH_...
null
https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/camlp4/code/expr_parse_tree.ml
ocaml
syntax extension by mikmatch view patterns operators apply
expr: [ ";" LEFTA [ seq_expr ] | "top" RIGHTA [ "RE_PCRE"; regexp | "REPLACE"; regexp; "->"; sequence | "SEARCH"; regexp; "->"; sequence | "MAP"; regexp; "->"; sequence | "COLLECT"; regexp; "->"; sequence | "COLLECTOBJ"; regexp | "SPLIT"; regexp | "REPLACE_FIRST"; regexp; "->"; sequence | "SEARCH_...
a621fe61aecdbafcd13839db19fbf1b094a38a9389ab8651fc0843416f414709
MinaProtocol/mina
test_common.ml
module Schema = Graphql_wrapper.Make (Graphql.Schema) let list_of_seq seq = let rec loop seq = match seq () with | Seq.Nil -> [] | Seq.Cons (Ok x, next) -> x :: loop next | Seq.Cons (Error _, _) -> assert false in loop seq let test_query schema ctx ?variables ?operation_n...
null
https://raw.githubusercontent.com/MinaProtocol/mina/1e2be42aa1e9ec2b2d5d81798bc172e96f51384d/src/lib/graphql_wrapper/ocaml_graphql_server_tests/test_common.ml
ocaml
module Schema = Graphql_wrapper.Make (Graphql.Schema) let list_of_seq seq = let rec loop seq = match seq () with | Seq.Nil -> [] | Seq.Cons (Ok x, next) -> x :: loop next | Seq.Cons (Error _, _) -> assert false in loop seq let test_query schema ctx ?variables ?operation_n...
dd7339141296f505903f20f7c6ced1efec9332fe6382b94c80266b28bf9981aa
5outh/textlunky
Types.hs
module Types ( module Data.Direction , module Types.Size , module Types.Jewel , module Types.Item , module Types.Consumable , module Types.Block , module Types.Enemy , module Types.GroundItem , ...
null
https://raw.githubusercontent.com/5outh/textlunky/8dd4d975ed86b761262e3026dd4c22a36b532104/src/Types.hs
haskell
module Types ( module Data.Direction , module Types.Size , module Types.Jewel , module Types.Item , module Types.Consumable , module Types.Block , module Types.Enemy , module Types.GroundItem , ...
88113b5648051bc4f54e0b6d9943125482e91a9b6310e92b2a4e0cfae7da9274
newque/newque
search.ml
open Core type after = | After_id of string | After_ts of int64 | After_rowid of int64 type t = { limit: int64; after: after option; only_once: bool; } let create max_read ~mode ~only_once = match mode with | `One -> { limit = Int64.one; after = None; only_once; } | `Many ...
null
https://raw.githubusercontent.com/newque/newque/dee73e2cb7be8700847f9e5cf900731cc20b1b8c/src/persistence/search.ml
ocaml
open Core type after = | After_id of string | After_ts of int64 | After_rowid of int64 type t = { limit: int64; after: after option; only_once: bool; } let create max_read ~mode ~only_once = match mode with | `One -> { limit = Int64.one; after = None; only_once; } | `Many ...
e9b91bae5f840b99414ada093421e2f9fe9a317158b488b37c285c36f83d52c4
yorodm/cl-rx
base.lisp
(in-package :cl-rx.scheduler) (defclass scheduler () () (:documentation "Base class for all schedulers")) (defun create-scheduler (name) ;; this will soon be a macro "Factory function, creates a new scheduler given its NAME as a symbol." (when (symbolp name) (let ((sched (make-instance name))) (sche...
null
https://raw.githubusercontent.com/yorodm/cl-rx/981e7526499575704cdc6a58bffc44339ae5a05d/src/scheduler/base.lisp
lisp
this will soon be a macro (load-time-value (create-scheduler 'trampoline-scheduler)) "The current scheduler")
(in-package :cl-rx.scheduler) (defclass scheduler () () (:documentation "Base class for all schedulers")) "Factory function, creates a new scheduler given its NAME as a symbol." (when (symbolp name) (let ((sched (make-instance name))) (scheduler-create sched)))) (defvar *current-scheduler* nil "The...
b546f79a04b3bbdf22861a55a3c164a7bea885e969636a2a3f99d73492d349f3
bazqux/bazqux-urweb
Resolvables.hs
# LANGUAGE RecordWildCards , OverloadedStrings , BangPatterns , LambdaCase # # OPTIONS_GHC -fwarn - incomplete - patterns # | default - значения и Resolvable instance - ы для значений , хранящихся в Riak . module Resolvables where import Generated.DataTypes import Riak import Data.List import Data.Maybe import Contr...
null
https://raw.githubusercontent.com/bazqux/bazqux-urweb/bf2d5a65b5b286348c131e91b6e57df9e8045c3f/crawler/Resolvables.hs
haskell
resolve a b = , mtvmUnreadOnly = mtvmUnreadOnly a || mtvmUnreadOnly b , mtvmFullPosts = mtvmFullPosts a || mtvmFullPosts b , mtvmFullComments = mtvmFullComments a || mtvmFullComments b } trace ("RESOLVING Posts " ++ show (s a) ++ " and " ++ show (s b) ...
# LANGUAGE RecordWildCards , OverloadedStrings , BangPatterns , LambdaCase # # OPTIONS_GHC -fwarn - incomplete - patterns # | default - значения и Resolvable instance - ы для значений , хранящихся в Riak . module Resolvables where import Generated.DataTypes import Riak import Data.List import Data.Maybe import Contr...
c48930730b0b1bcd7559520a6aa2565954782d98acdc8d19ab3a9092d51b5f44
andrejbauer/plzoo
type_check.ml
(** Type checking. *) (** [ty_error msg] raises exception [Type_error msg]. *) let type_error msg = Zoo.error ~kind:"Type error" msg * [ check e ] checks that expression [ e ] has type [ ty ] in context [ ctx ] . It raises [ Type_error ] if it does not . It raises [Type_error] if it does not. *) let rec c...
null
https://raw.githubusercontent.com/andrejbauer/plzoo/ae6041c65baf1eebf65a60617819efeb8dcd3420/src/minihaskell/type_check.ml
ocaml
* Type checking. * [ty_error msg] raises exception [Type_error msg]. * [type-of ctx e] computes the type of expression [e] in context [ctx]. It raises [Type_error] if [e] does not have a type.
let type_error msg = Zoo.error ~kind:"Type error" msg * [ check e ] checks that expression [ e ] has type [ ty ] in context [ ctx ] . It raises [ Type_error ] if it does not . It raises [Type_error] if it does not. *) let rec check ctx ty e = let ty' = type_of ctx e in if ty' <> ty then type_e...
5be9ebc83ac5d175780e7f34f580e1f21d5466fc9e54f6b9f9b21c9a9df4e20e
master/ejabberd
node_pep.erl
%%% ==================================================================== ` ` The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %%% compliance with the License. You should have received a copy of the %%% Erlang Public License ...
null
https://raw.githubusercontent.com/master/ejabberd/9c31874d5a9d1852ece1b8ae70dd4b7e5eef7cf7/src/mod_pubsub/node_pep.erl
erlang
==================================================================== compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved via the world wide web at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See th...
` ` The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " The Initial Developer of the Original Code is ProcessOne . Portions created by ProcessOne are C...
e394b1916e9f6016c0528525341754429dac66496188027713216fc503e7c256
SchornacklabSLCU/amfinder
amfLog.mli
AMFinder - amfLog.mli * * MIT License * Copyright ( c ) 2021 * * Permission is hereby granted , free of charge , to any person obtaining a copy * of this software and associated documentation files ( the " Software " ) , to * deal in the Software without restriction , including without limitati...
null
https://raw.githubusercontent.com/SchornacklabSLCU/amfinder/1053045b431b9e9e85a7bcebea2e38cda92a8dcd/amfbrowser/sources/amfLog.mli
ocaml
* Logging functions. * Prints a piece of information to [stdout]. * Same, but only prints when [_DEBUG_] is set to [true]. * Prints a warning message to [stderr]. * Prints an error message to [stderr] and terminates with the given code. * Specialized [error] function with application message.
AMFinder - amfLog.mli * * MIT License * Copyright ( c ) 2021 * * Permission is hereby granted , free of charge , to any person obtaining a copy * of this software and associated documentation files ( the " Software " ) , to * deal in the Software without restriction , including without limitati...
b86ea0f9208bdfca60171d96c02fa592b8e245cc36a47066bf15f840f3a12712
Datomic/simulant
trading.clj
Copyright ( c ) Metadata Partners , LLC . All rights reserved . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are a...
null
https://raw.githubusercontent.com/Datomic/simulant/063292d50b6b77e3d333eddfb3c8b3280d38c915/examples/simulant/examples/trading.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) Metadata Partners , LLC . All rights reserved . (ns simulant.examples.trading (:use simulant.util) (:require [datomic.api :as d])) (defn trade [conn from to amount] (let [tx (d/tempid :db.part/tx)] (d/transact-async conn [[:db/add tx :transfer/amount amount] [:db/add tx...
94268a2cdfa40e446016ac8d73ae766435c66f8a8b12f2897c18423047b20381
alco/erlang-mix-project
testmod_tests.erl
-module(testmod_tests). -include_lib("eunit/include/eunit.hrl"). foo_test() -> ?assertEqual(-100, testmod:foo(100)), ?assertEqual(100, testmod:foo(-100)).
null
https://raw.githubusercontent.com/alco/erlang-mix-project/908f8db9838ee05759c2937909d3b0cfe1a70a23/etest/testmod_tests.erl
erlang
-module(testmod_tests). -include_lib("eunit/include/eunit.hrl"). foo_test() -> ?assertEqual(-100, testmod:foo(100)), ?assertEqual(100, testmod:foo(-100)).
cf33322b89384e501a869a4ce12eefc8687ef3e7f0cdac0023b9ca4d5da004dc
ssor/erlangDemos
mtvh_sup.erl
%% Feel free to use, reuse and abuse the code in this file. @private -module(mtvh_sup). -behaviour(supervisor). %% API. -export([start_link/0]). %% supervisor. -export([init/1]). %% API. start_link() -> % command_store:init(), supervisor:start_link({local, ?MODULE}, ?MODULE, []). %% supervisor. init([]) -> ...
null
https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/msg_transfer_via_http/src/mtvh_sup.erl
erlang
Feel free to use, reuse and abuse the code in this file. API. supervisor. API. command_store:init(), supervisor. Procs = [],
@private -module(mtvh_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). init([]) -> { ok , { { one_for_one , 10 , 10 } , Procs } } . CommandManager = {command_store, {command_store, start_link, []}, permanen...
ccc25ecfeccf028738c20560ae63234dea6d8c5f29505c10318c582a350b1c10
heraldry/heraldicon
core.cljs
(ns clansi.core (:require [clojure.string :as str])) "Based on -clj/clansi/ under the MIT license" (def ANSI-CODES {:reset "[0m" :bright "[1m" :blink-slow "[5m" :underline "[4m" :underline-off "[24m" :inverse "[7m" :inverse-off "[27m" :strikethrough "[9m" :strikethrough-off "[29m" :def...
null
https://raw.githubusercontent.com/heraldry/heraldicon/54e003614cf2c14cda496ef36358059ba78275b0/lib/clansi/core.cljs
clojure
(ns clansi.core (:require [clojure.string :as str])) "Based on -clj/clansi/ under the MIT license" (def ANSI-CODES {:reset "[0m" :bright "[1m" :blink-slow "[5m" :underline "[4m" :underline-off "[24m" :inverse "[7m" :inverse-off "[27m" :strikethrough "[9m" :strikethrough-off "[29m" :def...
ddeea574cc5887cf4f3ef6e56f884fa2948d15510eece48371b62a51d04fe9a0
Frama-C/Frama-C-snapshot
multi_emitters.ml
let emitter1 = Emitter.create "Test1" [ Emitter.Property_status ] ~correctness:[] ~tuning:[] let emitter2 = Emitter.create "Test2" [ Emitter.Property_status ] ~correctness:[] ~tuning:[] let set_status e s = Kernel.feedback "%a SET STATUS TO %a" Emitter.pretty e Property_status.Emitted_status.pretty s; ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/report/tests/report/multi_emitters.ml
ocaml
unknown /\ unknown unknown /\ true true /\ true true /\ false_if_reachable true /\ false false_if_reachable /\ false_if_reachable false_if_reachable /\ false false /\ false
let emitter1 = Emitter.create "Test1" [ Emitter.Property_status ] ~correctness:[] ~tuning:[] let emitter2 = Emitter.create "Test2" [ Emitter.Property_status ] ~correctness:[] ~tuning:[] let set_status e s = Kernel.feedback "%a SET STATUS TO %a" Emitter.pretty e Property_status.Emitted_status.pretty s; ...
96fb0d1fce09278caf7d0cf3e86d94b140ad3eeebeb5f2ef75f90085a8e22c34
falsetru/htdp
37.1.2.scm
#lang racket (define COLORS '(black white red blue green gold pink orange purple navy)) (define COL# (length COLORS)) (define target1 (first COLORS)) (define target2 (first COLORS)) (define (random-pick xs) (list-ref xs (random (length xs)))) (define (master) (begin (set! target1 (random-pick COLORS)) ...
null
https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/37/37.1.2.scm
scheme
#lang racket (define COLORS '(black white red blue green gold pink orange purple navy)) (define COL# (length COLORS)) (define target1 (first COLORS)) (define target2 (first COLORS)) (define (random-pick xs) (list-ref xs (random (length xs)))) (define (master) (begin (set! target1 (random-pick COLORS)) ...
bc86c3b43e72c50b36df65c57f134672986c3e138e834b08007e51ac0a6f3cec
HunterYIboHu/htdp2-solution
ex383-BW-machine-real.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex383-BW-machine-real) (read-case-sensitive #t) (teachpacks ((lib "batch-io.rkt" "teachpac...
null
https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter4/Section22-the-commerce-of-XML/ex383-BW-machine-real.rkt
racket
about the language level of this file in a form that our tools can easily process. data difinitions An X1T is a nested list of this shape: constants functions extracts and translates the transition table from xm0 XMachine -> [List-of !Transition] extracts the transition table from xm auxiliary functions [X Y]...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex383-BW-machine-real) (read-case-sensitive #t) (teachpacks ((lib "batch-io.rkt" "teachpack" "2htdp") (lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2ht...
553a38c9e37219b8ac160007f50a47ec75c5d9d2d574f57fc79e9c4f0fa804b2
zsau/id3
v4.clj
(ns id3.v4 "ID3v2.4 codecs. - -structure - -frames" (:require [id3.common :refer :all] [clojure.set :as set] [clojure.string :as str] [org.clojars.smee.binary.core :as b])) (def encoding-constants { latin1 0 utf16 1 utf16be 2 utf8 3}) (def frame-ids (set (cons "TCMP" ; non-standard iTunes frame (sp...
null
https://raw.githubusercontent.com/zsau/id3/b9f84d4a5675d01a8e2b015473c44b3ba5d18d31/src/id3/v4.clj
clojure
non-standard iTunes frame mostly borrowed from quodlibet
(ns id3.v4 "ID3v2.4 codecs. - -structure - -frames" (:require [id3.common :refer :all] [clojure.set :as set] [clojure.string :as str] [org.clojars.smee.binary.core :as b])) (def encoding-constants { latin1 0 utf16 1 utf16be 2 utf8 3}) (def frame-ids (split "AENC APIC ASPI COMM COMR ENCR EQU2 ETCO GE...
bf59b5fe72821d3f740b44f3b8f85f75378d216c9d0f8a795420205e7bbedff0
inhabitedtype/ocaml-aws
describeDBClusterSnapshots.ml
open Types open Aws type input = DescribeDBClusterSnapshotsMessage.t type output = DBClusterSnapshotMessage.t type error = Errors_internal.t let service = "rds" let signature_version = Request.V4 let to_http service region req = let uri = Uri.add_query_params (Uri.of_string (Aws.Util.of_option_exn (En...
null
https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/rds/lib/describeDBClusterSnapshots.ml
ocaml
open Types open Aws type input = DescribeDBClusterSnapshotsMessage.t type output = DBClusterSnapshotMessage.t type error = Errors_internal.t let service = "rds" let signature_version = Request.V4 let to_http service region req = let uri = Uri.add_query_params (Uri.of_string (Aws.Util.of_option_exn (En...
7a78c38aedb458e75b7ec9d236bb08dfbc2eb69181285ddf2fd8af715056655c
replikativ/datahike-frontend
application.cljs
(ns app.application (:require [com.fulcrologic.fulcro.networking.http-remote :as net] [com.fulcrologic.fulcro.application :as app] [com.fulcrologic.fulcro.components :as comp] [app.dashboard.rest-remote :as rest-remote] [app.dashboard.pathom :as p] [com.fulc...
null
https://raw.githubusercontent.com/replikativ/datahike-frontend/6e3ab3bb761b41c4ffea792297286f8942a27909/src/main/app/application.cljs
clojure
The CSRF token is embedded via server_components/html.clj This ensures your client can talk to a CSRF-protected server. See middleware.clj to see how the token is embedded into the HTML
(ns app.application (:require [com.fulcrologic.fulcro.networking.http-remote :as net] [com.fulcrologic.fulcro.application :as app] [com.fulcrologic.fulcro.components :as comp] [app.dashboard.rest-remote :as rest-remote] [app.dashboard.pathom :as p] [com.fulc...
9049900466fcce605a4d7792718529ef849cd1fc1a9dcec2c0bf5b7350f04705
ml4tp/tcoq
smartlocate.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/interp/smartlocate.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** This file provides high-level name ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Created by from code form...
016362cd1fbe4f80124b7d4c93a9970e00c121be0f8dbe9fc96c1e68b33eeb05
chethan/SICP
towerOfHanoi.hs
dohanoi(0, _, _, _) = [] dohanoi(n, from, to, using) = dohanoi(n - 1, from, using, to) ++ [(from, to)] ++ dohanoi(n - 1, using, to, from) hanoi(n) = dohanoi(n, "FROM", "TO", "USING")
null
https://raw.githubusercontent.com/chethan/SICP/ff83adc7e3e89e299c772080d32103f72ecf5dbf/Chapter1/towerOfHanoi.hs
haskell
dohanoi(0, _, _, _) = [] dohanoi(n, from, to, using) = dohanoi(n - 1, from, using, to) ++ [(from, to)] ++ dohanoi(n - 1, using, to, from) hanoi(n) = dohanoi(n, "FROM", "TO", "USING")
f3f510d9fef5f82db0bb837b949af5999ac2762456e372153d012e1fdaf63b93
itsrainingmani/learn-clojure-in-public
core_test.clj
(ns fwpd.core-test (:require [clojure.test :refer :all] [fwpd.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
null
https://raw.githubusercontent.com/itsrainingmani/learn-clojure-in-public/a02477e6a4129a12c66734cfa35f2b0e07d03792/code/fwpd/test/fwpd/core_test.clj
clojure
(ns fwpd.core-test (:require [clojure.test :refer :all] [fwpd.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
5bcdb8474a49e71ee8c91f9720ec179473808a689ca1c60325a9ebea42c1ca4b
SamB/coq
pfedit.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/proofs/pfedit.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** i $Id$ i i i s [delete_proof name] d...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Util open Pp open Nam...
044094d733b605b72e8095a5adefeeea21402886c8fd207289497dd9ee4f9d17
evincarofautumn/kitten
Unify.hs
| Module : Kitten . Unify Description : Unification of types Copyright : ( c ) , 2016 License : MIT Maintainer : Stability : experimental Portability : GHC Module : Kitten.Unify Description : Unification of types Copyright : (c) Jon Purdy, 2016 License : MIT Maintainer ...
null
https://raw.githubusercontent.com/evincarofautumn/kitten/a5301fe24dbb9ea91974abee73ad544156ee4722/lib/Kitten/Unify.hs
haskell
# LANGUAGE OverloadedStrings # for value types, and row unification for permission types. FIXME: Unify the kinds here? We fall back to regular unification for value type constructors. This makes the somewhat iffy assumption that there is no higher-kinded polymorphism going on between value type constructors and pe...
| Module : Kitten . Unify Description : Unification of types Copyright : ( c ) , 2016 License : MIT Maintainer : Stability : experimental Portability : GHC Module : Kitten.Unify Description : Unification of types Copyright : (c) Jon Purdy, 2016 License : MIT Maintainer ...
f20647de27a27d5e85927a6d52fe27e879408582a5b23a9e7d5ed0e536f777ba
conal/Fran
Fran.hs
---------------------------------------------------------------- Redirection module so that you do n't have to put " ./src " on your Path . Done this way for Hugs 's benefit . Does it accomplish the same thing for GHC ? I do n't think -- I have the comilations set up right to do so. Work it out. -- ...
null
https://raw.githubusercontent.com/conal/Fran/a113693cfab23f9ac9704cfee9c610c5edc13d9d/src/GHC/Fran.hs
haskell
-------------------------------------------------------------- I have the comilations set up right to do so. Work it out. -------------------------------------------------------------- --------------------------------------------------------------
Redirection module so that you do n't have to put " ./src " on your Path . Done this way for Hugs 's benefit . Does it accomplish the same thing for GHC ? I do n't think GHC version , suitable for use with GHC 2.09 on . module Fran(module FranLoader) where import FranLoader
5bc07b47657bc8101ec012382a4a9af8d44776984797c900b2125b7ccd40949f
Kappa-Dev/KappaTools
mvbdu_sig.ml
* * mvbdu_sig.ml * openkappa * , projet Abstraction , INRIA Paris - Rocquencourt * * Creation : 08/11/2010 * Last modification : Time - stamp : < Jul 02 2016 > * * * Signature for primitives to deal set of finite maps from integers to integers * * Copyrigh...
null
https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/KaSa_rep/abstract_domains/mvbdu/mvbdu_sig.ml
ocaml
Ckappa_sig.c_site_name
* * mvbdu_sig.ml * openkappa * , projet Abstraction , INRIA Paris - Rocquencourt * * Creation : 08/11/2010 * Last modification : Time - stamp : < Jul 02 2016 > * * * Signature for primitives to deal set of finite maps from integers to integers * * Copyrigh...
1e6f65d05953d1c6a7b7b415a9ce79485e98b9ad6b272c017599ebe2d690fcc3
twashing/edgaru
analytics.clj
(ns edgaru.eight.analytics (:require [edgaru.eight.core :as core])) ;; Refactor price-list (declare timeseries) (def price-list (core/generate-prices 5 15)) '({:last 13.467930225619813} {:last 10.774344180495852} {:last 12.929213016595023} {:last 15.515055619914026} {:last 18.61806674389683}) (defn extract...
null
https://raw.githubusercontent.com/twashing/edgaru/7a6bb30eee5fa2dfdf3baabe8b25e9bcc5019181/src/edgaru/eight/analytics.clj
clojure
Refactor price-list Destructuring Refactor simple-moving-average calculate how far back the window can start calculate Simple Moving Average for each slot there's a window sum it up get the average and merge the output key to the map N = number of days get the Moving Average work out the mean Then for each ...
(ns edgaru.eight.analytics (:require [edgaru.eight.core :as core])) (declare timeseries) (def price-list (core/generate-prices 5 15)) '({:last 13.467930225619813} {:last 10.774344180495852} {:last 12.929213016595023} {:last 15.515055619914026} {:last 18.61806674389683}) (defn extract-price-only [price-list...
9fd546afdfb7a761183c9b67af7c8fd835ba047dd3e4212f35933ed814d20e83
clojurewerkz/elephant
invoice_items.clj
(ns clojurewerkz.elephant.invoice-items (:refer-clojure :exclude [list update]) (:require [clojurewerkz.elephant.conversion :as cnv] [clojurewerkz.elephant.util :refer (api-key->request-options)] [clojure.walk :as wlk]) (:import [clojure.lang IPersistentMap] [com.stripe.model In...
null
https://raw.githubusercontent.com/clojurewerkz/elephant/aa5b61719263eab71484066f255709e0928a4bc3/src/clojure/clojurewerkz/elephant/invoice_items.clj
clojure
API
(ns clojurewerkz.elephant.invoice-items (:refer-clojure :exclude [list update]) (:require [clojurewerkz.elephant.conversion :as cnv] [clojurewerkz.elephant.util :refer (api-key->request-options)] [clojure.walk :as wlk]) (:import [clojure.lang IPersistentMap] [com.stripe.model In...
dfb80b819b158fa78689010427708d67352d522ff6d6a004ba295bf3e3f01484
replikativ/datahike
utils.cljc
(ns datahike.test.utils (:require [datahike.api :as d] [datahike.tools :as tools]) (:import (java.util UUID))) (defn cfg-template "Returning a config template with a random store-id" [] {:store {:backend :mem} :keep-history? true :schema-flexibility :read}) (defn setup-db "Setting up a t...
null
https://raw.githubusercontent.com/replikativ/datahike/b7795e6b0ae9c6649a11a27e958f6716c1b1ec9b/test/datahike/test/utils.cljc
clojure
(ns datahike.test.utils (:require [datahike.api :as d] [datahike.tools :as tools]) (:import (java.util UUID))) (defn cfg-template "Returning a config template with a random store-id" [] {:store {:backend :mem} :keep-history? true :schema-flexibility :read}) (defn setup-db "Setting up a t...
eca04ae17f16690fd6e41d9ad918ce2dfdfa77faaa4a326201ff2508a5ff1c55
ssor/erlangDemos
cowboy_http_handler.erl
Copyright ( c ) 2011 - 2012 , < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC...
null
https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/cowboy_old/src/cowboy_http_handler.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2011 - 2012 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN HTTP handlers must implement three callbacks : < em...
7ac13cc37f53a2e7c0ffb6649ab52f1e4ae2aacbcd9d4d8624146b962a285979
ndmitchell/cmdargs
Help.hs
# OPTIONS_GHC -fno - warn - orphans # Sample renderings : -- ONE MODE Program description programname [ OPTIONS ] FILE1 [ FILES ] Program to perform some action -f --flag description Flag grouping : -a --another description -- MANY MODES WITH ONE SHOWN Program description progr...
null
https://raw.githubusercontent.com/ndmitchell/cmdargs/7c206f464fa666b2654ae9da59cdff44e310de66/System/Console/CmdArgs/Explicit/Help.hs
haskell
ONE MODE flag description another description MANY MODES WITH ONE SHOWN special Special for the root only help Build action here MANY MODES WITH ALL SHOWN special Special for the root only help Build action here ONE MODE flag description another description MANY MODES WITH ONE SH...
# OPTIONS_GHC -fno - warn - orphans # Sample renderings : Program description programname [ OPTIONS ] FILE1 [ FILES ] Program to perform some action Flag grouping : Program description programname [ COMMAND ] [ OPTIONS ] ... Program to perform some action Commands : [ build ] Build a...
f2201c1ec0e16d23f04007b8f7aded719a51f1004b14551868b7e0f2e9a2aacf
hexlet-codebattle/battle_asserts
test_helper.clj
(ns test-helper (:require [clojure.test :refer [is testing]] [clojure.test.check :as tc] [clojure.string :as s] [clojure.test.check.properties :as prop])) (def difficulties #{:elementary :easy :medium :hard}) (defn- check-output-type [data] (if (or (= (type data) java.lang.Inte...
null
https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/04c496b4932bb2d8f5db7be218adea98dd979e69/test/test_helper.clj
clojure
for backward compatibility
(ns test-helper (:require [clojure.test :refer [is testing]] [clojure.test.check :as tc] [clojure.string :as s] [clojure.test.check.properties :as prop])) (def difficulties #{:elementary :easy :medium :hard}) (defn- check-output-type [data] java.lang.Long (type data))) (...
227c10c59bf4740362dcc5ee1e560030b0966bf74f42ae2c2a5328b925bcb370
composewell/unicode-data
CaseSpec.hs
# LANGUAGE CPP , BlockArguments # module Unicode.Text.CaseSpec ( spec ) where import Data.Foldable (traverse_) import qualified Data.Text as T import qualified Unicode.Text.Case as C import Test.Hspec [ NOTE ] These tests may fail if the compiler ’s Unicode version does not match the version of this packag...
null
https://raw.githubusercontent.com/composewell/unicode-data/3dac84295d5a0eaf620f33a7dab19943df84956b/experimental/unicode-data-text/test/Unicode/Text/CaseSpec.hs
haskell
-----------+----------------+-----------------+ -----------+----------------+-----------------+ -----------+----------------+-----------------+ -----------+----------------+-----------------+
# LANGUAGE CPP , BlockArguments # module Unicode.Text.CaseSpec ( spec ) where import Data.Foldable (traverse_) import qualified Data.Text as T import qualified Unicode.Text.Case as C import Test.Hspec [ NOTE ] These tests may fail if the compiler ’s Unicode version does not match the version of this packag...
c8f69877825801df40bc3e4f3bd0886c18df6620e8fc566d64ddb208d8a06ce6
racket/drracket
teaching-lang-coverage.rkt
#lang racket/base (require racket/gui/base racket/class mrlib/text-string-style-desc "private/drracket-test-util.rkt" (for-syntax racket/base)) ;; Test suite for the coverage annotations in the teaching languages. ;; Each test case specifies a teaching language (via a regexp), a str...
null
https://raw.githubusercontent.com/racket/drracket/2d7c2cded99e630a69f05fb135d1bf7543096a23/drracket-test/tests/drracket/teaching-lang-coverage.rkt
racket
Test suite for the coverage annotations in the teaching languages. Each test case specifies a teaching language (via a regexp), a string to put in the definitions window and a list of strings that correspond to maximal uncovered regions from the original program. Running this file will fire up a drracket, put the ...
#lang racket/base (require racket/gui/base racket/class mrlib/text-string-style-desc "private/drracket-test-util.rkt" (for-syntax racket/base)) NB : the results of executing each of these tests ( ie the stuff that shows up in the (struct test (lang-regexp program uncovered line...
2dcf3c5489fa742f8868248c44f65654e8fb40371b491a9555b714cd1c0e889e
conscell/hugs-android
MinHeap.hs
Copyright ( c ) 1999 . -- See COPYRIGHT file for terms and conditions. module MinHeap {-# DEPRECATED "This module is unmaintained, and will disappear soon" #-} ( -- generic adaptor for bags to keep the minimum element separately instance of Coll / CollX , OrdColl / OrdCollX CollX operations emp...
null
https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/oldlib/MinHeap.hs
haskell
See COPYRIGHT file for terms and conditions. # DEPRECATED "This module is unmaintained, and will disappear soon" # generic adaptor for bags to keep the minimum element separately Coll operations OrdCollX operations documentation -fallow-undecidable-instances which needs the undecidable instances flag. export? ...
Copyright ( c ) 1999 . module MinHeap ( instance of Coll / CollX , OrdColl / OrdCollX CollX operations empty,single,fromSeq,insert,insertSeq,union,unionSeq,delete,deleteAll, deleteSeq,null,size,member,count, toSeq, lookup, lookupM, lookupAll, lookupWithDefault, fold, fold1, filter, part...
4754d8ac2dc10a4bfcb091009f7a8dbb9e24181ff12c84cb4e3a8cda28b586fa
poroh/ersip
ersip_trans_server.erl
%% Copyright ( c ) 2017 , 2018 Dmitry Poroh %% All rights reserved. Distributed under the terms of the MIT License . See the LICENSE file . %% %% Server non-INVITE transaction %% Pure FSM implementation - transformation events to side effects . %% -module(ersip_trans_server). -export([new/3, event/2, ...
null
https://raw.githubusercontent.com/poroh/ersip/60afa92a53898f6692f3a30d04b5b88a580c8153/src/transaction/ersip_trans_server.erl
erlang
All rights reserved. Server non-INVITE transaction =================================================================== Types =================================================================== =================================================================== API ===============================================...
Copyright ( c ) 2017 , 2018 Dmitry Poroh Distributed under the terms of the MIT License . See the LICENSE file . Pure FSM implementation - transformation events to side effects . -module(ersip_trans_server). -export([new/3, event/2, to_map/1, from_map/1, has_final_response/1 ...
e6ea83a323dcc2280f7a82d41aa5207772d4246c3d733b3063a98722ad0f575f
AndrasKovacs/sett
Lexer.hs
module Lexer where import Data.String import FlatParse.Stateful hiding (Parser, runParser, string, char, cut, err, Pos, getPos, Span, spanOf, branch, withSpan) import qualified FlatParse.Stateful as FP import qualified Data.Set as S import Data.Char import Language.Haskell.TH import Common import Pres...
null
https://raw.githubusercontent.com/AndrasKovacs/sett/1458b1e44307d89c91c13426f9f565479c7041e3/src/Lexer.hs
haskell
------------------------------------------------------------------------------ ^ Expected a concrete `String`. ^ An arbitrary error message. ^ Expected exactly something. ^ Expected exact indentation level. ^ Expected more than some indentation level. # unpack # | Throw an error. | Imprecise cut: we slap a list ...
module Lexer where import Data.String import FlatParse.Stateful hiding (Parser, runParser, string, char, cut, err, Pos, getPos, Span, spanOf, branch, withSpan) import qualified FlatParse.Stateful as FP import qualified Data.Set as S import Data.Char import Language.Haskell.TH import Common import Pres...
81764ae177d17b5b99b2c7e22d6b236af4ce05b9cbdaccd42929c9c7e1d8b772
oofp/Beseder
STMConsumer.hs
# LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # module Beseder.Misc.Prosumers.STMConsumer where import Protolude import Beseder.Misc.Prosumers.Consumer newtype STMConsumer a = STMConsumer (a -> STM ()) instance (MonadIO m) => GetConsumer (STMConsumer a) m a where consu...
null
https://raw.githubusercontent.com/oofp/Beseder/a0f5c5e3138938b6fa18811d646535ee6df1a4f4/src/Beseder/Misc/Prosumers/STMConsumer.hs
haskell
# LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # module Beseder.Misc.Prosumers.STMConsumer where import Protolude import Beseder.Misc.Prosumers.Consumer newtype STMConsumer a = STMConsumer (a -> STM ()) instance (MonadIO m) => GetConsumer (STMConsumer a) m a where consu...
a49c67a6623348077594908da5bfc39c78bbb667fad2bfef5cc6ec6487b239f5
imrekoszo/polylith-kaocha
interface_test.clj
(ns polylith-kaocha.util.interface-test (:require [clojure.test :refer :all] [polylith-kaocha.util.interface :as sut])) (defn identities [& args] args) (deftest rrapply-test (testing "throws when sym cannot be requiring-resolved" (is (thrown? Exception (sut/rrapply nil))) (is (thrown? Exception (sut...
null
https://raw.githubusercontent.com/imrekoszo/polylith-kaocha/0914db17921301b285241fa0aad76a8d435d34aa/components/util/test/polylith_kaocha/util/interface_test.clj
clojure
(ns polylith-kaocha.util.interface-test (:require [clojure.test :refer :all] [polylith-kaocha.util.interface :as sut])) (defn identities [& args] args) (deftest rrapply-test (testing "throws when sym cannot be requiring-resolved" (is (thrown? Exception (sut/rrapply nil))) (is (thrown? Exception (sut...
a37a54eb0c68cd3c95a4b386b2592ac6627b9d22e82cfc07257e14c5a35c8b38
rroohhh/guix_system
vault.scm
(define-module (services vault) #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu system shadow) #:use-module (gnu packages tls) #:use-module (vup go-xyz) #:use-module (misc vault) #:use-module (guix records) #:use-module (guix modules) #:use-module (guix gexp) #:use...
null
https://raw.githubusercontent.com/rroohhh/guix_system/3ed37fdca8ad782e431b2b7a94caae336d188187/services/vault.scm
scheme
<package> string string ui telemetry provider path path TODO(robin): is this a guix bug??? <vault-connection-configuration> file
(define-module (services vault) #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu system shadow) #:use-module (gnu packages tls) #:use-module (vup go-xyz) #:use-module (misc vault) #:use-module (guix records) #:use-module (guix modules) #:use-module (guix gexp) #:use...
172c4f5b8e728ed0a8e989e2cf1ff24075440243702b6c35d61ffd96b8cdb89f
rtoy/ansi-cl-tests
array-in-bounds-p.lsp
;-*- Mode: Lisp -*- Author : Created : Tue Jan 21 19:57:29 2003 ;;;; Contains: Tests for ARRAY-IN-BOUNDS-P (in-package :cl-test) (deftest array-in-bounds-p.1 (array-in-bounds-p #() 0) nil) (deftest array-in-bounds-p.2 (array-in-bounds-p #() -1) nil) (deftest array-in-bounds-p.3 (let ((a #(a...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/array-in-bounds-p.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests for ARRAY-IN-BOUNDS-P Fill pointer tests Displaced arrays Multidimensional arrays Very large indices Order of evaluation tests Error tests
Author : Created : Tue Jan 21 19:57:29 2003 (in-package :cl-test) (deftest array-in-bounds-p.1 (array-in-bounds-p #() 0) nil) (deftest array-in-bounds-p.2 (array-in-bounds-p #() -1) nil) (deftest array-in-bounds-p.3 (let ((a #(a b c d))) (loop for i from 0 to 4 collect (notnot (array-in-bou...
30ac2b64b50525a14ba8b227b0e2673e5555d6cbfc53d807ed04a313bc89de30
domdere/cassava-conduit
Main.hs
module Main where import Control.Monad ( unless ) import Language.Haskell.HLint ( hlint ) import System.Environment ( getArgs ) import System.Exit ( exitFailure ) main :: IO () main = do args <- getArgs hlints <- hlint $ ["src", "--cpp-define=HLINT", "--cpp-ansi", "-XNoImplicitPrelude"] ++ args unless (nu...
null
https://raw.githubusercontent.com/domdere/cassava-conduit/388eb42bbad256a79817fd955344ada8e3b1627b/hlint/Main.hs
haskell
module Main where import Control.Monad ( unless ) import Language.Haskell.HLint ( hlint ) import System.Environment ( getArgs ) import System.Exit ( exitFailure ) main :: IO () main = do args <- getArgs hlints <- hlint $ ["src", "--cpp-define=HLINT", "--cpp-ansi", "-XNoImplicitPrelude"] ++ args unless (nu...
50aca58f38123bb015d70fcdda91beb9864587c7d3d6974737b81e1de43400d6
jfischoff/tmp-postgres
Temp.hs
| This module provides functions for creating a temporary @postgres@ instance . By default it will create a temporary data directory and a temporary directory for a UNIX domain socket for @postgres@ to listen on in addition to listening on @127.0.0.1@ and @::1@. Here is an example using the expection safe ' ...
null
https://raw.githubusercontent.com/jfischoff/tmp-postgres/593e3ebcb7643afd6095f6269de3552d01c7ff40/src/Database/Postgres/Temp.hs
haskell
* Start and Stop @postgres@ ** Exception safe interface *** Configuration *** Defaults *** Custom Config builder helpers ** Main resource handle *** 'DB' accessors *** 'DB' modifiers *** 'DB' debugging ** Separate start and stop interface. * Faster Startup $makingItFaster ** @initdb@ Data Directory Caching...
| This module provides functions for creating a temporary @postgres@ instance . By default it will create a temporary data directory and a temporary directory for a UNIX domain socket for @postgres@ to listen on in addition to listening on @127.0.0.1@ and @::1@. Here is an example using the expection safe ' ...
9c9d58c391c486abd35406948e4763bf178e0849e48cb0c9a4ffa0ede4bf5309
SRI-CSL/f3d
lcl-ffi-frontend.lisp
(in-package :qffi) LCL type specific (defmacro def-foreign-synonym-type (name lcl-type) (def-foreign-synonym-type-expander name (lcl-to-qffi-type lcl-type))) ;;; alternative it :int which causes conversion and type-checking costs. ;;(defparameter *lcl-int-qffi-type* :fixnum) (defparameter *lcl-int-qffi-type* :i...
null
https://raw.githubusercontent.com/SRI-CSL/f3d/93285f582198bfbab33ca96ff71efda539b1bec7/f3d-core/qffi/lcl-ffi-frontend.lisp
lisp
alternative it :int which causes conversion and type-checking costs. (defparameter *lcl-int-qffi-type* :fixnum) only used to indicate value returned ??????????????? FIXME -- do we really want expand-foreign-type here? alternative is :int but that that is more expensive for arg-checking (defparameter *default-arg-t...
(in-package :qffi) LCL type specific (defmacro def-foreign-synonym-type (name lcl-type) (def-foreign-synonym-type-expander name (lcl-to-qffi-type lcl-type))) (defparameter *lcl-int-qffi-type* :int) (defun lcl-to-qffi-type (lcl-arg-type) (let ((type lcl-arg-type)) (or (case type (:lisp :lisp) (:int ...
2ccdad3a5cc6fda221bed8fd26aa34e3bc4eb8fe85e2f8d0f150fb9b9bb066cc
facebookarchive/pfff
graphics.mli
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/external/stdlib/graphics.mli
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with $ I d : graphics.mli , v 1.36 2004/03...
8c3da3d053d9e3c293cb0ed3ed05e74905b10483eca77cce37e3718565eda9a7
fccm/OCamlSDL2
variant.ml
let input_line ic = try Some (input_line ic) with End_of_file -> close_in ic; None let load_lines fn = let ic = open_in fn in let rec aux acc = match input_line ic with | Some line -> aux (line::acc) | None -> List.rev acc in aux [] let pad s n = let len = String.length s in let p = max 0 ...
null
https://raw.githubusercontent.com/fccm/OCamlSDL2/01fa29187cab90052d2581eb509d1bca1a85418f/src/variant.ml
ocaml
let input_line ic = try Some (input_line ic) with End_of_file -> close_in ic; None let load_lines fn = let ic = open_in fn in let rec aux acc = match input_line ic with | Some line -> aux (line::acc) | None -> List.rev acc in aux [] let pad s n = let len = String.length s in let p = max 0 ...
1b954bd8e64215b7781de1b649d3bc3635371949969b361015d771f44b01a45f
zwizwa/staapl
file.rkt
#lang racket/base (require racket/file) (provide with-file file->string/utf-8) (define (with-file open current close make) (lambda (mf thunk) (define port #f) (unless mf (set! mf (make))) (dynamic-wind (lambda () (set! port (open mf))) (lambda () (parameterize ((current port)) (thu...
null
https://raw.githubusercontent.com/zwizwa/staapl/e30e6ae6ac45de7141b97ad3cebf9b5a51bcda52/tools/file.rkt
racket
#lang racket/base (require racket/file) (provide with-file file->string/utf-8) (define (with-file open current close make) (lambda (mf thunk) (define port #f) (unless mf (set! mf (make))) (dynamic-wind (lambda () (set! port (open mf))) (lambda () (parameterize ((current port)) (thu...
ea88c1f88a8bd3ec5b8739fa11c54cbcaedea5ae3f8added38e5f9fca5a14786
ocurrent/ocluster
fetcher.macos.ml
include Obuilder.User_temp
null
https://raw.githubusercontent.com/ocurrent/ocluster/81a524b46b66e90cdb9fa19bd5f8505faba3d2f1/worker/fetcher.macos.ml
ocaml
include Obuilder.User_temp