_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
3c8e6d5b7ae5e9814d740c924543ee80774f5d2fccecf6ebfc961f1834fa6a33
TrustInSoft/tis-interpreter
filetree.mli
Modified by TrustInSoft (**************************************************************************) (* *) This file is part of Frama - C. (* ...
null
https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/gui/filetree.mli
ocaml
************************************************************************ alternatives) ...
Modified by TrustInSoft This file is part of Frama - C. Copyright ( C ) 2007 - 2015 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Softwa...
43d0a7b301889ba592548d028fc54926ea498f09e1a4904cd594ee751612997f
soywod/unfog
TypeV0.hs
module Unfog.Event.TypeV0 where import Data.Time (UTCTime) data EventV0 = TaskCreated UTCTime Int Int Int String [String] (Maybe UTCTime) | TaskUpdated UTCTime Int Int Int String [String] (Maybe UTCTime) | TaskStarted UTCTime Int Int | TaskStopped UTCTime Int Int | TaskMarkedAsDone UTCTime Int Int | TaskU...
null
https://raw.githubusercontent.com/soywod/unfog/9271f74cf92a2135888b97d9aa91b396bb1eff43/lib/Unfog/Event/TypeV0.hs
haskell
module Unfog.Event.TypeV0 where import Data.Time (UTCTime) data EventV0 = TaskCreated UTCTime Int Int Int String [String] (Maybe UTCTime) | TaskUpdated UTCTime Int Int Int String [String] (Maybe UTCTime) | TaskStarted UTCTime Int Int | TaskStopped UTCTime Int Int | TaskMarkedAsDone UTCTime Int Int | TaskU...
28cfa8ea9d74581a8a6720759e8aa13561dd2c6eda8ed4f8aadfd9acac708ebd
input-output-hk/plutus
Examples.hs
-- editorconfig-checker-disable-file {-# LANGUAGE GADTs #-} # LANGUAGE QuasiQuotes # module Examples where import AlgTypes import Large import Scott import Solver import Control.Applicative import Control.Monad import System.IO import System.Random import Test.QuickCheck ( use the : : AlgSignature - > IO ( ...
null
https://raw.githubusercontent.com/input-output-hk/plutus/1af96af28f45030c94e11138a2f13869e9e63b79/doc/notes/fomega/src/Examples.hs
haskell
editorconfig-checker-disable-file # LANGUAGE GADTs # + get test data: run a bunch of tests for each density, each number of types in system + plot test data for each density (as points): x-axis is number of types in system, y-axis is demutualized size also plot a line running through the average size across...
# LANGUAGE QuasiQuotes # module Examples where import AlgTypes import Large import Scott import Solver import Control.Applicative import Control.Monad import System.IO import System.Random import Test.QuickCheck ( use the : : AlgSignature - > IO ( ) from AlgTypes ) translate :: AlgSignature -> FSignature transla...
5f0cb1fbd3d2e7aa8a17015d136fef640dcded848dbd8b8a16b9f2135f638402
mfoemmel/erlang-otp
ssl_broker.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1999 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/ssl/src/ssl_broker.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 1999 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(ssl_broker). -behaviour(gen_serv...
f143e56d21b6240fa72e797a2dd3d7cfcd403ef3513d7254113811618b4e31b7
reinerp/indexed
Trans.hs
----------------------------------------------------------------------------- -- | -- Module : Control.Monad.Indexed.Trans Copyright : ( C ) 2008 -- License : BSD-style (see the file LICENSE) -- Maintainer : < > -- Stability : experimental -- Portability : portable -- -- TODO: figure ou...
null
https://raw.githubusercontent.com/reinerp/indexed/b6603282f8a74c3b393d97b6de69a6e7dcf534f2/Control/Monad/Indexed/Trans.hs
haskell
--------------------------------------------------------------------------- | Module : Control.Monad.Indexed.Trans License : BSD-style (see the file LICENSE) Stability : experimental Portability : portable TODO: figure out a meaningful way for indexed monads to transform indexed monads ---------...
Copyright : ( C ) 2008 Maintainer : < > module Control.Monad.Indexed.Trans where class IxMonadTrans t where ilift :: Monad m => m a -> t m i i a
6406c1949b5e836165f938be3f293a423630650cf375117ac2db9f9886db50f7
mirage/uspf
uspf.mli
* { 1 ( Un)Sender Policy Framework . } uSPF is a framework to check the identity of the email 's sender . When an email passes through an SMTP server , some informations are available such as the source of the email , the IP address ( because the sender must initiate a TCP / IP connexion ) . ...
null
https://raw.githubusercontent.com/mirage/uspf/1930ed017f973e73de86b47f74d48b820ad36887/lib/uspf.mli
ocaml
* [empty] is an empty context. * [with_sender v ctx] adds into the given [ctx] the sender of the incoming email (its simple domain name or the complete email address). * [domain ctx] returns the domain-name of the sender if it exists. * The [all] mechanism is a test that always matches. It is used as the rig...
* { 1 ( Un)Sender Policy Framework . } uSPF is a framework to check the identity of the email 's sender . When an email passes through an SMTP server , some informations are available such as the source of the email , the IP address ( because the sender must initiate a TCP / IP connexion ) . ...
ab8a4e865312be3ebbb78d715cfaf787bfa2ff11c9e9c214d61d843df56c17e4
NetComposer/nksip
t02_core.erl
%% ------------------------------------------------------------------- %% %% uas_test: Inline Test Suite %% Copyright ( c ) 2013 . 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 compliance with the License ....
null
https://raw.githubusercontent.com/NetComposer/nksip/7fbcc66806635dc8ecc5d11c30322e4d1df36f0a/test/tests/t02_core.erl
erlang
------------------------------------------------------------------- uas_test: Inline Test Suite 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 specifi...
Copyright ( c ) 2013 . 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 -module(t02_core). -include...
33cda05f6211f6a4d58be35e3f0fe0a720cd0142f4e268bfe8d59f2731affaba
basho/riak_auth_mods
riak_auth_mods_pam.erl
-module(riak_auth_mods_pam). -export([auth/4]). auth(Username, Password, _UserOptions, SourceOptions) -> P = canola:open(), Service = proplists:get_value("service", SourceOptions, "riak"), Res = canola:auth(Username, Password, list_to_binary(Service), P), canola:close(P), Res.
null
https://raw.githubusercontent.com/basho/riak_auth_mods/31b8b30e6c215418522eaa615264ae9769a87410/src/riak_auth_mods_pam.erl
erlang
-module(riak_auth_mods_pam). -export([auth/4]). auth(Username, Password, _UserOptions, SourceOptions) -> P = canola:open(), Service = proplists:get_value("service", SourceOptions, "riak"), Res = canola:auth(Username, Password, list_to_binary(Service), P), canola:close(P), Res.
7e606fef14689e569b41f337cc7d8595fe31983f353788f8168f67161508a157
heshrobe/joshua-dist
joshua-tests.lisp
-*- Base : 10 ; Mode : common - LISP ; readtable : ; Package : JOSHUA - USER -*- (in-package :JOSHUA-USER) (defparameter *joshua-tests* nil "List of tests for Joshua.") (def-defining-form deftest :definer ((name &body body) ;; succeeds if all the forms in body return non-NIL. `(progn #+genera (scl:r...
null
https://raw.githubusercontent.com/heshrobe/joshua-dist/f59f06303f9fabef3e945a920cf9a26d9c2fd55e/joshua/tests/joshua-tests.lisp
lisp
Mode : common - LISP ; readtable : ; Package : JOSHUA - USER -*- succeeds if all the forms in body return non-NIL. check that something is in the database test whether or not a query succeeds n times. like test-n-successes, but at the database level to print the table as it's generated, instead of all at the end...
(in-package :JOSHUA-USER) (defparameter *joshua-tests* nil "List of tests for Joshua.") (def-defining-form deftest :definer ((name &body body) `(progn #+genera (scl:record-source-file-name ',name 'deftest) (pushnew ',name *joshua-tests*) (defun ,name () (and ,@body)))) :killer ((name...
3b0ee51aabd734e0bc1f621ec638ae62b5fbdd999352c0dc0538dbcaeebd4e54
themetaschemer/malt
test-C-star-2-1.rkt
(module+ test (require rackunit) (require (only-in "../tensors.rkt" tensor)) (let ((a (tensor (tensor 3 4 5 6) (tensor 7 8 9 10))) (b (tensor 2 3 4 5))) (check-ρ-∇ (d*-2-1 a b) (tensor (tensor 6 12 20 30) (tensor 14 24 36 50)) (list (tensor (tensor 2.0...
null
https://raw.githubusercontent.com/themetaschemer/malt/a12f8f9a4651cd111d76fe05cfb2cc98d241bfdd/nested-tensors/ext-ops/test/test-C-star-2-1.rkt
racket
(module+ test (require rackunit) (require (only-in "../tensors.rkt" tensor)) (let ((a (tensor (tensor 3 4 5 6) (tensor 7 8 9 10))) (b (tensor 2 3 4 5))) (check-ρ-∇ (d*-2-1 a b) (tensor (tensor 6 12 20 30) (tensor 14 24 36 50)) (list (tensor (tensor 2.0...
c959fc8b6d8143ad13c56af1c02f1b662172f59472333ba553391e2a3f1258e9
Eduap-com/WordMat
load-minpack.lisp
(in-package #-gcl #:maxima #+GCL "MAXIMA") #+(or ecl abcl) ($load "lisp-utils/defsystem.lisp") (load (merge-pathnames (make-pathname :name "minpack" :type "system") (maxima-load-pathname-directory))) (mk:oos "minpack-interface" :compile)
null
https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/minpack/load-minpack.lisp
lisp
(in-package #-gcl #:maxima #+GCL "MAXIMA") #+(or ecl abcl) ($load "lisp-utils/defsystem.lisp") (load (merge-pathnames (make-pathname :name "minpack" :type "system") (maxima-load-pathname-directory))) (mk:oos "minpack-interface" :compile)
232119d174399656c664071af06e207286d56204dc756419bf5aaa9faead72a3
composewell/streamly
Concurrent.hs
-- | Module : Streamly . Data . Stream . Concurrent Copyright : ( c ) 2022 Composewell Technologies -- License : BSD-3-Clause -- Maintainer : -- Stability : released Portability : GHC -- -- This module provides concurrent streaming abstractions. -- -- == Programming Tips -- -- The names in this m...
null
https://raw.githubusercontent.com/composewell/streamly/7263d811534b62615e8d1ad8cc14cfa49abe8081/src/Streamly/Data/Stream/Concurrent.hs
haskell
| License : BSD-3-Clause Maintainer : Stability : released This module provides concurrent streaming abstractions. == Programming Tips The names in this module do not conflict with other stream modules, therefore, you can import it in the same namespace: * Concurrency $concurrency ** Configuratio...
Module : Streamly . Data . Stream . Concurrent Copyright : ( c ) 2022 Composewell Technologies Portability : GHC > > > import qualified Streamly . Data . Stream . Concurrent as Stream module Streamly.Data.Stream.Concurrent ( MonadAsync , Config , maxThreads , maxBuffer , R...
0d257a0566da640e38251d530f19c333103525ad90adc0070cc4fca6e81eba6e
static-analysis-engineering/codehawk
bCHDisassembleMIPSInstructionTest.ml
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Unit Testing Framework Author : Adapted from : ( ) ------------------------------------------------------------------------------ ...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/c1b3158e0d73cda7cfc10d75f6173f4297991a82/CodeHawk/CHT/CHB_tests/bchlibmips32_tests/txbchlibmips32/bCHDisassembleMIPSInstructionTest.ml
ocaml
chutil bchlib bchlibmips32 tchlib bchlib bchlibmips32
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Unit Testing Framework Author : Adapted from : ( ) ------------------------------------------------------------------------------ ...
9cfac13a6c474ffc3edc2de059ef89bbd91a3a427dffd67fccaa8977b63ccff7
opencog/opencog
btree-psi.scm
; ; behavior action selection ( for the blender ; model animations). ; Runs a set of defined behaviors that express 's personality . ; This version integrates the OpenCog chatbot. ; ; The currently-defined behaviors include acknowledging new people who ; enter the room, rotating attention between multiple oc...
null
https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/opencog/eva/src/btree-psi.scm
scheme
model animations). This version integrates the OpenCog chatbot. The currently-defined behaviors include acknowledging new people who enter the room, rotating attention between multiple occupants of the room, falling asleep when bored (i.e. the room is empty), and acting surprised when someone leaves unexpecte...
behavior action selection ( for the blender Runs a set of defined behaviors that express 's personality . HOWTO : Make sure that you did a ` cmake ` and ` make install ` first ! (use-modules (opencog)) (use-modules (opencog logger)) (use-modules (opencog eva-model)) Start the cogsserver . It is used ...
69f5523194bd54f0890522aa8673271cc2524fea5042db485a1435880e742ba4
tam-carre/generic-lens-modern-setup
LensDemo.hs
# LANGUAGE OverloadedLabels # # LANGUAGE OverloadedRecordDot # # LANGUAGE DuplicateRecordFields # # LANGUAGE NoFieldSelectors # # LANGUAGE DeriveGeneric # # LANGUAGE TypeApplications # # LANGUAGE DataKinds # module LensDemo where import Dog (Dog (..)) import UserGroup (User (..), Address (..), Group (..)) import Con...
null
https://raw.githubusercontent.com/tam-carre/generic-lens-modern-setup/5406e0a8b5cf1fe7e03b601ca936dfc3af4ad6e0/src/LensDemo.hs
haskell
necessary to use lenses as #labels DUMMY DATA Record creation is very clean since we didn't need to prefix the field names with _ or dog No problem using #name for different data types; declare data types with duplicate record fields, so it is not required in this module if using lenses. enabled in the field per...
# LANGUAGE OverloadedLabels # # LANGUAGE OverloadedRecordDot # # LANGUAGE DuplicateRecordFields # # LANGUAGE NoFieldSelectors # # LANGUAGE DeriveGeneric # # LANGUAGE TypeApplications # # LANGUAGE DataKinds # module LensDemo where import Dog (Dog (..)) import UserGroup (User (..), Address (..), Group (..)) import Con...
9645aa1e9d500dfb274d8dda6094501c439a88956e93b3eb2ef247a7fbb4a54f
discus-lang/ddc
SubstituteT.hs
-- | Capture avoiding substitution of types in types. module DDC.Type.Transform.SubstituteT ( substituteT , substituteTs , substituteBoundT , substituteExistsT , SubstituteT(..) , BindStack(..) , pushBind , pushBinds , substBound) where import DD...
null
https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core/DDC/Type/Transform/SubstituteT.hs
haskell
| Capture avoiding substitution of types in types. | Wrapper for `substituteT` to substitute multiple things. | Substitute a `Type` for `Bound` in some thing. Determine the free names in the type we're subsituting. We'll need to rename binders with the same names as these | Substitute types for existential variab...
module DDC.Type.Transform.SubstituteT ( substituteT , substituteTs , substituteBoundT , substituteExistsT , SubstituteT(..) , BindStack(..) , pushBind , pushBinds , substBound) where import DDC.Core.Collect import DDC.Type.Transform.BoundT import...
49fdb9bcc588a6c18fa9be77e3001207f75844dcee25cc9bf9eac008e0cfeabc
antifuchs/autobench
autobench-init.lisp
(setf *db-default-user-name* "autobench") (setf *base-dir* #p"/opt/lisp/autobench/") (defstrategy +sbcl-32/rebuild+ sbcl (:mode (:arch :emulated-x86 :features ())) :build-p #'release-p) (defstrategy +sbcl-32-threaded/rebuild+ sbcl (:mode (:arch :emulated-x86 :features (:sb-thread))) :build-p #'release-p)...
null
https://raw.githubusercontent.com/antifuchs/autobench/acc14ee2a8899cb630aa8dd02f3ffd7f5858ce28/production/autobench-init.lisp
lisp
(setf *db-default-user-name* "autobench") (setf *base-dir* #p"/opt/lisp/autobench/") (defstrategy +sbcl-32/rebuild+ sbcl (:mode (:arch :emulated-x86 :features ())) :build-p #'release-p) (defstrategy +sbcl-32-threaded/rebuild+ sbcl (:mode (:arch :emulated-x86 :features (:sb-thread))) :build-p #'release-p)...
45db16158a2d3f76e08665641acf02c57b9d26fa3bce8089adf40f6b880e3989
guildhall/guile-sly
scene.scm
Copyright ( C ) 2015 < > ;;; is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ;;; (at your option) any later version. ;;; ;;; Sly is distributed in the hope tha...
null
https://raw.githubusercontent.com/guildhall/guile-sly/92f5f21da76986c5b606b36afc4bb984cc63da5b/sly/render/scene.scm
scheme
(at your option) any later version. Sly is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. along with this program. If not, see </>. Comme...
Copyright ( C ) 2015 < > is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License (define-module (...
60ab0229e54df48f85f340fd60d8762cdb4053fe6ffdd9851a830eb1600020b9
naoiwata/sicp
2.0.0.scm
;; ;; @author naoiwata SICP Chapter2 ;; Building Abstractions with Data ;; (define (linea-combination a b x y) (add (mul a x) (mul b y)))
null
https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter2/pages/2.0.0.scm
scheme
@author naoiwata Building Abstractions with Data
SICP Chapter2 (define (linea-combination a b x y) (add (mul a x) (mul b y)))
351fdacd0db185f305835743f41aa04e33f224917b7249c6a5de275ff75e9d81
dyzsr/ocaml-selectml
w33.ml
(* TEST flags = "-w +A-70" * setup-ocamlc.byte-build-env ** ocamlc.byte compile_only = "true" *** check-ocamlc.byte-output *) (** Test unused opens, in particular in presence of pattern open *) module M = struct end module N = struct type t = A | B end module R = struct type r = {x: int} end let f M.(x) = x ...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/warnings/w33.ml
ocaml
TEST flags = "-w +A-70" * setup-ocamlc.byte-build-env ** ocamlc.byte compile_only = "true" *** check-ocamlc.byte-output * Test unused opens, in particular in presence of pattern open useless open used open used open useless open! useless open
module M = struct end module N = struct type t = A | B end module R = struct type r = {x: int} end let h R.{x} = R.{x} let i (A|B) = B
448c824563461792b6d925a68d6bd12b097da6910ef7bc19e6f7acc3c25d508d
SuYi1995/game_server
svr_logic.erl
%%%------------------------------------------------------------------- %%% @author sy ( C ) 2019 , < COMPANY > %%% @doc %%% 游戏逻辑线服务 %%% @end Created : 06 . 10月 2019 10:05 %%%------------------------------------------------------------------- -module(svr_logic). -behaviour(gen_server). -include("common.hrl"). -inc...
null
https://raw.githubusercontent.com/SuYi1995/game_server/b9a8574589075a1264c3d1f9a564d6d2ea8ae574/src/server/server_logic/svr_logic.erl
erlang
------------------------------------------------------------------- @author sy @doc 游戏逻辑线服务 @end ------------------------------------------------------------------- ============================================================================= API ==================================================================...
( C ) 2019 , < COMPANY > Created : 06 . 10月 2019 10:05 -module(svr_logic). -behaviour(gen_server). -include("common.hrl"). -include("filter.hrl"). -export([ i/0, p/0, call/1, cast/1, start_link/0 ]). -export([ init/1, handle_call/3, handle_cast/2, handle_info/2, terminate...
131c209a9399b8fab4b84b34211d5694b3eeb1d53084d482b4aeab2356689e3d
marcoheisig/Typo
mul.lisp
(in-package #:typo.vm) (define-fnrecord * (&rest numbers) (:properties :foldable :movable) (:differentiator index (apply (function-specializer '*) (loop for number in numbers for position from 0 unless (= position index) collect number))) (:specia...
null
https://raw.githubusercontent.com/marcoheisig/Typo/ab83f62329b3f55846e6649ac9d8027e297f8c7b/code/vm/mul.lisp
lisp
(in-package #:typo.vm) (define-fnrecord * (&rest numbers) (:properties :foldable :movable) (:differentiator index (apply (function-specializer '*) (loop for number in numbers for position from 0 unless (= position index) collect number))) (:specia...
3aff2833c2f3cd956fa03d446966e9528d4647c1661d6b39e3f98477f243b443
tweag/ormolu
operator-comments-1-out.hs
foo = bar ++ -- some comment case foo of a -> a foo = bar ++ case foo of -- some comment a -> a foo = bar ++ case foo of -- some comment a -> a
null
https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/value/function/operator-comments-1-out.hs
haskell
some comment some comment some comment
foo = bar ++ case foo of a -> a foo = bar a -> a foo = bar a -> a
61bd8a64c7f7ff65024c443f37089f5ce3f3787110593f7ef27ce76c7c3ea1b7
scalaris-team/scalaris
api_json_rbr.erl
2018 Zuse Institute 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 in writing, software distribut...
null
https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/src/json/api_json_rbr.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 gov...
2018 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > -module(api_json_rbr). -author(''). -export([handler/2]). -include("scalaris.hrl"). -include("client_types.hrl"). for ...
3831225a66e243ce0edd814762fa065448f3b30eb25b7414583831b27e6e121b
grin-compiler/grin
TH.hs
# LANGUAGE TemplateHaskell # module Grin.ExtendedSyntax.TH ( text , progConst , prog , def , expr ) where import Data.List (sort) import Data.Char import Data.Data import Data.Maybe import NeatInterpolation import Text.Megaparsec import qualified Grin.ExtendedSyntax.Parse as P import qualified Data.Text a...
null
https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/src/Grin/ExtendedSyntax/TH.hs
haskell
NOTE: does not support metavariables
# LANGUAGE TemplateHaskell # module Grin.ExtendedSyntax.TH ( text , progConst , prog , def , expr ) where import Data.List (sort) import Data.Char import Data.Data import Data.Maybe import NeatInterpolation import Text.Megaparsec import qualified Grin.ExtendedSyntax.Parse as P import qualified Data.Text a...
ca7052be01e674d9863327b4fceb1cab3bb0917766226b4a9984bc4d3ab7c9b4
ejgallego/coq-serapi
ser_gramlib.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ejgallego/coq-serapi/61d2a5c092c1918312b8a92f43a374639d1786f9/serlib/ser_gramlib.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** ************************************...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright 2016 - 2019 MINES...
714dc0b54a3628596bbca205e4921c97afb74ba208d3b5d439ecbdbcf5fb9e8b
sifbiri/project-resources-operations
work_line.clj
(ns app.model.work-line (:require [com.wsscode.pathom.connect :as pc] [taoensso.timbre :as log] [com.fulcrologic.fulcro.algorithms.tempid :as tempid] [app.model.project-model :as project] [clojure.set :as s] [clojure.xml :as xml] [cl...
null
https://raw.githubusercontent.com/sifbiri/project-resources-operations/b08adb09ef03f123ca7ad19ec1c2bdc070a66291/src/main/app/model/work_line.clj
clojure
[datomic.client.api :as d] :work-line/project {:project/id "ee40bf0b-6af6-e911-b19c-9cb6d0e1bd60"} :work-line/hours 22} (require '[datomic.api :as d]) (def uri "datomic:dev:4334/one2") (d/create-database uri) (def conn (d/connect uri)) (def db (d/db conn)) (require '[datomic.api :as d]) (def uri "datomic:free:4334...
(ns app.model.work-line (:require [com.wsscode.pathom.connect :as pc] [taoensso.timbre :as log] [com.fulcrologic.fulcro.algorithms.tempid :as tempid] [app.model.project-model :as project] [clojure.set :as s] [clojure.xml :as xml] [cl...
ab2c931e4c372ab04e03154df03e411518f2b4f739722472d34d503411ac747f
jeapostrophe/exp
pkg-in.rkt
#lang s-exp "../core/pkg-in.rkt"
null
https://raw.githubusercontent.com/jeapostrophe/exp/43615110fd0439d2ef940c42629fcdc054c370f9/pkgs/safe/pkg-in.rkt
racket
#lang s-exp "../core/pkg-in.rkt"
76e02db1516450d3eb8ecc88016f9857779be81679adf57653ecac29976edea8
racket/racket7
read-primitive.rkt
#lang racket/base (require "../common/reflect-hash.rkt" "../read/api.rkt" "../read/primitive-parameter.rkt" "../read/readtable.rkt" "../read/special-comment.rkt" "../read/number.rkt") ;; Reader primitives are in their own module so that they can be ;; treated specially by t...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/boot/read-primitive.rkt
racket
Reader primitives are in their own module so that they can be treated specially by the bootstrapped flattened. The expanded form of the expander can refer to the host's implementations, and those references are replaced by these implementations. read-case-sensitive - shared with printer read-accept-bar-quote - sh...
#lang racket/base (require "../common/reflect-hash.rkt" "../read/api.rkt" "../read/primitive-parameter.rkt" "../read/readtable.rkt" "../read/special-comment.rkt" "../read/number.rkt") (provide read-primitives) (define read-primitives (reflect-hash read r...
e500c3db19350d7faef80dc9394a7626ab2321fb9f0c6399dde13ce27d3c7baa
Sintrastes/xen-fret
Scales.hs
module XenFret.App.Pages.Scales where import Data.Map (Map) import qualified Data.Map as Map import qualified Data.Text as T import Data.List.NonEmpty (NonEmpty(..)) import Data.Validation import qualified Data.List.NonEmpty as NE import XenFret.App.Widgets.Fretboard import XenFret.Data import XenFret.AppData import ...
null
https://raw.githubusercontent.com/Sintrastes/xen-fret/52138750c86a1663ee620d5c75c6f72b94db9a20/xen-fret/src/XenFret/App/Pages/Scales.hs
haskell
Dynamic check for whether or not a scale's name already exists in the list of scales for a given temperament.
module XenFret.App.Pages.Scales where import Data.Map (Map) import qualified Data.Map as Map import qualified Data.Text as T import Data.List.NonEmpty (NonEmpty(..)) import Data.Validation import qualified Data.List.NonEmpty as NE import XenFret.App.Widgets.Fretboard import XenFret.Data import XenFret.AppData import ...
1b5cd5611f19fd24a2a35a9acfd13ee912c08640227bdb36362ef963dd10c90e
semerdzhiev/fp-2020-21
1.rkt
#lang r5rs (define (accumulate operation transform initial start next end) (define (helper i) (if (> i end) initial (operation (transform i) (helper (next i)))) ) (helper...
null
https://raw.githubusercontent.com/semerdzhiev/fp-2020-21/64fa00c4f940f75a28cc5980275b124ca21244bc/group-a/Week5-Homework1/1.rkt
racket
+ -
#lang r5rs (define (accumulate operation transform initial start next end) (define (helper i) (if (> i end) initial (operation (transform i) (helper (next i)))) ) (helper...
dcbc788b043888661408d6079de7344060a45ae387aeca879e24f21a7263224a
GlideAngle/flare-timing
Time.hs
module Flight.Gap.Weight.Time (TimeWeight(..)) where import GHC.Generics (Generic) import "newtype" Control.Newtype (Newtype(..)) import Data.Via.Scientific (DecimalPlaces(..), deriveDecimalPlaces, deriveJsonViaSci) newtype TimeWeight = TimeWeight Rational deriving (Eq, Ord, Show, Generic) instance Newtype TimeW...
null
https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/gap-weight/library/Flight/Gap/Weight/Time.hs
haskell
module Flight.Gap.Weight.Time (TimeWeight(..)) where import GHC.Generics (Generic) import "newtype" Control.Newtype (Newtype(..)) import Data.Via.Scientific (DecimalPlaces(..), deriveDecimalPlaces, deriveJsonViaSci) newtype TimeWeight = TimeWeight Rational deriving (Eq, Ord, Show, Generic) instance Newtype TimeW...
ade9b676702ab4043b5012ecd7c7d43c43dd48d137c0a9f7c5bff00d86e12b28
epsilon-phase/img-genner
runthem.lisp
(in-package img-genner/tests) ;(rove:run-suite *package*)
null
https://raw.githubusercontent.com/epsilon-phase/img-genner/208ca6c089baea597fa76351faa1c42e6fc723f1/tests/runthem.lisp
lisp
(rove:run-suite *package*)
(in-package img-genner/tests)
9e68ebcf38168adc02cee6238f6f31dfdb5417272366251b4a7538e6a3d8557e
penpot/penpot
shadow.cljs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.main.ui.viewer.inspect.attributes.shadow (:require [app.common.data :as d] [app.main.ui.compon...
null
https://raw.githubusercontent.com/penpot/penpot/87a264ae405f8ba2f64b548850f348f84d7f602f/frontend/src/app/main/ui/viewer/inspect/attributes/shadow.cljs
clojure
Copyright (c) KALEIDOS INC
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.main.ui.viewer.inspect.attributes.shadow (:require [app.common.data :as d] [app.main.ui.components.copy-button :refer [copy-but...
c8f8012a16e7a39434fab9fb8c55c25b9a19bcd0eea472175ca9468f9cf8599c
dmjio/stripe
Main.hs
module Main where import Control.Monad.Trans.Free (FreeF(..), FreeT(..)) import Network.Http.Client (Connection) import Web.Stripe.Client (StripeConfig(..), StripeError(..)) import Web.Stripe.Client.HttpStreams (withConnection, callAPI) import ...
null
https://raw.githubusercontent.com/dmjio/stripe/967334629933fcb55247eb3270c7801c05d6bf61/stripe-http-streams/tests/Main.hs
haskell
module Main where import Control.Monad.Trans.Free (FreeF(..), FreeT(..)) import Network.Http.Client (Connection) import Web.Stripe.Client (StripeConfig(..), StripeError(..)) import Web.Stripe.Client.HttpStreams (withConnection, callAPI) import ...
b324d07368a21db4ad47d3598baaac2bd3aaee8d1af8d112fe3d685dd03a8a33
merijn/broadcast-chan
Internal.hs
# LANGUAGE NamedFieldPuns # # LANGUAGE Trustworthy # # LANGUAGE ScopedTypeVariables # module BroadcastChan.Conduit.Internal (parMapM, parMapM_) where import Control.Monad ((>=>)) import Control.Monad.Trans.Resource (MonadResource) import qualified Control.Monad.Trans.Resource as Resource import qualified Control.Monad...
null
https://raw.githubusercontent.com/merijn/broadcast-chan/2842a60dd86c93fddfaf0fa02c7de2aaad4d26ae/broadcast-chan-conduit/BroadcastChan/Conduit/Internal.hs
haskell
| Create a conduit that processes inputs in parallel. This function does __NOT__ guarantee that input elements are processed or output in a deterministic order! @since 0.2.0 ^ Exception handler ^ Number of parallel threads to use ^ Function to run in parallel | Create a conduit sink that consumes inputs in pa...
# LANGUAGE NamedFieldPuns # # LANGUAGE Trustworthy # # LANGUAGE ScopedTypeVariables # module BroadcastChan.Conduit.Internal (parMapM, parMapM_) where import Control.Monad ((>=>)) import Control.Monad.Trans.Resource (MonadResource) import qualified Control.Monad.Trans.Resource as Resource import qualified Control.Monad...
b99938b4b5fba6d275a6852aec8243efaa4fc5931448de13fc5f043e6a9fc2a3
ivanperez-keera/SpaceInvaders
IdentityList.hs
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * I N V A D E R S * * ...
null
https://raw.githubusercontent.com/ivanperez-keera/SpaceInvaders/4ae94c30b4b4022577a088e64fb909dc71803e57/src/IdentityList.hs
haskell
Identity-list key type Identity-list, abstract. Instance of functor. :: IL a :: a -> IL a -> IL a :: a -> IL a -> (ILKey, IL a) :: [a] -> IL a :: IL a -> [ILKey] :: IL a -> [a] :: IL a -> [(ILKey, a)] :: ILKey -> IL a -> IL a :: ((ILKey, a) -> b) -> IL a -> IL b :: ((ILKey, a) -> Bool) -> IL a -> IL a :: (...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * I N V A D E R S * * ...
48a611ea2b786f2aba769b6967d8555464165d17f3f9edab1546f28a89bc9caa
locusmath/locus
semiring_matrix.clj
(ns locus.matrix.semiring.semiring-matrix (:refer-clojure :exclude [+ * - /]) (:require [locus.set.logic.core.set :refer :all :exclude [add]] [locus.set.logic.limit.product :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.copresheaf.structure.core.protoco...
null
https://raw.githubusercontent.com/locusmath/locus/b232579217be4e39458410893827a84d744168e4/src/clojure/locus/matrix/semiring/semiring_matrix.clj
clojure
The apache commons math library only supports matrices over fields. We need to extend that in order to support matrices Get the rows and columns of a matrix The most basic example of a matrix constructed over a ring Convert binary relations into matrices by their adjacency matrices this naturally produces a semig...
(ns locus.matrix.semiring.semiring-matrix (:refer-clojure :exclude [+ * - /]) (:require [locus.set.logic.core.set :refer :all :exclude [add]] [locus.set.logic.limit.product :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.copresheaf.structure.core.protoco...
b0ea14a641212fff2bf1215c325787217f76da059bf8c11c77ed5ab0b658b208
cmsc430/www
interp.rkt
#lang racket (provide interp) (require "ast.rkt" "interp-prim.rkt") type Answer = Value | ' err ;; type Value = ;; | Integer ;; | Boolean ;; | Character ;; | Eof ;; | Void ;; Expr -> Answer (define (interp e) (match e [(Int i) i] [(Bool b) b] [(Char c) c] [(Eof) eof] [(Prim0 p) (inte...
null
https://raw.githubusercontent.com/cmsc430/www/0809867532b8ef516029ac38093a145db5b424ea/langs/extort/interp.rkt
racket
type Value = | Integer | Boolean | Character | Eof | Void Expr -> Answer
#lang racket (provide interp) (require "ast.rkt" "interp-prim.rkt") type Answer = Value | ' err (define (interp e) (match e [(Int i) i] [(Bool b) b] [(Char c) c] [(Eof) eof] [(Prim0 p) (interp-prim0 p)] [(Prim1 p e0) (match (interp e0) ['err 'err] [v (in...
8dcccd74a7672b2191d69e121f318e79f6d657eef0403dbc74ff9e150976fc21
ollef/sixten
Core.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MonadComprehensions # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGU...
null
https://raw.githubusercontent.com/ollef/sixten/60d46eee20abd62599badea85774a9365c81af45/src/Syntax/Core.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE DeriveTraversable # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # | Expressions with meta-variables of type @m@ and variables of type @v@. | Synonym for documentation purposes ----------------------------------------------------------------------------- Helpers -------...
# LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MonadComprehensions # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PatternSynonyms # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFami...
2c34c609bae49da932d0e45b417846769ae62d36f3d9d644dd4b5e22e7ca5e9e
seancorfield/next-jdbc
default_options.clj
copyright ( c ) 2020 - 2021 , all rights reserved (ns ^:no-doc next.jdbc.default-options "Implementation of default options logic." (:require [next.jdbc.protocols :as p])) (set! *warn-on-reflection* true) (defrecord DefaultOptions [connectable options]) (extend-protocol p/Sourceable DefaultOptions (get-...
null
https://raw.githubusercontent.com/seancorfield/next-jdbc/21a520a8d811999a255e15c30821d635bc71b3b7/src/next/jdbc/default_options.clj
clojure
copyright ( c ) 2020 - 2021 , all rights reserved (ns ^:no-doc next.jdbc.default-options "Implementation of default options logic." (:require [next.jdbc.protocols :as p])) (set! *warn-on-reflection* true) (defrecord DefaultOptions [connectable options]) (extend-protocol p/Sourceable DefaultOptions (get-...
baac4085c75b235018ea5f577670f63a86c72907aa18988f0399b89831f46b5c
mput/sicp-solutions
3_19.rkt
#lang racket Solution for exercise 3_19 . (require compatibility/mlist) (provide has-cycle?) (define (mcddr items) (mcdr (mcdr items))) (define (has-cycle? items) (define (at-end-of-list? items) (or (null? (mcdr items)) (null? (mcddr items)))) (define (chase turtle rabbit) (cond ((eq? (mcar ...
null
https://raw.githubusercontent.com/mput/sicp-solutions/fe12ad2b6f17c99978c8fe04b2495005986b8496/solutions/3_19.rkt
racket
#lang racket Solution for exercise 3_19 . (require compatibility/mlist) (provide has-cycle?) (define (mcddr items) (mcdr (mcdr items))) (define (has-cycle? items) (define (at-end-of-list? items) (or (null? (mcdr items)) (null? (mcddr items)))) (define (chase turtle rabbit) (cond ((eq? (mcar ...
e8556f447bbe1f9ef16f5ea2ee5f0e5ea5a8d8d74ec36cd3ba481749f92793c4
paurkedal/viz
cst_core.ml
Copyright ( C ) 2010 - -2016 Petter A. Urkedal < > * * This file is part of the Viz Compiler < / > . * * The Viz Compiler 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...
null
https://raw.githubusercontent.com/paurkedal/viz/ab1f1071fafdc51eae69185ec55d7a6e7bb94ea9/camlviz/cst_core.ml
ocaml
Copyright ( C ) 2010 - -2016 Petter A. Urkedal < > * * This file is part of the Viz Compiler < / > . * * The Viz Compiler 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...
31d3a85ac9d7fef612fadfaca5d842f711df873e47e28b5d965d988ada656bc0
zcaudate/hara
progress_test.clj
(ns hara.print.base.progress-test (:use hara.test) (:require [hara.print.base.progress :refer :all])) ^{:refer hara.print.base.progress/replace-center :added "3.0"} (fact "replaces the center of the background with text" (replace-center "=================" " hello ") => "===== hello =====") ^{:refer hara.pri...
null
https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/test/hara/print/base/progress_test.clj
clojure
(ns hara.print.base.progress-test (:use hara.test) (:require [hara.print.base.progress :refer :all])) ^{:refer hara.print.base.progress/replace-center :added "3.0"} (fact "replaces the center of the background with text" (replace-center "=================" " hello ") => "===== hello =====") ^{:refer hara.pri...
8f9e167240b5b8d2b77f94cebaae53e4cc6cea21eec54ee639bd6c61d25f18ae
BitGameEN/bitgamex
egeoip_acl.erl
-module(egeoip_acl). -export([parse_file/1, lookup/2]). -ifdef(TEST). -export([parse_ip24/1, parse_ips/1, parse_line/2]). -endif. %% @type ip24() = list() | binary() | {int(), int(), int()} %% @type ip32() = list() | binary() | {int(), int(), int(), int()} %% @type ip() = ip24() | ip32() | ...
null
https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/egeoip/src/egeoip_acl.erl
erlang
@type ip24() = list() | binary() | {int(), int(), int()} @type ip32() = list() | binary() | {int(), int(), int(), int()} @type ip() = ip24() | ip32() | invalid_ip @type acldb() = {binary(), binary(), tuple()} IPs DATABASE FORMAT {IPsBlob, IPsIndex, Zones} buckets with zone name. file. Retur...
-module(egeoip_acl). -export([parse_file/1, lookup/2]). -ifdef(TEST). -export([parse_ip24/1, parse_ips/1, parse_line/2]). -endif. parse_file(string ( ) | atom ( ) ) - > acldb ( ) @doc Parses an ACL file and converts it to an IP - > Zone index . 1 . IPsBlob consists of buckets , eac...
45f1d6ce22261dec0183ccb0aa8e9b41fffa94f64b2c5cc14b979330ddd44325
michalkonecny/aern2
Eval.hs
module AERN2.Poly.Power.Eval where import MixedTypesNumPrelude import AERN2.Poly.Power.Type import AERN2.Poly.Basics import AERN2.MP.Ball import AERN2.MP.Dyadic import qualified Data.Map as Map evalDirect :: (CanAddAsymmetric b c, b ~ AddType b c , Ring b, HasIntegers b, HasIntegers c) =...
null
https://raw.githubusercontent.com/michalkonecny/aern2/1c8f12dfcb287bd8e3353802a94865d7c2c121ec/aern2-fun-univariate/src/AERN2/Poly/Power/Eval.hs
haskell
module AERN2.Poly.Power.Eval where import MixedTypesNumPrelude import AERN2.Poly.Power.Type import AERN2.Poly.Basics import AERN2.MP.Ball import AERN2.MP.Dyadic import qualified Data.Map as Map evalDirect :: (CanAddAsymmetric b c, b ~ AddType b c , Ring b, HasIntegers b, HasIntegers c) =...
0bee96a6ca2317e1483d6c61570e9f53501be90a2c191a96de0ab87619e4a8fa
rtoy/ansi-cl-tests
remove-aux.lsp
;-*- Mode: Lisp -*- Author : Created : Sun Sep 15 07:42:36 2002 ;;;; Contains: Auxiliary functions for testing REMOVE and related functions (in-package :cl-test) (defun make-random-element (type) (cond ((subtypep* 'fixnum type) (random most-positive-fixnum)) ((and (listp type) (eql...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/remove-aux.lsp
lisp
-*- Mode: Lisp -*- Contains: Auxiliary functions for testing REMOVE and related functions Check that everything's kosher If FROM-END, reverse the sequence and flip start, end Accumulate a list of elements for the result accumulate in reverse order Convert to the correct type Return parameters ((coin) (list...
Author : Created : Sun Sep 15 07:42:36 2002 (in-package :cl-test) (defun make-random-element (type) (cond ((subtypep* 'fixnum type) (random most-positive-fixnum)) ((and (listp type) (eql (car type) 'integer) (integerp (cadr type)) (integerp (caddr type)) (nul...
497314a76c3162c64ec44beade172ec27c2747bfb6811befdf6e5c6064485fc1
FlowerWrong/mblog
lib_filenames_dets.erl
%% --- Excerpted from " Programming Erlang , Second Edition " , published by The Pragmatic Bookshelf . %% Copyrights apply to this code. It may not be used to create training material, %% courses, books, articles, and the like. Contact us if you are in doubt. %% We make no guarantees that this code is fit for...
null
https://raw.githubusercontent.com/FlowerWrong/mblog/3233ede938d2019a7b57391405197ac19c805b27/categories/erlang/demo/jaerlang2_code/lib_filenames_dets.erl
erlang
--- Copyrights apply to this code. It may not be used to create training material, courses, books, articles, and the like. Contact us if you are in doubt. We make no guarantees that this code is fit for any purpose. Visit for more book information. ---
Excerpted from " Programming Erlang , Second Edition " , published by The Pragmatic Bookshelf . -module(lib_filenames_dets). -export([open/1, close/0, test/0, filename2index/1, index2filename/1]). open(File) -> io:format("dets opened:~p~n", [File]), Bool = filelib:is_file(File), case dets:open_file(?...
76332b0d8eb37a9e4cf832e29819d3bd9bfce17fca502dd6205ce41b8033d1ed
perkss/clojure-kafka-examples
kstream_aggregate_test.clj
(ns kafka-streams-example.kstream_aggregate_test (:require [kafka-streams-example.kstream-aggregate :as sut] [clojure.test :refer [deftest testing is]] [kafka-streams-example.test-support :as support]) (:import org.apache.kafka.common.serialization.Serdes [org.apache.kafka.streams...
null
https://raw.githubusercontent.com/perkss/clojure-kafka-examples/437aec6f595ab1001ffe63e6608a278c441acaf6/kafka-streams-example/test/kafka_streams_example/kstream_aggregate_test.clj
clojure
Aggregates the count for items beginning with t
(ns kafka-streams-example.kstream_aggregate_test (:require [kafka-streams-example.kstream-aggregate :as sut] [clojure.test :refer [deftest testing is]] [kafka-streams-example.test-support :as support]) (:import org.apache.kafka.common.serialization.Serdes [org.apache.kafka.streams...
1de23697dcc48cff1b909bd6eb7b0bfd35813c5188a47ffc0a3c4d74d343ba08
lehins/hip
BinarySpec.hs
# LANGUAGE FlexibleContexts # module Graphics.Image.Processing.BinarySpec (spec, struct) where import Test.Hspec import Graphics.Color.Model as M import Graphics.Image as I import Graphics.Image.Processing.Binary figure :: Image M.Y Bit figure = fromLists [ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] ...
null
https://raw.githubusercontent.com/lehins/hip/1386e83ad4c3e1bdb01f3d6bdec6fe40489dabd1/hip/tests/Graphics/Image/Processing/BinarySpec.hs
haskell
# LANGUAGE FlexibleContexts # module Graphics.Image.Processing.BinarySpec (spec, struct) where import Test.Hspec import Graphics.Color.Model as M import Graphics.Image as I import Graphics.Image.Processing.Binary figure :: Image M.Y Bit figure = fromLists [ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] ...
9eea35e6f852d0099c980da2a00deba5161871c6bba427d98bdf2b303419cc59
bobzhang/ocaml-book
fig.ml
-*- Mode : caml ; -*- * = = = ----------------------------------------------------------------------=== * Version : $ I d : fig.ml , v 0.0 2012/02/26 23:57:40 * = = = ----------------------------------------------------------------------=== *===----------------------------------------------------...
null
https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/code/mlpost/fig.ml
ocaml
-*- Mode : caml ; -*- * = = = ----------------------------------------------------------------------=== * Version : $ I d : fig.ml , v 0.0 2012/02/26 23:57:40 * = = = ----------------------------------------------------------------------=== *===----------------------------------------------------...
7c72b9c586638a58547e66d2c31a7bfa47b6fdb8c08ed8a205671f247d38b418
dongcarl/guix
gnu.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2014 , 2015 , 2016 , 2017 , 2019 , 2020 < > Copyright © 2015 < > Copyright © 2017 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Publ...
null
https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2014 , 2015 , 2016 , 2017 , 2019 , 2020 < > Copyright © 2015 < > Copyright © 2017 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gnu) #:u...
3292155d983b56b9873a768a88392aba3e877d71b0b998e28cfff37b803b1b92
roburio/caldav
properties.ml
module Xml = Webdav_xml let prop_version = [ Xml.pcdata "2" ] module PairMap = Map.Make (struct type t = string * string let compare (a1, a2) (b1, b2) = match String.compare a1 b1 with | 0 -> String.compare a2 b2 | x -> x end) open Sexplib.Conv type property = Xml.attribute list * Xml.tree list [...
null
https://raw.githubusercontent.com/roburio/caldav/80a5ef6cd86c402aa92ab079026ee33286918944/src/properties.ml
ocaml
for directories, we use the current timestamp, for files the creationdate (which is always updated) shouldn't happen not safe public and ok internal public and ok assume that it is safe, should call can_write_prop if an update did not apply, m will be None! some update did not apply -> tree:...
module Xml = Webdav_xml let prop_version = [ Xml.pcdata "2" ] module PairMap = Map.Make (struct type t = string * string let compare (a1, a2) (b1, b2) = match String.compare a1 b1 with | 0 -> String.compare a2 b2 | x -> x end) open Sexplib.Conv type property = Xml.attribute list * Xml.tree list [...
2f0568074d6882783e39b319c81ab750ef74cdafd9d494ea4df544640a13c999
guoguo12/tic-tac-toe
board.ml
open Core.Std;; (** Returns a new board object. *) let new_board () = Array.create 9 0 (** Converts from (x, y) coordinates to an index in the backing array. *) let index_of_coord x y = 3 * y + x (** Gets the item in the given board at (x, y). *) let get_item board x y = board.(index_of_coord x y) (** Sets the item...
null
https://raw.githubusercontent.com/guoguo12/tic-tac-toe/d8132b1e9faeb9ca63412eb33381e365a553f1fc/board.ml
ocaml
* Returns a new board object. * Converts from (x, y) coordinates to an index in the backing array. * Gets the item in the given board at (x, y). * Sets the item in the given board at (x, y). * Returns a list of items in a particular row of the board. * Returns a list of items in a particular column of the board. ...
open Core.Std;; let new_board () = Array.create 9 0 let index_of_coord x y = 3 * y + x let get_item board x y = board.(index_of_coord x y) let set_item board x y value = board.(index_of_coord x y) <- value let get_row board y = List.map (List.range 0 3) (fun x -> board.(index_of_coord x y)) let get_c...
efd16c0034603f5adce2e2b7be492511ccb72b3ad92b69324eeb83721166cacd
reanimate/reanimate
Transform.hs
{-# LANGUAGE BangPatterns #-} {-| 2D transformation matrices capable of translating, scaling, rotating, and skewing. -} module Reanimate.Transform ( identity , transformPoint , mkMatrix , toTransformation ) where -- XXX: Use Linear.Matrix instead of Data.Matrix to drop the 'matrix' dependency. import ...
null
https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/src/Reanimate/Transform.hs
haskell
# LANGUAGE BangPatterns # | 2D transformation matrices capable of translating, scaling, rotating, and skewing. XXX: Use Linear.Matrix instead of Data.Matrix to drop the 'matrix' dependency. | Identity matrix. | Apply a transformation matrix to a 2D point. (a:c:e:b:d:f:_) = M.toList m | Convert multiple SVG t...
module Reanimate.Transform ( identity , transformPoint , mkMatrix , toTransformation ) where import Data.List (foldl') import Data.Matrix (Matrix) import qualified Data.Matrix as M import Data.Maybe (fromMaybe) import Graphics.SvgTree (Coord, RPo...
7f6ea4c516da84c1d581496b6953d46db84c72dd0f4b3be25adbb6a870a79c50
ayazhafiz/plts
vm_op.ml
* Bytecode for the compiler VM . open Vm_debug type label = [ `Label of string ] [@@deriving show] type locator = [ `Imm of int | `FpOffset of int ] [@@deriving show] let main = `Label "@main" type op = | Eq | Lt | Sub | Add | Mul | Yield | Spawn of { proc : label; args_size : int; ret_size : int } ...
null
https://raw.githubusercontent.com/ayazhafiz/plts/753be76edf79a8ea590c2c85900141c664906f26/co_lc/vm_op.ml
ocaml
* call_args --- spawn * size of return value * store-into fp[offset] * restore to the frame pointer. Used for tail calls
* Bytecode for the compiler VM . open Vm_debug type label = [ `Label of string ] [@@deriving show] type locator = [ `Imm of int | `FpOffset of int ] [@@deriving show] let main = `Label "@main" type op = | Eq | Lt | Sub | Add | Mul | Yield | Spawn of { proc : label; args_size : int; ret_size : int } ...
9cd53a7e0f4235a289bef2f583c9b25d7029a9a85bd0cae5726319c2b1e2aac6
wagjo/hangman
core.clj
Copyright ( C ) 2012 , . ;; ;; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ;; (-1.0.php) which can be found ;; in the file epl-v10.html at the root of this distribution. ;; ;; By using this software in any fashion, you are agreeing to be bound ;; by the terms of ...
null
https://raw.githubusercontent.com/wagjo/hangman/6abab88feb593c2ee3629f0047fbabb844caf194/src/hangman/core.clj
clojure
The use and distribution terms for this software are covered by the (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this...
Copyright ( C ) 2012 , . Eclipse Public License 1.0 (ns hangman.core "Core Hangman functions." (:require [hangman.game :as game])) STEP 1 : game state (comment (def foo (atom 3)) @foo (swap! foo inc) @foo ) (def current-game (atom (game/create-game))) (defn get-game-info "Returns cu...
5f46259cea353fe1137f734d7678f7c7c0c2d089b2ac78ddbf78cccd8fbb9b0d
exercism/babashka
exemplar.clj
(ns annalyns-infiltration) (defn can-fast-attack? "Returns true if a fast-attack can be made, false otherwise." [knight-awake?] (not knight-awake?)) (defn can-spy? "Returns true if the kidnappers can be spied upon, false otherwise." [knight-awake? archer-awake? prisoner-awake?] (or knight-awake? archer-aw...
null
https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/concept/annalyns-infiltration/.meta/exemplar.clj
clojure
(ns annalyns-infiltration) (defn can-fast-attack? "Returns true if a fast-attack can be made, false otherwise." [knight-awake?] (not knight-awake?)) (defn can-spy? "Returns true if the kidnappers can be spied upon, false otherwise." [knight-awake? archer-awake? prisoner-awake?] (or knight-awake? archer-aw...
1dfe5f73d97e96154c81b0f293ca5b4238ed4f42adedf69c103b7023db99201b
Bogdanp/racket-kafka
producer.rkt
#lang racket/base (require racket/contract racket/format racket/match racket/port "private/batch.rkt" "private/client.rkt" "private/common.rkt" "private/error.rkt" "private/serde.rkt") (provide (contract-out [producer? (-> any/c boolean?)] [...
null
https://raw.githubusercontent.com/Bogdanp/racket-kafka/81f10078fa3c31b0dfd493a2142408c2c8dd1b59/kafka-lib/producer.rkt
racket
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; Future ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;...
#lang racket/base (require racket/contract racket/format racket/match racket/port "private/batch.rkt" "private/client.rkt" "private/common.rkt" "private/error.rkt" "private/serde.rkt") (provide (contract-out [producer? (-> any/c boolean?)] [...
b2038999e88ce92156e17ceb8a8dd32ac738b13e0390f3510a9b08439b7db496
cojna/iota
Radix.hs
{-# LANGUAGE BangPatterns #-} module Data.Vector.Sort.Radix where import Data.Bits import qualified Data.Foldable as F import qualified Data.Vector.Unboxed as U import qualified Data.Vector.Unboxed.Mutable as UM import Data.Word import Unsafe.Coerce -- import Data.Word64 radixSortInt :: U.Vector Int -> U.Vector Int...
null
https://raw.githubusercontent.com/cojna/iota/6d2ad5b71b1b50bca9136d6ed84f80a0b7713d7c/src/Data/Vector/Sort/Radix.hs
haskell
# LANGUAGE BangPatterns #
module Data.Vector.Sort.Radix where import Data.Bits import qualified Data.Foldable as F import qualified Data.Vector.Unboxed as U import qualified Data.Vector.Unboxed.Mutable as UM import Data.Word import Unsafe.Coerce import Data.Word64 radixSortInt :: U.Vector Int -> U.Vector Int radixSortInt = unsafeCoerce . ra...
392ef356fe458022a14915bc0dbc2479c328c6268002f1b82ce2d42e1c1acc5a
jwiegley/parsec-free
Lazy.hs
----------------------------------------------------------------------------- -- | Module : Text . Parsec . ByteString . Lazy Copyright : ( c ) 2007 -- License : BSD-style (see the LICENSE file) -- -- Maintainer : -- Stability : provisional -- Portability : portable -- -- Convinience def...
null
https://raw.githubusercontent.com/jwiegley/parsec-free/b8bbaaa0457e1871747af889fea4be97d20b41b1/Text/Parsec/ByteString/Lazy.hs
haskell
--------------------------------------------------------------------------- | License : BSD-style (see the LICENSE file) Maintainer : Stability : provisional Portability : portable Convinience definitions for working with lazy 'C.ByteString's. ------------------------------------------------------...
Module : Text . Parsec . ByteString . Lazy Copyright : ( c ) 2007 module Text.Parsec.ByteString.Lazy ( Parser, GenParser, parseFromFile ) where import Text.Parsec.Error import Text.Parsec.Prim import qualified Data.ByteString.Lazy.Char8 as C type Parser = Parsec C.ByteString () type GenPa...
9be27dd64da59af06c0fa1b12765bb36fd3c6ef573d77d225719b42b229f8e62
ds-wizard/engine-backend
Detail_GET.hs
module Registry.Api.Handler.Locale.Detail_GET where import Servant import Registry.Api.Handler.Common import Registry.Api.Resource.Locale.LocaleDetailDTO import Registry.Api.Resource.Locale.LocaleDetailJM () import Registry.Model.Context.BaseContext import Registry.Model.Context.ContextLenses () import Registry.Servi...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-registry/src/Registry/Api/Handler/Locale/Detail_GET.hs
haskell
module Registry.Api.Handler.Locale.Detail_GET where import Servant import Registry.Api.Handler.Common import Registry.Api.Resource.Locale.LocaleDetailDTO import Registry.Api.Resource.Locale.LocaleDetailJM () import Registry.Model.Context.BaseContext import Registry.Model.Context.ContextLenses () import Registry.Servi...
5d26a32abd4e79fcb0a6047bc1f3c7309e34e0e453ad476d2d18d306bf993732
metaocaml/ber-metaocaml
pr7348.ml
(* TEST * expect *) module F (X : sig type t = private < foo:int; ..> val x : t end) = struct let x : < foo: int; ..> = X.x end;; [%%expect{| module F : functor (X : sig type t = private < foo : int; .. > val x : t end) -> sig val x : X.t end |}] module M = struct type t = < foo: int; bar: int> let x =...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-modules/pr7348.ml
ocaml
TEST * expect
module F (X : sig type t = private < foo:int; ..> val x : t end) = struct let x : < foo: int; ..> = X.x end;; [%%expect{| module F : functor (X : sig type t = private < foo : int; .. > val x : t end) -> sig val x : X.t end |}] module M = struct type t = < foo: int; bar: int> let x = object method foo ...
7e5f013c279de8d164ac1b6b16565fcca38daf8898b45faff90df2902de0c5ef
brandonbloom/factjor
project.clj
(defproject factjor "0.2.0" :description "A Factor-inspired, concatenative DSL for Clojure" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.5.1"]])
null
https://raw.githubusercontent.com/brandonbloom/factjor/88d5889a740bd54dd0f8480c02be3004c12f9340/project.clj
clojure
(defproject factjor "0.2.0" :description "A Factor-inspired, concatenative DSL for Clojure" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.5.1"]])
3e902eb2ddb43de64a2d6f519389b942af8c5060ced3f0206cc4d342b009f458
f-me/carma-public
LegacyModel.hs
# LANGUAGE ScopedTypeVariables # module Utils.LegacyModel where import Data.Maybe import Data.Text (Text) import qualified Data.Text as T import Data.Model import Util readIdent :: Model m => Text -> IdentI m readIdent s = fromMaybe (error "readIdent: no integer") $ fvIdent s...
null
https://raw.githubusercontent.com/f-me/carma-public/82a9f44f7d919e54daa4114aa08dfec58b01009b/srv/src/Utils/LegacyModel.hs
haskell
# LANGUAGE ScopedTypeVariables # module Utils.LegacyModel where import Data.Maybe import Data.Text (Text) import qualified Data.Text as T import Data.Model import Util readIdent :: Model m => Text -> IdentI m readIdent s = fromMaybe (error "readIdent: no integer") $ fvIdent s...
3f70440ebcba247d68521a0abce636f26fe75bc5ee26a67179438182c0c5e0d5
issuu/sure-deploy
sure_deploy.ml
open Core open Async module Stack = Lib.Swarm_types.Stack module Swarm = Lib.Swarm_types.Swarm module Service = Lib.Swarm_types.Service module Image = Lib.Swarm_types.Image module SSLConfig = Conduit_async.V2.Ssl.Config let set_verbose verbose = Log.Global.set_level @@ match verbose with | true -> `Info | fa...
null
https://raw.githubusercontent.com/issuu/sure-deploy/3df4298fd698dbdf221a8929e0c2b309728481f9/src/cli/sure_deploy.ml
ocaml
open Core open Async module Stack = Lib.Swarm_types.Stack module Swarm = Lib.Swarm_types.Swarm module Service = Lib.Swarm_types.Service module Image = Lib.Swarm_types.Image module SSLConfig = Conduit_async.V2.Ssl.Config let set_verbose verbose = Log.Global.set_level @@ match verbose with | true -> `Info | fa...
0b4cdf0435505f9b4b4b27648304ada50a74bc68fdae32f628e1963b50a8305a
openmusic-project/openmusic
cif.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; cif.lisp --- Structure and function call function in libffi ;;; Copyright ( C ) 2009 , 2010 , 2011 < > ;;; ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a copy of this software and associated documentation files ( the " Softwa...
null
https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/api/foreign-interface/ffi/CFFI/libffi/cif.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to...
cif.lisp --- Structure and function call function in libffi Copyright ( C ) 2009 , 2010 , 2011 < > files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE I...
16594e47a73a16f52a03912c8e81c8109100a24afc9f69589b995cafc156a78b
clojusc/ltest
sample2.clj
(ns ltest.group1.samples.sample2 (:require [clojure.test :refer [are deftest is testing]] [ltest.core :refer [run-test run-tests run-suite run-suites]])) (deftest multiple-pass-test (is true) (is true) (is true) (is true) (is true) (is true) (is true) (is true) (is true) (is true) (is t...
null
https://raw.githubusercontent.com/clojusc/ltest/e82073d830e0e66018bbd6c98f49b0617cd2fa88/ltest/resources/sample-tests/src/ltest/group1/samples/sample2.clj
clojure
(ns ltest.group1.samples.sample2 (:require [clojure.test :refer [are deftest is testing]] [ltest.core :refer [run-test run-tests run-suite run-suites]])) (deftest multiple-pass-test (is true) (is true) (is true) (is true) (is true) (is true) (is true) (is true) (is true) (is true) (is t...
3a89aa7d77d54f58f09f3d5bbb73f0e6872fb0a140cfe1308f84ee592f00260b
mgeorgoulopoulos/TetrisHaskellWeekend
Piece.hs
Tetris Piece module module Piece ( Piece, pieceContains, tetrominoI, tetrominoO, tetrominoS, tetrominoZ, tetrominoT, tetrominoJ, tetrominoL, pieceToAA, pieceCW, pieceCCW, validPos, randomPiece , pieceColor ) where import Data.List(intercalate) impor...
null
https://raw.githubusercontent.com/mgeorgoulopoulos/TetrisHaskellWeekend/7dc406852e7578fb009434de54e3d3eb5b4f90f0/Piece.hs
haskell
The elements of the tuple are x and y coordinates. There can be negative coordinates and the center of rotation will be (0, 0) Each cell will have a width and height of '2' in this coordinate system. Piece definitions Checks if a piece contains the given coordinate Converts a piece to an ascii-art string P...
Tetris Piece module module Piece ( Piece, pieceContains, tetrominoI, tetrominoO, tetrominoS, tetrominoZ, tetrominoT, tetrominoJ, tetrominoL, pieceToAA, pieceCW, pieceCCW, validPos, randomPiece , pieceColor ) where import Data.List(intercalate) impor...
ac7e113c74f3c53eac6801b4318bba5ebefec7710b174748ad9bb6a205d7710d
practicalli/four-clojure
033_replicate_a_sequence.clj
(ns four-clojure.033-replicate-a-sequence) ;; #033 Replicate a Sequence ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Difficulty: Easy Topics : seqs ;; Write a function which replicates each element of a sequence a variable number of times. (= ( _ _ [ 1 2 3 ] 2 ) ' ( 1 1 2 2 3 3 ) ) (= ( _ _ [: a : b ] 4 ) '...
null
https://raw.githubusercontent.com/practicalli/four-clojure/9812b63769a06f9b0bfd63e5ffce380b67e5468b/src/four_clojure/033_replicate_a_sequence.clj
clojure
#033 Replicate a Sequence Difficulty: Easy Write a function which replicates each element of a sequence a variable number of times. REPL experiments `repeat` will create a given number of a value or a collection and when we have the right number of collections, we can interleave those collections to get the r...
(ns four-clojure.033-replicate-a-sequence) Topics : seqs (= ( _ _ [ 1 2 3 ] 2 ) ' ( 1 1 2 2 3 3 ) ) (= ( _ _ [: a : b ] 4 ) ' (: a : a : a : a : b : b : b : b ) ) (= ( _ _ [ 4 5 6 ] 1 ) ' ( 4 5 6 ) ) (= ( _ _ [ [ 1 2 ] [ 3 4 ] ] 2 ) ' ( [ 1 2 ] [ 1 2 ] [ 3 4 ] [ 3 4 ] ) ) (= ( _ _ [ 44 33 ] 2 ) [ 44 44...
eaa1d83e4cdaae422b9ea26e3b41ae7b6cab208585adf1cb4dfa3d59102a1a10
evincarofautumn/Toody
Search.hs
| Module : . Search Description : Parser combinators for searching in a grid . Copyright : ( c ) , 2017 License : MIT Maintainer : Module : Toody.Search Description : Parser combinators for searching in a grid. Copyright : (c) Jon Purdy, 2017 License : MIT Maintainer : -} m...
null
https://raw.githubusercontent.com/evincarofautumn/Toody/f0fe0bb2fe1289e9ee7a6eda064edd879a11b109/lib/Toody/Search.hs
haskell
| Runs a parser at every location on a grid and returns the list of successful results in north-to-south, west-to-east order. | Runs a parser at each step in the current direction until it succeeds. Fails if the grid boundary is reached without a successful parse.
| Module : . Search Description : Parser combinators for searching in a grid . Copyright : ( c ) , 2017 License : MIT Maintainer : Module : Toody.Search Description : Parser combinators for searching in a grid. Copyright : (c) Jon Purdy, 2017 License : MIT Maintainer : -} m...
6b5d9e7349765d92a13fee00e71b2fe938aae3118a353710e3c9a2f358403418
kfish/raft
test.hs
module Main where import Test.Tasty import Test.Tasty.HUnit import Test.Tasty.QuickCheck as QC import Raft.Types import TestStore ------------------------------------------------------------ main = defaultMain tests ------------------------------------------------------------ tests :: TestTree tests = testGrou...
null
https://raw.githubusercontent.com/kfish/raft/3ea1144e9ce88826e026adeb2604b774589ec59c/tests/test.hs
haskell
---------------------------------------------------------- ----------------------------------------------------------
module Main where import Test.Tasty import Test.Tasty.HUnit import Test.Tasty.QuickCheck as QC import Raft.Types import TestStore main = defaultMain tests tests :: TestTree tests = testGroup "Tests" [unitTests] unitTests = testGroup "Unit tests" [ testCase " Query empty " $ testQuery 0 empty ...
7f928ffc1d7a8e12d5a52836f307d410a7200b1ced655199769f766f34aaa17c
mzp/coq-for-ipad
exec.mli
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet Cr...
null
https://raw.githubusercontent.com/mzp/coq-for-ipad/4fb3711723e2581a170ffd734e936f210086396e/src/ocaml-3.12.0/debugger/exec.mli
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Objective Caml 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 . ...
6ec518eeec8029d73baa30937fcb00ab563bb9452c08545e888223fd7e30e1a9
jahfer/clj-activitypub
build.clj
(ns build (:require [clojure.tools.build.api :as b] [deps-deploy.deps-deploy :as dd])) (def version (format "0.%s" (b/git-count-revs nil))) (def libs [{:lib 'com.jahfer/clj-activitypub :src ["activitypub-core/src" "activitypub-ring/src"] :dir "clj-activitypub" :jar-fi...
null
https://raw.githubusercontent.com/jahfer/clj-activitypub/691ad62d6c51b56b78ddebe25c83d5af39eff09a/build.clj
clojure
:src ["activitypub-core/src"] :dir "clj-activitypub-core" :jar-file (format "target/%s-%s.jar" "clj-activitypub-core" version) :basis (b/create-basis {:project "./clj_activitypub/activitypub-core/deps.edn"})} :src ["activitypub-ring/src"] :jar-file (format "target/%s-%s.jar" "clj-activitypub-ring" ver...
(ns build (:require [clojure.tools.build.api :as b] [deps-deploy.deps-deploy :as dd])) (def version (format "0.%s" (b/git-count-revs nil))) (def libs [{:lib 'com.jahfer/clj-activitypub :src ["activitypub-core/src" "activitypub-ring/src"] :dir "clj-activitypub" :jar-fi...
f8ac462dbf3e4532dafc942288186788dfb8b1dadc4eeb99c2dd8e92b39dee59
felipecsl/show-do-milhao
Main.hs
module Main where import Lib main :: IO () main = libMain
null
https://raw.githubusercontent.com/felipecsl/show-do-milhao/cc1c7d48a72d68c38cad760654c3f2e50a3af03a/app/Main.hs
haskell
module Main where import Lib main :: IO () main = libMain
3c13f07ee0941590fddba6218f2a26a984ae58be2a9233160278b9bf15f2423a
herd/herdtools7
key.mli
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/tools/key.mli
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2010 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...
a6934643d96e48e211f688c05288ab0c6d7e3cd260a0d3ade676f051f9d04f82
didierverna/tfm
util.lisp
;;; util.lisp --- General Utilities Copyright ( C ) 2018 , 2019 Author : < > This file is part of TFM . ;; Permission to use, copy, modify, and distribute this software for any ;; purpose with or without fee is hereby granted, provided that the above ;; copyright notice and this permission notice appear ...
null
https://raw.githubusercontent.com/didierverna/tfm/192c10b04eaec381638bfcf9bbea66b208141f5a/core/src/util.lisp
lisp
util.lisp --- General Utilities Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTAB...
Copyright ( C ) 2018 , 2019 Author : < > This file is part of TFM . THIS SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN (i...
e7515e0a4a1b714dd7f589927a3c1fce85cd12a11105ef5e4be425dbf4200be9
eckyputrady/livelog
Main.hs
module Main where import qualified Lib main :: IO () main = Lib.main
null
https://raw.githubusercontent.com/eckyputrady/livelog/e94ac7d533906bf3fbeeda5e563014326b9e5fe3/code/api/app/Main.hs
haskell
module Main where import qualified Lib main :: IO () main = Lib.main
980c50153ebd079f6a2dd9f7d907aa5ae75f5eb7413a2201b7b79a82504bb118
dalmatinerdb/dflow
dflow_send.erl
%%%------------------------------------------------------------------- @author < > ( C ) 2014 , %%% @doc A dflow step that will send data to a procees using the moral %%% message (!) instead of following the gen_server cast/call. %%% %%% @end Created : 14 Dec 2014 by < > %%%---------------------------...
null
https://raw.githubusercontent.com/dalmatinerdb/dflow/61d70b79a24c36bf72608b9fc91e91657eddd012/src/dflow_send.erl
erlang
------------------------------------------------------------------- @doc A dflow step that will send data to a procees using the moral message (!) instead of following the gen_server cast/call. @end ------------------------------------------------------------------- -------------------------------------------------...
@author < > ( C ) 2014 , Created : 14 Dec 2014 by < > -module(dflow_send). -behaviour(dflow). -export([init/2, describe/1, start/2, emit/3, done/2, recv/2, recv/1]). -record(state, { pass = false :: boolean(), pid :: pid(), ref :: reference() }). @doc Same ...
719342083c7a9b85a431fcd05b8461b7bc6c88801dbd2fd28d76f4a4ab982e86
andrewMacmurray/haskell-book-solutions
Exercises.hs
module Ch26.Exercises where import Control.Monad.Trans.Reader import Control.Monad.Trans.State import Control.Monad.Trans.Maybe import Control.Monad import Control.Monad.IO.Class import Data.Functor.Identity rDec :: Num a => Reader a a rDec = reader $ flip (-) 1 rShow :: Show a => ReaderT a Identity String rShow = ...
null
https://raw.githubusercontent.com/andrewMacmurray/haskell-book-solutions/f4fd386187c03828d1736d9a43642ab4f0ec6462/src/ch26/Exercises.hs
haskell
module Ch26.Exercises where import Control.Monad.Trans.Reader import Control.Monad.Trans.State import Control.Monad.Trans.Maybe import Control.Monad import Control.Monad.IO.Class import Data.Functor.Identity rDec :: Num a => Reader a a rDec = reader $ flip (-) 1 rShow :: Show a => ReaderT a Identity String rShow = ...
2a6037b5241c4256133ce420233140a7513961252c716080dbd3f1ac1a90e69e
erlangonrails/devdb
bitcask_lockops.erl
%% ------------------------------------------------------------------- %% bitcask : - inspired key / value store %% Copyright ( c ) 2010 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 i...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/riak-0.11.0/deps/bitcask/src/bitcask_lockops.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissi...
bitcask : - inspired key / value store Copyright ( c ) 2010 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...
1b88ec7e0c713fdffbdc6494f53ee7807e980b21773f76b724b3b8f916097d53
TerrorJack/ghc-alter
Printf.hs
{-# LANGUAGE Safe #-} {-# LANGUAGE GADTs #-} ----------------------------------------------------------------------------- -- | -- Module : Text.Printf Copyright : ( c ) and 2013 -- License : BSD-style (see the file LICENSE in this distribution) -- Maintainer : < > -- Stability : prov...
null
https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/Text/Printf.hs
haskell
# LANGUAGE Safe # # LANGUAGE GADTs # --------------------------------------------------------------------------- | Module : Text.Printf License : BSD-style (see the file LICENSE in this distribution) Stability : provisional Portability : portable A C @printf(3)@-like formatter. This version has b...
Copyright : ( c ) and 2013 Maintainer : < > extended by as per the recommendations of and module Text.Printf( printf, hPrintf, is done by instantiating ' PrintfArg ' and providing > instance ( ) where > formatArg x fmt | fmtChar ( vFmt ' U ' fmt ) = = ' U ' = PrintfArg(.....
b5f1ce7068e40ef0428693f75d1c149c5d4401c210a2ccda545518435aa75508
aeternity/aeternity
aec_split_check.erl
%%%------------------------------------------------------------------- ( C ) 2019 , Aeternity Anstalt %%% @doc Utilities for checking the block reward ( see module aec_dev_reward ) . %%% %%% Intended for Developer usage from the console of a node. %%% @end %%%-----------------------------------------------...
null
https://raw.githubusercontent.com/aeternity/aeternity/b7ce6ae15dab7fa22287c2da3d4405c29bb4edd7/apps/aecore/src/aec_split_check.erl
erlang
------------------------------------------------------------------- @doc Intended for Developer usage from the console of a node. @end ------------------------------------------------------------------- Return balance of specified account at key block at specified height. Fraud check for current block, as it ...
( C ) 2019 , Aeternity Anstalt Utilities for checking the block reward ( see module aec_dev_reward ) . -module(aec_split_check). -export([ run_for_mainnet/1 , run_for_testnet/1 , balance_mainnet/1 , balance_testnet/1 , balance/2 , rewards/1 ]). -include_lib("a...
0c2998ce9c7d6d740ff303293fa81743242fc2f90349ed3f6d50027a81f3d9c6
janestreet/universe
ppx_variants_conv.mli
open Ppxlib val variants : Deriving.t
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/ppx_variants_conv/src/ppx_variants_conv.mli
ocaml
open Ppxlib val variants : Deriving.t
f687cae9b008943544134cdd068a6e148391deda8e7c446bc935fdf483242d7a
postmates/avrogato-erl
avrogato_test_utils.erl
-module(avrogato_test_utils). -export([records_equal/2, sort_record/1]). records_equal(Rec1, Rec2) -> sort_record(Rec1) =:= sort_record(Rec2). sort_record(R) -> lists:sort(lists:map(fun sort_sub_records/1, R)). sort_sub_records({Key, Val}) when is_list(Val) -> {Key, sort_record(Val)}; sort_sub_records(Fi...
null
https://raw.githubusercontent.com/postmates/avrogato-erl/0cac0b15df230627d44e2ef7925cc6fd1be2502e/test/avrogato_test_utils.erl
erlang
-module(avrogato_test_utils). -export([records_equal/2, sort_record/1]). records_equal(Rec1, Rec2) -> sort_record(Rec1) =:= sort_record(Rec2). sort_record(R) -> lists:sort(lists:map(fun sort_sub_records/1, R)). sort_sub_records({Key, Val}) when is_list(Val) -> {Key, sort_record(Val)}; sort_sub_records(Fi...
499dd15ffe6f6ef3cc71bd873f1a7f32d7d1f0c971941207acff6624536cb03b
grin-compiler/grin
Names.hs
# LANGUAGE LambdaCase , RecordWildCards , FlexibleInstances # module Transformations.Names where import Text.Printf import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import Control.Monad import Control.Monad.State import Data.Functor.Foldable as Foldable im...
null
https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/src/Transformations/Names.hs
haskell
name monad TODO: this should be put into a Piple.Definitions module only relevant heap operations (e.g.: deleting a dead case alternative should not trigger this) refresh names map names
# LANGUAGE LambdaCase , RecordWildCards , FlexibleInstances # module Transformations.Names where import Text.Printf import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import Control.Monad import Control.Monad.State import Data.Functor.Foldable as Foldable im...
db77e616c1ff95a57a2bb99625032ca3065125fea916d11bcd2ba5e9a65591c5
open-telemetry/opentelemetry-erlang
otel_otlp_traces.erl
%%%------------------------------------------------------------------------ Copyright 2022 , OpenTelemetry Authors 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 %% %% Unl...
null
https://raw.githubusercontent.com/open-telemetry/opentelemetry-erlang/37f3cecd9ad2a7b8f3b94c89118585991f0023b1/apps/opentelemetry_exporter/src/otel_otlp_traces.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 o...
Copyright 2022 , OpenTelemetry Authors Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(otel_otlp_traces). -export([to_proto/2]). -ifdef(TEST). -export([to_proto_by_instrumentation_scope/1, to_proto/1]). -...
af88daa0f83ea3030eabc903a9a3f6cc28d535a4b90e85201702322de21f15e8
namin/biohacker
my-fnd.lisp
;; -*- Mode: Lisp; -*- Natural deduction rules for Modified : forbus on Tue Apr 2 10:24:23 1996 Modified : namin for exercises 17 and 18 Copyright ( c ) 1991 - 1996 and , ;; All rights reserved. ;;; See the file legal.txt for a paragraph stating scope of permission ;;; and disclaimer of warranty. T...
null
https://raw.githubusercontent.com/namin/biohacker/6b5da4c51c9caa6b5e1a68b046af171708d1af64/BPS/ftre/my-fnd.lisp
lisp
-*- Mode: Lisp; -*- All rights reserved. See the file legal.txt for a paragraph stating scope of permission and disclaimer of warranty. The above copyright notice and that paragraph must be included in any separate copy of this file. These rules are based on a natural deduction system in terms of introducing an...
Natural deduction rules for Modified : forbus on Tue Apr 2 10:24:23 1996 Modified : namin for exercises 17 and 18 Copyright ( c ) 1991 - 1996 and , developed by Kalish and Montigue , which organizes rules As in the written rules , the predicate " SHOW " will indicate (in-package :COMMON-LISP-...
c6c438c7a62c015ec388dc4630c658fafa5b89239964c4ce03dd4100feb17369
yoriyuki/Camomile
locale.ml
Copyright ( C ) 2003 , 2011 (* This library is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . As a special exc...
null
https://raw.githubusercontent.com/yoriyuki/Camomile/d7d8843c88fae774f513610f8e09a613778e64b3/Camomile/public/locale.ml
ocaml
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License may link, statically or dynamically, a "work that uses this library" with a publicly distributed version of this library to produce an executable file containing portions of this lib...
Copyright ( C ) 2003 , 2011 as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . As a special exception to the GNU Library General Public License , you additional requirements listed in clause 6 of the GNU Library General we mean eith...
0c9e74075ea1569c397bf9a74434f317b9dade3d4ff54e27e091858772ee1d5b
LexiFi/menhir
dump.mli
(******************************************************************************) (* *) (* *) ...
null
https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/dump.mli
ocaml
**************************************************************************** file LICEN...
, Paris , PPS , Université Paris Diderot . All rights reserved . This file is distributed under the terms of the GNU General Public License version 2 , as...
328fc25a8556cbbc9605e2253a1615e6f774484095903891fa53d997fe9f0ece
nosana-ci/nosana-node
nosana.clj
(ns nosana-node.nosana (:require [integrant.core :as ig] [nos.ops.docker :as docker] [nos.core :as flow] [clojure.edn :as edn] [clj-http.client :as http] [clojure.core.async :as async :refer [<!! <! >!! go go-loop >! timeout take! chan put!]] ...
null
https://raw.githubusercontent.com/nosana-ci/nosana-node/9a9b6145daa0e8bb12b69ef39c13624576198016/src/nosana_node/nosana.clj
clojure
(def ipfs-base-url "-ipfs.com/ipfs/") account to be a valid TokenAccount (without further constraints). TODO: when the flow is malformed this will always error: what to do? put anything on :exit-ch to stop the loop otherwise we will loop onwards with a timeout Wait a bit for podman to boot TODO: version from en...
(ns nosana-node.nosana (:require [integrant.core :as ig] [nos.ops.docker :as docker] [nos.core :as flow] [clojure.edn :as edn] [clj-http.client :as http] [clojure.core.async :as async :refer [<!! <! >!! go go-loop >! timeout take! chan put!]] ...
a31dd54431713337005aeef31eb5927ec508b3717a22583d53d5cca4438554dd
haskell-mafia/mismi
test-io.hs
import Disorder.Core.Main import Test.IO.Mismi.EC2.Commands main :: IO () main = disorderMain [ Test.IO.Mismi.EC2.Commands.tests ]
null
https://raw.githubusercontent.com/haskell-mafia/mismi/f6df07a52c6c8b1cf195b58d20ef109e390be014/mismi-ec2/test/test-io.hs
haskell
import Disorder.Core.Main import Test.IO.Mismi.EC2.Commands main :: IO () main = disorderMain [ Test.IO.Mismi.EC2.Commands.tests ]
3cb33801203bdd2693e1d67bf3430a430ef6ec81967e4f53753dc1746f11a9d7
shirok/Gauche
srfi-189-tests.scm
Copyright ( C ) 2020 ;; Permission is hereby granted, free of charge, to any person obtaining a ;; copy of this software and associated documentation files (the " Software " ) , to deal in the Software without restriction , including ;; without limitation the rights to use, copy, modify, merge, publish, dist...
null
https://raw.githubusercontent.com/shirok/Gauche/ecaf82f72e2e946f62d99ed8febe0df8960d20c4/test/include/srfi-189-tests.scm
scheme
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the without limitation the rights to use, copy, modify, merge, publish, the following conditions: The above copyright notice and this permission notice shall be included OR IMPLIED, IN...
Copyright ( C ) 2020 " Software " ) , to deal in the Software without restriction , including distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is furnished to do so , subject to in all copies or substantial portions of the Software . THE SOFTWA...
90efc314cbbdc5a923b128e420a10e187d1383f3cb72784ba3632528dea22cd2
sarabander/p2pu-sicp
3.44.scm
(define (transfer from-account to-account amount) ((from-account 'withdraw) amount) ((to-account 'deposit) amount)) ;; There is no problem with transfer as long as the transaction is ;; guaranteed to succeed or fail atomically. Transfer differs from ;; exchange such that we don't need to swap the account balanc...
null
https://raw.githubusercontent.com/sarabander/p2pu-sicp/fbc49b67dac717da1487629fb2d7a7d86dfdbe32/3.4/3.44.scm
scheme
There is no problem with transfer as long as the transaction is guaranteed to succeed or fail atomically. Transfer differs from exchange such that we don't need to swap the account balances, and we don't expect the sum of the balances to remain the same after the transaction.
(define (transfer from-account to-account amount) ((from-account 'withdraw) amount) ((to-account 'deposit) amount))
78b72561e5f65aa1b68af973ba855ecf668d6eefdfa6d33b871c93b6afbe7ff2
mochi/eswf
eswf_amf.erl
-module(eswf_amf). -export([from_amf/1, from_amf/3]). -export([from_amf_utf8/2, from_amf_dict/4, from_amf_array/4]). -export([to_amf/1]). -export([to_amf_dict/2, to_amf_array/3]). -export([test/0]). -define(DOUBLE, 0). -define(BOOL, 1). -define(UTF8, 2). -define(OBJECT, 3). -define(MOVIECLIP, 4). -define(NULL, 5). -d...
null
https://raw.githubusercontent.com/mochi/eswf/51b60942cb34b8490aefe6f05e88852454681eee/src/eswf_amf.erl
erlang
get_ref({ref, RefNum}, S) -> alloc_refnum(S) -> RefNum = S#amf.objectcount, {RefNum, S#amf{objectcount=1 + RefNum}}. make_ref(RefNum, Object, S) -> Tree = gb_trees:insert(RefNum, Object, S#amf.objects), {{ref, RefNum}, S#amf{objects=Tree}}. from_amf(Code, Data) when Code == ?AMF3DATA -> {{am...
-module(eswf_amf). -export([from_amf/1, from_amf/3]). -export([from_amf_utf8/2, from_amf_dict/4, from_amf_array/4]). -export([to_amf/1]). -export([to_amf_dict/2, to_amf_array/3]). -export([test/0]). -define(DOUBLE, 0). -define(BOOL, 1). -define(UTF8, 2). -define(OBJECT, 3). -define(MOVIECLIP, 4). -define(NULL, 5). -d...
cf61a547b6829b199eac4645a8fe0ab495343bed20336df8c496086475b93b71
re-path/studio
user.cljs
(ns repath.user (:require [re-frame.core :as rf] [re-frame.db :as db] [repath.config :as config] [clojure.string :as str] [ajax.core])) (defn translate "Moves the selected elements." ([offset] (rf/dispatch [:elements/translate offset]) "") ([x y] (translate [x y]))) (defn fill "Fi...
null
https://raw.githubusercontent.com/re-path/studio/0349b95ff586c431a37bae0ad691e22b8d68a394/src/repath/user.cljs
clojure
divide already refers to cljs.core/divide
(ns repath.user (:require [re-frame.core :as rf] [re-frame.db :as db] [repath.config :as config] [clojure.string :as str] [ajax.core])) (defn translate "Moves the selected elements." ([offset] (rf/dispatch [:elements/translate offset]) "") ([x y] (translate [x y]))) (defn fill "Fi...
47116382d0656aaabb559796a3d184243fcbc13f8aa364a4456f84829b3fa5ef
jjmeyer0/gt
util.ml
let fname = if(Array.length(Sys.argv) > 1) then Sys.argv.(1) else "<stdin>";; let line = ref 1;;
null
https://raw.githubusercontent.com/jjmeyer0/gt/c0c7febc2e3fd532d44617f663b224cc0b9c7cf2/src/util.ml
ocaml
let fname = if(Array.length(Sys.argv) > 1) then Sys.argv.(1) else "<stdin>";; let line = ref 1;;
6ff8767944745005d2bc9d503af0a830b520909589034733b15caa96833b99c9
mirleft/ocaml-nocrypto
uncommon.ml
(** [Uncommon] is a [Common], now with less name clashes. *) let kasprintf k fmt = Format.(kfprintf (fun _ -> k (flush_str_formatter ())) str_formatter fmt) let invalid_arg fmt = kasprintf invalid_arg ("Nocrypto: " ^^ fmt) let failwith fmt = kasprintf failwith ("Nocrypto: " ^^ fmt) let (//) x y = if y < 1 then r...
null
https://raw.githubusercontent.com/mirleft/ocaml-nocrypto/ed7bb8d911dc340e36d85d335d9edb8339f0932d/src/uncommon.ml
ocaml
* [Uncommon] is a [Common], now with less name clashes.
let kasprintf k fmt = Format.(kfprintf (fun _ -> k (flush_str_formatter ())) str_formatter fmt) let invalid_arg fmt = kasprintf invalid_arg ("Nocrypto: " ^^ fmt) let failwith fmt = kasprintf failwith ("Nocrypto: " ^^ fmt) let (//) x y = if y < 1 then raise Division_by_zero else if x > 0 then 1 + ((x - 1) / y...
c5595702ac29fd3b74eac8f656deed3fbb9bf8b5d56ddbeaf39dbaa17a229c86
sjl/flax
svg.lisp
(in-package :flax.drawing) ;;;; Utils -------------------------------------------------------------------- (defun web-color (color) (with-color (color r g b) (format nil "#~2,'0X~2,'0X~2,'0X" (round (map-range 0 1 0 255 r)) (round (map-range 0 1 0 255 g)) (round (map-range 0 1...
null
https://raw.githubusercontent.com/sjl/flax/0dc4e7c0d096cd01a1009c8fbd0d96174ed48090/src/drawing/svg.lisp
lisp
Utils -------------------------------------------------------------------- Rectangles --------------------------------------------------------------- Circles ------------------------------------------------------------------ Points ------------------------------------------------------------------- Paths ---------...
(in-package :flax.drawing) (defun web-color (color) (with-color (color r g b) (format nil "#~2,'0X~2,'0X~2,'0X" (round (map-range 0 1 0 255 r)) (round (map-range 0 1 0 255 g)) (round (map-range 0 1 0 255 b))))) Canvas -------------------------------------------------------...
2406fc0883f8eb4c0c684867815fd1e20db27394856d61ee0dff6944a6c8e5ec
alessiostalla/doplus
packages.lisp
Copyright ( C ) 2011 ;;; ;;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ;;; (at your option) any later version. ;;; ;;; This program is distributed i...
null
https://raw.githubusercontent.com/alessiostalla/doplus/5b1ae044872580e6388c25ec2b31c26503e304f2/packages.lisp
lisp
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public...
Copyright ( C ) 2011 it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License #+abcl (require :extensible-sequences) (defpackage :doplus (:use :cl) (:shadow #...