_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 |
|---|---|---|---|---|---|---|---|---|
0553f0bac96e69b57beee926b1cf38ab54634f2e8f87a5438bd7b7ab4b8bc5b8 | CSCfi/rems | form_templates_for_old_forms.clj | (ns rems.migrations.form-templates-for-old-forms
(:require [clojure.test :refer :all]
[hugsql.core :as hugsql]
[rems.json :as json]))
;; SQL queries repeated here so that this migration is standalone
(hugsql/def-db-fns-from-string
"
-- :name get-forms :? :*
SELECT id FROM application_form;... | null | https://raw.githubusercontent.com/CSCfi/rems/644ef6df4518b8e382cdfeadd7719e29508a26f0/src/clj/rems/migrations/form_templates_for_old_forms.clj | clojure | SQL queries repeated here so that this migration is standalone
") | (ns rems.migrations.form-templates-for-old-forms
(:require [clojure.test :refer :all]
[hugsql.core :as hugsql]
[rems.json :as json]))
(hugsql/def-db-fns-from-string
"
-- :name get-forms :? :*
-- :name get-form-template-impl :? :1
SELECT
id,
organization,
title,
start,
endt as \"... |
563ba168065f194cfbdcaeb7840302626cdbb3bdd60277881f94561822883579 | johnwhitington/ocamli | exercise05.ml | let rec insert f x l =
match l with
[] -> [x]
| h::t ->
if f x h
then x :: h :: t
else h :: insert f x t
let rec sort f l =
match l with
[] -> []
| h::t -> insert f h (sort f t)
| null | https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/OCaml%20from%20the%20Very%20Beginning/Chapter%206/exercise05.ml | ocaml | let rec insert f x l =
match l with
[] -> [x]
| h::t ->
if f x h
then x :: h :: t
else h :: insert f x t
let rec sort f l =
match l with
[] -> []
| h::t -> insert f h (sort f t)
| |
010507fff528a13bf8f66f0e5b4668bae0dbd7ac9f29689d8df276cc444bc332 | input-output-hk/plutus-apps | Crowdfunding.hs | | Crowdfunding contract implemented using the [ [ ] ] interface .
-- This is the fully parallel version that collects all contributions
-- in a single transaction. This is, of course, limited by the maximum
-- number of inputs a transaction can have.
# LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE DataKinds ... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/8949ce26588166d9961205aa61edd66e4f83d4f5/plutus-use-cases/src/Plutus/Contracts/Crowdfunding.hs | haskell | This is the fully parallel version that collects all contributions
in a single transaction. This is, of course, limited by the maximum
number of inputs a transaction can have.
# LANGUAGE DataKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAG... | | Crowdfunding contract implemented using the [ [ ] ] interface .
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DeriveGeneric #
# LANGUAGE NamedFieldPuns #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE Type... |
fc96fd0bc3233fe2c623fc1bc22deb01b6606b38550b3a1fdee34f32a0b17b40 | adaliu-gh/htdp | 12-226.228.rkt | ;;==========================
A FSM is one of :
; – '()
– ( cons Transition FSM )
(define-struct transition [current next])
; A Transition is a structure:
( make - transition FSM - State FSM - State )
FSM - State is a Color .
interpretation A FSM represents the transitions that a
finite state machin... | null | https://raw.githubusercontent.com/adaliu-gh/htdp/a0fca8af2ae8bdcef40d56f6f45021dd92df2995/8-13%20Arbitrarily%20Large%20Data/12-226.228.rkt | racket | ==========================
– '()
A Transition is a structure:
in reaction to key strokes
============================
===========================
finds the state representing current in transition
and retrieve the next field | A FSM is one of :
– ( cons Transition FSM )
(define-struct transition [current next])
( make - transition FSM - State FSM - State )
FSM - State is a Color .
interpretation A FSM represents the transitions that a
finite state machine can take from one state to another
(define fsm-traffic
(list (mak... |
c2c1097276c24771de14cd4d79c7a499e75dceb3041abfdc02f52cd76ec83abe | coq/coq | coqcargs.mli | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/b30c8272f0d9dc50933cac0bc81030898f104dde/toplevel/coqcargs.mli | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
43288bc5e4c06b190649a3260ff4ac72eea43726ca5e0d9e8f07400e7e9103db | cljs-audio/cljs-audio | updates.cljc | (ns cljs-audio.updates
(:require [editscript.core :as e]
[cljs.core.match :refer [match]]))
(defn path-type [path patch]
(case path
[:group :cljs-audio.updates/out] :top
[:group :cljs-audio.updates/in] nil
(let [id (last path)]
(cond
(= id :cljs-audio.updates/out) :node
... | null | https://raw.githubusercontent.com/cljs-audio/cljs-audio/75b8326ff0d5d610be3ea1b39979eac45dfd5b4b/src/main/cljs_audio/updates.cljc | clojure | connections
parameters
nodes
TODO:!!! | (ns cljs-audio.updates
(:require [editscript.core :as e]
[cljs.core.match :refer [match]]))
(defn path-type [path patch]
(case path
[:group :cljs-audio.updates/out] :top
[:group :cljs-audio.updates/in] nil
(let [id (last path)]
(cond
(= id :cljs-audio.updates/out) :node
... |
e56db8f5532613583d4bf6387aa88e58bc66bca2bd42aab0640d10c48af282b5 | igorhvr/bedlam | r4rsyn.scm | " r4rsyn.scm " R4RS syntax -*-Scheme-*-
Copyright ( c ) 1989 - 91 Massachusetts Institute of Technology
;;;
;;; This material was developed by the Scheme project at the
Massachusetts Institute of Technology , Department of Electrical
Engineering and Computer Science . Permission to copy and modify
;;; this... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/slib/3b2/r4rsyn.scm | scheme |
This material was developed by the Scheme project at the
this software, to redistribute either the original software or a
modified version, and to use this software for any purpose is
granted, subject to the following restrictions and understandings.
notice in full.
that they make, so that these may be include... | " r4rsyn.scm " R4RS syntax -*-Scheme-*-
Copyright ( c ) 1989 - 91 Massachusetts Institute of Technology
Massachusetts Institute of Technology , Department of Electrical
Engineering and Computer Science . Permission to copy and modify
1 . Any copy made of this software must include this copyright
2 . Us... |
c8a5a91a77bb5727468ed1565d88d94f5c745e684313e5c9cc635152714495e9 | faylang/fay | doAssingPatternMatch.hs | module DoAssingPatternMatch where
main :: Fay ()
main = do
[1,2] <- return [1,2]
putStrLn "OK."
| null | https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/tests/doAssingPatternMatch.hs | haskell | module DoAssingPatternMatch where
main :: Fay ()
main = do
[1,2] <- return [1,2]
putStrLn "OK."
| |
4aff73d8661f38acf2b2a0cbb5581d417b5ddebb6caa73403485d4c1224bb1e9 | mattmight/bib2sx | bib2sx.rkt | #lang racket
bib2sx : A Racket script for converting a bibtex .bib file to S - Expressions
Copyright ( C ) 2015
; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the... | null | https://raw.githubusercontent.com/mattmight/bib2sx/fa1de50096a13a48fbc0b3ffe0d91c27177303b7/bib2sx.rkt | racket | This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public L... | #lang racket
bib2sx : A Racket script for converting a bibtex .bib file to S - Expressions
Copyright ( C ) 2015
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Pu... |
ab436c53e164274839e7bc8491b69b7d6f7085bc33d7a78b60ac3721f9e5711e | fractalide/fractalide | identity.rkt | #lang racket
(require fractalide/modules/rkt/rkt-fbp/agent)
(define-agent
#:input '("in")
#:output '("out")
(send (output "out") (recv (input "in"))))
(module+ test
(require rackunit)
(require syntax/location)
(require fractalide/modules/rkt/rkt-fbp/def)
(require fractalide/modules/rkt/rkt-fbp/port)
... | null | https://raw.githubusercontent.com/fractalide/fractalide/9c54ec2615fcc2a1f3363292d4eed2a0fcb9c3a5/modules/rkt/rkt-fbp/agents/plumbing/identity.rkt | racket | #lang racket
(require fractalide/modules/rkt/rkt-fbp/agent)
(define-agent
#:input '("in")
#:output '("out")
(send (output "out") (recv (input "in"))))
(module+ test
(require rackunit)
(require syntax/location)
(require fractalide/modules/rkt/rkt-fbp/def)
(require fractalide/modules/rkt/rkt-fbp/port)
... | |
87a7b270245df3c65a7f4c8ee6d09571a17e08ed1e01eed10d349ba1a4796e66 | threatgrid/ctia | default_test.clj | (ns ctia.encryption.default-test
(:require
[ctia.encryption.default :as sut]
[ctia.test-helpers.core :as helpers]
[clojure.test :as t :refer [deftest testing is]]
[puppetlabs.trapperkeeper.testutils.bootstrap :refer [with-app-with-config]]))
(deftest encryption-default-record-test
(let [key-path "resou... | null | https://raw.githubusercontent.com/threatgrid/ctia/32857663cdd7ac385161103dbafa8dc4f98febf0/test/ctia/encryption/default_test.clj | clojure | (ns ctia.encryption.default-test
(:require
[ctia.encryption.default :as sut]
[ctia.test-helpers.core :as helpers]
[clojure.test :as t :refer [deftest testing is]]
[puppetlabs.trapperkeeper.testutils.bootstrap :refer [with-app-with-config]]))
(deftest encryption-default-record-test
(let [key-path "resou... | |
2112519c0d85641faafbfe92bb60dbea6bb808d35a14f51cb30b688b89040a65 | patperry/hs-ieee754 | Tests.hs | module Main
where
import Control.Monad( forM_, unless )
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.HUnit
import Data.AEq
import Numeric.IEEE
type D = Double
type F = Float
infix 1 @?~=, @?==
(@?~=) actual expected =
unless (actual ~== expected) (assertFailure msg)
where
m... | null | https://raw.githubusercontent.com/patperry/hs-ieee754/32ed20b21635e47ce50ffc90e10889f2d6d58caa/tests/Tests.hs | haskell | module Main
where
import Control.Monad( forM_, unless )
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.HUnit
import Data.AEq
import Numeric.IEEE
type D = Double
type F = Float
infix 1 @?~=, @?==
(@?~=) actual expected =
unless (actual ~== expected) (assertFailure msg)
where
m... | |
2477025df1d8728c9f39bd32c7b247e04407330297deeb8f975e0b29c1a52e89 | elaforge/karya | Retune_test.hs | Copyright 2015
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
module Derive.C.Post.Retune_test where
import Util.Test
import qualified Ui.UiTest as UiTest
import qualified Derive.DeriveTest as DeriveTest
import qualified Perform.NN as NN
test_retu... | null | https://raw.githubusercontent.com/elaforge/karya/8ea15e6a5fb57e2f15f8c19836751e315f9c09f2/Derive/C/Post/Retune_test.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt | Copyright 2015
module Derive.C.Post.Retune_test where
import Util.Test
import qualified Ui.UiTest as UiTest
import qualified Derive.DeriveTest as DeriveTest
import qualified Perform.NN as NN
test_retune :: Test
test_retune = do
let run = DeriveTest.extract DeriveTest.e_nns_rounded
. DeriveTest.de... |
caaac108a52da20e9cdbdb9b27a0f4519a1f991300fe2c6506b149e16a2d5432 | MichaelBurge/yxdb-utils | Serialization.hs | {-# LANGUAGE OverloadedStrings,MultiParamTypeClasses #-}
# OPTIONS_GHC -fno - warn - orphans #
module Database.Alteryx.Serialization
(
buildBlock,
buildRecord,
calgaryHeaderSize,
dbFileId,
getCalgaryRecords,
getCalgaryBlockIndex,
getOneBlock,
getOneBlockCalgaryRecord... | null | https://raw.githubusercontent.com/MichaelBurge/yxdb-utils/955995a95cf56b7cb3c45e0175e2b574411d1a18/src/Database/Alteryx/Serialization.hs | haskell | # LANGUAGE OverloadedStrings,MultiParamTypeClasses #
| Number of records before each block is flushed and added to the block index
| Number of bytes taken by the fixed header
| When writing miniblocks, how many bytes should each miniblock aim for?
| When decompressing miniblocks, how many bytes should be allocated ... | # OPTIONS_GHC -fno - warn - orphans #
module Database.Alteryx.Serialization
(
buildBlock,
buildRecord,
calgaryHeaderSize,
dbFileId,
getCalgaryRecords,
getCalgaryBlockIndex,
getOneBlock,
getOneBlockCalgaryRecords,
getRecord,
getValue,
putRecord,
... |
39589f7fcb3df5cbe3c1adbf792b4ecba1dc00ce1af81b7aa860b37983b1690f | takikawa/racket-ppa | body.rkt | #lang racket/base
(require "../common/struct-star.rkt"
"../syntax/syntax.rkt"
"../syntax/scope.rkt"
"../syntax/taint.rkt"
"../syntax/match.rkt"
"../namespace/module.rkt"
"../syntax/binding.rkt"
"env.rkt"
"../syntax/track.rkt"
"../syntax/er... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/caff086a1cd48208815cec2a22645a3091c11d4c/src/expander/expand/body.rkt | racket | Expand a sequence of body forms in a definition context; returns a
list of body forms
In principle, we have an outside-edge scope that identifies the
original content of the definition context --- but a body always
exists inside some binding form, so that form's scope will do;
the inside-edge scope identifies any... | #lang racket/base
(require "../common/struct-star.rkt"
"../syntax/syntax.rkt"
"../syntax/scope.rkt"
"../syntax/taint.rkt"
"../syntax/match.rkt"
"../namespace/module.rkt"
"../syntax/binding.rkt"
"env.rkt"
"../syntax/track.rkt"
"../syntax/er... |
3d756f1d56ae8a9e284e76ca09864924685907a60eaba83c37ac7499d9d6bb78 | semilin/layoup | f'ed_up.lisp |
(MAKE-LAYOUT :NAME "f'ed_up" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX
NIL :KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/f'ed_up.lisp | lisp |
(MAKE-LAYOUT :NAME "f'ed_up" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX
NIL :KEYBOARD NIL) | |
522bd8c1b41ea368b00debac21392797daae4ee0dfe39c52076d2b94c61c53ce | mbutterick/beautiful-racket | report-args.rkt | #lang basic-demo-3
10 print "arg0 is " ; arg0
20 print "arg1 + arg1 is " ; arg1 + arg1
40 print "arg3 is " ; arg3
50 print "arg4 is " ; arg4 | null | https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/basic-demo-3/report-args.rkt | racket | arg0
arg1 + arg1
arg3
arg4 | #lang basic-demo-3 |
71da63c4844e48d6c51b6983938036a9d08efa84e1447cf66ef1adc73780be1f | marcoonroad/hieroglyphs | utils.ml | module String = Core.String
module Str = Re.Str
let _HASH_LENGTH = 128
let regexp = Str.regexp "^[a-f0-9]+$"
let is_hash text =
Str.string_match regexp text 0 && String.length text = _HASH_LENGTH
| null | https://raw.githubusercontent.com/marcoonroad/hieroglyphs/03050bcf78b2871591752a696a16587989065163/test/spec/utils.ml | ocaml | module String = Core.String
module Str = Re.Str
let _HASH_LENGTH = 128
let regexp = Str.regexp "^[a-f0-9]+$"
let is_hash text =
Str.string_match regexp text 0 && String.length text = _HASH_LENGTH
| |
64b7eff67cf4e25c32e6dd39d20411faf59d441a83265bb9721adbb22c4ac20d | ghcjs/ghcjs-dom | CSSPageRule.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.CSSPageRule
(js_setSelectorText, setSelectorText, js_getSelectorText,
getSelect... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/CSSPageRule.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.CSSPageRule
(js_setSelectorText, setSelectorText, js_getSelectorText,
getSelectorText, getSelectorTextUnsafe, getSelectorTextUnchecked,
js_getStyle, getStyle, CSSPageRule... |
c82fd694fb97f1acdf071604468ef7185859d188a2050f86d754f0bec2d32880 | ladderlife/om-css | output_css.clj | (ns om-css.output-css
(:require [cljs.analyzer.api :as ana-api]
[clojure.java.io :as io]
[clojure.string :as string]))
(defn setup-io! []
(let [{:keys [css-output-to output-dir output-to]} (ana-api/get-options)
default-fname "out.css"
fname (or css-output-to
... | null | https://raw.githubusercontent.com/ladderlife/om-css/54190d24f385d8e32057a2f5ed3f89e87f3eacdb/src/main/om_css/output_css.clj | clojure | (ns om-css.output-css
(:require [cljs.analyzer.api :as ana-api]
[clojure.java.io :as io]
[clojure.string :as string]))
(defn setup-io! []
(let [{:keys [css-output-to output-dir output-to]} (ana-api/get-options)
default-fname "out.css"
fname (or css-output-to
... | |
0c8a4fb4b36f53727d5c73a0b00635dd9b39e23918de0dc8e5e3eb3ca28ff890 | MinaProtocol/mina | kubernetes_network.ml | open Core_kernel
open Async
open Integration_test_lib
open Mina_transaction
(* exclude from bisect_ppx to avoid type error on GraphQL modules *)
[@@@coverage exclude_file]
let mina_archive_container_id = "archive"
let mina_archive_username = "mina"
let mina_archive_pw = "zo3moong7moog4Iep7eNgo3iecaesahH"
let postg... | null | https://raw.githubusercontent.com/MinaProtocol/mina/9a97ea71909a802f2ade0305a8069f7cbace5619/src/lib/integration_test_cloud_engine/kubernetes_network.ml | ocaml | exclude from bisect_ppx to avoid type error on GraphQL modules
this is going to be probably either "mina" or "worker"
archive pods have a "mina" container and an "archive" container alongside
TODO: temporary version
this function will repeatedly attempt to connect to graphql port <num_tries> times before givin... | open Core_kernel
open Async
open Integration_test_lib
open Mina_transaction
[@@@coverage exclude_file]
let mina_archive_container_id = "archive"
let mina_archive_username = "mina"
let mina_archive_pw = "zo3moong7moog4Iep7eNgo3iecaesahH"
let postgres_url =
Printf.sprintf "postgres:%s@archive-1-postgresql:5432/arc... |
119dca0fcf4a57703d95ebae3a4bc520ebe19db128c345e29609dc493ba73fae | lillo/compiler-course-unipi | json.ml | type value =
| Obj of (string * value) list
| List of value list
| String of string
| Int of int
| Float of float
| Bool of bool
| Null
[@@deriving show]
| null | https://raw.githubusercontent.com/lillo/compiler-course-unipi/2fdb7f9a49eb0abebf11b6903f67c8187df86a93/frontend-material/code/json/json.ml | ocaml | type value =
| Obj of (string * value) list
| List of value list
| String of string
| Int of int
| Float of float
| Bool of bool
| Null
[@@deriving show]
| |
219ab3d7c0aaf65bc9720cf004cb076e98694ce7150ec4be070b9efc910506ab | charJe/funds | stack.lisp | ;;;;
Copyright 2007
;;;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;;;; you may not use this file except in compliance with the License.
;;;; You may obtain a copy of the License at
;;;;
;;;; -2.0
;;;;
;;;; Unless required by applicable law or agreed to in writing, software
distr... | null | https://raw.githubusercontent.com/charJe/funds/bdc40045d08a36a6e81bd33ffffa752d99b08e60/src/stack.lisp | lisp |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing pe... | Copyright 2007
distributed under the License is distributed on an " AS IS " BASIS ,
(in-package :funds)
(defun make-stack ()
"An empty stack."
(list))
(defun stack-push (stack item)
"The stack that results when the given item is pushed onto the given stack."
(cons item stack))
(defun stack-pop (stack)... |
74df2cc1837ecbbc17d45f6a0bab31e10d4d06964bbc1a41d893661a65dbaeb9 | ygrek/mldonkey | bt_dht_node.ml | (** standalone DHT node *)
open BT_DHT
let bracket res destroy k =
let x = try k res with exn -> destroy res; raise exn in
destroy res;
x
let with_open_in_bin file = bracket (open_in_bin file) close_in_noerr
let with_open_out_bin file = bracket (open_out_bin file) close_out_noerr
let load file : Kademlia.tabl... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/tools/bt_dht_node.ml | ocaml | * standalone DHT node |
open BT_DHT
let bracket res destroy k =
let x = try k res with exn -> destroy res; raise exn in
destroy res;
x
let with_open_in_bin file = bracket (open_in_bin file) close_in_noerr
let with_open_out_bin file = bracket (open_out_bin file) close_out_noerr
let load file : Kademlia.table = with_open_in_bin file M... |
b1c112de3dbe4514b927250ce2f69990e4ab7ecb7a237327be58fab3f8f4f799 | athensresearch/athens | inline_search.cljs | (ns athens.events.inline-search
"Inline Search Events"
(:require
[re-frame.core :as rf]))
(rf/reg-event-db
::set-type!
(fn [db [_ uid type]]
(assoc-in db [:inline-search uid :type] type)))
(rf/reg-event-db
::close!
(fn [db [_ uid]]
(assoc-in db [:inline-search uid :type] nil)))
(rf/reg-eve... | null | https://raw.githubusercontent.com/athensresearch/athens/9ea22566fc10cfd478320b0aaeeee2f32a506cc6/src/cljs/athens/events/inline_search.cljs | clojure | (ns athens.events.inline-search
"Inline Search Events"
(:require
[re-frame.core :as rf]))
(rf/reg-event-db
::set-type!
(fn [db [_ uid type]]
(assoc-in db [:inline-search uid :type] type)))
(rf/reg-event-db
::close!
(fn [db [_ uid]]
(assoc-in db [:inline-search uid :type] nil)))
(rf/reg-eve... | |
8c51eb1bcecced9a7f74ffcde379f58c3c2ec66dec21c89245c32fdaa419fcfb | semerdzhiev/fp-2020-21 | 01-get-from-list.rkt | #lang racket
(require rackunit)
(require rackunit/text-ui)
Нека имаме следния списък
(define my-list '(1 2 3 (4 5) (6 (7 8))))
Искаме с подходящи извиквания на car вземем .
Първите две са за пример .
(define get-one (void))
(define get-two (void))
(define get-three (void))
(define get-four (void))
(de... | null | https://raw.githubusercontent.com/semerdzhiev/fp-2020-21/64fa00c4f940f75a28cc5980275b124ca21244bc/group-b/exercises/04.lists/01-get-from-list.rkt | racket | #lang racket
(require rackunit)
(require rackunit/text-ui)
Нека имаме следния списък
(define my-list '(1 2 3 (4 5) (6 (7 8))))
Искаме с подходящи извиквания на car вземем .
Първите две са за пример .
(define get-one (void))
(define get-two (void))
(define get-three (void))
(define get-four (void))
(de... | |
8445d7536fce3a05325e091ba4d2b23e8cf3b3c8b005268a22a33b82a7801c3a | clojure-garden/clojure-garden | core.cljs | (ns platform.ui.core
(:require
[antd.core :as ant]
[goog.dom :as gdom]
[platform.ui.db :as db]
[platform.ui.deps]
[platform.ui.logger :as logger]
[platform.ui.pages.root :as root]
[platform.ui.router.core :as router]
[re-frame.core :as rf]
[reagent.dom :as dom]))
(defn setup-tool... | null | https://raw.githubusercontent.com/clojure-garden/clojure-garden/9c58ce33f91aeab5f7bd0d16647ecc450ba8967f/modules/frontend/src/platform/ui/core.cljs | clojure | (ns platform.ui.core
(:require
[antd.core :as ant]
[goog.dom :as gdom]
[platform.ui.db :as db]
[platform.ui.deps]
[platform.ui.logger :as logger]
[platform.ui.pages.root :as root]
[platform.ui.router.core :as router]
[re-frame.core :as rf]
[reagent.dom :as dom]))
(defn setup-tool... | |
b4bd5ebf178120259f37d36ff7b540a59328a51576aec92adc0f6289107b7f54 | heralden/heckendorf | item.clj | (ns heckendorf.item
(:require [heckendorf.random :refer [rand-range perc-vec]]
[heckendorf.data :refer [materials grades]]))
(def weapons
{:fist {:att 1 :spd 10} ; Special "weapon" that you only start with.
:dagger {:att 3 :spd 12}
:sword {:att 7 :spd 9}
:mace {:att 8 :spd... | null | https://raw.githubusercontent.com/heralden/heckendorf/b5d7e75f9072dddf39598aa48bb4aacfeed5fc81/src/clj/heckendorf/item.clj | clojure | Special "weapon" that you only start with. | (ns heckendorf.item
(:require [heckendorf.random :refer [rand-range perc-vec]]
[heckendorf.data :refer [materials grades]]))
(def weapons
:dagger {:att 3 :spd 12}
:sword {:att 7 :spd 9}
:mace {:att 8 :spd 8}
:greatsword {:att 12 :spd 6}})
(defn- truncate-decimals
([x]
(tr... |
61995d4dc8d6a9afa048cd0ac8b0c4d296deca0b0115a0c0c3c44db275e2d8c3 | graninas/Andromeda | Main.hs | # LANGUAGE TypeFamilies #
module Main where
import Graphics.QML as QML
import ViewModels
startUiApplication workspace = do
let view = fileDocument "app/Views/ShellView.qml"
viewModel <- createShellVM workspace
runEngineLoop QML.defaultEngineConfig
{ initialDocument = view
, contextObject = Just $ QML.... | null | https://raw.githubusercontent.com/graninas/Andromeda/6b56052bca64fc6f55a28f8001dd775a744b95bf/app/Main.hs | haskell | # LANGUAGE TypeFamilies #
module Main where
import Graphics.QML as QML
import ViewModels
startUiApplication workspace = do
let view = fileDocument "app/Views/ShellView.qml"
viewModel <- createShellVM workspace
runEngineLoop QML.defaultEngineConfig
{ initialDocument = view
, contextObject = Just $ QML.... | |
83a11c14b3ef8f3c35f9faf46f4c520fe99a27fdd739459679a7b4fbdba744b6 | hstreamdb/hstream | LogDeviceSpec.hs | module HStream.Store.LogDeviceSpec where
import Control.Exception (bracket)
import Control.Monad (void)
import Data.Default (def)
import Data.List (sort)
import qualified Data.Map.Strict ... | null | https://raw.githubusercontent.com/hstreamdb/hstream/b8779986ab3371e331ead8cc08bc51fcc5c80ec9/hstream-store/test/HStream/Store/LogDeviceSpec.hs | haskell | module HStream.Store.LogDeviceSpec where
import Control.Exception (bracket)
import Control.Monad (void)
import Data.Default (def)
import Data.List (sort)
import qualified Data.Map.Strict ... | |
8d19c0f14881516832fd77790c66a879a9fb845f0fb3edcaff6ff6a6e52e8119 | jackfirth/point-free | definition-forms.rkt | #lang racket
(provide define/wind
define/wind-pre
define/wind-post
define/wind*
define/wind-pre*
define/wind-post*)
(require "parallel-composition.rkt")
;; Helper macro for defining lots of simple macros
(define-syntax-rule (define-syntaxes-rule [pattern expansion] ...)
... | null | https://raw.githubusercontent.com/jackfirth/point-free/d294a342466d5071dd2c8f16ba9e50f9006b54af/point-free/definition-forms.rkt | racket | Helper macro for defining lots of simple macros
Definition forms | #lang racket
(provide define/wind
define/wind-pre
define/wind-post
define/wind*
define/wind-pre*
define/wind-post*)
(require "parallel-composition.rkt")
(define-syntax-rule (define-syntaxes-rule [pattern expansion] ...)
(begin (define-syntax-rule pattern expansion) ...)... |
7404a631c3dd471ef2219c17f6b90866965086051f28948dc6e60fd9b8cfc7a6 | erlang/otp | erl_scan_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1998 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/7f1bc6a19a4253aa03a11ddfa1014231bf7a5127/lib/stdlib/test/erl_scan_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 1998 - 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(erl_scan_SUITE).
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_testcase/2, ... |
2bc6438975d52f53165f511ad469a3707feae3d5f8e5cfcc624141c55ad3ec68 | imitator-model-checker/imitator | AlgoBCRandom.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Université Paris 13 , LIPN , CNRS , France
* Université de Lorraine , CNRS , , LORIA , Nancy , France
*
* Module description : Random Behavi... | null | https://raw.githubusercontent.com/imitator-model-checker/imitator/105408ae2bd8c3e3291f286e4d127defd492a58b/src/AlgoBCRandom.mli | ocaml | **********************************************************
Modules
**********************************************************
**********************************************************
Class definition
**********************************************************
*******************************************************... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Université Paris 13 , LIPN , CNRS , France
* Université de Lorraine , CNRS , , LORIA , Nancy , France
*
* Module description : Random Behavi... |
f3fed781a33c53da53284175aa5b6e8487868f69246e7c513e3f728e8e7dc492 | awolven/cl-vulkan | window.lisp | Copyright 2019 , 2020
;;
;; Permission is hereby granted, free of charge, to any person obtaining
;; a copy of this software and associated documentation files (the
" Software " ) , to deal in the Software without restriction , including
;; without limitation the rights to use, copy, modify, merge, publish,
d... | null | https://raw.githubusercontent.com/awolven/cl-vulkan/2b345589793748d114ab60a336d4e91852d533dc/src/window.lisp | lisp |
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
without limitation the rights to use, copy, modify, merge, publish,
the following conditions:
The above copyright notice and this permission notice shall be
EXPRESS OR IMPLIE... | Copyright 2019 , 2020
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , and to
permit persons to whom the Software is furnished to do so , subject to
included in all copies or substantial portions of the Software .
THE ... |
feba0fe424bf184369420ac1ba5d0032490c0925758713c7e9cedcf94eb5a8cf | chaw/r7rs-libs | md5-test.sps | Copyright © 2009 , 2010 < >
;; Permission is hereby granted, free of charge, to any person obtaining a
;; copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction , including without limitation
;; the rights to use, copy, modify, merge, publish, dist... | null | https://raw.githubusercontent.com/chaw/r7rs-libs/b8b625c36b040ff3d4b723e4346629a8a0e8d6c2/weinholt-tests/md5-test.sps | scheme | Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
the rights to use, copy, modify, merge, publish, distribute, sublicense,
Software is furnished to do so, subject to the following conditions:
The above copyright notice... | Copyright © 2009 , 2010 < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS O... |
1a64cd12f0d0bda6b45d468bc01fc9bc1e023e748180a1641756c37fda4b1c23 | kelamg/HtDP2e-workthrough | ex27.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex27) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Fixed-size-Data/ex27.rkt | racket | about the language level of this file in a form that our tools can easily process. | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex27) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define base-attendees 120)
(define base-price 5.0)
(define base-at... |
19256a9cd70ef3d57f6d4777a0d0ebc737a7a5520c56ecb6af1cf0205d596239 | masateruk/micro-caml | alpha.mli | val f : KNormal.def list -> KNormal.def list
for Inline.g
| null | https://raw.githubusercontent.com/masateruk/micro-caml/0c0bd066b87cf54ce33709355c422993a85a86a1/alpha.mli | ocaml | val f : KNormal.def list -> KNormal.def list
for Inline.g
| |
2696ca027985e6fb3b2e2d313a71a11edca8ee6a0bb63095928ab66315f2696b | JakobBruenker/monadic-bang | RunGhcParser.hs | # LANGUAGE NamedFieldPuns #
# LANGUAGE BlockArguments #
{-# OPTIONS -fplugin=MonadicBang #-}
| This module makes it possible to run GHC 's Parser with plugins on source
-- files, and check what (if any) errors it produced
module MonadicBang.Test.Utils.RunGhcParser where
import Control.Monad.IO.Class
import Control... | null | https://raw.githubusercontent.com/JakobBruenker/monadic-bang/d956083c06c21956e327209c8752c7f3c9f5d6b0/test/MonadicBang/Test/Utils/RunGhcParser.hs | haskell | # OPTIONS -fplugin=MonadicBang #
files, and check what (if any) errors it produced
| Parses a module | # LANGUAGE NamedFieldPuns #
# LANGUAGE BlockArguments #
| This module makes it possible to run GHC 's Parser with plugins on source
module MonadicBang.Test.Utils.RunGhcParser where
import Control.Monad.IO.Class
import Control.Monad.Trans.Except
import Data.Foldable
import GHC
import GHC.Driver.Plugins
import GHC.... |
9586983da32c4cee7d19e45c5ac6a368d43bf714658f8106d11c9e97afe2d129 | aggieben/weblocks | helpers.lisp |
(in-package :weblocks-test)
;;; Test make-slot-writer
(deftest make-slot-writer-1
(let ((obj (copy-template *joe*)))
(funcall
(make-slot-writer 'name (lambda (value)
(declare (ignore value))
"foo"))
"bak" obj)
(first-name obj))
"foo")
| null | https://raw.githubusercontent.com/aggieben/weblocks/8d86be6a4fff8dde0b94181ba60d0dca2cbd9e25/test/views/formview/helpers.lisp | lisp | Test make-slot-writer |
(in-package :weblocks-test)
(deftest make-slot-writer-1
(let ((obj (copy-template *joe*)))
(funcall
(make-slot-writer 'name (lambda (value)
(declare (ignore value))
"foo"))
"bak" obj)
(first-name obj))
"foo")
|
7b90a3113e47204bcfe0191c119a51f586820330e4a273ba180aaf534ca833cc | javalib-team/javalib | genericMap.ml |
* Copyright ( C ) 2013 , ( INRIA )
* 2016 , ,
* This software is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 , with the special exception on linking described in file
* LICENSE .
* This soft... | null | https://raw.githubusercontent.com/javalib-team/javalib/0699f904dbb17e87ec0ad6ed0c258a1737e60329/src/ptrees/genericMap.ml | ocaml | * [choose_and_remove t] returns (i,d,t') such that [t'] equals to [remove
i t] and [d] equals to [find i t].
@raise Not_found if [t] is empty. |
* Copyright ( C ) 2013 , ( INRIA )
* 2016 , ,
* This software is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 , with the special exception on linking described in file
* LICENSE .
* This soft... |
1af193884579714934e22578e64826ab5f372c464ffe2ad4ca7a0d95d397ee0a | cloudant/mango | mango_util.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " AS ... | null | https://raw.githubusercontent.com/cloudant/mango/3da3110a6ee169c4d6991c00b8f8d59d20b7fe1f/src/mango_util.erl | erlang | 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
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations u... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(mango_util).
-export([
open_doc/2,
open_ddocs/1,
load_ddoc/2,
defer/3,
do_defer/3,
assert_ejson/1,
to_lower/1,
... |
526c5bec336bc2ecae3777db55b4c6978e6189ad682b9e9925bb66e778aacd50 | gildor478/ounit | oUnitResultSummary.ml | (**************************************************************************)
The OUnit library
(* *)
Copyright ( C ) 2002 - 2008 Maas - Maarten Zeeman .
Copyright... | null | https://raw.githubusercontent.com/gildor478/ounit/faf4936b17507406c7592186dcaa3f25c6fc138a/src/lib/ounit2/advanced/oUnitResultSummary.ml | ocaml | ************************************************************************
Permission is hereby grante... | The OUnit library
Copyright ( C ) 2002 - 2008 Maas - Maarten Zeeman .
Copyright ( C ) 2010 OCamlCore SARL
Copyright ( C ) 2013
The package OUnit is cop... |
687fbfe110ef665dc62a87572833c3680e9f4dfe6bee36a81d4eed7adbdd758a | huangz1990/SICP-answers | test-p34-expmod.scm | (load "test-manager/load.scm")
(load "p34-expmod.scm")
(define-each-check
(= 1
(expmod 7 1 3))
(= 2
(expmod 8 1 3))
)
(run-registered-tests)
| null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp1/code/test-p34-expmod.scm | scheme | (load "test-manager/load.scm")
(load "p34-expmod.scm")
(define-each-check
(= 1
(expmod 7 1 3))
(= 2
(expmod 8 1 3))
)
(run-registered-tests)
| |
f63a407b580d060dc4c6f27ed5401538250a79e6f5f6c47190d1589d2902995c | JKTKops/ProtoHaskell | operators.hs | module Operators where
normalOpApp :: Int -> Int -> Int
normalOpApp x y = x + y
prefixOpApp :: Int -> Int -> Int
prefixOpApp x y = (+) x y
etaOpApp :: Int -> Int -> Int
etaOpApp = (+)
functionAsOp :: Int -> Int -> Int
functionAsOp x y = x `mod` y
badParensOp :: Int -> Int -> Int
badParensOp x y = ( +) x y
badBack... | null | https://raw.githubusercontent.com/JKTKops/ProtoHaskell/437c37d7bd6d862008f86d7e8045c7a60b12b532/test/Compiler/Parser/testcases/shouldsucceed/operators.hs | haskell | module Operators where
normalOpApp :: Int -> Int -> Int
normalOpApp x y = x + y
prefixOpApp :: Int -> Int -> Int
prefixOpApp x y = (+) x y
etaOpApp :: Int -> Int -> Int
etaOpApp = (+)
functionAsOp :: Int -> Int -> Int
functionAsOp x y = x `mod` y
badParensOp :: Int -> Int -> Int
badParensOp x y = ( +) x y
badBack... | |
a6a0300ba04446d77e82ba332269161a80c004d6b618ebb3e0ad53577ddc2885 | onyx-platform/onyx | aggregation_count_test.clj | (ns onyx.windowing.aggregation-count-test
(:require [clojure.core.async :refer [chan >!! <!! close! sliding-buffer]]
[clojure.test :refer [deftest is]]
[onyx.plugin.core-async :refer [take-segments!]]
[onyx.test-helper :refer [load-config with-test-env]]
[onyx.static.uu... | null | https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/test/onyx/windowing/aggregation_count_test.clj | clojure | (ns onyx.windowing.aggregation-count-test
(:require [clojure.core.async :refer [chan >!! <!! close! sliding-buffer]]
[clojure.test :refer [deftest is]]
[onyx.plugin.core-async :refer [take-segments!]]
[onyx.test-helper :refer [load-config with-test-env]]
[onyx.static.uu... | |
4877498980f4989848c69242e3a816d6824ec05a3a8773da90844659d75ce519 | tsloughter/mirrormaster | mirrormaster_sup.erl | %%%-------------------------------------------------------------------
%% @doc mirrormaster top level supervisor.
%% @end
%%%-------------------------------------------------------------------
-module(mirrormaster_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
st... | null | https://raw.githubusercontent.com/tsloughter/mirrormaster/ed12b0c1dd2674b63fdd4d19797a93c235b76942/src/mirrormaster_sup.erl | erlang | -------------------------------------------------------------------
@doc mirrormaster top level supervisor.
@end
-------------------------------------------------------------------
| -module(mirrormaster_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
init([]) ->
SupFlags = #{strategy => one_for_one, intensity => 1, period => 5},
{ok, PackageDir} = application:... |
eb0df858648625efb42e618093bb9e630aa0daad6b21e82dc4ca70b8465dcf67 | apache/couchdb-twig | twig_util.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " A... | null | https://raw.githubusercontent.com/apache/couchdb-twig/7b58ab232f3db5e54d1c81b6965678f87f89ae11/src/twig_util.erl | erlang | 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
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(twig_util).
-export([format/2, get_env/2, level/1, facility/1, iso8601_timestamp/0]).
level(debug) -> 7;
level(info) -> 6;
level(notice) ... |
44012282d1fa9ec67a0b18932a94de452067641325aa06ddecf6cb3fad863ed4 | titola/neuropa | infrasound.scm | Infrasound propagation through two differentiators .
Tests for the sound editor .
;;;
;;; The functions reverse-differentiator-1, reverse-differentiator-2,
;;; differentiator-1 and differentiator-2 work with the recorded
;;; and published sound file "low_freq_with_6min_for_tinnitus.wav".
(define (reverse-differen... | null | https://raw.githubusercontent.com/titola/neuropa/708509e5ca8c73f3b16fc5e38d066e172d5691c8/src/infrasound.scm | scheme |
The functions reverse-differentiator-1, reverse-differentiator-2,
differentiator-1 and differentiator-2 work with the recorded
and published sound file "low_freq_with_6min_for_tinnitus.wav".
(open-sound "low_freq_with_6min_for_tinnitus.wav")
(reverse-differentiator-2)
(reverse-differentiator-1) ; => Initial fi... | Infrasound propagation through two differentiators .
Tests for the sound editor .
(define (reverse-differentiator k mult)
(let ((sum 0))
(map-channel
(lambda (x)
(* mult (set! sum (+ sum x k)))))))
(define (reverse-differentiator-1)
(let ((k -0.05))
(reverse-differentiator k (/ k -164.1... |
89304986e43a1313731f3fd7d5380730c5c5842145e2241df159aba4f2baaa1f | cram2/cram | swank-indentation.lisp |
(in-package :prolog)
(eval-when (:load-toplevel)
(when (and (find-package "SWANK")
(boundp (intern "*APPLICATION-HINTS-TABLES*"
(find-package "SWANK"))))
(push (alexandria:alist-hash-table
'((with-production . let)
(with-production-handlers . fle... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_core/cram_prolog/src/swank-indentation.lisp | lisp |
(in-package :prolog)
(eval-when (:load-toplevel)
(when (and (find-package "SWANK")
(boundp (intern "*APPLICATION-HINTS-TABLES*"
(find-package "SWANK"))))
(push (alexandria:alist-hash-table
'((with-production . let)
(with-production-handlers . fle... | |
4576c64daab4d85f91a78e24a8557357630ad1243de84a3c9c2cad216db0e226 | jaredly/reason-language-server | parmatch.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/406/parmatch.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Misc
open Asttypes
open Types
open Typedtree
Utilities for building patterns
let make_pat de... |
e64d8bc5a50283348ac605538eb2c6d7a985db23c605b0118abe6d7903b72765 | freizl/dive-into-haskell | ask-password.hs | module Main where
{- | Trivial Monad Transformer example
-}
import Data.Char
import Control.Monad
import Control.Monad.Trans.Maybe
import Control.Monad.Trans.Class
main :: IO ()
main = do
runMaybeT askPassword
return ()
isValid :: String -> Bool
isValid s = length s >= 8 && any isAlpha s && any isN... | null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/codes/monad/ask-password.hs | haskell | | Trivial Monad Transformer example
| module Main where
import Data.Char
import Control.Monad
import Control.Monad.Trans.Maybe
import Control.Monad.Trans.Class
main :: IO ()
main = do
runMaybeT askPassword
return ()
isValid :: String -> Bool
isValid s = length s >= 8 && any isAlpha s && any isNumber s && any isPunctuation s
getValidPas... |
f4a94070938db7737f3844151e5063066ef9b1e4730fb88ba4c054aee2f7a8d1 | meain/evil-textobj-tree-sitter | textobjects.scm | [
(integer)
(float)
] @number.inner
| null | https://raw.githubusercontent.com/meain/evil-textobj-tree-sitter/02f8253034042d8f171bc0ef93e3538b71a29153/queries/toml/textobjects.scm | scheme | [
(integer)
(float)
] @number.inner
| |
dc65863d5097867fa8d303f1ec58c1d41f466434fbd62ab69de23ccb754d0d7c | pirapira/coq2rust | pre_env.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/kernel/pre_env.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
This file defines the type of kerne... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Created by out of environ... |
b25c0ad258ca10b8426e38c86f9e8788d629c1ed55e21cc89a72e555a54be130 | clojure-interop/aws-api | AbstractAWSMediaLive.clj | (ns com.amazonaws.services.medialive.AbstractAWSMediaLive
"Abstract implementation of AWSMediaLive. Convenient method forms pass through to the corresponding overload
that takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazo... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.medialive/src/com/amazonaws/services/medialive/AbstractAWSMediaLive.clj | clojure | (ns com.amazonaws.services.medialive.AbstractAWSMediaLive
"Abstract implementation of AWSMediaLive. Convenient method forms pass through to the corresponding overload
that takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazo... | |
c8ba8ab3e774e2215d6162739cce30b1991622538077a20e0421c957105bff9f | BitGameEN/bitgamex | log_gold_reclaimed.erl | %%%--------------------------------------------------------
%%% @Module: log_gold_reclaimed
%%% @Description: 自动生成
%%%--------------------------------------------------------
-module(log_gold_reclaimed).
-export([get_one/1, set_one/1, build_record_from_row/1]).
-include("common.hrl").
-include("record_log_gold_reclaime... | null | https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/data/log_gold_reclaimed.erl | erlang | --------------------------------------------------------
@Module: log_gold_reclaimed
@Description: 自动生成
-------------------------------------------------------- | -module(log_gold_reclaimed).
-export([get_one/1, set_one/1, build_record_from_row/1]).
-include("common.hrl").
-include("record_log_gold_reclaimed.hrl").
get_one(Id) ->
case db_esql:get_row(?DB_LOG, <<"select id,game_id,gold_type,delta,old_value,new_value,drain_type,drain_id,drain_count,time,call_flow from gold_recla... |
b171d08888d646f9fd88151cca424e7a0010db24c8975313b16a4211b1e493af | phadej/singleton-bool | Bool.hs | # LANGUAGE CPP #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE EmptyCase #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE GADTs #
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE TypeOperators #-}
... | null | https://raw.githubusercontent.com/phadej/singleton-bool/3433fbbb4859c47e1564de335e8db327061eb8c8/src/Data/Singletons/Bool.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE EmptyCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes #
# LANGUAGE TypeOperators #
# OPTIONS_GHC -Wno-redundant-constraints #
| Additions to "Data.Type.Bool".
* Data.Type.Dec
$setup
>>> :set -XDataKinds -XTypeOperators
>>> import Dat... | # LANGUAGE CPP #
# LANGUAGE GADTs #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
#if __GLASGOW_HASKELL__ >= 800
#endif
module Data.Singletons.Bool (
SBool(..),
SBoolI(..),
fromSBool,
withSomeSBool,
reflectBool,
reifyBool,
| ' discreteBool '... |
6a2684092e07b031e6cd996c08236523cb9476a0f6c932183d882fd4cb5dc03b | bytekid/mkbtt | main.mli | val execute : unit -> unit
val execute_with : string -> string -> bool -> float -> bool ->
string -> string -> bool -> float -> string -> float ->
string -> int -> bool -> string -> bool -> unit
| null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mascott/src/main.mli | ocaml | val execute : unit -> unit
val execute_with : string -> string -> bool -> float -> bool ->
string -> string -> bool -> float -> string -> float ->
string -> int -> bool -> string -> bool -> unit
| |
ede0291f40feec715ab6fe066354aa24268dba79a95ee7865fb3cffc74b86138 | conscell/hugs-android | Error.hs | # OPTIONS_GHC -fno - implicit - prelude #
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.Marshal.Error
Copyright : ( c ) The FFI task force 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
Maintainer :
-- Stability :... | null | https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/packages/base/Foreign/Marshal/Error.hs | haskell | ---------------------------------------------------------------------------
|
Module : Foreign.Marshal.Error
License : BSD-style (see the file libraries/base/LICENSE)
Stability : provisional
Portability : portable
in case of values indicating an error state.
------------------------------------... | # OPTIONS_GHC -fno - implicit - prelude #
Copyright : ( c ) The FFI task force 2001
Maintainer :
Routines for testing return values and raising a ' userError ' exception
module Foreign.Marshal.Error (
: : ( a , a )
: : ( a , a )
IO a - > IO ( )
) where
import Foreign.Ptr
|Exec... |
1bfef33ba5d9d8df933fcc9fded0fb0d9bd5e92090bac11023399c956d03fca6 | mirage/capnp-rpc | capnp_address.mli | (** Handling of capnp:// URI format addresses.
This code is shared between the unix and mirage networks. *)
module Location : sig
type t = [
| `Unix of string
| `TCP of string * int
]
val pp : t Fmt.t
val equal : t -> t -> bool
end
include S.ADDRESS with
type t = Location.t * Auth.Digest.t
| null | https://raw.githubusercontent.com/mirage/capnp-rpc/f04fa96a583994b71731bc1288833f8304c9ce81/capnp-rpc-net/capnp_address.mli | ocaml | * Handling of capnp:// URI format addresses.
This code is shared between the unix and mirage networks. |
module Location : sig
type t = [
| `Unix of string
| `TCP of string * int
]
val pp : t Fmt.t
val equal : t -> t -> bool
end
include S.ADDRESS with
type t = Location.t * Auth.Digest.t
|
d6f5620adb0485e203a67847f753d8b1509801d3b6a5bf160bc364bdcb5a3d01 | stuartsierra/frequencies | frequencies.clj | (ns com.stuartsierra.frequencies
"Basic statistical computations on frequency maps. A frequency map
(freq-map) is a map from observed values to their frequency in a
data set.
If the observed values are all integers within a small range, then a
frequency map may be exact, such as that returned by
clojure.co... | null | https://raw.githubusercontent.com/stuartsierra/frequencies/bdc6ba6e11db00ce146747a430a4ce1adcc308cd/src/com/stuartsierra/frequencies.clj | clojure | the bucket-frequencies function
k=99 q=100
| (ns com.stuartsierra.frequencies
"Basic statistical computations on frequency maps. A frequency map
(freq-map) is a map from observed values to their frequency in a
data set.
If the observed values are all integers within a small range, then a
frequency map may be exact, such as that returned by
clojure.co... |
d0debe1e0e4b33b0e6d6a824f39d6e6772f18aa3416800ffc03e783768a475fa | flosell/lambdacd | api.clj | (ns lambdacd.ui.api
"REST-API into the current state, structure and history of the pipeline for use by the UI."
(:require [lambdacd.presentation.unified :as unified]
[ring.util.response :as resp]
[clojure.string :as string]
[ring.middleware.json :as ring-json]
[lambda... | null | https://raw.githubusercontent.com/flosell/lambdacd/e9ba3cebb2d5f0070a2e0e1e08fc85fc99ee7135/src/clj/lambdacd/ui/api.clj | clojure | (ns lambdacd.ui.api
"REST-API into the current state, structure and history of the pipeline for use by the UI."
(:require [lambdacd.presentation.unified :as unified]
[ring.util.response :as resp]
[clojure.string :as string]
[ring.middleware.json :as ring-json]
[lambda... | |
809b1c8b6c5513e4957c246546da1ecc92bb8c7e6f916200635065e9f6430e26 | ArulselvanMadhavan/haskell-first-principles | intero16533bsE-TEMP.hs | {-# LANGUAGE Strict #-}
# OPTIONS_GHC -fwarn - incomplete - patterns #
module Phone where
import Data.Char
import Data.List
import qualified Data.Map.Strict as Map
import Data.Maybe
import Ex4
data Key = One | Two | Three | Four | Five | Six | Seven | Eight | Nine | Star | Zero... | null | https://raw.githubusercontent.com/ArulselvanMadhavan/haskell-first-principles/06e0c71c502848c8e75c8109dd49c0954d815bba/chapter11/.stack-work/intero/intero16533bsE-TEMP.hs | haskell | # LANGUAGE Strict # | # OPTIONS_GHC -fwarn - incomplete - patterns #
module Phone where
import Data.Char
import Data.List
import qualified Data.Map.Strict as Map
import Data.Maybe
import Ex4
data Key = One | Two | Three | Four | Five | Six | Seven | Eight | Nine | Star | Zero | Pound deriving (Eq, E... |
904805eddd9f352377783cc972aa7468d83c250c4fb9a04ccb3fa53a4c62efbb | MinaProtocol/mina | list.ml | module Length = struct
type 'a t = ('a list, int) Sigs.predicate2
let equal l len = Caml.List.compare_length_with l len = 0
let unequal l len = Caml.List.compare_length_with l len <> 0
let gte l len = Caml.List.compare_length_with l len >= 0
let gt l len = Caml.List.compare_length_with l len > 0
let lt... | null | https://raw.githubusercontent.com/MinaProtocol/mina/0cf192d7a74a46169e71efdbc700a7f2c2e374aa/src/lib/mina_stdlib/list.ml | ocaml | module Length = struct
type 'a t = ('a list, int) Sigs.predicate2
let equal l len = Caml.List.compare_length_with l len = 0
let unequal l len = Caml.List.compare_length_with l len <> 0
let gte l len = Caml.List.compare_length_with l len >= 0
let gt l len = Caml.List.compare_length_with l len > 0
let lt... | |
c0abdad545227f689d6cf525b88c76f0e586f0c335024bf5f55139f1794b752c | k16shikano/hpdft | Definition.hs | module PDF.Definition where
import Data.ByteString (ByteString)
import Data.List (replicate, intercalate)
import qualified Data.ByteString.Char8 as BS
import qualified Data.ByteString.Lazy.Char8 as BSL
import Codec.Compression.Zlib (decompress)
type PDFBS = (Int,BS.ByteString)
type PDFObj = (Int,[Obj])
type PDFStre... | null | https://raw.githubusercontent.com/k16shikano/hpdft/97484e4ec5d698d403add2b92ff4b128c01e7ace/src/PDF/Definition.hs | haskell | [(Obj, Obj)] | module PDF.Definition where
import Data.ByteString (ByteString)
import Data.List (replicate, intercalate)
import qualified Data.ByteString.Char8 as BS
import qualified Data.ByteString.Lazy.Char8 as BSL
import Codec.Compression.Zlib (decompress)
type PDFBS = (Int,BS.ByteString)
type PDFObj = (Int,[Obj])
type PDFStre... |
7b83d28f6abdc323deaa5c9433eae284d00988ccae396d0d15335cc9453b367f | ocaml-flambda/ocaml-jst | pr11544.ml | (* TEST
* expect
*)
module M = struct type t = T end
let poly3 : 'b. M.t -> 'b -> 'b =
fun T x -> x
[%%expect {|
module M : sig type t = T end
val poly3 : M.t -> 'b -> 'b = <fun>
|}];;
| null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/fae9aef6b7023f2bf8c94f28e8ef8cbd8ffb7633/testsuite/tests/typing-poly/pr11544.ml | ocaml | TEST
* expect
|
module M = struct type t = T end
let poly3 : 'b. M.t -> 'b -> 'b =
fun T x -> x
[%%expect {|
module M : sig type t = T end
val poly3 : M.t -> 'b -> 'b = <fun>
|}];;
|
50c26a504c5efe8955f7e30b5fb239b27da3db0402f93ec5cfbbdda11af5e143 | bos/llvm | Loop.hs | # LANGUAGE ScopedTypeVariables , FlexibleInstances , TypeOperators , FlexibleContexts #
module LLVM.Util.Loop(Phi(phis,addPhis), forLoop, mapVector, mapVector2) where
import Data.TypeLevel hiding (Bool)
import LLVM.Core
class Phi a where
phis :: BasicBlock -> a -> CodeGenFunction r a
addPhis :: BasicBlock -> a... | null | https://raw.githubusercontent.com/bos/llvm/819b94d048c9d7787ce41cd7c71b84424e894f64/LLVM/Util/Loop.hs | haskell | XXX should use HList if it was packaged in a nice way .
XXX should use HList if it was packaged in a nice way.
Loop the index variable from low to high. The state in the loop starts as start, and is modified
by incr in each iteration.
------------------------------------ | # LANGUAGE ScopedTypeVariables , FlexibleInstances , TypeOperators , FlexibleContexts #
module LLVM.Util.Loop(Phi(phis,addPhis), forLoop, mapVector, mapVector2) where
import Data.TypeLevel hiding (Bool)
import LLVM.Core
class Phi a where
phis :: BasicBlock -> a -> CodeGenFunction r a
addPhis :: BasicBlock -> a... |
33c1baee5fd773fd2907a088f998e09670e78d33bf086003a04b03c3692011ca | haskell/ghc-builder | ClientMonad.hs |
# LANGUAGE GeneralizedNewtypeDeriving #
module ClientMonad (ClientMonad, evalClientMonad, mkClientState,
getUser, getVerbosity, getHost, getBaseDir,
getHandle, setHandle
) where
import Builder.Handlelike
import Builder.Utils
import Control.Applicative
impor... | null | https://raw.githubusercontent.com/haskell/ghc-builder/ef90aa7da7ec017d59d875e5bfe5d6b281d766f7/client/ClientMonad.hs | haskell |
# LANGUAGE GeneralizedNewtypeDeriving #
module ClientMonad (ClientMonad, evalClientMonad, mkClientState,
getUser, getVerbosity, getHost, getBaseDir,
getHandle, setHandle
) where
import Builder.Handlelike
import Builder.Utils
import Control.Applicative
impor... | |
c9392a756b2861d2884f3c087e6b282a13f987b653d7e80428410360f58a4d4e | master/ejabberd | ejabberd_stun.erl | %%%-------------------------------------------------------------------
File : ejabberd_stun.erl
Author : < >
%%% Description : RFC5389 implementation.
%%% Currently only Binding usage is supported.
%%%
Created : 8 Aug 2009 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2012 Proc... | null | https://raw.githubusercontent.com/master/ejabberd/9c31874d5a9d1852ece1b8ae70dd4b7e5eef7cf7/src/stun/ejabberd_stun.erl | erlang | -------------------------------------------------------------------
Description : RFC5389 implementation.
Currently only Binding usage is supported.
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the ho... | File : ejabberd_stun.erl
Author : < >
Created : 8 Aug 2009 by < >
ejabberd , Copyright ( C ) 2002 - 2012 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU... |
a40e9455a422054e668e09afaa31131acc005d56f4ed6aa2fbf86c859c060d07 | michaelschade/hs-stripe | Token.hs | {-# LANGUAGE OverloadedStrings #-}
module Web.Stripe.Token
( Token(..)
, TokenId(..)
, createToken
, getToken
, tokRq
{- Re-Export -}
, UTCTime(..)
, Amount(..)
, Card(..)
, Currency(..)
, StripeConfig(..)
, StripeT(..)
, runStripeT
) where
import Con... | null | https://raw.githubusercontent.com/michaelschade/hs-stripe/64b58415ccc567b00171b34470e93400cb9e79fd/src/Web/Stripe/Token.hs | haskell | # LANGUAGE OverloadedStrings #
Re-Export
--------------
Data Types --
--------------
| Represents a token in the Stripe system.
| Represents the identifier for a given 'Token' in the Stripe system.
| Creates a 'Token' in the Stripe system.
| Retrieves a specific 'Token' based on its 'Token'.
----------------
JS... |
module Web.Stripe.Token
( Token(..)
, TokenId(..)
, createToken
, getToken
, tokRq
, UTCTime(..)
, Amount(..)
, Card(..)
, Currency(..)
, StripeConfig(..)
, StripeT(..)
, runStripeT
) where
import Control.Applicative ((<$>), (<*>))
import Contro... |
e2be64d886442704ebdc907257c28464c2daec0cd3885a360d65ab725ac2a650 | hyperfiddle/electric | circuit_summation2.cljc | (ns dustin.y2022.forms.circuit-summation2
(:require [contrib.clojurex :refer [bindx]]
#?(:clj [datomic.client.api :as d])
[hyperfiddle.api :as hf]
[hyperfiddle.photon :as p]
[hyperfiddle.photon-dom :as dom]
[hyperfiddle.photon-ui2 :as ui]
#?(:clj... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2022/forms/circuit_summation2.cljc | clojure | The problem is distributed state loops
it's the network. the network is discrete
db = App(db)
f = fix f
db = Σ [db=0..T] App(db)Δdb
db = Σ [s=0..T] App(db)Δdb
note that db is the clock, so we can substitute:
db(t) = Σ [t=0..T] App(t)Δt
where App(t)Δt = ΔApp(t),
such that ΔApp(db) is a function of database th... | (ns dustin.y2022.forms.circuit-summation2
(:require [contrib.clojurex :refer [bindx]]
#?(:clj [datomic.client.api :as d])
[hyperfiddle.api :as hf]
[hyperfiddle.photon :as p]
[hyperfiddle.photon-dom :as dom]
[hyperfiddle.photon-ui2 :as ui]
#?(:clj... |
d2681747c8bed89aa9275914c3b0b9082b2d1f0006d6a40897e4c180f8c92db4 | pkhuong/Napa-FFT | support-macros.lisp | (in-package "NAPA-FFT")
(defmacro unrolled-for (((var count &key (offset 0) (stride 1) (type t)) &rest var-data)
&body body)
(assert (numberp count))
(let ((var-data (cons `(,var :offset ,offset :stride ,stride :type ,type)
var-data))
(var-names '())
... | null | https://raw.githubusercontent.com/pkhuong/Napa-FFT/4a5ee157b5db8006e7a7bdbed47e23ad85bf184e/support-macros.lisp | lisp | (in-package "NAPA-FFT")
(defmacro unrolled-for (((var count &key (offset 0) (stride 1) (type t)) &rest var-data)
&body body)
(assert (numberp count))
(let ((var-data (cons `(,var :offset ,offset :stride ,stride :type ,type)
var-data))
(var-names '())
... | |
22a5274ef5a61283e3fb2be179e3a1106e9f1a19b346db3ecf58dafb3466718f | nvim-treesitter/nvim-treesitter | folds.scm | [
(exp_apply)
(exp_do)
(function)
] @fold
| null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/599fd416c81498fe0fe619e00c1aa316cbf8d964/queries/haskell/folds.scm | scheme | [
(exp_apply)
(exp_do)
(function)
] @fold
| |
274b63787cf6f8aeeb1a1f056fe11eca39211b8ea2c38d74f233350cb968473b | facebook/duckling | Tests.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
module Duckling.Ordinal.ID.Tests
( tests ) where
import Prelude
import Data.String
import Test.Tasty
imp... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/tests/Duckling/Ordinal/ID/Tests.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Ordinal.ID.Tests
( tests ) where
import Prelude
import Data.String
import Test.Tasty
import Duckling.Dimensions.Types
import Duckling.Ordinal.ID.Corpus
import Duckling.Testing.Asserts
tests :: TestTree
tests = testGroup "ID Tests"
[ makeCorpusT... |
6d2ebdac86569b5ab3b97e533f93b93d34514db233c103ca9cc9cae01e070df7 | seriyps/logger_journald | logger_journald_h_SUITE.erl | -module(logger_journald_h_SUITE).
-export([
all/0,
init_per_suite/1,
end_per_suite/1,
init_per_testcase/2,
end_per_testcase/2
]).
-export([
just_log_case/1,
truncation_case/1
%% ,
overload_case/1
]).
-include_lib("stdlib/include/assert.hrl").
-include_lib("common_test/include/ct.hrl... | null | https://raw.githubusercontent.com/seriyps/logger_journald/63c58c86b8b1db9f10ca697f33554086375ee9a4/test/logger_journald_h_SUITE.erl | erlang | ,
@doc Test for overload protection
XXX: don't yet know how to validate it. Maybe use tracing? Or mock gen_udp?
overload_case({pre, Cfg}) ->
Srv = journald_server_mock:start(#{}),
}),
logger:set_module_level(logger_backend, debug),
overload_case({post, Cfg}) ->
logger:remove_handler(?FUNCTION_N... | -module(logger_journald_h_SUITE).
-export([
all/0,
init_per_suite/1,
end_per_suite/1,
init_per_testcase/2,
end_per_testcase/2
]).
-export([
just_log_case/1,
truncation_case/1
overload_case/1
]).
-include_lib("stdlib/include/assert.hrl").
-include_lib("common_test/include/ct.hrl").
-incl... |
a05f8a17535d2c3791959d3c5c2761d79f7951a4239b051b9927fa23fd5adc45 | armedbear/abcl | load.lisp | ;;; load.lisp
;;;
Copyright ( C ) 2004 - 2005
$ Id$
;;;
;;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
;;;... | null | https://raw.githubusercontent.com/armedbear/abcl/0631ea551523bb93c06263e772fbe849008e2f68/src/org/armedbear/lisp/load.lisp | lisp | load.lisp
This program is free software; you can redistribute it and/or
either version 2
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for m... | Copyright ( C ) 2004 - 2005
$ Id$
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
(... |
666c4032856aa386f07c92f4654f7bf93c35985f5fd12419a06885d0bc650b9b | wavewave/HROOT | Class.hs | {-# LANGUAGE OverloadedStrings #-}
module HROOT.Data.Math.Class where
import FFICXX.Generate.Code.Primitive (double, double_, int, int_, void_)
import FFICXX.Generate.Type.Cabal (BuildType (..), Cabal (..), CabalName (..))
import FFICXX.Generate.Type.Class
( Class (..),
Function (..),
ProtectedMethod (..),
... | null | https://raw.githubusercontent.com/wavewave/HROOT/eacc92b5f6228ca49dfa615d01dd72ca744d54c6/HROOT-generate/src/HROOT/Data/Math/Class.hs | haskell | # LANGUAGE OverloadedStrings #
rootFitFitResult :: Class
[ ] |
module HROOT.Data.Math.Class where
import FFICXX.Generate.Code.Primitive (double, double_, int, int_, void_)
import FFICXX.Generate.Type.Cabal (BuildType (..), Cabal (..), CabalName (..))
import FFICXX.Generate.Type.Class
( Class (..),
Function (..),
ProtectedMethod (..),
TopLevel (..),
)
import FFICX... |
e2ba42112c276851ae2e14290af5621da0d5e1e610ebed5130aada1f10ca3cc3 | sebashack/servantRestfulAPI | Bookable.hs | {-# LANGUAGE OverloadedStrings #-}
module HelperLibs.Interpreters.Bookable where
import Data.Aeson
import Data.Aeson.Types
import Data.Char
import Servant
import Control.Monad.Trans.Reader
import Control.Monad.IO.Class
import HelperLibs.Interpreters.BookingDomain
import HelperLibs.ElasticSearch.ResponseParser
import... | null | https://raw.githubusercontent.com/sebashack/servantRestfulAPI/e625535d196acefaff4f5bf03108816be668fe4d/libs/HelperLibs/Interpreters/Bookable.hs | haskell | # LANGUAGE OverloadedStrings #
A list of roomIds can be empty.
Given a BookableSpecs data type validate it. Note that in case that roomSize or
bedType is not valid a Nothing is returned inside BookableSpecs.
Optional fields
Obligatory fields
enDesc is not valid a Nothing is returned inside BasicBookableData.
Ob... |
module HelperLibs.Interpreters.Bookable where
import Data.Aeson
import Data.Aeson.Types
import Data.Char
import Servant
import Control.Monad.Trans.Reader
import Control.Monad.IO.Class
import HelperLibs.Interpreters.BookingDomain
import HelperLibs.ElasticSearch.ResponseParser
import Control.Monad.Except
import Config... |
93cb8f691b3d94619fb5a96aa8dfb1dd30880dbb3648310274e3fecd5d8185cc | Xandaros/abnf | ABNF.hs | |
Module : Text . ABNF.ABNF
Description : ABNF
Copyright : ( c ) , 2016
License : BSD2
Maintainer : < >
Stability : experimental
Portability : non - portable
Module : Text.ABNF.ABNF
Description : ABNF
Copyright : (c) Martin Zeller, 2016
License : BSD2
Maintainer : Mar... | null | https://raw.githubusercontent.com/Xandaros/abnf/347a2fbe49aeb380f5d07632036cfbc0e6bb1a6a/src/Text/ABNF/ABNF.hs | haskell | * ABNF types
| Re-exported from "Text.ABNF.ABNF.Types"
* Parsing ABNF Rules
| Re-exported from "Text.ABNF.ABNF.Parser"
* Canonicalizing ABNF Rules
| Re-exported from "Text.ABNF.ABNF.Canonicalizer" | |
Module : Text . ABNF.ABNF
Description : ABNF
Copyright : ( c ) , 2016
License : BSD2
Maintainer : < >
Stability : experimental
Portability : non - portable
Module : Text.ABNF.ABNF
Description : ABNF
Copyright : (c) Martin Zeller, 2016
License : BSD2
Maintainer : Mar... |
8079b5617866ad446308523a8db9c043cbc84225f7a87712c72543c77d2c5f1b | MastodonC/kixi.hecuba | main.cljs | (ns kixi.hecuba.main
(:require
[om.core :as om :include-macros true]
[kixi.hecuba.tabs.hierarchy :as hierarchy]
[kixi.hecuba.history :as history]
[kixi.hecuba.model :refer (app-model)]
[ankha.core :as ankha]
[cljs.core.async :refer [put! chan <!]]))
(defn main []
(when-let [hecuba-tabs (.getEleme... | null | https://raw.githubusercontent.com/MastodonC/kixi.hecuba/467400bbe670e74420a2711f7d49e869ab2b3e21/src/cljs/kixi/hecuba/main.cljs | clojure | Useful for debugging in dev
(om/root ankha/inspector app-model {:target (.getElementById js/document "ankha")}) | (ns kixi.hecuba.main
(:require
[om.core :as om :include-macros true]
[kixi.hecuba.tabs.hierarchy :as hierarchy]
[kixi.hecuba.history :as history]
[kixi.hecuba.model :refer (app-model)]
[ankha.core :as ankha]
[cljs.core.async :refer [put! chan <!]]))
(defn main []
(when-let [hecuba-tabs (.getEleme... |
010cd4efe4708eb3dea190c0d2ba8650102b6f34b1bfb0f06ac14305e19fbff0 | wdebeaum/step | whereas.lisp | ;;;;
;;;; W::WHEREAS
;;;;
(define-words
:pos W::adv :templ DISC-PRE-TEMPL
:words (
(W::WHEREAS
(SENSES
((LF-PARENT ONT::Qualification )
(TEMPL binary-constraint-s-decl-templ)
(meta-data :origin beetle2 :entry-date 20070609 :change-date nil :comments sentential-conjunction-cleanup)
)
)... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/whereas.lisp | lisp |
W::WHEREAS
|
(define-words
:pos W::adv :templ DISC-PRE-TEMPL
:words (
(W::WHEREAS
(SENSES
((LF-PARENT ONT::Qualification )
(TEMPL binary-constraint-s-decl-templ)
(meta-data :origin beetle2 :entry-date 20070609 :change-date nil :comments sentential-conjunction-cleanup)
)
)
)
))
|
85dbb22631882869c82e4f2122cabb6acbd041ca32aa66988d0e7b2fa8e64bdc | deadpendency/deadpendency | DetermineDependenciesResult.hs | module DD.Effect.DetermineDependencies.Model.DetermineDependenciesResult
( DetermineDependenciesResult (..),
)
where
import Common.Aeson.Aeson
import Common.Model.Dependency.Basic.BasicRepoDependencies
import Common.Model.Dependency.Ignored.IgnoredRepoDependencies
import Data.Aeson
data DetermineDependenciesResul... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/dependency-determiner/src/DD/Effect/DetermineDependencies/Model/DetermineDependenciesResult.hs | haskell | module DD.Effect.DetermineDependencies.Model.DetermineDependenciesResult
( DetermineDependenciesResult (..),
)
where
import Common.Aeson.Aeson
import Common.Model.Dependency.Basic.BasicRepoDependencies
import Common.Model.Dependency.Ignored.IgnoredRepoDependencies
import Data.Aeson
data DetermineDependenciesResul... | |
b793a0c100f3ac891450f13c128e9564843a183264a0e821028866aae8a7442c | MariaGrozdeva/Functional_programming | paths.rkt | #lang racket/base
(define (paths tree)
(if (null? tree)
'()
(if (and (null? (cadr tree)) (null? (caddr tree)))
(list (list (car tree)))
(map (lambda (x) (cons (car tree) x))
(append (paths (cadr tree)) (paths (caddr tree)))) ) )
) | null | https://raw.githubusercontent.com/MariaGrozdeva/Functional_programming/002e3dbbbc64558094eecd147cb1fd064ee84a03/Tasks%20on%20binary%20trees/paths.rkt | racket | #lang racket/base
(define (paths tree)
(if (null? tree)
'()
(if (and (null? (cadr tree)) (null? (caddr tree)))
(list (list (car tree)))
(map (lambda (x) (cons (car tree) x))
(append (paths (cadr tree)) (paths (caddr tree)))) ) )
) | |
cb31c3089466038d8f303ed4fcf13586479b822a648aa2436727f40a1f91521e | altsun/My-Lisps | ChiaDat.lsp | ;;;=================================
Copyright by ssg - www.cadviet.com - February 2009
;;;=================================
;;;=================================
;;;DIALOG FUNCTIONS
;;;=================================
(defun begin_dialog(DiaFile DiaName)
(setq i (load_dialog DiaFile))
(if (not (n... | null | https://raw.githubusercontent.com/altsun/My-Lisps/f88bfff543d9a0be5c9fa8180f74e58651509dbe/Common/chiadat/ChiaDat.lsp | lisp | =================================
=================================
=================================
DIALOG FUNCTIONS
=================================
-------------------------------------------------------------
-------------------------------------------------------------
------------------------------------... |
Copyright by ssg - www.cadviet.com - February 2009
(defun begin_dialog(DiaFile DiaName)
(setq i (load_dialog DiaFile))
(if (not (new_dialog DiaName i)) (exit))
(action_tile "cancel" "(done_dialog) (command \"regen\") (exit)")
)
(defun end_dialog()
(start_dialog) (unload_dialog i)
)
(defun set_lis... |
f586d37b5ebf9eed3b6ebdcabfe48d5ba68e811f5e5c5d08e189d289176f0ec4 | hasura/pg-client-hs | PTI.hs | # OPTIONS_GHC -fno - warn - missing - signatures #
module Database.PG.Query.PTI where
-------------------------------------------------------------------------------
import Data.Word (Word32)
import Database.PostgreSQL.LibPQ qualified as PQ
import Prelude
------------------------------------------------------------... | null | https://raw.githubusercontent.com/hasura/pg-client-hs/6053444a171174cd273ad929760bd654b2751d55/src/Database/PG/Query/PTI.hs | haskell | -----------------------------------------------------------------------------
-----------------------------------------------------------------------------
* Constants
-----------------------
Array Types | # OPTIONS_GHC -fno - warn - missing - signatures #
module Database.PG.Query.PTI where
import Data.Word (Word32)
import Database.PostgreSQL.LibPQ qualified as PQ
import Prelude
mkOid :: Word32 -> PQ.Oid
mkOid = PQ.Oid . fromIntegral
auto = mkOid 0
abstime = mkOid 702
aclitem = mkOid 1033
bit = mkOid 1560
bool... |
cbd720ffbb1f85dea77227b1bfa1922899b3d3b8fbac4a179790e781547b5282 | Ekdohibs/camlboot | arg.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/Ekdohibs/camlboot/506280c6e0813e0e794988151a8e46be55373ebc/miniml/interp/arg.ml | ocaml | ************************************************************************
OCaml
... | , projet Para , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type key = string
type doc = string
type usage_msg = string
type anon_fun = (string -> unit)
type spec =
... |
56f987aa107a11c782fe6d73558e36a6f8f20e2995c3b2e9f835657fb91cc8c8 | sionescu/bordeaux-threads | impl-lispworks.lisp | ;;;; -*- indent-tabs-mode: nil -*-
(in-package :bordeaux-threads-2)
#+(or lispworks4 lispworks5)
(error 'bordeaux-threads-error
:message "Threading not supported")
;;;
;;; Threads
;;;
(deftype native-thread ()
'mp:process)
(defun %start-multiprocessing ()
(mp:initialize-multiprocessing))
(defun %make-t... | null | https://raw.githubusercontent.com/sionescu/bordeaux-threads/6131a9c6da2a0fc38e0cadfbb22614f2787a830f/apiv2/impl-lispworks.lisp | lisp | -*- indent-tabs-mode: nil -*-
Threads
Introspection/debugging
Non-recursive locks
Recursive locks
Semaphores
Condition variables
|
(in-package :bordeaux-threads-2)
#+(or lispworks4 lispworks5)
(error 'bordeaux-threads-error
:message "Threading not supported")
(deftype native-thread ()
'mp:process)
(defun %start-multiprocessing ()
(mp:initialize-multiprocessing))
(defun %make-thread (function name)
(mp:process-run-function name n... |
66fef4c515fffc73eb7d2b1d0a72b8cd5db2020117f06bcbeec8dcee4f636e3e | bennn/dissertation | main.rkt | #lang typed/racket/base
(require
require-typed-check
"../base/command-types.rkt")
(require/typed/check "eval.rkt"
(forth-eval* (-> (Listof String) (Values Any Any)))
)
(require (only-in racket/file file->lines))
;; =============================================================================
(define LOOPS 10)
... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/forth/typed/main.rkt | racket | ============================================================================= | #lang typed/racket/base
(require
require-typed-check
"../base/command-types.rkt")
(require/typed/check "eval.rkt"
(forth-eval* (-> (Listof String) (Values Any Any)))
)
(require (only-in racket/file file->lines))
(define LOOPS 10)
(: main (-> (Listof String) Void))
(define (main lines)
(for ((i (in-range LOO... |
bbc99e5e776fce2877075628e140f0f4bc61f71a26322b9e0a6ded27164eeb83 | diku-dk/futhark | KernelBabysitting.hs | # LANGUAGE TypeFamilies #
-- | Do various kernel optimisations - mostly related to coalescing.
module Futhark.Pass.KernelBabysitting (babysitKernels) where
import Control.Arrow (first)
import Control.Monad.State.Strict
import Data.Foldable
import Data.List (elemIndex, isPrefixOf, sort)
import Data.Map.Strict qualifie... | null | https://raw.githubusercontent.com/diku-dk/futhark/98e4a75e4de7042afe030837084764bbf3c6c66e/src/Futhark/Pass/KernelBabysitting.hs | haskell | | Do various kernel optimisations - mostly related to coalescing.
| The pass definition.
| Map from variable names to defining expression. We use this to
hackily determine whether something is transposed or otherwise
funky in memory (and we'd prefer it not to be). If we cannot find
suppose. We really should do... | # LANGUAGE TypeFamilies #
module Futhark.Pass.KernelBabysitting (babysitKernels) where
import Control.Arrow (first)
import Control.Monad.State.Strict
import Data.Foldable
import Data.List (elemIndex, isPrefixOf, sort)
import Data.Map.Strict qualified as M
import Data.Maybe
import Futhark.IR
import Futhark.IR.GPU hidi... |
6fa6f3c66f910ad495f980760105afd4d178e97391e241401c2105a124b0fd71 | jimcrayne/jhc | StrictNewtype.hs |
newtype TID = TID Int
deriving(Show)
data Foo = Foo !TID Char !Int
deriving(Show)
main :: IO ()
main = print (Foo (TID 3) 'x' 4)
| null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/6_fixed_bugs/StrictNewtype.hs | haskell |
newtype TID = TID Int
deriving(Show)
data Foo = Foo !TID Char !Int
deriving(Show)
main :: IO ()
main = print (Foo (TID 3) 'x' 4)
| |
b11d957c1fb11772e7c4079f5e156e57698f0ab7d2ef72d2ff0fa687018596a2 | beerendlauwers/hakyll-extra | JSON.hs | module Hakyll.Core.Util.JSON where
import Hakyll
import Data.Aeson
import Codec.Binary.UTF8.Generic (toString)
-- | Produces a String that is valid JSON (can be copy-pasted into a browser and parsed).
renderToJSON :: ToJSON a => a -> String
renderToJSON = toString... | null | https://raw.githubusercontent.com/beerendlauwers/hakyll-extra/cc4741a9781412108926ac2d7cf70f52a5ee68a3/src/Hakyll/Core/Util/JSON.hs | haskell | | Produces a String that is valid JSON (can be copy-pasted into a browser and parsed). | module Hakyll.Core.Util.JSON where
import Hakyll
import Data.Aeson
import Codec.Binary.UTF8.Generic (toString)
renderToJSON :: ToJSON a => a -> String
renderToJSON = toString . encode |
7496c140ae61ca8a19a3b6385c819537900da3f31f8c67c31bfb46c9e26b7389 | kanwei/montebot | core_test.clj | (ns montebot.core-test
(:require [clojure.test :refer :all]
[montebot.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/kanwei/montebot/72bccb9d94538c9aac8383b916c1100298d8bf1f/test/ulam/core_test.clj | clojure | (ns montebot.core-test
(:require [clojure.test :refer :all]
[montebot.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
008d707cfd468f9f7695105c7a4dbcd7bb66d4f846b476218a6a03ce5693d64b | juxt/shop | routes.clj | Copyright © 2016 , JUXT LTD .
Our phonebook but as a single page application ( SPA )
(ns edge.phonebook-app.routes
(:require
[clojure.java.io :as io]
[integrant.core :as ig]
[selmer.parser :as selmer]
[yada.yada :as yada]))
(defn- routes
[{:edge.phonebook/keys [db]}]
[["" (yada/resource
... | null | https://raw.githubusercontent.com/juxt/shop/c23fc55bca1852bfbabb681a72debc12373c3a36/examples/phonebook-app/src/edge/phonebook_app/routes.clj | clojure | We want to serve the same content for
every path below here. | Copyright © 2016 , JUXT LTD .
Our phonebook but as a single page application ( SPA )
(ns edge.phonebook-app.routes
(:require
[clojure.java.io :as io]
[integrant.core :as ig]
[selmer.parser :as selmer]
[yada.yada :as yada]))
(defn- routes
[{:edge.phonebook/keys [db]}]
[["" (yada/resource
... |
5cc6dc6ea3afe74fad6d72a0286c4eef18145b825a23450362c9f851d37aa75f | chris-moreton/plutus-scripts | plutus-helloworld-bytestring.hs |
import Prelude
import System.Environment
import Cardano.Api
import Cardano.Api.Shelley
import Data.Aeson (encode)
import qualified Data.ByteString.Short as SBS
import qualified Plutus.V1.Ledger.Api as Plutus
import PlutusTx.Prelude as P (ByteString)
impo... | null | https://raw.githubusercontent.com/chris-moreton/plutus-scripts/fd09a54c00f1593da4a75e57f44d7ac773e356fd/plutus-sources/plutus-helloworld/app/plutus-helloworld-bytestring.hs | haskell |
import Prelude
import System.Environment
import Cardano.Api
import Cardano.Api.Shelley
import Data.Aeson (encode)
import qualified Data.ByteString.Short as SBS
import qualified Plutus.V1.Ledger.Api as Plutus
import PlutusTx.Prelude as P (ByteString)
impo... | |
b8238641f52cf27b01e3d6d7a1b93ffb02aef01e96685f8bfc890192d52454cd | rohitjha/ProjectEuler | PE010.hs | import MPL.NumberTheory.Primes
main = putStrLn $ show $ sum $ primesTo 2000000
| null | https://raw.githubusercontent.com/rohitjha/ProjectEuler/2f0a46bb1547b06a373c30966bba7a001b932bf4/MPL/PE010.hs | haskell | import MPL.NumberTheory.Primes
main = putStrLn $ show $ sum $ primesTo 2000000
| |
bf82c0128368dcc3a0645743cfaff3ea533c53e311c5e53a652e8f3d1fa94a60 | haskell/haskell-language-server | T1.hs | fmapEither :: (a -> b) -> Either c a -> Either c b
fmapEither = _lalala
| null | https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/golden/T1.hs | haskell | fmapEither :: (a -> b) -> Either c a -> Either c b
fmapEither = _lalala
| |
39c6e1daf1ce4c1ef6d5f9e44b31544adbe92f02105490c5ce5deb98c1c14414 | well-typed-lightbulbs/ocaml-esp32 | cloexec.ml | TEST
( *
This test is temporarily disabled on the MinGW and MSVC ports ,
because since fdstatus has been wrapped in an OCaml program ,
it does not work as well as before .
Presumably this is because the OCaml runtime opens files , so that handles
that have actually been closed at execution look... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/lib-unix/common/cloexec.ml | ocaml |
This test is temporarily disabled on the MinGW and MSVC ports,
because since fdstatus has been wrapped in an OCaml program,
it does not work as well as before.
Presumably this is because the OCaml runtime opens files, so that handles
that have actually been closed at execution look open and make the
test f... | TEST
( *
This test is temporarily disabled on the MinGW and MSVC ports ,
because since fdstatus has been wrapped in an OCaml program ,
it does not work as well as before .
Presumably this is because the OCaml runtime opens files , so that handles
that have actually been closed at execution look... |
e66593a2b23ec59aa9efaa07fe32261225ce2fd9cce0a33f0a3fc22008af3417 | dongcarl/guix | graph.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2015 , 2016 , 2020 , 2021 < >
Copyright © 2016 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Sof... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/guix/graph.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2015 , 2016 , 2020 , 2021 < >
Copyright © 2016 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix graph)
#:use-module (guix store)
#:use-mod... |
51afabddc6e8db7b4f07f0866539ba71febf09235997c2006da468196db67763 | babashka/nbb | script.cljs | (ns script
(:require ["fs" :as fs] ;; verify that required namespaces can in turn also load node modules
built in namespace , continue processing libspecs ,
[other-script :as o :refer [another-fn] :rename {another-fn foo}]))
(defn script-fn []
(fs/existsSync ".")
(when (and (= :yolo (o/script-fn))... | null | https://raw.githubusercontent.com/babashka/nbb/4d06aa142a5fb5baac48a8ad8e611d672f779b5f/test-scripts/script.cljs | clojure | verify that required namespaces can in turn also load node modules | (ns script
built in namespace , continue processing libspecs ,
[other-script :as o :refer [another-fn] :rename {another-fn foo}]))
(defn script-fn []
(fs/existsSync ".")
(when (and (= :yolo (o/script-fn))
(= :another-fn (foo)))
:hello))
(+ 1 2 3)
|
4eb58d2c171e5de9362491078fe42aa7814ce2adf654fedd0af4f37ee66f4e95 | inria-parkas/sundialsml | sundials_NonlinearSolver.mli | (***********************************************************************)
(* *)
(* OCaml interface to Sundials *)
(* *)
, , an... | null | https://raw.githubusercontent.com/inria-parkas/sundialsml/a72ebfc84b55470ed97fbb0b45d700deebfc1664/src/lsolvers/sundials_NonlinearSolver.mli | ocaml | *********************************************************************
OCaml interface to Sundials
... | , , and
( / ENS ) ( / ENS ) ( UPMC / ENS / Inria )
Copyright 2020 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
* Generic nonlinear solvers .
Sundials provides... |
c845f5a866a005cde98e73c8ed305786217b59c87edcaf0f1a9d23d5419bc393 | input-output-hk/ouroboros-network | Orphans.hs | {-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - orphans #
module Cardano.Tools.DBSynthesizer.Orphans () where
import Control.Monad (when)
import Data.Aeson as Aeson (FromJSON (..), withObject, (.!=), (.:),
(.:?))
import quali... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/162c2b426ca66047f92a7d073036c13a434bf026/ouroboros-consensus-cardano-tools/src/Cardano/Tools/DBSynthesizer/Orphans.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
DUPLICATE: mirroring parsers from cardano-node/src/Cardano/Node/Configuration/POM.hs |
# OPTIONS_GHC -fno - warn - orphans #
module Cardano.Tools.DBSynthesizer.Orphans () where
import Control.Monad (when)
import Data.Aeson as Aeson (FromJSON (..), withObject, (.!=), (.:),
(.:?))
import qualified Cardano.Chain.Update as Byron (ApplicationName (..))
import ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.