_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 |
|---|---|---|---|---|---|---|---|---|
2ab0af34445fa628f90771cda39eeb2e36c83dc0198f57fcd8b12748b57699f3 | untangled-web/untangled-ui | card_visuals.cljs | (ns untangled.ui.card-visuals
(:require
[om.dom :as dom]
[devcards.core :as dc :refer-macros [defcard]]
[untangled.ui.layout :as l]
[untangled.ui.elements :as e]))
(defcard card-visual-regressions
(l/row {}
(for [color [:neutral :primary :accent]
size [:normal :expand :wide]
... | null | https://raw.githubusercontent.com/untangled-web/untangled-ui/ae101f90cd9b7bf5d0c80e9453595fdfe784923c/src/visuals/untangled/ui/card_visuals.cljs | clojure | (ns untangled.ui.card-visuals
(:require
[om.dom :as dom]
[devcards.core :as dc :refer-macros [defcard]]
[untangled.ui.layout :as l]
[untangled.ui.elements :as e]))
(defcard card-visual-regressions
(l/row {}
(for [color [:neutral :primary :accent]
size [:normal :expand :wide]
... | |
c349d1f23f1b82b4dfc915286f9500a94f9dacdd7e1d932d12239a02053b9bf7 | dgiot/dgiot | emqx_congestion.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2022 EMQ Technologies Co. , Ltd. 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 o... | null | https://raw.githubusercontent.com/dgiot/dgiot/c601555e45f38d02aafc308b18a9e28c543b6f2c/src/emqx_congestion.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 ... | Copyright ( c ) 2020 - 2022 EMQ Technologies Co. , Ltd. 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(emqx_congestion).
-export([ maybe_alarm_conn_congestion/3
, cancel_alarms/3
... |
ead73cedfef008158eb3594527dd433b7408b97ce0b643eeb75815c3f2c88eae | databrary/databrary | Probe.hs | {-# LANGUAGE OverloadedStrings #-}
module Store.Probe
( Probe(..)
, probeLength
, probeFile
, probeAutoPosition
, avProbeCheckFormat
) where
import Control.Arrow (left)
import Control.Exception (try)
import Control.Monad.IO.Class (MonadIO(..))
import Control.Monad.Trans.Except (ExceptT(..), runExceptT, thr... | null | https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Store/Probe.hs | haskell | # LANGUAGE OverloadedStrings #
import Action.Types
| Get detected length if this is an audio or video file
and probe/wrap the file into a Probe describing it conversion target and current format.
TODO: make this pure
|Test if this represents a file in standard format.
Note: isPrefixOf use here is terse/counterint... | module Store.Probe
( Probe(..)
, probeLength
, probeFile
, probeAutoPosition
, avProbeCheckFormat
) where
import Control.Arrow (left)
import Control.Exception (try)
import Control.Monad.IO.Class (MonadIO(..))
import Control.Monad.Trans.Except (ExceptT(..), runExceptT, throwE)
import qualified Data.ByteStri... |
fa68218f725206a2962ac288e00fc04ef9b3b10a0176f3f2fdca9a76e1c81a2f | xvw/ocamlectron | Rectangle.mli | (** Describe a Rectangle *)
open Js_of_ocaml
class type rectangle = object
inherit Size.size
inherit Position.position
end
type t = rectangle Js.t
| null | https://raw.githubusercontent.com/xvw/ocamlectron/3e0cb9575975e69ab34cb7e0e3549d31c07141c2/lib/electron_plumbing/Rectangle.mli | ocaml | * Describe a Rectangle |
open Js_of_ocaml
class type rectangle = object
inherit Size.size
inherit Position.position
end
type t = rectangle Js.t
|
3915aead6c6b1b5fc46d974b83b07bc0b3d0cc7bcd4264126bb75836e4ef048e | Clozure/ccl-tests | acos.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Tue Feb 10 05:39:24 2004
;;;; Contains: Tests of ACOS
(in-package :cl-test)
(deftest acos.1
(loop for i from -1000 to 1000
for rlist = (multiple-value-list (acos i))
for y = (car rlist)
always (and (null (cdr rlist))
(numberp y)))
t)
(deftest acos.2
... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/acos.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of ACOS
Add accuracy tests
Error tests | Author :
Created : Tue Feb 10 05:39:24 2004
(in-package :cl-test)
(deftest acos.1
(loop for i from -1000 to 1000
for rlist = (multiple-value-list (acos i))
for y = (car rlist)
always (and (null (cdr rlist))
(numberp y)))
t)
(deftest acos.2
(loop for type in '(short-float single-float double... |
f3d91553e14cc0eac130bd32ac6eae9ffde214e1e5c2c265dd752f27e8b5dc30 | trebb/phoros | blurb.lisp | PHOROS -- Photogrammetric Road Survey
Copyright ( C ) 2011 , 2012
;;;
;;; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
;;; (at your option) any later... | null | https://raw.githubusercontent.com/trebb/phoros/c589381e3f4a729c5602c5870a61f1c847edf201/blurb.lisp | lisp |
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 WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR... | PHOROS -- Photogrammetric Road Survey
Copyright ( C ) 2011 , 2012
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 along
51 Franklin Street , Fifth Floor , Boston , USA .
(in-package :phoros)
(hunchentoot:define-easy... |
d4077a3426421111498385052fabeba811e2be3cabfc3b928a2dc0c9ec85b18e | haroldcarr/learn-haskell-coq-ml-etc | S.hs | # LANGUAGE RankNTypes , FlexibleContexts #
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies #
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
# LANGUAGE NamedFieldPuns #
module S where
import Control.Monad
import Control.Monad.Reader
import Data.List
import Data.Maybe
import Data.IORef
impo... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/eb6362cba13c18cfddbbda9fadae21f4f39cd8fc/haskell/topic/info-flow-security/2013-encoding-secure-info-flow-with-restricted-delegation-and-revocation/S.hs | haskell | # LANGUAGE TypeSynonymInstances, FlexibleInstances #
----------------------------------------------------------------------------
extend to recursive functions
need to make sure that every function ends with returnM
declassify/endorse
--------------------------------------------------------------------------... | # LANGUAGE RankNTypes , FlexibleContexts #
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies #
# LANGUAGE NamedFieldPuns #
module S where
import Control.Monad
import Control.Monad.Reader
import Data.List
import Data.Maybe
import Data.IORef
import Text.Printf
import DLM
newtype RDR a = RDR { ru... |
c2f5eb60f233a033a52a9079db7f43ea8a0379cbbdde280c1361f85303f09a5d | rtoy/ansi-cl-tests | nset-difference.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Apr 20 07:44:44 2003
Contains : Tests of NSET - DIFFERENCE
(in-package :cl-test)
(compile-and-load "cons-aux.lsp")
(deftest nset-difference.1
(nset-difference nil nil)
nil)
(deftest nset-difference.2
(let ((result
(nset-difference-with-check... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/nset-difference.lsp | lisp | -*- Mode: Lisp -*-
Verify that the :test argument is called with the arguments
in the correct order
Order of argument evaluation tests
Keyword tests
Error tests | Author :
Created : Sun Apr 20 07:44:44 2003
Contains : Tests of NSET - DIFFERENCE
(in-package :cl-test)
(compile-and-load "cons-aux.lsp")
(deftest nset-difference.1
(nset-difference nil nil)
nil)
(deftest nset-difference.2
(let ((result
(nset-difference-with-check '(a b c) nil)))
(ch... |
055680f3b9edd5432438b0a94524f82a19ba5860dcd885becba223dc92595c53 | oxidizing/sihl-demo | layout.ml | open Tyxml
let navigation user =
match user with
| None ->
[%html
{|
<ul>
<li><a href="/login">Login</a></li>
<li><a href="/registration">Registration</a></li>
</ul>
|}]
| Some user ->
[%html
{|
<ul>
<li>|}
[ Html.txt (Format.sprintf "Welcome %s!" user.Sihl.Contract.User.email)
... | null | https://raw.githubusercontent.com/oxidizing/sihl-demo/000798b69951d785cb7c3306b890f3cddf63f7a3/web/view/layout.ml | ocaml | open Tyxml
let navigation user =
match user with
| None ->
[%html
{|
<ul>
<li><a href="/login">Login</a></li>
<li><a href="/registration">Registration</a></li>
</ul>
|}]
| Some user ->
[%html
{|
<ul>
<li>|}
[ Html.txt (Format.sprintf "Welcome %s!" user.Sihl.Contract.User.email)
... | |
227f0522d858fc38ae7596c7a29747bd73ee78a122010a4a471c26167106e751 | ar-nelson/schemepunk | command.test.scm | (import (scheme base)
(schemepunk syntax)
(schemepunk command)
(schemepunk show base)
(schemepunk test))
(test-group "Command Line Argument Parsing"
(define spec
'((name "Zookeeper Application")
(doc "Example application from (chibi app) documentation, adapted for \
... | null | https://raw.githubusercontent.com/ar-nelson/schemepunk/e2840d3c445933528aaf0a36ec72b053ec5016ce/tests/command.test.scm | scheme | (import (scheme base)
(schemepunk syntax)
(schemepunk command)
(schemepunk show base)
(schemepunk test))
(test-group "Command Line Argument Parsing"
(define spec
'((name "Zookeeper Application")
(doc "Example application from (chibi app) documentation, adapted for \
... | |
06cdbcf88b69800d7ea7e86204c6f41093e6e5ac2dbef92aaa646adf3dac8e3f | nextjournal/clerk | devtools.cljs | (ns devtools
(:require [devtools.core :as devtools]))
;; invert cljs devtools colors to keep things readable when dark mode is on
(when (and (exists? js/window.matchMedia)
(.. js/window (matchMedia "(prefers-color-scheme: dark)") -matches))
(let [{:keys [cljs-land-style]} (devtools/get-prefs)]
(devt... | null | https://raw.githubusercontent.com/nextjournal/clerk/f46b5763cb41f78d86d62718cb20a01c1079d5c7/dev/devtools.cljs | clojure | invert cljs devtools colors to keep things readable when dark mode is on | (ns devtools
(:require [devtools.core :as devtools]))
(when (and (exists? js/window.matchMedia)
(.. js/window (matchMedia "(prefers-color-scheme: dark)") -matches))
(let [{:keys [cljs-land-style]} (devtools/get-prefs)]
(devtools/set-pref! :cljs-land-style (str "filter:invert(1);" cljs-land-style))))... |
ab74cd5b15d40848a9d521ac26f82c4f914a40f6d5c5d81bf5008b96c1371143 | ygrek/mldonkey | dcKey.ml | Compute the key from $ Lock xxxxx yyyyy| using ' gen_key xxxxx '
(*************************************************************************)
(* the key is quite easily :) computed from the lock *)
(* key[x]= ns(lock[x]^lock[x-1]) *)
ns is a nibble swap ( ... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/networks/direct_connect/dcKey.ml | ocaml | ***********************************************************************
the key is quite easily :) computed from the lock
key[x]= ns(lock[x]^lock[x-1])
exception:
key[0] is a bit different ... | Compute the key from $ Lock xxxxx yyyyy| using ' gen_key xxxxx '
ns is a nibble swap ( switch the upper 4 bits with the lower 4 bits )
let 's name A and B the 2 last bytes of the lock
$ Lock 17lM=.U=*@Q&HvoG2 = HJcLH:-,Q=5R = xMvRo - ET4;nMZYxnP , P_&oHFmc%B Pk=.l > r?nZz - VKmlf&z|... |
e0d7d41e4ea2f4b7557a7429547ee999705c1da9c139d7fa752ba499793ec582 | tweag/ormolu | multi-line.hs | type family Id a
= result | result -> a where
Id a
= a
type family G (a :: k)
b c = foo | foo -> k b where
G a b c =
(a, b)
type family F a
:: * -> * where
F Int = Double
F Bool =
Char
F a = String
type family F a where
F a -- foo
= a
| null | https://raw.githubusercontent.com/tweag/ormolu/308542e06a5042e55f4e96ff23711a6b614d529b/data/examples/declaration/type-families/closed-type-family/multi-line.hs | haskell | foo | type family Id a
= result | result -> a where
Id a
= a
type family G (a :: k)
b c = foo | foo -> k b where
G a b c =
(a, b)
type family F a
:: * -> * where
F Int = Double
F Bool =
Char
F a = String
type family F a where
= a
|
88677c1b7120cc0f244f4e59e8adf2e85a6df8c7e4484a6fcf8ffa8ef3a44a1f | fjarri/clojure-scribble | reader_test.clj | (ns scribble.reader-test
(:import [java.lang RuntimeException])
(:use [midje.sweet])
(:require [clojure.test :refer :all]
[scribble.core :refer :all]
[scribble.settings :refer :all]))
Tests were taken from the orignal Scribble documentation ,
; so we use its symbols.
; (except for the ... | null | https://raw.githubusercontent.com/fjarri/clojure-scribble/ea245abd858596195f31c14d7a59da87377c4f27/test/scribble/reader_test.clj | clojure | so we use its symbols.
(except for the \` instead of \|,
because the latter is not macro-terminating)
))
Unfortunately, the reader that reads from strings does not have
line/column metadata.
So in order for the whitespace truncation to work properly,
we need to use the main reader.
Tests for the reader macro
i... | (ns scribble.reader-test
(:import [java.lang RuntimeException])
(:use [midje.sweet])
(:require [clojure.test :refer :all]
[scribble.core :refer :all]
[scribble.settings :refer :all]))
Tests were taken from the orignal Scribble documentation ,
(use-scribble scribble-settings)
For e... |
b4dcbfaba357dc8c4e7c996f6a44964625a01e9547c5733e8d163ae1cd82228e | tanders/cluster-engine | 03.Fwd-rules.lisp | (in-package cluster-engine)
;;;;;;;;;;;;;;;;;
Fwd - rule1 is just to always get a solution . It does NOT balance engines .
(defun fwd-rule1 (vsolution vindex vbacktrack-history vdefault-engine-order number-of-engines)
"Very simple: shortest index next, in order of default order"
(declare (type array vsolution vind... | null | https://raw.githubusercontent.com/tanders/cluster-engine/064ad4fd107f8d9a3dfcaf260524c2ab034c6d3f/sources/03.Fwd-rules.lisp | lisp |
this is just here to avoid error message when compiled
forward to last backtracked engine
Fwd-rule-indep does not take backtrack history into consideration.
pop backtracked engine just to make the list shorter..
length-metric-engin
It also expects a metric engine (it will crash without one).
forward to last backtr... | (in-package cluster-engine)
Fwd - rule1 is just to always get a solution . It does NOT balance engines .
(defun fwd-rule1 (vsolution vindex vbacktrack-history vdefault-engine-order number-of-engines)
"Very simple: shortest index next, in order of default order"
(declare (type array vsolution vindex vbacktrack-hist... |
53d34d2f9f03abb2f02b1ecf2c4c84a687e8a12133d3649c7788fd9465b59be6 | synrc/nitro | element_submit.erl | -module (element_submit).
-author('Andrew Zadorozhny').
-include_lib("nitro/include/nitro.hrl").
-include_lib("nitro/include/event.hrl").
-compile(export_all).
render_element(Record) when Record#submit.show_if==false -> [<<>>];
render_element(Record) ->
ID = case Record#submit.id of [] -> nitro:temp_id(); I->I end... | null | https://raw.githubusercontent.com/synrc/nitro/753b543626add2c014584546ec50870808a2eb90/src/elements/input/element_submit.erl | erlang | -module (element_submit).
-author('Andrew Zadorozhny').
-include_lib("nitro/include/nitro.hrl").
-include_lib("nitro/include/event.hrl").
-compile(export_all).
render_element(Record) when Record#submit.show_if==false -> [<<>>];
render_element(Record) ->
ID = case Record#submit.id of [] -> nitro:temp_id(); I->I end... | |
0fca76e420dda959a63d53200431f3aa64d5e4ffd4a1c75bad25fead95a4ac2a | PrincetonUniversity/lucid | RemoveGenerates.ml |
After this pass , generate statements only need to set multicast ID and egress port .
- All event parameters are set in this pass .
- event count is set ( really : mc_group_a )
- After this pass , to translate a generate statement , you must :
1 . generate : nothing
2 . port g... | null | https://raw.githubusercontent.com/PrincetonUniversity/lucid/a2351acd5f9c08aaf59129c29895a369cf75a3c2/src/lib/backend/transformations/RemoveGenerates.ml | ocaml | find all the possible sequences of events that get generated
no events in rest
make multicast groups for:
1) flood expressions
2) self-generate recirculation cloning
** generate elimination **
generate statements that set the parameter
variables of evid to eargs
id = e + i;
replace any reads of pa... |
After this pass , generate statements only need to set multicast ID and egress port .
- All event parameters are set in this pass .
- event count is set ( really : mc_group_a )
- After this pass , to translate a generate statement , you must :
1 . generate : nothing
2 . port g... |
8492c0443d43ecac8059a46448800d37ba53aeb7cd26c46657e82dc9170158ff | sunng87/stavka | env.clj | (ns stavka.resolvers.env
(:require [stavka.protocols :as sp]
[clojure.string :as str]))
(defn- transform-env-key [k {:keys [disable-underscore-to-dot?]}]
(as-> k k*
(str/lower-case k*)
(if-not disable-underscore-to-dot?
(str/replace k* #"_" ".")
k*)))
(defn transform-env-keys [m op... | null | https://raw.githubusercontent.com/sunng87/stavka/0b0e23f24db1a535576eb5f9fb67c18abadca64d/src/stavka/resolvers/env.clj | clojure | (ns stavka.resolvers.env
(:require [stavka.protocols :as sp]
[clojure.string :as str]))
(defn- transform-env-key [k {:keys [disable-underscore-to-dot?]}]
(as-> k k*
(str/lower-case k*)
(if-not disable-underscore-to-dot?
(str/replace k* #"_" ".")
k*)))
(defn transform-env-keys [m op... | |
46a43b9b5bce56903704fee5c3e1e5af4d5a6e460515d60d88b5b1db8d63d957 | tezos/tezos-mirror | block_header_repr.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/195315d385d7e8e25fc599e7cb645b1429957183/src/proto_alpha/lib_protocol/block_header_repr.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
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... |
f2ad2df68c5f8fe44d880671d133f7cfeec94b724561610ae51ed1bcea288363 | dgiot/dgiot | prop_emqx_sys.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2022 EMQ Technologies Co. , Ltd. 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 o... | null | https://raw.githubusercontent.com/dgiot/dgiot/c601555e45f38d02aafc308b18a9e28c543b6f2c/test/props/prop_emqx_sys.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 ... | Copyright ( c ) 2020 - 2022 EMQ Technologies Co. , Ltd. 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(prop_emqx_sys).
-include_lib("proper/include/proper.hrl").
-export([ initial_state/0
... |
0119c1b6ee9b9e1e80a5694549e8333166e53815f3539783852d80094c762331 | 7even/endless-ships | utils.cljs | (ns endless-ships.views.utils
(:require [clojure.string :as str])
(:import (goog.i18n NumberFormat)
(goog.i18n.NumberFormat Format)))
(def license-label-styles
{"City-Ship" "human"
"Navy" "human"
"Navy Carrier" "human"
"Navy Cruiser" "human"
"Navy Auxilia... | null | https://raw.githubusercontent.com/7even/endless-ships/1cb0519b66e493f092adea9b22768ad0980dbbab/src/cljs/endless_ships/views/utils.cljs | clojure | (ns endless-ships.views.utils
(:require [clojure.string :as str])
(:import (goog.i18n NumberFormat)
(goog.i18n.NumberFormat Format)))
(def license-label-styles
{"City-Ship" "human"
"Navy" "human"
"Navy Carrier" "human"
"Navy Cruiser" "human"
"Navy Auxilia... | |
dd87b1fc91a032d5aeed6802c853b3acc3bf39b63dcc45116e921bdb867ec2ea | manuel-serrano/bigloo | evcompile.scm | ;*=====================================================================*/
* ... /prgm / project / bigloo / / runtime / Eval / evcompile.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation : F... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/runtime/Eval/evcompile.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* La pre-compilation des formes pour permettre l'interpretation */
* rapide ... | * ... /prgm / project / bigloo / / runtime / Eval / evcompile.scm * /
* Author : * /
* Creation : Fri Mar 25 09:09:18 1994 * /
* Last change : Tue Nov 19 13:10:00 2019 ( serrano ) * /
(module __evco... |
508eaa9ce78eeb52d4893d75e220e9d5917d97f0f7d50a0293c6c18f0ea728bc | mdedwards/slippery-chicken | enharmonics-examples.lsp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; File: enharmonics-examples.lsp
;;;
Class Hierarchy : None
;;;
Version : 1.0
;;;
;;; Project: slippery chicken (algorithmic composition)
;;;
;;; Purpose: Lisp example code to accompany enharm... | null | https://raw.githubusercontent.com/mdedwards/slippery-chicken/c1c11fadcdb40cd869d5b29091ba5e53c5270e04/doc/examples/enharmonics-examples.lsp | lisp |
File: enharmonics-examples.lsp
Project: slippery chicken (algorithmic composition)
Purpose: Lisp example code to accompany enharmonics.html
****
This file is part of slippery-chicken
slippery-chicken is free software; you can redistribu... | Class Hierarchy : None
Version : 1.0
Author :
Creation date : 23rd November 2012
$ $ Last modified : 22:41:46 Fri May 17 2013 BST
SVN ID : $ I d : enharmonics-examples.lsp 3538 2013 - 05 - 18 08:29:15Z medward2 $
Licence : Copyright ( c ) 2012
P... |
1676afaab7a02cb2743d879ac2bde7afb3b2f575147dd2f84281a2a35afd595c | hexlet-basics/exercises-racket | test.rkt | #lang racket
(require (only-in rackunit check-equal? test-begin))
(require "index.rkt")
(test-begin
(check-equal?
(maps
(list)
(list))
(list))
(check-equal?
(maps (list add1)
(list (list 0)))
(list (list 1)))
(check-equal?
(maps
(list add1 string?)
(list (list 0 100)
... | null | https://raw.githubusercontent.com/hexlet-basics/exercises-racket/ae3a45453584de1e5082c841178d4e43dd47e08a/modules/40-lists/20-builtin-loops-map/test.rkt | racket | #lang racket
(require (only-in rackunit check-equal? test-begin))
(require "index.rkt")
(test-begin
(check-equal?
(maps
(list)
(list))
(list))
(check-equal?
(maps (list add1)
(list (list 0)))
(list (list 1)))
(check-equal?
(maps
(list add1 string?)
(list (list 0 100)
... | |
ab8906883193fafc0076c82352065b83c4b8aa1a09c766b9f51276025d72a24f | apache/couchdb-rebar | basicnif.erl | -module({{module}}).
-export([new/0,
myfunction/1]).
-on_load(init/0).
-define(nif_stub, nif_stub_error(?LINE)).
nif_stub_error(Line) ->
erlang:nif_error({nif_not_loaded,module,?MODULE,line,Line}).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
init() ->
PrivDir = case code:priv_di... | null | https://raw.githubusercontent.com/apache/couchdb-rebar/8578221c20d0caa3deb724e5622a924045ffa8bf/priv/templates/basicnif.erl | erlang | ===================================================================
=================================================================== | -module({{module}}).
-export([new/0,
myfunction/1]).
-on_load(init/0).
-define(nif_stub, nif_stub_error(?LINE)).
nif_stub_error(Line) ->
erlang:nif_error({nif_not_loaded,module,?MODULE,line,Line}).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
init() ->
PrivDir = case code:priv_di... |
cc444bcb4cc34c7d04c71dc7afc1bbd98040f130d779a26de7a3d471b6d80b44 | cardmagic/lucash | errno.scm | ;;; Errno constant definitions.
Copyright ( c ) 1993 by . See file COPYING .
Copyright ( c ) 1994 by .
These are the correct values for Linux systems .
is not a legit Scheme symbol . , lose .
(define-enum-constants errno
(perm 1) ; Not super-user
(noent 2) ; No such file ... | null | https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scsh/linux/errno.scm | scheme | Errno constant definitions.
Not super-user
No such file or directory
No such process
Interrupted system call
I/O error
No such device or address
Arg list too long
Bad file number
No children
No more processes
EAGAIN again
Not enough core
Permission denied
Bad address
Block device required
... | Copyright ( c ) 1993 by . See file COPYING .
Copyright ( c ) 1994 by .
These are the correct values for Linux systems .
is not a legit Scheme symbol . , lose .
(define-enum-constants errno
Exec format error
Invalid argument
Invalid exchange
Invalid request descriptor
Invalid request code
I... |
bd8152a9380220482638f57c7768b8248017722c224e1f7ce42ce8353d8bfd79 | bsansouci/bsb-native | eval.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Cr... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/debugger/eval.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
OCaml port by and
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 .
open Typ... |
732586e2d38377405859ca3237f3a71ac3559efd06dcb989bb91a38b4a256281 | tonymorris/geo-osm | Children.hs | | The children elements of the @osm@ element of a OSM file .
module Data.Geo.OSM.Children
(
Children
, osmUser
, osmGpxFile
, osmApi
, osmChangeset
, osmNodeWayRelation
, foldChildren
) where
import Text.XML.HXT.Arrow.Pickle
import Data.Geo.OSM.User
import Data.Geo.OSM.Preferences
import Data.Geo.OSM.GpxFile
impor... | null | https://raw.githubusercontent.com/tonymorris/geo-osm/776542be2fd30a05f0f9e867128eca5ad5d66bec/src/Data/Geo/OSM/Children.hs | haskell | | A @user@ element.
| A @gpx_file@ element.
| A @api@ element.
| A @changeset@ element.
| A list of @node@, @way@ or @relation@ elements.
| Folds OSM child elements (catamorphism).
^ If a @user@ element.
^ If a @preferences@ element.
^ If a @gpx_file@ element.
^ If a @api@ element.
^ If a @changeset@ element... | | The children elements of the @osm@ element of a OSM file .
module Data.Geo.OSM.Children
(
Children
, osmUser
, osmGpxFile
, osmApi
, osmChangeset
, osmNodeWayRelation
, foldChildren
) where
import Text.XML.HXT.Arrow.Pickle
import Data.Geo.OSM.User
import Data.Geo.OSM.Preferences
import Data.Geo.OSM.GpxFile
impor... |
2f00e024c3712d0da4a643b44bb7c3251c02d346ec653a048547299f8855883e | thelema/ocaml-community | ccomp.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/utils/ccomp.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 Q Public License version 1.0 .
let command cmdline =
if !Clflags.ve... |
e490cb7e0cd0bb3a568f095c19aef2af0d25af8b84306f61fc5369d8cb9b4f93 | mbj/stratosphere | FieldToMatchProperty.hs | module Stratosphere.WAFRegional.SizeConstraintSet.FieldToMatchProperty (
FieldToMatchProperty(..), mkFieldToMatchProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/wafregional/gen/Stratosphere/WAFRegional/SizeConstraintSet/FieldToMatchProperty.hs | haskell | module Stratosphere.WAFRegional.SizeConstraintSet.FieldToMatchProperty (
FieldToMatchProperty(..), mkFieldToMatchProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value... | |
8acd1759d4431753194c0ea764512d7ec2cf499107d53cc6a10a0d343435090c | twosigma/Cook | regexp_tools.clj | ;;
Copyright ( c ) Two Sigma Open Source , LLC
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, software... | null | https://raw.githubusercontent.com/twosigma/Cook/9e561b847827adf2a775220d1fc435d8089fc41d/scheduler/src/cook/regexp_tools.clj | clojure |
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 permi... | Copyright ( c ) Two Sigma Open Source , LLC
distributed under the License is distributed on an " AS IS " BASIS ,
(ns cook.regexp-tools
(:require [clojure.tools.logging :as log]))
(defn match-based-on-regexp
"Given a list of dictionaries [{:<regexp-name> <regexp> :<field-name> <field>} {:<regexp-name> <regexp> ... |
54616dbab704494f1a8909fc6a0e79dac9c814ebbc57b279279162f3fafb8698 | BitGameEN/bitgamex | lib_game.erl | %%%--------------------------------------
@Module :
%%% @Description: 游戏相关处理
%%%--------------------------------------
-module(lib_game).
-export([set_gamesvr_num/1, gamesvr_num/0, game_hard_coef/1, add_reclaimed_gold/3, put_gold_drain_type_and_drain_id/3]).
-export([get_hash_id/1]).
-include("common.hrl... | null | https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/lib/lib_game.erl | erlang | --------------------------------------
@Description: 游戏相关处理
--------------------------------------
game服务器数量的缓存key
锁定成功,返回{true, Cas}
| @Module :
-module(lib_game).
-export([set_gamesvr_num/1, gamesvr_num/0, game_hard_coef/1, add_reclaimed_gold/3, put_gold_drain_type_and_drain_id/3]).
-export([get_hash_id/1]).
-include("common.hrl").
-include("record_usr_game.hrl").
-include("record_usr_game_reclaimed_gold.hrl").
-include("record_log_gol... |
e38ff12a39c930c5b8ffd373f3b5b5616d3d9023f5fcdbcf7cf5a0f084e9046b | Verites/verigraph | FinalPullbackComplement.hs | module Category.TypedGraph.FinalPullbackComplement where
import Abstract.Category.FinalPullbackComplement
import Abstract.Category.FinitaryCategory
import Category.TypedGraph.Cocomplete ()
import Data.Graphs as G
import qualified Data.Graphs.Morphism ... | null | https://raw.githubusercontent.com/Verites/verigraph/754ec08bf4a55ea7402d8cd0705e58b1d2c9cd67/src/library/Category/TypedGraph/FinalPullbackComplement.hs | haskell | @
l
K──────▶L
│ V
▼ ▼
D──────▶A
l'
@
This function receives m and l, it creates (k,l') as the
__morphism m must be injective__
Available on:
-due.de/publications/koenig/icgt06b.pdf
It is a naive implementation focused on correction and not performance.
Performance m... | module Category.TypedGraph.FinalPullbackComplement where
import Abstract.Category.FinalPullbackComplement
import Abstract.Category.FinitaryCategory
import Category.TypedGraph.Cocomplete ()
import Data.Graphs as G
import qualified Data.Graphs.Morphism ... |
c2303b7355feada474089484c584159724d6356177381067e871198ed41a0a7f | brendanlong/ocaml-trie | levenshtein.ml | *
distance algorithm for general array .
Author :
License : public domain
Levenshtein distance algorithm for general array.
Author:
License: public domain
*)
* Minimum of three integers
let min3 (x:int) y z =
let m' (a:int) b = if a < b then a else b in
m' (m' x y) z
module type... | null | https://raw.githubusercontent.com/brendanlong/ocaml-trie/4334364c6e9349ad9daa5d992557b64b1ed3dfc8/vendor/levenshtein/levenshtein.ml | ocaml | slow_but_simple + memoization + upperbound
There is a property: d(i-1)(j-1) <= d(i)(j)
so if d(i-1)(j-1) >= upper_bound then we can immediately say
d(i)(j) >= upper_bound, and skip the calculation of d(i-1)(j) and d(i)(j-1)
cache: d i j is stored at cache.(i-1).(j-1)
This is not tail recursive
*... | *
distance algorithm for general array .
Author :
License : public domain
Levenshtein distance algorithm for general array.
Author:
License: public domain
*)
* Minimum of three integers
let min3 (x:int) y z =
let m' (a:int) b = if a < b then a else b in
m' (m' x y) z
module type... |
3adef44b88e5c5368df02cfa10ac7abaa91ec825075d037255445cdf117c66f8 | bobot/FetedelascienceINRIAsaclay | sound.ml | open Printf
let bt =
if Array.length Sys.argv < 2 then (
printf "%s <bluetooth addr>\n" Sys.argv.(0);
exit 1;
)
else Sys.argv.(1)
let soundfile = "Woops.rso"
let () =
let conn = Mindstorm.connect_bluetooth bt in
printf "Connected!\n%!";
Mindstorm.Sound.play_tone conn 800 500;
Unix.sleep 1;
Mi... | null | https://raw.githubusercontent.com/bobot/FetedelascienceINRIAsaclay/87765db9f9c7211a26a09eb93e9c92f99a49b0bc/2010/robot/mindstorm-bzr/tests/sound.ml | ocaml | open Printf
let bt =
if Array.length Sys.argv < 2 then (
printf "%s <bluetooth addr>\n" Sys.argv.(0);
exit 1;
)
else Sys.argv.(1)
let soundfile = "Woops.rso"
let () =
let conn = Mindstorm.connect_bluetooth bt in
printf "Connected!\n%!";
Mindstorm.Sound.play_tone conn 800 500;
Unix.sleep 1;
Mi... | |
6a25956735d74f021fdf42097d0cde3e9d046957dd4be8c7b7f05ba692c30469 | TheClimateCorporation/clj-spark | extra.clj | (ns clj-spark.examples.extra
"This namespace simulates getting a dataset from a distinct source. This could be
a SQL query, for example.")
(defn get-data
"Returns a result set as a seq of Maps. Similar to a result set acquired by clojure.data.jdbc."
[]
(map (partial zipmap [:policy_id :field_id :state :pol... | null | https://raw.githubusercontent.com/TheClimateCorporation/clj-spark/b1f4fc5305e41673c9e98918278f02f112f693a3/src/clj_spark/examples/extra.clj | clojure | (ns clj-spark.examples.extra
"This namespace simulates getting a dataset from a distinct source. This could be
a SQL query, for example.")
(defn get-data
"Returns a result set as a seq of Maps. Similar to a result set acquired by clojure.data.jdbc."
[]
(map (partial zipmap [:policy_id :field_id :state :pol... | |
959ba23266b61949436a8d160fa36c4d59ae3a0be729d11f6a9a156c744738c7 | snoyberg/http-client | TLS.hs | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
-- | Support for making connections via the connection package and, in turn,
-- the tls package suite.
--
-- Recommended reading: <-lang.org/library/http-client>
module Network.HTTP.Client.TLS
( ... | null | https://raw.githubusercontent.com/snoyberg/http-client/2580cce859d2272de9c4ac5ef8c67643ad934207/http-client-tls/Network/HTTP/Client/TLS.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveDataTypeable #
| Support for making connections via the connection package and, in turn,
the tls package suite.
Recommended reading: <-lang.org/library/http-client>
* Settings
* Digest authentication
* Global manager
'NC.SockSettings'
'NC.ConnectionContext'. Prov... | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
module Network.HTTP.Client.TLS
tlsManagerSettings
, mkManagerSettings
, mkManagerSettingsContext
, newTlsManager
, newTlsManagerWith
, applyDigestAuth
, DigestAuthException (..)
, DigestAuthExceptionDetails (..)
, displayDigestAuthE... |
a87e37e584e215b15c422cb896b619116ea782887cfc0aea5729f7ffeee17507 | NorfairKing/easyspec | SimilarityUtils.hs | # LANGUAGE CPP #
module EasySpec.Discover.SignatureInference.SimilarityUtils where
import Import
import Data.Map.Lazy (Map)
import qualified Data.Map.Lazy as M
import EasySpec.Discover.SignatureInference.Utils
import EasySpec.Discover.Types
-- Make a signature inference strategy, by describing how to get a 'finger... | null | https://raw.githubusercontent.com/NorfairKing/easyspec/b038b45a375cc0bed2b00c255b508bc06419c986/easyspec/src/EasySpec/Discover/SignatureInference/SimilarityUtils.hs | haskell | Make a signature inference strategy, by describing how to get a 'fingerprint'
from an 'EasyId'.
Make a signature inference strategy, by describing the difference between two 'EasyId's. | # LANGUAGE CPP #
module EasySpec.Discover.SignatureInference.SimilarityUtils where
import Import
import Data.Map.Lazy (Map)
import qualified Data.Map.Lazy as M
import EasySpec.Discover.SignatureInference.Utils
import EasySpec.Discover.Types
similarityInferAlg ::
(Eq a, Ord a, Foldable f)
=> String
-... |
1d5c88e0ce1f9ef88b4ad593af7fc4bd39b289ba3bf7ae10187139a63cc27570 | chetmurthy/ensemble | dbgbatch.ml | (**************************************************************)
(* DBGBATCH.ML : endpoint level emulation *)
Author : , 3/98
(**************************************************************)
open Trans
open Layer
open View
open Event
open Util
open Printf
(*********************************************************... | null | https://raw.githubusercontent.com/chetmurthy/ensemble/8266a89e68be24a4aaa5d594662e211eeaa6dc89/ensemble/server/layers/debug/dbgbatch.ml | ocaml | ************************************************************
DBGBATCH.ML : endpoint level emulation
************************************************************
************************************************************
************************************************************
***********************************... | Author : , 3/98
open Trans
open Layer
open View
open Event
open Util
open Printf
let name = Trace.filel "DBGBATCH"
module Priq = Priq.Make ( Time.Ord )
type header = Origin of string
type 'abv item =
| Up of Event.up * 'abv
| Upnm of Event.up
| Zero
type 'abv state = {
alarm : Alarm.t ;
buf : 'abv ... |
11ea45b9e9ba5af7e878e23ec0e9d4d6daa61ec60feb62ca5c2f979238b5e957 | Vaguery/klapaucius | returnable.clj | (ns push.instructions.aspects.returnable
(:require [push.util.code-wrangling
:as util
:refer [list!]])
(:use [push.instructions.core
:only (build-instruction)]
[push.instructions.dsl]))
(defn return-instruction
"returns a new x-return instruction for a... | null | https://raw.githubusercontent.com/Vaguery/klapaucius/17b55eb76feaa520a85d4df93597cccffe6bdba4/src/push/instructions/aspects/returnable.clj | clojure | (ns push.instructions.aspects.returnable
(:require [push.util.code-wrangling
:as util
:refer [list!]])
(:use [push.instructions.core
:only (build-instruction)]
[push.instructions.dsl]))
(defn return-instruction
"returns a new x-return instruction for a... | |
c34049c09535bed4bb201db924a4d1d0651cc607e0fb81dd3bb8c82491c2cc5d | FundingCircle/topology-grapher | analytics.cljc | (ns topology-grapher.analytics)
(defn source? [s]
(= :source (:type s)))
(defn sink? [s]
(= :sink (:type s)))
(defn processor? [s]
(= :processor (:type s)))
(defn topic? [s]
(= :topic (:type s)))
(defn store? [s]
(= :store (:type s)))
(defn input-topic [edges n]
;; its a topic, and its at the start of... | null | https://raw.githubusercontent.com/FundingCircle/topology-grapher/c1e3518ef90f95097b3310d3d5cbd48750498e81/src/topology_grapher/analytics.cljc | clojure | its a topic, and its at the start of the graph, i.e. there
is no edge going to it
its a topic, and its at the end of the graph, i.e. there
is no edge coming from it | (ns topology-grapher.analytics)
(defn source? [s]
(= :source (:type s)))
(defn sink? [s]
(= :sink (:type s)))
(defn processor? [s]
(= :processor (:type s)))
(defn topic? [s]
(= :topic (:type s)))
(defn store? [s]
(= :store (:type s)))
(defn input-topic [edges n]
(and (topic? n)
(not-any? #(= (:... |
7136197a5fba525314ddff8f6dfb98d362a4eaf817cec79b667efc3a5edb458b | rowangithub/DOrder | oracle.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
*
* Author :
* Copyright reserved
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/learning/cdnf/oracle.ml | ocaml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
*
* Author :
* Copyright reserved
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | |
35b649117ef952b1ae89fe8a993254459d678b73b1b7f48223730b38743de3e0 | cram2/cram | exponential-functions.lisp | ;; Exponential functions
, Tue Mar 21 2006 - 17:05
Time - stamp : < 2011 - 11 - 24 22:56:28EST exponential-functions.lisp >
;;
Copyright 2006 , 2007 , 2008 , 2009 , 2011
Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/special-functions/exponential-functions.lisp | lisp | Exponential functions
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See... | , Tue Mar 21 2006 - 17:05
Time - stamp : < 2011 - 11 - 24 22:56:28EST exponential-functions.lisp >
Copyright 2006 , 2007 , 2008 , 2009 , 2011
Distributed under the terms of the GNU General Public License
it under the terms of the GNU General Public License as published by
the Free Software Foundation ,... |
3d91d63d8b254e200dd007191a0e3fd769e29113dae6341dff63cc6a1b9a401c | Taiji-pipeline/Taiji | DeNovo.hs | -- | Infer network de novo from data
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Taiji.Core.Network.DeNovo
( saveAssociations
, mkAssociations
, mkNetwork
, readNetwork
, rea... | null | https://raw.githubusercontent.com/Taiji-pipeline/Taiji/02696ee7c7676a708e98765a9f10b3a33c528f91/src/Taiji/Core/Network/DeNovo.hs | haskell | | Infer network de novo from data
# LANGUAGE OverloadedStrings #
| Construct and save nodes and edges.
^ Potential regulatory regions and its affinity scores
| Construct nodes and edges.
^ edge weight and node weight
^ Edge weight and node weight
-------------------------------------------------------------------... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE RecordWildCards #
module Taiji.Core.Network.DeNovo
( saveAssociations
, mkAssociations
, mkNetwork
, readNetwork
, readAssociations
, getTFBS
, outputBindingEdges
, outputCombine... |
d8a85173a2b760ac651172d1b069d4e3ef4858f1f67f043adb849530907982f9 | dryewo/cyrus | ui_test.clj | (ns {{namespace}}.ui-test
(:require [clojure.test :refer :all]
[{{namespace}}.test-utils :as tu]
[mount.lite :as m]
[clj-http.client :as http]
[{{namespace}}.http]))
(use-fixtures
:each (fn [f]
(tu/start-with-env-override '{HTTP_PORT 8080
... | null | https://raw.githubusercontent.com/dryewo/cyrus/880c842e0baa11887854ec3d912c044a2a500449/resources/leiningen/new/cyrus/test/_namespace_/ui_test.clj | clojure | (ns {{namespace}}.ui-test
(:require [clojure.test :refer :all]
[{{namespace}}.test-utils :as tu]
[mount.lite :as m]
[clj-http.client :as http]
[{{namespace}}.http]))
(use-fixtures
:each (fn [f]
(tu/start-with-env-override '{HTTP_PORT 8080
... | |
fa0d5facbff6e0c42f0039942b9dd4fa69ae090d8eb92c85f8dc220bb9a6caa4 | erlio/vmq_server | vmq_queue_hooks_SUITE.erl | -module(vmq_queue_hooks_SUITE).
-export([
%% suite/0,
init_per_suite/1,
end_per_suite/1,
init_per_testcase/2,
end_per_testcase/2,
all/0
]).
-export([queue_hooks_lifecycle_test1/1,
queue_hooks_lifecycle_test2/1,
queue_hooks_lifecycle_test3/... | null | https://raw.githubusercontent.com/erlio/vmq_server/d008c6dcc62fe985d08456caa4024750e1febf38/test/vmq_queue_hooks_SUITE.erl | erlang | suite/0,
===================================================================
common_test callbacks
===================================================================
Actual Tests
publish an offline message
Hooks (as explicit as possible)
Helper
| -module(vmq_queue_hooks_SUITE).
-export([
init_per_suite/1,
end_per_suite/1,
init_per_testcase/2,
end_per_testcase/2,
all/0
]).
-export([queue_hooks_lifecycle_test1/1,
queue_hooks_lifecycle_test2/1,
queue_hooks_lifecycle_test3/1]).
-export([hook_a... |
030ccf8be07e0c7c95bad8b1e5e51dbeee736bbd483ec08a17d430eff0fcfb9c | willemdj/erlsom | erlsom_type2xsd.erl | %% translates an erlang type specification to an xsd.
%% The set of type specifications that can be translated is limited
%% The spec consists of record definitions only.
%% Only integer() and string() can be used as basic types.
%% Lists and unions can be used to structure things (no tuples).
%% All fields will be ... | null | https://raw.githubusercontent.com/willemdj/erlsom/41967fcda4fde9593f0eb9f43cdc08701ef3ba4e/src/erlsom_type2xsd.erl | erlang | translates an erlang type specification to an xsd.
The set of type specifications that can be translated is limited
The spec consists of record definitions only.
Only integer() and string() can be used as basic types.
Lists and unions can be used to structure things (no tuples).
All fields will be optional, excep... |
want in the XSD . It is easy to fix this in the resulting XSD .
a cleaner XSD ) .
NOTE : only the first ( couple of ) elements of the record can be
declared as attributes , since Erlsom will always put the attributes first .
-module(erlsom_type2xsd).
-export([test/0, test/1, type_to_xsd/2, type_to_xsd/3... |
dd7161627b013d35bb14ff650959a4b113d419fae1cfc93a765cb193462783d8 | fossas/fossa-cli | Cargo.hs | module Strategy.Cargo (
discover,
CargoMetadata (..),
CargoProject (..),
NodeDependency (..),
NodeDepKind (..),
PackageId (..),
Resolve (..),
ResolveNode (..),
buildGraph,
getDeps,
mkProject,
findProjects,
) where
import App.Fossa.Analyze.Types (AnalyzeProject (analyzeProject'), analyzeProject)... | null | https://raw.githubusercontent.com/fossas/fossa-cli/187f19afec2133466d1998c89fc7f1c77107c2b0/src/Strategy/Cargo.hs | haskell | for a description of this format.
^^ The above is a bit obscure. It's generating a TomlCodec CargoPackage and
has a Functor instance, so I'd end up with a (Codec CargoPackage CargoToml).
(here)[-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields]
'license'. In that case 'license' can't be t... | module Strategy.Cargo (
discover,
CargoMetadata (..),
CargoProject (..),
NodeDependency (..),
NodeDepKind (..),
PackageId (..),
Resolve (..),
ResolveNode (..),
buildGraph,
getDeps,
mkProject,
findProjects,
) where
import App.Fossa.Analyze.Types (AnalyzeProject (analyzeProject'), analyzeProject)... |
dbb977fb4e5461441080ed3476cbd13d402e0b06b7f1ba734858bfc7ca04d640 | Engil/Goodboy | registers.ml | open Sexplib.Std
type t = Bigstringaf.t
type register = int
type flag = int
type paired_register = [ `Af | `Bc | `De | `Hl ] [@@deriving sexp]
let a = 0
let f = 1
let b = 2
let c = 3
let d = 4
let e = 5
let h = 6
let l = 7
let z = 7
let n = 6
let hc = 5
let ca = 4
let register_of_sexp _ = assert false
let sexp_of_r... | null | https://raw.githubusercontent.com/Engil/Goodboy/2e9abc243b929d8bdfb7c5d4874ddb8a07c55fac/lib/registers.ml | ocaml | open Sexplib.Std
type t = Bigstringaf.t
type register = int
type flag = int
type paired_register = [ `Af | `Bc | `De | `Hl ] [@@deriving sexp]
let a = 0
let f = 1
let b = 2
let c = 3
let d = 4
let e = 5
let h = 6
let l = 7
let z = 7
let n = 6
let hc = 5
let ca = 4
let register_of_sexp _ = assert false
let sexp_of_r... | |
ca37bdb1719803a6ac8ccc0237ad216e569d3ba345f38d18de5d1e4a37730e20 | Ptival/chick | StandardLibraryDiff.hs | {-# LANGUAGE OverloadedStrings #-}
module StandardLibraryDiff
( δBoolToNat,
δListToVec,
δNatToList,
)
where
import qualified Diff.Atom as DA
import qualified Diff.Constructor as DC
import qualified Diff.Inductive as DI
import qualified Diff.List as DL
import qualified Diff.Term as DT
import qualified Diff... | null | https://raw.githubusercontent.com/Ptival/chick/a5ce39a842ff72348f1c9cea303997d5300163e2/backend/lib/StandardLibraryDiff.hs | haskell | # LANGUAGE OverloadedStrings #
do not use `unsafeParseRaw` anywhere else!
for sake of testing, let's permute |
module StandardLibraryDiff
( δBoolToNat,
δListToVec,
δNatToList,
)
where
import qualified Diff.Atom as DA
import qualified Diff.Constructor as DC
import qualified Diff.Inductive as DI
import qualified Diff.List as DL
import qualified Diff.Term as DT
import qualified Diff.Triple as D3
import Parsing (parse... |
ae3b227a107b1364590d1aab5d931f0ca544aa084962f1c5b47c2e1f9775aa9e | akvo/akvo-flow-api | user.clj | (ns org.akvo.flow-api.boundary.user
(:require [clojure.core.cache :as cache]
org.akvo.flow-api.component.cache
org.akvo.flow-api.component.remote-api
[org.akvo.flow-api.datastore.user :as user]
[org.akvo.flow-api.anomaly :as anomaly]))
(defn get-id [{:keys [cache]} ins... | null | https://raw.githubusercontent.com/akvo/akvo-flow-api/a4ac1158fe25d64639add86a075c47f8b01b9b68/api/src/clojure/org/akvo/flow_api/boundary/user.clj | clojure | (ns org.akvo.flow-api.boundary.user
(:require [clojure.core.cache :as cache]
org.akvo.flow-api.component.cache
org.akvo.flow-api.component.remote-api
[org.akvo.flow-api.datastore.user :as user]
[org.akvo.flow-api.anomaly :as anomaly]))
(defn get-id [{:keys [cache]} ins... | |
17237e35a66b962669decd3da5ee581057af6c187978ea90fb3dbde3298faf7a | rems-project/lem | llist.mli | val map : ('a -> 'b) -> 'a list -> 'b list
| null | https://raw.githubusercontent.com/rems-project/lem/a839114e468119d9ac0868d7dc53eae7f3cc3a6c/ocaml-lib/llist.mli | ocaml | val map : ('a -> 'b) -> 'a list -> 'b list
| |
803df03074815ba772da4b121ce416f42bf5c59dd767b945fd38aab708ed79e4 | freizl/hoauth2 | Linkedin.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
| [ LinkedIn Authenticating with OAuth 2.0 Overview]( / en - us / linkedin / shared / authentication / authentication?context = linkedin%2Fcontext )
module Network.OAuth2.Prov... | null | https://raw.githubusercontent.com/freizl/hoauth2/8610da5ec2565e5d70c590fbde8689c6af025b78/hoauth2-providers/src/Network/OAuth2/Provider/Linkedin.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DeriveGeneric #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
| [ LinkedIn Authenticating with OAuth 2.0 Overview]( / en - us / linkedin / shared / authentication / authentication?context = linkedin%2Fcontext )
module Network.OAuth2.Provider.Linkedin where
import Data.Ae... |
65372e3def726f336f3db1c618defdd3a4d7245ce30a960eccd8dc50bf9e3e85 | eslick/cl-registry | diary.lisp | (in-package :registry)
(registry-proclamations)
;; ==============================================================
;; Diary support
;; ==============================================================
(defmodel diary-answer (answer)
((ref-value :accessor reference-value :initarg :reference-value)
(ref-duration :ac... | null | https://raw.githubusercontent.com/eslick/cl-registry/d4015c400dc6abf0eeaf908ed9056aac956eee82/attic/diary.lisp | lisp | ==============================================================
Diary support
============================================================== | (in-package :registry)
(registry-proclamations)
(defmodel diary-answer (answer)
((ref-value :accessor reference-value :initarg :reference-value)
(ref-duration :accessor reference-duration :initarg :reference-duration)))
(defun make-duplicate-answer (question value reference &optional duration)
(declare (igno... |
f78d4a4fcc3109abcea46f39c53b8c224f66edb68f72e865bcc45addcfcd955a | rescript-lang/rescript-compiler | pprintast.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/5da6c88fb9237fbc4d61640187b82627690ccf39/jscomp/ml/pprintast.mli | ocaml | ************************************************************************
OCaml
... | ( University of Pennsylvania )
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type space_formatter = (unit, Format.formatter, unit) format
val expression : Format.formatter -> Parse... |
f1566cb2affecff7da40d87daf57a23e3cd64fcc09527b48cc1b63a921ad4dd1 | willghatch/racket-rash | unix-pipe-misc.rkt | #lang rash
(module+ non-sandboxed-test
{
(require rackunit basedir)
;; I should find out what the real limit is,
;; but this is enough to trip the bad behavior but not take forever.
(define test-dir (writable-runtime-dir
#:program "rash-package-test/unix-pipe-misc"))
(define p+e... | null | https://raw.githubusercontent.com/willghatch/racket-rash/c40c5adfedf632bc1fdbad3e0e2763b134ee3ff5/rash/private/test/unix-pipe-misc.rkt | racket | I should find out what the real limit is,
but this is enough to trip the bad behavior but not take forever. | #lang rash
(module+ non-sandboxed-test
{
(require rackunit basedir)
(define test-dir (writable-runtime-dir
#:program "rash-package-test/unix-pipe-misc"))
(define p+ep-out-str "p+ep stdout")
(define p+ep-err-str "p+ep stderr")
(define (p+ep)
(printf p+ep-out-str)
(flu... |
7e98ecc9c755f02150aae4c51d0e74214e4a74bb214416385ecf55e5002fda0a | NorfairKing/smos | Gen.hs | # OPTIONS_GHC -fno - warn - orphans #
module Smos.Calendar.Import.Event.Gen where
import Data.GenValidity
import Smos.Calendar.Import.Event
import Smos.Calendar.Import.Static.Gen ()
import Smos.Data.Gen ()
instance GenValid Events where
shrinkValid = shrinkValidStructurally
genValid = genValidStructurally
insta... | null | https://raw.githubusercontent.com/NorfairKing/smos/f72b26c2e66ab4f3ec879a1bedc6c0e8eeb18a01/smos-calendar-import/test/Smos/Calendar/Import/Event/Gen.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Smos.Calendar.Import.Event.Gen where
import Data.GenValidity
import Smos.Calendar.Import.Event
import Smos.Calendar.Import.Static.Gen ()
import Smos.Data.Gen ()
instance GenValid Events where
shrinkValid = shrinkValidStructurally
genValid = genValidStructurally
insta... | |
a6d92dffff512764336d2bb1901b2f9c96c36bfed7954e9c4237a1ef40e0cf66 | kqr/gists | logicparser.hs | -- Conforms to
( 0x44 or 0x22 ) and ( 0x32 or ( not 0x39 ) ) = = > 102
module Main where
import Data.Bits
import Text.Parsec
import Text.Parsec.String
import Control.Applicative ((<$>))
import Numeric (readHex)
type Operator = Expression -> Expression -> Expression
data Expression = Literal Int
| N... | null | https://raw.githubusercontent.com/kqr/gists/b0b5ab2a6af0f939a9e24165959bb362281ce897/marshalling/parsing/logicparser.hs | haskell | Conforms to | ( 0x44 or 0x22 ) and ( 0x32 or ( not 0x39 ) ) = = > 102
module Main where
import Data.Bits
import Text.Parsec
import Text.Parsec.String
import Control.Applicative ((<$>))
import Numeric (readHex)
type Operator = Expression -> Expression -> Expression
data Expression = Literal Int
| Not Expression
... |
818cf32a578f9f5119319d8f68d2b081726ace2cd6ab668dd7443421bac04803 | pfdietz/ansi-test | multiple-value-list.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Mon Feb 17 06:38:07 2003
;;;; Contains: Tests of MULTIPLE-VALUE-LIST
(deftest multiple-value-list.1
(multiple-value-list 'a)
(a))
(deftest multiple-value-list.2
(multiple-value-list (values))
nil)
(deftest multiple-value-list.3
(multiple-value-list (v... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/data-and-control-flow/multiple-value-list.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of MULTIPLE-VALUE-LIST
Test that explicit calls to macroexpand in subforms
are done in the correct environment
Test that the argument is evaluated just once
Error tests | Author :
Created : Mon Feb 17 06:38:07 2003
(deftest multiple-value-list.1
(multiple-value-list 'a)
(a))
(deftest multiple-value-list.2
(multiple-value-list (values))
nil)
(deftest multiple-value-list.3
(multiple-value-list (values 'a 'b 'c 'd 'e))
(a b c d e))
(deftest multiple-value-list.... |
640bae9b8bc4dd9dda922b49fbe8ec0d40fdf61e67fbef1ed0c8e30e8ce825c0 | alexeyzab/ballast | Client.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Ballast.Client where
import Ballast.Types
import Data.Aeson (eitherDecode, encode)
import Data.Aeson.Types
import qualified Data.ByteString.Char8 as BS8
import qualif... | null | https://raw.githubusercontent.com/alexeyzab/ballast/d514ebaa11b3101ee103e775e2ee277360a51123/src/Ballast/Client.hs | haskell | # LANGUAGE OverloadedStrings #
| Conversion of a key value pair to a query parameterized string
| Generate a real-time shipping quote
/
| Get stock information for your products.
/
| Get an itemized list of receivings.
/#panel-shipwire0
| Create a new receiving
/#panel-shipwire1
| Get information about this r... | # LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
module Ballast.Client where
import Ballast.Types
import Data.Aeson (eitherDecode, encode)
import Data.Aeson.Types
import qualified Data.ByteString.Char8 as BS8
import qualified Data.ByteString.Lazy.Char8 as B... |
a9ac619bbfaf54e81b9f8d82907484f2abc55659c96358fc1fb2ba23119a11fc | aryx/xix | genlex.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, proje... | null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/lib_core/unused/genlex.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
$ I d : genlex.mli , v 1.3 1997/10/24 15:54:07 xleroy Exp $
This module implements a simple ` ` standard '... |
f982bf36d8f0fe3b8147cef9f441524b16bd448ce439b9a1acac814275eb6894 | dyoo/whalesong | shared-body.rkt |
;; Used by ../shared.rkt, and also collects/lang/private/teach.rkt
;; Besides the usual things, this code expects `undefined' and
;; `the-cons', to be bound, it expects `struct-declaration-info?'
from the " struct.rkt " library of the " syntax " collection , and it
;; expects `code-insp' for-syntax.
(syntax-case st... | null | https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/lang/private/shared-body.rkt | racket | Used by ../shared.rkt, and also collects/lang/private/teach.rkt
Besides the usual things, this code expects `undefined' and
`the-cons', to be bound, it expects `struct-declaration-info?'
expects `code-insp' for-syntax.
Remove traced app if present
Remove #%app if present...
Almost module-or-top-identifier=?,
bu... |
from the " struct.rkt " library of the " syntax " collection , and it
(syntax-case stx ()
[(_ ([name expr] ...) body1 body ...)
(let ([names (syntax->list (syntax (name ...)))]
[exprs (syntax->list (syntax (expr ...)))])
(for-each (lambda (name)
(unless (identifier? name)
(raise-syntax-error
... |
f650ad6f68c86c78f151b0cdf04b0aad0a49d82b3dd83d05d097572899c92fe5 | exoscale/clojure-kubernetes-client | v1beta1_custom_resource_column_definition.clj | (ns clojure-kubernetes-client.specs.v1beta1-custom-resource-column-definition
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1beta1-custom-resource-column-definition-data v1beta1-custom-resource-column-definition)
(def v1beta1-custo... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1beta1_custom_resource_column_definition.clj | clojure | (ns clojure-kubernetes-client.specs.v1beta1-custom-resource-column-definition
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1beta1-custom-resource-column-definition-data v1beta1-custom-resource-column-definition)
(def v1beta1-custo... | |
3cceba39f80b2a80472d4679cff58bdabb88619c13c751f38823878f1bb2aad3 | remixlabs/wasicaml | t040_exc2.ml | let g() =
raise Not_found
let f() =
try
g()
with Not_found -> "hello"
let () =
let x = f() in
Testprint.string "x" x
| null | https://raw.githubusercontent.com/remixlabs/wasicaml/74ff72535aa8e49ab94a05d9c32c059ce264c1bb/test/t040_exc2.ml | ocaml | let g() =
raise Not_found
let f() =
try
g()
with Not_found -> "hello"
let () =
let x = f() in
Testprint.string "x" x
| |
43fcd4cd35b6677e361f48f83fa59028a303c79cb9b8b388e762bd3daac837c8 | lachenmayer/arrowsmith | Module.hs | module Parse.Module (header, headerAndImports, getModuleName) where
import Control.Applicative ((<$>), (<*>))
import Text.Parsec hiding (newline, spaces)
import Parse.Helpers
import qualified AST.Module as Module
import qualified AST.Variable as Var
getModuleName :: String -> Maybe String
getModuleName source =
c... | null | https://raw.githubusercontent.com/lachenmayer/arrowsmith/34b6bdeddddb2d8b9c6f41002e87ec65ce8a701a/elm-compiler/src/Parse/Module.hs | haskell | module Parse.Module (header, headerAndImports, getModuleName) where
import Control.Applicative ((<$>), (<*>))
import Text.Parsec hiding (newline, spaces)
import Parse.Helpers
import qualified AST.Module as Module
import qualified AST.Variable as Var
getModuleName :: String -> Maybe String
getModuleName source =
c... | |
87e9e6a0c88e5b5de23da24658d990c1df6c00757d8448e37611d637afa7ea46 | mindpool/cs-termite | data.scm | ;;; Various mutable data structures implemented behind processes
;; (it would be "better" if those were implemented functionally)
(define (data-make-process-name type)
(string->symbol
(string-append
(symbol->string
(thread-name
(current-thread)))
"-"
(symbol->string type... | null | https://raw.githubusercontent.com/mindpool/cs-termite/23df38627bfd4bd2257fb8d9f6c1812d2cd6bc04/data.scm | scheme | Various mutable data structures implemented behind processes
(it would be "better" if those were implemented functionally)
----------------------------------------------------------------------------
Cells
or: (define-termite-type cell content)
---------------------------------------------------------------------... |
(define (data-make-process-name type)
(string->symbol
(string-append
(symbol->string
(thread-name
(current-thread)))
"-"
(symbol->string type))))
(define (make-cell #!rest content
#!key (name (data-make-process-name 'cell)))
(spawn
(lambda ()
... |
86b96b019231bd6dbfb736f05a89f7c92bbd17ee5b952dc00a4b6f71142e73e4 | janestreet/universe | re2_stable.mli | (** [Re2_stable] adds an incomplete but stable serialization of [Re2].
Feel free to extend it as necessary. *)
open! Core
(** This serialization only transmits the pattern, not the options. *)
module V1 : Stable_without_comparator with type t = Re2.t
| null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/re2_stable/src/re2_stable.mli | ocaml | * [Re2_stable] adds an incomplete but stable serialization of [Re2].
Feel free to extend it as necessary.
* This serialization only transmits the pattern, not the options. |
open! Core
module V1 : Stable_without_comparator with type t = Re2.t
|
a8221f61d2961a59224f87ee44bbfaf507ce8696431837b3cbdfe30f11f51e5a | Workiva/eva | chunk_callback_outstream_test.clj | Copyright 2015 - 2019 Workiva Inc.
;;
;; Licensed under the Eclipse Public License 1.0 (the "License");
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -1.0.php
;;
;; Unless required by applicable law or agreed to in writing, software
dist... | null | https://raw.githubusercontent.com/Workiva/eva/b7b8a6a5215cccb507a92aa67e0168dc777ffeac/core/test/eva/v2/storage/chunk_callback_outstream_test.clj | clojure |
Licensed under the Eclipse Public License 1.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-1.0.php
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre... | Copyright 2015 - 2019 Workiva Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns eva.v2.storage.chunk-callback-outstream-test
(:require [clojure.test :refer :all])
(:import (eva.storage ChunkCallbackOutputStream)))
(deftest test:ChunkCallbackOutputStream
(let [chunks (atom [])
... |
1410472ebea8975e696277a0e1d70fd198d54f0b70154c3ac660948c5a97b15b | irastypain/sicp-on-language-racket | exercise_2_44.rkt | #lang racket
Процедура разделяет painter надвое , добавляя сверху ,
; и выполняет рекурсивный вызов
(define (up-split painter n)
(if (= n 0)
painter
(let ((smaller (up-split painter (- n 1))))
(below painter (beside smaller smaller))))) | null | https://raw.githubusercontent.com/irastypain/sicp-on-language-racket/0052f91d3c2432a00e7e15310f416cb77eeb4c9c/src/chapter02/exercise_2_44.rkt | racket | и выполняет рекурсивный вызов | #lang racket
Процедура разделяет painter надвое , добавляя сверху ,
(define (up-split painter n)
(if (= n 0)
painter
(let ((smaller (up-split painter (- n 1))))
(below painter (beside smaller smaller))))) |
21708aee22e3b1dfb66c8a4b53f1b9031c1bdde4a28e63d07ee36be997e5191b | AshleyYakeley/Truth | Language.hs | {-# OPTIONS -fno-warn-orphans #-}
module Test.Language
( testLanguage
) where
import Data.Shim
import Pinafore
import Pinafore.Documentation
import Pinafore.Test
import Prelude (read)
import Shapes
import Shapes.Numeric
import Shapes.Test
testOp :: Name -> TestTree
testOp n =
testTree (show $ unpack n) $... | null | https://raw.githubusercontent.com/AshleyYakeley/Truth/f567d19253bb471cbd8c39095fb414229b27706a/Pinafore/pinafore-language/test/Test/Language.hs | haskell | # OPTIONS -fno-warn-orphans # |
module Test.Language
( testLanguage
) where
import Data.Shim
import Pinafore
import Pinafore.Documentation
import Pinafore.Test
import Prelude (read)
import Shapes
import Shapes.Numeric
import Shapes.Test
testOp :: Name -> TestTree
testOp n =
testTree (show $ unpack n) $ do
case unpack n of
... |
4c2d42361cabd99f99fe4e0bef3ed01cfeaa776575a078497af21edc765720fe | AccelerateHS/accelerate-io | IArray.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
-- |
-- Module : Data.Array.Accelerate.IO.Data.Array.IArray
Copyright : [ 2016 .. 2020 ] The Accelerate Team
-- License : BSD3
--
Maintainer : < >
-- Stability ... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-io/9d72bfb041ee2c9ffdb844b479f082e8993767f8/accelerate-io-array/src/Data/Array/Accelerate/IO/Data/Array/IArray.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module : Data.Array.Accelerate.IO.Data.Array.IArray
License : BSD3
Stability : experimental
Accelerate 'Array' in the following way:
> DIM0 ~ ()
> DIM1 ~ Int
> DIM2 ~ (Int,Int)
> DIM3 ~ (Int,Int,Int)
...and so forth.
See 'fromIArray' for a discussion on ... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
Copyright : [ 2016 .. 2020 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extensions )
Convert between immutable ' IArray 's and Accelerate ' Array 's .
module Data.Array.Acc... |
4babae218892f52fee176913be36c8936b33756f05f4f455960b94fb1bbe2a7d | sibylfs/sibylfs_src | dump.ml | (****************************************************************************)
Copyright ( c ) 2013 , 2014 , 2015 , , , ,
( as part of the SibylFS project )
(* *)
(* Permission to use, copy, modify, and/or d... | null | https://raw.githubusercontent.com/sibylfs/sibylfs_src/30675bc3b91e73f7133d0c30f18857bb1f4df8fa/fs_test/lib/dump.ml | ocaml | **************************************************************************
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright no... | Copyright ( c ) 2013 , 2014 , 2015 , , , ,
( as part of the SibylFS project )
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL
PROFITS , WHETHER IN AN ACTION OF CONTRACT , NEGLIGENCE OR OTHER
TORTIOUS ACTION , ARISING OUT OF OR IN CONNE... |
1e3de522e449a9d8b3b0ffae763fdc4809ac499ab44ebc0eae605e4d3d51cef4 | finkel-lang/finkel | Help.hs | ;;; -*- mode: finkel -*-
;;; Help utility for Finkel tool.
(:require Finkel.Core)
(defmodule Finkel.Tool.Command.Help
(export
;; Help command
helpMain
show-usage)
(import
;; base
(Control.Monad.IO.Class [(MonadIO ..)])
(Data.Foldable [maximumBy])
(Data.Function [on])
(System.Environment [... | null | https://raw.githubusercontent.com/finkel-lang/finkel/74ce4bb779805ad2b141098e29c633523318fa3e/finkel-tool/src/Finkel/Tool/Command/Help.hs | haskell | ;;; -*- mode: finkel -*-
;;; Help utility for Finkel tool.
(:require Finkel.Core)
(defmodule Finkel.Tool.Command.Help
(export
;; Help command
helpMain
show-usage)
(import
;; base
(Control.Monad.IO.Class [(MonadIO ..)])
(Data.Foldable [maximumBy])
(Data.Function [on])
(System.Environment [... | |
520b8741ab543d86de1719c47c426de4486c103ea1d174fdc1f568ea92f3b608 | stevenvar/OMicroB | gc.ml | external run : unit -> unit = "caml_gc_run"
(** Manually run the garbage collector *)
external collections : unit -> int = "caml_gc_collections"
(** Return the number of collection run since the program starts *)
external live_words : unit -> int = "caml_gc_live_words"
* Return the current number of word used in ... | null | https://raw.githubusercontent.com/stevenvar/OMicroB/e4324d0736ac677b3086741dfdefb0e46775642b/src/stdlib/gc.ml | ocaml | * Manually run the garbage collector
* Return the number of collection run since the program starts
* Return the number of words currently used in the stack.
* Return the number of words still available in the stack. | external run : unit -> unit = "caml_gc_run"
external collections : unit -> int = "caml_gc_collections"
external live_words : unit -> int = "caml_gc_live_words"
* Return the current number of word used in the heap .
Should be called after Gc.run to obtain the current number
of words that are reachable ... |
357909f9606a2a56752058acfd715bf593263720934b21e66401fa772c1b9caa | kana-sama/sicp | 2.19 - coins with list.scm | (define us-coins (list 50 25 10 5 1))
(define uk-coins (list 100 50 20 10 5 2 1 0.5))
(define (count-coins amount coins)
(cond ((zero? amount) 1)
((negative? amount) 0)
((null? coins) 0)
(else (+ (count-coins amount (cdr coins))
(count-coins (- amount (car coins)) coins)))))
... | null | https://raw.githubusercontent.com/kana-sama/sicp/fc637d4b057cfcae1bae3d72ebc08e1af52e619d/2/2.19%20-%20coins%20with%20list.scm | scheme | (define us-coins (list 50 25 10 5 1))
(define uk-coins (list 100 50 20 10 5 2 1 0.5))
(define (count-coins amount coins)
(cond ((zero? amount) 1)
((negative? amount) 0)
((null? coins) 0)
(else (+ (count-coins amount (cdr coins))
(count-coins (- amount (car coins)) coins)))))
... | |
b28a8aa357381e6bba7ae432daff3db955c1046a90c25e3657ce92ed547d8246 | lucasdicioccio/deptrack-project | Dot.hs | | Module providing helpers to get a Dot representation of tracked
dependencies during a DepTrack computation .
--
This module currently uses ' Text . Dot ' from ' dotgen ' as a Dot generator , this
-- choice may change in the future.
module DepTrack.Dot (DotDescription(..), dotifyGraphWith, dotify) where
import ... | null | https://raw.githubusercontent.com/lucasdicioccio/deptrack-project/cd3d59a796815af8ae8db32c47b1e1cdc209ac71/deptrack-dot/src/DepTrack/Dot.hs | haskell |
choice may change in the future.
^ The graph data to represent.
^ Function to identify every node in the graph uniquely. If this function
^ The computation to graph. | | Module providing helpers to get a Dot representation of tracked
dependencies during a DepTrack computation .
This module currently uses ' Text . Dot ' from ' dotgen ' as a Dot generator , this
module DepTrack.Dot (DotDescription(..), dotifyGraphWith, dotify) where
import DepTrack (DepTrackT, GraphData, buildGr... |
fe0e3bf60732618af36ff0aeb0182aff5fb45439fcacd9c1bae8d02326c71530 | erlangonrails/devdb | transaction_SUITE.erl | Copyright 2008 , 2010 fuer Informationstechnik Berlin
%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to i... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/test/transaction_SUITE.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 go... | Copyright 2008 , 2010 fuer Informationstechnik Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Author : < >
Created : 14 Mar 2008 by < >
-module(transaction_SUITE).
-author('').
-vsn('$Id: tr... |
60494a564f342d37f929871dca7d36a59e4d1abaae348ef14df7f06eab6d0f97 | epm/eper | prfTrc.erl | -*- erlang - indent - level : 2 -*-
%%%-------------------------------------------------------------------
%%% File : prfTrc.erl
Author : Mats < locmacr@mwlx084 >
%%% Description :
%%%
Created : 18 Jan 2007 by Mats < locmacr@mwlx084 >
%%%-------------------------------------------------------------------
... | null | https://raw.githubusercontent.com/epm/eper/c152d6dfea58d5ea7bdf99fc9217d8444ac6b327/src/prfTrc.erl | erlang | -------------------------------------------------------------------
File : prfTrc.erl
Description :
-------------------------------------------------------------------
internal
states
runs in the prfTarg process
trace control process
LD = idle | {host_pid,timer,consumer,conf}
Conf = {time,flags,rtps,proc... | -*- erlang - indent - level : 2 -*-
Author : Mats < locmacr@mwlx084 >
Created : 18 Jan 2007 by Mats < locmacr@mwlx084 >
-module(prfTrc).
-export([collect/1,config/2]).
-export([active/1,idle/0,wait_for_local/1]).
-import(lists,[reverse/1,foreach/2,map/2]).
-import(dict,[fetch/2
, store/3
... |
c96e1811e37e8c5cd93b4783888b08ede056ca656c288f9c6e5a60f17ca75e64 | janestreet/universe | of_string_to_string.ml | open! Core_kernel
open! Import
module Ml_z_of_substring_base = struct
let%expect_test "print of_base (format x)" =
Static.quickcheck
~f:(fun x ->
[ 2, "b"; 8, "o"; 10, "d"; 16, "x" ]
|> List.map ~f:(fun (i, f) ->
let string = Z.format f x in
let string_dropped n =
... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/zarith_stubs_js/test/of_string_to_string.ml | ocaml | open! Core_kernel
open! Import
module Ml_z_of_substring_base = struct
let%expect_test "print of_base (format x)" =
Static.quickcheck
~f:(fun x ->
[ 2, "b"; 8, "o"; 10, "d"; 16, "x" ]
|> List.map ~f:(fun (i, f) ->
let string = Z.format f x in
let string_dropped n =
... | |
b8a69f80716153e47d968d340edf33d3a619ef1693a52e755ecd7020a8e35ad3 | GaloisInc/msf-haskell | ExampleExploit.hs | # LANGUAGE DataKinds #
module Main where
--import RPC.Session
import Types.DB
import RPC.Module ( ModuleType ( .. ) , ModuleName ( .. ) , Payload ( .. ) , ExecResult ( .. ) )
import MSF
import MSF.Auth
import MSF.Console
import MSF.Commands
import MSF.Session as MSession
import MSF.Event(waitJob)
import MSF.Module
i... | null | https://raw.githubusercontent.com/GaloisInc/msf-haskell/76cee10771f9e9d10aa3301198e09f08bde907be/examples/ExampleExploit.hs | haskell | import RPC.Session
------------------------------------------------------------
Test values - configure according to your environment.
------------------------------------------------------------
|The Metasploit server
|A host that's OK to attack. For instance, download the
exploit below.
address so that it won'... | # LANGUAGE DataKinds #
module Main where
import Types.DB
import RPC.Module ( ModuleType ( .. ) , ModuleName ( .. ) , Payload ( .. ) , ExecResult ( .. ) )
import MSF
import MSF.Auth
import MSF.Console
import MSF.Commands
import MSF.Session as MSession
import MSF.Event(waitJob)
import MSF.Module
import MSF.Job
import... |
096ac97dd6803a268b47fa18005309c5a399a3a8fee861777dbb08c767dfe8c0 | mietek/idris-bash | Utils.hs | module IRTS.Codegen.Utils where
import Data.IntMap.Strict (IntMap)
import qualified Data.IntMap.Strict as M
import Data.List (nub, sort)
import IRTS.Lang (LVar(..))
import IRTS.Simplified (SAlt(..), SDecl(..), SExp(..))
import Idris.Core.TT (Name)
type TagMap = IntMap Int
findTags :: [(Name, SDecl)] -> TagMap
findT... | null | https://raw.githubusercontent.com/mietek/idris-bash/2f803ff124433b059eea8286f3ac2a09c33e94fd/src/IRTS/Codegen/Utils.hs | haskell | module IRTS.Codegen.Utils where
import Data.IntMap.Strict (IntMap)
import qualified Data.IntMap.Strict as M
import Data.List (nub, sort)
import IRTS.Lang (LVar(..))
import IRTS.Simplified (SAlt(..), SDecl(..), SExp(..))
import Idris.Core.TT (Name)
type TagMap = IntMap Int
findTags :: [(Name, SDecl)] -> TagMap
findT... | |
7eb0f552dbe452a2a261cc6495b415c927ac903ba3636492b7c35f75ca1b33ee | spawnfest/eep49ers | wxGridCellNumberEditor.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2009 - 2020 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxGridCellNumberEditor.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 2009 - 2020 . 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(wxGridCellNumberEditor).
-include("wxe.hrl").
-export([destroy/1,getValue/1,new/0,new/1,setParameters/2]).
... |
b1ce2d52a54b52983c161a54d8014aec2e160cbeaff7bd89cf34197bf7e3d394 | basho/systest | cluster.erl | %% -------------------------------------------------------------------
%%
%% cluster.erl - cluster helpers
%%
Copyright ( c ) 2007 - 2011 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in... | null | https://raw.githubusercontent.com/basho/systest/f14e1bffb99f79112c67caa5280684af5b0be762/cluster.erl | erlang | -------------------------------------------------------------------
cluster.erl - cluster helpers
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
speci... | Copyright ( c ) 2007 - 2011 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-... |
8a894c6bd2ff08659611382b6d8ce52b74621768b090fc096751abc2fef4dba1 | ondrap/dynamodb-simple | Types.hs | {-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
#endif
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
{-... | null | https://raw.githubusercontent.com/ondrap/dynamodb-simple/fb7e3fe37d7e534161274cfd812cd11a82cc384b/src/Database/DynamoDB/Types.hs | haskell | # LANGUAGE CPP #
# OPTIONS_GHC -Wno-redundant-constraints #
# LANGUAGE DataKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleContexts #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE ViewPatterns ... | #if __GLASGOW_HASKELL__ >= 800
#endif
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PatternSynonyms #
# LANGUAGE TupleSections #
# LANGUAGE UndecidableInstances #
module Database.DynamoD... |
646540a39d4b63cb8d86622af8cc05eba094aee3445d556261a96b827a3195b3 | ocaml/oasis | TestFileTemplate.ml | (******************************************************************************)
OASIS : architecture for building OCaml libraries and applications
(* *)
Copyright ( C ) 2011 - 2016 ,
Copyrig... | null | https://raw.githubusercontent.com/ocaml/oasis/3d1a9421db92a0882ebc58c5df219b18c1e5681d/test/test-main/TestFileTemplate.ml | ocaml | ****************************************************************************
This library is free software; you can redistribute it and/or modify it
under the t... | OASIS : architecture for building OCaml libraries and applications
Copyright ( C ) 2011 - 2016 ,
Copyright ( C ) 2008 - 2011 , OCamlCore SARL
the Free Software Foundation ; either version 2.1 of the License , or ( at
You s... |
e33a32ab9b8d4336f744ae8a6c07a2bbeeb66576f0784ebbfc06e622872d3d2e | CoNarrative/exemplar | core.clj | (ns exemplar.core
(:require [exemplar.util :as util]
[local-file]
[clojure.pprint]
[clojure.edn :as edn]
[clojure.repl :as repl]))
(def state (atom {:path nil
:debug? false
:entries {}}))
(defn ns->abs-path [ns]
(-> (th... | null | https://raw.githubusercontent.com/CoNarrative/exemplar/a9e76cdcdedfb441621f2b7c4f8b126f6ec0977a/src/exemplar/core.clj | clojure |
set true - unset recording and return orig var
set true - unset recording and return orig var
ensure a slash here
join package names with slash
replace - with _ for filename to write | (ns exemplar.core
(:require [exemplar.util :as util]
[local-file]
[clojure.pprint]
[clojure.edn :as edn]
[clojure.repl :as repl]))
(def state (atom {:path nil
:debug? false
:entries {}}))
(defn ns->abs-path [ns]
(-> (th... |
e065f6333afe6d8f0efd074ba889b44dd903a474791b490c0a98abf2ef1a563f | returntocorp/semgrep | Core_CLI.ml | (*
* The author disclaims copyright to this source code. In place of
* a legal notice, here is a blessing:
*
* May you do good and not evil.
* May you find forgiveness for yourself and forgive others.
* May you share freely, never taking more than you give.
*)
open Common
open Runner_config
module Flag... | null | https://raw.githubusercontent.com/returntocorp/semgrep/db9b44c8a606ffa84f92b45b79d96ed821c420ee/src/core_cli/Core_CLI.ml | ocaml |
* The author disclaims copyright to this source code. In place of
* a legal notice, here is a blessing:
*
* May you do good and not evil.
* May you find forgiveness for yourself and forgive others.
* May you share freely, never taking more than you give.
**********************************************... | open Common
open Runner_config
module Flag = Flag_semgrep
module E = Semgrep_error_code
module J = JSON
let logger = Logging.get_logger [ __MODULE__ ]
let env_debug = "SEMGREP_CORE_DEBUG"
let env_profile = "SEMGREP_CORE_PROFILE"
let env_extra = "SEMGREP_CORE_EXTRA"
let log_config_file = ref Runner_config.default.l... |
5a50945bc2fe73707d3848cb8ece318354b12065f1184cc32f4f54c2e19a0da9 | DeathKing/Hit-DataStructure-On-Scheme | open-address.scm | (load-option 'format)
(define *default-hash-size* 997)
(define *default-hash-fill* '())
(define *default-hash-delete* 'delete)
(define (make-hash #!optional size fill)
(let ((s (if (eq? #!default size) *default-hash-size* size))
(f (if (eq? #!default fill) *default-hash-fill* fill)))
(make-vector s f)))
... | null | https://raw.githubusercontent.com/DeathKing/Hit-DataStructure-On-Scheme/11677e3c6053d6c5b37cf0509885f74ab5c2bab9/application4/open-address.scm | scheme | Test sq-last3 in every load factor | (load-option 'format)
(define *default-hash-size* 997)
(define *default-hash-fill* '())
(define *default-hash-delete* 'delete)
(define (make-hash #!optional size fill)
(let ((s (if (eq? #!default size) *default-hash-size* size))
(f (if (eq? #!default fill) *default-hash-fill* fill)))
(make-vector s f)))
... |
41f4d6c30de8617210ff047d24b88e856323dc5153be261c03b31599149cf475 | SonarQubeCommunity/sonar-erlang | funargs.erl | -module(statements).
sayHello(A) ->
Code.
sayHello(A, B, C, D, E, F, G) ->
Code;
sayHello(A, B, C, D, E, F, []) ->
Code.
hello(A, B, C, D, E, F) ->
Code.
bello() ->
Code.
| null | https://raw.githubusercontent.com/SonarQubeCommunity/sonar-erlang/279eb7ccd84787c1c0cfd34b9a07981eb20183e3/erlang-squid/src/test/resources/metrics/funargs.erl | erlang | -module(statements).
sayHello(A) ->
Code.
sayHello(A, B, C, D, E, F, G) ->
Code;
sayHello(A, B, C, D, E, F, []) ->
Code.
hello(A, B, C, D, E, F) ->
Code.
bello() ->
Code.
| |
1a735cfc8ffe26a0784bcf2715f646f41084ddf28d195066932098632880fd7f | heraldry/heraldicon | share.cljs | (ns heraldicon.frontend.entity.action.share
(:require
["copy-to-clipboard" :as copy-to-clipboard]
[heraldicon.entity.arms :as entity.arms]
[heraldicon.entity.attribution :as entity.attribution]
[heraldicon.frontend.entity.core :as entity]
[heraldicon.frontend.entity.form :as form]
[heraldicon.fronte... | null | https://raw.githubusercontent.com/heraldry/heraldicon/7bf4dd4149e1f69c9e4f9a0b6b826f73f532a01d/src/heraldicon/frontend/entity/action/share.cljs | clojure | (ns heraldicon.frontend.entity.action.share
(:require
["copy-to-clipboard" :as copy-to-clipboard]
[heraldicon.entity.arms :as entity.arms]
[heraldicon.entity.attribution :as entity.attribution]
[heraldicon.frontend.entity.core :as entity]
[heraldicon.frontend.entity.form :as form]
[heraldicon.fronte... | |
b7a928d2a27abf384b4d4e991d249b0471428276cf43c207b3398065b58fffa0 | tkovalyuk/functional-program | ex47-52 for lab1+lab2.rkt | = = = = = = = = example 47==================
;Приклад1 до Лаб 1 - рекурсія
;Ввести з клавіатури два натуральних числа n та m.
Обчислити кількість комбінацій з n по m.
Кількість комбінацій визначається рекурентним співвідношенням :
рекурсії .
;
;================================================
(define (enter-num)
... | null | https://raw.githubusercontent.com/tkovalyuk/functional-program/37ffa67d813a6d410949557e28440600fb3784f3/code_example/ex47-52%20for%20lab1%2Blab2.rkt | racket | Приклад1 до Лаб 1 - рекурсія
Ввести з клавіатури два натуральних числа n та m.
================================================
----------------глибинa рекурсії
---- головна програма
приклад2 до Лаб 1
----- else - making the stuff
----- call main function
(quotient n m) - ціла частина від ділення n на m
call proc... | = = = = = = = = example 47==================
Обчислити кількість комбінацій з n по m.
Кількість комбінацій визначається рекурентним співвідношенням :
рекурсії .
(define (enter-num)
(display "Please, enter a number - first number>second number:")
читання з клавіатури
(if (integer? num)
num
" захист... |
1422794ca554bb04115953e0ef306955c3ee32f8e4c1395a7c4c014aa33a0228 | BinaryAnalysisPlatform/bap | stub_resolver_tests.ml | *
In order to test stub resolver we generate a dummy programs like
in the example below :
0000000b : program
00000008 : sub a ( )
00000007 :
0000000a : sub b ( )
00000009 :
...
and provide a knowledge about each symbol :
if it 's a stub and if it has aliases .
... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/cbdf732d46c8e38df79d9942fc49bcb97915c657/lib_test/stub_resolver/stub_resolver_tests.ml | ocaml | *
In order to test stub resolver we generate a dummy programs like
in the example below :
0000000b : program
00000008 : sub a ( )
00000007 :
0000000a : sub b ( )
00000009 :
...
and provide a knowledge about each symbol :
if it 's a stub and if it has aliases .
... | |
9ea371a2bc8f8e798f23366d3c1f8b58e19f4519ddde05e30e09138949234e3d | KMahoney/kuljet | PathPattern.hs | module Kuljet.PathPattern where
import qualified Data.Map as M
import qualified Data.Maybe as Maybe
import qualified Data.Text as T
import Kuljet.Symbol
data Path =
Path { pathSegments :: [PathSegment] }
deriving (Show)
data PathSegment
= PathMatch T.Text
| PathVar Symbol
deriving (Show)
type PathVars =... | null | https://raw.githubusercontent.com/KMahoney/kuljet/01e32aefd9e59a914c87bde52d5d6660bdea283d/kuljet/src/Kuljet/PathPattern.hs | haskell | module Kuljet.PathPattern where
import qualified Data.Map as M
import qualified Data.Maybe as Maybe
import qualified Data.Text as T
import Kuljet.Symbol
data Path =
Path { pathSegments :: [PathSegment] }
deriving (Show)
data PathSegment
= PathMatch T.Text
| PathVar Symbol
deriving (Show)
type PathVars =... | |
30492ca2f070fb5d922cf0baa4247557e7f2da0fcfd5417607fb5ec8de7a5da5 | padsproj/opads | ppx_pads_lib.ml | open Asttypes
open Parsetree
open Pads_types
open Ast_helper
open Utility
(* Helper functions *)
let rec check_uniticity (past : pads_node ast) : bool =
let (e,loc) = get_NaL past in
match e with
| Pint
| Pfloat
| Pstring _
| Pconst (PFRE _)
| Ppred _
| Plist _
| Precord _
| Pdatatype _ -> fa... | null | https://raw.githubusercontent.com/padsproj/opads/bb9a380e73ea68954b30acf785294f95004ffcfb/ppx/ppx_pads_lib.ml | ocaml | Helper functions
Main functions
Both are unit type
Only p1 is unit type
Only p2 is unit type
Neither are unit type, so we don't wanna throw away either
Both are unit type
Only p1 is unit type
Only p2 is unit type
Neither are unit type, so we don't wanna throw away either
Both are unit type
Only p... | open Asttypes
open Parsetree
open Pads_types
open Ast_helper
open Utility
let rec check_uniticity (past : pads_node ast) : bool =
let (e,loc) = get_NaL past in
match e with
| Pint
| Pfloat
| Pstring _
| Pconst (PFRE _)
| Ppred _
| Plist _
| Precord _
| Pdatatype _ -> false
| Pconst _ -> tru... |
136479785b38f5a3c4b681fab19a1d15a8ad5b189630a8c3a4f7d4a65905c0c2 | lisp-mirror/cl-tar | extract.lisp | (in-package #:tar-extract-test)
(para:define-test extract-v7
(with-temp-dir ()
(tar:with-open-archive (a (asdf:system-relative-pathname
:tar "test/v7.tar"))
(tar-extract:extract-archive a :symbolic-links #+windows :dereference #-windows t
... | null | https://raw.githubusercontent.com/lisp-mirror/cl-tar/b25b03cd47b4b4b308546e346b2c9ec2718f358f/test/extract/extract.lisp | lisp | (in-package #:tar-extract-test)
(para:define-test extract-v7
(with-temp-dir ()
(tar:with-open-archive (a (asdf:system-relative-pathname
:tar "test/v7.tar"))
(tar-extract:extract-archive a :symbolic-links #+windows :dereference #-windows t
... | |
dfd7af4b805fcf84a0879986740374033ff80a9f7dd2ab9e4caadc305ed8af3c | haskell/win32 | HardLink.hs | # LANGUAGE CPP #
|
Module : System . Win32.HardLink
Copyright : 2013 shelarcy
License : BSD - style
Maintainer :
Stability : Provisional
Portability : Non - portable ( Win32 API )
Handling hard link using Win32 API . [ NTFS only ]
N... | null | https://raw.githubusercontent.com/haskell/win32/931497f7052f63cb5cfd4494a94e572c5c570642/System/Win32/HardLink.hs | haskell | | NOTE: createHardLink is /flipped arguments/ to provide compatibility for Unix.
If you want to create hard link by Windows way, use 'createHardLink'' instead.
^ Target file path
^ Hard link name
^ Hard link name
^ Target file path
We plan to check file system type internally .
We are thinking about ... | # LANGUAGE CPP #
|
Module : System . Win32.HardLink
Copyright : 2013 shelarcy
License : BSD - style
Maintainer :
Stability : Provisional
Portability : Non - portable ( Win32 API )
Handling hard link using Win32 API . [ NTFS only ]
N... |
144a2451effcd30eb1f2a8bee1754d0bfa0cfaa80d13561f56a37a7de265c4b4 | eslick/cl-stdutils | arrays.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
;;;; Name: arrays.lisp
;;;; Purpose: Random array utilities
Programmer :
Date Started : May 2005
;;;;
;;;; **********... | null | https://raw.githubusercontent.com/eslick/cl-stdutils/4a4e5a4036b815318282da5dee2a22825369137b/src/arrays.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
*************************************************************************
FILE IDENTIFICATION
Name: arrays.lisp
Purpose: Random array utilities
************************************************************************* | Programmer :
Date Started : May 2005
(in-package :stdutils)
(defun-exported fast-array-copy (a1 a2 start count)
"Unsafe array copy"
(declare #-(or mcl sbcl) (type (vector fixnum) a1 a2)
#-(or mcl sbcl) (type fixnum start count)
(optimize speed (safety 0)))
(loop for pos fixnum from start to... |
df4cf3be578f2b550bd47dac830afd7a4dcfc9ee371d36e99c985f07a12ccf76 | tarides/ocaml-platform-installer | installed_repo.mli | * Register a { ! Repo } into Opam .
open Bos
val update : Opam.GlobalOpts.t -> Repo.t -> (unit, 'e) OS.result
(** Notify Opam that the repository has been updated. *)
val with_repo_enabled :
Opam.GlobalOpts.t -> Repo.t -> (unit -> (('a, 'e) OS.result as 'r)) -> 'r
(** Temporarily enable a repository in the selecte... | null | https://raw.githubusercontent.com/tarides/ocaml-platform-installer/d24fa0590888673cc3b0eb828a3be484c0f8a8af/src/lib/installed_repo.mli | ocaml | * Notify Opam that the repository has been updated.
* Temporarily enable a repository in the selected switch.
* Enable a repository in the selected switch. | * Register a { ! Repo } into Opam .
open Bos
val update : Opam.GlobalOpts.t -> Repo.t -> (unit, 'e) OS.result
val with_repo_enabled :
Opam.GlobalOpts.t -> Repo.t -> (unit -> (('a, 'e) OS.result as 'r)) -> 'r
val enable_repo :
Opam.GlobalOpts.t -> Repo.t -> (unit, [> `Msg of string ]) result
|
aaf30ed430d88566a0846f06061d0406c5500f8dc6dc10e1d4ecfcd05447e6ef | spl/ivy | doctanalysis.ml |
*
* Copyright ( c ) 2004 ,
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions of source code must reta... | null | https://raw.githubusercontent.com/spl/ivy/b1b516484fba637eb24e83d27555d273495e622b/src/deputy/optimizer/oct/mineOct/doctanalysis.ml | ocaml | The octagon
The mapping from lvals to octagon variables
A mapping from each lval to the abstract state for
* its family
the state for each lv
A list of small states for easy iteration, etc.
* When ignore_inst returns true, then
* the instruction in question has no
* effects on the abstract state.
* When... |
*
* Copyright ( c ) 2004 ,
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions of source code must reta... |
5a72e9028bb275ab6c62bd8adc713e3834f6f4c9a95e8bba5752a4a40f9efd3f | spawngrid/htoad | ec_plists.erl | %%%-------------------------------------------------------------------
%%% @doc
simple parrallel map . Originally provided by
on the erlang questions mailing list .
%%% @end
%%%-------------------------------------------------------------------
-module(ec_plists).
-export([map/2,
map/3,
ftmap/2... | null | https://raw.githubusercontent.com/spawngrid/htoad/f0c7dfbd911b29fb0c406b7c26606f553af11194/deps/erlware_commons/src/ec_plists.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
=============================================================================
Public API
=============================================================================
@do... | simple parrallel map . Originally provided by
on the erlang questions mailing list .
-module(ec_plists).
-export([map/2,
map/3,
ftmap/2,
ftmap/3,
filter/2,
filter/3]).
-spec map(fun(), [any()]) -> [any()].
map(Fun, List) ->
map(Fun, List, infinity).
-spec map(f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.