_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
7382dae5101c4d69144327fc51e76a3fb3fe84a0bdcf9bd9888c7daa72dafe83
LLNL/rhizome
algorithm.clj
(ns rhizome.turbotopics.algorithm "The actual Turbo Topics (style) algorithm" (:use [rhizome.turbotopics.util :only (not-nil?)]) (:use [rhizome.turbotopics.permtest :only (null-score)]) (:use [clojure.set :only (union)]) (:use [clojure.contrib.seq-utils :only (indexed)]) (:use [clojure.contrib.generic.math-...
null
https://raw.githubusercontent.com/LLNL/rhizome/af8e00ac89a98e2d07fe7a6272857951c2781182/src/rhizome/turbotopics/algorithm.clj
clojure
Occurrence counts A significant bigram Pre-fetch the necessary counts P(v|u) under new P(v ~| u) under new P(v) old P(v') - SHOULD THIS BE UPDATED - I THINK SO...? gamma_u new scaling factor If we believe P(v') should be updated for v' != v, then should mult old-style gamma_u by new gamma_{not u} Calcu...
(ns rhizome.turbotopics.algorithm "The actual Turbo Topics (style) algorithm" (:use [rhizome.turbotopics.util :only (not-nil?)]) (:use [rhizome.turbotopics.permtest :only (null-score)]) (:use [clojure.set :only (union)]) (:use [clojure.contrib.seq-utils :only (indexed)]) (:use [clojure.contrib.generic.math-...
76a9cdb14d065e9ddff5ac34417efed59b7f0a414d171e35f4161159c8563d07
runeksvendsen/bitcoin-payment-channel
PubKey.hs
{-# LANGUAGE DeriveGeneric #-} # LANGUAGE GeneralizedNewtypeDeriving # module PaymentChannel.Internal.Crypto.PubKey ( IsPubKey(..) , SendPubKey(..) , RecvPubKey(..) , HasSendPubKey(..) , HasRecvPubKey(..) ) where import Data.Word (Word32) import qualified Network.Has...
null
https://raw.githubusercontent.com/runeksvendsen/bitcoin-payment-channel/3d2ee56c027571d1a86092c317640e5eae7adde3/src/PaymentChannel/Internal/Crypto/PubKey.hs
haskell
# LANGUAGE DeriveGeneric # |Types which contain a pubkey |Wrapper for value sender's public key |Wrapper for value receiver's public key |Types which contain a 'SendPubKey'
# LANGUAGE GeneralizedNewtypeDeriving # module PaymentChannel.Internal.Crypto.PubKey ( IsPubKey(..) , SendPubKey(..) , RecvPubKey(..) , HasSendPubKey(..) , HasRecvPubKey(..) ) where import Data.Word (Word32) import qualified Network.Haskoin.Crypto as HC import Pay...
fe083891bf47471c29b89ca0d57e36e53bfcde88e9617ac1806501649613fdc5
elisehuard/game-in-haskell
Backend.hs
{-# LANGUAGE PackageImports #-} module Hunted.Backend ( withWindow , readInput , exitKeyPressed , swapBuffers ) where import "GLFW-b" Graphics.UI.GLFW as GLFW import Control.Monad (when) import Control.Applicative ((<$>), (<*>)) --withWindow :: Int -> Int -> String -> (GLFW.Window -> IO ()) -> IO () withWindow :: I...
null
https://raw.githubusercontent.com/elisehuard/game-in-haskell/b755c42d63ff5dc9246b46590fb23ebcc1d455b1/src/Hunted/Backend.hs
haskell
# LANGUAGE PackageImports # withWindow :: Int -> Int -> String -> (GLFW.Window -> IO ()) -> IO ()
module Hunted.Backend ( withWindow , readInput , exitKeyPressed , swapBuffers ) where import "GLFW-b" Graphics.UI.GLFW as GLFW import Control.Monad (when) import Control.Applicative ((<$>), (<*>)) withWindow :: Int -> Int -> ((Int, Int) -> IO ()) -> String -> ...
b80e37190645c818c36ab633b366b21aef04a2c01136a6010312881289027d16
minoki/yurumath
Execution.hs
{-# LANGUAGE RankNTypes #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # # LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} # LANGUAGE ScopedTypeVariables # module Text.YuruMath.TeX.Execution (readRegIndex ,Assignment ,runLocal ,run...
null
https://raw.githubusercontent.com/minoki/yurumath/8529390f351654b3ea3157e2852497d0d09e7601/src/Text/YuruMath/TeX/Execution.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE GADTs # Used by \count, \countdef, etc ignore \relax ignore spaces strip 'isrelax' flag or 'noexpand' flag strip 'isrelax' flag strip 'noexpand' flag \mathchardef<control sequence><equals><15-bit number> "Bad math code (" ++ show v ++ ")" \Umathchardef<control sequence><equal...
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # # LANGUAGE DataKinds # # LANGUAGE ScopedTypeVariables # module Text.YuruMath.TeX.Execution (readRegIndex ,Assignment ,runLocal ,runGlobal ,texAssign ,arithmeticInteger ,arithme...
b2cc3f1f7c8b3090febca4251bf92d13205857790128b60ce07d8b8199040d1f
arrdem/katamari
generate_manifest.clj
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; ...
null
https://raw.githubusercontent.com/arrdem/katamari/55e2da2c37c02774a1332e410ceebee0a0742d27/src/clojure-tools/src/main/clj/clojure/tools/deps/alpha/script/generate_manifest.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (ns clojure.tools.deps.alpha.script.generate-manifest (:require [clojure.java.io :as jio] [clojure.string :as str] [clojure.tools.cli :as cli] [clojure.tools.deps.alpha :as deps] [clojure.tools.deps.alpha.gen.pom :as pom] ...
c4d5ecac9c0817fcd47fae3b3c0ec9154bc89692230adc5649714fb4bf25a70e
commercialhaskell/stack
Spec.hs
main :: IO () main = asdf
null
https://raw.githubusercontent.com/commercialhaskell/stack/255cd830627870cdef34b5e54d670ef07882523e/test/integration/tests/1659-skip-component/files/test/Spec.hs
haskell
main :: IO () main = asdf
e81af2bbd7d31b7a0d4649855237a2aabe665985ce56c387e86a146b6841ffd1
jordanthayer/ocaml-search
sliding_window.ml
* A sliding window is an array with indexes that do n't start at zero . It is dynamically sizing but can have its size fixed if desired . Since we may want to marshal this structure to a channel , we make sure that it does n't hold onto any functions ( hence requiring the init_fun param...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/structs/sliding_window.ml
ocaml
* [ind_of_num t n] gets the index for a sequence number. * [num_of_ind t ind] gets the seq number from an index. * [ind_of_num_bound from t n] errors if [n] is out of the window otherwise the index is given. * [reset sw min_num] resets the sliding window [min_num] is the new minimum number to use. * [get t i] get...
* A sliding window is an array with indexes that do n't start at zero . It is dynamically sizing but can have its size fixed if desired . Since we may want to marshal this structure to a channel , we make sure that it does n't hold onto any functions ( hence requiring the init_fun param...
d8c20f5ebe82787b2dd2d270acdb651fb06fbfde5361f7c431c60a6aae2fd6cd
97jaz/hamt
perf.rkt
#lang racket/base (require data/hamt (prefix-in f: data/hamt/fast) racket/syntax (for-syntax racket/base)) (define (random-key) (list->string (map integer->char (for/list ([i (in-range 1 (add1 (random 20)))]) (random 256))))) (define N 500000) (define (gc) (coll...
null
https://raw.githubusercontent.com/97jaz/hamt/561cb6a447e9766dcb8abf2c01b30b87d91135f5/tests/data/hamt/perf.rkt
racket
#lang racket/base (require data/hamt (prefix-in f: data/hamt/fast) racket/syntax (for-syntax racket/base)) (define (random-key) (list->string (map integer->char (for/list ([i (in-range 1 (add1 (random 20)))]) (random 256))))) (define N 500000) (define (gc) (coll...
6d1f5e6642f4783971ef38d7402d3dc2c875b5104c10ca81aa83509ba9f07186
QuantumNovice/AutoLisp-AutoCAD
tyyblock.lisp
(defun pointdivide (point n) (print point) (print n) (setq x(/ (cadr point) 2)) (setq y(/ (cadr point) 2)) (setq point (list x y)) (print point) ) (setq p1 (list 2 2)) (setq p2 (list 8 9.0)) (command "rectangle" p1 p2 "") (setq (pointdivide p1 2)) (setq (pointdivide p2 2)) (command "rect...
null
https://raw.githubusercontent.com/QuantumNovice/AutoLisp-AutoCAD/388cb1cfc75ee6723caa5fc0e6566bab64250d0d/RAW/AutoLisp/tyyblock.lisp
lisp
(defun pointdivide (point n) (print point) (print n) (setq x(/ (cadr point) 2)) (setq y(/ (cadr point) 2)) (setq point (list x y)) (print point) ) (setq p1 (list 2 2)) (setq p2 (list 8 9.0)) (command "rectangle" p1 p2 "") (setq (pointdivide p1 2)) (setq (pointdivide p2 2)) (command "rect...
a0f56e97ac65be7341167354d0363b992cb8bfdb13a4bb1203cad12eefea83ea
diagrams/geometry
Shapes.hs
# LANGUAGE FlexibleContexts # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # ----------------------------------------------------------------------------- -- | -- Module : Geometry.TwoD.Shapes Copyright : ( c ) 2011 - 2017 diagrams team ( see LICENSE ) -- License : BSD-style (see LICEN...
null
https://raw.githubusercontent.com/diagrams/geometry/945c8c36b22e71d0c0e4427f23de6614f4e7594a/src/Geometry/TwoD/Shapes.hs
haskell
--------------------------------------------------------------------------- | Module : Geometry.TwoD.Shapes License : BSD-style (see LICENSE) Maintainer : --------------------------------------------------------------------------- * Miscellaneous * Regular polygons * Other special polygons * Oth...
# LANGUAGE FlexibleContexts # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # Copyright : ( c ) 2011 - 2017 diagrams team ( see LICENSE ) Various two - dimensional shapes . module Geometry.TwoD.Shapes ( hrule, vrule , regPoly , triangle , eqTriangle , square , pentagon , hex...
d1f87bf96f091b571d392a78fba3072630d06305460f4cbe25fe68890f6b7653
VisionsGlobalEmpowerment/webchange
views.cljs
(ns webchange.lesson-builder.tools.script.dialog-item.character-movement.views (:require [re-frame.core :as re-frame] [webchange.lesson-builder.tools.script.dialog-item.character-movement.state :as state] [webchange.lesson-builder.tools.script.dialog-item.wrapper.views :refer [item-wrapper]] [webchang...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/1bcebce2d5a99b26cd559295d301d5255cca6a1a/src/cljs/webchange/lesson_builder/tools/script/dialog_item/character_movement/views.cljs
clojure
(ns webchange.lesson-builder.tools.script.dialog-item.character-movement.views (:require [re-frame.core :as re-frame] [webchange.lesson-builder.tools.script.dialog-item.character-movement.state :as state] [webchange.lesson-builder.tools.script.dialog-item.wrapper.views :refer [item-wrapper]] [webchang...
22e69d0c0f71253430c4ff39433b8ba09bcb7ddd3d26ad01e1cdf346df3020c8
triffon/fp-2019-20
01-rewrite-expressions.rkt
#lang racket (require rackunit) (require rackunit/text-ui) 1.1 - Преведете следващите изрази в префиксна форма ; Попълвате на мястото на (void) a - ( ( 2 + 3/16 ) / ( 9 * 2.78 ) ) + ( ( 5 / 2 ) - 6 ) (define a (+ (/ (+ 2 (/ 3 16)) (* 9 2.78)) (- (/ 5 2) 6))) b - ( 15 + 21 + ( 3 / 15 ) + ( 7 - ( 2 * 2 ) ) ) / 16 (...
null
https://raw.githubusercontent.com/triffon/fp-2019-20/7efb13ff4de3ea13baa2c5c59eb57341fac15641/exercises/computer-science-3/exercises/01.introduction/solutions/01-rewrite-expressions.rkt
racket
Попълвате на мястото на (void)
#lang racket (require rackunit) (require rackunit/text-ui) 1.1 - Преведете следващите изрази в префиксна форма a - ( ( 2 + 3/16 ) / ( 9 * 2.78 ) ) + ( ( 5 / 2 ) - 6 ) (define a (+ (/ (+ 2 (/ 3 16)) (* 9 2.78)) (- (/ 5 2) 6))) b - ( 15 + 21 + ( 3 / 15 ) + ( 7 - ( 2 * 2 ) ) ) / 16 (define b (/ (+ 15 21 (/ 3 15) (- ...
533915baac9f289cae6694a3f98cccaa314a85e4b5424772b2a9d0c178c03277
racket/gui
alignment-test.rkt
(require mzlib/class mzlib/etc mred "../verthoriz-alignment.rkt" "../lines.rkt" "../aligned-pasteboard.rkt" "../snip-wrapper.rkt") (require "../snip-lib.rkt") (define f (new frame% (label "f") (height 500) (width 500))) (send f show true) (define p (new aligned-pasteboard%)) (define c (new editor-canvas% (edit...
null
https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/embedded-gui/private/tests/alignment-test.rkt
racket
(require mzlib/class mzlib/etc mred "../verthoriz-alignment.rkt" "../lines.rkt" "../aligned-pasteboard.rkt" "../snip-wrapper.rkt") (require "../snip-lib.rkt") (define f (new frame% (label "f") (height 500) (width 500))) (send f show true) (define p (new aligned-pasteboard%)) (define c (new editor-canvas% (edit...
a63d3d49dfdc04722af2c0c606871561a19bea4d448e58336ac6ed0e9e464864
tweag/ormolu
Comments.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} -- | Helpers for formatting of comments. This is low-level code, use -- "Ormolu.Printer.Combinators" unless you know what you are doing. module Ormolu.Printer.Comments ( spitPrecedingComments, spitFollowingComments, spitRemainingComments, spitCom...
null
https://raw.githubusercontent.com/tweag/ormolu/f0b8690ae138b96a284f7d72204ca72382724e97/src/Ormolu/Printer/Comments.hs
haskell
# LANGUAGE OverloadedStrings # | Helpers for formatting of comments. This is low-level code, use "Ormolu.Printer.Combinators" unless you know what you are doing. -------------------------------------------------------------------------- Top-level | Output all preceding comments for an element at given location. | ...
# LANGUAGE LambdaCase # module Ormolu.Printer.Comments ( spitPrecedingComments, spitFollowingComments, spitRemainingComments, spitCommentNow, spitCommentPending, ) where import Control.Monad import qualified Data.List.NonEmpty as NE import Data.Maybe (listToMaybe) import GHC.Types.SrcLoc import Or...
2dbdd4f746e15f8e8e4564326ea426404348ba58e4728ec05dc6d877a9d1a799
RefactoringTools/HaRe
ExactPrint.hs
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE NamedFieldPuns # {-# LANGUAGE RankNTypes #-} module Language.Haskell.Refact.Utils.ExactPrint ( replace , replaceAnnKey , copyAnn , setAnnKeywordDP , clearPriorComments , balanceAllComments , locat...
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/src/Language/Haskell/Refact/Utils/ExactPrint.hs
haskell
# LANGUAGE RankNTypes # --------------------------------------------------------------------- |The annotations are keyed to the constructor, so if we replace a qualified appropriate annotation. --------------------------------------------------------------------- ---------------------------------------------------...
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE NamedFieldPuns # module Language.Haskell.Refact.Utils.ExactPrint ( replace , replaceAnnKey , copyAnn , setAnnKeywordDP , clearPriorComments , balanceAllComments , locate , addEmptyAnn , addAnn...
c1691cc0acfdc66a027bdad5448343b55e148f704b4e4c481bd15f4ec3426918
ocaml-omake/omake
lm_position.mli
val debug_pos : bool ref val trace_pos : bool ref * Lm_position information . * Lm_position information. *) type 'a pos (* * Module for creating positions. * You have to specify the name of the module * where the exception are being created: use * MakePos in each file where Name.name is set * to the nam...
null
https://raw.githubusercontent.com/ocaml-omake/omake/08b2a83fb558f6eb6847566cbe1a562230da2b14/src/libmojave/lm_position.mli
ocaml
* Module for creating positions. * You have to specify the name of the module * where the exception are being created: use * MakePos in each file where Name.name is set * to the name of the module. This is the name of the module where the position info is created Creating positions
val debug_pos : bool ref val trace_pos : bool ref * Lm_position information . * Lm_position information. *) type 'a pos module MakePos (Name : sig type t val name : string Utilities for managing values val loc_of_t : t -> Lm_location.t val pp_print_t : t Lm_printf.t end ) : sig type t = Nam...
6bc27fd0ad8aba608ce13096231d4a07351bfac930b9c4d34e0f440a6220cf0e
finnishtransportagency/harja
urakoiden_luonti.cljs
(ns harja.tiedot.vesivaylat.hallinta.urakoiden-luonti (:require [reagent.core :refer [atom]] [harja.asiakas.kommunikaatio :as k] [harja.loki :refer [log tarkkaile!]] [cljs.core.async :as async] [harja.ui.kartta.esitettavat-asiat :refer [kartalla-esitettavaan-muotoon]] ...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/af09d60911ed31ea98634a9d5c7f4b062e63504f/src/cljs/harja/tiedot/vesivaylat/hallinta/urakoiden_luonti.cljs
clojure
(ns harja.tiedot.vesivaylat.hallinta.urakoiden-luonti (:require [reagent.core :refer [atom]] [harja.asiakas.kommunikaatio :as k] [harja.loki :refer [log tarkkaile!]] [cljs.core.async :as async] [harja.ui.kartta.esitettavat-asiat :refer [kartalla-esitettavaan-muotoon]] ...
36dc51137f513f1105e7fe6f09e2ffce11157c97bd8f1edae350044f1c97145e
amnh/PCG
DiscreteWithTCM.hs
----------------------------------------------------------------------------- -- | -- Module : Bio.Metadata.DiscreteWithTCM Copyright : ( c ) 2015 - 2021 Ward Wheeler -- License : BSD-style -- -- Maintainer : -- Stability : provisional -- Portability : portable -- ------------------------------...
null
https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/core/data-structures/src/Bio/Metadata/DiscreteWithTCM.hs
haskell
--------------------------------------------------------------------------- | Module : Bio.Metadata.DiscreteWithTCM License : BSD-style Maintainer : Stability : provisional Portability : portable ---------------------------------------------------------------------------
Copyright : ( c ) 2015 - 2021 Ward Wheeler module Bio.Metadata.DiscreteWithTCM ( DiscreteCharacterMetadata(..) , DiscreteWithTcmCharacterMetadata() , DiscreteWithTCMCharacterMetadataDec() , GeneralCharacterMetadata(..) , HasCharacterAlphabet(..) , HasCharacterName(..) , HasCharacterW...
87dc52c0b4cdf8ae584351bce0c1625ecc8a9a6b8e4e97e81f8dab2cb0764aae
cmr-exchange/cmr-client
const.cljc
(ns cmr.client.common.const "Constants defined and/or used by the CMR client.") (def hosts "A map of the supported CMR hosts, where the key is the target deployment environment." {:prod "" :uat "" :sit "" :local ""}) (def deployment-type "A map of the CMR deployment types where the key is the targe...
null
https://raw.githubusercontent.com/cmr-exchange/cmr-client/0b4dd4114e3b5ed28fc5b57db0f8dcd8773c1c14/src/cljc/cmr/client/common/const.cljc
clojure
Local-only endpoints
(ns cmr.client.common.const "Constants defined and/or used by the CMR client.") (def hosts "A map of the supported CMR hosts, where the key is the target deployment environment." {:prod "" :uat "" :sit "" :local ""}) (def deployment-type "A map of the CMR deployment types where the key is the targe...
a8c74744fd1e68ccd181138439ad95378c32c03dcd65dcba047036179f4bbe55
mankyKitty/cautious-sniffle
TestOpts.hs
module General.TestOpts ( OverrideWDUrl (..) ) where import Test.Tasty.Options (IsOption (..)) import Servant.Client.Core (BaseUrl, parseBaseUrl) newtype OverrideWDUrl = OverrideWDUrl (Maybe BaseUrl) instance IsOption OverrideWDUrl where defaultValue = OverrideWDUrl Nothing parseValue =...
null
https://raw.githubusercontent.com/mankyKitty/cautious-sniffle/8916ef6e2d310158a76f8f573841e09ce3a0d7da/test/General/TestOpts.hs
haskell
module General.TestOpts ( OverrideWDUrl (..) ) where import Test.Tasty.Options (IsOption (..)) import Servant.Client.Core (BaseUrl, parseBaseUrl) newtype OverrideWDUrl = OverrideWDUrl (Maybe BaseUrl) instance IsOption OverrideWDUrl where defaultValue = OverrideWDUrl Nothing parseValue =...
8598dc2f8c0faa5d5067b16958865fabc7b05c249c67d3d0ac07ac333c422945
NorfairKing/smos
Stuck.hs
# LANGUAGE RecordWildCards # module Smos.Query.Commands.Stuck where import Conduit import qualified Data.Conduit.List as C import Smos.Query.Commands.Import import Smos.Report.Stuck import Smos.Report.Time smosQueryStuck :: StuckSettings -> Q () smosQueryStuck StuckSettings {..} = do now <- liftIO getZonedTime s...
null
https://raw.githubusercontent.com/NorfairKing/smos/91efacaede3574e2f8f9d9601bf0383897eebfd8/smos-query/src/Smos/Query/Commands/Stuck.hs
haskell
# LANGUAGE RecordWildCards # module Smos.Query.Commands.Stuck where import Conduit import qualified Data.Conduit.List as C import Smos.Query.Commands.Import import Smos.Report.Stuck import Smos.Report.Time smosQueryStuck :: StuckSettings -> Q () smosQueryStuck StuckSettings {..} = do now <- liftIO getZonedTime s...
1428fafaad23a6049b1155c7636b072eb4a591473d9944719f8c57cdc7b7c57b
poroh/ersip
ersip_sdp_attr_rtpmap_test.erl
%% Copyright ( c ) 2020 Dmitry Poroh %% All rights reserved. Distributed under the terms of the MIT License . See the LICENSE file . %% SDP media attribute rtpmap %% -module(ersip_sdp_attr_rtpmap_test). -include_lib("eunit/include/eunit.hrl"). %%%================================================================...
null
https://raw.githubusercontent.com/poroh/ersip/e408e8f3bbb45572118385b9df40d6e5b0dee714/test/sdp/media/ersip_sdp_attr_rtpmap_test.erl
erlang
All rights reserved. =================================================================== Cases ===================================================================
Copyright ( c ) 2020 Dmitry Poroh Distributed under the terms of the MIT License . See the LICENSE file . SDP media attribute rtpmap -module(ersip_sdp_attr_rtpmap_test). -include_lib("eunit/include/eunit.hrl"). parse_test() -> RtpmapBin0 = <<"99 AMR-WB/16000">>, {ok, Rtpmap0} = ersip_sdp_attr_rtpmap:p...
4bfc34ad878e5f5464207eaaaea37aaee435501f8928822bb39bde227a59485c
reanimate/reanimate
doc_calligra.hs
#!/usr/bin/env stack -- stack runghc --package reanimate {-# LANGUAGE OverloadedStrings #-} module Main (main) where import Reanimate import Reanimate.LaTeX import Reanimate.Builtin.Documentation main :: IO () main = reanimate $ docEnv $ staticFrame 1 $ center $ withStrokeWidth 0 $ wit...
null
https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/examples/doc_calligra.hs
haskell
stack runghc --package reanimate # LANGUAGE OverloadedStrings #
#!/usr/bin/env stack module Main (main) where import Reanimate import Reanimate.LaTeX import Reanimate.Builtin.Documentation main :: IO () main = reanimate $ docEnv $ staticFrame 1 $ center $ withStrokeWidth 0 $ withFillOpacity 1 $ scale 4 $ latexCfg calligra "calligra"
ab3c88c6ed2bfebf04ff5a6a3902f8afaec82647fa20f85753a4efaad1b8b82d
haskell-mafia/boris
test-io.hs
import Disorder.Core.Main import qualified Test.IO.Boris.Service.Git import qualified Test.IO.Boris.Service.Workspace main :: IO () main = disorderMain [ Test.IO.Boris.Service.Git.tests , Test.IO.Boris.Service.Workspace.tests ]
null
https://raw.githubusercontent.com/haskell-mafia/boris/fb670071600e8b2d8dbb9191fcf6bf8488f83f5a/boris-service/test/test-io.hs
haskell
import Disorder.Core.Main import qualified Test.IO.Boris.Service.Git import qualified Test.IO.Boris.Service.Workspace main :: IO () main = disorderMain [ Test.IO.Boris.Service.Git.tests , Test.IO.Boris.Service.Workspace.tests ]
6cb51dddfb5a71636adb2983ef28ec8db5c802f61aeacec2f1c16b71a0a72a57
jeapostrophe/lux
val-demo.rkt
#lang racket/base (require racket/match racket/fixnum racket/gui/base racket/class (prefix-in pict: pict) (prefix-in image: 2htdp/image) lux lux/chaos/gui lux/chaos/gui/val lux/chaos/gui/key) (define MODES (list (pict:arrowhead 30 0) ...
null
https://raw.githubusercontent.com/jeapostrophe/lux/f5d7c1276072f9ea4107b3f8a2d049e0b174c7ba/examples/val-demo.rkt
racket
#lang racket/base (require racket/match racket/fixnum racket/gui/base racket/class (prefix-in pict: pict) (prefix-in image: 2htdp/image) lux lux/chaos/gui lux/chaos/gui/val lux/chaos/gui/key) (define MODES (list (pict:arrowhead 30 0) ...
df32cc2b4c612a1f722f21f00c8d3e3187d4feabe31ee843634a72fe63fa77aa
cram2/cram
asynchronous-process-module-tests.lisp
Copyright ( c ) 2012 , < > ;;; All rights reserved. ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions are met: ;;; ;;; * Redistributions of source code must retain the above copyright ;;; notice, this list o...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_core/cram_process_modules/test/asynchronous-process-module-tests.lisp
lisp
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Red...
Copyright ( c ) 2012 , < > * Neither the name of the Intelligent Autonomous Systems Group/ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR ...
7532f3e48c41c0f550282f0fcc2bb232629474d1ef19c3204f57924215166746
nick8325/quickspec
Resolve.hs
-- A data structure for resolving typeclass instances and similar at runtime. -- -- Takes as input a set of functions ("instances"), and a type, and -- tries to build a value of that type from the instances given. -- -- For example, given the instances -- ordList :: Dict (Arbitrary a) -> Dict (Arbitrary [a]) ordC...
null
https://raw.githubusercontent.com/nick8325/quickspec/cb61f719d3d667674431867037ff44dec22ca4f9/src/QuickSpec/Internal/Haskell/Resolve.hs
haskell
A data structure for resolving typeclass instances and similar at runtime. Takes as input a set of functions ("instances"), and a type, and tries to build a value of that type from the instances given. For example, given the instances ordList :: Dict (Arbitrary a) -> Dict (Arbitrary [a]) their types must be ...
ordChar : : Dict ( Arbitrary ) and the target type Dict ( Arbitrary [ ] ) , it will produce the value ordList : : Dict ( Arbitrary [ ] ) . The instances can in fact be arbitrary functions - though # LANGUAGE RankNTypes , ScopedTypeVariables # module QuickSpec.Internal.Haskell.Resolve(Instances(..), in...
a171da674a5a8fb836a5b3e0c3eb2b693518e2bf5a9200013ea9869c943afc12
rksm/clj-org-analyzer
calendar.cljs
(ns org-analyzer.view.calendar (:require [org-analyzer.view.util :as util] [org-analyzer.view.dom :as dom] [org-analyzer.view.selection :as sel] [org-analyzer.view.geo :as geo] [clojure.string :refer [lower-case replace]] [reagent.core :as r :refer [cursor]]...
null
https://raw.githubusercontent.com/rksm/clj-org-analyzer/19da62aa4dcf1090be8f574f6f2d4c7e116163a8/src/org_analyzer/view/calendar.cljs
clojure
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- rectangle selection helpers -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
(ns org-analyzer.view.calendar (:require [org-analyzer.view.util :as util] [org-analyzer.view.dom :as dom] [org-analyzer.view.selection :as sel] [org-analyzer.view.geo :as geo] [clojure.string :refer [lower-case replace]] [reagent.core :as r :refer [cursor]]...
6b65e912e819247ed03ea833fc0a32a859c649b79efa0abaafb80da09bfd9c5f
razum2um/cljsh
core_test.clj
(ns cljsh.core-test (:require [clojure.test :refer :all] [cljsh.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
null
https://raw.githubusercontent.com/razum2um/cljsh/b2ebe284fea5dce618786111524735c73ff1be63/test/cljsh/core_test.clj
clojure
(ns cljsh.core-test (:require [clojure.test :refer :all] [cljsh.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
fd0389684b7fba16991ab516cb73f514fe78a20971f76a681b4e850876e9d0f2
thijs/android-ecl-bootstrap
cross-compile-64.lisp
Original file by for ECL . ;;; ;;; This is a much simplified version for EQL5. If you are on 64 bit Linux , you should not need to modify / adapt anything . ;;; requires NDK 18b standalone toolchain ;;; ( See examples ' my ' and ' REPL ' for integrating with ASDF / Quicklisp ) (pushnew :android *features*) (...
null
https://raw.githubusercontent.com/thijs/android-ecl-bootstrap/f8ae88619aad980505e9a01b898089254e6f26a4/example/app/src/main/lisp/utils/cross-compile-64.lisp
lisp
This is a much simplified version for EQL5. aarch64 (arm 64bit) (apply 'c:build-fasl name arguments)
Original file by for ECL . If you are on 64 bit Linux , you should not need to modify / adapt anything . requires NDK 18b standalone toolchain ( See examples ' my ' and ' REPL ' for integrating with ASDF / Quicklisp ) (pushnew :android *features*) (pushnew :aarch64 *features*) (require :cmp) (defpackage :c...
69bfccafc745ff58d91a678314d9d4570c773a5222e0e1a8c5e5ddedb81640d3
davidar/stochaskell
coal2.hs
~coalMove :: R -> Model -> P Model~ coalMove t m = do let (e,p,b,d) = coalMoveProbs m mixture' [(e, coalMoveRate t m) ,(p, coalMovePoint t m) ,(b, coalMoveBirth t m) ,(d, coalMoveDeath t m)]
null
https://raw.githubusercontent.com/davidar/stochaskell/d28f9245f5e07c004fb8fd3c828ac2e1cc561673/docs/poster/coal2.hs
haskell
~coalMove :: R -> Model -> P Model~ coalMove t m = do let (e,p,b,d) = coalMoveProbs m mixture' [(e, coalMoveRate t m) ,(p, coalMovePoint t m) ,(b, coalMoveBirth t m) ,(d, coalMoveDeath t m)]
150971e0e601544a1e3b5034b54585eb77db1b3ec07259c9887accadc805d04d
mbj/stratosphere
Group.hs
module Stratosphere.XRay.Group ( module Exports, Group(..), mkGroup ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import {-# SOURCE #-} Stratosphere.XRay.Group.InsightsConfigurationProperty as Exports import {-# SOURCE #-} Stratosph...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/xray/gen/Stratosphere/XRay/Group.hs
haskell
# SOURCE # # SOURCE #
module Stratosphere.XRay.Group ( module Exports, Group(..), mkGroup ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data Group = Group {filterExpression :: (Prelude.Ma...
563425eaf383184101ef33e5febfde553d07710b26703486d4c776a6a0b13a4b
ocaml-ppx/ppxlib
expansion_helpers.mli
(** Various helpers for expansion, such as quoting expressions in their context, or mangling names. *) open Import * { 2 Mangling } (** Derive mangled names from type names in a deriver. For instance, the [t] can be turned into [t_of_yojson] or [yojson_of_t] with the functions from this module. *) (** S...
null
https://raw.githubusercontent.com/ocaml-ppx/ppxlib/1110af2ea18f351cc3f2ccbee8444bb2a4b257b7/src/expansion_helpers.mli
ocaml
* Various helpers for expansion, such as quoting expressions in their context, or mangling names. * Derive mangled names from type names in a deriver. For instance, the [t] can be turned into [t_of_yojson] or [yojson_of_t] with the functions from this module. * Specification for name mangling. * [Prefix ...
open Import * { 2 Mangling } type affix = | PrefixSuffix of string * string * [ PrefixSuffix ( p , s ) ] adds both prefix [ p ] and suffix [ s ] . val mangle : ?fixpoint:string -> affix -> string -> string val mangle_type_decl : ?fixpoint:string -> affix -> type_declaration -> string val mangle_lid : ?fixpoint...
b8de846589ba5e29b61b3ac9fdc1945237a35dd716cd068c6743fb9f8645105d
comoyo/condensation
stack.clj
(ns com.comoyo.condensation.stack (:refer-clojure :exclude [update]) (:require [clojure.data.json :as json] [clojure.set :as set] [amazonica.aws.cloudformation :as cf] [org.tobereplaced.lettercase :as lc]) (:import [com.amazonaws.AmazonServiceException])) (def ^:const ^:privat...
null
https://raw.githubusercontent.com/comoyo/condensation/12eefa23af9d6610e012f3a23df4b3e1a73ef448/src/com/comoyo/condensation/stack.clj
clojure
(ns com.comoyo.condensation.stack (:refer-clojure :exclude [update]) (:require [clojure.data.json :as json] [clojure.set :as set] [amazonica.aws.cloudformation :as cf] [org.tobereplaced.lettercase :as lc]) (:import [com.amazonaws.AmazonServiceException])) (def ^:const ^:privat...
b8d6697a9b84ff387d2d8c3b150e2f154c2cbe39c32f492e0dca7f42339b7afa
footprintanalytics/footprint-web
failure_test.clj
(ns metabase.query-processor-test.failure-test "Tests for how the query processor as a whole handles failures." (:require [clojure.test :refer :all] [metabase.query-processor :as qp] [metabase.query-processor.interface :as qp.i] [metabase.test :as mt] [metabase.util.s...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/query_processor_test/failure_test.clj
clojure
`:database` is removed by the catch-exceptions middleware for historical reasons
(ns metabase.query-processor-test.failure-test "Tests for how the query processor as a whole handles failures." (:require [clojure.test :refer :all] [metabase.query-processor :as qp] [metabase.query-processor.interface :as qp.i] [metabase.test :as mt] [metabase.util.s...
94992522e00e88070238a5b8430adb15c290ddb99b991987107ba71419440100
dongcarl/guix
pm.scm
;;; GNU Guix --- Functional package management for GNU 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 Public License as published by the Free Software Foundation , either version 3 of the Lice...
null
https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/services/pm.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify (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 warranty of MERCHANTABILITY or FITNESS FOR ...
Copyright © 2017 < > 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 along with GNU . If not , see < / > . (define-module (gnu services pm) #:use-...
36895f8dfd3e1fe2a5ec4e69f781c9ee4f76c64e08b47afd092101557566e114
AeroNotix/raft
serialization.lisp
(defpackage :raft/serialization (:use :cl) (:export #:serializer #:make-basic-serializer #:cl-store-serializer)) (in-package :raft/serialization) (defclass serializer () () (:documentation "base class for serializers")) (defgeneric serialize (serializer thing stream)) (defgeneric deseria...
null
https://raw.githubusercontent.com/AeroNotix/raft/08921ac93f235595b2f0a344704ad2dad4e8ee1a/serialization.lisp
lisp
(defpackage :raft/serialization (:use :cl) (:export #:serializer #:make-basic-serializer #:cl-store-serializer)) (in-package :raft/serialization) (defclass serializer () () (:documentation "base class for serializers")) (defgeneric serialize (serializer thing stream)) (defgeneric deseria...
85cafff779ffac1b231745ec0a2ce52796d26f5f3832d742e92aae3ed298198e
unclebob/WTFisaMonad
monads.clj
(defn square [n] (* n n)) (defn enlist1 [f] (partial map f)) (def square-list (enlist1 square)) (map (fn [a] (map (fn [b] (* a b)) '(1 2 3))) '(4 5 6) )
null
https://raw.githubusercontent.com/unclebob/WTFisaMonad/8f23ca2a212882d08793e348ce7cb670c6da1a80/src/monads.clj
clojure
(defn square [n] (* n n)) (defn enlist1 [f] (partial map f)) (def square-list (enlist1 square)) (map (fn [a] (map (fn [b] (* a b)) '(1 2 3))) '(4 5 6) )
cc65659e7f75445b6a5c980778a9fa03a96ddbaa37676bcbf2ce571ee74e1b26
sbcl/sbcl
target-c-call.lisp
;;;; FIXME: This file and host-c-call.lisp are separate from the rest of the alien source code for historical reasons : CMU CL ;;;; made a distinction between the stuff in the C-CALL package and stuff in the ALIEN package . There 's no obvious boundary there , though , and SBCL does n't try to make this distincti...
null
https://raw.githubusercontent.com/sbcl/sbcl/ec7cc7f9fa46d0ac85e68257449d71a412452fab/src/code/target-c-call.lisp
lisp
FIXME: This file and host-c-call.lisp are separate from the made a distinction between the stuff in the C-CALL package and so it might make sense to just merge these files in with the rest of the SB-ALIEN code. more information. public domain. The software is in the public domain and is provided with absolutely...
rest of the alien source code for historical reasons : CMU CL stuff in the ALIEN package . There 's no obvious boundary there , though , and SBCL does n't try to make this distinction , This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which ...
55f6f30fb5e59455eaf96690327a6492d408a65529e6baf0f2bd10fb9ea2fa64
ivanjovanovic/sicp
e-5.5.scm
Exercise 5.5 . Hand - simulate the factorial and Fibonacci machines , using some nontrivial input ( requiring execution of at least one ; recursive call). Show the contents of the stack at each significant ; point in the execution. ; ------------------------------------------------------------ Lets take the sm...
null
https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/5.1/e-5.5.scm
scheme
recursive call). Show the contents of the stack at each significant point in the execution. ------------------------------------------------------------ start stack = empty jumped to after-fact jumped to after-fact stack = empty jumped to fact-done stack = empty
Exercise 5.5 . Hand - simulate the factorial and Fibonacci machines , using some nontrivial input ( requiring execution of at least one Lets take the smallest after the trivial cases , n = 3 n = 3 , val = whatever , continue = after - fact after 1st loop n = 2 , val = whatever stack = 3 | fact - done ...
9913b7549a446756959684f2f57778dd957c2d57626be250ee85359256bb9966
zeromq/chumak
subscriber.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(subscriber). -export([main/1]). main(Topic) -> application:start(chumak), {ok, Socket} = chumak:socket(sub), chumak:subscri...
null
https://raw.githubusercontent.com/zeromq/chumak/02f56f153d0c6988858483c9dd0a1c233e2aa342/examples/subscriber.erl
erlang
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(subscriber). -export([main/1]). main(Topic) -> application:start(chumak), {ok, Socket} = chumak:socket(sub), chumak:subscri...
8e361db6a0bb5a4e0409ee30758af418850b2a2bb64b7aca051ca9ed8d36be7f
mit-plv/riscv-semantics
CleanTest.hs
# LANGUAGE MultiParamTypeClasses , FlexibleInstances , ScopedTypeVariables , InstanceSigs , AllowAmbiguousTypes , FlexibleContexts # module Platform.CleanTest where import Spec.Machine import Spec.Decode import Utility.Utility import Spec.CSRFileIO import qualified Spec.CSRField as Field import Data.Bits import Data.In...
null
https://raw.githubusercontent.com/mit-plv/riscv-semantics/1c0da3cac9d3f8dd813d26c0d2fbaccbb2210313/src/Platform/CleanTest.hs
haskell
Verification Packet Impossible Pty lift $ writeIORef (valid_dst refs) True lift $ writeIORef (dst refs) reg lift $ writeIORef (d refs) $ fromIntegral val -- Wrap Memory instance: Convert from Int8 to Word8 refs <- get -- CSRs:
# LANGUAGE MultiParamTypeClasses , FlexibleInstances , ScopedTypeVariables , InstanceSigs , AllowAmbiguousTypes , FlexibleContexts # module Platform.CleanTest where import Spec.Machine import Spec.Decode import Utility.Utility import Spec.CSRFileIO import qualified Spec.CSRField as Field import Data.Bits import Data.In...
86750ada35779c1bffce0dec7fbfcc3d474d9d7c7e6fb0093b766925c0e79ddd
conscell/hugs-android
MArray.hs
----------------------------------------------------------------------------- -- | -- Module : Data.Array.MArray Copyright : ( c ) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- Stability : experimental -- Portability : non-por...
null
https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/packages/base/Data/Array/MArray.hs
haskell
--------------------------------------------------------------------------- | Module : Data.Array.MArray License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : experimental Portability : non-portable (uses Data.Array.Base) An overloaded interface to mutable arrays...
Copyright : ( c ) The University of Glasgow 2001 used with this interface , see " Data . Array . IO " , " Data . Array . ST " , and " Data . Array . Storable " . module Data.Array.MArray ( module Data.Ix, : : ( MArray a e m , Ix i ) = > ( i , i ) - > e - > m ( a i e ) : : ( MArray a e m , Ix i ) ...
d5872f45afe8f74190959a93ee920ce3491c616b05ae2685515a55709089cce8
cpeikert/Lol
KeyHomomorphicPRF.hs
| Module : Crypto . Lol . Applications . : Key - homomorphic PRF from < /~cpeikert/pubs/kh-prf.pdf [ BP14 ] > . Copyright : ( c ) , 2018 , 2018 License : GPL-3 Maintainer : Stability : experimental Portability : POSIX Key - homomorphic PRF from < /~cpeikert/...
null
https://raw.githubusercontent.com/cpeikert/Lol/4416ac4f03b0bff08cb1115c72a45eed1fa48ec3/lol-apps/Crypto/Lol/Applications/KeyHomomorphicPRF.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DefaultSignatures # # LANGUAGE GADTs # # LANGUAGE KindSignatures # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneKindSignatures # # LANGUAGE TypeFamilies # # LANGUA...
| Module : Crypto . Lol . Applications . : Key - homomorphic PRF from < /~cpeikert/pubs/kh-prf.pdf [ BP14 ] > . Copyright : ( c ) , 2018 , 2018 License : GPL-3 Maintainer : Stability : experimental Portability : POSIX Key - homomorphic PRF from < /~cpeikert/...
e69df69bfb87e26d6736c8d41806e90f1e7c97308f434f825379f6755768ec6a
clojure/data.xml
test_equiv.cljc
(ns clojure.data.xml.test-equiv (:require [clojure.data.xml :refer [element qname]] [clojure.test :refer [deftest is are testing]])) (deftest test-node-equivalence (are [repr1 repr2] (and (is (= repr1 repr2)) (is (= (hash repr1) (hash repr2)))) (element :foo) {:tag :foo :a...
null
https://raw.githubusercontent.com/clojure/data.xml/12cc9934607de6cb4d75eddb1fcae30829fa4156/src/test/clojure/clojure/data/xml/test_equiv.cljc
clojure
(ns clojure.data.xml.test-equiv (:require [clojure.data.xml :refer [element qname]] [clojure.test :refer [deftest is are testing]])) (deftest test-node-equivalence (are [repr1 repr2] (and (is (= repr1 repr2)) (is (= (hash repr1) (hash repr2)))) (element :foo) {:tag :foo :a...
9d2ca4f72976d7ebd85828655243322baa168e0f3ed33d245a51937fe42b6c9d
Apress/practical-webdev-haskell
Main.hs
module Main where import ClassyPrelude import Lib main :: IO () main = someFunc
null
https://raw.githubusercontent.com/Apress/practical-webdev-haskell/17b90c06030def254bb0497b9e357f5d3b96d0cf/03/app/Main.hs
haskell
module Main where import ClassyPrelude import Lib main :: IO () main = someFunc
025116110107522b323537919b2bfbb5ef3c98d14987e52911103d22b8826608
sergv/constrained
Constrained.hs
---------------------------------------------------------------------------- -- | -- Module : Data.Foldable.Constrained Copyright : ( c ) 2019 License : BSD-2 ( see LICENSE ) -- Maintainer : sergey@debian ---------------------------------------------------------------------------- {-# LANGUAG...
null
https://raw.githubusercontent.com/sergv/constrained/7a07b686e0f5fc039dd75f7358584487372ab3e2/constrained/src/Data/Foldable/Constrained.hs
haskell
-------------------------------------------------------------------------- | Module : Data.Foldable.Constrained Maintainer : sergey@debian -------------------------------------------------------------------------- # LANGUAGE BangPatterns # | Like 'Data.Foldable.Foldable' but allows elements to have c...
Copyright : ( c ) 2019 License : BSD-2 ( see LICENSE ) # LANGUAGE CPP # # LANGUAGE InstanceSigs # # LANGUAGE ScopedTypeVariables # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # module Data.Foldable.Constrained ( CFoldable(..) , cfoldrM , cfoldlM ...
cfcb69931d14e6793354485dea947c86324130eacb05589a36967db0a3369631
Ericson2314/lighthouse
PixelRectangles.hs
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.PixelRectangles Copyright : ( c ) 2002 - 2006 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : -- Stability : stable -- Portability :...
null
https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/OpenGL/Graphics/Rendering/OpenGL/GL/PixelRectangles.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.Rendering.OpenGL.GL.PixelRectangles License : BSD-style (see the file libraries/OpenGL/LICENSE) Maintainer : Stability : stable Portability : portable specs. ----------------------------------...
Copyright : ( c ) 2002 - 2006 This module corresponds to section 3.6 ( Pixel Rectangles ) of the OpenGL 2.1 module Graphics.Rendering.OpenGL.GL.PixelRectangles ( module Graphics.Rendering.OpenGL.GL.PixelRectangles.PixelStorage, module Graphics.Rendering.OpenGL.GL.PixelRectangles.PixelTransfer, modu...
c26be06e8603ef11833559ba6490f29de84f915e263c552cf77792d685a09c6e
votinginfoproject/data-processor
district_type.clj
(ns vip.data-processor.validation.v5.district-type (:require [vip.data-processor.validation.v5.util :as util])) (def validate "Validates all DistrictType elements' formats." (util/validate-enum-elements :district-type :errors))
null
https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/src/vip/data_processor/validation/v5/district_type.clj
clojure
(ns vip.data-processor.validation.v5.district-type (:require [vip.data-processor.validation.v5.util :as util])) (def validate "Validates all DistrictType elements' formats." (util/validate-enum-elements :district-type :errors))
1ef1d8e70017e34ef9a49217467c0164ebcc548584842da127c788d31d5719b2
dmitryvk/sbcl-win32-threads
late-deftypes-for-target.lisp
(in-package "SB!KERNEL") (sb!xc:deftype compiled-function () '(and function #!+sb-eval (not sb!eval:interpreted-function)))
null
https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/code/late-deftypes-for-target.lisp
lisp
(in-package "SB!KERNEL") (sb!xc:deftype compiled-function () '(and function #!+sb-eval (not sb!eval:interpreted-function)))
09e1c4b00f3201f44519be7a5357040f9ca70d86160c9781d198d51460a0afda
t-sin/inquisitor
inquisitor.lisp
(in-package :cl-user) (defpackage inquisitor-test (:use :cl :inquisitor :prove) (:import-from :babel :string-to-octets)) (in-package :inquisitor-test) ;; NOTE: To run this test file, execute `(asdf:test-system :inquisitor)' in your Lisp. (plan 5) (subtest "detect-encoding" (sub...
null
https://raw.githubusercontent.com/t-sin/inquisitor/423fa9bdd4a68a6ae517b18406d81491409ccae8/t/inquisitor.lisp
lisp
NOTE: To run this test file, execute `(asdf:test-system :inquisitor)' in your Lisp.
(in-package :cl-user) (defpackage inquisitor-test (:use :cl :inquisitor :prove) (:import-from :babel :string-to-octets)) (in-package :inquisitor-test) (plan 5) (subtest "detect-encoding" (subtest "for vector" (with-open-file (in (asdf:system-relative-pathname ...
b223a073b816eb8b9e82c9e81d50e384704e8e6cbce08a59c8add0afa9e23d87
willemdj/erlsom
erlsom_sax_utf16le.erl
Copyright ( C ) 2006 - 2008 %%% This file is part of Erlsom . %%% Erlsom 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 3 of the License , or ( at your option ) any later ...
null
https://raw.githubusercontent.com/willemdj/erlsom/b8b25d9b9f8676e114548792e9c01debf207926d/src/erlsom_sax_utf16le.erl
erlang
it under the terms of the GNU Lesser General Public License as but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the </>. Author contact: ==================================================================== =============================...
Copyright ( C ) 2006 - 2008 This file is part of Erlsom . Erlsom is free software : you can redistribute it and/or modify published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . Erlsom is distributed in the hope that it will be useful , GN...
c1eb460487c45eb280206a6d24dde2044bf06b00ae3cfa5d12aaae5f6d72ba4d
ivanreese/diminished-fifth
orchestra.cljs
(ns app.orchestra (:require [app.drummer :as drummer] [app.history :as history] [app.math :as math] [app.phasor :as phasor] [app.player :as player] [app.span :as span] [app.state :refer [state]] [app.util :refer [snoop-logg]] ...
null
https://raw.githubusercontent.com/ivanreese/diminished-fifth/db7f7c781809b7b2733301cdc5241b17a6fee178/src/app/orchestra.cljs
clojure
VELOCITY ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; PLAYERS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;...
(ns app.orchestra (:require [app.drummer :as drummer] [app.history :as history] [app.math :as math] [app.phasor :as phasor] [app.player :as player] [app.span :as span] [app.state :refer [state]] [app.util :refer [snoop-logg]] ...
a773b85d379776f9b24e20665e4089171ea6671e2640a3e092623bab2b695afe
drewolson/aoc-hs
Day22.hs
-- Solution liberally borrowed from module Aoc.Year2021.Day22 ( part1, part2, ) where import Aoc.Parser (Parser, runParser', signedIntP) import Control.Applicative ((<|>)) import Data.Foldable (Foldable (foldl')) import Text.Megaparsec (sepEndBy1) import Text.Megaparsec.Char (char, newline, space, string) ...
null
https://raw.githubusercontent.com/drewolson/aoc-hs/b0f06843e1f7d8c2af1da582e59a72d8f2bb73bf/aoc-year2021/src/Aoc/Year2021/Day22.hs
haskell
Solution liberally borrowed from
module Aoc.Year2021.Day22 ( part1, part2, ) where import Aoc.Parser (Parser, runParser', signedIntP) import Control.Applicative ((<|>)) import Data.Foldable (Foldable (foldl')) import Text.Megaparsec (sepEndBy1) import Text.Megaparsec.Char (char, newline, space, string) data Action = On | Off deriving (E...
9a933331c19169bf50735b5d02a3d427818dc75a0cdeab16715711fc0b262b15
DaMSL/K3
IO.hs
# LANGUAGE DeriveGeneric # # LANGUAGE ExistentialQuantification # module Language.K3.Interpreter.Builtins.IO where import Control.Monad.State import Language.K3.Core.Annotation import Language.K3.Core.Common import Language.K3.Core.Type import Language.K3.Interpreter.Data.Types import Language.K3.Interpreter.Data.A...
null
https://raw.githubusercontent.com/DaMSL/K3/51749157844e76ae79dba619116fc5ad9d685643/src/Language/K3/Interpreter/Builtins/IO.hs
haskell
Show values Log to the screen liftIO $ putStrLn s
# LANGUAGE DeriveGeneric # # LANGUAGE ExistentialQuantification # module Language.K3.Interpreter.Builtins.IO where import Control.Monad.State import Language.K3.Core.Annotation import Language.K3.Core.Common import Language.K3.Core.Type import Language.K3.Interpreter.Data.Types import Language.K3.Interpreter.Data.A...
e4f0c47e19ed96c68bb4d776b28caf1c4dd7b98317fb88fcce8d8eb0290a6ebe
grimmelm/littleton
test.ml
open Core_kernel module P = Program.DerivativeProgram type test = { citation : string option ; caption : string option ; comment : string option ; expected : Sexp.t option ; program : string} [@@deriving sexp] type suite = { title : string ; reference :...
null
https://raw.githubusercontent.com/grimmelm/littleton/efa8c90ae13b3965c81876723f6622f6d0319e80/lib/test.ml
ocaml
* Utility functions for working with toml * Build a test suite from an input source * Some useful test functions Check for successful parsing Compare the expected result with the computed result * Apply functions to the test programs in a suite
open Core_kernel module P = Program.DerivativeProgram type test = { citation : string option ; caption : string option ; comment : string option ; expected : Sexp.t option ; program : string} [@@deriving sexp] type suite = { title : string ; reference :...
1be4e90038273d51fc172eb5022244cc9bb7fb724b8b306bbd6dd460a5e6ad1e
dfinity/motoko
pretty.ml
include Mo_types.Type.MakePretty (Mo_types.Type.ElideStamps)
null
https://raw.githubusercontent.com/dfinity/motoko/dedaddffe633b07107e775e520700c1dbd18344f/src/languageServer/pretty.ml
ocaml
include Mo_types.Type.MakePretty (Mo_types.Type.ElideStamps)
228daf1c35a3b2138b084f75cc25c8d3cdb1d47449d42376668f5b4850962a29
soegaard/metapict
polygonal-numbers.rkt
#lang racket (require metapict) ;;; ;;; EXAMPLE ;;; Figure from Wikipedia article on polygonal numbers. ;;; (def (fig-polygonal-numbers) (let () (curve-pict-window (window -2.1 2.1 -2.1 2.1)) (set-curve-pict-size 400 400) (def A (pt 0 0)) (def B (pt 1 0)) space between pt centers ( 6 dots = > 5 ...
null
https://raw.githubusercontent.com/soegaard/metapict/47ae265f73cbb92ff3e7bdd61e49f4af17597fdf/metapict/examples/polygonal-numbers.rkt
racket
EXAMPLE Figure from Wikipedia article on polygonal numbers.
#lang racket (require metapict) (def (fig-polygonal-numbers) (let () (curve-pict-window (window -2.1 2.1 -2.1 2.1)) (set-curve-pict-size 400 400) (def A (pt 0 0)) (def B (pt 1 0)) space between pt centers ( 6 dots = > 5 spaces ) (def all-rings (append* (for/list ([j (in-range 1 6)...
8e82d254d3102625b78c6e3e079a73f5545efa084a4f1c2f4305b4755f4995a8
kseo/systemf
Pretty.hs
-- | -- A collection of pretty printers for core data types: -- module Language.LambdaCalculus.Pretty (module P) where import Language.LambdaCalculus.Pretty.Term as P import Language.LambdaCalculus.Pretty.Types as P
null
https://raw.githubusercontent.com/kseo/systemf/ea73fd42567adf2ddcd7bb60f11a66e10eebc154/src/Language/LambdaCalculus/Pretty.hs
haskell
| A collection of pretty printers for core data types:
module Language.LambdaCalculus.Pretty (module P) where import Language.LambdaCalculus.Pretty.Term as P import Language.LambdaCalculus.Pretty.Types as P
df3a2fda60bd429fb86fc84256c1e91e0efc0bee3c7711ac7a8a7ade7b417758
plai-group/daphne
reverse_diff.clj
(ns daphne.reverse-diff "Reverse mode auto-diff." (:require [anglican.runtime :refer [observe* normal]] [daphne.gensym :refer [*my-gensym*]]) (:import [anglican.runtime normal-distribution])) ;; The following code so far follows ;; -bcl.cs.may.ie/~barak/papers/toplas-reverse.pdf and derivatives ...
null
https://raw.githubusercontent.com/plai-group/daphne/b0f43fbb9c856116ec44419fea91c4011072dd74/src/daphne/reverse_diff.clj
clojure
The following code so far follows -bcl.cs.may.ie/~barak/papers/toplas-reverse.pdf Proposed roadmap + function composition (boundary type) + external primitive functions following diffsharp + extend to core.matrix + support simple deep learning style composition some aliasing for formula sanit...
(ns daphne.reverse-diff "Reverse mode auto-diff." (:require [anglican.runtime :refer [observe* normal]] [daphne.gensym :refer [*my-gensym*]]) (:import [anglican.runtime normal-distribution])) and derivatives . 2008 . 1 . generalization + arbitrary Anglican style nested values + in...
ee1e7f0a6c44b0432790d536310aab27b63316d88c64ee44ce6a6be6af742918
PEZ/rich4clojure
problem_128.clj
(ns rich4clojure.easy.problem-128 (:require [hyperfiddle.rcf :refer [tests]])) ;; = Recognize Playing Cards = ;; By 4Clojure user: amalloy ;; Difficulty: Easy ;; Tags: [strings game] ;; A standard American deck of playing cards has four ;; suits - spades, hearts, diamonds, and clubs - and thirteen cards in each...
null
https://raw.githubusercontent.com/PEZ/rich4clojure/2ccfac041840e9b1550f0a69b9becbdb03f9525b/src/rich4clojure/easy/problem_128.clj
clojure
= Recognize Playing Cards = By 4Clojure user: amalloy Difficulty: Easy Tags: [strings game] suits - spades, hearts, diamonds, and clubs - and then the jack , queen, king, and ace. It's convenient for humans to represent these cards as diamond queen respectively. But these forms are not convenient for pr...
(ns rich4clojure.easy.problem-128 (:require [hyperfiddle.rcf :refer [tests]])) A standard American deck of playing cards has four thirteen cards in each suit . Two is the lowest rank , suit / rank pairs , such as H5 or DQ : the heart five and define the cards to be valued from 0 ( the two ) to 12 string " ...
2ccc093398e50734174b431c14ecbdc76a5e936d177af8fe09315630d91434a0
aaronallen8455/inventory
T20.hs
# LANGUAGE PolyKinds # # LANGUAGE DataKinds # module HieSource.T20 where import Data.Proxy t20A :: Proxy (a :: [b] -> Bool -> Either b c) -> b -> c t20A = undefined t20B :: b -> Proxy (a :: Bool -> [b] -> Either b c) -> c t20B = undefined t20C :: b -> Proxy (a :: Bool -> [b] -> Either c b) -> c t20C = und...
null
https://raw.githubusercontent.com/aaronallen8455/inventory/e16244f2c3b920ec0caffc4b81d236219b78bd91/test/HieSource/T20.hs
haskell
# LANGUAGE PolyKinds # # LANGUAGE DataKinds # module HieSource.T20 where import Data.Proxy t20A :: Proxy (a :: [b] -> Bool -> Either b c) -> b -> c t20A = undefined t20B :: b -> Proxy (a :: Bool -> [b] -> Either b c) -> c t20B = undefined t20C :: b -> Proxy (a :: Bool -> [b] -> Either c b) -> c t20C = und...
c378257eab250de0743001ef407192c63d2f50d31e8e1139d2bdfc266dceaf09
jellelicht/guix
guile-wm.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2013 , 2014 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of t...
null
https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/guile-wm.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 © 2013 , 2014 < > 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 packages guile-wm) #:use-module (guix licenses) #:use-module (gnu packages) #:use...
59d077e3157e8fd5de963baa2d2eb0e7daaceefff8cb6143476e869ea827a110
SKS-Keyserver/sks-keyserver
ptree_consistency_test.ml
(***********************************************************************) (* ptree_consistency_test.ml - Test for verifying consistency of *) (* prefix tree data structure *) (* *) Copyright ( C ) 2002 ,...
null
https://raw.githubusercontent.com/SKS-Keyserver/sks-keyserver/a4e5267d817cddbdfee13d07a7fb38a9b94b3eee/ptree_consistency_test.ml
ocaml
********************************************************************* ptree_consistency_test.ml - Test for verifying consistency of prefix tree data structure ...
Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 , 2011 , 2012 , 2013 and Contributors This file is part of SKS . SKS is free software ; you can Public License as published by the Free Software Foundation ; either version 2 of the License , or...
65fd8e90e3f9550a517b07f98b31f151cd2f6115629a5e3212b4b92144b1f8c0
maxhbr/LDBcollector
Rating.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} module Model.LicenseProperties.Rating where import qualified Prelude as P import MyPrelude import qualified Data.Text as T import qualified Text.Pandoc as P import qualified Text.Pandoc.Builder as P data Rating = RGo -- can be used | RAt...
null
https://raw.githubusercontent.com/maxhbr/LDBcollector/51d940f0af00b2acdd7de246b2be16fa30fc8a6b/src/Model/LicenseProperties/Rating.hs
haskell
# LANGUAGE OverloadedStrings # can be used needs more attention needs aproval can't be used to keep track of current possibilities
# LANGUAGE DeriveGeneric # module Model.LicenseProperties.Rating where import qualified Prelude as P import MyPrelude import qualified Data.Text as T import qualified Text.Pandoc as P import qualified Text.Pandoc.Builder as P data Rating | RUnknown [Rating] deriving (Generic, Eq) ratingMoreGeneralT...
139939613584f1da0b920f52876916e0d0aa282be3e6ce53b34fc121e9b84eba
tautologico/opfp
c03-registros.ml
OCaml : na Prática do do Capítulo 03 - Registros e variantes OCaml: Programação Funcional na Prática Andrei de A. Formiga - Casa do Código Exemplos do Capítulo 03 - Registros e variantes *) Os exemplos deste capítulo foram pensados para uso no REPL , digitando uma expressão ...
null
https://raw.githubusercontent.com/tautologico/opfp/74ef9ed97b0ab6b78c147c3edf7e0b69f2acf9d1/capitulos/c03-registros.ml
ocaml
Pattern matching simples m = Papel O tipo determina o algoritmo Pattern matching com valores
OCaml : na Prática do do Capítulo 03 - Registros e variantes OCaml: Programação Funcional na Prática Andrei de A. Formiga - Casa do Código Exemplos do Capítulo 03 - Registros e variantes *) Os exemplos deste capítulo foram pensados para uso no REPL , digitando uma expressão ...
c57c5bbc1c9f6fecfa8efa76152aa65d082645aeaff26b2f91a9475d7f230b0f
kit-ty-kate/visitors
expr15c.ml
open Expr15 open Expr15b let () = Printf.printf "%d\n" (size (EAdd (EConst 22, EConst 11)))
null
https://raw.githubusercontent.com/kit-ty-kate/visitors/fc53cc486178781e0b1e581eced98e07facb7d29/test/expr15c.ml
ocaml
open Expr15 open Expr15b let () = Printf.printf "%d\n" (size (EAdd (EConst 22, EConst 11)))
a9a887d003d5f9d6517d64395eed21aae7b6a2a89c33950c61fbb017966df7f7
thheller/shadow-cljsjs
fr_ca.cljs
(ns cljsjs.moment.locale.fr-ca (:require ["moment/locale/fr-ca"]))
null
https://raw.githubusercontent.com/thheller/shadow-cljsjs/eaf350d29d45adb85c0753dff77e276e7925a744/src/main/cljsjs/moment/locale/fr_ca.cljs
clojure
(ns cljsjs.moment.locale.fr-ca (:require ["moment/locale/fr-ca"]))
94a0d44b90820b317a94e1d656c8e8168422b92f8efee4a859bd2537532bafa3
rowangithub/DOrder
ident.mli
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/typing/ident.mli
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ I d : ident.mli 9547 2010 - 01 - 22...
e951ac1b64e824f5972b096096aa583263d7f0bbf32fe65af5a7812737be2a5b
wireapp/wire-server
Cookie_20_28_29_user.hs
-- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License...
null
https://raw.githubusercontent.com/wireapp/wire-server/c428355b7683b7b7722ea544eba314fc843ad8fa/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Cookie_20_28_29_user.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under 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 PARTI...
Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along module Test.Wire.API.Golden.Gene...
180bc463443dd3831c6eb73674ed45cfeff59b2cca07e240f2cc63bbbfe39ebe
slyrus/cl-bio
utilities.lisp
(in-package :bio) ;; utility functions (defun split-string-into-lines-list (string &key (max-line-length 70)) (let ((line-buffer (make-string max-line-length))) (with-input-from-string (stream string) (loop for count = (read-sequence line-buffer stream) while (plusp count) collect (su...
null
https://raw.githubusercontent.com/slyrus/cl-bio/e6de2bc7f4accaa11466902407e43fae3184973f/utilities.lisp
lisp
utility functions
(in-package :bio) (defun split-string-into-lines-list (string &key (max-line-length 70)) (let ((line-buffer (make-string max-line-length))) (with-input-from-string (stream string) (loop for count = (read-sequence line-buffer stream) while (plusp count) collect (subseq line-buffer 0 co...
4f2163c538c54658e881caa2093952e2a11b171fb018d3c6277b02d27dc4a27e
screenshotbot/screenshotbot-oss
test-auto-cleanup.lisp
;;;; Copyright 2018-Present Modern Interpreters 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 /. (defpackage :screenshotbot/model/test-auto-cleanup (:use #:cl #:fiveam) (...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/7d884c485b2693945578ab19bc5ea45ff654b437/src/screenshotbot/model/test-auto-cleanup.lisp
lisp
Copyright 2018-Present Modern Interpreters 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 /. (defpackage :screenshotbot/model/test-auto-cleanup (:use #:cl #:fiveam) (:import-from #:util/store #:with-test-stor...
1655f2598ce0c4cdfa858f9e3eeae80e6f6aa9e0d72882ca7a8235aea0124f3d
caiorss/Functional-Programming
integral.hs
{- Reference: /~cazelais/187/simpson.pdf: -} f :: Double -> Double f x = x g x = sqrt(1+x^3) integratorSimple n f a b = area where dx = (b - a)/n xi = map (\i -> a + i*dx) [0..n] fxi = map f xi area = dx * sum fxi Consecutive Poi...
null
https://raw.githubusercontent.com/caiorss/Functional-Programming/ef3526898e3014e9c99bf495033ff36a4530503d/codes/integral.hs
haskell
Reference: /~cazelais/187/simpson.pdf: Trapezius Rule Integration - {-
f :: Double -> Double f x = x g x = sqrt(1+x^3) integratorSimple n f a b = area where dx = (b - a)/n xi = map (\i -> a + i*dx) [0..n] fxi = map f xi area = dx * sum fxi Consecutive Points Patterns - [ ( , x1 ) , ( x1 , x2 ) ... ( xk-1 , xk )...
4cb3b5c6eb9c1a460fede75bf495d6449ed2be8c8016d7d43171fbd82f3c3278
johnstonskj/rml-core
individual.rkt
#lang racket ;; ;; Racket Machine Learning - Core. ;; ~ 2018 . ;; (provide (contract-out [make-individual (->* () (#:data-set data-set?) #:rest any/c individual?)] [data-set-individual (-> data-set? individual?)] [individual? (-> any/c boolean?)] [no-more-individuals symbol?] ...
null
https://raw.githubusercontent.com/johnstonskj/rml-core/8f3ca8b47e552911054f2aa12b296dbf40dad637/rml/individual.rkt
racket
Racket Machine Learning - Core. ---------- Requirements ---------- Implementation
#lang racket ~ 2018 . (provide (contract-out [make-individual (->* () (#:data-set data-set?) #:rest any/c individual?)] [data-set-individual (-> data-set? individual?)] [individual? (-> any/c boolean?)] [no-more-individuals symbol?] [individuals (-> data-set? exact-no...
a45b74434e8d1b1cb5c108026b30edba208b800cd7f355754a5252d1f7b8fc95
sellout/haskerwaul
Full.hs
module Haskerwaul.Functor.Full ( module Haskerwaul.Functor.Full -- * extended modules , module Haskerwaul.Functor ) where import Data.Constraint ((:-), Dict) import Data.Functor.Identity (Identity) import Haskerwaul.Functor -- | [nLab](+functor) class Functor c d f => FullFunctor c d f -...
null
https://raw.githubusercontent.com/sellout/haskerwaul/cf54bd7ce5bf4f3d1fd0d9d991dc733785b66a73/src/Haskerwaul/Functor/Full.hs
haskell
* extended modules | [nLab](+functor) | `Dict` is a `Haskerwaul.Functor.Faithful.Full.FullFaithfulFunctor` between the category of constraints and __Hask__. | `Identity` is a `Haskerwaul.Functor.Faithful.Full.FullFaithfulFunctor` (endofunctor, actually) in __Hask__.
module Haskerwaul.Functor.Full ( module Haskerwaul.Functor.Full , module Haskerwaul.Functor ) where import Data.Constraint ((:-), Dict) import Data.Functor.Identity (Identity) import Haskerwaul.Functor class Functor c d f => FullFunctor c d f instance FullFunctor (:-) (->) Dict instance F...
8a21875a350bbd88436be68147883c3ae3e87a0a9eef9adccb7355f6f31b74ee
BenjaminVanRyseghem/great-things-done
due_date_picker.cljs
Copyright ( c ) 2015 , . All rights reserved . ; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( -1.0.php ) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; t...
null
https://raw.githubusercontent.com/BenjaminVanRyseghem/great-things-done/1db9adc871556a347426df842a4f5ea6b3a1b7e0/src/front/ui/widgets/due_date_picker.cljs
clojure
The use and distribution terms for this software are covered by the 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 software.
Copyright ( c ) 2015 , . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) (ns ui.widgets.due-date-picker (:use [jayq.core :only [$]]) (:require [gtd.settings :as settings] [reagent.core :as reagent :refer [atom]] [ui.widgets.show-in-today-picker :as show-in-today-picker]...
c6b5e1a4a83e9f88ba21f61eba9605d54a9fa6d780a2d36062d84a5efa20c062
camllight/camllight
filename.mli
Operations on file names value current_dir_name : string (* The conventional name for the current directory (e.g. [.] in Unix). *) and concat : string -> string -> string (* [concat dir file] returns a file name that designates file [file] in directory [dir]. *) and is_absol...
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/windows/src/lib/filename.mli
ocaml
The conventional name for the current directory (e.g. [.] in Unix). [concat dir file] returns a file name that designates file [file] in directory [dir]. Return [true] if the file name is absolute or starts with an explicit reference to the current directory ([./] or [../] in ...
Operations on file names value current_dir_name : string and concat : string -> string -> string and is_absolute : string -> bool and check_suffix : string -> string -> bool [ name suff ] returns [ true ] if the filename [ name ] ends with the suffix [ suff ] . ends with the suffix [...
78f79834501778d4c2ba4914f6e4919ee48e01eda902755e23e5818b9c373669
fakedata-haskell/fakedata
AddressSpec.hs
# LANGUAGE ScopedTypeVariables # {-# LANGUAGE OverloadedStrings #-} module AddressSpec where import qualified Data.Map as M import Data.Text hiding (all, map) import qualified Data.Text as T import qualified Data.Vector as V import Faker hiding (defaultFakerSettings) import Faker.Address import Test.Hspec import Test...
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/7b0875067386e9bb844c8b985c901c91a58842ff/test/AddressSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables # module AddressSpec where import qualified Data.Map as M import Data.Text hiding (all, map) import qualified Data.Text as T import qualified Data.Vector as V import Faker hiding (defaultFakerSettings) import Faker.Address import Test.Hspec import TestImport import Faker.Internal import...
be17254c84053cc98b7a9ef5da36bc20cef1c285fdc1d4e3261a5b0d33819953
CryptoKami/cryptokami-core
Node.hs
# OPTIONS_GHC -fno - warn - name - shadowing # # LANGUAGE BangPatterns # {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE GADTSyntax # # LANGUAGE Generalize...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/networking/src/Node.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveGeneric # # LANGUAGE RankNTypes # # LANGUAGE RecursiveDo # | Custom exception thrown by recvNext This carries the fields of the 'Fail' constructor of 'Decoder' constraints on them. | A listener that handles an in...
# OPTIONS_GHC -fno - warn - name - shadowing # # LANGUAGE BangPatterns # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE GADTSyntax # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE KindSignatures # # LANGUAGE NamedFieldPuns ...
0e746277cec26a728564e8d3fb047c02d14fe8b0123d5829dc0c9fcbbce7d502
dfinity/motoko
prelude.ml
let prelude = [%blob "prelude/prelude.mo"] let internals = [%blob "prelude/internals.mo"] let timers_api = [%blob "prelude/timers-api.mo"] let prim_module' = [%blob "prelude/prim.mo"] let prim_module ~timers:required = if required then prim_module' ^ timers_api else prim_module'
null
https://raw.githubusercontent.com/dfinity/motoko/e0a934029f0d927545317ecb90d1a829696c7ae3/src/prelude/prelude.ml
ocaml
let prelude = [%blob "prelude/prelude.mo"] let internals = [%blob "prelude/internals.mo"] let timers_api = [%blob "prelude/timers-api.mo"] let prim_module' = [%blob "prelude/prim.mo"] let prim_module ~timers:required = if required then prim_module' ^ timers_api else prim_module'
96622e5ca70e81bad2c8aacd63e12d5b133826d0ce518d2b5820871afbc3b46d
yuriy-chumak/ol
sum_digits_of_an_integer.scm
(define (sum n base) (if (zero? n) n (+ (mod n base) (sum (div n base) base)))) (print (sum 1 10)) (print (sum 1234 10)) (print (sum #xfe 16)) (print (sum #xf0e 16))
null
https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/tests/rosettacode/sum_digits_of_an_integer.scm
scheme
(define (sum n base) (if (zero? n) n (+ (mod n base) (sum (div n base) base)))) (print (sum 1 10)) (print (sum 1234 10)) (print (sum #xfe 16)) (print (sum #xf0e 16))
73bf613b2ddbf8b8144cc0f57cabeceab6b3ee596460207765ed5ee9482b509d
rm-hull/markov-chains
core_test.clj
(ns markov-chains.core-test (:require [clojure.test :refer :all] [markov-chains.core :refer :all])) (def bag {:red 0.2 :black 0.5 :blue 0.3}) (deftest check-cumulative (is (= [[:black 0.5] [:blue 0.8] [:red 1.0]] (cumulative bag)))) (deftest check-select (is (= :black (select 0.0 bag))) (is (=...
null
https://raw.githubusercontent.com/rm-hull/markov-chains/9b7b7e9ba3c81a4259dd3ecb3a20b1fd27e9b118/test/markov_chains/core_test.clj
clojure
(ns markov-chains.core-test (:require [clojure.test :refer :all] [markov-chains.core :refer :all])) (def bag {:red 0.2 :black 0.5 :blue 0.3}) (deftest check-cumulative (is (= [[:black 0.5] [:blue 0.8] [:red 1.0]] (cumulative bag)))) (deftest check-select (is (= :black (select 0.0 bag))) (is (=...
5aba57b5d8c5969c4f7c046d66eba32795662c8393b4f4e34db61572dd68862b
arenadotio/pgx
pgx_lwt_mirage.mli
Copyright ( C ) 2020 Petter * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation ; either * version 2 of the License , or ( at your option ) any later version , * with...
null
https://raw.githubusercontent.com/arenadotio/pgx/3f2c0fc385db40d108466df80dad7980587d4342/pgx_lwt_mirage/src/pgx_lwt_mirage.mli
ocaml
Copyright ( C ) 2020 Petter * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation ; either * version 2 of the License , or ( at your option ) any later version , * with...
04a1b77915eecf4124fff91d718875e852d7f33807130816dfd9e84ada5a2b5d
amitayh/elm-cljs
render.cljs
(ns elm-cljs.render (:require-macros [cljs.core.async.macros :refer [go]]) (:require [cljs.core.async :refer [>!]] [clojure.string :as str] [elm-cljs.channels :refer [messages]] [react :refer [createElement]] [react-dom :as react-dom])) (defn- callback? [key] (str/...
null
https://raw.githubusercontent.com/amitayh/elm-cljs/a451962844f8d96adc0d7bbcab8ddc97f6e8209e/src/elm_cljs/render.cljs
clojure
(ns elm-cljs.render (:require-macros [cljs.core.async.macros :refer [go]]) (:require [cljs.core.async :refer [>!]] [clojure.string :as str] [elm-cljs.channels :refer [messages]] [react :refer [createElement]] [react-dom :as react-dom])) (defn- callback? [key] (str/...
d86e11cc44c80a2ae090407a3a3669f1f79a3c86e669b7765cf393864168063e
skanev/playground
38.scm
SICP exercise 5.38 ; ; Our compiler is clever about avoiding unnecessary stack operations, but it ; is not clever at all when it comes to compiling calls to the primitive ; procedures of the language in terms of the primitive operations supplied by ; the machine. For example, consider how much code is compiled to com...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/05/38.scm
scheme
Our compiler is clever about avoiding unnecessary stack operations, but it is not clever at all when it comes to compiling calls to the primitive procedures of the language in terms of the primitive operations supplied by the machine. For example, consider how much code is compiled to compute addition procedure (...
SICP exercise 5.38 ( + a 1 ): The code sets up an argument list in argl , puts the primitive code for primitive and compound branches ( only one of which will be ( assign ( op lookup - variable - value ) ( const a ) ( reg env ) ) ( assign ( op + ) ( reg val ) ( const 1 ) ) registers arg1 and . The primit...
8798218cb88a8b25f436e56ed62f10679b63ed894b66e45241d2a931a5d878df
haskell/cabal
setup-external-ok.test.hs
import Test.Cabal.Prelude import Data.List import qualified Data.Char as Char main = setupAndCabalTest $ do skipUnlessGhcVersion ">= 8.1" ghc <- isGhcVersion "== 9.0.2 || == 9.2.* || == 9.4.* || == 9.6.*" expectBrokenIf ghc 7987 $ withPackageDb $ do containers_id <- getIPID "containers" withDirect...
null
https://raw.githubusercontent.com/haskell/cabal/0eb638fb18e4ef215413d1a1c25b5175e54f2158/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.test.hs
haskell
indefinitely, but it's OK; the recompile checker should get it. Ditto.
import Test.Cabal.Prelude import Data.List import qualified Data.Char as Char main = setupAndCabalTest $ do skipUnlessGhcVersion ">= 8.1" ghc <- isGhcVersion "== 9.0.2 || == 9.2.* || == 9.4.* || == 9.6.*" expectBrokenIf ghc 7987 $ withPackageDb $ do containers_id <- getIPID "containers" withDirect...
c86b0f480264fdec5733b6da4f7e7c594f3196464f3d1281a504393763576dc6
8c6794b6/haskell-sc-scratch
Util.hs
------------------------------------------------------------------------------ -- | -- Module : $Header$ CopyRight : ( c ) 8c6794b6 -- License : BSD3 Maintainer : -- Stability : unstable -- Portability : non-portable -- -- Utility used in DesigningSound codes. -- module DesigningSound.Util where i...
null
https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/designing-sound/src/DesigningSound/Util.hs
haskell
---------------------------------------------------------------------------- | Module : $Header$ License : BSD3 Stability : unstable Portability : non-portable Utility used in DesigningSound codes. ---------------------------------------------------------------------------- Server communication --...
CopyRight : ( c ) 8c6794b6 Maintainer : module DesigningSound.Util where import Data.List (isPrefixOf) import Sound.SC3 import Sound.OpenSoundControl audit :: String -> UGen -> IO Int audit name ug = withSC3 $ \fd -> do let name' | null name = "anon" | otherwise = name send fd . d_recv $ sy...
292f8676c8de4d6d73f3df6d0c1f275cc2b7cb68317197e480780b3784f40fd3
mindpool/gambit-termite
termite.scm
Copyright ( C ) 2005 - 2009 by , All Rights Reserved . ;; File: "termite.scm" ;; this is the main file for the Termite system (##namespace ("termite#")) (##include "~~/lib/gambit#.scm") (##include "termite#.scm") (declare (standard-bindings) (extended-bindings) (block)) ;; --------------------------------...
null
https://raw.githubusercontent.com/mindpool/gambit-termite/391b75253cc3a5abd77dfc29392a72b2eca0d09e/termite.scm
scheme
File: "termite.scm" this is the main file for the Termite system ---------------------------------------------------------------------------- translation tables for "published" PIDs translation table for "published" tags TODO Improve this --------------------------------------------------------------------------...
Copyright ( C ) 2005 - 2009 by , All Rights Reserved . (##namespace ("termite#")) (##include "~~/lib/gambit#.scm") (##include "termite#.scm") (declare (standard-bindings) (extended-bindings) (block)) System configuration & global data (define current-node (lambda () (error "uninitialized node"))) (def...
f20f2d40a8810951623e0a55b2dffe315ea2575d13887282ecb350df4d8c42de
parapluu/monadic-typechecker
Typechecker.hs
-- | Module : MultiError . Typechecker Copyright : © 2019 and License : MIT -- -- Stability : experimental -- Portability : portable -- -- This module includes everything you need to get started type checking a program . To build the Abstract Syntax Tree ( AST ) , please import and...
null
https://raw.githubusercontent.com/parapluu/monadic-typechecker/9f737a9ed2a3ac4ff5245e2e48deeac7bc2ee73d/artifact/typechecker-oopl/src/MultiError/Typechecker.hs
haskell
| Stability : experimental Portability : portable This module includes everything you need to get started type checking The main entry point to the type checker is the combinator 'tcProgram', which For example, for the following program (using a made up syntax): > > class C > should be parsed to gene...
Module : MultiError . Typechecker Copyright : © 2019 and License : MIT a program . To build the Abstract Syntax Tree ( AST ) , please import and build the AST from " MultiError . AST " . takes an AST and returns either a list of errors , or the typed program . > f : > Cl...
09187971269e49c12dbf0a660f19c765b7ef569424e2f2adee456f579d5032a2
crategus/cl-cffi-gtk
atdoc.lisp
;;; ---------------------------------------------------------------------------- ;;; atdoc.lisp ;;; ;;; Functions for generating the documentation for GTK+. ;;; ;;; The documentation of this file has been copied from the GLib 2.32.3 Reference Manual . See . ;;; Copyright ( C ) 2012 ;;; ;;; This program is free s...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/22156e3e2356f71a67231d9868abcab3582356f3/gtk/atdoc/atdoc.lisp
lisp
---------------------------------------------------------------------------- atdoc.lisp Functions for generating the documentation for GTK+. The documentation of this file has been copied from the This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General...
GLib 2.32.3 Reference Manual . See . Copyright ( C ) 2012 as published by the Free Software Foundation , either version 3 of the the GNU Lesser General Public License that clarifies the terms for use GNU Lesser General Public License for more details . You should have received a copy of the GNU Lesser Ge...
eef428559eac130b6cc4be1121fad9a92d1e02aefc0f9c83c36ba0e098c8b385
jrwdunham/tegere
runner.clj
(ns tegere.fiddle.runner "Fiddle file for playing around with runner.clj." (:require [tegere.runner :as r] [tegere.parser :as p] [tegere.fiddle.grammar :refer [chimpanzee-feature]])) (defn update-step-rets "Convenience fiddle function that appends val to the :step-rets key of the map co...
null
https://raw.githubusercontent.com/jrwdunham/tegere/ee05eec87419d7d4cf91aebd2da121225bb8b3eb/src/tegere/fiddle/runner.clj
clojure
Fake seq of scenario executions pass, pass, error, untested, untested pass, pass, pass, pass, pass pass, pass, error, untested, untested pass, pass, pass, pass, pass pass, pass, error, untested, untested pass, pass, error, untested, untested pass, pass pass, pass "he is happy" (fn [context] (update-step-rets c...
(ns tegere.fiddle.runner "Fiddle file for playing around with runner.clj." (:require [tegere.runner :as r] [tegere.parser :as p] [tegere.fiddle.grammar :refer [chimpanzee-feature]])) (defn update-step-rets "Convenience fiddle function that appends val to the :step-rets key of the map co...
7bd1b53a5be2e2885c0c690debd86c626f042ca861bbda0c4f463ce45871bb8f
grayswandyr/electrod
Gen_goal_recursor.ml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * electrod - a model finder for relational first - order linear temporal logic * * Copyright ( C ) 2016 - 2020 ONERA * Authors : ( ONERA ) , ( ONERA...
null
https://raw.githubusercontent.com/grayswandyr/electrod/eb0b02eafb34b6c921f99716cb5e90c946aae51b/src/Gen_goal_recursor.ml
ocaml
* Implements a recursor over generic goals (necessary for conversion to LTL).
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * electrod - a model finder for relational first - order linear temporal logic * * Copyright ( C ) 2016 - 2020 ONERA * Authors : ( ONERA ) , ( ONERA...
0bc48fc785eca135c6784aeaddd8630ac1480bc82808ff1fc4d92ed9cb237c2f
technomancy/leiningen
default.clj
(ns leiningen.new.default "Generate a library project." (:require [leiningen.new.templates :refer [renderer year date project-name ->files sanitize-ns name-to-path multi-segment]] [leiningen.core.main :as main])) ...
null
https://raw.githubusercontent.com/technomancy/leiningen/24fb93936133bd7fc30c393c127e9e69bb5f2392/src/leiningen/new/default.clj
clojure
(ns leiningen.new.default "Generate a library project." (:require [leiningen.new.templates :refer [renderer year date project-name ->files sanitize-ns name-to-path multi-segment]] [leiningen.core.main :as main])) ...
c38d09a76a739387c185a213725935010833b4d09fa5633deb5b3e28e579aa5a
nyu-acsys/drift
a-reverse.ml
let rec reverse ri rn (ra: int array) (rb: int array) = if (ri < rn) then let _ = Array.set rb (rn - ri - 1) (Array.get ra ri) in reverse (ri + 1) rn ra rb else () let main (n(*-:{v:Int | true}*)) = if n > 0 then let a = Array.make n 0 in let b = Array.make n 0 in reverse 0 n a b else ()
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/DRIFT/array/a-reverse.ml
ocaml
-:{v:Int | true}
let rec reverse ri rn (ra: int array) (rb: int array) = if (ri < rn) then let _ = Array.set rb (rn - ri - 1) (Array.get ra ri) in reverse (ri + 1) rn ra rb else () if n > 0 then let a = Array.make n 0 in let b = Array.make n 0 in reverse 0 n a b else ()
c34c50bf328306a8c2b7ec1489f6318189f6bd4265c2058103373aca1e9de698
nikodemus/SBCL
frlock.lisp
;;;; FRLocks for SBCL ;;;; ;;;; frlock is a "fast read lock", which allows readers to gain unlocked access ;;;; to values, and provides post-read verification. Readers which intersected ;;;; with writers need to retry. frlock is very efficient when there are many ;;;; readers and writes are both fast and relati...
null
https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/contrib/sb-concurrency/frlock.lisp
lisp
frlock is a "fast read lock", which allows readers to gain unlocked access to values, and provides post-read verification. Readers which intersected with writers need to retry. frlock is very efficient when there are many readers and writes are both fast and relatively scarce. It is, however, current hash-table ...
FRLocks for SBCL unsuitable when readers and writers need exclusion , such as with SBCL 's This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package :sb-concurre...
a69f05cf01498dfbf64c7ca7b62f468043dd13e627863ba9f76ebd86b5bdcf7a
satos---jp/mincaml_self_hosting
mandelblot_edit.ml
let rec dbl f = f +. f in let rec yloop y = if y >= 40 then () else let rec xloop x y = if x >= 40 then () else let cr = dbl (float_of_int x) /. 40.0 -. 1.5 in let ci = dbl (float_of_int y) /. 40.0 -. 1.0 in let rec iloop i zr zi zr2 zi2 cr ci = i...
null
https://raw.githubusercontent.com/satos---jp/mincaml_self_hosting/5fdf8b5083437d7607a924142eea52d9b1de0439/test/mandelblot_edit.ml
ocaml
let rec dbl f = f +. f in let rec yloop y = if y >= 40 then () else let rec xloop x y = if x >= 40 then () else let cr = dbl (float_of_int x) /. 40.0 -. 1.5 in let ci = dbl (float_of_int y) /. 40.0 -. 1.0 in let rec iloop i zr zi zr2 zi2 cr ci = i...
a18767cf8a5e2915b1cb5d0160949be85dea9c5a01d1348a74fd494ba1127eb0
annenkov/unmix
xgen.rkt
#lang racket (require srfi/13) (require "x-misc.rkt" "xio.rkt" "xsettings.rkt" "xcgr.rkt" "xar.rkt" "xcgr.rkt" "xensg.rkt" (prefix-in settings: "xsettings.rkt")) (require-by-mode) (define (ugen:switch action) (define (make-res-filename file-...
null
https://raw.githubusercontent.com/annenkov/unmix/e156fb706e52994f86029ac512a79c737d7ee0d8/xgen.rkt
racket
(load gen)
#lang racket (require srfi/13) (require "x-misc.rkt" "xio.rkt" "xsettings.rkt" "xcgr.rkt" "xar.rkt" "xcgr.rkt" "xensg.rkt" (prefix-in settings: "xsettings.rkt")) (require-by-mode) (define (ugen:switch action) (define (make-res-filename file-...
c765b77c82b79ef143b0f41ae5cf2f6946e1200fff8664bad3a5b468e00a4fed
avsm/ocaml-ssh
kex.ml
* Copyright ( c ) 2004,2005 Anil Madhavapeddy < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED...
null
https://raw.githubusercontent.com/avsm/ocaml-ssh/26577d1501e7a43e4b520239b08da114c542eda4/lib/kex.ml
ocaml
clients version servers version servers last kexinit servers host key exchange value sent by client response value sent by server the shared secret clients version string (no \r\n) servers version string (no \r\n) servers host key minimal number of bits in group preferred number of bits ...
* Copyright ( c ) 2004,2005 Anil Madhavapeddy < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED...
e1911e7081685860de67ede3fa96c5c2a485f3dd3a885d2cf4a334e6fbe7fd06
tjammer/raylib-ocaml
raylib_fixed_types.ml
module Types = Raylib_types.Types (Raylib_c_generated_types) open Types external identity : 'a -> 'a = "%identity" let build_enum_bitmask name alist = let lor', land', zero, lnot' = Int64.(logor, logand, zero, lognot) in let unexpected _ k = Printf.ksprintf failwith "Unexpected enum value for %s: %s" name ...
null
https://raw.githubusercontent.com/tjammer/raylib-ocaml/bf632bac260b263e9e783a5fc36b6a6b1f5df0d5/src/c/types/raylib_fixed_types.ml
ocaml
module Types = Raylib_types.Types (Raylib_c_generated_types) open Types external identity : 'a -> 'a = "%identity" let build_enum_bitmask name alist = let lor', land', zero, lnot' = Int64.(logor, logand, zero, lognot) in let unexpected _ k = Printf.ksprintf failwith "Unexpected enum value for %s: %s" name ...
ae194b120de20eb332a9c2e1e09324df64655eeb3899b97bf90188a3d3002e52
MysteryMachine/jobim
impl.clj
(ns jobim.core.impl) (defn def-form? [form] (= (first form) 'def)) (defn defn-form? [form] (= (first form) 'defn)) (defn def-form [[_ name & code]] `[~name ~@code]) (defn defn-form [[_ name args & code]] `[~name (fn ~name ~args ~@code)]) (defn nameless-form [length code] `[~(symbol (str "%" length)) ~code]) ...
null
https://raw.githubusercontent.com/MysteryMachine/jobim/6f12212e6958d9a2965b76a3c876f931f2e429e9/src/jobim/core/impl.clj
clojure
(ns jobim.core.impl) (defn def-form? [form] (= (first form) 'def)) (defn defn-form? [form] (= (first form) 'defn)) (defn def-form [[_ name & code]] `[~name ~@code]) (defn defn-form [[_ name args & code]] `[~name (fn ~name ~args ~@code)]) (defn nameless-form [length code] `[~(symbol (str "%" length)) ~code]) ...