_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 |
|---|---|---|---|---|---|---|---|---|
2a78333bfb46cb4d6852c8b83bef75a7b39f7211b97697df247ddd6137d0c1f2 | OCamlPro/ez_api | ezServer.ml | (**************************************************************************)
(* *)
(* Copyright 2018-2023 OCamlPro *)
(* *)
(* All righ... | null | https://raw.githubusercontent.com/OCamlPro/ez_api/5253f7dd8936e923290aa969ee43ebd3dc6fce2d/src/server/cohttp/ezServer.ml | ocaml | ************************************************************************
Copyright 2018-2023 OCamlPro
All rights reserved. This ... | GNU Lesser General Public License version 2.1 , with the special
include EzAPIServerCohttp
|
c723e0e1e9a5c3507086c09b73d9a95753f2f39dc2a360f19c628fac9ea1fc2c | ring-clojure/ring-cps | undertow.clj | (ns ring.cps.adapter.undertow
(:require [clojure.string :as str]
[ring.cps.protocols :as p])
(:import [io.undertow Undertow Undertow$Builder]
[io.undertow.io Sender]
[io.undertow.server HttpHandler HttpServerExchange]
[io.undertow.util HeaderMap HeaderValues HttpString]
... | null | https://raw.githubusercontent.com/ring-clojure/ring-cps/19d080dd6a4ffb98e34e3f79afd06defa517eb9e/src/ring/cps/adapter/undertow.clj | clojure | (ns ring.cps.adapter.undertow
(:require [clojure.string :as str]
[ring.cps.protocols :as p])
(:import [io.undertow Undertow Undertow$Builder]
[io.undertow.io Sender]
[io.undertow.server HttpHandler HttpServerExchange]
[io.undertow.util HeaderMap HeaderValues HttpString]
... | |
4f8436ae13a83495cbaaeb4248cd1007849ee499bd498850605e2b315a89498c | philnguyen/soft-contract | triangl.rkt | #lang racket
TRIANGL -- Board game benchmark .
(define *board*
(vector 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1)
( list->vector ' ( 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 ) ) )
(define *sequence*
(vector 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
#;(list->vector '(0 0 0 0 0 0 0 0 0 0 0 0 0 0)))
(define *a*
(vector 1 2 4 3 5 6 1 3 6... | null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/larceny/triangl.rkt | racket | (list->vector '(0 0 0 0 0 0 0 0 0 0 0 0 0 0))) | #lang racket
TRIANGL -- Board game benchmark .
(define *board*
(vector 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1)
( list->vector ' ( 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 ) ) )
(define *sequence*
(vector 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
(define *a*
(vector 1 2 4 3 5 6 1 3 6 2 5 4 11 12
13 7 8 4 4 7 11 8 12... |
1e87ce34628ee341ff6e470c0f7b5e918dce4fec837d48049add345b83ddf76a | hipsleek/hipsleek | cabshelper.ml |
open Cabs
let nextident = ref 0
let getident () =
nextident := !nextident + 1;
!nextident
let currentPos () =
let l, f, c, ls = Errormsg.getPosition () in
{ lineno = l;
filename = f;
byteno = c;
linestart = ls;
ident = getident ();}
let cabspu = {lineno = -10;
fi... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/cil/src/frontc/cabshelper.ml | ocaml | clexer puts comments here
********** HELPER FUNCTIONS ********* |
open Cabs
let nextident = ref 0
let getident () =
nextident := !nextident + 1;
!nextident
let currentPos () =
let l, f, c, ls = Errormsg.getPosition () in
{ lineno = l;
filename = f;
byteno = c;
linestart = ls;
ident = getident ();}
let cabspu = {lineno = -10;
fi... |
737a093248b19158865a90580ea3c0e32f1e4e1a0cc2d3a32f8f3d94577e204c | jarmitage/jarmlib | MIDI.hs | -- -moss/DrivenByMoss-Documentation/blob/master/Generic-Tools-Protocols/Open-Sound-Control-(OSC).md#receive---play
-- Virtual keyboard OSC Specs
:{
{ Velocity:0 - 127 }
( OSC " /vkb_midi/{Channel:1 - 16}/note/+ " -- 1 octave up
( OSC " /vkb_midi/{Channel:1 - 16}/note/- " -- 1 octave down
( OSC " /vkb_midi/{Cha... | null | https://raw.githubusercontent.com/jarmitage/jarmlib/853f6d18ab32630397be91ea89846d55e59e3d70/tidal/osc/targets/Bitwig/OSCSpecs/MIDI.hs | haskell | -moss/DrivenByMoss-Documentation/blob/master/Generic-Tools-Protocols/Open-Sound-Control-(OSC).md#receive---play
Virtual keyboard OSC Specs
1 octave up
1 octave down
(OSC "/vkb_midi/{Channel:1-16}/drum/+ 1 drum octave up
(OSC "/vkb_midi/{Channel:1-16}/drum/- 1 drum octave down
Virtual keyboard params
note number... |
:{
{ Velocity:0 - 127 }
( OSC " /vkb_midi/{Channel:1 - 16}/drum/{Note:0 - 127 } { Velocity:0 - 127 }
{ Value:0 - 127 }
{ Pressure:0 - 127 } Sends Poly Aftertouch
( OSC " /vkb_midi/{Channel:1 - 16}/aftertouch { Pressure:0 - 127 } Sends Channel Aftertouch
{ Pitch:0 - 127 ( No - Bend:64 ) }
( OSC " /vkb_mid... |
34725cedd50881e931bd6bd4820f88c8342842dad81e05f59ff7c5fdc43ed81f | spinda/liquidhaskell-cabal-demo | B.hs | module B where
{-@ minus :: x:Int -> y:Int -> {v:Int | v = x - y} @-}
minus :: Int -> Int -> Int
minus x y = x - y
| null | https://raw.githubusercontent.com/spinda/liquidhaskell-cabal-demo/715b051f8352ddb3a81611b4b3db52ef5eb9ad50/src/B.hs | haskell | @ minus :: x:Int -> y:Int -> {v:Int | v = x - y} @ | module B where
minus :: Int -> Int -> Int
minus x y = x - y
|
de57094681e4fa78bd175d36d0a4521c238dd6ce0865b53acec530aec1ee57d5 | y2q-actionman/with-c-syntax | stddef.lisp | (in-package #:with-c-syntax.libc-implementation)
;;; I do not define NULL as a preprocessor macro. If do so, I
destroy ` CL : NULL ' usage . I use ` defconstant ' and ` defun ' instead .
(defconstant NULL nil
"Holding `CL:NIL' for acting NULL of C language.")
(defun NULL (object)
"An alias for `CL:NULL'.
This ... | null | https://raw.githubusercontent.com/y2q-actionman/with-c-syntax/fa212ff8e570272aea6c6de247d8f03751e60843/libc/stddef.lisp | lisp | I do not define NULL as a preprocessor macro. If do so, I
'offsetof' is implemented in 'include/stddef.h'. | (in-package #:with-c-syntax.libc-implementation)
destroy ` CL : NULL ' usage . I use ` defconstant ' and ` defun ' instead .
(defconstant NULL nil
"Holding `CL:NIL' for acting NULL of C language.")
(defun NULL (object)
"An alias for `CL:NULL'.
This is for convenience using 'NULL' as C constant and Lisp functio... |
ed542a80a87c2e58038b72222c30294df84c7e5066e8fc2d74bae5e818c42188 | techwhizbang/bluecollar | project.clj | (defproject bluecollar/bluecollar "1.0.1"
:description "Bluecollar: a simple yet full featured distributed background processing solution written in Clojure."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[clj-time "0... | null | https://raw.githubusercontent.com/techwhizbang/bluecollar/10269249a686c4e92daefd7cecd6c7c5934db81c/project.clj | clojure | Redis client
JSON parsing
Logging dependencies | (defproject bluecollar/bluecollar "1.0.1"
:description "Bluecollar: a simple yet full featured distributed background processing solution written in Clojure."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[clj-time "0... |
d08800efec5ef806ca373bf51f22d4a545c49528457f6e6bdc7d2d2877dbb0ad | greglook/blocks | init_test.clj | (ns blocks.store.init-test
(:require
[blocks.store :as store]
[blocks.store.file]
[blocks.store.memory]
[clojure.string :as str]
[clojure.test :refer [deftest testing is]])
(:import
(blocks.store.file
FileBlockStore)
(blocks.store.memory
MemoryBlockStore)
java.io.File))
... | null | https://raw.githubusercontent.com/greglook/blocks/c962d4431c05ac686a0cd1145e05bc0a0e0c4d7d/test/blocks/store/init_test.clj | clojure | (ns blocks.store.init-test
(:require
[blocks.store :as store]
[blocks.store.file]
[blocks.store.memory]
[clojure.string :as str]
[clojure.test :refer [deftest testing is]])
(:import
(blocks.store.file
FileBlockStore)
(blocks.store.memory
MemoryBlockStore)
java.io.File))
... | |
ea73fd86b3d26aa6f37260b76ebe9c4705d80e380db0fd21a316eb81ebe969b7 | darrenldl/ocaml-SeqBox | param.ml | module Common = struct
largest common divisor of version 1 , 2 , 3 block sizes
end
module Rescue = struct
write every 1000ms
end
| null | https://raw.githubusercontent.com/darrenldl/ocaml-SeqBox/658c623db8745ae1d804c75880b29fb53435860f/src/param.ml | ocaml | module Common = struct
largest common divisor of version 1 , 2 , 3 block sizes
end
module Rescue = struct
write every 1000ms
end
| |
b0d3e21378a0991fba38f4f17ce9f17021fb7c50efe4ba2fb5b8f131dd2cc040 | callum-oakley/advent-of-code | 18.clj | (ns aoc.2018.18
(:require
[aoc.grid :as grid]
[clojure.string :as str]
[clojure.test :refer [deftest is]]))
(defn parse [s]
(grid/parse s #(case % \. :open \| :trees \# :lumberyard)))
(defn tick [state]
(reduce-kv
(fn [state* pos type]
(let [adjacent (map state (grid/adjacent-8 pos))]
(c... | null | https://raw.githubusercontent.com/callum-oakley/advent-of-code/c8d9d912471415b0014707f768946b18f29b4531/src/aoc/2018/18.clj | clojure | (ns aoc.2018.18
(:require
[aoc.grid :as grid]
[clojure.string :as str]
[clojure.test :refer [deftest is]]))
(defn parse [s]
(grid/parse s #(case % \. :open \| :trees \# :lumberyard)))
(defn tick [state]
(reduce-kv
(fn [state* pos type]
(let [adjacent (map state (grid/adjacent-8 pos))]
(c... | |
8ce188340856c8a50a9736d89876f6000af795107d39b1f7e80d16b977146323 | LexiFi/ocaml-vdom | vdom.ml | This file is part of the ocaml - vdom package , released under the terms of an MIT - like license .
(* See the attached LICENSE file. *)
Copyright ( C ) 2000 - 2022 LexiFi
mo... | null | https://raw.githubusercontent.com/LexiFi/ocaml-vdom/948bcae4ac922e3260f1aee956063f1727dc441d/lib/vdom.ml | ocaml | See the attached LICENSE file. | This file is part of the ocaml - vdom package , released under the terms of an MIT - like license .
Copyright ( C ) 2000 - 2022 LexiFi
module Cmd = struct
type 'msg t = ..
type 'msg t +=
| Echo of 'msg
| Batch of 'msg t list
... |
7fbf6fc0da131239ddcff842cf1653a9c4b037cf57207d5ffb9c4bd115c78208 | 2600hz/kazoo | kzd_builders.erl | %%%-----------------------------------------------------------------------------
( C ) 2018 - 2019 , 2600Hz
@doc Kazoo document accessors builder .
@author
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 ... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_ast/src/kzd_builders.erl | erlang | -----------------------------------------------------------------------------
@end
-----------------------------------------------------------------------------
composite type | ( C ) 2018 - 2019 , 2600Hz
@doc Kazoo document accessors builder .
@author
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 /.
-module(kzd_builders).
-export([build_accessors/0
,... |
aebb9635bc7bf0564f93aed823991d81298311688486b5fd8ae51cef492f4e15 | octaspace/orc | orc_shell.erl | -module(orc_shell).
-export([exec/1]).
exec(Command) ->
Port = open_port({spawn, Command}, [stream, in, stderr_to_stdout, eof, hide, exit_status, binary]),
get_data(Port, <<>>).
get_data(Port, Acc) ->
receive
{Port, {data, Bytes}} ->
get_data(Port, <<Acc/binary, Bytes/binary>>);
... | null | https://raw.githubusercontent.com/octaspace/orc/5ece03a87b17379afde2e57063f900eaa40e3844/src/orc_shell.erl | erlang | -module(orc_shell).
-export([exec/1]).
exec(Command) ->
Port = open_port({spawn, Command}, [stream, in, stderr_to_stdout, eof, hide, exit_status, binary]),
get_data(Port, <<>>).
get_data(Port, Acc) ->
receive
{Port, {data, Bytes}} ->
get_data(Port, <<Acc/binary, Bytes/binary>>);
... | |
6c8ab61005de69441c6b27db06e9b3995c64ab568f785d82916de842036480fe | TyOverby/mono | list_form.ml | open! Core
open! Bonsai_web
open Bonsai.Let_syntax
module Form = Bonsai_web_ui_form
module E = Form.Elements
module S =
[%css.raw
{|
.pill {
padding: 2px;
background-color: #d0d0d0;
margin-right: 2px;
margin-bottom: 2px;
border-radius: 2px;
cursor: pointer;
}
.con... | null | https://raw.githubusercontent.com/TyOverby/mono/9f361de248f67441dd1486419ba19044b6fa4fad/app/bonsai-examples/forms/list_form.ml | ocaml | open! Core
open! Bonsai_web
open Bonsai.Let_syntax
module Form = Bonsai_web_ui_form
module E = Form.Elements
module S =
[%css.raw
{|
.pill {
padding: 2px;
background-color: #d0d0d0;
margin-right: 2px;
margin-bottom: 2px;
border-radius: 2px;
cursor: pointer;
}
.con... | |
6e61c61d4480e421c68f368a6d6355d48555cf97f6a32f6f9eb72b42f27ce732 | splittist/printfcl | package.lisp | package.lisp
(defpackage #:printfcl
(:use #:cl)
(:export #:printf
#:fprintf
#:sprintf
#:parse-hex-float
#:*converter*
#:*length-modifiers*
#:standard-converter
#:collect-length-modifier
#:collect-conversion-specifier
... | null | https://raw.githubusercontent.com/splittist/printfcl/15b5ef0e1a011e1a5274b64121eaf4ed94d37805/package.lisp | lisp | package.lisp
(defpackage #:printfcl
(:use #:cl)
(:export #:printf
#:fprintf
#:sprintf
#:parse-hex-float
#:*converter*
#:*length-modifiers*
#:standard-converter
#:collect-length-modifier
#:collect-conversion-specifier
... | |
efe3fb3a07bf649d22eeee28e94fca881c8f6902ff04adb5d80cd6c11ede90c1 | tezos/tezos-mirror | test_fast.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2022 - 2023 TriliTech < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/195315d385d7e8e25fc599e7cb645b1429957183/src/lib_scoru_wasm/fast/test/test_fast.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2022 - 2023 TriliTech < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETH... |
ada7218f52480a0192f34584cc1cf49b2c7c61f78bef3c01b3739149215ab780 | cxphoe/SICP-solutions | compiler-instruction-sequence.rkt | (define (make-instruction-sequence needs modifies statements)
(list needs modifies statements))
(define (empty-instruction-sequence)
(make-instruction-sequence '() '() '()))
(define (registers-needed s)
(if (symbol? s) '() (car s)))
(define (registers-modified s)
(if (symbol? s) '() (cadr s)))
(define (stat... | null | https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%205-Computing%20with%20Register%20Machines/5.%20Compile/compiler-instruction-sequence.rkt | racket | (define (make-instruction-sequence needs modifies statements)
(list needs modifies statements))
(define (empty-instruction-sequence)
(make-instruction-sequence '() '() '()))
(define (registers-needed s)
(if (symbol? s) '() (car s)))
(define (registers-modified s)
(if (symbol? s) '() (cadr s)))
(define (stat... | |
b71790c9d63f9a7f3bd13fc15046405f83ad1bcf9bb4a7a6de1d798d1f283003 | athos/parabola | middleware.clj | (ns parabola.middleware)
(defn forwarding-to [reactors adapter]
(fn [msg]
(when-let [res (reactors msg)]
(assoc res :adapter adapter))))
(defn only-when [reactors pred]
(fn [msg]
(when (pred msg)
(reactors msg))))
| null | https://raw.githubusercontent.com/athos/parabola/b6ea2d9108a97f9470f2f107c1f5fc71ea23f7e3/src/parabola/middleware.clj | clojure | (ns parabola.middleware)
(defn forwarding-to [reactors adapter]
(fn [msg]
(when-let [res (reactors msg)]
(assoc res :adapter adapter))))
(defn only-when [reactors pred]
(fn [msg]
(when (pred msg)
(reactors msg))))
| |
cec80d219caec0866b1a3aead8cba0ec2c9b6e77207f3658507d05d665d519f8 | basho/riak_test | pipe_verify_sink_types.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2012 Basho Technologies , Inc.
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the Li... | null | https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/pipe_verify_sink_types.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2012 Basho Technologies , Inc.
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
These tests used to be known a... |
8178e5e35faa225e27e8fae3d6df395106dc92e21f450a8aaabb09e24eb80c8f | jordwalke/rehp | stdlib.ml | Js_of_ocaml compiler
* /
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your option ) any l... | null | https://raw.githubusercontent.com/jordwalke/rehp/f122b94f0a3f06410ddba59e3c9c603b33aadabf/compiler/lib/stdlib.ml | ocaml | copied from
Check remaining [sep] chars match, access to unsafe s (!i + !k) is
guaranteed by loop invariant.
no match
From rehp Module_loader.re
From rehp Module_loader.re | Js_of_ocaml compiler
* /
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your option ) any l... |
4ff1c3bc15f936dcfbccb0409ea80b91b3e5bc9c52dbbfce36fbdc033626b9e8 | zachsully/dl | Syntax.hs | module DL.Core.Codata.Syntax where
import DL.General.Type
import DL.General.Variable
import DL.Utils.Pretty
data LCodata :: * where
CLet :: Variable -> LCodata -> LCodata -> LCodata
CVar :: Variable -> LCodata
CFix :: Variable -> LCodata -> LCodata
CAnn :: LCodata -> Type -> LCodata
CLit :: Int -> LCodata
... | null | https://raw.githubusercontent.com/zachsully/dl/c99cdfa8a3b59b1977a34876f397c467518091b6/haskell/DL/Core/Codata/Syntax.hs | haskell | module DL.Core.Codata.Syntax where
import DL.General.Type
import DL.General.Variable
import DL.Utils.Pretty
data LCodata :: * where
CLet :: Variable -> LCodata -> LCodata -> LCodata
CVar :: Variable -> LCodata
CFix :: Variable -> LCodata -> LCodata
CAnn :: LCodata -> Type -> LCodata
CLit :: Int -> LCodata
... | |
c8fed178536c8e8be3ea8541378da2bd5ddad5bb4a4537a0ddc52f77769137c4 | Clozure/ccl-tests | nthcdr.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Apr 19 22:48:36 2003
Contains : Tests of
(in-package :cl-test)
(compile-and-load "cons-aux.lsp")
;;; Error tests
(deftest nthcdr.error.1
(check-type-error #'(lambda (x) (nthcdr x (copy-list '(a b c d)))) (typef 'unsigned-byte))
nil)
(deftest nthcdr.e... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/nthcdr.lsp | lisp | -*- Mode: Lisp -*-
Error tests
Non-error tests | Author :
Created : Sat Apr 19 22:48:36 2003
Contains : Tests of
(in-package :cl-test)
(compile-and-load "cons-aux.lsp")
(deftest nthcdr.error.1
(check-type-error #'(lambda (x) (nthcdr x (copy-list '(a b c d)))) (typef 'unsigned-byte))
nil)
(deftest nthcdr.error.6
(signals-error (nthcdr -10 (cop... |
89d6c9b9442f49a4b913242a956864765a6a3fd9d47ab0c1a572930917b629e4 | upgradingdave/cljs | session.cljs | (ns up.bingo.dev.session
(:require
[devcards.core :as dc :include-macros true]
[reagent.core :as r]
[up.bingo.core :as b]
[up.bingo.components :as c]
[up.cookies.core :as cookie])
(:require-macros
[devcards.core :refer [defcard deftest defcard-doc]]
[cljs.test ... | null | https://raw.githubusercontent.com/upgradingdave/cljs/1026b6db905214586fb7e04800df078da19b37cc/src/cljs/up/bingo/dev/session.cljs | clojure | (b/init! !state [:bingo] "devcards") | (ns up.bingo.dev.session
(:require
[devcards.core :as dc :include-macros true]
[reagent.core :as r]
[up.bingo.core :as b]
[up.bingo.components :as c]
[up.cookies.core :as cookie])
(:require-macros
[devcards.core :refer [defcard deftest defcard-doc]]
[cljs.test ... |
a4dd5ac3e9d0b938ae671dfa0826475f144bdf9bc350c37c251ea3b0a76de647 | Vaguery/klapaucius | arg_parsing_test.clj | (ns push.util.arg-parsing-test
(:use midje.sweet)
(:use push.util.general)
)
(fact "`extract-keyword-argument` returns the value of keyworded args"
(extract-keyword-argument :foo '(7 :foo 8 :bar 9)) => 8
(extract-keyword-argument :bar '(7 :foo 8 :bar 9 10 11 12)) => 9
(extract-keyword-argument :baz '(7 :f... | null | https://raw.githubusercontent.com/Vaguery/klapaucius/17b55eb76feaa520a85d4df93597cccffe6bdba4/test/push/util/arg_parsing_test.clj | clojure | (ns push.util.arg-parsing-test
(:use midje.sweet)
(:use push.util.general)
)
(fact "`extract-keyword-argument` returns the value of keyworded args"
(extract-keyword-argument :foo '(7 :foo 8 :bar 9)) => 8
(extract-keyword-argument :bar '(7 :foo 8 :bar 9 10 11 12)) => 9
(extract-keyword-argument :baz '(7 :f... | |
451832e8e242feabfd52fcffd19f5583237abb03ac62dae9179f5ea2fbce4215 | SamueleGiraudo/Bud-Music-Box | BudGrammar.ml | Author :
* Creation : mar . 2019
* Modifications : mar . 2019 , apr . 2019 , aug . 2019 , sep . 2019 , dec . 2019 , jan . 2020 ,
* apr . 2020 , oct . 2020 , aug . 2022
* Creation: mar. 2019
* Modifications: mar. 2019, apr. 2019, aug. 2019, sep. 2019, dec. 2019, jan. 2020,
* apr. 2020, oct. 2020, aug.... | null | https://raw.githubusercontent.com/SamueleGiraudo/Bud-Music-Box/45eae635fcbd85555f74d864b31ab25ee50e6bde/Sources/BudGrammar.ml | ocaml | A color is a name (string).
A colored element is an element of an operad augmented with output an input colors.
Bud grammar.
A type for specifying a random generation shape.
Returns the colored element with the specified attributes.
Returns the underlying element of the colored element ce.
Returns the colo... | Author :
* Creation : mar . 2019
* Modifications : mar . 2019 , apr . 2019 , aug . 2019 , sep . 2019 , dec . 2019 , jan . 2020 ,
* apr . 2020 , oct . 2020 , aug . 2022
* Creation: mar. 2019
* Modifications: mar. 2019, apr. 2019, aug. 2019, sep. 2019, dec. 2019, jan. 2020,
* apr. 2020, oct. 2020, aug.... |
37b62f7b41543aa4c791ff9bc58cf446cad1946cf8e087bad6f522f99e4acfe1 | ocsigen/ocaml-eliom | cmi_format.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* ... | null | https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/typing/cmi_format.ml | ocaml | ************************************************************************
OCaml
Fabrice L... | Copyright 2012 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type pers_flags =
| Rectypes
| Deprecated of string
| Opaque
ELIOM
| Eliom_loc of Eliom_base.loc
type error =
Not_an_interface of string
| Wrong_version_... |
f8099260ab2d9fdbb9c043dde62baddfc6ed13eb3fde9825f55e804b78433645 | spurious/sagittarius-scheme-mirror | flonums.scm | ;; -*- scheme -*-
(library (rnrs arithmetic flonums (6))
(export flonum?
real->flonum
fl=?
fl<?
fl>?
fl<=?
fl>=?
flinteger?
flzero?
flpositive?
flnegative?
flodd?
fleven?
flfinite?
flinfinite?
flnan?
flmax
flmin
fl+
fl*
... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/lib/rnrs/arithmetic/flonums.scm | scheme | -*- scheme -*-
[end]
end of file
Local Variables:
End: | (library (rnrs arithmetic flonums (6))
(export flonum?
real->flonum
fl=?
fl<?
fl>?
fl<=?
fl>=?
flinteger?
flzero?
flpositive?
flnegative?
flodd?
fleven?
flfinite?
flinfinite?
flnan?
flmax
flmin
fl+
fl*
fl-
fl/
... |
4f45562733ee1909dfa73a0ba0f343f5966fc1ce7be6c93bc8fc91d6f96aa80e | pol-is/polisMath | intercom.clj | Copyright ( C ) 2012 - present , The Authors . This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . This program is distributed in the hope that it will be useful , but WITHOUT A... | null | https://raw.githubusercontent.com/pol-is/polisMath/dfe233e8c9207c2ce11e1379286ad0cf0f732067/src/polismath/meta/intercom.clj | clojure | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU Affero General Public License for more details . You should have received a copy of the GNU Affero General Public License along with this program . If not , see < / > .
(:require [clj-http.client :as client]
... |
(ns polismath.meta.intercom)
[ korma.core : as ]
( defn parse - json - resp
( defn get - icusers
( fn [ u ] ( int ( get u " created_at " ) ) )
( defn get - icuser - by - email
( defn update - icuser !
( defn update - icusers !
( defn icuser - from - dbuser
[ [: name ... |
d0daa42ae141588721052826125edf5d6f5a455b50e306df0082a43e30b504d9 | gebi/jungerl | ssh_proto.erl | %%% File : ssh_proto.erl
Author : < >
%%% Description : SSH Protocol for erlang
Created : 16 Aug 2004 by < >
-module(ssh_proto).
-vsn("$Revision$ ").
-rcsid("$Id$\n").
-compile(export_all).
-import(lists, [reverse/1, map/2, foreach/2, foldl/3, member/2]).
-include("../include/ssh.hrl").
-export([c... | null | https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/ssh/src/ssh_proto.erl | erlang | File : ssh_proto.erl
Description : SSH Protocol for erlang
io wrappers
client | server
string version of peer address
client version {Major,Minor}
server version {Major,Minor}
client version string
server version string
new algorithms (SSH_MSG_KEXINIT)
key exchange algorithm
host key algorithm
Interact... | Author : < >
Created : 16 Aug 2004 by < >
-module(ssh_proto).
-vsn("$Revision$ ").
-rcsid("$Id$\n").
-compile(export_all).
-import(lists, [reverse/1, map/2, foreach/2, foldl/3, member/2]).
-include("../include/ssh.hrl").
-export([connect/1, connect/2]).
-export([listen/1, listen/2]).
-export([debug/2... |
e50c74c9bc8f4b43659d79fbed3e64f28c9be1730346fd5a25513a3f81e66f4a | seckcoder/iu_c311 | store1.rkt | #lang eopl
; another impl modeling store based on scheme's own store
(require "../base/utils.rkt")
(provide (all-defined-out))
(define empty-store
(lambda ()
'()))
(define the-store 'uninitialized)
(define initialize-store!
(lambda ()
(set! the-store (empty-store))))
(define get-store
(lambda ()
... | null | https://raw.githubusercontent.com/seckcoder/iu_c311/a1215983b6ab08df32058ef1e089cb294419e567/racket/explicit-ref/store1.rkt | racket | another impl modeling store based on scheme's own store | #lang eopl
(require "../base/utils.rkt")
(provide (all-defined-out))
(define empty-store
(lambda ()
'()))
(define the-store 'uninitialized)
(define initialize-store!
(lambda ()
(set! the-store (empty-store))))
(define get-store
(lambda ()
the-store))
(define reference?
(lambda (ref)
(numb... |
05fea1d1c7b70d39dceb444f1d2c2ef3991d69edfdf85ead8d01a3930d915f1b | BU-CS320/Fall-2018 | ASTInterpreter.hs | module ASTInterpreter where
import Ast
import StatefulUnsafeMonad
TODO change to be the type of state , you have freedom for how you implement it
eval :: Program -> [String]
eval p = undefined
eval p = getPrints $ snd $ app ( eval ' p ) undefined
--
getPrints : : State - > [ String ]
getPrints = undefin... | null | https://raw.githubusercontent.com/BU-CS320/Fall-2018/beec3ca88be5c5a62271a45c8053fb1b092e0af1/project/src/ASTInterpreter.hs | haskell |
eval' :: Program -> StatefulUnsafe State Int
eval' = undefined | module ASTInterpreter where
import Ast
import StatefulUnsafeMonad
TODO change to be the type of state , you have freedom for how you implement it
eval :: Program -> [String]
eval p = undefined
eval p = getPrints $ snd $ app ( eval ' p ) undefined
getPrints : : State - > [ String ]
getPrints = undefined
|
ddeeee59c4499ccfde696c8ae05de4c959a2f6a519c1b50172e17c5637f58002 | sgbj/MaximaSharp | amacros.lisp | -*- Mode : Lisp ; Package : CL - MAXIMA ; Syntax : COMMON - LISP ; -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;;;
Copyright ( c ) 1984 by , University of Texas ; ; ; ; ;
;;; All rights rese... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/affine/amacros.lisp | lisp | Package : CL - MAXIMA ; Syntax : COMMON - LISP ; -*-
;;;;;
; ; ; ;
All rights reserved ;;;;;
x<x.z , x< x.*
x cannot be an atom here
(show call-arglist)
(show call-arglist)
and think you have the... |
(in-package :maxima)
(defmacro iassert (expr)
`(cond ((null ,expr) (fsignal "The expression ~A was not true" ',expr))))
(defun alphagreatp (x y)
(and (not (alphalessp x y)) (not (equal x y))))
(defun $monomial_alphalessp (x y)
(cond ((atom x)
(cond ((atom y) (alphalessp x y))
((null (cdr y)) (alphal... |
9296a60244e20a8f316342754099665217b997a86d73489efdc495495bbfbc2b | haskus/packages | Malloc.hs | {-# LANGUAGE UnliftedFFITypes #-}
# LANGUAGE MagicHash #
# LANGUAGE ForeignFunctionInterface #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
-- | Malloc memory allocator
module Haskus.Memory.Allocator.Malloc
( newBuffer
, newFinalizedBuffer
, freeBuffer
)
where
import GHC.Exts
import Foreign.Ptr (nullPtr... | null | https://raw.githubusercontent.com/haskus/packages/6d4a64dc26b55622af86b8b45a30a10f61d52e4d/haskus-binary/src/lib/Haskus/Memory/Allocator/Malloc.hs | haskell | # LANGUAGE UnliftedFFITypes #
# LANGUAGE GADTs #
| Malloc memory allocator
| Allocate a new Buffer using system ``malloc``
| Allocate a new finalized buffer using system ``malloc`` and finalized with
``free``.
| Free a malloc-ed Buffer | # LANGUAGE MagicHash #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE LambdaCase #
module Haskus.Memory.Allocator.Malloc
( newBuffer
, newFinalizedBuffer
, freeBuffer
)
where
import GHC.Exts
import Foreign.Ptr (nullPtr)
import Haskus.Utils.Monad
import qualified Haskus.Memory.Buffer as B
import Haskus.M... |
dbfe3500a75c41fb0c790f1274705e25621e72e1d59e1e999364cd2f1a282798 | den1k/vimsical | test.cljc | (ns vimsical.common.test
#?@(:clj
[(:require
[vimsical.common.uuid :as uuid]
[clojure.test :as t]
[clojure.data :as data])
(:import java.util.UUID)]
:cljs
[(:refer-clojure :exclude [uuid])
(:require [vimsical.common.uuid :as uuid])]))
;;
;; * Helpers
;;
;; Onl... | null | https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/src/common/vimsical/common/test.cljc | clojure |
* Helpers
Only use this when working through tests,
* UUID
when looking at test data! | (ns vimsical.common.test
#?@(:clj
[(:require
[vimsical.common.uuid :as uuid]
[clojure.test :as t]
[clojure.data :as data])
(:import java.util.UUID)]
:cljs
[(:refer-clojure :exclude [uuid])
(:require [vimsical.common.uuid :as uuid])]))
#?(:clj
(defn diff=
... |
a9d5d4a2005f2acc11e5d620998bf86922072f4f18319f9b654ea77a522c414e | acieroid/scala-am | josephus-problem.scm | (define result '())
(define output (lambda (i) (set! result (cons i result))))
(define (make-ring n)
(let ((last (cons 0 '())))
(define (build-list n)
(if (= n 0)
last
(cons n (build-list (- n 1)))))
(let ((ring (build-list n)))
(set-cdr! last ring)
ring)))
(define (pri... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/scp1/josephus-problem.scm | scheme | (define result '())
(define output (lambda (i) (set! result (cons i result))))
(define (make-ring n)
(let ((last (cons 0 '())))
(define (build-list n)
(if (= n 0)
last
(cons n (build-list (- n 1)))))
(let ((ring (build-list n)))
(set-cdr! last ring)
ring)))
(define (pri... | |
6f4f1d53f2a1ece83cf9bdfb07b9dea73842d8fa4c1a0144a90e533bc4bc7c7c | rowangithub/DOrder | unionfind.mli | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2007
, and
(* ... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/external/ocamlgraph/lib/unionfind.mli | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2007
, and
modify it under the terms of the GNU Library General Public
License version 2 , with the special exception on linking
modul... |
027fafe01c90c61243190a1e6cc270d542f34a838fb92b4030363760894be6ed | klutometis/reader-macros | project.clj | (defproject reader-macros "1.0.3"
:description "Common Lisp style reader macros"
:dependencies [[org.clojure/clojure "1.9.0"]]
:url "-macros"
:profiles {:dev {:dependencies [[lambda "1.0.2"]]}})
| null | https://raw.githubusercontent.com/klutometis/reader-macros/45a7fa74efbc20811f8d3145930d70641589a219/project.clj | clojure | (defproject reader-macros "1.0.3"
:description "Common Lisp style reader macros"
:dependencies [[org.clojure/clojure "1.9.0"]]
:url "-macros"
:profiles {:dev {:dependencies [[lambda "1.0.2"]]}})
| |
8e67a0add3a9ed94433d5d7f62558e35787fe3ecf8c5e4f2b5ada325a9e3e4da | charles-cooper/peregrine | Proto.hs | --
VERSION 5.0 03/06/2015
# LANGUAGE QuasiQuotes #
module Protocol.Nasdaq.ITCH.Proto where
import Protocol
import qualified Data.Text as T
data ITCH = Integer | Price4 | Price8 | Alpha
deriving (Eq, Show, Ord)
field :: String -> Int -> Int -> ITCH -> T.Text -> Field ITCH
field name ofst len ty notes = Field (ofs... | null | https://raw.githubusercontent.com/charles-cooper/peregrine/3b670ed437f86993bf1c921381b8e72097a80423/src/Protocol/Nasdaq/ITCH/Proto.hs | haskell | VERSION 5.0 03/06/2015
# LANGUAGE QuasiQuotes #
module Protocol.Nasdaq.ITCH.Proto where
import Protocol
import qualified Data.Text as T
data ITCH = Integer | Price4 | Price8 | Alpha
deriving (Eq, Show, Ord)
field :: String -> Int -> Int -> ITCH -> T.Text -> Field ITCH
field name ofst len ty notes = Field (ofst-1)... | |
55f11fc7c53037bf032c467f095882e3c8ea9fb6573206883ab6fdc9c5d6dd51 | gedge-platform/gedge-platform | eetcd_compare.erl | -module(eetcd_compare).
-export([new/1, with_range_end/2]).
-export([value/3, version/3,
mod_revision/3, create_revision/3,
lease/3]).
new(Key) -> #{key => Key}.
WithRange sets the comparison to scan the range [ key , end ) .
with_range_end(Cmp, End) -> Cmp#{range_end => End}.
value(Cmp, Result, Value) ->... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/eetcd/src/eetcd_compare.erl | erlang | -module(eetcd_compare).
-export([new/1, with_range_end/2]).
-export([value/3, version/3,
mod_revision/3, create_revision/3,
lease/3]).
new(Key) -> #{key => Key}.
WithRange sets the comparison to scan the range [ key , end ) .
with_range_end(Cmp, End) -> Cmp#{range_end => End}.
value(Cmp, Result, Value) ->... | |
1682b39a6b5dd12d4f1b1774fdf934297cbab7106687a05d652f5e306bc85305 | TheLortex/mirage-monorepo | httpaf_async.mli | open! Core
open Async
open Httpaf
module Server : sig
val create_connection_handler
: ?config : Config.t
-> request_handler : ('a -> Server_connection.request_handler)
-> error_handler : ('a -> Server_connection.error_handler)
-> ([< Socket.Address.t] as 'a)
-> ([`Active], 'a) Socket.... | null | https://raw.githubusercontent.com/TheLortex/mirage-monorepo/754836818dc5c861bf3b0a78029315a065a543cc/duniverse/httpaf/async/httpaf_async.mli | ocaml | open! Core
open Async
open Httpaf
module Server : sig
val create_connection_handler
: ?config : Config.t
-> request_handler : ('a -> Server_connection.request_handler)
-> error_handler : ('a -> Server_connection.error_handler)
-> ([< Socket.Address.t] as 'a)
-> ([`Active], 'a) Socket.... | |
2c221a70a64b7178b330448e45e63a4e521b33c73b4a4f7361e370f7ff192395 | CSVdB/pinky | zift.hs | #!/usr/bin/env stack
stack
--install - ghc
runghc
--resolver lts-10.0
--package zifter-0.0.1.8
--package validity-0.4.0.4
--package zifter - git
--package zifter - hindent
--install-ghc
runghc
--resolver lts-10.0
--package zifter-0.0.1.8
--package validi... | null | https://raw.githubusercontent.com/CSVdB/pinky/e77a4c0812ceb4b8548c41a7652fb247c2ab39e0/zift.hs | haskell | install - ghc
resolver lts-10.0
package zifter-0.0.1.8
package validity-0.4.0.4
package zifter - git
package zifter - hindent
install-ghc
resolver lts-10.0
package zifter-0.0.1.8
package validity-0.4.0.4
package zifter-git
package zifter-hindent | #!/usr/bin/env stack
stack
runghc
runghc
-}
import Zifter
import Zifter.Git
import Zifter.Hindent
main :: IO ()
main =
ziftWith $ do
preprocessor hindentZift
prechecker gitAddAllZift
checker $ pure ()
|
8398732c43504f155f65698ca3ba36138c158b3cfb1a07e1b8858ef3f8096e8b | fetburner/Coq2SML | reserve.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/interp/reserve.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Util
open Names
open Glo... |
6649f36beb5a7fd39734516d864858c0053bf98671208e88cf13cb10811a0c8e | inria-parkas/sundialsml | kinFoodWeb_kry_custom.ml |
* -----------------------------------------------------------------
* $ Revision : 1.3 $
* $ Date : 2010/12/01 23:08:49 $
* -----------------------------------------------------------------
* Programmer(s ): , and
* @ LLNL
* ----------------------------------------------------... | null | https://raw.githubusercontent.com/inria-parkas/sundialsml/a1848318cac2e340c32ddfd42671bef07b1390db/examples/kinsol/serial/kinFoodWeb_kry_custom.ml | ocaml | Problem Constants
pi
MY = number of y mesh points
number of equations in the system
value of coefficient EE in above eqns
value of coefficient dprey above
value of coefficient dpred above
value of coefficient alpha above
total range of x variable
total range of y variable
ftol tolerance
stol tole... |
* -----------------------------------------------------------------
* $ Revision : 1.3 $
* $ Date : 2010/12/01 23:08:49 $
* -----------------------------------------------------------------
* Programmer(s ): , and
* @ LLNL
* ----------------------------------------------------... |
9f054e8dbc9430499a0ff1ff8682ec4b6ea37e23fce69f90afad06d7e6b69dbc | bsansouci/bsb-native | interf.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/asmcomp/interf.mli | ocaml | *********************************************************************
OCaml
... | , 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 Q Public License version 1.0 .
val build_graph: Mach.fundecl -> unit
|
66468f98b9e290e8355285d78e148f7f039fd66dc2632181cb0e93a8743e6842 | Th30n/cl-shake | make-shake-executable.lisp | (require 'asdf)
(defvar *sdl2-library-path* nil "path to SDL2.dll")
(let* ((dst-dir (uiop:merge-pathnames* (format nil "./shake-~A-~A/"
(if (uiop:os-windows-p) "win" "linux")
(string-downcase (uiop:architecture)))))
(... | null | https://raw.githubusercontent.com/Th30n/cl-shake/80550dba138fee977bf2f6deb62739dc7f381216/make-shake-executable.lisp | lisp | (require 'asdf)
(defvar *sdl2-library-path* nil "path to SDL2.dll")
(let* ((dst-dir (uiop:merge-pathnames* (format nil "./shake-~A-~A/"
(if (uiop:os-windows-p) "win" "linux")
(string-downcase (uiop:architecture)))))
(... | |
474bf5e2cdfb982d05c041315bf3faa3b11185f66a7f4c41ff1ec91ba4c71fdb | mirage/ocaml-dns-forward | dns_forward_rpc.ml |
* Copyright ( C ) 2016 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/mirage/ocaml-dns-forward/1b253cbf0e1c15b80facbb13ced762a0dfa99bdf/lib/dns_forward_rpc.ml | ocaml | Although we aren't multiplexing requests on the same flow (unlike the
Persistent case below) we still rewrite the request id
- to limit the number of sockets we allocate
- to work around clients who use predictable request ids
The id whose scope is the link to the client ... |
* Copyright ( C ) 2016 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
e964ba3807baa6f9b74c9364bea63855177511aee0354e03d61c05a2d4128a2f | roosta/herb | runtime_test.cljs | (ns herb.runtime-test
(:require [cljs.test :refer-macros [deftest testing is]]))
| null | https://raw.githubusercontent.com/roosta/herb/64afb133a7bf51d7171a3c5260584c09dbe4e504/test/herb/runtime_test.cljs | clojure | (ns herb.runtime-test
(:require [cljs.test :refer-macros [deftest testing is]]))
| |
b8c0c6891b1611e14ed7f93330e80464c1fca93b9c6c7c4aaa86b08325b9a3ec | flambard/enet | enet_sup.erl | -module(enet_sup).
-behaviour(supervisor).
%% API
-export([
start_link/0,
start_host_supervisor/3,
stop_host_supervisor/1
]).
%% Supervisor callbacks
-export([ init/1 ]).
-define(SERVER, ?MODULE).
%%%===================================================================
%%% API func... | null | https://raw.githubusercontent.com/flambard/enet/59a564ef3927dc984926e3eb4723415cbda1b2b6/src/enet_sup.erl | erlang | API
Supervisor callbacks
===================================================================
API functions
===================================================================
===================================================================
Supervisor callbacks
====================================================... | -module(enet_sup).
-behaviour(supervisor).
-export([
start_link/0,
start_host_supervisor/3,
stop_host_supervisor/1
]).
-export([ init/1 ]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
start_host_supervisor(Port, ConnectFun... |
3cd222d3f55f626eb7cba9ce6693fc083f7ae20a694e10180dc63531c55849bb | dparis/gen-phzr | timer.cljs | (ns phzr.timer
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser])
(:refer-clojure :exclude [repeat loop remove]))
(defn ->Timer
"A Timer is a way to create small re-usable (or disposable) objects that wait for a specific moment in ... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/timer.cljs | clojure | (ns phzr.timer
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser])
(:refer-clojure :exclude [repeat loop remove]))
(defn ->Timer
"A Timer is a way to create small re-usable (or disposable) objects that wait for a specific moment in ... | |
90bc2d56546af5eacaf1b6f2bb1af9eb96447b0ca3833d20153394faec1fd780 | strojure/ring-undertow | ring_request_headers.clj | (ns benchmark.ring-request-headers
(:require [immutant.web.internal.headers :as immutant]
[immutant.web.internal.undertow]
[ring.adapter.undertow.headers :as luminus]
[strojure.ring-undertow.impl.headers :as impl]
[strojure.undertow.api.exchange :as exchange])
(:impor... | null | https://raw.githubusercontent.com/strojure/ring-undertow/42b3c7b76369cd7ab239cfac9c576283f4fe5d19/doc/benchmark/ring_request_headers.clj | clojure | ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
## Smaller header map
Execution time std-deviation : 0,637142 ns
Execution time mean : 1,745118 µs
... | (ns benchmark.ring-request-headers
(:require [immutant.web.internal.headers :as immutant]
[immutant.web.internal.undertow]
[ring.adapter.undertow.headers :as luminus]
[strojure.ring-undertow.impl.headers :as impl]
[strojure.undertow.api.exchange :as exchange])
(:impor... |
b951fa7cad316c67bb9fa5e8a8f2f64d7a1a37f210df903f8ea5a26ee98220e0 | wilkerlucio/clojure-days-clojure-graph-presentation | github.clj | (ns clojure-graphs-presentation-demo.indexes.github
(:require [clj-http.client :as http]
[com.wsscode.pathom.core :as p]
[com.wsscode.pathom.connect.graphql :as pcg]
[clojure-graphs-presentation-demo.secrets :as secrets]
[com.wsscode.pathom.graphql :as pg]))
(declare g... | null | https://raw.githubusercontent.com/wilkerlucio/clojure-days-clojure-graph-presentation/7bf4355204ba160f94e947d09b9dd38e89c0c2fe/src/clojure_graphs_presentation_demo/indexes/github.clj | clojure | (ns clojure-graphs-presentation-demo.indexes.github
(:require [clj-http.client :as http]
[com.wsscode.pathom.core :as p]
[com.wsscode.pathom.connect.graphql :as pcg]
[clojure-graphs-presentation-demo.secrets :as secrets]
[com.wsscode.pathom.graphql :as pg]))
(declare g... | |
08070550ca56c8f7bca866fc375aec313fcb05ea23e3ce1cadc7594469ffe594 | evdubs/renegade-way | params.rkt | #lang racket/base
(require gregor)
(provide api-token
bearish?
db-host
db-user
db-name
db-pass
email-user
email-pass
filename
ibkr-hostname
ibkr-port-no
save-markets
save-end-date
sim-start-date
... | null | https://raw.githubusercontent.com/evdubs/renegade-way/368bcf9cb2fb0ae328fcc6e357be3ab1023853f7/params.rkt | racket | #lang racket/base
(require gregor)
(provide api-token
bearish?
db-host
db-user
db-name
db-pass
email-user
email-pass
filename
ibkr-hostname
ibkr-port-no
save-markets
save-end-date
sim-start-date
... | |
aa5ae133c0d9333bebae989ebaec73717e1ee940fd239d954e1e05178207796f | aeternity/aeternity | aec_upnp.erl | %%%=============================================================================
( C ) 2019 , Aeternity Anstalt
%%% @doc
Service handling UPnP and NAT - PMP protocols discovery and port mappings ,
%%% to help to achieve better P2P connectivity. This works for routers with
UPnP or NAT - PNP enabled , and... | null | https://raw.githubusercontent.com/aeternity/aeternity/b7ce6ae15dab7fa22287c2da3d4405c29bb4edd7/apps/aecore/src/aec_upnp.erl | erlang | =============================================================================
@doc
to help to achieve better P2P connectivity. This works for routers with
forwarding configured.
@end
=============================================================================
API
gen_server API
gen_server callbacks
NAT-P... | ( C ) 2019 , Aeternity Anstalt
Service handling UPnP and NAT - PMP protocols discovery and port mappings ,
UPnP or NAT - PNP enabled , and should be used when there is no port
-module(aec_upnp).
-behaviour(gen_server).
-export([is_enabled/0,
prep_stop/0]).
-export([start_link/0]).
-export([in... |
3214e0ae709620ce0f1f93faf3bd5938b214ba2aa566d03069e862a45c9a100b | mirage/irmin | store.mli |
* Copyright ( c ) 2013 - 2022 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... | null | https://raw.githubusercontent.com/mirage/irmin/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/src/irmin/store.mli | ocaml | * Branch-consistent stores: read-write store with support fork/merge
operations. |
* Copyright ( c ) 2013 - 2022 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... |
493f24c15a5e1d3b07483fc4cd549f9e3099f032b01892023fcd32ded2029957 | ghc/testsuite | T7869.hs | module T7869 where
f = (\x -> f x) :: [a] -> b
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/T7869.hs | haskell | module T7869 where
f = (\x -> f x) :: [a] -> b
| |
1fd5515d4281b5f592cff0951384e4fce58624c34c3a674d69827d29ef3702e8 | GlideAngle/flare-timing | Greda.hs | module Flat.Greda (units) where
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit as HU ((@?=), testCase)
import Flight.Units ()
import Flight.Zone (Zone(..))
import ToLatLng (toLatLngD)
import qualified Greda as G (task1, task2, task3)
import Flat.Span (sepD)
task1, task2, task3 :: [Zone Double]
task1... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/earth/test-suite-greda/Flat/Greda.hs | haskell | module Flat.Greda (units) where
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit as HU ((@?=), testCase)
import Flight.Units ()
import Flight.Zone (Zone(..))
import ToLatLng (toLatLngD)
import qualified Greda as G (task1, task2, task3)
import Flat.Span (sepD)
task1, task2, task3 :: [Zone Double]
task1... | |
081894588f418010b15c8e8471851fa838c45050e5ff62c194f41a4690bb6cc3 | jumarko/clojure-experiments | 0463_word_search.clj | (ns clojure-experiments.purely-functional.puzzles.0463-word-search
"-tv-newsletter-463-what-is-beautiful-code
Solutions: "
(:require [clojure.string :as str]))
;; I didn't get very far...
(defn found?
"Returns true if the needel is found in they haystack with a few forgiving features:
- if some letters are... | null | https://raw.githubusercontent.com/jumarko/clojure-experiments/7d7d48f7081484307d8a7c5178d6a90ad94077f5/src/clojure_experiments/purely_functional/puzzles/0463_word_search.clj | clojure | I didn't get very far...
This is a really nice solution!
#gistcomment-4083589
=> true (direct match)
=> true
=> true
=> false (don't match across whitespace)
=> false
=> false (not enough x's)
=> false
=> true (trivially so)
=> true
=> true (also trivial);; =>
=> true | (ns clojure-experiments.purely-functional.puzzles.0463-word-search
"-tv-newsletter-463-what-is-beautiful-code
Solutions: "
(:require [clojure.string :as str]))
(defn found?
"Returns true if the needel is found in they haystack with a few forgiving features:
- if some letters are missing in the needle still... |
0f938e76e9db7271db9c339e91306e8c4f8fc44a332cd95f2fb8b36cfa81f685 | kloimhardt/werkbank | numbers.clj | ;
Copyright © 2017 .
This work is based on the Scmutils system of MIT / GNU Scheme :
Copyright © 2002 Massachusetts Institute of Technology
;
; This 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 ; ei... | null | https://raw.githubusercontent.com/kloimhardt/werkbank/df66274eb978d060a043b8429b29d0f36c4a2e89/src/sicmutils/numbers.clj | clojure |
This is free software; you can redistribute it and/or modify
either version 3 of the License , or ( at
your option) any later version.
This software 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 PUR... | Copyright © 2017 .
This work is based on the Scmutils system of MIT / GNU Scheme :
Copyright © 2002 Massachusetts Institute of Technology
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(ns sicmutils.numbers
(:refer-cl... |
d3d2f70d75ea1a5a1e0cb3ac8e6c2d9b876bfe447c420b29e7961d6e3f567e8b | mzp/coq-ruby | name_to_ast.ml | open Sign;;
open Classops;;
open Names;;
open Nameops
open Term;;
open Impargs;;
open Reduction;;
open Libnames;;
open Libobject;;
open Environ;;
open Declarations;;
open Prettyp;;
open Inductive;;
open Util;;
open Pp;;
open Declare;;
open Nametab
open Vernacexpr;;
open Decl_kinds;;
open Constrextern;;
open Topconstr;;... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/contrib/interface/name_to_ast.ml | ocaml | This function converts the parameter binders of an inductive definition,
in particular you have to be careful to handle each element in the
context containing all previously defined variables. This squeleton
of this procedure is taken from the function print_env in pretty.ml
This function is directly inspi... | open Sign;;
open Classops;;
open Names;;
open Nameops
open Term;;
open Impargs;;
open Reduction;;
open Libnames;;
open Libobject;;
open Environ;;
open Declarations;;
open Prettyp;;
open Inductive;;
open Util;;
open Pp;;
open Declare;;
open Nametab
open Vernacexpr;;
open Decl_kinds;;
open Constrextern;;
open Topconstr;;... |
3f25dfd965f9df62f7a7c43325bd9299067298961501056b561509f3d2027445 | dwayne/eopl3 | interpreter.rkt | #lang eopl
(require "./env.rkt")
(require "./parser.rkt")
(provide
;; Expressed Values
num-val bool-val
;; Interpreter
run)
(define (run s)
(let ([init-env (extend-env
'i (num-val 1)
(extend-env
'v (num-val 5)
(extend-env
... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/03-ch3/interpreters/racket/LETREC-3.33/interpreter.rkt | racket | Expressed Values
Interpreter
Procedure ADT
Values
ExpVal = Int + Bool + Proc | #lang eopl
(require "./env.rkt")
(require "./parser.rkt")
(provide
num-val bool-val
run)
(define (run s)
(let ([init-env (extend-env
'i (num-val 1)
(extend-env
'v (num-val 5)
(extend-env
'x (num-val 10)
... |
2e4625ef06d4fcaf74d30c31e84cfecbefd302af85eb09a453afcb3fa25f6619 | ml4tp/tcoq | genintern.mli | (************************************************************************)
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/genintern.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* The type of functions used for int... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Mod_subst
ope... |
94654a5fbdf2c62b521cc590cab7a09c965cdb34048ff60d43faf58adf1575f0 | schemeorg-community/index.scheme.org | rnrs.records.syntactic.6.scm | (((name . "define-record-type")
(signature
syntax-rules
(fields
immutable
mutable
parent
protocol
sealed
opaque
nongenerative
parent-rtd)
((_ name-spec record-clause ...)))
(subsigs
(name-spec
(pattern (record-name constructor-name predicate-name) record-name))
(re... | null | https://raw.githubusercontent.com/schemeorg-community/index.scheme.org/32e1afcfe423a158ac8ce014f5c0b8399d12a1ea/types/rnrs.records.syntactic.6.scm | scheme | (((name . "define-record-type")
(signature
syntax-rules
(fields
immutable
mutable
parent
protocol
sealed
opaque
nongenerative
parent-rtd)
((_ name-spec record-clause ...)))
(subsigs
(name-spec
(pattern (record-name constructor-name predicate-name) record-name))
(re... | |
f6586d194cd92ed4ff3111889484f186b1bf3922aceafc2864d3912dde824fcf | mirage/irmin | test_corrupted.mli |
* Copyright ( c ) 2022 - 2022 Tarides < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS... | null | https://raw.githubusercontent.com/mirage/irmin/3f91bf6199a80f61ddc2264470e22ccbb553e199/test/irmin-pack/test_corrupted.mli | ocaml |
* Copyright ( c ) 2022 - 2022 Tarides < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS... | |
75bafb0f53d46b0e2a3393cdbda593c77cd079a131ca8cea7a51d0f96fada81b | zotonic/zotonic | export_encoder_xlsx.erl | @author < >
2016 < >
@doc Format exports for Microsoft xlsx format
Copyright 2016
%%
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 requir... | null | https://raw.githubusercontent.com/zotonic/zotonic/1bb4aa8a0688d007dd8ec8ba271546f658312da8/apps/zotonic_mod_export/src/support/export_encoder_xlsx.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | @author < >
2016 < >
@doc Format exports for Microsoft xlsx format
Copyright 2016
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(export_encoder_xlsx).
-author("Marc Worrell <>").
-record(state, {
... |
7973cd3a9b6ffaddff811c78027972624aebbf682ed73d29aca75ff72c5c86a7 | dgllghr/interval-map | interval_map_test.ml | open Alcotest
open Interval_map
module Ivl_map = Make (Int)
module Ivl = Ivl_map.Interval
let create_and_add () =
let map =
Ivl_map.empty
|> Ivl_map.add (Ivl.create (Included 0) (Excluded 10)) "foo"
|> Ivl_map.add (Ivl.create (Included 0) (Excluded 10)) "foo2"
|> Ivl_map.add (Ivl.create (Excluded 0) ... | null | https://raw.githubusercontent.com/dgllghr/interval-map/2936dd48e39ed8f929ba80623e9a26cbee56f55d/test/interval_map_test.ml | ocaml | Ascending
Descending
build the map with random intervals
query the map with random intervals | open Alcotest
open Interval_map
module Ivl_map = Make (Int)
module Ivl = Ivl_map.Interval
let create_and_add () =
let map =
Ivl_map.empty
|> Ivl_map.add (Ivl.create (Included 0) (Excluded 10)) "foo"
|> Ivl_map.add (Ivl.create (Included 0) (Excluded 10)) "foo2"
|> Ivl_map.add (Ivl.create (Excluded 0) ... |
cefe8cfd7cfbd6f0898dcda83f3db1959a539d0ef8ba095b01b4c8d3bcf76da1 | skanev/playground | 18.scm | EOPL exercise 1.18
;
( swapper s1 s2 ) returns a list the same as slist , but with all
; occurences of s1 replaced by s2 and all occurences of s2 replaced by s1.
;
; > (swapper 'a 'd '(a b c d))
; (d b c a)
; > (swapper 'a 'd '(a d () c d))
; (d a () c a)
; > (swapper 'x 'y '((x) y (z (x))))
; ((y) x (z (y)))
(de... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/01/18.scm | scheme |
occurences of s1 replaced by s2 and all occurences of s2 replaced by s1.
> (swapper 'a 'd '(a b c d))
(d b c a)
> (swapper 'a 'd '(a d () c d))
(d a () c a)
> (swapper 'x 'y '((x) y (z (x))))
((y) x (z (y))) | EOPL exercise 1.18
( swapper s1 s2 ) returns a list the same as slist , but with all
(define (swapper s1 s2 slist)
(cond ((null? slist) '())
((eqv? s1 slist) s2)
((eqv? s2 slist) s1)
((symbol? slist) slist)
(#t (map (curry swapper s1 s2) slist))))
|
7f68d6b2d0ef26cc21a43d6df7e40ce8af1d45fa1c2b597a0aa80754817b0cce | anurudhp/CPHaskell | b.hs | # LANGUAGE LambdaCase #
import Control.Applicative (liftA2)
import Control.Arrow ((>>>))
import Control.Monad.State
import qualified Data.ByteString.Lazy.Char8 as C
import Data.Maybe (fromJust, fromMaybe)
main :: IO ()
main = C.interact $ runScanner (numberOf (C.pack <$> testCase)) >>> C.unlines
testCase :: Scanner ... | null | https://raw.githubusercontent.com/anurudhp/CPHaskell/60b71611c87c504133e0f00f7bf8c79e8082c1c8/contests/codeforces/1506/b.hs | haskell | - Template --- | # LANGUAGE LambdaCase #
import Control.Applicative (liftA2)
import Control.Arrow ((>>>))
import Control.Monad.State
import qualified Data.ByteString.Lazy.Char8 as C
import Data.Maybe (fromJust, fromMaybe)
main :: IO ()
main = C.interact $ runScanner (numberOf (C.pack <$> testCase)) >>> C.unlines
testCase :: Scanner ... |
b8a21d1bd50465487b2b4fa19be65d81dd60060d99a1689b5d34fa8e7f59a576 | epsilon-phase/img-genner | simd.lisp | #|
| This file implements a few routines from the img-genner package that capable of being used with sb-simd
| to provide some rather impressive acceleration compared to the otherwise non-simd optimized functions.
| Or at least that's the aspiration here.
|#
(defpackage #:img-genner/simd
(:use common-lisp sb-s... | null | https://raw.githubusercontent.com/epsilon-phase/img-genner/208ca6c089baea597fa76351faa1c42e6fc723f1/src/simd.lisp | lisp |
| This file implements a few routines from the img-genner package that capable of being used with sb-simd
| to provide some rather impressive acceleration compared to the otherwise non-simd optimized functions.
| Or at least that's the aspiration here.
|
We have a suspicion that this would work better with... |
(defpackage #:img-genner/simd
(:use common-lisp sb-simd)
(:export diff-image diff-image-slow))
(in-package #:img-genner/simd)
(require :sb-simd)
(use-package :sb-simd)
(declaim (sb-ext:maybe-inline get-pixel))
(defun get-pixel(image x y)
(declare (type (simple-array u8 (* * 3)) image)
(type s64 x y)... |
93697a4ea2131fff87c2b7017977aa6bd7b4990827b0cb20374237867adbb045 | tilk/vocoder | Filter.hs | # LANGUAGE TupleSections #
|
Module : Vocoder . Filter
Description : Frequency - domain filters
Copyright : ( c ) , 2021
License : BSD2
This module defines some useful frequency - domain filters for use in
the vocoder framework .
Module : Vocoder.Filter
Descri... | null | https://raw.githubusercontent.com/tilk/vocoder/540d489d87fdb5d0cdc0ee4e0bd7df774f734d47/vocoder/src/Vocoder/Filter.hs | haskell | | A frequency step is a coefficient relating physical frequency (in Hz)
to FFT bin numbers. It is used to define filters independently of the
| The type of frequency-domain filters. A frequency-domain filter is
a function transforming STFT frames which can depend on the
frequency step.
| Sequential composit... | # LANGUAGE TupleSections #
|
Module : Vocoder . Filter
Description : Frequency - domain filters
Copyright : ( c ) , 2021
License : BSD2
This module defines some useful frequency - domain filters for use in
the vocoder framework .
Module : Vocoder.Filter
Descri... |
50778d0dd2baf22cfa11cddb35261354038d6a1baf3917066c2d2a4848ac879f | realworldocaml/book | test_ctz.ml | [%%import "config.h"]
open Base
open Stdio
let test ~op ~op_name ~to_string x = printf "%s %s = %d\n" op_name (to_string x) (op x)
let numbers = [ 0 (* Int.num_bits *); 1; 7; 2; 4; 12; 18; -1 ]
let%expect_test "ctz int64" =
let open Int64 in
let numbers = List.map numbers ~f:of_int in
let f =
test
~o... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ocaml_intrinsics/test/test_ctz.ml | ocaml | Int.num_bits | [%%import "config.h"]
open Base
open Stdio
let test ~op ~op_name ~to_string x = printf "%s %s = %d\n" op_name (to_string x) (op x)
let%expect_test "ctz int64" =
let open Int64 in
let numbers = List.map numbers ~f:of_int in
let f =
test
~op:Ocaml_intrinsics.Int64.count_trailing_zeros
~op_name:"c... |
082422c6d31a90cb03635f091fa4615861103e9b296cfb5db735e66e51acff14 | melisgl/micmac | game-theory.lisp | (in-package :micmac.game-theory)
(defsection @micmac-game-theory (:title "Game Theory")
(find-nash-equilibrium function))
(defun extremum (vector pred &key (start 0) (end (length vector)))
"Find the first extreme value of the [START,END) subsequence of
VECTOR and return it along with its index. The extremum is ... | null | https://raw.githubusercontent.com/melisgl/micmac/cff0a60475da131e56397d361f85eaae74d3c2e4/src/game-theory.lisp | lisp | perfect information.
Translated from / | (in-package :micmac.game-theory)
(defsection @micmac-game-theory (:title "Game Theory")
(find-nash-equilibrium function))
(defun extremum (vector pred &key (start 0) (end (length vector)))
"Find the first extreme value of the [START,END) subsequence of
VECTOR and return it along with its index. The extremum is ... |
4561fdd1bcf037182886f527c586a2c19266c71c0f638089fa55386499f07374 | input-output-hk/plutus | Bool.hs | module Benchmarks.Bool (makeBenchmarks) where
import Common
import Generators
import PlutusCore
import Criterion.Main
import System.Random (StdGen)
-- We only have ifThenElse at the moment, which should be constant cost.
-- We check that with a bunch of bytestrings of different sizes.
benchIfThenElse :: Benchmark
... | null | https://raw.githubusercontent.com/input-output-hk/plutus/5112dff90536f10992ba953e4a74ef375e3f7bfa/plutus-core/cost-model/budgeting-bench/Benchmarks/Bool.hs | haskell | We only have ifThenElse at the moment, which should be constant cost.
We check that with a bunch of bytestrings of different sizes. | module Benchmarks.Bool (makeBenchmarks) where
import Common
import Generators
import PlutusCore
import Criterion.Main
import System.Random (StdGen)
benchIfThenElse :: Benchmark
benchIfThenElse =
let name = IfThenElse
resultSizes = [100, 500, 1000, 2000, 5000, 10000, 20000]
results1 = makeSizedB... |
248b0c53e2ae949c6e665d9ebf46398dc4dc324d65f6c8830175dccfd2ff22b7 | andorp/bead | IO.hs | module Control.Monad.Transaction.IO (
module E
, TRS
, step
, atomically
) where
import Data.IORef
import Control.Applicative
import Control.Exception as E
-- * Simple IO Transactions
-- Callback on exception
newtype TRS a = TRS (IORef (IO ()) -> IO a)
* Helper function and Functor , Applicative , Mon... | null | https://raw.githubusercontent.com/andorp/bead/280dc9c3d5cfe1b9aac0f2f802c705ae65f02ac2/src/Control/Monad/Transaction/IO.hs | haskell | * Simple IO Transactions
Callback on exception
* Step and run functions
* Tools | module Control.Monad.Transaction.IO (
module E
, TRS
, step
, atomically
) where
import Data.IORef
import Control.Applicative
import Control.Exception as E
newtype TRS a = TRS (IORef (IO ()) -> IO a)
* Helper function and Functor , Applicative , Monad instances
unTRS :: TRS a -> IORef (IO ()) -> IO a... |
bae54cb483f3989ceb03d4b963e35703dc53da3cb2d18e84c71e0497808b886d | fp-works/2019-winter-Haskell-school | Sized.hs | # LANGUAGE GeneralizedNewtypeDeriving , FlexibleInstances #
module CIS194.Homework07.Sized where
import Data.Monoid ()
newtype Size = Size Int
deriving (Eq, Ord, Show, Num)
getSize :: Size -> Int
getSize (Size i) = i
class Sized a where
size :: a -> Size
instance Sized Size where
size = id
-- This instance ... | null | https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week7/daniel-deng/src/CIS194/Homework07/Sized.hs | haskell | This instance means that things like
(Foo, Size)
...
are all instances of Sized. | # LANGUAGE GeneralizedNewtypeDeriving , FlexibleInstances #
module CIS194.Homework07.Sized where
import Data.Monoid ()
newtype Size = Size Int
deriving (Eq, Ord, Show, Num)
getSize :: Size -> Int
getSize (Size i) = i
class Sized a where
size :: a -> Size
instance Sized Size where
size = id
( , ( Bar , ... |
a7b9dfa5d132a7a4bc2d4de8e45a8ec65f6a5f0c5bf5b4d4fea2ca7585632e0e | bsansouci/bsb-native | num.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Crista... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/otherlibs/num/num.ml | ocaml | *********************************************************************
OCaml
... | , 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
open Int_misc
open Nat
open Big_int
open Arith_fl... |
236be98c7874f97e86eda80508af33c5f2904dc3c7883aa00c93fcd423c1cfcf | sebferre/sparklis | sparql.ml |
Copyright 2013 , IRISA , Université de Rennes 1 ,
This file is part of Sparklis .
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 requ... | null | https://raw.githubusercontent.com/sebferre/sparklis/51d8b6d756afd9d1dff6e920876d782c376cb80c/sparql.ml | ocaml | private use of strings to represent SPARQL strings
namespace, local name
prefix counter
mapping from namespace to prefix
default namespaces (reverse order of declarations)
prefix, local name
iter in reverse order
assuming aggregates are terms (not expr) to simplify compilation of HAVING clauses
if Commo... |
Copyright 2013 , IRISA , Université de Rennes 1 ,
This file is part of Sparklis .
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 requ... |
37436a9861ac48e0822bfd3caaaf2453d2ad50ec9297e5d87ba88bcf4a67b74f | budu/clj-audio | midi.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 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 th... | null | https://raw.githubusercontent.com/budu/clj-audio/b2450470c1b307184948dd1f35d6ceb85dfc7f2b/src/clj_audio/midi.clj | clojure | The use and distribution terms for this software are covered by the
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 this notice, or any other, from this software.
Sequence
resolution
Synth... | Copyright ( c ) . All rights reserved .
Eclipse Public License 1.0 which can be found in the file
(ns #^{:author "Nicolas Buduroi"
:doc "Wrapper for Java Sound API's midi package."}
clj-audio.midi
(:use clj-audio.utils)
(:import java.io.File
[javax.sound.midi
MidiUn... |
82ff63d90df38c88515b535b805a4a5204b502b97410c77d128e380f7e3ec945 | kupl/LearnML | patch.ml | exception NotImplemented
type lambda = V of var | P of (var * lambda) | C of (lambda * lambda)
and var = string
let rec result (lambda : lambda) : var =
match lambda with
| V var -> var
| P (v, e) -> result e
| C (e1, e2) -> result e2
let rec __s3 (__s4 : lambda) : string list =
match __s4 with
| V __s... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/lambda/sub98/patch.ml | ocaml | exception NotImplemented
type lambda = V of var | P of (var * lambda) | C of (lambda * lambda)
and var = string
let rec result (lambda : lambda) : var =
match lambda with
| V var -> var
| P (v, e) -> result e
| C (e1, e2) -> result e2
let rec __s3 (__s4 : lambda) : string list =
match __s4 with
| V __s... | |
3a2f2d0cb53ddd61bebe35c3e66ece490b8e80c86f668cc0e3baa93a77e97be0 | spl/xformat | Show.hs | # LANGUAGE TypeOperators #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE UndecidableInstances #
--------------------------------------------------------------------------------
-- |
--... | null | https://raw.githubusercontent.com/spl/xformat/582504fcf06ee601d59603dda8f5b593df359612/src/Text/XFormat/Show.hs | haskell | # LANGUAGE TypeSynonymInstances #
------------------------------------------------------------------------------
|
Module : Text.XFormat.Show
License : BSD3
Maintainer :
Stability : experimental
Portability : non-portable
This module defines an extensible, type-indexed function for showing
v... | # LANGUAGE TypeOperators #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
Copyright : ( c ) 2009
well - typed values with a format descriptor . This may be considered a Haskell
' ' and '... |
8eb87da3b18af42ccc2b6335d6def6ab1c47309684c7744dcda5c970b4d54cbd | TristanCacqueray/Haxible | simple.hs | #!/usr/bin/env cabal
-- Generated with haxible
# LANGUAGE QuasiQuotes , , OverloadedStrings #
cabal :
build - depends : base , haxible
ghc - options : -threaded -rtsopts -with - rtsopts=-N -with - rtsopts=-T
build-depends: base, haxible
ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T
-}
modul... | null | https://raw.githubusercontent.com/TristanCacqueray/Haxible/2097a9e7b843d96d718d8bb1f0f10e24a2a9beb4/test/playbooks/simple.hs | haskell | Generated with haxible | #!/usr/bin/env cabal
# LANGUAGE QuasiQuotes , , OverloadedStrings #
cabal :
build - depends : base , haxible
ghc - options : -threaded -rtsopts -with - rtsopts=-N -with - rtsopts=-T
build-depends: base, haxible
ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T
-}
module Main (main) where
impor... |
8718c2f10e5d359cbaab896cc7f07de7ae3f2c64711a5b144fc3e2fb153e617f | okuoku/nausicaa | test-interps.sps | ;;;
Part of : / Scheme
;;;Contents: tests for the interpreters library
Date : We d Jul 8 , 2009
;;;
;;;Abstract
;;;
;;;
;;;
Copyright ( c ) 2009 , 2010 < >
;;;
;;;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... | null | https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/tests/test-interps.sps | scheme |
Contents: tests for the interpreters library
Abstract
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
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WA... | Part of : / Scheme
Date : We d Jul 8 , 2009
Copyright ( c ) 2009 , 2010 < >
the Free Software Foundation , either version 3 of the License , or ( at
General Public License for more details .
You should have received a copy of the GNU General Public License
#!r6rs
(import (nausicaa)
(rnrs eval)
(nau... |
c37d110858bba95f4a805fd8a1428dac8064d0178f5e660672dbf91c987ee4c0 | tdammers/migrant | HDBC_Tests.hs | {-#LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
# LANGUAGE ScopedTypeVariables #
module Database.Migrant.Driver.HDBC_Tests
( tests
)
where
import Test.Tasty
import Test.Tasty.QuickCheck
import Test.Tasty.HUnit
import Data.Text (Text)
import Control.Monad (void)
import System.Environment
import Data.May... | null | https://raw.githubusercontent.com/tdammers/migrant/2bcbd3fc2eae1290f7cba6bd4fc7cc69ac0d24f2/migrant-hdbc/test/Database/Migrant/Driver/HDBC_Tests.hs | haskell | #LANGUAGE OverloadedStrings # | # LANGUAGE TypeApplications #
# LANGUAGE ScopedTypeVariables #
module Database.Migrant.Driver.HDBC_Tests
( tests
)
where
import Test.Tasty
import Test.Tasty.QuickCheck
import Test.Tasty.HUnit
import Data.Text (Text)
import Control.Monad (void)
import System.Environment
import Data.Maybe (fromMaybe)
import Data.Text (T... |
e358d9dd1e88b1024f14acf9ded8bd0e9cd94cac4cff2510fb5161f93fbdcc9b | logseq/logseq | plugin.cljs | (ns electron.plugin
(:require [promesa.core :as p]
[cljs-bean.core :as bean]
["semver" :as semver]
["os" :as os]
["fs-extra" :as fs]
["path" :as path]
[clojure.string :as string]
[electron.utils :refer [fetch extract-zip] :as utils]
... | null | https://raw.githubusercontent.com/logseq/logseq/dda1f9bd9f9713f4d55b13536a7b81a2a0378914/src/electron/electron/plugin.cljs | clojure | update & install
(def *installing-or-updating (atom nil))
Get a release by tag name: /repos/{owner}/{repo}/releases/tags/{tag}
Get the latest release: /repos/{owner}/{repo}/releases/latest
Zipball /{owner}/{repo}/zipball
cases. Previous logseq versions did not store the
plugin's git tag required to correctly inst... | (ns electron.plugin
(:require [promesa.core :as p]
[cljs-bean.core :as bean]
["semver" :as semver]
["os" :as os]
["fs-extra" :as fs]
["path" :as path]
[clojure.string :as string]
[electron.utils :refer [fetch extract-zip] :as utils]
... |
24018aafa497907925c314c43098afdc2aece5be49ee2f93f9d57ba3be6a254a | rrnewton/WaveScript | schemedoc-extractor.scm | ;=>man/schemedoc-extractor.laml
; The LAML SchemeDoc comment extracting and comment parsing tool.
The LAML library and programs written by , Aalborg University , Denmark .
Copyright ( C ) 1999 - 2004 .
;
; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU ... | null | https://raw.githubusercontent.com/rrnewton/WaveScript/1c9eff60970aefd2177d53723383b533ce370a6e/doc/patches_new/schemedoc-extractor.scm | scheme | =>man/schemedoc-extractor.laml
The LAML SchemeDoc comment extracting and comment parsing tool.
This program is free software; you can redistribute it and/or modify
either version 2 of the License , or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHO... |
The LAML library and programs written by , Aalborg University , Denmark .
Copyright ( C ) 1999 - 2004 .
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place , Suite 330 , Boston , MA ... |
738ba9b8ae8c2e16a4e814513b603276211ba6fa4af1a724b0ed4ade6b197123 | damballa/parkour | cstep.clj | (ns parkour.cstep
(:require [parkour (conf :as conf) (cser :as cser) (mapreduce :as mr)]
[parkour.util :refer [returning]])
(:import [clojure.lang APersistentMap APersistentVector IFn]
[org.apache.hadoop.conf Configuration]
[org.apache.hadoop.mapreduce Job]
[parkour.hado... | null | https://raw.githubusercontent.com/damballa/parkour/2b3c5e1987e18b4c4284dfd4fcdaba267a4d7fbc/src/clojure/parkour/cstep.clj | clojure | a map of configuration
a vector of other steps; or anything implementing the | (ns parkour.cstep
(:require [parkour (conf :as conf) (cser :as cser) (mapreduce :as mr)]
[parkour.util :refer [returning]])
(:import [clojure.lang APersistentMap APersistentVector IFn]
[org.apache.hadoop.conf Configuration]
[org.apache.hadoop.mapreduce Job]
[parkour.hado... |
de0b0c3146f56116ba0c2185c20114f24fa64fd846df55be36e7d443513be7c3 | graninas/Functional-Design-and-Architecture | FactorialStateNested.hs | import Control.Monad.State
multiply :: Integer -> State Integer ()
multiply n = do
value <- get
put (value * n)
factorialStateful :: Integer -> State Integer ()
factorialStateful 0 = return ()
factorialStateful n = do
multiply n
factorialStateful (n - 1)
printFactorial :: Integer -> IO ()
printF... | null | https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/1736abc16d3e4917fc466010dcc182746af2fd0e/First-Edition/BookSamples/CH03/FactorialStateNested.hs | haskell | import Control.Monad.State
multiply :: Integer -> State Integer ()
multiply n = do
value <- get
put (value * n)
factorialStateful :: Integer -> State Integer ()
factorialStateful 0 = return ()
factorialStateful n = do
multiply n
factorialStateful (n - 1)
printFactorial :: Integer -> IO ()
printF... | |
93f5b52299ec366ce345fdf3f8c5d986d5addae14ea2ff37e833a95ddee7bd16 | erlang/otp | erl_prim_loader_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2021 . 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/70376ac14180f5311798dc7202a891d5025cb052/lib/kernel/test/erl_prim_loader_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 - 2021 . 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_prim_loader_SUITE).
-include_lib("kernel/include/file.hrl").
-include_lib("common_test/include/ct.hrl").... |
698c30ce62f3a0861aca0f00017bae68f2ace91acc7f0928a228d7f5f8001b6f | iu-parfunc/verified-instances | These.hs | {-@ LIQUID "--higherorder" @-}
{-@ LIQUID "--exactdc" @-}
{-@ LIQUID "--noadt" @-}
module GenericProofs.VerifiedOrd.Examples.These
( These(..)
, RepThese
, toThese
, fromThese
, tofThese
, fotThese
, isoThese
, vordThese
) where
import Language.Haskell.Liquid.ProofComb... | null | https://raw.githubusercontent.com/iu-parfunc/verified-instances/cebfdf1e3357a693360be74c90211be18ce3c045/generic-proofs/src/GenericProofs/VerifiedOrd/Examples/These.hs | haskell | @ LIQUID "--higherorder" @
@ LIQUID "--exactdc" @
@ LIQUID "--noadt" @
@ axiomatize toThese @
''These) |
module GenericProofs.VerifiedOrd.Examples.These
( These(..)
, RepThese
, toThese
, fromThese
, tofThese
, fotThese
, isoThese
, vordThese
) where
import Language.Haskell.Liquid.ProofCombinators
import GenericProofs.Iso
import GenericProofs.TH
import GenericProofs.VerifiedOrd
import GenericProofs.Ve... |
aaacf14ffdb1944263ef0ca445ee507ccf3d276e6d458382752249a7f46c0e79 | jumarko/clojure-experiments | in_text_eval.clj | ;; # _In-Text_ Evaluation
^{:nextjournal.clerk/visibility #{:hide-ns :hide} :nextjournal.clerk/toc true}
(ns ^{:nextjournal.clerk/no-cache true} viewers.in-text-eval
(:require [nextjournal.clerk :as clerk]
[nextjournal.clerk.viewer :as v]
[nextjournal.markdown.transform :as markdown.transform]... | null | https://raw.githubusercontent.com/jumarko/clojure-experiments/a87098fe69044ad65813a68cb870d824c2c2d18f/src/clojure_experiments/visualizations/clerk/notebooks/viewers/in_text_eval.clj | clojure | # _In-Text_ Evaluation
Being able to override markdown viewers allows us to get in-text evaluation for free:
---
--- | ^{:nextjournal.clerk/visibility #{:hide-ns :hide} :nextjournal.clerk/toc true}
(ns ^{:nextjournal.clerk/no-cache true} viewers.in-text-eval
(:require [nextjournal.clerk :as clerk]
[nextjournal.clerk.viewer :as v]
[nextjournal.markdown.transform :as markdown.transform]))
^{::clerk/viewer cler... |
bc0ba8af7e615c211f7b131b474233ee317e7428662bf06a037d2a7c86487077 | passy/coding-puzzles | euler3.hs | primes = 2 : 3 : filter ((==1) . length . primeFactors) [5,7..]
primeFactors n = factor n primes
where
factor n (x:xs)
| x * x > n = [n]
| n `mod` x == 0 = x : factor (n `div` x) (x:xs)
| otherwise = factor n xs
euler3 = last $ primeFactors 600851475143
... | null | https://raw.githubusercontent.com/passy/coding-puzzles/686bd0775ee5a98004229d44c913376d033b13de/euler/euler3.hs | haskell | primes = 2 : 3 : filter ((==1) . length . primeFactors) [5,7..]
primeFactors n = factor n primes
where
factor n (x:xs)
| x * x > n = [n]
| n `mod` x == 0 = x : factor (n `div` x) (x:xs)
| otherwise = factor n xs
euler3 = last $ primeFactors 600851475143
... | |
5af732370a9b2e51c7f4503786b5d3daa04316828075f276534ae2211832d099 | marigold-dev/deku | storage.mli | module Chain : sig
open Deku_chain
val read : env:Eio.Stdenv.t -> folder:string -> Chain.t option
val write : env:Eio.Stdenv.t -> folder:string -> Chain.t -> unit
end
| null | https://raw.githubusercontent.com/marigold-dev/deku/21ec2bf05ce688c5b6012be16545175e75403f06/deku-p/src/core/storage/storage.mli | ocaml | module Chain : sig
open Deku_chain
val read : env:Eio.Stdenv.t -> folder:string -> Chain.t option
val write : env:Eio.Stdenv.t -> folder:string -> Chain.t -> unit
end
| |
9835b9994b1de1706e9f4cf42a4882fb832e89d3daf485377125411f82b49666 | erlang/otp | inet_sctp.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2007 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/d5ee0b4e6f436041b82f76ca5e24e39d8b153f66/lib/kernel/src/inet_sctp.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 2007 - 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
SCTP protocol contribution by and .
-module(inet_sctp).
sockets using the SCTP protocol . The implementati... |
d8f9748f8ecc1b54e59e487585d972d2bb726ee6ac446e256d6a7c471ff6b765 | simplex-chat/simplex-chat | MobileTests.hs | # LANGUAGE CPP #
module MobileTests where
import ChatTests.Utils
import Control.Monad.Except
import Simplex.Chat.Mobile
import Simplex.Chat.Store
import Simplex.Chat.Types (AgentUserId (..), Profile (..))
import System.FilePath ((</>))
import Test.Hspec
mobileTests :: SpecWith FilePath
mobileTests = do
describe "m... | null | https://raw.githubusercontent.com/simplex-chat/simplex-chat/c8fae0ec4390c40675ac9f9aa9924d5da87edbb2/tests/MobileTests.hs | haskell | # LANGUAGE CPP #
module MobileTests where
import ChatTests.Utils
import Control.Monad.Except
import Simplex.Chat.Mobile
import Simplex.Chat.Store
import Simplex.Chat.Types (AgentUserId (..), Profile (..))
import System.FilePath ((</>))
import Test.Hspec
mobileTests :: SpecWith FilePath
mobileTests = do
describe "m... | |
eb1b37abb53dfc62c5b30f6ef74355d1ace07fffb0abb785ebfe883346f52842 | archaelus/tsung | gregexp.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 along with this software. If not, it can be
%% retrieved via the world wide... | null | https://raw.githubusercontent.com/archaelus/tsung/b4ea0419c6902d8bb63795200964d25b19e46532/src/lib/gregexp.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
the License for the specific language governing rights and limitations
... | ` ` 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 Ericsson Utvecklings AB .
Portions created by Eri... |
a8a632d22c38e7b607bdf3da10f7f5a59d70c16fc5b5024c972704ede4134160 | rlepigre/pml | pml.ml | open Parser
open Pos
open Typing
open Output
let _ = Printexc.record_backtrace true
let _ = Sys.catch_break true
(* Command line argument parsing. *)
let files =
let files = ref [] in
let anon_fun fn = files := fn :: !files in
let usage_msg =
Printf.sprintf "Usage: %s [args] [f1.pml] ... [fn.pml]" Sys.argv... | null | https://raw.githubusercontent.com/rlepigre/pml/cdfdea0eecc6767b16edc6a7bef917bc9dd746ed/src/pml.ml | ocaml | Command line argument parsing.
Run checks on files. | open Parser
open Pos
open Typing
open Output
let _ = Printexc.record_backtrace true
let _ = Sys.catch_break true
let files =
let files = ref [] in
let anon_fun fn = files := fn :: !files in
let usage_msg =
Printf.sprintf "Usage: %s [args] [f1.pml] ... [fn.pml]" Sys.argv.(0)
in
let show_config () =
... |
ea3d40e4663d409629c7e47e50bfa426ea4496ac10362334ea42bb5eea978241 | camdez/honeybadger | project.clj | (defproject camdez/honeybadger "0.4.2-SNAPSHOT"
:description "Clojure library for reporting errors to honeybadger.io"
:url ""
:license {:name "MIT License"
:url "-license.php"}
:dependencies [[aleph "0.4.6"]
[clj-stacktrace "0.2.8"]
[prismatic/schema "1.1.9"]
... | null | https://raw.githubusercontent.com/camdez/honeybadger/2b126f53d4f5fa4f2c38d9d4fe1ae718fe43c483/project.clj | clojure | (defproject camdez/honeybadger "0.4.2-SNAPSHOT"
:description "Clojure library for reporting errors to honeybadger.io"
:url ""
:license {:name "MIT License"
:url "-license.php"}
:dependencies [[aleph "0.4.6"]
[clj-stacktrace "0.2.8"]
[prismatic/schema "1.1.9"]
... | |
8710b2e06e1ce81c8ab34715ab6a9bd25ca90ede0a9b9d194906f8f0f6c4b82c | janestreet/core | test_doubly_linked_bisimulation.ml | (* Test Doubly_linked by bisimulating it with a list and zipper-based implementation of
the same interface. *)
open Core
open Poly
module type S = sig
module Elt : sig
type 'a t
val value : 'a t -> 'a
val equal : 'a t -> 'a t -> bool
val sexp_of_t : ('a -> Sexp.t) -> 'a t -> Sexp.t
end
typ... | null | https://raw.githubusercontent.com/janestreet/core/d0d1b3915c9350d8e9f2b395a817659e539e6155/core/test/test_doubly_linked_bisimulation.ml | ocaml | Test Doubly_linked by bisimulating it with a list and zipper-based implementation of
the same interface.
observe option
observe
observe with local closure
punt: so as not to duplicate any effects in passed-in functions
sometimes we try to select from a not-yet-non-empty array |
open Core
open Poly
module type S = sig
module Elt : sig
type 'a t
val value : 'a t -> 'a
val equal : 'a t -> 'a t -> bool
val sexp_of_t : ('a -> Sexp.t) -> 'a t -> Sexp.t
end
type 'a t
include Container.S1 with type 'a t := 'a t
include Invariant.S1 with type 'a t := 'a t
include Sexp... |
fabf4e289a4a460e6a25f870917e49de86ce505713c4385e92290b32793c9ad0 | ak-coram/cl-duckdb | duckdb-ecl-sffi.lisp | ;;;; duckdb-ecl-sffi.lisp
#+ECL
(when (equalp (uiop:getenv "CL_DUCKDB_USE_SFFI") "T")
(let* ((library-path (uiop:getenv "CL_DUCKDB_LIBRARY_PATH"))
(quoted-search-arg (when library-path
(concatenate 'string
" -L"
... | null | https://raw.githubusercontent.com/ak-coram/cl-duckdb/d668508dad02e512a6763e6adf16133e1cb315c4/duckdb-ecl-sffi.lisp | lisp | duckdb-ecl-sffi.lisp |
#+ECL
(when (equalp (uiop:getenv "CL_DUCKDB_USE_SFFI") "T")
(let* ((library-path (uiop:getenv "CL_DUCKDB_LIBRARY_PATH"))
(quoted-search-arg (when library-path
(concatenate 'string
" -L"
(uiop:... |
6a9154b7f3ddc83ee458103c16f149b3690c5aec5bd92db0574b5025c31b8456 | atgreen/lisp-openshift | shell.lisp | (in-package :cl-mongo)
#|
shell commands
|#
(defun docs ( result )
"Stop the iterator (if any) and return the list of documents returned by the query.
Typical ue would be in conjunction with db.find like so (docs (iter (db.find 'foo' 'll)))"
(cadr (db.stop result)))
(defun iter ( result &key (mongo nil) (ma... | null | https://raw.githubusercontent.com/atgreen/lisp-openshift/40235286bd3c6a61cab9f5af883d9ed9befba849/quicklisp/dists/quicklisp/software/cl-mongo-20120208-git/src/shell.lisp | lisp |
shell commands
(format t "length of result set : ~A~%" (length result))
rm is is set up to handle insert/delete race conditions which may appear..
--------------------- | (in-package :cl-mongo)
(defun docs ( result )
"Stop the iterator (if any) and return the list of documents returned by the query.
Typical ue would be in conjunction with db.find like so (docs (iter (db.find 'foo' 'll)))"
(cadr (db.stop result)))
(defun iter ( result &key (mongo nil) (max-per-call 0) )
"Exha... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.